From 766e83f92b44ab5c75f309ccd144434d441ceb89 Mon Sep 17 00:00:00 2001 From: Jack Bates Date: Mon, 1 Nov 2021 16:34:56 -0700 Subject: [PATCH 1/6] Inline const enum in import equals declaration --- src/compiler/checker.ts | 16 ++++++---------- src/compiler/factory/utilities.ts | 2 +- src/compiler/transformers/ts.ts | 7 +++---- 3 files changed, 10 insertions(+), 15 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 9a8e9eb1ee868..086b2f289863b 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -41611,22 +41611,18 @@ namespace ts { return getNodeLinks(node).enumMemberValue; } - function canHaveConstantValue(node: Node): node is EnumMember | AccessExpression { - switch (node.kind) { - case SyntaxKind.EnumMember: - case SyntaxKind.PropertyAccessExpression: - case SyntaxKind.ElementAccessExpression: - return true; - } - return false; + function canHaveConstantValue(node: Node): node is EnumMember | EntityName | AccessExpression { + return isEnumMember(node) || isEntityName(node) || isAccessExpression(node); } - function getConstantValue(node: EnumMember | AccessExpression): string | number | undefined { + function getConstantValue(node: EnumMember | EntityName | AccessExpression): string | number | undefined { if (node.kind === SyntaxKind.EnumMember) { return getEnumMemberValue(node); } - const symbol = getNodeLinks(node).resolvedSymbol; + const symbol = isEntityName(node) + ? resolveEntityName(node, SymbolFlags.EnumMember) + : getNodeLinks(node).resolvedSymbol; if (symbol && (symbol.flags & SymbolFlags.EnumMember)) { // inline property\index accesses only for const enums const member = symbol.valueDeclaration as EnumMember; diff --git a/src/compiler/factory/utilities.ts b/src/compiler/factory/utilities.ts index 7daa31c522732..756fd56076c7b 100644 --- a/src/compiler/factory/utilities.ts +++ b/src/compiler/factory/utilities.ts @@ -162,7 +162,7 @@ namespace ts { const left = createExpressionFromEntityName(factory, node.left); // TODO(rbuckton): Does this need to be parented? const right = setParent(setTextRange(factory.cloneNode(node.right), node.right), node.right.parent); - return setTextRange(factory.createPropertyAccessExpression(left, right), node); + return setOriginalNode(setTextRange(factory.createPropertyAccessExpression(left, right), node), node); } else { // TODO(rbuckton): Does this need to be parented? diff --git a/src/compiler/transformers/ts.ts b/src/compiler/transformers/ts.ts index 8561db1c633ef..711a3b11f5861 100644 --- a/src/compiler/transformers/ts.ts +++ b/src/compiler/transformers/ts.ts @@ -3342,10 +3342,9 @@ namespace ts { const substitute = typeof constantValue === "string" ? factory.createStringLiteral(constantValue) : factory.createNumericLiteral(constantValue); if (!compilerOptions.removeComments) { - const originalNode = getOriginalNode(node, isAccessExpression); - const propertyName = isPropertyAccessExpression(originalNode) - ? declarationNameToString(originalNode.name) - : getTextOfNode(originalNode.argumentExpression); + const propertyName = isPropertyAccessExpression(node) + ? declarationNameToString(node.name) + : getTextOfNode(node.argumentExpression); addSyntheticTrailingComment(substitute, SyntaxKind.MultiLineCommentTrivia, ` ${propertyName} `); } From b24cb1c51f8ade0d0bcd268bfac07e39fe8b54b9 Mon Sep 17 00:00:00 2001 From: TypeScript Bot Date: Wed, 3 Nov 2021 17:20:52 +0000 Subject: [PATCH 2/6] Update Baselines and/or Applied Lint Fixes --- tests/baselines/reference/aliasBug.errors.txt | 4 + .../reference/aliasErrors.errors.txt | 5 + .../asyncQualifiedReturnType_es5.errors.txt | 14 + ...lassAbstractImportInstantiation.errors.txt | 4 + ...tsRequireAndInternalModuleAlias.errors.txt | 9 + ...InternalModuleAliasInGlobalFile.errors.txt | 34 + .../constEnumSyntheticNodesComments.js | 36 -- .../constEnumSyntheticNodesComments.symbols | 60 -- .../constEnumSyntheticNodesComments.types | 64 -- tests/baselines/reference/constEnums.js | 228 ------- tests/baselines/reference/constEnums.symbols | 548 ---------------- tests/baselines/reference/constEnums.types | 593 ------------------ ...leImportChainInExportAssignment.errors.txt | 16 + .../declFileInternalAliases.errors.txt | 20 + .../declarationEmitNameConflicts.errors.txt | 56 ++ .../reference/declareDottedExtend.errors.txt | 18 + .../dependencyViaImportAlias.errors.txt | 15 + ...rForUsingPropertyOfTypeAsType01.errors.txt | 4 + .../es6ModuleInternalImport.errors.txt | 31 + .../exportDefaultProperty.errors.txt | 46 ++ .../reference/exportImportAlias.errors.txt | 76 +++ .../exportImportAndClodule.errors.txt | 26 + .../exportsAndImports1-amd.errors.txt | 38 ++ .../exportsAndImports1-es6.errors.txt | 38 ++ .../reference/exportsAndImports1.errors.txt | 38 ++ .../exportsAndImports3-amd.errors.txt | 38 ++ .../exportsAndImports3-es6.errors.txt | 38 ++ .../reference/exportsAndImports3.errors.txt | 38 ++ .../importAliasFromNamespace.errors.txt | 26 + .../importAliasWithDottedName.errors.txt | 19 + ...AndVariableDeclarationConflict1.errors.txt | 4 + ...AndVariableDeclarationConflict2.errors.txt | 18 + ...AndVariableDeclarationConflict3.errors.txt | 5 + ...AndVariableDeclarationConflict4.errors.txt | 4 + .../reference/importEquals3.errors.txt | 4 + .../importOnAliasedIdentifiers.errors.txt | 17 + ...import_reference-exported-alias.errors.txt | 27 + .../import_reference-to-type-alias.errors.txt | 22 + .../reference/innerAliases.errors.txt | 4 + .../reference/internalAliasClass.errors.txt | 16 + ...lassInsideLocalModuleWithExport.errors.txt | 24 + ...sInsideLocalModuleWithoutExport.errors.txt | 22 + ...lModuleWithoutExportAccessError.errors.txt | 4 + ...sInsideTopLevelModuleWithExport.errors.txt | 18 + ...sideTopLevelModuleWithoutExport.errors.txt | 18 + .../reference/internalAliasEnum.errors.txt | 20 + ...EnumInsideLocalModuleWithExport.errors.txt | 20 + ...mInsideLocalModuleWithoutExport.errors.txt | 20 + ...lModuleWithoutExportAccessError.errors.txt | 4 + ...mInsideTopLevelModuleWithExport.errors.txt | 18 + ...sideTopLevelModuleWithoutExport.errors.txt | 18 + .../internalAliasFunction.errors.txt | 19 + ...tionInsideLocalModuleWithExport.errors.txt | 19 + ...nInsideLocalModuleWithoutExport.errors.txt | 19 + ...lModuleWithoutExportAccessError.errors.txt | 4 + ...nInsideTopLevelModuleWithExport.errors.txt | 17 + ...sideTopLevelModuleWithoutExport.errors.txt | 17 + .../internalAliasInitializedModule.errors.txt | 18 + ...duleInsideLocalModuleWithExport.errors.txt | 18 + ...eInsideLocalModuleWithoutExport.errors.txt | 18 + ...lModuleWithoutExportAccessError.errors.txt | 4 + ...eInsideTopLevelModuleWithExport.errors.txt | 16 + ...sideTopLevelModuleWithoutExport.errors.txt | 16 + .../reference/internalAliasVar.errors.txt | 16 + ...sVarInsideLocalModuleWithExport.errors.txt | 16 + ...rInsideLocalModuleWithoutExport.errors.txt | 16 + ...lModuleWithoutExportAccessError.errors.txt | 4 + ...rInsideTopLevelModuleWithExport.errors.txt | 15 + ...sideTopLevelModuleWithoutExport.errors.txt | 15 + .../localImportNameVsGlobalName.errors.txt | 20 + .../reference/moduleImport.errors.txt | 4 + ...meWithImportDeclarationInsideIt.errors.txt | 18 + ...eWithImportDeclarationInsideIt2.errors.txt | 18 + ...eWithImportDeclarationInsideIt3.errors.txt | 4 + ...eWithImportDeclarationInsideIt4.errors.txt | 19 + .../moduleVisibilityTest1.errors.txt | 72 +++ .../moduleVisibilityTest2.errors.txt | 4 + ...ternalReferenceImportWithExport.errors.txt | 178 ++++++ ...nalReferenceImportWithoutExport.errors.txt | 178 ++++++ ...ternalReferenceImportWithExport.errors.txt | 115 ++++ ...nalReferenceImportWithoutExport.errors.txt | 115 ++++ .../sourceMapValidationImport.errors.txt | 16 + .../reference/systemModule17.errors.txt | 43 ++ .../topLevelAwait.2(module=es2022).errors.txt | 12 + .../topLevelAwait.2(module=esnext).errors.txt | 12 + .../reference/tsxPreserveEmit1.errors.txt | 37 ++ .../reference/tsxPreserveEmit1.types | 8 +- .../typeofInternalModules.errors.txt | 4 + ...thImportInDifferentPartOfModule.errors.txt | 4 + 89 files changed, 2102 insertions(+), 1533 deletions(-) create mode 100644 tests/baselines/reference/asyncQualifiedReturnType_es5.errors.txt create mode 100644 tests/baselines/reference/collisionExportsRequireAndInternalModuleAliasInGlobalFile.errors.txt delete mode 100644 tests/baselines/reference/constEnumSyntheticNodesComments.js delete mode 100644 tests/baselines/reference/constEnumSyntheticNodesComments.symbols delete mode 100644 tests/baselines/reference/constEnumSyntheticNodesComments.types delete mode 100644 tests/baselines/reference/constEnums.js delete mode 100644 tests/baselines/reference/constEnums.symbols delete mode 100644 tests/baselines/reference/constEnums.types create mode 100644 tests/baselines/reference/declFileImportChainInExportAssignment.errors.txt create mode 100644 tests/baselines/reference/declFileInternalAliases.errors.txt create mode 100644 tests/baselines/reference/declarationEmitNameConflicts.errors.txt create mode 100644 tests/baselines/reference/declareDottedExtend.errors.txt create mode 100644 tests/baselines/reference/dependencyViaImportAlias.errors.txt create mode 100644 tests/baselines/reference/es6ModuleInternalImport.errors.txt create mode 100644 tests/baselines/reference/exportDefaultProperty.errors.txt create mode 100644 tests/baselines/reference/exportImportAlias.errors.txt create mode 100644 tests/baselines/reference/exportImportAndClodule.errors.txt create mode 100644 tests/baselines/reference/exportsAndImports1-amd.errors.txt create mode 100644 tests/baselines/reference/exportsAndImports1-es6.errors.txt create mode 100644 tests/baselines/reference/exportsAndImports1.errors.txt create mode 100644 tests/baselines/reference/exportsAndImports3-amd.errors.txt create mode 100644 tests/baselines/reference/exportsAndImports3-es6.errors.txt create mode 100644 tests/baselines/reference/exportsAndImports3.errors.txt create mode 100644 tests/baselines/reference/importAliasFromNamespace.errors.txt create mode 100644 tests/baselines/reference/importAliasWithDottedName.errors.txt create mode 100644 tests/baselines/reference/importAndVariableDeclarationConflict2.errors.txt create mode 100644 tests/baselines/reference/importOnAliasedIdentifiers.errors.txt create mode 100644 tests/baselines/reference/import_reference-exported-alias.errors.txt create mode 100644 tests/baselines/reference/import_reference-to-type-alias.errors.txt create mode 100644 tests/baselines/reference/internalAliasClass.errors.txt create mode 100644 tests/baselines/reference/internalAliasClassInsideLocalModuleWithExport.errors.txt create mode 100644 tests/baselines/reference/internalAliasClassInsideLocalModuleWithoutExport.errors.txt create mode 100644 tests/baselines/reference/internalAliasClassInsideTopLevelModuleWithExport.errors.txt create mode 100644 tests/baselines/reference/internalAliasClassInsideTopLevelModuleWithoutExport.errors.txt create mode 100644 tests/baselines/reference/internalAliasEnum.errors.txt create mode 100644 tests/baselines/reference/internalAliasEnumInsideLocalModuleWithExport.errors.txt create mode 100644 tests/baselines/reference/internalAliasEnumInsideLocalModuleWithoutExport.errors.txt create mode 100644 tests/baselines/reference/internalAliasEnumInsideTopLevelModuleWithExport.errors.txt create mode 100644 tests/baselines/reference/internalAliasEnumInsideTopLevelModuleWithoutExport.errors.txt create mode 100644 tests/baselines/reference/internalAliasFunction.errors.txt create mode 100644 tests/baselines/reference/internalAliasFunctionInsideLocalModuleWithExport.errors.txt create mode 100644 tests/baselines/reference/internalAliasFunctionInsideLocalModuleWithoutExport.errors.txt create mode 100644 tests/baselines/reference/internalAliasFunctionInsideTopLevelModuleWithExport.errors.txt create mode 100644 tests/baselines/reference/internalAliasFunctionInsideTopLevelModuleWithoutExport.errors.txt create mode 100644 tests/baselines/reference/internalAliasInitializedModule.errors.txt create mode 100644 tests/baselines/reference/internalAliasInitializedModuleInsideLocalModuleWithExport.errors.txt create mode 100644 tests/baselines/reference/internalAliasInitializedModuleInsideLocalModuleWithoutExport.errors.txt create mode 100644 tests/baselines/reference/internalAliasInitializedModuleInsideTopLevelModuleWithExport.errors.txt create mode 100644 tests/baselines/reference/internalAliasInitializedModuleInsideTopLevelModuleWithoutExport.errors.txt create mode 100644 tests/baselines/reference/internalAliasVar.errors.txt create mode 100644 tests/baselines/reference/internalAliasVarInsideLocalModuleWithExport.errors.txt create mode 100644 tests/baselines/reference/internalAliasVarInsideLocalModuleWithoutExport.errors.txt create mode 100644 tests/baselines/reference/internalAliasVarInsideTopLevelModuleWithExport.errors.txt create mode 100644 tests/baselines/reference/internalAliasVarInsideTopLevelModuleWithoutExport.errors.txt create mode 100644 tests/baselines/reference/localImportNameVsGlobalName.errors.txt create mode 100644 tests/baselines/reference/moduleSharesNameWithImportDeclarationInsideIt.errors.txt create mode 100644 tests/baselines/reference/moduleSharesNameWithImportDeclarationInsideIt2.errors.txt create mode 100644 tests/baselines/reference/moduleSharesNameWithImportDeclarationInsideIt4.errors.txt create mode 100644 tests/baselines/reference/moduleVisibilityTest1.errors.txt create mode 100644 tests/baselines/reference/privacyLocalInternalReferenceImportWithExport.errors.txt create mode 100644 tests/baselines/reference/privacyLocalInternalReferenceImportWithoutExport.errors.txt create mode 100644 tests/baselines/reference/privacyTopLevelInternalReferenceImportWithExport.errors.txt create mode 100644 tests/baselines/reference/privacyTopLevelInternalReferenceImportWithoutExport.errors.txt create mode 100644 tests/baselines/reference/sourceMapValidationImport.errors.txt create mode 100644 tests/baselines/reference/systemModule17.errors.txt create mode 100644 tests/baselines/reference/topLevelAwait.2(module=es2022).errors.txt create mode 100644 tests/baselines/reference/topLevelAwait.2(module=esnext).errors.txt create mode 100644 tests/baselines/reference/tsxPreserveEmit1.errors.txt diff --git a/tests/baselines/reference/aliasBug.errors.txt b/tests/baselines/reference/aliasBug.errors.txt index 70f6409ef21f4..933d2116e8757 100644 --- a/tests/baselines/reference/aliasBug.errors.txt +++ b/tests/baselines/reference/aliasBug.errors.txt @@ -1,6 +1,10 @@ +error TS-1: Pre-emit (1) and post-emit (2) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! tests/cases/compiler/aliasBug.ts(16,15): error TS2694: Namespace 'foo.bar.baz' has no exported member 'bar'. +!!! error TS-1: Pre-emit (1) and post-emit (2) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +!!! related TS-1: The excess diagnostics are: +!!! related TS2749 tests/cases/compiler/aliasBug.ts:9:15: 'foo.bar.baz' refers to a value, but is being used as a type here. Did you mean 'typeof foo.bar.baz'? ==== tests/cases/compiler/aliasBug.ts (1 errors) ==== module foo { export class Provide { diff --git a/tests/baselines/reference/aliasErrors.errors.txt b/tests/baselines/reference/aliasErrors.errors.txt index bb257f5337c9a..d7d17d6ee2251 100644 --- a/tests/baselines/reference/aliasErrors.errors.txt +++ b/tests/baselines/reference/aliasErrors.errors.txt @@ -1,3 +1,4 @@ +error TS-1: Pre-emit (7) and post-emit (9) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! tests/cases/compiler/aliasErrors.ts(11,12): error TS2503: Cannot find namespace 'no'. tests/cases/compiler/aliasErrors.ts(12,13): error TS2503: Cannot find namespace 'no'. tests/cases/compiler/aliasErrors.ts(13,12): error TS1003: Identifier expected. @@ -7,6 +8,10 @@ tests/cases/compiler/aliasErrors.ts(16,12): error TS2503: Cannot find namespace tests/cases/compiler/aliasErrors.ts(26,15): error TS2694: Namespace 'foo.bar.baz' has no exported member 'bar'. +!!! error TS-1: Pre-emit (7) and post-emit (9) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +!!! related TS-1: The excess diagnostics are: +!!! related TS2749 tests/cases/compiler/aliasErrors.ts:8:15: 'foo.bar.baz' refers to a value, but is being used as a type here. Did you mean 'typeof foo.bar.baz'? +!!! related TS2749 tests/cases/compiler/aliasErrors.ts:9:15: 'foo.bar' refers to a value, but is being used as a type here. Did you mean 'typeof foo.bar'? ==== tests/cases/compiler/aliasErrors.ts (7 errors) ==== module foo { export class Provide { diff --git a/tests/baselines/reference/asyncQualifiedReturnType_es5.errors.txt b/tests/baselines/reference/asyncQualifiedReturnType_es5.errors.txt new file mode 100644 index 0000000000000..4757c3b43773f --- /dev/null +++ b/tests/baselines/reference/asyncQualifiedReturnType_es5.errors.txt @@ -0,0 +1,14 @@ +error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! + + +!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +!!! related TS-1: The excess diagnostics are: +!!! related TS2749 tests/cases/conformance/async/es5/asyncQualifiedReturnType_es5.ts:6:21: 'X.MyPromise' refers to a value, but is being used as a type here. Did you mean 'typeof X.MyPromise'? +==== tests/cases/conformance/async/es5/asyncQualifiedReturnType_es5.ts (0 errors) ==== + namespace X { + export class MyPromise extends Promise { + } + } + + async function f(): X.MyPromise { + } \ No newline at end of file diff --git a/tests/baselines/reference/classAbstractImportInstantiation.errors.txt b/tests/baselines/reference/classAbstractImportInstantiation.errors.txt index a01c75b6daedb..b11e60abda9d8 100644 --- a/tests/baselines/reference/classAbstractImportInstantiation.errors.txt +++ b/tests/baselines/reference/classAbstractImportInstantiation.errors.txt @@ -1,7 +1,11 @@ +error TS-1: Pre-emit (2) and post-emit (3) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractImportInstantiation.ts(4,5): error TS2511: Cannot create an instance of an abstract class. tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractImportInstantiation.ts(9,1): error TS2511: Cannot create an instance of an abstract class. +!!! error TS-1: Pre-emit (2) and post-emit (3) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +!!! related TS-1: The excess diagnostics are: +!!! related TS2749 tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractImportInstantiation.ts:7:14: 'M.A' refers to a value, but is being used as a type here. Did you mean 'typeof M.A'? ==== tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractImportInstantiation.ts (2 errors) ==== module M { export abstract class A {} diff --git a/tests/baselines/reference/collisionExportsRequireAndInternalModuleAlias.errors.txt b/tests/baselines/reference/collisionExportsRequireAndInternalModuleAlias.errors.txt index 569fad94f68d1..73ce7dabac13b 100644 --- a/tests/baselines/reference/collisionExportsRequireAndInternalModuleAlias.errors.txt +++ b/tests/baselines/reference/collisionExportsRequireAndInternalModuleAlias.errors.txt @@ -1,7 +1,16 @@ +error TS-1: Pre-emit (2) and post-emit (8) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! tests/cases/compiler/collisionExportsRequireAndInternalModuleAlias.ts(5,8): error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of a module. tests/cases/compiler/collisionExportsRequireAndInternalModuleAlias.ts(6,8): error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of a module. +!!! error TS-1: Pre-emit (2) and post-emit (8) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +!!! related TS-1: The excess diagnostics are: +!!! related TS2749 tests/cases/compiler/collisionExportsRequireAndInternalModuleAlias.ts:5:18: 'm.c' refers to a value, but is being used as a type here. Did you mean 'typeof m.c'? +!!! related TS2749 tests/cases/compiler/collisionExportsRequireAndInternalModuleAlias.ts:6:18: 'm.c' refers to a value, but is being used as a type here. Did you mean 'typeof m.c'? +!!! related TS2749 tests/cases/compiler/collisionExportsRequireAndInternalModuleAlias.ts:11:22: 'm.c' refers to a value, but is being used as a type here. Did you mean 'typeof m.c'? +!!! related TS2749 tests/cases/compiler/collisionExportsRequireAndInternalModuleAlias.ts:12:22: 'm.c' refers to a value, but is being used as a type here. Did you mean 'typeof m.c'? +!!! related TS2749 tests/cases/compiler/collisionExportsRequireAndInternalModuleAlias.ts:18:29: 'm.c' refers to a value, but is being used as a type here. Did you mean 'typeof m.c'? +!!! related TS2749 tests/cases/compiler/collisionExportsRequireAndInternalModuleAlias.ts:19:29: 'm.c' refers to a value, but is being used as a type here. Did you mean 'typeof m.c'? ==== tests/cases/compiler/collisionExportsRequireAndInternalModuleAlias.ts (2 errors) ==== export module m { export class c { diff --git a/tests/baselines/reference/collisionExportsRequireAndInternalModuleAliasInGlobalFile.errors.txt b/tests/baselines/reference/collisionExportsRequireAndInternalModuleAliasInGlobalFile.errors.txt new file mode 100644 index 0000000000000..38a1cfd8fe2bf --- /dev/null +++ b/tests/baselines/reference/collisionExportsRequireAndInternalModuleAliasInGlobalFile.errors.txt @@ -0,0 +1,34 @@ +error TS-1: Pre-emit (0) and post-emit (6) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! + + +!!! error TS-1: Pre-emit (0) and post-emit (6) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +!!! related TS-1: The excess diagnostics are: +!!! related TS2749 tests/cases/compiler/collisionExportsRequireAndInternalModuleAliasInGlobalFile.ts:5:18: 'mOfGloalFile.c' refers to a value, but is being used as a type here. Did you mean 'typeof mOfGloalFile.c'? +!!! related TS2749 tests/cases/compiler/collisionExportsRequireAndInternalModuleAliasInGlobalFile.ts:6:18: 'mOfGloalFile.c' refers to a value, but is being used as a type here. Did you mean 'typeof mOfGloalFile.c'? +!!! related TS2749 tests/cases/compiler/collisionExportsRequireAndInternalModuleAliasInGlobalFile.ts:11:22: 'mOfGloalFile.c' refers to a value, but is being used as a type here. Did you mean 'typeof mOfGloalFile.c'? +!!! related TS2749 tests/cases/compiler/collisionExportsRequireAndInternalModuleAliasInGlobalFile.ts:12:22: 'mOfGloalFile.c' refers to a value, but is being used as a type here. Did you mean 'typeof mOfGloalFile.c'? +!!! related TS2749 tests/cases/compiler/collisionExportsRequireAndInternalModuleAliasInGlobalFile.ts:18:29: 'mOfGloalFile.c' refers to a value, but is being used as a type here. Did you mean 'typeof mOfGloalFile.c'? +!!! related TS2749 tests/cases/compiler/collisionExportsRequireAndInternalModuleAliasInGlobalFile.ts:19:29: 'mOfGloalFile.c' refers to a value, but is being used as a type here. Did you mean 'typeof mOfGloalFile.c'? +==== tests/cases/compiler/collisionExportsRequireAndInternalModuleAliasInGlobalFile.ts (0 errors) ==== + module mOfGloalFile { + export class c { + } + } + import exports = mOfGloalFile.c; + import require = mOfGloalFile.c; + new exports(); + new require(); + + module m1 { + import exports = mOfGloalFile.c; + import require = mOfGloalFile.c; + new exports(); + new require(); + } + + module m2 { + export import exports = mOfGloalFile.c; + export import require = mOfGloalFile.c; + new exports(); + new require(); + } \ No newline at end of file diff --git a/tests/baselines/reference/constEnumSyntheticNodesComments.js b/tests/baselines/reference/constEnumSyntheticNodesComments.js deleted file mode 100644 index 511b5127e5a76..0000000000000 --- a/tests/baselines/reference/constEnumSyntheticNodesComments.js +++ /dev/null @@ -1,36 +0,0 @@ -//// [constEnumSyntheticNodesComments.ts] -const enum En { A, B, C, D } - -function assert(x: T) { - return x; -} - -function verify(a: En) { - switch (a) { - case En.A: - return assert<0>(a); - case En["B"]: - return assert<1>(a); - case En[`C`]: - return assert<2>(a); - case En["\u{44}"]: - return assert<3>(a); - } -} - -//// [constEnumSyntheticNodesComments.js] -function assert(x) { - return x; -} -function verify(a) { - switch (a) { - case 0 /* A */: - return assert(a); - case 1 /* "B" */: - return assert(a); - case 2 /* `C` */: - return assert(a); - case 3 /* "\u{44}" */: - return assert(a); - } -} diff --git a/tests/baselines/reference/constEnumSyntheticNodesComments.symbols b/tests/baselines/reference/constEnumSyntheticNodesComments.symbols deleted file mode 100644 index cfd2e9bf75b9d..0000000000000 --- a/tests/baselines/reference/constEnumSyntheticNodesComments.symbols +++ /dev/null @@ -1,60 +0,0 @@ -=== tests/cases/compiler/constEnumSyntheticNodesComments.ts === -const enum En { A, B, C, D } ->En : Symbol(En, Decl(constEnumSyntheticNodesComments.ts, 0, 0)) ->A : Symbol(En.A, Decl(constEnumSyntheticNodesComments.ts, 0, 15)) ->B : Symbol(En.B, Decl(constEnumSyntheticNodesComments.ts, 0, 18)) ->C : Symbol(En.C, Decl(constEnumSyntheticNodesComments.ts, 0, 21)) ->D : Symbol(En.D, Decl(constEnumSyntheticNodesComments.ts, 0, 24)) - -function assert(x: T) { ->assert : Symbol(assert, Decl(constEnumSyntheticNodesComments.ts, 0, 28)) ->T : Symbol(T, Decl(constEnumSyntheticNodesComments.ts, 2, 16)) ->x : Symbol(x, Decl(constEnumSyntheticNodesComments.ts, 2, 19)) ->T : Symbol(T, Decl(constEnumSyntheticNodesComments.ts, 2, 16)) - - return x; ->x : Symbol(x, Decl(constEnumSyntheticNodesComments.ts, 2, 19)) -} - -function verify(a: En) { ->verify : Symbol(verify, Decl(constEnumSyntheticNodesComments.ts, 4, 1)) ->a : Symbol(a, Decl(constEnumSyntheticNodesComments.ts, 6, 16)) ->En : Symbol(En, Decl(constEnumSyntheticNodesComments.ts, 0, 0)) - - switch (a) { ->a : Symbol(a, Decl(constEnumSyntheticNodesComments.ts, 6, 16)) - - case En.A: ->En.A : Symbol(En.A, Decl(constEnumSyntheticNodesComments.ts, 0, 15)) ->En : Symbol(En, Decl(constEnumSyntheticNodesComments.ts, 0, 0)) ->A : Symbol(En.A, Decl(constEnumSyntheticNodesComments.ts, 0, 15)) - - return assert<0>(a); ->assert : Symbol(assert, Decl(constEnumSyntheticNodesComments.ts, 0, 28)) ->a : Symbol(a, Decl(constEnumSyntheticNodesComments.ts, 6, 16)) - - case En["B"]: ->En : Symbol(En, Decl(constEnumSyntheticNodesComments.ts, 0, 0)) ->"B" : Symbol(En.B, Decl(constEnumSyntheticNodesComments.ts, 0, 18)) - - return assert<1>(a); ->assert : Symbol(assert, Decl(constEnumSyntheticNodesComments.ts, 0, 28)) ->a : Symbol(a, Decl(constEnumSyntheticNodesComments.ts, 6, 16)) - - case En[`C`]: ->En : Symbol(En, Decl(constEnumSyntheticNodesComments.ts, 0, 0)) ->`C` : Symbol(En.C, Decl(constEnumSyntheticNodesComments.ts, 0, 21)) - - return assert<2>(a); ->assert : Symbol(assert, Decl(constEnumSyntheticNodesComments.ts, 0, 28)) ->a : Symbol(a, Decl(constEnumSyntheticNodesComments.ts, 6, 16)) - - case En["\u{44}"]: ->En : Symbol(En, Decl(constEnumSyntheticNodesComments.ts, 0, 0)) ->"\u{44}" : Symbol(En.D, Decl(constEnumSyntheticNodesComments.ts, 0, 24)) - - return assert<3>(a); ->assert : Symbol(assert, Decl(constEnumSyntheticNodesComments.ts, 0, 28)) ->a : Symbol(a, Decl(constEnumSyntheticNodesComments.ts, 6, 16)) - } -} diff --git a/tests/baselines/reference/constEnumSyntheticNodesComments.types b/tests/baselines/reference/constEnumSyntheticNodesComments.types deleted file mode 100644 index c02880ffdb53b..0000000000000 --- a/tests/baselines/reference/constEnumSyntheticNodesComments.types +++ /dev/null @@ -1,64 +0,0 @@ -=== tests/cases/compiler/constEnumSyntheticNodesComments.ts === -const enum En { A, B, C, D } ->En : En ->A : En.A ->B : En.B ->C : En.C ->D : En.D - -function assert(x: T) { ->assert : (x: T) => T ->x : T - - return x; ->x : T -} - -function verify(a: En) { ->verify : (a: En) => 0 | 1 | 2 | 3 ->a : En - - switch (a) { ->a : En - - case En.A: ->En.A : En.A ->En : typeof En ->A : En.A - - return assert<0>(a); ->assert<0>(a) : 0 ->assert : (x: T) => T ->a : En.A - - case En["B"]: ->En["B"] : En.B ->En : typeof En ->"B" : "B" - - return assert<1>(a); ->assert<1>(a) : 1 ->assert : (x: T) => T ->a : En.B - - case En[`C`]: ->En[`C`] : En.C ->En : typeof En ->`C` : "C" - - return assert<2>(a); ->assert<2>(a) : 2 ->assert : (x: T) => T ->a : En.C - - case En["\u{44}"]: ->En["\u{44}"] : En.D ->En : typeof En ->"\u{44}" : "D" - - return assert<3>(a); ->assert<3>(a) : 3 ->assert : (x: T) => T ->a : En.D - } -} diff --git a/tests/baselines/reference/constEnums.js b/tests/baselines/reference/constEnums.js deleted file mode 100644 index dc48951f7f57f..0000000000000 --- a/tests/baselines/reference/constEnums.js +++ /dev/null @@ -1,228 +0,0 @@ -//// [constEnums.ts] -const enum Enum1 { - A0 = 100, -} - -const enum Enum1 { - // correct cases - A, - B, - C = 10, - D = A | B, - E = A | 1, - F = 1 | A, - G = (1 & 1), - H = ~(A | B), - I = A >>> 1, - J = 1 & A, - K = ~(1 | 5), - L = ~D, - M = E << B, - N = E << 1, - O = E >> B, - P = E >> 1, - PQ = E ** 2, - Q = -D, - R = C & 5, - S = 5 & C, - T = C | D, - U = C | 1, - V = 10 | D, - W = Enum1.V, - - // correct cases: reference to the enum member from different enum declaration - W1 = A0, - W2 = Enum1.A0, - W3 = Enum1["A0"], - W4 = Enum1["W"], - W5 = Enum1[`V`], -} - - -module A { - export module B { - export module C { - export const enum E { - V1 = 1, - V2 = A.B.C.E.V1 | 100 - } - } - } -} - -module A { - export module B { - export module C { - export const enum E { - V3 = A.B.C.E["V2"] & 200, - V4 = A.B.C.E[`V1`] << 1, - } - } - } -} - -module A1 { - export module B { - export module C { - export const enum E { - V1 = 10, - V2 = 110, - } - } - } -} - -module A2 { - export module B { - export module C { - export const enum E { - V1 = 10, - V2 = 110, - } - } - // module C will be classified as value - export module C { - var x = 1 - } - } -} - -import I = A.B.C.E; -import I1 = A1.B; -import I2 = A2.B; - -function foo0(e: I): void { - if (e === I.V1) { - } - else if (e === I.V2) { - } -} - -function foo1(e: I1.C.E): void { - if (e === I1.C.E.V1) { - } - else if (e === I1.C.E.V2) { - } -} - -function foo2(e: I2.C.E): void { - if (e === I2.C.E.V1) { - } - else if (e === I2.C.E.V2) { - } -} - - -function foo(x: Enum1) { - switch (x) { - case Enum1.A: - case Enum1.B: - case Enum1.C: - case Enum1.D: - case Enum1.E: - case Enum1.F: - case Enum1.G: - case Enum1.H: - case Enum1.I: - case Enum1.J: - case Enum1.K: - case Enum1.L: - case Enum1.M: - case Enum1.N: - case Enum1.O: - case Enum1.P: - case Enum1.PQ: - case Enum1.Q: - case Enum1.R: - case Enum1.S: - case Enum1["T"]: - case Enum1[`U`]: - case Enum1.V: - case Enum1.W: - case Enum1.W1: - case Enum1.W2: - case Enum1.W3: - case Enum1.W4: - break; - } -} - -function bar(e: A.B.C.E): number { - switch (e) { - case A.B.C.E.V1: return 1; - case A.B.C.E.V2: return 1; - case A.B.C.E.V3: return 1; - } -} - -//// [constEnums.js] -var A2; -(function (A2) { - var B; - (function (B) { - // module C will be classified as value - var C; - (function (C) { - var x = 1; - })(C = B.C || (B.C = {})); - })(B = A2.B || (A2.B = {})); -})(A2 || (A2 = {})); -var I2 = A2.B; -function foo0(e) { - if (e === 1 /* V1 */) { - } - else if (e === 101 /* V2 */) { - } -} -function foo1(e) { - if (e === 10 /* V1 */) { - } - else if (e === 110 /* V2 */) { - } -} -function foo2(e) { - if (e === 10 /* V1 */) { - } - else if (e === 110 /* V2 */) { - } -} -function foo(x) { - switch (x) { - case 0 /* A */: - case 1 /* B */: - case 10 /* C */: - case 1 /* D */: - case 1 /* E */: - case 1 /* F */: - case 1 /* G */: - case -2 /* H */: - case 0 /* I */: - case 0 /* J */: - case -6 /* K */: - case -2 /* L */: - case 2 /* M */: - case 2 /* N */: - case 0 /* O */: - case 0 /* P */: - case 1 /* PQ */: - case -1 /* Q */: - case 0 /* R */: - case 0 /* S */: - case 11 /* "T" */: - case 11 /* `U` */: - case 11 /* V */: - case 11 /* W */: - case 100 /* W1 */: - case 100 /* W2 */: - case 100 /* W3 */: - case 11 /* W4 */: - break; - } -} -function bar(e) { - switch (e) { - case 1 /* V1 */: return 1; - case 101 /* V2 */: return 1; - case 64 /* V3 */: return 1; - } -} diff --git a/tests/baselines/reference/constEnums.symbols b/tests/baselines/reference/constEnums.symbols deleted file mode 100644 index 0f0536734a044..0000000000000 --- a/tests/baselines/reference/constEnums.symbols +++ /dev/null @@ -1,548 +0,0 @@ -=== tests/cases/compiler/constEnums.ts === -const enum Enum1 { ->Enum1 : Symbol(Enum1, Decl(constEnums.ts, 0, 0), Decl(constEnums.ts, 2, 1)) - - A0 = 100, ->A0 : Symbol(Enum1.A0, Decl(constEnums.ts, 0, 18)) -} - -const enum Enum1 { ->Enum1 : Symbol(Enum1, Decl(constEnums.ts, 0, 0), Decl(constEnums.ts, 2, 1)) - - // correct cases - A, ->A : Symbol(Enum1.A, Decl(constEnums.ts, 4, 18)) - - B, ->B : Symbol(Enum1.B, Decl(constEnums.ts, 6, 6)) - - C = 10, ->C : Symbol(Enum1.C, Decl(constEnums.ts, 7, 6)) - - D = A | B, ->D : Symbol(Enum1.D, Decl(constEnums.ts, 8, 11)) ->A : Symbol(Enum1.A, Decl(constEnums.ts, 4, 18)) ->B : Symbol(Enum1.B, Decl(constEnums.ts, 6, 6)) - - E = A | 1, ->E : Symbol(Enum1.E, Decl(constEnums.ts, 9, 14)) ->A : Symbol(Enum1.A, Decl(constEnums.ts, 4, 18)) - - F = 1 | A, ->F : Symbol(Enum1.F, Decl(constEnums.ts, 10, 14)) ->A : Symbol(Enum1.A, Decl(constEnums.ts, 4, 18)) - - G = (1 & 1), ->G : Symbol(Enum1.G, Decl(constEnums.ts, 11, 14)) - - H = ~(A | B), ->H : Symbol(Enum1.H, Decl(constEnums.ts, 12, 16)) ->A : Symbol(Enum1.A, Decl(constEnums.ts, 4, 18)) ->B : Symbol(Enum1.B, Decl(constEnums.ts, 6, 6)) - - I = A >>> 1, ->I : Symbol(Enum1.I, Decl(constEnums.ts, 13, 17)) ->A : Symbol(Enum1.A, Decl(constEnums.ts, 4, 18)) - - J = 1 & A, ->J : Symbol(Enum1.J, Decl(constEnums.ts, 14, 16)) ->A : Symbol(Enum1.A, Decl(constEnums.ts, 4, 18)) - - K = ~(1 | 5), ->K : Symbol(Enum1.K, Decl(constEnums.ts, 15, 14)) - - L = ~D, ->L : Symbol(Enum1.L, Decl(constEnums.ts, 16, 17)) ->D : Symbol(Enum1.D, Decl(constEnums.ts, 8, 11)) - - M = E << B, ->M : Symbol(Enum1.M, Decl(constEnums.ts, 17, 11)) ->E : Symbol(Enum1.E, Decl(constEnums.ts, 9, 14)) ->B : Symbol(Enum1.B, Decl(constEnums.ts, 6, 6)) - - N = E << 1, ->N : Symbol(Enum1.N, Decl(constEnums.ts, 18, 15)) ->E : Symbol(Enum1.E, Decl(constEnums.ts, 9, 14)) - - O = E >> B, ->O : Symbol(Enum1.O, Decl(constEnums.ts, 19, 15)) ->E : Symbol(Enum1.E, Decl(constEnums.ts, 9, 14)) ->B : Symbol(Enum1.B, Decl(constEnums.ts, 6, 6)) - - P = E >> 1, ->P : Symbol(Enum1.P, Decl(constEnums.ts, 20, 15)) ->E : Symbol(Enum1.E, Decl(constEnums.ts, 9, 14)) - - PQ = E ** 2, ->PQ : Symbol(Enum1.PQ, Decl(constEnums.ts, 21, 15)) ->E : Symbol(Enum1.E, Decl(constEnums.ts, 9, 14)) - - Q = -D, ->Q : Symbol(Enum1.Q, Decl(constEnums.ts, 22, 16)) ->D : Symbol(Enum1.D, Decl(constEnums.ts, 8, 11)) - - R = C & 5, ->R : Symbol(Enum1.R, Decl(constEnums.ts, 23, 11)) ->C : Symbol(Enum1.C, Decl(constEnums.ts, 7, 6)) - - S = 5 & C, ->S : Symbol(Enum1.S, Decl(constEnums.ts, 24, 14)) ->C : Symbol(Enum1.C, Decl(constEnums.ts, 7, 6)) - - T = C | D, ->T : Symbol(Enum1.T, Decl(constEnums.ts, 25, 14)) ->C : Symbol(Enum1.C, Decl(constEnums.ts, 7, 6)) ->D : Symbol(Enum1.D, Decl(constEnums.ts, 8, 11)) - - U = C | 1, ->U : Symbol(Enum1.U, Decl(constEnums.ts, 26, 14)) ->C : Symbol(Enum1.C, Decl(constEnums.ts, 7, 6)) - - V = 10 | D, ->V : Symbol(Enum1.V, Decl(constEnums.ts, 27, 14)) ->D : Symbol(Enum1.D, Decl(constEnums.ts, 8, 11)) - - W = Enum1.V, ->W : Symbol(Enum1.W, Decl(constEnums.ts, 28, 15)) ->Enum1.V : Symbol(Enum1.V, Decl(constEnums.ts, 27, 14)) ->Enum1 : Symbol(Enum1, Decl(constEnums.ts, 0, 0), Decl(constEnums.ts, 2, 1)) ->V : Symbol(Enum1.V, Decl(constEnums.ts, 27, 14)) - - // correct cases: reference to the enum member from different enum declaration - W1 = A0, ->W1 : Symbol(Enum1.W1, Decl(constEnums.ts, 29, 16)) ->A0 : Symbol(Enum1.A0, Decl(constEnums.ts, 0, 18)) - - W2 = Enum1.A0, ->W2 : Symbol(Enum1.W2, Decl(constEnums.ts, 32, 12)) ->Enum1.A0 : Symbol(Enum1.A0, Decl(constEnums.ts, 0, 18)) ->Enum1 : Symbol(Enum1, Decl(constEnums.ts, 0, 0), Decl(constEnums.ts, 2, 1)) ->A0 : Symbol(Enum1.A0, Decl(constEnums.ts, 0, 18)) - - W3 = Enum1["A0"], ->W3 : Symbol(Enum1.W3, Decl(constEnums.ts, 33, 18)) ->Enum1 : Symbol(Enum1, Decl(constEnums.ts, 0, 0), Decl(constEnums.ts, 2, 1)) ->"A0" : Symbol(Enum1.A0, Decl(constEnums.ts, 0, 18)) - - W4 = Enum1["W"], ->W4 : Symbol(Enum1.W4, Decl(constEnums.ts, 34, 21)) ->Enum1 : Symbol(Enum1, Decl(constEnums.ts, 0, 0), Decl(constEnums.ts, 2, 1)) ->"W" : Symbol(Enum1.W, Decl(constEnums.ts, 28, 15)) - - W5 = Enum1[`V`], ->W5 : Symbol(Enum1.W5, Decl(constEnums.ts, 35, 20)) ->Enum1 : Symbol(Enum1, Decl(constEnums.ts, 0, 0), Decl(constEnums.ts, 2, 1)) ->`V` : Symbol(Enum1.V, Decl(constEnums.ts, 27, 14)) -} - - -module A { ->A : Symbol(A, Decl(constEnums.ts, 37, 1), Decl(constEnums.ts, 49, 1)) - - export module B { ->B : Symbol(B, Decl(constEnums.ts, 40, 10), Decl(constEnums.ts, 51, 10)) - - export module C { ->C : Symbol(C, Decl(constEnums.ts, 41, 21), Decl(constEnums.ts, 52, 21)) - - export const enum E { ->E : Symbol(E, Decl(constEnums.ts, 42, 25), Decl(constEnums.ts, 53, 25)) - - V1 = 1, ->V1 : Symbol(I.V1, Decl(constEnums.ts, 43, 33)) - - V2 = A.B.C.E.V1 | 100 ->V2 : Symbol(I.V2, Decl(constEnums.ts, 44, 23)) ->A.B.C.E.V1 : Symbol(I.V1, Decl(constEnums.ts, 43, 33)) ->A.B.C.E : Symbol(E, Decl(constEnums.ts, 42, 25), Decl(constEnums.ts, 53, 25)) ->A.B.C : Symbol(C, Decl(constEnums.ts, 41, 21), Decl(constEnums.ts, 52, 21)) ->A.B : Symbol(B, Decl(constEnums.ts, 40, 10), Decl(constEnums.ts, 51, 10)) ->A : Symbol(A, Decl(constEnums.ts, 37, 1), Decl(constEnums.ts, 49, 1)) ->B : Symbol(B, Decl(constEnums.ts, 40, 10), Decl(constEnums.ts, 51, 10)) ->C : Symbol(C, Decl(constEnums.ts, 41, 21), Decl(constEnums.ts, 52, 21)) ->E : Symbol(E, Decl(constEnums.ts, 42, 25), Decl(constEnums.ts, 53, 25)) ->V1 : Symbol(I.V1, Decl(constEnums.ts, 43, 33)) - } - } - } -} - -module A { ->A : Symbol(A, Decl(constEnums.ts, 37, 1), Decl(constEnums.ts, 49, 1)) - - export module B { ->B : Symbol(B, Decl(constEnums.ts, 40, 10), Decl(constEnums.ts, 51, 10)) - - export module C { ->C : Symbol(C, Decl(constEnums.ts, 41, 21), Decl(constEnums.ts, 52, 21)) - - export const enum E { ->E : Symbol(E, Decl(constEnums.ts, 42, 25), Decl(constEnums.ts, 53, 25)) - - V3 = A.B.C.E["V2"] & 200, ->V3 : Symbol(I.V3, Decl(constEnums.ts, 54, 33)) ->A.B.C.E : Symbol(E, Decl(constEnums.ts, 42, 25), Decl(constEnums.ts, 53, 25)) ->A.B.C : Symbol(C, Decl(constEnums.ts, 41, 21), Decl(constEnums.ts, 52, 21)) ->A.B : Symbol(B, Decl(constEnums.ts, 40, 10), Decl(constEnums.ts, 51, 10)) ->A : Symbol(A, Decl(constEnums.ts, 37, 1), Decl(constEnums.ts, 49, 1)) ->B : Symbol(B, Decl(constEnums.ts, 40, 10), Decl(constEnums.ts, 51, 10)) ->C : Symbol(C, Decl(constEnums.ts, 41, 21), Decl(constEnums.ts, 52, 21)) ->E : Symbol(E, Decl(constEnums.ts, 42, 25), Decl(constEnums.ts, 53, 25)) ->"V2" : Symbol(I.V2, Decl(constEnums.ts, 44, 23)) - - V4 = A.B.C.E[`V1`] << 1, ->V4 : Symbol(I.V4, Decl(constEnums.ts, 55, 41)) ->A.B.C.E : Symbol(E, Decl(constEnums.ts, 42, 25), Decl(constEnums.ts, 53, 25)) ->A.B.C : Symbol(C, Decl(constEnums.ts, 41, 21), Decl(constEnums.ts, 52, 21)) ->A.B : Symbol(B, Decl(constEnums.ts, 40, 10), Decl(constEnums.ts, 51, 10)) ->A : Symbol(A, Decl(constEnums.ts, 37, 1), Decl(constEnums.ts, 49, 1)) ->B : Symbol(B, Decl(constEnums.ts, 40, 10), Decl(constEnums.ts, 51, 10)) ->C : Symbol(C, Decl(constEnums.ts, 41, 21), Decl(constEnums.ts, 52, 21)) ->E : Symbol(E, Decl(constEnums.ts, 42, 25), Decl(constEnums.ts, 53, 25)) ->`V1` : Symbol(I.V1, Decl(constEnums.ts, 43, 33)) - } - } - } -} - -module A1 { ->A1 : Symbol(A1, Decl(constEnums.ts, 60, 1)) - - export module B { ->B : Symbol(B, Decl(constEnums.ts, 62, 11)) - - export module C { ->C : Symbol(C, Decl(constEnums.ts, 63, 21)) - - export const enum E { ->E : Symbol(E, Decl(constEnums.ts, 64, 25)) - - V1 = 10, ->V1 : Symbol(E.V1, Decl(constEnums.ts, 65, 33)) - - V2 = 110, ->V2 : Symbol(E.V2, Decl(constEnums.ts, 66, 24)) - } - } - } -} - -module A2 { ->A2 : Symbol(A2, Decl(constEnums.ts, 71, 1)) - - export module B { ->B : Symbol(B, Decl(constEnums.ts, 73, 11)) - - export module C { ->C : Symbol(C, Decl(constEnums.ts, 74, 21), Decl(constEnums.ts, 80, 9)) - - export const enum E { ->E : Symbol(E, Decl(constEnums.ts, 75, 25)) - - V1 = 10, ->V1 : Symbol(E.V1, Decl(constEnums.ts, 76, 33)) - - V2 = 110, ->V2 : Symbol(E.V2, Decl(constEnums.ts, 77, 24)) - } - } - // module C will be classified as value - export module C { ->C : Symbol(C, Decl(constEnums.ts, 74, 21), Decl(constEnums.ts, 80, 9)) - - var x = 1 ->x : Symbol(x, Decl(constEnums.ts, 83, 15)) - } - } -} - -import I = A.B.C.E; ->I : Symbol(I, Decl(constEnums.ts, 86, 1)) ->A : Symbol(A, Decl(constEnums.ts, 37, 1), Decl(constEnums.ts, 49, 1)) ->B : Symbol(A.B, Decl(constEnums.ts, 40, 10), Decl(constEnums.ts, 51, 10)) ->C : Symbol(A.B.C, Decl(constEnums.ts, 41, 21), Decl(constEnums.ts, 52, 21)) ->E : Symbol(I, Decl(constEnums.ts, 42, 25), Decl(constEnums.ts, 53, 25)) - -import I1 = A1.B; ->I1 : Symbol(I1, Decl(constEnums.ts, 88, 19)) ->A1 : Symbol(A1, Decl(constEnums.ts, 60, 1)) ->B : Symbol(I1, Decl(constEnums.ts, 62, 11)) - -import I2 = A2.B; ->I2 : Symbol(I2, Decl(constEnums.ts, 89, 17)) ->A2 : Symbol(A2, Decl(constEnums.ts, 71, 1)) ->B : Symbol(I2, Decl(constEnums.ts, 73, 11)) - -function foo0(e: I): void { ->foo0 : Symbol(foo0, Decl(constEnums.ts, 90, 17)) ->e : Symbol(e, Decl(constEnums.ts, 92, 14)) ->I : Symbol(I, Decl(constEnums.ts, 86, 1)) - - if (e === I.V1) { ->e : Symbol(e, Decl(constEnums.ts, 92, 14)) ->I.V1 : Symbol(I.V1, Decl(constEnums.ts, 43, 33)) ->I : Symbol(I, Decl(constEnums.ts, 86, 1)) ->V1 : Symbol(I.V1, Decl(constEnums.ts, 43, 33)) - } - else if (e === I.V2) { ->e : Symbol(e, Decl(constEnums.ts, 92, 14)) ->I.V2 : Symbol(I.V2, Decl(constEnums.ts, 44, 23)) ->I : Symbol(I, Decl(constEnums.ts, 86, 1)) ->V2 : Symbol(I.V2, Decl(constEnums.ts, 44, 23)) - } -} - -function foo1(e: I1.C.E): void { ->foo1 : Symbol(foo1, Decl(constEnums.ts, 97, 1)) ->e : Symbol(e, Decl(constEnums.ts, 99, 14)) ->I1 : Symbol(I1, Decl(constEnums.ts, 88, 19)) ->C : Symbol(I1.C, Decl(constEnums.ts, 63, 21)) ->E : Symbol(I1.C.E, Decl(constEnums.ts, 64, 25)) - - if (e === I1.C.E.V1) { ->e : Symbol(e, Decl(constEnums.ts, 99, 14)) ->I1.C.E.V1 : Symbol(I1.C.E.V1, Decl(constEnums.ts, 65, 33)) ->I1.C.E : Symbol(I1.C.E, Decl(constEnums.ts, 64, 25)) ->I1.C : Symbol(I1.C, Decl(constEnums.ts, 63, 21)) ->I1 : Symbol(I1, Decl(constEnums.ts, 88, 19)) ->C : Symbol(I1.C, Decl(constEnums.ts, 63, 21)) ->E : Symbol(I1.C.E, Decl(constEnums.ts, 64, 25)) ->V1 : Symbol(I1.C.E.V1, Decl(constEnums.ts, 65, 33)) - } - else if (e === I1.C.E.V2) { ->e : Symbol(e, Decl(constEnums.ts, 99, 14)) ->I1.C.E.V2 : Symbol(I1.C.E.V2, Decl(constEnums.ts, 66, 24)) ->I1.C.E : Symbol(I1.C.E, Decl(constEnums.ts, 64, 25)) ->I1.C : Symbol(I1.C, Decl(constEnums.ts, 63, 21)) ->I1 : Symbol(I1, Decl(constEnums.ts, 88, 19)) ->C : Symbol(I1.C, Decl(constEnums.ts, 63, 21)) ->E : Symbol(I1.C.E, Decl(constEnums.ts, 64, 25)) ->V2 : Symbol(I1.C.E.V2, Decl(constEnums.ts, 66, 24)) - } -} - -function foo2(e: I2.C.E): void { ->foo2 : Symbol(foo2, Decl(constEnums.ts, 104, 1)) ->e : Symbol(e, Decl(constEnums.ts, 106, 14)) ->I2 : Symbol(I2, Decl(constEnums.ts, 89, 17)) ->C : Symbol(I2.C, Decl(constEnums.ts, 74, 21), Decl(constEnums.ts, 80, 9)) ->E : Symbol(I2.C.E, Decl(constEnums.ts, 75, 25)) - - if (e === I2.C.E.V1) { ->e : Symbol(e, Decl(constEnums.ts, 106, 14)) ->I2.C.E.V1 : Symbol(I2.C.E.V1, Decl(constEnums.ts, 76, 33)) ->I2.C.E : Symbol(I2.C.E, Decl(constEnums.ts, 75, 25)) ->I2.C : Symbol(I2.C, Decl(constEnums.ts, 74, 21), Decl(constEnums.ts, 80, 9)) ->I2 : Symbol(I2, Decl(constEnums.ts, 89, 17)) ->C : Symbol(I2.C, Decl(constEnums.ts, 74, 21), Decl(constEnums.ts, 80, 9)) ->E : Symbol(I2.C.E, Decl(constEnums.ts, 75, 25)) ->V1 : Symbol(I2.C.E.V1, Decl(constEnums.ts, 76, 33)) - } - else if (e === I2.C.E.V2) { ->e : Symbol(e, Decl(constEnums.ts, 106, 14)) ->I2.C.E.V2 : Symbol(I2.C.E.V2, Decl(constEnums.ts, 77, 24)) ->I2.C.E : Symbol(I2.C.E, Decl(constEnums.ts, 75, 25)) ->I2.C : Symbol(I2.C, Decl(constEnums.ts, 74, 21), Decl(constEnums.ts, 80, 9)) ->I2 : Symbol(I2, Decl(constEnums.ts, 89, 17)) ->C : Symbol(I2.C, Decl(constEnums.ts, 74, 21), Decl(constEnums.ts, 80, 9)) ->E : Symbol(I2.C.E, Decl(constEnums.ts, 75, 25)) ->V2 : Symbol(I2.C.E.V2, Decl(constEnums.ts, 77, 24)) - } -} - - -function foo(x: Enum1) { ->foo : Symbol(foo, Decl(constEnums.ts, 111, 1)) ->x : Symbol(x, Decl(constEnums.ts, 114, 13)) ->Enum1 : Symbol(Enum1, Decl(constEnums.ts, 0, 0), Decl(constEnums.ts, 2, 1)) - - switch (x) { ->x : Symbol(x, Decl(constEnums.ts, 114, 13)) - - case Enum1.A: ->Enum1.A : Symbol(Enum1.A, Decl(constEnums.ts, 4, 18)) ->Enum1 : Symbol(Enum1, Decl(constEnums.ts, 0, 0), Decl(constEnums.ts, 2, 1)) ->A : Symbol(Enum1.A, Decl(constEnums.ts, 4, 18)) - - case Enum1.B: ->Enum1.B : Symbol(Enum1.B, Decl(constEnums.ts, 6, 6)) ->Enum1 : Symbol(Enum1, Decl(constEnums.ts, 0, 0), Decl(constEnums.ts, 2, 1)) ->B : Symbol(Enum1.B, Decl(constEnums.ts, 6, 6)) - - case Enum1.C: ->Enum1.C : Symbol(Enum1.C, Decl(constEnums.ts, 7, 6)) ->Enum1 : Symbol(Enum1, Decl(constEnums.ts, 0, 0), Decl(constEnums.ts, 2, 1)) ->C : Symbol(Enum1.C, Decl(constEnums.ts, 7, 6)) - - case Enum1.D: ->Enum1.D : Symbol(Enum1.D, Decl(constEnums.ts, 8, 11)) ->Enum1 : Symbol(Enum1, Decl(constEnums.ts, 0, 0), Decl(constEnums.ts, 2, 1)) ->D : Symbol(Enum1.D, Decl(constEnums.ts, 8, 11)) - - case Enum1.E: ->Enum1.E : Symbol(Enum1.E, Decl(constEnums.ts, 9, 14)) ->Enum1 : Symbol(Enum1, Decl(constEnums.ts, 0, 0), Decl(constEnums.ts, 2, 1)) ->E : Symbol(Enum1.E, Decl(constEnums.ts, 9, 14)) - - case Enum1.F: ->Enum1.F : Symbol(Enum1.F, Decl(constEnums.ts, 10, 14)) ->Enum1 : Symbol(Enum1, Decl(constEnums.ts, 0, 0), Decl(constEnums.ts, 2, 1)) ->F : Symbol(Enum1.F, Decl(constEnums.ts, 10, 14)) - - case Enum1.G: ->Enum1.G : Symbol(Enum1.G, Decl(constEnums.ts, 11, 14)) ->Enum1 : Symbol(Enum1, Decl(constEnums.ts, 0, 0), Decl(constEnums.ts, 2, 1)) ->G : Symbol(Enum1.G, Decl(constEnums.ts, 11, 14)) - - case Enum1.H: ->Enum1.H : Symbol(Enum1.H, Decl(constEnums.ts, 12, 16)) ->Enum1 : Symbol(Enum1, Decl(constEnums.ts, 0, 0), Decl(constEnums.ts, 2, 1)) ->H : Symbol(Enum1.H, Decl(constEnums.ts, 12, 16)) - - case Enum1.I: ->Enum1.I : Symbol(Enum1.I, Decl(constEnums.ts, 13, 17)) ->Enum1 : Symbol(Enum1, Decl(constEnums.ts, 0, 0), Decl(constEnums.ts, 2, 1)) ->I : Symbol(Enum1.I, Decl(constEnums.ts, 13, 17)) - - case Enum1.J: ->Enum1.J : Symbol(Enum1.J, Decl(constEnums.ts, 14, 16)) ->Enum1 : Symbol(Enum1, Decl(constEnums.ts, 0, 0), Decl(constEnums.ts, 2, 1)) ->J : Symbol(Enum1.J, Decl(constEnums.ts, 14, 16)) - - case Enum1.K: ->Enum1.K : Symbol(Enum1.K, Decl(constEnums.ts, 15, 14)) ->Enum1 : Symbol(Enum1, Decl(constEnums.ts, 0, 0), Decl(constEnums.ts, 2, 1)) ->K : Symbol(Enum1.K, Decl(constEnums.ts, 15, 14)) - - case Enum1.L: ->Enum1.L : Symbol(Enum1.L, Decl(constEnums.ts, 16, 17)) ->Enum1 : Symbol(Enum1, Decl(constEnums.ts, 0, 0), Decl(constEnums.ts, 2, 1)) ->L : Symbol(Enum1.L, Decl(constEnums.ts, 16, 17)) - - case Enum1.M: ->Enum1.M : Symbol(Enum1.M, Decl(constEnums.ts, 17, 11)) ->Enum1 : Symbol(Enum1, Decl(constEnums.ts, 0, 0), Decl(constEnums.ts, 2, 1)) ->M : Symbol(Enum1.M, Decl(constEnums.ts, 17, 11)) - - case Enum1.N: ->Enum1.N : Symbol(Enum1.N, Decl(constEnums.ts, 18, 15)) ->Enum1 : Symbol(Enum1, Decl(constEnums.ts, 0, 0), Decl(constEnums.ts, 2, 1)) ->N : Symbol(Enum1.N, Decl(constEnums.ts, 18, 15)) - - case Enum1.O: ->Enum1.O : Symbol(Enum1.O, Decl(constEnums.ts, 19, 15)) ->Enum1 : Symbol(Enum1, Decl(constEnums.ts, 0, 0), Decl(constEnums.ts, 2, 1)) ->O : Symbol(Enum1.O, Decl(constEnums.ts, 19, 15)) - - case Enum1.P: ->Enum1.P : Symbol(Enum1.P, Decl(constEnums.ts, 20, 15)) ->Enum1 : Symbol(Enum1, Decl(constEnums.ts, 0, 0), Decl(constEnums.ts, 2, 1)) ->P : Symbol(Enum1.P, Decl(constEnums.ts, 20, 15)) - - case Enum1.PQ: ->Enum1.PQ : Symbol(Enum1.PQ, Decl(constEnums.ts, 21, 15)) ->Enum1 : Symbol(Enum1, Decl(constEnums.ts, 0, 0), Decl(constEnums.ts, 2, 1)) ->PQ : Symbol(Enum1.PQ, Decl(constEnums.ts, 21, 15)) - - case Enum1.Q: ->Enum1.Q : Symbol(Enum1.Q, Decl(constEnums.ts, 22, 16)) ->Enum1 : Symbol(Enum1, Decl(constEnums.ts, 0, 0), Decl(constEnums.ts, 2, 1)) ->Q : Symbol(Enum1.Q, Decl(constEnums.ts, 22, 16)) - - case Enum1.R: ->Enum1.R : Symbol(Enum1.R, Decl(constEnums.ts, 23, 11)) ->Enum1 : Symbol(Enum1, Decl(constEnums.ts, 0, 0), Decl(constEnums.ts, 2, 1)) ->R : Symbol(Enum1.R, Decl(constEnums.ts, 23, 11)) - - case Enum1.S: ->Enum1.S : Symbol(Enum1.S, Decl(constEnums.ts, 24, 14)) ->Enum1 : Symbol(Enum1, Decl(constEnums.ts, 0, 0), Decl(constEnums.ts, 2, 1)) ->S : Symbol(Enum1.S, Decl(constEnums.ts, 24, 14)) - - case Enum1["T"]: ->Enum1 : Symbol(Enum1, Decl(constEnums.ts, 0, 0), Decl(constEnums.ts, 2, 1)) ->"T" : Symbol(Enum1.T, Decl(constEnums.ts, 25, 14)) - - case Enum1[`U`]: ->Enum1 : Symbol(Enum1, Decl(constEnums.ts, 0, 0), Decl(constEnums.ts, 2, 1)) ->`U` : Symbol(Enum1.U, Decl(constEnums.ts, 26, 14)) - - case Enum1.V: ->Enum1.V : Symbol(Enum1.V, Decl(constEnums.ts, 27, 14)) ->Enum1 : Symbol(Enum1, Decl(constEnums.ts, 0, 0), Decl(constEnums.ts, 2, 1)) ->V : Symbol(Enum1.V, Decl(constEnums.ts, 27, 14)) - - case Enum1.W: ->Enum1.W : Symbol(Enum1.W, Decl(constEnums.ts, 28, 15)) ->Enum1 : Symbol(Enum1, Decl(constEnums.ts, 0, 0), Decl(constEnums.ts, 2, 1)) ->W : Symbol(Enum1.W, Decl(constEnums.ts, 28, 15)) - - case Enum1.W1: ->Enum1.W1 : Symbol(Enum1.W1, Decl(constEnums.ts, 29, 16)) ->Enum1 : Symbol(Enum1, Decl(constEnums.ts, 0, 0), Decl(constEnums.ts, 2, 1)) ->W1 : Symbol(Enum1.W1, Decl(constEnums.ts, 29, 16)) - - case Enum1.W2: ->Enum1.W2 : Symbol(Enum1.W2, Decl(constEnums.ts, 32, 12)) ->Enum1 : Symbol(Enum1, Decl(constEnums.ts, 0, 0), Decl(constEnums.ts, 2, 1)) ->W2 : Symbol(Enum1.W2, Decl(constEnums.ts, 32, 12)) - - case Enum1.W3: ->Enum1.W3 : Symbol(Enum1.W3, Decl(constEnums.ts, 33, 18)) ->Enum1 : Symbol(Enum1, Decl(constEnums.ts, 0, 0), Decl(constEnums.ts, 2, 1)) ->W3 : Symbol(Enum1.W3, Decl(constEnums.ts, 33, 18)) - - case Enum1.W4: ->Enum1.W4 : Symbol(Enum1.W4, Decl(constEnums.ts, 34, 21)) ->Enum1 : Symbol(Enum1, Decl(constEnums.ts, 0, 0), Decl(constEnums.ts, 2, 1)) ->W4 : Symbol(Enum1.W4, Decl(constEnums.ts, 34, 21)) - - break; - } -} - -function bar(e: A.B.C.E): number { ->bar : Symbol(bar, Decl(constEnums.ts, 146, 1)) ->e : Symbol(e, Decl(constEnums.ts, 148, 13)) ->A : Symbol(A, Decl(constEnums.ts, 37, 1), Decl(constEnums.ts, 49, 1)) ->B : Symbol(A.B, Decl(constEnums.ts, 40, 10), Decl(constEnums.ts, 51, 10)) ->C : Symbol(A.B.C, Decl(constEnums.ts, 41, 21), Decl(constEnums.ts, 52, 21)) ->E : Symbol(I, Decl(constEnums.ts, 42, 25), Decl(constEnums.ts, 53, 25)) - - switch (e) { ->e : Symbol(e, Decl(constEnums.ts, 148, 13)) - - case A.B.C.E.V1: return 1; ->A.B.C.E.V1 : Symbol(I.V1, Decl(constEnums.ts, 43, 33)) ->A.B.C.E : Symbol(I, Decl(constEnums.ts, 42, 25), Decl(constEnums.ts, 53, 25)) ->A.B.C : Symbol(A.B.C, Decl(constEnums.ts, 41, 21), Decl(constEnums.ts, 52, 21)) ->A.B : Symbol(A.B, Decl(constEnums.ts, 40, 10), Decl(constEnums.ts, 51, 10)) ->A : Symbol(A, Decl(constEnums.ts, 37, 1), Decl(constEnums.ts, 49, 1)) ->B : Symbol(A.B, Decl(constEnums.ts, 40, 10), Decl(constEnums.ts, 51, 10)) ->C : Symbol(A.B.C, Decl(constEnums.ts, 41, 21), Decl(constEnums.ts, 52, 21)) ->E : Symbol(I, Decl(constEnums.ts, 42, 25), Decl(constEnums.ts, 53, 25)) ->V1 : Symbol(I.V1, Decl(constEnums.ts, 43, 33)) - - case A.B.C.E.V2: return 1; ->A.B.C.E.V2 : Symbol(I.V2, Decl(constEnums.ts, 44, 23)) ->A.B.C.E : Symbol(I, Decl(constEnums.ts, 42, 25), Decl(constEnums.ts, 53, 25)) ->A.B.C : Symbol(A.B.C, Decl(constEnums.ts, 41, 21), Decl(constEnums.ts, 52, 21)) ->A.B : Symbol(A.B, Decl(constEnums.ts, 40, 10), Decl(constEnums.ts, 51, 10)) ->A : Symbol(A, Decl(constEnums.ts, 37, 1), Decl(constEnums.ts, 49, 1)) ->B : Symbol(A.B, Decl(constEnums.ts, 40, 10), Decl(constEnums.ts, 51, 10)) ->C : Symbol(A.B.C, Decl(constEnums.ts, 41, 21), Decl(constEnums.ts, 52, 21)) ->E : Symbol(I, Decl(constEnums.ts, 42, 25), Decl(constEnums.ts, 53, 25)) ->V2 : Symbol(I.V2, Decl(constEnums.ts, 44, 23)) - - case A.B.C.E.V3: return 1; ->A.B.C.E.V3 : Symbol(I.V3, Decl(constEnums.ts, 54, 33)) ->A.B.C.E : Symbol(I, Decl(constEnums.ts, 42, 25), Decl(constEnums.ts, 53, 25)) ->A.B.C : Symbol(A.B.C, Decl(constEnums.ts, 41, 21), Decl(constEnums.ts, 52, 21)) ->A.B : Symbol(A.B, Decl(constEnums.ts, 40, 10), Decl(constEnums.ts, 51, 10)) ->A : Symbol(A, Decl(constEnums.ts, 37, 1), Decl(constEnums.ts, 49, 1)) ->B : Symbol(A.B, Decl(constEnums.ts, 40, 10), Decl(constEnums.ts, 51, 10)) ->C : Symbol(A.B.C, Decl(constEnums.ts, 41, 21), Decl(constEnums.ts, 52, 21)) ->E : Symbol(I, Decl(constEnums.ts, 42, 25), Decl(constEnums.ts, 53, 25)) ->V3 : Symbol(I.V3, Decl(constEnums.ts, 54, 33)) - } -} diff --git a/tests/baselines/reference/constEnums.types b/tests/baselines/reference/constEnums.types deleted file mode 100644 index 36cb50a2aabdb..0000000000000 --- a/tests/baselines/reference/constEnums.types +++ /dev/null @@ -1,593 +0,0 @@ -=== tests/cases/compiler/constEnums.ts === -const enum Enum1 { ->Enum1 : Enum1 - - A0 = 100, ->A0 : Enum1 ->100 : 100 -} - -const enum Enum1 { ->Enum1 : Enum1 - - // correct cases - A, ->A : Enum1 - - B, ->B : Enum1 - - C = 10, ->C : Enum1 ->10 : 10 - - D = A | B, ->D : Enum1 ->A | B : number ->A : Enum1 ->B : Enum1 - - E = A | 1, ->E : Enum1 ->A | 1 : number ->A : Enum1 ->1 : 1 - - F = 1 | A, ->F : Enum1 ->1 | A : number ->1 : 1 ->A : Enum1 - - G = (1 & 1), ->G : Enum1 ->(1 & 1) : number ->1 & 1 : number ->1 : 1 ->1 : 1 - - H = ~(A | B), ->H : Enum1 ->~(A | B) : number ->(A | B) : number ->A | B : number ->A : Enum1 ->B : Enum1 - - I = A >>> 1, ->I : Enum1 ->A >>> 1 : number ->A : Enum1 ->1 : 1 - - J = 1 & A, ->J : Enum1 ->1 & A : number ->1 : 1 ->A : Enum1 - - K = ~(1 | 5), ->K : Enum1 ->~(1 | 5) : number ->(1 | 5) : number ->1 | 5 : number ->1 : 1 ->5 : 5 - - L = ~D, ->L : Enum1 ->~D : number ->D : Enum1 - - M = E << B, ->M : Enum1 ->E << B : number ->E : Enum1 ->B : Enum1 - - N = E << 1, ->N : Enum1 ->E << 1 : number ->E : Enum1 ->1 : 1 - - O = E >> B, ->O : Enum1 ->E >> B : number ->E : Enum1 ->B : Enum1 - - P = E >> 1, ->P : Enum1 ->E >> 1 : number ->E : Enum1 ->1 : 1 - - PQ = E ** 2, ->PQ : Enum1 ->E ** 2 : number ->E : Enum1 ->2 : 2 - - Q = -D, ->Q : Enum1 ->-D : number ->D : Enum1 - - R = C & 5, ->R : Enum1 ->C & 5 : number ->C : Enum1 ->5 : 5 - - S = 5 & C, ->S : Enum1 ->5 & C : number ->5 : 5 ->C : Enum1 - - T = C | D, ->T : Enum1 ->C | D : number ->C : Enum1 ->D : Enum1 - - U = C | 1, ->U : Enum1 ->C | 1 : number ->C : Enum1 ->1 : 1 - - V = 10 | D, ->V : Enum1 ->10 | D : number ->10 : 10 ->D : Enum1 - - W = Enum1.V, ->W : Enum1 ->Enum1.V : Enum1 ->Enum1 : typeof Enum1 ->V : Enum1 - - // correct cases: reference to the enum member from different enum declaration - W1 = A0, ->W1 : Enum1 ->A0 : Enum1 - - W2 = Enum1.A0, ->W2 : Enum1 ->Enum1.A0 : Enum1 ->Enum1 : typeof Enum1 ->A0 : Enum1 - - W3 = Enum1["A0"], ->W3 : Enum1 ->Enum1["A0"] : Enum1 ->Enum1 : typeof Enum1 ->"A0" : "A0" - - W4 = Enum1["W"], ->W4 : Enum1 ->Enum1["W"] : Enum1 ->Enum1 : typeof Enum1 ->"W" : "W" - - W5 = Enum1[`V`], ->W5 : Enum1 ->Enum1[`V`] : Enum1 ->Enum1 : typeof Enum1 ->`V` : "V" -} - - -module A { - export module B { - export module C { - export const enum E { ->E : E - - V1 = 1, ->V1 : E ->1 : 1 - - V2 = A.B.C.E.V1 | 100 ->V2 : E ->A.B.C.E.V1 | 100 : number ->A.B.C.E.V1 : E ->A.B.C.E : typeof E ->A.B.C : typeof C ->A.B : typeof B ->A : typeof A ->B : typeof B ->C : typeof C ->E : typeof E ->V1 : E ->100 : 100 - } - } - } -} - -module A { - export module B { - export module C { - export const enum E { ->E : E - - V3 = A.B.C.E["V2"] & 200, ->V3 : E ->A.B.C.E["V2"] & 200 : number ->A.B.C.E["V2"] : E ->A.B.C.E : typeof E ->A.B.C : typeof C ->A.B : typeof B ->A : typeof A ->B : typeof B ->C : typeof C ->E : typeof E ->"V2" : "V2" ->200 : 200 - - V4 = A.B.C.E[`V1`] << 1, ->V4 : E ->A.B.C.E[`V1`] << 1 : number ->A.B.C.E[`V1`] : E ->A.B.C.E : typeof E ->A.B.C : typeof C ->A.B : typeof B ->A : typeof A ->B : typeof B ->C : typeof C ->E : typeof E ->`V1` : "V1" ->1 : 1 - } - } - } -} - -module A1 { - export module B { - export module C { - export const enum E { ->E : E - - V1 = 10, ->V1 : E.V1 ->10 : 10 - - V2 = 110, ->V2 : E.V2 ->110 : 110 - } - } - } -} - -module A2 { ->A2 : typeof A2 - - export module B { ->B : typeof B - - export module C { - export const enum E { ->E : E - - V1 = 10, ->V1 : E.V1 ->10 : 10 - - V2 = 110, ->V2 : E.V2 ->110 : 110 - } - } - // module C will be classified as value - export module C { ->C : typeof C - - var x = 1 ->x : number ->1 : 1 - } - } -} - -import I = A.B.C.E; ->I : typeof I ->A : typeof A ->B : typeof A.B ->C : typeof A.B.C ->E : I - -import I1 = A1.B; ->I1 : typeof I1 ->A1 : typeof A1 ->B : typeof I1 - -import I2 = A2.B; ->I2 : typeof I2 ->A2 : typeof A2 ->B : typeof I2 - -function foo0(e: I): void { ->foo0 : (e: I) => void ->e : I - - if (e === I.V1) { ->e === I.V1 : boolean ->e : I ->I.V1 : I ->I : typeof I ->V1 : I - } - else if (e === I.V2) { ->e === I.V2 : boolean ->e : I ->I.V2 : I ->I : typeof I ->V2 : I - } -} - -function foo1(e: I1.C.E): void { ->foo1 : (e: I1.C.E) => void ->e : I1.C.E ->I1 : any ->C : any - - if (e === I1.C.E.V1) { ->e === I1.C.E.V1 : boolean ->e : I1.C.E ->I1.C.E.V1 : I1.C.E.V1 ->I1.C.E : typeof I1.C.E ->I1.C : typeof I1.C ->I1 : typeof I1 ->C : typeof I1.C ->E : typeof I1.C.E ->V1 : I1.C.E.V1 - } - else if (e === I1.C.E.V2) { ->e === I1.C.E.V2 : boolean ->e : I1.C.E.V2 ->I1.C.E.V2 : I1.C.E.V2 ->I1.C.E : typeof I1.C.E ->I1.C : typeof I1.C ->I1 : typeof I1 ->C : typeof I1.C ->E : typeof I1.C.E ->V2 : I1.C.E.V2 - } -} - -function foo2(e: I2.C.E): void { ->foo2 : (e: I2.C.E) => void ->e : I2.C.E ->I2 : any ->C : any - - if (e === I2.C.E.V1) { ->e === I2.C.E.V1 : boolean ->e : I2.C.E ->I2.C.E.V1 : I2.C.E.V1 ->I2.C.E : typeof I2.C.E ->I2.C : typeof I2.C ->I2 : typeof I2 ->C : typeof I2.C ->E : typeof I2.C.E ->V1 : I2.C.E.V1 - } - else if (e === I2.C.E.V2) { ->e === I2.C.E.V2 : boolean ->e : I2.C.E.V2 ->I2.C.E.V2 : I2.C.E.V2 ->I2.C.E : typeof I2.C.E ->I2.C : typeof I2.C ->I2 : typeof I2 ->C : typeof I2.C ->E : typeof I2.C.E ->V2 : I2.C.E.V2 - } -} - - -function foo(x: Enum1) { ->foo : (x: Enum1) => void ->x : Enum1 - - switch (x) { ->x : Enum1 - - case Enum1.A: ->Enum1.A : Enum1 ->Enum1 : typeof Enum1 ->A : Enum1 - - case Enum1.B: ->Enum1.B : Enum1 ->Enum1 : typeof Enum1 ->B : Enum1 - - case Enum1.C: ->Enum1.C : Enum1 ->Enum1 : typeof Enum1 ->C : Enum1 - - case Enum1.D: ->Enum1.D : Enum1 ->Enum1 : typeof Enum1 ->D : Enum1 - - case Enum1.E: ->Enum1.E : Enum1 ->Enum1 : typeof Enum1 ->E : Enum1 - - case Enum1.F: ->Enum1.F : Enum1 ->Enum1 : typeof Enum1 ->F : Enum1 - - case Enum1.G: ->Enum1.G : Enum1 ->Enum1 : typeof Enum1 ->G : Enum1 - - case Enum1.H: ->Enum1.H : Enum1 ->Enum1 : typeof Enum1 ->H : Enum1 - - case Enum1.I: ->Enum1.I : Enum1 ->Enum1 : typeof Enum1 ->I : Enum1 - - case Enum1.J: ->Enum1.J : Enum1 ->Enum1 : typeof Enum1 ->J : Enum1 - - case Enum1.K: ->Enum1.K : Enum1 ->Enum1 : typeof Enum1 ->K : Enum1 - - case Enum1.L: ->Enum1.L : Enum1 ->Enum1 : typeof Enum1 ->L : Enum1 - - case Enum1.M: ->Enum1.M : Enum1 ->Enum1 : typeof Enum1 ->M : Enum1 - - case Enum1.N: ->Enum1.N : Enum1 ->Enum1 : typeof Enum1 ->N : Enum1 - - case Enum1.O: ->Enum1.O : Enum1 ->Enum1 : typeof Enum1 ->O : Enum1 - - case Enum1.P: ->Enum1.P : Enum1 ->Enum1 : typeof Enum1 ->P : Enum1 - - case Enum1.PQ: ->Enum1.PQ : Enum1 ->Enum1 : typeof Enum1 ->PQ : Enum1 - - case Enum1.Q: ->Enum1.Q : Enum1 ->Enum1 : typeof Enum1 ->Q : Enum1 - - case Enum1.R: ->Enum1.R : Enum1 ->Enum1 : typeof Enum1 ->R : Enum1 - - case Enum1.S: ->Enum1.S : Enum1 ->Enum1 : typeof Enum1 ->S : Enum1 - - case Enum1["T"]: ->Enum1["T"] : Enum1 ->Enum1 : typeof Enum1 ->"T" : "T" - - case Enum1[`U`]: ->Enum1[`U`] : Enum1 ->Enum1 : typeof Enum1 ->`U` : "U" - - case Enum1.V: ->Enum1.V : Enum1 ->Enum1 : typeof Enum1 ->V : Enum1 - - case Enum1.W: ->Enum1.W : Enum1 ->Enum1 : typeof Enum1 ->W : Enum1 - - case Enum1.W1: ->Enum1.W1 : Enum1 ->Enum1 : typeof Enum1 ->W1 : Enum1 - - case Enum1.W2: ->Enum1.W2 : Enum1 ->Enum1 : typeof Enum1 ->W2 : Enum1 - - case Enum1.W3: ->Enum1.W3 : Enum1 ->Enum1 : typeof Enum1 ->W3 : Enum1 - - case Enum1.W4: ->Enum1.W4 : Enum1 ->Enum1 : typeof Enum1 ->W4 : Enum1 - - break; - } -} - -function bar(e: A.B.C.E): number { ->bar : (e: A.B.C.E) => number ->e : I ->A : any ->B : any ->C : any - - switch (e) { ->e : I - - case A.B.C.E.V1: return 1; ->A.B.C.E.V1 : I ->A.B.C.E : typeof I ->A.B.C : typeof A.B.C ->A.B : typeof A.B ->A : typeof A ->B : typeof A.B ->C : typeof A.B.C ->E : typeof I ->V1 : I ->1 : 1 - - case A.B.C.E.V2: return 1; ->A.B.C.E.V2 : I ->A.B.C.E : typeof I ->A.B.C : typeof A.B.C ->A.B : typeof A.B ->A : typeof A ->B : typeof A.B ->C : typeof A.B.C ->E : typeof I ->V2 : I ->1 : 1 - - case A.B.C.E.V3: return 1; ->A.B.C.E.V3 : I ->A.B.C.E : typeof I ->A.B.C : typeof A.B.C ->A.B : typeof A.B ->A : typeof A ->B : typeof A.B ->C : typeof A.B.C ->E : typeof I ->V3 : I ->1 : 1 - } -} diff --git a/tests/baselines/reference/declFileImportChainInExportAssignment.errors.txt b/tests/baselines/reference/declFileImportChainInExportAssignment.errors.txt new file mode 100644 index 0000000000000..f2623dd48503c --- /dev/null +++ b/tests/baselines/reference/declFileImportChainInExportAssignment.errors.txt @@ -0,0 +1,16 @@ +error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! + + +!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +!!! related TS-1: The excess diagnostics are: +!!! related TS2749 tests/cases/compiler/declFileImportChainInExportAssignment.ts:7:12: 'm.c' refers to a value, but is being used as a type here. Did you mean 'typeof m.c'? +==== tests/cases/compiler/declFileImportChainInExportAssignment.ts (0 errors) ==== + module m { + export module c { + export class c { + } + } + } + import a = m.c; + import b = a; + export = b; \ No newline at end of file diff --git a/tests/baselines/reference/declFileInternalAliases.errors.txt b/tests/baselines/reference/declFileInternalAliases.errors.txt new file mode 100644 index 0000000000000..4ad3c16774e4a --- /dev/null +++ b/tests/baselines/reference/declFileInternalAliases.errors.txt @@ -0,0 +1,20 @@ +error TS-1: Pre-emit (0) and post-emit (2) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! + + +!!! error TS-1: Pre-emit (0) and post-emit (2) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +!!! related TS-1: The excess diagnostics are: +!!! related TS2749 tests/cases/compiler/declFileInternalAliases.ts:6:16: 'm.c' refers to a value, but is being used as a type here. Did you mean 'typeof m.c'? +!!! related TS2749 tests/cases/compiler/declFileInternalAliases.ts:10:23: 'm.c' refers to a value, but is being used as a type here. Did you mean 'typeof m.c'? +==== tests/cases/compiler/declFileInternalAliases.ts (0 errors) ==== + module m { + export class c { + } + } + module m1 { + import x = m.c; + export var d = new x(); // emit the type as m.c + } + module m2 { + export import x = m.c; + export var d = new x(); // emit the type as x + } \ No newline at end of file diff --git a/tests/baselines/reference/declarationEmitNameConflicts.errors.txt b/tests/baselines/reference/declarationEmitNameConflicts.errors.txt new file mode 100644 index 0000000000000..7fe010e91567d --- /dev/null +++ b/tests/baselines/reference/declarationEmitNameConflicts.errors.txt @@ -0,0 +1,56 @@ +error TS-1: Pre-emit (0) and post-emit (3) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! + + +!!! error TS-1: Pre-emit (0) and post-emit (3) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +!!! related TS-1: The excess diagnostics are: +!!! related TS2749 tests/cases/compiler/declarationEmit_nameConflicts_0.ts:10:23: 'M.f' refers to a value, but is being used as a type here. Did you mean 'typeof M.f'? +!!! related TS2724 tests/cases/compiler/declarationEmit_nameConflicts_0.ts:11:25: '"tests/cases/compiler/declarationEmit_nameConflicts_0".M' has no exported member named 'C'. Did you mean 'c'? +!!! related TS2749 tests/cases/compiler/declarationEmit_nameConflicts_0.ts:23:24: 'M.P.f' refers to a value, but is being used as a type here. Did you mean 'typeof M.P.f'? +==== tests/cases/compiler/declarationEmit_nameConflicts_0.ts (0 errors) ==== + import im = require('./declarationEmit_nameConflicts_1'); + export module M { + export function f() { } + export class C { } + export module N { + export function g() { }; + export interface I { } + } + + export import a = M.f; + export import b = M.C; + export import c = N; + export import d = im; + } + + export module M.P { + export function f() { } + export class C { } + export module N { + export function g() { }; + export interface I { } + } + export import im = M.P.f; + export var a = M.a; // emitted incorrectly as typeof f + export var b = M.b; // ok + export var c = M.c; // ok + export var g = M.c.g; // ok + export var d = M.d; // emitted incorrectly as typeof im + } + + export module M.Q { + export function f() { } + export class C { } + export module N { + export function g() { }; + export interface I { } + } + export interface b extends M.b { } // ok + export interface I extends M.c.I { } // ok + export module c { + export interface I extends M.c.I { } // ok + } + } +==== tests/cases/compiler/declarationEmit_nameConflicts_1.ts (0 errors) ==== + module f { export class c { } } + export = f; + \ No newline at end of file diff --git a/tests/baselines/reference/declareDottedExtend.errors.txt b/tests/baselines/reference/declareDottedExtend.errors.txt new file mode 100644 index 0000000000000..d677a77566a2c --- /dev/null +++ b/tests/baselines/reference/declareDottedExtend.errors.txt @@ -0,0 +1,18 @@ +error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! + + +!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +!!! related TS-1: The excess diagnostics are: +!!! related TS2749 tests/cases/compiler/declareDottedExtend.ts:6:13: 'A.B' refers to a value, but is being used as a type here. Did you mean 'typeof A.B'? +==== tests/cases/compiler/declareDottedExtend.ts (0 errors) ==== + declare module A.B + { + export class C{ } + } + + import ab = A.B; + + class D extends ab.C{ } + + class E extends A.B.C{ } + \ No newline at end of file diff --git a/tests/baselines/reference/dependencyViaImportAlias.errors.txt b/tests/baselines/reference/dependencyViaImportAlias.errors.txt new file mode 100644 index 0000000000000..26cf25353065f --- /dev/null +++ b/tests/baselines/reference/dependencyViaImportAlias.errors.txt @@ -0,0 +1,15 @@ +error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! + + +!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +!!! related TS-1: The excess diagnostics are: +!!! related TS2749 tests/cases/compiler/B.ts:3:12: 'a.A' refers to a value, but is being used as a type here. Did you mean 'typeof a.A'? +==== tests/cases/compiler/B.ts (0 errors) ==== + import a = require('A'); + + import A = a.A; + + export = A; +==== tests/cases/compiler/A.ts (0 errors) ==== + export class A { + } \ No newline at end of file diff --git a/tests/baselines/reference/errorForUsingPropertyOfTypeAsType01.errors.txt b/tests/baselines/reference/errorForUsingPropertyOfTypeAsType01.errors.txt index 6dadb4a4979fe..e2bbafcffff47 100644 --- a/tests/baselines/reference/errorForUsingPropertyOfTypeAsType01.errors.txt +++ b/tests/baselines/reference/errorForUsingPropertyOfTypeAsType01.errors.txt @@ -1,3 +1,4 @@ +error TS-1: Pre-emit (12) and post-emit (13) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! tests/cases/compiler/errorForUsingPropertyOfTypeAsType01.ts(6,12): error TS2713: Cannot access 'Foo.bar' because 'Foo' is a type, but not a namespace. Did you mean to retrieve the type of the property 'bar' in 'Foo' with 'Foo["bar"]'? tests/cases/compiler/errorForUsingPropertyOfTypeAsType01.ts(7,22): error TS2713: Cannot access 'Foo.bar' because 'Foo' is a type, but not a namespace. Did you mean to retrieve the type of the property 'bar' in 'Foo' with 'Foo["bar"]'? tests/cases/compiler/errorForUsingPropertyOfTypeAsType01.ts(15,12): error TS2713: Cannot access 'Foo.bar' because 'Foo' is a type, but not a namespace. Did you mean to retrieve the type of the property 'bar' in 'Foo' with 'Foo["bar"]'? @@ -12,6 +13,9 @@ tests/cases/compiler/errorForUsingPropertyOfTypeAsType01.ts(44,24): error TS1003 tests/cases/compiler/errorForUsingPropertyOfTypeAsType01.ts(44,24): error TS2713: Cannot access 'Foo.' because 'Foo' is a type, but not a namespace. Did you mean to retrieve the type of the property '' in 'Foo' with 'Foo[""]'? +!!! error TS-1: Pre-emit (12) and post-emit (13) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +!!! related TS-1: The excess diagnostics are: +!!! related TS2694 tests/cases/compiler/errorForUsingPropertyOfTypeAsType01.ts:44:20: Namespace 'Test5' has no exported member 'Foo'. ==== tests/cases/compiler/errorForUsingPropertyOfTypeAsType01.ts (12 errors) ==== namespace Test1 { export interface Foo { diff --git a/tests/baselines/reference/es6ModuleInternalImport.errors.txt b/tests/baselines/reference/es6ModuleInternalImport.errors.txt new file mode 100644 index 0000000000000..91d6d8e38b4ff --- /dev/null +++ b/tests/baselines/reference/es6ModuleInternalImport.errors.txt @@ -0,0 +1,31 @@ +error TS-1: Pre-emit (0) and post-emit (6) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! + + +!!! error TS-1: Pre-emit (0) and post-emit (6) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +!!! related TS-1: The excess diagnostics are: +!!! related TS2749 tests/cases/compiler/es6ModuleInternalImport.ts:4:20: 'm.a' refers to a value, but is being used as a type here. Did you mean 'typeof m.a'? +!!! related TS2749 tests/cases/compiler/es6ModuleInternalImport.ts:5:13: 'm.a' refers to a value, but is being used as a type here. Did you mean 'typeof m.a'? +!!! related TS2749 tests/cases/compiler/es6ModuleInternalImport.ts:8:24: 'm.a' refers to a value, but is being used as a type here. Did you mean 'typeof m.a'? +!!! related TS2749 tests/cases/compiler/es6ModuleInternalImport.ts:9:17: 'm.a' refers to a value, but is being used as a type here. Did you mean 'typeof m.a'? +!!! related TS2749 tests/cases/compiler/es6ModuleInternalImport.ts:14:24: 'm.a' refers to a value, but is being used as a type here. Did you mean 'typeof m.a'? +!!! related TS2749 tests/cases/compiler/es6ModuleInternalImport.ts:15:17: 'm.a' refers to a value, but is being used as a type here. Did you mean 'typeof m.a'? +==== tests/cases/compiler/es6ModuleInternalImport.ts (0 errors) ==== + export module m { + export var a = 10; + } + export import a1 = m.a; + import a2 = m.a; + var x = a1 + a2; + export module m1 { + export import a3 = m.a; + import a4 = m.a; + var x = a1 + a2; + var x2 = a3 + a4; + } + module m2 { + export import a3 = m.a; + import a4 = m.a; + var x = a1 + a2; + var x2 = a3 + a4; + var x4 = m1.a3 + m2.a3; + } \ No newline at end of file diff --git a/tests/baselines/reference/exportDefaultProperty.errors.txt b/tests/baselines/reference/exportDefaultProperty.errors.txt new file mode 100644 index 0000000000000..9713c4b42b88d --- /dev/null +++ b/tests/baselines/reference/exportDefaultProperty.errors.txt @@ -0,0 +1,46 @@ +error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! + + +!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +!!! related TS-1: The excess diagnostics are: +!!! related TS2749 tests/cases/compiler/index.ts:3:12: 'fooBar.X' refers to a value, but is being used as a type here. Did you mean 'typeof fooBar.X'? +==== tests/cases/compiler/index.ts (0 errors) ==== + /// + import fooBar from "foobar"; + import X = fooBar.X; + import X2 from "foobarx"; + const x: X = X; + const x2: X2 = X2; + + import B from "./a"; + const b: B = new B(B.b); + + import fooLength from "./b"; + fooLength + 1; + +==== tests/cases/compiler/declarations.d.ts (0 errors) ==== + // This test is just like exportEqualsProperty, but with `export default`. + + declare namespace foo.bar { + export type X = number; + export const X: number; + } + + declare module "foobar" { + export default foo.bar; + } + + declare module "foobarx" { + export default foo.bar.X; + } + +==== tests/cases/compiler/a.ts (0 errors) ==== + namespace A { + export class B { constructor(b: number) {} } + export namespace B { export const b: number = 0; } + } + export default A.B; + +==== tests/cases/compiler/b.ts (0 errors) ==== + export default "foo".length; + \ No newline at end of file diff --git a/tests/baselines/reference/exportImportAlias.errors.txt b/tests/baselines/reference/exportImportAlias.errors.txt new file mode 100644 index 0000000000000..c7bda1b5b9974 --- /dev/null +++ b/tests/baselines/reference/exportImportAlias.errors.txt @@ -0,0 +1,76 @@ +error TS-1: Pre-emit (0) and post-emit (2) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! + + +!!! error TS-1: Pre-emit (0) and post-emit (2) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +!!! related TS-1: The excess diagnostics are: +!!! related TS2749 tests/cases/conformance/internalModules/importDeclarations/exportImportAlias.ts:40:23: 'X.Y' refers to a value, but is being used as a type here. Did you mean 'typeof X.Y'? +!!! related TS2749 tests/cases/conformance/internalModules/importDeclarations/exportImportAlias.ts:61:23: 'K.L' refers to a value, but is being used as a type here. Did you mean 'typeof K.L'? +==== tests/cases/conformance/internalModules/importDeclarations/exportImportAlias.ts (0 errors) ==== + // expect no errors here + + module A { + + export var x = 'hello world' + export class Point { + constructor(public x: number, public y: number) { } + } + export module B { + export interface Id { + name: string; + } + } + } + + module C { + export import a = A; + } + + var a: string = C.a.x; + var b: { x: number; y: number; } = new C.a.Point(0, 0); + var c: { name: string }; + var c: C.a.B.Id; + + module X { + export function Y() { + return 42; + } + + export module Y { + export class Point { + constructor(public x: number, public y: number) { } + } + } + } + + module Z { + + // 'y' should be a fundule here + export import y = X.Y; + } + + var m: number = Z.y(); + var n: { x: number; y: number; } = new Z.y.Point(0, 0); + + module K { + export class L { + constructor(public name: string) { } + } + + export module L { + export var y = 12; + export interface Point { + x: number; + y: number; + } + } + } + + module M { + export import D = K.L; + } + + var o: { name: string }; + var o = new M.D('Hello'); + + var p: { x: number; y: number; } + var p: M.D.Point; \ No newline at end of file diff --git a/tests/baselines/reference/exportImportAndClodule.errors.txt b/tests/baselines/reference/exportImportAndClodule.errors.txt new file mode 100644 index 0000000000000..1136e1c25af0d --- /dev/null +++ b/tests/baselines/reference/exportImportAndClodule.errors.txt @@ -0,0 +1,26 @@ +error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! + + +!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +!!! related TS-1: The excess diagnostics are: +!!! related TS2749 tests/cases/compiler/exportImportAndClodule.ts:14:23: 'K.L' refers to a value, but is being used as a type here. Did you mean 'typeof K.L'? +==== tests/cases/compiler/exportImportAndClodule.ts (0 errors) ==== + module K { + export class L { + constructor(public name: string) { } + } + export module L { + export var y = 12; + export interface Point { + x: number; + y: number; + } + } + } + module M { + export import D = K.L; + } + var o: { name: string }; + var o = new M.D('Hello'); + var p: { x: number; y: number; } + var p: M.D.Point; \ No newline at end of file diff --git a/tests/baselines/reference/exportsAndImports1-amd.errors.txt b/tests/baselines/reference/exportsAndImports1-amd.errors.txt new file mode 100644 index 0000000000000..6ae0c3200d3a5 --- /dev/null +++ b/tests/baselines/reference/exportsAndImports1-amd.errors.txt @@ -0,0 +1,38 @@ +error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! + + +!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +!!! related TS-1: The excess diagnostics are: +!!! related TS2749 tests/cases/conformance/es6/modules/t1.ts:21:12: 'M.x' refers to a value, but is being used as a type here. Did you mean 'typeof M.x'? +==== tests/cases/conformance/es6/modules/t1.ts (0 errors) ==== + var v = 1; + function f() { } + class C { + } + interface I { + } + enum E { + A, B, C + } + const enum D { + A, B, C + } + module M { + export var x; + } + module N { + export interface I { + } + } + type T = number; + import a = M.x; + + export { v, f, C, I, E, D, M, N, T, a }; + +==== tests/cases/conformance/es6/modules/t2.ts (0 errors) ==== + export { v, f, C, I, E, D, M, N, T, a } from "./t1"; + +==== tests/cases/conformance/es6/modules/t3.ts (0 errors) ==== + import { v, f, C, I, E, D, M, N, T, a } from "./t1"; + export { v, f, C, I, E, D, M, N, T, a }; + \ No newline at end of file diff --git a/tests/baselines/reference/exportsAndImports1-es6.errors.txt b/tests/baselines/reference/exportsAndImports1-es6.errors.txt new file mode 100644 index 0000000000000..6ae0c3200d3a5 --- /dev/null +++ b/tests/baselines/reference/exportsAndImports1-es6.errors.txt @@ -0,0 +1,38 @@ +error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! + + +!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +!!! related TS-1: The excess diagnostics are: +!!! related TS2749 tests/cases/conformance/es6/modules/t1.ts:21:12: 'M.x' refers to a value, but is being used as a type here. Did you mean 'typeof M.x'? +==== tests/cases/conformance/es6/modules/t1.ts (0 errors) ==== + var v = 1; + function f() { } + class C { + } + interface I { + } + enum E { + A, B, C + } + const enum D { + A, B, C + } + module M { + export var x; + } + module N { + export interface I { + } + } + type T = number; + import a = M.x; + + export { v, f, C, I, E, D, M, N, T, a }; + +==== tests/cases/conformance/es6/modules/t2.ts (0 errors) ==== + export { v, f, C, I, E, D, M, N, T, a } from "./t1"; + +==== tests/cases/conformance/es6/modules/t3.ts (0 errors) ==== + import { v, f, C, I, E, D, M, N, T, a } from "./t1"; + export { v, f, C, I, E, D, M, N, T, a }; + \ No newline at end of file diff --git a/tests/baselines/reference/exportsAndImports1.errors.txt b/tests/baselines/reference/exportsAndImports1.errors.txt new file mode 100644 index 0000000000000..6ae0c3200d3a5 --- /dev/null +++ b/tests/baselines/reference/exportsAndImports1.errors.txt @@ -0,0 +1,38 @@ +error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! + + +!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +!!! related TS-1: The excess diagnostics are: +!!! related TS2749 tests/cases/conformance/es6/modules/t1.ts:21:12: 'M.x' refers to a value, but is being used as a type here. Did you mean 'typeof M.x'? +==== tests/cases/conformance/es6/modules/t1.ts (0 errors) ==== + var v = 1; + function f() { } + class C { + } + interface I { + } + enum E { + A, B, C + } + const enum D { + A, B, C + } + module M { + export var x; + } + module N { + export interface I { + } + } + type T = number; + import a = M.x; + + export { v, f, C, I, E, D, M, N, T, a }; + +==== tests/cases/conformance/es6/modules/t2.ts (0 errors) ==== + export { v, f, C, I, E, D, M, N, T, a } from "./t1"; + +==== tests/cases/conformance/es6/modules/t3.ts (0 errors) ==== + import { v, f, C, I, E, D, M, N, T, a } from "./t1"; + export { v, f, C, I, E, D, M, N, T, a }; + \ No newline at end of file diff --git a/tests/baselines/reference/exportsAndImports3-amd.errors.txt b/tests/baselines/reference/exportsAndImports3-amd.errors.txt new file mode 100644 index 0000000000000..f0333f69d35a1 --- /dev/null +++ b/tests/baselines/reference/exportsAndImports3-amd.errors.txt @@ -0,0 +1,38 @@ +error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! + + +!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +!!! related TS-1: The excess diagnostics are: +!!! related TS2749 tests/cases/conformance/es6/modules/t1.ts:21:19: 'M.x' refers to a value, but is being used as a type here. Did you mean 'typeof M.x'? +==== tests/cases/conformance/es6/modules/t1.ts (0 errors) ==== + export var v = 1; + export function f() { } + export class C { + } + export interface I { + } + export enum E { + A, B, C + } + export const enum D { + A, B, C + } + export module M { + export var x; + } + export module N { + export interface I { + } + } + export type T = number; + export import a = M.x; + + export { v as v1, f as f1, C as C1, I as I1, E as E1, D as D1, M as M1, N as N1, T as T1, a as a1 }; + +==== tests/cases/conformance/es6/modules/t2.ts (0 errors) ==== + export { v1 as v, f1 as f, C1 as C, I1 as I, E1 as E, D1 as D, M1 as M, N1 as N, T1 as T, a1 as a } from "./t1"; + +==== tests/cases/conformance/es6/modules/t3.ts (0 errors) ==== + import { v1 as v, f1 as f, C1 as C, I1 as I, E1 as E, D1 as D, M1 as M, N1 as N, T1 as T, a1 as a } from "./t1"; + export { v, f, C, I, E, D, M, N, T, a }; + \ No newline at end of file diff --git a/tests/baselines/reference/exportsAndImports3-es6.errors.txt b/tests/baselines/reference/exportsAndImports3-es6.errors.txt new file mode 100644 index 0000000000000..f0333f69d35a1 --- /dev/null +++ b/tests/baselines/reference/exportsAndImports3-es6.errors.txt @@ -0,0 +1,38 @@ +error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! + + +!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +!!! related TS-1: The excess diagnostics are: +!!! related TS2749 tests/cases/conformance/es6/modules/t1.ts:21:19: 'M.x' refers to a value, but is being used as a type here. Did you mean 'typeof M.x'? +==== tests/cases/conformance/es6/modules/t1.ts (0 errors) ==== + export var v = 1; + export function f() { } + export class C { + } + export interface I { + } + export enum E { + A, B, C + } + export const enum D { + A, B, C + } + export module M { + export var x; + } + export module N { + export interface I { + } + } + export type T = number; + export import a = M.x; + + export { v as v1, f as f1, C as C1, I as I1, E as E1, D as D1, M as M1, N as N1, T as T1, a as a1 }; + +==== tests/cases/conformance/es6/modules/t2.ts (0 errors) ==== + export { v1 as v, f1 as f, C1 as C, I1 as I, E1 as E, D1 as D, M1 as M, N1 as N, T1 as T, a1 as a } from "./t1"; + +==== tests/cases/conformance/es6/modules/t3.ts (0 errors) ==== + import { v1 as v, f1 as f, C1 as C, I1 as I, E1 as E, D1 as D, M1 as M, N1 as N, T1 as T, a1 as a } from "./t1"; + export { v, f, C, I, E, D, M, N, T, a }; + \ No newline at end of file diff --git a/tests/baselines/reference/exportsAndImports3.errors.txt b/tests/baselines/reference/exportsAndImports3.errors.txt new file mode 100644 index 0000000000000..f0333f69d35a1 --- /dev/null +++ b/tests/baselines/reference/exportsAndImports3.errors.txt @@ -0,0 +1,38 @@ +error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! + + +!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +!!! related TS-1: The excess diagnostics are: +!!! related TS2749 tests/cases/conformance/es6/modules/t1.ts:21:19: 'M.x' refers to a value, but is being used as a type here. Did you mean 'typeof M.x'? +==== tests/cases/conformance/es6/modules/t1.ts (0 errors) ==== + export var v = 1; + export function f() { } + export class C { + } + export interface I { + } + export enum E { + A, B, C + } + export const enum D { + A, B, C + } + export module M { + export var x; + } + export module N { + export interface I { + } + } + export type T = number; + export import a = M.x; + + export { v as v1, f as f1, C as C1, I as I1, E as E1, D as D1, M as M1, N as N1, T as T1, a as a1 }; + +==== tests/cases/conformance/es6/modules/t2.ts (0 errors) ==== + export { v1 as v, f1 as f, C1 as C, I1 as I, E1 as E, D1 as D, M1 as M, N1 as N, T1 as T, a1 as a } from "./t1"; + +==== tests/cases/conformance/es6/modules/t3.ts (0 errors) ==== + import { v1 as v, f1 as f, C1 as C, I1 as I, E1 as E, D1 as D, M1 as M, N1 as N, T1 as T, a1 as a } from "./t1"; + export { v, f, C, I, E, D, M, N, T, a }; + \ No newline at end of file diff --git a/tests/baselines/reference/importAliasFromNamespace.errors.txt b/tests/baselines/reference/importAliasFromNamespace.errors.txt new file mode 100644 index 0000000000000..29226a64c1757 --- /dev/null +++ b/tests/baselines/reference/importAliasFromNamespace.errors.txt @@ -0,0 +1,26 @@ +error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! + + +!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +!!! related TS-1: The excess diagnostics are: +!!! related TS2749 tests/cases/compiler/usage.ts:3:23: 'My.Internal' refers to a value, but is being used as a type here. Did you mean 'typeof My.Internal'? +==== tests/cases/compiler/usage.ts (0 errors) ==== + /// + namespace SomeOther.Thing { + import Internal = My.Internal; + export class Foo { + private _which: Internal.WhichThing; + constructor() { + Internal.getThing(); + Internal.WhichThing.A ? "foo" : "bar"; + } + } + } +==== tests/cases/compiler/internal.ts (0 errors) ==== + namespace My.Internal { + export function getThing(): void {} + export const enum WhichThing { + A, B, C + } + } + \ No newline at end of file diff --git a/tests/baselines/reference/importAliasWithDottedName.errors.txt b/tests/baselines/reference/importAliasWithDottedName.errors.txt new file mode 100644 index 0000000000000..89844b03b92fe --- /dev/null +++ b/tests/baselines/reference/importAliasWithDottedName.errors.txt @@ -0,0 +1,19 @@ +error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! + + +!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +!!! related TS-1: The excess diagnostics are: +!!! related TS2749 tests/cases/compiler/importAliasWithDottedName.ts:9:16: 'M.N' refers to a value, but is being used as a type here. Did you mean 'typeof M.N'? +==== tests/cases/compiler/importAliasWithDottedName.ts (0 errors) ==== + module M { + export var x = 1; + export module N { + export var y = 2; + } + } + + module A { + import N = M.N; + var r = N.y; + var r2 = M.N.y; + } \ No newline at end of file diff --git a/tests/baselines/reference/importAndVariableDeclarationConflict1.errors.txt b/tests/baselines/reference/importAndVariableDeclarationConflict1.errors.txt index 145540914a7f9..2ec61889f07b6 100644 --- a/tests/baselines/reference/importAndVariableDeclarationConflict1.errors.txt +++ b/tests/baselines/reference/importAndVariableDeclarationConflict1.errors.txt @@ -1,6 +1,10 @@ +error TS-1: Pre-emit (1) and post-emit (2) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! tests/cases/compiler/importAndVariableDeclarationConflict1.ts(5,1): error TS2440: Import declaration conflicts with local declaration of 'x'. +!!! error TS-1: Pre-emit (1) and post-emit (2) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +!!! related TS-1: The excess diagnostics are: +!!! related TS2749 tests/cases/compiler/importAndVariableDeclarationConflict1.ts:5:12: 'm.m' refers to a value, but is being used as a type here. Did you mean 'typeof m.m'? ==== tests/cases/compiler/importAndVariableDeclarationConflict1.ts (1 errors) ==== module m { export var m = ''; diff --git a/tests/baselines/reference/importAndVariableDeclarationConflict2.errors.txt b/tests/baselines/reference/importAndVariableDeclarationConflict2.errors.txt new file mode 100644 index 0000000000000..8b42a7a28ecf3 --- /dev/null +++ b/tests/baselines/reference/importAndVariableDeclarationConflict2.errors.txt @@ -0,0 +1,18 @@ +error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! + + +!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +!!! related TS-1: The excess diagnostics are: +!!! related TS2749 tests/cases/compiler/importAndVariableDeclarationConflict2.ts:5:12: 'm.m' refers to a value, but is being used as a type here. Did you mean 'typeof m.m'? +==== tests/cases/compiler/importAndVariableDeclarationConflict2.ts (0 errors) ==== + module m { + export var m = ''; + } + + import x = m.m; + + class C { + public foo() { + var x = ''; + } + } \ No newline at end of file diff --git a/tests/baselines/reference/importAndVariableDeclarationConflict3.errors.txt b/tests/baselines/reference/importAndVariableDeclarationConflict3.errors.txt index 39567a11753d4..c016034e8b3ca 100644 --- a/tests/baselines/reference/importAndVariableDeclarationConflict3.errors.txt +++ b/tests/baselines/reference/importAndVariableDeclarationConflict3.errors.txt @@ -1,7 +1,12 @@ +error TS-1: Pre-emit (2) and post-emit (4) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! tests/cases/compiler/importAndVariableDeclarationConflict3.ts(5,8): error TS2300: Duplicate identifier 'x'. tests/cases/compiler/importAndVariableDeclarationConflict3.ts(6,8): error TS2300: Duplicate identifier 'x'. +!!! error TS-1: Pre-emit (2) and post-emit (4) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +!!! related TS-1: The excess diagnostics are: +!!! related TS2749 tests/cases/compiler/importAndVariableDeclarationConflict3.ts:5:12: 'm.m' refers to a value, but is being used as a type here. Did you mean 'typeof m.m'? +!!! related TS2749 tests/cases/compiler/importAndVariableDeclarationConflict3.ts:6:12: 'm.m' refers to a value, but is being used as a type here. Did you mean 'typeof m.m'? ==== tests/cases/compiler/importAndVariableDeclarationConflict3.ts (2 errors) ==== module m { export var m = ''; diff --git a/tests/baselines/reference/importAndVariableDeclarationConflict4.errors.txt b/tests/baselines/reference/importAndVariableDeclarationConflict4.errors.txt index 8dbbf76a1dc4b..61853aa9ec057 100644 --- a/tests/baselines/reference/importAndVariableDeclarationConflict4.errors.txt +++ b/tests/baselines/reference/importAndVariableDeclarationConflict4.errors.txt @@ -1,6 +1,10 @@ +error TS-1: Pre-emit (1) and post-emit (2) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! tests/cases/compiler/importAndVariableDeclarationConflict4.ts(6,1): error TS2440: Import declaration conflicts with local declaration of 'x'. +!!! error TS-1: Pre-emit (1) and post-emit (2) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +!!! related TS-1: The excess diagnostics are: +!!! related TS2749 tests/cases/compiler/importAndVariableDeclarationConflict4.ts:6:12: 'm.m' refers to a value, but is being used as a type here. Did you mean 'typeof m.m'? ==== tests/cases/compiler/importAndVariableDeclarationConflict4.ts (1 errors) ==== module m { export var m = ''; diff --git a/tests/baselines/reference/importEquals3.errors.txt b/tests/baselines/reference/importEquals3.errors.txt index b718e556d20d9..877153c03f33d 100644 --- a/tests/baselines/reference/importEquals3.errors.txt +++ b/tests/baselines/reference/importEquals3.errors.txt @@ -1,9 +1,13 @@ +error TS-1: Pre-emit (4) and post-emit (5) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! tests/cases/conformance/externalModules/typeOnly/b.ts(2,12): error TS1380: An import alias cannot reference a declaration that was imported using 'import type'. tests/cases/conformance/externalModules/typeOnly/b.ts(3,13): error TS1380: An import alias cannot reference a declaration that was imported using 'import type'. tests/cases/conformance/externalModules/typeOnly/c.ts(2,12): error TS1380: An import alias cannot reference a declaration that was imported using 'import type'. tests/cases/conformance/externalModules/typeOnly/c.ts(3,13): error TS1380: An import alias cannot reference a declaration that was imported using 'import type'. +!!! error TS-1: Pre-emit (4) and post-emit (5) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +!!! related TS-1: The excess diagnostics are: +!!! related TS2749 tests/cases/conformance/externalModules/typeOnly/c.ts:5:12: 'b.x' refers to a value, but is being used as a type here. Did you mean 'typeof b.x'? ==== tests/cases/conformance/externalModules/typeOnly/a.ts (0 errors) ==== export class A {} diff --git a/tests/baselines/reference/importOnAliasedIdentifiers.errors.txt b/tests/baselines/reference/importOnAliasedIdentifiers.errors.txt new file mode 100644 index 0000000000000..897f6d1ad202e --- /dev/null +++ b/tests/baselines/reference/importOnAliasedIdentifiers.errors.txt @@ -0,0 +1,17 @@ +error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! + + +!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +!!! related TS-1: The excess diagnostics are: +!!! related TS2749 tests/cases/compiler/importOnAliasedIdentifiers.ts:8:16: 'A.X' refers to a value, but is being used as a type here. Did you mean 'typeof A.X'? +==== tests/cases/compiler/importOnAliasedIdentifiers.ts (0 errors) ==== + module A { + export interface X { s: string } + export var X: X; + } + module B { + interface A { n: number } + import Y = A; // Alias only for module A + import Z = A.X; // Alias for both type and member A.X + var v: Z = Z; + } \ No newline at end of file diff --git a/tests/baselines/reference/import_reference-exported-alias.errors.txt b/tests/baselines/reference/import_reference-exported-alias.errors.txt new file mode 100644 index 0000000000000..19aba949ca2e1 --- /dev/null +++ b/tests/baselines/reference/import_reference-exported-alias.errors.txt @@ -0,0 +1,27 @@ +error TS-1: Pre-emit (0) and post-emit (2) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! + + +!!! error TS-1: Pre-emit (0) and post-emit (2) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +!!! related TS-1: The excess diagnostics are: +!!! related TS2749 tests/cases/compiler/file2.ts:2:19: 'appJs.Services' refers to a value, but is being used as a type here. Did you mean 'typeof appJs.Services'? +!!! related TS2749 tests/cases/compiler/file2.ts:3:23: 'Services.UserServices' refers to a value, but is being used as a type here. Did you mean 'typeof Services.UserServices'? +==== tests/cases/compiler/file2.ts (0 errors) ==== + import appJs = require("file1"); + import Services = appJs.Services; + import UserServices = Services.UserServices; + var x = new UserServices().getUserName(); + +==== tests/cases/compiler/file1.ts (0 errors) ==== + module App { + export module Services { + export class UserServices { + public getUserName(): string { + return "Bill Gates"; + } + } + } + } + + import Mod = App; + export = Mod; + \ No newline at end of file diff --git a/tests/baselines/reference/import_reference-to-type-alias.errors.txt b/tests/baselines/reference/import_reference-to-type-alias.errors.txt new file mode 100644 index 0000000000000..18562e4c51618 --- /dev/null +++ b/tests/baselines/reference/import_reference-to-type-alias.errors.txt @@ -0,0 +1,22 @@ +error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! + + +!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +!!! related TS-1: The excess diagnostics are: +!!! related TS2749 tests/cases/compiler/file2.ts:2:19: 'appJs.App.Services' refers to a value, but is being used as a type here. Did you mean 'typeof appJs.App.Services'? +==== tests/cases/compiler/file2.ts (0 errors) ==== + import appJs = require("file1"); + import Services = appJs.App.Services; + var x = new Services.UserServices().getUserName(); + +==== tests/cases/compiler/file1.ts (0 errors) ==== + export module App { + export module Services { + export class UserServices { + public getUserName(): string { + return "Bill Gates"; + } + } + } + } + \ No newline at end of file diff --git a/tests/baselines/reference/innerAliases.errors.txt b/tests/baselines/reference/innerAliases.errors.txt index 874ef98ccce39..f3731a1149cca 100644 --- a/tests/baselines/reference/innerAliases.errors.txt +++ b/tests/baselines/reference/innerAliases.errors.txt @@ -1,7 +1,11 @@ +error TS-1: Pre-emit (2) and post-emit (3) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! tests/cases/compiler/innerAliases.ts(19,10): error TS2694: Namespace 'D' has no exported member 'inner'. tests/cases/compiler/innerAliases.ts(21,11): error TS2339: Property 'inner' does not exist on type 'typeof D'. +!!! error TS-1: Pre-emit (2) and post-emit (3) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +!!! related TS-1: The excess diagnostics are: +!!! related TS2749 tests/cases/compiler/innerAliases.ts:10:20: 'A.B.C' refers to a value, but is being used as a type here. Did you mean 'typeof A.B.C'? ==== tests/cases/compiler/innerAliases.ts (2 errors) ==== module A { export module B { diff --git a/tests/baselines/reference/internalAliasClass.errors.txt b/tests/baselines/reference/internalAliasClass.errors.txt new file mode 100644 index 0000000000000..070f07291b42f --- /dev/null +++ b/tests/baselines/reference/internalAliasClass.errors.txt @@ -0,0 +1,16 @@ +error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! + + +!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +!!! related TS-1: The excess diagnostics are: +!!! related TS2749 tests/cases/compiler/internalAliasClass.ts:7:16: 'a.c' refers to a value, but is being used as a type here. Did you mean 'typeof a.c'? +==== tests/cases/compiler/internalAliasClass.ts (0 errors) ==== + module a { + export class c { + } + } + + module c { + import b = a.c; + export var x: b = new b(); + } \ No newline at end of file diff --git a/tests/baselines/reference/internalAliasClassInsideLocalModuleWithExport.errors.txt b/tests/baselines/reference/internalAliasClassInsideLocalModuleWithExport.errors.txt new file mode 100644 index 0000000000000..ecc51f2cc54c1 --- /dev/null +++ b/tests/baselines/reference/internalAliasClassInsideLocalModuleWithExport.errors.txt @@ -0,0 +1,24 @@ +error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! + + +!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +!!! related TS-1: The excess diagnostics are: +!!! related TS2749 tests/cases/compiler/internalAliasClassInsideLocalModuleWithExport.ts:11:27: 'x.c' refers to a value, but is being used as a type here. Did you mean 'typeof x.c'? +==== tests/cases/compiler/internalAliasClassInsideLocalModuleWithExport.ts (0 errors) ==== + export module x { + export class c { + foo(a: number) { + return a; + } + } + } + + export module m2 { + export module m3 { + export import c = x.c; + export var cProp = new c(); + var cReturnVal = cProp.foo(10); + } + } + + export var d = new m2.m3.c(); \ No newline at end of file diff --git a/tests/baselines/reference/internalAliasClassInsideLocalModuleWithoutExport.errors.txt b/tests/baselines/reference/internalAliasClassInsideLocalModuleWithoutExport.errors.txt new file mode 100644 index 0000000000000..45949e87fc848 --- /dev/null +++ b/tests/baselines/reference/internalAliasClassInsideLocalModuleWithoutExport.errors.txt @@ -0,0 +1,22 @@ +error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! + + +!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +!!! related TS-1: The excess diagnostics are: +!!! related TS2749 tests/cases/compiler/internalAliasClassInsideLocalModuleWithoutExport.ts:11:20: 'x.c' refers to a value, but is being used as a type here. Did you mean 'typeof x.c'? +==== tests/cases/compiler/internalAliasClassInsideLocalModuleWithoutExport.ts (0 errors) ==== + export module x { + export class c { + foo(a: number) { + return a; + } + } + } + + export module m2 { + export module m3 { + import c = x.c; + export var cProp = new c(); + var cReturnVal = cProp.foo(10); + } + } \ No newline at end of file diff --git a/tests/baselines/reference/internalAliasClassInsideLocalModuleWithoutExportAccessError.errors.txt b/tests/baselines/reference/internalAliasClassInsideLocalModuleWithoutExportAccessError.errors.txt index ee6a580ef40cf..3a27bf04c35ac 100644 --- a/tests/baselines/reference/internalAliasClassInsideLocalModuleWithoutExportAccessError.errors.txt +++ b/tests/baselines/reference/internalAliasClassInsideLocalModuleWithoutExportAccessError.errors.txt @@ -1,6 +1,10 @@ +error TS-1: Pre-emit (1) and post-emit (2) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! tests/cases/compiler/internalAliasClassInsideLocalModuleWithoutExportAccessError.ts(17,26): error TS2339: Property 'c' does not exist on type 'typeof m3'. +!!! error TS-1: Pre-emit (1) and post-emit (2) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +!!! related TS-1: The excess diagnostics are: +!!! related TS2749 tests/cases/compiler/internalAliasClassInsideLocalModuleWithoutExportAccessError.ts:11:20: 'x.c' refers to a value, but is being used as a type here. Did you mean 'typeof x.c'? ==== tests/cases/compiler/internalAliasClassInsideLocalModuleWithoutExportAccessError.ts (1 errors) ==== export module x { export class c { diff --git a/tests/baselines/reference/internalAliasClassInsideTopLevelModuleWithExport.errors.txt b/tests/baselines/reference/internalAliasClassInsideTopLevelModuleWithExport.errors.txt new file mode 100644 index 0000000000000..445e5063555b2 --- /dev/null +++ b/tests/baselines/reference/internalAliasClassInsideTopLevelModuleWithExport.errors.txt @@ -0,0 +1,18 @@ +error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! + + +!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +!!! related TS-1: The excess diagnostics are: +!!! related TS2749 tests/cases/compiler/internalAliasClassInsideTopLevelModuleWithExport.ts:9:20: 'x.c' refers to a value, but is being used as a type here. Did you mean 'typeof x.c'? +==== tests/cases/compiler/internalAliasClassInsideTopLevelModuleWithExport.ts (0 errors) ==== + export module x { + export class c { + foo(a: number) { + return a; + } + } + } + + export import xc = x.c; + export var cProp = new xc(); + var cReturnVal = cProp.foo(10); \ No newline at end of file diff --git a/tests/baselines/reference/internalAliasClassInsideTopLevelModuleWithoutExport.errors.txt b/tests/baselines/reference/internalAliasClassInsideTopLevelModuleWithoutExport.errors.txt new file mode 100644 index 0000000000000..bbf39763f034a --- /dev/null +++ b/tests/baselines/reference/internalAliasClassInsideTopLevelModuleWithoutExport.errors.txt @@ -0,0 +1,18 @@ +error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! + + +!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +!!! related TS-1: The excess diagnostics are: +!!! related TS2749 tests/cases/compiler/internalAliasClassInsideTopLevelModuleWithoutExport.ts:9:13: 'x.c' refers to a value, but is being used as a type here. Did you mean 'typeof x.c'? +==== tests/cases/compiler/internalAliasClassInsideTopLevelModuleWithoutExport.ts (0 errors) ==== + export module x { + export class c { + foo(a: number) { + return a; + } + } + } + + import xc = x.c; + export var cProp = new xc(); + var cReturnVal = cProp.foo(10); \ No newline at end of file diff --git a/tests/baselines/reference/internalAliasEnum.errors.txt b/tests/baselines/reference/internalAliasEnum.errors.txt new file mode 100644 index 0000000000000..186b34d9b954a --- /dev/null +++ b/tests/baselines/reference/internalAliasEnum.errors.txt @@ -0,0 +1,20 @@ +error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! + + +!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +!!! related TS-1: The excess diagnostics are: +!!! related TS2749 tests/cases/compiler/internalAliasEnum.ts:10:16: 'a.weekend' refers to a value, but is being used as a type here. Did you mean 'typeof a.weekend'? +==== tests/cases/compiler/internalAliasEnum.ts (0 errors) ==== + module a { + export enum weekend { + Friday, + Saturday, + Sunday + } + } + + module c { + import b = a.weekend; + export var bVal: b = b.Sunday; + } + \ No newline at end of file diff --git a/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithExport.errors.txt b/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithExport.errors.txt new file mode 100644 index 0000000000000..8715858106777 --- /dev/null +++ b/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithExport.errors.txt @@ -0,0 +1,20 @@ +error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! + + +!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +!!! related TS-1: The excess diagnostics are: +!!! related TS2749 tests/cases/compiler/internalAliasEnumInsideLocalModuleWithExport.ts:10:23: 'a.weekend' refers to a value, but is being used as a type here. Did you mean 'typeof a.weekend'? +==== tests/cases/compiler/internalAliasEnumInsideLocalModuleWithExport.ts (0 errors) ==== + export module a { + export enum weekend { + Friday, + Saturday, + Sunday + } + } + + export module c { + export import b = a.weekend; + export var bVal: b = b.Sunday; + } + \ No newline at end of file diff --git a/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithoutExport.errors.txt b/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithoutExport.errors.txt new file mode 100644 index 0000000000000..c98ad95ec2762 --- /dev/null +++ b/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithoutExport.errors.txt @@ -0,0 +1,20 @@ +error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! + + +!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +!!! related TS-1: The excess diagnostics are: +!!! related TS2749 tests/cases/compiler/internalAliasEnumInsideLocalModuleWithoutExport.ts:10:16: 'a.weekend' refers to a value, but is being used as a type here. Did you mean 'typeof a.weekend'? +==== tests/cases/compiler/internalAliasEnumInsideLocalModuleWithoutExport.ts (0 errors) ==== + export module a { + export enum weekend { + Friday, + Saturday, + Sunday + } + } + + export module c { + import b = a.weekend; + export var bVal: b = b.Sunday; + } + \ No newline at end of file diff --git a/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithoutExportAccessError.errors.txt b/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithoutExportAccessError.errors.txt index ff1739be202f4..b47352fcdd456 100644 --- a/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithoutExportAccessError.errors.txt +++ b/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithoutExportAccessError.errors.txt @@ -1,6 +1,10 @@ +error TS-1: Pre-emit (1) and post-emit (2) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! tests/cases/compiler/internalAliasEnumInsideLocalModuleWithoutExportAccessError.ts(14,21): error TS2339: Property 'b' does not exist on type 'typeof c'. +!!! error TS-1: Pre-emit (1) and post-emit (2) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +!!! related TS-1: The excess diagnostics are: +!!! related TS2749 tests/cases/compiler/internalAliasEnumInsideLocalModuleWithoutExportAccessError.ts:10:16: 'a.weekend' refers to a value, but is being used as a type here. Did you mean 'typeof a.weekend'? ==== tests/cases/compiler/internalAliasEnumInsideLocalModuleWithoutExportAccessError.ts (1 errors) ==== export module a { export enum weekend { diff --git a/tests/baselines/reference/internalAliasEnumInsideTopLevelModuleWithExport.errors.txt b/tests/baselines/reference/internalAliasEnumInsideTopLevelModuleWithExport.errors.txt new file mode 100644 index 0000000000000..3701aa6a4bb76 --- /dev/null +++ b/tests/baselines/reference/internalAliasEnumInsideTopLevelModuleWithExport.errors.txt @@ -0,0 +1,18 @@ +error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! + + +!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +!!! related TS-1: The excess diagnostics are: +!!! related TS2749 tests/cases/compiler/internalAliasEnumInsideTopLevelModuleWithExport.ts:9:19: 'a.weekend' refers to a value, but is being used as a type here. Did you mean 'typeof a.weekend'? +==== tests/cases/compiler/internalAliasEnumInsideTopLevelModuleWithExport.ts (0 errors) ==== + export module a { + export enum weekend { + Friday, + Saturday, + Sunday + } + } + + export import b = a.weekend; + export var bVal: b = b.Sunday; + \ No newline at end of file diff --git a/tests/baselines/reference/internalAliasEnumInsideTopLevelModuleWithoutExport.errors.txt b/tests/baselines/reference/internalAliasEnumInsideTopLevelModuleWithoutExport.errors.txt new file mode 100644 index 0000000000000..6189b740ba057 --- /dev/null +++ b/tests/baselines/reference/internalAliasEnumInsideTopLevelModuleWithoutExport.errors.txt @@ -0,0 +1,18 @@ +error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! + + +!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +!!! related TS-1: The excess diagnostics are: +!!! related TS2749 tests/cases/compiler/internalAliasEnumInsideTopLevelModuleWithoutExport.ts:9:12: 'a.weekend' refers to a value, but is being used as a type here. Did you mean 'typeof a.weekend'? +==== tests/cases/compiler/internalAliasEnumInsideTopLevelModuleWithoutExport.ts (0 errors) ==== + export module a { + export enum weekend { + Friday, + Saturday, + Sunday + } + } + + import b = a.weekend; + export var bVal: b = b.Sunday; + \ No newline at end of file diff --git a/tests/baselines/reference/internalAliasFunction.errors.txt b/tests/baselines/reference/internalAliasFunction.errors.txt new file mode 100644 index 0000000000000..2f27108c9c1d1 --- /dev/null +++ b/tests/baselines/reference/internalAliasFunction.errors.txt @@ -0,0 +1,19 @@ +error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! + + +!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +!!! related TS-1: The excess diagnostics are: +!!! related TS2749 tests/cases/compiler/internalAliasFunction.ts:8:16: 'a.foo' refers to a value, but is being used as a type here. Did you mean 'typeof a.foo'? +==== tests/cases/compiler/internalAliasFunction.ts (0 errors) ==== + module a { + export function foo(x: number) { + return x; + } + } + + module c { + import b = a.foo; + export var bVal = b(10); + export var bVal2 = b; + } + \ No newline at end of file diff --git a/tests/baselines/reference/internalAliasFunctionInsideLocalModuleWithExport.errors.txt b/tests/baselines/reference/internalAliasFunctionInsideLocalModuleWithExport.errors.txt new file mode 100644 index 0000000000000..b70a3beee46f2 --- /dev/null +++ b/tests/baselines/reference/internalAliasFunctionInsideLocalModuleWithExport.errors.txt @@ -0,0 +1,19 @@ +error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! + + +!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +!!! related TS-1: The excess diagnostics are: +!!! related TS2749 tests/cases/compiler/internalAliasFunctionInsideLocalModuleWithExport.ts:8:23: 'a.foo' refers to a value, but is being used as a type here. Did you mean 'typeof a.foo'? +==== tests/cases/compiler/internalAliasFunctionInsideLocalModuleWithExport.ts (0 errors) ==== + export module a { + export function foo(x: number) { + return x; + } + } + + export module c { + export import b = a.foo; + export var bVal = b(10); + export var bVal2 = b; + } + \ No newline at end of file diff --git a/tests/baselines/reference/internalAliasFunctionInsideLocalModuleWithoutExport.errors.txt b/tests/baselines/reference/internalAliasFunctionInsideLocalModuleWithoutExport.errors.txt new file mode 100644 index 0000000000000..065f53ffa9558 --- /dev/null +++ b/tests/baselines/reference/internalAliasFunctionInsideLocalModuleWithoutExport.errors.txt @@ -0,0 +1,19 @@ +error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! + + +!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +!!! related TS-1: The excess diagnostics are: +!!! related TS2749 tests/cases/compiler/internalAliasFunctionInsideLocalModuleWithoutExport.ts:8:16: 'a.foo' refers to a value, but is being used as a type here. Did you mean 'typeof a.foo'? +==== tests/cases/compiler/internalAliasFunctionInsideLocalModuleWithoutExport.ts (0 errors) ==== + export module a { + export function foo(x: number) { + return x; + } + } + + export module c { + import b = a.foo; + var bVal = b(10); + export var bVal2 = b; + } + \ No newline at end of file diff --git a/tests/baselines/reference/internalAliasFunctionInsideLocalModuleWithoutExportAccessError.errors.txt b/tests/baselines/reference/internalAliasFunctionInsideLocalModuleWithoutExportAccessError.errors.txt index c28842aee7f0c..d8be408812312 100644 --- a/tests/baselines/reference/internalAliasFunctionInsideLocalModuleWithoutExportAccessError.errors.txt +++ b/tests/baselines/reference/internalAliasFunctionInsideLocalModuleWithoutExportAccessError.errors.txt @@ -1,6 +1,10 @@ +error TS-1: Pre-emit (1) and post-emit (2) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! tests/cases/compiler/internalAliasFunctionInsideLocalModuleWithoutExportAccessError.ts(12,11): error TS2339: Property 'b' does not exist on type 'typeof c'. +!!! error TS-1: Pre-emit (1) and post-emit (2) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +!!! related TS-1: The excess diagnostics are: +!!! related TS2749 tests/cases/compiler/internalAliasFunctionInsideLocalModuleWithoutExportAccessError.ts:8:16: 'a.foo' refers to a value, but is being used as a type here. Did you mean 'typeof a.foo'? ==== tests/cases/compiler/internalAliasFunctionInsideLocalModuleWithoutExportAccessError.ts (1 errors) ==== export module a { export function foo(x: number) { diff --git a/tests/baselines/reference/internalAliasFunctionInsideTopLevelModuleWithExport.errors.txt b/tests/baselines/reference/internalAliasFunctionInsideTopLevelModuleWithExport.errors.txt new file mode 100644 index 0000000000000..3ca70065a20b7 --- /dev/null +++ b/tests/baselines/reference/internalAliasFunctionInsideTopLevelModuleWithExport.errors.txt @@ -0,0 +1,17 @@ +error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! + + +!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +!!! related TS-1: The excess diagnostics are: +!!! related TS2749 tests/cases/compiler/internalAliasFunctionInsideTopLevelModuleWithExport.ts:7:19: 'a.foo' refers to a value, but is being used as a type here. Did you mean 'typeof a.foo'? +==== tests/cases/compiler/internalAliasFunctionInsideTopLevelModuleWithExport.ts (0 errors) ==== + export module a { + export function foo(x: number) { + return x; + } + } + + export import b = a.foo; + export var bVal = b(10); + export var bVal2 = b; + \ No newline at end of file diff --git a/tests/baselines/reference/internalAliasFunctionInsideTopLevelModuleWithoutExport.errors.txt b/tests/baselines/reference/internalAliasFunctionInsideTopLevelModuleWithoutExport.errors.txt new file mode 100644 index 0000000000000..d4ce1e07893f2 --- /dev/null +++ b/tests/baselines/reference/internalAliasFunctionInsideTopLevelModuleWithoutExport.errors.txt @@ -0,0 +1,17 @@ +error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! + + +!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +!!! related TS-1: The excess diagnostics are: +!!! related TS2749 tests/cases/compiler/internalAliasFunctionInsideTopLevelModuleWithoutExport.ts:7:12: 'a.foo' refers to a value, but is being used as a type here. Did you mean 'typeof a.foo'? +==== tests/cases/compiler/internalAliasFunctionInsideTopLevelModuleWithoutExport.ts (0 errors) ==== + export module a { + export function foo(x: number) { + return x; + } + } + + import b = a.foo; + export var bVal = b(10); + export var bVal2 = b; + \ No newline at end of file diff --git a/tests/baselines/reference/internalAliasInitializedModule.errors.txt b/tests/baselines/reference/internalAliasInitializedModule.errors.txt new file mode 100644 index 0000000000000..340496555072c --- /dev/null +++ b/tests/baselines/reference/internalAliasInitializedModule.errors.txt @@ -0,0 +1,18 @@ +error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! + + +!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +!!! related TS-1: The excess diagnostics are: +!!! related TS2749 tests/cases/compiler/internalAliasInitializedModule.ts:9:16: 'a.b' refers to a value, but is being used as a type here. Did you mean 'typeof a.b'? +==== tests/cases/compiler/internalAliasInitializedModule.ts (0 errors) ==== + module a { + export module b { + export class c { + } + } + } + + module c { + import b = a.b; + export var x: b.c = new b.c(); + } \ No newline at end of file diff --git a/tests/baselines/reference/internalAliasInitializedModuleInsideLocalModuleWithExport.errors.txt b/tests/baselines/reference/internalAliasInitializedModuleInsideLocalModuleWithExport.errors.txt new file mode 100644 index 0000000000000..3a37a6f0b1eb5 --- /dev/null +++ b/tests/baselines/reference/internalAliasInitializedModuleInsideLocalModuleWithExport.errors.txt @@ -0,0 +1,18 @@ +error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! + + +!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +!!! related TS-1: The excess diagnostics are: +!!! related TS2749 tests/cases/compiler/internalAliasInitializedModuleInsideLocalModuleWithExport.ts:9:23: 'a.b' refers to a value, but is being used as a type here. Did you mean 'typeof a.b'? +==== tests/cases/compiler/internalAliasInitializedModuleInsideLocalModuleWithExport.ts (0 errors) ==== + export module a { + export module b { + export class c { + } + } + } + + export module c { + export import b = a.b; + export var x: b.c = new b.c(); + } \ No newline at end of file diff --git a/tests/baselines/reference/internalAliasInitializedModuleInsideLocalModuleWithoutExport.errors.txt b/tests/baselines/reference/internalAliasInitializedModuleInsideLocalModuleWithoutExport.errors.txt new file mode 100644 index 0000000000000..3f9c6c71848d9 --- /dev/null +++ b/tests/baselines/reference/internalAliasInitializedModuleInsideLocalModuleWithoutExport.errors.txt @@ -0,0 +1,18 @@ +error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! + + +!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +!!! related TS-1: The excess diagnostics are: +!!! related TS2749 tests/cases/compiler/internalAliasInitializedModuleInsideLocalModuleWithoutExport.ts:9:16: 'a.b' refers to a value, but is being used as a type here. Did you mean 'typeof a.b'? +==== tests/cases/compiler/internalAliasInitializedModuleInsideLocalModuleWithoutExport.ts (0 errors) ==== + export module a { + export module b { + export class c { + } + } + } + + export module c { + import b = a.b; + export var x: b.c = new b.c(); + } \ No newline at end of file diff --git a/tests/baselines/reference/internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.errors.txt b/tests/baselines/reference/internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.errors.txt index 7997eb2b3ae61..75304931ce932 100644 --- a/tests/baselines/reference/internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.errors.txt +++ b/tests/baselines/reference/internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.errors.txt @@ -1,6 +1,10 @@ +error TS-1: Pre-emit (1) and post-emit (2) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! tests/cases/compiler/internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.ts(13,22): error TS2339: Property 'b' does not exist on type 'typeof c'. +!!! error TS-1: Pre-emit (1) and post-emit (2) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +!!! related TS-1: The excess diagnostics are: +!!! related TS2749 tests/cases/compiler/internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.ts:9:16: 'a.b' refers to a value, but is being used as a type here. Did you mean 'typeof a.b'? ==== tests/cases/compiler/internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.ts (1 errors) ==== export module a { export module b { diff --git a/tests/baselines/reference/internalAliasInitializedModuleInsideTopLevelModuleWithExport.errors.txt b/tests/baselines/reference/internalAliasInitializedModuleInsideTopLevelModuleWithExport.errors.txt new file mode 100644 index 0000000000000..c5cc83fd9ce94 --- /dev/null +++ b/tests/baselines/reference/internalAliasInitializedModuleInsideTopLevelModuleWithExport.errors.txt @@ -0,0 +1,16 @@ +error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! + + +!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +!!! related TS-1: The excess diagnostics are: +!!! related TS2749 tests/cases/compiler/internalAliasInitializedModuleInsideTopLevelModuleWithExport.ts:8:19: 'a.b' refers to a value, but is being used as a type here. Did you mean 'typeof a.b'? +==== tests/cases/compiler/internalAliasInitializedModuleInsideTopLevelModuleWithExport.ts (0 errors) ==== + export module a { + export module b { + export class c { + } + } + } + + export import b = a.b; + export var x: b.c = new b.c(); \ No newline at end of file diff --git a/tests/baselines/reference/internalAliasInitializedModuleInsideTopLevelModuleWithoutExport.errors.txt b/tests/baselines/reference/internalAliasInitializedModuleInsideTopLevelModuleWithoutExport.errors.txt new file mode 100644 index 0000000000000..0785035670ae5 --- /dev/null +++ b/tests/baselines/reference/internalAliasInitializedModuleInsideTopLevelModuleWithoutExport.errors.txt @@ -0,0 +1,16 @@ +error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! + + +!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +!!! related TS-1: The excess diagnostics are: +!!! related TS2749 tests/cases/compiler/internalAliasInitializedModuleInsideTopLevelModuleWithoutExport.ts:8:12: 'a.b' refers to a value, but is being used as a type here. Did you mean 'typeof a.b'? +==== tests/cases/compiler/internalAliasInitializedModuleInsideTopLevelModuleWithoutExport.ts (0 errors) ==== + export module a { + export module b { + export class c { + } + } + } + + import b = a.b; + export var x: b.c = new b.c(); \ No newline at end of file diff --git a/tests/baselines/reference/internalAliasVar.errors.txt b/tests/baselines/reference/internalAliasVar.errors.txt new file mode 100644 index 0000000000000..8a04bafa2db39 --- /dev/null +++ b/tests/baselines/reference/internalAliasVar.errors.txt @@ -0,0 +1,16 @@ +error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! + + +!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +!!! related TS-1: The excess diagnostics are: +!!! related TS2749 tests/cases/compiler/internalAliasVar.ts:6:16: 'a.x' refers to a value, but is being used as a type here. Did you mean 'typeof a.x'? +==== tests/cases/compiler/internalAliasVar.ts (0 errors) ==== + module a { + export var x = 10; + } + + module c { + import b = a.x; + export var bVal = b; + } + \ No newline at end of file diff --git a/tests/baselines/reference/internalAliasVarInsideLocalModuleWithExport.errors.txt b/tests/baselines/reference/internalAliasVarInsideLocalModuleWithExport.errors.txt new file mode 100644 index 0000000000000..e3d88e05e8106 --- /dev/null +++ b/tests/baselines/reference/internalAliasVarInsideLocalModuleWithExport.errors.txt @@ -0,0 +1,16 @@ +error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! + + +!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +!!! related TS-1: The excess diagnostics are: +!!! related TS2749 tests/cases/compiler/internalAliasVarInsideLocalModuleWithExport.ts:6:23: 'a.x' refers to a value, but is being used as a type here. Did you mean 'typeof a.x'? +==== tests/cases/compiler/internalAliasVarInsideLocalModuleWithExport.ts (0 errors) ==== + export module a { + export var x = 10; + } + + export module c { + export import b = a.x; + export var bVal = b; + } + \ No newline at end of file diff --git a/tests/baselines/reference/internalAliasVarInsideLocalModuleWithoutExport.errors.txt b/tests/baselines/reference/internalAliasVarInsideLocalModuleWithoutExport.errors.txt new file mode 100644 index 0000000000000..2d0227048c7f1 --- /dev/null +++ b/tests/baselines/reference/internalAliasVarInsideLocalModuleWithoutExport.errors.txt @@ -0,0 +1,16 @@ +error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! + + +!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +!!! related TS-1: The excess diagnostics are: +!!! related TS2749 tests/cases/compiler/internalAliasVarInsideLocalModuleWithoutExport.ts:6:16: 'a.x' refers to a value, but is being used as a type here. Did you mean 'typeof a.x'? +==== tests/cases/compiler/internalAliasVarInsideLocalModuleWithoutExport.ts (0 errors) ==== + export module a { + export var x = 10; + } + + export module c { + import b = a.x; + export var bVal = b; + } + \ No newline at end of file diff --git a/tests/baselines/reference/internalAliasVarInsideLocalModuleWithoutExportAccessError.errors.txt b/tests/baselines/reference/internalAliasVarInsideLocalModuleWithoutExportAccessError.errors.txt index 6c00ac577942f..c3e98fa334781 100644 --- a/tests/baselines/reference/internalAliasVarInsideLocalModuleWithoutExportAccessError.errors.txt +++ b/tests/baselines/reference/internalAliasVarInsideLocalModuleWithoutExportAccessError.errors.txt @@ -1,6 +1,10 @@ +error TS-1: Pre-emit (1) and post-emit (2) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! tests/cases/compiler/internalAliasVarInsideLocalModuleWithoutExportAccessError.ts(10,18): error TS2339: Property 'b' does not exist on type 'typeof c'. +!!! error TS-1: Pre-emit (1) and post-emit (2) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +!!! related TS-1: The excess diagnostics are: +!!! related TS2749 tests/cases/compiler/internalAliasVarInsideLocalModuleWithoutExportAccessError.ts:6:16: 'a.x' refers to a value, but is being used as a type here. Did you mean 'typeof a.x'? ==== tests/cases/compiler/internalAliasVarInsideLocalModuleWithoutExportAccessError.ts (1 errors) ==== export module a { export var x = 10; diff --git a/tests/baselines/reference/internalAliasVarInsideTopLevelModuleWithExport.errors.txt b/tests/baselines/reference/internalAliasVarInsideTopLevelModuleWithExport.errors.txt new file mode 100644 index 0000000000000..fa37614b58194 --- /dev/null +++ b/tests/baselines/reference/internalAliasVarInsideTopLevelModuleWithExport.errors.txt @@ -0,0 +1,15 @@ +error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! + + +!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +!!! related TS-1: The excess diagnostics are: +!!! related TS2749 tests/cases/compiler/internalAliasVarInsideTopLevelModuleWithExport.ts:5:19: 'a.x' refers to a value, but is being used as a type here. Did you mean 'typeof a.x'? +==== tests/cases/compiler/internalAliasVarInsideTopLevelModuleWithExport.ts (0 errors) ==== + export module a { + export var x = 10; + } + + export import b = a.x; + export var bVal = b; + + \ No newline at end of file diff --git a/tests/baselines/reference/internalAliasVarInsideTopLevelModuleWithoutExport.errors.txt b/tests/baselines/reference/internalAliasVarInsideTopLevelModuleWithoutExport.errors.txt new file mode 100644 index 0000000000000..63c20e25defb0 --- /dev/null +++ b/tests/baselines/reference/internalAliasVarInsideTopLevelModuleWithoutExport.errors.txt @@ -0,0 +1,15 @@ +error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! + + +!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +!!! related TS-1: The excess diagnostics are: +!!! related TS2749 tests/cases/compiler/internalAliasVarInsideTopLevelModuleWithoutExport.ts:5:12: 'a.x' refers to a value, but is being used as a type here. Did you mean 'typeof a.x'? +==== tests/cases/compiler/internalAliasVarInsideTopLevelModuleWithoutExport.ts (0 errors) ==== + export module a { + export var x = 10; + } + + import b = a.x; + export var bVal = b; + + \ No newline at end of file diff --git a/tests/baselines/reference/localImportNameVsGlobalName.errors.txt b/tests/baselines/reference/localImportNameVsGlobalName.errors.txt new file mode 100644 index 0000000000000..15cc4c57709f2 --- /dev/null +++ b/tests/baselines/reference/localImportNameVsGlobalName.errors.txt @@ -0,0 +1,20 @@ +error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! + + +!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +!!! related TS-1: The excess diagnostics are: +!!! related TS2749 tests/cases/compiler/localImportNameVsGlobalName.ts:6:16: 'Keyboard.Key' refers to a value, but is being used as a type here. Did you mean 'typeof Keyboard.Key'? +==== tests/cases/compiler/localImportNameVsGlobalName.ts (0 errors) ==== + module Keyboard { + export enum Key { UP, DOWN, LEFT, RIGHT } + } + + module App { + import Key = Keyboard.Key; + + export function foo(key: Key): void {} + + foo(Key.UP); + foo(Key.DOWN); + foo(Key.LEFT); + } \ No newline at end of file diff --git a/tests/baselines/reference/moduleImport.errors.txt b/tests/baselines/reference/moduleImport.errors.txt index 4032b4b78717f..4e2c87d6c07e5 100644 --- a/tests/baselines/reference/moduleImport.errors.txt +++ b/tests/baselines/reference/moduleImport.errors.txt @@ -1,7 +1,11 @@ +error TS-1: Pre-emit (2) and post-emit (3) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! tests/cases/compiler/moduleImport.ts(2,17): error TS2339: Property 'Y' does not exist on type 'typeof X'. tests/cases/compiler/moduleImport.ts(2,17): error TS2694: Namespace 'X' has no exported member 'Y'. +!!! error TS-1: Pre-emit (2) and post-emit (3) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +!!! related TS-1: The excess diagnostics are: +!!! related TS2749 tests/cases/compiler/moduleImport.ts:9:15: 'A.B.C' refers to a value, but is being used as a type here. Did you mean 'typeof A.B.C'? ==== tests/cases/compiler/moduleImport.ts (2 errors) ==== module A.B.C { import XYZ = X.Y.Z; diff --git a/tests/baselines/reference/moduleSharesNameWithImportDeclarationInsideIt.errors.txt b/tests/baselines/reference/moduleSharesNameWithImportDeclarationInsideIt.errors.txt new file mode 100644 index 0000000000000..565412bcd9cf1 --- /dev/null +++ b/tests/baselines/reference/moduleSharesNameWithImportDeclarationInsideIt.errors.txt @@ -0,0 +1,18 @@ +error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! + + +!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +!!! related TS-1: The excess diagnostics are: +!!! related TS2749 tests/cases/compiler/moduleSharesNameWithImportDeclarationInsideIt.ts:7:16: 'Z.M' refers to a value, but is being used as a type here. Did you mean 'typeof Z.M'? +==== tests/cases/compiler/moduleSharesNameWithImportDeclarationInsideIt.ts (0 errors) ==== + module Z.M { + export function bar() { + return ""; + } + } + module A.M { + import M = Z.M; + export function bar() { + } + M.bar(); // Should call Z.M.bar + } \ No newline at end of file diff --git a/tests/baselines/reference/moduleSharesNameWithImportDeclarationInsideIt2.errors.txt b/tests/baselines/reference/moduleSharesNameWithImportDeclarationInsideIt2.errors.txt new file mode 100644 index 0000000000000..69d94c9fef60d --- /dev/null +++ b/tests/baselines/reference/moduleSharesNameWithImportDeclarationInsideIt2.errors.txt @@ -0,0 +1,18 @@ +error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! + + +!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +!!! related TS-1: The excess diagnostics are: +!!! related TS2749 tests/cases/compiler/moduleSharesNameWithImportDeclarationInsideIt2.ts:7:23: 'Z.M' refers to a value, but is being used as a type here. Did you mean 'typeof Z.M'? +==== tests/cases/compiler/moduleSharesNameWithImportDeclarationInsideIt2.ts (0 errors) ==== + module Z.M { + export function bar() { + return ""; + } + } + module A.M { + export import M = Z.M; + export function bar() { + } + M.bar(); // Should call Z.M.bar + } \ No newline at end of file diff --git a/tests/baselines/reference/moduleSharesNameWithImportDeclarationInsideIt3.errors.txt b/tests/baselines/reference/moduleSharesNameWithImportDeclarationInsideIt3.errors.txt index f8fa117c0241e..6c0df360d1705 100644 --- a/tests/baselines/reference/moduleSharesNameWithImportDeclarationInsideIt3.errors.txt +++ b/tests/baselines/reference/moduleSharesNameWithImportDeclarationInsideIt3.errors.txt @@ -1,7 +1,11 @@ +error TS-1: Pre-emit (2) and post-emit (3) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! tests/cases/compiler/moduleSharesNameWithImportDeclarationInsideIt3.ts(10,12): error TS2300: Duplicate identifier 'M'. tests/cases/compiler/moduleSharesNameWithImportDeclarationInsideIt3.ts(11,12): error TS2300: Duplicate identifier 'M'. +!!! error TS-1: Pre-emit (2) and post-emit (3) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +!!! related TS-1: The excess diagnostics are: +!!! related TS2749 tests/cases/compiler/moduleSharesNameWithImportDeclarationInsideIt3.ts:10:16: 'Z.M' refers to a value, but is being used as a type here. Did you mean 'typeof Z.M'? ==== tests/cases/compiler/moduleSharesNameWithImportDeclarationInsideIt3.ts (2 errors) ==== module Z { export module M { diff --git a/tests/baselines/reference/moduleSharesNameWithImportDeclarationInsideIt4.errors.txt b/tests/baselines/reference/moduleSharesNameWithImportDeclarationInsideIt4.errors.txt new file mode 100644 index 0000000000000..176b33c2864d3 --- /dev/null +++ b/tests/baselines/reference/moduleSharesNameWithImportDeclarationInsideIt4.errors.txt @@ -0,0 +1,19 @@ +error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! + + +!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +!!! related TS-1: The excess diagnostics are: +!!! related TS2749 tests/cases/compiler/moduleSharesNameWithImportDeclarationInsideIt4.ts:8:16: 'Z.M' refers to a value, but is being used as a type here. Did you mean 'typeof Z.M'? +==== tests/cases/compiler/moduleSharesNameWithImportDeclarationInsideIt4.ts (0 errors) ==== + module Z.M { + export function bar() { + return ""; + } + } + module A.M { + interface M { } + import M = Z.M; + export function bar() { + } + M.bar(); // Should call Z.M.bar + } \ No newline at end of file diff --git a/tests/baselines/reference/moduleVisibilityTest1.errors.txt b/tests/baselines/reference/moduleVisibilityTest1.errors.txt new file mode 100644 index 0000000000000..1a741e3dc5c68 --- /dev/null +++ b/tests/baselines/reference/moduleVisibilityTest1.errors.txt @@ -0,0 +1,72 @@ +error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! + + +!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +!!! related TS-1: The excess diagnostics are: +!!! related TS2749 tests/cases/compiler/moduleVisibilityTest1.ts:9:26: 'OuterMod.OuterInnerMod' refers to a value, but is being used as a type here. Did you mean 'typeof OuterMod.OuterInnerMod'? +==== tests/cases/compiler/moduleVisibilityTest1.ts (0 errors) ==== + module OuterMod { + export function someExportedOuterFunc() { return -1; } + + export module OuterInnerMod { + export function someExportedOuterInnerFunc() { return "foo"; } + } + } + + import OuterInnerAlias = OuterMod.OuterInnerMod; + + module M { + + export module InnerMod { + export function someExportedInnerFunc() { return -2; } + } + + export enum E { + A, + B, + C, + } + + export var x = 5; + export declare var exported_var; + + var y = x + x; + + + export interface I { + someMethod():number; + } + + class B {public b = 0;} + + export class C implements I { + public someMethodThatCallsAnOuterMethod() {return OuterInnerAlias.someExportedOuterInnerFunc();} + public someMethodThatCallsAnInnerMethod() {return InnerMod.someExportedInnerFunc();} + public someMethodThatCallsAnOuterInnerMethod() {return OuterMod.someExportedOuterFunc();} + public someMethod() { return 0; } + public someProp = 1; + + constructor() { + function someInnerFunc() { return 2; } + var someInnerVar = 3; + } + } + + var someModuleVar = 4; + + function someModuleFunction() { return 5;} + } + + module M { + export var c = x; + export var meb = M.E.B; + } + + var cprime : M.I = null; + + var c = new M.C(); + var z = M.x; + var alpha = M.E.A; + var omega = M.exported_var; + c.someMethodThatCallsAnOuterMethod(); + \ No newline at end of file diff --git a/tests/baselines/reference/moduleVisibilityTest2.errors.txt b/tests/baselines/reference/moduleVisibilityTest2.errors.txt index 2b5686124b835..48c2f4d606ff1 100644 --- a/tests/baselines/reference/moduleVisibilityTest2.errors.txt +++ b/tests/baselines/reference/moduleVisibilityTest2.errors.txt @@ -1,3 +1,4 @@ +error TS-1: Pre-emit (6) and post-emit (7) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! tests/cases/compiler/moduleVisibilityTest2.ts(55,17): error TS2304: Cannot find name 'x'. tests/cases/compiler/moduleVisibilityTest2.ts(56,21): error TS2339: Property 'E' does not exist on type 'typeof M'. tests/cases/compiler/moduleVisibilityTest2.ts(59,16): error TS2694: Namespace 'M' has no exported member 'I'. @@ -6,6 +7,9 @@ tests/cases/compiler/moduleVisibilityTest2.ts(62,11): error TS2339: Property 'x' tests/cases/compiler/moduleVisibilityTest2.ts(63,15): error TS2339: Property 'E' does not exist on type 'typeof M'. +!!! error TS-1: Pre-emit (6) and post-emit (7) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +!!! related TS-1: The excess diagnostics are: +!!! related TS2749 tests/cases/compiler/moduleVisibilityTest2.ts:9:26: 'OuterMod.OuterInnerMod' refers to a value, but is being used as a type here. Did you mean 'typeof OuterMod.OuterInnerMod'? ==== tests/cases/compiler/moduleVisibilityTest2.ts (6 errors) ==== module OuterMod { export function someExportedOuterFunc() { return -1; } diff --git a/tests/baselines/reference/privacyLocalInternalReferenceImportWithExport.errors.txt b/tests/baselines/reference/privacyLocalInternalReferenceImportWithExport.errors.txt new file mode 100644 index 0000000000000..c55fe2c56c7f5 --- /dev/null +++ b/tests/baselines/reference/privacyLocalInternalReferenceImportWithExport.errors.txt @@ -0,0 +1,178 @@ +error TS-1: Pre-emit (0) and post-emit (20) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! + + +!!! error TS-1: Pre-emit (0) and post-emit (20) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +!!! related TS-1: The excess diagnostics are: +!!! related TS2724 tests/cases/compiler/privacyLocalInternalReferenceImportWithExport.ts:51:51: 'm_private' has no exported member named 'c_private'. Did you mean 'f_private'? +!!! related TS2724 tests/cases/compiler/privacyLocalInternalReferenceImportWithExport.ts:52:51: 'm_private' has no exported member named 'e_private'. Did you mean 'f_private'? +!!! related TS2724 tests/cases/compiler/privacyLocalInternalReferenceImportWithExport.ts:53:51: 'm_private' has no exported member named 'f_private'. Did you mean 'c_private'? +!!! related TS2724 tests/cases/compiler/privacyLocalInternalReferenceImportWithExport.ts:54:51: 'm_private' has no exported member named 'v_private'. Did you mean 'f_private'? +!!! related TS2724 tests/cases/compiler/privacyLocalInternalReferenceImportWithExport.ts:56:52: 'm_private' has no exported member named 'mi_private'. Did you mean 'i_private'? +!!! related TS2724 tests/cases/compiler/privacyLocalInternalReferenceImportWithExport.ts:77:49: '"tests/cases/compiler/privacyLocalInternalReferenceImportWithExport".m_public' has no exported member named 'c_public'. Did you mean 'f_public'? +!!! related TS2724 tests/cases/compiler/privacyLocalInternalReferenceImportWithExport.ts:78:49: '"tests/cases/compiler/privacyLocalInternalReferenceImportWithExport".m_public' has no exported member named 'e_public'. Did you mean 'f_public'? +!!! related TS2724 tests/cases/compiler/privacyLocalInternalReferenceImportWithExport.ts:79:49: '"tests/cases/compiler/privacyLocalInternalReferenceImportWithExport".m_public' has no exported member named 'f_public'. Did you mean 'c_public'? +!!! related TS2724 tests/cases/compiler/privacyLocalInternalReferenceImportWithExport.ts:80:49: '"tests/cases/compiler/privacyLocalInternalReferenceImportWithExport".m_public' has no exported member named 'v_public'. Did you mean 'f_public'? +!!! related TS2724 tests/cases/compiler/privacyLocalInternalReferenceImportWithExport.ts:82:50: '"tests/cases/compiler/privacyLocalInternalReferenceImportWithExport".m_public' has no exported member named 'mi_public'. Did you mean 'i_public'? +!!! related TS2724 tests/cases/compiler/privacyLocalInternalReferenceImportWithExport.ts:104:52: 'm_private' has no exported member named 'c_private'. Did you mean 'f_private'? +!!! related TS2724 tests/cases/compiler/privacyLocalInternalReferenceImportWithExport.ts:105:52: 'm_private' has no exported member named 'e_private'. Did you mean 'f_private'? +!!! related TS2724 tests/cases/compiler/privacyLocalInternalReferenceImportWithExport.ts:106:52: 'm_private' has no exported member named 'f_private'. Did you mean 'c_private'? +!!! related TS2724 tests/cases/compiler/privacyLocalInternalReferenceImportWithExport.ts:107:52: 'm_private' has no exported member named 'v_private'. Did you mean 'f_private'? +!!! related TS2724 tests/cases/compiler/privacyLocalInternalReferenceImportWithExport.ts:109:53: 'm_private' has no exported member named 'mi_private'. Did you mean 'i_private'? +!!! related TS2724 tests/cases/compiler/privacyLocalInternalReferenceImportWithExport.ts:129:50: '"tests/cases/compiler/privacyLocalInternalReferenceImportWithExport".m_public' has no exported member named 'c_public'. Did you mean 'f_public'? +!!! related TS2724 tests/cases/compiler/privacyLocalInternalReferenceImportWithExport.ts:130:50: '"tests/cases/compiler/privacyLocalInternalReferenceImportWithExport".m_public' has no exported member named 'e_public'. Did you mean 'f_public'? +!!! related TS2724 tests/cases/compiler/privacyLocalInternalReferenceImportWithExport.ts:131:50: '"tests/cases/compiler/privacyLocalInternalReferenceImportWithExport".m_public' has no exported member named 'f_public'. Did you mean 'c_public'? +!!! related TS2724 tests/cases/compiler/privacyLocalInternalReferenceImportWithExport.ts:132:50: '"tests/cases/compiler/privacyLocalInternalReferenceImportWithExport".m_public' has no exported member named 'v_public'. Did you mean 'f_public'? +!!! related TS2724 tests/cases/compiler/privacyLocalInternalReferenceImportWithExport.ts:134:51: '"tests/cases/compiler/privacyLocalInternalReferenceImportWithExport".m_public' has no exported member named 'mi_public'. Did you mean 'i_public'? +==== tests/cases/compiler/privacyLocalInternalReferenceImportWithExport.ts (0 errors) ==== + // private elements + module m_private { + export class c_private { + } + export enum e_private { + Happy, + Grumpy + } + export function f_private() { + return new c_private(); + } + export var v_private = new c_private(); + export interface i_private { + } + export module mi_private { + export class c { + } + } + export module mu_private { + export interface i { + } + } + } + + // Public elements + export module m_public { + export class c_public { + } + export enum e_public { + Happy, + Grumpy + } + export function f_public() { + return new c_public(); + } + export var v_public = 10; + export interface i_public { + } + export module mi_public { + export class c { + } + } + export module mu_public { + export interface i { + } + } + } + + export module import_public { + // Privacy errors - importing private elements + export import im_public_c_private = m_private.c_private; + export import im_public_e_private = m_private.e_private; + export import im_public_f_private = m_private.f_private; + export import im_public_v_private = m_private.v_private; + export import im_public_i_private = m_private.i_private; + export import im_public_mi_private = m_private.mi_private; + export import im_public_mu_private = m_private.mu_private; + + // Usage of privacy error imports + var privateUse_im_public_c_private = new im_public_c_private(); + export var publicUse_im_public_c_private = new im_public_c_private(); + var privateUse_im_public_e_private = im_public_e_private.Happy; + export var publicUse_im_public_e_private = im_public_e_private.Grumpy; + var privateUse_im_public_f_private = im_public_f_private(); + export var publicUse_im_public_f_private = im_public_f_private(); + var privateUse_im_public_v_private = im_public_v_private; + export var publicUse_im_public_v_private = im_public_v_private; + var privateUse_im_public_i_private: im_public_i_private; + export var publicUse_im_public_i_private: im_public_i_private; + var privateUse_im_public_mi_private = new im_public_mi_private.c(); + export var publicUse_im_public_mi_private = new im_public_mi_private.c(); + var privateUse_im_public_mu_private: im_public_mu_private.i; + export var publicUse_im_public_mu_private: im_public_mu_private.i; + + + // No Privacy errors - importing public elements + export import im_public_c_public = m_public.c_public; + export import im_public_e_public = m_public.e_public; + export import im_public_f_public = m_public.f_public; + export import im_public_v_public = m_public.v_public; + export import im_public_i_public = m_public.i_public; + export import im_public_mi_public = m_public.mi_public; + export import im_public_mu_public = m_public.mu_public; + + // Usage of above + var privateUse_im_public_c_public = new im_public_c_public(); + export var publicUse_im_public_c_public = new im_public_c_public(); + var privateUse_im_public_e_public = im_public_e_public.Happy; + export var publicUse_im_public_e_public = im_public_e_public.Grumpy; + var privateUse_im_public_f_public = im_public_f_public(); + export var publicUse_im_public_f_public = im_public_f_public(); + var privateUse_im_public_v_public = im_public_v_public; + export var publicUse_im_public_v_public = im_public_v_public; + var privateUse_im_public_i_public: im_public_i_public; + export var publicUse_im_public_i_public: im_public_i_public; + var privateUse_im_public_mi_public = new im_public_mi_public.c(); + export var publicUse_im_public_mi_public = new im_public_mi_public.c(); + var privateUse_im_public_mu_public: im_public_mu_public.i; + export var publicUse_im_public_mu_public: im_public_mu_public.i; + } + + module import_private { + // No Privacy errors - importing private elements + export import im_private_c_private = m_private.c_private; + export import im_private_e_private = m_private.e_private; + export import im_private_f_private = m_private.f_private; + export import im_private_v_private = m_private.v_private; + export import im_private_i_private = m_private.i_private; + export import im_private_mi_private = m_private.mi_private; + export import im_private_mu_private = m_private.mu_private; + + // Usage of above decls + var privateUse_im_private_c_private = new im_private_c_private(); + export var publicUse_im_private_c_private = new im_private_c_private(); + var privateUse_im_private_e_private = im_private_e_private.Happy; + export var publicUse_im_private_e_private = im_private_e_private.Grumpy; + var privateUse_im_private_f_private = im_private_f_private(); + export var publicUse_im_private_f_private = im_private_f_private(); + var privateUse_im_private_v_private = im_private_v_private; + export var publicUse_im_private_v_private = im_private_v_private; + var privateUse_im_private_i_private: im_private_i_private; + export var publicUse_im_private_i_private: im_private_i_private; + var privateUse_im_private_mi_private = new im_private_mi_private.c(); + export var publicUse_im_private_mi_private = new im_private_mi_private.c(); + var privateUse_im_private_mu_private: im_private_mu_private.i; + export var publicUse_im_private_mu_private: im_private_mu_private.i; + + // No privacy Error - importing public elements + export import im_private_c_public = m_public.c_public; + export import im_private_e_public = m_public.e_public; + export import im_private_f_public = m_public.f_public; + export import im_private_v_public = m_public.v_public; + export import im_private_i_public = m_public.i_public; + export import im_private_mi_public = m_public.mi_public; + export import im_private_mu_public = m_public.mu_public; + + // Usage of no privacy error imports + var privateUse_im_private_c_public = new im_private_c_public(); + export var publicUse_im_private_c_public = new im_private_c_public(); + var privateUse_im_private_e_public = im_private_e_public.Happy; + export var publicUse_im_private_e_public = im_private_e_public.Grumpy; + var privateUse_im_private_f_public = im_private_f_public(); + export var publicUse_im_private_f_public = im_private_f_public(); + var privateUse_im_private_v_public = im_private_v_public; + export var publicUse_im_private_v_public = im_private_v_public; + var privateUse_im_private_i_public: im_private_i_public; + export var publicUse_im_private_i_public: im_private_i_public; + var privateUse_im_private_mi_public = new im_private_mi_public.c(); + export var publicUse_im_private_mi_public = new im_private_mi_public.c(); + var privateUse_im_private_mu_public: im_private_mu_public.i; + export var publicUse_im_private_mu_public: im_private_mu_public.i; + } \ No newline at end of file diff --git a/tests/baselines/reference/privacyLocalInternalReferenceImportWithoutExport.errors.txt b/tests/baselines/reference/privacyLocalInternalReferenceImportWithoutExport.errors.txt new file mode 100644 index 0000000000000..09f9f03f47085 --- /dev/null +++ b/tests/baselines/reference/privacyLocalInternalReferenceImportWithoutExport.errors.txt @@ -0,0 +1,178 @@ +error TS-1: Pre-emit (0) and post-emit (20) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! + + +!!! error TS-1: Pre-emit (0) and post-emit (20) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +!!! related TS-1: The excess diagnostics are: +!!! related TS2724 tests/cases/compiler/privacyLocalInternalReferenceImportWithoutExport.ts:51:45: 'm_private' has no exported member named 'c_private'. Did you mean 'f_private'? +!!! related TS2724 tests/cases/compiler/privacyLocalInternalReferenceImportWithoutExport.ts:52:45: 'm_private' has no exported member named 'e_private'. Did you mean 'f_private'? +!!! related TS2724 tests/cases/compiler/privacyLocalInternalReferenceImportWithoutExport.ts:53:45: 'm_private' has no exported member named 'f_private'. Did you mean 'c_private'? +!!! related TS2724 tests/cases/compiler/privacyLocalInternalReferenceImportWithoutExport.ts:54:45: 'm_private' has no exported member named 'v_private'. Did you mean 'f_private'? +!!! related TS2724 tests/cases/compiler/privacyLocalInternalReferenceImportWithoutExport.ts:56:46: 'm_private' has no exported member named 'mi_private'. Did you mean 'i_private'? +!!! related TS2724 tests/cases/compiler/privacyLocalInternalReferenceImportWithoutExport.ts:77:43: '"tests/cases/compiler/privacyLocalInternalReferenceImportWithoutExport".m_public' has no exported member named 'c_public'. Did you mean 'f_public'? +!!! related TS2724 tests/cases/compiler/privacyLocalInternalReferenceImportWithoutExport.ts:78:43: '"tests/cases/compiler/privacyLocalInternalReferenceImportWithoutExport".m_public' has no exported member named 'e_public'. Did you mean 'f_public'? +!!! related TS2724 tests/cases/compiler/privacyLocalInternalReferenceImportWithoutExport.ts:79:43: '"tests/cases/compiler/privacyLocalInternalReferenceImportWithoutExport".m_public' has no exported member named 'f_public'. Did you mean 'c_public'? +!!! related TS2724 tests/cases/compiler/privacyLocalInternalReferenceImportWithoutExport.ts:80:43: '"tests/cases/compiler/privacyLocalInternalReferenceImportWithoutExport".m_public' has no exported member named 'v_public'. Did you mean 'f_public'? +!!! related TS2724 tests/cases/compiler/privacyLocalInternalReferenceImportWithoutExport.ts:82:44: '"tests/cases/compiler/privacyLocalInternalReferenceImportWithoutExport".m_public' has no exported member named 'mi_public'. Did you mean 'i_public'? +!!! related TS2724 tests/cases/compiler/privacyLocalInternalReferenceImportWithoutExport.ts:104:45: 'm_private' has no exported member named 'c_private'. Did you mean 'f_private'? +!!! related TS2724 tests/cases/compiler/privacyLocalInternalReferenceImportWithoutExport.ts:105:45: 'm_private' has no exported member named 'e_private'. Did you mean 'f_private'? +!!! related TS2724 tests/cases/compiler/privacyLocalInternalReferenceImportWithoutExport.ts:106:45: 'm_private' has no exported member named 'f_private'. Did you mean 'c_private'? +!!! related TS2724 tests/cases/compiler/privacyLocalInternalReferenceImportWithoutExport.ts:107:45: 'm_private' has no exported member named 'v_private'. Did you mean 'f_private'? +!!! related TS2724 tests/cases/compiler/privacyLocalInternalReferenceImportWithoutExport.ts:109:46: 'm_private' has no exported member named 'mi_private'. Did you mean 'i_private'? +!!! related TS2724 tests/cases/compiler/privacyLocalInternalReferenceImportWithoutExport.ts:129:43: '"tests/cases/compiler/privacyLocalInternalReferenceImportWithoutExport".m_public' has no exported member named 'c_public'. Did you mean 'f_public'? +!!! related TS2724 tests/cases/compiler/privacyLocalInternalReferenceImportWithoutExport.ts:130:43: '"tests/cases/compiler/privacyLocalInternalReferenceImportWithoutExport".m_public' has no exported member named 'e_public'. Did you mean 'f_public'? +!!! related TS2724 tests/cases/compiler/privacyLocalInternalReferenceImportWithoutExport.ts:131:43: '"tests/cases/compiler/privacyLocalInternalReferenceImportWithoutExport".m_public' has no exported member named 'f_public'. Did you mean 'c_public'? +!!! related TS2724 tests/cases/compiler/privacyLocalInternalReferenceImportWithoutExport.ts:132:43: '"tests/cases/compiler/privacyLocalInternalReferenceImportWithoutExport".m_public' has no exported member named 'v_public'. Did you mean 'f_public'? +!!! related TS2724 tests/cases/compiler/privacyLocalInternalReferenceImportWithoutExport.ts:134:44: '"tests/cases/compiler/privacyLocalInternalReferenceImportWithoutExport".m_public' has no exported member named 'mi_public'. Did you mean 'i_public'? +==== tests/cases/compiler/privacyLocalInternalReferenceImportWithoutExport.ts (0 errors) ==== + // private elements + module m_private { + export class c_private { + } + export enum e_private { + Happy, + Grumpy + } + export function f_private() { + return new c_private(); + } + export var v_private = new c_private(); + export interface i_private { + } + export module mi_private { + export class c { + } + } + export module mu_private { + export interface i { + } + } + } + + // Public elements + export module m_public { + export class c_public { + } + export enum e_public { + Happy, + Grumpy + } + export function f_public() { + return new c_public(); + } + export var v_public = 10; + export interface i_public { + } + export module mi_public { + export class c { + } + } + export module mu_public { + export interface i { + } + } + } + + export module import_public { + // No Privacy errors - importing private elements + import im_private_c_private = m_private.c_private; + import im_private_e_private = m_private.e_private; + import im_private_f_private = m_private.f_private; + import im_private_v_private = m_private.v_private; + import im_private_i_private = m_private.i_private; + import im_private_mi_private = m_private.mi_private; + import im_private_mu_private = m_private.mu_private; + + // Usage of above decls + var privateUse_im_private_c_private = new im_private_c_private(); + export var publicUse_im_private_c_private = new im_private_c_private(); + var privateUse_im_private_e_private = im_private_e_private.Happy; + export var publicUse_im_private_e_private = im_private_e_private.Grumpy; + var privateUse_im_private_f_private = im_private_f_private(); + export var publicUse_im_private_f_private = im_private_f_private(); + var privateUse_im_private_v_private = im_private_v_private; + export var publicUse_im_private_v_private = im_private_v_private; + var privateUse_im_private_i_private: im_private_i_private; + export var publicUse_im_private_i_private: im_private_i_private; + var privateUse_im_private_mi_private = new im_private_mi_private.c(); + export var publicUse_im_private_mi_private = new im_private_mi_private.c(); + var privateUse_im_private_mu_private: im_private_mu_private.i; + export var publicUse_im_private_mu_private: im_private_mu_private.i; + + + // No Privacy errors - importing public elements + import im_private_c_public = m_public.c_public; + import im_private_e_public = m_public.e_public; + import im_private_f_public = m_public.f_public; + import im_private_v_public = m_public.v_public; + import im_private_i_public = m_public.i_public; + import im_private_mi_public = m_public.mi_public; + import im_private_mu_public = m_public.mu_public; + + // Usage of above decls + var privateUse_im_private_c_public = new im_private_c_public(); + export var publicUse_im_private_c_public = new im_private_c_public(); + var privateUse_im_private_e_public = im_private_e_public.Happy; + export var publicUse_im_private_e_public = im_private_e_public.Grumpy; + var privateUse_im_private_f_public = im_private_f_public(); + export var publicUse_im_private_f_public = im_private_f_public(); + var privateUse_im_private_v_public = im_private_v_public; + export var publicUse_im_private_v_public = im_private_v_public; + var privateUse_im_private_i_public: im_private_i_public; + export var publicUse_im_private_i_public: im_private_i_public; + var privateUse_im_private_mi_public = new im_private_mi_public.c(); + export var publicUse_im_private_mi_public = new im_private_mi_public.c(); + var privateUse_im_private_mu_public: im_private_mu_public.i; + export var publicUse_im_private_mu_public: im_private_mu_public.i; + } + + module import_private { + // No Privacy errors - importing private elements + import im_private_c_private = m_private.c_private; + import im_private_e_private = m_private.e_private; + import im_private_f_private = m_private.f_private; + import im_private_v_private = m_private.v_private; + import im_private_i_private = m_private.i_private; + import im_private_mi_private = m_private.mi_private; + import im_private_mu_private = m_private.mu_private; + + // Usage of above decls + var privateUse_im_private_c_private = new im_private_c_private(); + export var publicUse_im_private_c_private = new im_private_c_private(); + var privateUse_im_private_e_private = im_private_e_private.Happy; + export var publicUse_im_private_e_private = im_private_e_private.Grumpy; + var privateUse_im_private_f_private = im_private_f_private(); + export var publicUse_im_private_f_private = im_private_f_private(); + var privateUse_im_private_v_private = im_private_v_private; + export var publicUse_im_private_v_private = im_private_v_private; + var privateUse_im_private_i_private: im_private_i_private; + export var publicUse_im_private_i_private: im_private_i_private; + var privateUse_im_private_mi_private = new im_private_mi_private.c(); + export var publicUse_im_private_mi_private = new im_private_mi_private.c(); + var privateUse_im_private_mu_private: im_private_mu_private.i; + export var publicUse_im_private_mu_private: im_private_mu_private.i; + + // No privacy Error - importing public elements + import im_private_c_public = m_public.c_public; + import im_private_e_public = m_public.e_public; + import im_private_f_public = m_public.f_public; + import im_private_v_public = m_public.v_public; + import im_private_i_public = m_public.i_public; + import im_private_mi_public = m_public.mi_public; + import im_private_mu_public = m_public.mu_public; + + // Usage of above decls + var privateUse_im_private_c_public = new im_private_c_public(); + export var publicUse_im_private_c_public = new im_private_c_public(); + var privateUse_im_private_e_public = im_private_e_public.Happy; + export var publicUse_im_private_e_public = im_private_e_public.Grumpy; + var privateUse_im_private_f_public = im_private_f_public(); + export var publicUse_im_private_f_public = im_private_f_public(); + var privateUse_im_private_v_public = im_private_v_public; + export var publicUse_im_private_v_public = im_private_v_public; + var privateUse_im_private_i_public: im_private_i_public; + export var publicUse_im_private_i_public: im_private_i_public; + var privateUse_im_private_mi_public = new im_private_mi_public.c(); + export var publicUse_im_private_mi_public = new im_private_mi_public.c(); + var privateUse_im_private_mu_public: im_private_mu_public.i; + export var publicUse_im_private_mu_public: im_private_mu_public.i; + } \ No newline at end of file diff --git a/tests/baselines/reference/privacyTopLevelInternalReferenceImportWithExport.errors.txt b/tests/baselines/reference/privacyTopLevelInternalReferenceImportWithExport.errors.txt new file mode 100644 index 0000000000000..33dc54f5deec8 --- /dev/null +++ b/tests/baselines/reference/privacyTopLevelInternalReferenceImportWithExport.errors.txt @@ -0,0 +1,115 @@ +error TS-1: Pre-emit (0) and post-emit (10) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! + + +!!! error TS-1: Pre-emit (0) and post-emit (10) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +!!! related TS-1: The excess diagnostics are: +!!! related TS2724 tests/cases/compiler/privacyTopLevelInternalReferenceImportWithExport.ts:50:47: 'm_private' has no exported member named 'c_private'. Did you mean 'f_private'? +!!! related TS2724 tests/cases/compiler/privacyTopLevelInternalReferenceImportWithExport.ts:51:47: 'm_private' has no exported member named 'e_private'. Did you mean 'f_private'? +!!! related TS2724 tests/cases/compiler/privacyTopLevelInternalReferenceImportWithExport.ts:52:47: 'm_private' has no exported member named 'f_private'. Did you mean 'c_private'? +!!! related TS2724 tests/cases/compiler/privacyTopLevelInternalReferenceImportWithExport.ts:53:47: 'm_private' has no exported member named 'v_private'. Did you mean 'f_private'? +!!! related TS2724 tests/cases/compiler/privacyTopLevelInternalReferenceImportWithExport.ts:55:48: 'm_private' has no exported member named 'mi_private'. Did you mean 'i_private'? +!!! related TS2724 tests/cases/compiler/privacyTopLevelInternalReferenceImportWithExport.ts:76:45: '"tests/cases/compiler/privacyTopLevelInternalReferenceImportWithExport".m_public' has no exported member named 'c_public'. Did you mean 'f_public'? +!!! related TS2724 tests/cases/compiler/privacyTopLevelInternalReferenceImportWithExport.ts:77:45: '"tests/cases/compiler/privacyTopLevelInternalReferenceImportWithExport".m_public' has no exported member named 'e_public'. Did you mean 'f_public'? +!!! related TS2724 tests/cases/compiler/privacyTopLevelInternalReferenceImportWithExport.ts:78:45: '"tests/cases/compiler/privacyTopLevelInternalReferenceImportWithExport".m_public' has no exported member named 'f_public'. Did you mean 'c_public'? +!!! related TS2724 tests/cases/compiler/privacyTopLevelInternalReferenceImportWithExport.ts:79:45: '"tests/cases/compiler/privacyTopLevelInternalReferenceImportWithExport".m_public' has no exported member named 'v_public'. Did you mean 'f_public'? +!!! related TS2724 tests/cases/compiler/privacyTopLevelInternalReferenceImportWithExport.ts:81:46: '"tests/cases/compiler/privacyTopLevelInternalReferenceImportWithExport".m_public' has no exported member named 'mi_public'. Did you mean 'i_public'? +==== tests/cases/compiler/privacyTopLevelInternalReferenceImportWithExport.ts (0 errors) ==== + // private elements + module m_private { + export class c_private { + } + export enum e_private { + Happy, + Grumpy + } + export function f_private() { + return new c_private(); + } + export var v_private = new c_private(); + export interface i_private { + } + export module mi_private { + export class c { + } + } + export module mu_private { + export interface i { + } + } + } + + // Public elements + export module m_public { + export class c_public { + } + export enum e_public { + Happy, + Grumpy + } + export function f_public() { + return new c_public(); + } + export var v_public = 10; + export interface i_public { + } + export module mi_public { + export class c { + } + } + export module mu_public { + export interface i { + } + } + } + + // Privacy errors - importing private elements + export import im_public_c_private = m_private.c_private; + export import im_public_e_private = m_private.e_private; + export import im_public_f_private = m_private.f_private; + export import im_public_v_private = m_private.v_private; + export import im_public_i_private = m_private.i_private; + export import im_public_mi_private = m_private.mi_private; + export import im_public_mu_private = m_private.mu_private; + + // Usage of privacy error imports + var privateUse_im_public_c_private = new im_public_c_private(); + export var publicUse_im_public_c_private = new im_public_c_private(); + var privateUse_im_public_e_private = im_public_e_private.Happy; + export var publicUse_im_public_e_private = im_public_e_private.Grumpy; + var privateUse_im_public_f_private = im_public_f_private(); + export var publicUse_im_public_f_private = im_public_f_private(); + var privateUse_im_public_v_private = im_public_v_private; + export var publicUse_im_public_v_private = im_public_v_private; + var privateUse_im_public_i_private: im_public_i_private; + export var publicUse_im_public_i_private: im_public_i_private; + var privateUse_im_public_mi_private = new im_public_mi_private.c(); + export var publicUse_im_public_mi_private = new im_public_mi_private.c(); + var privateUse_im_public_mu_private: im_public_mu_private.i; + export var publicUse_im_public_mu_private: im_public_mu_private.i; + + + // No Privacy errors - importing public elements + export import im_public_c_public = m_public.c_public; + export import im_public_e_public = m_public.e_public; + export import im_public_f_public = m_public.f_public; + export import im_public_v_public = m_public.v_public; + export import im_public_i_public = m_public.i_public; + export import im_public_mi_public = m_public.mi_public; + export import im_public_mu_public = m_public.mu_public; + + // Usage of above decls + var privateUse_im_public_c_public = new im_public_c_public(); + export var publicUse_im_public_c_public = new im_public_c_public(); + var privateUse_im_public_e_public = im_public_e_public.Happy; + export var publicUse_im_public_e_public = im_public_e_public.Grumpy; + var privateUse_im_public_f_public = im_public_f_public(); + export var publicUse_im_public_f_public = im_public_f_public(); + var privateUse_im_public_v_public = im_public_v_public; + export var publicUse_im_public_v_public = im_public_v_public; + var privateUse_im_public_i_public: im_public_i_public; + export var publicUse_im_public_i_public: im_public_i_public; + var privateUse_im_public_mi_public = new im_public_mi_public.c(); + export var publicUse_im_public_mi_public = new im_public_mi_public.c(); + var privateUse_im_public_mu_public: im_public_mu_public.i; + export var publicUse_im_public_mu_public: im_public_mu_public.i; + \ No newline at end of file diff --git a/tests/baselines/reference/privacyTopLevelInternalReferenceImportWithoutExport.errors.txt b/tests/baselines/reference/privacyTopLevelInternalReferenceImportWithoutExport.errors.txt new file mode 100644 index 0000000000000..33203202ec2ec --- /dev/null +++ b/tests/baselines/reference/privacyTopLevelInternalReferenceImportWithoutExport.errors.txt @@ -0,0 +1,115 @@ +error TS-1: Pre-emit (0) and post-emit (10) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! + + +!!! error TS-1: Pre-emit (0) and post-emit (10) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +!!! related TS-1: The excess diagnostics are: +!!! related TS2724 tests/cases/compiler/privacyTopLevelInternalReferenceImportWithoutExport.ts:50:41: 'm_private' has no exported member named 'c_private'. Did you mean 'f_private'? +!!! related TS2724 tests/cases/compiler/privacyTopLevelInternalReferenceImportWithoutExport.ts:51:41: 'm_private' has no exported member named 'e_private'. Did you mean 'f_private'? +!!! related TS2724 tests/cases/compiler/privacyTopLevelInternalReferenceImportWithoutExport.ts:52:41: 'm_private' has no exported member named 'f_private'. Did you mean 'c_private'? +!!! related TS2724 tests/cases/compiler/privacyTopLevelInternalReferenceImportWithoutExport.ts:53:41: 'm_private' has no exported member named 'v_private'. Did you mean 'f_private'? +!!! related TS2724 tests/cases/compiler/privacyTopLevelInternalReferenceImportWithoutExport.ts:55:42: 'm_private' has no exported member named 'mi_private'. Did you mean 'i_private'? +!!! related TS2724 tests/cases/compiler/privacyTopLevelInternalReferenceImportWithoutExport.ts:76:39: '"tests/cases/compiler/privacyTopLevelInternalReferenceImportWithoutExport".m_public' has no exported member named 'c_public'. Did you mean 'f_public'? +!!! related TS2724 tests/cases/compiler/privacyTopLevelInternalReferenceImportWithoutExport.ts:77:39: '"tests/cases/compiler/privacyTopLevelInternalReferenceImportWithoutExport".m_public' has no exported member named 'e_public'. Did you mean 'f_public'? +!!! related TS2724 tests/cases/compiler/privacyTopLevelInternalReferenceImportWithoutExport.ts:78:39: '"tests/cases/compiler/privacyTopLevelInternalReferenceImportWithoutExport".m_public' has no exported member named 'f_public'. Did you mean 'c_public'? +!!! related TS2724 tests/cases/compiler/privacyTopLevelInternalReferenceImportWithoutExport.ts:79:39: '"tests/cases/compiler/privacyTopLevelInternalReferenceImportWithoutExport".m_public' has no exported member named 'v_public'. Did you mean 'f_public'? +!!! related TS2724 tests/cases/compiler/privacyTopLevelInternalReferenceImportWithoutExport.ts:81:40: '"tests/cases/compiler/privacyTopLevelInternalReferenceImportWithoutExport".m_public' has no exported member named 'mi_public'. Did you mean 'i_public'? +==== tests/cases/compiler/privacyTopLevelInternalReferenceImportWithoutExport.ts (0 errors) ==== + // private elements + module m_private { + export class c_private { + } + export enum e_private { + Happy, + Grumpy + } + export function f_private() { + return new c_private(); + } + export var v_private = new c_private(); + export interface i_private { + } + export module mi_private { + export class c { + } + } + export module mu_private { + export interface i { + } + } + } + + // Public elements + export module m_public { + export class c_public { + } + export enum e_public { + Happy, + Grumpy + } + export function f_public() { + return new c_public(); + } + export var v_public = 10; + export interface i_public { + } + export module mi_public { + export class c { + } + } + export module mu_public { + export interface i { + } + } + } + + // No Privacy errors - importing private elements + import im_private_c_private = m_private.c_private; + import im_private_e_private = m_private.e_private; + import im_private_f_private = m_private.f_private; + import im_private_v_private = m_private.v_private; + import im_private_i_private = m_private.i_private; + import im_private_mi_private = m_private.mi_private; + import im_private_mu_private = m_private.mu_private; + + // Usage of above decls + var privateUse_im_private_c_private = new im_private_c_private(); + export var publicUse_im_private_c_private = new im_private_c_private(); + var privateUse_im_private_e_private = im_private_e_private.Happy; + export var publicUse_im_private_e_private = im_private_e_private.Grumpy; + var privateUse_im_private_f_private = im_private_f_private(); + export var publicUse_im_private_f_private = im_private_f_private(); + var privateUse_im_private_v_private = im_private_v_private; + export var publicUse_im_private_v_private = im_private_v_private; + var privateUse_im_private_i_private: im_private_i_private; + export var publicUse_im_private_i_private: im_private_i_private; + var privateUse_im_private_mi_private = new im_private_mi_private.c(); + export var publicUse_im_private_mi_private = new im_private_mi_private.c(); + var privateUse_im_private_mu_private: im_private_mu_private.i; + export var publicUse_im_private_mu_private: im_private_mu_private.i; + + + // No Privacy errors - importing public elements + import im_private_c_public = m_public.c_public; + import im_private_e_public = m_public.e_public; + import im_private_f_public = m_public.f_public; + import im_private_v_public = m_public.v_public; + import im_private_i_public = m_public.i_public; + import im_private_mi_public = m_public.mi_public; + import im_private_mu_public = m_public.mu_public; + + // Usage of above decls + var privateUse_im_private_c_public = new im_private_c_public(); + export var publicUse_im_private_c_public = new im_private_c_public(); + var privateUse_im_private_e_public = im_private_e_public.Happy; + export var publicUse_im_private_e_public = im_private_e_public.Grumpy; + var privateUse_im_private_f_public = im_private_f_public(); + export var publicUse_im_private_f_public = im_private_f_public(); + var privateUse_im_private_v_public = im_private_v_public; + export var publicUse_im_private_v_public = im_private_v_public; + var privateUse_im_private_i_public: im_private_i_public; + export var publicUse_im_private_i_public: im_private_i_public; + var privateUse_im_private_mi_public = new im_private_mi_public.c(); + export var publicUse_im_private_mi_public = new im_private_mi_public.c(); + var privateUse_im_private_mu_public: im_private_mu_public.i; + export var publicUse_im_private_mu_public: im_private_mu_public.i; + \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationImport.errors.txt b/tests/baselines/reference/sourceMapValidationImport.errors.txt new file mode 100644 index 0000000000000..89e1f9b62d29e --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationImport.errors.txt @@ -0,0 +1,16 @@ +error TS-1: Pre-emit (0) and post-emit (2) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! + + +!!! error TS-1: Pre-emit (0) and post-emit (2) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +!!! related TS-1: The excess diagnostics are: +!!! related TS2749 tests/cases/compiler/sourceMapValidationImport.ts:5:12: 'm.c' refers to a value, but is being used as a type here. Did you mean 'typeof m.c'? +!!! related TS2749 tests/cases/compiler/sourceMapValidationImport.ts:6:19: 'm.c' refers to a value, but is being used as a type here. Did you mean 'typeof m.c'? +==== tests/cases/compiler/sourceMapValidationImport.ts (0 errors) ==== + export module m { + export class c { + } + } + import a = m.c; + export import b = m.c; + var x = new a(); + var y = new b(); \ No newline at end of file diff --git a/tests/baselines/reference/systemModule17.errors.txt b/tests/baselines/reference/systemModule17.errors.txt new file mode 100644 index 0000000000000..32473867de7c9 --- /dev/null +++ b/tests/baselines/reference/systemModule17.errors.txt @@ -0,0 +1,43 @@ +error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! + + +!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +!!! related TS-1: The excess diagnostics are: +!!! related TS2749 tests/cases/compiler/f2.ts:9:13: 'N.x' refers to a value, but is being used as a type here. Did you mean 'typeof N.x'? +==== tests/cases/compiler/f1.ts (0 errors) ==== + export class A {} + export interface I {} + +==== tests/cases/compiler/f2.ts (0 errors) ==== + var x = 1; + interface I { } + + namespace N { + export var x = 1; + export interface I { } + } + + import IX = N.x; + import II = N.I; + import { A, A as EA, I as EI } from "f1"; + + export {x}; + export {x as x1}; + + export {I}; + export {I as I1}; + + export {A}; + export {A as A1}; + + export {EA}; + export {EA as EA1}; + + export {EI }; + export {EI as EI1}; + + export {IX}; + export {IX as IX1}; + + export {II}; + export {II as II1}; \ No newline at end of file diff --git a/tests/baselines/reference/topLevelAwait.2(module=es2022).errors.txt b/tests/baselines/reference/topLevelAwait.2(module=es2022).errors.txt new file mode 100644 index 0000000000000..c20c80ef8e29c --- /dev/null +++ b/tests/baselines/reference/topLevelAwait.2(module=es2022).errors.txt @@ -0,0 +1,12 @@ +error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! + + +!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +!!! related TS-1: The excess diagnostics are: +!!! related TS2749 tests/cases/conformance/externalModules/topLevelAwait.2.ts:4:16: 'foo.await' refers to a value, but is being used as a type here. Did you mean 'typeof foo.await'? +==== tests/cases/conformance/externalModules/topLevelAwait.2.ts (0 errors) ==== + declare namespace foo { const await: any; } + + // await allowed in import=namespace when not a module + import await = foo.await; + \ No newline at end of file diff --git a/tests/baselines/reference/topLevelAwait.2(module=esnext).errors.txt b/tests/baselines/reference/topLevelAwait.2(module=esnext).errors.txt new file mode 100644 index 0000000000000..c20c80ef8e29c --- /dev/null +++ b/tests/baselines/reference/topLevelAwait.2(module=esnext).errors.txt @@ -0,0 +1,12 @@ +error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! + + +!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +!!! related TS-1: The excess diagnostics are: +!!! related TS2749 tests/cases/conformance/externalModules/topLevelAwait.2.ts:4:16: 'foo.await' refers to a value, but is being used as a type here. Did you mean 'typeof foo.await'? +==== tests/cases/conformance/externalModules/topLevelAwait.2.ts (0 errors) ==== + declare namespace foo { const await: any; } + + // await allowed in import=namespace when not a module + import await = foo.await; + \ No newline at end of file diff --git a/tests/baselines/reference/tsxPreserveEmit1.errors.txt b/tests/baselines/reference/tsxPreserveEmit1.errors.txt new file mode 100644 index 0000000000000..f9f9cb6b3bd61 --- /dev/null +++ b/tests/baselines/reference/tsxPreserveEmit1.errors.txt @@ -0,0 +1,37 @@ +error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! + + +!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +!!! related TS-1: The excess diagnostics are: +!!! related TS2749 tests/cases/conformance/jsx/test.tsx:5:16: 'ReactRouter.Route' refers to a value, but is being used as a type here. Did you mean 'typeof ReactRouter.Route'? +==== tests/cases/conformance/jsx/test.tsx (0 errors) ==== + // Should emit 'react-router' in the AMD dependency list + import React = require('react'); + import ReactRouter = require('react-router'); + + import Route = ReactRouter.Route; + + var routes1 = ; + + module M { + export var X: any; + } + module M { + // Should emit 'M.X' in both opening and closing tags + var y = ; + } + +==== tests/cases/conformance/jsx/react.d.ts (0 errors) ==== + declare module 'react' { + var x: any; + export = x; + } + + declare module ReactRouter { + var Route: any; + interface Thing { } + } + declare module 'react-router' { + export = ReactRouter; + } + \ No newline at end of file diff --git a/tests/baselines/reference/tsxPreserveEmit1.types b/tests/baselines/reference/tsxPreserveEmit1.types index f4497ecb5051c..812f1a4b8dc95 100644 --- a/tests/baselines/reference/tsxPreserveEmit1.types +++ b/tests/baselines/reference/tsxPreserveEmit1.types @@ -12,8 +12,8 @@ import Route = ReactRouter.Route; >Route : any var routes1 = ; ->routes1 : error -> : error +>routes1 : any +> : any >Route : any module M { @@ -27,8 +27,8 @@ module M { // Should emit 'M.X' in both opening and closing tags var y = ; ->y : error -> : error +>y : any +> : any >X : any >X : any } diff --git a/tests/baselines/reference/typeofInternalModules.errors.txt b/tests/baselines/reference/typeofInternalModules.errors.txt index 8ba8cc720ca12..5b1d3649b2bab 100644 --- a/tests/baselines/reference/typeofInternalModules.errors.txt +++ b/tests/baselines/reference/typeofInternalModules.errors.txt @@ -1,3 +1,4 @@ +error TS-1: Pre-emit (5) and post-emit (6) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! tests/cases/compiler/typeofInternalModules.ts(15,16): error TS2708: Cannot use namespace 'importUninst' as a value. tests/cases/compiler/typeofInternalModules.ts(17,9): error TS2709: Cannot use namespace 'Outer' as a type. tests/cases/compiler/typeofInternalModules.ts(19,1): error TS2741: Property 'C' is missing in type 'typeof Outer' but required in type 'typeof instantiated'. @@ -5,6 +6,9 @@ tests/cases/compiler/typeofInternalModules.ts(21,16): error TS2708: Cannot use n tests/cases/compiler/typeofInternalModules.ts(23,1): error TS2741: Property 'instantiated' is missing in type 'typeof instantiated' but required in type 'typeof Outer'. +!!! error TS-1: Pre-emit (5) and post-emit (6) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +!!! related TS-1: The excess diagnostics are: +!!! related TS2724 tests/cases/compiler/typeofInternalModules.ts:10:27: 'Outer' has no exported member named 'instantiated'. Did you mean 'uninstantiated'? ==== tests/cases/compiler/typeofInternalModules.ts (5 errors) ==== module Outer { export module instantiated { diff --git a/tests/baselines/reference/varNameConflictsWithImportInDifferentPartOfModule.errors.txt b/tests/baselines/reference/varNameConflictsWithImportInDifferentPartOfModule.errors.txt index 1ca223783bf07..0f57e3b586036 100644 --- a/tests/baselines/reference/varNameConflictsWithImportInDifferentPartOfModule.errors.txt +++ b/tests/baselines/reference/varNameConflictsWithImportInDifferentPartOfModule.errors.txt @@ -1,6 +1,10 @@ +error TS-1: Pre-emit (1) and post-emit (2) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! tests/cases/compiler/varNameConflictsWithImportInDifferentPartOfModule.ts(6,5): error TS2440: Import declaration conflicts with local declaration of 'q'. +!!! error TS-1: Pre-emit (1) and post-emit (2) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +!!! related TS-1: The excess diagnostics are: +!!! related TS2749 tests/cases/compiler/varNameConflictsWithImportInDifferentPartOfModule.ts:6:23: 'M1.s' refers to a value, but is being used as a type here. Did you mean 'typeof M1.s'? ==== tests/cases/compiler/varNameConflictsWithImportInDifferentPartOfModule.ts (1 errors) ==== module M1 { export var q = 5; From 5917c776ffd4455d0802fb27e24fedf17f098516 Mon Sep 17 00:00:00 2001 From: Jack Bates Date: Wed, 3 Nov 2021 12:24:45 -0700 Subject: [PATCH 3/6] Ignore errors --- src/compiler/checker.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 086b2f289863b..488f21db8c038 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -41621,7 +41621,7 @@ namespace ts { } const symbol = isEntityName(node) - ? resolveEntityName(node, SymbolFlags.EnumMember) + ? resolveEntityName(node, SymbolFlags.EnumMember, /*ignoreErrors*/ true) : getNodeLinks(node).resolvedSymbol; if (symbol && (symbol.flags & SymbolFlags.EnumMember)) { // inline property\index accesses only for const enums From e38d89e6cc0fa6fd107885439dc765d12a259502 Mon Sep 17 00:00:00 2001 From: Jack Bates Date: Wed, 3 Nov 2021 12:24:54 -0700 Subject: [PATCH 4/6] Change getTextOfNode() -> getPropertyNameForPropertyNameNode() --- src/compiler/transformers/ts.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/compiler/transformers/ts.ts b/src/compiler/transformers/ts.ts index 711a3b11f5861..4095c3bfccbde 100644 --- a/src/compiler/transformers/ts.ts +++ b/src/compiler/transformers/ts.ts @@ -3342,9 +3342,9 @@ namespace ts { const substitute = typeof constantValue === "string" ? factory.createStringLiteral(constantValue) : factory.createNumericLiteral(constantValue); if (!compilerOptions.removeComments) { - const propertyName = isPropertyAccessExpression(node) - ? declarationNameToString(node.name) - : getTextOfNode(node.argumentExpression); + const propertyName = getPropertyNameForPropertyNameNode( + isPropertyAccessExpression(node) ? node.name : (node.argumentExpression as PropertyName) + ); addSyntheticTrailingComment(substitute, SyntaxKind.MultiLineCommentTrivia, ` ${propertyName} `); } From 23b3596c4e0ce2797437e009a020db96b4ff8067 Mon Sep 17 00:00:00 2001 From: TypeScript Bot Date: Wed, 3 Nov 2021 20:08:05 +0000 Subject: [PATCH 5/6] Update Baselines and/or Applied Lint Fixes --- tests/baselines/reference/aliasBug.errors.txt | 4 - .../reference/aliasErrors.errors.txt | 5 - .../asyncQualifiedReturnType_es5.errors.txt | 14 - ...lassAbstractImportInstantiation.errors.txt | 4 - ...tsRequireAndInternalModuleAlias.errors.txt | 9 - ...InternalModuleAliasInGlobalFile.errors.txt | 34 - .../reference/constEnumPropertyAccess1.js | 2 +- .../constEnumSyntheticNodesComments.js | 36 ++ .../constEnumSyntheticNodesComments.symbols | 60 ++ .../constEnumSyntheticNodesComments.types | 64 ++ .../constEnumToStringWithComments.js | 12 +- tests/baselines/reference/constEnums.js | 228 +++++++ tests/baselines/reference/constEnums.symbols | 548 ++++++++++++++++ tests/baselines/reference/constEnums.types | 593 ++++++++++++++++++ .../baselines/reference/constIndexedAccess.js | 4 +- ...leImportChainInExportAssignment.errors.txt | 16 - .../declFileInternalAliases.errors.txt | 20 - .../declarationEmitNameConflicts.errors.txt | 56 -- .../reference/declareDottedExtend.errors.txt | 18 - .../dependencyViaImportAlias.errors.txt | 15 - ...rForUsingPropertyOfTypeAsType01.errors.txt | 4 - .../es6ModuleInternalImport.errors.txt | 31 - .../exportDefaultProperty.errors.txt | 46 -- .../reference/exportImportAlias.errors.txt | 76 --- .../exportImportAndClodule.errors.txt | 26 - .../exportsAndImports1-amd.errors.txt | 38 -- .../exportsAndImports1-es6.errors.txt | 38 -- .../reference/exportsAndImports1.errors.txt | 38 -- .../exportsAndImports3-amd.errors.txt | 38 -- .../exportsAndImports3-es6.errors.txt | 38 -- .../reference/exportsAndImports3.errors.txt | 38 -- .../importAliasFromNamespace.errors.txt | 26 - .../importAliasWithDottedName.errors.txt | 19 - ...AndVariableDeclarationConflict1.errors.txt | 4 - ...AndVariableDeclarationConflict2.errors.txt | 18 - ...AndVariableDeclarationConflict3.errors.txt | 5 - ...AndVariableDeclarationConflict4.errors.txt | 4 - .../reference/importEquals3.errors.txt | 4 - .../importOnAliasedIdentifiers.errors.txt | 17 - ...import_reference-exported-alias.errors.txt | 27 - .../import_reference-to-type-alias.errors.txt | 22 - .../reference/innerAliases.errors.txt | 4 - .../reference/internalAliasClass.errors.txt | 16 - ...lassInsideLocalModuleWithExport.errors.txt | 24 - ...sInsideLocalModuleWithoutExport.errors.txt | 22 - ...lModuleWithoutExportAccessError.errors.txt | 4 - ...sInsideTopLevelModuleWithExport.errors.txt | 18 - ...sideTopLevelModuleWithoutExport.errors.txt | 18 - .../reference/internalAliasEnum.errors.txt | 20 - ...EnumInsideLocalModuleWithExport.errors.txt | 20 - ...mInsideLocalModuleWithoutExport.errors.txt | 20 - ...lModuleWithoutExportAccessError.errors.txt | 4 - ...mInsideTopLevelModuleWithExport.errors.txt | 18 - ...sideTopLevelModuleWithoutExport.errors.txt | 18 - .../internalAliasFunction.errors.txt | 19 - ...tionInsideLocalModuleWithExport.errors.txt | 19 - ...nInsideLocalModuleWithoutExport.errors.txt | 19 - ...lModuleWithoutExportAccessError.errors.txt | 4 - ...nInsideTopLevelModuleWithExport.errors.txt | 17 - ...sideTopLevelModuleWithoutExport.errors.txt | 17 - .../internalAliasInitializedModule.errors.txt | 18 - ...duleInsideLocalModuleWithExport.errors.txt | 18 - ...eInsideLocalModuleWithoutExport.errors.txt | 18 - ...lModuleWithoutExportAccessError.errors.txt | 4 - ...eInsideTopLevelModuleWithExport.errors.txt | 16 - ...sideTopLevelModuleWithoutExport.errors.txt | 16 - .../reference/internalAliasVar.errors.txt | 16 - ...sVarInsideLocalModuleWithExport.errors.txt | 16 - ...rInsideLocalModuleWithoutExport.errors.txt | 16 - ...lModuleWithoutExportAccessError.errors.txt | 4 - ...rInsideTopLevelModuleWithExport.errors.txt | 15 - ...sideTopLevelModuleWithoutExport.errors.txt | 15 - .../localImportNameVsGlobalName.errors.txt | 20 - .../reference/moduleImport.errors.txt | 4 - ...meWithImportDeclarationInsideIt.errors.txt | 18 - ...eWithImportDeclarationInsideIt2.errors.txt | 18 - ...eWithImportDeclarationInsideIt3.errors.txt | 4 - ...eWithImportDeclarationInsideIt4.errors.txt | 19 - .../moduleVisibilityTest1.errors.txt | 72 --- .../moduleVisibilityTest2.errors.txt | 4 - ...ternalReferenceImportWithExport.errors.txt | 178 ------ ...nalReferenceImportWithoutExport.errors.txt | 178 ------ ...ternalReferenceImportWithExport.errors.txt | 115 ---- ...nalReferenceImportWithoutExport.errors.txt | 115 ---- .../sourceMapValidationImport.errors.txt | 16 - .../reference/systemModule17.errors.txt | 43 -- .../topLevelAwait.2(module=es2022).errors.txt | 12 - .../topLevelAwait.2(module=esnext).errors.txt | 12 - .../reference/tsxPreserveEmit1.errors.txt | 37 -- .../reference/tsxPreserveEmit1.types | 8 +- .../typeofInternalModules.errors.txt | 4 - ...thImportInDifferentPartOfModule.errors.txt | 4 - 92 files changed, 1542 insertions(+), 2111 deletions(-) delete mode 100644 tests/baselines/reference/asyncQualifiedReturnType_es5.errors.txt delete mode 100644 tests/baselines/reference/collisionExportsRequireAndInternalModuleAliasInGlobalFile.errors.txt create mode 100644 tests/baselines/reference/constEnumSyntheticNodesComments.js create mode 100644 tests/baselines/reference/constEnumSyntheticNodesComments.symbols create mode 100644 tests/baselines/reference/constEnumSyntheticNodesComments.types create mode 100644 tests/baselines/reference/constEnums.js create mode 100644 tests/baselines/reference/constEnums.symbols create mode 100644 tests/baselines/reference/constEnums.types delete mode 100644 tests/baselines/reference/declFileImportChainInExportAssignment.errors.txt delete mode 100644 tests/baselines/reference/declFileInternalAliases.errors.txt delete mode 100644 tests/baselines/reference/declarationEmitNameConflicts.errors.txt delete mode 100644 tests/baselines/reference/declareDottedExtend.errors.txt delete mode 100644 tests/baselines/reference/dependencyViaImportAlias.errors.txt delete mode 100644 tests/baselines/reference/es6ModuleInternalImport.errors.txt delete mode 100644 tests/baselines/reference/exportDefaultProperty.errors.txt delete mode 100644 tests/baselines/reference/exportImportAlias.errors.txt delete mode 100644 tests/baselines/reference/exportImportAndClodule.errors.txt delete mode 100644 tests/baselines/reference/exportsAndImports1-amd.errors.txt delete mode 100644 tests/baselines/reference/exportsAndImports1-es6.errors.txt delete mode 100644 tests/baselines/reference/exportsAndImports1.errors.txt delete mode 100644 tests/baselines/reference/exportsAndImports3-amd.errors.txt delete mode 100644 tests/baselines/reference/exportsAndImports3-es6.errors.txt delete mode 100644 tests/baselines/reference/exportsAndImports3.errors.txt delete mode 100644 tests/baselines/reference/importAliasFromNamespace.errors.txt delete mode 100644 tests/baselines/reference/importAliasWithDottedName.errors.txt delete mode 100644 tests/baselines/reference/importAndVariableDeclarationConflict2.errors.txt delete mode 100644 tests/baselines/reference/importOnAliasedIdentifiers.errors.txt delete mode 100644 tests/baselines/reference/import_reference-exported-alias.errors.txt delete mode 100644 tests/baselines/reference/import_reference-to-type-alias.errors.txt delete mode 100644 tests/baselines/reference/internalAliasClass.errors.txt delete mode 100644 tests/baselines/reference/internalAliasClassInsideLocalModuleWithExport.errors.txt delete mode 100644 tests/baselines/reference/internalAliasClassInsideLocalModuleWithoutExport.errors.txt delete mode 100644 tests/baselines/reference/internalAliasClassInsideTopLevelModuleWithExport.errors.txt delete mode 100644 tests/baselines/reference/internalAliasClassInsideTopLevelModuleWithoutExport.errors.txt delete mode 100644 tests/baselines/reference/internalAliasEnum.errors.txt delete mode 100644 tests/baselines/reference/internalAliasEnumInsideLocalModuleWithExport.errors.txt delete mode 100644 tests/baselines/reference/internalAliasEnumInsideLocalModuleWithoutExport.errors.txt delete mode 100644 tests/baselines/reference/internalAliasEnumInsideTopLevelModuleWithExport.errors.txt delete mode 100644 tests/baselines/reference/internalAliasEnumInsideTopLevelModuleWithoutExport.errors.txt delete mode 100644 tests/baselines/reference/internalAliasFunction.errors.txt delete mode 100644 tests/baselines/reference/internalAliasFunctionInsideLocalModuleWithExport.errors.txt delete mode 100644 tests/baselines/reference/internalAliasFunctionInsideLocalModuleWithoutExport.errors.txt delete mode 100644 tests/baselines/reference/internalAliasFunctionInsideTopLevelModuleWithExport.errors.txt delete mode 100644 tests/baselines/reference/internalAliasFunctionInsideTopLevelModuleWithoutExport.errors.txt delete mode 100644 tests/baselines/reference/internalAliasInitializedModule.errors.txt delete mode 100644 tests/baselines/reference/internalAliasInitializedModuleInsideLocalModuleWithExport.errors.txt delete mode 100644 tests/baselines/reference/internalAliasInitializedModuleInsideLocalModuleWithoutExport.errors.txt delete mode 100644 tests/baselines/reference/internalAliasInitializedModuleInsideTopLevelModuleWithExport.errors.txt delete mode 100644 tests/baselines/reference/internalAliasInitializedModuleInsideTopLevelModuleWithoutExport.errors.txt delete mode 100644 tests/baselines/reference/internalAliasVar.errors.txt delete mode 100644 tests/baselines/reference/internalAliasVarInsideLocalModuleWithExport.errors.txt delete mode 100644 tests/baselines/reference/internalAliasVarInsideLocalModuleWithoutExport.errors.txt delete mode 100644 tests/baselines/reference/internalAliasVarInsideTopLevelModuleWithExport.errors.txt delete mode 100644 tests/baselines/reference/internalAliasVarInsideTopLevelModuleWithoutExport.errors.txt delete mode 100644 tests/baselines/reference/localImportNameVsGlobalName.errors.txt delete mode 100644 tests/baselines/reference/moduleSharesNameWithImportDeclarationInsideIt.errors.txt delete mode 100644 tests/baselines/reference/moduleSharesNameWithImportDeclarationInsideIt2.errors.txt delete mode 100644 tests/baselines/reference/moduleSharesNameWithImportDeclarationInsideIt4.errors.txt delete mode 100644 tests/baselines/reference/moduleVisibilityTest1.errors.txt delete mode 100644 tests/baselines/reference/privacyLocalInternalReferenceImportWithExport.errors.txt delete mode 100644 tests/baselines/reference/privacyLocalInternalReferenceImportWithoutExport.errors.txt delete mode 100644 tests/baselines/reference/privacyTopLevelInternalReferenceImportWithExport.errors.txt delete mode 100644 tests/baselines/reference/privacyTopLevelInternalReferenceImportWithoutExport.errors.txt delete mode 100644 tests/baselines/reference/sourceMapValidationImport.errors.txt delete mode 100644 tests/baselines/reference/systemModule17.errors.txt delete mode 100644 tests/baselines/reference/topLevelAwait.2(module=es2022).errors.txt delete mode 100644 tests/baselines/reference/topLevelAwait.2(module=esnext).errors.txt delete mode 100644 tests/baselines/reference/tsxPreserveEmit1.errors.txt diff --git a/tests/baselines/reference/aliasBug.errors.txt b/tests/baselines/reference/aliasBug.errors.txt index 933d2116e8757..70f6409ef21f4 100644 --- a/tests/baselines/reference/aliasBug.errors.txt +++ b/tests/baselines/reference/aliasBug.errors.txt @@ -1,10 +1,6 @@ -error TS-1: Pre-emit (1) and post-emit (2) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! tests/cases/compiler/aliasBug.ts(16,15): error TS2694: Namespace 'foo.bar.baz' has no exported member 'bar'. -!!! error TS-1: Pre-emit (1) and post-emit (2) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! -!!! related TS-1: The excess diagnostics are: -!!! related TS2749 tests/cases/compiler/aliasBug.ts:9:15: 'foo.bar.baz' refers to a value, but is being used as a type here. Did you mean 'typeof foo.bar.baz'? ==== tests/cases/compiler/aliasBug.ts (1 errors) ==== module foo { export class Provide { diff --git a/tests/baselines/reference/aliasErrors.errors.txt b/tests/baselines/reference/aliasErrors.errors.txt index d7d17d6ee2251..bb257f5337c9a 100644 --- a/tests/baselines/reference/aliasErrors.errors.txt +++ b/tests/baselines/reference/aliasErrors.errors.txt @@ -1,4 +1,3 @@ -error TS-1: Pre-emit (7) and post-emit (9) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! tests/cases/compiler/aliasErrors.ts(11,12): error TS2503: Cannot find namespace 'no'. tests/cases/compiler/aliasErrors.ts(12,13): error TS2503: Cannot find namespace 'no'. tests/cases/compiler/aliasErrors.ts(13,12): error TS1003: Identifier expected. @@ -8,10 +7,6 @@ tests/cases/compiler/aliasErrors.ts(16,12): error TS2503: Cannot find namespace tests/cases/compiler/aliasErrors.ts(26,15): error TS2694: Namespace 'foo.bar.baz' has no exported member 'bar'. -!!! error TS-1: Pre-emit (7) and post-emit (9) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! -!!! related TS-1: The excess diagnostics are: -!!! related TS2749 tests/cases/compiler/aliasErrors.ts:8:15: 'foo.bar.baz' refers to a value, but is being used as a type here. Did you mean 'typeof foo.bar.baz'? -!!! related TS2749 tests/cases/compiler/aliasErrors.ts:9:15: 'foo.bar' refers to a value, but is being used as a type here. Did you mean 'typeof foo.bar'? ==== tests/cases/compiler/aliasErrors.ts (7 errors) ==== module foo { export class Provide { diff --git a/tests/baselines/reference/asyncQualifiedReturnType_es5.errors.txt b/tests/baselines/reference/asyncQualifiedReturnType_es5.errors.txt deleted file mode 100644 index 4757c3b43773f..0000000000000 --- a/tests/baselines/reference/asyncQualifiedReturnType_es5.errors.txt +++ /dev/null @@ -1,14 +0,0 @@ -error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! - - -!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! -!!! related TS-1: The excess diagnostics are: -!!! related TS2749 tests/cases/conformance/async/es5/asyncQualifiedReturnType_es5.ts:6:21: 'X.MyPromise' refers to a value, but is being used as a type here. Did you mean 'typeof X.MyPromise'? -==== tests/cases/conformance/async/es5/asyncQualifiedReturnType_es5.ts (0 errors) ==== - namespace X { - export class MyPromise extends Promise { - } - } - - async function f(): X.MyPromise { - } \ No newline at end of file diff --git a/tests/baselines/reference/classAbstractImportInstantiation.errors.txt b/tests/baselines/reference/classAbstractImportInstantiation.errors.txt index b11e60abda9d8..a01c75b6daedb 100644 --- a/tests/baselines/reference/classAbstractImportInstantiation.errors.txt +++ b/tests/baselines/reference/classAbstractImportInstantiation.errors.txt @@ -1,11 +1,7 @@ -error TS-1: Pre-emit (2) and post-emit (3) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractImportInstantiation.ts(4,5): error TS2511: Cannot create an instance of an abstract class. tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractImportInstantiation.ts(9,1): error TS2511: Cannot create an instance of an abstract class. -!!! error TS-1: Pre-emit (2) and post-emit (3) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! -!!! related TS-1: The excess diagnostics are: -!!! related TS2749 tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractImportInstantiation.ts:7:14: 'M.A' refers to a value, but is being used as a type here. Did you mean 'typeof M.A'? ==== tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractImportInstantiation.ts (2 errors) ==== module M { export abstract class A {} diff --git a/tests/baselines/reference/collisionExportsRequireAndInternalModuleAlias.errors.txt b/tests/baselines/reference/collisionExportsRequireAndInternalModuleAlias.errors.txt index 73ce7dabac13b..569fad94f68d1 100644 --- a/tests/baselines/reference/collisionExportsRequireAndInternalModuleAlias.errors.txt +++ b/tests/baselines/reference/collisionExportsRequireAndInternalModuleAlias.errors.txt @@ -1,16 +1,7 @@ -error TS-1: Pre-emit (2) and post-emit (8) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! tests/cases/compiler/collisionExportsRequireAndInternalModuleAlias.ts(5,8): error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of a module. tests/cases/compiler/collisionExportsRequireAndInternalModuleAlias.ts(6,8): error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of a module. -!!! error TS-1: Pre-emit (2) and post-emit (8) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! -!!! related TS-1: The excess diagnostics are: -!!! related TS2749 tests/cases/compiler/collisionExportsRequireAndInternalModuleAlias.ts:5:18: 'm.c' refers to a value, but is being used as a type here. Did you mean 'typeof m.c'? -!!! related TS2749 tests/cases/compiler/collisionExportsRequireAndInternalModuleAlias.ts:6:18: 'm.c' refers to a value, but is being used as a type here. Did you mean 'typeof m.c'? -!!! related TS2749 tests/cases/compiler/collisionExportsRequireAndInternalModuleAlias.ts:11:22: 'm.c' refers to a value, but is being used as a type here. Did you mean 'typeof m.c'? -!!! related TS2749 tests/cases/compiler/collisionExportsRequireAndInternalModuleAlias.ts:12:22: 'm.c' refers to a value, but is being used as a type here. Did you mean 'typeof m.c'? -!!! related TS2749 tests/cases/compiler/collisionExportsRequireAndInternalModuleAlias.ts:18:29: 'm.c' refers to a value, but is being used as a type here. Did you mean 'typeof m.c'? -!!! related TS2749 tests/cases/compiler/collisionExportsRequireAndInternalModuleAlias.ts:19:29: 'm.c' refers to a value, but is being used as a type here. Did you mean 'typeof m.c'? ==== tests/cases/compiler/collisionExportsRequireAndInternalModuleAlias.ts (2 errors) ==== export module m { export class c { diff --git a/tests/baselines/reference/collisionExportsRequireAndInternalModuleAliasInGlobalFile.errors.txt b/tests/baselines/reference/collisionExportsRequireAndInternalModuleAliasInGlobalFile.errors.txt deleted file mode 100644 index 38a1cfd8fe2bf..0000000000000 --- a/tests/baselines/reference/collisionExportsRequireAndInternalModuleAliasInGlobalFile.errors.txt +++ /dev/null @@ -1,34 +0,0 @@ -error TS-1: Pre-emit (0) and post-emit (6) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! - - -!!! error TS-1: Pre-emit (0) and post-emit (6) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! -!!! related TS-1: The excess diagnostics are: -!!! related TS2749 tests/cases/compiler/collisionExportsRequireAndInternalModuleAliasInGlobalFile.ts:5:18: 'mOfGloalFile.c' refers to a value, but is being used as a type here. Did you mean 'typeof mOfGloalFile.c'? -!!! related TS2749 tests/cases/compiler/collisionExportsRequireAndInternalModuleAliasInGlobalFile.ts:6:18: 'mOfGloalFile.c' refers to a value, but is being used as a type here. Did you mean 'typeof mOfGloalFile.c'? -!!! related TS2749 tests/cases/compiler/collisionExportsRequireAndInternalModuleAliasInGlobalFile.ts:11:22: 'mOfGloalFile.c' refers to a value, but is being used as a type here. Did you mean 'typeof mOfGloalFile.c'? -!!! related TS2749 tests/cases/compiler/collisionExportsRequireAndInternalModuleAliasInGlobalFile.ts:12:22: 'mOfGloalFile.c' refers to a value, but is being used as a type here. Did you mean 'typeof mOfGloalFile.c'? -!!! related TS2749 tests/cases/compiler/collisionExportsRequireAndInternalModuleAliasInGlobalFile.ts:18:29: 'mOfGloalFile.c' refers to a value, but is being used as a type here. Did you mean 'typeof mOfGloalFile.c'? -!!! related TS2749 tests/cases/compiler/collisionExportsRequireAndInternalModuleAliasInGlobalFile.ts:19:29: 'mOfGloalFile.c' refers to a value, but is being used as a type here. Did you mean 'typeof mOfGloalFile.c'? -==== tests/cases/compiler/collisionExportsRequireAndInternalModuleAliasInGlobalFile.ts (0 errors) ==== - module mOfGloalFile { - export class c { - } - } - import exports = mOfGloalFile.c; - import require = mOfGloalFile.c; - new exports(); - new require(); - - module m1 { - import exports = mOfGloalFile.c; - import require = mOfGloalFile.c; - new exports(); - new require(); - } - - module m2 { - export import exports = mOfGloalFile.c; - export import require = mOfGloalFile.c; - new exports(); - new require(); - } \ No newline at end of file diff --git a/tests/baselines/reference/constEnumPropertyAccess1.js b/tests/baselines/reference/constEnumPropertyAccess1.js index db733e44b1de3..c8c06fe8e6687 100644 --- a/tests/baselines/reference/constEnumPropertyAccess1.js +++ b/tests/baselines/reference/constEnumPropertyAccess1.js @@ -38,7 +38,7 @@ var o = { 1: true }; var a = 1 /* A */; -var a1 = 1 /* "A" */; +var a1 = 1 /* A */; var g = o[1 /* A */]; class C { [1 /* A */]() { } diff --git a/tests/baselines/reference/constEnumSyntheticNodesComments.js b/tests/baselines/reference/constEnumSyntheticNodesComments.js new file mode 100644 index 0000000000000..84bead383fd3f --- /dev/null +++ b/tests/baselines/reference/constEnumSyntheticNodesComments.js @@ -0,0 +1,36 @@ +//// [constEnumSyntheticNodesComments.ts] +const enum En { A, B, C, D } + +function assert(x: T) { + return x; +} + +function verify(a: En) { + switch (a) { + case En.A: + return assert<0>(a); + case En["B"]: + return assert<1>(a); + case En[`C`]: + return assert<2>(a); + case En["\u{44}"]: + return assert<3>(a); + } +} + +//// [constEnumSyntheticNodesComments.js] +function assert(x) { + return x; +} +function verify(a) { + switch (a) { + case 0 /* A */: + return assert(a); + case 1 /* B */: + return assert(a); + case 2 /* C */: + return assert(a); + case 3 /* D */: + return assert(a); + } +} diff --git a/tests/baselines/reference/constEnumSyntheticNodesComments.symbols b/tests/baselines/reference/constEnumSyntheticNodesComments.symbols new file mode 100644 index 0000000000000..cfd2e9bf75b9d --- /dev/null +++ b/tests/baselines/reference/constEnumSyntheticNodesComments.symbols @@ -0,0 +1,60 @@ +=== tests/cases/compiler/constEnumSyntheticNodesComments.ts === +const enum En { A, B, C, D } +>En : Symbol(En, Decl(constEnumSyntheticNodesComments.ts, 0, 0)) +>A : Symbol(En.A, Decl(constEnumSyntheticNodesComments.ts, 0, 15)) +>B : Symbol(En.B, Decl(constEnumSyntheticNodesComments.ts, 0, 18)) +>C : Symbol(En.C, Decl(constEnumSyntheticNodesComments.ts, 0, 21)) +>D : Symbol(En.D, Decl(constEnumSyntheticNodesComments.ts, 0, 24)) + +function assert(x: T) { +>assert : Symbol(assert, Decl(constEnumSyntheticNodesComments.ts, 0, 28)) +>T : Symbol(T, Decl(constEnumSyntheticNodesComments.ts, 2, 16)) +>x : Symbol(x, Decl(constEnumSyntheticNodesComments.ts, 2, 19)) +>T : Symbol(T, Decl(constEnumSyntheticNodesComments.ts, 2, 16)) + + return x; +>x : Symbol(x, Decl(constEnumSyntheticNodesComments.ts, 2, 19)) +} + +function verify(a: En) { +>verify : Symbol(verify, Decl(constEnumSyntheticNodesComments.ts, 4, 1)) +>a : Symbol(a, Decl(constEnumSyntheticNodesComments.ts, 6, 16)) +>En : Symbol(En, Decl(constEnumSyntheticNodesComments.ts, 0, 0)) + + switch (a) { +>a : Symbol(a, Decl(constEnumSyntheticNodesComments.ts, 6, 16)) + + case En.A: +>En.A : Symbol(En.A, Decl(constEnumSyntheticNodesComments.ts, 0, 15)) +>En : Symbol(En, Decl(constEnumSyntheticNodesComments.ts, 0, 0)) +>A : Symbol(En.A, Decl(constEnumSyntheticNodesComments.ts, 0, 15)) + + return assert<0>(a); +>assert : Symbol(assert, Decl(constEnumSyntheticNodesComments.ts, 0, 28)) +>a : Symbol(a, Decl(constEnumSyntheticNodesComments.ts, 6, 16)) + + case En["B"]: +>En : Symbol(En, Decl(constEnumSyntheticNodesComments.ts, 0, 0)) +>"B" : Symbol(En.B, Decl(constEnumSyntheticNodesComments.ts, 0, 18)) + + return assert<1>(a); +>assert : Symbol(assert, Decl(constEnumSyntheticNodesComments.ts, 0, 28)) +>a : Symbol(a, Decl(constEnumSyntheticNodesComments.ts, 6, 16)) + + case En[`C`]: +>En : Symbol(En, Decl(constEnumSyntheticNodesComments.ts, 0, 0)) +>`C` : Symbol(En.C, Decl(constEnumSyntheticNodesComments.ts, 0, 21)) + + return assert<2>(a); +>assert : Symbol(assert, Decl(constEnumSyntheticNodesComments.ts, 0, 28)) +>a : Symbol(a, Decl(constEnumSyntheticNodesComments.ts, 6, 16)) + + case En["\u{44}"]: +>En : Symbol(En, Decl(constEnumSyntheticNodesComments.ts, 0, 0)) +>"\u{44}" : Symbol(En.D, Decl(constEnumSyntheticNodesComments.ts, 0, 24)) + + return assert<3>(a); +>assert : Symbol(assert, Decl(constEnumSyntheticNodesComments.ts, 0, 28)) +>a : Symbol(a, Decl(constEnumSyntheticNodesComments.ts, 6, 16)) + } +} diff --git a/tests/baselines/reference/constEnumSyntheticNodesComments.types b/tests/baselines/reference/constEnumSyntheticNodesComments.types new file mode 100644 index 0000000000000..c02880ffdb53b --- /dev/null +++ b/tests/baselines/reference/constEnumSyntheticNodesComments.types @@ -0,0 +1,64 @@ +=== tests/cases/compiler/constEnumSyntheticNodesComments.ts === +const enum En { A, B, C, D } +>En : En +>A : En.A +>B : En.B +>C : En.C +>D : En.D + +function assert(x: T) { +>assert : (x: T) => T +>x : T + + return x; +>x : T +} + +function verify(a: En) { +>verify : (a: En) => 0 | 1 | 2 | 3 +>a : En + + switch (a) { +>a : En + + case En.A: +>En.A : En.A +>En : typeof En +>A : En.A + + return assert<0>(a); +>assert<0>(a) : 0 +>assert : (x: T) => T +>a : En.A + + case En["B"]: +>En["B"] : En.B +>En : typeof En +>"B" : "B" + + return assert<1>(a); +>assert<1>(a) : 1 +>assert : (x: T) => T +>a : En.B + + case En[`C`]: +>En[`C`] : En.C +>En : typeof En +>`C` : "C" + + return assert<2>(a); +>assert<2>(a) : 2 +>assert : (x: T) => T +>a : En.C + + case En["\u{44}"]: +>En["\u{44}"] : En.D +>En : typeof En +>"\u{44}" : "D" + + return assert<3>(a); +>assert<3>(a) : 3 +>assert : (x: T) => T +>a : En.D + } +} diff --git a/tests/baselines/reference/constEnumToStringWithComments.js b/tests/baselines/reference/constEnumToStringWithComments.js index f0fbc8663859e..7e7a4e121be1c 100644 --- a/tests/baselines/reference/constEnumToStringWithComments.js +++ b/tests/baselines/reference/constEnumToStringWithComments.js @@ -24,14 +24,14 @@ let c1 = Foo["C"].toString(); //// [constEnumToStringWithComments.js] var x0 = 100 /* X */.toString(); -var x1 = 100 /* "X" */.toString(); +var x1 = 100 /* X */.toString(); var y0 = 0.5 /* Y */.toString(); -var y1 = 0.5 /* "Y" */.toString(); +var y1 = 0.5 /* Y */.toString(); var z0 = 2 /* Z */.toString(); -var z1 = 2 /* "Z" */.toString(); +var z1 = 2 /* Z */.toString(); var a0 = -1 /* A */.toString(); -var a1 = -1 /* "A" */.toString(); +var a1 = -1 /* A */.toString(); var b0 = -1.5 /* B */.toString(); -var b1 = -1.5 /* "B" */.toString(); +var b1 = -1.5 /* B */.toString(); var c0 = -1 /* C */.toString(); -var c1 = -1 /* "C" */.toString(); +var c1 = -1 /* C */.toString(); diff --git a/tests/baselines/reference/constEnums.js b/tests/baselines/reference/constEnums.js new file mode 100644 index 0000000000000..406b13284c30c --- /dev/null +++ b/tests/baselines/reference/constEnums.js @@ -0,0 +1,228 @@ +//// [constEnums.ts] +const enum Enum1 { + A0 = 100, +} + +const enum Enum1 { + // correct cases + A, + B, + C = 10, + D = A | B, + E = A | 1, + F = 1 | A, + G = (1 & 1), + H = ~(A | B), + I = A >>> 1, + J = 1 & A, + K = ~(1 | 5), + L = ~D, + M = E << B, + N = E << 1, + O = E >> B, + P = E >> 1, + PQ = E ** 2, + Q = -D, + R = C & 5, + S = 5 & C, + T = C | D, + U = C | 1, + V = 10 | D, + W = Enum1.V, + + // correct cases: reference to the enum member from different enum declaration + W1 = A0, + W2 = Enum1.A0, + W3 = Enum1["A0"], + W4 = Enum1["W"], + W5 = Enum1[`V`], +} + + +module A { + export module B { + export module C { + export const enum E { + V1 = 1, + V2 = A.B.C.E.V1 | 100 + } + } + } +} + +module A { + export module B { + export module C { + export const enum E { + V3 = A.B.C.E["V2"] & 200, + V4 = A.B.C.E[`V1`] << 1, + } + } + } +} + +module A1 { + export module B { + export module C { + export const enum E { + V1 = 10, + V2 = 110, + } + } + } +} + +module A2 { + export module B { + export module C { + export const enum E { + V1 = 10, + V2 = 110, + } + } + // module C will be classified as value + export module C { + var x = 1 + } + } +} + +import I = A.B.C.E; +import I1 = A1.B; +import I2 = A2.B; + +function foo0(e: I): void { + if (e === I.V1) { + } + else if (e === I.V2) { + } +} + +function foo1(e: I1.C.E): void { + if (e === I1.C.E.V1) { + } + else if (e === I1.C.E.V2) { + } +} + +function foo2(e: I2.C.E): void { + if (e === I2.C.E.V1) { + } + else if (e === I2.C.E.V2) { + } +} + + +function foo(x: Enum1) { + switch (x) { + case Enum1.A: + case Enum1.B: + case Enum1.C: + case Enum1.D: + case Enum1.E: + case Enum1.F: + case Enum1.G: + case Enum1.H: + case Enum1.I: + case Enum1.J: + case Enum1.K: + case Enum1.L: + case Enum1.M: + case Enum1.N: + case Enum1.O: + case Enum1.P: + case Enum1.PQ: + case Enum1.Q: + case Enum1.R: + case Enum1.S: + case Enum1["T"]: + case Enum1[`U`]: + case Enum1.V: + case Enum1.W: + case Enum1.W1: + case Enum1.W2: + case Enum1.W3: + case Enum1.W4: + break; + } +} + +function bar(e: A.B.C.E): number { + switch (e) { + case A.B.C.E.V1: return 1; + case A.B.C.E.V2: return 1; + case A.B.C.E.V3: return 1; + } +} + +//// [constEnums.js] +var A2; +(function (A2) { + var B; + (function (B) { + // module C will be classified as value + var C; + (function (C) { + var x = 1; + })(C = B.C || (B.C = {})); + })(B = A2.B || (A2.B = {})); +})(A2 || (A2 = {})); +var I2 = A2.B; +function foo0(e) { + if (e === 1 /* V1 */) { + } + else if (e === 101 /* V2 */) { + } +} +function foo1(e) { + if (e === 10 /* V1 */) { + } + else if (e === 110 /* V2 */) { + } +} +function foo2(e) { + if (e === 10 /* V1 */) { + } + else if (e === 110 /* V2 */) { + } +} +function foo(x) { + switch (x) { + case 0 /* A */: + case 1 /* B */: + case 10 /* C */: + case 1 /* D */: + case 1 /* E */: + case 1 /* F */: + case 1 /* G */: + case -2 /* H */: + case 0 /* I */: + case 0 /* J */: + case -6 /* K */: + case -2 /* L */: + case 2 /* M */: + case 2 /* N */: + case 0 /* O */: + case 0 /* P */: + case 1 /* PQ */: + case -1 /* Q */: + case 0 /* R */: + case 0 /* S */: + case 11 /* T */: + case 11 /* U */: + case 11 /* V */: + case 11 /* W */: + case 100 /* W1 */: + case 100 /* W2 */: + case 100 /* W3 */: + case 11 /* W4 */: + break; + } +} +function bar(e) { + switch (e) { + case 1 /* V1 */: return 1; + case 101 /* V2 */: return 1; + case 64 /* V3 */: return 1; + } +} diff --git a/tests/baselines/reference/constEnums.symbols b/tests/baselines/reference/constEnums.symbols new file mode 100644 index 0000000000000..0f0536734a044 --- /dev/null +++ b/tests/baselines/reference/constEnums.symbols @@ -0,0 +1,548 @@ +=== tests/cases/compiler/constEnums.ts === +const enum Enum1 { +>Enum1 : Symbol(Enum1, Decl(constEnums.ts, 0, 0), Decl(constEnums.ts, 2, 1)) + + A0 = 100, +>A0 : Symbol(Enum1.A0, Decl(constEnums.ts, 0, 18)) +} + +const enum Enum1 { +>Enum1 : Symbol(Enum1, Decl(constEnums.ts, 0, 0), Decl(constEnums.ts, 2, 1)) + + // correct cases + A, +>A : Symbol(Enum1.A, Decl(constEnums.ts, 4, 18)) + + B, +>B : Symbol(Enum1.B, Decl(constEnums.ts, 6, 6)) + + C = 10, +>C : Symbol(Enum1.C, Decl(constEnums.ts, 7, 6)) + + D = A | B, +>D : Symbol(Enum1.D, Decl(constEnums.ts, 8, 11)) +>A : Symbol(Enum1.A, Decl(constEnums.ts, 4, 18)) +>B : Symbol(Enum1.B, Decl(constEnums.ts, 6, 6)) + + E = A | 1, +>E : Symbol(Enum1.E, Decl(constEnums.ts, 9, 14)) +>A : Symbol(Enum1.A, Decl(constEnums.ts, 4, 18)) + + F = 1 | A, +>F : Symbol(Enum1.F, Decl(constEnums.ts, 10, 14)) +>A : Symbol(Enum1.A, Decl(constEnums.ts, 4, 18)) + + G = (1 & 1), +>G : Symbol(Enum1.G, Decl(constEnums.ts, 11, 14)) + + H = ~(A | B), +>H : Symbol(Enum1.H, Decl(constEnums.ts, 12, 16)) +>A : Symbol(Enum1.A, Decl(constEnums.ts, 4, 18)) +>B : Symbol(Enum1.B, Decl(constEnums.ts, 6, 6)) + + I = A >>> 1, +>I : Symbol(Enum1.I, Decl(constEnums.ts, 13, 17)) +>A : Symbol(Enum1.A, Decl(constEnums.ts, 4, 18)) + + J = 1 & A, +>J : Symbol(Enum1.J, Decl(constEnums.ts, 14, 16)) +>A : Symbol(Enum1.A, Decl(constEnums.ts, 4, 18)) + + K = ~(1 | 5), +>K : Symbol(Enum1.K, Decl(constEnums.ts, 15, 14)) + + L = ~D, +>L : Symbol(Enum1.L, Decl(constEnums.ts, 16, 17)) +>D : Symbol(Enum1.D, Decl(constEnums.ts, 8, 11)) + + M = E << B, +>M : Symbol(Enum1.M, Decl(constEnums.ts, 17, 11)) +>E : Symbol(Enum1.E, Decl(constEnums.ts, 9, 14)) +>B : Symbol(Enum1.B, Decl(constEnums.ts, 6, 6)) + + N = E << 1, +>N : Symbol(Enum1.N, Decl(constEnums.ts, 18, 15)) +>E : Symbol(Enum1.E, Decl(constEnums.ts, 9, 14)) + + O = E >> B, +>O : Symbol(Enum1.O, Decl(constEnums.ts, 19, 15)) +>E : Symbol(Enum1.E, Decl(constEnums.ts, 9, 14)) +>B : Symbol(Enum1.B, Decl(constEnums.ts, 6, 6)) + + P = E >> 1, +>P : Symbol(Enum1.P, Decl(constEnums.ts, 20, 15)) +>E : Symbol(Enum1.E, Decl(constEnums.ts, 9, 14)) + + PQ = E ** 2, +>PQ : Symbol(Enum1.PQ, Decl(constEnums.ts, 21, 15)) +>E : Symbol(Enum1.E, Decl(constEnums.ts, 9, 14)) + + Q = -D, +>Q : Symbol(Enum1.Q, Decl(constEnums.ts, 22, 16)) +>D : Symbol(Enum1.D, Decl(constEnums.ts, 8, 11)) + + R = C & 5, +>R : Symbol(Enum1.R, Decl(constEnums.ts, 23, 11)) +>C : Symbol(Enum1.C, Decl(constEnums.ts, 7, 6)) + + S = 5 & C, +>S : Symbol(Enum1.S, Decl(constEnums.ts, 24, 14)) +>C : Symbol(Enum1.C, Decl(constEnums.ts, 7, 6)) + + T = C | D, +>T : Symbol(Enum1.T, Decl(constEnums.ts, 25, 14)) +>C : Symbol(Enum1.C, Decl(constEnums.ts, 7, 6)) +>D : Symbol(Enum1.D, Decl(constEnums.ts, 8, 11)) + + U = C | 1, +>U : Symbol(Enum1.U, Decl(constEnums.ts, 26, 14)) +>C : Symbol(Enum1.C, Decl(constEnums.ts, 7, 6)) + + V = 10 | D, +>V : Symbol(Enum1.V, Decl(constEnums.ts, 27, 14)) +>D : Symbol(Enum1.D, Decl(constEnums.ts, 8, 11)) + + W = Enum1.V, +>W : Symbol(Enum1.W, Decl(constEnums.ts, 28, 15)) +>Enum1.V : Symbol(Enum1.V, Decl(constEnums.ts, 27, 14)) +>Enum1 : Symbol(Enum1, Decl(constEnums.ts, 0, 0), Decl(constEnums.ts, 2, 1)) +>V : Symbol(Enum1.V, Decl(constEnums.ts, 27, 14)) + + // correct cases: reference to the enum member from different enum declaration + W1 = A0, +>W1 : Symbol(Enum1.W1, Decl(constEnums.ts, 29, 16)) +>A0 : Symbol(Enum1.A0, Decl(constEnums.ts, 0, 18)) + + W2 = Enum1.A0, +>W2 : Symbol(Enum1.W2, Decl(constEnums.ts, 32, 12)) +>Enum1.A0 : Symbol(Enum1.A0, Decl(constEnums.ts, 0, 18)) +>Enum1 : Symbol(Enum1, Decl(constEnums.ts, 0, 0), Decl(constEnums.ts, 2, 1)) +>A0 : Symbol(Enum1.A0, Decl(constEnums.ts, 0, 18)) + + W3 = Enum1["A0"], +>W3 : Symbol(Enum1.W3, Decl(constEnums.ts, 33, 18)) +>Enum1 : Symbol(Enum1, Decl(constEnums.ts, 0, 0), Decl(constEnums.ts, 2, 1)) +>"A0" : Symbol(Enum1.A0, Decl(constEnums.ts, 0, 18)) + + W4 = Enum1["W"], +>W4 : Symbol(Enum1.W4, Decl(constEnums.ts, 34, 21)) +>Enum1 : Symbol(Enum1, Decl(constEnums.ts, 0, 0), Decl(constEnums.ts, 2, 1)) +>"W" : Symbol(Enum1.W, Decl(constEnums.ts, 28, 15)) + + W5 = Enum1[`V`], +>W5 : Symbol(Enum1.W5, Decl(constEnums.ts, 35, 20)) +>Enum1 : Symbol(Enum1, Decl(constEnums.ts, 0, 0), Decl(constEnums.ts, 2, 1)) +>`V` : Symbol(Enum1.V, Decl(constEnums.ts, 27, 14)) +} + + +module A { +>A : Symbol(A, Decl(constEnums.ts, 37, 1), Decl(constEnums.ts, 49, 1)) + + export module B { +>B : Symbol(B, Decl(constEnums.ts, 40, 10), Decl(constEnums.ts, 51, 10)) + + export module C { +>C : Symbol(C, Decl(constEnums.ts, 41, 21), Decl(constEnums.ts, 52, 21)) + + export const enum E { +>E : Symbol(E, Decl(constEnums.ts, 42, 25), Decl(constEnums.ts, 53, 25)) + + V1 = 1, +>V1 : Symbol(I.V1, Decl(constEnums.ts, 43, 33)) + + V2 = A.B.C.E.V1 | 100 +>V2 : Symbol(I.V2, Decl(constEnums.ts, 44, 23)) +>A.B.C.E.V1 : Symbol(I.V1, Decl(constEnums.ts, 43, 33)) +>A.B.C.E : Symbol(E, Decl(constEnums.ts, 42, 25), Decl(constEnums.ts, 53, 25)) +>A.B.C : Symbol(C, Decl(constEnums.ts, 41, 21), Decl(constEnums.ts, 52, 21)) +>A.B : Symbol(B, Decl(constEnums.ts, 40, 10), Decl(constEnums.ts, 51, 10)) +>A : Symbol(A, Decl(constEnums.ts, 37, 1), Decl(constEnums.ts, 49, 1)) +>B : Symbol(B, Decl(constEnums.ts, 40, 10), Decl(constEnums.ts, 51, 10)) +>C : Symbol(C, Decl(constEnums.ts, 41, 21), Decl(constEnums.ts, 52, 21)) +>E : Symbol(E, Decl(constEnums.ts, 42, 25), Decl(constEnums.ts, 53, 25)) +>V1 : Symbol(I.V1, Decl(constEnums.ts, 43, 33)) + } + } + } +} + +module A { +>A : Symbol(A, Decl(constEnums.ts, 37, 1), Decl(constEnums.ts, 49, 1)) + + export module B { +>B : Symbol(B, Decl(constEnums.ts, 40, 10), Decl(constEnums.ts, 51, 10)) + + export module C { +>C : Symbol(C, Decl(constEnums.ts, 41, 21), Decl(constEnums.ts, 52, 21)) + + export const enum E { +>E : Symbol(E, Decl(constEnums.ts, 42, 25), Decl(constEnums.ts, 53, 25)) + + V3 = A.B.C.E["V2"] & 200, +>V3 : Symbol(I.V3, Decl(constEnums.ts, 54, 33)) +>A.B.C.E : Symbol(E, Decl(constEnums.ts, 42, 25), Decl(constEnums.ts, 53, 25)) +>A.B.C : Symbol(C, Decl(constEnums.ts, 41, 21), Decl(constEnums.ts, 52, 21)) +>A.B : Symbol(B, Decl(constEnums.ts, 40, 10), Decl(constEnums.ts, 51, 10)) +>A : Symbol(A, Decl(constEnums.ts, 37, 1), Decl(constEnums.ts, 49, 1)) +>B : Symbol(B, Decl(constEnums.ts, 40, 10), Decl(constEnums.ts, 51, 10)) +>C : Symbol(C, Decl(constEnums.ts, 41, 21), Decl(constEnums.ts, 52, 21)) +>E : Symbol(E, Decl(constEnums.ts, 42, 25), Decl(constEnums.ts, 53, 25)) +>"V2" : Symbol(I.V2, Decl(constEnums.ts, 44, 23)) + + V4 = A.B.C.E[`V1`] << 1, +>V4 : Symbol(I.V4, Decl(constEnums.ts, 55, 41)) +>A.B.C.E : Symbol(E, Decl(constEnums.ts, 42, 25), Decl(constEnums.ts, 53, 25)) +>A.B.C : Symbol(C, Decl(constEnums.ts, 41, 21), Decl(constEnums.ts, 52, 21)) +>A.B : Symbol(B, Decl(constEnums.ts, 40, 10), Decl(constEnums.ts, 51, 10)) +>A : Symbol(A, Decl(constEnums.ts, 37, 1), Decl(constEnums.ts, 49, 1)) +>B : Symbol(B, Decl(constEnums.ts, 40, 10), Decl(constEnums.ts, 51, 10)) +>C : Symbol(C, Decl(constEnums.ts, 41, 21), Decl(constEnums.ts, 52, 21)) +>E : Symbol(E, Decl(constEnums.ts, 42, 25), Decl(constEnums.ts, 53, 25)) +>`V1` : Symbol(I.V1, Decl(constEnums.ts, 43, 33)) + } + } + } +} + +module A1 { +>A1 : Symbol(A1, Decl(constEnums.ts, 60, 1)) + + export module B { +>B : Symbol(B, Decl(constEnums.ts, 62, 11)) + + export module C { +>C : Symbol(C, Decl(constEnums.ts, 63, 21)) + + export const enum E { +>E : Symbol(E, Decl(constEnums.ts, 64, 25)) + + V1 = 10, +>V1 : Symbol(E.V1, Decl(constEnums.ts, 65, 33)) + + V2 = 110, +>V2 : Symbol(E.V2, Decl(constEnums.ts, 66, 24)) + } + } + } +} + +module A2 { +>A2 : Symbol(A2, Decl(constEnums.ts, 71, 1)) + + export module B { +>B : Symbol(B, Decl(constEnums.ts, 73, 11)) + + export module C { +>C : Symbol(C, Decl(constEnums.ts, 74, 21), Decl(constEnums.ts, 80, 9)) + + export const enum E { +>E : Symbol(E, Decl(constEnums.ts, 75, 25)) + + V1 = 10, +>V1 : Symbol(E.V1, Decl(constEnums.ts, 76, 33)) + + V2 = 110, +>V2 : Symbol(E.V2, Decl(constEnums.ts, 77, 24)) + } + } + // module C will be classified as value + export module C { +>C : Symbol(C, Decl(constEnums.ts, 74, 21), Decl(constEnums.ts, 80, 9)) + + var x = 1 +>x : Symbol(x, Decl(constEnums.ts, 83, 15)) + } + } +} + +import I = A.B.C.E; +>I : Symbol(I, Decl(constEnums.ts, 86, 1)) +>A : Symbol(A, Decl(constEnums.ts, 37, 1), Decl(constEnums.ts, 49, 1)) +>B : Symbol(A.B, Decl(constEnums.ts, 40, 10), Decl(constEnums.ts, 51, 10)) +>C : Symbol(A.B.C, Decl(constEnums.ts, 41, 21), Decl(constEnums.ts, 52, 21)) +>E : Symbol(I, Decl(constEnums.ts, 42, 25), Decl(constEnums.ts, 53, 25)) + +import I1 = A1.B; +>I1 : Symbol(I1, Decl(constEnums.ts, 88, 19)) +>A1 : Symbol(A1, Decl(constEnums.ts, 60, 1)) +>B : Symbol(I1, Decl(constEnums.ts, 62, 11)) + +import I2 = A2.B; +>I2 : Symbol(I2, Decl(constEnums.ts, 89, 17)) +>A2 : Symbol(A2, Decl(constEnums.ts, 71, 1)) +>B : Symbol(I2, Decl(constEnums.ts, 73, 11)) + +function foo0(e: I): void { +>foo0 : Symbol(foo0, Decl(constEnums.ts, 90, 17)) +>e : Symbol(e, Decl(constEnums.ts, 92, 14)) +>I : Symbol(I, Decl(constEnums.ts, 86, 1)) + + if (e === I.V1) { +>e : Symbol(e, Decl(constEnums.ts, 92, 14)) +>I.V1 : Symbol(I.V1, Decl(constEnums.ts, 43, 33)) +>I : Symbol(I, Decl(constEnums.ts, 86, 1)) +>V1 : Symbol(I.V1, Decl(constEnums.ts, 43, 33)) + } + else if (e === I.V2) { +>e : Symbol(e, Decl(constEnums.ts, 92, 14)) +>I.V2 : Symbol(I.V2, Decl(constEnums.ts, 44, 23)) +>I : Symbol(I, Decl(constEnums.ts, 86, 1)) +>V2 : Symbol(I.V2, Decl(constEnums.ts, 44, 23)) + } +} + +function foo1(e: I1.C.E): void { +>foo1 : Symbol(foo1, Decl(constEnums.ts, 97, 1)) +>e : Symbol(e, Decl(constEnums.ts, 99, 14)) +>I1 : Symbol(I1, Decl(constEnums.ts, 88, 19)) +>C : Symbol(I1.C, Decl(constEnums.ts, 63, 21)) +>E : Symbol(I1.C.E, Decl(constEnums.ts, 64, 25)) + + if (e === I1.C.E.V1) { +>e : Symbol(e, Decl(constEnums.ts, 99, 14)) +>I1.C.E.V1 : Symbol(I1.C.E.V1, Decl(constEnums.ts, 65, 33)) +>I1.C.E : Symbol(I1.C.E, Decl(constEnums.ts, 64, 25)) +>I1.C : Symbol(I1.C, Decl(constEnums.ts, 63, 21)) +>I1 : Symbol(I1, Decl(constEnums.ts, 88, 19)) +>C : Symbol(I1.C, Decl(constEnums.ts, 63, 21)) +>E : Symbol(I1.C.E, Decl(constEnums.ts, 64, 25)) +>V1 : Symbol(I1.C.E.V1, Decl(constEnums.ts, 65, 33)) + } + else if (e === I1.C.E.V2) { +>e : Symbol(e, Decl(constEnums.ts, 99, 14)) +>I1.C.E.V2 : Symbol(I1.C.E.V2, Decl(constEnums.ts, 66, 24)) +>I1.C.E : Symbol(I1.C.E, Decl(constEnums.ts, 64, 25)) +>I1.C : Symbol(I1.C, Decl(constEnums.ts, 63, 21)) +>I1 : Symbol(I1, Decl(constEnums.ts, 88, 19)) +>C : Symbol(I1.C, Decl(constEnums.ts, 63, 21)) +>E : Symbol(I1.C.E, Decl(constEnums.ts, 64, 25)) +>V2 : Symbol(I1.C.E.V2, Decl(constEnums.ts, 66, 24)) + } +} + +function foo2(e: I2.C.E): void { +>foo2 : Symbol(foo2, Decl(constEnums.ts, 104, 1)) +>e : Symbol(e, Decl(constEnums.ts, 106, 14)) +>I2 : Symbol(I2, Decl(constEnums.ts, 89, 17)) +>C : Symbol(I2.C, Decl(constEnums.ts, 74, 21), Decl(constEnums.ts, 80, 9)) +>E : Symbol(I2.C.E, Decl(constEnums.ts, 75, 25)) + + if (e === I2.C.E.V1) { +>e : Symbol(e, Decl(constEnums.ts, 106, 14)) +>I2.C.E.V1 : Symbol(I2.C.E.V1, Decl(constEnums.ts, 76, 33)) +>I2.C.E : Symbol(I2.C.E, Decl(constEnums.ts, 75, 25)) +>I2.C : Symbol(I2.C, Decl(constEnums.ts, 74, 21), Decl(constEnums.ts, 80, 9)) +>I2 : Symbol(I2, Decl(constEnums.ts, 89, 17)) +>C : Symbol(I2.C, Decl(constEnums.ts, 74, 21), Decl(constEnums.ts, 80, 9)) +>E : Symbol(I2.C.E, Decl(constEnums.ts, 75, 25)) +>V1 : Symbol(I2.C.E.V1, Decl(constEnums.ts, 76, 33)) + } + else if (e === I2.C.E.V2) { +>e : Symbol(e, Decl(constEnums.ts, 106, 14)) +>I2.C.E.V2 : Symbol(I2.C.E.V2, Decl(constEnums.ts, 77, 24)) +>I2.C.E : Symbol(I2.C.E, Decl(constEnums.ts, 75, 25)) +>I2.C : Symbol(I2.C, Decl(constEnums.ts, 74, 21), Decl(constEnums.ts, 80, 9)) +>I2 : Symbol(I2, Decl(constEnums.ts, 89, 17)) +>C : Symbol(I2.C, Decl(constEnums.ts, 74, 21), Decl(constEnums.ts, 80, 9)) +>E : Symbol(I2.C.E, Decl(constEnums.ts, 75, 25)) +>V2 : Symbol(I2.C.E.V2, Decl(constEnums.ts, 77, 24)) + } +} + + +function foo(x: Enum1) { +>foo : Symbol(foo, Decl(constEnums.ts, 111, 1)) +>x : Symbol(x, Decl(constEnums.ts, 114, 13)) +>Enum1 : Symbol(Enum1, Decl(constEnums.ts, 0, 0), Decl(constEnums.ts, 2, 1)) + + switch (x) { +>x : Symbol(x, Decl(constEnums.ts, 114, 13)) + + case Enum1.A: +>Enum1.A : Symbol(Enum1.A, Decl(constEnums.ts, 4, 18)) +>Enum1 : Symbol(Enum1, Decl(constEnums.ts, 0, 0), Decl(constEnums.ts, 2, 1)) +>A : Symbol(Enum1.A, Decl(constEnums.ts, 4, 18)) + + case Enum1.B: +>Enum1.B : Symbol(Enum1.B, Decl(constEnums.ts, 6, 6)) +>Enum1 : Symbol(Enum1, Decl(constEnums.ts, 0, 0), Decl(constEnums.ts, 2, 1)) +>B : Symbol(Enum1.B, Decl(constEnums.ts, 6, 6)) + + case Enum1.C: +>Enum1.C : Symbol(Enum1.C, Decl(constEnums.ts, 7, 6)) +>Enum1 : Symbol(Enum1, Decl(constEnums.ts, 0, 0), Decl(constEnums.ts, 2, 1)) +>C : Symbol(Enum1.C, Decl(constEnums.ts, 7, 6)) + + case Enum1.D: +>Enum1.D : Symbol(Enum1.D, Decl(constEnums.ts, 8, 11)) +>Enum1 : Symbol(Enum1, Decl(constEnums.ts, 0, 0), Decl(constEnums.ts, 2, 1)) +>D : Symbol(Enum1.D, Decl(constEnums.ts, 8, 11)) + + case Enum1.E: +>Enum1.E : Symbol(Enum1.E, Decl(constEnums.ts, 9, 14)) +>Enum1 : Symbol(Enum1, Decl(constEnums.ts, 0, 0), Decl(constEnums.ts, 2, 1)) +>E : Symbol(Enum1.E, Decl(constEnums.ts, 9, 14)) + + case Enum1.F: +>Enum1.F : Symbol(Enum1.F, Decl(constEnums.ts, 10, 14)) +>Enum1 : Symbol(Enum1, Decl(constEnums.ts, 0, 0), Decl(constEnums.ts, 2, 1)) +>F : Symbol(Enum1.F, Decl(constEnums.ts, 10, 14)) + + case Enum1.G: +>Enum1.G : Symbol(Enum1.G, Decl(constEnums.ts, 11, 14)) +>Enum1 : Symbol(Enum1, Decl(constEnums.ts, 0, 0), Decl(constEnums.ts, 2, 1)) +>G : Symbol(Enum1.G, Decl(constEnums.ts, 11, 14)) + + case Enum1.H: +>Enum1.H : Symbol(Enum1.H, Decl(constEnums.ts, 12, 16)) +>Enum1 : Symbol(Enum1, Decl(constEnums.ts, 0, 0), Decl(constEnums.ts, 2, 1)) +>H : Symbol(Enum1.H, Decl(constEnums.ts, 12, 16)) + + case Enum1.I: +>Enum1.I : Symbol(Enum1.I, Decl(constEnums.ts, 13, 17)) +>Enum1 : Symbol(Enum1, Decl(constEnums.ts, 0, 0), Decl(constEnums.ts, 2, 1)) +>I : Symbol(Enum1.I, Decl(constEnums.ts, 13, 17)) + + case Enum1.J: +>Enum1.J : Symbol(Enum1.J, Decl(constEnums.ts, 14, 16)) +>Enum1 : Symbol(Enum1, Decl(constEnums.ts, 0, 0), Decl(constEnums.ts, 2, 1)) +>J : Symbol(Enum1.J, Decl(constEnums.ts, 14, 16)) + + case Enum1.K: +>Enum1.K : Symbol(Enum1.K, Decl(constEnums.ts, 15, 14)) +>Enum1 : Symbol(Enum1, Decl(constEnums.ts, 0, 0), Decl(constEnums.ts, 2, 1)) +>K : Symbol(Enum1.K, Decl(constEnums.ts, 15, 14)) + + case Enum1.L: +>Enum1.L : Symbol(Enum1.L, Decl(constEnums.ts, 16, 17)) +>Enum1 : Symbol(Enum1, Decl(constEnums.ts, 0, 0), Decl(constEnums.ts, 2, 1)) +>L : Symbol(Enum1.L, Decl(constEnums.ts, 16, 17)) + + case Enum1.M: +>Enum1.M : Symbol(Enum1.M, Decl(constEnums.ts, 17, 11)) +>Enum1 : Symbol(Enum1, Decl(constEnums.ts, 0, 0), Decl(constEnums.ts, 2, 1)) +>M : Symbol(Enum1.M, Decl(constEnums.ts, 17, 11)) + + case Enum1.N: +>Enum1.N : Symbol(Enum1.N, Decl(constEnums.ts, 18, 15)) +>Enum1 : Symbol(Enum1, Decl(constEnums.ts, 0, 0), Decl(constEnums.ts, 2, 1)) +>N : Symbol(Enum1.N, Decl(constEnums.ts, 18, 15)) + + case Enum1.O: +>Enum1.O : Symbol(Enum1.O, Decl(constEnums.ts, 19, 15)) +>Enum1 : Symbol(Enum1, Decl(constEnums.ts, 0, 0), Decl(constEnums.ts, 2, 1)) +>O : Symbol(Enum1.O, Decl(constEnums.ts, 19, 15)) + + case Enum1.P: +>Enum1.P : Symbol(Enum1.P, Decl(constEnums.ts, 20, 15)) +>Enum1 : Symbol(Enum1, Decl(constEnums.ts, 0, 0), Decl(constEnums.ts, 2, 1)) +>P : Symbol(Enum1.P, Decl(constEnums.ts, 20, 15)) + + case Enum1.PQ: +>Enum1.PQ : Symbol(Enum1.PQ, Decl(constEnums.ts, 21, 15)) +>Enum1 : Symbol(Enum1, Decl(constEnums.ts, 0, 0), Decl(constEnums.ts, 2, 1)) +>PQ : Symbol(Enum1.PQ, Decl(constEnums.ts, 21, 15)) + + case Enum1.Q: +>Enum1.Q : Symbol(Enum1.Q, Decl(constEnums.ts, 22, 16)) +>Enum1 : Symbol(Enum1, Decl(constEnums.ts, 0, 0), Decl(constEnums.ts, 2, 1)) +>Q : Symbol(Enum1.Q, Decl(constEnums.ts, 22, 16)) + + case Enum1.R: +>Enum1.R : Symbol(Enum1.R, Decl(constEnums.ts, 23, 11)) +>Enum1 : Symbol(Enum1, Decl(constEnums.ts, 0, 0), Decl(constEnums.ts, 2, 1)) +>R : Symbol(Enum1.R, Decl(constEnums.ts, 23, 11)) + + case Enum1.S: +>Enum1.S : Symbol(Enum1.S, Decl(constEnums.ts, 24, 14)) +>Enum1 : Symbol(Enum1, Decl(constEnums.ts, 0, 0), Decl(constEnums.ts, 2, 1)) +>S : Symbol(Enum1.S, Decl(constEnums.ts, 24, 14)) + + case Enum1["T"]: +>Enum1 : Symbol(Enum1, Decl(constEnums.ts, 0, 0), Decl(constEnums.ts, 2, 1)) +>"T" : Symbol(Enum1.T, Decl(constEnums.ts, 25, 14)) + + case Enum1[`U`]: +>Enum1 : Symbol(Enum1, Decl(constEnums.ts, 0, 0), Decl(constEnums.ts, 2, 1)) +>`U` : Symbol(Enum1.U, Decl(constEnums.ts, 26, 14)) + + case Enum1.V: +>Enum1.V : Symbol(Enum1.V, Decl(constEnums.ts, 27, 14)) +>Enum1 : Symbol(Enum1, Decl(constEnums.ts, 0, 0), Decl(constEnums.ts, 2, 1)) +>V : Symbol(Enum1.V, Decl(constEnums.ts, 27, 14)) + + case Enum1.W: +>Enum1.W : Symbol(Enum1.W, Decl(constEnums.ts, 28, 15)) +>Enum1 : Symbol(Enum1, Decl(constEnums.ts, 0, 0), Decl(constEnums.ts, 2, 1)) +>W : Symbol(Enum1.W, Decl(constEnums.ts, 28, 15)) + + case Enum1.W1: +>Enum1.W1 : Symbol(Enum1.W1, Decl(constEnums.ts, 29, 16)) +>Enum1 : Symbol(Enum1, Decl(constEnums.ts, 0, 0), Decl(constEnums.ts, 2, 1)) +>W1 : Symbol(Enum1.W1, Decl(constEnums.ts, 29, 16)) + + case Enum1.W2: +>Enum1.W2 : Symbol(Enum1.W2, Decl(constEnums.ts, 32, 12)) +>Enum1 : Symbol(Enum1, Decl(constEnums.ts, 0, 0), Decl(constEnums.ts, 2, 1)) +>W2 : Symbol(Enum1.W2, Decl(constEnums.ts, 32, 12)) + + case Enum1.W3: +>Enum1.W3 : Symbol(Enum1.W3, Decl(constEnums.ts, 33, 18)) +>Enum1 : Symbol(Enum1, Decl(constEnums.ts, 0, 0), Decl(constEnums.ts, 2, 1)) +>W3 : Symbol(Enum1.W3, Decl(constEnums.ts, 33, 18)) + + case Enum1.W4: +>Enum1.W4 : Symbol(Enum1.W4, Decl(constEnums.ts, 34, 21)) +>Enum1 : Symbol(Enum1, Decl(constEnums.ts, 0, 0), Decl(constEnums.ts, 2, 1)) +>W4 : Symbol(Enum1.W4, Decl(constEnums.ts, 34, 21)) + + break; + } +} + +function bar(e: A.B.C.E): number { +>bar : Symbol(bar, Decl(constEnums.ts, 146, 1)) +>e : Symbol(e, Decl(constEnums.ts, 148, 13)) +>A : Symbol(A, Decl(constEnums.ts, 37, 1), Decl(constEnums.ts, 49, 1)) +>B : Symbol(A.B, Decl(constEnums.ts, 40, 10), Decl(constEnums.ts, 51, 10)) +>C : Symbol(A.B.C, Decl(constEnums.ts, 41, 21), Decl(constEnums.ts, 52, 21)) +>E : Symbol(I, Decl(constEnums.ts, 42, 25), Decl(constEnums.ts, 53, 25)) + + switch (e) { +>e : Symbol(e, Decl(constEnums.ts, 148, 13)) + + case A.B.C.E.V1: return 1; +>A.B.C.E.V1 : Symbol(I.V1, Decl(constEnums.ts, 43, 33)) +>A.B.C.E : Symbol(I, Decl(constEnums.ts, 42, 25), Decl(constEnums.ts, 53, 25)) +>A.B.C : Symbol(A.B.C, Decl(constEnums.ts, 41, 21), Decl(constEnums.ts, 52, 21)) +>A.B : Symbol(A.B, Decl(constEnums.ts, 40, 10), Decl(constEnums.ts, 51, 10)) +>A : Symbol(A, Decl(constEnums.ts, 37, 1), Decl(constEnums.ts, 49, 1)) +>B : Symbol(A.B, Decl(constEnums.ts, 40, 10), Decl(constEnums.ts, 51, 10)) +>C : Symbol(A.B.C, Decl(constEnums.ts, 41, 21), Decl(constEnums.ts, 52, 21)) +>E : Symbol(I, Decl(constEnums.ts, 42, 25), Decl(constEnums.ts, 53, 25)) +>V1 : Symbol(I.V1, Decl(constEnums.ts, 43, 33)) + + case A.B.C.E.V2: return 1; +>A.B.C.E.V2 : Symbol(I.V2, Decl(constEnums.ts, 44, 23)) +>A.B.C.E : Symbol(I, Decl(constEnums.ts, 42, 25), Decl(constEnums.ts, 53, 25)) +>A.B.C : Symbol(A.B.C, Decl(constEnums.ts, 41, 21), Decl(constEnums.ts, 52, 21)) +>A.B : Symbol(A.B, Decl(constEnums.ts, 40, 10), Decl(constEnums.ts, 51, 10)) +>A : Symbol(A, Decl(constEnums.ts, 37, 1), Decl(constEnums.ts, 49, 1)) +>B : Symbol(A.B, Decl(constEnums.ts, 40, 10), Decl(constEnums.ts, 51, 10)) +>C : Symbol(A.B.C, Decl(constEnums.ts, 41, 21), Decl(constEnums.ts, 52, 21)) +>E : Symbol(I, Decl(constEnums.ts, 42, 25), Decl(constEnums.ts, 53, 25)) +>V2 : Symbol(I.V2, Decl(constEnums.ts, 44, 23)) + + case A.B.C.E.V3: return 1; +>A.B.C.E.V3 : Symbol(I.V3, Decl(constEnums.ts, 54, 33)) +>A.B.C.E : Symbol(I, Decl(constEnums.ts, 42, 25), Decl(constEnums.ts, 53, 25)) +>A.B.C : Symbol(A.B.C, Decl(constEnums.ts, 41, 21), Decl(constEnums.ts, 52, 21)) +>A.B : Symbol(A.B, Decl(constEnums.ts, 40, 10), Decl(constEnums.ts, 51, 10)) +>A : Symbol(A, Decl(constEnums.ts, 37, 1), Decl(constEnums.ts, 49, 1)) +>B : Symbol(A.B, Decl(constEnums.ts, 40, 10), Decl(constEnums.ts, 51, 10)) +>C : Symbol(A.B.C, Decl(constEnums.ts, 41, 21), Decl(constEnums.ts, 52, 21)) +>E : Symbol(I, Decl(constEnums.ts, 42, 25), Decl(constEnums.ts, 53, 25)) +>V3 : Symbol(I.V3, Decl(constEnums.ts, 54, 33)) + } +} diff --git a/tests/baselines/reference/constEnums.types b/tests/baselines/reference/constEnums.types new file mode 100644 index 0000000000000..36cb50a2aabdb --- /dev/null +++ b/tests/baselines/reference/constEnums.types @@ -0,0 +1,593 @@ +=== tests/cases/compiler/constEnums.ts === +const enum Enum1 { +>Enum1 : Enum1 + + A0 = 100, +>A0 : Enum1 +>100 : 100 +} + +const enum Enum1 { +>Enum1 : Enum1 + + // correct cases + A, +>A : Enum1 + + B, +>B : Enum1 + + C = 10, +>C : Enum1 +>10 : 10 + + D = A | B, +>D : Enum1 +>A | B : number +>A : Enum1 +>B : Enum1 + + E = A | 1, +>E : Enum1 +>A | 1 : number +>A : Enum1 +>1 : 1 + + F = 1 | A, +>F : Enum1 +>1 | A : number +>1 : 1 +>A : Enum1 + + G = (1 & 1), +>G : Enum1 +>(1 & 1) : number +>1 & 1 : number +>1 : 1 +>1 : 1 + + H = ~(A | B), +>H : Enum1 +>~(A | B) : number +>(A | B) : number +>A | B : number +>A : Enum1 +>B : Enum1 + + I = A >>> 1, +>I : Enum1 +>A >>> 1 : number +>A : Enum1 +>1 : 1 + + J = 1 & A, +>J : Enum1 +>1 & A : number +>1 : 1 +>A : Enum1 + + K = ~(1 | 5), +>K : Enum1 +>~(1 | 5) : number +>(1 | 5) : number +>1 | 5 : number +>1 : 1 +>5 : 5 + + L = ~D, +>L : Enum1 +>~D : number +>D : Enum1 + + M = E << B, +>M : Enum1 +>E << B : number +>E : Enum1 +>B : Enum1 + + N = E << 1, +>N : Enum1 +>E << 1 : number +>E : Enum1 +>1 : 1 + + O = E >> B, +>O : Enum1 +>E >> B : number +>E : Enum1 +>B : Enum1 + + P = E >> 1, +>P : Enum1 +>E >> 1 : number +>E : Enum1 +>1 : 1 + + PQ = E ** 2, +>PQ : Enum1 +>E ** 2 : number +>E : Enum1 +>2 : 2 + + Q = -D, +>Q : Enum1 +>-D : number +>D : Enum1 + + R = C & 5, +>R : Enum1 +>C & 5 : number +>C : Enum1 +>5 : 5 + + S = 5 & C, +>S : Enum1 +>5 & C : number +>5 : 5 +>C : Enum1 + + T = C | D, +>T : Enum1 +>C | D : number +>C : Enum1 +>D : Enum1 + + U = C | 1, +>U : Enum1 +>C | 1 : number +>C : Enum1 +>1 : 1 + + V = 10 | D, +>V : Enum1 +>10 | D : number +>10 : 10 +>D : Enum1 + + W = Enum1.V, +>W : Enum1 +>Enum1.V : Enum1 +>Enum1 : typeof Enum1 +>V : Enum1 + + // correct cases: reference to the enum member from different enum declaration + W1 = A0, +>W1 : Enum1 +>A0 : Enum1 + + W2 = Enum1.A0, +>W2 : Enum1 +>Enum1.A0 : Enum1 +>Enum1 : typeof Enum1 +>A0 : Enum1 + + W3 = Enum1["A0"], +>W3 : Enum1 +>Enum1["A0"] : Enum1 +>Enum1 : typeof Enum1 +>"A0" : "A0" + + W4 = Enum1["W"], +>W4 : Enum1 +>Enum1["W"] : Enum1 +>Enum1 : typeof Enum1 +>"W" : "W" + + W5 = Enum1[`V`], +>W5 : Enum1 +>Enum1[`V`] : Enum1 +>Enum1 : typeof Enum1 +>`V` : "V" +} + + +module A { + export module B { + export module C { + export const enum E { +>E : E + + V1 = 1, +>V1 : E +>1 : 1 + + V2 = A.B.C.E.V1 | 100 +>V2 : E +>A.B.C.E.V1 | 100 : number +>A.B.C.E.V1 : E +>A.B.C.E : typeof E +>A.B.C : typeof C +>A.B : typeof B +>A : typeof A +>B : typeof B +>C : typeof C +>E : typeof E +>V1 : E +>100 : 100 + } + } + } +} + +module A { + export module B { + export module C { + export const enum E { +>E : E + + V3 = A.B.C.E["V2"] & 200, +>V3 : E +>A.B.C.E["V2"] & 200 : number +>A.B.C.E["V2"] : E +>A.B.C.E : typeof E +>A.B.C : typeof C +>A.B : typeof B +>A : typeof A +>B : typeof B +>C : typeof C +>E : typeof E +>"V2" : "V2" +>200 : 200 + + V4 = A.B.C.E[`V1`] << 1, +>V4 : E +>A.B.C.E[`V1`] << 1 : number +>A.B.C.E[`V1`] : E +>A.B.C.E : typeof E +>A.B.C : typeof C +>A.B : typeof B +>A : typeof A +>B : typeof B +>C : typeof C +>E : typeof E +>`V1` : "V1" +>1 : 1 + } + } + } +} + +module A1 { + export module B { + export module C { + export const enum E { +>E : E + + V1 = 10, +>V1 : E.V1 +>10 : 10 + + V2 = 110, +>V2 : E.V2 +>110 : 110 + } + } + } +} + +module A2 { +>A2 : typeof A2 + + export module B { +>B : typeof B + + export module C { + export const enum E { +>E : E + + V1 = 10, +>V1 : E.V1 +>10 : 10 + + V2 = 110, +>V2 : E.V2 +>110 : 110 + } + } + // module C will be classified as value + export module C { +>C : typeof C + + var x = 1 +>x : number +>1 : 1 + } + } +} + +import I = A.B.C.E; +>I : typeof I +>A : typeof A +>B : typeof A.B +>C : typeof A.B.C +>E : I + +import I1 = A1.B; +>I1 : typeof I1 +>A1 : typeof A1 +>B : typeof I1 + +import I2 = A2.B; +>I2 : typeof I2 +>A2 : typeof A2 +>B : typeof I2 + +function foo0(e: I): void { +>foo0 : (e: I) => void +>e : I + + if (e === I.V1) { +>e === I.V1 : boolean +>e : I +>I.V1 : I +>I : typeof I +>V1 : I + } + else if (e === I.V2) { +>e === I.V2 : boolean +>e : I +>I.V2 : I +>I : typeof I +>V2 : I + } +} + +function foo1(e: I1.C.E): void { +>foo1 : (e: I1.C.E) => void +>e : I1.C.E +>I1 : any +>C : any + + if (e === I1.C.E.V1) { +>e === I1.C.E.V1 : boolean +>e : I1.C.E +>I1.C.E.V1 : I1.C.E.V1 +>I1.C.E : typeof I1.C.E +>I1.C : typeof I1.C +>I1 : typeof I1 +>C : typeof I1.C +>E : typeof I1.C.E +>V1 : I1.C.E.V1 + } + else if (e === I1.C.E.V2) { +>e === I1.C.E.V2 : boolean +>e : I1.C.E.V2 +>I1.C.E.V2 : I1.C.E.V2 +>I1.C.E : typeof I1.C.E +>I1.C : typeof I1.C +>I1 : typeof I1 +>C : typeof I1.C +>E : typeof I1.C.E +>V2 : I1.C.E.V2 + } +} + +function foo2(e: I2.C.E): void { +>foo2 : (e: I2.C.E) => void +>e : I2.C.E +>I2 : any +>C : any + + if (e === I2.C.E.V1) { +>e === I2.C.E.V1 : boolean +>e : I2.C.E +>I2.C.E.V1 : I2.C.E.V1 +>I2.C.E : typeof I2.C.E +>I2.C : typeof I2.C +>I2 : typeof I2 +>C : typeof I2.C +>E : typeof I2.C.E +>V1 : I2.C.E.V1 + } + else if (e === I2.C.E.V2) { +>e === I2.C.E.V2 : boolean +>e : I2.C.E.V2 +>I2.C.E.V2 : I2.C.E.V2 +>I2.C.E : typeof I2.C.E +>I2.C : typeof I2.C +>I2 : typeof I2 +>C : typeof I2.C +>E : typeof I2.C.E +>V2 : I2.C.E.V2 + } +} + + +function foo(x: Enum1) { +>foo : (x: Enum1) => void +>x : Enum1 + + switch (x) { +>x : Enum1 + + case Enum1.A: +>Enum1.A : Enum1 +>Enum1 : typeof Enum1 +>A : Enum1 + + case Enum1.B: +>Enum1.B : Enum1 +>Enum1 : typeof Enum1 +>B : Enum1 + + case Enum1.C: +>Enum1.C : Enum1 +>Enum1 : typeof Enum1 +>C : Enum1 + + case Enum1.D: +>Enum1.D : Enum1 +>Enum1 : typeof Enum1 +>D : Enum1 + + case Enum1.E: +>Enum1.E : Enum1 +>Enum1 : typeof Enum1 +>E : Enum1 + + case Enum1.F: +>Enum1.F : Enum1 +>Enum1 : typeof Enum1 +>F : Enum1 + + case Enum1.G: +>Enum1.G : Enum1 +>Enum1 : typeof Enum1 +>G : Enum1 + + case Enum1.H: +>Enum1.H : Enum1 +>Enum1 : typeof Enum1 +>H : Enum1 + + case Enum1.I: +>Enum1.I : Enum1 +>Enum1 : typeof Enum1 +>I : Enum1 + + case Enum1.J: +>Enum1.J : Enum1 +>Enum1 : typeof Enum1 +>J : Enum1 + + case Enum1.K: +>Enum1.K : Enum1 +>Enum1 : typeof Enum1 +>K : Enum1 + + case Enum1.L: +>Enum1.L : Enum1 +>Enum1 : typeof Enum1 +>L : Enum1 + + case Enum1.M: +>Enum1.M : Enum1 +>Enum1 : typeof Enum1 +>M : Enum1 + + case Enum1.N: +>Enum1.N : Enum1 +>Enum1 : typeof Enum1 +>N : Enum1 + + case Enum1.O: +>Enum1.O : Enum1 +>Enum1 : typeof Enum1 +>O : Enum1 + + case Enum1.P: +>Enum1.P : Enum1 +>Enum1 : typeof Enum1 +>P : Enum1 + + case Enum1.PQ: +>Enum1.PQ : Enum1 +>Enum1 : typeof Enum1 +>PQ : Enum1 + + case Enum1.Q: +>Enum1.Q : Enum1 +>Enum1 : typeof Enum1 +>Q : Enum1 + + case Enum1.R: +>Enum1.R : Enum1 +>Enum1 : typeof Enum1 +>R : Enum1 + + case Enum1.S: +>Enum1.S : Enum1 +>Enum1 : typeof Enum1 +>S : Enum1 + + case Enum1["T"]: +>Enum1["T"] : Enum1 +>Enum1 : typeof Enum1 +>"T" : "T" + + case Enum1[`U`]: +>Enum1[`U`] : Enum1 +>Enum1 : typeof Enum1 +>`U` : "U" + + case Enum1.V: +>Enum1.V : Enum1 +>Enum1 : typeof Enum1 +>V : Enum1 + + case Enum1.W: +>Enum1.W : Enum1 +>Enum1 : typeof Enum1 +>W : Enum1 + + case Enum1.W1: +>Enum1.W1 : Enum1 +>Enum1 : typeof Enum1 +>W1 : Enum1 + + case Enum1.W2: +>Enum1.W2 : Enum1 +>Enum1 : typeof Enum1 +>W2 : Enum1 + + case Enum1.W3: +>Enum1.W3 : Enum1 +>Enum1 : typeof Enum1 +>W3 : Enum1 + + case Enum1.W4: +>Enum1.W4 : Enum1 +>Enum1 : typeof Enum1 +>W4 : Enum1 + + break; + } +} + +function bar(e: A.B.C.E): number { +>bar : (e: A.B.C.E) => number +>e : I +>A : any +>B : any +>C : any + + switch (e) { +>e : I + + case A.B.C.E.V1: return 1; +>A.B.C.E.V1 : I +>A.B.C.E : typeof I +>A.B.C : typeof A.B.C +>A.B : typeof A.B +>A : typeof A +>B : typeof A.B +>C : typeof A.B.C +>E : typeof I +>V1 : I +>1 : 1 + + case A.B.C.E.V2: return 1; +>A.B.C.E.V2 : I +>A.B.C.E : typeof I +>A.B.C : typeof A.B.C +>A.B : typeof A.B +>A : typeof A +>B : typeof A.B +>C : typeof A.B.C +>E : typeof I +>V2 : I +>1 : 1 + + case A.B.C.E.V3: return 1; +>A.B.C.E.V3 : I +>A.B.C.E : typeof I +>A.B.C : typeof A.B.C +>A.B : typeof A.B +>A : typeof A +>B : typeof A.B +>C : typeof A.B.C +>E : typeof I +>V3 : I +>1 : 1 + } +} diff --git a/tests/baselines/reference/constIndexedAccess.js b/tests/baselines/reference/constIndexedAccess.js index ea203c38e3ff8..2ea0ed19c3566 100644 --- a/tests/baselines/reference/constIndexedAccess.js +++ b/tests/baselines/reference/constIndexedAccess.js @@ -35,8 +35,8 @@ var s = test[0]; var n = test[1]; var s1 = test[0 /* zero */]; var n1 = test[1 /* one */]; -var s2 = test[0 /* "zero" */]; -var n2 = test[1 /* "one" */]; +var s2 = test[0 /* zero */]; +var n2 = test[1 /* one */]; var numbersNotConst; (function (numbersNotConst) { numbersNotConst[numbersNotConst["zero"] = 0] = "zero"; diff --git a/tests/baselines/reference/declFileImportChainInExportAssignment.errors.txt b/tests/baselines/reference/declFileImportChainInExportAssignment.errors.txt deleted file mode 100644 index f2623dd48503c..0000000000000 --- a/tests/baselines/reference/declFileImportChainInExportAssignment.errors.txt +++ /dev/null @@ -1,16 +0,0 @@ -error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! - - -!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! -!!! related TS-1: The excess diagnostics are: -!!! related TS2749 tests/cases/compiler/declFileImportChainInExportAssignment.ts:7:12: 'm.c' refers to a value, but is being used as a type here. Did you mean 'typeof m.c'? -==== tests/cases/compiler/declFileImportChainInExportAssignment.ts (0 errors) ==== - module m { - export module c { - export class c { - } - } - } - import a = m.c; - import b = a; - export = b; \ No newline at end of file diff --git a/tests/baselines/reference/declFileInternalAliases.errors.txt b/tests/baselines/reference/declFileInternalAliases.errors.txt deleted file mode 100644 index 4ad3c16774e4a..0000000000000 --- a/tests/baselines/reference/declFileInternalAliases.errors.txt +++ /dev/null @@ -1,20 +0,0 @@ -error TS-1: Pre-emit (0) and post-emit (2) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! - - -!!! error TS-1: Pre-emit (0) and post-emit (2) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! -!!! related TS-1: The excess diagnostics are: -!!! related TS2749 tests/cases/compiler/declFileInternalAliases.ts:6:16: 'm.c' refers to a value, but is being used as a type here. Did you mean 'typeof m.c'? -!!! related TS2749 tests/cases/compiler/declFileInternalAliases.ts:10:23: 'm.c' refers to a value, but is being used as a type here. Did you mean 'typeof m.c'? -==== tests/cases/compiler/declFileInternalAliases.ts (0 errors) ==== - module m { - export class c { - } - } - module m1 { - import x = m.c; - export var d = new x(); // emit the type as m.c - } - module m2 { - export import x = m.c; - export var d = new x(); // emit the type as x - } \ No newline at end of file diff --git a/tests/baselines/reference/declarationEmitNameConflicts.errors.txt b/tests/baselines/reference/declarationEmitNameConflicts.errors.txt deleted file mode 100644 index 7fe010e91567d..0000000000000 --- a/tests/baselines/reference/declarationEmitNameConflicts.errors.txt +++ /dev/null @@ -1,56 +0,0 @@ -error TS-1: Pre-emit (0) and post-emit (3) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! - - -!!! error TS-1: Pre-emit (0) and post-emit (3) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! -!!! related TS-1: The excess diagnostics are: -!!! related TS2749 tests/cases/compiler/declarationEmit_nameConflicts_0.ts:10:23: 'M.f' refers to a value, but is being used as a type here. Did you mean 'typeof M.f'? -!!! related TS2724 tests/cases/compiler/declarationEmit_nameConflicts_0.ts:11:25: '"tests/cases/compiler/declarationEmit_nameConflicts_0".M' has no exported member named 'C'. Did you mean 'c'? -!!! related TS2749 tests/cases/compiler/declarationEmit_nameConflicts_0.ts:23:24: 'M.P.f' refers to a value, but is being used as a type here. Did you mean 'typeof M.P.f'? -==== tests/cases/compiler/declarationEmit_nameConflicts_0.ts (0 errors) ==== - import im = require('./declarationEmit_nameConflicts_1'); - export module M { - export function f() { } - export class C { } - export module N { - export function g() { }; - export interface I { } - } - - export import a = M.f; - export import b = M.C; - export import c = N; - export import d = im; - } - - export module M.P { - export function f() { } - export class C { } - export module N { - export function g() { }; - export interface I { } - } - export import im = M.P.f; - export var a = M.a; // emitted incorrectly as typeof f - export var b = M.b; // ok - export var c = M.c; // ok - export var g = M.c.g; // ok - export var d = M.d; // emitted incorrectly as typeof im - } - - export module M.Q { - export function f() { } - export class C { } - export module N { - export function g() { }; - export interface I { } - } - export interface b extends M.b { } // ok - export interface I extends M.c.I { } // ok - export module c { - export interface I extends M.c.I { } // ok - } - } -==== tests/cases/compiler/declarationEmit_nameConflicts_1.ts (0 errors) ==== - module f { export class c { } } - export = f; - \ No newline at end of file diff --git a/tests/baselines/reference/declareDottedExtend.errors.txt b/tests/baselines/reference/declareDottedExtend.errors.txt deleted file mode 100644 index d677a77566a2c..0000000000000 --- a/tests/baselines/reference/declareDottedExtend.errors.txt +++ /dev/null @@ -1,18 +0,0 @@ -error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! - - -!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! -!!! related TS-1: The excess diagnostics are: -!!! related TS2749 tests/cases/compiler/declareDottedExtend.ts:6:13: 'A.B' refers to a value, but is being used as a type here. Did you mean 'typeof A.B'? -==== tests/cases/compiler/declareDottedExtend.ts (0 errors) ==== - declare module A.B - { - export class C{ } - } - - import ab = A.B; - - class D extends ab.C{ } - - class E extends A.B.C{ } - \ No newline at end of file diff --git a/tests/baselines/reference/dependencyViaImportAlias.errors.txt b/tests/baselines/reference/dependencyViaImportAlias.errors.txt deleted file mode 100644 index 26cf25353065f..0000000000000 --- a/tests/baselines/reference/dependencyViaImportAlias.errors.txt +++ /dev/null @@ -1,15 +0,0 @@ -error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! - - -!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! -!!! related TS-1: The excess diagnostics are: -!!! related TS2749 tests/cases/compiler/B.ts:3:12: 'a.A' refers to a value, but is being used as a type here. Did you mean 'typeof a.A'? -==== tests/cases/compiler/B.ts (0 errors) ==== - import a = require('A'); - - import A = a.A; - - export = A; -==== tests/cases/compiler/A.ts (0 errors) ==== - export class A { - } \ No newline at end of file diff --git a/tests/baselines/reference/errorForUsingPropertyOfTypeAsType01.errors.txt b/tests/baselines/reference/errorForUsingPropertyOfTypeAsType01.errors.txt index e2bbafcffff47..6dadb4a4979fe 100644 --- a/tests/baselines/reference/errorForUsingPropertyOfTypeAsType01.errors.txt +++ b/tests/baselines/reference/errorForUsingPropertyOfTypeAsType01.errors.txt @@ -1,4 +1,3 @@ -error TS-1: Pre-emit (12) and post-emit (13) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! tests/cases/compiler/errorForUsingPropertyOfTypeAsType01.ts(6,12): error TS2713: Cannot access 'Foo.bar' because 'Foo' is a type, but not a namespace. Did you mean to retrieve the type of the property 'bar' in 'Foo' with 'Foo["bar"]'? tests/cases/compiler/errorForUsingPropertyOfTypeAsType01.ts(7,22): error TS2713: Cannot access 'Foo.bar' because 'Foo' is a type, but not a namespace. Did you mean to retrieve the type of the property 'bar' in 'Foo' with 'Foo["bar"]'? tests/cases/compiler/errorForUsingPropertyOfTypeAsType01.ts(15,12): error TS2713: Cannot access 'Foo.bar' because 'Foo' is a type, but not a namespace. Did you mean to retrieve the type of the property 'bar' in 'Foo' with 'Foo["bar"]'? @@ -13,9 +12,6 @@ tests/cases/compiler/errorForUsingPropertyOfTypeAsType01.ts(44,24): error TS1003 tests/cases/compiler/errorForUsingPropertyOfTypeAsType01.ts(44,24): error TS2713: Cannot access 'Foo.' because 'Foo' is a type, but not a namespace. Did you mean to retrieve the type of the property '' in 'Foo' with 'Foo[""]'? -!!! error TS-1: Pre-emit (12) and post-emit (13) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! -!!! related TS-1: The excess diagnostics are: -!!! related TS2694 tests/cases/compiler/errorForUsingPropertyOfTypeAsType01.ts:44:20: Namespace 'Test5' has no exported member 'Foo'. ==== tests/cases/compiler/errorForUsingPropertyOfTypeAsType01.ts (12 errors) ==== namespace Test1 { export interface Foo { diff --git a/tests/baselines/reference/es6ModuleInternalImport.errors.txt b/tests/baselines/reference/es6ModuleInternalImport.errors.txt deleted file mode 100644 index 91d6d8e38b4ff..0000000000000 --- a/tests/baselines/reference/es6ModuleInternalImport.errors.txt +++ /dev/null @@ -1,31 +0,0 @@ -error TS-1: Pre-emit (0) and post-emit (6) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! - - -!!! error TS-1: Pre-emit (0) and post-emit (6) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! -!!! related TS-1: The excess diagnostics are: -!!! related TS2749 tests/cases/compiler/es6ModuleInternalImport.ts:4:20: 'm.a' refers to a value, but is being used as a type here. Did you mean 'typeof m.a'? -!!! related TS2749 tests/cases/compiler/es6ModuleInternalImport.ts:5:13: 'm.a' refers to a value, but is being used as a type here. Did you mean 'typeof m.a'? -!!! related TS2749 tests/cases/compiler/es6ModuleInternalImport.ts:8:24: 'm.a' refers to a value, but is being used as a type here. Did you mean 'typeof m.a'? -!!! related TS2749 tests/cases/compiler/es6ModuleInternalImport.ts:9:17: 'm.a' refers to a value, but is being used as a type here. Did you mean 'typeof m.a'? -!!! related TS2749 tests/cases/compiler/es6ModuleInternalImport.ts:14:24: 'm.a' refers to a value, but is being used as a type here. Did you mean 'typeof m.a'? -!!! related TS2749 tests/cases/compiler/es6ModuleInternalImport.ts:15:17: 'm.a' refers to a value, but is being used as a type here. Did you mean 'typeof m.a'? -==== tests/cases/compiler/es6ModuleInternalImport.ts (0 errors) ==== - export module m { - export var a = 10; - } - export import a1 = m.a; - import a2 = m.a; - var x = a1 + a2; - export module m1 { - export import a3 = m.a; - import a4 = m.a; - var x = a1 + a2; - var x2 = a3 + a4; - } - module m2 { - export import a3 = m.a; - import a4 = m.a; - var x = a1 + a2; - var x2 = a3 + a4; - var x4 = m1.a3 + m2.a3; - } \ No newline at end of file diff --git a/tests/baselines/reference/exportDefaultProperty.errors.txt b/tests/baselines/reference/exportDefaultProperty.errors.txt deleted file mode 100644 index 9713c4b42b88d..0000000000000 --- a/tests/baselines/reference/exportDefaultProperty.errors.txt +++ /dev/null @@ -1,46 +0,0 @@ -error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! - - -!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! -!!! related TS-1: The excess diagnostics are: -!!! related TS2749 tests/cases/compiler/index.ts:3:12: 'fooBar.X' refers to a value, but is being used as a type here. Did you mean 'typeof fooBar.X'? -==== tests/cases/compiler/index.ts (0 errors) ==== - /// - import fooBar from "foobar"; - import X = fooBar.X; - import X2 from "foobarx"; - const x: X = X; - const x2: X2 = X2; - - import B from "./a"; - const b: B = new B(B.b); - - import fooLength from "./b"; - fooLength + 1; - -==== tests/cases/compiler/declarations.d.ts (0 errors) ==== - // This test is just like exportEqualsProperty, but with `export default`. - - declare namespace foo.bar { - export type X = number; - export const X: number; - } - - declare module "foobar" { - export default foo.bar; - } - - declare module "foobarx" { - export default foo.bar.X; - } - -==== tests/cases/compiler/a.ts (0 errors) ==== - namespace A { - export class B { constructor(b: number) {} } - export namespace B { export const b: number = 0; } - } - export default A.B; - -==== tests/cases/compiler/b.ts (0 errors) ==== - export default "foo".length; - \ No newline at end of file diff --git a/tests/baselines/reference/exportImportAlias.errors.txt b/tests/baselines/reference/exportImportAlias.errors.txt deleted file mode 100644 index c7bda1b5b9974..0000000000000 --- a/tests/baselines/reference/exportImportAlias.errors.txt +++ /dev/null @@ -1,76 +0,0 @@ -error TS-1: Pre-emit (0) and post-emit (2) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! - - -!!! error TS-1: Pre-emit (0) and post-emit (2) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! -!!! related TS-1: The excess diagnostics are: -!!! related TS2749 tests/cases/conformance/internalModules/importDeclarations/exportImportAlias.ts:40:23: 'X.Y' refers to a value, but is being used as a type here. Did you mean 'typeof X.Y'? -!!! related TS2749 tests/cases/conformance/internalModules/importDeclarations/exportImportAlias.ts:61:23: 'K.L' refers to a value, but is being used as a type here. Did you mean 'typeof K.L'? -==== tests/cases/conformance/internalModules/importDeclarations/exportImportAlias.ts (0 errors) ==== - // expect no errors here - - module A { - - export var x = 'hello world' - export class Point { - constructor(public x: number, public y: number) { } - } - export module B { - export interface Id { - name: string; - } - } - } - - module C { - export import a = A; - } - - var a: string = C.a.x; - var b: { x: number; y: number; } = new C.a.Point(0, 0); - var c: { name: string }; - var c: C.a.B.Id; - - module X { - export function Y() { - return 42; - } - - export module Y { - export class Point { - constructor(public x: number, public y: number) { } - } - } - } - - module Z { - - // 'y' should be a fundule here - export import y = X.Y; - } - - var m: number = Z.y(); - var n: { x: number; y: number; } = new Z.y.Point(0, 0); - - module K { - export class L { - constructor(public name: string) { } - } - - export module L { - export var y = 12; - export interface Point { - x: number; - y: number; - } - } - } - - module M { - export import D = K.L; - } - - var o: { name: string }; - var o = new M.D('Hello'); - - var p: { x: number; y: number; } - var p: M.D.Point; \ No newline at end of file diff --git a/tests/baselines/reference/exportImportAndClodule.errors.txt b/tests/baselines/reference/exportImportAndClodule.errors.txt deleted file mode 100644 index 1136e1c25af0d..0000000000000 --- a/tests/baselines/reference/exportImportAndClodule.errors.txt +++ /dev/null @@ -1,26 +0,0 @@ -error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! - - -!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! -!!! related TS-1: The excess diagnostics are: -!!! related TS2749 tests/cases/compiler/exportImportAndClodule.ts:14:23: 'K.L' refers to a value, but is being used as a type here. Did you mean 'typeof K.L'? -==== tests/cases/compiler/exportImportAndClodule.ts (0 errors) ==== - module K { - export class L { - constructor(public name: string) { } - } - export module L { - export var y = 12; - export interface Point { - x: number; - y: number; - } - } - } - module M { - export import D = K.L; - } - var o: { name: string }; - var o = new M.D('Hello'); - var p: { x: number; y: number; } - var p: M.D.Point; \ No newline at end of file diff --git a/tests/baselines/reference/exportsAndImports1-amd.errors.txt b/tests/baselines/reference/exportsAndImports1-amd.errors.txt deleted file mode 100644 index 6ae0c3200d3a5..0000000000000 --- a/tests/baselines/reference/exportsAndImports1-amd.errors.txt +++ /dev/null @@ -1,38 +0,0 @@ -error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! - - -!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! -!!! related TS-1: The excess diagnostics are: -!!! related TS2749 tests/cases/conformance/es6/modules/t1.ts:21:12: 'M.x' refers to a value, but is being used as a type here. Did you mean 'typeof M.x'? -==== tests/cases/conformance/es6/modules/t1.ts (0 errors) ==== - var v = 1; - function f() { } - class C { - } - interface I { - } - enum E { - A, B, C - } - const enum D { - A, B, C - } - module M { - export var x; - } - module N { - export interface I { - } - } - type T = number; - import a = M.x; - - export { v, f, C, I, E, D, M, N, T, a }; - -==== tests/cases/conformance/es6/modules/t2.ts (0 errors) ==== - export { v, f, C, I, E, D, M, N, T, a } from "./t1"; - -==== tests/cases/conformance/es6/modules/t3.ts (0 errors) ==== - import { v, f, C, I, E, D, M, N, T, a } from "./t1"; - export { v, f, C, I, E, D, M, N, T, a }; - \ No newline at end of file diff --git a/tests/baselines/reference/exportsAndImports1-es6.errors.txt b/tests/baselines/reference/exportsAndImports1-es6.errors.txt deleted file mode 100644 index 6ae0c3200d3a5..0000000000000 --- a/tests/baselines/reference/exportsAndImports1-es6.errors.txt +++ /dev/null @@ -1,38 +0,0 @@ -error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! - - -!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! -!!! related TS-1: The excess diagnostics are: -!!! related TS2749 tests/cases/conformance/es6/modules/t1.ts:21:12: 'M.x' refers to a value, but is being used as a type here. Did you mean 'typeof M.x'? -==== tests/cases/conformance/es6/modules/t1.ts (0 errors) ==== - var v = 1; - function f() { } - class C { - } - interface I { - } - enum E { - A, B, C - } - const enum D { - A, B, C - } - module M { - export var x; - } - module N { - export interface I { - } - } - type T = number; - import a = M.x; - - export { v, f, C, I, E, D, M, N, T, a }; - -==== tests/cases/conformance/es6/modules/t2.ts (0 errors) ==== - export { v, f, C, I, E, D, M, N, T, a } from "./t1"; - -==== tests/cases/conformance/es6/modules/t3.ts (0 errors) ==== - import { v, f, C, I, E, D, M, N, T, a } from "./t1"; - export { v, f, C, I, E, D, M, N, T, a }; - \ No newline at end of file diff --git a/tests/baselines/reference/exportsAndImports1.errors.txt b/tests/baselines/reference/exportsAndImports1.errors.txt deleted file mode 100644 index 6ae0c3200d3a5..0000000000000 --- a/tests/baselines/reference/exportsAndImports1.errors.txt +++ /dev/null @@ -1,38 +0,0 @@ -error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! - - -!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! -!!! related TS-1: The excess diagnostics are: -!!! related TS2749 tests/cases/conformance/es6/modules/t1.ts:21:12: 'M.x' refers to a value, but is being used as a type here. Did you mean 'typeof M.x'? -==== tests/cases/conformance/es6/modules/t1.ts (0 errors) ==== - var v = 1; - function f() { } - class C { - } - interface I { - } - enum E { - A, B, C - } - const enum D { - A, B, C - } - module M { - export var x; - } - module N { - export interface I { - } - } - type T = number; - import a = M.x; - - export { v, f, C, I, E, D, M, N, T, a }; - -==== tests/cases/conformance/es6/modules/t2.ts (0 errors) ==== - export { v, f, C, I, E, D, M, N, T, a } from "./t1"; - -==== tests/cases/conformance/es6/modules/t3.ts (0 errors) ==== - import { v, f, C, I, E, D, M, N, T, a } from "./t1"; - export { v, f, C, I, E, D, M, N, T, a }; - \ No newline at end of file diff --git a/tests/baselines/reference/exportsAndImports3-amd.errors.txt b/tests/baselines/reference/exportsAndImports3-amd.errors.txt deleted file mode 100644 index f0333f69d35a1..0000000000000 --- a/tests/baselines/reference/exportsAndImports3-amd.errors.txt +++ /dev/null @@ -1,38 +0,0 @@ -error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! - - -!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! -!!! related TS-1: The excess diagnostics are: -!!! related TS2749 tests/cases/conformance/es6/modules/t1.ts:21:19: 'M.x' refers to a value, but is being used as a type here. Did you mean 'typeof M.x'? -==== tests/cases/conformance/es6/modules/t1.ts (0 errors) ==== - export var v = 1; - export function f() { } - export class C { - } - export interface I { - } - export enum E { - A, B, C - } - export const enum D { - A, B, C - } - export module M { - export var x; - } - export module N { - export interface I { - } - } - export type T = number; - export import a = M.x; - - export { v as v1, f as f1, C as C1, I as I1, E as E1, D as D1, M as M1, N as N1, T as T1, a as a1 }; - -==== tests/cases/conformance/es6/modules/t2.ts (0 errors) ==== - export { v1 as v, f1 as f, C1 as C, I1 as I, E1 as E, D1 as D, M1 as M, N1 as N, T1 as T, a1 as a } from "./t1"; - -==== tests/cases/conformance/es6/modules/t3.ts (0 errors) ==== - import { v1 as v, f1 as f, C1 as C, I1 as I, E1 as E, D1 as D, M1 as M, N1 as N, T1 as T, a1 as a } from "./t1"; - export { v, f, C, I, E, D, M, N, T, a }; - \ No newline at end of file diff --git a/tests/baselines/reference/exportsAndImports3-es6.errors.txt b/tests/baselines/reference/exportsAndImports3-es6.errors.txt deleted file mode 100644 index f0333f69d35a1..0000000000000 --- a/tests/baselines/reference/exportsAndImports3-es6.errors.txt +++ /dev/null @@ -1,38 +0,0 @@ -error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! - - -!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! -!!! related TS-1: The excess diagnostics are: -!!! related TS2749 tests/cases/conformance/es6/modules/t1.ts:21:19: 'M.x' refers to a value, but is being used as a type here. Did you mean 'typeof M.x'? -==== tests/cases/conformance/es6/modules/t1.ts (0 errors) ==== - export var v = 1; - export function f() { } - export class C { - } - export interface I { - } - export enum E { - A, B, C - } - export const enum D { - A, B, C - } - export module M { - export var x; - } - export module N { - export interface I { - } - } - export type T = number; - export import a = M.x; - - export { v as v1, f as f1, C as C1, I as I1, E as E1, D as D1, M as M1, N as N1, T as T1, a as a1 }; - -==== tests/cases/conformance/es6/modules/t2.ts (0 errors) ==== - export { v1 as v, f1 as f, C1 as C, I1 as I, E1 as E, D1 as D, M1 as M, N1 as N, T1 as T, a1 as a } from "./t1"; - -==== tests/cases/conformance/es6/modules/t3.ts (0 errors) ==== - import { v1 as v, f1 as f, C1 as C, I1 as I, E1 as E, D1 as D, M1 as M, N1 as N, T1 as T, a1 as a } from "./t1"; - export { v, f, C, I, E, D, M, N, T, a }; - \ No newline at end of file diff --git a/tests/baselines/reference/exportsAndImports3.errors.txt b/tests/baselines/reference/exportsAndImports3.errors.txt deleted file mode 100644 index f0333f69d35a1..0000000000000 --- a/tests/baselines/reference/exportsAndImports3.errors.txt +++ /dev/null @@ -1,38 +0,0 @@ -error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! - - -!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! -!!! related TS-1: The excess diagnostics are: -!!! related TS2749 tests/cases/conformance/es6/modules/t1.ts:21:19: 'M.x' refers to a value, but is being used as a type here. Did you mean 'typeof M.x'? -==== tests/cases/conformance/es6/modules/t1.ts (0 errors) ==== - export var v = 1; - export function f() { } - export class C { - } - export interface I { - } - export enum E { - A, B, C - } - export const enum D { - A, B, C - } - export module M { - export var x; - } - export module N { - export interface I { - } - } - export type T = number; - export import a = M.x; - - export { v as v1, f as f1, C as C1, I as I1, E as E1, D as D1, M as M1, N as N1, T as T1, a as a1 }; - -==== tests/cases/conformance/es6/modules/t2.ts (0 errors) ==== - export { v1 as v, f1 as f, C1 as C, I1 as I, E1 as E, D1 as D, M1 as M, N1 as N, T1 as T, a1 as a } from "./t1"; - -==== tests/cases/conformance/es6/modules/t3.ts (0 errors) ==== - import { v1 as v, f1 as f, C1 as C, I1 as I, E1 as E, D1 as D, M1 as M, N1 as N, T1 as T, a1 as a } from "./t1"; - export { v, f, C, I, E, D, M, N, T, a }; - \ No newline at end of file diff --git a/tests/baselines/reference/importAliasFromNamespace.errors.txt b/tests/baselines/reference/importAliasFromNamespace.errors.txt deleted file mode 100644 index 29226a64c1757..0000000000000 --- a/tests/baselines/reference/importAliasFromNamespace.errors.txt +++ /dev/null @@ -1,26 +0,0 @@ -error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! - - -!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! -!!! related TS-1: The excess diagnostics are: -!!! related TS2749 tests/cases/compiler/usage.ts:3:23: 'My.Internal' refers to a value, but is being used as a type here. Did you mean 'typeof My.Internal'? -==== tests/cases/compiler/usage.ts (0 errors) ==== - /// - namespace SomeOther.Thing { - import Internal = My.Internal; - export class Foo { - private _which: Internal.WhichThing; - constructor() { - Internal.getThing(); - Internal.WhichThing.A ? "foo" : "bar"; - } - } - } -==== tests/cases/compiler/internal.ts (0 errors) ==== - namespace My.Internal { - export function getThing(): void {} - export const enum WhichThing { - A, B, C - } - } - \ No newline at end of file diff --git a/tests/baselines/reference/importAliasWithDottedName.errors.txt b/tests/baselines/reference/importAliasWithDottedName.errors.txt deleted file mode 100644 index 89844b03b92fe..0000000000000 --- a/tests/baselines/reference/importAliasWithDottedName.errors.txt +++ /dev/null @@ -1,19 +0,0 @@ -error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! - - -!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! -!!! related TS-1: The excess diagnostics are: -!!! related TS2749 tests/cases/compiler/importAliasWithDottedName.ts:9:16: 'M.N' refers to a value, but is being used as a type here. Did you mean 'typeof M.N'? -==== tests/cases/compiler/importAliasWithDottedName.ts (0 errors) ==== - module M { - export var x = 1; - export module N { - export var y = 2; - } - } - - module A { - import N = M.N; - var r = N.y; - var r2 = M.N.y; - } \ No newline at end of file diff --git a/tests/baselines/reference/importAndVariableDeclarationConflict1.errors.txt b/tests/baselines/reference/importAndVariableDeclarationConflict1.errors.txt index 2ec61889f07b6..145540914a7f9 100644 --- a/tests/baselines/reference/importAndVariableDeclarationConflict1.errors.txt +++ b/tests/baselines/reference/importAndVariableDeclarationConflict1.errors.txt @@ -1,10 +1,6 @@ -error TS-1: Pre-emit (1) and post-emit (2) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! tests/cases/compiler/importAndVariableDeclarationConflict1.ts(5,1): error TS2440: Import declaration conflicts with local declaration of 'x'. -!!! error TS-1: Pre-emit (1) and post-emit (2) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! -!!! related TS-1: The excess diagnostics are: -!!! related TS2749 tests/cases/compiler/importAndVariableDeclarationConflict1.ts:5:12: 'm.m' refers to a value, but is being used as a type here. Did you mean 'typeof m.m'? ==== tests/cases/compiler/importAndVariableDeclarationConflict1.ts (1 errors) ==== module m { export var m = ''; diff --git a/tests/baselines/reference/importAndVariableDeclarationConflict2.errors.txt b/tests/baselines/reference/importAndVariableDeclarationConflict2.errors.txt deleted file mode 100644 index 8b42a7a28ecf3..0000000000000 --- a/tests/baselines/reference/importAndVariableDeclarationConflict2.errors.txt +++ /dev/null @@ -1,18 +0,0 @@ -error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! - - -!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! -!!! related TS-1: The excess diagnostics are: -!!! related TS2749 tests/cases/compiler/importAndVariableDeclarationConflict2.ts:5:12: 'm.m' refers to a value, but is being used as a type here. Did you mean 'typeof m.m'? -==== tests/cases/compiler/importAndVariableDeclarationConflict2.ts (0 errors) ==== - module m { - export var m = ''; - } - - import x = m.m; - - class C { - public foo() { - var x = ''; - } - } \ No newline at end of file diff --git a/tests/baselines/reference/importAndVariableDeclarationConflict3.errors.txt b/tests/baselines/reference/importAndVariableDeclarationConflict3.errors.txt index c016034e8b3ca..39567a11753d4 100644 --- a/tests/baselines/reference/importAndVariableDeclarationConflict3.errors.txt +++ b/tests/baselines/reference/importAndVariableDeclarationConflict3.errors.txt @@ -1,12 +1,7 @@ -error TS-1: Pre-emit (2) and post-emit (4) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! tests/cases/compiler/importAndVariableDeclarationConflict3.ts(5,8): error TS2300: Duplicate identifier 'x'. tests/cases/compiler/importAndVariableDeclarationConflict3.ts(6,8): error TS2300: Duplicate identifier 'x'. -!!! error TS-1: Pre-emit (2) and post-emit (4) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! -!!! related TS-1: The excess diagnostics are: -!!! related TS2749 tests/cases/compiler/importAndVariableDeclarationConflict3.ts:5:12: 'm.m' refers to a value, but is being used as a type here. Did you mean 'typeof m.m'? -!!! related TS2749 tests/cases/compiler/importAndVariableDeclarationConflict3.ts:6:12: 'm.m' refers to a value, but is being used as a type here. Did you mean 'typeof m.m'? ==== tests/cases/compiler/importAndVariableDeclarationConflict3.ts (2 errors) ==== module m { export var m = ''; diff --git a/tests/baselines/reference/importAndVariableDeclarationConflict4.errors.txt b/tests/baselines/reference/importAndVariableDeclarationConflict4.errors.txt index 61853aa9ec057..8dbbf76a1dc4b 100644 --- a/tests/baselines/reference/importAndVariableDeclarationConflict4.errors.txt +++ b/tests/baselines/reference/importAndVariableDeclarationConflict4.errors.txt @@ -1,10 +1,6 @@ -error TS-1: Pre-emit (1) and post-emit (2) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! tests/cases/compiler/importAndVariableDeclarationConflict4.ts(6,1): error TS2440: Import declaration conflicts with local declaration of 'x'. -!!! error TS-1: Pre-emit (1) and post-emit (2) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! -!!! related TS-1: The excess diagnostics are: -!!! related TS2749 tests/cases/compiler/importAndVariableDeclarationConflict4.ts:6:12: 'm.m' refers to a value, but is being used as a type here. Did you mean 'typeof m.m'? ==== tests/cases/compiler/importAndVariableDeclarationConflict4.ts (1 errors) ==== module m { export var m = ''; diff --git a/tests/baselines/reference/importEquals3.errors.txt b/tests/baselines/reference/importEquals3.errors.txt index 877153c03f33d..b718e556d20d9 100644 --- a/tests/baselines/reference/importEquals3.errors.txt +++ b/tests/baselines/reference/importEquals3.errors.txt @@ -1,13 +1,9 @@ -error TS-1: Pre-emit (4) and post-emit (5) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! tests/cases/conformance/externalModules/typeOnly/b.ts(2,12): error TS1380: An import alias cannot reference a declaration that was imported using 'import type'. tests/cases/conformance/externalModules/typeOnly/b.ts(3,13): error TS1380: An import alias cannot reference a declaration that was imported using 'import type'. tests/cases/conformance/externalModules/typeOnly/c.ts(2,12): error TS1380: An import alias cannot reference a declaration that was imported using 'import type'. tests/cases/conformance/externalModules/typeOnly/c.ts(3,13): error TS1380: An import alias cannot reference a declaration that was imported using 'import type'. -!!! error TS-1: Pre-emit (4) and post-emit (5) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! -!!! related TS-1: The excess diagnostics are: -!!! related TS2749 tests/cases/conformance/externalModules/typeOnly/c.ts:5:12: 'b.x' refers to a value, but is being used as a type here. Did you mean 'typeof b.x'? ==== tests/cases/conformance/externalModules/typeOnly/a.ts (0 errors) ==== export class A {} diff --git a/tests/baselines/reference/importOnAliasedIdentifiers.errors.txt b/tests/baselines/reference/importOnAliasedIdentifiers.errors.txt deleted file mode 100644 index 897f6d1ad202e..0000000000000 --- a/tests/baselines/reference/importOnAliasedIdentifiers.errors.txt +++ /dev/null @@ -1,17 +0,0 @@ -error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! - - -!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! -!!! related TS-1: The excess diagnostics are: -!!! related TS2749 tests/cases/compiler/importOnAliasedIdentifiers.ts:8:16: 'A.X' refers to a value, but is being used as a type here. Did you mean 'typeof A.X'? -==== tests/cases/compiler/importOnAliasedIdentifiers.ts (0 errors) ==== - module A { - export interface X { s: string } - export var X: X; - } - module B { - interface A { n: number } - import Y = A; // Alias only for module A - import Z = A.X; // Alias for both type and member A.X - var v: Z = Z; - } \ No newline at end of file diff --git a/tests/baselines/reference/import_reference-exported-alias.errors.txt b/tests/baselines/reference/import_reference-exported-alias.errors.txt deleted file mode 100644 index 19aba949ca2e1..0000000000000 --- a/tests/baselines/reference/import_reference-exported-alias.errors.txt +++ /dev/null @@ -1,27 +0,0 @@ -error TS-1: Pre-emit (0) and post-emit (2) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! - - -!!! error TS-1: Pre-emit (0) and post-emit (2) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! -!!! related TS-1: The excess diagnostics are: -!!! related TS2749 tests/cases/compiler/file2.ts:2:19: 'appJs.Services' refers to a value, but is being used as a type here. Did you mean 'typeof appJs.Services'? -!!! related TS2749 tests/cases/compiler/file2.ts:3:23: 'Services.UserServices' refers to a value, but is being used as a type here. Did you mean 'typeof Services.UserServices'? -==== tests/cases/compiler/file2.ts (0 errors) ==== - import appJs = require("file1"); - import Services = appJs.Services; - import UserServices = Services.UserServices; - var x = new UserServices().getUserName(); - -==== tests/cases/compiler/file1.ts (0 errors) ==== - module App { - export module Services { - export class UserServices { - public getUserName(): string { - return "Bill Gates"; - } - } - } - } - - import Mod = App; - export = Mod; - \ No newline at end of file diff --git a/tests/baselines/reference/import_reference-to-type-alias.errors.txt b/tests/baselines/reference/import_reference-to-type-alias.errors.txt deleted file mode 100644 index 18562e4c51618..0000000000000 --- a/tests/baselines/reference/import_reference-to-type-alias.errors.txt +++ /dev/null @@ -1,22 +0,0 @@ -error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! - - -!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! -!!! related TS-1: The excess diagnostics are: -!!! related TS2749 tests/cases/compiler/file2.ts:2:19: 'appJs.App.Services' refers to a value, but is being used as a type here. Did you mean 'typeof appJs.App.Services'? -==== tests/cases/compiler/file2.ts (0 errors) ==== - import appJs = require("file1"); - import Services = appJs.App.Services; - var x = new Services.UserServices().getUserName(); - -==== tests/cases/compiler/file1.ts (0 errors) ==== - export module App { - export module Services { - export class UserServices { - public getUserName(): string { - return "Bill Gates"; - } - } - } - } - \ No newline at end of file diff --git a/tests/baselines/reference/innerAliases.errors.txt b/tests/baselines/reference/innerAliases.errors.txt index f3731a1149cca..874ef98ccce39 100644 --- a/tests/baselines/reference/innerAliases.errors.txt +++ b/tests/baselines/reference/innerAliases.errors.txt @@ -1,11 +1,7 @@ -error TS-1: Pre-emit (2) and post-emit (3) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! tests/cases/compiler/innerAliases.ts(19,10): error TS2694: Namespace 'D' has no exported member 'inner'. tests/cases/compiler/innerAliases.ts(21,11): error TS2339: Property 'inner' does not exist on type 'typeof D'. -!!! error TS-1: Pre-emit (2) and post-emit (3) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! -!!! related TS-1: The excess diagnostics are: -!!! related TS2749 tests/cases/compiler/innerAliases.ts:10:20: 'A.B.C' refers to a value, but is being used as a type here. Did you mean 'typeof A.B.C'? ==== tests/cases/compiler/innerAliases.ts (2 errors) ==== module A { export module B { diff --git a/tests/baselines/reference/internalAliasClass.errors.txt b/tests/baselines/reference/internalAliasClass.errors.txt deleted file mode 100644 index 070f07291b42f..0000000000000 --- a/tests/baselines/reference/internalAliasClass.errors.txt +++ /dev/null @@ -1,16 +0,0 @@ -error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! - - -!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! -!!! related TS-1: The excess diagnostics are: -!!! related TS2749 tests/cases/compiler/internalAliasClass.ts:7:16: 'a.c' refers to a value, but is being used as a type here. Did you mean 'typeof a.c'? -==== tests/cases/compiler/internalAliasClass.ts (0 errors) ==== - module a { - export class c { - } - } - - module c { - import b = a.c; - export var x: b = new b(); - } \ No newline at end of file diff --git a/tests/baselines/reference/internalAliasClassInsideLocalModuleWithExport.errors.txt b/tests/baselines/reference/internalAliasClassInsideLocalModuleWithExport.errors.txt deleted file mode 100644 index ecc51f2cc54c1..0000000000000 --- a/tests/baselines/reference/internalAliasClassInsideLocalModuleWithExport.errors.txt +++ /dev/null @@ -1,24 +0,0 @@ -error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! - - -!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! -!!! related TS-1: The excess diagnostics are: -!!! related TS2749 tests/cases/compiler/internalAliasClassInsideLocalModuleWithExport.ts:11:27: 'x.c' refers to a value, but is being used as a type here. Did you mean 'typeof x.c'? -==== tests/cases/compiler/internalAliasClassInsideLocalModuleWithExport.ts (0 errors) ==== - export module x { - export class c { - foo(a: number) { - return a; - } - } - } - - export module m2 { - export module m3 { - export import c = x.c; - export var cProp = new c(); - var cReturnVal = cProp.foo(10); - } - } - - export var d = new m2.m3.c(); \ No newline at end of file diff --git a/tests/baselines/reference/internalAliasClassInsideLocalModuleWithoutExport.errors.txt b/tests/baselines/reference/internalAliasClassInsideLocalModuleWithoutExport.errors.txt deleted file mode 100644 index 45949e87fc848..0000000000000 --- a/tests/baselines/reference/internalAliasClassInsideLocalModuleWithoutExport.errors.txt +++ /dev/null @@ -1,22 +0,0 @@ -error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! - - -!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! -!!! related TS-1: The excess diagnostics are: -!!! related TS2749 tests/cases/compiler/internalAliasClassInsideLocalModuleWithoutExport.ts:11:20: 'x.c' refers to a value, but is being used as a type here. Did you mean 'typeof x.c'? -==== tests/cases/compiler/internalAliasClassInsideLocalModuleWithoutExport.ts (0 errors) ==== - export module x { - export class c { - foo(a: number) { - return a; - } - } - } - - export module m2 { - export module m3 { - import c = x.c; - export var cProp = new c(); - var cReturnVal = cProp.foo(10); - } - } \ No newline at end of file diff --git a/tests/baselines/reference/internalAliasClassInsideLocalModuleWithoutExportAccessError.errors.txt b/tests/baselines/reference/internalAliasClassInsideLocalModuleWithoutExportAccessError.errors.txt index 3a27bf04c35ac..ee6a580ef40cf 100644 --- a/tests/baselines/reference/internalAliasClassInsideLocalModuleWithoutExportAccessError.errors.txt +++ b/tests/baselines/reference/internalAliasClassInsideLocalModuleWithoutExportAccessError.errors.txt @@ -1,10 +1,6 @@ -error TS-1: Pre-emit (1) and post-emit (2) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! tests/cases/compiler/internalAliasClassInsideLocalModuleWithoutExportAccessError.ts(17,26): error TS2339: Property 'c' does not exist on type 'typeof m3'. -!!! error TS-1: Pre-emit (1) and post-emit (2) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! -!!! related TS-1: The excess diagnostics are: -!!! related TS2749 tests/cases/compiler/internalAliasClassInsideLocalModuleWithoutExportAccessError.ts:11:20: 'x.c' refers to a value, but is being used as a type here. Did you mean 'typeof x.c'? ==== tests/cases/compiler/internalAliasClassInsideLocalModuleWithoutExportAccessError.ts (1 errors) ==== export module x { export class c { diff --git a/tests/baselines/reference/internalAliasClassInsideTopLevelModuleWithExport.errors.txt b/tests/baselines/reference/internalAliasClassInsideTopLevelModuleWithExport.errors.txt deleted file mode 100644 index 445e5063555b2..0000000000000 --- a/tests/baselines/reference/internalAliasClassInsideTopLevelModuleWithExport.errors.txt +++ /dev/null @@ -1,18 +0,0 @@ -error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! - - -!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! -!!! related TS-1: The excess diagnostics are: -!!! related TS2749 tests/cases/compiler/internalAliasClassInsideTopLevelModuleWithExport.ts:9:20: 'x.c' refers to a value, but is being used as a type here. Did you mean 'typeof x.c'? -==== tests/cases/compiler/internalAliasClassInsideTopLevelModuleWithExport.ts (0 errors) ==== - export module x { - export class c { - foo(a: number) { - return a; - } - } - } - - export import xc = x.c; - export var cProp = new xc(); - var cReturnVal = cProp.foo(10); \ No newline at end of file diff --git a/tests/baselines/reference/internalAliasClassInsideTopLevelModuleWithoutExport.errors.txt b/tests/baselines/reference/internalAliasClassInsideTopLevelModuleWithoutExport.errors.txt deleted file mode 100644 index bbf39763f034a..0000000000000 --- a/tests/baselines/reference/internalAliasClassInsideTopLevelModuleWithoutExport.errors.txt +++ /dev/null @@ -1,18 +0,0 @@ -error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! - - -!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! -!!! related TS-1: The excess diagnostics are: -!!! related TS2749 tests/cases/compiler/internalAliasClassInsideTopLevelModuleWithoutExport.ts:9:13: 'x.c' refers to a value, but is being used as a type here. Did you mean 'typeof x.c'? -==== tests/cases/compiler/internalAliasClassInsideTopLevelModuleWithoutExport.ts (0 errors) ==== - export module x { - export class c { - foo(a: number) { - return a; - } - } - } - - import xc = x.c; - export var cProp = new xc(); - var cReturnVal = cProp.foo(10); \ No newline at end of file diff --git a/tests/baselines/reference/internalAliasEnum.errors.txt b/tests/baselines/reference/internalAliasEnum.errors.txt deleted file mode 100644 index 186b34d9b954a..0000000000000 --- a/tests/baselines/reference/internalAliasEnum.errors.txt +++ /dev/null @@ -1,20 +0,0 @@ -error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! - - -!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! -!!! related TS-1: The excess diagnostics are: -!!! related TS2749 tests/cases/compiler/internalAliasEnum.ts:10:16: 'a.weekend' refers to a value, but is being used as a type here. Did you mean 'typeof a.weekend'? -==== tests/cases/compiler/internalAliasEnum.ts (0 errors) ==== - module a { - export enum weekend { - Friday, - Saturday, - Sunday - } - } - - module c { - import b = a.weekend; - export var bVal: b = b.Sunday; - } - \ No newline at end of file diff --git a/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithExport.errors.txt b/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithExport.errors.txt deleted file mode 100644 index 8715858106777..0000000000000 --- a/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithExport.errors.txt +++ /dev/null @@ -1,20 +0,0 @@ -error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! - - -!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! -!!! related TS-1: The excess diagnostics are: -!!! related TS2749 tests/cases/compiler/internalAliasEnumInsideLocalModuleWithExport.ts:10:23: 'a.weekend' refers to a value, but is being used as a type here. Did you mean 'typeof a.weekend'? -==== tests/cases/compiler/internalAliasEnumInsideLocalModuleWithExport.ts (0 errors) ==== - export module a { - export enum weekend { - Friday, - Saturday, - Sunday - } - } - - export module c { - export import b = a.weekend; - export var bVal: b = b.Sunday; - } - \ No newline at end of file diff --git a/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithoutExport.errors.txt b/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithoutExport.errors.txt deleted file mode 100644 index c98ad95ec2762..0000000000000 --- a/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithoutExport.errors.txt +++ /dev/null @@ -1,20 +0,0 @@ -error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! - - -!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! -!!! related TS-1: The excess diagnostics are: -!!! related TS2749 tests/cases/compiler/internalAliasEnumInsideLocalModuleWithoutExport.ts:10:16: 'a.weekend' refers to a value, but is being used as a type here. Did you mean 'typeof a.weekend'? -==== tests/cases/compiler/internalAliasEnumInsideLocalModuleWithoutExport.ts (0 errors) ==== - export module a { - export enum weekend { - Friday, - Saturday, - Sunday - } - } - - export module c { - import b = a.weekend; - export var bVal: b = b.Sunday; - } - \ No newline at end of file diff --git a/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithoutExportAccessError.errors.txt b/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithoutExportAccessError.errors.txt index b47352fcdd456..ff1739be202f4 100644 --- a/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithoutExportAccessError.errors.txt +++ b/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithoutExportAccessError.errors.txt @@ -1,10 +1,6 @@ -error TS-1: Pre-emit (1) and post-emit (2) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! tests/cases/compiler/internalAliasEnumInsideLocalModuleWithoutExportAccessError.ts(14,21): error TS2339: Property 'b' does not exist on type 'typeof c'. -!!! error TS-1: Pre-emit (1) and post-emit (2) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! -!!! related TS-1: The excess diagnostics are: -!!! related TS2749 tests/cases/compiler/internalAliasEnumInsideLocalModuleWithoutExportAccessError.ts:10:16: 'a.weekend' refers to a value, but is being used as a type here. Did you mean 'typeof a.weekend'? ==== tests/cases/compiler/internalAliasEnumInsideLocalModuleWithoutExportAccessError.ts (1 errors) ==== export module a { export enum weekend { diff --git a/tests/baselines/reference/internalAliasEnumInsideTopLevelModuleWithExport.errors.txt b/tests/baselines/reference/internalAliasEnumInsideTopLevelModuleWithExport.errors.txt deleted file mode 100644 index 3701aa6a4bb76..0000000000000 --- a/tests/baselines/reference/internalAliasEnumInsideTopLevelModuleWithExport.errors.txt +++ /dev/null @@ -1,18 +0,0 @@ -error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! - - -!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! -!!! related TS-1: The excess diagnostics are: -!!! related TS2749 tests/cases/compiler/internalAliasEnumInsideTopLevelModuleWithExport.ts:9:19: 'a.weekend' refers to a value, but is being used as a type here. Did you mean 'typeof a.weekend'? -==== tests/cases/compiler/internalAliasEnumInsideTopLevelModuleWithExport.ts (0 errors) ==== - export module a { - export enum weekend { - Friday, - Saturday, - Sunday - } - } - - export import b = a.weekend; - export var bVal: b = b.Sunday; - \ No newline at end of file diff --git a/tests/baselines/reference/internalAliasEnumInsideTopLevelModuleWithoutExport.errors.txt b/tests/baselines/reference/internalAliasEnumInsideTopLevelModuleWithoutExport.errors.txt deleted file mode 100644 index 6189b740ba057..0000000000000 --- a/tests/baselines/reference/internalAliasEnumInsideTopLevelModuleWithoutExport.errors.txt +++ /dev/null @@ -1,18 +0,0 @@ -error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! - - -!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! -!!! related TS-1: The excess diagnostics are: -!!! related TS2749 tests/cases/compiler/internalAliasEnumInsideTopLevelModuleWithoutExport.ts:9:12: 'a.weekend' refers to a value, but is being used as a type here. Did you mean 'typeof a.weekend'? -==== tests/cases/compiler/internalAliasEnumInsideTopLevelModuleWithoutExport.ts (0 errors) ==== - export module a { - export enum weekend { - Friday, - Saturday, - Sunday - } - } - - import b = a.weekend; - export var bVal: b = b.Sunday; - \ No newline at end of file diff --git a/tests/baselines/reference/internalAliasFunction.errors.txt b/tests/baselines/reference/internalAliasFunction.errors.txt deleted file mode 100644 index 2f27108c9c1d1..0000000000000 --- a/tests/baselines/reference/internalAliasFunction.errors.txt +++ /dev/null @@ -1,19 +0,0 @@ -error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! - - -!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! -!!! related TS-1: The excess diagnostics are: -!!! related TS2749 tests/cases/compiler/internalAliasFunction.ts:8:16: 'a.foo' refers to a value, but is being used as a type here. Did you mean 'typeof a.foo'? -==== tests/cases/compiler/internalAliasFunction.ts (0 errors) ==== - module a { - export function foo(x: number) { - return x; - } - } - - module c { - import b = a.foo; - export var bVal = b(10); - export var bVal2 = b; - } - \ No newline at end of file diff --git a/tests/baselines/reference/internalAliasFunctionInsideLocalModuleWithExport.errors.txt b/tests/baselines/reference/internalAliasFunctionInsideLocalModuleWithExport.errors.txt deleted file mode 100644 index b70a3beee46f2..0000000000000 --- a/tests/baselines/reference/internalAliasFunctionInsideLocalModuleWithExport.errors.txt +++ /dev/null @@ -1,19 +0,0 @@ -error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! - - -!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! -!!! related TS-1: The excess diagnostics are: -!!! related TS2749 tests/cases/compiler/internalAliasFunctionInsideLocalModuleWithExport.ts:8:23: 'a.foo' refers to a value, but is being used as a type here. Did you mean 'typeof a.foo'? -==== tests/cases/compiler/internalAliasFunctionInsideLocalModuleWithExport.ts (0 errors) ==== - export module a { - export function foo(x: number) { - return x; - } - } - - export module c { - export import b = a.foo; - export var bVal = b(10); - export var bVal2 = b; - } - \ No newline at end of file diff --git a/tests/baselines/reference/internalAliasFunctionInsideLocalModuleWithoutExport.errors.txt b/tests/baselines/reference/internalAliasFunctionInsideLocalModuleWithoutExport.errors.txt deleted file mode 100644 index 065f53ffa9558..0000000000000 --- a/tests/baselines/reference/internalAliasFunctionInsideLocalModuleWithoutExport.errors.txt +++ /dev/null @@ -1,19 +0,0 @@ -error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! - - -!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! -!!! related TS-1: The excess diagnostics are: -!!! related TS2749 tests/cases/compiler/internalAliasFunctionInsideLocalModuleWithoutExport.ts:8:16: 'a.foo' refers to a value, but is being used as a type here. Did you mean 'typeof a.foo'? -==== tests/cases/compiler/internalAliasFunctionInsideLocalModuleWithoutExport.ts (0 errors) ==== - export module a { - export function foo(x: number) { - return x; - } - } - - export module c { - import b = a.foo; - var bVal = b(10); - export var bVal2 = b; - } - \ No newline at end of file diff --git a/tests/baselines/reference/internalAliasFunctionInsideLocalModuleWithoutExportAccessError.errors.txt b/tests/baselines/reference/internalAliasFunctionInsideLocalModuleWithoutExportAccessError.errors.txt index d8be408812312..c28842aee7f0c 100644 --- a/tests/baselines/reference/internalAliasFunctionInsideLocalModuleWithoutExportAccessError.errors.txt +++ b/tests/baselines/reference/internalAliasFunctionInsideLocalModuleWithoutExportAccessError.errors.txt @@ -1,10 +1,6 @@ -error TS-1: Pre-emit (1) and post-emit (2) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! tests/cases/compiler/internalAliasFunctionInsideLocalModuleWithoutExportAccessError.ts(12,11): error TS2339: Property 'b' does not exist on type 'typeof c'. -!!! error TS-1: Pre-emit (1) and post-emit (2) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! -!!! related TS-1: The excess diagnostics are: -!!! related TS2749 tests/cases/compiler/internalAliasFunctionInsideLocalModuleWithoutExportAccessError.ts:8:16: 'a.foo' refers to a value, but is being used as a type here. Did you mean 'typeof a.foo'? ==== tests/cases/compiler/internalAliasFunctionInsideLocalModuleWithoutExportAccessError.ts (1 errors) ==== export module a { export function foo(x: number) { diff --git a/tests/baselines/reference/internalAliasFunctionInsideTopLevelModuleWithExport.errors.txt b/tests/baselines/reference/internalAliasFunctionInsideTopLevelModuleWithExport.errors.txt deleted file mode 100644 index 3ca70065a20b7..0000000000000 --- a/tests/baselines/reference/internalAliasFunctionInsideTopLevelModuleWithExport.errors.txt +++ /dev/null @@ -1,17 +0,0 @@ -error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! - - -!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! -!!! related TS-1: The excess diagnostics are: -!!! related TS2749 tests/cases/compiler/internalAliasFunctionInsideTopLevelModuleWithExport.ts:7:19: 'a.foo' refers to a value, but is being used as a type here. Did you mean 'typeof a.foo'? -==== tests/cases/compiler/internalAliasFunctionInsideTopLevelModuleWithExport.ts (0 errors) ==== - export module a { - export function foo(x: number) { - return x; - } - } - - export import b = a.foo; - export var bVal = b(10); - export var bVal2 = b; - \ No newline at end of file diff --git a/tests/baselines/reference/internalAliasFunctionInsideTopLevelModuleWithoutExport.errors.txt b/tests/baselines/reference/internalAliasFunctionInsideTopLevelModuleWithoutExport.errors.txt deleted file mode 100644 index d4ce1e07893f2..0000000000000 --- a/tests/baselines/reference/internalAliasFunctionInsideTopLevelModuleWithoutExport.errors.txt +++ /dev/null @@ -1,17 +0,0 @@ -error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! - - -!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! -!!! related TS-1: The excess diagnostics are: -!!! related TS2749 tests/cases/compiler/internalAliasFunctionInsideTopLevelModuleWithoutExport.ts:7:12: 'a.foo' refers to a value, but is being used as a type here. Did you mean 'typeof a.foo'? -==== tests/cases/compiler/internalAliasFunctionInsideTopLevelModuleWithoutExport.ts (0 errors) ==== - export module a { - export function foo(x: number) { - return x; - } - } - - import b = a.foo; - export var bVal = b(10); - export var bVal2 = b; - \ No newline at end of file diff --git a/tests/baselines/reference/internalAliasInitializedModule.errors.txt b/tests/baselines/reference/internalAliasInitializedModule.errors.txt deleted file mode 100644 index 340496555072c..0000000000000 --- a/tests/baselines/reference/internalAliasInitializedModule.errors.txt +++ /dev/null @@ -1,18 +0,0 @@ -error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! - - -!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! -!!! related TS-1: The excess diagnostics are: -!!! related TS2749 tests/cases/compiler/internalAliasInitializedModule.ts:9:16: 'a.b' refers to a value, but is being used as a type here. Did you mean 'typeof a.b'? -==== tests/cases/compiler/internalAliasInitializedModule.ts (0 errors) ==== - module a { - export module b { - export class c { - } - } - } - - module c { - import b = a.b; - export var x: b.c = new b.c(); - } \ No newline at end of file diff --git a/tests/baselines/reference/internalAliasInitializedModuleInsideLocalModuleWithExport.errors.txt b/tests/baselines/reference/internalAliasInitializedModuleInsideLocalModuleWithExport.errors.txt deleted file mode 100644 index 3a37a6f0b1eb5..0000000000000 --- a/tests/baselines/reference/internalAliasInitializedModuleInsideLocalModuleWithExport.errors.txt +++ /dev/null @@ -1,18 +0,0 @@ -error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! - - -!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! -!!! related TS-1: The excess diagnostics are: -!!! related TS2749 tests/cases/compiler/internalAliasInitializedModuleInsideLocalModuleWithExport.ts:9:23: 'a.b' refers to a value, but is being used as a type here. Did you mean 'typeof a.b'? -==== tests/cases/compiler/internalAliasInitializedModuleInsideLocalModuleWithExport.ts (0 errors) ==== - export module a { - export module b { - export class c { - } - } - } - - export module c { - export import b = a.b; - export var x: b.c = new b.c(); - } \ No newline at end of file diff --git a/tests/baselines/reference/internalAliasInitializedModuleInsideLocalModuleWithoutExport.errors.txt b/tests/baselines/reference/internalAliasInitializedModuleInsideLocalModuleWithoutExport.errors.txt deleted file mode 100644 index 3f9c6c71848d9..0000000000000 --- a/tests/baselines/reference/internalAliasInitializedModuleInsideLocalModuleWithoutExport.errors.txt +++ /dev/null @@ -1,18 +0,0 @@ -error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! - - -!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! -!!! related TS-1: The excess diagnostics are: -!!! related TS2749 tests/cases/compiler/internalAliasInitializedModuleInsideLocalModuleWithoutExport.ts:9:16: 'a.b' refers to a value, but is being used as a type here. Did you mean 'typeof a.b'? -==== tests/cases/compiler/internalAliasInitializedModuleInsideLocalModuleWithoutExport.ts (0 errors) ==== - export module a { - export module b { - export class c { - } - } - } - - export module c { - import b = a.b; - export var x: b.c = new b.c(); - } \ No newline at end of file diff --git a/tests/baselines/reference/internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.errors.txt b/tests/baselines/reference/internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.errors.txt index 75304931ce932..7997eb2b3ae61 100644 --- a/tests/baselines/reference/internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.errors.txt +++ b/tests/baselines/reference/internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.errors.txt @@ -1,10 +1,6 @@ -error TS-1: Pre-emit (1) and post-emit (2) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! tests/cases/compiler/internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.ts(13,22): error TS2339: Property 'b' does not exist on type 'typeof c'. -!!! error TS-1: Pre-emit (1) and post-emit (2) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! -!!! related TS-1: The excess diagnostics are: -!!! related TS2749 tests/cases/compiler/internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.ts:9:16: 'a.b' refers to a value, but is being used as a type here. Did you mean 'typeof a.b'? ==== tests/cases/compiler/internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.ts (1 errors) ==== export module a { export module b { diff --git a/tests/baselines/reference/internalAliasInitializedModuleInsideTopLevelModuleWithExport.errors.txt b/tests/baselines/reference/internalAliasInitializedModuleInsideTopLevelModuleWithExport.errors.txt deleted file mode 100644 index c5cc83fd9ce94..0000000000000 --- a/tests/baselines/reference/internalAliasInitializedModuleInsideTopLevelModuleWithExport.errors.txt +++ /dev/null @@ -1,16 +0,0 @@ -error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! - - -!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! -!!! related TS-1: The excess diagnostics are: -!!! related TS2749 tests/cases/compiler/internalAliasInitializedModuleInsideTopLevelModuleWithExport.ts:8:19: 'a.b' refers to a value, but is being used as a type here. Did you mean 'typeof a.b'? -==== tests/cases/compiler/internalAliasInitializedModuleInsideTopLevelModuleWithExport.ts (0 errors) ==== - export module a { - export module b { - export class c { - } - } - } - - export import b = a.b; - export var x: b.c = new b.c(); \ No newline at end of file diff --git a/tests/baselines/reference/internalAliasInitializedModuleInsideTopLevelModuleWithoutExport.errors.txt b/tests/baselines/reference/internalAliasInitializedModuleInsideTopLevelModuleWithoutExport.errors.txt deleted file mode 100644 index 0785035670ae5..0000000000000 --- a/tests/baselines/reference/internalAliasInitializedModuleInsideTopLevelModuleWithoutExport.errors.txt +++ /dev/null @@ -1,16 +0,0 @@ -error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! - - -!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! -!!! related TS-1: The excess diagnostics are: -!!! related TS2749 tests/cases/compiler/internalAliasInitializedModuleInsideTopLevelModuleWithoutExport.ts:8:12: 'a.b' refers to a value, but is being used as a type here. Did you mean 'typeof a.b'? -==== tests/cases/compiler/internalAliasInitializedModuleInsideTopLevelModuleWithoutExport.ts (0 errors) ==== - export module a { - export module b { - export class c { - } - } - } - - import b = a.b; - export var x: b.c = new b.c(); \ No newline at end of file diff --git a/tests/baselines/reference/internalAliasVar.errors.txt b/tests/baselines/reference/internalAliasVar.errors.txt deleted file mode 100644 index 8a04bafa2db39..0000000000000 --- a/tests/baselines/reference/internalAliasVar.errors.txt +++ /dev/null @@ -1,16 +0,0 @@ -error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! - - -!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! -!!! related TS-1: The excess diagnostics are: -!!! related TS2749 tests/cases/compiler/internalAliasVar.ts:6:16: 'a.x' refers to a value, but is being used as a type here. Did you mean 'typeof a.x'? -==== tests/cases/compiler/internalAliasVar.ts (0 errors) ==== - module a { - export var x = 10; - } - - module c { - import b = a.x; - export var bVal = b; - } - \ No newline at end of file diff --git a/tests/baselines/reference/internalAliasVarInsideLocalModuleWithExport.errors.txt b/tests/baselines/reference/internalAliasVarInsideLocalModuleWithExport.errors.txt deleted file mode 100644 index e3d88e05e8106..0000000000000 --- a/tests/baselines/reference/internalAliasVarInsideLocalModuleWithExport.errors.txt +++ /dev/null @@ -1,16 +0,0 @@ -error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! - - -!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! -!!! related TS-1: The excess diagnostics are: -!!! related TS2749 tests/cases/compiler/internalAliasVarInsideLocalModuleWithExport.ts:6:23: 'a.x' refers to a value, but is being used as a type here. Did you mean 'typeof a.x'? -==== tests/cases/compiler/internalAliasVarInsideLocalModuleWithExport.ts (0 errors) ==== - export module a { - export var x = 10; - } - - export module c { - export import b = a.x; - export var bVal = b; - } - \ No newline at end of file diff --git a/tests/baselines/reference/internalAliasVarInsideLocalModuleWithoutExport.errors.txt b/tests/baselines/reference/internalAliasVarInsideLocalModuleWithoutExport.errors.txt deleted file mode 100644 index 2d0227048c7f1..0000000000000 --- a/tests/baselines/reference/internalAliasVarInsideLocalModuleWithoutExport.errors.txt +++ /dev/null @@ -1,16 +0,0 @@ -error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! - - -!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! -!!! related TS-1: The excess diagnostics are: -!!! related TS2749 tests/cases/compiler/internalAliasVarInsideLocalModuleWithoutExport.ts:6:16: 'a.x' refers to a value, but is being used as a type here. Did you mean 'typeof a.x'? -==== tests/cases/compiler/internalAliasVarInsideLocalModuleWithoutExport.ts (0 errors) ==== - export module a { - export var x = 10; - } - - export module c { - import b = a.x; - export var bVal = b; - } - \ No newline at end of file diff --git a/tests/baselines/reference/internalAliasVarInsideLocalModuleWithoutExportAccessError.errors.txt b/tests/baselines/reference/internalAliasVarInsideLocalModuleWithoutExportAccessError.errors.txt index c3e98fa334781..6c00ac577942f 100644 --- a/tests/baselines/reference/internalAliasVarInsideLocalModuleWithoutExportAccessError.errors.txt +++ b/tests/baselines/reference/internalAliasVarInsideLocalModuleWithoutExportAccessError.errors.txt @@ -1,10 +1,6 @@ -error TS-1: Pre-emit (1) and post-emit (2) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! tests/cases/compiler/internalAliasVarInsideLocalModuleWithoutExportAccessError.ts(10,18): error TS2339: Property 'b' does not exist on type 'typeof c'. -!!! error TS-1: Pre-emit (1) and post-emit (2) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! -!!! related TS-1: The excess diagnostics are: -!!! related TS2749 tests/cases/compiler/internalAliasVarInsideLocalModuleWithoutExportAccessError.ts:6:16: 'a.x' refers to a value, but is being used as a type here. Did you mean 'typeof a.x'? ==== tests/cases/compiler/internalAliasVarInsideLocalModuleWithoutExportAccessError.ts (1 errors) ==== export module a { export var x = 10; diff --git a/tests/baselines/reference/internalAliasVarInsideTopLevelModuleWithExport.errors.txt b/tests/baselines/reference/internalAliasVarInsideTopLevelModuleWithExport.errors.txt deleted file mode 100644 index fa37614b58194..0000000000000 --- a/tests/baselines/reference/internalAliasVarInsideTopLevelModuleWithExport.errors.txt +++ /dev/null @@ -1,15 +0,0 @@ -error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! - - -!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! -!!! related TS-1: The excess diagnostics are: -!!! related TS2749 tests/cases/compiler/internalAliasVarInsideTopLevelModuleWithExport.ts:5:19: 'a.x' refers to a value, but is being used as a type here. Did you mean 'typeof a.x'? -==== tests/cases/compiler/internalAliasVarInsideTopLevelModuleWithExport.ts (0 errors) ==== - export module a { - export var x = 10; - } - - export import b = a.x; - export var bVal = b; - - \ No newline at end of file diff --git a/tests/baselines/reference/internalAliasVarInsideTopLevelModuleWithoutExport.errors.txt b/tests/baselines/reference/internalAliasVarInsideTopLevelModuleWithoutExport.errors.txt deleted file mode 100644 index 63c20e25defb0..0000000000000 --- a/tests/baselines/reference/internalAliasVarInsideTopLevelModuleWithoutExport.errors.txt +++ /dev/null @@ -1,15 +0,0 @@ -error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! - - -!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! -!!! related TS-1: The excess diagnostics are: -!!! related TS2749 tests/cases/compiler/internalAliasVarInsideTopLevelModuleWithoutExport.ts:5:12: 'a.x' refers to a value, but is being used as a type here. Did you mean 'typeof a.x'? -==== tests/cases/compiler/internalAliasVarInsideTopLevelModuleWithoutExport.ts (0 errors) ==== - export module a { - export var x = 10; - } - - import b = a.x; - export var bVal = b; - - \ No newline at end of file diff --git a/tests/baselines/reference/localImportNameVsGlobalName.errors.txt b/tests/baselines/reference/localImportNameVsGlobalName.errors.txt deleted file mode 100644 index 15cc4c57709f2..0000000000000 --- a/tests/baselines/reference/localImportNameVsGlobalName.errors.txt +++ /dev/null @@ -1,20 +0,0 @@ -error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! - - -!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! -!!! related TS-1: The excess diagnostics are: -!!! related TS2749 tests/cases/compiler/localImportNameVsGlobalName.ts:6:16: 'Keyboard.Key' refers to a value, but is being used as a type here. Did you mean 'typeof Keyboard.Key'? -==== tests/cases/compiler/localImportNameVsGlobalName.ts (0 errors) ==== - module Keyboard { - export enum Key { UP, DOWN, LEFT, RIGHT } - } - - module App { - import Key = Keyboard.Key; - - export function foo(key: Key): void {} - - foo(Key.UP); - foo(Key.DOWN); - foo(Key.LEFT); - } \ No newline at end of file diff --git a/tests/baselines/reference/moduleImport.errors.txt b/tests/baselines/reference/moduleImport.errors.txt index 4e2c87d6c07e5..4032b4b78717f 100644 --- a/tests/baselines/reference/moduleImport.errors.txt +++ b/tests/baselines/reference/moduleImport.errors.txt @@ -1,11 +1,7 @@ -error TS-1: Pre-emit (2) and post-emit (3) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! tests/cases/compiler/moduleImport.ts(2,17): error TS2339: Property 'Y' does not exist on type 'typeof X'. tests/cases/compiler/moduleImport.ts(2,17): error TS2694: Namespace 'X' has no exported member 'Y'. -!!! error TS-1: Pre-emit (2) and post-emit (3) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! -!!! related TS-1: The excess diagnostics are: -!!! related TS2749 tests/cases/compiler/moduleImport.ts:9:15: 'A.B.C' refers to a value, but is being used as a type here. Did you mean 'typeof A.B.C'? ==== tests/cases/compiler/moduleImport.ts (2 errors) ==== module A.B.C { import XYZ = X.Y.Z; diff --git a/tests/baselines/reference/moduleSharesNameWithImportDeclarationInsideIt.errors.txt b/tests/baselines/reference/moduleSharesNameWithImportDeclarationInsideIt.errors.txt deleted file mode 100644 index 565412bcd9cf1..0000000000000 --- a/tests/baselines/reference/moduleSharesNameWithImportDeclarationInsideIt.errors.txt +++ /dev/null @@ -1,18 +0,0 @@ -error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! - - -!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! -!!! related TS-1: The excess diagnostics are: -!!! related TS2749 tests/cases/compiler/moduleSharesNameWithImportDeclarationInsideIt.ts:7:16: 'Z.M' refers to a value, but is being used as a type here. Did you mean 'typeof Z.M'? -==== tests/cases/compiler/moduleSharesNameWithImportDeclarationInsideIt.ts (0 errors) ==== - module Z.M { - export function bar() { - return ""; - } - } - module A.M { - import M = Z.M; - export function bar() { - } - M.bar(); // Should call Z.M.bar - } \ No newline at end of file diff --git a/tests/baselines/reference/moduleSharesNameWithImportDeclarationInsideIt2.errors.txt b/tests/baselines/reference/moduleSharesNameWithImportDeclarationInsideIt2.errors.txt deleted file mode 100644 index 69d94c9fef60d..0000000000000 --- a/tests/baselines/reference/moduleSharesNameWithImportDeclarationInsideIt2.errors.txt +++ /dev/null @@ -1,18 +0,0 @@ -error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! - - -!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! -!!! related TS-1: The excess diagnostics are: -!!! related TS2749 tests/cases/compiler/moduleSharesNameWithImportDeclarationInsideIt2.ts:7:23: 'Z.M' refers to a value, but is being used as a type here. Did you mean 'typeof Z.M'? -==== tests/cases/compiler/moduleSharesNameWithImportDeclarationInsideIt2.ts (0 errors) ==== - module Z.M { - export function bar() { - return ""; - } - } - module A.M { - export import M = Z.M; - export function bar() { - } - M.bar(); // Should call Z.M.bar - } \ No newline at end of file diff --git a/tests/baselines/reference/moduleSharesNameWithImportDeclarationInsideIt3.errors.txt b/tests/baselines/reference/moduleSharesNameWithImportDeclarationInsideIt3.errors.txt index 6c0df360d1705..f8fa117c0241e 100644 --- a/tests/baselines/reference/moduleSharesNameWithImportDeclarationInsideIt3.errors.txt +++ b/tests/baselines/reference/moduleSharesNameWithImportDeclarationInsideIt3.errors.txt @@ -1,11 +1,7 @@ -error TS-1: Pre-emit (2) and post-emit (3) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! tests/cases/compiler/moduleSharesNameWithImportDeclarationInsideIt3.ts(10,12): error TS2300: Duplicate identifier 'M'. tests/cases/compiler/moduleSharesNameWithImportDeclarationInsideIt3.ts(11,12): error TS2300: Duplicate identifier 'M'. -!!! error TS-1: Pre-emit (2) and post-emit (3) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! -!!! related TS-1: The excess diagnostics are: -!!! related TS2749 tests/cases/compiler/moduleSharesNameWithImportDeclarationInsideIt3.ts:10:16: 'Z.M' refers to a value, but is being used as a type here. Did you mean 'typeof Z.M'? ==== tests/cases/compiler/moduleSharesNameWithImportDeclarationInsideIt3.ts (2 errors) ==== module Z { export module M { diff --git a/tests/baselines/reference/moduleSharesNameWithImportDeclarationInsideIt4.errors.txt b/tests/baselines/reference/moduleSharesNameWithImportDeclarationInsideIt4.errors.txt deleted file mode 100644 index 176b33c2864d3..0000000000000 --- a/tests/baselines/reference/moduleSharesNameWithImportDeclarationInsideIt4.errors.txt +++ /dev/null @@ -1,19 +0,0 @@ -error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! - - -!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! -!!! related TS-1: The excess diagnostics are: -!!! related TS2749 tests/cases/compiler/moduleSharesNameWithImportDeclarationInsideIt4.ts:8:16: 'Z.M' refers to a value, but is being used as a type here. Did you mean 'typeof Z.M'? -==== tests/cases/compiler/moduleSharesNameWithImportDeclarationInsideIt4.ts (0 errors) ==== - module Z.M { - export function bar() { - return ""; - } - } - module A.M { - interface M { } - import M = Z.M; - export function bar() { - } - M.bar(); // Should call Z.M.bar - } \ No newline at end of file diff --git a/tests/baselines/reference/moduleVisibilityTest1.errors.txt b/tests/baselines/reference/moduleVisibilityTest1.errors.txt deleted file mode 100644 index 1a741e3dc5c68..0000000000000 --- a/tests/baselines/reference/moduleVisibilityTest1.errors.txt +++ /dev/null @@ -1,72 +0,0 @@ -error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! - - -!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! -!!! related TS-1: The excess diagnostics are: -!!! related TS2749 tests/cases/compiler/moduleVisibilityTest1.ts:9:26: 'OuterMod.OuterInnerMod' refers to a value, but is being used as a type here. Did you mean 'typeof OuterMod.OuterInnerMod'? -==== tests/cases/compiler/moduleVisibilityTest1.ts (0 errors) ==== - module OuterMod { - export function someExportedOuterFunc() { return -1; } - - export module OuterInnerMod { - export function someExportedOuterInnerFunc() { return "foo"; } - } - } - - import OuterInnerAlias = OuterMod.OuterInnerMod; - - module M { - - export module InnerMod { - export function someExportedInnerFunc() { return -2; } - } - - export enum E { - A, - B, - C, - } - - export var x = 5; - export declare var exported_var; - - var y = x + x; - - - export interface I { - someMethod():number; - } - - class B {public b = 0;} - - export class C implements I { - public someMethodThatCallsAnOuterMethod() {return OuterInnerAlias.someExportedOuterInnerFunc();} - public someMethodThatCallsAnInnerMethod() {return InnerMod.someExportedInnerFunc();} - public someMethodThatCallsAnOuterInnerMethod() {return OuterMod.someExportedOuterFunc();} - public someMethod() { return 0; } - public someProp = 1; - - constructor() { - function someInnerFunc() { return 2; } - var someInnerVar = 3; - } - } - - var someModuleVar = 4; - - function someModuleFunction() { return 5;} - } - - module M { - export var c = x; - export var meb = M.E.B; - } - - var cprime : M.I = null; - - var c = new M.C(); - var z = M.x; - var alpha = M.E.A; - var omega = M.exported_var; - c.someMethodThatCallsAnOuterMethod(); - \ No newline at end of file diff --git a/tests/baselines/reference/moduleVisibilityTest2.errors.txt b/tests/baselines/reference/moduleVisibilityTest2.errors.txt index 48c2f4d606ff1..2b5686124b835 100644 --- a/tests/baselines/reference/moduleVisibilityTest2.errors.txt +++ b/tests/baselines/reference/moduleVisibilityTest2.errors.txt @@ -1,4 +1,3 @@ -error TS-1: Pre-emit (6) and post-emit (7) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! tests/cases/compiler/moduleVisibilityTest2.ts(55,17): error TS2304: Cannot find name 'x'. tests/cases/compiler/moduleVisibilityTest2.ts(56,21): error TS2339: Property 'E' does not exist on type 'typeof M'. tests/cases/compiler/moduleVisibilityTest2.ts(59,16): error TS2694: Namespace 'M' has no exported member 'I'. @@ -7,9 +6,6 @@ tests/cases/compiler/moduleVisibilityTest2.ts(62,11): error TS2339: Property 'x' tests/cases/compiler/moduleVisibilityTest2.ts(63,15): error TS2339: Property 'E' does not exist on type 'typeof M'. -!!! error TS-1: Pre-emit (6) and post-emit (7) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! -!!! related TS-1: The excess diagnostics are: -!!! related TS2749 tests/cases/compiler/moduleVisibilityTest2.ts:9:26: 'OuterMod.OuterInnerMod' refers to a value, but is being used as a type here. Did you mean 'typeof OuterMod.OuterInnerMod'? ==== tests/cases/compiler/moduleVisibilityTest2.ts (6 errors) ==== module OuterMod { export function someExportedOuterFunc() { return -1; } diff --git a/tests/baselines/reference/privacyLocalInternalReferenceImportWithExport.errors.txt b/tests/baselines/reference/privacyLocalInternalReferenceImportWithExport.errors.txt deleted file mode 100644 index c55fe2c56c7f5..0000000000000 --- a/tests/baselines/reference/privacyLocalInternalReferenceImportWithExport.errors.txt +++ /dev/null @@ -1,178 +0,0 @@ -error TS-1: Pre-emit (0) and post-emit (20) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! - - -!!! error TS-1: Pre-emit (0) and post-emit (20) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! -!!! related TS-1: The excess diagnostics are: -!!! related TS2724 tests/cases/compiler/privacyLocalInternalReferenceImportWithExport.ts:51:51: 'm_private' has no exported member named 'c_private'. Did you mean 'f_private'? -!!! related TS2724 tests/cases/compiler/privacyLocalInternalReferenceImportWithExport.ts:52:51: 'm_private' has no exported member named 'e_private'. Did you mean 'f_private'? -!!! related TS2724 tests/cases/compiler/privacyLocalInternalReferenceImportWithExport.ts:53:51: 'm_private' has no exported member named 'f_private'. Did you mean 'c_private'? -!!! related TS2724 tests/cases/compiler/privacyLocalInternalReferenceImportWithExport.ts:54:51: 'm_private' has no exported member named 'v_private'. Did you mean 'f_private'? -!!! related TS2724 tests/cases/compiler/privacyLocalInternalReferenceImportWithExport.ts:56:52: 'm_private' has no exported member named 'mi_private'. Did you mean 'i_private'? -!!! related TS2724 tests/cases/compiler/privacyLocalInternalReferenceImportWithExport.ts:77:49: '"tests/cases/compiler/privacyLocalInternalReferenceImportWithExport".m_public' has no exported member named 'c_public'. Did you mean 'f_public'? -!!! related TS2724 tests/cases/compiler/privacyLocalInternalReferenceImportWithExport.ts:78:49: '"tests/cases/compiler/privacyLocalInternalReferenceImportWithExport".m_public' has no exported member named 'e_public'. Did you mean 'f_public'? -!!! related TS2724 tests/cases/compiler/privacyLocalInternalReferenceImportWithExport.ts:79:49: '"tests/cases/compiler/privacyLocalInternalReferenceImportWithExport".m_public' has no exported member named 'f_public'. Did you mean 'c_public'? -!!! related TS2724 tests/cases/compiler/privacyLocalInternalReferenceImportWithExport.ts:80:49: '"tests/cases/compiler/privacyLocalInternalReferenceImportWithExport".m_public' has no exported member named 'v_public'. Did you mean 'f_public'? -!!! related TS2724 tests/cases/compiler/privacyLocalInternalReferenceImportWithExport.ts:82:50: '"tests/cases/compiler/privacyLocalInternalReferenceImportWithExport".m_public' has no exported member named 'mi_public'. Did you mean 'i_public'? -!!! related TS2724 tests/cases/compiler/privacyLocalInternalReferenceImportWithExport.ts:104:52: 'm_private' has no exported member named 'c_private'. Did you mean 'f_private'? -!!! related TS2724 tests/cases/compiler/privacyLocalInternalReferenceImportWithExport.ts:105:52: 'm_private' has no exported member named 'e_private'. Did you mean 'f_private'? -!!! related TS2724 tests/cases/compiler/privacyLocalInternalReferenceImportWithExport.ts:106:52: 'm_private' has no exported member named 'f_private'. Did you mean 'c_private'? -!!! related TS2724 tests/cases/compiler/privacyLocalInternalReferenceImportWithExport.ts:107:52: 'm_private' has no exported member named 'v_private'. Did you mean 'f_private'? -!!! related TS2724 tests/cases/compiler/privacyLocalInternalReferenceImportWithExport.ts:109:53: 'm_private' has no exported member named 'mi_private'. Did you mean 'i_private'? -!!! related TS2724 tests/cases/compiler/privacyLocalInternalReferenceImportWithExport.ts:129:50: '"tests/cases/compiler/privacyLocalInternalReferenceImportWithExport".m_public' has no exported member named 'c_public'. Did you mean 'f_public'? -!!! related TS2724 tests/cases/compiler/privacyLocalInternalReferenceImportWithExport.ts:130:50: '"tests/cases/compiler/privacyLocalInternalReferenceImportWithExport".m_public' has no exported member named 'e_public'. Did you mean 'f_public'? -!!! related TS2724 tests/cases/compiler/privacyLocalInternalReferenceImportWithExport.ts:131:50: '"tests/cases/compiler/privacyLocalInternalReferenceImportWithExport".m_public' has no exported member named 'f_public'. Did you mean 'c_public'? -!!! related TS2724 tests/cases/compiler/privacyLocalInternalReferenceImportWithExport.ts:132:50: '"tests/cases/compiler/privacyLocalInternalReferenceImportWithExport".m_public' has no exported member named 'v_public'. Did you mean 'f_public'? -!!! related TS2724 tests/cases/compiler/privacyLocalInternalReferenceImportWithExport.ts:134:51: '"tests/cases/compiler/privacyLocalInternalReferenceImportWithExport".m_public' has no exported member named 'mi_public'. Did you mean 'i_public'? -==== tests/cases/compiler/privacyLocalInternalReferenceImportWithExport.ts (0 errors) ==== - // private elements - module m_private { - export class c_private { - } - export enum e_private { - Happy, - Grumpy - } - export function f_private() { - return new c_private(); - } - export var v_private = new c_private(); - export interface i_private { - } - export module mi_private { - export class c { - } - } - export module mu_private { - export interface i { - } - } - } - - // Public elements - export module m_public { - export class c_public { - } - export enum e_public { - Happy, - Grumpy - } - export function f_public() { - return new c_public(); - } - export var v_public = 10; - export interface i_public { - } - export module mi_public { - export class c { - } - } - export module mu_public { - export interface i { - } - } - } - - export module import_public { - // Privacy errors - importing private elements - export import im_public_c_private = m_private.c_private; - export import im_public_e_private = m_private.e_private; - export import im_public_f_private = m_private.f_private; - export import im_public_v_private = m_private.v_private; - export import im_public_i_private = m_private.i_private; - export import im_public_mi_private = m_private.mi_private; - export import im_public_mu_private = m_private.mu_private; - - // Usage of privacy error imports - var privateUse_im_public_c_private = new im_public_c_private(); - export var publicUse_im_public_c_private = new im_public_c_private(); - var privateUse_im_public_e_private = im_public_e_private.Happy; - export var publicUse_im_public_e_private = im_public_e_private.Grumpy; - var privateUse_im_public_f_private = im_public_f_private(); - export var publicUse_im_public_f_private = im_public_f_private(); - var privateUse_im_public_v_private = im_public_v_private; - export var publicUse_im_public_v_private = im_public_v_private; - var privateUse_im_public_i_private: im_public_i_private; - export var publicUse_im_public_i_private: im_public_i_private; - var privateUse_im_public_mi_private = new im_public_mi_private.c(); - export var publicUse_im_public_mi_private = new im_public_mi_private.c(); - var privateUse_im_public_mu_private: im_public_mu_private.i; - export var publicUse_im_public_mu_private: im_public_mu_private.i; - - - // No Privacy errors - importing public elements - export import im_public_c_public = m_public.c_public; - export import im_public_e_public = m_public.e_public; - export import im_public_f_public = m_public.f_public; - export import im_public_v_public = m_public.v_public; - export import im_public_i_public = m_public.i_public; - export import im_public_mi_public = m_public.mi_public; - export import im_public_mu_public = m_public.mu_public; - - // Usage of above - var privateUse_im_public_c_public = new im_public_c_public(); - export var publicUse_im_public_c_public = new im_public_c_public(); - var privateUse_im_public_e_public = im_public_e_public.Happy; - export var publicUse_im_public_e_public = im_public_e_public.Grumpy; - var privateUse_im_public_f_public = im_public_f_public(); - export var publicUse_im_public_f_public = im_public_f_public(); - var privateUse_im_public_v_public = im_public_v_public; - export var publicUse_im_public_v_public = im_public_v_public; - var privateUse_im_public_i_public: im_public_i_public; - export var publicUse_im_public_i_public: im_public_i_public; - var privateUse_im_public_mi_public = new im_public_mi_public.c(); - export var publicUse_im_public_mi_public = new im_public_mi_public.c(); - var privateUse_im_public_mu_public: im_public_mu_public.i; - export var publicUse_im_public_mu_public: im_public_mu_public.i; - } - - module import_private { - // No Privacy errors - importing private elements - export import im_private_c_private = m_private.c_private; - export import im_private_e_private = m_private.e_private; - export import im_private_f_private = m_private.f_private; - export import im_private_v_private = m_private.v_private; - export import im_private_i_private = m_private.i_private; - export import im_private_mi_private = m_private.mi_private; - export import im_private_mu_private = m_private.mu_private; - - // Usage of above decls - var privateUse_im_private_c_private = new im_private_c_private(); - export var publicUse_im_private_c_private = new im_private_c_private(); - var privateUse_im_private_e_private = im_private_e_private.Happy; - export var publicUse_im_private_e_private = im_private_e_private.Grumpy; - var privateUse_im_private_f_private = im_private_f_private(); - export var publicUse_im_private_f_private = im_private_f_private(); - var privateUse_im_private_v_private = im_private_v_private; - export var publicUse_im_private_v_private = im_private_v_private; - var privateUse_im_private_i_private: im_private_i_private; - export var publicUse_im_private_i_private: im_private_i_private; - var privateUse_im_private_mi_private = new im_private_mi_private.c(); - export var publicUse_im_private_mi_private = new im_private_mi_private.c(); - var privateUse_im_private_mu_private: im_private_mu_private.i; - export var publicUse_im_private_mu_private: im_private_mu_private.i; - - // No privacy Error - importing public elements - export import im_private_c_public = m_public.c_public; - export import im_private_e_public = m_public.e_public; - export import im_private_f_public = m_public.f_public; - export import im_private_v_public = m_public.v_public; - export import im_private_i_public = m_public.i_public; - export import im_private_mi_public = m_public.mi_public; - export import im_private_mu_public = m_public.mu_public; - - // Usage of no privacy error imports - var privateUse_im_private_c_public = new im_private_c_public(); - export var publicUse_im_private_c_public = new im_private_c_public(); - var privateUse_im_private_e_public = im_private_e_public.Happy; - export var publicUse_im_private_e_public = im_private_e_public.Grumpy; - var privateUse_im_private_f_public = im_private_f_public(); - export var publicUse_im_private_f_public = im_private_f_public(); - var privateUse_im_private_v_public = im_private_v_public; - export var publicUse_im_private_v_public = im_private_v_public; - var privateUse_im_private_i_public: im_private_i_public; - export var publicUse_im_private_i_public: im_private_i_public; - var privateUse_im_private_mi_public = new im_private_mi_public.c(); - export var publicUse_im_private_mi_public = new im_private_mi_public.c(); - var privateUse_im_private_mu_public: im_private_mu_public.i; - export var publicUse_im_private_mu_public: im_private_mu_public.i; - } \ No newline at end of file diff --git a/tests/baselines/reference/privacyLocalInternalReferenceImportWithoutExport.errors.txt b/tests/baselines/reference/privacyLocalInternalReferenceImportWithoutExport.errors.txt deleted file mode 100644 index 09f9f03f47085..0000000000000 --- a/tests/baselines/reference/privacyLocalInternalReferenceImportWithoutExport.errors.txt +++ /dev/null @@ -1,178 +0,0 @@ -error TS-1: Pre-emit (0) and post-emit (20) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! - - -!!! error TS-1: Pre-emit (0) and post-emit (20) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! -!!! related TS-1: The excess diagnostics are: -!!! related TS2724 tests/cases/compiler/privacyLocalInternalReferenceImportWithoutExport.ts:51:45: 'm_private' has no exported member named 'c_private'. Did you mean 'f_private'? -!!! related TS2724 tests/cases/compiler/privacyLocalInternalReferenceImportWithoutExport.ts:52:45: 'm_private' has no exported member named 'e_private'. Did you mean 'f_private'? -!!! related TS2724 tests/cases/compiler/privacyLocalInternalReferenceImportWithoutExport.ts:53:45: 'm_private' has no exported member named 'f_private'. Did you mean 'c_private'? -!!! related TS2724 tests/cases/compiler/privacyLocalInternalReferenceImportWithoutExport.ts:54:45: 'm_private' has no exported member named 'v_private'. Did you mean 'f_private'? -!!! related TS2724 tests/cases/compiler/privacyLocalInternalReferenceImportWithoutExport.ts:56:46: 'm_private' has no exported member named 'mi_private'. Did you mean 'i_private'? -!!! related TS2724 tests/cases/compiler/privacyLocalInternalReferenceImportWithoutExport.ts:77:43: '"tests/cases/compiler/privacyLocalInternalReferenceImportWithoutExport".m_public' has no exported member named 'c_public'. Did you mean 'f_public'? -!!! related TS2724 tests/cases/compiler/privacyLocalInternalReferenceImportWithoutExport.ts:78:43: '"tests/cases/compiler/privacyLocalInternalReferenceImportWithoutExport".m_public' has no exported member named 'e_public'. Did you mean 'f_public'? -!!! related TS2724 tests/cases/compiler/privacyLocalInternalReferenceImportWithoutExport.ts:79:43: '"tests/cases/compiler/privacyLocalInternalReferenceImportWithoutExport".m_public' has no exported member named 'f_public'. Did you mean 'c_public'? -!!! related TS2724 tests/cases/compiler/privacyLocalInternalReferenceImportWithoutExport.ts:80:43: '"tests/cases/compiler/privacyLocalInternalReferenceImportWithoutExport".m_public' has no exported member named 'v_public'. Did you mean 'f_public'? -!!! related TS2724 tests/cases/compiler/privacyLocalInternalReferenceImportWithoutExport.ts:82:44: '"tests/cases/compiler/privacyLocalInternalReferenceImportWithoutExport".m_public' has no exported member named 'mi_public'. Did you mean 'i_public'? -!!! related TS2724 tests/cases/compiler/privacyLocalInternalReferenceImportWithoutExport.ts:104:45: 'm_private' has no exported member named 'c_private'. Did you mean 'f_private'? -!!! related TS2724 tests/cases/compiler/privacyLocalInternalReferenceImportWithoutExport.ts:105:45: 'm_private' has no exported member named 'e_private'. Did you mean 'f_private'? -!!! related TS2724 tests/cases/compiler/privacyLocalInternalReferenceImportWithoutExport.ts:106:45: 'm_private' has no exported member named 'f_private'. Did you mean 'c_private'? -!!! related TS2724 tests/cases/compiler/privacyLocalInternalReferenceImportWithoutExport.ts:107:45: 'm_private' has no exported member named 'v_private'. Did you mean 'f_private'? -!!! related TS2724 tests/cases/compiler/privacyLocalInternalReferenceImportWithoutExport.ts:109:46: 'm_private' has no exported member named 'mi_private'. Did you mean 'i_private'? -!!! related TS2724 tests/cases/compiler/privacyLocalInternalReferenceImportWithoutExport.ts:129:43: '"tests/cases/compiler/privacyLocalInternalReferenceImportWithoutExport".m_public' has no exported member named 'c_public'. Did you mean 'f_public'? -!!! related TS2724 tests/cases/compiler/privacyLocalInternalReferenceImportWithoutExport.ts:130:43: '"tests/cases/compiler/privacyLocalInternalReferenceImportWithoutExport".m_public' has no exported member named 'e_public'. Did you mean 'f_public'? -!!! related TS2724 tests/cases/compiler/privacyLocalInternalReferenceImportWithoutExport.ts:131:43: '"tests/cases/compiler/privacyLocalInternalReferenceImportWithoutExport".m_public' has no exported member named 'f_public'. Did you mean 'c_public'? -!!! related TS2724 tests/cases/compiler/privacyLocalInternalReferenceImportWithoutExport.ts:132:43: '"tests/cases/compiler/privacyLocalInternalReferenceImportWithoutExport".m_public' has no exported member named 'v_public'. Did you mean 'f_public'? -!!! related TS2724 tests/cases/compiler/privacyLocalInternalReferenceImportWithoutExport.ts:134:44: '"tests/cases/compiler/privacyLocalInternalReferenceImportWithoutExport".m_public' has no exported member named 'mi_public'. Did you mean 'i_public'? -==== tests/cases/compiler/privacyLocalInternalReferenceImportWithoutExport.ts (0 errors) ==== - // private elements - module m_private { - export class c_private { - } - export enum e_private { - Happy, - Grumpy - } - export function f_private() { - return new c_private(); - } - export var v_private = new c_private(); - export interface i_private { - } - export module mi_private { - export class c { - } - } - export module mu_private { - export interface i { - } - } - } - - // Public elements - export module m_public { - export class c_public { - } - export enum e_public { - Happy, - Grumpy - } - export function f_public() { - return new c_public(); - } - export var v_public = 10; - export interface i_public { - } - export module mi_public { - export class c { - } - } - export module mu_public { - export interface i { - } - } - } - - export module import_public { - // No Privacy errors - importing private elements - import im_private_c_private = m_private.c_private; - import im_private_e_private = m_private.e_private; - import im_private_f_private = m_private.f_private; - import im_private_v_private = m_private.v_private; - import im_private_i_private = m_private.i_private; - import im_private_mi_private = m_private.mi_private; - import im_private_mu_private = m_private.mu_private; - - // Usage of above decls - var privateUse_im_private_c_private = new im_private_c_private(); - export var publicUse_im_private_c_private = new im_private_c_private(); - var privateUse_im_private_e_private = im_private_e_private.Happy; - export var publicUse_im_private_e_private = im_private_e_private.Grumpy; - var privateUse_im_private_f_private = im_private_f_private(); - export var publicUse_im_private_f_private = im_private_f_private(); - var privateUse_im_private_v_private = im_private_v_private; - export var publicUse_im_private_v_private = im_private_v_private; - var privateUse_im_private_i_private: im_private_i_private; - export var publicUse_im_private_i_private: im_private_i_private; - var privateUse_im_private_mi_private = new im_private_mi_private.c(); - export var publicUse_im_private_mi_private = new im_private_mi_private.c(); - var privateUse_im_private_mu_private: im_private_mu_private.i; - export var publicUse_im_private_mu_private: im_private_mu_private.i; - - - // No Privacy errors - importing public elements - import im_private_c_public = m_public.c_public; - import im_private_e_public = m_public.e_public; - import im_private_f_public = m_public.f_public; - import im_private_v_public = m_public.v_public; - import im_private_i_public = m_public.i_public; - import im_private_mi_public = m_public.mi_public; - import im_private_mu_public = m_public.mu_public; - - // Usage of above decls - var privateUse_im_private_c_public = new im_private_c_public(); - export var publicUse_im_private_c_public = new im_private_c_public(); - var privateUse_im_private_e_public = im_private_e_public.Happy; - export var publicUse_im_private_e_public = im_private_e_public.Grumpy; - var privateUse_im_private_f_public = im_private_f_public(); - export var publicUse_im_private_f_public = im_private_f_public(); - var privateUse_im_private_v_public = im_private_v_public; - export var publicUse_im_private_v_public = im_private_v_public; - var privateUse_im_private_i_public: im_private_i_public; - export var publicUse_im_private_i_public: im_private_i_public; - var privateUse_im_private_mi_public = new im_private_mi_public.c(); - export var publicUse_im_private_mi_public = new im_private_mi_public.c(); - var privateUse_im_private_mu_public: im_private_mu_public.i; - export var publicUse_im_private_mu_public: im_private_mu_public.i; - } - - module import_private { - // No Privacy errors - importing private elements - import im_private_c_private = m_private.c_private; - import im_private_e_private = m_private.e_private; - import im_private_f_private = m_private.f_private; - import im_private_v_private = m_private.v_private; - import im_private_i_private = m_private.i_private; - import im_private_mi_private = m_private.mi_private; - import im_private_mu_private = m_private.mu_private; - - // Usage of above decls - var privateUse_im_private_c_private = new im_private_c_private(); - export var publicUse_im_private_c_private = new im_private_c_private(); - var privateUse_im_private_e_private = im_private_e_private.Happy; - export var publicUse_im_private_e_private = im_private_e_private.Grumpy; - var privateUse_im_private_f_private = im_private_f_private(); - export var publicUse_im_private_f_private = im_private_f_private(); - var privateUse_im_private_v_private = im_private_v_private; - export var publicUse_im_private_v_private = im_private_v_private; - var privateUse_im_private_i_private: im_private_i_private; - export var publicUse_im_private_i_private: im_private_i_private; - var privateUse_im_private_mi_private = new im_private_mi_private.c(); - export var publicUse_im_private_mi_private = new im_private_mi_private.c(); - var privateUse_im_private_mu_private: im_private_mu_private.i; - export var publicUse_im_private_mu_private: im_private_mu_private.i; - - // No privacy Error - importing public elements - import im_private_c_public = m_public.c_public; - import im_private_e_public = m_public.e_public; - import im_private_f_public = m_public.f_public; - import im_private_v_public = m_public.v_public; - import im_private_i_public = m_public.i_public; - import im_private_mi_public = m_public.mi_public; - import im_private_mu_public = m_public.mu_public; - - // Usage of above decls - var privateUse_im_private_c_public = new im_private_c_public(); - export var publicUse_im_private_c_public = new im_private_c_public(); - var privateUse_im_private_e_public = im_private_e_public.Happy; - export var publicUse_im_private_e_public = im_private_e_public.Grumpy; - var privateUse_im_private_f_public = im_private_f_public(); - export var publicUse_im_private_f_public = im_private_f_public(); - var privateUse_im_private_v_public = im_private_v_public; - export var publicUse_im_private_v_public = im_private_v_public; - var privateUse_im_private_i_public: im_private_i_public; - export var publicUse_im_private_i_public: im_private_i_public; - var privateUse_im_private_mi_public = new im_private_mi_public.c(); - export var publicUse_im_private_mi_public = new im_private_mi_public.c(); - var privateUse_im_private_mu_public: im_private_mu_public.i; - export var publicUse_im_private_mu_public: im_private_mu_public.i; - } \ No newline at end of file diff --git a/tests/baselines/reference/privacyTopLevelInternalReferenceImportWithExport.errors.txt b/tests/baselines/reference/privacyTopLevelInternalReferenceImportWithExport.errors.txt deleted file mode 100644 index 33dc54f5deec8..0000000000000 --- a/tests/baselines/reference/privacyTopLevelInternalReferenceImportWithExport.errors.txt +++ /dev/null @@ -1,115 +0,0 @@ -error TS-1: Pre-emit (0) and post-emit (10) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! - - -!!! error TS-1: Pre-emit (0) and post-emit (10) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! -!!! related TS-1: The excess diagnostics are: -!!! related TS2724 tests/cases/compiler/privacyTopLevelInternalReferenceImportWithExport.ts:50:47: 'm_private' has no exported member named 'c_private'. Did you mean 'f_private'? -!!! related TS2724 tests/cases/compiler/privacyTopLevelInternalReferenceImportWithExport.ts:51:47: 'm_private' has no exported member named 'e_private'. Did you mean 'f_private'? -!!! related TS2724 tests/cases/compiler/privacyTopLevelInternalReferenceImportWithExport.ts:52:47: 'm_private' has no exported member named 'f_private'. Did you mean 'c_private'? -!!! related TS2724 tests/cases/compiler/privacyTopLevelInternalReferenceImportWithExport.ts:53:47: 'm_private' has no exported member named 'v_private'. Did you mean 'f_private'? -!!! related TS2724 tests/cases/compiler/privacyTopLevelInternalReferenceImportWithExport.ts:55:48: 'm_private' has no exported member named 'mi_private'. Did you mean 'i_private'? -!!! related TS2724 tests/cases/compiler/privacyTopLevelInternalReferenceImportWithExport.ts:76:45: '"tests/cases/compiler/privacyTopLevelInternalReferenceImportWithExport".m_public' has no exported member named 'c_public'. Did you mean 'f_public'? -!!! related TS2724 tests/cases/compiler/privacyTopLevelInternalReferenceImportWithExport.ts:77:45: '"tests/cases/compiler/privacyTopLevelInternalReferenceImportWithExport".m_public' has no exported member named 'e_public'. Did you mean 'f_public'? -!!! related TS2724 tests/cases/compiler/privacyTopLevelInternalReferenceImportWithExport.ts:78:45: '"tests/cases/compiler/privacyTopLevelInternalReferenceImportWithExport".m_public' has no exported member named 'f_public'. Did you mean 'c_public'? -!!! related TS2724 tests/cases/compiler/privacyTopLevelInternalReferenceImportWithExport.ts:79:45: '"tests/cases/compiler/privacyTopLevelInternalReferenceImportWithExport".m_public' has no exported member named 'v_public'. Did you mean 'f_public'? -!!! related TS2724 tests/cases/compiler/privacyTopLevelInternalReferenceImportWithExport.ts:81:46: '"tests/cases/compiler/privacyTopLevelInternalReferenceImportWithExport".m_public' has no exported member named 'mi_public'. Did you mean 'i_public'? -==== tests/cases/compiler/privacyTopLevelInternalReferenceImportWithExport.ts (0 errors) ==== - // private elements - module m_private { - export class c_private { - } - export enum e_private { - Happy, - Grumpy - } - export function f_private() { - return new c_private(); - } - export var v_private = new c_private(); - export interface i_private { - } - export module mi_private { - export class c { - } - } - export module mu_private { - export interface i { - } - } - } - - // Public elements - export module m_public { - export class c_public { - } - export enum e_public { - Happy, - Grumpy - } - export function f_public() { - return new c_public(); - } - export var v_public = 10; - export interface i_public { - } - export module mi_public { - export class c { - } - } - export module mu_public { - export interface i { - } - } - } - - // Privacy errors - importing private elements - export import im_public_c_private = m_private.c_private; - export import im_public_e_private = m_private.e_private; - export import im_public_f_private = m_private.f_private; - export import im_public_v_private = m_private.v_private; - export import im_public_i_private = m_private.i_private; - export import im_public_mi_private = m_private.mi_private; - export import im_public_mu_private = m_private.mu_private; - - // Usage of privacy error imports - var privateUse_im_public_c_private = new im_public_c_private(); - export var publicUse_im_public_c_private = new im_public_c_private(); - var privateUse_im_public_e_private = im_public_e_private.Happy; - export var publicUse_im_public_e_private = im_public_e_private.Grumpy; - var privateUse_im_public_f_private = im_public_f_private(); - export var publicUse_im_public_f_private = im_public_f_private(); - var privateUse_im_public_v_private = im_public_v_private; - export var publicUse_im_public_v_private = im_public_v_private; - var privateUse_im_public_i_private: im_public_i_private; - export var publicUse_im_public_i_private: im_public_i_private; - var privateUse_im_public_mi_private = new im_public_mi_private.c(); - export var publicUse_im_public_mi_private = new im_public_mi_private.c(); - var privateUse_im_public_mu_private: im_public_mu_private.i; - export var publicUse_im_public_mu_private: im_public_mu_private.i; - - - // No Privacy errors - importing public elements - export import im_public_c_public = m_public.c_public; - export import im_public_e_public = m_public.e_public; - export import im_public_f_public = m_public.f_public; - export import im_public_v_public = m_public.v_public; - export import im_public_i_public = m_public.i_public; - export import im_public_mi_public = m_public.mi_public; - export import im_public_mu_public = m_public.mu_public; - - // Usage of above decls - var privateUse_im_public_c_public = new im_public_c_public(); - export var publicUse_im_public_c_public = new im_public_c_public(); - var privateUse_im_public_e_public = im_public_e_public.Happy; - export var publicUse_im_public_e_public = im_public_e_public.Grumpy; - var privateUse_im_public_f_public = im_public_f_public(); - export var publicUse_im_public_f_public = im_public_f_public(); - var privateUse_im_public_v_public = im_public_v_public; - export var publicUse_im_public_v_public = im_public_v_public; - var privateUse_im_public_i_public: im_public_i_public; - export var publicUse_im_public_i_public: im_public_i_public; - var privateUse_im_public_mi_public = new im_public_mi_public.c(); - export var publicUse_im_public_mi_public = new im_public_mi_public.c(); - var privateUse_im_public_mu_public: im_public_mu_public.i; - export var publicUse_im_public_mu_public: im_public_mu_public.i; - \ No newline at end of file diff --git a/tests/baselines/reference/privacyTopLevelInternalReferenceImportWithoutExport.errors.txt b/tests/baselines/reference/privacyTopLevelInternalReferenceImportWithoutExport.errors.txt deleted file mode 100644 index 33203202ec2ec..0000000000000 --- a/tests/baselines/reference/privacyTopLevelInternalReferenceImportWithoutExport.errors.txt +++ /dev/null @@ -1,115 +0,0 @@ -error TS-1: Pre-emit (0) and post-emit (10) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! - - -!!! error TS-1: Pre-emit (0) and post-emit (10) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! -!!! related TS-1: The excess diagnostics are: -!!! related TS2724 tests/cases/compiler/privacyTopLevelInternalReferenceImportWithoutExport.ts:50:41: 'm_private' has no exported member named 'c_private'. Did you mean 'f_private'? -!!! related TS2724 tests/cases/compiler/privacyTopLevelInternalReferenceImportWithoutExport.ts:51:41: 'm_private' has no exported member named 'e_private'. Did you mean 'f_private'? -!!! related TS2724 tests/cases/compiler/privacyTopLevelInternalReferenceImportWithoutExport.ts:52:41: 'm_private' has no exported member named 'f_private'. Did you mean 'c_private'? -!!! related TS2724 tests/cases/compiler/privacyTopLevelInternalReferenceImportWithoutExport.ts:53:41: 'm_private' has no exported member named 'v_private'. Did you mean 'f_private'? -!!! related TS2724 tests/cases/compiler/privacyTopLevelInternalReferenceImportWithoutExport.ts:55:42: 'm_private' has no exported member named 'mi_private'. Did you mean 'i_private'? -!!! related TS2724 tests/cases/compiler/privacyTopLevelInternalReferenceImportWithoutExport.ts:76:39: '"tests/cases/compiler/privacyTopLevelInternalReferenceImportWithoutExport".m_public' has no exported member named 'c_public'. Did you mean 'f_public'? -!!! related TS2724 tests/cases/compiler/privacyTopLevelInternalReferenceImportWithoutExport.ts:77:39: '"tests/cases/compiler/privacyTopLevelInternalReferenceImportWithoutExport".m_public' has no exported member named 'e_public'. Did you mean 'f_public'? -!!! related TS2724 tests/cases/compiler/privacyTopLevelInternalReferenceImportWithoutExport.ts:78:39: '"tests/cases/compiler/privacyTopLevelInternalReferenceImportWithoutExport".m_public' has no exported member named 'f_public'. Did you mean 'c_public'? -!!! related TS2724 tests/cases/compiler/privacyTopLevelInternalReferenceImportWithoutExport.ts:79:39: '"tests/cases/compiler/privacyTopLevelInternalReferenceImportWithoutExport".m_public' has no exported member named 'v_public'. Did you mean 'f_public'? -!!! related TS2724 tests/cases/compiler/privacyTopLevelInternalReferenceImportWithoutExport.ts:81:40: '"tests/cases/compiler/privacyTopLevelInternalReferenceImportWithoutExport".m_public' has no exported member named 'mi_public'. Did you mean 'i_public'? -==== tests/cases/compiler/privacyTopLevelInternalReferenceImportWithoutExport.ts (0 errors) ==== - // private elements - module m_private { - export class c_private { - } - export enum e_private { - Happy, - Grumpy - } - export function f_private() { - return new c_private(); - } - export var v_private = new c_private(); - export interface i_private { - } - export module mi_private { - export class c { - } - } - export module mu_private { - export interface i { - } - } - } - - // Public elements - export module m_public { - export class c_public { - } - export enum e_public { - Happy, - Grumpy - } - export function f_public() { - return new c_public(); - } - export var v_public = 10; - export interface i_public { - } - export module mi_public { - export class c { - } - } - export module mu_public { - export interface i { - } - } - } - - // No Privacy errors - importing private elements - import im_private_c_private = m_private.c_private; - import im_private_e_private = m_private.e_private; - import im_private_f_private = m_private.f_private; - import im_private_v_private = m_private.v_private; - import im_private_i_private = m_private.i_private; - import im_private_mi_private = m_private.mi_private; - import im_private_mu_private = m_private.mu_private; - - // Usage of above decls - var privateUse_im_private_c_private = new im_private_c_private(); - export var publicUse_im_private_c_private = new im_private_c_private(); - var privateUse_im_private_e_private = im_private_e_private.Happy; - export var publicUse_im_private_e_private = im_private_e_private.Grumpy; - var privateUse_im_private_f_private = im_private_f_private(); - export var publicUse_im_private_f_private = im_private_f_private(); - var privateUse_im_private_v_private = im_private_v_private; - export var publicUse_im_private_v_private = im_private_v_private; - var privateUse_im_private_i_private: im_private_i_private; - export var publicUse_im_private_i_private: im_private_i_private; - var privateUse_im_private_mi_private = new im_private_mi_private.c(); - export var publicUse_im_private_mi_private = new im_private_mi_private.c(); - var privateUse_im_private_mu_private: im_private_mu_private.i; - export var publicUse_im_private_mu_private: im_private_mu_private.i; - - - // No Privacy errors - importing public elements - import im_private_c_public = m_public.c_public; - import im_private_e_public = m_public.e_public; - import im_private_f_public = m_public.f_public; - import im_private_v_public = m_public.v_public; - import im_private_i_public = m_public.i_public; - import im_private_mi_public = m_public.mi_public; - import im_private_mu_public = m_public.mu_public; - - // Usage of above decls - var privateUse_im_private_c_public = new im_private_c_public(); - export var publicUse_im_private_c_public = new im_private_c_public(); - var privateUse_im_private_e_public = im_private_e_public.Happy; - export var publicUse_im_private_e_public = im_private_e_public.Grumpy; - var privateUse_im_private_f_public = im_private_f_public(); - export var publicUse_im_private_f_public = im_private_f_public(); - var privateUse_im_private_v_public = im_private_v_public; - export var publicUse_im_private_v_public = im_private_v_public; - var privateUse_im_private_i_public: im_private_i_public; - export var publicUse_im_private_i_public: im_private_i_public; - var privateUse_im_private_mi_public = new im_private_mi_public.c(); - export var publicUse_im_private_mi_public = new im_private_mi_public.c(); - var privateUse_im_private_mu_public: im_private_mu_public.i; - export var publicUse_im_private_mu_public: im_private_mu_public.i; - \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationImport.errors.txt b/tests/baselines/reference/sourceMapValidationImport.errors.txt deleted file mode 100644 index 89e1f9b62d29e..0000000000000 --- a/tests/baselines/reference/sourceMapValidationImport.errors.txt +++ /dev/null @@ -1,16 +0,0 @@ -error TS-1: Pre-emit (0) and post-emit (2) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! - - -!!! error TS-1: Pre-emit (0) and post-emit (2) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! -!!! related TS-1: The excess diagnostics are: -!!! related TS2749 tests/cases/compiler/sourceMapValidationImport.ts:5:12: 'm.c' refers to a value, but is being used as a type here. Did you mean 'typeof m.c'? -!!! related TS2749 tests/cases/compiler/sourceMapValidationImport.ts:6:19: 'm.c' refers to a value, but is being used as a type here. Did you mean 'typeof m.c'? -==== tests/cases/compiler/sourceMapValidationImport.ts (0 errors) ==== - export module m { - export class c { - } - } - import a = m.c; - export import b = m.c; - var x = new a(); - var y = new b(); \ No newline at end of file diff --git a/tests/baselines/reference/systemModule17.errors.txt b/tests/baselines/reference/systemModule17.errors.txt deleted file mode 100644 index 32473867de7c9..0000000000000 --- a/tests/baselines/reference/systemModule17.errors.txt +++ /dev/null @@ -1,43 +0,0 @@ -error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! - - -!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! -!!! related TS-1: The excess diagnostics are: -!!! related TS2749 tests/cases/compiler/f2.ts:9:13: 'N.x' refers to a value, but is being used as a type here. Did you mean 'typeof N.x'? -==== tests/cases/compiler/f1.ts (0 errors) ==== - export class A {} - export interface I {} - -==== tests/cases/compiler/f2.ts (0 errors) ==== - var x = 1; - interface I { } - - namespace N { - export var x = 1; - export interface I { } - } - - import IX = N.x; - import II = N.I; - import { A, A as EA, I as EI } from "f1"; - - export {x}; - export {x as x1}; - - export {I}; - export {I as I1}; - - export {A}; - export {A as A1}; - - export {EA}; - export {EA as EA1}; - - export {EI }; - export {EI as EI1}; - - export {IX}; - export {IX as IX1}; - - export {II}; - export {II as II1}; \ No newline at end of file diff --git a/tests/baselines/reference/topLevelAwait.2(module=es2022).errors.txt b/tests/baselines/reference/topLevelAwait.2(module=es2022).errors.txt deleted file mode 100644 index c20c80ef8e29c..0000000000000 --- a/tests/baselines/reference/topLevelAwait.2(module=es2022).errors.txt +++ /dev/null @@ -1,12 +0,0 @@ -error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! - - -!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! -!!! related TS-1: The excess diagnostics are: -!!! related TS2749 tests/cases/conformance/externalModules/topLevelAwait.2.ts:4:16: 'foo.await' refers to a value, but is being used as a type here. Did you mean 'typeof foo.await'? -==== tests/cases/conformance/externalModules/topLevelAwait.2.ts (0 errors) ==== - declare namespace foo { const await: any; } - - // await allowed in import=namespace when not a module - import await = foo.await; - \ No newline at end of file diff --git a/tests/baselines/reference/topLevelAwait.2(module=esnext).errors.txt b/tests/baselines/reference/topLevelAwait.2(module=esnext).errors.txt deleted file mode 100644 index c20c80ef8e29c..0000000000000 --- a/tests/baselines/reference/topLevelAwait.2(module=esnext).errors.txt +++ /dev/null @@ -1,12 +0,0 @@ -error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! - - -!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! -!!! related TS-1: The excess diagnostics are: -!!! related TS2749 tests/cases/conformance/externalModules/topLevelAwait.2.ts:4:16: 'foo.await' refers to a value, but is being used as a type here. Did you mean 'typeof foo.await'? -==== tests/cases/conformance/externalModules/topLevelAwait.2.ts (0 errors) ==== - declare namespace foo { const await: any; } - - // await allowed in import=namespace when not a module - import await = foo.await; - \ No newline at end of file diff --git a/tests/baselines/reference/tsxPreserveEmit1.errors.txt b/tests/baselines/reference/tsxPreserveEmit1.errors.txt deleted file mode 100644 index f9f9cb6b3bd61..0000000000000 --- a/tests/baselines/reference/tsxPreserveEmit1.errors.txt +++ /dev/null @@ -1,37 +0,0 @@ -error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! - - -!!! error TS-1: Pre-emit (0) and post-emit (1) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! -!!! related TS-1: The excess diagnostics are: -!!! related TS2749 tests/cases/conformance/jsx/test.tsx:5:16: 'ReactRouter.Route' refers to a value, but is being used as a type here. Did you mean 'typeof ReactRouter.Route'? -==== tests/cases/conformance/jsx/test.tsx (0 errors) ==== - // Should emit 'react-router' in the AMD dependency list - import React = require('react'); - import ReactRouter = require('react-router'); - - import Route = ReactRouter.Route; - - var routes1 = ; - - module M { - export var X: any; - } - module M { - // Should emit 'M.X' in both opening and closing tags - var y = ; - } - -==== tests/cases/conformance/jsx/react.d.ts (0 errors) ==== - declare module 'react' { - var x: any; - export = x; - } - - declare module ReactRouter { - var Route: any; - interface Thing { } - } - declare module 'react-router' { - export = ReactRouter; - } - \ No newline at end of file diff --git a/tests/baselines/reference/tsxPreserveEmit1.types b/tests/baselines/reference/tsxPreserveEmit1.types index 812f1a4b8dc95..f4497ecb5051c 100644 --- a/tests/baselines/reference/tsxPreserveEmit1.types +++ b/tests/baselines/reference/tsxPreserveEmit1.types @@ -12,8 +12,8 @@ import Route = ReactRouter.Route; >Route : any var routes1 = ; ->routes1 : any -> : any +>routes1 : error +> : error >Route : any module M { @@ -27,8 +27,8 @@ module M { // Should emit 'M.X' in both opening and closing tags var y = ; ->y : any -> : any +>y : error +> : error >X : any >X : any } diff --git a/tests/baselines/reference/typeofInternalModules.errors.txt b/tests/baselines/reference/typeofInternalModules.errors.txt index 5b1d3649b2bab..8ba8cc720ca12 100644 --- a/tests/baselines/reference/typeofInternalModules.errors.txt +++ b/tests/baselines/reference/typeofInternalModules.errors.txt @@ -1,4 +1,3 @@ -error TS-1: Pre-emit (5) and post-emit (6) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! tests/cases/compiler/typeofInternalModules.ts(15,16): error TS2708: Cannot use namespace 'importUninst' as a value. tests/cases/compiler/typeofInternalModules.ts(17,9): error TS2709: Cannot use namespace 'Outer' as a type. tests/cases/compiler/typeofInternalModules.ts(19,1): error TS2741: Property 'C' is missing in type 'typeof Outer' but required in type 'typeof instantiated'. @@ -6,9 +5,6 @@ tests/cases/compiler/typeofInternalModules.ts(21,16): error TS2708: Cannot use n tests/cases/compiler/typeofInternalModules.ts(23,1): error TS2741: Property 'instantiated' is missing in type 'typeof instantiated' but required in type 'typeof Outer'. -!!! error TS-1: Pre-emit (5) and post-emit (6) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! -!!! related TS-1: The excess diagnostics are: -!!! related TS2724 tests/cases/compiler/typeofInternalModules.ts:10:27: 'Outer' has no exported member named 'instantiated'. Did you mean 'uninstantiated'? ==== tests/cases/compiler/typeofInternalModules.ts (5 errors) ==== module Outer { export module instantiated { diff --git a/tests/baselines/reference/varNameConflictsWithImportInDifferentPartOfModule.errors.txt b/tests/baselines/reference/varNameConflictsWithImportInDifferentPartOfModule.errors.txt index 0f57e3b586036..1ca223783bf07 100644 --- a/tests/baselines/reference/varNameConflictsWithImportInDifferentPartOfModule.errors.txt +++ b/tests/baselines/reference/varNameConflictsWithImportInDifferentPartOfModule.errors.txt @@ -1,10 +1,6 @@ -error TS-1: Pre-emit (1) and post-emit (2) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! tests/cases/compiler/varNameConflictsWithImportInDifferentPartOfModule.ts(6,5): error TS2440: Import declaration conflicts with local declaration of 'q'. -!!! error TS-1: Pre-emit (1) and post-emit (2) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! -!!! related TS-1: The excess diagnostics are: -!!! related TS2749 tests/cases/compiler/varNameConflictsWithImportInDifferentPartOfModule.ts:6:23: 'M1.s' refers to a value, but is being used as a type here. Did you mean 'typeof M1.s'? ==== tests/cases/compiler/varNameConflictsWithImportInDifferentPartOfModule.ts (1 errors) ==== module M1 { export var q = 5; From 1c9f8234699c30b376e0883b9ceb437285e6d1c9 Mon Sep 17 00:00:00 2001 From: Jack Bates Date: Thu, 4 Nov 2021 08:34:42 -0700 Subject: [PATCH 6/6] Resolve declaration (cached) vs. entity name? --- src/compiler/checker.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 488f21db8c038..af2d710d25e4f 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -41620,8 +41620,9 @@ namespace ts { return getEnumMemberValue(node); } + // Cached name resolution result of import equals declaration/access expression const symbol = isEntityName(node) - ? resolveEntityName(node, SymbolFlags.EnumMember, /*ignoreErrors*/ true) + ? isDeclaration(node.parent) && resolveAlias(getSymbolOfNode(node.parent)) : getNodeLinks(node).resolvedSymbol; if (symbol && (symbol.flags & SymbolFlags.EnumMember)) { // inline property\index accesses only for const enums