From cfbb15f0c1d8f85a94ffbde60a5147fcfd7ae40d Mon Sep 17 00:00:00 2001 From: Andrew Branch Date: Wed, 28 Feb 2024 13:40:10 -0800 Subject: [PATCH] Ensure comments before // @Filename are not part of the following virtual test file (#57579) --- src/harness/harnessIO.ts | 4 + .../blockScopedNamespaceDifferentFile.js | 2 - .../blockScopedNamespaceDifferentFile.symbols | 9 +- .../blockScopedNamespaceDifferentFile.types | 1 - .../reference/commonJSReexport.symbols | 10 +- .../reference/commonJSReexport.types | 2 - ...onJsImportBindingElementNarrowType.symbols | 5 +- ...mmonJsImportBindingElementNarrowType.types | 3 - .../reference/commonSourceDirectory.js | 2 - .../reference/commonSourceDirectory.js.map | 2 +- .../reference/commonSourceDirectory.symbols | 4 +- .../reference/commonSourceDirectory.types | 2 - .../reference/commonSourceDirectory_dts.js | 2 - .../commonSourceDirectory_dts.symbols | 6 +- .../reference/commonSourceDirectory_dts.types | 2 - ...lback(moduleresolution=bundler).errors.txt | 2 - ...llback(moduleresolution=node16).errors.txt | 2 - ...back(moduleresolution=nodenext).errors.txt | 2 - .../decoratorReferenceOnOtherProperty.js | 2 - .../decoratorReferenceOnOtherProperty.symbols | 1 - .../decoratorReferenceOnOtherProperty.types | 1 - .../doNotEmitPinnedCommentOnNotEmittedNode.js | 4 +- ...tEmitPinnedCommentOnNotEmittedNode.symbols | 20 +- ...NotEmitPinnedCommentOnNotEmittedNode.types | 2 +- .../duplicateIdentifierEnum.errors.txt | 21 +- .../reference/duplicateIdentifierEnum.js | 2 - .../reference/duplicateIdentifierEnum.symbols | 27 +- .../reference/duplicateIdentifierEnum.types | 1 - .../enumAssignmentCompat6.errors.txt | 20 +- .../reference/enumAssignmentCompat6.js | 16 +- .../reference/enumAssignmentCompat6.symbols | 176 ++++----- .../reference/enumAssignmentCompat6.types | 4 +- .../reference/exportDefaultProperty.js | 2 - .../reference/exportDefaultProperty.symbols | 26 +- .../reference/exportDefaultProperty.types | 2 - .../reference/exportDefaultProperty2.js | 3 - .../reference/exportDefaultProperty2.symbols | 18 +- .../reference/exportDefaultProperty2.types | 2 - .../reference/exportEqualsProperty.js | 2 - .../reference/exportEqualsProperty.symbols | 24 +- .../reference/exportEqualsProperty.types | 2 - .../reference/exportEqualsProperty2.js | 3 - .../reference/exportEqualsProperty2.symbols | 18 +- .../reference/exportEqualsProperty2.types | 2 - .../reference/extendsUntypedModule.errors.txt | 2 - .../reference/extendsUntypedModule.js | 2 - ...ssingTypeArgsOnJSConstructCalls.errors.txt | 1 - ...nMissingTypeArgsOnJSConstructCalls.symbols | 1 - ...lInMissingTypeArgsOnJSConstructCalls.types | 1 - .../reference/importPropertyFromMappedType.js | 2 - .../importPropertyFromMappedType.symbols | 16 +- .../importPropertyFromMappedType.types | 2 - ...avascriptImportDefaultBadExport.errors.txt | 5 +- .../javascriptImportDefaultBadExport.symbols | 11 +- .../javascriptImportDefaultBadExport.types | 3 - .../jsContainerMergeJsContainer.symbols | 15 +- .../jsContainerMergeJsContainer.types | 1 - .../jsDeclarationsTypedefAndLatebound.symbols | 10 +- .../jsDeclarationsTypedefAndLatebound.types | 2 - .../reference/jsEmitIntersectionProperty.js | 4 - .../jsdocImportTypeNodeNamespace.errors.txt | 2 - .../jsdocImportTypeNodeNamespace.symbols | 4 +- .../jsdocImportTypeNodeNamespace.types | 2 - .../jsdocTypeReferenceToImport.symbols | 22 +- .../jsdocTypeReferenceToImport.types | 2 - .../jsdocTypeReferenceToMergedClass.symbols | 32 +- .../jsdocTypeReferenceToMergedClass.types | 2 - .../baselines/reference/libReferenceNoLib.js | 3 - .../reference/libReferenceNoLib.symbols | 18 +- .../reference/libReferenceNoLib.types | 2 - .../reference/libReferenceNoLibBundle.js | 3 - .../reference/libReferenceNoLibBundle.symbols | 18 +- .../reference/libReferenceNoLibBundle.types | 2 - .../reference/library-reference-1.js | 2 - .../reference/library-reference-1.symbols | 12 +- .../reference/library-reference-1.types | 2 - .../reference/library-reference-10.js | 2 - .../reference/library-reference-11.js | 2 - .../reference/library-reference-12.js | 2 - .../reference/library-reference-2.js | 2 - .../reference/library-reference-3.js | 2 - .../reference/library-reference-3.symbols | 12 +- .../reference/library-reference-3.types | 2 - .../reference/library-reference-4.js | 2 - .../reference/library-reference-4.symbols | 4 +- .../reference/library-reference-4.types | 2 - .../reference/library-reference-5.errors.txt | 4 +- .../reference/library-reference-5.js | 2 - .../reference/library-reference-5.symbols | 4 +- .../reference/library-reference-5.types | 2 - .../reference/library-reference-6.js | 2 - .../reference/library-reference-6.symbols | 12 +- .../reference/library-reference-6.types | 2 - .../reference/library-reference-7.js | 2 - .../reference/library-reference-7.symbols | 12 +- .../reference/library-reference-7.types | 2 - .../reference/library-reference-8.js | 2 - .../reference/library-reference-8.symbols | 12 +- .../reference/library-reference-8.types | 2 - .../moduleResolutionNoTsCJS.errors.txt | 2 - .../reference/moduleResolutionNoTsCJS.js | 3 - .../reference/moduleResolutionNoTsCJS.symbols | 2 - .../reference/moduleResolutionNoTsCJS.types | 2 - .../moduleResolutionNoTsESM.errors.txt | 2 - .../reference/moduleResolutionNoTsESM.js | 3 - .../reference/moduleResolutionNoTsESM.symbols | 2 - .../reference/moduleResolutionNoTsESM.types | 2 - ...ionWithExtensions_notSupported2.errors.txt | 2 - ...eResolutionWithExtensions_notSupported2.js | 2 - ...eResolutionWithExtensions_notSupported3.js | 2 - ...duleResolutionWithExtensions_unexpected.js | 2 - ...uleResolutionWithExtensions_unexpected2.js | 2 - ...lutionWithExtensions_withAmbientPresent.js | 2 - ...olutionWithSuffixes_oneNotFound.errors.txt | 2 - ...nWithSuffixes_threeLastIsBlank4.errors.txt | 2 - .../reference/moduleResolutionWithSymlinks.js | 5 - .../moduleResolutionWithSymlinks.symbols | 5 +- .../moduleResolutionWithSymlinks.types | 3 - ...ResolutionWithSymlinks_notInNodeModules.js | 10 - ...utionWithSymlinks_notInNodeModules.symbols | 2 +- ...leResolutionWithSymlinks_referenceTypes.js | 6 - ...olutionWithSymlinks_referenceTypes.symbols | 8 +- ...esolutionWithSymlinks_referenceTypes.types | 6 - ...moduleResolutionWithSymlinks_withOutDir.js | 3 - ...eResolutionWithSymlinks_withOutDir.symbols | 4 +- ...uleResolutionWithSymlinks_withOutDir.types | 2 - ...Resolution_packageJson_notAtPackageRoot.js | 2 - ...Json_notAtPackageRoot_fakeScopedPackage.js | 2 - ...Json_yesAtPackageRoot_fakeScopedPackage.js | 2 - ...MergedWithFunctionDefaultExport.errors.txt | 6 +- ...NotMergedWithFunctionDefaultExport.symbols | 14 +- ...ceNotMergedWithFunctionDefaultExport.types | 2 - ...ricConditionalTypeWithGenericImportType.js | 3 - ...nditionalTypeWithGenericImportType.symbols | 4 +- ...ConditionalTypeWithGenericImportType.types | 2 - .../baselines/reference/out-flag3.errors.txt | 2 - tests/baselines/reference/out-flag3.js | 3 - tests/baselines/reference/out-flag3.js.map | 4 +- .../reference/out-flag3.sourcemap.txt | 55 ++- tests/baselines/reference/out-flag3.symbols | 2 - tests/baselines/reference/out-flag3.types | 2 - .../outModuleConcatCommonjs.errors.txt | 2 - .../reference/outModuleConcatCommonjs.symbols | 2 - .../reference/outModuleConcatCommonjs.types | 2 - .../reference/outModuleConcatES6.errors.txt | 2 - .../reference/outModuleConcatES6.symbols | 2 - .../reference/outModuleConcatES6.types | 2 - .../reference/outModuleConcatUmd.errors.txt | 2 - .../reference/outModuleConcatUmd.symbols | 2 - .../reference/outModuleConcatUmd.types | 2 - ...gBasedModuleResolution2_classic.errors.txt | 7 +- ...pingBasedModuleResolution2_node.errors.txt | 7 +- ...thMappingBasedModuleResolution3_classic.js | 3 - ...pingBasedModuleResolution3_classic.symbols | 12 +- ...appingBasedModuleResolution3_classic.types | 2 - .../pathMappingBasedModuleResolution3_node.js | 3 - ...MappingBasedModuleResolution3_node.symbols | 12 +- ...thMappingBasedModuleResolution3_node.types | 2 - ...pertyAssignmentMergedTypeReference.symbols | 13 +- ...ropertyAssignmentMergedTypeReference.types | 1 - .../recursiveResolveDeclaredMembers.symbols | 5 +- .../recursiveResolveDeclaredMembers.types | 1 - .../reexportWrittenCorrectlyInDeclaration.js | 2 - ...xportWrittenCorrectlyInDeclaration.symbols | 1 - ...eexportWrittenCorrectlyInDeclaration.types | 1 - .../reexportedMissingAlias.errors.txt | 5 +- .../reference/reexportedMissingAlias.js | 1 - .../reference/reexportedMissingAlias.symbols | 1 - .../reference/reexportedMissingAlias.types | 1 - .../requireOfAnEmptyFile1.errors.txt | 4 +- .../reference/requireOfAnEmptyFile1.js | 3 - .../reference/requireOfAnEmptyFile1.symbols | 2 - .../reference/requireOfAnEmptyFile1.types | 2 - .../reference/requireTwoPropertyAccesses.js | 2 - .../requireTwoPropertyAccesses.symbols | 13 +- .../requireTwoPropertyAccesses.types | 1 - .../reference/systemModule11.errors.txt | 5 +- tests/baselines/reference/systemModule11.js | 6 +- .../reference/systemModule11.symbols | 7 +- .../baselines/reference/systemModule11.types | 3 - .../reference/topLevelBlockExpando.symbols | 26 +- .../reference/topLevelBlockExpando.types | 4 - .../reference/typeAndNamespaceExportMerge.js | 3 - .../typeAndNamespaceExportMerge.symbols | 10 +- .../typeAndNamespaceExportMerge.types | 2 - .../reference/typeReferenceDirectives3.js | 2 - .../typeReferenceDirectives3.symbols | 4 +- .../reference/typeReferenceDirectives3.types | 2 - .../reference/typeReferenceDirectives4.js | 2 - .../typeReferenceDirectives4.symbols | 4 +- .../reference/typeReferenceDirectives4.types | 2 - .../reference/typeReferenceDirectives6.js | 2 - .../typeReferenceDirectives6.symbols | 10 +- .../reference/typeReferenceDirectives6.types | 2 - .../reference/typeReferenceDirectives7.js | 2 - .../typeReferenceDirectives7.symbols | 6 +- .../reference/typeReferenceDirectives7.types | 2 - .../typeofImportInstantiationExpression.js | 5 - ...ypeofImportInstantiationExpression.symbols | 42 +-- .../typeofImportInstantiationExpression.types | 4 - ...EscapesInNames02(target=es2015).errors.txt | 3 - .../unicodeEscapesInNames02(target=es2015).js | 5 - ...codeEscapesInNames02(target=es2015).js.map | 4 +- ...apesInNames02(target=es2015).sourcemap.txt | 185 ++++----- ...odeEscapesInNames02(target=es2015).symbols | 47 ++- ...icodeEscapesInNames02(target=es2015).types | 3 - ...odeEscapesInNames02(target=es5).errors.txt | 75 ++-- .../unicodeEscapesInNames02(target=es5).js | 5 - ...unicodeEscapesInNames02(target=es5).js.map | 4 +- ...EscapesInNames02(target=es5).sourcemap.txt | 353 +++++++++--------- ...nicodeEscapesInNames02(target=es5).symbols | 41 +- .../unicodeEscapesInNames02(target=es5).types | 3 - ...gAndIdenticalBaseTypeExistsNoCrash.symbols | 227 ++++++----- ...ingAndIdenticalBaseTypeExistsNoCrash.types | 3 - .../reference/untypedModuleImport.js | 3 - .../reference/untypedModuleImport_allowJs.js | 2 - .../untypedModuleImport_allowJs.symbols | 8 +- .../untypedModuleImport_allowJs.types | 2 - ...typedModuleImport_noImplicitAny.errors.txt | 2 - .../untypedModuleImport_noImplicitAny.js | 2 - .../untypedModuleImport_vsAmbient.js | 2 - ...edModuleImport_withAugmentation.errors.txt | 2 - .../untypedModuleImport_withAugmentation.js | 2 - ...dModuleImport_withAugmentation2.errors.txt | 4 +- .../untypedModuleImport_withAugmentation2.js | 2 - ...ypedModuleImport_withAugmentation2.symbols | 4 +- ...ntypedModuleImport_withAugmentation2.types | 2 - .../unusedInvalidTypeArguments.errors.txt | 5 +- .../reference/unusedInvalidTypeArguments.js | 4 - .../unusedInvalidTypeArguments.symbols | 9 +- .../unusedInvalidTypeArguments.types | 3 - .../reference/usedImportNotElidedInJs.js | 4 - .../visibilityOfCrossModuleTypeUsage.js | 3 - .../visibilityOfCrossModuleTypeUsage.symbols | 24 +- .../visibilityOfCrossModuleTypeUsage.types | 2 - .../doNotEmitPinnedCommentOnNotEmittedNode.ts | 1 - tests/cases/compiler/enumAssignmentCompat6.ts | 2 +- .../cases/compiler/exportDefaultWithJSDoc1.ts | 3 +- .../cases/compiler/exportDefaultWithJSDoc2.ts | 3 +- 239 files changed, 875 insertions(+), 1419 deletions(-) diff --git a/src/harness/harnessIO.ts b/src/harness/harnessIO.ts index 70356106b75..9f95c87a82b 100644 --- a/src/harness/harnessIO.ts +++ b/src/harness/harnessIO.ts @@ -1232,6 +1232,10 @@ export namespace TestCaseParser { else { // First metadata marker in the file currentFileName = testMetaData[2].trim(); + if (currentFileContent && ts.skipTrivia(currentFileContent, 0, /*stopAfterLineBreak*/ false, /*stopAtComments*/ false) !== currentFileContent.length) { + throw new Error("Non-comment test content appears before the first '// @Filename' directive"); + } + currentFileContent = ""; } } else { diff --git a/tests/baselines/reference/blockScopedNamespaceDifferentFile.js b/tests/baselines/reference/blockScopedNamespaceDifferentFile.js index 1ddb284f55c..0933aa90fb6 100644 --- a/tests/baselines/reference/blockScopedNamespaceDifferentFile.js +++ b/tests/baselines/reference/blockScopedNamespaceDifferentFile.js @@ -1,7 +1,6 @@ //// [tests/cases/compiler/blockScopedNamespaceDifferentFile.ts] //// //// [test.ts] -// #15734 failed when test.ts comes before typings.d.ts namespace C { export class Name { static funcData = A.AA.func(); @@ -21,7 +20,6 @@ declare namespace A { //// [out.js] -// #15734 failed when test.ts comes before typings.d.ts var C; (function (C) { var Name = /** @class */ (function () { diff --git a/tests/baselines/reference/blockScopedNamespaceDifferentFile.symbols b/tests/baselines/reference/blockScopedNamespaceDifferentFile.symbols index 72113d52109..565eb550cdd 100644 --- a/tests/baselines/reference/blockScopedNamespaceDifferentFile.symbols +++ b/tests/baselines/reference/blockScopedNamespaceDifferentFile.symbols @@ -1,15 +1,14 @@ //// [tests/cases/compiler/blockScopedNamespaceDifferentFile.ts] //// === test.ts === -// #15734 failed when test.ts comes before typings.d.ts namespace C { >C : Symbol(C, Decl(test.ts, 0, 0)) export class Name { ->Name : Symbol(Name, Decl(test.ts, 1, 13)) +>Name : Symbol(Name, Decl(test.ts, 0, 13)) static funcData = A.AA.func(); ->funcData : Symbol(Name.funcData, Decl(test.ts, 2, 23)) +>funcData : Symbol(Name.funcData, Decl(test.ts, 1, 23)) >A.AA.func : Symbol(A.AA.func, Decl(typings.d.ts, 1, 18)) >A.AA : Symbol(A.AA, Decl(typings.d.ts, 0, 21)) >A : Symbol(A, Decl(typings.d.ts, 0, 0)) @@ -17,7 +16,7 @@ namespace C { >func : Symbol(A.AA.func, Decl(typings.d.ts, 1, 18)) static someConst = A.AA.foo; ->someConst : Symbol(Name.someConst, Decl(test.ts, 3, 38)) +>someConst : Symbol(Name.someConst, Decl(test.ts, 2, 38)) >A.AA.foo : Symbol(A.AA.foo, Decl(typings.d.ts, 3, 13)) >A.AA : Symbol(A.AA, Decl(typings.d.ts, 0, 21)) >A : Symbol(A, Decl(typings.d.ts, 0, 0)) @@ -25,7 +24,7 @@ namespace C { >foo : Symbol(A.AA.foo, Decl(typings.d.ts, 3, 13)) constructor(parameters) {} ->parameters : Symbol(parameters, Decl(test.ts, 6, 20)) +>parameters : Symbol(parameters, Decl(test.ts, 5, 20)) } } diff --git a/tests/baselines/reference/blockScopedNamespaceDifferentFile.types b/tests/baselines/reference/blockScopedNamespaceDifferentFile.types index d05abf1138a..48d60bab741 100644 --- a/tests/baselines/reference/blockScopedNamespaceDifferentFile.types +++ b/tests/baselines/reference/blockScopedNamespaceDifferentFile.types @@ -1,7 +1,6 @@ //// [tests/cases/compiler/blockScopedNamespaceDifferentFile.ts] //// === test.ts === -// #15734 failed when test.ts comes before typings.d.ts namespace C { >C : typeof C diff --git a/tests/baselines/reference/commonJSReexport.symbols b/tests/baselines/reference/commonJSReexport.symbols index 8eee41becb9..46a3017f6b9 100644 --- a/tests/baselines/reference/commonJSReexport.symbols +++ b/tests/baselines/reference/commonJSReexport.symbols @@ -12,19 +12,17 @@ hardline >hardline : Symbol(hardline, Decl(main.js, 0, 7)) === first.js === -// #41422, based on prettier's exports - const hardline = { type: "hard" } ->hardline : Symbol(hardline, Decl(first.js, 2, 5)) ->type : Symbol(type, Decl(first.js, 2, 18)) +>hardline : Symbol(hardline, Decl(first.js, 0, 5)) +>type : Symbol(type, Decl(first.js, 0, 18)) module.exports = { >module.exports : Symbol(module.exports, Decl(first.js, 0, 0)) ->module : Symbol(module, Decl(first.js, 2, 33)) +>module : Symbol(module, Decl(first.js, 0, 33)) >exports : Symbol(module.exports, Decl(first.js, 0, 0)) hardline ->hardline : Symbol(hardline, Decl(first.js, 3, 18)) +>hardline : Symbol(hardline, Decl(first.js, 1, 18)) } diff --git a/tests/baselines/reference/commonJSReexport.types b/tests/baselines/reference/commonJSReexport.types index 91aa7605f33..b2aa373b8bb 100644 --- a/tests/baselines/reference/commonJSReexport.types +++ b/tests/baselines/reference/commonJSReexport.types @@ -13,8 +13,6 @@ hardline >hardline : { type: string; } === first.js === -// #41422, based on prettier's exports - const hardline = { type: "hard" } >hardline : { type: string; } >{ type: "hard" } : { type: string; } diff --git a/tests/baselines/reference/commonJsImportBindingElementNarrowType.symbols b/tests/baselines/reference/commonJsImportBindingElementNarrowType.symbols index e44a8eefa51..8b821ca1056 100644 --- a/tests/baselines/reference/commonJsImportBindingElementNarrowType.symbols +++ b/tests/baselines/reference/commonJsImportBindingElementNarrowType.symbols @@ -14,9 +14,6 @@ if (a) { >a : Symbol(a, Decl(bar.js, 0, 7)) } === /foo.d.ts === -// Regresion test for GH#41957 - - export const a: number | null; ->a : Symbol(a, Decl(foo.d.ts, 3, 12)) +>a : Symbol(a, Decl(foo.d.ts, 0, 12)) diff --git a/tests/baselines/reference/commonJsImportBindingElementNarrowType.types b/tests/baselines/reference/commonJsImportBindingElementNarrowType.types index 8de159857be..218b36ccf92 100644 --- a/tests/baselines/reference/commonJsImportBindingElementNarrowType.types +++ b/tests/baselines/reference/commonJsImportBindingElementNarrowType.types @@ -17,9 +17,6 @@ if (a) { >1 : 1 } === /foo.d.ts === -// Regresion test for GH#41957 - - export const a: number | null; >a : number | null diff --git a/tests/baselines/reference/commonSourceDirectory.js b/tests/baselines/reference/commonSourceDirectory.js index e8c2a80bf79..e78efd5bb15 100644 --- a/tests/baselines/reference/commonSourceDirectory.js +++ b/tests/baselines/reference/commonSourceDirectory.js @@ -1,8 +1,6 @@ //// [tests/cases/compiler/commonSourceDirectory.ts] //// //// [index.ts] -// Test that importing a file from `node_modules` does not affect calculation of the common source directory. - export const x = 0; //// [bar.d.ts] diff --git a/tests/baselines/reference/commonSourceDirectory.js.map b/tests/baselines/reference/commonSourceDirectory.js.map index 2029c28d1d6..c6e271e6e76 100644 --- a/tests/baselines/reference/commonSourceDirectory.js.map +++ b/tests/baselines/reference/commonSourceDirectory.js.map @@ -1,3 +1,3 @@ //// [/app/bin/index.js.map] {"version":3,"file":"index.js","sourceRoot":"mySourceRoot/","sources":["index.ts"],"names":[],"mappings":";;AAAA,yCAAyC;AACzC,2BAAwB;AACxB,2BAAwB;AACxB,OAAC,GAAG,OAAC,CAAC"} -//// https://sokra.github.io/source-map-visualization#base64,InVzZSBzdHJpY3QiOw0KT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsICJfX2VzTW9kdWxlIiwgeyB2YWx1ZTogdHJ1ZSB9KTsNCi8vLyA8cmVmZXJlbmNlIHBhdGg9Ii4uL3R5cGVzL2Jhci5kLnRzIi8+DQp2YXIgZm9vXzEgPSByZXF1aXJlKCJmb28iKTsNCnZhciBiYXJfMSA9IHJlcXVpcmUoImJhciIpOw0KZm9vXzEueCArIGJhcl8xLnk7DQovLyMgc291cmNlTWFwcGluZ1VSTD0uLi9teU1hcFJvb3QvaW5kZXguanMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoibXlTb3VyY2VSb290LyIsInNvdXJjZXMiOlsiaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSx5Q0FBeUM7QUFDekMsMkJBQXdCO0FBQ3hCLDJCQUF3QjtBQUN4QixPQUFDLEdBQUcsT0FBQyxDQUFDIn0=,Ly8gVGVzdCB0aGF0IGltcG9ydGluZyBhIGZpbGUgZnJvbSBgbm9kZV9tb2R1bGVzYCBkb2VzIG5vdCBhZmZlY3QgY2FsY3VsYXRpb24gb2YgdGhlIGNvbW1vbiBzb3VyY2UgZGlyZWN0b3J5LgoKZXhwb3J0IGNvbnN0IHggPSAwOwo= +//// https://sokra.github.io/source-map-visualization#base64,InVzZSBzdHJpY3QiOw0KT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsICJfX2VzTW9kdWxlIiwgeyB2YWx1ZTogdHJ1ZSB9KTsNCi8vLyA8cmVmZXJlbmNlIHBhdGg9Ii4uL3R5cGVzL2Jhci5kLnRzIi8+DQp2YXIgZm9vXzEgPSByZXF1aXJlKCJmb28iKTsNCnZhciBiYXJfMSA9IHJlcXVpcmUoImJhciIpOw0KZm9vXzEueCArIGJhcl8xLnk7DQovLyMgc291cmNlTWFwcGluZ1VSTD0uLi9teU1hcFJvb3QvaW5kZXguanMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoibXlTb3VyY2VSb290LyIsInNvdXJjZXMiOlsiaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSx5Q0FBeUM7QUFDekMsMkJBQXdCO0FBQ3hCLDJCQUF3QjtBQUN4QixPQUFDLEdBQUcsT0FBQyxDQUFDIn0=,ZXhwb3J0IGNvbnN0IHggPSAwOwo= diff --git a/tests/baselines/reference/commonSourceDirectory.symbols b/tests/baselines/reference/commonSourceDirectory.symbols index eeb2a6ace27..f187f57b4c5 100644 --- a/tests/baselines/reference/commonSourceDirectory.symbols +++ b/tests/baselines/reference/commonSourceDirectory.symbols @@ -13,10 +13,8 @@ x + y; >y : Symbol(y, Decl(index.ts, 2, 8)) === /node_modules/foo/index.ts === -// Test that importing a file from `node_modules` does not affect calculation of the common source directory. - export const x = 0; ->x : Symbol(x, Decl(index.ts, 2, 12)) +>x : Symbol(x, Decl(index.ts, 0, 12)) === /types/bar.d.ts === declare module "bar" { diff --git a/tests/baselines/reference/commonSourceDirectory.types b/tests/baselines/reference/commonSourceDirectory.types index 79624e101bc..32565f32656 100644 --- a/tests/baselines/reference/commonSourceDirectory.types +++ b/tests/baselines/reference/commonSourceDirectory.types @@ -14,8 +14,6 @@ x + y; >y : 0 === /node_modules/foo/index.ts === -// Test that importing a file from `node_modules` does not affect calculation of the common source directory. - export const x = 0; >x : 0 >0 : 0 diff --git a/tests/baselines/reference/commonSourceDirectory_dts.js b/tests/baselines/reference/commonSourceDirectory_dts.js index 4ca46069074..877937abab8 100644 --- a/tests/baselines/reference/commonSourceDirectory_dts.js +++ b/tests/baselines/reference/commonSourceDirectory_dts.js @@ -1,8 +1,6 @@ //// [tests/cases/compiler/commonSourceDirectory_dts.ts] //// //// [bar.d.ts] -// Test that importing a file from `node_modules` does not affect calculation of the common source directory. - declare const y: number; //// [index.ts] diff --git a/tests/baselines/reference/commonSourceDirectory_dts.symbols b/tests/baselines/reference/commonSourceDirectory_dts.symbols index d40d6eb922f..8ac4cacf8bd 100644 --- a/tests/baselines/reference/commonSourceDirectory_dts.symbols +++ b/tests/baselines/reference/commonSourceDirectory_dts.symbols @@ -1,14 +1,12 @@ //// [tests/cases/compiler/commonSourceDirectory_dts.ts] //// === /app/lib/bar.d.ts === -// Test that importing a file from `node_modules` does not affect calculation of the common source directory. - declare const y: number; ->y : Symbol(y, Decl(bar.d.ts, 2, 13)) +>y : Symbol(y, Decl(bar.d.ts, 0, 13)) === /app/src/index.ts === /// export const x = y; >x : Symbol(x, Decl(index.ts, 1, 12)) ->y : Symbol(y, Decl(bar.d.ts, 2, 13)) +>y : Symbol(y, Decl(bar.d.ts, 0, 13)) diff --git a/tests/baselines/reference/commonSourceDirectory_dts.types b/tests/baselines/reference/commonSourceDirectory_dts.types index 52ac716bb94..51edaa54189 100644 --- a/tests/baselines/reference/commonSourceDirectory_dts.types +++ b/tests/baselines/reference/commonSourceDirectory_dts.types @@ -1,8 +1,6 @@ //// [tests/cases/compiler/commonSourceDirectory_dts.ts] //// === /app/lib/bar.d.ts === -// Test that importing a file from `node_modules` does not affect calculation of the common source directory. - declare const y: number; >y : number diff --git a/tests/baselines/reference/conditionalExportsResolutionFallback(moduleresolution=bundler).errors.txt b/tests/baselines/reference/conditionalExportsResolutionFallback(moduleresolution=bundler).errors.txt index 9c25a06c9c1..e66a5c3dddd 100644 --- a/tests/baselines/reference/conditionalExportsResolutionFallback(moduleresolution=bundler).errors.txt +++ b/tests/baselines/reference/conditionalExportsResolutionFallback(moduleresolution=bundler).errors.txt @@ -3,8 +3,6 @@ error TS5095: Option 'bundler' can only be used when 'module' is set to 'preserv !!! error TS5095: Option 'bundler' can only be used when 'module' is set to 'preserve' or to 'es2015' or later. ==== /node_modules/dep/package.json (0 errors) ==== - // This documents bug https://github.com/microsoft/TypeScript/issues/50762. - { "name": "dep", "version": "1.0.0", diff --git a/tests/baselines/reference/conditionalExportsResolutionFallback(moduleresolution=node16).errors.txt b/tests/baselines/reference/conditionalExportsResolutionFallback(moduleresolution=node16).errors.txt index 8baa069a592..0303c9003ce 100644 --- a/tests/baselines/reference/conditionalExportsResolutionFallback(moduleresolution=node16).errors.txt +++ b/tests/baselines/reference/conditionalExportsResolutionFallback(moduleresolution=node16).errors.txt @@ -3,8 +3,6 @@ error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolut !!! error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. ==== /node_modules/dep/package.json (0 errors) ==== - // This documents bug https://github.com/microsoft/TypeScript/issues/50762. - { "name": "dep", "version": "1.0.0", diff --git a/tests/baselines/reference/conditionalExportsResolutionFallback(moduleresolution=nodenext).errors.txt b/tests/baselines/reference/conditionalExportsResolutionFallback(moduleresolution=nodenext).errors.txt index c128b9f0ec8..5d08c641198 100644 --- a/tests/baselines/reference/conditionalExportsResolutionFallback(moduleresolution=nodenext).errors.txt +++ b/tests/baselines/reference/conditionalExportsResolutionFallback(moduleresolution=nodenext).errors.txt @@ -3,8 +3,6 @@ error TS5110: Option 'module' must be set to 'NodeNext' when option 'moduleResol !!! error TS5110: Option 'module' must be set to 'NodeNext' when option 'moduleResolution' is set to 'NodeNext'. ==== /node_modules/dep/package.json (0 errors) ==== - // This documents bug https://github.com/microsoft/TypeScript/issues/50762. - { "name": "dep", "version": "1.0.0", diff --git a/tests/baselines/reference/decoratorReferenceOnOtherProperty.js b/tests/baselines/reference/decoratorReferenceOnOtherProperty.js index 4938f2b2868..c2bbaecdf92 100644 --- a/tests/baselines/reference/decoratorReferenceOnOtherProperty.js +++ b/tests/baselines/reference/decoratorReferenceOnOtherProperty.js @@ -1,7 +1,6 @@ //// [tests/cases/compiler/decoratorReferenceOnOtherProperty.ts] //// //// [yoha.ts] -// https://github.com/Microsoft/TypeScript/issues/19799 export class Yoha {} //// [index.ts] @@ -28,7 +27,6 @@ class Bar { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Yoha = void 0; -// https://github.com/Microsoft/TypeScript/issues/19799 var Yoha = /** @class */ (function () { function Yoha() { } diff --git a/tests/baselines/reference/decoratorReferenceOnOtherProperty.symbols b/tests/baselines/reference/decoratorReferenceOnOtherProperty.symbols index af27ae29b6b..d7028ba4516 100644 --- a/tests/baselines/reference/decoratorReferenceOnOtherProperty.symbols +++ b/tests/baselines/reference/decoratorReferenceOnOtherProperty.symbols @@ -1,7 +1,6 @@ //// [tests/cases/compiler/decoratorReferenceOnOtherProperty.ts] //// === yoha.ts === -// https://github.com/Microsoft/TypeScript/issues/19799 export class Yoha {} >Yoha : Symbol(Yoha, Decl(yoha.ts, 0, 0)) diff --git a/tests/baselines/reference/decoratorReferenceOnOtherProperty.types b/tests/baselines/reference/decoratorReferenceOnOtherProperty.types index 0e0fedbd2c3..a71f46ffca8 100644 --- a/tests/baselines/reference/decoratorReferenceOnOtherProperty.types +++ b/tests/baselines/reference/decoratorReferenceOnOtherProperty.types @@ -1,7 +1,6 @@ //// [tests/cases/compiler/decoratorReferenceOnOtherProperty.ts] //// === yoha.ts === -// https://github.com/Microsoft/TypeScript/issues/19799 export class Yoha {} >Yoha : Yoha diff --git a/tests/baselines/reference/doNotEmitPinnedCommentOnNotEmittedNode.js b/tests/baselines/reference/doNotEmitPinnedCommentOnNotEmittedNode.js index 707ba368224..74434660010 100644 --- a/tests/baselines/reference/doNotEmitPinnedCommentOnNotEmittedNode.js +++ b/tests/baselines/reference/doNotEmitPinnedCommentOnNotEmittedNode.js @@ -1,6 +1,6 @@ //// [tests/cases/compiler/doNotEmitPinnedCommentOnNotEmittedNode.ts] //// -//// [file1.ts] +//// [doNotEmitPinnedCommentOnNotEmittedNode.ts] class C { /*! remove pinned comment anywhere else */ public foo(x: string, y: any) @@ -12,7 +12,7 @@ var x = 10; /*! remove pinned comment anywhere else */ declare var OData: any; -//// [file1.js] +//// [doNotEmitPinnedCommentOnNotEmittedNode.js] var C = (function () { function C() { } diff --git a/tests/baselines/reference/doNotEmitPinnedCommentOnNotEmittedNode.symbols b/tests/baselines/reference/doNotEmitPinnedCommentOnNotEmittedNode.symbols index b1b6791ea6b..c949a992507 100644 --- a/tests/baselines/reference/doNotEmitPinnedCommentOnNotEmittedNode.symbols +++ b/tests/baselines/reference/doNotEmitPinnedCommentOnNotEmittedNode.symbols @@ -1,25 +1,25 @@ //// [tests/cases/compiler/doNotEmitPinnedCommentOnNotEmittedNode.ts] //// -=== file1.ts === +=== doNotEmitPinnedCommentOnNotEmittedNode.ts === class C { ->C : Symbol(C, Decl(file1.ts, 0, 0)) +>C : Symbol(C, Decl(doNotEmitPinnedCommentOnNotEmittedNode.ts, 0, 0)) /*! remove pinned comment anywhere else */ public foo(x: string, y: any) ->foo : Symbol(C.foo, Decl(file1.ts, 0, 9), Decl(file1.ts, 2, 33)) ->x : Symbol(x, Decl(file1.ts, 2, 15)) ->y : Symbol(y, Decl(file1.ts, 2, 25)) +>foo : Symbol(C.foo, Decl(doNotEmitPinnedCommentOnNotEmittedNode.ts, 0, 9), Decl(doNotEmitPinnedCommentOnNotEmittedNode.ts, 2, 33)) +>x : Symbol(x, Decl(doNotEmitPinnedCommentOnNotEmittedNode.ts, 2, 15)) +>y : Symbol(y, Decl(doNotEmitPinnedCommentOnNotEmittedNode.ts, 2, 25)) public foo(x: string, y: number) { } ->foo : Symbol(C.foo, Decl(file1.ts, 0, 9), Decl(file1.ts, 2, 33)) ->x : Symbol(x, Decl(file1.ts, 3, 15)) ->y : Symbol(y, Decl(file1.ts, 3, 25)) +>foo : Symbol(C.foo, Decl(doNotEmitPinnedCommentOnNotEmittedNode.ts, 0, 9), Decl(doNotEmitPinnedCommentOnNotEmittedNode.ts, 2, 33)) +>x : Symbol(x, Decl(doNotEmitPinnedCommentOnNotEmittedNode.ts, 3, 15)) +>y : Symbol(y, Decl(doNotEmitPinnedCommentOnNotEmittedNode.ts, 3, 25)) } var x = 10; ->x : Symbol(x, Decl(file1.ts, 6, 3)) +>x : Symbol(x, Decl(doNotEmitPinnedCommentOnNotEmittedNode.ts, 6, 3)) /*! remove pinned comment anywhere else */ declare var OData: any; ->OData : Symbol(OData, Decl(file1.ts, 9, 11)) +>OData : Symbol(OData, Decl(doNotEmitPinnedCommentOnNotEmittedNode.ts, 9, 11)) diff --git a/tests/baselines/reference/doNotEmitPinnedCommentOnNotEmittedNode.types b/tests/baselines/reference/doNotEmitPinnedCommentOnNotEmittedNode.types index 4fb2d4f238e..e2832fbde06 100644 --- a/tests/baselines/reference/doNotEmitPinnedCommentOnNotEmittedNode.types +++ b/tests/baselines/reference/doNotEmitPinnedCommentOnNotEmittedNode.types @@ -1,6 +1,6 @@ //// [tests/cases/compiler/doNotEmitPinnedCommentOnNotEmittedNode.ts] //// -=== file1.ts === +=== doNotEmitPinnedCommentOnNotEmittedNode.ts === class C { >C : C diff --git a/tests/baselines/reference/duplicateIdentifierEnum.errors.txt b/tests/baselines/reference/duplicateIdentifierEnum.errors.txt index 3d4fc182ee2..6faa8fb65f1 100644 --- a/tests/baselines/reference/duplicateIdentifierEnum.errors.txt +++ b/tests/baselines/reference/duplicateIdentifierEnum.errors.txt @@ -1,17 +1,16 @@ -duplicateIdentifierEnum_A.ts(2,6): error TS2567: Enum declarations can only merge with namespace or other enum declarations. -duplicateIdentifierEnum_A.ts(5,7): error TS2567: Enum declarations can only merge with namespace or other enum declarations. -duplicateIdentifierEnum_A.ts(9,11): error TS2567: Enum declarations can only merge with namespace or other enum declarations. -duplicateIdentifierEnum_A.ts(12,12): error TS2567: Enum declarations can only merge with namespace or other enum declarations. -duplicateIdentifierEnum_A.ts(16,12): error TS2567: Enum declarations can only merge with namespace or other enum declarations. -duplicateIdentifierEnum_A.ts(19,10): error TS2567: Enum declarations can only merge with namespace or other enum declarations. -duplicateIdentifierEnum_A.ts(23,6): error TS2567: Enum declarations can only merge with namespace or other enum declarations. -duplicateIdentifierEnum_A.ts(26,7): error TS2567: Enum declarations can only merge with namespace or other enum declarations. +duplicateIdentifierEnum_A.ts(1,6): error TS2567: Enum declarations can only merge with namespace or other enum declarations. +duplicateIdentifierEnum_A.ts(4,7): error TS2567: Enum declarations can only merge with namespace or other enum declarations. +duplicateIdentifierEnum_A.ts(8,11): error TS2567: Enum declarations can only merge with namespace or other enum declarations. +duplicateIdentifierEnum_A.ts(11,12): error TS2567: Enum declarations can only merge with namespace or other enum declarations. +duplicateIdentifierEnum_A.ts(15,12): error TS2567: Enum declarations can only merge with namespace or other enum declarations. +duplicateIdentifierEnum_A.ts(18,10): error TS2567: Enum declarations can only merge with namespace or other enum declarations. +duplicateIdentifierEnum_A.ts(22,6): error TS2567: Enum declarations can only merge with namespace or other enum declarations. +duplicateIdentifierEnum_A.ts(25,7): error TS2567: Enum declarations can only merge with namespace or other enum declarations. duplicateIdentifierEnum_B.ts(1,10): error TS2567: Enum declarations can only merge with namespace or other enum declarations. duplicateIdentifierEnum_B.ts(4,6): error TS2567: Enum declarations can only merge with namespace or other enum declarations. ==== duplicateIdentifierEnum_A.ts (8 errors) ==== - // Test the error message when attempting to merge an enum with a class, an interface, or a function. enum A { ~ !!! error TS2567: Enum declarations can only merge with namespace or other enum declarations. @@ -62,12 +61,12 @@ duplicateIdentifierEnum_B.ts(4,6): error TS2567: Enum declarations can only merg function D() { ~ !!! error TS2567: Enum declarations can only merge with namespace or other enum declarations. -!!! related TS6203 duplicateIdentifierEnum_A.ts:23:6: 'D' was also declared here. +!!! related TS6203 duplicateIdentifierEnum_A.ts:22:6: 'D' was also declared here. return 0; } enum E { ~ !!! error TS2567: Enum declarations can only merge with namespace or other enum declarations. -!!! related TS6203 duplicateIdentifierEnum_A.ts:26:7: 'E' was also declared here. +!!! related TS6203 duplicateIdentifierEnum_A.ts:25:7: 'E' was also declared here. bar } \ No newline at end of file diff --git a/tests/baselines/reference/duplicateIdentifierEnum.js b/tests/baselines/reference/duplicateIdentifierEnum.js index c6d9fe979fa..523494b4add 100644 --- a/tests/baselines/reference/duplicateIdentifierEnum.js +++ b/tests/baselines/reference/duplicateIdentifierEnum.js @@ -1,7 +1,6 @@ //// [tests/cases/compiler/duplicateIdentifierEnum.ts] //// //// [duplicateIdentifierEnum_A.ts] -// Test the error message when attempting to merge an enum with a class, an interface, or a function. enum A { bar } @@ -39,7 +38,6 @@ enum E { } //// [duplicateIdentifierEnum_A.js] -// Test the error message when attempting to merge an enum with a class, an interface, or a function. var A; (function (A) { A[A["bar"] = 0] = "bar"; diff --git a/tests/baselines/reference/duplicateIdentifierEnum.symbols b/tests/baselines/reference/duplicateIdentifierEnum.symbols index e47679cdee1..ae46c82572a 100644 --- a/tests/baselines/reference/duplicateIdentifierEnum.symbols +++ b/tests/baselines/reference/duplicateIdentifierEnum.symbols @@ -1,54 +1,53 @@ //// [tests/cases/compiler/duplicateIdentifierEnum.ts] //// === duplicateIdentifierEnum_A.ts === -// Test the error message when attempting to merge an enum with a class, an interface, or a function. enum A { >A : Symbol(A, Decl(duplicateIdentifierEnum_A.ts, 0, 0)) bar ->bar : Symbol(A.bar, Decl(duplicateIdentifierEnum_A.ts, 1, 8)) +>bar : Symbol(A.bar, Decl(duplicateIdentifierEnum_A.ts, 0, 8)) } class A { ->A : Symbol(A, Decl(duplicateIdentifierEnum_A.ts, 3, 1)) +>A : Symbol(A, Decl(duplicateIdentifierEnum_A.ts, 2, 1)) foo: number; ->foo : Symbol(A.foo, Decl(duplicateIdentifierEnum_A.ts, 4, 9)) +>foo : Symbol(A.foo, Decl(duplicateIdentifierEnum_A.ts, 3, 9)) } interface B { ->B : Symbol(B, Decl(duplicateIdentifierEnum_A.ts, 6, 1)) +>B : Symbol(B, Decl(duplicateIdentifierEnum_A.ts, 5, 1)) foo: number; ->foo : Symbol(B.foo, Decl(duplicateIdentifierEnum_A.ts, 8, 13)) +>foo : Symbol(B.foo, Decl(duplicateIdentifierEnum_A.ts, 7, 13)) } const enum B { ->B : Symbol(B, Decl(duplicateIdentifierEnum_A.ts, 10, 1)) +>B : Symbol(B, Decl(duplicateIdentifierEnum_A.ts, 9, 1)) bar ->bar : Symbol(B.bar, Decl(duplicateIdentifierEnum_A.ts, 11, 14)) +>bar : Symbol(B.bar, Decl(duplicateIdentifierEnum_A.ts, 10, 14)) } const enum C { ->C : Symbol(C, Decl(duplicateIdentifierEnum_A.ts, 13, 1)) +>C : Symbol(C, Decl(duplicateIdentifierEnum_A.ts, 12, 1)) } function C() { ->C : Symbol(C, Decl(duplicateIdentifierEnum_A.ts, 17, 1)) +>C : Symbol(C, Decl(duplicateIdentifierEnum_A.ts, 16, 1)) return 0; } enum D { ->D : Symbol(D, Decl(duplicateIdentifierEnum_A.ts, 20, 1)) +>D : Symbol(D, Decl(duplicateIdentifierEnum_A.ts, 19, 1)) bar ->bar : Symbol(D.bar, Decl(duplicateIdentifierEnum_A.ts, 22, 8)) +>bar : Symbol(D.bar, Decl(duplicateIdentifierEnum_A.ts, 21, 8)) } class E { ->E : Symbol(E, Decl(duplicateIdentifierEnum_A.ts, 24, 1)) +>E : Symbol(E, Decl(duplicateIdentifierEnum_A.ts, 23, 1)) foo: number; ->foo : Symbol(E.foo, Decl(duplicateIdentifierEnum_A.ts, 25, 9)) +>foo : Symbol(E.foo, Decl(duplicateIdentifierEnum_A.ts, 24, 9)) } // also make sure the error appears when trying to merge an enum in a separate file. === duplicateIdentifierEnum_B.ts === diff --git a/tests/baselines/reference/duplicateIdentifierEnum.types b/tests/baselines/reference/duplicateIdentifierEnum.types index 5635c6e15dd..85f94fb6dc6 100644 --- a/tests/baselines/reference/duplicateIdentifierEnum.types +++ b/tests/baselines/reference/duplicateIdentifierEnum.types @@ -1,7 +1,6 @@ //// [tests/cases/compiler/duplicateIdentifierEnum.ts] //// === duplicateIdentifierEnum_A.ts === -// Test the error message when attempting to merge an enum with a class, an interface, or a function. enum A { >A : A diff --git a/tests/baselines/reference/enumAssignmentCompat6.errors.txt b/tests/baselines/reference/enumAssignmentCompat6.errors.txt index 6fa72a1d05f..c6fa9e6465a 100644 --- a/tests/baselines/reference/enumAssignmentCompat6.errors.txt +++ b/tests/baselines/reference/enumAssignmentCompat6.errors.txt @@ -1,21 +1,20 @@ -f.ts(37,5): error TS2322: Type 'strings.DiagnosticCategory' is not assignable to type 'numerics.DiagnosticCategory'. +a.ts(36,5): error TS2322: Type 'strings.DiagnosticCategory' is not assignable to type 'numerics.DiagnosticCategory'. Each declaration of 'DiagnosticCategory.Warning' differs in its value, where '0' was expected but '"Warning"' was given. -f.ts(38,5): error TS2322: Type 'numerics.DiagnosticCategory' is not assignable to type 'strings.DiagnosticCategory'. +a.ts(37,5): error TS2322: Type 'numerics.DiagnosticCategory' is not assignable to type 'strings.DiagnosticCategory'. Each declaration of 'DiagnosticCategory.Warning' differs in its value, where '"Warning"' was expected but '0' was given. -f.ts(42,5): error TS2322: Type 'DiagnosticCategory' is not assignable to type 'DiagnosticCategory2'. -f.ts(43,5): error TS2322: Type 'DiagnosticCategory2' is not assignable to type 'DiagnosticCategory'. -f.ts(52,5): error TS2322: Type 'ambients.DiagnosticCategory' is not assignable to type 'strings.DiagnosticCategory'. +a.ts(41,5): error TS2322: Type 'DiagnosticCategory' is not assignable to type 'DiagnosticCategory2'. +a.ts(42,5): error TS2322: Type 'DiagnosticCategory2' is not assignable to type 'DiagnosticCategory'. +a.ts(51,5): error TS2322: Type 'ambients.DiagnosticCategory' is not assignable to type 'strings.DiagnosticCategory'. One value of 'DiagnosticCategory.Warning' is the string '"Warning"', and the other is assumed to be an unknown numeric value. -f.ts(53,5): error TS2322: Type 'strings.DiagnosticCategory' is not assignable to type 'ambients.DiagnosticCategory'. +a.ts(52,5): error TS2322: Type 'strings.DiagnosticCategory' is not assignable to type 'ambients.DiagnosticCategory'. One value of 'DiagnosticCategory.Warning' is the string '"Warning"', and the other is assumed to be an unknown numeric value. -f.ts(73,9): error TS2322: Type 'DiagnosticCategory' is not assignable to type 'import("f").DiagnosticCategory'. +f.ts(18,9): error TS2322: Type 'DiagnosticCategory' is not assignable to type 'import("f").DiagnosticCategory'. Each declaration of 'DiagnosticCategory.Warning' differs in its value, where '0' was expected but '"Warning"' was given. -f.ts(74,9): error TS2322: Type 'import("f").DiagnosticCategory' is not assignable to type 'DiagnosticCategory'. +f.ts(19,9): error TS2322: Type 'import("f").DiagnosticCategory' is not assignable to type 'DiagnosticCategory'. Each declaration of 'DiagnosticCategory.Warning' differs in its value, where '"Warning"' was expected but '0' was given. -==== f.ts (8 errors) ==== - // @filename a.ts +==== a.ts (6 errors) ==== namespace numerics { export enum DiagnosticCategory { Warning, @@ -86,6 +85,7 @@ f.ts(74,9): error TS2322: Type 'import("f").DiagnosticCategory' is not assignabl !!! error TS2322: One value of 'DiagnosticCategory.Warning' is the string '"Warning"', and the other is assumed to be an unknown numeric value. } +==== f.ts (2 errors) ==== export enum DiagnosticCategory { Warning, Error, diff --git a/tests/baselines/reference/enumAssignmentCompat6.js b/tests/baselines/reference/enumAssignmentCompat6.js index a8cde20aacf..b1d3ebbd916 100644 --- a/tests/baselines/reference/enumAssignmentCompat6.js +++ b/tests/baselines/reference/enumAssignmentCompat6.js @@ -1,7 +1,6 @@ //// [tests/cases/compiler/enumAssignmentCompat6.ts] //// -//// [f.ts] -// @filename a.ts +//// [a.ts] namespace numerics { export enum DiagnosticCategory { Warning, @@ -55,7 +54,8 @@ function i(x: strings.DiagnosticCategory, y: ambients.DiagnosticCategory) { x = y; y = x; } - + +//// [f.ts] export enum DiagnosticCategory { Warning, Error, @@ -78,11 +78,7 @@ export let x: DiagnosticCategory; } })() -//// [f.js] -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.x = exports.DiagnosticCategory = void 0; -// @filename a.ts +//// [a.js] var numerics; (function (numerics) { var DiagnosticCategory; @@ -126,6 +122,10 @@ function i(x, y) { x = y; y = x; } +//// [f.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.x = exports.DiagnosticCategory = void 0; var DiagnosticCategory; (function (DiagnosticCategory) { DiagnosticCategory[DiagnosticCategory["Warning"] = 0] = "Warning"; diff --git a/tests/baselines/reference/enumAssignmentCompat6.symbols b/tests/baselines/reference/enumAssignmentCompat6.symbols index fcf2c4f1637..1e0e81d9cc8 100644 --- a/tests/baselines/reference/enumAssignmentCompat6.symbols +++ b/tests/baselines/reference/enumAssignmentCompat6.symbols @@ -1,202 +1,202 @@ //// [tests/cases/compiler/enumAssignmentCompat6.ts] //// -=== f.ts === -// @filename a.ts +=== a.ts === namespace numerics { ->numerics : Symbol(numerics, Decl(f.ts, 0, 0)) +>numerics : Symbol(numerics, Decl(a.ts, 0, 0)) export enum DiagnosticCategory { ->DiagnosticCategory : Symbol(DiagnosticCategory, Decl(f.ts, 1, 20)) +>DiagnosticCategory : Symbol(DiagnosticCategory, Decl(a.ts, 0, 20)) Warning, ->Warning : Symbol(DiagnosticCategory.Warning, Decl(f.ts, 2, 36)) +>Warning : Symbol(DiagnosticCategory.Warning, Decl(a.ts, 1, 36)) Error, ->Error : Symbol(DiagnosticCategory.Error, Decl(f.ts, 3, 16)) +>Error : Symbol(DiagnosticCategory.Error, Decl(a.ts, 2, 16)) Suggestion, ->Suggestion : Symbol(DiagnosticCategory.Suggestion, Decl(f.ts, 4, 14)) +>Suggestion : Symbol(DiagnosticCategory.Suggestion, Decl(a.ts, 3, 14)) Message, ->Message : Symbol(DiagnosticCategory.Message, Decl(f.ts, 5, 19)) +>Message : Symbol(DiagnosticCategory.Message, Decl(a.ts, 4, 19)) } export enum DiagnosticCategory2 { ->DiagnosticCategory2 : Symbol(DiagnosticCategory2, Decl(f.ts, 7, 5)) +>DiagnosticCategory2 : Symbol(DiagnosticCategory2, Decl(a.ts, 6, 5)) Warning, ->Warning : Symbol(DiagnosticCategory2.Warning, Decl(f.ts, 9, 37)) +>Warning : Symbol(DiagnosticCategory2.Warning, Decl(a.ts, 8, 37)) Error, ->Error : Symbol(DiagnosticCategory2.Error, Decl(f.ts, 10, 16)) +>Error : Symbol(DiagnosticCategory2.Error, Decl(a.ts, 9, 16)) Suggestion, ->Suggestion : Symbol(DiagnosticCategory2.Suggestion, Decl(f.ts, 11, 14)) +>Suggestion : Symbol(DiagnosticCategory2.Suggestion, Decl(a.ts, 10, 14)) Message, ->Message : Symbol(DiagnosticCategory2.Message, Decl(f.ts, 12, 19)) +>Message : Symbol(DiagnosticCategory2.Message, Decl(a.ts, 11, 19)) } } namespace strings { ->strings : Symbol(strings, Decl(f.ts, 15, 1)) +>strings : Symbol(strings, Decl(a.ts, 14, 1)) export enum DiagnosticCategory { ->DiagnosticCategory : Symbol(DiagnosticCategory, Decl(f.ts, 17, 19)) +>DiagnosticCategory : Symbol(DiagnosticCategory, Decl(a.ts, 16, 19)) Warning = "Warning", ->Warning : Symbol(DiagnosticCategory.Warning, Decl(f.ts, 18, 36)) +>Warning : Symbol(DiagnosticCategory.Warning, Decl(a.ts, 17, 36)) Error = "Error", ->Error : Symbol(DiagnosticCategory.Error, Decl(f.ts, 19, 28)) +>Error : Symbol(DiagnosticCategory.Error, Decl(a.ts, 18, 28)) Suggestion = "Suggestion", ->Suggestion : Symbol(DiagnosticCategory.Suggestion, Decl(f.ts, 20, 24)) +>Suggestion : Symbol(DiagnosticCategory.Suggestion, Decl(a.ts, 19, 24)) Message = "Message", ->Message : Symbol(DiagnosticCategory.Message, Decl(f.ts, 21, 34)) +>Message : Symbol(DiagnosticCategory.Message, Decl(a.ts, 20, 34)) } } declare namespace ambients { ->ambients : Symbol(ambients, Decl(f.ts, 24, 1)) +>ambients : Symbol(ambients, Decl(a.ts, 23, 1)) export enum DiagnosticCategory { ->DiagnosticCategory : Symbol(DiagnosticCategory, Decl(f.ts, 26, 28)) +>DiagnosticCategory : Symbol(DiagnosticCategory, Decl(a.ts, 25, 28)) Warning, ->Warning : Symbol(DiagnosticCategory.Warning, Decl(f.ts, 27, 36)) +>Warning : Symbol(DiagnosticCategory.Warning, Decl(a.ts, 26, 36)) Error, ->Error : Symbol(DiagnosticCategory.Error, Decl(f.ts, 28, 16)) +>Error : Symbol(DiagnosticCategory.Error, Decl(a.ts, 27, 16)) Suggestion, ->Suggestion : Symbol(DiagnosticCategory.Suggestion, Decl(f.ts, 29, 14)) +>Suggestion : Symbol(DiagnosticCategory.Suggestion, Decl(a.ts, 28, 14)) Message, ->Message : Symbol(DiagnosticCategory.Message, Decl(f.ts, 30, 19)) +>Message : Symbol(DiagnosticCategory.Message, Decl(a.ts, 29, 19)) } } function f(x: numerics.DiagnosticCategory, y: strings.DiagnosticCategory) { ->f : Symbol(f, Decl(f.ts, 33, 1)) ->x : Symbol(x, Decl(f.ts, 35, 11)) ->numerics : Symbol(numerics, Decl(f.ts, 0, 0)) ->DiagnosticCategory : Symbol(numerics.DiagnosticCategory, Decl(f.ts, 1, 20)) ->y : Symbol(y, Decl(f.ts, 35, 42)) ->strings : Symbol(strings, Decl(f.ts, 15, 1)) ->DiagnosticCategory : Symbol(strings.DiagnosticCategory, Decl(f.ts, 17, 19)) +>f : Symbol(f, Decl(a.ts, 32, 1)) +>x : Symbol(x, Decl(a.ts, 34, 11)) +>numerics : Symbol(numerics, Decl(a.ts, 0, 0)) +>DiagnosticCategory : Symbol(numerics.DiagnosticCategory, Decl(a.ts, 0, 20)) +>y : Symbol(y, Decl(a.ts, 34, 42)) +>strings : Symbol(strings, Decl(a.ts, 14, 1)) +>DiagnosticCategory : Symbol(strings.DiagnosticCategory, Decl(a.ts, 16, 19)) x = y; ->x : Symbol(x, Decl(f.ts, 35, 11)) ->y : Symbol(y, Decl(f.ts, 35, 42)) +>x : Symbol(x, Decl(a.ts, 34, 11)) +>y : Symbol(y, Decl(a.ts, 34, 42)) y = x; ->y : Symbol(y, Decl(f.ts, 35, 42)) ->x : Symbol(x, Decl(f.ts, 35, 11)) +>y : Symbol(y, Decl(a.ts, 34, 42)) +>x : Symbol(x, Decl(a.ts, 34, 11)) } function g(x: numerics.DiagnosticCategory2, y: strings.DiagnosticCategory) { ->g : Symbol(g, Decl(f.ts, 38, 1)) ->x : Symbol(x, Decl(f.ts, 40, 11)) ->numerics : Symbol(numerics, Decl(f.ts, 0, 0)) ->DiagnosticCategory2 : Symbol(numerics.DiagnosticCategory2, Decl(f.ts, 7, 5)) ->y : Symbol(y, Decl(f.ts, 40, 43)) ->strings : Symbol(strings, Decl(f.ts, 15, 1)) ->DiagnosticCategory : Symbol(strings.DiagnosticCategory, Decl(f.ts, 17, 19)) +>g : Symbol(g, Decl(a.ts, 37, 1)) +>x : Symbol(x, Decl(a.ts, 39, 11)) +>numerics : Symbol(numerics, Decl(a.ts, 0, 0)) +>DiagnosticCategory2 : Symbol(numerics.DiagnosticCategory2, Decl(a.ts, 6, 5)) +>y : Symbol(y, Decl(a.ts, 39, 43)) +>strings : Symbol(strings, Decl(a.ts, 14, 1)) +>DiagnosticCategory : Symbol(strings.DiagnosticCategory, Decl(a.ts, 16, 19)) x = y; ->x : Symbol(x, Decl(f.ts, 40, 11)) ->y : Symbol(y, Decl(f.ts, 40, 43)) +>x : Symbol(x, Decl(a.ts, 39, 11)) +>y : Symbol(y, Decl(a.ts, 39, 43)) y = x; ->y : Symbol(y, Decl(f.ts, 40, 43)) ->x : Symbol(x, Decl(f.ts, 40, 11)) +>y : Symbol(y, Decl(a.ts, 39, 43)) +>x : Symbol(x, Decl(a.ts, 39, 11)) } function h(x: numerics.DiagnosticCategory, y: ambients.DiagnosticCategory) { ->h : Symbol(h, Decl(f.ts, 43, 1)) ->x : Symbol(x, Decl(f.ts, 45, 11)) ->numerics : Symbol(numerics, Decl(f.ts, 0, 0)) ->DiagnosticCategory : Symbol(numerics.DiagnosticCategory, Decl(f.ts, 1, 20)) ->y : Symbol(y, Decl(f.ts, 45, 42)) ->ambients : Symbol(ambients, Decl(f.ts, 24, 1)) ->DiagnosticCategory : Symbol(ambients.DiagnosticCategory, Decl(f.ts, 26, 28)) +>h : Symbol(h, Decl(a.ts, 42, 1)) +>x : Symbol(x, Decl(a.ts, 44, 11)) +>numerics : Symbol(numerics, Decl(a.ts, 0, 0)) +>DiagnosticCategory : Symbol(numerics.DiagnosticCategory, Decl(a.ts, 0, 20)) +>y : Symbol(y, Decl(a.ts, 44, 42)) +>ambients : Symbol(ambients, Decl(a.ts, 23, 1)) +>DiagnosticCategory : Symbol(ambients.DiagnosticCategory, Decl(a.ts, 25, 28)) x = y; ->x : Symbol(x, Decl(f.ts, 45, 11)) ->y : Symbol(y, Decl(f.ts, 45, 42)) +>x : Symbol(x, Decl(a.ts, 44, 11)) +>y : Symbol(y, Decl(a.ts, 44, 42)) y = x; ->y : Symbol(y, Decl(f.ts, 45, 42)) ->x : Symbol(x, Decl(f.ts, 45, 11)) +>y : Symbol(y, Decl(a.ts, 44, 42)) +>x : Symbol(x, Decl(a.ts, 44, 11)) } function i(x: strings.DiagnosticCategory, y: ambients.DiagnosticCategory) { ->i : Symbol(i, Decl(f.ts, 48, 1)) ->x : Symbol(x, Decl(f.ts, 50, 11)) ->strings : Symbol(strings, Decl(f.ts, 15, 1)) ->DiagnosticCategory : Symbol(strings.DiagnosticCategory, Decl(f.ts, 17, 19)) ->y : Symbol(y, Decl(f.ts, 50, 41)) ->ambients : Symbol(ambients, Decl(f.ts, 24, 1)) ->DiagnosticCategory : Symbol(ambients.DiagnosticCategory, Decl(f.ts, 26, 28)) +>i : Symbol(i, Decl(a.ts, 47, 1)) +>x : Symbol(x, Decl(a.ts, 49, 11)) +>strings : Symbol(strings, Decl(a.ts, 14, 1)) +>DiagnosticCategory : Symbol(strings.DiagnosticCategory, Decl(a.ts, 16, 19)) +>y : Symbol(y, Decl(a.ts, 49, 41)) +>ambients : Symbol(ambients, Decl(a.ts, 23, 1)) +>DiagnosticCategory : Symbol(ambients.DiagnosticCategory, Decl(a.ts, 25, 28)) x = y; ->x : Symbol(x, Decl(f.ts, 50, 11)) ->y : Symbol(y, Decl(f.ts, 50, 41)) +>x : Symbol(x, Decl(a.ts, 49, 11)) +>y : Symbol(y, Decl(a.ts, 49, 41)) y = x; ->y : Symbol(y, Decl(f.ts, 50, 41)) ->x : Symbol(x, Decl(f.ts, 50, 11)) +>y : Symbol(y, Decl(a.ts, 49, 41)) +>x : Symbol(x, Decl(a.ts, 49, 11)) } +=== f.ts === export enum DiagnosticCategory { ->DiagnosticCategory : Symbol(DiagnosticCategory, Decl(f.ts, 53, 1)) +>DiagnosticCategory : Symbol(DiagnosticCategory, Decl(f.ts, 0, 0)) Warning, ->Warning : Symbol(DiagnosticCategory.Warning, Decl(f.ts, 55, 32)) +>Warning : Symbol(DiagnosticCategory.Warning, Decl(f.ts, 0, 32)) Error, ->Error : Symbol(DiagnosticCategory.Error, Decl(f.ts, 56, 12)) +>Error : Symbol(DiagnosticCategory.Error, Decl(f.ts, 1, 12)) Suggestion, ->Suggestion : Symbol(DiagnosticCategory.Suggestion, Decl(f.ts, 57, 10)) +>Suggestion : Symbol(DiagnosticCategory.Suggestion, Decl(f.ts, 2, 10)) Message, ->Message : Symbol(DiagnosticCategory.Message, Decl(f.ts, 58, 15)) +>Message : Symbol(DiagnosticCategory.Message, Decl(f.ts, 3, 15)) } export let x: DiagnosticCategory; ->x : Symbol(x, Decl(f.ts, 62, 10)) ->DiagnosticCategory : Symbol(DiagnosticCategory, Decl(f.ts, 53, 1)) +>x : Symbol(x, Decl(f.ts, 7, 10)) +>DiagnosticCategory : Symbol(DiagnosticCategory, Decl(f.ts, 0, 0)) (() => { enum DiagnosticCategory { ->DiagnosticCategory : Symbol(DiagnosticCategory, Decl(f.ts, 64, 8)) +>DiagnosticCategory : Symbol(DiagnosticCategory, Decl(f.ts, 9, 8)) Warning = "Warning", ->Warning : Symbol(DiagnosticCategory.Warning, Decl(f.ts, 65, 29)) +>Warning : Symbol(DiagnosticCategory.Warning, Decl(f.ts, 10, 29)) Error = "Error", ->Error : Symbol(DiagnosticCategory.Error, Decl(f.ts, 66, 28)) +>Error : Symbol(DiagnosticCategory.Error, Decl(f.ts, 11, 28)) Suggestion = "Suggestion", ->Suggestion : Symbol(DiagnosticCategory.Suggestion, Decl(f.ts, 67, 24)) +>Suggestion : Symbol(DiagnosticCategory.Suggestion, Decl(f.ts, 12, 24)) Message = "Message", ->Message : Symbol(DiagnosticCategory.Message, Decl(f.ts, 68, 34)) +>Message : Symbol(DiagnosticCategory.Message, Decl(f.ts, 13, 34)) } function f(y: DiagnosticCategory) { ->f : Symbol(f, Decl(f.ts, 70, 5)) ->y : Symbol(y, Decl(f.ts, 71, 15)) ->DiagnosticCategory : Symbol(DiagnosticCategory, Decl(f.ts, 64, 8)) +>f : Symbol(f, Decl(f.ts, 15, 5)) +>y : Symbol(y, Decl(f.ts, 16, 15)) +>DiagnosticCategory : Symbol(DiagnosticCategory, Decl(f.ts, 9, 8)) x = y; ->x : Symbol(x, Decl(f.ts, 62, 10)) ->y : Symbol(y, Decl(f.ts, 71, 15)) +>x : Symbol(x, Decl(f.ts, 7, 10)) +>y : Symbol(y, Decl(f.ts, 16, 15)) y = x; ->y : Symbol(y, Decl(f.ts, 71, 15)) ->x : Symbol(x, Decl(f.ts, 62, 10)) +>y : Symbol(y, Decl(f.ts, 16, 15)) +>x : Symbol(x, Decl(f.ts, 7, 10)) } })() diff --git a/tests/baselines/reference/enumAssignmentCompat6.types b/tests/baselines/reference/enumAssignmentCompat6.types index ff464f41afb..4c2ed064f2a 100644 --- a/tests/baselines/reference/enumAssignmentCompat6.types +++ b/tests/baselines/reference/enumAssignmentCompat6.types @@ -1,7 +1,6 @@ //// [tests/cases/compiler/enumAssignmentCompat6.ts] //// -=== f.ts === -// @filename a.ts +=== a.ts === namespace numerics { >numerics : typeof numerics @@ -154,6 +153,7 @@ function i(x: strings.DiagnosticCategory, y: ambients.DiagnosticCategory) { >x : strings.DiagnosticCategory } +=== f.ts === export enum DiagnosticCategory { >DiagnosticCategory : DiagnosticCategory diff --git a/tests/baselines/reference/exportDefaultProperty.js b/tests/baselines/reference/exportDefaultProperty.js index 5af680b07b2..929727efb1d 100644 --- a/tests/baselines/reference/exportDefaultProperty.js +++ b/tests/baselines/reference/exportDefaultProperty.js @@ -1,8 +1,6 @@ //// [tests/cases/compiler/exportDefaultProperty.ts] //// //// [declarations.d.ts] -// This test is just like exportEqualsProperty, but with `export default`. - declare namespace foo.bar { export type X = number; export const X: number; diff --git a/tests/baselines/reference/exportDefaultProperty.symbols b/tests/baselines/reference/exportDefaultProperty.symbols index 9c220272f80..2f686c57aa6 100644 --- a/tests/baselines/reference/exportDefaultProperty.symbols +++ b/tests/baselines/reference/exportDefaultProperty.symbols @@ -8,7 +8,7 @@ import fooBar from "foobar"; import X = fooBar.X; >X : Symbol(X, Decl(index.ts, 1, 28)) >fooBar : Symbol(fooBar, Decl(index.ts, 1, 6)) ->X : Symbol(fooBar.X, Decl(declarations.d.ts, 2, 27), Decl(declarations.d.ts, 4, 16)) +>X : Symbol(fooBar.X, Decl(declarations.d.ts, 0, 27), Decl(declarations.d.ts, 2, 16)) import X2 from "foobarx"; >X2 : Symbol(X2, Decl(index.ts, 3, 6)) @@ -41,37 +41,35 @@ fooLength + 1; >fooLength : Symbol(fooLength, Decl(index.ts, 10, 6)) === declarations.d.ts === -// This test is just like exportEqualsProperty, but with `export default`. - declare namespace foo.bar { >foo : Symbol(foo, Decl(declarations.d.ts, 0, 0)) ->bar : Symbol(bar, Decl(declarations.d.ts, 2, 22)) +>bar : Symbol(bar, Decl(declarations.d.ts, 0, 22)) export type X = number; ->X : Symbol(X, Decl(declarations.d.ts, 2, 27), Decl(declarations.d.ts, 4, 16)) +>X : Symbol(X, Decl(declarations.d.ts, 0, 27), Decl(declarations.d.ts, 2, 16)) export const X: number; ->X : Symbol(X, Decl(declarations.d.ts, 2, 27), Decl(declarations.d.ts, 4, 16)) +>X : Symbol(X, Decl(declarations.d.ts, 0, 27), Decl(declarations.d.ts, 2, 16)) } declare module "foobar" { ->"foobar" : Symbol("foobar", Decl(declarations.d.ts, 5, 1)) +>"foobar" : Symbol("foobar", Decl(declarations.d.ts, 3, 1)) export default foo.bar; ->foo.bar : Symbol(foo.bar, Decl(declarations.d.ts, 2, 22)) +>foo.bar : Symbol(foo.bar, Decl(declarations.d.ts, 0, 22)) >foo : Symbol(foo, Decl(declarations.d.ts, 0, 0)) ->bar : Symbol(foo.bar, Decl(declarations.d.ts, 2, 22)) +>bar : Symbol(foo.bar, Decl(declarations.d.ts, 0, 22)) } declare module "foobarx" { ->"foobarx" : Symbol("foobarx", Decl(declarations.d.ts, 9, 1)) +>"foobarx" : Symbol("foobarx", Decl(declarations.d.ts, 7, 1)) export default foo.bar.X; ->foo.bar.X : Symbol(foo.bar.X, Decl(declarations.d.ts, 2, 27), Decl(declarations.d.ts, 4, 16)) ->foo.bar : Symbol(foo.bar, Decl(declarations.d.ts, 2, 22)) +>foo.bar.X : Symbol(foo.bar.X, Decl(declarations.d.ts, 0, 27), Decl(declarations.d.ts, 2, 16)) +>foo.bar : Symbol(foo.bar, Decl(declarations.d.ts, 0, 22)) >foo : Symbol(foo, Decl(declarations.d.ts, 0, 0)) ->bar : Symbol(foo.bar, Decl(declarations.d.ts, 2, 22)) ->X : Symbol(foo.bar.X, Decl(declarations.d.ts, 2, 27), Decl(declarations.d.ts, 4, 16)) +>bar : Symbol(foo.bar, Decl(declarations.d.ts, 0, 22)) +>X : Symbol(foo.bar.X, Decl(declarations.d.ts, 0, 27), Decl(declarations.d.ts, 2, 16)) } === a.ts === diff --git a/tests/baselines/reference/exportDefaultProperty.types b/tests/baselines/reference/exportDefaultProperty.types index 0b24280642c..8aa3fb58718 100644 --- a/tests/baselines/reference/exportDefaultProperty.types +++ b/tests/baselines/reference/exportDefaultProperty.types @@ -41,8 +41,6 @@ fooLength + 1; >1 : 1 === declarations.d.ts === -// This test is just like exportEqualsProperty, but with `export default`. - declare namespace foo.bar { >foo : typeof foo >bar : typeof bar diff --git a/tests/baselines/reference/exportDefaultProperty2.js b/tests/baselines/reference/exportDefaultProperty2.js index 57cde1e2f56..278fe519ae1 100644 --- a/tests/baselines/reference/exportDefaultProperty2.js +++ b/tests/baselines/reference/exportDefaultProperty2.js @@ -1,8 +1,6 @@ //// [tests/cases/compiler/exportDefaultProperty2.ts] //// //// [a.ts] -// This test is just like exportEqualsProperty2, but with `export default`. - class C { static B: number; } @@ -19,7 +17,6 @@ const x: B = { c: B }; //// [a.js] "use strict"; -// This test is just like exportEqualsProperty2, but with `export default`. Object.defineProperty(exports, "__esModule", { value: true }); var C = /** @class */ (function () { function C() { diff --git a/tests/baselines/reference/exportDefaultProperty2.symbols b/tests/baselines/reference/exportDefaultProperty2.symbols index 4df4dd18acd..eed2099a522 100644 --- a/tests/baselines/reference/exportDefaultProperty2.symbols +++ b/tests/baselines/reference/exportDefaultProperty2.symbols @@ -1,26 +1,24 @@ //// [tests/cases/compiler/exportDefaultProperty2.ts] //// === a.ts === -// This test is just like exportEqualsProperty2, but with `export default`. - class C { ->C : Symbol(C, Decl(a.ts, 0, 0), Decl(a.ts, 4, 1)) +>C : Symbol(C, Decl(a.ts, 0, 0), Decl(a.ts, 2, 1)) static B: number; ->B : Symbol(C.B, Decl(a.ts, 2, 9), Decl(a.ts, 5, 13)) +>B : Symbol(C.B, Decl(a.ts, 0, 9), Decl(a.ts, 3, 13)) } namespace C { ->C : Symbol(C, Decl(a.ts, 0, 0), Decl(a.ts, 4, 1)) +>C : Symbol(C, Decl(a.ts, 0, 0), Decl(a.ts, 2, 1)) export interface B { c: number } ->B : Symbol(B, Decl(a.ts, 2, 9), Decl(a.ts, 5, 13)) ->c : Symbol(B.c, Decl(a.ts, 6, 24)) +>B : Symbol(B, Decl(a.ts, 0, 9), Decl(a.ts, 3, 13)) +>c : Symbol(B.c, Decl(a.ts, 4, 24)) } export default C.B; ->C.B : Symbol(C.B, Decl(a.ts, 2, 9), Decl(a.ts, 5, 13)) ->C : Symbol(C, Decl(a.ts, 0, 0), Decl(a.ts, 4, 1)) ->B : Symbol(C.B, Decl(a.ts, 2, 9), Decl(a.ts, 5, 13)) +>C.B : Symbol(C.B, Decl(a.ts, 0, 9), Decl(a.ts, 3, 13)) +>C : Symbol(C, Decl(a.ts, 0, 0), Decl(a.ts, 2, 1)) +>B : Symbol(C.B, Decl(a.ts, 0, 9), Decl(a.ts, 3, 13)) === b.ts === import B from "./a"; diff --git a/tests/baselines/reference/exportDefaultProperty2.types b/tests/baselines/reference/exportDefaultProperty2.types index f64d8dfa7ab..154e46e89b4 100644 --- a/tests/baselines/reference/exportDefaultProperty2.types +++ b/tests/baselines/reference/exportDefaultProperty2.types @@ -1,8 +1,6 @@ //// [tests/cases/compiler/exportDefaultProperty2.ts] //// === a.ts === -// This test is just like exportEqualsProperty2, but with `export default`. - class C { >C : C diff --git a/tests/baselines/reference/exportEqualsProperty.js b/tests/baselines/reference/exportEqualsProperty.js index 8fbe730a43a..df16812d72e 100644 --- a/tests/baselines/reference/exportEqualsProperty.js +++ b/tests/baselines/reference/exportEqualsProperty.js @@ -1,8 +1,6 @@ //// [tests/cases/compiler/exportEqualsProperty.ts] //// //// [declarations.d.ts] -// This test is just like exportDefaultProperty, but with `export =`. - declare namespace foo.bar { export type X = number; export const X: number; diff --git a/tests/baselines/reference/exportEqualsProperty.symbols b/tests/baselines/reference/exportEqualsProperty.symbols index 7b79a639184..e9d580824c1 100644 --- a/tests/baselines/reference/exportEqualsProperty.symbols +++ b/tests/baselines/reference/exportEqualsProperty.symbols @@ -36,37 +36,35 @@ fooLength + 1; >fooLength : Symbol(fooLength, Decl(index.ts, 7, 24)) === declarations.d.ts === -// This test is just like exportDefaultProperty, but with `export =`. - declare namespace foo.bar { >foo : Symbol(foo, Decl(declarations.d.ts, 0, 0)) ->bar : Symbol(bar, Decl(declarations.d.ts, 2, 22)) +>bar : Symbol(bar, Decl(declarations.d.ts, 0, 22)) export type X = number; ->X : Symbol(X, Decl(declarations.d.ts, 2, 27), Decl(declarations.d.ts, 4, 16)) +>X : Symbol(X, Decl(declarations.d.ts, 0, 27), Decl(declarations.d.ts, 2, 16)) export const X: number; ->X : Symbol(X, Decl(declarations.d.ts, 2, 27), Decl(declarations.d.ts, 4, 16)) +>X : Symbol(X, Decl(declarations.d.ts, 0, 27), Decl(declarations.d.ts, 2, 16)) } declare module "foobar" { ->"foobar" : Symbol("foobar", Decl(declarations.d.ts, 5, 1)) +>"foobar" : Symbol("foobar", Decl(declarations.d.ts, 3, 1)) export = foo.bar; ->foo.bar : Symbol(foo.bar, Decl(declarations.d.ts, 2, 22)) +>foo.bar : Symbol(foo.bar, Decl(declarations.d.ts, 0, 22)) >foo : Symbol(foo, Decl(declarations.d.ts, 0, 0)) ->bar : Symbol(foo.bar, Decl(declarations.d.ts, 2, 22)) +>bar : Symbol(foo.bar, Decl(declarations.d.ts, 0, 22)) } declare module "foobarx" { ->"foobarx" : Symbol("foobarx", Decl(declarations.d.ts, 9, 1)) +>"foobarx" : Symbol("foobarx", Decl(declarations.d.ts, 7, 1)) export = foo.bar.X; ->foo.bar.X : Symbol(foo.bar.X, Decl(declarations.d.ts, 2, 27), Decl(declarations.d.ts, 4, 16)) ->foo.bar : Symbol(foo.bar, Decl(declarations.d.ts, 2, 22)) +>foo.bar.X : Symbol(foo.bar.X, Decl(declarations.d.ts, 0, 27), Decl(declarations.d.ts, 2, 16)) +>foo.bar : Symbol(foo.bar, Decl(declarations.d.ts, 0, 22)) >foo : Symbol(foo, Decl(declarations.d.ts, 0, 0)) ->bar : Symbol(foo.bar, Decl(declarations.d.ts, 2, 22)) ->X : Symbol(foo.bar.X, Decl(declarations.d.ts, 2, 27), Decl(declarations.d.ts, 4, 16)) +>bar : Symbol(foo.bar, Decl(declarations.d.ts, 0, 22)) +>X : Symbol(foo.bar.X, Decl(declarations.d.ts, 0, 27), Decl(declarations.d.ts, 2, 16)) } === a.ts === diff --git a/tests/baselines/reference/exportEqualsProperty.types b/tests/baselines/reference/exportEqualsProperty.types index 55161515ec0..898c768c987 100644 --- a/tests/baselines/reference/exportEqualsProperty.types +++ b/tests/baselines/reference/exportEqualsProperty.types @@ -36,8 +36,6 @@ fooLength + 1; >1 : 1 === declarations.d.ts === -// This test is just like exportDefaultProperty, but with `export =`. - declare namespace foo.bar { >foo : typeof foo >bar : typeof bar diff --git a/tests/baselines/reference/exportEqualsProperty2.js b/tests/baselines/reference/exportEqualsProperty2.js index 8d6100a1423..e112e736d48 100644 --- a/tests/baselines/reference/exportEqualsProperty2.js +++ b/tests/baselines/reference/exportEqualsProperty2.js @@ -1,8 +1,6 @@ //// [tests/cases/compiler/exportEqualsProperty2.ts] //// //// [a.ts] -// This test is just like exportDefaultProperty2, but with `export =`. - class C { static B: number; } @@ -19,7 +17,6 @@ const x: B = { c: B }; //// [a.js] "use strict"; -// This test is just like exportDefaultProperty2, but with `export =`. var C = /** @class */ (function () { function C() { } diff --git a/tests/baselines/reference/exportEqualsProperty2.symbols b/tests/baselines/reference/exportEqualsProperty2.symbols index 16d56b9d341..3a025a43fa2 100644 --- a/tests/baselines/reference/exportEqualsProperty2.symbols +++ b/tests/baselines/reference/exportEqualsProperty2.symbols @@ -11,24 +11,22 @@ const x: B = { c: B }; >B : Symbol(B, Decl(b.ts, 0, 0)) === a.ts === -// This test is just like exportDefaultProperty2, but with `export =`. - class C { ->C : Symbol(C, Decl(a.ts, 0, 0), Decl(a.ts, 4, 1)) +>C : Symbol(C, Decl(a.ts, 0, 0), Decl(a.ts, 2, 1)) static B: number; ->B : Symbol(C.B, Decl(a.ts, 2, 9), Decl(a.ts, 5, 13)) +>B : Symbol(C.B, Decl(a.ts, 0, 9), Decl(a.ts, 3, 13)) } namespace C { ->C : Symbol(C, Decl(a.ts, 0, 0), Decl(a.ts, 4, 1)) +>C : Symbol(C, Decl(a.ts, 0, 0), Decl(a.ts, 2, 1)) export interface B { c: number } ->B : Symbol(B, Decl(a.ts, 2, 9), Decl(a.ts, 5, 13)) ->c : Symbol(B.c, Decl(a.ts, 6, 24)) +>B : Symbol(B, Decl(a.ts, 0, 9), Decl(a.ts, 3, 13)) +>c : Symbol(B.c, Decl(a.ts, 4, 24)) } export = C.B; ->C.B : Symbol(C.B, Decl(a.ts, 2, 9), Decl(a.ts, 5, 13)) ->C : Symbol(C, Decl(a.ts, 0, 0), Decl(a.ts, 4, 1)) ->B : Symbol(C.B, Decl(a.ts, 2, 9), Decl(a.ts, 5, 13)) +>C.B : Symbol(C.B, Decl(a.ts, 0, 9), Decl(a.ts, 3, 13)) +>C : Symbol(C, Decl(a.ts, 0, 0), Decl(a.ts, 2, 1)) +>B : Symbol(C.B, Decl(a.ts, 0, 9), Decl(a.ts, 3, 13)) diff --git a/tests/baselines/reference/exportEqualsProperty2.types b/tests/baselines/reference/exportEqualsProperty2.types index 99a1643ba73..30f76b06569 100644 --- a/tests/baselines/reference/exportEqualsProperty2.types +++ b/tests/baselines/reference/exportEqualsProperty2.types @@ -11,8 +11,6 @@ const x: B = { c: B }; >B : number === a.ts === -// This test is just like exportDefaultProperty2, but with `export =`. - class C { >C : C diff --git a/tests/baselines/reference/extendsUntypedModule.errors.txt b/tests/baselines/reference/extendsUntypedModule.errors.txt index aded38736e8..df83f994755 100644 --- a/tests/baselines/reference/extendsUntypedModule.errors.txt +++ b/tests/baselines/reference/extendsUntypedModule.errors.txt @@ -9,8 +9,6 @@ export class A extends Foo { } ==== /node_modules/foo/index.js (0 errors) ==== - // Test that extending an untyped module is an error, unlike extending unknownSymbol. - This file is not read. ==== /node_modules/bar/index.js (0 errors) ==== diff --git a/tests/baselines/reference/extendsUntypedModule.js b/tests/baselines/reference/extendsUntypedModule.js index eb1fd0d9ac6..c28041bb52d 100644 --- a/tests/baselines/reference/extendsUntypedModule.js +++ b/tests/baselines/reference/extendsUntypedModule.js @@ -1,8 +1,6 @@ //// [tests/cases/compiler/extendsUntypedModule.ts] //// //// [index.js] -// Test that extending an untyped module is an error, unlike extending unknownSymbol. - This file is not read. //// [index.js] diff --git a/tests/baselines/reference/fillInMissingTypeArgsOnJSConstructCalls.errors.txt b/tests/baselines/reference/fillInMissingTypeArgsOnJSConstructCalls.errors.txt index f09d85db8d3..a4e9026a3af 100644 --- a/tests/baselines/reference/fillInMissingTypeArgsOnJSConstructCalls.errors.txt +++ b/tests/baselines/reference/fillInMissingTypeArgsOnJSConstructCalls.errors.txt @@ -8,7 +8,6 @@ SubB.js(3,41): error TS8011: Type arguments can only be used in TypeScript files ==== BaseA.js (0 errors) ==== - // regression test for #18254 export default class BaseA { } ==== SubA.js (0 errors) ==== diff --git a/tests/baselines/reference/fillInMissingTypeArgsOnJSConstructCalls.symbols b/tests/baselines/reference/fillInMissingTypeArgsOnJSConstructCalls.symbols index 50048d85c0e..b18ddbadc98 100644 --- a/tests/baselines/reference/fillInMissingTypeArgsOnJSConstructCalls.symbols +++ b/tests/baselines/reference/fillInMissingTypeArgsOnJSConstructCalls.symbols @@ -1,7 +1,6 @@ //// [tests/cases/compiler/fillInMissingTypeArgsOnJSConstructCalls.ts] //// === BaseA.js === -// regression test for #18254 export default class BaseA { >BaseA : Symbol(BaseA, Decl(BaseA.js, 0, 0)) } diff --git a/tests/baselines/reference/fillInMissingTypeArgsOnJSConstructCalls.types b/tests/baselines/reference/fillInMissingTypeArgsOnJSConstructCalls.types index 06009b41b2e..1818b2c36b6 100644 --- a/tests/baselines/reference/fillInMissingTypeArgsOnJSConstructCalls.types +++ b/tests/baselines/reference/fillInMissingTypeArgsOnJSConstructCalls.types @@ -1,7 +1,6 @@ //// [tests/cases/compiler/fillInMissingTypeArgsOnJSConstructCalls.ts] //// === BaseA.js === -// regression test for #18254 export default class BaseA { >BaseA : BaseA } diff --git a/tests/baselines/reference/importPropertyFromMappedType.js b/tests/baselines/reference/importPropertyFromMappedType.js index ba95c34cb19..4e766bb4a16 100644 --- a/tests/baselines/reference/importPropertyFromMappedType.js +++ b/tests/baselines/reference/importPropertyFromMappedType.js @@ -1,8 +1,6 @@ //// [tests/cases/compiler/importPropertyFromMappedType.ts] //// //// [errors.d.ts] -// #42957 - export = createHttpError; declare const createHttpError: createHttpError.NamedConstructors; declare namespace createHttpError { diff --git a/tests/baselines/reference/importPropertyFromMappedType.symbols b/tests/baselines/reference/importPropertyFromMappedType.symbols index eff2d50f0e4..7d34e015438 100644 --- a/tests/baselines/reference/importPropertyFromMappedType.symbols +++ b/tests/baselines/reference/importPropertyFromMappedType.symbols @@ -1,22 +1,20 @@ //// [tests/cases/compiler/importPropertyFromMappedType.ts] //// === errors.d.ts === -// #42957 - export = createHttpError; ->createHttpError : Symbol(createHttpError, Decl(errors.d.ts, 3, 13), Decl(errors.d.ts, 3, 65)) +>createHttpError : Symbol(createHttpError, Decl(errors.d.ts, 1, 13), Decl(errors.d.ts, 1, 65)) declare const createHttpError: createHttpError.NamedConstructors; ->createHttpError : Symbol(createHttpError, Decl(errors.d.ts, 3, 13), Decl(errors.d.ts, 3, 65)) ->createHttpError : Symbol(createHttpError, Decl(errors.d.ts, 3, 13), Decl(errors.d.ts, 3, 65)) ->NamedConstructors : Symbol(createHttpError.NamedConstructors, Decl(errors.d.ts, 4, 35)) +>createHttpError : Symbol(createHttpError, Decl(errors.d.ts, 1, 13), Decl(errors.d.ts, 1, 65)) +>createHttpError : Symbol(createHttpError, Decl(errors.d.ts, 1, 13), Decl(errors.d.ts, 1, 65)) +>NamedConstructors : Symbol(createHttpError.NamedConstructors, Decl(errors.d.ts, 2, 35)) declare namespace createHttpError { ->createHttpError : Symbol(createHttpError, Decl(errors.d.ts, 3, 13), Decl(errors.d.ts, 3, 65)) +>createHttpError : Symbol(createHttpError, Decl(errors.d.ts, 1, 13), Decl(errors.d.ts, 1, 65)) type NamedConstructors = { [P in 'NotFound']: unknown;} ->NamedConstructors : Symbol(NamedConstructors, Decl(errors.d.ts, 4, 35)) ->P : Symbol(P, Decl(errors.d.ts, 5, 33)) +>NamedConstructors : Symbol(NamedConstructors, Decl(errors.d.ts, 2, 35)) +>P : Symbol(P, Decl(errors.d.ts, 3, 33)) } === main.ts === diff --git a/tests/baselines/reference/importPropertyFromMappedType.types b/tests/baselines/reference/importPropertyFromMappedType.types index 7af9222b74b..081da637079 100644 --- a/tests/baselines/reference/importPropertyFromMappedType.types +++ b/tests/baselines/reference/importPropertyFromMappedType.types @@ -1,8 +1,6 @@ //// [tests/cases/compiler/importPropertyFromMappedType.ts] //// === errors.d.ts === -// #42957 - export = createHttpError; >createHttpError : createHttpError.NamedConstructors diff --git a/tests/baselines/reference/javascriptImportDefaultBadExport.errors.txt b/tests/baselines/reference/javascriptImportDefaultBadExport.errors.txt index e5631c22a89..58814ce045f 100644 --- a/tests/baselines/reference/javascriptImportDefaultBadExport.errors.txt +++ b/tests/baselines/reference/javascriptImportDefaultBadExport.errors.txt @@ -2,9 +2,6 @@ ==== /a.js (0 errors) ==== - // https://github.com/microsoft/TypeScript/issues/34481 - - const alias = {}; module.exports = alias; @@ -12,5 +9,5 @@ import a from "./a"; ~ !!! error TS1259: Module '"/a"' can only be default-imported using the 'esModuleInterop' flag -!!! related TS2594 /a.js:5:1: This module is declared with 'export =', and can only be used with a default import when using the 'esModuleInterop' flag. +!!! related TS2594 /a.js: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/tests/baselines/reference/javascriptImportDefaultBadExport.symbols b/tests/baselines/reference/javascriptImportDefaultBadExport.symbols index 74457c1291d..293f410c005 100644 --- a/tests/baselines/reference/javascriptImportDefaultBadExport.symbols +++ b/tests/baselines/reference/javascriptImportDefaultBadExport.symbols @@ -1,17 +1,14 @@ //// [tests/cases/compiler/javascriptImportDefaultBadExport.ts] //// === /a.js === -// https://github.com/microsoft/TypeScript/issues/34481 - - const alias = {}; ->alias : Symbol(alias, Decl(a.js, 3, 5)) +>alias : Symbol(alias, Decl(a.js, 0, 5)) module.exports = alias; >module.exports : Symbol(module.exports, Decl(a.js, 0, 0)) ->module : Symbol(export=, Decl(a.js, 3, 17)) ->exports : Symbol(export=, Decl(a.js, 3, 17)) ->alias : Symbol(alias, Decl(a.js, 3, 5)) +>module : Symbol(export=, Decl(a.js, 0, 17)) +>exports : Symbol(export=, Decl(a.js, 0, 17)) +>alias : Symbol(alias, Decl(a.js, 0, 5)) === /b.js === import a from "./a"; diff --git a/tests/baselines/reference/javascriptImportDefaultBadExport.types b/tests/baselines/reference/javascriptImportDefaultBadExport.types index 85717b0e236..956322525b3 100644 --- a/tests/baselines/reference/javascriptImportDefaultBadExport.types +++ b/tests/baselines/reference/javascriptImportDefaultBadExport.types @@ -1,9 +1,6 @@ //// [tests/cases/compiler/javascriptImportDefaultBadExport.ts] //// === /a.js === -// https://github.com/microsoft/TypeScript/issues/34481 - - const alias = {}; >alias : {} >{} : {} diff --git a/tests/baselines/reference/jsContainerMergeJsContainer.symbols b/tests/baselines/reference/jsContainerMergeJsContainer.symbols index f35bbc44fb0..15dc7b75e04 100644 --- a/tests/baselines/reference/jsContainerMergeJsContainer.symbols +++ b/tests/baselines/reference/jsContainerMergeJsContainer.symbols @@ -1,20 +1,19 @@ //// [tests/cases/conformance/salsa/jsContainerMergeJsContainer.ts] //// === a.js === -// #24131 const a = {}; ->a : Symbol(a, Decl(a.js, 1, 5), Decl(a.js, 1, 13), Decl(b.js, 0, 0)) +>a : Symbol(a, Decl(a.js, 0, 5), Decl(a.js, 0, 13), Decl(b.js, 0, 0)) a.d = function() {}; ->a.d : Symbol(a.d, Decl(a.js, 1, 13), Decl(b.js, 0, 2)) ->a : Symbol(a, Decl(a.js, 1, 5), Decl(a.js, 1, 13), Decl(b.js, 0, 0)) ->d : Symbol(a.d, Decl(a.js, 1, 13), Decl(b.js, 0, 2)) +>a.d : Symbol(a.d, Decl(a.js, 0, 13), Decl(b.js, 0, 2)) +>a : Symbol(a, Decl(a.js, 0, 5), Decl(a.js, 0, 13), Decl(b.js, 0, 0)) +>d : Symbol(a.d, Decl(a.js, 0, 13), Decl(b.js, 0, 2)) === b.js === a.d.prototype = {}; >a.d.prototype : Symbol(a.d.prototype, Decl(b.js, 0, 0)) ->a.d : Symbol(a.d, Decl(a.js, 1, 13), Decl(b.js, 0, 2)) ->a : Symbol(a, Decl(a.js, 1, 5), Decl(a.js, 1, 13), Decl(b.js, 0, 0)) ->d : Symbol(a.d, Decl(a.js, 1, 13), Decl(b.js, 0, 2)) +>a.d : Symbol(a.d, Decl(a.js, 0, 13), Decl(b.js, 0, 2)) +>a : Symbol(a, Decl(a.js, 0, 5), Decl(a.js, 0, 13), Decl(b.js, 0, 0)) +>d : Symbol(a.d, Decl(a.js, 0, 13), Decl(b.js, 0, 2)) >prototype : Symbol(a.d.prototype, Decl(b.js, 0, 0)) diff --git a/tests/baselines/reference/jsContainerMergeJsContainer.types b/tests/baselines/reference/jsContainerMergeJsContainer.types index e78100135b9..10bdd03a4ab 100644 --- a/tests/baselines/reference/jsContainerMergeJsContainer.types +++ b/tests/baselines/reference/jsContainerMergeJsContainer.types @@ -1,7 +1,6 @@ //// [tests/cases/conformance/salsa/jsContainerMergeJsContainer.ts] //// === a.js === -// #24131 const a = {}; >a : typeof a >{} : {} diff --git a/tests/baselines/reference/jsDeclarationsTypedefAndLatebound.symbols b/tests/baselines/reference/jsDeclarationsTypedefAndLatebound.symbols index 812b5397d43..19ba1dcd953 100644 --- a/tests/baselines/reference/jsDeclarationsTypedefAndLatebound.symbols +++ b/tests/baselines/reference/jsDeclarationsTypedefAndLatebound.symbols @@ -1,23 +1,21 @@ //// [tests/cases/conformance/jsdoc/declarations/jsDeclarationsTypedefAndLatebound.ts] //// === index.js === -// from #53967, based on webpack/webpack#16957 - const LazySet = require("./LazySet"); ->LazySet : Symbol(LazySet, Decl(index.js, 2, 5)) +>LazySet : Symbol(LazySet, Decl(index.js, 0, 5)) >require : Symbol(require) >"./LazySet" : Symbol("LazySet", Decl(LazySet.js, 0, 0)) /** @type {LazySet} */ const stringSet = undefined; ->stringSet : Symbol(stringSet, Decl(index.js, 5, 5)) +>stringSet : Symbol(stringSet, Decl(index.js, 3, 5)) >undefined : Symbol(undefined) stringSet.addAll(stringSet); >stringSet.addAll : Symbol(LazySet.addAll, Decl(LazySet.js, 4, 15)) ->stringSet : Symbol(stringSet, Decl(index.js, 5, 5)) +>stringSet : Symbol(stringSet, Decl(index.js, 3, 5)) >addAll : Symbol(LazySet.addAll, Decl(LazySet.js, 4, 15)) ->stringSet : Symbol(stringSet, Decl(index.js, 5, 5)) +>stringSet : Symbol(stringSet, Decl(index.js, 3, 5)) === LazySet.js === diff --git a/tests/baselines/reference/jsDeclarationsTypedefAndLatebound.types b/tests/baselines/reference/jsDeclarationsTypedefAndLatebound.types index 2310a1191ab..f9b2c3b78df 100644 --- a/tests/baselines/reference/jsDeclarationsTypedefAndLatebound.types +++ b/tests/baselines/reference/jsDeclarationsTypedefAndLatebound.types @@ -1,8 +1,6 @@ //// [tests/cases/conformance/jsdoc/declarations/jsDeclarationsTypedefAndLatebound.ts] //// === index.js === -// from #53967, based on webpack/webpack#16957 - const LazySet = require("./LazySet"); >LazySet : typeof LazySet >require("./LazySet") : typeof LazySet diff --git a/tests/baselines/reference/jsEmitIntersectionProperty.js b/tests/baselines/reference/jsEmitIntersectionProperty.js index 49d629268e6..0eb73246e16 100644 --- a/tests/baselines/reference/jsEmitIntersectionProperty.js +++ b/tests/baselines/reference/jsEmitIntersectionProperty.js @@ -1,10 +1,6 @@ //// [tests/cases/compiler/jsEmitIntersectionProperty.ts] //// //// [globals.d.ts] -// #37015 - test asserts lack of crash - - - declare class CoreObject { static extend< Statics, diff --git a/tests/baselines/reference/jsdocImportTypeNodeNamespace.errors.txt b/tests/baselines/reference/jsdocImportTypeNodeNamespace.errors.txt index 98a0e2e1dd7..b306873fd5e 100644 --- a/tests/baselines/reference/jsdocImportTypeNodeNamespace.errors.txt +++ b/tests/baselines/reference/jsdocImportTypeNodeNamespace.errors.txt @@ -2,8 +2,6 @@ Main.js(2,21): error TS2352: Conversion of type 'string' to type 'typeof _defaul ==== GeometryType.d.ts (0 errors) ==== - // #40767 - declare namespace _default { export const POINT: string; } diff --git a/tests/baselines/reference/jsdocImportTypeNodeNamespace.symbols b/tests/baselines/reference/jsdocImportTypeNodeNamespace.symbols index 90cf9a671d4..3d5b8e24e10 100644 --- a/tests/baselines/reference/jsdocImportTypeNodeNamespace.symbols +++ b/tests/baselines/reference/jsdocImportTypeNodeNamespace.symbols @@ -1,13 +1,11 @@ //// [tests/cases/compiler/jsdocImportTypeNodeNamespace.ts] //// === GeometryType.d.ts === -// #40767 - declare namespace _default { >_default : Symbol(_default, Decl(GeometryType.d.ts, 0, 0)) export const POINT: string; ->POINT : Symbol(POINT, Decl(GeometryType.d.ts, 3, 14)) +>POINT : Symbol(POINT, Decl(GeometryType.d.ts, 1, 14)) } export default _default; >_default : Symbol(_default, Decl(GeometryType.d.ts, 0, 0)) diff --git a/tests/baselines/reference/jsdocImportTypeNodeNamespace.types b/tests/baselines/reference/jsdocImportTypeNodeNamespace.types index 50f32fadfd4..77894971509 100644 --- a/tests/baselines/reference/jsdocImportTypeNodeNamespace.types +++ b/tests/baselines/reference/jsdocImportTypeNodeNamespace.types @@ -1,8 +1,6 @@ //// [tests/cases/compiler/jsdocImportTypeNodeNamespace.ts] //// === GeometryType.d.ts === -// #40767 - declare namespace _default { >_default : typeof _default diff --git a/tests/baselines/reference/jsdocTypeReferenceToImport.symbols b/tests/baselines/reference/jsdocTypeReferenceToImport.symbols index 75e578292b6..f775b93078d 100644 --- a/tests/baselines/reference/jsdocTypeReferenceToImport.symbols +++ b/tests/baselines/reference/jsdocTypeReferenceToImport.symbols @@ -1,17 +1,15 @@ //// [tests/cases/conformance/jsdoc/jsdocTypeReferenceToImport.ts] //// === jsdocTypeReferenceToImport.js === -// #34802 - const C = require('./ex').C; ->C : Symbol(C, Decl(jsdocTypeReferenceToImport.js, 2, 5)) +>C : Symbol(C, Decl(jsdocTypeReferenceToImport.js, 0, 5)) >require('./ex').C : Symbol(C, Decl(ex.d.ts, 0, 0)) >require : Symbol(require) >'./ex' : Symbol("ex", Decl(ex.d.ts, 0, 0)) >C : Symbol(C, Decl(ex.d.ts, 0, 0)) const D = require('./ex')?.C; ->D : Symbol(D, Decl(jsdocTypeReferenceToImport.js, 3, 5)) +>D : Symbol(D, Decl(jsdocTypeReferenceToImport.js, 1, 5)) >require('./ex')?.C : Symbol(C, Decl(ex.d.ts, 0, 0)) >require : Symbol(require) >'./ex' : Symbol("ex", Decl(ex.d.ts, 0, 0)) @@ -19,32 +17,32 @@ const D = require('./ex')?.C; /** @type {C} c */ var c = new C() ->c : Symbol(c, Decl(jsdocTypeReferenceToImport.js, 5, 3)) ->C : Symbol(C, Decl(jsdocTypeReferenceToImport.js, 2, 5)) +>c : Symbol(c, Decl(jsdocTypeReferenceToImport.js, 3, 3)) +>C : Symbol(C, Decl(jsdocTypeReferenceToImport.js, 0, 5)) c.start >c.start : Symbol(C.start, Decl(ex.d.ts, 0, 16)) ->c : Symbol(c, Decl(jsdocTypeReferenceToImport.js, 5, 3)) +>c : Symbol(c, Decl(jsdocTypeReferenceToImport.js, 3, 3)) >start : Symbol(C.start, Decl(ex.d.ts, 0, 16)) c.end >c.end : Symbol(C.end, Decl(ex.d.ts, 1, 17)) ->c : Symbol(c, Decl(jsdocTypeReferenceToImport.js, 5, 3)) +>c : Symbol(c, Decl(jsdocTypeReferenceToImport.js, 3, 3)) >end : Symbol(C.end, Decl(ex.d.ts, 1, 17)) /** @type {D} c */ var d = new D() ->d : Symbol(d, Decl(jsdocTypeReferenceToImport.js, 10, 3)) ->D : Symbol(D, Decl(jsdocTypeReferenceToImport.js, 3, 5)) +>d : Symbol(d, Decl(jsdocTypeReferenceToImport.js, 8, 3)) +>D : Symbol(D, Decl(jsdocTypeReferenceToImport.js, 1, 5)) d.start >d.start : Symbol(C.start, Decl(ex.d.ts, 0, 16)) ->d : Symbol(d, Decl(jsdocTypeReferenceToImport.js, 10, 3)) +>d : Symbol(d, Decl(jsdocTypeReferenceToImport.js, 8, 3)) >start : Symbol(C.start, Decl(ex.d.ts, 0, 16)) d.end >d.end : Symbol(C.end, Decl(ex.d.ts, 1, 17)) ->d : Symbol(d, Decl(jsdocTypeReferenceToImport.js, 10, 3)) +>d : Symbol(d, Decl(jsdocTypeReferenceToImport.js, 8, 3)) >end : Symbol(C.end, Decl(ex.d.ts, 1, 17)) === ex.d.ts === diff --git a/tests/baselines/reference/jsdocTypeReferenceToImport.types b/tests/baselines/reference/jsdocTypeReferenceToImport.types index 56d9a0314f2..717e10cbd3c 100644 --- a/tests/baselines/reference/jsdocTypeReferenceToImport.types +++ b/tests/baselines/reference/jsdocTypeReferenceToImport.types @@ -1,8 +1,6 @@ //// [tests/cases/conformance/jsdoc/jsdocTypeReferenceToImport.ts] //// === jsdocTypeReferenceToImport.js === -// #34802 - const C = require('./ex').C; >C : typeof C >require('./ex').C : typeof C diff --git a/tests/baselines/reference/jsdocTypeReferenceToMergedClass.symbols b/tests/baselines/reference/jsdocTypeReferenceToMergedClass.symbols index d7964039996..f96fd890eb6 100644 --- a/tests/baselines/reference/jsdocTypeReferenceToMergedClass.symbols +++ b/tests/baselines/reference/jsdocTypeReferenceToMergedClass.symbols @@ -1,34 +1,32 @@ //// [tests/cases/conformance/jsdoc/jsdocTypeReferenceToMergedClass.ts] //// === jsdocTypeReferenceToMergedClass.js === -// https://github.com/microsoft/TypeScript/issues/34685 - var Workspace = {} ->Workspace : Symbol(Workspace, Decl(jsdocTypeReferenceToMergedClass.js, 2, 3), Decl(jsdocTypeReferenceToMergedClass.js, 5, 20), Decl(jsdocTypeReferenceToMergedClass.js, 7, 37)) +>Workspace : Symbol(Workspace, Decl(jsdocTypeReferenceToMergedClass.js, 0, 3), Decl(jsdocTypeReferenceToMergedClass.js, 3, 20), Decl(jsdocTypeReferenceToMergedClass.js, 5, 37)) /** @type {Workspace.Project} */ var p; ->p : Symbol(p, Decl(jsdocTypeReferenceToMergedClass.js, 4, 3)) +>p : Symbol(p, Decl(jsdocTypeReferenceToMergedClass.js, 2, 3)) p.isServiceProject() ->p.isServiceProject : Symbol(isServiceProject, Decl(jsdocTypeReferenceToMergedClass.js, 8, 31)) ->p : Symbol(p, Decl(jsdocTypeReferenceToMergedClass.js, 4, 3)) ->isServiceProject : Symbol(isServiceProject, Decl(jsdocTypeReferenceToMergedClass.js, 8, 31)) +>p.isServiceProject : Symbol(isServiceProject, Decl(jsdocTypeReferenceToMergedClass.js, 6, 31)) +>p : Symbol(p, Decl(jsdocTypeReferenceToMergedClass.js, 2, 3)) +>isServiceProject : Symbol(isServiceProject, Decl(jsdocTypeReferenceToMergedClass.js, 6, 31)) Workspace.Project = function wp() { } ->Workspace.Project : Symbol(Workspace.Project, Decl(jsdocTypeReferenceToMergedClass.js, 5, 20), Decl(jsdocTypeReferenceToMergedClass.js, 8, 10)) ->Workspace : Symbol(Workspace, Decl(jsdocTypeReferenceToMergedClass.js, 2, 3), Decl(jsdocTypeReferenceToMergedClass.js, 5, 20), Decl(jsdocTypeReferenceToMergedClass.js, 7, 37)) ->Project : Symbol(Workspace.Project, Decl(jsdocTypeReferenceToMergedClass.js, 5, 20), Decl(jsdocTypeReferenceToMergedClass.js, 8, 10)) ->wp : Symbol(wp, Decl(jsdocTypeReferenceToMergedClass.js, 7, 19)) +>Workspace.Project : Symbol(Workspace.Project, Decl(jsdocTypeReferenceToMergedClass.js, 3, 20), Decl(jsdocTypeReferenceToMergedClass.js, 6, 10)) +>Workspace : Symbol(Workspace, Decl(jsdocTypeReferenceToMergedClass.js, 0, 3), Decl(jsdocTypeReferenceToMergedClass.js, 3, 20), Decl(jsdocTypeReferenceToMergedClass.js, 5, 37)) +>Project : Symbol(Workspace.Project, Decl(jsdocTypeReferenceToMergedClass.js, 3, 20), Decl(jsdocTypeReferenceToMergedClass.js, 6, 10)) +>wp : Symbol(wp, Decl(jsdocTypeReferenceToMergedClass.js, 5, 19)) Workspace.Project.prototype = { ->Workspace.Project.prototype : Symbol(Workspace.Project.prototype, Decl(jsdocTypeReferenceToMergedClass.js, 7, 37)) ->Workspace.Project : Symbol(Workspace.Project, Decl(jsdocTypeReferenceToMergedClass.js, 5, 20), Decl(jsdocTypeReferenceToMergedClass.js, 8, 10)) ->Workspace : Symbol(Workspace, Decl(jsdocTypeReferenceToMergedClass.js, 2, 3), Decl(jsdocTypeReferenceToMergedClass.js, 5, 20), Decl(jsdocTypeReferenceToMergedClass.js, 7, 37)) ->Project : Symbol(Workspace.Project, Decl(jsdocTypeReferenceToMergedClass.js, 5, 20), Decl(jsdocTypeReferenceToMergedClass.js, 8, 10)) ->prototype : Symbol(Workspace.Project.prototype, Decl(jsdocTypeReferenceToMergedClass.js, 7, 37)) +>Workspace.Project.prototype : Symbol(Workspace.Project.prototype, Decl(jsdocTypeReferenceToMergedClass.js, 5, 37)) +>Workspace.Project : Symbol(Workspace.Project, Decl(jsdocTypeReferenceToMergedClass.js, 3, 20), Decl(jsdocTypeReferenceToMergedClass.js, 6, 10)) +>Workspace : Symbol(Workspace, Decl(jsdocTypeReferenceToMergedClass.js, 0, 3), Decl(jsdocTypeReferenceToMergedClass.js, 3, 20), Decl(jsdocTypeReferenceToMergedClass.js, 5, 37)) +>Project : Symbol(Workspace.Project, Decl(jsdocTypeReferenceToMergedClass.js, 3, 20), Decl(jsdocTypeReferenceToMergedClass.js, 6, 10)) +>prototype : Symbol(Workspace.Project.prototype, Decl(jsdocTypeReferenceToMergedClass.js, 5, 37)) isServiceProject() {} ->isServiceProject : Symbol(isServiceProject, Decl(jsdocTypeReferenceToMergedClass.js, 8, 31)) +>isServiceProject : Symbol(isServiceProject, Decl(jsdocTypeReferenceToMergedClass.js, 6, 31)) } diff --git a/tests/baselines/reference/jsdocTypeReferenceToMergedClass.types b/tests/baselines/reference/jsdocTypeReferenceToMergedClass.types index 8c2adeb219c..4fc84ccc903 100644 --- a/tests/baselines/reference/jsdocTypeReferenceToMergedClass.types +++ b/tests/baselines/reference/jsdocTypeReferenceToMergedClass.types @@ -1,8 +1,6 @@ //// [tests/cases/conformance/jsdoc/jsdocTypeReferenceToMergedClass.ts] //// === jsdocTypeReferenceToMergedClass.js === -// https://github.com/microsoft/TypeScript/issues/34685 - var Workspace = {} >Workspace : typeof Workspace >{} : {} diff --git a/tests/baselines/reference/libReferenceNoLib.js b/tests/baselines/reference/libReferenceNoLib.js index 35e682f1ad4..864756bd26f 100644 --- a/tests/baselines/reference/libReferenceNoLib.js +++ b/tests/baselines/reference/libReferenceNoLib.js @@ -1,8 +1,6 @@ //// [tests/cases/conformance/declarationEmit/libReferenceNoLib.ts] //// //// [fakelib.ts] -// Test that passing noLib disables resolution. - interface Object { } interface Array { } interface String { } @@ -20,7 +18,6 @@ export const elem: HTMLElement = { field: 'a' }; //// [fakelib.js] -// Test that passing noLib disables resolution. //// [file1.js] "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/libReferenceNoLib.symbols b/tests/baselines/reference/libReferenceNoLib.symbols index 3b57af2bd35..fc004596b52 100644 --- a/tests/baselines/reference/libReferenceNoLib.symbols +++ b/tests/baselines/reference/libReferenceNoLib.symbols @@ -1,32 +1,30 @@ //// [tests/cases/conformance/declarationEmit/libReferenceNoLib.ts] //// === fakelib.ts === -// Test that passing noLib disables resolution. - interface Object { } >Object : Symbol(Object, Decl(fakelib.ts, 0, 0)) interface Array { } ->Array : Symbol(Array, Decl(fakelib.ts, 2, 20)) ->T : Symbol(T, Decl(fakelib.ts, 3, 16)) +>Array : Symbol(Array, Decl(fakelib.ts, 0, 20)) +>T : Symbol(T, Decl(fakelib.ts, 1, 16)) interface String { } ->String : Symbol(String, Decl(fakelib.ts, 3, 22)) +>String : Symbol(String, Decl(fakelib.ts, 1, 22)) interface Boolean { } ->Boolean : Symbol(Boolean, Decl(fakelib.ts, 4, 20)) +>Boolean : Symbol(Boolean, Decl(fakelib.ts, 2, 20)) interface Number { } ->Number : Symbol(Number, Decl(fakelib.ts, 5, 21)) +>Number : Symbol(Number, Decl(fakelib.ts, 3, 21)) interface Function { } ->Function : Symbol(Function, Decl(fakelib.ts, 6, 20)) +>Function : Symbol(Function, Decl(fakelib.ts, 4, 20)) interface RegExp { } ->RegExp : Symbol(RegExp, Decl(fakelib.ts, 7, 22)) +>RegExp : Symbol(RegExp, Decl(fakelib.ts, 5, 22)) interface IArguments { } ->IArguments : Symbol(IArguments, Decl(fakelib.ts, 8, 20)) +>IArguments : Symbol(IArguments, Decl(fakelib.ts, 6, 20)) === file1.ts === diff --git a/tests/baselines/reference/libReferenceNoLib.types b/tests/baselines/reference/libReferenceNoLib.types index 1079ec01641..8ced9c2f3cb 100644 --- a/tests/baselines/reference/libReferenceNoLib.types +++ b/tests/baselines/reference/libReferenceNoLib.types @@ -2,8 +2,6 @@ === fakelib.ts === -// Test that passing noLib disables resolution. - interface Object { } interface Array { } interface String { } diff --git a/tests/baselines/reference/libReferenceNoLibBundle.js b/tests/baselines/reference/libReferenceNoLibBundle.js index 00aa696d8c6..2d80dad98a6 100644 --- a/tests/baselines/reference/libReferenceNoLibBundle.js +++ b/tests/baselines/reference/libReferenceNoLibBundle.js @@ -1,8 +1,6 @@ //// [tests/cases/conformance/declarationEmit/libReferenceNoLibBundle.ts] //// //// [fakelib.ts] -// Test that passing noLib disables resolution. - interface Object { } interface Array { } interface String { } @@ -20,7 +18,6 @@ export const elem: HTMLElement = { field: 'a' }; //// [bundle.js] -// Test that passing noLib disables resolution. define("file1", ["require", "exports"], function (require, exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/libReferenceNoLibBundle.symbols b/tests/baselines/reference/libReferenceNoLibBundle.symbols index c3696515a29..9a874575ec3 100644 --- a/tests/baselines/reference/libReferenceNoLibBundle.symbols +++ b/tests/baselines/reference/libReferenceNoLibBundle.symbols @@ -1,32 +1,30 @@ //// [tests/cases/conformance/declarationEmit/libReferenceNoLibBundle.ts] //// === fakelib.ts === -// Test that passing noLib disables resolution. - interface Object { } >Object : Symbol(Object, Decl(fakelib.ts, 0, 0)) interface Array { } ->Array : Symbol(Array, Decl(fakelib.ts, 2, 20)) ->T : Symbol(T, Decl(fakelib.ts, 3, 16)) +>Array : Symbol(Array, Decl(fakelib.ts, 0, 20)) +>T : Symbol(T, Decl(fakelib.ts, 1, 16)) interface String { } ->String : Symbol(String, Decl(fakelib.ts, 3, 22)) +>String : Symbol(String, Decl(fakelib.ts, 1, 22)) interface Boolean { } ->Boolean : Symbol(Boolean, Decl(fakelib.ts, 4, 20)) +>Boolean : Symbol(Boolean, Decl(fakelib.ts, 2, 20)) interface Number { } ->Number : Symbol(Number, Decl(fakelib.ts, 5, 21)) +>Number : Symbol(Number, Decl(fakelib.ts, 3, 21)) interface Function { } ->Function : Symbol(Function, Decl(fakelib.ts, 6, 20)) +>Function : Symbol(Function, Decl(fakelib.ts, 4, 20)) interface RegExp { } ->RegExp : Symbol(RegExp, Decl(fakelib.ts, 7, 22)) +>RegExp : Symbol(RegExp, Decl(fakelib.ts, 5, 22)) interface IArguments { } ->IArguments : Symbol(IArguments, Decl(fakelib.ts, 8, 20)) +>IArguments : Symbol(IArguments, Decl(fakelib.ts, 6, 20)) === file1.ts === diff --git a/tests/baselines/reference/libReferenceNoLibBundle.types b/tests/baselines/reference/libReferenceNoLibBundle.types index cf5a3b559de..f674fa60761 100644 --- a/tests/baselines/reference/libReferenceNoLibBundle.types +++ b/tests/baselines/reference/libReferenceNoLibBundle.types @@ -2,8 +2,6 @@ === fakelib.ts === -// Test that passing noLib disables resolution. - interface Object { } interface Array { } interface String { } diff --git a/tests/baselines/reference/library-reference-1.js b/tests/baselines/reference/library-reference-1.js index 2533b8ae79e..8688c1efac3 100644 --- a/tests/baselines/reference/library-reference-1.js +++ b/tests/baselines/reference/library-reference-1.js @@ -1,8 +1,6 @@ //// [tests/cases/conformance/references/library-reference-1.ts] //// //// [index.d.ts] -// We can find typings in the ./types folder - declare var $: { foo(): void }; diff --git a/tests/baselines/reference/library-reference-1.symbols b/tests/baselines/reference/library-reference-1.symbols index e6b4cdc3dcf..90c61303deb 100644 --- a/tests/baselines/reference/library-reference-1.symbols +++ b/tests/baselines/reference/library-reference-1.symbols @@ -3,15 +3,13 @@ === /src/consumer.ts === /// $.foo(); ->$.foo : Symbol(foo, Decl(index.d.ts, 2, 16)) ->$ : Symbol($, Decl(index.d.ts, 2, 11)) ->foo : Symbol(foo, Decl(index.d.ts, 2, 16)) +>$.foo : Symbol(foo, Decl(index.d.ts, 0, 16)) +>$ : Symbol($, Decl(index.d.ts, 0, 11)) +>foo : Symbol(foo, Decl(index.d.ts, 0, 16)) === /src/types/jquery/index.d.ts === -// We can find typings in the ./types folder - declare var $: { foo(): void }; ->$ : Symbol($, Decl(index.d.ts, 2, 11)) ->foo : Symbol(foo, Decl(index.d.ts, 2, 16)) +>$ : Symbol($, Decl(index.d.ts, 0, 11)) +>foo : Symbol(foo, Decl(index.d.ts, 0, 16)) diff --git a/tests/baselines/reference/library-reference-1.types b/tests/baselines/reference/library-reference-1.types index 4eef1a6f5c4..49ae6f7c8bf 100644 --- a/tests/baselines/reference/library-reference-1.types +++ b/tests/baselines/reference/library-reference-1.types @@ -9,8 +9,6 @@ $.foo(); >foo : () => void === /src/types/jquery/index.d.ts === -// We can find typings in the ./types folder - declare var $: { foo(): void }; >$ : { foo(): void; } >foo : () => void diff --git a/tests/baselines/reference/library-reference-10.js b/tests/baselines/reference/library-reference-10.js index f682c9ccc2f..bec97f1ca24 100644 --- a/tests/baselines/reference/library-reference-10.js +++ b/tests/baselines/reference/library-reference-10.js @@ -1,8 +1,6 @@ //// [tests/cases/conformance/references/library-reference-10.ts] //// //// [package.json] -// package.json in a primary reference can refer to another file - { "typings": "jquery.d.ts" } diff --git a/tests/baselines/reference/library-reference-11.js b/tests/baselines/reference/library-reference-11.js index e070f82805d..2184456b529 100644 --- a/tests/baselines/reference/library-reference-11.js +++ b/tests/baselines/reference/library-reference-11.js @@ -1,8 +1,6 @@ //// [tests/cases/conformance/references/library-reference-11.ts] //// //// [package.json] -// package.json in a secondary reference can refer to another file - { "typings": "jquery.d.ts" } diff --git a/tests/baselines/reference/library-reference-12.js b/tests/baselines/reference/library-reference-12.js index 77f5da776ce..76ef6cddad2 100644 --- a/tests/baselines/reference/library-reference-12.js +++ b/tests/baselines/reference/library-reference-12.js @@ -1,8 +1,6 @@ //// [tests/cases/conformance/references/library-reference-12.ts] //// //// [package.json] -// package.json in a secondary reference can refer to another file - { "types": "dist/jquery.d.ts" } diff --git a/tests/baselines/reference/library-reference-2.js b/tests/baselines/reference/library-reference-2.js index 311b928a5bd..8ccdd016e64 100644 --- a/tests/baselines/reference/library-reference-2.js +++ b/tests/baselines/reference/library-reference-2.js @@ -1,8 +1,6 @@ //// [tests/cases/conformance/references/library-reference-2.ts] //// //// [package.json] -// package.json in a primary reference can refer to another file - { "types": "jquery.d.ts" } diff --git a/tests/baselines/reference/library-reference-3.js b/tests/baselines/reference/library-reference-3.js index 687a3c8f8ac..bfee65a4a96 100644 --- a/tests/baselines/reference/library-reference-3.js +++ b/tests/baselines/reference/library-reference-3.js @@ -1,8 +1,6 @@ //// [tests/cases/conformance/references/library-reference-3.ts] //// //// [index.d.ts] -// Secondary references are possible - declare var $: { foo(): void }; //// [consumer.ts] diff --git a/tests/baselines/reference/library-reference-3.symbols b/tests/baselines/reference/library-reference-3.symbols index ba89b2a8bff..9f5f2fa367a 100644 --- a/tests/baselines/reference/library-reference-3.symbols +++ b/tests/baselines/reference/library-reference-3.symbols @@ -3,14 +3,12 @@ === /src/consumer.ts === /// $.foo(); ->$.foo : Symbol(foo, Decl(index.d.ts, 2, 16)) ->$ : Symbol($, Decl(index.d.ts, 2, 11)) ->foo : Symbol(foo, Decl(index.d.ts, 2, 16)) +>$.foo : Symbol(foo, Decl(index.d.ts, 0, 16)) +>$ : Symbol($, Decl(index.d.ts, 0, 11)) +>foo : Symbol(foo, Decl(index.d.ts, 0, 16)) === /src/node_modules/jquery/index.d.ts === -// Secondary references are possible - declare var $: { foo(): void }; ->$ : Symbol($, Decl(index.d.ts, 2, 11)) ->foo : Symbol(foo, Decl(index.d.ts, 2, 16)) +>$ : Symbol($, Decl(index.d.ts, 0, 11)) +>foo : Symbol(foo, Decl(index.d.ts, 0, 16)) diff --git a/tests/baselines/reference/library-reference-3.types b/tests/baselines/reference/library-reference-3.types index 34c9d5c322d..462d5d4f487 100644 --- a/tests/baselines/reference/library-reference-3.types +++ b/tests/baselines/reference/library-reference-3.types @@ -9,8 +9,6 @@ $.foo(); >foo : () => void === /src/node_modules/jquery/index.d.ts === -// Secondary references are possible - declare var $: { foo(): void }; >$ : { foo(): void; } >foo : () => void diff --git a/tests/baselines/reference/library-reference-4.js b/tests/baselines/reference/library-reference-4.js index e4f4bf4996a..88aff2a6893 100644 --- a/tests/baselines/reference/library-reference-4.js +++ b/tests/baselines/reference/library-reference-4.js @@ -1,8 +1,6 @@ //// [tests/cases/conformance/references/library-reference-4.ts] //// //// [index.d.ts] -// Secondary references may be duplicated if they agree in content - /// declare var foo: any; diff --git a/tests/baselines/reference/library-reference-4.symbols b/tests/baselines/reference/library-reference-4.symbols index f3800db776e..e89538c7fef 100644 --- a/tests/baselines/reference/library-reference-4.symbols +++ b/tests/baselines/reference/library-reference-4.symbols @@ -6,11 +6,9 @@ /// === /node_modules/foo/index.d.ts === -// Secondary references may be duplicated if they agree in content - /// declare var foo: any; ->foo : Symbol(foo, Decl(index.d.ts, 3, 11)) +>foo : Symbol(foo, Decl(index.d.ts, 1, 11)) === /node_modules/foo/node_modules/alpha/index.d.ts === declare var alpha: any; diff --git a/tests/baselines/reference/library-reference-4.types b/tests/baselines/reference/library-reference-4.types index a20da92ee9a..464d152abd8 100644 --- a/tests/baselines/reference/library-reference-4.types +++ b/tests/baselines/reference/library-reference-4.types @@ -6,8 +6,6 @@ /// === /node_modules/foo/index.d.ts === -// Secondary references may be duplicated if they agree in content - /// declare var foo: any; >foo : any diff --git a/tests/baselines/reference/library-reference-5.errors.txt b/tests/baselines/reference/library-reference-5.errors.txt index 04e4953704a..b6f9feb1082 100644 --- a/tests/baselines/reference/library-reference-5.errors.txt +++ b/tests/baselines/reference/library-reference-5.errors.txt @@ -9,8 +9,6 @@ /// ==== /node_modules/foo/index.d.ts (0 errors) ==== - // Secondary references may not be duplicated if they disagree in content - /// declare var foo: any; @@ -24,7 +22,7 @@ !!! error TS4090: The file is in the program because: !!! error TS4090: Type library referenced via 'alpha' from file '/node_modules/foo/index.d.ts' !!! error TS4090: Type library referenced via 'alpha' from file '/node_modules/bar/index.d.ts' -!!! related TS1404 /node_modules/foo/index.d.ts:3:23: File is included via type library reference here. +!!! related TS1404 /node_modules/foo/index.d.ts:1:23: File is included via type library reference here. declare var bar: any; ==== /node_modules/bar/node_modules/alpha/index.d.ts (0 errors) ==== diff --git a/tests/baselines/reference/library-reference-5.js b/tests/baselines/reference/library-reference-5.js index 0f39b31300f..84ec3adabf0 100644 --- a/tests/baselines/reference/library-reference-5.js +++ b/tests/baselines/reference/library-reference-5.js @@ -1,8 +1,6 @@ //// [tests/cases/conformance/references/library-reference-5.ts] //// //// [index.d.ts] -// Secondary references may not be duplicated if they disagree in content - /// declare var foo: any; diff --git a/tests/baselines/reference/library-reference-5.symbols b/tests/baselines/reference/library-reference-5.symbols index 493af373af1..0ff754a955b 100644 --- a/tests/baselines/reference/library-reference-5.symbols +++ b/tests/baselines/reference/library-reference-5.symbols @@ -6,11 +6,9 @@ /// === /node_modules/foo/index.d.ts === -// Secondary references may not be duplicated if they disagree in content - /// declare var foo: any; ->foo : Symbol(foo, Decl(index.d.ts, 3, 11)) +>foo : Symbol(foo, Decl(index.d.ts, 1, 11)) === /node_modules/foo/node_modules/alpha/index.d.ts === declare var alpha: any; diff --git a/tests/baselines/reference/library-reference-5.types b/tests/baselines/reference/library-reference-5.types index a5b8ac71eb2..760f06ecaec 100644 --- a/tests/baselines/reference/library-reference-5.types +++ b/tests/baselines/reference/library-reference-5.types @@ -6,8 +6,6 @@ /// === /node_modules/foo/index.d.ts === -// Secondary references may not be duplicated if they disagree in content - /// declare var foo: any; >foo : any diff --git a/tests/baselines/reference/library-reference-6.js b/tests/baselines/reference/library-reference-6.js index af364b31c4e..fafbea78d39 100644 --- a/tests/baselines/reference/library-reference-6.js +++ b/tests/baselines/reference/library-reference-6.js @@ -1,8 +1,6 @@ //// [tests/cases/conformance/references/library-reference-6.ts] //// //// [index.d.ts] -// The primary lookup folder is relative to tsconfig.json, if present - declare var alpha: { a: string }; //// [foo.ts] diff --git a/tests/baselines/reference/library-reference-6.symbols b/tests/baselines/reference/library-reference-6.symbols index 57ce1948406..4749b419bb7 100644 --- a/tests/baselines/reference/library-reference-6.symbols +++ b/tests/baselines/reference/library-reference-6.symbols @@ -4,14 +4,12 @@ /// var x: string = alpha.a; >x : Symbol(x, Decl(foo.ts, 1, 3)) ->alpha.a : Symbol(a, Decl(index.d.ts, 2, 20)) ->alpha : Symbol(alpha, Decl(index.d.ts, 2, 11)) ->a : Symbol(a, Decl(index.d.ts, 2, 20)) +>alpha.a : Symbol(a, Decl(index.d.ts, 0, 20)) +>alpha : Symbol(alpha, Decl(index.d.ts, 0, 11)) +>a : Symbol(a, Decl(index.d.ts, 0, 20)) === /node_modules/@types/alpha/index.d.ts === -// The primary lookup folder is relative to tsconfig.json, if present - declare var alpha: { a: string }; ->alpha : Symbol(alpha, Decl(index.d.ts, 2, 11)) ->a : Symbol(a, Decl(index.d.ts, 2, 20)) +>alpha : Symbol(alpha, Decl(index.d.ts, 0, 11)) +>a : Symbol(a, Decl(index.d.ts, 0, 20)) diff --git a/tests/baselines/reference/library-reference-6.types b/tests/baselines/reference/library-reference-6.types index 9957fa21232..ff460f048e0 100644 --- a/tests/baselines/reference/library-reference-6.types +++ b/tests/baselines/reference/library-reference-6.types @@ -9,8 +9,6 @@ var x: string = alpha.a; >a : string === /node_modules/@types/alpha/index.d.ts === -// The primary lookup folder is relative to tsconfig.json, if present - declare var alpha: { a: string }; >alpha : { a: string; } >a : string diff --git a/tests/baselines/reference/library-reference-7.js b/tests/baselines/reference/library-reference-7.js index dddd8fcc8cc..d026a459453 100644 --- a/tests/baselines/reference/library-reference-7.js +++ b/tests/baselines/reference/library-reference-7.js @@ -1,8 +1,6 @@ //// [tests/cases/conformance/references/library-reference-7.ts] //// //// [index.d.ts] -// Secondary references are possible - declare var $: { foo(): void }; //// [consumer.ts] diff --git a/tests/baselines/reference/library-reference-7.symbols b/tests/baselines/reference/library-reference-7.symbols index 607de59abba..b265d0d9e28 100644 --- a/tests/baselines/reference/library-reference-7.symbols +++ b/tests/baselines/reference/library-reference-7.symbols @@ -3,14 +3,12 @@ === /src/consumer.ts === /// $.foo(); ->$.foo : Symbol(foo, Decl(index.d.ts, 2, 16)) ->$ : Symbol($, Decl(index.d.ts, 2, 11)) ->foo : Symbol(foo, Decl(index.d.ts, 2, 16)) +>$.foo : Symbol(foo, Decl(index.d.ts, 0, 16)) +>$ : Symbol($, Decl(index.d.ts, 0, 11)) +>foo : Symbol(foo, Decl(index.d.ts, 0, 16)) === /src/node_modules/jquery/index.d.ts === -// Secondary references are possible - declare var $: { foo(): void }; ->$ : Symbol($, Decl(index.d.ts, 2, 11)) ->foo : Symbol(foo, Decl(index.d.ts, 2, 16)) +>$ : Symbol($, Decl(index.d.ts, 0, 11)) +>foo : Symbol(foo, Decl(index.d.ts, 0, 16)) diff --git a/tests/baselines/reference/library-reference-7.types b/tests/baselines/reference/library-reference-7.types index 7a13b805b95..22979ca8fd7 100644 --- a/tests/baselines/reference/library-reference-7.types +++ b/tests/baselines/reference/library-reference-7.types @@ -9,8 +9,6 @@ $.foo(); >foo : () => void === /src/node_modules/jquery/index.d.ts === -// Secondary references are possible - declare var $: { foo(): void }; >$ : { foo(): void; } >foo : () => void diff --git a/tests/baselines/reference/library-reference-8.js b/tests/baselines/reference/library-reference-8.js index 02a7c3da83c..eec812780e6 100644 --- a/tests/baselines/reference/library-reference-8.js +++ b/tests/baselines/reference/library-reference-8.js @@ -1,8 +1,6 @@ //// [tests/cases/conformance/references/library-reference-8.ts] //// //// [index.d.ts] -// Don't crash in circular library reference situations - /// declare var alpha: { a: string }; diff --git a/tests/baselines/reference/library-reference-8.symbols b/tests/baselines/reference/library-reference-8.symbols index 5b623e79f51..dd0c838f774 100644 --- a/tests/baselines/reference/library-reference-8.symbols +++ b/tests/baselines/reference/library-reference-8.symbols @@ -5,21 +5,19 @@ /// var x: string = alpha.a + beta.b; >x : Symbol(x, Decl(foo.ts, 2, 3)) ->alpha.a : Symbol(a, Decl(index.d.ts, 3, 20)) ->alpha : Symbol(alpha, Decl(index.d.ts, 3, 11)) ->a : Symbol(a, Decl(index.d.ts, 3, 20)) +>alpha.a : Symbol(a, Decl(index.d.ts, 1, 20)) +>alpha : Symbol(alpha, Decl(index.d.ts, 1, 11)) +>a : Symbol(a, Decl(index.d.ts, 1, 20)) >beta.b : Symbol(b, Decl(index.d.ts, 1, 19)) >beta : Symbol(beta, Decl(index.d.ts, 1, 11)) >b : Symbol(b, Decl(index.d.ts, 1, 19)) === /test/types/alpha/index.d.ts === -// Don't crash in circular library reference situations - /// declare var alpha: { a: string }; ->alpha : Symbol(alpha, Decl(index.d.ts, 3, 11)) ->a : Symbol(a, Decl(index.d.ts, 3, 20)) +>alpha : Symbol(alpha, Decl(index.d.ts, 1, 11)) +>a : Symbol(a, Decl(index.d.ts, 1, 20)) === /test/types/beta/index.d.ts === /// diff --git a/tests/baselines/reference/library-reference-8.types b/tests/baselines/reference/library-reference-8.types index 43e072ad127..254c24d81f8 100644 --- a/tests/baselines/reference/library-reference-8.types +++ b/tests/baselines/reference/library-reference-8.types @@ -15,8 +15,6 @@ var x: string = alpha.a + beta.b; === /test/types/alpha/index.d.ts === -// Don't crash in circular library reference situations - /// declare var alpha: { a: string }; >alpha : { a: string; } diff --git a/tests/baselines/reference/moduleResolutionNoTsCJS.errors.txt b/tests/baselines/reference/moduleResolutionNoTsCJS.errors.txt index 660a7795003..16de5545b2a 100644 --- a/tests/baselines/reference/moduleResolutionNoTsCJS.errors.txt +++ b/tests/baselines/reference/moduleResolutionNoTsCJS.errors.txt @@ -4,8 +4,6 @@ user.ts(3,15): error TS2846: A declaration file cannot be imported without 'impo ==== x.ts (0 errors) ==== - // CommonJS output - export default 0; ==== y.tsx (0 errors) ==== diff --git a/tests/baselines/reference/moduleResolutionNoTsCJS.js b/tests/baselines/reference/moduleResolutionNoTsCJS.js index 4e23e670327..1609bc6858d 100644 --- a/tests/baselines/reference/moduleResolutionNoTsCJS.js +++ b/tests/baselines/reference/moduleResolutionNoTsCJS.js @@ -1,8 +1,6 @@ //// [tests/cases/compiler/moduleResolutionNoTsCJS.ts] //// //// [x.ts] -// CommonJS output - export default 0; //// [y.tsx] @@ -25,7 +23,6 @@ import z2 from "./z"; //// [x.js] "use strict"; -// CommonJS output Object.defineProperty(exports, "__esModule", { value: true }); exports.default = 0; //// [y.jsx] diff --git a/tests/baselines/reference/moduleResolutionNoTsCJS.symbols b/tests/baselines/reference/moduleResolutionNoTsCJS.symbols index 7136caba986..6af3e265f05 100644 --- a/tests/baselines/reference/moduleResolutionNoTsCJS.symbols +++ b/tests/baselines/reference/moduleResolutionNoTsCJS.symbols @@ -2,8 +2,6 @@ === x.ts === -// CommonJS output - export default 0; === y.tsx === diff --git a/tests/baselines/reference/moduleResolutionNoTsCJS.types b/tests/baselines/reference/moduleResolutionNoTsCJS.types index 2c8250d3f0d..37e7598ed4b 100644 --- a/tests/baselines/reference/moduleResolutionNoTsCJS.types +++ b/tests/baselines/reference/moduleResolutionNoTsCJS.types @@ -2,8 +2,6 @@ === x.ts === -// CommonJS output - export default 0; === y.tsx === diff --git a/tests/baselines/reference/moduleResolutionNoTsESM.errors.txt b/tests/baselines/reference/moduleResolutionNoTsESM.errors.txt index 3f8e9576f6d..ff42e6bbd2b 100644 --- a/tests/baselines/reference/moduleResolutionNoTsESM.errors.txt +++ b/tests/baselines/reference/moduleResolutionNoTsESM.errors.txt @@ -4,8 +4,6 @@ user.ts(3,15): error TS2846: A declaration file cannot be imported without 'impo ==== x.ts (0 errors) ==== - // ESM output - export default 0; ==== y.tsx (0 errors) ==== diff --git a/tests/baselines/reference/moduleResolutionNoTsESM.js b/tests/baselines/reference/moduleResolutionNoTsESM.js index 69c33d3faa3..247bd091f1e 100644 --- a/tests/baselines/reference/moduleResolutionNoTsESM.js +++ b/tests/baselines/reference/moduleResolutionNoTsESM.js @@ -1,8 +1,6 @@ //// [tests/cases/compiler/moduleResolutionNoTsESM.ts] //// //// [x.ts] -// ESM output - export default 0; //// [y.tsx] @@ -24,7 +22,6 @@ import z2 from "./z"; //// [x.js] -// ESM output export default 0; //// [y.jsx] export default 0; diff --git a/tests/baselines/reference/moduleResolutionNoTsESM.symbols b/tests/baselines/reference/moduleResolutionNoTsESM.symbols index f2908beb760..1c5a27b1152 100644 --- a/tests/baselines/reference/moduleResolutionNoTsESM.symbols +++ b/tests/baselines/reference/moduleResolutionNoTsESM.symbols @@ -2,8 +2,6 @@ === x.ts === -// ESM output - export default 0; === y.tsx === diff --git a/tests/baselines/reference/moduleResolutionNoTsESM.types b/tests/baselines/reference/moduleResolutionNoTsESM.types index 7fe6314d6ad..a9806dfd877 100644 --- a/tests/baselines/reference/moduleResolutionNoTsESM.types +++ b/tests/baselines/reference/moduleResolutionNoTsESM.types @@ -2,8 +2,6 @@ === x.ts === -// ESM output - export default 0; === y.tsx === diff --git a/tests/baselines/reference/moduleResolutionWithExtensions_notSupported2.errors.txt b/tests/baselines/reference/moduleResolutionWithExtensions_notSupported2.errors.txt index bb8a0664ed6..d37beb38a1d 100644 --- a/tests/baselines/reference/moduleResolutionWithExtensions_notSupported2.errors.txt +++ b/tests/baselines/reference/moduleResolutionWithExtensions_notSupported2.errors.txt @@ -7,6 +7,4 @@ !!! error TS6142: Module './jsx' was resolved to '/jsx.jsx', but '--jsx' is not set. ==== /jsx.jsx (0 errors) ==== - // Test the error message if we have `--allowJs` but not `--jsx`. - \ No newline at end of file diff --git a/tests/baselines/reference/moduleResolutionWithExtensions_notSupported2.js b/tests/baselines/reference/moduleResolutionWithExtensions_notSupported2.js index dd21c612c58..df9c726924a 100644 --- a/tests/baselines/reference/moduleResolutionWithExtensions_notSupported2.js +++ b/tests/baselines/reference/moduleResolutionWithExtensions_notSupported2.js @@ -1,8 +1,6 @@ //// [tests/cases/compiler/moduleResolutionWithExtensions_notSupported2.ts] //// //// [jsx.jsx] -// Test the error message if we have `--allowJs` but not `--jsx`. - //// [a.ts] import jsx from "./jsx"; diff --git a/tests/baselines/reference/moduleResolutionWithExtensions_notSupported3.js b/tests/baselines/reference/moduleResolutionWithExtensions_notSupported3.js index 24cdd1ff35e..56b68ea914d 100644 --- a/tests/baselines/reference/moduleResolutionWithExtensions_notSupported3.js +++ b/tests/baselines/reference/moduleResolutionWithExtensions_notSupported3.js @@ -1,8 +1,6 @@ //// [tests/cases/compiler/moduleResolutionWithExtensions_notSupported3.ts] //// //// [jsx.jsx] -// If we have "--jsx" set and not "--allowJs", it's an implicit-any module. - //// [a.ts] import jsx from "./jsx"; diff --git a/tests/baselines/reference/moduleResolutionWithExtensions_unexpected.js b/tests/baselines/reference/moduleResolutionWithExtensions_unexpected.js index 32f60532acc..5c346e675e4 100644 --- a/tests/baselines/reference/moduleResolutionWithExtensions_unexpected.js +++ b/tests/baselines/reference/moduleResolutionWithExtensions_unexpected.js @@ -1,8 +1,6 @@ //// [tests/cases/compiler/moduleResolutionWithExtensions_unexpected.ts] //// //// [normalize.css] -// This tests that a package.json "main" with an unexpected extension is ignored. - This file is not read. //// [package.json] diff --git a/tests/baselines/reference/moduleResolutionWithExtensions_unexpected2.js b/tests/baselines/reference/moduleResolutionWithExtensions_unexpected2.js index a9cb92ee08b..68f39a5e430 100644 --- a/tests/baselines/reference/moduleResolutionWithExtensions_unexpected2.js +++ b/tests/baselines/reference/moduleResolutionWithExtensions_unexpected2.js @@ -1,8 +1,6 @@ //// [tests/cases/compiler/moduleResolutionWithExtensions_unexpected2.ts] //// //// [foo.js] -// This tests that a package.json "types" with an unexpected extension is ignored. - This file is not read. //// [package.json] diff --git a/tests/baselines/reference/moduleResolutionWithExtensions_withAmbientPresent.js b/tests/baselines/reference/moduleResolutionWithExtensions_withAmbientPresent.js index fe554a0aebd..1606929227c 100644 --- a/tests/baselines/reference/moduleResolutionWithExtensions_withAmbientPresent.js +++ b/tests/baselines/reference/moduleResolutionWithExtensions_withAmbientPresent.js @@ -1,8 +1,6 @@ //// [tests/cases/compiler/moduleResolutionWithExtensions_withAmbientPresent.ts] //// //// [index.js] -// Allowjs is false, but this should *not* warn about the unused 'index.js' - //// [declarations.d.ts] declare module "js" { diff --git a/tests/baselines/reference/moduleResolutionWithSuffixes_oneNotFound.errors.txt b/tests/baselines/reference/moduleResolutionWithSuffixes_oneNotFound.errors.txt index c1d547209ae..92a8d1f8ac5 100644 --- a/tests/baselines/reference/moduleResolutionWithSuffixes_oneNotFound.errors.txt +++ b/tests/baselines/reference/moduleResolutionWithSuffixes_oneNotFound.errors.txt @@ -2,8 +2,6 @@ ==== /tsconfig.json (0 errors) ==== - // moduleSuffixes has one entry but there isn't a matching file. Module resolution should fail. - { "compilerOptions": { "moduleResolution": "node", diff --git a/tests/baselines/reference/moduleResolutionWithSuffixes_threeLastIsBlank4.errors.txt b/tests/baselines/reference/moduleResolutionWithSuffixes_threeLastIsBlank4.errors.txt index 2b049530aa4..0a329aac3fe 100644 --- a/tests/baselines/reference/moduleResolutionWithSuffixes_threeLastIsBlank4.errors.txt +++ b/tests/baselines/reference/moduleResolutionWithSuffixes_threeLastIsBlank4.errors.txt @@ -2,8 +2,6 @@ ==== /tsconfig.json (0 errors) ==== - // moduleSuffixes has three entries, and the last one is blank. Module resolution should fail. - { "compilerOptions": { "moduleResolution": "node", diff --git a/tests/baselines/reference/moduleResolutionWithSymlinks.js b/tests/baselines/reference/moduleResolutionWithSymlinks.js index 9d55f81d371..ee5ed5eda1d 100644 --- a/tests/baselines/reference/moduleResolutionWithSymlinks.js +++ b/tests/baselines/reference/moduleResolutionWithSymlinks.js @@ -1,9 +1,6 @@ //// [tests/cases/compiler/moduleResolutionWithSymlinks.ts] //// //// [index.ts] -// When symlinked files are in node_modules, they are resolved with realpath; -// so a linked file does not create a duplicate SourceFile of the real one. - export class MyClass { private x: number; } //// [index.ts] @@ -41,8 +38,6 @@ tsc app.ts # Should write to library-a/index.js, library-b/index.js, and app.js //// [/src/library-a/index.js] "use strict"; -// When symlinked files are in node_modules, they are resolved with realpath; -// so a linked file does not create a duplicate SourceFile of the real one. Object.defineProperty(exports, "__esModule", { value: true }); exports.MyClass = void 0; var MyClass = /** @class */ (function () { diff --git a/tests/baselines/reference/moduleResolutionWithSymlinks.symbols b/tests/baselines/reference/moduleResolutionWithSymlinks.symbols index 0c251efcc64..c9d8dcd711c 100644 --- a/tests/baselines/reference/moduleResolutionWithSymlinks.symbols +++ b/tests/baselines/reference/moduleResolutionWithSymlinks.symbols @@ -43,12 +43,9 @@ tsc app.ts # Should write to library-a/index.js, library-b/index.js, and app.js */ === /src/library-a/index.ts === -// When symlinked files are in node_modules, they are resolved with realpath; -// so a linked file does not create a duplicate SourceFile of the real one. - export class MyClass { private x: number; } >MyClass : Symbol(MyClass, Decl(index.ts, 0, 0)) ->x : Symbol(MyClass.x, Decl(index.ts, 3, 22)) +>x : Symbol(MyClass.x, Decl(index.ts, 0, 22)) === /src/library-b/index.ts === import {MyClass} from "library-a"; diff --git a/tests/baselines/reference/moduleResolutionWithSymlinks.types b/tests/baselines/reference/moduleResolutionWithSymlinks.types index d1bb4c215d7..9ec9438ecfd 100644 --- a/tests/baselines/reference/moduleResolutionWithSymlinks.types +++ b/tests/baselines/reference/moduleResolutionWithSymlinks.types @@ -43,9 +43,6 @@ tsc app.ts # Should write to library-a/index.js, library-b/index.js, and app.js */ === /src/library-a/index.ts === -// When symlinked files are in node_modules, they are resolved with realpath; -// so a linked file does not create a duplicate SourceFile of the real one. - export class MyClass { private x: number; } >MyClass : MyClass >x : number diff --git a/tests/baselines/reference/moduleResolutionWithSymlinks_notInNodeModules.js b/tests/baselines/reference/moduleResolutionWithSymlinks_notInNodeModules.js index 2e71880c462..7e8f100dd52 100644 --- a/tests/baselines/reference/moduleResolutionWithSymlinks_notInNodeModules.js +++ b/tests/baselines/reference/moduleResolutionWithSymlinks_notInNodeModules.js @@ -1,10 +1,6 @@ //// [tests/cases/compiler/moduleResolutionWithSymlinks_notInNodeModules.ts] //// //// [abc.ts] -// When symlinked files are not in node_modules, realpath is not used. -// A symlink file acts like the real thing. So, 2 symlinks act like 2 different files. -// See GH#10364. - export const x = 0; //// [app.ts] @@ -15,17 +11,11 @@ x + x2; //// [/src/bin/shared/abc.js] "use strict"; -// When symlinked files are not in node_modules, realpath is not used. -// A symlink file acts like the real thing. So, 2 symlinks act like 2 different files. -// See GH#10364. Object.defineProperty(exports, "__esModule", { value: true }); exports.x = void 0; exports.x = 0; //// [/src/bin/shared2/abc.js] "use strict"; -// When symlinked files are not in node_modules, realpath is not used. -// A symlink file acts like the real thing. So, 2 symlinks act like 2 different files. -// See GH#10364. Object.defineProperty(exports, "__esModule", { value: true }); exports.x = void 0; exports.x = 0; diff --git a/tests/baselines/reference/moduleResolutionWithSymlinks_notInNodeModules.symbols b/tests/baselines/reference/moduleResolutionWithSymlinks_notInNodeModules.symbols index c7c8301020c..9eaa0087f64 100644 --- a/tests/baselines/reference/moduleResolutionWithSymlinks_notInNodeModules.symbols +++ b/tests/baselines/reference/moduleResolutionWithSymlinks_notInNodeModules.symbols @@ -5,7 +5,7 @@ import { x } from "./shared/abc"; >x : Symbol(x, Decl(app.ts, 0, 8)) import { x as x2 } from "./shared2/abc"; ->x : Symbol(x2, Decl(abc.ts, 4, 12)) +>x : Symbol(x2, Decl(abc.ts, 0, 12)) >x2 : Symbol(x2, Decl(app.ts, 1, 8)) x + x2; diff --git a/tests/baselines/reference/moduleResolutionWithSymlinks_referenceTypes.js b/tests/baselines/reference/moduleResolutionWithSymlinks_referenceTypes.js index d04dfe0d8a8..bf755322fb8 100644 --- a/tests/baselines/reference/moduleResolutionWithSymlinks_referenceTypes.js +++ b/tests/baselines/reference/moduleResolutionWithSymlinks_referenceTypes.js @@ -1,12 +1,6 @@ //// [tests/cases/compiler/moduleResolutionWithSymlinks_referenceTypes.ts] //// //// [index.d.ts] -// Symlinks are always resolved for type reference directives. -// NOTE: This test would still compile without errors even if they were not, -// because `processTypeReferenceDirective` also checks for textual equivalence of file contents. -// But the `moduleResolutionWithSymlinks_referenceTypes.trace.json` shows the difference. - - declare class MyClass { private x: number; } //// [index.d.ts] diff --git a/tests/baselines/reference/moduleResolutionWithSymlinks_referenceTypes.symbols b/tests/baselines/reference/moduleResolutionWithSymlinks_referenceTypes.symbols index 80e521dc4d5..b326d2531ae 100644 --- a/tests/baselines/reference/moduleResolutionWithSymlinks_referenceTypes.symbols +++ b/tests/baselines/reference/moduleResolutionWithSymlinks_referenceTypes.symbols @@ -6,15 +6,9 @@ /// === /node_modules/@types/library-a/index.d.ts === -// Symlinks are always resolved for type reference directives. -// NOTE: This test would still compile without errors even if they were not, -// because `processTypeReferenceDirective` also checks for textual equivalence of file contents. -// But the `moduleResolutionWithSymlinks_referenceTypes.trace.json` shows the difference. - - declare class MyClass { private x: number; } >MyClass : Symbol(MyClass, Decl(index.d.ts, 0, 0)) ->x : Symbol(MyClass.x, Decl(index.d.ts, 6, 23)) +>x : Symbol(MyClass.x, Decl(index.d.ts, 0, 23)) === /node_modules/@types/library-b/index.d.ts === diff --git a/tests/baselines/reference/moduleResolutionWithSymlinks_referenceTypes.types b/tests/baselines/reference/moduleResolutionWithSymlinks_referenceTypes.types index f4676173e3e..8811da48013 100644 --- a/tests/baselines/reference/moduleResolutionWithSymlinks_referenceTypes.types +++ b/tests/baselines/reference/moduleResolutionWithSymlinks_referenceTypes.types @@ -6,12 +6,6 @@ /// === /node_modules/@types/library-a/index.d.ts === -// Symlinks are always resolved for type reference directives. -// NOTE: This test would still compile without errors even if they were not, -// because `processTypeReferenceDirective` also checks for textual equivalence of file contents. -// But the `moduleResolutionWithSymlinks_referenceTypes.trace.json` shows the difference. - - declare class MyClass { private x: number; } >MyClass : MyClass >x : number diff --git a/tests/baselines/reference/moduleResolutionWithSymlinks_withOutDir.js b/tests/baselines/reference/moduleResolutionWithSymlinks_withOutDir.js index 52a0083150d..d5e5621026f 100644 --- a/tests/baselines/reference/moduleResolutionWithSymlinks_withOutDir.js +++ b/tests/baselines/reference/moduleResolutionWithSymlinks_withOutDir.js @@ -1,8 +1,6 @@ //// [tests/cases/compiler/moduleResolutionWithSymlinks_withOutDir.ts] //// //// [index.ts] -// Same as moduleResolutionWithSymlinks.ts, but with outDir - export class MyClass { private x: number; } //// [index.ts] @@ -21,7 +19,6 @@ y = x; //// [/src/bin/library-a/index.js] "use strict"; -// Same as moduleResolutionWithSymlinks.ts, but with outDir Object.defineProperty(exports, "__esModule", { value: true }); exports.MyClass = void 0; var MyClass = /** @class */ (function () { diff --git a/tests/baselines/reference/moduleResolutionWithSymlinks_withOutDir.symbols b/tests/baselines/reference/moduleResolutionWithSymlinks_withOutDir.symbols index f098733d1a4..bd887b6caa2 100644 --- a/tests/baselines/reference/moduleResolutionWithSymlinks_withOutDir.symbols +++ b/tests/baselines/reference/moduleResolutionWithSymlinks_withOutDir.symbols @@ -24,11 +24,9 @@ y = x; >x : Symbol(x, Decl(app.ts, 3, 3)) === /src/library-a/index.ts === -// Same as moduleResolutionWithSymlinks.ts, but with outDir - export class MyClass { private x: number; } >MyClass : Symbol(MyClass, Decl(index.ts, 0, 0)) ->x : Symbol(MyClass.x, Decl(index.ts, 2, 22)) +>x : Symbol(MyClass.x, Decl(index.ts, 0, 22)) === /src/library-b/index.ts === import {MyClass} from "library-a"; diff --git a/tests/baselines/reference/moduleResolutionWithSymlinks_withOutDir.types b/tests/baselines/reference/moduleResolutionWithSymlinks_withOutDir.types index 4df417974f9..52a174bc852 100644 --- a/tests/baselines/reference/moduleResolutionWithSymlinks_withOutDir.types +++ b/tests/baselines/reference/moduleResolutionWithSymlinks_withOutDir.types @@ -24,8 +24,6 @@ y = x; >x : MyClass === /src/library-a/index.ts === -// Same as moduleResolutionWithSymlinks.ts, but with outDir - export class MyClass { private x: number; } >MyClass : MyClass >x : number diff --git a/tests/baselines/reference/moduleResolution_packageJson_notAtPackageRoot.js b/tests/baselines/reference/moduleResolution_packageJson_notAtPackageRoot.js index 355e775f461..5cdb194da1c 100644 --- a/tests/baselines/reference/moduleResolution_packageJson_notAtPackageRoot.js +++ b/tests/baselines/reference/moduleResolution_packageJson_notAtPackageRoot.js @@ -1,8 +1,6 @@ //// [tests/cases/compiler/moduleResolution_packageJson_notAtPackageRoot.ts] //// //// [package.json] -// Loads from a "fake" nested package.json, not from the one at the root. - { "types": "types.d.ts" } //// [package.json] diff --git a/tests/baselines/reference/moduleResolution_packageJson_notAtPackageRoot_fakeScopedPackage.js b/tests/baselines/reference/moduleResolution_packageJson_notAtPackageRoot_fakeScopedPackage.js index 003dd64662c..7e5edb40965 100644 --- a/tests/baselines/reference/moduleResolution_packageJson_notAtPackageRoot_fakeScopedPackage.js +++ b/tests/baselines/reference/moduleResolution_packageJson_notAtPackageRoot_fakeScopedPackage.js @@ -1,8 +1,6 @@ //// [tests/cases/compiler/moduleResolution_packageJson_notAtPackageRoot_fakeScopedPackage.ts] //// //// [package.json] -// Copy of `moduleResolution_packageJson_notAtPackageRoot` with `foo/@bar` instead of `foo/bar`. Should behave identically. - { "types": "types.d.ts" } //// [package.json] diff --git a/tests/baselines/reference/moduleResolution_packageJson_yesAtPackageRoot_fakeScopedPackage.js b/tests/baselines/reference/moduleResolution_packageJson_yesAtPackageRoot_fakeScopedPackage.js index 29c29dcac5c..cfa19019d98 100644 --- a/tests/baselines/reference/moduleResolution_packageJson_yesAtPackageRoot_fakeScopedPackage.js +++ b/tests/baselines/reference/moduleResolution_packageJson_yesAtPackageRoot_fakeScopedPackage.js @@ -1,8 +1,6 @@ //// [tests/cases/compiler/moduleResolution_packageJson_yesAtPackageRoot_fakeScopedPackage.ts] //// //// [index.js] -// Copy of `moduleResolution_packageJson_notAtPackageRoot` with `foo/@bar` instead of `foo/bar`. Should behave identically. - not read //// [package.json] diff --git a/tests/baselines/reference/namespaceNotMergedWithFunctionDefaultExport.errors.txt b/tests/baselines/reference/namespaceNotMergedWithFunctionDefaultExport.errors.txt index 9874a41d1a3..7e15621bca0 100644 --- a/tests/baselines/reference/namespaceNotMergedWithFunctionDefaultExport.errors.txt +++ b/tests/baselines/reference/namespaceNotMergedWithFunctionDefaultExport.errors.txt @@ -1,10 +1,8 @@ -replace-in-file/types/index.d.ts(4,19): error TS2395: Individual declarations in merged declaration 'replaceInFile' must be all exported or all local. -replace-in-file/types/index.d.ts(7,13): error TS2395: Individual declarations in merged declaration 'replaceInFile' must be all exported or all local. +replace-in-file/types/index.d.ts(2,19): error TS2395: Individual declarations in merged declaration 'replaceInFile' must be all exported or all local. +replace-in-file/types/index.d.ts(5,13): error TS2395: Individual declarations in merged declaration 'replaceInFile' must be all exported or all local. ==== replace-in-file/types/index.d.ts (2 errors) ==== - // repro from https://github.com/microsoft/TypeScript/issues/54342 - declare module 'replace-in-file' { export function replaceInFile(config: unknown): Promise; ~~~~~~~~~~~~~ diff --git a/tests/baselines/reference/namespaceNotMergedWithFunctionDefaultExport.symbols b/tests/baselines/reference/namespaceNotMergedWithFunctionDefaultExport.symbols index 69923fe4dcd..3e07239e55d 100644 --- a/tests/baselines/reference/namespaceNotMergedWithFunctionDefaultExport.symbols +++ b/tests/baselines/reference/namespaceNotMergedWithFunctionDefaultExport.symbols @@ -1,24 +1,22 @@ //// [tests/cases/compiler/namespaceNotMergedWithFunctionDefaultExport.ts] //// === replace-in-file/types/index.d.ts === -// repro from https://github.com/microsoft/TypeScript/issues/54342 - declare module 'replace-in-file' { >'replace-in-file' : Symbol("replace-in-file", Decl(index.d.ts, 0, 0)) export function replaceInFile(config: unknown): Promise; ->replaceInFile : Symbol(replaceInFile, Decl(index.d.ts, 2, 34)) ->config : Symbol(config, Decl(index.d.ts, 3, 32)) +>replaceInFile : Symbol(replaceInFile, Decl(index.d.ts, 0, 34)) +>config : Symbol(config, Decl(index.d.ts, 1, 32)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --)) export default replaceInFile; ->replaceInFile : Symbol(replaceInFile, Decl(index.d.ts, 2, 34), Decl(index.d.ts, 4, 31)) +>replaceInFile : Symbol(replaceInFile, Decl(index.d.ts, 0, 34), Decl(index.d.ts, 2, 31)) namespace replaceInFile { ->replaceInFile : Symbol(replaceInFile, Decl(index.d.ts, 2, 34), Decl(index.d.ts, 4, 31)) +>replaceInFile : Symbol(replaceInFile, Decl(index.d.ts, 0, 34), Decl(index.d.ts, 2, 31)) export function sync(config: unknown): unknown[]; ->sync : Symbol(sync, Decl(index.d.ts, 6, 27)) ->config : Symbol(config, Decl(index.d.ts, 7, 25)) +>sync : Symbol(sync, Decl(index.d.ts, 4, 27)) +>config : Symbol(config, Decl(index.d.ts, 5, 25)) } } diff --git a/tests/baselines/reference/namespaceNotMergedWithFunctionDefaultExport.types b/tests/baselines/reference/namespaceNotMergedWithFunctionDefaultExport.types index d7101b25dde..0dc9eab05ca 100644 --- a/tests/baselines/reference/namespaceNotMergedWithFunctionDefaultExport.types +++ b/tests/baselines/reference/namespaceNotMergedWithFunctionDefaultExport.types @@ -1,8 +1,6 @@ //// [tests/cases/compiler/namespaceNotMergedWithFunctionDefaultExport.ts] //// === replace-in-file/types/index.d.ts === -// repro from https://github.com/microsoft/TypeScript/issues/54342 - declare module 'replace-in-file' { >'replace-in-file' : typeof import("replace-in-file") diff --git a/tests/baselines/reference/nestedGenericConditionalTypeWithGenericImportType.js b/tests/baselines/reference/nestedGenericConditionalTypeWithGenericImportType.js index 37b0447c54f..865604c656f 100644 --- a/tests/baselines/reference/nestedGenericConditionalTypeWithGenericImportType.js +++ b/tests/baselines/reference/nestedGenericConditionalTypeWithGenericImportType.js @@ -1,8 +1,6 @@ //// [tests/cases/compiler/nestedGenericConditionalTypeWithGenericImportType.ts] //// //// [name.ts] -// #31824 - export type Name = any; //// [index.ts] @@ -13,6 +11,5 @@ type T = any extends ((any extends any ? any : string) extends any ? import(" //// [name.js] "use strict"; -// #31824 Object.defineProperty(exports, "__esModule", { value: true }); //// [index.js] diff --git a/tests/baselines/reference/nestedGenericConditionalTypeWithGenericImportType.symbols b/tests/baselines/reference/nestedGenericConditionalTypeWithGenericImportType.symbols index 7c0bcf0acbe..9377ace06e5 100644 --- a/tests/baselines/reference/nestedGenericConditionalTypeWithGenericImportType.symbols +++ b/tests/baselines/reference/nestedGenericConditionalTypeWithGenericImportType.symbols @@ -1,11 +1,9 @@ //// [tests/cases/compiler/nestedGenericConditionalTypeWithGenericImportType.ts] //// === name.ts === -// #31824 - export type Name = any; >Name : Symbol(Name, Decl(name.ts, 0, 0)) ->T : Symbol(T, Decl(name.ts, 2, 17)) +>T : Symbol(T, Decl(name.ts, 0, 17)) === index.ts === type T = any extends ((any extends any ? any : string) extends any ? import("./name").Name : any) diff --git a/tests/baselines/reference/nestedGenericConditionalTypeWithGenericImportType.types b/tests/baselines/reference/nestedGenericConditionalTypeWithGenericImportType.types index d6cac0f904c..eca992c37c3 100644 --- a/tests/baselines/reference/nestedGenericConditionalTypeWithGenericImportType.types +++ b/tests/baselines/reference/nestedGenericConditionalTypeWithGenericImportType.types @@ -1,8 +1,6 @@ //// [tests/cases/compiler/nestedGenericConditionalTypeWithGenericImportType.ts] //// === name.ts === -// #31824 - export type Name = any; >Name : any diff --git a/tests/baselines/reference/out-flag3.errors.txt b/tests/baselines/reference/out-flag3.errors.txt index 860daa0fef2..987ce4246cb 100644 --- a/tests/baselines/reference/out-flag3.errors.txt +++ b/tests/baselines/reference/out-flag3.errors.txt @@ -9,8 +9,6 @@ error TS6082: Only 'amd' and 'system' modules are supported alongside --out. !!! error TS5102: Use 'outFile' instead. !!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out. ==== a.ts (0 errors) ==== - // --out and --outFile error - class A { } ==== b.ts (0 errors) ==== diff --git a/tests/baselines/reference/out-flag3.js b/tests/baselines/reference/out-flag3.js index 9eaa844f5cc..eaafbcb399b 100644 --- a/tests/baselines/reference/out-flag3.js +++ b/tests/baselines/reference/out-flag3.js @@ -1,8 +1,6 @@ //// [tests/cases/compiler/out-flag3.ts] //// //// [a.ts] -// --out and --outFile error - class A { } //// [b.ts] @@ -10,7 +8,6 @@ class B { } //// [c.js] -// --out and --outFile error var A = /** @class */ (function () { function A() { } diff --git a/tests/baselines/reference/out-flag3.js.map b/tests/baselines/reference/out-flag3.js.map index dc7e430263f..d984f1d5fbe 100644 --- a/tests/baselines/reference/out-flag3.js.map +++ b/tests/baselines/reference/out-flag3.js.map @@ -1,3 +1,3 @@ //// [c.js.map] -{"version":3,"file":"c.js","sourceRoot":"","sources":["a.ts","b.ts"],"names":[],"mappings":"AAAA,4BAA4B;AAE5B;IAAA;IAAU,CAAC;IAAD,QAAC;AAAD,CAAC,AAAX,IAAW;ACFX;IAAA;IAAU,CAAC;IAAD,QAAC;AAAD,CAAC,AAAX,IAAW"} -//// https://sokra.github.io/source-map-visualization#base64,Ly8gLS1vdXQgYW5kIC0tb3V0RmlsZSBlcnJvcg0KdmFyIEEgPSAvKiogQGNsYXNzICovIChmdW5jdGlvbiAoKSB7DQogICAgZnVuY3Rpb24gQSgpIHsNCiAgICB9DQogICAgcmV0dXJuIEE7DQp9KCkpOw0KdmFyIEIgPSAvKiogQGNsYXNzICovIChmdW5jdGlvbiAoKSB7DQogICAgZnVuY3Rpb24gQigpIHsNCiAgICB9DQogICAgcmV0dXJuIEI7DQp9KCkpOw0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9Yy5qcy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImEudHMiLCJiLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLDRCQUE0QjtBQUU1QjtJQUFBO0lBQVUsQ0FBQztJQUFELFFBQUM7QUFBRCxDQUFDLEFBQVgsSUFBVztBQ0ZYO0lBQUE7SUFBVSxDQUFDO0lBQUQsUUFBQztBQUFELENBQUMsQUFBWCxJQUFXIn0=,Ly8gLS1vdXQgYW5kIC0tb3V0RmlsZSBlcnJvcgoKY2xhc3MgQSB7IH0K,Y2xhc3MgQiB7IH0K +{"version":3,"file":"c.js","sourceRoot":"","sources":["a.ts","b.ts"],"names":[],"mappings":"AAAA;IAAA;IAAU,CAAC;IAAD,QAAC;AAAD,CAAC,AAAX,IAAW;ACAX;IAAA;IAAU,CAAC;IAAD,QAAC;AAAD,CAAC,AAAX,IAAW"} +//// https://sokra.github.io/source-map-visualization#base64,dmFyIEEgPSAvKiogQGNsYXNzICovIChmdW5jdGlvbiAoKSB7DQogICAgZnVuY3Rpb24gQSgpIHsNCiAgICB9DQogICAgcmV0dXJuIEE7DQp9KCkpOw0KdmFyIEIgPSAvKiogQGNsYXNzICovIChmdW5jdGlvbiAoKSB7DQogICAgZnVuY3Rpb24gQigpIHsNCiAgICB9DQogICAgcmV0dXJuIEI7DQp9KCkpOw0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9Yy5qcy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImEudHMiLCJiLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0lBQUE7SUFBVSxDQUFDO0lBQUQsUUFBQztBQUFELENBQUMsQUFBWCxJQUFXO0FDQVg7SUFBQTtJQUFVLENBQUM7SUFBRCxRQUFDO0FBQUQsQ0FBQyxBQUFYLElBQVcifQ==,Y2xhc3MgQSB7IH0K,Y2xhc3MgQiB7IH0K diff --git a/tests/baselines/reference/out-flag3.sourcemap.txt b/tests/baselines/reference/out-flag3.sourcemap.txt index 2fb637f66c6..9786d844acd 100644 --- a/tests/baselines/reference/out-flag3.sourcemap.txt +++ b/tests/baselines/reference/out-flag3.sourcemap.txt @@ -8,28 +8,17 @@ sources: a.ts,b.ts emittedFile:c.js sourceFile:a.ts ------------------------------------------------------------------- ->>>// --out and --outFile error -1 > -2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -3 > ^^^^^^^^^-> -1 > -2 >// --out and --outFile error -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 29) Source(1, 29) + SourceIndex(0) ---- >>>var A = /** @class */ (function () { -1-> +1 > 2 >^^^^^^^^^^^^^^^^^^^-> -1-> - > - > -1->Emitted(2, 1) Source(3, 1) + SourceIndex(0) +1 > +1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) --- >>> function A() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(3, 5) Source(3, 1) + SourceIndex(0) +1->Emitted(2, 5) Source(1, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -37,16 +26,16 @@ sourceFile:a.ts 3 > ^^^^^^^^^-> 1->class A { 2 > } -1->Emitted(4, 5) Source(3, 11) + SourceIndex(0) -2 >Emitted(4, 6) Source(3, 12) + SourceIndex(0) +1->Emitted(3, 5) Source(1, 11) + SourceIndex(0) +2 >Emitted(3, 6) Source(1, 12) + SourceIndex(0) --- >>> return A; 1->^^^^ 2 > ^^^^^^^^ 1-> 2 > } -1->Emitted(5, 5) Source(3, 11) + SourceIndex(0) -2 >Emitted(5, 13) Source(3, 12) + SourceIndex(0) +1->Emitted(4, 5) Source(1, 11) + SourceIndex(0) +2 >Emitted(4, 13) Source(1, 12) + SourceIndex(0) --- >>>}()); 1 > @@ -58,10 +47,10 @@ sourceFile:a.ts 2 >} 3 > 4 > class A { } -1 >Emitted(6, 1) Source(3, 11) + SourceIndex(0) -2 >Emitted(6, 2) Source(3, 12) + SourceIndex(0) -3 >Emitted(6, 2) Source(3, 1) + SourceIndex(0) -4 >Emitted(6, 6) Source(3, 12) + SourceIndex(0) +1 >Emitted(5, 1) Source(1, 11) + SourceIndex(0) +2 >Emitted(5, 2) Source(1, 12) + SourceIndex(0) +3 >Emitted(5, 2) Source(1, 1) + SourceIndex(0) +4 >Emitted(5, 6) Source(1, 12) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:c.js @@ -71,13 +60,13 @@ sourceFile:b.ts 1-> 2 >^^^^^^^^^^^^^^^^^^^-> 1-> -1->Emitted(7, 1) Source(1, 1) + SourceIndex(1) +1->Emitted(6, 1) Source(1, 1) + SourceIndex(1) --- >>> function B() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(8, 5) Source(1, 1) + SourceIndex(1) +1->Emitted(7, 5) Source(1, 1) + SourceIndex(1) --- >>> } 1->^^^^ @@ -85,16 +74,16 @@ sourceFile:b.ts 3 > ^^^^^^^^^-> 1->class B { 2 > } -1->Emitted(9, 5) Source(1, 11) + SourceIndex(1) -2 >Emitted(9, 6) Source(1, 12) + SourceIndex(1) +1->Emitted(8, 5) Source(1, 11) + SourceIndex(1) +2 >Emitted(8, 6) Source(1, 12) + SourceIndex(1) --- >>> return B; 1->^^^^ 2 > ^^^^^^^^ 1-> 2 > } -1->Emitted(10, 5) Source(1, 11) + SourceIndex(1) -2 >Emitted(10, 13) Source(1, 12) + SourceIndex(1) +1->Emitted(9, 5) Source(1, 11) + SourceIndex(1) +2 >Emitted(9, 13) Source(1, 12) + SourceIndex(1) --- >>>}()); 1 > @@ -106,9 +95,9 @@ sourceFile:b.ts 2 >} 3 > 4 > class B { } -1 >Emitted(11, 1) Source(1, 11) + SourceIndex(1) -2 >Emitted(11, 2) Source(1, 12) + SourceIndex(1) -3 >Emitted(11, 2) Source(1, 1) + SourceIndex(1) -4 >Emitted(11, 6) Source(1, 12) + SourceIndex(1) +1 >Emitted(10, 1) Source(1, 11) + SourceIndex(1) +2 >Emitted(10, 2) Source(1, 12) + SourceIndex(1) +3 >Emitted(10, 2) Source(1, 1) + SourceIndex(1) +4 >Emitted(10, 6) Source(1, 12) + SourceIndex(1) --- >>>//# sourceMappingURL=c.js.map \ No newline at end of file diff --git a/tests/baselines/reference/out-flag3.symbols b/tests/baselines/reference/out-flag3.symbols index 48240759120..4a70037a376 100644 --- a/tests/baselines/reference/out-flag3.symbols +++ b/tests/baselines/reference/out-flag3.symbols @@ -1,8 +1,6 @@ //// [tests/cases/compiler/out-flag3.ts] //// === a.ts === -// --out and --outFile error - class A { } >A : Symbol(A, Decl(a.ts, 0, 0)) diff --git a/tests/baselines/reference/out-flag3.types b/tests/baselines/reference/out-flag3.types index 74eb1c52880..83cc4a4e883 100644 --- a/tests/baselines/reference/out-flag3.types +++ b/tests/baselines/reference/out-flag3.types @@ -1,8 +1,6 @@ //// [tests/cases/compiler/out-flag3.ts] //// === a.ts === -// --out and --outFile error - class A { } >A : A diff --git a/tests/baselines/reference/outModuleConcatCommonjs.errors.txt b/tests/baselines/reference/outModuleConcatCommonjs.errors.txt index a89e66369e1..e408a429df8 100644 --- a/tests/baselines/reference/outModuleConcatCommonjs.errors.txt +++ b/tests/baselines/reference/outModuleConcatCommonjs.errors.txt @@ -3,8 +3,6 @@ error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. !!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. ==== ref/a.ts (0 errors) ==== - // This should be an error - export class A { } ==== b.ts (0 errors) ==== diff --git a/tests/baselines/reference/outModuleConcatCommonjs.symbols b/tests/baselines/reference/outModuleConcatCommonjs.symbols index 12fd1ccae1c..a79dd18231f 100644 --- a/tests/baselines/reference/outModuleConcatCommonjs.symbols +++ b/tests/baselines/reference/outModuleConcatCommonjs.symbols @@ -1,8 +1,6 @@ //// [tests/cases/compiler/outModuleConcatCommonjs.ts] //// === ref/a.ts === -// This should be an error - export class A { } >A : Symbol(A, Decl(a.ts, 0, 0)) diff --git a/tests/baselines/reference/outModuleConcatCommonjs.types b/tests/baselines/reference/outModuleConcatCommonjs.types index 9cbe5a209d6..449c2327c0a 100644 --- a/tests/baselines/reference/outModuleConcatCommonjs.types +++ b/tests/baselines/reference/outModuleConcatCommonjs.types @@ -1,8 +1,6 @@ //// [tests/cases/compiler/outModuleConcatCommonjs.ts] //// === ref/a.ts === -// This should be an error - export class A { } >A : A diff --git a/tests/baselines/reference/outModuleConcatES6.errors.txt b/tests/baselines/reference/outModuleConcatES6.errors.txt index 170fad80923..c4a744578f7 100644 --- a/tests/baselines/reference/outModuleConcatES6.errors.txt +++ b/tests/baselines/reference/outModuleConcatES6.errors.txt @@ -3,8 +3,6 @@ error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. !!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. ==== ref/a.ts (0 errors) ==== - // This should be an error - export class A { } ==== b.ts (0 errors) ==== diff --git a/tests/baselines/reference/outModuleConcatES6.symbols b/tests/baselines/reference/outModuleConcatES6.symbols index 738688468a4..af62807ad93 100644 --- a/tests/baselines/reference/outModuleConcatES6.symbols +++ b/tests/baselines/reference/outModuleConcatES6.symbols @@ -1,8 +1,6 @@ //// [tests/cases/compiler/outModuleConcatES6.ts] //// === ref/a.ts === -// This should be an error - export class A { } >A : Symbol(A, Decl(a.ts, 0, 0)) diff --git a/tests/baselines/reference/outModuleConcatES6.types b/tests/baselines/reference/outModuleConcatES6.types index fb7d157939d..d3eb03be1dc 100644 --- a/tests/baselines/reference/outModuleConcatES6.types +++ b/tests/baselines/reference/outModuleConcatES6.types @@ -1,8 +1,6 @@ //// [tests/cases/compiler/outModuleConcatES6.ts] //// === ref/a.ts === -// This should be an error - export class A { } >A : A diff --git a/tests/baselines/reference/outModuleConcatUmd.errors.txt b/tests/baselines/reference/outModuleConcatUmd.errors.txt index 38fea4c9358..c4a744578f7 100644 --- a/tests/baselines/reference/outModuleConcatUmd.errors.txt +++ b/tests/baselines/reference/outModuleConcatUmd.errors.txt @@ -3,8 +3,6 @@ error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. !!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. ==== ref/a.ts (0 errors) ==== - // This should error - export class A { } ==== b.ts (0 errors) ==== diff --git a/tests/baselines/reference/outModuleConcatUmd.symbols b/tests/baselines/reference/outModuleConcatUmd.symbols index e84d935207f..f9b8fc6f3e7 100644 --- a/tests/baselines/reference/outModuleConcatUmd.symbols +++ b/tests/baselines/reference/outModuleConcatUmd.symbols @@ -1,8 +1,6 @@ //// [tests/cases/compiler/outModuleConcatUmd.ts] //// === ref/a.ts === -// This should error - export class A { } >A : Symbol(A, Decl(a.ts, 0, 0)) diff --git a/tests/baselines/reference/outModuleConcatUmd.types b/tests/baselines/reference/outModuleConcatUmd.types index fa689a8d7b1..a33bd62e446 100644 --- a/tests/baselines/reference/outModuleConcatUmd.types +++ b/tests/baselines/reference/outModuleConcatUmd.types @@ -1,8 +1,6 @@ //// [tests/cases/compiler/outModuleConcatUmd.ts] //// === ref/a.ts === -// This should error - export class A { } >A : A diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution2_classic.errors.txt b/tests/baselines/reference/pathMappingBasedModuleResolution2_classic.errors.txt index 43a426f7df6..3f4b7a24edf 100644 --- a/tests/baselines/reference/pathMappingBasedModuleResolution2_classic.errors.txt +++ b/tests/baselines/reference/pathMappingBasedModuleResolution2_classic.errors.txt @@ -1,11 +1,8 @@ -root/tsconfig.json(8,13): error TS5061: Pattern '*1*' can have at most one '*' character. -root/tsconfig.json(8,22): error TS5062: Substitution '*2*' in pattern '*1*' can have at most one '*' character. +root/tsconfig.json(5,13): error TS5061: Pattern '*1*' can have at most one '*' character. +root/tsconfig.json(5,22): error TS5062: Substitution '*2*' in pattern '*1*' can have at most one '*' character. ==== root/tsconfig.json (2 errors) ==== - // baseurl is defined in tsconfig.json - // paths has errors - { "compilerOptions": { "baseUrl": "./src", diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution2_node.errors.txt b/tests/baselines/reference/pathMappingBasedModuleResolution2_node.errors.txt index 43a426f7df6..3f4b7a24edf 100644 --- a/tests/baselines/reference/pathMappingBasedModuleResolution2_node.errors.txt +++ b/tests/baselines/reference/pathMappingBasedModuleResolution2_node.errors.txt @@ -1,11 +1,8 @@ -root/tsconfig.json(8,13): error TS5061: Pattern '*1*' can have at most one '*' character. -root/tsconfig.json(8,22): error TS5062: Substitution '*2*' in pattern '*1*' can have at most one '*' character. +root/tsconfig.json(5,13): error TS5061: Pattern '*1*' can have at most one '*' character. +root/tsconfig.json(5,22): error TS5062: Substitution '*2*' in pattern '*1*' can have at most one '*' character. ==== root/tsconfig.json (2 errors) ==== - // baseurl is defined in tsconfig.json - // paths has errors - { "compilerOptions": { "baseUrl": "./src", diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution3_classic.js b/tests/baselines/reference/pathMappingBasedModuleResolution3_classic.js index 348bea02336..5cd6768d9fa 100644 --- a/tests/baselines/reference/pathMappingBasedModuleResolution3_classic.js +++ b/tests/baselines/reference/pathMappingBasedModuleResolution3_classic.js @@ -1,8 +1,6 @@ //// [tests/cases/compiler/pathMappingBasedModuleResolution3_classic.ts] //// //// [file1.ts] -// baseUrl set via command line - import {x} from "folder2/file2" declare function use(a: any): void; use(x.toExponential()); @@ -40,7 +38,6 @@ define(["require", "exports", "./file3", "file4"], function (require, exports, f exports.x = file3_1.x + file4_1.y; }); //// [file1.js] -// baseUrl set via command line define(["require", "exports", "folder2/file2"], function (require, exports, file2_1) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution3_classic.symbols b/tests/baselines/reference/pathMappingBasedModuleResolution3_classic.symbols index 14e39ddcf78..f1b44f2cb61 100644 --- a/tests/baselines/reference/pathMappingBasedModuleResolution3_classic.symbols +++ b/tests/baselines/reference/pathMappingBasedModuleResolution3_classic.symbols @@ -1,19 +1,17 @@ //// [tests/cases/compiler/pathMappingBasedModuleResolution3_classic.ts] //// === c:/root/folder1/file1.ts === -// baseUrl set via command line - import {x} from "folder2/file2" ->x : Symbol(x, Decl(file1.ts, 2, 8)) +>x : Symbol(x, Decl(file1.ts, 0, 8)) declare function use(a: any): void; ->use : Symbol(use, Decl(file1.ts, 2, 31)) ->a : Symbol(a, Decl(file1.ts, 3, 21)) +>use : Symbol(use, Decl(file1.ts, 0, 31)) +>a : Symbol(a, Decl(file1.ts, 1, 21)) use(x.toExponential()); ->use : Symbol(use, Decl(file1.ts, 2, 31)) +>use : Symbol(use, Decl(file1.ts, 0, 31)) >x.toExponential : Symbol(Number.toExponential, Decl(lib.es5.d.ts, --, --)) ->x : Symbol(x, Decl(file1.ts, 2, 8)) +>x : Symbol(x, Decl(file1.ts, 0, 8)) >toExponential : Symbol(Number.toExponential, Decl(lib.es5.d.ts, --, --)) === c:/root/folder2/file2.ts === diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution3_classic.types b/tests/baselines/reference/pathMappingBasedModuleResolution3_classic.types index e2305fed595..6a501233194 100644 --- a/tests/baselines/reference/pathMappingBasedModuleResolution3_classic.types +++ b/tests/baselines/reference/pathMappingBasedModuleResolution3_classic.types @@ -1,8 +1,6 @@ //// [tests/cases/compiler/pathMappingBasedModuleResolution3_classic.ts] //// === c:/root/folder1/file1.ts === -// baseUrl set via command line - import {x} from "folder2/file2" >x : number diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution3_node.js b/tests/baselines/reference/pathMappingBasedModuleResolution3_node.js index 8c78b7353be..e402064738e 100644 --- a/tests/baselines/reference/pathMappingBasedModuleResolution3_node.js +++ b/tests/baselines/reference/pathMappingBasedModuleResolution3_node.js @@ -1,8 +1,6 @@ //// [tests/cases/compiler/pathMappingBasedModuleResolution3_node.ts] //// //// [file1.ts] -// baseUrl set via command line - import {x} from "folder2/file2" declare function use(a: any): void; use(x.toExponential()); @@ -32,7 +30,6 @@ var file4_1 = require("file4"); // found with fallback exports.x = file3_1.x + file4_1.y; //// [file1.js] "use strict"; -// baseUrl set via command line Object.defineProperty(exports, "__esModule", { value: true }); var file2_1 = require("folder2/file2"); use(file2_1.x.toExponential()); diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution3_node.symbols b/tests/baselines/reference/pathMappingBasedModuleResolution3_node.symbols index 992539903cc..8ee78833b8e 100644 --- a/tests/baselines/reference/pathMappingBasedModuleResolution3_node.symbols +++ b/tests/baselines/reference/pathMappingBasedModuleResolution3_node.symbols @@ -1,19 +1,17 @@ //// [tests/cases/compiler/pathMappingBasedModuleResolution3_node.ts] //// === c:/root/folder1/file1.ts === -// baseUrl set via command line - import {x} from "folder2/file2" ->x : Symbol(x, Decl(file1.ts, 2, 8)) +>x : Symbol(x, Decl(file1.ts, 0, 8)) declare function use(a: any): void; ->use : Symbol(use, Decl(file1.ts, 2, 31)) ->a : Symbol(a, Decl(file1.ts, 3, 21)) +>use : Symbol(use, Decl(file1.ts, 0, 31)) +>a : Symbol(a, Decl(file1.ts, 1, 21)) use(x.toExponential()); ->use : Symbol(use, Decl(file1.ts, 2, 31)) +>use : Symbol(use, Decl(file1.ts, 0, 31)) >x.toExponential : Symbol(Number.toExponential, Decl(lib.es5.d.ts, --, --)) ->x : Symbol(x, Decl(file1.ts, 2, 8)) +>x : Symbol(x, Decl(file1.ts, 0, 8)) >toExponential : Symbol(Number.toExponential, Decl(lib.es5.d.ts, --, --)) === c:/root/folder2/file2.ts === diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution3_node.types b/tests/baselines/reference/pathMappingBasedModuleResolution3_node.types index 488ea9da0a8..907846b73ad 100644 --- a/tests/baselines/reference/pathMappingBasedModuleResolution3_node.types +++ b/tests/baselines/reference/pathMappingBasedModuleResolution3_node.types @@ -1,8 +1,6 @@ //// [tests/cases/compiler/pathMappingBasedModuleResolution3_node.ts] //// === c:/root/folder1/file1.ts === -// baseUrl set via command line - import {x} from "folder2/file2" >x : number diff --git a/tests/baselines/reference/prototypePropertyAssignmentMergedTypeReference.symbols b/tests/baselines/reference/prototypePropertyAssignmentMergedTypeReference.symbols index c93b0651a81..bbd1c5d3c4e 100644 --- a/tests/baselines/reference/prototypePropertyAssignmentMergedTypeReference.symbols +++ b/tests/baselines/reference/prototypePropertyAssignmentMergedTypeReference.symbols @@ -1,22 +1,21 @@ //// [tests/cases/conformance/salsa/prototypePropertyAssignmentMergedTypeReference.ts] //// === prototypePropertyAssignmentMergedTypeReference.js === -// https://github.com/microsoft/TypeScript/issues/33993 var f = function() { ->f : Symbol(f, Decl(prototypePropertyAssignmentMergedTypeReference.js, 1, 3)) +>f : Symbol(f, Decl(prototypePropertyAssignmentMergedTypeReference.js, 0, 3)) return 12; }; f.prototype.a = "a"; ->f.prototype : Symbol(f.a, Decl(prototypePropertyAssignmentMergedTypeReference.js, 3, 2)) ->f : Symbol(f, Decl(prototypePropertyAssignmentMergedTypeReference.js, 1, 3)) +>f.prototype : Symbol(f.a, Decl(prototypePropertyAssignmentMergedTypeReference.js, 2, 2)) +>f : Symbol(f, Decl(prototypePropertyAssignmentMergedTypeReference.js, 0, 3)) >prototype : Symbol(Function.prototype, Decl(lib.es5.d.ts, --, --)) ->a : Symbol(f.a, Decl(prototypePropertyAssignmentMergedTypeReference.js, 3, 2)) +>a : Symbol(f.a, Decl(prototypePropertyAssignmentMergedTypeReference.js, 2, 2)) /** @type {new () => f} */ var x = f; ->x : Symbol(x, Decl(prototypePropertyAssignmentMergedTypeReference.js, 8, 3)) ->f : Symbol(f, Decl(prototypePropertyAssignmentMergedTypeReference.js, 1, 3)) +>x : Symbol(x, Decl(prototypePropertyAssignmentMergedTypeReference.js, 7, 3)) +>f : Symbol(f, Decl(prototypePropertyAssignmentMergedTypeReference.js, 0, 3)) diff --git a/tests/baselines/reference/prototypePropertyAssignmentMergedTypeReference.types b/tests/baselines/reference/prototypePropertyAssignmentMergedTypeReference.types index fa9e6a5419e..7b24776b96e 100644 --- a/tests/baselines/reference/prototypePropertyAssignmentMergedTypeReference.types +++ b/tests/baselines/reference/prototypePropertyAssignmentMergedTypeReference.types @@ -1,7 +1,6 @@ //// [tests/cases/conformance/salsa/prototypePropertyAssignmentMergedTypeReference.ts] //// === prototypePropertyAssignmentMergedTypeReference.js === -// https://github.com/microsoft/TypeScript/issues/33993 var f = function() { >f : typeof f >function() { return 12;} : typeof f diff --git a/tests/baselines/reference/recursiveResolveDeclaredMembers.symbols b/tests/baselines/reference/recursiveResolveDeclaredMembers.symbols index 049c488b92e..05e9ec4c563 100644 --- a/tests/baselines/reference/recursiveResolveDeclaredMembers.symbols +++ b/tests/baselines/reference/recursiveResolveDeclaredMembers.symbols @@ -1,7 +1,6 @@ //// [tests/cases/compiler/recursiveResolveDeclaredMembers.ts] //// === types.ts === -// #23025 export interface F { >F : Symbol(F, Decl(types.ts, 0, 0)) @@ -9,8 +8,8 @@ export interface F { >E : Symbol(E, Decl(other.js, 0, 4)) } export interface D {} ->D : Symbol(D, Decl(types.ts, 3, 1)) ->T : Symbol(T, Decl(types.ts, 4, 19)) +>D : Symbol(D, Decl(types.ts, 2, 1)) +>T : Symbol(T, Decl(types.ts, 3, 19)) >F : Symbol(F, Decl(types.ts, 0, 0)) >F : Symbol(F, Decl(types.ts, 0, 0)) diff --git a/tests/baselines/reference/recursiveResolveDeclaredMembers.types b/tests/baselines/reference/recursiveResolveDeclaredMembers.types index 14060ba9f21..a8f7d1da3e1 100644 --- a/tests/baselines/reference/recursiveResolveDeclaredMembers.types +++ b/tests/baselines/reference/recursiveResolveDeclaredMembers.types @@ -2,7 +2,6 @@ === types.ts === -// #23025 export interface F { (): E; } diff --git a/tests/baselines/reference/reexportWrittenCorrectlyInDeclaration.js b/tests/baselines/reference/reexportWrittenCorrectlyInDeclaration.js index 244382bfa0d..4aea5d48b4c 100644 --- a/tests/baselines/reference/reexportWrittenCorrectlyInDeclaration.js +++ b/tests/baselines/reference/reexportWrittenCorrectlyInDeclaration.js @@ -1,7 +1,6 @@ //// [tests/cases/compiler/reexportWrittenCorrectlyInDeclaration.ts] //// //// [ThingA.ts] -// https://github.com/Microsoft/TypeScript/issues/8612 export class ThingA { } //// [ThingB.ts] @@ -22,7 +21,6 @@ export class Test { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ThingA = void 0; -// https://github.com/Microsoft/TypeScript/issues/8612 var ThingA = /** @class */ (function () { function ThingA() { } diff --git a/tests/baselines/reference/reexportWrittenCorrectlyInDeclaration.symbols b/tests/baselines/reference/reexportWrittenCorrectlyInDeclaration.symbols index de5aaa39fa2..c873bc4ce38 100644 --- a/tests/baselines/reference/reexportWrittenCorrectlyInDeclaration.symbols +++ b/tests/baselines/reference/reexportWrittenCorrectlyInDeclaration.symbols @@ -1,7 +1,6 @@ //// [tests/cases/compiler/reexportWrittenCorrectlyInDeclaration.ts] //// === ThingA.ts === -// https://github.com/Microsoft/TypeScript/issues/8612 export class ThingA { } >ThingA : Symbol(ThingA, Decl(ThingA.ts, 0, 0)) diff --git a/tests/baselines/reference/reexportWrittenCorrectlyInDeclaration.types b/tests/baselines/reference/reexportWrittenCorrectlyInDeclaration.types index 3959162ee2c..37531203142 100644 --- a/tests/baselines/reference/reexportWrittenCorrectlyInDeclaration.types +++ b/tests/baselines/reference/reexportWrittenCorrectlyInDeclaration.types @@ -1,7 +1,6 @@ //// [tests/cases/compiler/reexportWrittenCorrectlyInDeclaration.ts] //// === ThingA.ts === -// https://github.com/Microsoft/TypeScript/issues/8612 export class ThingA { } >ThingA : ThingA diff --git a/tests/baselines/reference/reexportedMissingAlias.errors.txt b/tests/baselines/reference/reexportedMissingAlias.errors.txt index 99df64643ae..4f74ea345dc 100644 --- a/tests/baselines/reference/reexportedMissingAlias.errors.txt +++ b/tests/baselines/reference/reexportedMissingAlias.errors.txt @@ -1,9 +1,8 @@ -second.d.ts(2,27): error TS2304: Cannot find name 'CompletelyMissing'. -second.d.ts(2,27): error TS2503: Cannot find namespace 'CompletelyMissing'. +second.d.ts(1,27): error TS2304: Cannot find name 'CompletelyMissing'. +second.d.ts(1,27): error TS2503: Cannot find namespace 'CompletelyMissing'. ==== second.d.ts (2 errors) ==== - // Fixes #15094 export import Component = CompletelyMissing; ~~~~~~~~~~~~~~~~~ !!! error TS2304: Cannot find name 'CompletelyMissing'. diff --git a/tests/baselines/reference/reexportedMissingAlias.js b/tests/baselines/reference/reexportedMissingAlias.js index 6b89018888d..27cc6b87a6c 100644 --- a/tests/baselines/reference/reexportedMissingAlias.js +++ b/tests/baselines/reference/reexportedMissingAlias.js @@ -1,7 +1,6 @@ //// [tests/cases/compiler/reexportedMissingAlias.ts] //// //// [second.d.ts] -// Fixes #15094 export import Component = CompletelyMissing; //// [first.d.ts] import * as Second from './second'; diff --git a/tests/baselines/reference/reexportedMissingAlias.symbols b/tests/baselines/reference/reexportedMissingAlias.symbols index f7414b4867c..a2ef9577afc 100644 --- a/tests/baselines/reference/reexportedMissingAlias.symbols +++ b/tests/baselines/reference/reexportedMissingAlias.symbols @@ -1,7 +1,6 @@ //// [tests/cases/compiler/reexportedMissingAlias.ts] //// === second.d.ts === -// Fixes #15094 export import Component = CompletelyMissing; >Component : Symbol(Component, Decl(second.d.ts, 0, 0)) diff --git a/tests/baselines/reference/reexportedMissingAlias.types b/tests/baselines/reference/reexportedMissingAlias.types index 5129984f057..abd0324b8ae 100644 --- a/tests/baselines/reference/reexportedMissingAlias.types +++ b/tests/baselines/reference/reexportedMissingAlias.types @@ -1,7 +1,6 @@ //// [tests/cases/compiler/reexportedMissingAlias.ts] //// === second.d.ts === -// Fixes #15094 export import Component = CompletelyMissing; >Component : any >CompletelyMissing : any diff --git a/tests/baselines/reference/requireOfAnEmptyFile1.errors.txt b/tests/baselines/reference/requireOfAnEmptyFile1.errors.txt index 95ec1f0c53e..23a1a42c3d7 100644 --- a/tests/baselines/reference/requireOfAnEmptyFile1.errors.txt +++ b/tests/baselines/reference/requireOfAnEmptyFile1.errors.txt @@ -1,9 +1,7 @@ -requireOfAnEmptyFile1_a.ts(3,21): error TS2306: File 'requireOfAnEmptyFile1_b.ts' is not a module. +requireOfAnEmptyFile1_a.ts(1,21): error TS2306: File 'requireOfAnEmptyFile1_b.ts' is not a module. ==== requireOfAnEmptyFile1_a.ts (1 errors) ==== - //requireOfAnEmptyFile1 - import fs = require('./requireOfAnEmptyFile1_b'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2306: File 'requireOfAnEmptyFile1_b.ts' is not a module. diff --git a/tests/baselines/reference/requireOfAnEmptyFile1.js b/tests/baselines/reference/requireOfAnEmptyFile1.js index 6eaad4712d1..44d67731e08 100644 --- a/tests/baselines/reference/requireOfAnEmptyFile1.js +++ b/tests/baselines/reference/requireOfAnEmptyFile1.js @@ -1,8 +1,6 @@ //// [tests/cases/compiler/requireOfAnEmptyFile1.ts] //// //// [requireOfAnEmptyFile1_a.ts] -//requireOfAnEmptyFile1 - import fs = require('./requireOfAnEmptyFile1_b'); //// [requireOfAnEmptyFile1_b.ts] @@ -11,5 +9,4 @@ import fs = require('./requireOfAnEmptyFile1_b'); //// [requireOfAnEmptyFile1_b.js] //// [requireOfAnEmptyFile1_a.js] "use strict"; -//requireOfAnEmptyFile1 Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/requireOfAnEmptyFile1.symbols b/tests/baselines/reference/requireOfAnEmptyFile1.symbols index e5c0f7e8ec0..1048ee73a67 100644 --- a/tests/baselines/reference/requireOfAnEmptyFile1.symbols +++ b/tests/baselines/reference/requireOfAnEmptyFile1.symbols @@ -1,8 +1,6 @@ //// [tests/cases/compiler/requireOfAnEmptyFile1.ts] //// === requireOfAnEmptyFile1_a.ts === -//requireOfAnEmptyFile1 - import fs = require('./requireOfAnEmptyFile1_b'); >fs : Symbol(fs, Decl(requireOfAnEmptyFile1_a.ts, 0, 0)) diff --git a/tests/baselines/reference/requireOfAnEmptyFile1.types b/tests/baselines/reference/requireOfAnEmptyFile1.types index 07e84f6f995..88670f88f13 100644 --- a/tests/baselines/reference/requireOfAnEmptyFile1.types +++ b/tests/baselines/reference/requireOfAnEmptyFile1.types @@ -1,8 +1,6 @@ //// [tests/cases/compiler/requireOfAnEmptyFile1.ts] //// === requireOfAnEmptyFile1_a.ts === -//requireOfAnEmptyFile1 - import fs = require('./requireOfAnEmptyFile1_b'); >fs : any diff --git a/tests/baselines/reference/requireTwoPropertyAccesses.js b/tests/baselines/reference/requireTwoPropertyAccesses.js index 6847ce9e74e..3df498a96d1 100644 --- a/tests/baselines/reference/requireTwoPropertyAccesses.js +++ b/tests/baselines/reference/requireTwoPropertyAccesses.js @@ -1,7 +1,6 @@ //// [tests/cases/conformance/salsa/requireTwoPropertyAccesses.ts] //// //// [mod.js] -// @declaration module.exports = { x: { y: "value" @@ -13,7 +12,6 @@ console.log(value) //// [mod.js] -// @declaration module.exports = { x: { y: "value" diff --git a/tests/baselines/reference/requireTwoPropertyAccesses.symbols b/tests/baselines/reference/requireTwoPropertyAccesses.symbols index 891f97e0bd4..b6ad45e8f7c 100644 --- a/tests/baselines/reference/requireTwoPropertyAccesses.symbols +++ b/tests/baselines/reference/requireTwoPropertyAccesses.symbols @@ -3,12 +3,12 @@ === requireTwoPropertyAccesses.js === const value = require("./mod").x.y >value : Symbol(value, Decl(requireTwoPropertyAccesses.js, 0, 5)) ->require("./mod").x.y : Symbol(y, Decl(mod.js, 2, 8)) ->require("./mod").x : Symbol(x, Decl(mod.js, 1, 18)) +>require("./mod").x.y : Symbol(y, Decl(mod.js, 1, 8)) +>require("./mod").x : Symbol(x, Decl(mod.js, 0, 18)) >require : Symbol(require) >"./mod" : Symbol("mod", Decl(mod.js, 0, 0)) ->x : Symbol(x, Decl(mod.js, 1, 18)) ->y : Symbol(y, Decl(mod.js, 2, 8)) +>x : Symbol(x, Decl(mod.js, 0, 18)) +>y : Symbol(y, Decl(mod.js, 1, 8)) console.log(value) >console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) @@ -17,16 +17,15 @@ console.log(value) >value : Symbol(value, Decl(requireTwoPropertyAccesses.js, 0, 5)) === mod.js === -// @declaration module.exports = { >module.exports : Symbol(module.exports, Decl(mod.js, 0, 0)) >module : Symbol(export=, Decl(mod.js, 0, 0)) >exports : Symbol(export=, Decl(mod.js, 0, 0)) x: { ->x : Symbol(x, Decl(mod.js, 1, 18)) +>x : Symbol(x, Decl(mod.js, 0, 18)) y: "value" ->y : Symbol(y, Decl(mod.js, 2, 8)) +>y : Symbol(y, Decl(mod.js, 1, 8)) } } diff --git a/tests/baselines/reference/requireTwoPropertyAccesses.types b/tests/baselines/reference/requireTwoPropertyAccesses.types index 0c931a8b644..28563c292da 100644 --- a/tests/baselines/reference/requireTwoPropertyAccesses.types +++ b/tests/baselines/reference/requireTwoPropertyAccesses.types @@ -19,7 +19,6 @@ console.log(value) >value : error === mod.js === -// @declaration module.exports = { >module.exports = { x: { y: "value" }} : { x: { y: string; }; } >module.exports : { x: { y: string; }; } diff --git a/tests/baselines/reference/systemModule11.errors.txt b/tests/baselines/reference/systemModule11.errors.txt index 65d837e37f1..9b7de8157be 100644 --- a/tests/baselines/reference/systemModule11.errors.txt +++ b/tests/baselines/reference/systemModule11.errors.txt @@ -1,4 +1,4 @@ -file1.ts(6,15): error TS2792: Cannot find module 'bar'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option? +file1.ts(3,15): error TS2792: Cannot find module 'bar'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option? file2.ts(6,15): error TS2792: Cannot find module 'bar'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option? file3.ts(1,25): error TS2792: Cannot find module 'a'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option? file3.ts(3,15): error TS2792: Cannot find module 'bar'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option? @@ -7,9 +7,6 @@ file5.ts(2,15): error TS2792: Cannot find module 'a'. Did you mean to set the 'm ==== file1.ts (1 errors) ==== - // set of tests cases that checks generation of local storage for exported names - - export var x; export function foo() {} export * from 'bar'; diff --git a/tests/baselines/reference/systemModule11.js b/tests/baselines/reference/systemModule11.js index d353476f5b8..9d34bcc588a 100644 --- a/tests/baselines/reference/systemModule11.js +++ b/tests/baselines/reference/systemModule11.js @@ -1,9 +1,6 @@ //// [tests/cases/compiler/systemModule11.ts] //// //// [file1.ts] -// set of tests cases that checks generation of local storage for exported names - - export var x; export function foo() {} export * from 'bar'; @@ -36,7 +33,6 @@ function foo() {} export * from 'a'; //// [file1.js] -// set of tests cases that checks generation of local storage for exported names System.register(["bar"], function (exports_1, context_1) { "use strict"; var x; @@ -60,7 +56,7 @@ System.register(["bar"], function (exports_1, context_1) { exportStar_1(bar_1_1); } ], - execute: function () {// set of tests cases that checks generation of local storage for exported names + execute: function () { } }; }); diff --git a/tests/baselines/reference/systemModule11.symbols b/tests/baselines/reference/systemModule11.symbols index 9b7362a248d..abaa93cc719 100644 --- a/tests/baselines/reference/systemModule11.symbols +++ b/tests/baselines/reference/systemModule11.symbols @@ -1,14 +1,11 @@ //// [tests/cases/compiler/systemModule11.ts] //// === file1.ts === -// set of tests cases that checks generation of local storage for exported names - - export var x; ->x : Symbol(x, Decl(file1.ts, 3, 10)) +>x : Symbol(x, Decl(file1.ts, 0, 10)) export function foo() {} ->foo : Symbol(foo, Decl(file1.ts, 3, 13)) +>foo : Symbol(foo, Decl(file1.ts, 0, 13)) export * from 'bar'; diff --git a/tests/baselines/reference/systemModule11.types b/tests/baselines/reference/systemModule11.types index efcba182630..aaba3944747 100644 --- a/tests/baselines/reference/systemModule11.types +++ b/tests/baselines/reference/systemModule11.types @@ -1,9 +1,6 @@ //// [tests/cases/compiler/systemModule11.ts] //// === file1.ts === -// set of tests cases that checks generation of local storage for exported names - - export var x; >x : any diff --git a/tests/baselines/reference/topLevelBlockExpando.symbols b/tests/baselines/reference/topLevelBlockExpando.symbols index c61ddfaf932..e18e54771bc 100644 --- a/tests/baselines/reference/topLevelBlockExpando.symbols +++ b/tests/baselines/reference/topLevelBlockExpando.symbols @@ -1,24 +1,20 @@ //// [tests/cases/compiler/topLevelBlockExpando.ts] //// === check.ts === -// https://github.com/microsoft/TypeScript/issues/31972 - - - // https://github.com/microsoft/TypeScript/issues/31972 interface Person { >Person : Symbol(Person, Decl(check.ts, 0, 0)) first: string; ->first : Symbol(Person.first, Decl(check.ts, 5, 18)) +>first : Symbol(Person.first, Decl(check.ts, 1, 18)) last: string; ->last : Symbol(Person.last, Decl(check.ts, 6, 16)) +>last : Symbol(Person.last, Decl(check.ts, 2, 16)) } { const dice = () => Math.floor(Math.random() * 6); ->dice : Symbol(dice, Decl(check.ts, 11, 7)) +>dice : Symbol(dice, Decl(check.ts, 7, 7)) >Math.floor : Symbol(Math.floor, Decl(lib.es5.d.ts, --, --)) >Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >floor : Symbol(Math.floor, Decl(lib.es5.d.ts, --, --)) @@ -27,19 +23,19 @@ interface Person { >random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) dice.first = 'Rando'; ->dice.first : Symbol(dice.first, Decl(check.ts, 11, 51)) ->dice : Symbol(dice, Decl(check.ts, 11, 7)) ->first : Symbol(dice.first, Decl(check.ts, 11, 51)) +>dice.first : Symbol(dice.first, Decl(check.ts, 7, 51)) +>dice : Symbol(dice, Decl(check.ts, 7, 7)) +>first : Symbol(dice.first, Decl(check.ts, 7, 51)) dice.last = 'Calrissian'; ->dice.last : Symbol(dice.last, Decl(check.ts, 12, 23)) ->dice : Symbol(dice, Decl(check.ts, 11, 7)) ->last : Symbol(dice.last, Decl(check.ts, 12, 23)) +>dice.last : Symbol(dice.last, Decl(check.ts, 8, 23)) +>dice : Symbol(dice, Decl(check.ts, 7, 7)) +>last : Symbol(dice.last, Decl(check.ts, 8, 23)) const diceP: Person = dice; ->diceP : Symbol(diceP, Decl(check.ts, 14, 7)) +>diceP : Symbol(diceP, Decl(check.ts, 10, 7)) >Person : Symbol(Person, Decl(check.ts, 0, 0)) ->dice : Symbol(dice, Decl(check.ts, 11, 7)) +>dice : Symbol(dice, Decl(check.ts, 7, 7)) } === check.js === diff --git a/tests/baselines/reference/topLevelBlockExpando.types b/tests/baselines/reference/topLevelBlockExpando.types index 5e93243d320..04cb4fe45af 100644 --- a/tests/baselines/reference/topLevelBlockExpando.types +++ b/tests/baselines/reference/topLevelBlockExpando.types @@ -1,10 +1,6 @@ //// [tests/cases/compiler/topLevelBlockExpando.ts] //// === check.ts === -// https://github.com/microsoft/TypeScript/issues/31972 - - - // https://github.com/microsoft/TypeScript/issues/31972 interface Person { first: string; diff --git a/tests/baselines/reference/typeAndNamespaceExportMerge.js b/tests/baselines/reference/typeAndNamespaceExportMerge.js index b804217afd6..fcf77459c49 100644 --- a/tests/baselines/reference/typeAndNamespaceExportMerge.js +++ b/tests/baselines/reference/typeAndNamespaceExportMerge.js @@ -1,8 +1,6 @@ //// [tests/cases/conformance/externalModules/typeAndNamespaceExportMerge.ts] //// //// [constants.ts] -// @strict - export const COFFEE = 0; export const TEA = 1; @@ -20,7 +18,6 @@ const x: Drink = Drink.TEA; //// [constants.js] "use strict"; -// @strict Object.defineProperty(exports, "__esModule", { value: true }); exports.TEA = exports.COFFEE = void 0; exports.COFFEE = 0; diff --git a/tests/baselines/reference/typeAndNamespaceExportMerge.symbols b/tests/baselines/reference/typeAndNamespaceExportMerge.symbols index 25ab571b95a..0b168e86c54 100644 --- a/tests/baselines/reference/typeAndNamespaceExportMerge.symbols +++ b/tests/baselines/reference/typeAndNamespaceExportMerge.symbols @@ -1,13 +1,11 @@ //// [tests/cases/conformance/externalModules/typeAndNamespaceExportMerge.ts] //// === constants.ts === -// @strict - export const COFFEE = 0; ->COFFEE : Symbol(COFFEE, Decl(constants.ts, 2, 12)) +>COFFEE : Symbol(COFFEE, Decl(constants.ts, 0, 12)) export const TEA = 1; ->TEA : Symbol(TEA, Decl(constants.ts, 3, 12)) +>TEA : Symbol(TEA, Decl(constants.ts, 1, 12)) === drink.ts === @@ -26,7 +24,7 @@ import { Drink } from "./drink"; const x: Drink = Drink.TEA; >x : Symbol(x, Decl(index.ts, 2, 5)) >Drink : Symbol(Drink, Decl(index.ts, 0, 8)) ->Drink.TEA : Symbol(TEA, Decl(constants.ts, 3, 12)) +>Drink.TEA : Symbol(TEA, Decl(constants.ts, 1, 12)) >Drink : Symbol(Drink, Decl(index.ts, 0, 8)) ->TEA : Symbol(TEA, Decl(constants.ts, 3, 12)) +>TEA : Symbol(TEA, Decl(constants.ts, 1, 12)) diff --git a/tests/baselines/reference/typeAndNamespaceExportMerge.types b/tests/baselines/reference/typeAndNamespaceExportMerge.types index 83ad9e35acc..94f6d8d5b9e 100644 --- a/tests/baselines/reference/typeAndNamespaceExportMerge.types +++ b/tests/baselines/reference/typeAndNamespaceExportMerge.types @@ -1,8 +1,6 @@ //// [tests/cases/conformance/externalModules/typeAndNamespaceExportMerge.ts] //// === constants.ts === -// @strict - export const COFFEE = 0; >COFFEE : 0 >0 : 0 diff --git a/tests/baselines/reference/typeReferenceDirectives3.js b/tests/baselines/reference/typeReferenceDirectives3.js index 28d57f93fe5..c305b67c03d 100644 --- a/tests/baselines/reference/typeReferenceDirectives3.js +++ b/tests/baselines/reference/typeReferenceDirectives3.js @@ -1,8 +1,6 @@ //// [tests/cases/compiler/typeReferenceDirectives3.ts] //// //// [ref.d.ts] -// $ comes from d.ts file - no need to add type reference directive - interface $ { x } //// [index.d.ts] diff --git a/tests/baselines/reference/typeReferenceDirectives3.symbols b/tests/baselines/reference/typeReferenceDirectives3.symbols index e621058f756..b7595869077 100644 --- a/tests/baselines/reference/typeReferenceDirectives3.symbols +++ b/tests/baselines/reference/typeReferenceDirectives3.symbols @@ -11,11 +11,9 @@ interface A { >$ : Symbol($, Decl(ref.d.ts, 0, 0), Decl(index.d.ts, 0, 11)) } === /ref.d.ts === -// $ comes from d.ts file - no need to add type reference directive - interface $ { x } >$ : Symbol($, Decl(ref.d.ts, 0, 0), Decl(index.d.ts, 0, 11)) ->x : Symbol($.x, Decl(ref.d.ts, 2, 13)) +>x : Symbol($.x, Decl(ref.d.ts, 0, 13)) === /types/lib/index.d.ts === declare let $: { x: number } diff --git a/tests/baselines/reference/typeReferenceDirectives3.types b/tests/baselines/reference/typeReferenceDirectives3.types index b05c126dd05..7f76c396ec2 100644 --- a/tests/baselines/reference/typeReferenceDirectives3.types +++ b/tests/baselines/reference/typeReferenceDirectives3.types @@ -8,8 +8,6 @@ interface A { >x : () => $ } === /ref.d.ts === -// $ comes from d.ts file - no need to add type reference directive - interface $ { x } >x : any diff --git a/tests/baselines/reference/typeReferenceDirectives4.js b/tests/baselines/reference/typeReferenceDirectives4.js index 6f26c2034ad..95480fe1400 100644 --- a/tests/baselines/reference/typeReferenceDirectives4.js +++ b/tests/baselines/reference/typeReferenceDirectives4.js @@ -1,8 +1,6 @@ //// [tests/cases/compiler/typeReferenceDirectives4.ts] //// //// [ref.d.ts] -// $ comes from d.ts file - no need to add type reference directive - interface $ { x } //// [index.d.ts] diff --git a/tests/baselines/reference/typeReferenceDirectives4.symbols b/tests/baselines/reference/typeReferenceDirectives4.symbols index 5c5ad704c27..9f15f87365c 100644 --- a/tests/baselines/reference/typeReferenceDirectives4.symbols +++ b/tests/baselines/reference/typeReferenceDirectives4.symbols @@ -13,11 +13,9 @@ let y = () => x >x : Symbol(x, Decl(app.ts, 3, 3)) === /ref.d.ts === -// $ comes from d.ts file - no need to add type reference directive - interface $ { x } >$ : Symbol($, Decl(ref.d.ts, 0, 0), Decl(index.d.ts, 0, 11)) ->x : Symbol($.x, Decl(ref.d.ts, 2, 13)) +>x : Symbol($.x, Decl(ref.d.ts, 0, 13)) === /types/lib/index.d.ts === declare let $: { x: number } diff --git a/tests/baselines/reference/typeReferenceDirectives4.types b/tests/baselines/reference/typeReferenceDirectives4.types index 21bee74f504..67ad28911dd 100644 --- a/tests/baselines/reference/typeReferenceDirectives4.types +++ b/tests/baselines/reference/typeReferenceDirectives4.types @@ -13,8 +13,6 @@ let y = () => x >x : $ === /ref.d.ts === -// $ comes from d.ts file - no need to add type reference directive - interface $ { x } >x : any diff --git a/tests/baselines/reference/typeReferenceDirectives6.js b/tests/baselines/reference/typeReferenceDirectives6.js index 1767acae1f8..e2d979b79c9 100644 --- a/tests/baselines/reference/typeReferenceDirectives6.js +++ b/tests/baselines/reference/typeReferenceDirectives6.js @@ -1,8 +1,6 @@ //// [tests/cases/compiler/typeReferenceDirectives6.ts] //// //// [ref.d.ts] -// $ comes from type declaration file - type reference directive should be added - declare let $: { x: number } //// [index.d.ts] diff --git a/tests/baselines/reference/typeReferenceDirectives6.symbols b/tests/baselines/reference/typeReferenceDirectives6.symbols index d13aa02a908..aefad426804 100644 --- a/tests/baselines/reference/typeReferenceDirectives6.symbols +++ b/tests/baselines/reference/typeReferenceDirectives6.symbols @@ -6,7 +6,7 @@ let x: $; >x : Symbol(x, Decl(app.ts, 3, 3)) ->$ : Symbol($, Decl(ref.d.ts, 2, 11), Decl(index.d.ts, 0, 0)) +>$ : Symbol($, Decl(ref.d.ts, 0, 11), Decl(index.d.ts, 0, 0)) let y = () => x >y : Symbol(y, Decl(app.ts, 4, 3)) @@ -14,15 +14,13 @@ let y = () => x === /ref.d.ts === -// $ comes from type declaration file - type reference directive should be added - declare let $: { x: number } ->$ : Symbol($, Decl(ref.d.ts, 2, 11), Decl(index.d.ts, 0, 0)) ->x : Symbol(x, Decl(ref.d.ts, 2, 16)) +>$ : Symbol($, Decl(ref.d.ts, 0, 11), Decl(index.d.ts, 0, 0)) +>x : Symbol(x, Decl(ref.d.ts, 0, 16)) === /types/lib/index.d.ts === interface $ { x } ->$ : Symbol($, Decl(ref.d.ts, 2, 11), Decl(index.d.ts, 0, 0)) +>$ : Symbol($, Decl(ref.d.ts, 0, 11), Decl(index.d.ts, 0, 0)) >x : Symbol($.x, Decl(index.d.ts, 0, 13)) diff --git a/tests/baselines/reference/typeReferenceDirectives6.types b/tests/baselines/reference/typeReferenceDirectives6.types index 9d5b61b526a..67d32fb1d70 100644 --- a/tests/baselines/reference/typeReferenceDirectives6.types +++ b/tests/baselines/reference/typeReferenceDirectives6.types @@ -14,8 +14,6 @@ let y = () => x === /ref.d.ts === -// $ comes from type declaration file - type reference directive should be added - declare let $: { x: number } >$ : { x: number; } >x : number diff --git a/tests/baselines/reference/typeReferenceDirectives7.js b/tests/baselines/reference/typeReferenceDirectives7.js index 44e5ee27e8d..962e151ff83 100644 --- a/tests/baselines/reference/typeReferenceDirectives7.js +++ b/tests/baselines/reference/typeReferenceDirectives7.js @@ -1,8 +1,6 @@ //// [tests/cases/compiler/typeReferenceDirectives7.ts] //// //// [index.d.ts] -// local value shadows global - no need to add type reference directive - declare let $: { x: number } diff --git a/tests/baselines/reference/typeReferenceDirectives7.symbols b/tests/baselines/reference/typeReferenceDirectives7.symbols index 8535fc26f6e..cfaa572afc0 100644 --- a/tests/baselines/reference/typeReferenceDirectives7.symbols +++ b/tests/baselines/reference/typeReferenceDirectives7.symbols @@ -15,10 +15,8 @@ export let y = () => x >x : Symbol(x, Decl(app.ts, 4, 10)) === /types/lib/index.d.ts === -// local value shadows global - no need to add type reference directive - declare let $: { x: number } ->$ : Symbol($, Decl(index.d.ts, 2, 11)) ->x : Symbol(x, Decl(index.d.ts, 2, 16)) +>$ : Symbol($, Decl(index.d.ts, 0, 11)) +>x : Symbol(x, Decl(index.d.ts, 0, 16)) diff --git a/tests/baselines/reference/typeReferenceDirectives7.types b/tests/baselines/reference/typeReferenceDirectives7.types index 8a072695347..0973e13b077 100644 --- a/tests/baselines/reference/typeReferenceDirectives7.types +++ b/tests/baselines/reference/typeReferenceDirectives7.types @@ -17,8 +17,6 @@ export let y = () => x >x : number === /types/lib/index.d.ts === -// local value shadows global - no need to add type reference directive - declare let $: { x: number } >$ : { x: number; } >x : number diff --git a/tests/baselines/reference/typeofImportInstantiationExpression.js b/tests/baselines/reference/typeofImportInstantiationExpression.js index a14ad91153d..b2da161fc2b 100644 --- a/tests/baselines/reference/typeofImportInstantiationExpression.js +++ b/tests/baselines/reference/typeofImportInstantiationExpression.js @@ -1,10 +1,6 @@ //// [tests/cases/compiler/typeofImportInstantiationExpression.ts] //// //// [input.ts] -// @strict - -// Repro from #52248 - interface Arg = Record> { "__is_argument__"?: true; meta?: T; @@ -20,7 +16,6 @@ type T2 = typeof import('./input.js').myFunction; //// [input.js] "use strict"; -// @strict Object.defineProperty(exports, "__esModule", { value: true }); exports.myFunction = void 0; function myFunction(arg) { return (arg.params || {}); } diff --git a/tests/baselines/reference/typeofImportInstantiationExpression.symbols b/tests/baselines/reference/typeofImportInstantiationExpression.symbols index 01b5223a7ad..aa723d48550 100644 --- a/tests/baselines/reference/typeofImportInstantiationExpression.symbols +++ b/tests/baselines/reference/typeofImportInstantiationExpression.symbols @@ -1,51 +1,47 @@ //// [tests/cases/compiler/typeofImportInstantiationExpression.ts] //// === input.ts === -// @strict - -// Repro from #52248 - interface Arg = Record> { >Arg : Symbol(Arg, Decl(input.ts, 0, 0)) ->T : Symbol(T, Decl(input.ts, 4, 14)) ->Params : Symbol(Params, Decl(input.ts, 4, 22)) +>T : Symbol(T, Decl(input.ts, 0, 14)) +>Params : Symbol(Params, Decl(input.ts, 0, 22)) >Record : Symbol(Record, Decl(lib.es5.d.ts, --, --)) >Record : Symbol(Record, Decl(lib.es5.d.ts, --, --)) "__is_argument__"?: true; ->"__is_argument__" : Symbol(Arg["__is_argument__"], Decl(input.ts, 4, 82)) +>"__is_argument__" : Symbol(Arg["__is_argument__"], Decl(input.ts, 0, 82)) meta?: T; ->meta : Symbol(Arg.meta, Decl(input.ts, 5, 29)) ->T : Symbol(T, Decl(input.ts, 4, 14)) +>meta : Symbol(Arg.meta, Decl(input.ts, 1, 29)) +>T : Symbol(T, Decl(input.ts, 0, 14)) params?: Params; ->params : Symbol(Arg.params, Decl(input.ts, 6, 13)) ->Params : Symbol(Params, Decl(input.ts, 4, 22)) +>params : Symbol(Arg.params, Decl(input.ts, 2, 13)) +>Params : Symbol(Params, Decl(input.ts, 0, 22)) } export function myFunction = Record>(arg: Arg) { return (arg.params || {}) as U } ->myFunction : Symbol(myFunction, Decl(input.ts, 8, 1)) ->T : Symbol(T, Decl(input.ts, 10, 27)) ->U : Symbol(U, Decl(input.ts, 10, 35)) +>myFunction : Symbol(myFunction, Decl(input.ts, 4, 1)) +>T : Symbol(T, Decl(input.ts, 6, 27)) +>U : Symbol(U, Decl(input.ts, 6, 35)) >Record : Symbol(Record, Decl(lib.es5.d.ts, --, --)) >Record : Symbol(Record, Decl(lib.es5.d.ts, --, --)) ->arg : Symbol(arg, Decl(input.ts, 10, 89)) +>arg : Symbol(arg, Decl(input.ts, 6, 89)) >Arg : Symbol(Arg, Decl(input.ts, 0, 0)) ->T : Symbol(T, Decl(input.ts, 10, 27)) ->U : Symbol(U, Decl(input.ts, 10, 35)) ->arg.params : Symbol(Arg.params, Decl(input.ts, 6, 13)) ->arg : Symbol(arg, Decl(input.ts, 10, 89)) ->params : Symbol(Arg.params, Decl(input.ts, 6, 13)) ->U : Symbol(U, Decl(input.ts, 10, 35)) +>T : Symbol(T, Decl(input.ts, 6, 27)) +>U : Symbol(U, Decl(input.ts, 6, 35)) +>arg.params : Symbol(Arg.params, Decl(input.ts, 2, 13)) +>arg : Symbol(arg, Decl(input.ts, 6, 89)) +>params : Symbol(Arg.params, Decl(input.ts, 2, 13)) +>U : Symbol(U, Decl(input.ts, 6, 35)) === main.ts === type T1 = typeof import('./input.js').myFunction; >T1 : Symbol(T1, Decl(main.ts, 0, 0)) ->myFunction : Symbol(myFunction, Decl(input.ts, 8, 1)) +>myFunction : Symbol(myFunction, Decl(input.ts, 4, 1)) type T2 = typeof import('./input.js').myFunction; >T2 : Symbol(T2, Decl(main.ts, 0, 49)) ->myFunction : Symbol(myFunction, Decl(input.ts, 8, 1)) +>myFunction : Symbol(myFunction, Decl(input.ts, 4, 1)) >slug : Symbol(slug, Decl(main.ts, 1, 55)) diff --git a/tests/baselines/reference/typeofImportInstantiationExpression.types b/tests/baselines/reference/typeofImportInstantiationExpression.types index dfc281a38e0..7ee8a5c1d9a 100644 --- a/tests/baselines/reference/typeofImportInstantiationExpression.types +++ b/tests/baselines/reference/typeofImportInstantiationExpression.types @@ -1,10 +1,6 @@ //// [tests/cases/compiler/typeofImportInstantiationExpression.ts] //// === input.ts === -// @strict - -// Repro from #52248 - interface Arg = Record> { "__is_argument__"?: true; >"__is_argument__" : true diff --git a/tests/baselines/reference/unicodeEscapesInNames02(target=es2015).errors.txt b/tests/baselines/reference/unicodeEscapesInNames02(target=es2015).errors.txt index 2b476471c81..de53e2b1953 100644 --- a/tests/baselines/reference/unicodeEscapesInNames02(target=es2015).errors.txt +++ b/tests/baselines/reference/unicodeEscapesInNames02(target=es2015).errors.txt @@ -5,9 +5,6 @@ astralAsSurrogatePair.ts(1,24): error TS2305: Module '"./extendedEscapesForAstra ==== extendedEscapesForAstralsInVarsAndClasses.ts (0 errors) ==== - // Example from https://mathiasbynens.be/notes/javascript-identifiers-es6 - // Astral characters should be accepted in ES2015 - // U+102A7 CARIAN LETTER A2 var 𐊧: string; var \u{102A7}: string; diff --git a/tests/baselines/reference/unicodeEscapesInNames02(target=es2015).js b/tests/baselines/reference/unicodeEscapesInNames02(target=es2015).js index 1fd325e6d62..fb37c4b3387 100644 --- a/tests/baselines/reference/unicodeEscapesInNames02(target=es2015).js +++ b/tests/baselines/reference/unicodeEscapesInNames02(target=es2015).js @@ -1,9 +1,6 @@ //// [tests/cases/compiler/unicodeEscapesInNames02.ts] //// //// [extendedEscapesForAstralsInVarsAndClasses.ts] -// Example from https://mathiasbynens.be/notes/javascript-identifiers-es6 -// Astral characters should be accepted in ES2015 - // U+102A7 CARIAN LETTER A2 var 𐊧: string; var \u{102A7}: string; @@ -34,8 +31,6 @@ import { _𐊧 as \uD800\uDEA7 } from "./extendedEscapesForAstralsInVarsAndClass //// [extendedEscapesForAstralsInVarsAndClasses.js] -// Example from https://mathiasbynens.be/notes/javascript-identifiers-es6 -// Astral characters should be accepted in ES2015 // U+102A7 CARIAN LETTER A2 var 𐊧; var \u{102A7}; diff --git a/tests/baselines/reference/unicodeEscapesInNames02(target=es2015).js.map b/tests/baselines/reference/unicodeEscapesInNames02(target=es2015).js.map index 53c522a2a7c..8eb7b3f65ea 100644 --- a/tests/baselines/reference/unicodeEscapesInNames02(target=es2015).js.map +++ b/tests/baselines/reference/unicodeEscapesInNames02(target=es2015).js.map @@ -1,6 +1,6 @@ //// [extendedEscapesForAstralsInVarsAndClasses.js.map] -{"version":3,"file":"extendedEscapesForAstralsInVarsAndClasses.js","sourceRoot":"","sources":["extendedEscapesForAstralsInVarsAndClasses.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,iDAAiD;AAEjD,2BAA2B;AAC3B,IAAI,EAAU,CAAC;AACf,IAAI,SAAiB,CAAC;AAEtB,IAAI,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC;IAChB,EAAE,GAAG,OAAO,CAAC;AACjB,CAAC;KACI,CAAC;IACF,SAAS,GAAG,OAAO,CAAC;AACxB,CAAC;AAED,MAAM,GAAG;IAEL;QACI,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;IAC9B,CAAC;IACD,OAAO;QACH,OAAO,IAAI,CAAC,EAAE,CAAC;IACnB,CAAC;CACJ;AAED,MAAM,CAAC,IAAI,GAAG,GAAG,IAAI,GAAG,EAAE,CAAC,SAAS,GAAG,IAAI,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC;AAE3D,UAAU,IAAI,GAAG,CAAC"} -//// https://sokra.github.io/source-map-visualization#base64,Ly8gRXhhbXBsZSBmcm9tIGh0dHBzOi8vbWF0aGlhc2J5bmVucy5iZS9ub3Rlcy9qYXZhc2NyaXB0LWlkZW50aWZpZXJzLWVzNg0KLy8gQXN0cmFsIGNoYXJhY3RlcnMgc2hvdWxkIGJlIGFjY2VwdGVkIGluIEVTMjAxNQ0KLy8gVSsxMDJBNyBDQVJJQU4gTEVUVEVSIEEyDQp2YXIg7aCA7bqnOw0KdmFyIFx1ezEwMkE3fTsNCmlmIChNYXRoLnJhbmRvbSgpKSB7DQogICAg7aCA7bqnID0gImhlbGxvIjsNCn0NCmVsc2Ugew0KICAgIFx1ezEwMkE3fSA9ICJoYWxsbyI7DQp9DQpjbGFzcyBGb28gew0KICAgIGNvbnN0cnVjdG9yKCkgew0KICAgICAgICB0aGlzLlx1ezEwMkE3fSA9ICIgd29ybGQiOw0KICAgIH0NCiAgICBtZXRob2RBKCkgew0KICAgICAgICByZXR1cm4gdGhpcy7toIDtuqc7DQogICAgfQ0KfQ0KZXhwb3J0IHZhciBf7aCA7bqnID0gbmV3IEZvbygpLlx1ezEwMkE3fSArIG5ldyBGb28oKS5tZXRob2RBKCk7DQpfXHV7MTAyQTd9ICs9ICIhIjsNCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWV4dGVuZGVkRXNjYXBlc0ZvckFzdHJhbHNJblZhcnNBbmRDbGFzc2VzLmpzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXh0ZW5kZWRFc2NhcGVzRm9yQXN0cmFsc0luVmFyc0FuZENsYXNzZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJleHRlbmRlZEVzY2FwZXNGb3JBc3RyYWxzSW5WYXJzQW5kQ2xhc3Nlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSx5RUFBeUU7QUFDekUsaURBQWlEO0FBRWpELDJCQUEyQjtBQUMzQixJQUFJLEVBQVUsQ0FBQztBQUNmLElBQUksU0FBaUIsQ0FBQztBQUV0QixJQUFJLElBQUksQ0FBQyxNQUFNLEVBQUUsRUFBRSxDQUFDO0lBQ2hCLEVBQUUsR0FBRyxPQUFPLENBQUM7QUFDakIsQ0FBQztLQUNJLENBQUM7SUFDRixTQUFTLEdBQUcsT0FBTyxDQUFDO0FBQ3hCLENBQUM7QUFFRCxNQUFNLEdBQUc7SUFFTDtRQUNJLElBQUksQ0FBQyxTQUFTLEdBQUcsUUFBUSxDQUFDO0lBQzlCLENBQUM7SUFDRCxPQUFPO1FBQ0gsT0FBTyxJQUFJLENBQUMsRUFBRSxDQUFDO0lBQ25CLENBQUM7Q0FDSjtBQUVELE1BQU0sQ0FBQyxJQUFJLEdBQUcsR0FBRyxJQUFJLEdBQUcsRUFBRSxDQUFDLFNBQVMsR0FBRyxJQUFJLEdBQUcsRUFBRSxDQUFDLE9BQU8sRUFBRSxDQUFDO0FBRTNELFVBQVUsSUFBSSxHQUFHLENBQUMifQ==,Ly8gRXhhbXBsZSBmcm9tIGh0dHBzOi8vbWF0aGlhc2J5bmVucy5iZS9ub3Rlcy9qYXZhc2NyaXB0LWlkZW50aWZpZXJzLWVzNgovLyBBc3RyYWwgY2hhcmFjdGVycyBzaG91bGQgYmUgYWNjZXB0ZWQgaW4gRVMyMDE1CgovLyBVKzEwMkE3IENBUklBTiBMRVRURVIgQTIKdmFyIO2ggO26pzogc3RyaW5nOwp2YXIgXHV7MTAyQTd9OiBzdHJpbmc7CgppZiAoTWF0aC5yYW5kb20oKSkgewogICAg7aCA7bqnID0gImhlbGxvIjsKfQplbHNlIHsKICAgIFx1ezEwMkE3fSA9ICJoYWxsbyI7Cn0KCmNsYXNzIEZvbyB7CiAgICBcdXsxMDJBN306IHN0cmluZzsKICAgIGNvbnN0cnVjdG9yKCkgewogICAgICAgIHRoaXMuXHV7MTAyQTd9ID0gIiB3b3JsZCI7CiAgICB9CiAgICBtZXRob2RBKCkgewogICAgICAgIHJldHVybiB0aGlzLu2ggO26pzsKICAgIH0KfQoKZXhwb3J0IHZhciBf7aCA7bqnID0gbmV3IEZvbygpLlx1ezEwMkE3fSArIG5ldyBGb28oKS5tZXRob2RBKCk7CgpfXHV7MTAyQTd9ICs9ICIhIjsK +{"version":3,"file":"extendedEscapesForAstralsInVarsAndClasses.js","sourceRoot":"","sources":["extendedEscapesForAstralsInVarsAndClasses.ts"],"names":[],"mappings":"AAAA,2BAA2B;AAC3B,IAAI,EAAU,CAAC;AACf,IAAI,SAAiB,CAAC;AAEtB,IAAI,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC;IAChB,EAAE,GAAG,OAAO,CAAC;AACjB,CAAC;KACI,CAAC;IACF,SAAS,GAAG,OAAO,CAAC;AACxB,CAAC;AAED,MAAM,GAAG;IAEL;QACI,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;IAC9B,CAAC;IACD,OAAO;QACH,OAAO,IAAI,CAAC,EAAE,CAAC;IACnB,CAAC;CACJ;AAED,MAAM,CAAC,IAAI,GAAG,GAAG,IAAI,GAAG,EAAE,CAAC,SAAS,GAAG,IAAI,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC;AAE3D,UAAU,IAAI,GAAG,CAAC"} +//// https://sokra.github.io/source-map-visualization#base64,Ly8gVSsxMDJBNyBDQVJJQU4gTEVUVEVSIEEyDQp2YXIg7aCA7bqnOw0KdmFyIFx1ezEwMkE3fTsNCmlmIChNYXRoLnJhbmRvbSgpKSB7DQogICAg7aCA7bqnID0gImhlbGxvIjsNCn0NCmVsc2Ugew0KICAgIFx1ezEwMkE3fSA9ICJoYWxsbyI7DQp9DQpjbGFzcyBGb28gew0KICAgIGNvbnN0cnVjdG9yKCkgew0KICAgICAgICB0aGlzLlx1ezEwMkE3fSA9ICIgd29ybGQiOw0KICAgIH0NCiAgICBtZXRob2RBKCkgew0KICAgICAgICByZXR1cm4gdGhpcy7toIDtuqc7DQogICAgfQ0KfQ0KZXhwb3J0IHZhciBf7aCA7bqnID0gbmV3IEZvbygpLlx1ezEwMkE3fSArIG5ldyBGb28oKS5tZXRob2RBKCk7DQpfXHV7MTAyQTd9ICs9ICIhIjsNCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWV4dGVuZGVkRXNjYXBlc0ZvckFzdHJhbHNJblZhcnNBbmRDbGFzc2VzLmpzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXh0ZW5kZWRFc2NhcGVzRm9yQXN0cmFsc0luVmFyc0FuZENsYXNzZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJleHRlbmRlZEVzY2FwZXNGb3JBc3RyYWxzSW5WYXJzQW5kQ2xhc3Nlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSwyQkFBMkI7QUFDM0IsSUFBSSxFQUFVLENBQUM7QUFDZixJQUFJLFNBQWlCLENBQUM7QUFFdEIsSUFBSSxJQUFJLENBQUMsTUFBTSxFQUFFLEVBQUUsQ0FBQztJQUNoQixFQUFFLEdBQUcsT0FBTyxDQUFDO0FBQ2pCLENBQUM7S0FDSSxDQUFDO0lBQ0YsU0FBUyxHQUFHLE9BQU8sQ0FBQztBQUN4QixDQUFDO0FBRUQsTUFBTSxHQUFHO0lBRUw7UUFDSSxJQUFJLENBQUMsU0FBUyxHQUFHLFFBQVEsQ0FBQztJQUM5QixDQUFDO0lBQ0QsT0FBTztRQUNILE9BQU8sSUFBSSxDQUFDLEVBQUUsQ0FBQztJQUNuQixDQUFDO0NBQ0o7QUFFRCxNQUFNLENBQUMsSUFBSSxHQUFHLEdBQUcsSUFBSSxHQUFHLEVBQUUsQ0FBQyxTQUFTLEdBQUcsSUFBSSxHQUFHLEVBQUUsQ0FBQyxPQUFPLEVBQUUsQ0FBQztBQUUzRCxVQUFVLElBQUksR0FBRyxDQUFDIn0=,Ly8gVSsxMDJBNyBDQVJJQU4gTEVUVEVSIEEyCnZhciDtoIDtuqc6IHN0cmluZzsKdmFyIFx1ezEwMkE3fTogc3RyaW5nOwoKaWYgKE1hdGgucmFuZG9tKCkpIHsKICAgIO2ggO26pyA9ICJoZWxsbyI7Cn0KZWxzZSB7CiAgICBcdXsxMDJBN30gPSAiaGFsbG8iOwp9CgpjbGFzcyBGb28gewogICAgXHV7MTAyQTd9OiBzdHJpbmc7CiAgICBjb25zdHJ1Y3RvcigpIHsKICAgICAgICB0aGlzLlx1ezEwMkE3fSA9ICIgd29ybGQiOwogICAgfQogICAgbWV0aG9kQSgpIHsKICAgICAgICByZXR1cm4gdGhpcy7toIDtuqc7CiAgICB9Cn0KCmV4cG9ydCB2YXIgX+2ggO26pyA9IG5ldyBGb28oKS5cdXsxMDJBN30gKyBuZXcgRm9vKCkubWV0aG9kQSgpOwoKX1x1ezEwMkE3fSArPSAiISI7Cg== //// [astralAsSurrogatePair.js.map] {"version":3,"file":"astralAsSurrogatePair.js","sourceRoot":"","sources":["astralAsSurrogatePair.ts"],"names":[],"mappings":""} diff --git a/tests/baselines/reference/unicodeEscapesInNames02(target=es2015).sourcemap.txt b/tests/baselines/reference/unicodeEscapesInNames02(target=es2015).sourcemap.txt index af69fe5a148..e9ffa88cad7 100644 --- a/tests/baselines/reference/unicodeEscapesInNames02(target=es2015).sourcemap.txt +++ b/tests/baselines/reference/unicodeEscapesInNames02(target=es2015).sourcemap.txt @@ -8,32 +8,13 @@ sources: extendedEscapesForAstralsInVarsAndClasses.ts emittedFile:extendedEscapesForAstralsInVarsAndClasses.js sourceFile:extendedEscapesForAstralsInVarsAndClasses.ts ------------------------------------------------------------------- ->>>// Example from https://mathiasbynens.be/notes/javascript-identifiers-es6 -1 > -2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -1 > -2 >// Example from https://mathiasbynens.be/notes/javascript-identifiers-es6 -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 74) Source(1, 74) + SourceIndex(0) ---- ->>>// Astral characters should be accepted in ES2015 -1 > -2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -1 > - > -2 >// Astral characters should be accepted in ES2015 -1 >Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 50) Source(2, 50) + SourceIndex(0) ---- >>>// U+102A7 CARIAN LETTER A2 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^ -1 > - > - > +1 > 2 >// U+102A7 CARIAN LETTER A2 -1 >Emitted(3, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(3, 28) Source(4, 28) + SourceIndex(0) +1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(1, 28) Source(1, 28) + SourceIndex(0) --- >>>var 𐊧; 1 > @@ -46,10 +27,10 @@ sourceFile:extendedEscapesForAstralsInVarsAndClasses.ts 2 >var 3 > 𐊧: string 4 > ; -1 >Emitted(4, 1) Source(5, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(5, 5) + SourceIndex(0) -3 >Emitted(4, 7) Source(5, 15) + SourceIndex(0) -4 >Emitted(4, 8) Source(5, 16) + SourceIndex(0) +1 >Emitted(2, 1) Source(2, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(2, 5) + SourceIndex(0) +3 >Emitted(2, 7) Source(2, 15) + SourceIndex(0) +4 >Emitted(2, 8) Source(2, 16) + SourceIndex(0) --- >>>var \u{102A7}; 1-> @@ -62,10 +43,10 @@ sourceFile:extendedEscapesForAstralsInVarsAndClasses.ts 2 >var 3 > \u{102A7}: string 4 > ; -1->Emitted(5, 1) Source(6, 1) + SourceIndex(0) -2 >Emitted(5, 5) Source(6, 5) + SourceIndex(0) -3 >Emitted(5, 14) Source(6, 22) + SourceIndex(0) -4 >Emitted(5, 15) Source(6, 23) + SourceIndex(0) +1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) +2 >Emitted(3, 5) Source(3, 5) + SourceIndex(0) +3 >Emitted(3, 14) Source(3, 22) + SourceIndex(0) +4 >Emitted(3, 15) Source(3, 23) + SourceIndex(0) --- >>>if (Math.random()) { 1-> @@ -86,14 +67,14 @@ sourceFile:extendedEscapesForAstralsInVarsAndClasses.ts 6 > () 7 > ) 8 > { -1->Emitted(6, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(6, 5) Source(8, 5) + SourceIndex(0) -3 >Emitted(6, 9) Source(8, 9) + SourceIndex(0) -4 >Emitted(6, 10) Source(8, 10) + SourceIndex(0) -5 >Emitted(6, 16) Source(8, 16) + SourceIndex(0) -6 >Emitted(6, 18) Source(8, 18) + SourceIndex(0) -7 >Emitted(6, 20) Source(8, 20) + SourceIndex(0) -8 >Emitted(6, 21) Source(8, 21) + SourceIndex(0) +1->Emitted(4, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(4, 5) Source(5, 5) + SourceIndex(0) +3 >Emitted(4, 9) Source(5, 9) + SourceIndex(0) +4 >Emitted(4, 10) Source(5, 10) + SourceIndex(0) +5 >Emitted(4, 16) Source(5, 16) + SourceIndex(0) +6 >Emitted(4, 18) Source(5, 18) + SourceIndex(0) +7 >Emitted(4, 20) Source(5, 20) + SourceIndex(0) +8 >Emitted(4, 21) Source(5, 21) + SourceIndex(0) --- >>> 𐊧 = "hello"; 1 >^^^^ @@ -107,11 +88,11 @@ sourceFile:extendedEscapesForAstralsInVarsAndClasses.ts 3 > = 4 > "hello" 5 > ; -1 >Emitted(7, 5) Source(9, 5) + SourceIndex(0) -2 >Emitted(7, 7) Source(9, 7) + SourceIndex(0) -3 >Emitted(7, 10) Source(9, 10) + SourceIndex(0) -4 >Emitted(7, 17) Source(9, 17) + SourceIndex(0) -5 >Emitted(7, 18) Source(9, 18) + SourceIndex(0) +1 >Emitted(5, 5) Source(6, 5) + SourceIndex(0) +2 >Emitted(5, 7) Source(6, 7) + SourceIndex(0) +3 >Emitted(5, 10) Source(6, 10) + SourceIndex(0) +4 >Emitted(5, 17) Source(6, 17) + SourceIndex(0) +5 >Emitted(5, 18) Source(6, 18) + SourceIndex(0) --- >>>} 1 > @@ -120,8 +101,8 @@ sourceFile:extendedEscapesForAstralsInVarsAndClasses.ts 1 > > 2 >} -1 >Emitted(8, 1) Source(10, 1) + SourceIndex(0) -2 >Emitted(8, 2) Source(10, 2) + SourceIndex(0) +1 >Emitted(6, 1) Source(7, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(7, 2) + SourceIndex(0) --- >>>else { 1->^^^^^ @@ -130,8 +111,8 @@ sourceFile:extendedEscapesForAstralsInVarsAndClasses.ts 1-> >else 2 > { -1->Emitted(9, 6) Source(11, 6) + SourceIndex(0) -2 >Emitted(9, 7) Source(11, 7) + SourceIndex(0) +1->Emitted(7, 6) Source(8, 6) + SourceIndex(0) +2 >Emitted(7, 7) Source(8, 7) + SourceIndex(0) --- >>> \u{102A7} = "hallo"; 1->^^^^ @@ -145,11 +126,11 @@ sourceFile:extendedEscapesForAstralsInVarsAndClasses.ts 3 > = 4 > "hallo" 5 > ; -1->Emitted(10, 5) Source(12, 5) + SourceIndex(0) -2 >Emitted(10, 14) Source(12, 14) + SourceIndex(0) -3 >Emitted(10, 17) Source(12, 17) + SourceIndex(0) -4 >Emitted(10, 24) Source(12, 24) + SourceIndex(0) -5 >Emitted(10, 25) Source(12, 25) + SourceIndex(0) +1->Emitted(8, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(8, 14) Source(9, 14) + SourceIndex(0) +3 >Emitted(8, 17) Source(9, 17) + SourceIndex(0) +4 >Emitted(8, 24) Source(9, 24) + SourceIndex(0) +5 >Emitted(8, 25) Source(9, 25) + SourceIndex(0) --- >>>} 1 > @@ -158,8 +139,8 @@ sourceFile:extendedEscapesForAstralsInVarsAndClasses.ts 1 > > 2 >} -1 >Emitted(11, 1) Source(13, 1) + SourceIndex(0) -2 >Emitted(11, 2) Source(13, 2) + SourceIndex(0) +1 >Emitted(9, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(9, 2) Source(10, 2) + SourceIndex(0) --- >>>class Foo { 1-> @@ -171,9 +152,9 @@ sourceFile:extendedEscapesForAstralsInVarsAndClasses.ts > 2 >class 3 > Foo -1->Emitted(12, 1) Source(15, 1) + SourceIndex(0) -2 >Emitted(12, 7) Source(15, 7) + SourceIndex(0) -3 >Emitted(12, 10) Source(15, 10) + SourceIndex(0) +1->Emitted(10, 1) Source(12, 1) + SourceIndex(0) +2 >Emitted(10, 7) Source(12, 7) + SourceIndex(0) +3 >Emitted(10, 10) Source(12, 10) + SourceIndex(0) --- >>> constructor() { 1->^^^^ @@ -181,7 +162,7 @@ sourceFile:extendedEscapesForAstralsInVarsAndClasses.ts 1-> { > \u{102A7}: string; > -1->Emitted(13, 5) Source(17, 5) + SourceIndex(0) +1->Emitted(11, 5) Source(14, 5) + SourceIndex(0) --- >>> this.\u{102A7} = " world"; 1->^^^^^^^^ @@ -199,13 +180,13 @@ sourceFile:extendedEscapesForAstralsInVarsAndClasses.ts 5 > = 6 > " world" 7 > ; -1->Emitted(14, 9) Source(18, 9) + SourceIndex(0) -2 >Emitted(14, 13) Source(18, 13) + SourceIndex(0) -3 >Emitted(14, 14) Source(18, 14) + SourceIndex(0) -4 >Emitted(14, 23) Source(18, 23) + SourceIndex(0) -5 >Emitted(14, 26) Source(18, 26) + SourceIndex(0) -6 >Emitted(14, 34) Source(18, 34) + SourceIndex(0) -7 >Emitted(14, 35) Source(18, 35) + SourceIndex(0) +1->Emitted(12, 9) Source(15, 9) + SourceIndex(0) +2 >Emitted(12, 13) Source(15, 13) + SourceIndex(0) +3 >Emitted(12, 14) Source(15, 14) + SourceIndex(0) +4 >Emitted(12, 23) Source(15, 23) + SourceIndex(0) +5 >Emitted(12, 26) Source(15, 26) + SourceIndex(0) +6 >Emitted(12, 34) Source(15, 34) + SourceIndex(0) +7 >Emitted(12, 35) Source(15, 35) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -214,8 +195,8 @@ sourceFile:extendedEscapesForAstralsInVarsAndClasses.ts 1 > > 2 > } -1 >Emitted(15, 5) Source(19, 5) + SourceIndex(0) -2 >Emitted(15, 6) Source(19, 6) + SourceIndex(0) +1 >Emitted(13, 5) Source(16, 5) + SourceIndex(0) +2 >Emitted(13, 6) Source(16, 6) + SourceIndex(0) --- >>> methodA() { 1->^^^^ @@ -224,8 +205,8 @@ sourceFile:extendedEscapesForAstralsInVarsAndClasses.ts 1-> > 2 > methodA -1->Emitted(16, 5) Source(20, 5) + SourceIndex(0) -2 >Emitted(16, 12) Source(20, 12) + SourceIndex(0) +1->Emitted(14, 5) Source(17, 5) + SourceIndex(0) +2 >Emitted(14, 12) Source(17, 12) + SourceIndex(0) --- >>> return this.𐊧; 1->^^^^^^^^ @@ -241,12 +222,12 @@ sourceFile:extendedEscapesForAstralsInVarsAndClasses.ts 4 > . 5 > 𐊧 6 > ; -1->Emitted(17, 9) Source(21, 9) + SourceIndex(0) -2 >Emitted(17, 16) Source(21, 16) + SourceIndex(0) -3 >Emitted(17, 20) Source(21, 20) + SourceIndex(0) -4 >Emitted(17, 21) Source(21, 21) + SourceIndex(0) -5 >Emitted(17, 23) Source(21, 23) + SourceIndex(0) -6 >Emitted(17, 24) Source(21, 24) + SourceIndex(0) +1->Emitted(15, 9) Source(18, 9) + SourceIndex(0) +2 >Emitted(15, 16) Source(18, 16) + SourceIndex(0) +3 >Emitted(15, 20) Source(18, 20) + SourceIndex(0) +4 >Emitted(15, 21) Source(18, 21) + SourceIndex(0) +5 >Emitted(15, 23) Source(18, 23) + SourceIndex(0) +6 >Emitted(15, 24) Source(18, 24) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -254,15 +235,15 @@ sourceFile:extendedEscapesForAstralsInVarsAndClasses.ts 1 > > 2 > } -1 >Emitted(18, 5) Source(22, 5) + SourceIndex(0) -2 >Emitted(18, 6) Source(22, 6) + SourceIndex(0) +1 >Emitted(16, 5) Source(19, 5) + SourceIndex(0) +2 >Emitted(16, 6) Source(19, 6) + SourceIndex(0) --- >>>} 1 >^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > >} -1 >Emitted(19, 2) Source(23, 2) + SourceIndex(0) +1 >Emitted(17, 2) Source(20, 2) + SourceIndex(0) --- >>>export var _𐊧 = new Foo().\u{102A7} + new Foo().methodA(); 1-> @@ -305,25 +286,25 @@ sourceFile:extendedEscapesForAstralsInVarsAndClasses.ts 17> methodA 18> () 19> ; -1->Emitted(20, 1) Source(25, 1) + SourceIndex(0) -2 >Emitted(20, 7) Source(25, 7) + SourceIndex(0) -3 >Emitted(20, 8) Source(25, 8) + SourceIndex(0) -4 >Emitted(20, 12) Source(25, 12) + SourceIndex(0) -5 >Emitted(20, 15) Source(25, 15) + SourceIndex(0) -6 >Emitted(20, 18) Source(25, 18) + SourceIndex(0) -7 >Emitted(20, 22) Source(25, 22) + SourceIndex(0) -8 >Emitted(20, 25) Source(25, 25) + SourceIndex(0) -9 >Emitted(20, 27) Source(25, 27) + SourceIndex(0) -10>Emitted(20, 28) Source(25, 28) + SourceIndex(0) -11>Emitted(20, 37) Source(25, 37) + SourceIndex(0) -12>Emitted(20, 40) Source(25, 40) + SourceIndex(0) -13>Emitted(20, 44) Source(25, 44) + SourceIndex(0) -14>Emitted(20, 47) Source(25, 47) + SourceIndex(0) -15>Emitted(20, 49) Source(25, 49) + SourceIndex(0) -16>Emitted(20, 50) Source(25, 50) + SourceIndex(0) -17>Emitted(20, 57) Source(25, 57) + SourceIndex(0) -18>Emitted(20, 59) Source(25, 59) + SourceIndex(0) -19>Emitted(20, 60) Source(25, 60) + SourceIndex(0) +1->Emitted(18, 1) Source(22, 1) + SourceIndex(0) +2 >Emitted(18, 7) Source(22, 7) + SourceIndex(0) +3 >Emitted(18, 8) Source(22, 8) + SourceIndex(0) +4 >Emitted(18, 12) Source(22, 12) + SourceIndex(0) +5 >Emitted(18, 15) Source(22, 15) + SourceIndex(0) +6 >Emitted(18, 18) Source(22, 18) + SourceIndex(0) +7 >Emitted(18, 22) Source(22, 22) + SourceIndex(0) +8 >Emitted(18, 25) Source(22, 25) + SourceIndex(0) +9 >Emitted(18, 27) Source(22, 27) + SourceIndex(0) +10>Emitted(18, 28) Source(22, 28) + SourceIndex(0) +11>Emitted(18, 37) Source(22, 37) + SourceIndex(0) +12>Emitted(18, 40) Source(22, 40) + SourceIndex(0) +13>Emitted(18, 44) Source(22, 44) + SourceIndex(0) +14>Emitted(18, 47) Source(22, 47) + SourceIndex(0) +15>Emitted(18, 49) Source(22, 49) + SourceIndex(0) +16>Emitted(18, 50) Source(22, 50) + SourceIndex(0) +17>Emitted(18, 57) Source(22, 57) + SourceIndex(0) +18>Emitted(18, 59) Source(22, 59) + SourceIndex(0) +19>Emitted(18, 60) Source(22, 60) + SourceIndex(0) --- >>>_\u{102A7} += "!"; 1 > @@ -339,11 +320,11 @@ sourceFile:extendedEscapesForAstralsInVarsAndClasses.ts 3 > += 4 > "!" 5 > ; -1 >Emitted(21, 1) Source(27, 1) + SourceIndex(0) -2 >Emitted(21, 11) Source(27, 11) + SourceIndex(0) -3 >Emitted(21, 15) Source(27, 15) + SourceIndex(0) -4 >Emitted(21, 18) Source(27, 18) + SourceIndex(0) -5 >Emitted(21, 19) Source(27, 19) + SourceIndex(0) +1 >Emitted(19, 1) Source(24, 1) + SourceIndex(0) +2 >Emitted(19, 11) Source(24, 11) + SourceIndex(0) +3 >Emitted(19, 15) Source(24, 15) + SourceIndex(0) +4 >Emitted(19, 18) Source(24, 18) + SourceIndex(0) +5 >Emitted(19, 19) Source(24, 19) + SourceIndex(0) --- >>>//# sourceMappingURL=extendedEscapesForAstralsInVarsAndClasses.js.map=================================================================== JsFile: astralAsSurrogatePair.js diff --git a/tests/baselines/reference/unicodeEscapesInNames02(target=es2015).symbols b/tests/baselines/reference/unicodeEscapesInNames02(target=es2015).symbols index 06c474c8dba..85df1f8dc05 100644 --- a/tests/baselines/reference/unicodeEscapesInNames02(target=es2015).symbols +++ b/tests/baselines/reference/unicodeEscapesInNames02(target=es2015).symbols @@ -1,15 +1,12 @@ //// [tests/cases/compiler/unicodeEscapesInNames02.ts] //// === extendedEscapesForAstralsInVarsAndClasses.ts === -// Example from https://mathiasbynens.be/notes/javascript-identifiers-es6 -// Astral characters should be accepted in ES2015 - // U+102A7 CARIAN LETTER A2 var 𐊧: string; ->𐊧 : Symbol(𐊧, Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 4, 3), Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 5, 3)) +>𐊧 : Symbol(𐊧, Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 1, 3), Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 2, 3)) var \u{102A7}: string; ->\u{102A7} : Symbol(𐊧, Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 4, 3), Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 5, 3)) +>\u{102A7} : Symbol(𐊧, Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 1, 3), Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 2, 3)) if (Math.random()) { >Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) @@ -17,50 +14,50 @@ if (Math.random()) { >random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) 𐊧 = "hello"; ->𐊧 : Symbol(𐊧, Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 4, 3), Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 5, 3)) +>𐊧 : Symbol(𐊧, Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 1, 3), Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 2, 3)) } else { \u{102A7} = "hallo"; ->\u{102A7} : Symbol(𐊧, Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 4, 3), Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 5, 3)) +>\u{102A7} : Symbol(𐊧, Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 1, 3), Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 2, 3)) } class Foo { ->Foo : Symbol(Foo, Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 12, 1)) +>Foo : Symbol(Foo, Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 9, 1)) \u{102A7}: string; ->\u{102A7} : Symbol(Foo[\u{102A7}], Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 14, 11)) +>\u{102A7} : Symbol(Foo[\u{102A7}], Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 11, 11)) constructor() { this.\u{102A7} = " world"; ->this.\u{102A7} : Symbol(Foo[\u{102A7}], Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 14, 11)) ->this : Symbol(Foo, Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 12, 1)) ->\u{102A7} : Symbol(Foo[\u{102A7}], Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 14, 11)) +>this.\u{102A7} : Symbol(Foo[\u{102A7}], Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 11, 11)) +>this : Symbol(Foo, Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 9, 1)) +>\u{102A7} : Symbol(Foo[\u{102A7}], Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 11, 11)) } methodA() { ->methodA : Symbol(Foo.methodA, Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 18, 5)) +>methodA : Symbol(Foo.methodA, Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 15, 5)) return this.𐊧; ->this.𐊧 : Symbol(Foo[\u{102A7}], Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 14, 11)) ->this : Symbol(Foo, Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 12, 1)) ->𐊧 : Symbol(Foo[\u{102A7}], Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 14, 11)) +>this.𐊧 : Symbol(Foo[\u{102A7}], Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 11, 11)) +>this : Symbol(Foo, Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 9, 1)) +>𐊧 : Symbol(Foo[\u{102A7}], Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 11, 11)) } } export var _𐊧 = new Foo().\u{102A7} + new Foo().methodA(); ->_𐊧 : Symbol(_𐊧, Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 24, 10)) ->new Foo().\u{102A7} : Symbol(Foo[\u{102A7}], Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 14, 11)) ->Foo : Symbol(Foo, Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 12, 1)) ->\u{102A7} : Symbol(Foo[\u{102A7}], Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 14, 11)) ->new Foo().methodA : Symbol(Foo.methodA, Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 18, 5)) ->Foo : Symbol(Foo, Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 12, 1)) ->methodA : Symbol(Foo.methodA, Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 18, 5)) +>_𐊧 : Symbol(_𐊧, Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 21, 10)) +>new Foo().\u{102A7} : Symbol(Foo[\u{102A7}], Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 11, 11)) +>Foo : Symbol(Foo, Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 9, 1)) +>\u{102A7} : Symbol(Foo[\u{102A7}], Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 11, 11)) +>new Foo().methodA : Symbol(Foo.methodA, Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 15, 5)) +>Foo : Symbol(Foo, Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 9, 1)) +>methodA : Symbol(Foo.methodA, Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 15, 5)) _\u{102A7} += "!"; ->_\u{102A7} : Symbol(_𐊧, Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 24, 10)) +>_\u{102A7} : Symbol(_𐊧, Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 21, 10)) === astralAsSurrogatePair.ts === import { _𐊧 as \uD800\uDEA7 } from "./extendedEscapesForAstralsInVarsAndClasses.js"; ->_𐊧 : Symbol((Missing), Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 24, 10)) +>_𐊧 : Symbol((Missing), Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 21, 10)) > : Symbol((Missing), Decl(astralAsSurrogatePair.ts, 0, 8)) >uD800 : Symbol(uD800, Decl(astralAsSurrogatePair.ts, 0, 17)) >uDEA7 : Symbol(uDEA7, Decl(astralAsSurrogatePair.ts, 0, 23)) diff --git a/tests/baselines/reference/unicodeEscapesInNames02(target=es2015).types b/tests/baselines/reference/unicodeEscapesInNames02(target=es2015).types index 5b47e0a2c50..0d896de5415 100644 --- a/tests/baselines/reference/unicodeEscapesInNames02(target=es2015).types +++ b/tests/baselines/reference/unicodeEscapesInNames02(target=es2015).types @@ -1,9 +1,6 @@ //// [tests/cases/compiler/unicodeEscapesInNames02.ts] //// === extendedEscapesForAstralsInVarsAndClasses.ts === -// Example from https://mathiasbynens.be/notes/javascript-identifiers-es6 -// Astral characters should be accepted in ES2015 - // U+102A7 CARIAN LETTER A2 var 𐊧: string; >𐊧 : string diff --git a/tests/baselines/reference/unicodeEscapesInNames02(target=es5).errors.txt b/tests/baselines/reference/unicodeEscapesInNames02(target=es5).errors.txt index c0bc54119b7..249a5d65f74 100644 --- a/tests/baselines/reference/unicodeEscapesInNames02(target=es5).errors.txt +++ b/tests/baselines/reference/unicodeEscapesInNames02(target=es5).errors.txt @@ -4,50 +4,47 @@ astralAsSurrogatePair.ts(1,17): error TS1127: Invalid character. astralAsSurrogatePair.ts(1,18): error TS2305: Module '"./extendedEscapesForAstralsInVarsAndClasses.js"' has no exported member 'uD800'. astralAsSurrogatePair.ts(1,23): error TS1127: Invalid character. astralAsSurrogatePair.ts(1,24): error TS2305: Module '"./extendedEscapesForAstralsInVarsAndClasses.js"' has no exported member 'uDEA7'. -extendedEscapesForAstralsInVarsAndClasses.ts(5,5): error TS1127: Invalid character. -extendedEscapesForAstralsInVarsAndClasses.ts(5,7): error TS1134: Variable declaration expected. +extendedEscapesForAstralsInVarsAndClasses.ts(2,5): error TS1127: Invalid character. +extendedEscapesForAstralsInVarsAndClasses.ts(2,7): error TS1134: Variable declaration expected. +extendedEscapesForAstralsInVarsAndClasses.ts(3,5): error TS1127: Invalid character. +extendedEscapesForAstralsInVarsAndClasses.ts(3,7): error TS1005: ',' expected. +extendedEscapesForAstralsInVarsAndClasses.ts(3,11): error TS1351: An identifier or keyword cannot immediately follow a numeric literal. extendedEscapesForAstralsInVarsAndClasses.ts(6,5): error TS1127: Invalid character. -extendedEscapesForAstralsInVarsAndClasses.ts(6,7): error TS1005: ',' expected. -extendedEscapesForAstralsInVarsAndClasses.ts(6,11): error TS1351: An identifier or keyword cannot immediately follow a numeric literal. +extendedEscapesForAstralsInVarsAndClasses.ts(6,8): error TS1128: Declaration or statement expected. extendedEscapesForAstralsInVarsAndClasses.ts(9,5): error TS1127: Invalid character. -extendedEscapesForAstralsInVarsAndClasses.ts(9,8): error TS1128: Declaration or statement expected. -extendedEscapesForAstralsInVarsAndClasses.ts(12,5): error TS1127: Invalid character. -extendedEscapesForAstralsInVarsAndClasses.ts(12,6): error TS1434: Unexpected keyword or identifier. -extendedEscapesForAstralsInVarsAndClasses.ts(12,11): error TS1351: An identifier or keyword cannot immediately follow a numeric literal. -extendedEscapesForAstralsInVarsAndClasses.ts(12,15): error TS2809: Declaration or statement expected. This '=' follows a block of statements, so if you intended to write a destructuring assignment, you might need to wrap the whole assignment in parentheses. -extendedEscapesForAstralsInVarsAndClasses.ts(16,5): error TS1127: Invalid character. -extendedEscapesForAstralsInVarsAndClasses.ts(16,6): error TS1434: Unexpected keyword or identifier. -extendedEscapesForAstralsInVarsAndClasses.ts(16,7): error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. -extendedEscapesForAstralsInVarsAndClasses.ts(16,11): error TS1351: An identifier or keyword cannot immediately follow a numeric literal. -extendedEscapesForAstralsInVarsAndClasses.ts(16,14): error TS1128: Declaration or statement expected. -extendedEscapesForAstralsInVarsAndClasses.ts(17,5): error TS2304: Cannot find name 'constructor'. -extendedEscapesForAstralsInVarsAndClasses.ts(17,19): error TS1005: ';' expected. -extendedEscapesForAstralsInVarsAndClasses.ts(18,9): error TS2532: Object is possibly 'undefined'. -extendedEscapesForAstralsInVarsAndClasses.ts(18,14): error TS1127: Invalid character. -extendedEscapesForAstralsInVarsAndClasses.ts(18,15): error TS1434: Unexpected keyword or identifier. -extendedEscapesForAstralsInVarsAndClasses.ts(18,20): error TS1351: An identifier or keyword cannot immediately follow a numeric literal. -extendedEscapesForAstralsInVarsAndClasses.ts(18,24): error TS2809: Declaration or statement expected. This '=' follows a block of statements, so if you intended to write a destructuring assignment, you might need to wrap the whole assignment in parentheses. -extendedEscapesForAstralsInVarsAndClasses.ts(20,5): error TS2304: Cannot find name 'methodA'. -extendedEscapesForAstralsInVarsAndClasses.ts(20,15): error TS1005: ';' expected. -extendedEscapesForAstralsInVarsAndClasses.ts(21,21): error TS1127: Invalid character. -extendedEscapesForAstralsInVarsAndClasses.ts(23,1): error TS1128: Declaration or statement expected. -extendedEscapesForAstralsInVarsAndClasses.ts(25,13): error TS1127: Invalid character. -extendedEscapesForAstralsInVarsAndClasses.ts(25,16): error TS1134: Variable declaration expected. -extendedEscapesForAstralsInVarsAndClasses.ts(25,18): error TS1389: 'new' is not allowed as a variable declaration name. -extendedEscapesForAstralsInVarsAndClasses.ts(25,28): error TS1127: Invalid character. -extendedEscapesForAstralsInVarsAndClasses.ts(25,29): error TS1434: Unexpected keyword or identifier. -extendedEscapesForAstralsInVarsAndClasses.ts(25,34): error TS1351: An identifier or keyword cannot immediately follow a numeric literal. -extendedEscapesForAstralsInVarsAndClasses.ts(25,50): error TS2339: Property 'methodA' does not exist on type 'Foo'. -extendedEscapesForAstralsInVarsAndClasses.ts(27,2): error TS1127: Invalid character. -extendedEscapesForAstralsInVarsAndClasses.ts(27,3): error TS1434: Unexpected keyword or identifier. -extendedEscapesForAstralsInVarsAndClasses.ts(27,8): error TS1351: An identifier or keyword cannot immediately follow a numeric literal. -extendedEscapesForAstralsInVarsAndClasses.ts(27,12): error TS1128: Declaration or statement expected. +extendedEscapesForAstralsInVarsAndClasses.ts(9,6): error TS1434: Unexpected keyword or identifier. +extendedEscapesForAstralsInVarsAndClasses.ts(9,11): error TS1351: An identifier or keyword cannot immediately follow a numeric literal. +extendedEscapesForAstralsInVarsAndClasses.ts(9,15): error TS2809: Declaration or statement expected. This '=' follows a block of statements, so if you intended to write a destructuring assignment, you might need to wrap the whole assignment in parentheses. +extendedEscapesForAstralsInVarsAndClasses.ts(13,5): error TS1127: Invalid character. +extendedEscapesForAstralsInVarsAndClasses.ts(13,6): error TS1434: Unexpected keyword or identifier. +extendedEscapesForAstralsInVarsAndClasses.ts(13,7): error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. +extendedEscapesForAstralsInVarsAndClasses.ts(13,11): error TS1351: An identifier or keyword cannot immediately follow a numeric literal. +extendedEscapesForAstralsInVarsAndClasses.ts(13,14): error TS1128: Declaration or statement expected. +extendedEscapesForAstralsInVarsAndClasses.ts(14,5): error TS2304: Cannot find name 'constructor'. +extendedEscapesForAstralsInVarsAndClasses.ts(14,19): error TS1005: ';' expected. +extendedEscapesForAstralsInVarsAndClasses.ts(15,9): error TS2532: Object is possibly 'undefined'. +extendedEscapesForAstralsInVarsAndClasses.ts(15,14): error TS1127: Invalid character. +extendedEscapesForAstralsInVarsAndClasses.ts(15,15): error TS1434: Unexpected keyword or identifier. +extendedEscapesForAstralsInVarsAndClasses.ts(15,20): error TS1351: An identifier or keyword cannot immediately follow a numeric literal. +extendedEscapesForAstralsInVarsAndClasses.ts(15,24): error TS2809: Declaration or statement expected. This '=' follows a block of statements, so if you intended to write a destructuring assignment, you might need to wrap the whole assignment in parentheses. +extendedEscapesForAstralsInVarsAndClasses.ts(17,5): error TS2304: Cannot find name 'methodA'. +extendedEscapesForAstralsInVarsAndClasses.ts(17,15): error TS1005: ';' expected. +extendedEscapesForAstralsInVarsAndClasses.ts(18,21): error TS1127: Invalid character. +extendedEscapesForAstralsInVarsAndClasses.ts(20,1): error TS1128: Declaration or statement expected. +extendedEscapesForAstralsInVarsAndClasses.ts(22,13): error TS1127: Invalid character. +extendedEscapesForAstralsInVarsAndClasses.ts(22,16): error TS1134: Variable declaration expected. +extendedEscapesForAstralsInVarsAndClasses.ts(22,18): error TS1389: 'new' is not allowed as a variable declaration name. +extendedEscapesForAstralsInVarsAndClasses.ts(22,28): error TS1127: Invalid character. +extendedEscapesForAstralsInVarsAndClasses.ts(22,29): error TS1434: Unexpected keyword or identifier. +extendedEscapesForAstralsInVarsAndClasses.ts(22,34): error TS1351: An identifier or keyword cannot immediately follow a numeric literal. +extendedEscapesForAstralsInVarsAndClasses.ts(22,50): error TS2339: Property 'methodA' does not exist on type 'Foo'. +extendedEscapesForAstralsInVarsAndClasses.ts(24,2): error TS1127: Invalid character. +extendedEscapesForAstralsInVarsAndClasses.ts(24,3): error TS1434: Unexpected keyword or identifier. +extendedEscapesForAstralsInVarsAndClasses.ts(24,8): error TS1351: An identifier or keyword cannot immediately follow a numeric literal. +extendedEscapesForAstralsInVarsAndClasses.ts(24,12): error TS1128: Declaration or statement expected. ==== extendedEscapesForAstralsInVarsAndClasses.ts (38 errors) ==== - // Example from https://mathiasbynens.be/notes/javascript-identifiers-es6 - // Astral characters should be accepted in ES2015 - // U+102A7 CARIAN LETTER A2 var 𐊧: string; ~~ diff --git a/tests/baselines/reference/unicodeEscapesInNames02(target=es5).js b/tests/baselines/reference/unicodeEscapesInNames02(target=es5).js index 69ae05939a4..2d6548b8464 100644 --- a/tests/baselines/reference/unicodeEscapesInNames02(target=es5).js +++ b/tests/baselines/reference/unicodeEscapesInNames02(target=es5).js @@ -1,9 +1,6 @@ //// [tests/cases/compiler/unicodeEscapesInNames02.ts] //// //// [extendedEscapesForAstralsInVarsAndClasses.ts] -// Example from https://mathiasbynens.be/notes/javascript-identifiers-es6 -// Astral characters should be accepted in ES2015 - // U+102A7 CARIAN LETTER A2 var 𐊧: string; var \u{102A7}: string; @@ -34,8 +31,6 @@ import { _𐊧 as \uD800\uDEA7 } from "./extendedEscapesForAstralsInVarsAndClass //// [extendedEscapesForAstralsInVarsAndClasses.js] -// Example from https://mathiasbynens.be/notes/javascript-identifiers-es6 -// Astral characters should be accepted in ES2015 // U+102A7 CARIAN LETTER A2 var string; var u, A7 = (void 0)[102]; diff --git a/tests/baselines/reference/unicodeEscapesInNames02(target=es5).js.map b/tests/baselines/reference/unicodeEscapesInNames02(target=es5).js.map index 71fdb41396a..e62265291f0 100644 --- a/tests/baselines/reference/unicodeEscapesInNames02(target=es5).js.map +++ b/tests/baselines/reference/unicodeEscapesInNames02(target=es5).js.map @@ -1,6 +1,6 @@ //// [extendedEscapesForAstralsInVarsAndClasses.js.map] -{"version":3,"file":"extendedEscapesForAstralsInVarsAndClasses.js","sourceRoot":"","sources":["extendedEscapesForAstralsInVarsAndClasses.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,iDAAiD;AAEjD,2BAA2B;AAC3B,IAAQ,MAAM,CAAC;AACV,IAAA,CAAC,EAAI,EAAE,gBAAA,CAAU;AAEtB,IAAI,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC;IACX,OAAO,CAAC;AACjB,CAAC;KACI,CAAC;IACD,CAAC,CAAA;IAAA,CAAC;QAAA,GAAG,CAAA;QAAA,EAAE,CAAA;IAAA,CAAC;IAAG,OAAO,CAAC;AACxB,CAAC;AAED;IAAA;IACM,CAAC,AAAD;IAAA,UAAC;AAAD,CAAC,AAAD,AADN,IACM;AAAA,CAAC;IAAA,GAAG,CAAA;IAAA,EAAE,CAAA;AAAA,CAAC;AAAE,MAAM,CAAC;AAClB,WAAW,EAAE,CAAA;AAAC,CAAC;IACX,IAAI,CAAC,CAAA;IAAC,CAAC,CAAA;IAAA,CAAC;QAAA,GAAG,CAAA;QAAA,EAAE,CAAA;IAAA,CAAC;IAAG,QAAQ,CAAC;AAC9B,CAAC;AACD,OAAO,EAAE,CAAA;AAAC,CAAC;IACP,OAAO,IAAI,CAAC,EAAE,CAAC;AACnB,CAAC;AAGL,MAAM,CAAC,IAAI,CAAK,CAAA;AAAC,IAAI,GAAG,EAAE,CAAC,CAAA;AAAC,CAAC,CAAA;AAAA,CAAC;IAAA,GAAG,CAAA;IAAA,EAAE,CAAA;AAAA,CAAC;AAAC,CAAE,IAAI,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC;AAE3D,CAAC,CAAA;AAAC,CAAC,CAAA;AAAA,CAAC;IAAA,GAAG,CAAA;IAAA,EAAE,CAAA;AAAA,CAAC;AAAI,GAAG,CAAC"} -//// https://sokra.github.io/source-map-visualization#base64,Ly8gRXhhbXBsZSBmcm9tIGh0dHBzOi8vbWF0aGlhc2J5bmVucy5iZS9ub3Rlcy9qYXZhc2NyaXB0LWlkZW50aWZpZXJzLWVzNg0KLy8gQXN0cmFsIGNoYXJhY3RlcnMgc2hvdWxkIGJlIGFjY2VwdGVkIGluIEVTMjAxNQ0KLy8gVSsxMDJBNyBDQVJJQU4gTEVUVEVSIEEyDQp2YXIgc3RyaW5nOw0KdmFyIHUsIEE3ID0gKHZvaWQgMClbMTAyXTsNCmlmIChNYXRoLnJhbmRvbSgpKSB7DQogICAgImhlbGxvIjsNCn0NCmVsc2Ugew0KICAgIHU7DQogICAgew0KICAgICAgICAxMDI7DQogICAgICAgIEE3Ow0KICAgIH0NCiAgICAiaGFsbG8iOw0KfQ0KdmFyIEZvbyA9IC8qKiBAY2xhc3MgKi8gKGZ1bmN0aW9uICgpIHsNCiAgICBmdW5jdGlvbiBGb28oKSB7DQogICAgfQ0KICAgIHJldHVybiBGb287DQp9KCkpOw0Kew0KICAgIDEwMjsNCiAgICBBNzsNCn0NCnN0cmluZzsNCmNvbnN0cnVjdG9yKCk7DQp7DQogICAgdGhpcy47DQogICAgdTsNCiAgICB7DQogICAgICAgIDEwMjsNCiAgICAgICAgQTc7DQogICAgfQ0KICAgICIgd29ybGQiOw0KfQ0KbWV0aG9kQSgpOw0Kew0KICAgIHJldHVybiB0aGlzLu2ggO26pzsNCn0NCmV4cG9ydCB2YXIgXzsNCm5ldyBGb28oKS47DQp1Ow0Kew0KICAgIDEwMjsNCiAgICBBNzsNCn0NCituZXcgRm9vKCkubWV0aG9kQSgpOw0KXzsNCnU7DQp7DQogICAgMTAyOw0KICAgIEE3Ow0KfQ0KIiEiOw0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9ZXh0ZW5kZWRFc2NhcGVzRm9yQXN0cmFsc0luVmFyc0FuZENsYXNzZXMuanMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXh0ZW5kZWRFc2NhcGVzRm9yQXN0cmFsc0luVmFyc0FuZENsYXNzZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJleHRlbmRlZEVzY2FwZXNGb3JBc3RyYWxzSW5WYXJzQW5kQ2xhc3Nlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSx5RUFBeUU7QUFDekUsaURBQWlEO0FBRWpELDJCQUEyQjtBQUMzQixJQUFRLE1BQU0sQ0FBQztBQUNWLElBQUEsQ0FBQyxFQUFJLEVBQUUsZ0JBQUEsQ0FBVTtBQUV0QixJQUFJLElBQUksQ0FBQyxNQUFNLEVBQUUsRUFBRSxDQUFDO0lBQ1gsT0FBTyxDQUFDO0FBQ2pCLENBQUM7S0FDSSxDQUFDO0lBQ0QsQ0FBQyxDQUFBO0lBQUEsQ0FBQztRQUFBLEdBQUcsQ0FBQTtRQUFBLEVBQUUsQ0FBQTtJQUFBLENBQUM7SUFBRyxPQUFPLENBQUM7QUFDeEIsQ0FBQztBQUVEO0lBQUE7SUFDTSxDQUFDLEFBQUQ7SUFBQSxVQUFDO0FBQUQsQ0FBQyxBQUFELEFBRE4sSUFDTTtBQUFBLENBQUM7SUFBQSxHQUFHLENBQUE7SUFBQSxFQUFFLENBQUE7QUFBQSxDQUFDO0FBQUUsTUFBTSxDQUFDO0FBQ2xCLFdBQVcsRUFBRSxDQUFBO0FBQUMsQ0FBQztJQUNYLElBQUksQ0FBQyxDQUFBO0lBQUMsQ0FBQyxDQUFBO0lBQUEsQ0FBQztRQUFBLEdBQUcsQ0FBQTtRQUFBLEVBQUUsQ0FBQTtJQUFBLENBQUM7SUFBRyxRQUFRLENBQUM7QUFDOUIsQ0FBQztBQUNELE9BQU8sRUFBRSxDQUFBO0FBQUMsQ0FBQztJQUNQLE9BQU8sSUFBSSxDQUFDLEVBQUUsQ0FBQztBQUNuQixDQUFDO0FBR0wsTUFBTSxDQUFDLElBQUksQ0FBSyxDQUFBO0FBQUMsSUFBSSxHQUFHLEVBQUUsQ0FBQyxDQUFBO0FBQUMsQ0FBQyxDQUFBO0FBQUEsQ0FBQztJQUFBLEdBQUcsQ0FBQTtJQUFBLEVBQUUsQ0FBQTtBQUFBLENBQUM7QUFBQyxDQUFFLElBQUksR0FBRyxFQUFFLENBQUMsT0FBTyxFQUFFLENBQUM7QUFFM0QsQ0FBQyxDQUFBO0FBQUMsQ0FBQyxDQUFBO0FBQUEsQ0FBQztJQUFBLEdBQUcsQ0FBQTtJQUFBLEVBQUUsQ0FBQTtBQUFBLENBQUM7QUFBSSxHQUFHLENBQUMifQ==,Ly8gRXhhbXBsZSBmcm9tIGh0dHBzOi8vbWF0aGlhc2J5bmVucy5iZS9ub3Rlcy9qYXZhc2NyaXB0LWlkZW50aWZpZXJzLWVzNgovLyBBc3RyYWwgY2hhcmFjdGVycyBzaG91bGQgYmUgYWNjZXB0ZWQgaW4gRVMyMDE1CgovLyBVKzEwMkE3IENBUklBTiBMRVRURVIgQTIKdmFyIO2ggO26pzogc3RyaW5nOwp2YXIgXHV7MTAyQTd9OiBzdHJpbmc7CgppZiAoTWF0aC5yYW5kb20oKSkgewogICAg7aCA7bqnID0gImhlbGxvIjsKfQplbHNlIHsKICAgIFx1ezEwMkE3fSA9ICJoYWxsbyI7Cn0KCmNsYXNzIEZvbyB7CiAgICBcdXsxMDJBN306IHN0cmluZzsKICAgIGNvbnN0cnVjdG9yKCkgewogICAgICAgIHRoaXMuXHV7MTAyQTd9ID0gIiB3b3JsZCI7CiAgICB9CiAgICBtZXRob2RBKCkgewogICAgICAgIHJldHVybiB0aGlzLu2ggO26pzsKICAgIH0KfQoKZXhwb3J0IHZhciBf7aCA7bqnID0gbmV3IEZvbygpLlx1ezEwMkE3fSArIG5ldyBGb28oKS5tZXRob2RBKCk7CgpfXHV7MTAyQTd9ICs9ICIhIjsK +{"version":3,"file":"extendedEscapesForAstralsInVarsAndClasses.js","sourceRoot":"","sources":["extendedEscapesForAstralsInVarsAndClasses.ts"],"names":[],"mappings":"AAAA,2BAA2B;AAC3B,IAAQ,MAAM,CAAC;AACV,IAAA,CAAC,EAAI,EAAE,gBAAA,CAAU;AAEtB,IAAI,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC;IACX,OAAO,CAAC;AACjB,CAAC;KACI,CAAC;IACD,CAAC,CAAA;IAAA,CAAC;QAAA,GAAG,CAAA;QAAA,EAAE,CAAA;IAAA,CAAC;IAAG,OAAO,CAAC;AACxB,CAAC;AAED;IAAA;IACM,CAAC,AAAD;IAAA,UAAC;AAAD,CAAC,AAAD,AADN,IACM;AAAA,CAAC;IAAA,GAAG,CAAA;IAAA,EAAE,CAAA;AAAA,CAAC;AAAE,MAAM,CAAC;AAClB,WAAW,EAAE,CAAA;AAAC,CAAC;IACX,IAAI,CAAC,CAAA;IAAC,CAAC,CAAA;IAAA,CAAC;QAAA,GAAG,CAAA;QAAA,EAAE,CAAA;IAAA,CAAC;IAAG,QAAQ,CAAC;AAC9B,CAAC;AACD,OAAO,EAAE,CAAA;AAAC,CAAC;IACP,OAAO,IAAI,CAAC,EAAE,CAAC;AACnB,CAAC;AAGL,MAAM,CAAC,IAAI,CAAK,CAAA;AAAC,IAAI,GAAG,EAAE,CAAC,CAAA;AAAC,CAAC,CAAA;AAAA,CAAC;IAAA,GAAG,CAAA;IAAA,EAAE,CAAA;AAAA,CAAC;AAAC,CAAE,IAAI,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC;AAE3D,CAAC,CAAA;AAAC,CAAC,CAAA;AAAA,CAAC;IAAA,GAAG,CAAA;IAAA,EAAE,CAAA;AAAA,CAAC;AAAI,GAAG,CAAC"} +//// https://sokra.github.io/source-map-visualization#base64,Ly8gVSsxMDJBNyBDQVJJQU4gTEVUVEVSIEEyDQp2YXIgc3RyaW5nOw0KdmFyIHUsIEE3ID0gKHZvaWQgMClbMTAyXTsNCmlmIChNYXRoLnJhbmRvbSgpKSB7DQogICAgImhlbGxvIjsNCn0NCmVsc2Ugew0KICAgIHU7DQogICAgew0KICAgICAgICAxMDI7DQogICAgICAgIEE3Ow0KICAgIH0NCiAgICAiaGFsbG8iOw0KfQ0KdmFyIEZvbyA9IC8qKiBAY2xhc3MgKi8gKGZ1bmN0aW9uICgpIHsNCiAgICBmdW5jdGlvbiBGb28oKSB7DQogICAgfQ0KICAgIHJldHVybiBGb287DQp9KCkpOw0Kew0KICAgIDEwMjsNCiAgICBBNzsNCn0NCnN0cmluZzsNCmNvbnN0cnVjdG9yKCk7DQp7DQogICAgdGhpcy47DQogICAgdTsNCiAgICB7DQogICAgICAgIDEwMjsNCiAgICAgICAgQTc7DQogICAgfQ0KICAgICIgd29ybGQiOw0KfQ0KbWV0aG9kQSgpOw0Kew0KICAgIHJldHVybiB0aGlzLu2ggO26pzsNCn0NCmV4cG9ydCB2YXIgXzsNCm5ldyBGb28oKS47DQp1Ow0Kew0KICAgIDEwMjsNCiAgICBBNzsNCn0NCituZXcgRm9vKCkubWV0aG9kQSgpOw0KXzsNCnU7DQp7DQogICAgMTAyOw0KICAgIEE3Ow0KfQ0KIiEiOw0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9ZXh0ZW5kZWRFc2NhcGVzRm9yQXN0cmFsc0luVmFyc0FuZENsYXNzZXMuanMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXh0ZW5kZWRFc2NhcGVzRm9yQXN0cmFsc0luVmFyc0FuZENsYXNzZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJleHRlbmRlZEVzY2FwZXNGb3JBc3RyYWxzSW5WYXJzQW5kQ2xhc3Nlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSwyQkFBMkI7QUFDM0IsSUFBUSxNQUFNLENBQUM7QUFDVixJQUFBLENBQUMsRUFBSSxFQUFFLGdCQUFBLENBQVU7QUFFdEIsSUFBSSxJQUFJLENBQUMsTUFBTSxFQUFFLEVBQUUsQ0FBQztJQUNYLE9BQU8sQ0FBQztBQUNqQixDQUFDO0tBQ0ksQ0FBQztJQUNELENBQUMsQ0FBQTtJQUFBLENBQUM7UUFBQSxHQUFHLENBQUE7UUFBQSxFQUFFLENBQUE7SUFBQSxDQUFDO0lBQUcsT0FBTyxDQUFDO0FBQ3hCLENBQUM7QUFFRDtJQUFBO0lBQ00sQ0FBQyxBQUFEO0lBQUEsVUFBQztBQUFELENBQUMsQUFBRCxBQUROLElBQ007QUFBQSxDQUFDO0lBQUEsR0FBRyxDQUFBO0lBQUEsRUFBRSxDQUFBO0FBQUEsQ0FBQztBQUFFLE1BQU0sQ0FBQztBQUNsQixXQUFXLEVBQUUsQ0FBQTtBQUFDLENBQUM7SUFDWCxJQUFJLENBQUMsQ0FBQTtJQUFDLENBQUMsQ0FBQTtJQUFBLENBQUM7UUFBQSxHQUFHLENBQUE7UUFBQSxFQUFFLENBQUE7SUFBQSxDQUFDO0lBQUcsUUFBUSxDQUFDO0FBQzlCLENBQUM7QUFDRCxPQUFPLEVBQUUsQ0FBQTtBQUFDLENBQUM7SUFDUCxPQUFPLElBQUksQ0FBQyxFQUFFLENBQUM7QUFDbkIsQ0FBQztBQUdMLE1BQU0sQ0FBQyxJQUFJLENBQUssQ0FBQTtBQUFDLElBQUksR0FBRyxFQUFFLENBQUMsQ0FBQTtBQUFDLENBQUMsQ0FBQTtBQUFBLENBQUM7SUFBQSxHQUFHLENBQUE7SUFBQSxFQUFFLENBQUE7QUFBQSxDQUFDO0FBQUMsQ0FBRSxJQUFJLEdBQUcsRUFBRSxDQUFDLE9BQU8sRUFBRSxDQUFDO0FBRTNELENBQUMsQ0FBQTtBQUFDLENBQUMsQ0FBQTtBQUFBLENBQUM7SUFBQSxHQUFHLENBQUE7SUFBQSxFQUFFLENBQUE7QUFBQSxDQUFDO0FBQUksR0FBRyxDQUFDIn0=,Ly8gVSsxMDJBNyBDQVJJQU4gTEVUVEVSIEEyCnZhciDtoIDtuqc6IHN0cmluZzsKdmFyIFx1ezEwMkE3fTogc3RyaW5nOwoKaWYgKE1hdGgucmFuZG9tKCkpIHsKICAgIO2ggO26pyA9ICJoZWxsbyI7Cn0KZWxzZSB7CiAgICBcdXsxMDJBN30gPSAiaGFsbG8iOwp9CgpjbGFzcyBGb28gewogICAgXHV7MTAyQTd9OiBzdHJpbmc7CiAgICBjb25zdHJ1Y3RvcigpIHsKICAgICAgICB0aGlzLlx1ezEwMkE3fSA9ICIgd29ybGQiOwogICAgfQogICAgbWV0aG9kQSgpIHsKICAgICAgICByZXR1cm4gdGhpcy7toIDtuqc7CiAgICB9Cn0KCmV4cG9ydCB2YXIgX+2ggO26pyA9IG5ldyBGb28oKS5cdXsxMDJBN30gKyBuZXcgRm9vKCkubWV0aG9kQSgpOwoKX1x1ezEwMkE3fSArPSAiISI7Cg== //// [astralAsSurrogatePair.js.map] {"version":3,"file":"astralAsSurrogatePair.js","sourceRoot":"","sources":["astralAsSurrogatePair.ts"],"names":[],"mappings":""} diff --git a/tests/baselines/reference/unicodeEscapesInNames02(target=es5).sourcemap.txt b/tests/baselines/reference/unicodeEscapesInNames02(target=es5).sourcemap.txt index 6218aa10331..402cd480639 100644 --- a/tests/baselines/reference/unicodeEscapesInNames02(target=es5).sourcemap.txt +++ b/tests/baselines/reference/unicodeEscapesInNames02(target=es5).sourcemap.txt @@ -8,32 +8,13 @@ sources: extendedEscapesForAstralsInVarsAndClasses.ts emittedFile:extendedEscapesForAstralsInVarsAndClasses.js sourceFile:extendedEscapesForAstralsInVarsAndClasses.ts ------------------------------------------------------------------- ->>>// Example from https://mathiasbynens.be/notes/javascript-identifiers-es6 -1 > -2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -1 > -2 >// Example from https://mathiasbynens.be/notes/javascript-identifiers-es6 -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 74) Source(1, 74) + SourceIndex(0) ---- ->>>// Astral characters should be accepted in ES2015 -1 > -2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -1 > - > -2 >// Astral characters should be accepted in ES2015 -1 >Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 50) Source(2, 50) + SourceIndex(0) ---- >>>// U+102A7 CARIAN LETTER A2 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^ -1 > - > - > +1 > 2 >// U+102A7 CARIAN LETTER A2 -1 >Emitted(3, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(3, 28) Source(4, 28) + SourceIndex(0) +1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(1, 28) Source(1, 28) + SourceIndex(0) --- >>>var string; 1 > @@ -46,10 +27,10 @@ sourceFile:extendedEscapesForAstralsInVarsAndClasses.ts 2 >var 𐊧: 3 > string 4 > ; -1 >Emitted(4, 1) Source(5, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(5, 9) + SourceIndex(0) -3 >Emitted(4, 11) Source(5, 15) + SourceIndex(0) -4 >Emitted(4, 12) Source(5, 16) + SourceIndex(0) +1 >Emitted(2, 1) Source(2, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(2, 9) + SourceIndex(0) +3 >Emitted(2, 11) Source(2, 15) + SourceIndex(0) +4 >Emitted(2, 12) Source(2, 16) + SourceIndex(0) --- >>>var u, A7 = (void 0)[102]; 1-> @@ -67,13 +48,13 @@ sourceFile:extendedEscapesForAstralsInVarsAndClasses.ts 5 > A7 6 > 7 > }: string; -1->Emitted(5, 1) Source(6, 6) + SourceIndex(0) -2 >Emitted(5, 5) Source(6, 6) + SourceIndex(0) -3 >Emitted(5, 6) Source(6, 7) + SourceIndex(0) -4 >Emitted(5, 8) Source(6, 11) + SourceIndex(0) -5 >Emitted(5, 10) Source(6, 13) + SourceIndex(0) -6 >Emitted(5, 26) Source(6, 13) + SourceIndex(0) -7 >Emitted(5, 27) Source(6, 23) + SourceIndex(0) +1->Emitted(3, 1) Source(3, 6) + SourceIndex(0) +2 >Emitted(3, 5) Source(3, 6) + SourceIndex(0) +3 >Emitted(3, 6) Source(3, 7) + SourceIndex(0) +4 >Emitted(3, 8) Source(3, 11) + SourceIndex(0) +5 >Emitted(3, 10) Source(3, 13) + SourceIndex(0) +6 >Emitted(3, 26) Source(3, 13) + SourceIndex(0) +7 >Emitted(3, 27) Source(3, 23) + SourceIndex(0) --- >>>if (Math.random()) { 1 > @@ -94,14 +75,14 @@ sourceFile:extendedEscapesForAstralsInVarsAndClasses.ts 6 > () 7 > ) 8 > { -1 >Emitted(6, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(6, 5) Source(8, 5) + SourceIndex(0) -3 >Emitted(6, 9) Source(8, 9) + SourceIndex(0) -4 >Emitted(6, 10) Source(8, 10) + SourceIndex(0) -5 >Emitted(6, 16) Source(8, 16) + SourceIndex(0) -6 >Emitted(6, 18) Source(8, 18) + SourceIndex(0) -7 >Emitted(6, 20) Source(8, 20) + SourceIndex(0) -8 >Emitted(6, 21) Source(8, 21) + SourceIndex(0) +1 >Emitted(4, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(4, 5) Source(5, 5) + SourceIndex(0) +3 >Emitted(4, 9) Source(5, 9) + SourceIndex(0) +4 >Emitted(4, 10) Source(5, 10) + SourceIndex(0) +5 >Emitted(4, 16) Source(5, 16) + SourceIndex(0) +6 >Emitted(4, 18) Source(5, 18) + SourceIndex(0) +7 >Emitted(4, 20) Source(5, 20) + SourceIndex(0) +8 >Emitted(4, 21) Source(5, 21) + SourceIndex(0) --- >>> "hello"; 1 >^^^^ @@ -111,9 +92,9 @@ sourceFile:extendedEscapesForAstralsInVarsAndClasses.ts > 𐊧 = 2 > "hello" 3 > ; -1 >Emitted(7, 5) Source(9, 10) + SourceIndex(0) -2 >Emitted(7, 12) Source(9, 17) + SourceIndex(0) -3 >Emitted(7, 13) Source(9, 18) + SourceIndex(0) +1 >Emitted(5, 5) Source(6, 10) + SourceIndex(0) +2 >Emitted(5, 12) Source(6, 17) + SourceIndex(0) +3 >Emitted(5, 13) Source(6, 18) + SourceIndex(0) --- >>>} 1 > @@ -122,8 +103,8 @@ sourceFile:extendedEscapesForAstralsInVarsAndClasses.ts 1 > > 2 >} -1 >Emitted(8, 1) Source(10, 1) + SourceIndex(0) -2 >Emitted(8, 2) Source(10, 2) + SourceIndex(0) +1 >Emitted(6, 1) Source(7, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(7, 2) + SourceIndex(0) --- >>>else { 1->^^^^^ @@ -132,8 +113,8 @@ sourceFile:extendedEscapesForAstralsInVarsAndClasses.ts 1-> >else 2 > { -1->Emitted(9, 6) Source(11, 6) + SourceIndex(0) -2 >Emitted(9, 7) Source(11, 7) + SourceIndex(0) +1->Emitted(7, 6) Source(8, 6) + SourceIndex(0) +2 >Emitted(7, 7) Source(8, 7) + SourceIndex(0) --- >>> u; 1->^^^^ @@ -143,9 +124,9 @@ sourceFile:extendedEscapesForAstralsInVarsAndClasses.ts > \ 2 > u 3 > -1->Emitted(10, 5) Source(12, 6) + SourceIndex(0) -2 >Emitted(10, 6) Source(12, 7) + SourceIndex(0) -3 >Emitted(10, 7) Source(12, 7) + SourceIndex(0) +1->Emitted(8, 5) Source(9, 6) + SourceIndex(0) +2 >Emitted(8, 6) Source(9, 7) + SourceIndex(0) +3 >Emitted(8, 7) Source(9, 7) + SourceIndex(0) --- >>> { 1 >^^^^ @@ -153,8 +134,8 @@ sourceFile:extendedEscapesForAstralsInVarsAndClasses.ts 3 > ^^^^^^^^-> 1 > 2 > { -1 >Emitted(11, 5) Source(12, 7) + SourceIndex(0) -2 >Emitted(11, 6) Source(12, 8) + SourceIndex(0) +1 >Emitted(9, 5) Source(9, 7) + SourceIndex(0) +2 >Emitted(9, 6) Source(9, 8) + SourceIndex(0) --- >>> 102; 1->^^^^^^^^ @@ -163,9 +144,9 @@ sourceFile:extendedEscapesForAstralsInVarsAndClasses.ts 1-> 2 > 102 3 > -1->Emitted(12, 9) Source(12, 8) + SourceIndex(0) -2 >Emitted(12, 12) Source(12, 11) + SourceIndex(0) -3 >Emitted(12, 13) Source(12, 11) + SourceIndex(0) +1->Emitted(10, 9) Source(9, 8) + SourceIndex(0) +2 >Emitted(10, 12) Source(9, 11) + SourceIndex(0) +3 >Emitted(10, 13) Source(9, 11) + SourceIndex(0) --- >>> A7; 1 >^^^^^^^^ @@ -174,9 +155,9 @@ sourceFile:extendedEscapesForAstralsInVarsAndClasses.ts 1 > 2 > A7 3 > -1 >Emitted(13, 9) Source(12, 11) + SourceIndex(0) -2 >Emitted(13, 11) Source(12, 13) + SourceIndex(0) -3 >Emitted(13, 12) Source(12, 13) + SourceIndex(0) +1 >Emitted(11, 9) Source(9, 11) + SourceIndex(0) +2 >Emitted(11, 11) Source(9, 13) + SourceIndex(0) +3 >Emitted(11, 12) Source(9, 13) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -184,8 +165,8 @@ sourceFile:extendedEscapesForAstralsInVarsAndClasses.ts 3 > ^^^^^^^^-> 1 > 2 > } -1 >Emitted(14, 5) Source(12, 13) + SourceIndex(0) -2 >Emitted(14, 6) Source(12, 14) + SourceIndex(0) +1 >Emitted(12, 5) Source(9, 13) + SourceIndex(0) +2 >Emitted(12, 6) Source(9, 14) + SourceIndex(0) --- >>> "hallo"; 1->^^^^ @@ -194,9 +175,9 @@ sourceFile:extendedEscapesForAstralsInVarsAndClasses.ts 1-> = 2 > "hallo" 3 > ; -1->Emitted(15, 5) Source(12, 17) + SourceIndex(0) -2 >Emitted(15, 12) Source(12, 24) + SourceIndex(0) -3 >Emitted(15, 13) Source(12, 25) + SourceIndex(0) +1->Emitted(13, 5) Source(9, 17) + SourceIndex(0) +2 >Emitted(13, 12) Source(9, 24) + SourceIndex(0) +3 >Emitted(13, 13) Source(9, 25) + SourceIndex(0) --- >>>} 1 > @@ -205,8 +186,8 @@ sourceFile:extendedEscapesForAstralsInVarsAndClasses.ts 1 > > 2 >} -1 >Emitted(16, 1) Source(13, 1) + SourceIndex(0) -2 >Emitted(16, 2) Source(13, 2) + SourceIndex(0) +1 >Emitted(14, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(14, 2) Source(10, 2) + SourceIndex(0) --- >>>var Foo = /** @class */ (function () { 1-> @@ -214,13 +195,13 @@ sourceFile:extendedEscapesForAstralsInVarsAndClasses.ts 1-> > > -1->Emitted(17, 1) Source(15, 1) + SourceIndex(0) +1->Emitted(15, 1) Source(12, 1) + SourceIndex(0) --- >>> function Foo() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(18, 5) Source(15, 1) + SourceIndex(0) +1->Emitted(16, 5) Source(12, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -231,17 +212,17 @@ sourceFile:extendedEscapesForAstralsInVarsAndClasses.ts > \u 2 > { 3 > -1->Emitted(19, 5) Source(16, 7) + SourceIndex(0) -2 >Emitted(19, 6) Source(16, 8) + SourceIndex(0) -3 >Emitted(19, 6) Source(16, 7) + SourceIndex(0) +1->Emitted(17, 5) Source(13, 7) + SourceIndex(0) +2 >Emitted(17, 6) Source(13, 8) + SourceIndex(0) +3 >Emitted(17, 6) Source(13, 7) + SourceIndex(0) --- >>> return Foo; 1->^^^^ 2 > ^^^^^^^^^^ 1-> 2 > { -1->Emitted(20, 5) Source(16, 7) + SourceIndex(0) -2 >Emitted(20, 15) Source(16, 8) + SourceIndex(0) +1->Emitted(18, 5) Source(13, 7) + SourceIndex(0) +2 >Emitted(18, 15) Source(13, 8) + SourceIndex(0) --- >>>}()); 1 > @@ -255,11 +236,11 @@ sourceFile:extendedEscapesForAstralsInVarsAndClasses.ts 4 > 5 > class Foo { > \u -1 >Emitted(21, 1) Source(16, 7) + SourceIndex(0) -2 >Emitted(21, 2) Source(16, 8) + SourceIndex(0) -3 >Emitted(21, 2) Source(16, 7) + SourceIndex(0) -4 >Emitted(21, 2) Source(15, 1) + SourceIndex(0) -5 >Emitted(21, 6) Source(16, 7) + SourceIndex(0) +1 >Emitted(19, 1) Source(13, 7) + SourceIndex(0) +2 >Emitted(19, 2) Source(13, 8) + SourceIndex(0) +3 >Emitted(19, 2) Source(13, 7) + SourceIndex(0) +4 >Emitted(19, 2) Source(12, 1) + SourceIndex(0) +5 >Emitted(19, 6) Source(13, 7) + SourceIndex(0) --- >>>{ 1 > @@ -267,8 +248,8 @@ sourceFile:extendedEscapesForAstralsInVarsAndClasses.ts 3 > ^^^^^^^^-> 1 > 2 >{ -1 >Emitted(22, 1) Source(16, 7) + SourceIndex(0) -2 >Emitted(22, 2) Source(16, 8) + SourceIndex(0) +1 >Emitted(20, 1) Source(13, 7) + SourceIndex(0) +2 >Emitted(20, 2) Source(13, 8) + SourceIndex(0) --- >>> 102; 1->^^^^ @@ -277,9 +258,9 @@ sourceFile:extendedEscapesForAstralsInVarsAndClasses.ts 1-> 2 > 102 3 > -1->Emitted(23, 5) Source(16, 8) + SourceIndex(0) -2 >Emitted(23, 8) Source(16, 11) + SourceIndex(0) -3 >Emitted(23, 9) Source(16, 11) + SourceIndex(0) +1->Emitted(21, 5) Source(13, 8) + SourceIndex(0) +2 >Emitted(21, 8) Source(13, 11) + SourceIndex(0) +3 >Emitted(21, 9) Source(13, 11) + SourceIndex(0) --- >>> A7; 1 >^^^^ @@ -288,9 +269,9 @@ sourceFile:extendedEscapesForAstralsInVarsAndClasses.ts 1 > 2 > A7 3 > -1 >Emitted(24, 5) Source(16, 11) + SourceIndex(0) -2 >Emitted(24, 7) Source(16, 13) + SourceIndex(0) -3 >Emitted(24, 8) Source(16, 13) + SourceIndex(0) +1 >Emitted(22, 5) Source(13, 11) + SourceIndex(0) +2 >Emitted(22, 7) Source(13, 13) + SourceIndex(0) +3 >Emitted(22, 8) Source(13, 13) + SourceIndex(0) --- >>>} 1 > @@ -298,8 +279,8 @@ sourceFile:extendedEscapesForAstralsInVarsAndClasses.ts 3 > ^^^^^^^-> 1 > 2 >} -1 >Emitted(25, 1) Source(16, 13) + SourceIndex(0) -2 >Emitted(25, 2) Source(16, 14) + SourceIndex(0) +1 >Emitted(23, 1) Source(13, 13) + SourceIndex(0) +2 >Emitted(23, 2) Source(13, 14) + SourceIndex(0) --- >>>string; 1-> @@ -309,9 +290,9 @@ sourceFile:extendedEscapesForAstralsInVarsAndClasses.ts 1->: 2 >string 3 > ; -1->Emitted(26, 1) Source(16, 16) + SourceIndex(0) -2 >Emitted(26, 7) Source(16, 22) + SourceIndex(0) -3 >Emitted(26, 8) Source(16, 23) + SourceIndex(0) +1->Emitted(24, 1) Source(13, 16) + SourceIndex(0) +2 >Emitted(24, 7) Source(13, 22) + SourceIndex(0) +3 >Emitted(24, 8) Source(13, 23) + SourceIndex(0) --- >>>constructor(); 1-> @@ -323,10 +304,10 @@ sourceFile:extendedEscapesForAstralsInVarsAndClasses.ts 2 >constructor 3 > () 4 > -1->Emitted(27, 1) Source(17, 5) + SourceIndex(0) -2 >Emitted(27, 12) Source(17, 16) + SourceIndex(0) -3 >Emitted(27, 14) Source(17, 18) + SourceIndex(0) -4 >Emitted(27, 15) Source(17, 18) + SourceIndex(0) +1->Emitted(25, 1) Source(14, 5) + SourceIndex(0) +2 >Emitted(25, 12) Source(14, 16) + SourceIndex(0) +3 >Emitted(25, 14) Source(14, 18) + SourceIndex(0) +4 >Emitted(25, 15) Source(14, 18) + SourceIndex(0) --- >>>{ 1 > @@ -334,8 +315,8 @@ sourceFile:extendedEscapesForAstralsInVarsAndClasses.ts 3 > ^^^^^^^^^^-> 1 > 2 >{ -1 >Emitted(28, 1) Source(17, 19) + SourceIndex(0) -2 >Emitted(28, 2) Source(17, 20) + SourceIndex(0) +1 >Emitted(26, 1) Source(14, 19) + SourceIndex(0) +2 >Emitted(26, 2) Source(14, 20) + SourceIndex(0) --- >>> this.; 1->^^^^ @@ -347,10 +328,10 @@ sourceFile:extendedEscapesForAstralsInVarsAndClasses.ts 2 > this 3 > . 4 > -1->Emitted(29, 5) Source(18, 9) + SourceIndex(0) -2 >Emitted(29, 9) Source(18, 13) + SourceIndex(0) -3 >Emitted(29, 10) Source(18, 14) + SourceIndex(0) -4 >Emitted(29, 11) Source(18, 14) + SourceIndex(0) +1->Emitted(27, 5) Source(15, 9) + SourceIndex(0) +2 >Emitted(27, 9) Source(15, 13) + SourceIndex(0) +3 >Emitted(27, 10) Source(15, 14) + SourceIndex(0) +4 >Emitted(27, 11) Source(15, 14) + SourceIndex(0) --- >>> u; 1 >^^^^ @@ -359,9 +340,9 @@ sourceFile:extendedEscapesForAstralsInVarsAndClasses.ts 1 >\ 2 > u 3 > -1 >Emitted(30, 5) Source(18, 15) + SourceIndex(0) -2 >Emitted(30, 6) Source(18, 16) + SourceIndex(0) -3 >Emitted(30, 7) Source(18, 16) + SourceIndex(0) +1 >Emitted(28, 5) Source(15, 15) + SourceIndex(0) +2 >Emitted(28, 6) Source(15, 16) + SourceIndex(0) +3 >Emitted(28, 7) Source(15, 16) + SourceIndex(0) --- >>> { 1 >^^^^ @@ -369,8 +350,8 @@ sourceFile:extendedEscapesForAstralsInVarsAndClasses.ts 3 > ^^^^^^^^-> 1 > 2 > { -1 >Emitted(31, 5) Source(18, 16) + SourceIndex(0) -2 >Emitted(31, 6) Source(18, 17) + SourceIndex(0) +1 >Emitted(29, 5) Source(15, 16) + SourceIndex(0) +2 >Emitted(29, 6) Source(15, 17) + SourceIndex(0) --- >>> 102; 1->^^^^^^^^ @@ -379,9 +360,9 @@ sourceFile:extendedEscapesForAstralsInVarsAndClasses.ts 1-> 2 > 102 3 > -1->Emitted(32, 9) Source(18, 17) + SourceIndex(0) -2 >Emitted(32, 12) Source(18, 20) + SourceIndex(0) -3 >Emitted(32, 13) Source(18, 20) + SourceIndex(0) +1->Emitted(30, 9) Source(15, 17) + SourceIndex(0) +2 >Emitted(30, 12) Source(15, 20) + SourceIndex(0) +3 >Emitted(30, 13) Source(15, 20) + SourceIndex(0) --- >>> A7; 1 >^^^^^^^^ @@ -390,9 +371,9 @@ sourceFile:extendedEscapesForAstralsInVarsAndClasses.ts 1 > 2 > A7 3 > -1 >Emitted(33, 9) Source(18, 20) + SourceIndex(0) -2 >Emitted(33, 11) Source(18, 22) + SourceIndex(0) -3 >Emitted(33, 12) Source(18, 22) + SourceIndex(0) +1 >Emitted(31, 9) Source(15, 20) + SourceIndex(0) +2 >Emitted(31, 11) Source(15, 22) + SourceIndex(0) +3 >Emitted(31, 12) Source(15, 22) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -400,8 +381,8 @@ sourceFile:extendedEscapesForAstralsInVarsAndClasses.ts 3 > ^^^^^^^^^-> 1 > 2 > } -1 >Emitted(34, 5) Source(18, 22) + SourceIndex(0) -2 >Emitted(34, 6) Source(18, 23) + SourceIndex(0) +1 >Emitted(32, 5) Source(15, 22) + SourceIndex(0) +2 >Emitted(32, 6) Source(15, 23) + SourceIndex(0) --- >>> " world"; 1->^^^^ @@ -410,9 +391,9 @@ sourceFile:extendedEscapesForAstralsInVarsAndClasses.ts 1-> = 2 > " world" 3 > ; -1->Emitted(35, 5) Source(18, 26) + SourceIndex(0) -2 >Emitted(35, 13) Source(18, 34) + SourceIndex(0) -3 >Emitted(35, 14) Source(18, 35) + SourceIndex(0) +1->Emitted(33, 5) Source(15, 26) + SourceIndex(0) +2 >Emitted(33, 13) Source(15, 34) + SourceIndex(0) +3 >Emitted(33, 14) Source(15, 35) + SourceIndex(0) --- >>>} 1 > @@ -421,8 +402,8 @@ sourceFile:extendedEscapesForAstralsInVarsAndClasses.ts 1 > > 2 >} -1 >Emitted(36, 1) Source(19, 5) + SourceIndex(0) -2 >Emitted(36, 2) Source(19, 6) + SourceIndex(0) +1 >Emitted(34, 1) Source(16, 5) + SourceIndex(0) +2 >Emitted(34, 2) Source(16, 6) + SourceIndex(0) --- >>>methodA(); 1-> @@ -434,10 +415,10 @@ sourceFile:extendedEscapesForAstralsInVarsAndClasses.ts 2 >methodA 3 > () 4 > -1->Emitted(37, 1) Source(20, 5) + SourceIndex(0) -2 >Emitted(37, 8) Source(20, 12) + SourceIndex(0) -3 >Emitted(37, 10) Source(20, 14) + SourceIndex(0) -4 >Emitted(37, 11) Source(20, 14) + SourceIndex(0) +1->Emitted(35, 1) Source(17, 5) + SourceIndex(0) +2 >Emitted(35, 8) Source(17, 12) + SourceIndex(0) +3 >Emitted(35, 10) Source(17, 14) + SourceIndex(0) +4 >Emitted(35, 11) Source(17, 14) + SourceIndex(0) --- >>>{ 1 > @@ -445,8 +426,8 @@ sourceFile:extendedEscapesForAstralsInVarsAndClasses.ts 3 > ^^^^^^^^^^^^^^^^^^^-> 1 > 2 >{ -1 >Emitted(38, 1) Source(20, 15) + SourceIndex(0) -2 >Emitted(38, 2) Source(20, 16) + SourceIndex(0) +1 >Emitted(36, 1) Source(17, 15) + SourceIndex(0) +2 >Emitted(36, 2) Source(17, 16) + SourceIndex(0) --- >>> return this.𐊧; 1->^^^^ @@ -462,12 +443,12 @@ sourceFile:extendedEscapesForAstralsInVarsAndClasses.ts 4 > . 5 > 𐊧 6 > ; -1->Emitted(39, 5) Source(21, 9) + SourceIndex(0) -2 >Emitted(39, 12) Source(21, 16) + SourceIndex(0) -3 >Emitted(39, 16) Source(21, 20) + SourceIndex(0) -4 >Emitted(39, 17) Source(21, 21) + SourceIndex(0) -5 >Emitted(39, 19) Source(21, 23) + SourceIndex(0) -6 >Emitted(39, 20) Source(21, 24) + SourceIndex(0) +1->Emitted(37, 5) Source(18, 9) + SourceIndex(0) +2 >Emitted(37, 12) Source(18, 16) + SourceIndex(0) +3 >Emitted(37, 16) Source(18, 20) + SourceIndex(0) +4 >Emitted(37, 17) Source(18, 21) + SourceIndex(0) +5 >Emitted(37, 19) Source(18, 23) + SourceIndex(0) +6 >Emitted(37, 20) Source(18, 24) + SourceIndex(0) --- >>>} 1 > @@ -476,8 +457,8 @@ sourceFile:extendedEscapesForAstralsInVarsAndClasses.ts 1 > > 2 >} -1 >Emitted(40, 1) Source(22, 5) + SourceIndex(0) -2 >Emitted(40, 2) Source(22, 6) + SourceIndex(0) +1 >Emitted(38, 1) Source(19, 5) + SourceIndex(0) +2 >Emitted(38, 2) Source(19, 6) + SourceIndex(0) --- >>>export var _; 1-> @@ -495,12 +476,12 @@ sourceFile:extendedEscapesForAstralsInVarsAndClasses.ts 4 > var 5 > _𐊧 = 6 > -1->Emitted(41, 1) Source(25, 1) + SourceIndex(0) -2 >Emitted(41, 7) Source(25, 7) + SourceIndex(0) -3 >Emitted(41, 8) Source(25, 8) + SourceIndex(0) -4 >Emitted(41, 12) Source(25, 12) + SourceIndex(0) -5 >Emitted(41, 13) Source(25, 17) + SourceIndex(0) -6 >Emitted(41, 14) Source(25, 17) + SourceIndex(0) +1->Emitted(39, 1) Source(22, 1) + SourceIndex(0) +2 >Emitted(39, 7) Source(22, 7) + SourceIndex(0) +3 >Emitted(39, 8) Source(22, 8) + SourceIndex(0) +4 >Emitted(39, 12) Source(22, 12) + SourceIndex(0) +5 >Emitted(39, 13) Source(22, 17) + SourceIndex(0) +6 >Emitted(39, 14) Source(22, 17) + SourceIndex(0) --- >>>new Foo().; 1 > @@ -515,12 +496,12 @@ sourceFile:extendedEscapesForAstralsInVarsAndClasses.ts 4 > () 5 > . 6 > -1 >Emitted(42, 1) Source(25, 18) + SourceIndex(0) -2 >Emitted(42, 5) Source(25, 22) + SourceIndex(0) -3 >Emitted(42, 8) Source(25, 25) + SourceIndex(0) -4 >Emitted(42, 10) Source(25, 27) + SourceIndex(0) -5 >Emitted(42, 11) Source(25, 28) + SourceIndex(0) -6 >Emitted(42, 12) Source(25, 28) + SourceIndex(0) +1 >Emitted(40, 1) Source(22, 18) + SourceIndex(0) +2 >Emitted(40, 5) Source(22, 22) + SourceIndex(0) +3 >Emitted(40, 8) Source(22, 25) + SourceIndex(0) +4 >Emitted(40, 10) Source(22, 27) + SourceIndex(0) +5 >Emitted(40, 11) Source(22, 28) + SourceIndex(0) +6 >Emitted(40, 12) Source(22, 28) + SourceIndex(0) --- >>>u; 1 > @@ -529,9 +510,9 @@ sourceFile:extendedEscapesForAstralsInVarsAndClasses.ts 1 >\ 2 >u 3 > -1 >Emitted(43, 1) Source(25, 29) + SourceIndex(0) -2 >Emitted(43, 2) Source(25, 30) + SourceIndex(0) -3 >Emitted(43, 3) Source(25, 30) + SourceIndex(0) +1 >Emitted(41, 1) Source(22, 29) + SourceIndex(0) +2 >Emitted(41, 2) Source(22, 30) + SourceIndex(0) +3 >Emitted(41, 3) Source(22, 30) + SourceIndex(0) --- >>>{ 1 > @@ -539,8 +520,8 @@ sourceFile:extendedEscapesForAstralsInVarsAndClasses.ts 3 > ^^^^^^^^-> 1 > 2 >{ -1 >Emitted(44, 1) Source(25, 30) + SourceIndex(0) -2 >Emitted(44, 2) Source(25, 31) + SourceIndex(0) +1 >Emitted(42, 1) Source(22, 30) + SourceIndex(0) +2 >Emitted(42, 2) Source(22, 31) + SourceIndex(0) --- >>> 102; 1->^^^^ @@ -549,9 +530,9 @@ sourceFile:extendedEscapesForAstralsInVarsAndClasses.ts 1-> 2 > 102 3 > -1->Emitted(45, 5) Source(25, 31) + SourceIndex(0) -2 >Emitted(45, 8) Source(25, 34) + SourceIndex(0) -3 >Emitted(45, 9) Source(25, 34) + SourceIndex(0) +1->Emitted(43, 5) Source(22, 31) + SourceIndex(0) +2 >Emitted(43, 8) Source(22, 34) + SourceIndex(0) +3 >Emitted(43, 9) Source(22, 34) + SourceIndex(0) --- >>> A7; 1 >^^^^ @@ -560,9 +541,9 @@ sourceFile:extendedEscapesForAstralsInVarsAndClasses.ts 1 > 2 > A7 3 > -1 >Emitted(46, 5) Source(25, 34) + SourceIndex(0) -2 >Emitted(46, 7) Source(25, 36) + SourceIndex(0) -3 >Emitted(46, 8) Source(25, 36) + SourceIndex(0) +1 >Emitted(44, 5) Source(22, 34) + SourceIndex(0) +2 >Emitted(44, 7) Source(22, 36) + SourceIndex(0) +3 >Emitted(44, 8) Source(22, 36) + SourceIndex(0) --- >>>} 1 > @@ -570,8 +551,8 @@ sourceFile:extendedEscapesForAstralsInVarsAndClasses.ts 3 > ^^^^^^^^^^^^^^^^^^^^^-> 1 > 2 >} -1 >Emitted(47, 1) Source(25, 36) + SourceIndex(0) -2 >Emitted(47, 2) Source(25, 37) + SourceIndex(0) +1 >Emitted(45, 1) Source(22, 36) + SourceIndex(0) +2 >Emitted(45, 2) Source(22, 37) + SourceIndex(0) --- >>>+new Foo().methodA(); 1-> @@ -592,15 +573,15 @@ sourceFile:extendedEscapesForAstralsInVarsAndClasses.ts 7 > methodA 8 > () 9 > ; -1->Emitted(48, 1) Source(25, 38) + SourceIndex(0) -2 >Emitted(48, 2) Source(25, 40) + SourceIndex(0) -3 >Emitted(48, 6) Source(25, 44) + SourceIndex(0) -4 >Emitted(48, 9) Source(25, 47) + SourceIndex(0) -5 >Emitted(48, 11) Source(25, 49) + SourceIndex(0) -6 >Emitted(48, 12) Source(25, 50) + SourceIndex(0) -7 >Emitted(48, 19) Source(25, 57) + SourceIndex(0) -8 >Emitted(48, 21) Source(25, 59) + SourceIndex(0) -9 >Emitted(48, 22) Source(25, 60) + SourceIndex(0) +1->Emitted(46, 1) Source(22, 38) + SourceIndex(0) +2 >Emitted(46, 2) Source(22, 40) + SourceIndex(0) +3 >Emitted(46, 6) Source(22, 44) + SourceIndex(0) +4 >Emitted(46, 9) Source(22, 47) + SourceIndex(0) +5 >Emitted(46, 11) Source(22, 49) + SourceIndex(0) +6 >Emitted(46, 12) Source(22, 50) + SourceIndex(0) +7 >Emitted(46, 19) Source(22, 57) + SourceIndex(0) +8 >Emitted(46, 21) Source(22, 59) + SourceIndex(0) +9 >Emitted(46, 22) Source(22, 60) + SourceIndex(0) --- >>>_; 1 > @@ -612,9 +593,9 @@ sourceFile:extendedEscapesForAstralsInVarsAndClasses.ts > 2 >_ 3 > -1 >Emitted(49, 1) Source(27, 1) + SourceIndex(0) -2 >Emitted(49, 2) Source(27, 2) + SourceIndex(0) -3 >Emitted(49, 3) Source(27, 2) + SourceIndex(0) +1 >Emitted(47, 1) Source(24, 1) + SourceIndex(0) +2 >Emitted(47, 2) Source(24, 2) + SourceIndex(0) +3 >Emitted(47, 3) Source(24, 2) + SourceIndex(0) --- >>>u; 1-> @@ -623,9 +604,9 @@ sourceFile:extendedEscapesForAstralsInVarsAndClasses.ts 1->\ 2 >u 3 > -1->Emitted(50, 1) Source(27, 3) + SourceIndex(0) -2 >Emitted(50, 2) Source(27, 4) + SourceIndex(0) -3 >Emitted(50, 3) Source(27, 4) + SourceIndex(0) +1->Emitted(48, 1) Source(24, 3) + SourceIndex(0) +2 >Emitted(48, 2) Source(24, 4) + SourceIndex(0) +3 >Emitted(48, 3) Source(24, 4) + SourceIndex(0) --- >>>{ 1 > @@ -633,8 +614,8 @@ sourceFile:extendedEscapesForAstralsInVarsAndClasses.ts 3 > ^^^^^^^^-> 1 > 2 >{ -1 >Emitted(51, 1) Source(27, 4) + SourceIndex(0) -2 >Emitted(51, 2) Source(27, 5) + SourceIndex(0) +1 >Emitted(49, 1) Source(24, 4) + SourceIndex(0) +2 >Emitted(49, 2) Source(24, 5) + SourceIndex(0) --- >>> 102; 1->^^^^ @@ -643,9 +624,9 @@ sourceFile:extendedEscapesForAstralsInVarsAndClasses.ts 1-> 2 > 102 3 > -1->Emitted(52, 5) Source(27, 5) + SourceIndex(0) -2 >Emitted(52, 8) Source(27, 8) + SourceIndex(0) -3 >Emitted(52, 9) Source(27, 8) + SourceIndex(0) +1->Emitted(50, 5) Source(24, 5) + SourceIndex(0) +2 >Emitted(50, 8) Source(24, 8) + SourceIndex(0) +3 >Emitted(50, 9) Source(24, 8) + SourceIndex(0) --- >>> A7; 1 >^^^^ @@ -654,9 +635,9 @@ sourceFile:extendedEscapesForAstralsInVarsAndClasses.ts 1 > 2 > A7 3 > -1 >Emitted(53, 5) Source(27, 8) + SourceIndex(0) -2 >Emitted(53, 7) Source(27, 10) + SourceIndex(0) -3 >Emitted(53, 8) Source(27, 10) + SourceIndex(0) +1 >Emitted(51, 5) Source(24, 8) + SourceIndex(0) +2 >Emitted(51, 7) Source(24, 10) + SourceIndex(0) +3 >Emitted(51, 8) Source(24, 10) + SourceIndex(0) --- >>>} 1 > @@ -664,8 +645,8 @@ sourceFile:extendedEscapesForAstralsInVarsAndClasses.ts 3 > ^^^^-> 1 > 2 >} -1 >Emitted(54, 1) Source(27, 10) + SourceIndex(0) -2 >Emitted(54, 2) Source(27, 11) + SourceIndex(0) +1 >Emitted(52, 1) Source(24, 10) + SourceIndex(0) +2 >Emitted(52, 2) Source(24, 11) + SourceIndex(0) --- >>>"!"; 1-> @@ -675,9 +656,9 @@ sourceFile:extendedEscapesForAstralsInVarsAndClasses.ts 1-> += 2 >"!" 3 > ; -1->Emitted(55, 1) Source(27, 15) + SourceIndex(0) -2 >Emitted(55, 4) Source(27, 18) + SourceIndex(0) -3 >Emitted(55, 5) Source(27, 19) + SourceIndex(0) +1->Emitted(53, 1) Source(24, 15) + SourceIndex(0) +2 >Emitted(53, 4) Source(24, 18) + SourceIndex(0) +3 >Emitted(53, 5) Source(24, 19) + SourceIndex(0) --- >>>//# sourceMappingURL=extendedEscapesForAstralsInVarsAndClasses.js.map=================================================================== JsFile: astralAsSurrogatePair.js diff --git a/tests/baselines/reference/unicodeEscapesInNames02(target=es5).symbols b/tests/baselines/reference/unicodeEscapesInNames02(target=es5).symbols index ac940d5ae57..2175e1b98cd 100644 --- a/tests/baselines/reference/unicodeEscapesInNames02(target=es5).symbols +++ b/tests/baselines/reference/unicodeEscapesInNames02(target=es5).symbols @@ -1,16 +1,13 @@ //// [tests/cases/compiler/unicodeEscapesInNames02.ts] //// === extendedEscapesForAstralsInVarsAndClasses.ts === -// Example from https://mathiasbynens.be/notes/javascript-identifiers-es6 -// Astral characters should be accepted in ES2015 - // U+102A7 CARIAN LETTER A2 var 𐊧: string; ->string : Symbol(string, Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 4, 7)) +>string : Symbol(string, Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 1, 7)) var \u{102A7}: string; ->u : Symbol(u, Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 5, 5)) ->A7 : Symbol(A7, Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 5, 7)) +>u : Symbol(u, Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 2, 5)) +>A7 : Symbol(A7, Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 2, 7)) if (Math.random()) { >Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) @@ -21,22 +18,22 @@ if (Math.random()) { } else { \u{102A7} = "hallo"; ->u : Symbol(u, Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 5, 5)) ->A7 : Symbol(A7, Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 5, 7)) +>u : Symbol(u, Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 2, 5)) +>A7 : Symbol(A7, Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 2, 7)) } class Foo { ->Foo : Symbol(Foo, Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 12, 1)) +>Foo : Symbol(Foo, Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 9, 1)) \u{102A7}: string; ->u : Symbol(Foo.u, Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 15, 5)) ->A7 : Symbol(A7, Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 5, 7)) ->string : Symbol(string, Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 4, 7)) +>u : Symbol(Foo.u, Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 12, 5)) +>A7 : Symbol(A7, Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 2, 7)) +>string : Symbol(string, Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 1, 7)) constructor() { this.\u{102A7} = " world"; ->u : Symbol(u, Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 5, 5)) ->A7 : Symbol(A7, Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 5, 7)) +>u : Symbol(u, Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 2, 5)) +>A7 : Symbol(A7, Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 2, 7)) } methodA() { return this.𐊧; @@ -44,16 +41,16 @@ class Foo { } export var _𐊧 = new Foo().\u{102A7} + new Foo().methodA(); ->_ : Symbol(_, Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 24, 10)) ->Foo : Symbol(Foo, Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 12, 1)) ->u : Symbol(u, Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 5, 5)) ->A7 : Symbol(A7, Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 5, 7)) ->Foo : Symbol(Foo, Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 12, 1)) +>_ : Symbol(_, Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 21, 10)) +>Foo : Symbol(Foo, Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 9, 1)) +>u : Symbol(u, Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 2, 5)) +>A7 : Symbol(A7, Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 2, 7)) +>Foo : Symbol(Foo, Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 9, 1)) _\u{102A7} += "!"; ->_ : Symbol(_, Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 24, 10)) ->u : Symbol(u, Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 5, 5)) ->A7 : Symbol(A7, Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 5, 7)) +>_ : Symbol(_, Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 21, 10)) +>u : Symbol(u, Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 2, 5)) +>A7 : Symbol(A7, Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 2, 7)) === astralAsSurrogatePair.ts === import { _𐊧 as \uD800\uDEA7 } from "./extendedEscapesForAstralsInVarsAndClasses.js"; diff --git a/tests/baselines/reference/unicodeEscapesInNames02(target=es5).types b/tests/baselines/reference/unicodeEscapesInNames02(target=es5).types index 72f42950252..0b96231658f 100644 --- a/tests/baselines/reference/unicodeEscapesInNames02(target=es5).types +++ b/tests/baselines/reference/unicodeEscapesInNames02(target=es5).types @@ -1,9 +1,6 @@ //// [tests/cases/compiler/unicodeEscapesInNames02.ts] //// === extendedEscapesForAstralsInVarsAndClasses.ts === -// Example from https://mathiasbynens.be/notes/javascript-identifiers-es6 -// Astral characters should be accepted in ES2015 - // U+102A7 CARIAN LETTER A2 var 𐊧: string; >string : any diff --git a/tests/baselines/reference/unionReductionWithStringMappingAndIdenticalBaseTypeExistsNoCrash.symbols b/tests/baselines/reference/unionReductionWithStringMappingAndIdenticalBaseTypeExistsNoCrash.symbols index 05f1a32cc11..eff76c7ed25 100644 --- a/tests/baselines/reference/unionReductionWithStringMappingAndIdenticalBaseTypeExistsNoCrash.symbols +++ b/tests/baselines/reference/unionReductionWithStringMappingAndIdenticalBaseTypeExistsNoCrash.symbols @@ -1,242 +1,239 @@ //// [tests/cases/compiler/unionReductionWithStringMappingAndIdenticalBaseTypeExistsNoCrash.tsx] //// === node_modules/@types/react/index.d.ts === -// https://github.com/microsoft/TypeScript/issues/56688 - - export = React; ->React : Symbol(React, Decl(index.d.ts, 4, 26)) +>React : Symbol(React, Decl(index.d.ts, 1, 26)) export as namespace React; ->React : Symbol(React, Decl(index.d.ts, 3, 15)) +>React : Symbol(React, Decl(index.d.ts, 0, 15)) declare namespace React { ->React : Symbol(React, Decl(index.d.ts, 4, 26)) +>React : Symbol(React, Decl(index.d.ts, 1, 26)) type ReactNode = ->ReactNode : Symbol(ReactNode, Decl(index.d.ts, 6, 25)) +>ReactNode : Symbol(ReactNode, Decl(index.d.ts, 3, 25)) | ReactElement ->ReactElement : Symbol(ReactElement, Decl(index.d.ts, 15, 58)) +>ReactElement : Symbol(ReactElement, Decl(index.d.ts, 12, 58)) | string | number | Iterable >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) ->ReactNode : Symbol(ReactNode, Decl(index.d.ts, 6, 25)) +>ReactNode : Symbol(ReactNode, Decl(index.d.ts, 3, 25)) | boolean | null | undefined; type JSXElementConstructor

= (props: P) => ReactNode; ->JSXElementConstructor : Symbol(JSXElementConstructor, Decl(index.d.ts, 14, 16)) ->P : Symbol(P, Decl(index.d.ts, 15, 29)) ->props : Symbol(props, Decl(index.d.ts, 15, 35)) ->P : Symbol(P, Decl(index.d.ts, 15, 29)) ->ReactNode : Symbol(ReactNode, Decl(index.d.ts, 6, 25)) +>JSXElementConstructor : Symbol(JSXElementConstructor, Decl(index.d.ts, 11, 16)) +>P : Symbol(P, Decl(index.d.ts, 12, 29)) +>props : Symbol(props, Decl(index.d.ts, 12, 35)) +>P : Symbol(P, Decl(index.d.ts, 12, 29)) +>ReactNode : Symbol(ReactNode, Decl(index.d.ts, 3, 25)) interface ReactElement< ->ReactElement : Symbol(ReactElement, Decl(index.d.ts, 15, 58)) +>ReactElement : Symbol(ReactElement, Decl(index.d.ts, 12, 58)) P = any, ->P : Symbol(P, Decl(index.d.ts, 16, 25)) +>P : Symbol(P, Decl(index.d.ts, 13, 25)) T extends string | JSXElementConstructor = ->T : Symbol(T, Decl(index.d.ts, 17, 12)) ->JSXElementConstructor : Symbol(JSXElementConstructor, Decl(index.d.ts, 14, 16)) +>T : Symbol(T, Decl(index.d.ts, 14, 12)) +>JSXElementConstructor : Symbol(JSXElementConstructor, Decl(index.d.ts, 11, 16)) | string | JSXElementConstructor, ->JSXElementConstructor : Symbol(JSXElementConstructor, Decl(index.d.ts, 14, 16)) +>JSXElementConstructor : Symbol(JSXElementConstructor, Decl(index.d.ts, 11, 16)) > { type: T; ->type : Symbol(ReactElement.type, Decl(index.d.ts, 21, 5)) ->T : Symbol(T, Decl(index.d.ts, 17, 12)) +>type : Symbol(ReactElement.type, Decl(index.d.ts, 18, 5)) +>T : Symbol(T, Decl(index.d.ts, 14, 12)) props: P; ->props : Symbol(ReactElement.props, Decl(index.d.ts, 22, 12)) ->P : Symbol(P, Decl(index.d.ts, 16, 25)) +>props : Symbol(ReactElement.props, Decl(index.d.ts, 19, 12)) +>P : Symbol(P, Decl(index.d.ts, 13, 25)) key: string | null; ->key : Symbol(ReactElement.key, Decl(index.d.ts, 23, 13)) +>key : Symbol(ReactElement.key, Decl(index.d.ts, 20, 13)) } type ComponentProps> = ->ComponentProps : Symbol(ComponentProps, Decl(index.d.ts, 25, 3)) ->T : Symbol(T, Decl(index.d.ts, 27, 22)) ->JSXElementConstructor : Symbol(JSXElementConstructor, Decl(index.d.ts, 14, 16)) +>ComponentProps : Symbol(ComponentProps, Decl(index.d.ts, 22, 3)) +>T : Symbol(T, Decl(index.d.ts, 24, 22)) +>JSXElementConstructor : Symbol(JSXElementConstructor, Decl(index.d.ts, 11, 16)) T extends JSXElementConstructor ? P : never; ->T : Symbol(T, Decl(index.d.ts, 27, 22)) ->JSXElementConstructor : Symbol(JSXElementConstructor, Decl(index.d.ts, 14, 16)) ->P : Symbol(P, Decl(index.d.ts, 28, 41)) ->P : Symbol(P, Decl(index.d.ts, 28, 41)) +>T : Symbol(T, Decl(index.d.ts, 24, 22)) +>JSXElementConstructor : Symbol(JSXElementConstructor, Decl(index.d.ts, 11, 16)) +>P : Symbol(P, Decl(index.d.ts, 25, 41)) +>P : Symbol(P, Decl(index.d.ts, 25, 41)) interface ExoticComponent

{ ->ExoticComponent : Symbol(ExoticComponent, Decl(index.d.ts, 28, 57)) ->P : Symbol(P, Decl(index.d.ts, 30, 28)) +>ExoticComponent : Symbol(ExoticComponent, Decl(index.d.ts, 25, 57)) +>P : Symbol(P, Decl(index.d.ts, 27, 28)) (props: P): ReactNode; ->props : Symbol(props, Decl(index.d.ts, 31, 5)) ->P : Symbol(P, Decl(index.d.ts, 30, 28)) ->ReactNode : Symbol(ReactNode, Decl(index.d.ts, 6, 25)) +>props : Symbol(props, Decl(index.d.ts, 28, 5)) +>P : Symbol(P, Decl(index.d.ts, 27, 28)) +>ReactNode : Symbol(ReactNode, Decl(index.d.ts, 3, 25)) readonly $$typeof: symbol; ->$$typeof : Symbol(ExoticComponent.$$typeof, Decl(index.d.ts, 31, 26)) +>$$typeof : Symbol(ExoticComponent.$$typeof, Decl(index.d.ts, 28, 26)) } type LazyExoticComponent> = ->LazyExoticComponent : Symbol(LazyExoticComponent, Decl(index.d.ts, 33, 3)) ->T : Symbol(T, Decl(index.d.ts, 35, 27)) ->JSXElementConstructor : Symbol(JSXElementConstructor, Decl(index.d.ts, 14, 16)) +>LazyExoticComponent : Symbol(LazyExoticComponent, Decl(index.d.ts, 30, 3)) +>T : Symbol(T, Decl(index.d.ts, 32, 27)) +>JSXElementConstructor : Symbol(JSXElementConstructor, Decl(index.d.ts, 11, 16)) ExoticComponent> & { ->ExoticComponent : Symbol(ExoticComponent, Decl(index.d.ts, 28, 57)) ->ComponentProps : Symbol(ComponentProps, Decl(index.d.ts, 25, 3)) ->T : Symbol(T, Decl(index.d.ts, 35, 27)) +>ExoticComponent : Symbol(ExoticComponent, Decl(index.d.ts, 25, 57)) +>ComponentProps : Symbol(ComponentProps, Decl(index.d.ts, 22, 3)) +>T : Symbol(T, Decl(index.d.ts, 32, 27)) readonly _result: T; ->_result : Symbol(_result, Decl(index.d.ts, 36, 42)) ->T : Symbol(T, Decl(index.d.ts, 35, 27)) +>_result : Symbol(_result, Decl(index.d.ts, 33, 42)) +>T : Symbol(T, Decl(index.d.ts, 32, 27)) }; function createElement(): void; ->createElement : Symbol(createElement, Decl(index.d.ts, 38, 6)) +>createElement : Symbol(createElement, Decl(index.d.ts, 35, 6)) namespace JSX { ->JSX : Symbol(JSX, Decl(index.d.ts, 40, 33)) +>JSX : Symbol(JSX, Decl(index.d.ts, 37, 33)) interface Element extends GlobalJSXElement {} ->Element : Symbol(Element, Decl(index.d.ts, 42, 17)) ->GlobalJSXElement : Symbol(GlobalJSXElement, Decl(index.d.ts, 74, 1)) +>Element : Symbol(Element, Decl(index.d.ts, 39, 17)) +>GlobalJSXElement : Symbol(GlobalJSXElement, Decl(index.d.ts, 71, 1)) interface ElementChildrenAttribute ->ElementChildrenAttribute : Symbol(ElementChildrenAttribute, Decl(index.d.ts, 43, 49)) +>ElementChildrenAttribute : Symbol(ElementChildrenAttribute, Decl(index.d.ts, 40, 49)) extends GlobalJSXElementChildrenAttribute {} ->GlobalJSXElementChildrenAttribute : Symbol(GlobalJSXElementChildrenAttribute, Decl(index.d.ts, 76, 49)) +>GlobalJSXElementChildrenAttribute : Symbol(GlobalJSXElementChildrenAttribute, Decl(index.d.ts, 73, 49)) type LibraryManagedAttributes = GlobalJSXLibraryManagedAttributes< ->LibraryManagedAttributes : Symbol(LibraryManagedAttributes, Decl(index.d.ts, 45, 50)) ->C : Symbol(C, Decl(index.d.ts, 46, 34)) ->P : Symbol(P, Decl(index.d.ts, 46, 36)) ->GlobalJSXLibraryManagedAttributes : Symbol(GlobalJSXLibraryManagedAttributes, Decl(index.d.ts, 78, 41)) +>LibraryManagedAttributes : Symbol(LibraryManagedAttributes, Decl(index.d.ts, 42, 50)) +>C : Symbol(C, Decl(index.d.ts, 43, 34)) +>P : Symbol(P, Decl(index.d.ts, 43, 36)) +>GlobalJSXLibraryManagedAttributes : Symbol(GlobalJSXLibraryManagedAttributes, Decl(index.d.ts, 75, 41)) C, ->C : Symbol(C, Decl(index.d.ts, 46, 34)) +>C : Symbol(C, Decl(index.d.ts, 43, 34)) P ->P : Symbol(P, Decl(index.d.ts, 46, 36)) +>P : Symbol(P, Decl(index.d.ts, 43, 36)) >; interface IntrinsicElements extends GlobalJSXIntrinsicElements {} ->IntrinsicElements : Symbol(IntrinsicElements, Decl(index.d.ts, 49, 6)) ->GlobalJSXIntrinsicElements : Symbol(GlobalJSXIntrinsicElements, Decl(index.d.ts, 82, 2)) +>IntrinsicElements : Symbol(IntrinsicElements, Decl(index.d.ts, 46, 6)) +>GlobalJSXIntrinsicElements : Symbol(GlobalJSXIntrinsicElements, Decl(index.d.ts, 79, 2)) } } type ReactManagedAttributes = C extends { defaultProps: infer D } ->ReactManagedAttributes : Symbol(ReactManagedAttributes, Decl(index.d.ts, 52, 1)) ->C : Symbol(C, Decl(index.d.ts, 54, 28)) ->P : Symbol(P, Decl(index.d.ts, 54, 30)) ->C : Symbol(C, Decl(index.d.ts, 54, 28)) ->defaultProps : Symbol(defaultProps, Decl(index.d.ts, 54, 47)) ->D : Symbol(D, Decl(index.d.ts, 54, 67)) +>ReactManagedAttributes : Symbol(ReactManagedAttributes, Decl(index.d.ts, 49, 1)) +>C : Symbol(C, Decl(index.d.ts, 51, 28)) +>P : Symbol(P, Decl(index.d.ts, 51, 30)) +>C : Symbol(C, Decl(index.d.ts, 51, 28)) +>defaultProps : Symbol(defaultProps, Decl(index.d.ts, 51, 47)) +>D : Symbol(D, Decl(index.d.ts, 51, 67)) ? P & D ->P : Symbol(P, Decl(index.d.ts, 54, 30)) ->D : Symbol(D, Decl(index.d.ts, 54, 67)) +>P : Symbol(P, Decl(index.d.ts, 51, 30)) +>D : Symbol(D, Decl(index.d.ts, 51, 67)) : P; ->P : Symbol(P, Decl(index.d.ts, 54, 30)) +>P : Symbol(P, Decl(index.d.ts, 51, 30)) declare global { ->global : Symbol(global, Decl(index.d.ts, 56, 6)) +>global : Symbol(global, Decl(index.d.ts, 53, 6)) namespace JSX { ->JSX : Symbol(JSX, Decl(index.d.ts, 58, 16)) +>JSX : Symbol(JSX, Decl(index.d.ts, 55, 16)) interface Element extends React.ReactElement {} ->Element : Symbol(Element, Decl(index.d.ts, 59, 17)) ->React.ReactElement : Symbol(React.ReactElement, Decl(index.d.ts, 15, 58)) ->React : Symbol(React, Decl(index.d.ts, 4, 26)) ->ReactElement : Symbol(React.ReactElement, Decl(index.d.ts, 15, 58)) +>Element : Symbol(Element, Decl(index.d.ts, 56, 17)) +>React.ReactElement : Symbol(React.ReactElement, Decl(index.d.ts, 12, 58)) +>React : Symbol(React, Decl(index.d.ts, 1, 26)) +>ReactElement : Symbol(React.ReactElement, Decl(index.d.ts, 12, 58)) interface ElementChildrenAttribute { ->ElementChildrenAttribute : Symbol(ElementChildrenAttribute, Decl(index.d.ts, 60, 61)) +>ElementChildrenAttribute : Symbol(ElementChildrenAttribute, Decl(index.d.ts, 57, 61)) children: {}; ->children : Symbol(ElementChildrenAttribute.children, Decl(index.d.ts, 61, 40)) +>children : Symbol(ElementChildrenAttribute.children, Decl(index.d.ts, 58, 40)) } type LibraryManagedAttributes = C extends React.LazyExoticComponent< ->LibraryManagedAttributes : Symbol(LibraryManagedAttributes, Decl(index.d.ts, 63, 5)) ->C : Symbol(C, Decl(index.d.ts, 64, 34)) ->P : Symbol(P, Decl(index.d.ts, 64, 36)) ->C : Symbol(C, Decl(index.d.ts, 64, 34)) ->React : Symbol(React, Decl(index.d.ts, 4, 26)) ->LazyExoticComponent : Symbol(React.LazyExoticComponent, Decl(index.d.ts, 33, 3)) +>LibraryManagedAttributes : Symbol(LibraryManagedAttributes, Decl(index.d.ts, 60, 5)) +>C : Symbol(C, Decl(index.d.ts, 61, 34)) +>P : Symbol(P, Decl(index.d.ts, 61, 36)) +>C : Symbol(C, Decl(index.d.ts, 61, 34)) +>React : Symbol(React, Decl(index.d.ts, 1, 26)) +>LazyExoticComponent : Symbol(React.LazyExoticComponent, Decl(index.d.ts, 30, 3)) infer T ->T : Symbol(T, Decl(index.d.ts, 65, 11)) +>T : Symbol(T, Decl(index.d.ts, 62, 11)) > ? ReactManagedAttributes ->ReactManagedAttributes : Symbol(ReactManagedAttributes, Decl(index.d.ts, 52, 1)) ->T : Symbol(T, Decl(index.d.ts, 65, 11)) ->P : Symbol(P, Decl(index.d.ts, 64, 36)) +>ReactManagedAttributes : Symbol(ReactManagedAttributes, Decl(index.d.ts, 49, 1)) +>T : Symbol(T, Decl(index.d.ts, 62, 11)) +>P : Symbol(P, Decl(index.d.ts, 61, 36)) : ReactManagedAttributes; ->ReactManagedAttributes : Symbol(ReactManagedAttributes, Decl(index.d.ts, 52, 1)) ->C : Symbol(C, Decl(index.d.ts, 64, 34)) ->P : Symbol(P, Decl(index.d.ts, 64, 36)) +>ReactManagedAttributes : Symbol(ReactManagedAttributes, Decl(index.d.ts, 49, 1)) +>C : Symbol(C, Decl(index.d.ts, 61, 34)) +>P : Symbol(P, Decl(index.d.ts, 61, 36)) interface IntrinsicElements { ->IntrinsicElements : Symbol(IntrinsicElements, Decl(index.d.ts, 68, 37)) +>IntrinsicElements : Symbol(IntrinsicElements, Decl(index.d.ts, 65, 37)) div: {}; ->div : Symbol(IntrinsicElements.div, Decl(index.d.ts, 69, 33)) +>div : Symbol(IntrinsicElements.div, Decl(index.d.ts, 66, 33)) span: {}; ->span : Symbol(IntrinsicElements.span, Decl(index.d.ts, 70, 14)) +>span : Symbol(IntrinsicElements.span, Decl(index.d.ts, 67, 14)) } } } interface GlobalJSXElement extends JSX.Element {} ->GlobalJSXElement : Symbol(GlobalJSXElement, Decl(index.d.ts, 74, 1)) ->JSX.Element : Symbol(JSX.Element, Decl(index.d.ts, 59, 17)) ->JSX : Symbol(JSX, Decl(index.d.ts, 58, 16)) ->Element : Symbol(JSX.Element, Decl(index.d.ts, 59, 17)) +>GlobalJSXElement : Symbol(GlobalJSXElement, Decl(index.d.ts, 71, 1)) +>JSX.Element : Symbol(JSX.Element, Decl(index.d.ts, 56, 17)) +>JSX : Symbol(JSX, Decl(index.d.ts, 55, 16)) +>Element : Symbol(JSX.Element, Decl(index.d.ts, 56, 17)) interface GlobalJSXElementChildrenAttribute ->GlobalJSXElementChildrenAttribute : Symbol(GlobalJSXElementChildrenAttribute, Decl(index.d.ts, 76, 49)) +>GlobalJSXElementChildrenAttribute : Symbol(GlobalJSXElementChildrenAttribute, Decl(index.d.ts, 73, 49)) extends JSX.ElementChildrenAttribute {} ->JSX.ElementChildrenAttribute : Symbol(JSX.ElementChildrenAttribute, Decl(index.d.ts, 60, 61)) ->JSX : Symbol(JSX, Decl(index.d.ts, 58, 16)) ->ElementChildrenAttribute : Symbol(JSX.ElementChildrenAttribute, Decl(index.d.ts, 60, 61)) +>JSX.ElementChildrenAttribute : Symbol(JSX.ElementChildrenAttribute, Decl(index.d.ts, 57, 61)) +>JSX : Symbol(JSX, Decl(index.d.ts, 55, 16)) +>ElementChildrenAttribute : Symbol(JSX.ElementChildrenAttribute, Decl(index.d.ts, 57, 61)) type GlobalJSXLibraryManagedAttributes = JSX.LibraryManagedAttributes< ->GlobalJSXLibraryManagedAttributes : Symbol(GlobalJSXLibraryManagedAttributes, Decl(index.d.ts, 78, 41)) ->C : Symbol(C, Decl(index.d.ts, 79, 39)) ->P : Symbol(P, Decl(index.d.ts, 79, 41)) ->JSX : Symbol(JSX, Decl(index.d.ts, 58, 16)) ->LibraryManagedAttributes : Symbol(JSX.LibraryManagedAttributes, Decl(index.d.ts, 63, 5)) +>GlobalJSXLibraryManagedAttributes : Symbol(GlobalJSXLibraryManagedAttributes, Decl(index.d.ts, 75, 41)) +>C : Symbol(C, Decl(index.d.ts, 76, 39)) +>P : Symbol(P, Decl(index.d.ts, 76, 41)) +>JSX : Symbol(JSX, Decl(index.d.ts, 55, 16)) +>LibraryManagedAttributes : Symbol(JSX.LibraryManagedAttributes, Decl(index.d.ts, 60, 5)) C, ->C : Symbol(C, Decl(index.d.ts, 79, 39)) +>C : Symbol(C, Decl(index.d.ts, 76, 39)) P ->P : Symbol(P, Decl(index.d.ts, 79, 41)) +>P : Symbol(P, Decl(index.d.ts, 76, 41)) >; interface GlobalJSXIntrinsicElements extends JSX.IntrinsicElements {} ->GlobalJSXIntrinsicElements : Symbol(GlobalJSXIntrinsicElements, Decl(index.d.ts, 82, 2)) ->JSX.IntrinsicElements : Symbol(JSX.IntrinsicElements, Decl(index.d.ts, 68, 37)) ->JSX : Symbol(JSX, Decl(index.d.ts, 58, 16)) ->IntrinsicElements : Symbol(JSX.IntrinsicElements, Decl(index.d.ts, 68, 37)) +>GlobalJSXIntrinsicElements : Symbol(GlobalJSXIntrinsicElements, Decl(index.d.ts, 79, 2)) +>JSX.IntrinsicElements : Symbol(JSX.IntrinsicElements, Decl(index.d.ts, 65, 37)) +>JSX : Symbol(JSX, Decl(index.d.ts, 55, 16)) +>IntrinsicElements : Symbol(JSX.IntrinsicElements, Decl(index.d.ts, 65, 37)) === src/index.tsx === import React from 'react' @@ -262,14 +259,14 @@ function Comp() { >Comp : Symbol(Comp, Decl(index.tsx, 4, 70)) return

->div : Symbol(JSX.IntrinsicElements.div, Decl(index.d.ts, 69, 33)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(index.d.ts, 66, 33)) Scope: {displayEnum("VALUE")} ->span : Symbol(JSX.IntrinsicElements.span, Decl(index.d.ts, 70, 14)) ->span : Symbol(JSX.IntrinsicElements.span, Decl(index.d.ts, 70, 14)) +>span : Symbol(JSX.IntrinsicElements.span, Decl(index.d.ts, 67, 14)) +>span : Symbol(JSX.IntrinsicElements.span, Decl(index.d.ts, 67, 14)) >displayEnum : Symbol(displayEnum, Decl(index.tsx, 4, 5))
->div : Symbol(JSX.IntrinsicElements.div, Decl(index.d.ts, 69, 33)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(index.d.ts, 66, 33)) } diff --git a/tests/baselines/reference/unionReductionWithStringMappingAndIdenticalBaseTypeExistsNoCrash.types b/tests/baselines/reference/unionReductionWithStringMappingAndIdenticalBaseTypeExistsNoCrash.types index db99c94a2c9..5e1ae8802a8 100644 --- a/tests/baselines/reference/unionReductionWithStringMappingAndIdenticalBaseTypeExistsNoCrash.types +++ b/tests/baselines/reference/unionReductionWithStringMappingAndIdenticalBaseTypeExistsNoCrash.types @@ -1,9 +1,6 @@ //// [tests/cases/compiler/unionReductionWithStringMappingAndIdenticalBaseTypeExistsNoCrash.tsx] //// === node_modules/@types/react/index.d.ts === -// https://github.com/microsoft/TypeScript/issues/56688 - - export = React; >React : typeof React diff --git a/tests/baselines/reference/untypedModuleImport.js b/tests/baselines/reference/untypedModuleImport.js index 75d5ede0e55..9f93f968c4b 100644 --- a/tests/baselines/reference/untypedModuleImport.js +++ b/tests/baselines/reference/untypedModuleImport.js @@ -1,9 +1,6 @@ //// [tests/cases/conformance/moduleResolution/untypedModuleImport.ts] //// //// [index.js] -// This tests that importing from a JS file globally works in an untyped way. -// (Assuming we don't have `--noImplicitAny` or `--allowJs`.) - This file is not processed. //// [a.ts] diff --git a/tests/baselines/reference/untypedModuleImport_allowJs.js b/tests/baselines/reference/untypedModuleImport_allowJs.js index fcdb3d23210..c4bbe0d49f8 100644 --- a/tests/baselines/reference/untypedModuleImport_allowJs.js +++ b/tests/baselines/reference/untypedModuleImport_allowJs.js @@ -1,8 +1,6 @@ //// [tests/cases/conformance/moduleResolution/untypedModuleImport_allowJs.ts] //// //// [index.js] -// Same as untypedModuleImport.ts but with --allowJs, so the package will actually be typed. - exports.default = { bar() { return 0; } } //// [a.ts] diff --git a/tests/baselines/reference/untypedModuleImport_allowJs.symbols b/tests/baselines/reference/untypedModuleImport_allowJs.symbols index a7bbaf6a06c..0c9665a5aff 100644 --- a/tests/baselines/reference/untypedModuleImport_allowJs.symbols +++ b/tests/baselines/reference/untypedModuleImport_allowJs.symbols @@ -5,16 +5,14 @@ import foo from "foo"; >foo : Symbol(foo, Decl(a.ts, 0, 6)) foo.bar(); ->foo.bar : Symbol(bar, Decl(index.js, 2, 19)) +>foo.bar : Symbol(bar, Decl(index.js, 0, 19)) >foo : Symbol(foo, Decl(a.ts, 0, 6)) ->bar : Symbol(bar, Decl(index.js, 2, 19)) +>bar : Symbol(bar, Decl(index.js, 0, 19)) === /node_modules/foo/index.js === -// Same as untypedModuleImport.ts but with --allowJs, so the package will actually be typed. - exports.default = { bar() { return 0; } } >exports.default : Symbol(default, Decl(index.js, 0, 0)) >exports : Symbol(default, Decl(index.js, 0, 0)) >default : Symbol(default, Decl(index.js, 0, 0)) ->bar : Symbol(bar, Decl(index.js, 2, 19)) +>bar : Symbol(bar, Decl(index.js, 0, 19)) diff --git a/tests/baselines/reference/untypedModuleImport_allowJs.types b/tests/baselines/reference/untypedModuleImport_allowJs.types index 130e985abd7..114f087c642 100644 --- a/tests/baselines/reference/untypedModuleImport_allowJs.types +++ b/tests/baselines/reference/untypedModuleImport_allowJs.types @@ -11,8 +11,6 @@ foo.bar(); >bar : () => number === /node_modules/foo/index.js === -// Same as untypedModuleImport.ts but with --allowJs, so the package will actually be typed. - exports.default = { bar() { return 0; } } >exports.default = { bar() { return 0; } } : { bar(): number; } >exports.default : { bar(): number; } diff --git a/tests/baselines/reference/untypedModuleImport_noImplicitAny.errors.txt b/tests/baselines/reference/untypedModuleImport_noImplicitAny.errors.txt index 55715dc4ece..f7e0a3b8c25 100644 --- a/tests/baselines/reference/untypedModuleImport_noImplicitAny.errors.txt +++ b/tests/baselines/reference/untypedModuleImport_noImplicitAny.errors.txt @@ -9,8 +9,6 @@ !!! error TS7016: Try `npm i --save-dev @types/foo` if it exists or add a new declaration (.d.ts) file containing `declare module 'foo';` ==== /node_modules/foo/package.json (0 errors) ==== - // This tests that `--noImplicitAny` disables untyped modules. - { "name": "foo", "version": "1.2.3" } ==== /node_modules/foo/index.js (0 errors) ==== diff --git a/tests/baselines/reference/untypedModuleImport_noImplicitAny.js b/tests/baselines/reference/untypedModuleImport_noImplicitAny.js index 7f4274fed19..d51002def8c 100644 --- a/tests/baselines/reference/untypedModuleImport_noImplicitAny.js +++ b/tests/baselines/reference/untypedModuleImport_noImplicitAny.js @@ -1,8 +1,6 @@ //// [tests/cases/conformance/moduleResolution/untypedModuleImport_noImplicitAny.ts] //// //// [package.json] -// This tests that `--noImplicitAny` disables untyped modules. - { "name": "foo", "version": "1.2.3" } //// [index.js] diff --git a/tests/baselines/reference/untypedModuleImport_vsAmbient.js b/tests/baselines/reference/untypedModuleImport_vsAmbient.js index 973d37b1b59..c41320cd635 100644 --- a/tests/baselines/reference/untypedModuleImport_vsAmbient.js +++ b/tests/baselines/reference/untypedModuleImport_vsAmbient.js @@ -1,8 +1,6 @@ //// [tests/cases/conformance/moduleResolution/untypedModuleImport_vsAmbient.ts] //// //// [index.js] -// This tests that an ambient module declaration overrides an untyped import. - This file is not processed. //// [declarations.d.ts] diff --git a/tests/baselines/reference/untypedModuleImport_withAugmentation.errors.txt b/tests/baselines/reference/untypedModuleImport_withAugmentation.errors.txt index 290cfbc6cbd..54a9d18359a 100644 --- a/tests/baselines/reference/untypedModuleImport_withAugmentation.errors.txt +++ b/tests/baselines/reference/untypedModuleImport_withAugmentation.errors.txt @@ -11,7 +11,5 @@ x; ==== /node_modules/foo/index.js (0 errors) ==== - // This tests that augmenting an untyped module is forbidden. - This file is not processed. \ No newline at end of file diff --git a/tests/baselines/reference/untypedModuleImport_withAugmentation.js b/tests/baselines/reference/untypedModuleImport_withAugmentation.js index 6712464e5be..fbfb08a7c59 100644 --- a/tests/baselines/reference/untypedModuleImport_withAugmentation.js +++ b/tests/baselines/reference/untypedModuleImport_withAugmentation.js @@ -1,8 +1,6 @@ //// [tests/cases/conformance/moduleResolution/untypedModuleImport_withAugmentation.ts] //// //// [index.js] -// This tests that augmenting an untyped module is forbidden. - This file is not processed. //// [a.ts] diff --git a/tests/baselines/reference/untypedModuleImport_withAugmentation2.errors.txt b/tests/baselines/reference/untypedModuleImport_withAugmentation2.errors.txt index 628533b93d5..f0c6781abae 100644 --- a/tests/baselines/reference/untypedModuleImport_withAugmentation2.errors.txt +++ b/tests/baselines/reference/untypedModuleImport_withAugmentation2.errors.txt @@ -1,12 +1,10 @@ -/node_modules/augmenter/index.d.ts(3,16): error TS2665: Invalid module name in augmentation. Module 'js' resolves to an untyped module at '/node_modules/js/index.js', which cannot be augmented. +/node_modules/augmenter/index.d.ts(1,16): error TS2665: Invalid module name in augmentation. Module 'js' resolves to an untyped module at '/node_modules/js/index.js', which cannot be augmented. ==== /a.ts (0 errors) ==== import { } from "augmenter"; ==== /node_modules/augmenter/index.d.ts (1 errors) ==== - // This tests that augmenting an untyped module is forbidden even in an ambient context. Contrast with `moduleAugmentationInDependency.ts`. - declare module "js" { ~~~~ !!! error TS2665: Invalid module name in augmentation. Module 'js' resolves to an untyped module at '/node_modules/js/index.js', which cannot be augmented. diff --git a/tests/baselines/reference/untypedModuleImport_withAugmentation2.js b/tests/baselines/reference/untypedModuleImport_withAugmentation2.js index 61f4440de32..9dc1e065789 100644 --- a/tests/baselines/reference/untypedModuleImport_withAugmentation2.js +++ b/tests/baselines/reference/untypedModuleImport_withAugmentation2.js @@ -1,8 +1,6 @@ //// [tests/cases/compiler/untypedModuleImport_withAugmentation2.ts] //// //// [index.d.ts] -// This tests that augmenting an untyped module is forbidden even in an ambient context. Contrast with `moduleAugmentationInDependency.ts`. - declare module "js" { export const j: number; } diff --git a/tests/baselines/reference/untypedModuleImport_withAugmentation2.symbols b/tests/baselines/reference/untypedModuleImport_withAugmentation2.symbols index 60b14b5eb53..a20c7cbf7d3 100644 --- a/tests/baselines/reference/untypedModuleImport_withAugmentation2.symbols +++ b/tests/baselines/reference/untypedModuleImport_withAugmentation2.symbols @@ -5,13 +5,11 @@ import { } from "augmenter"; === /node_modules/augmenter/index.d.ts === -// This tests that augmenting an untyped module is forbidden even in an ambient context. Contrast with `moduleAugmentationInDependency.ts`. - declare module "js" { >"js" : Symbol("js", Decl(index.d.ts, 0, 0)) export const j: number; ->j : Symbol(j, Decl(index.d.ts, 3, 16)) +>j : Symbol(j, Decl(index.d.ts, 1, 16)) } export {}; diff --git a/tests/baselines/reference/untypedModuleImport_withAugmentation2.types b/tests/baselines/reference/untypedModuleImport_withAugmentation2.types index 94560b5ebc1..04eb55e187a 100644 --- a/tests/baselines/reference/untypedModuleImport_withAugmentation2.types +++ b/tests/baselines/reference/untypedModuleImport_withAugmentation2.types @@ -5,8 +5,6 @@ import { } from "augmenter"; === /node_modules/augmenter/index.d.ts === -// This tests that augmenting an untyped module is forbidden even in an ambient context. Contrast with `moduleAugmentationInDependency.ts`. - declare module "js" { >"js" : typeof import("js") diff --git a/tests/baselines/reference/unusedInvalidTypeArguments.errors.txt b/tests/baselines/reference/unusedInvalidTypeArguments.errors.txt index 7a600c1bc0b..a3bae0b3543 100644 --- a/tests/baselines/reference/unusedInvalidTypeArguments.errors.txt +++ b/tests/baselines/reference/unusedInvalidTypeArguments.errors.txt @@ -7,13 +7,10 @@ /new.ts(1,21): error TS2307: Cannot find module 'unkown' or its corresponding type declarations. /super.ts(1,22): error TS2307: Cannot find module 'unknown' or its corresponding type declarations. /super.ts(8,17): error TS2304: Cannot find name 'InvalidReference'. -/typeReference.ts(6,17): error TS2315: Type 'U' is not generic. +/typeReference.ts(3,17): error TS2315: Type 'U' is not generic. ==== /typeReference.ts (1 errors) ==== - // Tests that types are marked as used, even if used in places that don't accept type arguments. - - type N = number; type U = number; export type Z = U; diff --git a/tests/baselines/reference/unusedInvalidTypeArguments.js b/tests/baselines/reference/unusedInvalidTypeArguments.js index 1d0c7ad6fa9..603e8f180bf 100644 --- a/tests/baselines/reference/unusedInvalidTypeArguments.js +++ b/tests/baselines/reference/unusedInvalidTypeArguments.js @@ -1,9 +1,6 @@ //// [tests/cases/compiler/unusedInvalidTypeArguments.ts] //// //// [typeReference.ts] -// Tests that types are marked as used, even if used in places that don't accept type arguments. - - type N = number; type U = number; export type Z = U; @@ -49,7 +46,6 @@ export class C extends A { //// [typeReference.js] "use strict"; -// Tests that types are marked as used, even if used in places that don't accept type arguments. Object.defineProperty(exports, "__esModule", { value: true }); //// [classReference.js] "use strict"; diff --git a/tests/baselines/reference/unusedInvalidTypeArguments.symbols b/tests/baselines/reference/unusedInvalidTypeArguments.symbols index 64880185bcb..d0901122875 100644 --- a/tests/baselines/reference/unusedInvalidTypeArguments.symbols +++ b/tests/baselines/reference/unusedInvalidTypeArguments.symbols @@ -1,18 +1,15 @@ //// [tests/cases/compiler/unusedInvalidTypeArguments.ts] //// === /typeReference.ts === -// Tests that types are marked as used, even if used in places that don't accept type arguments. - - type N = number; >N : Symbol(N, Decl(typeReference.ts, 0, 0)) type U = number; ->U : Symbol(U, Decl(typeReference.ts, 3, 16)) +>U : Symbol(U, Decl(typeReference.ts, 0, 16)) export type Z = U; ->Z : Symbol(Z, Decl(typeReference.ts, 4, 16)) ->U : Symbol(U, Decl(typeReference.ts, 3, 16)) +>Z : Symbol(Z, Decl(typeReference.ts, 1, 16)) +>U : Symbol(U, Decl(typeReference.ts, 0, 16)) >N : Symbol(N, Decl(typeReference.ts, 0, 0)) === /classReference.ts === diff --git a/tests/baselines/reference/unusedInvalidTypeArguments.types b/tests/baselines/reference/unusedInvalidTypeArguments.types index 8ef6553f778..07ebd96b780 100644 --- a/tests/baselines/reference/unusedInvalidTypeArguments.types +++ b/tests/baselines/reference/unusedInvalidTypeArguments.types @@ -1,9 +1,6 @@ //// [tests/cases/compiler/unusedInvalidTypeArguments.ts] //// === /typeReference.ts === -// Tests that types are marked as used, even if used in places that don't accept type arguments. - - type N = number; >N : number diff --git a/tests/baselines/reference/usedImportNotElidedInJs.js b/tests/baselines/reference/usedImportNotElidedInJs.js index 2f404edc8fe..2433999eec9 100644 --- a/tests/baselines/reference/usedImportNotElidedInJs.js +++ b/tests/baselines/reference/usedImportNotElidedInJs.js @@ -1,16 +1,12 @@ //// [tests/cases/compiler/usedImportNotElidedInJs.ts] //// //// [test.js] -// #38412 - - import * as moment from 'moment'; import rollupMoment__default from 'moment'; export const moment = rollupMoment__default || moment; //// [test.js] -// #38412 import * as moment from 'moment'; import rollupMoment__default from 'moment'; export const moment = rollupMoment__default || moment; diff --git a/tests/baselines/reference/visibilityOfCrossModuleTypeUsage.js b/tests/baselines/reference/visibilityOfCrossModuleTypeUsage.js index 6cc4e495119..78cc3863ff9 100644 --- a/tests/baselines/reference/visibilityOfCrossModuleTypeUsage.js +++ b/tests/baselines/reference/visibilityOfCrossModuleTypeUsage.js @@ -1,8 +1,6 @@ //// [tests/cases/compiler/visibilityOfCrossModuleTypeUsage.ts] //// //// [visibilityOfCrossModuleTypeUsage_commands.ts] -//visibilityOfCrossModuleTypeUsage - import fs = require('./visibilityOfCrossModuleTypeUsage_fs'); import server = require('./visibilityOfCrossModuleTypeUsage_server'); @@ -30,7 +28,6 @@ function run(configuration: commands.IConfiguration) { Object.defineProperty(exports, "__esModule", { value: true }); //// [visibilityOfCrossModuleTypeUsage_commands.js] "use strict"; -//visibilityOfCrossModuleTypeUsage Object.defineProperty(exports, "__esModule", { value: true }); //// [visibilityOfCrossModuleTypeUsage_fs.js] "use strict"; diff --git a/tests/baselines/reference/visibilityOfCrossModuleTypeUsage.symbols b/tests/baselines/reference/visibilityOfCrossModuleTypeUsage.symbols index db279af50c6..1f680fd4ba2 100644 --- a/tests/baselines/reference/visibilityOfCrossModuleTypeUsage.symbols +++ b/tests/baselines/reference/visibilityOfCrossModuleTypeUsage.symbols @@ -8,39 +8,37 @@ function run(configuration: commands.IConfiguration) { >run : Symbol(run, Decl(visibilityOfCrossModuleTypeUsage_fs.ts, 0, 73)) >configuration : Symbol(configuration, Decl(visibilityOfCrossModuleTypeUsage_fs.ts, 1, 13)) >commands : Symbol(commands, Decl(visibilityOfCrossModuleTypeUsage_fs.ts, 0, 0)) ->IConfiguration : Symbol(commands.IConfiguration, Decl(visibilityOfCrossModuleTypeUsage_commands.ts, 3, 69)) +>IConfiguration : Symbol(commands.IConfiguration, Decl(visibilityOfCrossModuleTypeUsage_commands.ts, 1, 69)) var absoluteWorkspacePath = configuration.workspace.toAbsolutePath(configuration.server); >absoluteWorkspacePath : Symbol(absoluteWorkspacePath, Decl(visibilityOfCrossModuleTypeUsage_fs.ts, 2, 7)) >configuration.workspace.toAbsolutePath : Symbol(IWorkspace.toAbsolutePath, Decl(visibilityOfCrossModuleTypeUsage_server.ts, 3, 29)) ->configuration.workspace : Symbol(commands.IConfiguration.workspace, Decl(visibilityOfCrossModuleTypeUsage_commands.ts, 5, 33)) +>configuration.workspace : Symbol(commands.IConfiguration.workspace, Decl(visibilityOfCrossModuleTypeUsage_commands.ts, 3, 33)) >configuration : Symbol(configuration, Decl(visibilityOfCrossModuleTypeUsage_fs.ts, 1, 13)) ->workspace : Symbol(commands.IConfiguration.workspace, Decl(visibilityOfCrossModuleTypeUsage_commands.ts, 5, 33)) +>workspace : Symbol(commands.IConfiguration.workspace, Decl(visibilityOfCrossModuleTypeUsage_commands.ts, 3, 33)) >toAbsolutePath : Symbol(IWorkspace.toAbsolutePath, Decl(visibilityOfCrossModuleTypeUsage_server.ts, 3, 29)) ->configuration.server : Symbol(commands.IConfiguration.server, Decl(visibilityOfCrossModuleTypeUsage_commands.ts, 6, 33)) +>configuration.server : Symbol(commands.IConfiguration.server, Decl(visibilityOfCrossModuleTypeUsage_commands.ts, 4, 33)) >configuration : Symbol(configuration, Decl(visibilityOfCrossModuleTypeUsage_fs.ts, 1, 13)) ->server : Symbol(commands.IConfiguration.server, Decl(visibilityOfCrossModuleTypeUsage_commands.ts, 6, 33)) +>server : Symbol(commands.IConfiguration.server, Decl(visibilityOfCrossModuleTypeUsage_commands.ts, 4, 33)) } === visibilityOfCrossModuleTypeUsage_commands.ts === -//visibilityOfCrossModuleTypeUsage - import fs = require('./visibilityOfCrossModuleTypeUsage_fs'); >fs : Symbol(fs, Decl(visibilityOfCrossModuleTypeUsage_commands.ts, 0, 0)) import server = require('./visibilityOfCrossModuleTypeUsage_server'); ->server : Symbol(server, Decl(visibilityOfCrossModuleTypeUsage_commands.ts, 2, 61)) +>server : Symbol(server, Decl(visibilityOfCrossModuleTypeUsage_commands.ts, 0, 61)) export interface IConfiguration { ->IConfiguration : Symbol(IConfiguration, Decl(visibilityOfCrossModuleTypeUsage_commands.ts, 3, 69)) +>IConfiguration : Symbol(IConfiguration, Decl(visibilityOfCrossModuleTypeUsage_commands.ts, 1, 69)) workspace: server.IWorkspace; ->workspace : Symbol(IConfiguration.workspace, Decl(visibilityOfCrossModuleTypeUsage_commands.ts, 5, 33)) ->server : Symbol(server, Decl(visibilityOfCrossModuleTypeUsage_commands.ts, 2, 61)) +>workspace : Symbol(IConfiguration.workspace, Decl(visibilityOfCrossModuleTypeUsage_commands.ts, 3, 33)) +>server : Symbol(server, Decl(visibilityOfCrossModuleTypeUsage_commands.ts, 0, 61)) >IWorkspace : Symbol(server.IWorkspace, Decl(visibilityOfCrossModuleTypeUsage_server.ts, 1, 1)) server?: server.IServer; ->server : Symbol(IConfiguration.server, Decl(visibilityOfCrossModuleTypeUsage_commands.ts, 6, 33)) ->server : Symbol(server, Decl(visibilityOfCrossModuleTypeUsage_commands.ts, 2, 61)) +>server : Symbol(IConfiguration.server, Decl(visibilityOfCrossModuleTypeUsage_commands.ts, 4, 33)) +>server : Symbol(server, Decl(visibilityOfCrossModuleTypeUsage_commands.ts, 0, 61)) >IServer : Symbol(server.IServer, Decl(visibilityOfCrossModuleTypeUsage_server.ts, 0, 0)) } diff --git a/tests/baselines/reference/visibilityOfCrossModuleTypeUsage.types b/tests/baselines/reference/visibilityOfCrossModuleTypeUsage.types index cd3ff619154..2ea96a394ee 100644 --- a/tests/baselines/reference/visibilityOfCrossModuleTypeUsage.types +++ b/tests/baselines/reference/visibilityOfCrossModuleTypeUsage.types @@ -22,8 +22,6 @@ function run(configuration: commands.IConfiguration) { >server : import("visibilityOfCrossModuleTypeUsage_server").IServer } === visibilityOfCrossModuleTypeUsage_commands.ts === -//visibilityOfCrossModuleTypeUsage - import fs = require('./visibilityOfCrossModuleTypeUsage_fs'); >fs : typeof fs diff --git a/tests/cases/compiler/doNotEmitPinnedCommentOnNotEmittedNode.ts b/tests/cases/compiler/doNotEmitPinnedCommentOnNotEmittedNode.ts index 23a1000fa11..87006d3cc29 100644 --- a/tests/cases/compiler/doNotEmitPinnedCommentOnNotEmittedNode.ts +++ b/tests/cases/compiler/doNotEmitPinnedCommentOnNotEmittedNode.ts @@ -6,7 +6,6 @@ class C { public foo(x: string, y: number) { } } -// @Filename: file1.ts var x = 10; /*! remove pinned comment anywhere else */ diff --git a/tests/cases/compiler/enumAssignmentCompat6.ts b/tests/cases/compiler/enumAssignmentCompat6.ts index b91300d37c5..dccc6bdc7e8 100644 --- a/tests/cases/compiler/enumAssignmentCompat6.ts +++ b/tests/cases/compiler/enumAssignmentCompat6.ts @@ -1,4 +1,4 @@ -// @filename a.ts +// @filename: a.ts namespace numerics { export enum DiagnosticCategory { Warning, diff --git a/tests/cases/compiler/exportDefaultWithJSDoc1.ts b/tests/cases/compiler/exportDefaultWithJSDoc1.ts index 2140ccc8aa1..7010f2db7d7 100644 --- a/tests/cases/compiler/exportDefaultWithJSDoc1.ts +++ b/tests/cases/compiler/exportDefaultWithJSDoc1.ts @@ -3,12 +3,13 @@ // @checkJs: true // @noEmit: true +// @Filename: a.js + /** * A number, or a string containing a number. * @typedef {(number|string)} NumberLike */ -// @Filename: a.js /** @type {NumberLike[]} */export default ([ ]); // @Filename: b.ts diff --git a/tests/cases/compiler/exportDefaultWithJSDoc2.ts b/tests/cases/compiler/exportDefaultWithJSDoc2.ts index 1b14248bfa6..a652cf758d9 100644 --- a/tests/cases/compiler/exportDefaultWithJSDoc2.ts +++ b/tests/cases/compiler/exportDefaultWithJSDoc2.ts @@ -3,12 +3,13 @@ // @checkJs: true // @noEmit: true +// @Filename: a.js + /** * A number, or a string containing a number. * @typedef {(number|string)} NumberLike */ -// @Filename: a.js export default /** @type {NumberLike[]} */([ ]); // @Filename: b.ts