From eecf7ba638fa3c1e5f46b23a01e2418ed74aa953 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Sun, 26 Apr 2015 16:12:16 -0700 Subject: [PATCH 1/7] Support 'namespace' declarations for internal modules --- src/compiler/parser.ts | 22 ++++++++++++++++------ src/compiler/scanner.ts | 1 + src/compiler/types.ts | 6 ++++-- src/services/formatting/rules.ts | 2 +- src/services/services.ts | 7 +++++-- 5 files changed, 27 insertions(+), 11 deletions(-) diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 1a06a2743baa3..476c4ff06d194 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -3704,6 +3704,7 @@ module ts { return !isConstEnum; case SyntaxKind.InterfaceKeyword: case SyntaxKind.ModuleKeyword: + case SyntaxKind.NamespaceKeyword: case SyntaxKind.EnumKeyword: case SyntaxKind.TypeKeyword: // When followed by an identifier, these do not start a statement but might @@ -4371,14 +4372,14 @@ module ts { return finishNode(node); } - function parseInternalModuleTail(fullStart: number, decorators: NodeArray, modifiers: ModifiersArray, flags: NodeFlags): ModuleDeclaration { + function parseModuleOrNamespaceDeclaration(fullStart: number, decorators: NodeArray, modifiers: ModifiersArray, flags: NodeFlags): ModuleDeclaration { let node = createNode(SyntaxKind.ModuleDeclaration, fullStart); node.decorators = decorators; setModifiers(node, modifiers); node.flags |= flags; node.name = parseIdentifier(); node.body = parseOptional(SyntaxKind.DotToken) - ? parseInternalModuleTail(getNodePos(), /*decorators*/ undefined, /*modifiers:*/undefined, NodeFlags.Export) + ? parseModuleOrNamespaceDeclaration(getNodePos(), /*decorators*/ undefined, /*modifiers:*/undefined, NodeFlags.Export) : parseModuleBlock(); return finishNode(node); } @@ -4393,10 +4394,17 @@ module ts { } function parseModuleDeclaration(fullStart: number, decorators: NodeArray, modifiers: ModifiersArray): ModuleDeclaration { - parseExpected(SyntaxKind.ModuleKeyword); - return token === SyntaxKind.StringLiteral - ? parseAmbientExternalModuleDeclaration(fullStart, decorators, modifiers) - : parseInternalModuleTail(fullStart, decorators, modifiers, modifiers ? modifiers.flags : 0); + let flags = modifiers ? modifiers.flags : 0; + if (parseOptional(SyntaxKind.NamespaceKeyword)) { + flags |= NodeFlags.Namespace; + } + else { + parseExpected(SyntaxKind.ModuleKeyword); + if (token === SyntaxKind.StringLiteral) { + return parseAmbientExternalModuleDeclaration(fullStart, decorators, modifiers); + } + } + return parseModuleOrNamespaceDeclaration(fullStart, decorators, modifiers, flags); } function isExternalModuleReference() { @@ -4631,6 +4639,7 @@ module ts { // Not true keywords so ensure an identifier follows or is string literal or asterisk or open brace return lookAhead(nextTokenCanFollowImportKeyword); case SyntaxKind.ModuleKeyword: + case SyntaxKind.NamespaceKeyword: // Not a true keyword so ensure an identifier or string literal follows return lookAhead(nextTokenIsIdentifierOrKeywordOrStringLiteral); case SyntaxKind.ExportKeyword: @@ -4715,6 +4724,7 @@ module ts { case SyntaxKind.EnumKeyword: return parseEnumDeclaration(fullStart, decorators, modifiers); case SyntaxKind.ModuleKeyword: + case SyntaxKind.NamespaceKeyword: return parseModuleDeclaration(fullStart, decorators, modifiers); case SyntaxKind.ImportKeyword: return parseImportDeclarationOrImportEqualsDeclaration(fullStart, decorators, modifiers); diff --git a/src/compiler/scanner.ts b/src/compiler/scanner.ts index df6c20a8107dc..f7224e619bbd9 100644 --- a/src/compiler/scanner.ts +++ b/src/compiler/scanner.ts @@ -76,6 +76,7 @@ module ts { "interface": SyntaxKind.InterfaceKeyword, "let": SyntaxKind.LetKeyword, "module": SyntaxKind.ModuleKeyword, + "namespace": SyntaxKind.NamespaceKeyword, "new": SyntaxKind.NewKeyword, "null": SyntaxKind.NullKeyword, "number": SyntaxKind.NumberKeyword, diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 6e7c15e9e3943..2a2035bf40ca5 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -138,6 +138,7 @@ module ts { DeclareKeyword, GetKeyword, ModuleKeyword, + NamespaceKeyword, RequireKeyword, NumberKeyword, SetKeyword, @@ -312,8 +313,9 @@ module ts { DeclarationFile = 0x00000800, // Node is a .d.ts file Let = 0x00001000, // Variable declaration Const = 0x00002000, // Variable declaration - OctalLiteral = 0x00004000, - ExportContext = 0x00008000, // Export context (initialized by binding) + OctalLiteral = 0x00004000, // Octal numeric literal + Namespace = 0x00008000, // Namespace declaration + ExportContext = 0x00010000, // Export context (initialized by binding) Modifier = Export | Ambient | Public | Private | Protected | Static | Default, AccessibilityModifier = Public | Private | Protected, diff --git a/src/services/formatting/rules.ts b/src/services/formatting/rules.ts index 23c835eaec2f5..0b6a6ad0bdce2 100644 --- a/src/services/formatting/rules.ts +++ b/src/services/formatting/rules.ts @@ -312,7 +312,7 @@ module ts.formatting { this.NoSpaceAfterModuleImport = new Rule(RuleDescriptor.create2(Shared.TokenRange.FromTokens([SyntaxKind.ModuleKeyword, SyntaxKind.RequireKeyword]), SyntaxKind.OpenParenToken), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Delete)); // Add a space around certain TypeScript keywords - this.SpaceAfterCertainTypeScriptKeywords = new Rule(RuleDescriptor.create4(Shared.TokenRange.FromTokens([SyntaxKind.ClassKeyword, SyntaxKind.DeclareKeyword, SyntaxKind.EnumKeyword, SyntaxKind.ExportKeyword, SyntaxKind.ExtendsKeyword, SyntaxKind.GetKeyword, SyntaxKind.ImplementsKeyword, SyntaxKind.ImportKeyword, SyntaxKind.InterfaceKeyword, SyntaxKind.ModuleKeyword, SyntaxKind.PrivateKeyword, SyntaxKind.PublicKeyword, SyntaxKind.SetKeyword, SyntaxKind.StaticKeyword]), Shared.TokenRange.Any), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Space)); + this.SpaceAfterCertainTypeScriptKeywords = new Rule(RuleDescriptor.create4(Shared.TokenRange.FromTokens([SyntaxKind.ClassKeyword, SyntaxKind.DeclareKeyword, SyntaxKind.EnumKeyword, SyntaxKind.ExportKeyword, SyntaxKind.ExtendsKeyword, SyntaxKind.GetKeyword, SyntaxKind.ImplementsKeyword, SyntaxKind.ImportKeyword, SyntaxKind.InterfaceKeyword, SyntaxKind.ModuleKeyword, SyntaxKind.NamespaceKeyword, SyntaxKind.PrivateKeyword, SyntaxKind.PublicKeyword, SyntaxKind.SetKeyword, SyntaxKind.StaticKeyword]), Shared.TokenRange.Any), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Space)); this.SpaceBeforeCertainTypeScriptKeywords = new Rule(RuleDescriptor.create4(Shared.TokenRange.Any, Shared.TokenRange.FromTokens([SyntaxKind.ExtendsKeyword, SyntaxKind.ImplementsKeyword])), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Space)); // Treat string literals in module names as identifiers, and add a space between the literal and the opening Brace braces, e.g.: module "m2" { diff --git a/src/services/services.ts b/src/services/services.ts index 98a7fe0499f53..b6a2853031e26 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -2991,7 +2991,8 @@ module ts { case SyntaxKind.OpenBracketToken: return containingNodeKind === SyntaxKind.ArrayLiteralExpression; // [ | - case SyntaxKind.ModuleKeyword: // module | + case SyntaxKind.ModuleKeyword: // module | + case SyntaxKind.NamespaceKeyword: // namespace | return true; case SyntaxKind.DotToken: @@ -3644,7 +3645,9 @@ module ts { } if (symbolFlags & SymbolFlags.Module) { addNewLineIfDisplayPartsExist(); - displayParts.push(keywordPart(SyntaxKind.ModuleKeyword)); + let declaration = getDeclarationOfKind(symbol, SyntaxKind.ModuleDeclaration); + let isNamespace = declaration && declaration.name && declaration.name.kind === SyntaxKind.Identifier; + displayParts.push(keywordPart(isNamespace ? SyntaxKind.NamespaceKeyword : SyntaxKind.ModuleKeyword)); displayParts.push(spacePart()); addFullSymbolName(symbol); } From 8489e521c8e2c10b9f201c2ed82ba82e58fce8cf Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Sun, 26 Apr 2015 16:12:48 -0700 Subject: [PATCH 2/7] Modify fourslash tests --- tests/cases/fourslash/addMemberToInterface.ts | 6 +- tests/cases/fourslash/augmentedTypesClass3.ts | 8 +- .../cases/fourslash/augmentedTypesModule2.ts | 4 +- .../fourslash/commentsExternalModules.ts | 16 +-- .../fourslash/commentsImportDeclaration.ts | 12 +- tests/cases/fourslash/commentsModules.ts | 130 +++++++++--------- .../fourslash/commentsMultiModuleMultiFile.ts | 28 ++-- .../commentsMultiModuleSingleFile.ts | 18 +-- .../completionListWithModulesFromModule.ts | 56 ++++---- ...pletionListWithModulesInsideModuleScope.ts | 68 ++++----- ...letionListWithModulesOutsideModuleScope.ts | 34 ++--- .../memberListOfModuleInAnotherModule.ts | 12 +- .../missingMethodAfterEditAfterImport.ts | 8 +- ...uickInfoDisplayPartsExternalModuleAlias.ts | 2 +- .../quickInfoDisplayPartsExternalModules.ts | 50 +++---- .../fourslash/quickInfoDisplayPartsModules.ts | 48 +++---- 16 files changed, 250 insertions(+), 250 deletions(-) diff --git a/tests/cases/fourslash/addMemberToInterface.ts b/tests/cases/fourslash/addMemberToInterface.ts index ab0f99e468325..a420cab7fa253 100644 --- a/tests/cases/fourslash/addMemberToInterface.ts +++ b/tests/cases/fourslash/addMemberToInterface.ts @@ -1,7 +1,7 @@ /// //// -//// module /*check*/Mod{ +//// namespace /*check*/Mod{ //// } //// //// interface MyInterface { @@ -11,10 +11,10 @@ edit.disableFormatting(); goTo.marker('check'); -verify.quickInfoIs('module Mod'); +verify.quickInfoIs('namespace Mod'); goTo.marker('insert'); edit.insert("x: number;\n"); goTo.marker('check'); -verify.quickInfoIs('module Mod'); +verify.quickInfoIs('namespace Mod'); diff --git a/tests/cases/fourslash/augmentedTypesClass3.ts b/tests/cases/fourslash/augmentedTypesClass3.ts index e26fe7446247d..47c941e0787ff 100644 --- a/tests/cases/fourslash/augmentedTypesClass3.ts +++ b/tests/cases/fourslash/augmentedTypesClass3.ts @@ -1,14 +1,14 @@ /// ////class c/*1*/5b { public foo() { } } -////module c/*2*/5b { export var y = 2; } // should be ok +////namespace c/*2*/5b { export var y = 2; } // should be ok /////*3*/ goTo.marker('1'); -verify.quickInfoIs("class c5b\nmodule c5b"); +verify.quickInfoIs("class c5b\nnamespace c5b"); goTo.marker('2'); -verify.quickInfoIs("class c5b\nmodule c5b"); +verify.quickInfoIs("class c5b\nnamespace c5b"); goTo.marker('3'); -verify.completionListContains("c5b", "class c5b\nmodule c5b"); \ No newline at end of file +verify.completionListContains("c5b", "class c5b\nnamespace c5b"); \ No newline at end of file diff --git a/tests/cases/fourslash/augmentedTypesModule2.ts b/tests/cases/fourslash/augmentedTypesModule2.ts index 844bee7642ac7..1868ec45dfc45 100644 --- a/tests/cases/fourslash/augmentedTypesModule2.ts +++ b/tests/cases/fourslash/augmentedTypesModule2.ts @@ -1,12 +1,12 @@ /// ////function /*11*/m2f(x: number) { }; -////module m2f { export interface I { foo(): void } } +////namespace m2f { export interface I { foo(): void } } ////var x: m2f./*1*/ ////var /*2*/r = m2f/*3*/; goTo.marker('11'); -verify.quickInfoIs('function m2f(x: number): void\nmodule m2f'); +verify.quickInfoIs('function m2f(x: number): void\nnamespace m2f'); goTo.marker('1'); verify.completionListContains('I'); diff --git a/tests/cases/fourslash/commentsExternalModules.ts b/tests/cases/fourslash/commentsExternalModules.ts index 1b000b854b16a..088a60d911959 100644 --- a/tests/cases/fourslash/commentsExternalModules.ts +++ b/tests/cases/fourslash/commentsExternalModules.ts @@ -1,8 +1,8 @@ /// // @Filename: commentsExternalModules_file0.ts -/////** Module comment*/ -////export module m/*1*/1 { +/////** Namespace comment*/ +////export namespace m/*1*/1 { //// /** b's comment*/ //// export var b: number; //// /** foo's comment*/ @@ -10,7 +10,7 @@ //// return /*2*/b; //// } //// /** m2 comments*/ -//// export module m2 { +//// export namespace m2 { //// /** class comment;*/ //// export class c { //// }; @@ -36,7 +36,7 @@ edit.insert(''); goTo.file("commentsExternalModules_file0.ts"); goTo.marker('1'); -verify.quickInfoIs("module m1", "Module comment"); +verify.quickInfoIs("namespace m1", "Namespace comment"); goTo.marker('2'); verify.completionListContains("b", "var m1.b: number", "b's comment"); @@ -48,12 +48,12 @@ goTo.marker('3q'); verify.quickInfoIs("function foo(): number", "foo's comment"); goTo.marker('4'); -verify.completionListContains("m1", "module m1", "Module comment"); +verify.completionListContains("m1", "namespace m1", "Namespace comment"); goTo.marker('5'); verify.memberListContains("b", "var m1.b: number", "b's comment"); verify.memberListContains("fooExport", "function m1.fooExport(): number", "exported function"); -verify.memberListContains("m2", "module m1.m2"); +verify.memberListContains("m2", "namespace m1.m2"); goTo.marker('6'); verify.currentSignatureHelpDocCommentIs("exported function"); @@ -75,12 +75,12 @@ goTo.marker('10'); verify.completionListContains("extMod", 'import extMod = require("commentsExternalModules_file0")', "This is on import declaration"); goTo.marker('11'); -verify.memberListContains("m1", "module extMod.m1"); +verify.memberListContains("m1", "namespace extMod.m1"); goTo.marker('12'); verify.memberListContains("b", "var extMod.m1.b: number", "b's comment"); verify.memberListContains("fooExport", "function extMod.m1.fooExport(): number", "exported function"); -verify.memberListContains("m2", "module extMod.m1.m2"); +verify.memberListContains("m2", "namespace extMod.m1.m2"); goTo.marker('13'); verify.currentSignatureHelpDocCommentIs("exported function"); diff --git a/tests/cases/fourslash/commentsImportDeclaration.ts b/tests/cases/fourslash/commentsImportDeclaration.ts index d5c6a7fa537e1..35c6d45330d1d 100644 --- a/tests/cases/fourslash/commentsImportDeclaration.ts +++ b/tests/cases/fourslash/commentsImportDeclaration.ts @@ -1,12 +1,12 @@ /// // @Filename: commentsImportDeclaration_file0.ts -/////** ModuleComment*/ -////export module m/*2*/1 { +/////** NamespaceComment*/ +////export namespace m/*2*/1 { //// /** b's comment*/ //// export var b: number; //// /** m2 comments*/ -//// export module m2 { +//// export namespace m2 { //// /** class comment;*/ //// export class c { //// }; @@ -25,18 +25,18 @@ ////var new/*9*/Var = new extMod.m1.m2./*10*/c(); goTo.marker('2'); -verify.quickInfoIs("module m1", "ModuleComment"); +verify.quickInfoIs("namespace m1", "NamespaceComment"); goTo.marker('3'); verify.quickInfoIs('import extMod = require("commentsImportDeclaration_file0")', "Import declaration"); goTo.marker('6'); -verify.memberListContains("m1", "module extMod.m1"); +verify.memberListContains("m1", "namespace extMod.m1"); goTo.marker('7'); verify.memberListContains("b", "var extMod.m1.b: number", "b's comment"); verify.memberListContains("fooExport", "function extMod.m1.fooExport(): number", "exported function"); -verify.memberListContains("m2", "module extMod.m1.m2"); +verify.memberListContains("m2", "namespace extMod.m1.m2"); goTo.marker('8'); verify.currentSignatureHelpDocCommentIs("exported function"); diff --git a/tests/cases/fourslash/commentsModules.ts b/tests/cases/fourslash/commentsModules.ts index 4954359fedff1..9415c1bc85e7d 100644 --- a/tests/cases/fourslash/commentsModules.ts +++ b/tests/cases/fourslash/commentsModules.ts @@ -1,7 +1,7 @@ /// -/////** Module comment*/ -////module m/*1*/1 { +/////** Namespace comment*/ +////namespace m/*1*/1 { //// /** b's comment*/ //// export var b: number; //// /** foo's comment*/ @@ -9,7 +9,7 @@ //// return /*2*/b; //// } //// /** m2 comments*/ -//// export module m2 { +//// export namespace m2 { //// /** class comment;*/ //// export class c { //// }; @@ -23,50 +23,50 @@ ////} /////*4*/m1./*5*/fooExport(/*6*/); ////var my/*7*/var = new m1.m2./*8*/c(); -/////** module comment of m2.m3*/ -////module m2.m3 { +/////** namespace comment of m2.m3*/ +////namespace m2.m3 { //// /** Exported class comment*/ //// export class c { //// } ////} ////new /*9*/m2./*10*/m3./*11*/c(); -/////** module comment of m3.m4.m5*/ -////module m3.m4.m5 { +/////** namespace comment of m3.m4.m5*/ +////namespace m3.m4.m5 { //// /** Exported class comment*/ //// export class c { //// } ////} ////new /*12*/m3./*13*/m4./*14*/m5./*15*/c(); -/////** module comment of m4.m5.m6*/ -////module m4.m5.m6 { -//// export module m7 { +/////** namespace comment of m4.m5.m6*/ +////namespace m4.m5.m6 { +//// export namespace m7 { //// /** Exported class comment*/ //// export class c { //// } //// } ////} ////new /*16*/m4./*17*/m5./*18*/m6./*19*/m7./*20*/c(); -/////** module comment of m5.m6.m7*/ -////module m5.m6.m7 { -//// /** module m8 comment*/ -//// export module m8 { +/////** namespace comment of m5.m6.m7*/ +////namespace m5.m6.m7 { +//// /** namespace m8 comment*/ +//// export namespace m8 { //// /** Exported class comment*/ //// export class c { //// } //// } ////} ////new /*21*/m5./*22*/m6./*23*/m7./*24*/m8./*25*/c(); -////module m6.m7 { -//// export module m8 { +////namespace m6.m7 { +//// export namespace m8 { //// /** Exported class comment*/ //// export class c { //// } //// } ////} ////new /*26*/m6./*27*/m7./*28*/m8./*29*/c(); -////module m7.m8 { -//// /** module m9 comment*/ -//// export module m9 { +////namespace m7.m8 { +//// /** namespace m9 comment*/ +//// export namespace m9 { //// /** Exported class comment*/ //// export class c { //// } @@ -78,15 +78,15 @@ //// } //// export var b: /*34*/c; ////} -////module complexM { -//// export module m1 { +////namespace complexM { +//// export namespace m1 { //// export class c { //// public foo() { //// return 30; //// } //// } //// } -//// export module m2 { +//// export namespace m2 { //// export class c { //// public foo2() { //// return new complexM.m1.c(); @@ -97,7 +97,7 @@ ////var myComp/*35*/lexVal = new compl/*36*/exM.m/*37*/2./*38*/c().f/*39*/oo2().f/*40*/oo(); goTo.marker('1'); -verify.quickInfoIs("module m1", "Module comment"); +verify.quickInfoIs("namespace m1", "Namespace comment"); goTo.marker('2'); verify.completionListContains("b", "var m1.b: number", "b's comment"); @@ -109,12 +109,12 @@ goTo.marker('3q'); verify.quickInfoIs("function foo(): number", "foo's comment"); goTo.marker('4'); -verify.completionListContains("m1", "module m1", "Module comment"); +verify.completionListContains("m1", "namespace m1", "Namespace comment"); goTo.marker('5'); verify.memberListContains("b", "var m1.b: number", "b's comment"); verify.memberListContains("fooExport", "function m1.fooExport(): number", "exported function"); -verify.memberListContains("m2", "module m1.m2"); +verify.memberListContains("m2", "namespace m1.m2"); verify.quickInfoIs("function m1.fooExport(): number", "exported function"); goTo.marker('6'); @@ -129,100 +129,100 @@ verify.memberListContains("c", "constructor m1.m2.c(): m1.m2.c", ""); verify.memberListContains("i", "var m1.m2.i: m1.m2.c", "i"); goTo.marker('9'); -verify.completionListContains("m2", "module m2", ""); -verify.quickInfoIs("module m2", ""); +verify.completionListContains("m2", "namespace m2", ""); +verify.quickInfoIs("namespace m2", ""); goTo.marker('10'); -verify.memberListContains("m3", "module m2.m3"); -verify.quickInfoIs("module m2.m3", "module comment of m2.m3"); +verify.memberListContains("m3", "namespace m2.m3"); +verify.quickInfoIs("namespace m2.m3", "namespace comment of m2.m3"); goTo.marker('11'); verify.quickInfoIs("constructor m2.m3.c(): m2.m3.c", ""); verify.memberListContains("c", "constructor m2.m3.c(): m2.m3.c", ""); goTo.marker('12'); -verify.completionListContains("m3", "module m3", ""); -verify.quickInfoIs("module m3", ""); +verify.completionListContains("m3", "namespace m3", ""); +verify.quickInfoIs("namespace m3", ""); goTo.marker('13'); -verify.memberListContains("m4", "module m3.m4", ""); -verify.quickInfoIs("module m3.m4", ""); +verify.memberListContains("m4", "namespace m3.m4", ""); +verify.quickInfoIs("namespace m3.m4", ""); goTo.marker('14'); -verify.memberListContains("m5", "module m3.m4.m5"); -verify.quickInfoIs("module m3.m4.m5", "module comment of m3.m4.m5"); +verify.memberListContains("m5", "namespace m3.m4.m5"); +verify.quickInfoIs("namespace m3.m4.m5", "namespace comment of m3.m4.m5"); goTo.marker('15'); verify.quickInfoIs("constructor m3.m4.m5.c(): m3.m4.m5.c", ""); verify.memberListContains("c", "constructor m3.m4.m5.c(): m3.m4.m5.c", ""); goTo.marker('16'); -verify.completionListContains("m4", "module m4", ""); -verify.quickInfoIs("module m4", ""); +verify.completionListContains("m4", "namespace m4", ""); +verify.quickInfoIs("namespace m4", ""); goTo.marker('17'); -verify.memberListContains("m5", "module m4.m5", ""); -verify.quickInfoIs("module m4.m5", ""); +verify.memberListContains("m5", "namespace m4.m5", ""); +verify.quickInfoIs("namespace m4.m5", ""); goTo.marker('18'); -verify.memberListContains("m6", "module m4.m5.m6"); -verify.quickInfoIs("module m4.m5.m6", "module comment of m4.m5.m6"); +verify.memberListContains("m6", "namespace m4.m5.m6"); +verify.quickInfoIs("namespace m4.m5.m6", "namespace comment of m4.m5.m6"); goTo.marker('19'); -verify.memberListContains("m7", "module m4.m5.m6.m7"); -verify.quickInfoIs("module m4.m5.m6.m7", ""); +verify.memberListContains("m7", "namespace m4.m5.m6.m7"); +verify.quickInfoIs("namespace m4.m5.m6.m7", ""); goTo.marker('20'); verify.memberListContains("c", "constructor m4.m5.m6.m7.c(): m4.m5.m6.m7.c", ""); verify.quickInfoIs("constructor m4.m5.m6.m7.c(): m4.m5.m6.m7.c", ""); goTo.marker('21'); -verify.completionListContains("m5", "module m5"); -verify.quickInfoIs("module m5", ""); +verify.completionListContains("m5", "namespace m5"); +verify.quickInfoIs("namespace m5", ""); goTo.marker('22'); -verify.memberListContains("m6", "module m5.m6"); -verify.quickInfoIs("module m5.m6", ""); +verify.memberListContains("m6", "namespace m5.m6"); +verify.quickInfoIs("namespace m5.m6", ""); goTo.marker('23'); -verify.memberListContains("m7", "module m5.m6.m7"); -verify.quickInfoIs("module m5.m6.m7", "module comment of m5.m6.m7"); +verify.memberListContains("m7", "namespace m5.m6.m7"); +verify.quickInfoIs("namespace m5.m6.m7", "namespace comment of m5.m6.m7"); goTo.marker('24'); -verify.memberListContains("m8", "module m5.m6.m7.m8"); -verify.quickInfoIs("module m5.m6.m7.m8", "module m8 comment"); +verify.memberListContains("m8", "namespace m5.m6.m7.m8"); +verify.quickInfoIs("namespace m5.m6.m7.m8", "namespace m8 comment"); goTo.marker('25'); verify.memberListContains("c", "constructor m5.m6.m7.m8.c(): m5.m6.m7.m8.c", ""); verify.quickInfoIs("constructor m5.m6.m7.m8.c(): m5.m6.m7.m8.c", ""); goTo.marker('26'); -verify.completionListContains("m6", "module m6"); -verify.quickInfoIs("module m6", ""); +verify.completionListContains("m6", "namespace m6"); +verify.quickInfoIs("namespace m6", ""); goTo.marker('27'); -verify.memberListContains("m7", "module m6.m7"); -verify.quickInfoIs("module m6.m7", ""); +verify.memberListContains("m7", "namespace m6.m7"); +verify.quickInfoIs("namespace m6.m7", ""); goTo.marker('28'); -verify.memberListContains("m8", "module m6.m7.m8"); -verify.quickInfoIs("module m6.m7.m8", ""); +verify.memberListContains("m8", "namespace m6.m7.m8"); +verify.quickInfoIs("namespace m6.m7.m8", ""); goTo.marker('29'); verify.memberListContains("c", "constructor m6.m7.m8.c(): m6.m7.m8.c", ""); verify.quickInfoIs("constructor m6.m7.m8.c(): m6.m7.m8.c", ""); goTo.marker('30'); -verify.completionListContains("m7", "module m7"); -verify.quickInfoIs("module m7", ""); +verify.completionListContains("m7", "namespace m7"); +verify.quickInfoIs("namespace m7", ""); goTo.marker('31'); -verify.memberListContains("m8", "module m7.m8"); -verify.quickInfoIs("module m7.m8", ""); +verify.memberListContains("m8", "namespace m7.m8"); +verify.quickInfoIs("namespace m7.m8", ""); goTo.marker('32'); -verify.memberListContains("m9", "module m7.m8.m9"); -verify.quickInfoIs("module m7.m8.m9", "module m9 comment"); +verify.memberListContains("m9", "namespace m7.m8.m9"); +verify.quickInfoIs("namespace m7.m8.m9", "namespace m9 comment"); goTo.marker('33'); verify.memberListContains("c", "constructor m7.m8.m9.c(): m7.m8.m9.c", ""); @@ -236,10 +236,10 @@ goTo.marker('35'); verify.quickInfoIs("var myComplexVal: number", ""); goTo.marker('36'); -verify.quickInfoIs("module complexM", ""); +verify.quickInfoIs("namespace complexM", ""); goTo.marker('37'); -verify.quickInfoIs("module complexM.m2", ""); +verify.quickInfoIs("namespace complexM.m2", ""); goTo.marker('38'); verify.quickInfoIs("constructor complexM.m2.c(): complexM.m2.c", ""); diff --git a/tests/cases/fourslash/commentsMultiModuleMultiFile.ts b/tests/cases/fourslash/commentsMultiModuleMultiFile.ts index 9cbe47dd560c8..40d7b6d9bc400 100644 --- a/tests/cases/fourslash/commentsMultiModuleMultiFile.ts +++ b/tests/cases/fourslash/commentsMultiModuleMultiFile.ts @@ -1,14 +1,14 @@ /// // @Filename: commentsMultiModuleMultiFile_0.ts -/////** this is multi declare module*/ -////module mult/*3*/iM { +/////** this is multi declare namespace*/ +////namespace mult/*3*/iM { //// /** class b*/ //// export class b { //// } ////} -/////** thi is multi module 2*/ -////module mu/*2*/ltiM { +/////** thi is multi namespace 2*/ +////namespace mu/*2*/ltiM { //// /** class c comment*/ //// export class c { //// } @@ -18,8 +18,8 @@ ////new mu/*5*/ltiM.c(); // @Filename: commentsMultiModuleMultiFile_1.ts -/////** this is multi module 3 comment*/ -////module mu/*6*/ltiM { +/////** this is multi namespace 3 comment*/ +////namespace mu/*6*/ltiM { //// /** class d comment*/ //// export class d { //// } @@ -30,25 +30,25 @@ edit.insert(''); debugger; goTo.marker('1'); -verify.completionListContains("multiM", "module multiM", "this is multi declare module\nthi is multi module 2\nthis is multi module 3 comment"); +verify.completionListContains("multiM", "namespace multiM", "this is multi declare namespace\nthi is multi namespace 2\nthis is multi namespace 3 comment"); goTo.marker('2'); -verify.quickInfoIs("module multiM", "this is multi declare module\nthi is multi module 2\nthis is multi module 3 comment"); +verify.quickInfoIs("namespace multiM", "this is multi declare namespace\nthi is multi namespace 2\nthis is multi namespace 3 comment"); goTo.marker('3'); -verify.quickInfoIs("module multiM", "this is multi declare module\nthi is multi module 2\nthis is multi module 3 comment"); +verify.quickInfoIs("namespace multiM", "this is multi declare namespace\nthi is multi namespace 2\nthis is multi namespace 3 comment"); goTo.marker('4'); -verify.quickInfoIs("module multiM", "this is multi declare module\nthi is multi module 2\nthis is multi module 3 comment"); +verify.quickInfoIs("namespace multiM", "this is multi declare namespace\nthi is multi namespace 2\nthis is multi namespace 3 comment"); goTo.marker('5'); -verify.quickInfoIs("module multiM", "this is multi declare module\nthi is multi module 2\nthis is multi module 3 comment"); +verify.quickInfoIs("namespace multiM", "this is multi declare namespace\nthi is multi namespace 2\nthis is multi namespace 3 comment"); goTo.marker('6'); -verify.quickInfoIs("module multiM", "this is multi declare module\nthi is multi module 2\nthis is multi module 3 comment"); +verify.quickInfoIs("namespace multiM", "this is multi declare namespace\nthi is multi namespace 2\nthis is multi namespace 3 comment"); goTo.marker('7'); -verify.completionListContains("multiM", "module multiM", "this is multi declare module\nthi is multi module 2\nthis is multi module 3 comment"); +verify.completionListContains("multiM", "namespace multiM", "this is multi declare namespace\nthi is multi namespace 2\nthis is multi namespace 3 comment"); goTo.marker('8'); -verify.quickInfoIs("module multiM", "this is multi declare module\nthi is multi module 2\nthis is multi module 3 comment"); \ No newline at end of file +verify.quickInfoIs("namespace multiM", "this is multi declare namespace\nthi is multi namespace 2\nthis is multi namespace 3 comment"); \ No newline at end of file diff --git a/tests/cases/fourslash/commentsMultiModuleSingleFile.ts b/tests/cases/fourslash/commentsMultiModuleSingleFile.ts index 29102e7eefb69..c2bd677ce9ac4 100644 --- a/tests/cases/fourslash/commentsMultiModuleSingleFile.ts +++ b/tests/cases/fourslash/commentsMultiModuleSingleFile.ts @@ -1,13 +1,13 @@ /// -/////** this is multi declare module*/ -////module mult/*3*/iM { +/////** this is multi declare namespace*/ +////namespace mult/*3*/iM { //// /** class b*/ //// export class b { //// } ////} -/////** thi is multi module 2*/ -////module mu/*2*/ltiM { +/////** thi is multi namespace 2*/ +////namespace mu/*2*/ltiM { //// /** class c comment*/ //// export class c { //// } @@ -20,16 +20,16 @@ edit.insert(''); goTo.marker('1'); -verify.completionListContains("multiM", "module multiM", "this is multi declare module\nthi is multi module 2"); +verify.completionListContains("multiM", "namespace multiM", "this is multi declare namespace\nthi is multi namespace 2"); goTo.marker('2'); -verify.quickInfoIs("module multiM", "this is multi declare module\nthi is multi module 2"); +verify.quickInfoIs("namespace multiM", "this is multi declare namespace\nthi is multi namespace 2"); goTo.marker('3'); -verify.quickInfoIs("module multiM", "this is multi declare module\nthi is multi module 2"); +verify.quickInfoIs("namespace multiM", "this is multi declare namespace\nthi is multi namespace 2"); goTo.marker('4'); -verify.quickInfoIs("module multiM", "this is multi declare module\nthi is multi module 2"); +verify.quickInfoIs("namespace multiM", "this is multi declare namespace\nthi is multi namespace 2"); goTo.marker('5'); -verify.quickInfoIs("module multiM", "this is multi declare module\nthi is multi module 2"); \ No newline at end of file +verify.quickInfoIs("namespace multiM", "this is multi declare namespace\nthi is multi namespace 2"); \ No newline at end of file diff --git a/tests/cases/fourslash/completionListWithModulesFromModule.ts b/tests/cases/fourslash/completionListWithModulesFromModule.ts index 3db8cc0490cc7..3a1f3daa29edd 100644 --- a/tests/cases/fourslash/completionListWithModulesFromModule.ts +++ b/tests/cases/fourslash/completionListWithModulesFromModule.ts @@ -1,6 +1,6 @@ /// -////module mod1 { +////namespace mod1 { //// var mod1var = 1; //// function mod1fn() { //// var bar = 1; @@ -19,7 +19,7 @@ //// bar: any; //// foob(bar: any): any; //// } -//// module mod1mod { +//// namespace mod1mod { //// var m1X = 1; //// function m1Func() { //// var bar = 1; @@ -56,8 +56,8 @@ //// bar: any; //// foob(bar: any): any; //// } -//// module m1Mod { } -//// export module m1eMod { } +//// namespace m1Mod { } +//// export namespace m1eMod { } //// } //// export var mod1evar = 1; //// export function mod1efn() { @@ -78,7 +78,7 @@ //// bar: any; //// foob(bar: any): any; //// } -//// export module mod1emod { +//// export namespace mod1emod { //// var mX = 1; //// function mFunc() { //// var bar = 1; @@ -114,18 +114,18 @@ //// bar: any; //// foob(bar: any): any; //// } -//// module mMod { } -//// export module meMod { } +//// namespace mMod { } +//// export namespace meMod { } //// } ////} //// -////// EXTENDING MODULE 1 -////module mod1 { +////// EXTENDING NAMESPACE 1 +////namespace mod1 { //// export var mod1eexvar = 1; //// var mod1exvar = 2; ////} //// -////module mod2 { +////namespace mod2 { //// var mod2var = "shadow"; //// function mod2fn() { //// var bar = 1; @@ -139,7 +139,7 @@ //// static csVar = 1; //// static csFunc() { } //// } -//// module mod2mod { } +//// namespace mod2mod { } //// interface mod2int { //// (bar: any): any; //// new (bar: any): any; @@ -162,14 +162,14 @@ //// bar: any; //// foob(bar: any): any; //// } -//// export module mod2emod { } +//// export namespace mod2emod { } ////} //// -////module mod2 { +////namespace mod2 { //// export var mod2eexvar = 1; ////} //// -////module mod3 { +////namespace mod3 { //// var shwvar = "shadow"; //// function shwfn(shadow: any) { //// var bar = 1; @@ -190,10 +190,10 @@ //// sivar: string; //// sifn(shadow: any): any; //// } -//// /*shadowModuleWithNoExport*/ +//// /*shadowNamespaceWithNoExport*/ ////} //// -////module mod4 { +////namespace mod4 { //// export var shwvar = "shadow"; //// export function shwfn(shadow: any) { //// var bar = 1; @@ -213,13 +213,13 @@ //// sivar: string; //// sifn(shadow: any): any; //// } -//// /*shadowModuleWithExport*/ +//// /*shadowNamespaceWithExport*/ ////} //// -////module mod5 { +////namespace mod5 { //// import Mod1 = mod1; //// import iMod1 = mod1.mod1emod; -//// /*moduleWithImport*/ +//// /*namespaceWithImport*/ ////} //// ////function shwfn() { @@ -276,27 +276,27 @@ function goToMarkAndVerifyShadow() verify.not.completionListContains('mod2emod'); } -// from a shadow module with no export -goTo.marker('shadowModuleWithNoExport'); +// from a shadow namespace with no export +goTo.marker('shadowNamespaceWithNoExport'); verify.completionListContains('shwvar', 'var shwvar: string'); verify.completionListContains('shwfn', 'function shwfn(shadow: any): void'); verify.completionListContains('shwcls', 'class shwcls'); verify.completionListContains('shwint', 'interface shwint'); goToMarkAndVerifyShadow(); -// from a shadow module with export -goTo.marker('shadowModuleWithExport'); +// from a shadow namespace with export +goTo.marker('shadowNamespaceWithExport'); verify.completionListContains('shwvar', 'var mod4.shwvar: string'); verify.completionListContains('shwfn', 'function mod4.shwfn(shadow: any): void'); verify.completionListContains('shwcls', 'class mod4.shwcls'); verify.completionListContains('shwint', 'interface mod4.shwint'); goToMarkAndVerifyShadow(); -// from a modlue with import -goTo.marker('moduleWithImport'); -verify.completionListContains('mod1', 'module mod1'); -verify.completionListContains('mod2', 'module mod2'); -verify.completionListContains('mod3', 'module mod3'); +// from a namespace with import +goTo.marker('namespaceWithImport'); +verify.completionListContains('mod1', 'namespace mod1'); +verify.completionListContains('mod2', 'namespace mod2'); +verify.completionListContains('mod3', 'namespace mod3'); verify.completionListContains('shwvar', 'var shwvar: number'); verify.completionListContains('shwfn', 'function shwfn(): void'); verify.completionListContains('shwcls', 'class shwcls'); diff --git a/tests/cases/fourslash/completionListWithModulesInsideModuleScope.ts b/tests/cases/fourslash/completionListWithModulesInsideModuleScope.ts index f7fdea277c777..51e4013e53a93 100644 --- a/tests/cases/fourslash/completionListWithModulesInsideModuleScope.ts +++ b/tests/cases/fourslash/completionListWithModulesInsideModuleScope.ts @@ -1,6 +1,6 @@ /// -////module mod1 { +////namespace mod1 { //// var mod1var = 1; //// function mod1fn() { //// var bar = 1; @@ -22,7 +22,7 @@ //// foob(bar: any): any; //// /*interface*/ //// } -//// module mod1mod { +//// namespace mod1mod { //// var m1X = 1; //// function m1Func() { //// var bar = 1; @@ -59,9 +59,9 @@ //// bar: any; //// foob(bar: any): any; //// } -//// module m1Mod { } -//// export module m1eMod { } -//// /*module*/ +//// namespace m1Mod { } +//// export namespace m1eMod { } +//// /*namespace*/ //// } //// export var mod1evar = 1; //// export function mod1efn() { @@ -85,7 +85,7 @@ //// foob(bar: any): any; //// /*exportedInterface*/ //// } -//// export module mod1emod { +//// export namespace mod1emod { //// var mX = 1; //// function mFunc() { //// var bar = 1; @@ -121,21 +121,21 @@ //// bar: any; //// foob(bar: any): any; //// } -//// module mMod { } -//// export module meMod { } -//// /*exportedModule*/ +//// namespace mMod { } +//// export namespace meMod { } +//// /*exportedNamespace*/ //// } //// /*mod1*/ ////} //// -////// EXTENDING MODULE 1 -////module mod1 { +////// EXTENDING NAMESPACE 1 +////namespace mod1 { //// export var mod1eexvar = 1; //// var mod1exvar = 2; -//// /*extendedModule*/ +//// /*extendedNamespace*/ ////} //// -////module mod2 { +////namespace mod2 { //// var mod2var = "shadow"; //// function mod2fn() { //// var bar = 1; @@ -149,7 +149,7 @@ //// static csVar = 1; //// static csFunc() { } //// } -//// module mod2mod { } +//// namespace mod2mod { } //// interface mod2int { //// (bar: any): any; //// new (bar: any): any; @@ -172,14 +172,14 @@ //// bar: any; //// foob(bar: any): any; //// } -//// export module mod2emod { } +//// export namespace mod2emod { } ////} //// -////module mod2 { +////namespace mod2 { //// export var mod2eexvar = 1; ////} //// -////module mod3 { +////namespace mod3 { //// var shwvar = "shadow"; //// function shwfn() { //// var bar = 1; @@ -233,15 +233,15 @@ function goToMarkAndGeneralVerify(marker: string) verify.completionListContains('mod1fn', 'function mod1fn(): void'); verify.completionListContains('mod1cls', 'class mod1cls'); verify.completionListContains('mod1int', 'interface mod1int'); - verify.completionListContains('mod1mod', 'module mod1mod'); + verify.completionListContains('mod1mod', 'namespace mod1mod'); verify.completionListContains('mod1evar', 'var mod1.mod1evar: number'); verify.completionListContains('mod1efn', 'function mod1.mod1efn(): void'); verify.completionListContains('mod1ecls', 'class mod1.mod1ecls'); verify.completionListContains('mod1eint', 'interface mod1.mod1eint'); - verify.completionListContains('mod1emod', 'module mod1.mod1emod'); + verify.completionListContains('mod1emod', 'namespace mod1.mod1emod'); verify.completionListContains('mod1eexvar', 'var mod1.mod1eexvar: number'); - verify.completionListContains('mod2', 'module mod2'); - verify.completionListContains('mod3', 'module mod3'); + verify.completionListContains('mod2', 'namespace mod2'); + verify.completionListContains('mod3', 'namespace mod3'); verify.completionListContains('shwvar', 'var shwvar: number'); verify.completionListContains('shwfn', 'function shwfn(): void'); verify.completionListContains('shwcls', 'class shwcls'); @@ -287,18 +287,18 @@ goToMarkAndGeneralVerify('class'); // from interface in mod1 goToMarkAndGeneralVerify('interface'); -// from module in mod1 -goToMarkAndGeneralVerify('module'); +// from namespace in mod1 +goToMarkAndGeneralVerify('namespace'); verify.completionListContains('m1X', 'var m1X: number'); verify.completionListContains('m1Func', 'function m1Func(): void'); verify.completionListContains('m1Class', 'class m1Class'); verify.completionListContains('m1Int', 'interface m1Int'); -verify.completionListContains('m1Mod', 'module m1Mod'); +verify.completionListContains('m1Mod', 'namespace m1Mod'); verify.completionListContains('m1eX', 'var mod1mod.m1eX: number'); verify.completionListContains('m1eFunc', 'function mod1mod.m1eFunc(): void'); verify.completionListContains('m1eClass', 'class mod1mod.m1eClass'); verify.completionListContains('m1eInt', 'interface mod1mod.m1eInt'); -verify.completionListContains('m1eMod', 'module mod1mod.m1eMod'); +verify.completionListContains('m1eMod', 'namespace mod1mod.m1eMod'); // from exported function in mod1 goToMarkAndGeneralVerify('exportedFunction'); @@ -313,29 +313,29 @@ goToMarkAndGeneralVerify('exportedClass'); // from exported interface in mod1 goToMarkAndGeneralVerify('exportedInterface'); -// from exported module in mod1 -goToMarkAndGeneralVerify('exportedModule'); +// from exported namespace in mod1 +goToMarkAndGeneralVerify('exportedNamespace'); verify.completionListContains('mX', 'var mX: number'); verify.completionListContains('mFunc', 'function mFunc(): void'); verify.completionListContains('mClass', 'class mClass'); verify.completionListContains('mInt', 'interface mInt'); -verify.completionListContains('mMod', 'module mMod'); +verify.completionListContains('mMod', 'namespace mMod'); verify.completionListContains('meX', 'var mod1.mod1emod.meX: number'); verify.completionListContains('meFunc', 'function mod1.mod1emod.meFunc(): void'); verify.completionListContains('meClass', 'class mod1.mod1emod.meClass'); verify.completionListContains('meInt', 'interface mod1.mod1emod.meInt'); -verify.completionListContains('meMod', 'module mod1.mod1emod.meMod'); +verify.completionListContains('meMod', 'namespace mod1.mod1emod.meMod'); -// from extended module -goTo.marker('extendedModule'); +// from extended namespace +goTo.marker('extendedNamespace'); verify.completionListContains('mod1evar', 'var mod1.mod1evar: number'); verify.completionListContains('mod1efn', 'function mod1.mod1efn(): void'); verify.completionListContains('mod1ecls', 'class mod1.mod1ecls'); verify.completionListContains('mod1eint', 'interface mod1.mod1eint'); -verify.completionListContains('mod1emod', 'module mod1.mod1emod'); +verify.completionListContains('mod1emod', 'namespace mod1.mod1emod'); verify.completionListContains('mod1eexvar', 'var mod1.mod1eexvar: number'); -verify.completionListContains('mod2', 'module mod2'); -verify.completionListContains('mod3', 'module mod3'); +verify.completionListContains('mod2', 'namespace mod2'); +verify.completionListContains('mod3', 'namespace mod3'); verify.completionListContains('shwvar', 'var shwvar: number'); verify.completionListContains('shwfn', 'function shwfn(): void'); verify.completionListContains('shwcls', 'class shwcls'); diff --git a/tests/cases/fourslash/completionListWithModulesOutsideModuleScope.ts b/tests/cases/fourslash/completionListWithModulesOutsideModuleScope.ts index 03ba952fde7da..d6c44f4b7ebf6 100644 --- a/tests/cases/fourslash/completionListWithModulesOutsideModuleScope.ts +++ b/tests/cases/fourslash/completionListWithModulesOutsideModuleScope.ts @@ -1,6 +1,6 @@ /// -////module mod1 { +////namespace mod1 { //// var mod1var = 1; //// function mod1fn() { //// var bar = 1; @@ -19,7 +19,7 @@ //// bar: any; //// foob(bar: any): any; //// } -//// module mod1mod { +//// namespace mod1mod { //// var m1X = 1; //// function m1Func() { //// var bar = 1; @@ -56,8 +56,8 @@ //// bar: any; //// foob(bar: any): any; //// } -//// module m1Mod { } -//// export module m1eMod { } +//// namespace m1Mod { } +//// export namespace m1eMod { } //// } //// export var mod1evar = 1; //// export function mod1efn() { @@ -78,7 +78,7 @@ //// bar: any; //// foob(bar: any): any; //// } -//// export module mod1emod { +//// export namespace mod1emod { //// var mX = 1; //// function mFunc() { //// var bar = 1; @@ -114,18 +114,18 @@ //// bar: any; //// foob(bar: any): any; //// } -//// module mMod { } -//// export module meMod { } +//// namespace mMod { } +//// export namespace meMod { } //// } ////} //// -////// EXTENDING MODULE 1 -////module mod1 { +////// EXTENDING NAMESPACE 1 +////namespace mod1 { //// export var mod1eexvar = 1; //// var mod1exvar = 2; ////} //// -////module mod2 { +////namespace mod2 { //// var mod2var = "shadow"; //// function mod2fn() { //// var bar = 1; @@ -139,7 +139,7 @@ //// static csVar = 1; //// static csFunc() { } //// } -//// module mod2mod { } +//// namespace mod2mod { } //// interface mod2int { //// (bar: any): any; //// new (bar: any): any; @@ -162,14 +162,14 @@ //// bar: any; //// foob(bar: any): any; //// } -//// export module mod2emod { } +//// export namespace mod2emod { } ////} //// -////module mod2 { +////namespace mod2 { //// export var mod2eexvar = 1; ////} //// -////module mod3 { +////namespace mod3 { //// var shwvar = "shadow"; //// function shwfn() { //// var bar = 1; @@ -260,9 +260,9 @@ function goToMarkAndGeneralVerify(marker: string) // from global scope goToMarkAndGeneralVerify('global'); -verify.completionListContains('mod1', 'module mod1'); -verify.completionListContains('mod2', 'module mod2'); -verify.completionListContains('mod3', 'module mod3'); +verify.completionListContains('mod1', 'namespace mod1'); +verify.completionListContains('mod2', 'namespace mod2'); +verify.completionListContains('mod3', 'namespace mod3'); verify.completionListContains('shwvar', 'var shwvar: number'); verify.completionListContains('shwfn', 'function shwfn(): void'); verify.completionListContains('shwcls', 'class shwcls'); diff --git a/tests/cases/fourslash/memberListOfModuleInAnotherModule.ts b/tests/cases/fourslash/memberListOfModuleInAnotherModule.ts index 2908e30385540..d8b90a3c21942 100644 --- a/tests/cases/fourslash/memberListOfModuleInAnotherModule.ts +++ b/tests/cases/fourslash/memberListOfModuleInAnotherModule.ts @@ -1,19 +1,19 @@ /// -////module mod1 { +////namespace mod1 { //// var mX = 1; //// function mFunc() { } //// class mClass { } -//// module mMod { } +//// namespace mMod { } //// interface mInt {} //// export var meX = 1; //// export function meFunc() { } //// export class meClass { } -//// export module meMod { export var iMex = 1; } +//// export namespace meMod { export var iMex = 1; } //// export interface meInt {} ////} //// -////module frmConfirm { +////namespace frmConfirm { //// import Mod1 = mod1; //// import iMod1 = mod1./*1*/meMod; //// Mod1./*2*/meX = 1; @@ -24,14 +24,14 @@ goTo.marker('1'); verify.completionListContains('meX', 'var mod1.meX: number'); verify.completionListContains('meFunc', 'function mod1.meFunc(): void'); verify.completionListContains('meClass', 'class mod1.meClass'); -verify.completionListContains('meMod', 'module mod1.meMod'); +verify.completionListContains('meMod', 'namespace mod1.meMod'); verify.completionListContains('meInt', 'interface mod1.meInt'); goTo.marker('2'); verify.completionListContains('meX', 'var mod1.meX: number'); verify.completionListContains('meFunc', 'function mod1.meFunc(): void'); verify.completionListContains('meClass', 'class mod1.meClass'); -verify.completionListContains('meMod', 'module mod1.meMod'); +verify.completionListContains('meMod', 'namespace mod1.meMod'); goTo.marker('3'); verify.completionListContains('iMex', 'var mod1.meMod.iMex: number'); diff --git a/tests/cases/fourslash/missingMethodAfterEditAfterImport.ts b/tests/cases/fourslash/missingMethodAfterEditAfterImport.ts index 442ea89f0a3e9..285f67639f87f 100644 --- a/tests/cases/fourslash/missingMethodAfterEditAfterImport.ts +++ b/tests/cases/fourslash/missingMethodAfterEditAfterImport.ts @@ -1,7 +1,7 @@ /// -//// module foo { -//// export module bar { module baz { export class boo { } } } +//// namespace foo { +//// export namespace bar { namespace baz { export class boo { } } } //// } //// //// import f = /*foo*/foo; @@ -10,7 +10,7 @@ // Sanity check goTo.marker('foo'); -verify.quickInfoIs('module foo'); +verify.quickInfoIs('namespace foo'); // Delete some code goTo.marker('delete'); @@ -18,4 +18,4 @@ edit.deleteAtCaret('var x;'.length); // Pull on the RHS of an import goTo.marker('foo'); -verify.quickInfoIs('module foo'); +verify.quickInfoIs('namespace foo'); diff --git a/tests/cases/fourslash/quickInfoDisplayPartsExternalModuleAlias.ts b/tests/cases/fourslash/quickInfoDisplayPartsExternalModuleAlias.ts index 2c43326469cbb..77e124765747e 100644 --- a/tests/cases/fourslash/quickInfoDisplayPartsExternalModuleAlias.ts +++ b/tests/cases/fourslash/quickInfoDisplayPartsExternalModuleAlias.ts @@ -1,7 +1,7 @@ /// // @Filename: quickInfoDisplayPartsExternalModuleAlias_file0.ts -////export module m1 { +////export namespace m1 { //// export class c { //// } ////} diff --git a/tests/cases/fourslash/quickInfoDisplayPartsExternalModules.ts b/tests/cases/fourslash/quickInfoDisplayPartsExternalModules.ts index 070b908d90103..1b71cc1f1e0b2 100644 --- a/tests/cases/fourslash/quickInfoDisplayPartsExternalModules.ts +++ b/tests/cases/fourslash/quickInfoDisplayPartsExternalModules.ts @@ -1,14 +1,14 @@ /// -////export module /*1*/m { -//// var /*2*/moduleElemWithoutExport = 10; -//// export var /*3*/moduleElemWithExport = 10; +////export namespace /*1*/m { +//// var /*2*/namespaceElemWithoutExport = 10; +//// export var /*3*/namespaceElemWithExport = 10; ////} ////export var /*4*/a = /*5*/m; ////export var /*6*/b: typeof /*7*/m; -////export module /*8*/m1./*9*/m2 { -//// var /*10*/moduleElemWithoutExport = 10; -//// export var /*11*/moduleElemWithExport = 10; +////export namespace /*8*/m1./*9*/m2 { +//// var /*10*/namespaceElemWithoutExport = 10; +//// export var /*11*/namespaceElemWithExport = 10; ////} ////export var /*12*/x = /*13*/m1./*14*/m2; ////export var /*15*/y: typeof /*16*/m1./*17*/m2; @@ -19,45 +19,45 @@ function goToMarker() { goTo.marker(marker.toString()); } -function verifyModule(name: string, optionalParentName?: string) { +function verifyNamespace(name: string, optionalParentName?: string) { goToMarker(); - var moduleNameDisplay = [{ text: name, kind: "moduleName" }]; + var namespaceNameDisplay = [{ text: name, kind: "moduleName" }]; if (optionalParentName) { - moduleNameDisplay = [{ text: optionalParentName, kind: "moduleName" }, { text: ".", kind: "punctuation" }].concat(moduleNameDisplay); + namespaceNameDisplay = [{ text: optionalParentName, kind: "moduleName" }, { text: ".", kind: "punctuation" }].concat(namespaceNameDisplay); } verify.verifyQuickInfoDisplayParts("module", "export", { start: test.markerByName(marker.toString()).position, length: name.length }, - [{ text: "module", kind: "keyword" }, { text: " ", kind: "space" }].concat(moduleNameDisplay), + [{ text: "namespace", kind: "keyword" }, { text: " ", kind: "space" }].concat(namespaceNameDisplay), []); } function verifyVar(name: string, optionalFullName?: ts.SymbolDisplayPart[], typeDisplay: ts.SymbolDisplayPart[]= [{ text: "number", kind: "keyword" }]) { goToMarker(); - verify.verifyQuickInfoDisplayParts("var", name === "moduleElemWithoutExport" ? "" : "export", { start: test.markerByName(marker.toString()).position, length: name.length }, + verify.verifyQuickInfoDisplayParts("var", name === "namespaceElemWithoutExport" ? "" : "export", { start: test.markerByName(marker.toString()).position, length: name.length }, [{ text: "var", kind: "keyword" }, { text: " ", kind: "space" }].concat(optionalFullName || [{ text: name, kind: "localName" }]).concat( { text: ":", kind: "punctuation" }, { text: " ", kind: "space" }).concat(typeDisplay), []); } -verifyModule("m"); -verifyVar("moduleElemWithoutExport"); -verifyVar("moduleElemWithExport", [{ text: "m", kind: "moduleName" }, { text: ".", kind: "punctuation" }, { text: "moduleElemWithExport", kind: "localName" }]); +verifyNamespace("m"); +verifyVar("namespaceElemWithoutExport"); +verifyVar("namespaceElemWithExport", [{ text: "m", kind: "moduleName" }, { text: ".", kind: "punctuation" }, { text: "namespaceElemWithExport", kind: "localName" }]); verifyVar("a", /*optionalFullName*/ undefined, [{ text: "typeof", kind: "keyword" }, { text: " ", kind: "space" }, { text: "m", kind: "moduleName" }]); -verifyModule("m"); +verifyNamespace("m"); verifyVar("b", /*optionalFullName*/ undefined, [{ text: "typeof", kind: "keyword" }, { text: " ", kind: "space" }, { text: "m", kind: "moduleName" }]); -verifyModule("m"); +verifyNamespace("m"); -verifyModule("m1"); -verifyModule("m2", "m1"); -verifyVar("moduleElemWithoutExport"); -verifyVar("moduleElemWithExport", [{ text: "m1", kind: "moduleName" }, { text: ".", kind: "punctuation" }, - { text: "m2", kind: "moduleName" }, { text: ".", kind: "punctuation" }, { text: "moduleElemWithExport", kind: "localName" }]); +verifyNamespace("m1"); +verifyNamespace("m2", "m1"); +verifyVar("namespaceElemWithoutExport"); +verifyVar("namespaceElemWithExport", [{ text: "m1", kind: "moduleName" }, { text: ".", kind: "punctuation" }, + { text: "m2", kind: "moduleName" }, { text: ".", kind: "punctuation" }, { text: "namespaceElemWithExport", kind: "localName" }]); verifyVar("x", /*optionalFullName*/ undefined, [{ text: "typeof", kind: "keyword" }, { text: " ", kind: "space" }, { text: "m1", kind: "moduleName" }, { text: ".", kind: "punctuation" }, { text: "m2", kind: "moduleName" }]); -verifyModule("m1"); -verifyModule("m2", "m1"); +verifyNamespace("m1"); +verifyNamespace("m2", "m1"); verifyVar("y", /*optionalFullName*/ undefined, [{ text: "typeof", kind: "keyword" }, { text: " ", kind: "space" }, { text: "m1", kind: "moduleName" }, { text: ".", kind: "punctuation" }, { text: "m2", kind: "moduleName" }]); -verifyModule("m1"); -verifyModule("m2", "m1"); +verifyNamespace("m1"); +verifyNamespace("m2", "m1"); diff --git a/tests/cases/fourslash/quickInfoDisplayPartsModules.ts b/tests/cases/fourslash/quickInfoDisplayPartsModules.ts index aaa415708f430..a6eb0b9ae6bd3 100644 --- a/tests/cases/fourslash/quickInfoDisplayPartsModules.ts +++ b/tests/cases/fourslash/quickInfoDisplayPartsModules.ts @@ -1,14 +1,14 @@ /// -////module /*1*/m { -//// var /*2*/moduleElemWithoutExport = 10; -//// export var /*3*/moduleElemWithExport = 10; +////namespace /*1*/m { +//// var /*2*/namespaceElemWithoutExport = 10; +//// export var /*3*/namespaceElemWithExport = 10; ////} ////var /*4*/a = /*5*/m; ////var /*6*/b: typeof /*7*/m; -////module /*8*/m1./*9*/m2 { -//// var /*10*/moduleElemWithoutExport = 10; -//// export var /*11*/moduleElemWithExport = 10; +////namespace /*8*/m1./*9*/m2 { +//// var /*10*/namespaceElemWithoutExport = 10; +//// export var /*11*/namespaceElemWithExport = 10; ////} ////var /*12*/x = /*13*/m1./*14*/m2; ////var /*15*/y: typeof /*16*/m1./*17*/m2; @@ -19,14 +19,14 @@ function goToMarker() { goTo.marker(marker.toString()); } -function verifyModule(name: string, optionalParentName?: string) { +function verifyNamespace(name: string, optionalParentName?: string) { goToMarker(); - var moduleNameDisplay = [{ text: name, kind: "moduleName" }]; + var namespaceNameDisplay = [{ text: name, kind: "moduleName" }]; if (optionalParentName) { - moduleNameDisplay = [{ text: optionalParentName, kind: "moduleName" }, { text: ".", kind: "punctuation" }].concat(moduleNameDisplay); + namespaceNameDisplay = [{ text: optionalParentName, kind: "moduleName" }, { text: ".", kind: "punctuation" }].concat(namespaceNameDisplay); } verify.verifyQuickInfoDisplayParts("module", optionalParentName ? "export" : "", { start: test.markerByName(marker.toString()).position, length: name.length }, - [{ text: "module", kind: "keyword" }, { text: " ", kind: "space" }].concat(moduleNameDisplay), + [{ text: "namespace", kind: "keyword" }, { text: " ", kind: "space" }].concat(namespaceNameDisplay), []); } @@ -39,25 +39,25 @@ function verifyVar(name: string, optionalFullName?: ts.SymbolDisplayPart[], type []); } -verifyModule("m"); -verifyVar("moduleElemWithoutExport"); -verifyVar("moduleElemWithExport", [{ text: "m", kind: "moduleName" }, { text: ".", kind: "punctuation" }, { text: "moduleElemWithExport", kind: "localName" }]); +verifyNamespace("m"); +verifyVar("namespaceElemWithoutExport"); +verifyVar("namespaceElemWithExport", [{ text: "m", kind: "moduleName" }, { text: ".", kind: "punctuation" }, { text: "namespaceElemWithExport", kind: "localName" }]); verifyVar("a", /*optionalFullName*/ undefined, [{ text: "typeof", kind: "keyword" }, { text: " ", kind: "space" }, { text: "m", kind: "moduleName" }]); -verifyModule("m"); +verifyNamespace("m"); verifyVar("b", /*optionalFullName*/ undefined, [{ text: "typeof", kind: "keyword" }, { text: " ", kind: "space" }, { text: "m", kind: "moduleName" }]); -verifyModule("m"); +verifyNamespace("m"); -verifyModule("m1"); -verifyModule("m2", "m1"); -verifyVar("moduleElemWithoutExport"); -verifyVar("moduleElemWithExport", [{ text: "m1", kind: "moduleName" }, { text: ".", kind: "punctuation" }, - { text: "m2", kind: "moduleName" }, { text: ".", kind: "punctuation" }, { text: "moduleElemWithExport", kind: "localName" }]); +verifyNamespace("m1"); +verifyNamespace("m2", "m1"); +verifyVar("namespaceElemWithoutExport"); +verifyVar("namespaceElemWithExport", [{ text: "m1", kind: "moduleName" }, { text: ".", kind: "punctuation" }, + { text: "m2", kind: "moduleName" }, { text: ".", kind: "punctuation" }, { text: "namespaceElemWithExport", kind: "localName" }]); verifyVar("x", /*optionalFullName*/ undefined, [{ text: "typeof", kind: "keyword" }, { text: " ", kind: "space" }, { text: "m1", kind: "moduleName" }, { text: ".", kind: "punctuation" }, { text: "m2", kind: "moduleName" }]); -verifyModule("m1"); -verifyModule("m2", "m1"); +verifyNamespace("m1"); +verifyNamespace("m2", "m1"); verifyVar("y", /*optionalFullName*/ undefined, [{ text: "typeof", kind: "keyword" }, { text: " ", kind: "space" }, { text: "m1", kind: "moduleName" }, { text: ".", kind: "punctuation" }, { text: "m2", kind: "moduleName" }]); -verifyModule("m1"); -verifyModule("m2", "m1"); +verifyNamespace("m1"); +verifyNamespace("m2", "m1"); From 9223f75d366e85d172ad969582aff19270d842d9 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Sun, 26 Apr 2015 16:14:04 -0700 Subject: [PATCH 3/7] Accepting new baselines --- tests/baselines/reference/APISample_linter.js | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/baselines/reference/APISample_linter.js b/tests/baselines/reference/APISample_linter.js index 17061add0388b..cd2df23ffbf4f 100644 --- a/tests/baselines/reference/APISample_linter.js +++ b/tests/baselines/reference/APISample_linter.js @@ -75,26 +75,26 @@ function delint(sourceFile) { delintNode(sourceFile); function delintNode(node) { switch (node.kind) { - case 186 /* ForStatement */: - case 187 /* ForInStatement */: - case 185 /* WhileStatement */: - case 184 /* DoStatement */: - if (node.statement.kind !== 179 /* Block */) { + case 187 /* ForStatement */: + case 188 /* ForInStatement */: + case 186 /* WhileStatement */: + case 185 /* DoStatement */: + if (node.statement.kind !== 180 /* Block */) { report(node, "A looping statement's contents should be wrapped in a block body."); } break; - case 183 /* IfStatement */: + case 184 /* IfStatement */: var ifStatement = node; - if (ifStatement.thenStatement.kind !== 179 /* Block */) { + if (ifStatement.thenStatement.kind !== 180 /* Block */) { report(ifStatement.thenStatement, "An if statement's contents should be wrapped in a block body."); } if (ifStatement.elseStatement && - ifStatement.elseStatement.kind !== 179 /* Block */ && - ifStatement.elseStatement.kind !== 183 /* IfStatement */) { + ifStatement.elseStatement.kind !== 180 /* Block */ && + ifStatement.elseStatement.kind !== 184 /* IfStatement */) { report(ifStatement.elseStatement, "An else statement's contents should be wrapped in a block body."); } break; - case 169 /* BinaryExpression */: + case 170 /* BinaryExpression */: var op = node.operatorToken.kind; if (op === 28 /* EqualsEqualsToken */ || op == 29 /* ExclamationEqualsToken */) { report(node, "Use '===' and '!=='."); From 034e8b052c3095b052cc8d1385162374339cedbd Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Sun, 26 Apr 2015 18:29:37 -0700 Subject: [PATCH 4/7] Adjusting error messages --- src/compiler/checker.ts | 32 +++++++------- .../diagnosticInformationMap.generated.ts | 38 ++++++++-------- src/compiler/diagnosticMessages.json | 44 ++++++++----------- src/compiler/program.ts | 6 +-- 4 files changed, 55 insertions(+), 65 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 2381288b0def7..a7a9b526a5a7e 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -582,7 +582,7 @@ module ts { if (moduleSymbol) { let exportDefaultSymbol = resolveSymbol(moduleSymbol.exports["default"]); if (!exportDefaultSymbol) { - error(node.name, Diagnostics.External_module_0_has_no_default_export, symbolToString(moduleSymbol)); + error(node.name, Diagnostics.Module_0_has_no_default_export, symbolToString(moduleSymbol)); } return exportDefaultSymbol; } @@ -870,10 +870,10 @@ module ts { if (sourceFile.symbol) { return sourceFile.symbol; } - error(moduleReferenceLiteral, Diagnostics.File_0_is_not_an_external_module, sourceFile.fileName); + error(moduleReferenceLiteral, Diagnostics.File_0_is_not_a_module, sourceFile.fileName); return; } - error(moduleReferenceLiteral, Diagnostics.Cannot_find_external_module_0, moduleName); + error(moduleReferenceLiteral, Diagnostics.Cannot_find_module_0, moduleName); } // An external module with an 'export =' declaration resolves to the target of the 'export =' declaration, @@ -888,7 +888,7 @@ module ts { function resolveESModuleSymbol(moduleSymbol: Symbol, moduleReferenceExpression: Expression): Symbol { let symbol = resolveExternalModuleSymbol(moduleSymbol); if (symbol && !(symbol.flags & (SymbolFlags.Module | SymbolFlags.Variable))) { - error(moduleReferenceExpression, Diagnostics.External_module_0_resolves_to_a_non_module_entity_and_cannot_be_imported_using_this_construct, symbolToString(moduleSymbol)); + error(moduleReferenceExpression, Diagnostics.Module_0_resolves_to_a_non_module_entity_and_cannot_be_imported_using_this_construct, symbolToString(moduleSymbol)); symbol = undefined; } return symbol; @@ -5508,7 +5508,7 @@ module ts { switch (container.kind) { case SyntaxKind.ModuleDeclaration: - error(node, Diagnostics.this_cannot_be_referenced_in_a_module_body); + error(node, Diagnostics.this_cannot_be_referenced_in_a_module_or_namespace_body); // do not return here so in case if lexical this is captured - it will be reflected in flags on NodeLinks break; case SyntaxKind.EnumDeclaration: @@ -9079,7 +9079,7 @@ module ts { let parent = getDeclarationContainer(node); if (parent.kind === SyntaxKind.SourceFile && isExternalModule(parent)) { // If the declaration happens to be in external module, report error that require and exports are reserved keywords - error(name, Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_an_external_module, + error(name, Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module, declarationNameToString(name), declarationNameToString(name)); } } @@ -10494,10 +10494,10 @@ module ts { let firstNonAmbientClassOrFunc = getFirstNonAmbientClassOrFunctionDeclaration(symbol); if (firstNonAmbientClassOrFunc) { if (getSourceFileOfNode(node) !== getSourceFileOfNode(firstNonAmbientClassOrFunc)) { - error(node.name, Diagnostics.A_module_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merged); + error(node.name, Diagnostics.A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merged); } else if (node.pos < firstNonAmbientClassOrFunc.pos) { - error(node.name, Diagnostics.A_module_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged); + error(node.name, Diagnostics.A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged); } } @@ -10513,10 +10513,10 @@ module ts { // Checks for ambient external modules. if (node.name.kind === SyntaxKind.StringLiteral) { if (!isGlobalSourceFile(node.parent)) { - error(node.name, Diagnostics.Ambient_external_modules_cannot_be_nested_in_other_modules); + error(node.name, Diagnostics.Ambient_modules_cannot_be_nested_in_other_modules); } if (isExternalModuleNameRelative(node.name.text)) { - error(node.name, Diagnostics.Ambient_external_module_declaration_cannot_specify_relative_module_name); + error(node.name, Diagnostics.Ambient_module_declaration_cannot_specify_relative_module_name); } } } @@ -10548,8 +10548,8 @@ module ts { let inAmbientExternalModule = node.parent.kind === SyntaxKind.ModuleBlock && (node.parent.parent).name.kind === SyntaxKind.StringLiteral; if (node.parent.kind !== SyntaxKind.SourceFile && !inAmbientExternalModule) { error(moduleName, node.kind === SyntaxKind.ExportDeclaration ? - Diagnostics.Export_declarations_are_not_permitted_in_an_internal_module : - Diagnostics.Import_declarations_in_an_internal_module_cannot_reference_an_external_module); + Diagnostics.Export_declarations_are_not_permitted_in_a_namespace : + Diagnostics.Import_declarations_in_a_namespace_cannot_reference_a_module); return false; } if (inAmbientExternalModule && isExternalModuleNameRelative((moduleName).text)) { @@ -10557,7 +10557,7 @@ module ts { // An ExternalImportDeclaration in an AmbientExternalModuleDeclaration may reference // other external modules only through top - level external module names. // Relative external module names are not permitted. - error(node, Diagnostics.Import_or_export_declaration_in_an_ambient_external_module_declaration_cannot_reference_external_module_through_relative_external_module_name); + error(node, Diagnostics.Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relative_module_name); return false; } return true; @@ -10651,14 +10651,14 @@ module ts { let inAmbientExternalModule = node.parent.kind === SyntaxKind.ModuleBlock && (node.parent.parent).name.kind === SyntaxKind.StringLiteral; if (node.parent.kind !== SyntaxKind.SourceFile && !inAmbientExternalModule) { - error(node, Diagnostics.Export_declarations_are_not_permitted_in_an_internal_module); + error(node, Diagnostics.Export_declarations_are_not_permitted_in_a_namespace); } } else { // export * from "foo" let moduleSymbol = resolveExternalModuleName(node, node.moduleSpecifier); if (moduleSymbol && moduleSymbol.exports["export="]) { - error(node.moduleSpecifier, Diagnostics.External_module_0_uses_export_and_cannot_be_used_with_export_Asterisk, symbolToString(moduleSymbol)); + error(node.moduleSpecifier, Diagnostics.Module_0_uses_export_and_cannot_be_used_with_export_Asterisk, symbolToString(moduleSymbol)); } } } @@ -10674,7 +10674,7 @@ module ts { function checkExportAssignment(node: ExportAssignment) { let container = node.parent.kind === SyntaxKind.SourceFile ? node.parent : node.parent.parent; if (container.kind === SyntaxKind.ModuleDeclaration && (container).name.kind === SyntaxKind.Identifier) { - error(node, Diagnostics.An_export_assignment_cannot_be_used_in_an_internal_module); + error(node, Diagnostics.An_export_assignment_cannot_be_used_in_a_namespace); return; } // Grammar checking diff --git a/src/compiler/diagnosticInformationMap.generated.ts b/src/compiler/diagnosticInformationMap.generated.ts index 5aaaf79a76f6d..112953214c372 100644 --- a/src/compiler/diagnosticInformationMap.generated.ts +++ b/src/compiler/diagnosticInformationMap.generated.ts @@ -46,7 +46,7 @@ module ts { A_get_accessor_cannot_have_parameters: { code: 1054, category: DiagnosticCategory.Error, key: "A 'get' accessor cannot have parameters." }, Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher: { code: 1056, category: DiagnosticCategory.Error, key: "Accessors are only available when targeting ECMAScript 5 and higher." }, Enum_member_must_have_initializer: { code: 1061, category: DiagnosticCategory.Error, key: "Enum member must have initializer." }, - An_export_assignment_cannot_be_used_in_an_internal_module: { code: 1063, category: DiagnosticCategory.Error, key: "An export assignment cannot be used in an internal module." }, + An_export_assignment_cannot_be_used_in_a_namespace: { code: 1063, category: DiagnosticCategory.Error, key: "An export assignment cannot be used in a namespace." }, Ambient_enum_elements_can_only_have_integer_literal_initializers: { code: 1066, category: DiagnosticCategory.Error, key: "Ambient enum elements can only have integer literal initializers." }, Unexpected_token_A_constructor_method_accessor_or_property_was_expected: { code: 1068, category: DiagnosticCategory.Error, key: "Unexpected token. A constructor, method, accessor, or property was expected." }, A_declare_modifier_cannot_be_used_with_an_import_declaration: { code: 1079, category: DiagnosticCategory.Error, key: "A 'declare' modifier cannot be used with an import declaration." }, @@ -107,8 +107,8 @@ module ts { or_expected: { code: 1144, category: DiagnosticCategory.Error, key: "'{' or ';' expected." }, Modifiers_not_permitted_on_index_signature_members: { code: 1145, category: DiagnosticCategory.Error, key: "Modifiers not permitted on index signature members." }, Declaration_expected: { code: 1146, category: DiagnosticCategory.Error, key: "Declaration expected." }, - Import_declarations_in_an_internal_module_cannot_reference_an_external_module: { code: 1147, category: DiagnosticCategory.Error, key: "Import declarations in an internal module cannot reference an external module." }, - Cannot_compile_external_modules_unless_the_module_flag_is_provided: { code: 1148, category: DiagnosticCategory.Error, key: "Cannot compile external modules unless the '--module' flag is provided." }, + Import_declarations_in_a_namespace_cannot_reference_a_module: { code: 1147, category: DiagnosticCategory.Error, key: "Import declarations in a namespace cannot reference a module." }, + Cannot_compile_modules_unless_the_module_flag_is_provided: { code: 1148, category: DiagnosticCategory.Error, key: "Cannot compile modules unless the '--module' flag is provided." }, File_name_0_differs_from_already_included_file_name_1_only_in_casing: { code: 1149, category: DiagnosticCategory.Error, key: "File name '{0}' differs from already included file name '{1}' only in casing" }, new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead: { code: 1150, category: DiagnosticCategory.Error, key: "'new T[]' cannot be used to create an array. Use 'new Array()' instead." }, var_let_or_const_expected: { code: 1152, category: DiagnosticCategory.Error, key: "'var', 'let' or 'const' expected." }, @@ -150,9 +150,9 @@ module ts { The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer: { code: 1189, category: DiagnosticCategory.Error, key: "The variable declaration of a 'for...in' statement cannot have an initializer." }, The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer: { code: 1190, category: DiagnosticCategory.Error, key: "The variable declaration of a 'for...of' statement cannot have an initializer." }, An_import_declaration_cannot_have_modifiers: { code: 1191, category: DiagnosticCategory.Error, key: "An import declaration cannot have modifiers." }, - External_module_0_has_no_default_export: { code: 1192, category: DiagnosticCategory.Error, key: "External module '{0}' has no default export." }, + Module_0_has_no_default_export: { code: 1192, category: DiagnosticCategory.Error, key: "Module '{0}' has no default export." }, An_export_declaration_cannot_have_modifiers: { code: 1193, category: DiagnosticCategory.Error, key: "An export declaration cannot have modifiers." }, - Export_declarations_are_not_permitted_in_an_internal_module: { code: 1194, category: DiagnosticCategory.Error, key: "Export declarations are not permitted in an internal module." }, + Export_declarations_are_not_permitted_in_a_namespace: { code: 1194, category: DiagnosticCategory.Error, key: "Export declarations are not permitted in a namespace." }, Catch_clause_variable_name_must_be_an_identifier: { code: 1195, category: DiagnosticCategory.Error, key: "Catch clause variable name must be an identifier." }, Catch_clause_variable_cannot_have_a_type_annotation: { code: 1196, category: DiagnosticCategory.Error, key: "Catch clause variable cannot have a type annotation." }, Catch_clause_variable_cannot_have_an_initializer: { code: 1197, category: DiagnosticCategory.Error, key: "Catch clause variable cannot have an initializer." }, @@ -161,28 +161,26 @@ module ts { Line_terminator_not_permitted_before_arrow: { code: 1200, category: DiagnosticCategory.Error, key: "Line terminator not permitted before arrow." }, Import_assignment_cannot_be_used_when_targeting_ECMAScript_6_or_higher_Consider_using_import_Asterisk_as_ns_from_mod_import_a_from_mod_or_import_d_from_mod_instead: { code: 1202, category: DiagnosticCategory.Error, key: "Import assignment cannot be used when targeting ECMAScript 6 or higher. Consider using 'import * as ns from \"mod\"', 'import {a} from \"mod\"' or 'import d from \"mod\"' instead." }, Export_assignment_cannot_be_used_when_targeting_ECMAScript_6_or_higher_Consider_using_export_default_instead: { code: 1203, category: DiagnosticCategory.Error, key: "Export assignment cannot be used when targeting ECMAScript 6 or higher. Consider using 'export default' instead." }, - Cannot_compile_external_modules_into_amd_commonjs_or_umd_when_targeting_ES6_or_higher: { code: 1204, category: DiagnosticCategory.Error, key: "Cannot compile external modules into 'amd', 'commonjs' or 'umd' when targeting 'ES6' or higher." }, + Cannot_compile_modules_into_amd_commonjs_or_umd_when_targeting_ES6_or_higher: { code: 1204, category: DiagnosticCategory.Error, key: "Cannot compile modules into 'amd', 'commonjs' or 'umd' when targeting 'ES6' or higher." }, Decorators_are_only_available_when_targeting_ECMAScript_5_and_higher: { code: 1205, category: DiagnosticCategory.Error, key: "Decorators are only available when targeting ECMAScript 5 and higher." }, Decorators_are_not_valid_here: { code: 1206, category: DiagnosticCategory.Error, key: "Decorators are not valid here." }, Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name: { code: 1207, category: DiagnosticCategory.Error, key: "Decorators cannot be applied to multiple get/set accessors of the same name." }, - Cannot_compile_non_external_modules_when_the_separateCompilation_flag_is_provided: { code: 1208, category: DiagnosticCategory.Error, key: "Cannot compile non-external modules when the '--separateCompilation' flag is provided." }, + Cannot_compile_namespaces_when_the_separateCompilation_flag_is_provided: { code: 1208, category: DiagnosticCategory.Error, key: "Cannot compile namespaces when the '--separateCompilation' flag is provided." }, Ambient_const_enums_are_not_allowed_when_the_separateCompilation_flag_is_provided: { code: 1209, category: DiagnosticCategory.Error, key: "Ambient const enums are not allowed when the '--separateCompilation' flag is provided." }, Invalid_use_of_0_Class_definitions_are_automatically_in_strict_mode: { code: 1210, category: DiagnosticCategory.Error, key: "Invalid use of '{0}'. Class definitions are automatically in strict mode." }, A_class_declaration_without_the_default_modifier_must_have_a_name: { code: 1211, category: DiagnosticCategory.Error, key: "A class declaration without the 'default' modifier must have a name" }, Identifier_expected_0_is_a_reserved_word_in_strict_mode: { code: 1212, category: DiagnosticCategory.Error, key: "Identifier expected. '{0}' is a reserved word in strict mode" }, Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode: { code: 1213, category: DiagnosticCategory.Error, key: "Identifier expected. '{0}' is a reserved word in strict mode. Class definitions are automatically in strict mode." }, - Identifier_expected_0_is_a_reserved_word_in_strict_mode_External_Module_is_automatically_in_strict_mode: { code: 1214, category: DiagnosticCategory.Error, key: "Identifier expected. '{0}' is a reserved word in strict mode. External Module is automatically in strict mode." }, Type_expected_0_is_a_reserved_word_in_strict_mode: { code: 1215, category: DiagnosticCategory.Error, key: "Type expected. '{0}' is a reserved word in strict mode" }, Type_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode: { code: 1216, category: DiagnosticCategory.Error, key: "Type expected. '{0}' is a reserved word in strict mode. Class definitions are automatically in strict mode." }, - Type_expected_0_is_a_reserved_word_in_strict_mode_Module_is_automatically_in_strict_mode: { code: 1217, category: DiagnosticCategory.Error, key: "Type expected. '{0}' is a reserved word in strict mode. Module is automatically in strict mode." }, Duplicate_identifier_0: { code: 2300, category: DiagnosticCategory.Error, key: "Duplicate identifier '{0}'." }, Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor: { code: 2301, category: DiagnosticCategory.Error, key: "Initializer of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor." }, Static_members_cannot_reference_class_type_parameters: { code: 2302, category: DiagnosticCategory.Error, key: "Static members cannot reference class type parameters." }, Circular_definition_of_import_alias_0: { code: 2303, category: DiagnosticCategory.Error, key: "Circular definition of import alias '{0}'." }, Cannot_find_name_0: { code: 2304, category: DiagnosticCategory.Error, key: "Cannot find name '{0}'." }, Module_0_has_no_exported_member_1: { code: 2305, category: DiagnosticCategory.Error, key: "Module '{0}' has no exported member '{1}'." }, - File_0_is_not_an_external_module: { code: 2306, category: DiagnosticCategory.Error, key: "File '{0}' is not an external module." }, - Cannot_find_external_module_0: { code: 2307, category: DiagnosticCategory.Error, key: "Cannot find external module '{0}'." }, + File_0_is_not_a_module: { code: 2306, category: DiagnosticCategory.Error, key: "File '{0}' is not a module." }, + Cannot_find_module_0: { code: 2307, category: DiagnosticCategory.Error, key: "Cannot find module '{0}'." }, A_module_cannot_have_more_than_one_export_assignment: { code: 2308, category: DiagnosticCategory.Error, key: "A module cannot have more than one export assignment." }, An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements: { code: 2309, category: DiagnosticCategory.Error, key: "An export assignment cannot be used in a module with other exported elements." }, Type_0_recursively_references_itself_as_a_base_type: { code: 2310, category: DiagnosticCategory.Error, key: "Type '{0}' recursively references itself as a base type." }, @@ -205,7 +203,7 @@ module ts { Types_of_parameters_0_and_1_are_incompatible: { code: 2328, category: DiagnosticCategory.Error, key: "Types of parameters '{0}' and '{1}' are incompatible." }, Index_signature_is_missing_in_type_0: { code: 2329, category: DiagnosticCategory.Error, key: "Index signature is missing in type '{0}'." }, Index_signatures_are_incompatible: { code: 2330, category: DiagnosticCategory.Error, key: "Index signatures are incompatible." }, - this_cannot_be_referenced_in_a_module_body: { code: 2331, category: DiagnosticCategory.Error, key: "'this' cannot be referenced in a module body." }, + this_cannot_be_referenced_in_a_module_or_namespace_body: { code: 2331, category: DiagnosticCategory.Error, key: "'this' cannot be referenced in a module or namespace body." }, this_cannot_be_referenced_in_current_location: { code: 2332, category: DiagnosticCategory.Error, key: "'this' cannot be referenced in current location." }, this_cannot_be_referenced_in_constructor_arguments: { code: 2333, category: DiagnosticCategory.Error, key: "'this' cannot be referenced in constructor arguments." }, this_cannot_be_referenced_in_a_static_property_initializer: { code: 2334, category: DiagnosticCategory.Error, key: "'this' cannot be referenced in a static property initializer." }, @@ -297,15 +295,15 @@ module ts { Interface_0_incorrectly_extends_interface_1: { code: 2430, category: DiagnosticCategory.Error, key: "Interface '{0}' incorrectly extends interface '{1}'." }, Enum_name_cannot_be_0: { code: 2431, category: DiagnosticCategory.Error, key: "Enum name cannot be '{0}'" }, In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enum_element: { code: 2432, category: DiagnosticCategory.Error, key: "In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element." }, - A_module_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merged: { code: 2433, category: DiagnosticCategory.Error, key: "A module declaration cannot be in a different file from a class or function with which it is merged" }, - A_module_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged: { code: 2434, category: DiagnosticCategory.Error, key: "A module declaration cannot be located prior to a class or function with which it is merged" }, - Ambient_external_modules_cannot_be_nested_in_other_modules: { code: 2435, category: DiagnosticCategory.Error, key: "Ambient external modules cannot be nested in other modules." }, - Ambient_external_module_declaration_cannot_specify_relative_module_name: { code: 2436, category: DiagnosticCategory.Error, key: "Ambient external module declaration cannot specify relative module name." }, + A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merged: { code: 2433, category: DiagnosticCategory.Error, key: "A namespace declaration cannot be in a different file from a class or function with which it is merged" }, + A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged: { code: 2434, category: DiagnosticCategory.Error, key: "A namespace declaration cannot be located prior to a class or function with which it is merged" }, + Ambient_modules_cannot_be_nested_in_other_modules: { code: 2435, category: DiagnosticCategory.Error, key: "Ambient modules cannot be nested in other modules." }, + Ambient_module_declaration_cannot_specify_relative_module_name: { code: 2436, category: DiagnosticCategory.Error, key: "Ambient module declaration cannot specify relative module name." }, Module_0_is_hidden_by_a_local_declaration_with_the_same_name: { code: 2437, category: DiagnosticCategory.Error, key: "Module '{0}' is hidden by a local declaration with the same name" }, Import_name_cannot_be_0: { code: 2438, category: DiagnosticCategory.Error, key: "Import name cannot be '{0}'" }, - Import_or_export_declaration_in_an_ambient_external_module_declaration_cannot_reference_external_module_through_relative_external_module_name: { code: 2439, category: DiagnosticCategory.Error, key: "Import or export declaration in an ambient external module declaration cannot reference external module through relative external module name." }, + Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relative_module_name: { code: 2439, category: DiagnosticCategory.Error, key: "Import or export declaration in an ambient module declaration cannot reference module through relative module name." }, Import_declaration_conflicts_with_local_declaration_of_0: { code: 2440, category: DiagnosticCategory.Error, key: "Import declaration conflicts with local declaration of '{0}'" }, - Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_an_external_module: { code: 2441, category: DiagnosticCategory.Error, key: "Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of an external module." }, + Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module: { code: 2441, category: DiagnosticCategory.Error, key: "Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of a module." }, Types_have_separate_declarations_of_a_private_property_0: { code: 2442, category: DiagnosticCategory.Error, key: "Types have separate declarations of a private property '{0}'." }, Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2: { code: 2443, category: DiagnosticCategory.Error, key: "Property '{0}' is protected but type '{1}' is not a class derived from '{2}'." }, Property_0_is_protected_in_type_1_but_public_in_type_2: { code: 2444, category: DiagnosticCategory.Error, key: "Property '{0}' is protected in type '{1}' but public in type '{2}'." }, @@ -359,8 +357,8 @@ module ts { Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher: { code: 2494, category: DiagnosticCategory.Error, key: "Using a string in a 'for...of' statement is only supported in ECMAScript 5 and higher." }, Type_0_is_not_an_array_type_or_a_string_type: { code: 2495, category: DiagnosticCategory.Error, key: "Type '{0}' is not an array type or a string type." }, The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_standard_function_expression: { code: 2496, category: DiagnosticCategory.Error, key: "The 'arguments' object cannot be referenced in an arrow function in ES3 and ES5. Consider using a standard function expression." }, - External_module_0_resolves_to_a_non_module_entity_and_cannot_be_imported_using_this_construct: { code: 2497, category: DiagnosticCategory.Error, key: "External module '{0}' resolves to a non-module entity and cannot be imported using this construct." }, - External_module_0_uses_export_and_cannot_be_used_with_export_Asterisk: { code: 2498, category: DiagnosticCategory.Error, key: "External module '{0}' uses 'export =' and cannot be used with 'export *'." }, + Module_0_resolves_to_a_non_module_entity_and_cannot_be_imported_using_this_construct: { code: 2497, category: DiagnosticCategory.Error, key: "Module '{0}' resolves to a non-module entity and cannot be imported using this construct." }, + Module_0_uses_export_and_cannot_be_used_with_export_Asterisk: { code: 2498, category: DiagnosticCategory.Error, key: "Module '{0}' uses 'export =' and cannot be used with 'export *'." }, An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments: { code: 2499, category: DiagnosticCategory.Error, key: "An interface can only extend an identifier/qualified-name with optional type arguments." }, A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments: { code: 2500, category: DiagnosticCategory.Error, key: "A class can only implement an identifier/qualified-name with optional type arguments." }, A_rest_element_cannot_contain_a_binding_pattern: { code: 2501, category: DiagnosticCategory.Error, key: "A rest element cannot contain a binding pattern." }, diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index bf7f063409785..82e087d07f86d 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -171,7 +171,7 @@ "category": "Error", "code": 1061 }, - "An export assignment cannot be used in an internal module.": { + "An export assignment cannot be used in a namespace.": { "category": "Error", "code": 1063 }, @@ -415,11 +415,11 @@ "category": "Error", "code": 1146 }, - "Import declarations in an internal module cannot reference an external module.": { + "Import declarations in a namespace cannot reference a module.": { "category": "Error", "code": 1147 }, - "Cannot compile external modules unless the '--module' flag is provided.": { + "Cannot compile modules unless the '--module' flag is provided.": { "category": "Error", "code": 1148 }, @@ -587,7 +587,7 @@ "category": "Error", "code": 1191 }, - "External module '{0}' has no default export.": { + "Module '{0}' has no default export.": { "category": "Error", "code": 1192 }, @@ -595,7 +595,7 @@ "category": "Error", "code": 1193 }, - "Export declarations are not permitted in an internal module.": { + "Export declarations are not permitted in a namespace.": { "category": "Error", "code": 1194 }, @@ -631,7 +631,7 @@ "category": "Error", "code": 1203 }, - "Cannot compile external modules into 'amd', 'commonjs' or 'umd' when targeting 'ES6' or higher.": { + "Cannot compile modules into 'amd', 'commonjs' or 'umd' when targeting 'ES6' or higher.": { "category": "Error", "code": 1204 }, @@ -647,7 +647,7 @@ "category": "Error", "code": 1207 }, - "Cannot compile non-external modules when the '--separateCompilation' flag is provided.": { + "Cannot compile namespaces when the '--separateCompilation' flag is provided.": { "category": "Error", "code": 1208 }, @@ -671,10 +671,6 @@ "category": "Error", "code": 1213 }, - "Identifier expected. '{0}' is a reserved word in strict mode. External Module is automatically in strict mode.": { - "category": "Error", - "code": 1214 - }, "Type expected. '{0}' is a reserved word in strict mode": { "category": "Error", "code": 1215 @@ -683,10 +679,6 @@ "category": "Error", "code": 1216 }, - "Type expected. '{0}' is a reserved word in strict mode. Module is automatically in strict mode.": { - "category": "Error", - "code": 1217 - }, "Duplicate identifier '{0}'.": { "category": "Error", "code": 2300 @@ -711,11 +703,11 @@ "category": "Error", "code": 2305 }, - "File '{0}' is not an external module.": { + "File '{0}' is not a module.": { "category": "Error", "code": 2306 }, - "Cannot find external module '{0}'.": { + "Cannot find module '{0}'.": { "category": "Error", "code": 2307 }, @@ -807,7 +799,7 @@ "category": "Error", "code": 2330 }, - "'this' cannot be referenced in a module body.": { + "'this' cannot be referenced in a module or namespace body.": { "category": "Error", "code": 2331 }, @@ -1175,19 +1167,19 @@ "category": "Error", "code": 2432 }, - "A module declaration cannot be in a different file from a class or function with which it is merged": { + "A namespace declaration cannot be in a different file from a class or function with which it is merged": { "category": "Error", "code": 2433 }, - "A module declaration cannot be located prior to a class or function with which it is merged": { + "A namespace declaration cannot be located prior to a class or function with which it is merged": { "category": "Error", "code": 2434 }, - "Ambient external modules cannot be nested in other modules.": { + "Ambient modules cannot be nested in other modules.": { "category": "Error", "code": 2435 }, - "Ambient external module declaration cannot specify relative module name.": { + "Ambient module declaration cannot specify relative module name.": { "category": "Error", "code": 2436 }, @@ -1199,7 +1191,7 @@ "category": "Error", "code": 2438 }, - "Import or export declaration in an ambient external module declaration cannot reference external module through relative external module name.": { + "Import or export declaration in an ambient module declaration cannot reference module through relative module name.": { "category": "Error", "code": 2439 }, @@ -1207,7 +1199,7 @@ "category": "Error", "code": 2440 }, - "Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of an external module.": { + "Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of a module.": { "category": "Error", "code": 2441 }, @@ -1423,11 +1415,11 @@ "category": "Error", "code": 2496 }, - "External module '{0}' resolves to a non-module entity and cannot be imported using this construct.": { + "Module '{0}' resolves to a non-module entity and cannot be imported using this construct.": { "category": "Error", "code": 2497 }, - "External module '{0}' uses 'export =' and cannot be used with 'export *'.": { + "Module '{0}' uses 'export =' and cannot be used with 'export *'.": { "category": "Error", "code": 2498 }, diff --git a/src/compiler/program.ts b/src/compiler/program.ts index 97c681838f212..a8e688719c752 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -556,18 +556,18 @@ module ts { let firstNonExternalModuleSourceFile = forEach(files, f => !isExternalModule(f) && !isDeclarationFile(f) ? f : undefined); if (firstNonExternalModuleSourceFile) { let span = getErrorSpanForNode(firstNonExternalModuleSourceFile, firstNonExternalModuleSourceFile); - diagnostics.add(createFileDiagnostic(firstNonExternalModuleSourceFile, span.start, span.length, Diagnostics.Cannot_compile_non_external_modules_when_the_separateCompilation_flag_is_provided)); + diagnostics.add(createFileDiagnostic(firstNonExternalModuleSourceFile, span.start, span.length, Diagnostics.Cannot_compile_namespaces_when_the_separateCompilation_flag_is_provided)); } } else if (firstExternalModuleSourceFile && languageVersion < ScriptTarget.ES6 && !options.module) { // We cannot use createDiagnosticFromNode because nodes do not have parents yet let span = getErrorSpanForNode(firstExternalModuleSourceFile, firstExternalModuleSourceFile.externalModuleIndicator); - diagnostics.add(createFileDiagnostic(firstExternalModuleSourceFile, span.start, span.length, Diagnostics.Cannot_compile_external_modules_unless_the_module_flag_is_provided)); + diagnostics.add(createFileDiagnostic(firstExternalModuleSourceFile, span.start, span.length, Diagnostics.Cannot_compile_modules_unless_the_module_flag_is_provided)); } // Cannot specify module gen target when in es6 or above if (options.module && languageVersion >= ScriptTarget.ES6) { - diagnostics.add(createCompilerDiagnostic(Diagnostics.Cannot_compile_external_modules_into_amd_commonjs_or_umd_when_targeting_ES6_or_higher)); + diagnostics.add(createCompilerDiagnostic(Diagnostics.Cannot_compile_modules_into_amd_commonjs_or_umd_when_targeting_ES6_or_higher)); } // there has to be common source directory if user specified --outdir || --sourceRoot From 330d63a1735e1d3d05c12b5b4c1bc18ebf371027 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Sun, 26 Apr 2015 18:31:47 -0700 Subject: [PATCH 5/7] Accepting new baselines --- ...ModuleWithSameNameAndCommonRoot.errors.txt | 4 +- ...uleWithSameNameAndCommonRootES6.errors.txt | 4 +- .../reference/ExportAssignment7.errors.txt | 4 +- .../reference/ExportAssignment8.errors.txt | 4 +- ...ModuleWithSameNameAndCommonRoot.errors.txt | 4 +- ...dClassWithSameNameAndCommonRoot.errors.txt | 8 +- ...nctionWithSameNameAndCommonRoot.errors.txt | 8 +- ...hExportedLocalVarsOfTheSameName.errors.txt | 4 +- .../ambientDeclarationsExternal.errors.txt | 4 +- .../reference/ambientErrors.errors.txt | 8 +- ...alModuleInAnotherExternalModule.errors.txt | 8 +- ...tExternalModuleInsideNonAmbient.errors.txt | 4 +- ...eInsideNonAmbientExternalModule.errors.txt | 4 +- ...lativeExternalImportDeclaration.errors.txt | 8 +- ...nalModuleWithRelativeModuleName.errors.txt | 8 +- .../amdDependencyComment1.errors.txt | 4 +- .../amdDependencyComment2.errors.txt | 4 +- .../amdDependencyCommentName1.errors.txt | 4 +- .../amdDependencyCommentName2.errors.txt | 4 +- .../amdDependencyCommentName3.errors.txt | 4 +- .../amdDependencyCommentName4.errors.txt | 16 +- .../augmentedTypesModules.errors.txt | 12 +- .../augmentedTypesModules2.errors.txt | 12 +- .../augmentedTypesModules3.errors.txt | 4 +- .../badExternalModuleReference.errors.txt | 4 +- .../reference/circularReference.errors.txt | 4 +- ...berInitializerWithLamdaScoping3.errors.txt | 4 +- ...berInitializerWithLamdaScoping4.errors.txt | 4 +- .../cloduleSplitAcrossFiles.errors.txt | 4 +- ...duleWithPriorInstantiatedModule.errors.txt | 4 +- ...collisionExportsRequireAndAlias.errors.txt | 8 +- ...collisionExportsRequireAndClass.errors.txt | 8 +- .../collisionExportsRequireAndEnum.errors.txt | 8 +- ...lisionExportsRequireAndFunction.errors.txt | 8 +- ...tsRequireAndInternalModuleAlias.errors.txt | 8 +- ...ollisionExportsRequireAndModule.errors.txt | 8 +- .../collisionExportsRequireAndVar.errors.txt | 8 +- .../commentOnImportStatement1.errors.txt | 4 +- .../commentOnImportStatement2.errors.txt | 4 +- .../commentOnImportStatement3.errors.txt | 4 +- .../computedPropertyNames19_ES5.errors.txt | 4 +- .../computedPropertyNames19_ES6.errors.txt | 4 +- .../constDeclarations-access5.errors.txt | 4 +- .../copyrightWithNewLine1.errors.txt | 4 +- .../copyrightWithoutNewLine1.errors.txt | 4 +- .../decoratorOnClassMethod11.errors.txt | 4 +- .../duplicateExportAssignments.errors.txt | 4 +- .../duplicateSymbolsExportMatching.errors.txt | 4 +- .../es5ModuleInternalNamedImports.errors.txt | 32 ++-- ...es5ModuleWithoutModuleGenTarget.errors.txt | 4 +- tests/baselines/reference/es6-amd.errors.txt | 4 +- .../reference/es6-declaration-amd.errors.txt | 4 +- .../reference/es6-sourcemap-amd.errors.txt | 4 +- tests/baselines/reference/es6-umd.errors.txt | 4 +- tests/baselines/reference/es6-umd2.errors.txt | 4 +- .../es6ExportEqualsInterop.errors.txt | 116 ++++++------ ...tBindingFollowedWithNamedImport.errors.txt | 4 +- ...ndingFollowedWithNamedImportDts.errors.txt | 24 +-- ...ingFollowedWithNamedImportInEs5.errors.txt | 24 +-- ...ingFollowedWithNamespaceBinding.errors.txt | 4 +- ...FollowedWithNamespaceBindingDts.errors.txt | 4 +- ...llowedWithNamespaceBindingInEs5.errors.txt | 4 +- ...dWithNamespaceBindingWithExport.errors.txt | 4 +- .../es6ImportDefaultBindingInEs5.errors.txt | 4 +- ...DefaultBindingNoDefaultProperty.errors.txt | 4 +- .../es6ImportNameSpaceImport.errors.txt | 4 +- .../reference/es6ImportNamedImport.errors.txt | 4 +- ...rtNamedImportIdentifiersParsing.errors.txt | 20 +-- ...rtNamedImportInExportAssignment.errors.txt | 4 +- ...s6ImportNamedImportParsingError.errors.txt | 4 +- .../es6ModuleInternalNamedImports.errors.txt | 32 ++-- .../es6ModuleInternalNamedImports2.errors.txt | 32 ++-- ...es6ModuleWithModuleGenTargetAmd.errors.txt | 4 +- ...duleWithModuleGenTargetCommonjs.errors.txt | 4 +- .../exportAssignDottedName.errors.txt | 4 +- .../exportAssignImportedIdentifier.errors.txt | 4 +- .../exportAssignNonIdentifier.errors.txt | 4 +- .../reference/exportAssignTypes.errors.txt | 4 +- .../reference/exportDeclaredModule.errors.txt | 4 +- .../reference/exportNonVisibleType.errors.txt | 4 +- .../reference/exportStar-amd.errors.txt | 4 +- .../baselines/reference/exportStar.errors.txt | 4 +- .../exportStarFromEmptyModule.errors.txt | 4 +- ...ernalModuleWithoutCompilerFlag1.errors.txt | 4 +- .../funduleSplitAcrossFiles.errors.txt | 4 +- .../genericArrayExtenstions.errors.txt | 4 +- ...nalModuleInsideAnInternalModule.errors.txt | 4 +- ...eingExternalModuleWithNoResolve.errors.txt | 16 +- .../importDeclWithDeclareModifier.errors.txt | 4 +- ...DeclarationInModuleDeclaration1.errors.txt | 4 +- .../reference/importInsideModule.errors.txt | 8 +- .../importNonExternalModule.errors.txt | 4 +- .../reference/invalidNestedModules.errors.txt | 4 +- .../reference/lambdaPropSelf.errors.txt | 4 +- .../mergedModuleDeclarationCodeGen.errors.txt | 4 +- .../reference/moduleScoping.errors.txt | 4 +- .../reference/multipleExports.errors.txt | 4 +- .../reference/nameCollisions.errors.txt | 4 +- .../nameWithFileExtension.errors.txt | 4 +- .../reference/parser0_004152.errors.txt | 4 +- .../reference/parser509546.errors.txt | 4 +- .../reference/parser509546_1.errors.txt | 4 +- .../reference/parser509546_2.errors.txt | 4 +- .../reference/parser618973.errors.txt | 4 +- .../reference/parserArgumentList1.errors.txt | 4 +- .../reference/parserClass1.errors.txt | 4 +- .../reference/parserClass2.errors.txt | 4 +- .../reference/parserEnum1.errors.txt | 4 +- .../reference/parserEnum2.errors.txt | 4 +- .../reference/parserEnum3.errors.txt | 4 +- .../reference/parserEnum4.errors.txt | 4 +- .../parserExportAssignment1.errors.txt | 4 +- .../parserExportAssignment2.errors.txt | 4 +- .../parserExportAssignment3.errors.txt | 4 +- .../parserExportAssignment4.errors.txt | 4 +- .../parserExportAssignment5.errors.txt | 4 +- .../parserExportAssignment7.errors.txt | 4 +- .../parserExportAssignment8.errors.txt | 4 +- .../parserInterfaceDeclaration6.errors.txt | 4 +- .../parserInterfaceDeclaration7.errors.txt | 4 +- ...rserModifierOnStatementInBlock1.errors.txt | 4 +- ...rserModifierOnStatementInBlock3.errors.txt | 4 +- .../reference/parserModule1.errors.txt | 4 +- .../privacyGloImportParseErrors.errors.txt | 60 +++---- .../privacyImportParseErrors.errors.txt | 168 +++++++++--------- .../amd/cantFindTheModule.errors.txt | 12 +- .../node/cantFindTheModule.errors.txt | 12 +- .../amd/intReferencingExtAndInt.errors.txt | 8 +- .../node/intReferencingExtAndInt.errors.txt | 8 +- .../nestedLocalModuleSimpleCase.errors.txt | 4 +- .../nestedLocalModuleSimpleCase.errors.txt | 4 +- ...calModuleWithRecursiveTypecheck.errors.txt | 8 +- ...calModuleWithRecursiveTypecheck.errors.txt | 8 +- ...dModuleDeclarationsInsideModule.errors.txt | 16 +- ...dModuleDeclarationsInsideModule.errors.txt | 16 +- ...arationsInsideNonExportedModule.errors.txt | 16 +- ...arationsInsideNonExportedModule.errors.txt | 16 +- ...leImportStatementInParentModule.errors.txt | 16 +- ...leImportStatementInParentModule.errors.txt | 16 +- .../relativePathMustResolve.errors.txt | 4 +- .../relativePathToDeclarationFile.errors.txt | 4 +- .../requireOfAnEmptyFile1.errors.txt | 4 +- .../reference/reservedWords2.errors.txt | 4 +- .../reference/scannerClass2.errors.txt | 4 +- .../reference/scannerEnum1.errors.txt | 4 +- ...eCompilationImportExportElision.errors.txt | 16 +- ...rateCompilationNoExternalModule.errors.txt | 4 +- .../separateCompilationOut.errors.txt | 4 +- .../staticInstanceResolution5.errors.txt | 4 +- ...vedWordInImportEqualDeclaration.errors.txt | 4 +- ...rictModeWordInImportDeclaration.errors.txt | 12 +- .../thisInInvalidContexts.errors.txt | 4 +- ...InInvalidContextsExternalModule.errors.txt | 8 +- .../reference/thisInModule.errors.txt | 4 +- .../reference/thisKeyword.errors.txt | 4 +- .../topLevelFileModuleMissing.errors.txt | 4 +- .../reference/topLevelLambda.errors.txt | 4 +- .../typeofANonExportedType.errors.txt | 4 +- .../reference/typeofAnExportedType.errors.txt | 4 +- .../umdDependencyComment2.errors.txt | 4 +- .../umdDependencyCommentName1.errors.txt | 4 +- .../umdDependencyCommentName2.errors.txt | 4 +- .../undeclaredModuleError.errors.txt | 4 +- 163 files changed, 674 insertions(+), 674 deletions(-) diff --git a/tests/baselines/reference/ClassAndModuleWithSameNameAndCommonRoot.errors.txt b/tests/baselines/reference/ClassAndModuleWithSameNameAndCommonRoot.errors.txt index 4c707dfd8619b..6e65d46b9be9c 100644 --- a/tests/baselines/reference/ClassAndModuleWithSameNameAndCommonRoot.errors.txt +++ b/tests/baselines/reference/ClassAndModuleWithSameNameAndCommonRoot.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/internalModules/DeclarationMerging/module.ts(2,19): error TS2433: A module declaration cannot be in a different file from a class or function with which it is merged +tests/cases/conformance/internalModules/DeclarationMerging/module.ts(2,19): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged ==== tests/cases/conformance/internalModules/DeclarationMerging/class.ts (0 errors) ==== @@ -17,7 +17,7 @@ tests/cases/conformance/internalModules/DeclarationMerging/module.ts(2,19): erro module X.Y { export module Point { ~~~~~ -!!! error TS2433: A module declaration cannot be in a different file from a class or function with which it is merged +!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged export var Origin = new Point(0, 0); } } diff --git a/tests/baselines/reference/ClassAndModuleWithSameNameAndCommonRootES6.errors.txt b/tests/baselines/reference/ClassAndModuleWithSameNameAndCommonRootES6.errors.txt index 4c707dfd8619b..6e65d46b9be9c 100644 --- a/tests/baselines/reference/ClassAndModuleWithSameNameAndCommonRootES6.errors.txt +++ b/tests/baselines/reference/ClassAndModuleWithSameNameAndCommonRootES6.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/internalModules/DeclarationMerging/module.ts(2,19): error TS2433: A module declaration cannot be in a different file from a class or function with which it is merged +tests/cases/conformance/internalModules/DeclarationMerging/module.ts(2,19): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged ==== tests/cases/conformance/internalModules/DeclarationMerging/class.ts (0 errors) ==== @@ -17,7 +17,7 @@ tests/cases/conformance/internalModules/DeclarationMerging/module.ts(2,19): erro module X.Y { export module Point { ~~~~~ -!!! error TS2433: A module declaration cannot be in a different file from a class or function with which it is merged +!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged export var Origin = new Point(0, 0); } } diff --git a/tests/baselines/reference/ExportAssignment7.errors.txt b/tests/baselines/reference/ExportAssignment7.errors.txt index b72ca2d4a7252..83651e10b8e34 100644 --- a/tests/baselines/reference/ExportAssignment7.errors.txt +++ b/tests/baselines/reference/ExportAssignment7.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/ExportAssignment7.ts(1,14): error TS1148: Cannot compile external modules unless the '--module' flag is provided. +tests/cases/compiler/ExportAssignment7.ts(1,14): error TS1148: Cannot compile modules unless the '--module' flag is provided. tests/cases/compiler/ExportAssignment7.ts(4,1): error TS2309: An export assignment cannot be used in a module with other exported elements. tests/cases/compiler/ExportAssignment7.ts(4,10): error TS2304: Cannot find name 'B'. @@ -6,7 +6,7 @@ tests/cases/compiler/ExportAssignment7.ts(4,10): error TS2304: Cannot find name ==== tests/cases/compiler/ExportAssignment7.ts (3 errors) ==== export class C { ~ -!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. } export = B; diff --git a/tests/baselines/reference/ExportAssignment8.errors.txt b/tests/baselines/reference/ExportAssignment8.errors.txt index 4536f37bb8103..d1a285cfe5115 100644 --- a/tests/baselines/reference/ExportAssignment8.errors.txt +++ b/tests/baselines/reference/ExportAssignment8.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/ExportAssignment8.ts(1,1): error TS1148: Cannot compile external modules unless the '--module' flag is provided. +tests/cases/compiler/ExportAssignment8.ts(1,1): error TS1148: Cannot compile modules unless the '--module' flag is provided. tests/cases/compiler/ExportAssignment8.ts(1,1): error TS2309: An export assignment cannot be used in a module with other exported elements. tests/cases/compiler/ExportAssignment8.ts(1,10): error TS2304: Cannot find name 'B'. @@ -6,7 +6,7 @@ tests/cases/compiler/ExportAssignment8.ts(1,10): error TS2304: Cannot find name ==== tests/cases/compiler/ExportAssignment8.ts (3 errors) ==== export = B; ~~~~~~~~~~~ -!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. ~~~~~~~~~~~ !!! error TS2309: An export assignment cannot be used in a module with other exported elements. ~ diff --git a/tests/baselines/reference/FunctionAndModuleWithSameNameAndCommonRoot.errors.txt b/tests/baselines/reference/FunctionAndModuleWithSameNameAndCommonRoot.errors.txt index df266681812ce..4f08e30cd4609 100644 --- a/tests/baselines/reference/FunctionAndModuleWithSameNameAndCommonRoot.errors.txt +++ b/tests/baselines/reference/FunctionAndModuleWithSameNameAndCommonRoot.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/internalModules/DeclarationMerging/module.ts(2,19): error TS2433: A module declaration cannot be in a different file from a class or function with which it is merged +tests/cases/conformance/internalModules/DeclarationMerging/module.ts(2,19): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged tests/cases/conformance/internalModules/DeclarationMerging/simple.ts(13,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'fn' must be of type '() => { x: number; y: number; }', but here has type 'typeof Point'. tests/cases/conformance/internalModules/DeclarationMerging/test.ts(2,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'fn' must be of type '() => { x: number; y: number; }', but here has type 'typeof Point'. @@ -14,7 +14,7 @@ tests/cases/conformance/internalModules/DeclarationMerging/test.ts(2,5): error T module A { export module Point { ~~~~~ -!!! error TS2433: A module declaration cannot be in a different file from a class or function with which it is merged +!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged export var Origin = { x: 0, y: 0 }; } } diff --git a/tests/baselines/reference/ModuleAndClassWithSameNameAndCommonRoot.errors.txt b/tests/baselines/reference/ModuleAndClassWithSameNameAndCommonRoot.errors.txt index 15a0e5b433401..ca840a719c014 100644 --- a/tests/baselines/reference/ModuleAndClassWithSameNameAndCommonRoot.errors.txt +++ b/tests/baselines/reference/ModuleAndClassWithSameNameAndCommonRoot.errors.txt @@ -1,12 +1,12 @@ -tests/cases/conformance/internalModules/DeclarationMerging/module.ts(2,19): error TS2433: A module declaration cannot be in a different file from a class or function with which it is merged -tests/cases/conformance/internalModules/DeclarationMerging/simple.ts(1,8): error TS2434: A module declaration cannot be located prior to a class or function with which it is merged +tests/cases/conformance/internalModules/DeclarationMerging/module.ts(2,19): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged +tests/cases/conformance/internalModules/DeclarationMerging/simple.ts(1,8): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged ==== tests/cases/conformance/internalModules/DeclarationMerging/module.ts (1 errors) ==== module X.Y { export module Point { ~~~~~ -!!! error TS2433: A module declaration cannot be in a different file from a class or function with which it is merged +!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged export var Origin = new Point(0, 0); } } @@ -27,7 +27,7 @@ tests/cases/conformance/internalModules/DeclarationMerging/simple.ts(1,8): error ==== tests/cases/conformance/internalModules/DeclarationMerging/simple.ts (1 errors) ==== module A { ~ -!!! error TS2434: A module declaration cannot be located prior to a class or function with which it is merged +!!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged export var Instance = new A(); } diff --git a/tests/baselines/reference/ModuleAndFunctionWithSameNameAndCommonRoot.errors.txt b/tests/baselines/reference/ModuleAndFunctionWithSameNameAndCommonRoot.errors.txt index 7c521c8be9528..963ddf1ef9350 100644 --- a/tests/baselines/reference/ModuleAndFunctionWithSameNameAndCommonRoot.errors.txt +++ b/tests/baselines/reference/ModuleAndFunctionWithSameNameAndCommonRoot.errors.txt @@ -1,12 +1,12 @@ -tests/cases/conformance/internalModules/DeclarationMerging/module.ts(2,19): error TS2433: A module declaration cannot be in a different file from a class or function with which it is merged -tests/cases/conformance/internalModules/DeclarationMerging/simple.ts(3,19): error TS2434: A module declaration cannot be located prior to a class or function with which it is merged +tests/cases/conformance/internalModules/DeclarationMerging/module.ts(2,19): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged +tests/cases/conformance/internalModules/DeclarationMerging/simple.ts(3,19): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged ==== tests/cases/conformance/internalModules/DeclarationMerging/module.ts (1 errors) ==== module A { export module Point { ~~~~~ -!!! error TS2433: A module declaration cannot be in a different file from a class or function with which it is merged +!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged export var Origin = { x: 0, y: 0 }; } } @@ -24,7 +24,7 @@ tests/cases/conformance/internalModules/DeclarationMerging/simple.ts(3,19): erro export module Point { ~~~~~ -!!! error TS2434: A module declaration cannot be located prior to a class or function with which it is merged +!!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged export var Origin = { x: 0, y: 0 }; } diff --git a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedLocalVarsOfTheSameName.errors.txt b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedLocalVarsOfTheSameName.errors.txt index 8a4962c23c7f7..fefdcd8f6f5b9 100644 --- a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedLocalVarsOfTheSameName.errors.txt +++ b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedLocalVarsOfTheSameName.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/internalModules/DeclarationMerging/part1.ts(1,15): error TS1148: Cannot compile external modules unless the '--module' flag is provided. +tests/cases/conformance/internalModules/DeclarationMerging/part1.ts(1,15): error TS1148: Cannot compile modules unless the '--module' flag is provided. tests/cases/conformance/internalModules/DeclarationMerging/part2.ts(3,24): error TS2304: Cannot find name 'Point'. tests/cases/conformance/internalModules/DeclarationMerging/part2.ts(7,36): error TS2304: Cannot find name 'Point'. tests/cases/conformance/internalModules/DeclarationMerging/part2.ts(7,54): error TS2304: Cannot find name 'Point'. @@ -7,7 +7,7 @@ tests/cases/conformance/internalModules/DeclarationMerging/part2.ts(7,54): error ==== tests/cases/conformance/internalModules/DeclarationMerging/part1.ts (1 errors) ==== export module A { ~ -!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. export interface Point { x: number; y: number; diff --git a/tests/baselines/reference/ambientDeclarationsExternal.errors.txt b/tests/baselines/reference/ambientDeclarationsExternal.errors.txt index 124bf92869980..d05dfe813fd7d 100644 --- a/tests/baselines/reference/ambientDeclarationsExternal.errors.txt +++ b/tests/baselines/reference/ambientDeclarationsExternal.errors.txt @@ -1,11 +1,11 @@ -tests/cases/conformance/ambient/consumer.ts(2,1): error TS1148: Cannot compile external modules unless the '--module' flag is provided. +tests/cases/conformance/ambient/consumer.ts(2,1): error TS1148: Cannot compile modules unless the '--module' flag is provided. ==== tests/cases/conformance/ambient/consumer.ts (1 errors) ==== /// import imp1 = require('equ'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. // Ambient external module members are always exported with or without export keyword when module lacks export assignment diff --git a/tests/baselines/reference/ambientErrors.errors.txt b/tests/baselines/reference/ambientErrors.errors.txt index a741536e07862..16ce79a05ddc3 100644 --- a/tests/baselines/reference/ambientErrors.errors.txt +++ b/tests/baselines/reference/ambientErrors.errors.txt @@ -11,8 +11,8 @@ tests/cases/conformance/ambient/ambientErrors.ts(38,13): error TS1039: Initializ tests/cases/conformance/ambient/ambientErrors.ts(39,23): error TS1184: An implementation cannot be declared in ambient contexts. tests/cases/conformance/ambient/ambientErrors.ts(40,14): error TS1184: An implementation cannot be declared in ambient contexts. tests/cases/conformance/ambient/ambientErrors.ts(41,22): error TS1184: An implementation cannot be declared in ambient contexts. -tests/cases/conformance/ambient/ambientErrors.ts(47,20): error TS2435: Ambient external modules cannot be nested in other modules. -tests/cases/conformance/ambient/ambientErrors.ts(51,16): error TS2436: Ambient external module declaration cannot specify relative module name. +tests/cases/conformance/ambient/ambientErrors.ts(47,20): error TS2435: Ambient modules cannot be nested in other modules. +tests/cases/conformance/ambient/ambientErrors.ts(51,16): error TS2436: Ambient module declaration cannot specify relative module name. tests/cases/conformance/ambient/ambientErrors.ts(57,5): error TS2309: An export assignment cannot be used in a module with other exported elements. @@ -91,13 +91,13 @@ tests/cases/conformance/ambient/ambientErrors.ts(57,5): error TS2309: An export module M2 { declare module 'nope' { } ~~~~~~ -!!! error TS2435: Ambient external modules cannot be nested in other modules. +!!! error TS2435: Ambient modules cannot be nested in other modules. } // Ambient external module with a string literal name that isn't a top level external module name declare module '../foo' { } ~~~~~~~~ -!!! error TS2436: Ambient external module declaration cannot specify relative module name. +!!! error TS2436: Ambient module declaration cannot specify relative module name. // Ambient external module with export assignment and other exported members declare module 'bar' { diff --git a/tests/baselines/reference/ambientExternalModuleInAnotherExternalModule.errors.txt b/tests/baselines/reference/ambientExternalModuleInAnotherExternalModule.errors.txt index fb988131df074..79f37c4764edf 100644 --- a/tests/baselines/reference/ambientExternalModuleInAnotherExternalModule.errors.txt +++ b/tests/baselines/reference/ambientExternalModuleInAnotherExternalModule.errors.txt @@ -1,5 +1,5 @@ -tests/cases/compiler/ambientExternalModuleInAnotherExternalModule.ts(5,16): error TS2435: Ambient external modules cannot be nested in other modules. -tests/cases/compiler/ambientExternalModuleInAnotherExternalModule.ts(10,22): error TS2307: Cannot find external module 'ext'. +tests/cases/compiler/ambientExternalModuleInAnotherExternalModule.ts(5,16): error TS2435: Ambient modules cannot be nested in other modules. +tests/cases/compiler/ambientExternalModuleInAnotherExternalModule.ts(10,22): error TS2307: Cannot find module 'ext'. ==== tests/cases/compiler/ambientExternalModuleInAnotherExternalModule.ts (2 errors) ==== @@ -9,12 +9,12 @@ tests/cases/compiler/ambientExternalModuleInAnotherExternalModule.ts(10,22): err declare module "ext" { ~~~~~ -!!! error TS2435: Ambient external modules cannot be nested in other modules. +!!! error TS2435: Ambient modules cannot be nested in other modules. export class C { } } // Cannot resolve this ext module reference import ext = require("ext"); ~~~~~ -!!! error TS2307: Cannot find external module 'ext'. +!!! error TS2307: Cannot find module 'ext'. var x = ext; \ No newline at end of file diff --git a/tests/baselines/reference/ambientExternalModuleInsideNonAmbient.errors.txt b/tests/baselines/reference/ambientExternalModuleInsideNonAmbient.errors.txt index e23f96803bace..87aae44840e68 100644 --- a/tests/baselines/reference/ambientExternalModuleInsideNonAmbient.errors.txt +++ b/tests/baselines/reference/ambientExternalModuleInsideNonAmbient.errors.txt @@ -1,9 +1,9 @@ -tests/cases/conformance/ambient/ambientExternalModuleInsideNonAmbient.ts(2,27): error TS2435: Ambient external modules cannot be nested in other modules. +tests/cases/conformance/ambient/ambientExternalModuleInsideNonAmbient.ts(2,27): error TS2435: Ambient modules cannot be nested in other modules. ==== tests/cases/conformance/ambient/ambientExternalModuleInsideNonAmbient.ts (1 errors) ==== module M { export declare module "M" { } ~~~ -!!! error TS2435: Ambient external modules cannot be nested in other modules. +!!! error TS2435: Ambient modules cannot be nested in other modules. } \ No newline at end of file diff --git a/tests/baselines/reference/ambientExternalModuleInsideNonAmbientExternalModule.errors.txt b/tests/baselines/reference/ambientExternalModuleInsideNonAmbientExternalModule.errors.txt index 92f01832926d7..763317ecc0cd3 100644 --- a/tests/baselines/reference/ambientExternalModuleInsideNonAmbientExternalModule.errors.txt +++ b/tests/baselines/reference/ambientExternalModuleInsideNonAmbientExternalModule.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/ambient/ambientExternalModuleInsideNonAmbientExternalModule.ts(1,23): error TS2435: Ambient external modules cannot be nested in other modules. +tests/cases/conformance/ambient/ambientExternalModuleInsideNonAmbientExternalModule.ts(1,23): error TS2435: Ambient modules cannot be nested in other modules. ==== tests/cases/conformance/ambient/ambientExternalModuleInsideNonAmbientExternalModule.ts (1 errors) ==== export declare module "M" { } ~~~ -!!! error TS2435: Ambient external modules cannot be nested in other modules. \ No newline at end of file +!!! error TS2435: Ambient modules cannot be nested in other modules. \ No newline at end of file diff --git a/tests/baselines/reference/ambientExternalModuleWithRelativeExternalImportDeclaration.errors.txt b/tests/baselines/reference/ambientExternalModuleWithRelativeExternalImportDeclaration.errors.txt index 72d7145969f91..b7ccdc8df92ea 100644 --- a/tests/baselines/reference/ambientExternalModuleWithRelativeExternalImportDeclaration.errors.txt +++ b/tests/baselines/reference/ambientExternalModuleWithRelativeExternalImportDeclaration.errors.txt @@ -1,14 +1,14 @@ -tests/cases/compiler/ambientExternalModuleWithRelativeExternalImportDeclaration.ts(2,5): error TS2439: Import or export declaration in an ambient external module declaration cannot reference external module through relative external module name. -tests/cases/compiler/ambientExternalModuleWithRelativeExternalImportDeclaration.ts(2,25): error TS2307: Cannot find external module './SubModule'. +tests/cases/compiler/ambientExternalModuleWithRelativeExternalImportDeclaration.ts(2,5): error TS2439: Import or export declaration in an ambient module declaration cannot reference module through relative module name. +tests/cases/compiler/ambientExternalModuleWithRelativeExternalImportDeclaration.ts(2,25): error TS2307: Cannot find module './SubModule'. ==== tests/cases/compiler/ambientExternalModuleWithRelativeExternalImportDeclaration.ts (2 errors) ==== declare module "OuterModule" { import m2 = require("./SubModule"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2439: Import or export declaration in an ambient external module declaration cannot reference external module through relative external module name. +!!! error TS2439: Import or export declaration in an ambient module declaration cannot reference module through relative module name. ~~~~~~~~~~~~~ -!!! error TS2307: Cannot find external module './SubModule'. +!!! error TS2307: Cannot find module './SubModule'. class SubModule { public static StaticVar: number; public InstanceVar: number; diff --git a/tests/baselines/reference/ambientExternalModuleWithRelativeModuleName.errors.txt b/tests/baselines/reference/ambientExternalModuleWithRelativeModuleName.errors.txt index 7f6c0ff5b142c..b85a7ad11a9e8 100644 --- a/tests/baselines/reference/ambientExternalModuleWithRelativeModuleName.errors.txt +++ b/tests/baselines/reference/ambientExternalModuleWithRelativeModuleName.errors.txt @@ -1,16 +1,16 @@ -tests/cases/compiler/ambientExternalModuleWithRelativeModuleName.ts(1,16): error TS2436: Ambient external module declaration cannot specify relative module name. -tests/cases/compiler/ambientExternalModuleWithRelativeModuleName.ts(5,16): error TS2436: Ambient external module declaration cannot specify relative module name. +tests/cases/compiler/ambientExternalModuleWithRelativeModuleName.ts(1,16): error TS2436: Ambient module declaration cannot specify relative module name. +tests/cases/compiler/ambientExternalModuleWithRelativeModuleName.ts(5,16): error TS2436: Ambient module declaration cannot specify relative module name. ==== tests/cases/compiler/ambientExternalModuleWithRelativeModuleName.ts (2 errors) ==== declare module "./relativeModule" { ~~~~~~~~~~~~~~~~~~ -!!! error TS2436: Ambient external module declaration cannot specify relative module name. +!!! error TS2436: Ambient module declaration cannot specify relative module name. var x: string; } declare module ".\\relativeModule" { ~~~~~~~~~~~~~~~~~~~ -!!! error TS2436: Ambient external module declaration cannot specify relative module name. +!!! error TS2436: Ambient module declaration cannot specify relative module name. var x: string; } \ No newline at end of file diff --git a/tests/baselines/reference/amdDependencyComment1.errors.txt b/tests/baselines/reference/amdDependencyComment1.errors.txt index 8e436a56547f9..f3b5a5c06ccde 100644 --- a/tests/baselines/reference/amdDependencyComment1.errors.txt +++ b/tests/baselines/reference/amdDependencyComment1.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/amdDependencyComment1.ts(3,21): error TS2307: Cannot find external module 'm2'. +tests/cases/compiler/amdDependencyComment1.ts(3,21): error TS2307: Cannot find module 'm2'. ==== tests/cases/compiler/amdDependencyComment1.ts (1 errors) ==== @@ -6,5 +6,5 @@ tests/cases/compiler/amdDependencyComment1.ts(3,21): error TS2307: Cannot find e import m1 = require("m2") ~~~~ -!!! error TS2307: Cannot find external module 'm2'. +!!! error TS2307: Cannot find module 'm2'. m1.f(); \ No newline at end of file diff --git a/tests/baselines/reference/amdDependencyComment2.errors.txt b/tests/baselines/reference/amdDependencyComment2.errors.txt index bddd4e334e66d..e7d81514b906a 100644 --- a/tests/baselines/reference/amdDependencyComment2.errors.txt +++ b/tests/baselines/reference/amdDependencyComment2.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/amdDependencyComment2.ts(3,21): error TS2307: Cannot find external module 'm2'. +tests/cases/compiler/amdDependencyComment2.ts(3,21): error TS2307: Cannot find module 'm2'. ==== tests/cases/compiler/amdDependencyComment2.ts (1 errors) ==== @@ -6,5 +6,5 @@ tests/cases/compiler/amdDependencyComment2.ts(3,21): error TS2307: Cannot find e import m1 = require("m2") ~~~~ -!!! error TS2307: Cannot find external module 'm2'. +!!! error TS2307: Cannot find module 'm2'. m1.f(); \ No newline at end of file diff --git a/tests/baselines/reference/amdDependencyCommentName1.errors.txt b/tests/baselines/reference/amdDependencyCommentName1.errors.txt index 6ba879abc7210..f9e29ffe4c9ca 100644 --- a/tests/baselines/reference/amdDependencyCommentName1.errors.txt +++ b/tests/baselines/reference/amdDependencyCommentName1.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/amdDependencyCommentName1.ts(3,21): error TS2307: Cannot find external module 'm2'. +tests/cases/compiler/amdDependencyCommentName1.ts(3,21): error TS2307: Cannot find module 'm2'. ==== tests/cases/compiler/amdDependencyCommentName1.ts (1 errors) ==== @@ -6,5 +6,5 @@ tests/cases/compiler/amdDependencyCommentName1.ts(3,21): error TS2307: Cannot fi import m1 = require("m2") ~~~~ -!!! error TS2307: Cannot find external module 'm2'. +!!! error TS2307: Cannot find module 'm2'. m1.f(); \ No newline at end of file diff --git a/tests/baselines/reference/amdDependencyCommentName2.errors.txt b/tests/baselines/reference/amdDependencyCommentName2.errors.txt index e3d6b8d16ec20..de9350187eaf3 100644 --- a/tests/baselines/reference/amdDependencyCommentName2.errors.txt +++ b/tests/baselines/reference/amdDependencyCommentName2.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/amdDependencyCommentName2.ts(3,21): error TS2307: Cannot find external module 'm2'. +tests/cases/compiler/amdDependencyCommentName2.ts(3,21): error TS2307: Cannot find module 'm2'. ==== tests/cases/compiler/amdDependencyCommentName2.ts (1 errors) ==== @@ -6,5 +6,5 @@ tests/cases/compiler/amdDependencyCommentName2.ts(3,21): error TS2307: Cannot fi import m1 = require("m2") ~~~~ -!!! error TS2307: Cannot find external module 'm2'. +!!! error TS2307: Cannot find module 'm2'. m1.f(); \ No newline at end of file diff --git a/tests/baselines/reference/amdDependencyCommentName3.errors.txt b/tests/baselines/reference/amdDependencyCommentName3.errors.txt index a9342218c2c58..6c3f1583314af 100644 --- a/tests/baselines/reference/amdDependencyCommentName3.errors.txt +++ b/tests/baselines/reference/amdDependencyCommentName3.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/amdDependencyCommentName3.ts(5,21): error TS2307: Cannot find external module 'm2'. +tests/cases/compiler/amdDependencyCommentName3.ts(5,21): error TS2307: Cannot find module 'm2'. ==== tests/cases/compiler/amdDependencyCommentName3.ts (1 errors) ==== @@ -8,5 +8,5 @@ tests/cases/compiler/amdDependencyCommentName3.ts(5,21): error TS2307: Cannot fi import m1 = require("m2") ~~~~ -!!! error TS2307: Cannot find external module 'm2'. +!!! error TS2307: Cannot find module 'm2'. m1.f(); \ No newline at end of file diff --git a/tests/baselines/reference/amdDependencyCommentName4.errors.txt b/tests/baselines/reference/amdDependencyCommentName4.errors.txt index 6b32830e51c24..8031a651d0a6d 100644 --- a/tests/baselines/reference/amdDependencyCommentName4.errors.txt +++ b/tests/baselines/reference/amdDependencyCommentName4.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/amdDependencyCommentName4.ts(8,21): error TS2307: Cannot find external module 'aliasedModule1'. -tests/cases/compiler/amdDependencyCommentName4.ts(11,26): error TS2307: Cannot find external module 'aliasedModule2'. -tests/cases/compiler/amdDependencyCommentName4.ts(14,15): error TS2307: Cannot find external module 'aliasedModule3'. -tests/cases/compiler/amdDependencyCommentName4.ts(17,21): error TS2307: Cannot find external module 'aliasedModule4'. +tests/cases/compiler/amdDependencyCommentName4.ts(8,21): error TS2307: Cannot find module 'aliasedModule1'. +tests/cases/compiler/amdDependencyCommentName4.ts(11,26): error TS2307: Cannot find module 'aliasedModule2'. +tests/cases/compiler/amdDependencyCommentName4.ts(14,15): error TS2307: Cannot find module 'aliasedModule3'. +tests/cases/compiler/amdDependencyCommentName4.ts(17,21): error TS2307: Cannot find module 'aliasedModule4'. ==== tests/cases/compiler/amdDependencyCommentName4.ts (4 errors) ==== @@ -14,22 +14,22 @@ tests/cases/compiler/amdDependencyCommentName4.ts(17,21): error TS2307: Cannot f import r1 = require("aliasedModule1"); ~~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find external module 'aliasedModule1'. +!!! error TS2307: Cannot find module 'aliasedModule1'. r1; import {p1, p2, p3} from "aliasedModule2"; ~~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find external module 'aliasedModule2'. +!!! error TS2307: Cannot find module 'aliasedModule2'. p1; import d from "aliasedModule3"; ~~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find external module 'aliasedModule3'. +!!! error TS2307: Cannot find module 'aliasedModule3'. d; import * as ns from "aliasedModule4"; ~~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find external module 'aliasedModule4'. +!!! error TS2307: Cannot find module 'aliasedModule4'. ns; import "unaliasedModule2"; \ No newline at end of file diff --git a/tests/baselines/reference/augmentedTypesModules.errors.txt b/tests/baselines/reference/augmentedTypesModules.errors.txt index 980837a18efe1..5ece0710e436a 100644 --- a/tests/baselines/reference/augmentedTypesModules.errors.txt +++ b/tests/baselines/reference/augmentedTypesModules.errors.txt @@ -4,9 +4,9 @@ tests/cases/compiler/augmentedTypesModules.ts(8,8): error TS2300: Duplicate iden tests/cases/compiler/augmentedTypesModules.ts(9,5): error TS2300: Duplicate identifier 'm1b'. tests/cases/compiler/augmentedTypesModules.ts(16,8): error TS2300: Duplicate identifier 'm1d'. tests/cases/compiler/augmentedTypesModules.ts(19,5): error TS2300: Duplicate identifier 'm1d'. -tests/cases/compiler/augmentedTypesModules.ts(25,8): error TS2434: A module declaration cannot be located prior to a class or function with which it is merged -tests/cases/compiler/augmentedTypesModules.ts(28,8): error TS2434: A module declaration cannot be located prior to a class or function with which it is merged -tests/cases/compiler/augmentedTypesModules.ts(51,8): error TS2434: A module declaration cannot be located prior to a class or function with which it is merged +tests/cases/compiler/augmentedTypesModules.ts(25,8): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged +tests/cases/compiler/augmentedTypesModules.ts(28,8): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged +tests/cases/compiler/augmentedTypesModules.ts(51,8): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged ==== tests/cases/compiler/augmentedTypesModules.ts (9 errors) ==== @@ -48,12 +48,12 @@ tests/cases/compiler/augmentedTypesModules.ts(51,8): error TS2434: A module decl module m2a { var y = 2; } ~~~ -!!! error TS2434: A module declaration cannot be located prior to a class or function with which it is merged +!!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged function m2a() { }; // error since the module is instantiated module m2b { export var y = 2; } ~~~ -!!! error TS2434: A module declaration cannot be located prior to a class or function with which it is merged +!!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged function m2b() { }; // error since the module is instantiated // should be errors to have function first @@ -78,7 +78,7 @@ tests/cases/compiler/augmentedTypesModules.ts(51,8): error TS2434: A module decl module m3a { var y = 2; } ~~~ -!!! error TS2434: A module declaration cannot be located prior to a class or function with which it is merged +!!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged class m3a { foo() { } } // error, class isn't ambient or declared before the module class m3b { foo() { } } diff --git a/tests/baselines/reference/augmentedTypesModules2.errors.txt b/tests/baselines/reference/augmentedTypesModules2.errors.txt index 19c87a149138a..be847d888309a 100644 --- a/tests/baselines/reference/augmentedTypesModules2.errors.txt +++ b/tests/baselines/reference/augmentedTypesModules2.errors.txt @@ -1,6 +1,6 @@ -tests/cases/compiler/augmentedTypesModules2.ts(5,8): error TS2434: A module declaration cannot be located prior to a class or function with which it is merged -tests/cases/compiler/augmentedTypesModules2.ts(8,8): error TS2434: A module declaration cannot be located prior to a class or function with which it is merged -tests/cases/compiler/augmentedTypesModules2.ts(14,8): error TS2434: A module declaration cannot be located prior to a class or function with which it is merged +tests/cases/compiler/augmentedTypesModules2.ts(5,8): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged +tests/cases/compiler/augmentedTypesModules2.ts(8,8): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged +tests/cases/compiler/augmentedTypesModules2.ts(14,8): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged ==== tests/cases/compiler/augmentedTypesModules2.ts (3 errors) ==== @@ -10,12 +10,12 @@ tests/cases/compiler/augmentedTypesModules2.ts(14,8): error TS2434: A module dec module m2a { var y = 2; } ~~~ -!!! error TS2434: A module declaration cannot be located prior to a class or function with which it is merged +!!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged function m2a() { }; // error since the module is instantiated module m2b { export var y = 2; } ~~~ -!!! error TS2434: A module declaration cannot be located prior to a class or function with which it is merged +!!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged function m2b() { }; // error since the module is instantiated function m2c() { }; @@ -23,7 +23,7 @@ tests/cases/compiler/augmentedTypesModules2.ts(14,8): error TS2434: A module dec module m2cc { export var y = 2; } ~~~~ -!!! error TS2434: A module declaration cannot be located prior to a class or function with which it is merged +!!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged function m2cc() { }; // error to have module first module m2d { } diff --git a/tests/baselines/reference/augmentedTypesModules3.errors.txt b/tests/baselines/reference/augmentedTypesModules3.errors.txt index e264c74463cba..8e1bd70627155 100644 --- a/tests/baselines/reference/augmentedTypesModules3.errors.txt +++ b/tests/baselines/reference/augmentedTypesModules3.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/augmentedTypesModules3.ts(5,8): error TS2434: A module declaration cannot be located prior to a class or function with which it is merged +tests/cases/compiler/augmentedTypesModules3.ts(5,8): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged ==== tests/cases/compiler/augmentedTypesModules3.ts (1 errors) ==== @@ -8,5 +8,5 @@ tests/cases/compiler/augmentedTypesModules3.ts(5,8): error TS2434: A module decl module m3a { var y = 2; } ~~~ -!!! error TS2434: A module declaration cannot be located prior to a class or function with which it is merged +!!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged class m3a { foo() { } } // error, class isn't ambient or declared before the module \ No newline at end of file diff --git a/tests/baselines/reference/badExternalModuleReference.errors.txt b/tests/baselines/reference/badExternalModuleReference.errors.txt index 96ac422422287..e5caaaf296fb4 100644 --- a/tests/baselines/reference/badExternalModuleReference.errors.txt +++ b/tests/baselines/reference/badExternalModuleReference.errors.txt @@ -1,10 +1,10 @@ -tests/cases/compiler/badExternalModuleReference.ts(1,21): error TS2307: Cannot find external module 'garbage'. +tests/cases/compiler/badExternalModuleReference.ts(1,21): error TS2307: Cannot find module 'garbage'. ==== tests/cases/compiler/badExternalModuleReference.ts (1 errors) ==== import a1 = require("garbage"); ~~~~~~~~~ -!!! error TS2307: Cannot find external module 'garbage'. +!!! error TS2307: Cannot find module 'garbage'. export declare var a: { test1: a1.connectModule; (): a1.connectExport; diff --git a/tests/baselines/reference/circularReference.errors.txt b/tests/baselines/reference/circularReference.errors.txt index 667d1ca895db1..5e0a6208a1ef5 100644 --- a/tests/baselines/reference/circularReference.errors.txt +++ b/tests/baselines/reference/circularReference.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/externalModules/foo1.ts(1,1): error TS1148: Cannot compile external modules unless the '--module' flag is provided. +tests/cases/conformance/externalModules/foo1.ts(1,1): error TS1148: Cannot compile modules unless the '--module' flag is provided. tests/cases/conformance/externalModules/foo1.ts(9,12): error TS2339: Property 'x' does not exist on type 'C1'. tests/cases/conformance/externalModules/foo2.ts(8,12): error TS2339: Property 'y' does not exist on type 'C1'. tests/cases/conformance/externalModules/foo2.ts(13,8): error TS2339: Property 'x' does not exist on type 'C1'. @@ -29,7 +29,7 @@ tests/cases/conformance/externalModules/foo2.ts(13,8): error TS2339: Property 'x ==== tests/cases/conformance/externalModules/foo1.ts (2 errors) ==== import foo2 = require('./foo2'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. export module M1 { export class C1 { m1: foo2.M1.C1; diff --git a/tests/baselines/reference/classMemberInitializerWithLamdaScoping3.errors.txt b/tests/baselines/reference/classMemberInitializerWithLamdaScoping3.errors.txt index f396b72226374..47adb9571414a 100644 --- a/tests/baselines/reference/classMemberInitializerWithLamdaScoping3.errors.txt +++ b/tests/baselines/reference/classMemberInitializerWithLamdaScoping3.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/classMemberInitializerWithLamdaScoping3_1.ts(4,14): error TS1148: Cannot compile external modules unless the '--module' flag is provided. +tests/cases/compiler/classMemberInitializerWithLamdaScoping3_1.ts(4,14): error TS1148: Cannot compile modules unless the '--module' flag is provided. tests/cases/compiler/classMemberInitializerWithLamdaScoping3_1.ts(8,21): error TS2301: Initializer of instance member variable 'messageHandler' cannot reference identifier 'field1' declared in the constructor. @@ -11,7 +11,7 @@ tests/cases/compiler/classMemberInitializerWithLamdaScoping3_1.ts(8,21): error T }; export class Test1 { ~~~~~ -!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. constructor(private field1: string) { } messageHandler = () => { diff --git a/tests/baselines/reference/classMemberInitializerWithLamdaScoping4.errors.txt b/tests/baselines/reference/classMemberInitializerWithLamdaScoping4.errors.txt index 84e7994fd0cb5..9d1a2dd3418ab 100644 --- a/tests/baselines/reference/classMemberInitializerWithLamdaScoping4.errors.txt +++ b/tests/baselines/reference/classMemberInitializerWithLamdaScoping4.errors.txt @@ -1,11 +1,11 @@ -tests/cases/compiler/classMemberInitializerWithLamdaScoping3_0.ts(1,1): error TS1148: Cannot compile external modules unless the '--module' flag is provided. +tests/cases/compiler/classMemberInitializerWithLamdaScoping3_0.ts(1,1): error TS1148: Cannot compile modules unless the '--module' flag is provided. tests/cases/compiler/classMemberInitializerWithLamdaScoping3_1.ts(8,21): error TS2304: Cannot find name 'field1'. ==== tests/cases/compiler/classMemberInitializerWithLamdaScoping3_0.ts (1 errors) ==== export var field1: string; ~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. ==== tests/cases/compiler/classMemberInitializerWithLamdaScoping3_1.ts (1 errors) ==== declare var console: { diff --git a/tests/baselines/reference/cloduleSplitAcrossFiles.errors.txt b/tests/baselines/reference/cloduleSplitAcrossFiles.errors.txt index e9001265febb7..2de3141da54b9 100644 --- a/tests/baselines/reference/cloduleSplitAcrossFiles.errors.txt +++ b/tests/baselines/reference/cloduleSplitAcrossFiles.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/cloduleSplitAcrossFiles_module.ts(1,8): error TS2433: A module declaration cannot be in a different file from a class or function with which it is merged +tests/cases/compiler/cloduleSplitAcrossFiles_module.ts(1,8): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged ==== tests/cases/compiler/cloduleSplitAcrossFiles_class.ts (0 errors) ==== @@ -7,7 +7,7 @@ tests/cases/compiler/cloduleSplitAcrossFiles_module.ts(1,8): error TS2433: A mod ==== tests/cases/compiler/cloduleSplitAcrossFiles_module.ts (1 errors) ==== module D { ~ -!!! error TS2433: A module declaration cannot be in a different file from a class or function with which it is merged +!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged export var y = "hi"; } D.y; \ No newline at end of file diff --git a/tests/baselines/reference/cloduleWithPriorInstantiatedModule.errors.txt b/tests/baselines/reference/cloduleWithPriorInstantiatedModule.errors.txt index 1b0d9cf13ca75..0f23d5c9a1533 100644 --- a/tests/baselines/reference/cloduleWithPriorInstantiatedModule.errors.txt +++ b/tests/baselines/reference/cloduleWithPriorInstantiatedModule.errors.txt @@ -1,11 +1,11 @@ -tests/cases/compiler/cloduleWithPriorInstantiatedModule.ts(2,8): error TS2434: A module declaration cannot be located prior to a class or function with which it is merged +tests/cases/compiler/cloduleWithPriorInstantiatedModule.ts(2,8): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged ==== tests/cases/compiler/cloduleWithPriorInstantiatedModule.ts (1 errors) ==== // Non-ambient & instantiated module. module Moclodule { ~~~~~~~~~ -!!! error TS2434: A module declaration cannot be located prior to a class or function with which it is merged +!!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged export interface Someinterface { foo(): void; } diff --git a/tests/baselines/reference/collisionExportsRequireAndAlias.errors.txt b/tests/baselines/reference/collisionExportsRequireAndAlias.errors.txt index e782abd08b882..4273e3bb43604 100644 --- a/tests/baselines/reference/collisionExportsRequireAndAlias.errors.txt +++ b/tests/baselines/reference/collisionExportsRequireAndAlias.errors.txt @@ -1,14 +1,14 @@ -tests/cases/compiler/collisionExportsRequireAndAlias_file2.ts(1,8): error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of an external module. -tests/cases/compiler/collisionExportsRequireAndAlias_file2.ts(2,8): error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of an external module. +tests/cases/compiler/collisionExportsRequireAndAlias_file2.ts(1,8): error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of a module. +tests/cases/compiler/collisionExportsRequireAndAlias_file2.ts(2,8): error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of a module. ==== tests/cases/compiler/collisionExportsRequireAndAlias_file2.ts (2 errors) ==== import require = require('collisionExportsRequireAndAlias_file1'); // Error ~~~~~~~ -!!! error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of an external module. +!!! error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of a module. import exports = require('collisionExportsRequireAndAlias_file3333'); // Error ~~~~~~~ -!!! error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of an external module. +!!! error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of a module. export function foo() { require.bar(); } diff --git a/tests/baselines/reference/collisionExportsRequireAndClass.errors.txt b/tests/baselines/reference/collisionExportsRequireAndClass.errors.txt index ef0a9018f1df5..d443a1ad308ab 100644 --- a/tests/baselines/reference/collisionExportsRequireAndClass.errors.txt +++ b/tests/baselines/reference/collisionExportsRequireAndClass.errors.txt @@ -1,15 +1,15 @@ -tests/cases/compiler/collisionExportsRequireAndClass_externalmodule.ts(1,14): error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of an external module. -tests/cases/compiler/collisionExportsRequireAndClass_externalmodule.ts(3,14): error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of an external module. +tests/cases/compiler/collisionExportsRequireAndClass_externalmodule.ts(1,14): error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of a module. +tests/cases/compiler/collisionExportsRequireAndClass_externalmodule.ts(3,14): error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of a module. ==== tests/cases/compiler/collisionExportsRequireAndClass_externalmodule.ts (2 errors) ==== export class require { ~~~~~~~ -!!! error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of an external module. +!!! error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of a module. } export class exports { ~~~~~~~ -!!! error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of an external module. +!!! error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of a module. } module m1 { class require { diff --git a/tests/baselines/reference/collisionExportsRequireAndEnum.errors.txt b/tests/baselines/reference/collisionExportsRequireAndEnum.errors.txt index d421cbe4d4b2a..fce7e93268264 100644 --- a/tests/baselines/reference/collisionExportsRequireAndEnum.errors.txt +++ b/tests/baselines/reference/collisionExportsRequireAndEnum.errors.txt @@ -1,17 +1,17 @@ -tests/cases/compiler/collisionExportsRequireAndEnum_externalmodule.ts(1,13): error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of an external module. -tests/cases/compiler/collisionExportsRequireAndEnum_externalmodule.ts(5,13): error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of an external module. +tests/cases/compiler/collisionExportsRequireAndEnum_externalmodule.ts(1,13): error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of a module. +tests/cases/compiler/collisionExportsRequireAndEnum_externalmodule.ts(5,13): error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of a module. ==== tests/cases/compiler/collisionExportsRequireAndEnum_externalmodule.ts (2 errors) ==== export enum require { // Error ~~~~~~~ -!!! error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of an external module. +!!! error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of a module. _thisVal1, _thisVal2, } export enum exports { // Error ~~~~~~~ -!!! error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of an external module. +!!! error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of a module. _thisVal1, _thisVal2, } diff --git a/tests/baselines/reference/collisionExportsRequireAndFunction.errors.txt b/tests/baselines/reference/collisionExportsRequireAndFunction.errors.txt index f52390ec28c2e..e7052759bc903 100644 --- a/tests/baselines/reference/collisionExportsRequireAndFunction.errors.txt +++ b/tests/baselines/reference/collisionExportsRequireAndFunction.errors.txt @@ -1,16 +1,16 @@ -tests/cases/compiler/collisionExportsRequireAndFunction.ts(1,17): error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of an external module. -tests/cases/compiler/collisionExportsRequireAndFunction.ts(4,17): error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of an external module. +tests/cases/compiler/collisionExportsRequireAndFunction.ts(1,17): error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of a module. +tests/cases/compiler/collisionExportsRequireAndFunction.ts(4,17): error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of a module. ==== tests/cases/compiler/collisionExportsRequireAndFunction.ts (2 errors) ==== export function exports() { ~~~~~~~ -!!! error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of an external module. +!!! error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of a module. return 1; } export function require() { ~~~~~~~ -!!! error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of an external module. +!!! error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of a module. return "require"; } module m1 { diff --git a/tests/baselines/reference/collisionExportsRequireAndInternalModuleAlias.errors.txt b/tests/baselines/reference/collisionExportsRequireAndInternalModuleAlias.errors.txt index 4207db04f5395..569fad94f68d1 100644 --- a/tests/baselines/reference/collisionExportsRequireAndInternalModuleAlias.errors.txt +++ b/tests/baselines/reference/collisionExportsRequireAndInternalModuleAlias.errors.txt @@ -1,5 +1,5 @@ -tests/cases/compiler/collisionExportsRequireAndInternalModuleAlias.ts(5,8): error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of an external module. -tests/cases/compiler/collisionExportsRequireAndInternalModuleAlias.ts(6,8): error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of an external module. +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. ==== tests/cases/compiler/collisionExportsRequireAndInternalModuleAlias.ts (2 errors) ==== @@ -9,10 +9,10 @@ tests/cases/compiler/collisionExportsRequireAndInternalModuleAlias.ts(6,8): erro } import exports = m.c; ~~~~~~~ -!!! error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of an external module. +!!! error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of a module. import require = m.c; ~~~~~~~ -!!! error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of an external module. +!!! error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of a module. new exports(); new require(); diff --git a/tests/baselines/reference/collisionExportsRequireAndModule.errors.txt b/tests/baselines/reference/collisionExportsRequireAndModule.errors.txt index cb11155718e15..f08bf611e0535 100644 --- a/tests/baselines/reference/collisionExportsRequireAndModule.errors.txt +++ b/tests/baselines/reference/collisionExportsRequireAndModule.errors.txt @@ -1,11 +1,11 @@ -tests/cases/compiler/collisionExportsRequireAndModule_externalmodule.ts(1,15): error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of an external module. -tests/cases/compiler/collisionExportsRequireAndModule_externalmodule.ts(10,15): error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of an external module. +tests/cases/compiler/collisionExportsRequireAndModule_externalmodule.ts(1,15): error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of a module. +tests/cases/compiler/collisionExportsRequireAndModule_externalmodule.ts(10,15): error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of a module. ==== tests/cases/compiler/collisionExportsRequireAndModule_externalmodule.ts (2 errors) ==== export module require { ~~~~~~~ -!!! error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of an external module. +!!! error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of a module. export interface I { } export class C { @@ -16,7 +16,7 @@ tests/cases/compiler/collisionExportsRequireAndModule_externalmodule.ts(10,15): } export module exports { ~~~~~~~ -!!! error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of an external module. +!!! error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of a module. export interface I { } export class C { diff --git a/tests/baselines/reference/collisionExportsRequireAndVar.errors.txt b/tests/baselines/reference/collisionExportsRequireAndVar.errors.txt index 2efc84d5436b8..af7007c25f0af 100644 --- a/tests/baselines/reference/collisionExportsRequireAndVar.errors.txt +++ b/tests/baselines/reference/collisionExportsRequireAndVar.errors.txt @@ -1,5 +1,5 @@ -tests/cases/compiler/collisionExportsRequireAndVar_externalmodule.ts(3,5): error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of an external module. -tests/cases/compiler/collisionExportsRequireAndVar_externalmodule.ts(4,5): error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of an external module. +tests/cases/compiler/collisionExportsRequireAndVar_externalmodule.ts(3,5): error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of a module. +tests/cases/compiler/collisionExportsRequireAndVar_externalmodule.ts(4,5): error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of a module. ==== tests/cases/compiler/collisionExportsRequireAndVar_externalmodule.ts (2 errors) ==== @@ -7,10 +7,10 @@ tests/cases/compiler/collisionExportsRequireAndVar_externalmodule.ts(4,5): error } var exports = 1; ~~~~~~~ -!!! error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of an external module. +!!! error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of a module. var require = "require"; ~~~~~~~ -!!! error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of an external module. +!!! error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of a module. module m1 { var exports = 0; var require = "require"; diff --git a/tests/baselines/reference/commentOnImportStatement1.errors.txt b/tests/baselines/reference/commentOnImportStatement1.errors.txt index 26a725a8f7c18..c6dcaf31c4f77 100644 --- a/tests/baselines/reference/commentOnImportStatement1.errors.txt +++ b/tests/baselines/reference/commentOnImportStatement1.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/commentOnImportStatement1.ts(3,22): error TS2307: Cannot find external module './foo'. +tests/cases/compiler/commentOnImportStatement1.ts(3,22): error TS2307: Cannot find module './foo'. ==== tests/cases/compiler/commentOnImportStatement1.ts (1 errors) ==== @@ -6,5 +6,5 @@ tests/cases/compiler/commentOnImportStatement1.ts(3,22): error TS2307: Cannot fi import foo = require('./foo'); ~~~~~~~ -!!! error TS2307: Cannot find external module './foo'. +!!! error TS2307: Cannot find module './foo'. \ No newline at end of file diff --git a/tests/baselines/reference/commentOnImportStatement2.errors.txt b/tests/baselines/reference/commentOnImportStatement2.errors.txt index a2ea6c19d6ee5..31f11a1c14830 100644 --- a/tests/baselines/reference/commentOnImportStatement2.errors.txt +++ b/tests/baselines/reference/commentOnImportStatement2.errors.txt @@ -1,8 +1,8 @@ -tests/cases/compiler/commentOnImportStatement2.ts(2,22): error TS2307: Cannot find external module './foo'. +tests/cases/compiler/commentOnImportStatement2.ts(2,22): error TS2307: Cannot find module './foo'. ==== tests/cases/compiler/commentOnImportStatement2.ts (1 errors) ==== /* not copyright */ import foo = require('./foo'); ~~~~~~~ -!!! error TS2307: Cannot find external module './foo'. \ No newline at end of file +!!! error TS2307: Cannot find module './foo'. \ No newline at end of file diff --git a/tests/baselines/reference/commentOnImportStatement3.errors.txt b/tests/baselines/reference/commentOnImportStatement3.errors.txt index 427bcf3aef740..ec47c42dc41b1 100644 --- a/tests/baselines/reference/commentOnImportStatement3.errors.txt +++ b/tests/baselines/reference/commentOnImportStatement3.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/commentOnImportStatement3.ts(4,22): error TS2307: Cannot find external module './foo'. +tests/cases/compiler/commentOnImportStatement3.ts(4,22): error TS2307: Cannot find module './foo'. ==== tests/cases/compiler/commentOnImportStatement3.ts (1 errors) ==== @@ -7,4 +7,4 @@ tests/cases/compiler/commentOnImportStatement3.ts(4,22): error TS2307: Cannot fi /* not copyright */ import foo = require('./foo'); ~~~~~~~ -!!! error TS2307: Cannot find external module './foo'. \ No newline at end of file +!!! error TS2307: Cannot find module './foo'. \ No newline at end of file diff --git a/tests/baselines/reference/computedPropertyNames19_ES5.errors.txt b/tests/baselines/reference/computedPropertyNames19_ES5.errors.txt index 49a1f008a0500..ecbe59ccd1c57 100644 --- a/tests/baselines/reference/computedPropertyNames19_ES5.errors.txt +++ b/tests/baselines/reference/computedPropertyNames19_ES5.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/es6/computedProperties/computedPropertyNames19_ES5.ts(3,10): error TS2331: 'this' cannot be referenced in a module body. +tests/cases/conformance/es6/computedProperties/computedPropertyNames19_ES5.ts(3,10): error TS2331: 'this' cannot be referenced in a module or namespace body. ==== tests/cases/conformance/es6/computedProperties/computedPropertyNames19_ES5.ts (1 errors) ==== @@ -6,6 +6,6 @@ tests/cases/conformance/es6/computedProperties/computedPropertyNames19_ES5.ts(3, var obj = { [this.bar]: 0 ~~~~ -!!! error TS2331: 'this' cannot be referenced in a module body. +!!! error TS2331: 'this' cannot be referenced in a module or namespace body. } } \ No newline at end of file diff --git a/tests/baselines/reference/computedPropertyNames19_ES6.errors.txt b/tests/baselines/reference/computedPropertyNames19_ES6.errors.txt index 9e2d1afbe74f2..9a18ba4a63108 100644 --- a/tests/baselines/reference/computedPropertyNames19_ES6.errors.txt +++ b/tests/baselines/reference/computedPropertyNames19_ES6.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/es6/computedProperties/computedPropertyNames19_ES6.ts(3,10): error TS2331: 'this' cannot be referenced in a module body. +tests/cases/conformance/es6/computedProperties/computedPropertyNames19_ES6.ts(3,10): error TS2331: 'this' cannot be referenced in a module or namespace body. ==== tests/cases/conformance/es6/computedProperties/computedPropertyNames19_ES6.ts (1 errors) ==== @@ -6,6 +6,6 @@ tests/cases/conformance/es6/computedProperties/computedPropertyNames19_ES6.ts(3, var obj = { [this.bar]: 0 ~~~~ -!!! error TS2331: 'this' cannot be referenced in a module body. +!!! error TS2331: 'this' cannot be referenced in a module or namespace body. } } \ No newline at end of file diff --git a/tests/baselines/reference/constDeclarations-access5.errors.txt b/tests/baselines/reference/constDeclarations-access5.errors.txt index e689bbf8b4e57..17b91deae8801 100644 --- a/tests/baselines/reference/constDeclarations-access5.errors.txt +++ b/tests/baselines/reference/constDeclarations-access5.errors.txt @@ -1,4 +1,4 @@ -error TS1204: Cannot compile external modules into 'amd', 'commonjs' or 'umd' when targeting 'ES6' or higher. +error TS1204: Cannot compile modules into 'amd', 'commonjs' or 'umd' when targeting 'ES6' or higher. tests/cases/compiler/constDeclarations_access_2.ts(2,1): error TS1202: Import assignment cannot be used when targeting ECMAScript 6 or higher. Consider using 'import * as ns from "mod"', 'import {a} from "mod"' or 'import d from "mod"' instead. tests/cases/compiler/constDeclarations_access_2.ts(4,1): error TS2450: Left-hand side of assignment expression cannot be a constant. tests/cases/compiler/constDeclarations_access_2.ts(5,1): error TS2450: Left-hand side of assignment expression cannot be a constant. @@ -20,7 +20,7 @@ tests/cases/compiler/constDeclarations_access_2.ts(22,3): error TS2449: The oper tests/cases/compiler/constDeclarations_access_2.ts(24,1): error TS2450: Left-hand side of assignment expression cannot be a constant. -!!! error TS1204: Cannot compile external modules into 'amd', 'commonjs' or 'umd' when targeting 'ES6' or higher. +!!! error TS1204: Cannot compile modules into 'amd', 'commonjs' or 'umd' when targeting 'ES6' or higher. ==== tests/cases/compiler/constDeclarations_access_2.ts (19 errors) ==== /// import m = require('constDeclarations_access_1'); diff --git a/tests/baselines/reference/copyrightWithNewLine1.errors.txt b/tests/baselines/reference/copyrightWithNewLine1.errors.txt index 680d783a1d93c..11c34ed86a7da 100644 --- a/tests/baselines/reference/copyrightWithNewLine1.errors.txt +++ b/tests/baselines/reference/copyrightWithNewLine1.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/copyrightWithNewLine1.ts(5,24): error TS2307: Cannot find external module './greeter'. +tests/cases/compiler/copyrightWithNewLine1.ts(5,24): error TS2307: Cannot find module './greeter'. tests/cases/compiler/copyrightWithNewLine1.ts(6,10): error TS2304: Cannot find name 'document'. @@ -9,7 +9,7 @@ tests/cases/compiler/copyrightWithNewLine1.ts(6,10): error TS2304: Cannot find n import model = require("./greeter") ~~~~~~~~~~~ -!!! error TS2307: Cannot find external module './greeter'. +!!! error TS2307: Cannot find module './greeter'. var el = document.getElementById('content'); ~~~~~~~~ !!! error TS2304: Cannot find name 'document'. diff --git a/tests/baselines/reference/copyrightWithoutNewLine1.errors.txt b/tests/baselines/reference/copyrightWithoutNewLine1.errors.txt index a4f792f2dae6e..d7f5f3129c709 100644 --- a/tests/baselines/reference/copyrightWithoutNewLine1.errors.txt +++ b/tests/baselines/reference/copyrightWithoutNewLine1.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/copyrightWithoutNewLine1.ts(4,24): error TS2307: Cannot find external module './greeter'. +tests/cases/compiler/copyrightWithoutNewLine1.ts(4,24): error TS2307: Cannot find module './greeter'. tests/cases/compiler/copyrightWithoutNewLine1.ts(5,10): error TS2304: Cannot find name 'document'. @@ -8,7 +8,7 @@ tests/cases/compiler/copyrightWithoutNewLine1.ts(5,10): error TS2304: Cannot fin ****************************/ import model = require("./greeter") ~~~~~~~~~~~ -!!! error TS2307: Cannot find external module './greeter'. +!!! error TS2307: Cannot find module './greeter'. var el = document.getElementById('content'); ~~~~~~~~ !!! error TS2304: Cannot find name 'document'. diff --git a/tests/baselines/reference/decoratorOnClassMethod11.errors.txt b/tests/baselines/reference/decoratorOnClassMethod11.errors.txt index 5e56c0b62a89e..8e284f496a289 100644 --- a/tests/baselines/reference/decoratorOnClassMethod11.errors.txt +++ b/tests/baselines/reference/decoratorOnClassMethod11.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/decorators/class/method/decoratorOnClassMethod11.ts(5,10): error TS2331: 'this' cannot be referenced in a module body. +tests/cases/conformance/decorators/class/method/decoratorOnClassMethod11.ts(5,10): error TS2331: 'this' cannot be referenced in a module or namespace body. ==== tests/cases/conformance/decorators/class/method/decoratorOnClassMethod11.ts (1 errors) ==== @@ -8,7 +8,7 @@ tests/cases/conformance/decorators/class/method/decoratorOnClassMethod11.ts(5,10 @this.decorator ~~~~ -!!! error TS2331: 'this' cannot be referenced in a module body. +!!! error TS2331: 'this' cannot be referenced in a module or namespace body. method() { } } } \ No newline at end of file diff --git a/tests/baselines/reference/duplicateExportAssignments.errors.txt b/tests/baselines/reference/duplicateExportAssignments.errors.txt index c0a93076981fe..47a97f9d8af0e 100644 --- a/tests/baselines/reference/duplicateExportAssignments.errors.txt +++ b/tests/baselines/reference/duplicateExportAssignments.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/externalModules/foo1.ts(3,1): error TS1148: Cannot compile external modules unless the '--module' flag is provided. +tests/cases/conformance/externalModules/foo1.ts(3,1): error TS1148: Cannot compile modules unless the '--module' flag is provided. tests/cases/conformance/externalModules/foo1.ts(3,1): error TS2300: Duplicate identifier 'export='. tests/cases/conformance/externalModules/foo1.ts(4,1): error TS2300: Duplicate identifier 'export='. tests/cases/conformance/externalModules/foo2.ts(3,1): error TS2300: Duplicate identifier 'export='. @@ -17,7 +17,7 @@ tests/cases/conformance/externalModules/foo5.ts(6,1): error TS2300: Duplicate id var y = 20; export = x; ~~~~~~~~~~~ -!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. ~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'export='. export = y; diff --git a/tests/baselines/reference/duplicateSymbolsExportMatching.errors.txt b/tests/baselines/reference/duplicateSymbolsExportMatching.errors.txt index 768e6111b7373..df4f8f13c31d8 100644 --- a/tests/baselines/reference/duplicateSymbolsExportMatching.errors.txt +++ b/tests/baselines/reference/duplicateSymbolsExportMatching.errors.txt @@ -9,7 +9,7 @@ tests/cases/compiler/duplicateSymbolsExportMatching.ts(43,16): error TS2395: Ind tests/cases/compiler/duplicateSymbolsExportMatching.ts(44,9): error TS2395: Individual declarations in merged declaration w must be all exported or all local. tests/cases/compiler/duplicateSymbolsExportMatching.ts(45,16): error TS2395: Individual declarations in merged declaration w must be all exported or all local. tests/cases/compiler/duplicateSymbolsExportMatching.ts(49,12): error TS2395: Individual declarations in merged declaration F must be all exported or all local. -tests/cases/compiler/duplicateSymbolsExportMatching.ts(49,12): error TS2434: A module declaration cannot be located prior to a class or function with which it is merged +tests/cases/compiler/duplicateSymbolsExportMatching.ts(49,12): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged tests/cases/compiler/duplicateSymbolsExportMatching.ts(52,21): error TS2395: Individual declarations in merged declaration F must be all exported or all local. tests/cases/compiler/duplicateSymbolsExportMatching.ts(56,11): error TS2395: Individual declarations in merged declaration C must be all exported or all local. tests/cases/compiler/duplicateSymbolsExportMatching.ts(57,12): error TS2395: Individual declarations in merged declaration C must be all exported or all local. @@ -91,7 +91,7 @@ tests/cases/compiler/duplicateSymbolsExportMatching.ts(65,18): error TS2395: Ind ~ !!! error TS2395: Individual declarations in merged declaration F must be all exported or all local. ~ -!!! error TS2434: A module declaration cannot be located prior to a class or function with which it is merged +!!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged var t; } export function F() { } // Only one error for duplicate identifier (don't consider visibility) diff --git a/tests/baselines/reference/es5ModuleInternalNamedImports.errors.txt b/tests/baselines/reference/es5ModuleInternalNamedImports.errors.txt index 65f29984d593a..f51ff27a4122e 100644 --- a/tests/baselines/reference/es5ModuleInternalNamedImports.errors.txt +++ b/tests/baselines/reference/es5ModuleInternalNamedImports.errors.txt @@ -1,11 +1,11 @@ -tests/cases/compiler/es5ModuleInternalNamedImports.ts(23,5): error TS1194: Export declarations are not permitted in an internal module. -tests/cases/compiler/es5ModuleInternalNamedImports.ts(24,5): error TS1194: Export declarations are not permitted in an internal module. -tests/cases/compiler/es5ModuleInternalNamedImports.ts(25,5): error TS1194: Export declarations are not permitted in an internal module. -tests/cases/compiler/es5ModuleInternalNamedImports.ts(26,5): error TS1194: Export declarations are not permitted in an internal module. -tests/cases/compiler/es5ModuleInternalNamedImports.ts(27,5): error TS1194: Export declarations are not permitted in an internal module. -tests/cases/compiler/es5ModuleInternalNamedImports.ts(28,5): error TS1194: Export declarations are not permitted in an internal module. -tests/cases/compiler/es5ModuleInternalNamedImports.ts(29,5): error TS1194: Export declarations are not permitted in an internal module. -tests/cases/compiler/es5ModuleInternalNamedImports.ts(30,5): error TS1194: Export declarations are not permitted in an internal module. +tests/cases/compiler/es5ModuleInternalNamedImports.ts(23,5): error TS1194: Export declarations are not permitted in a namespace. +tests/cases/compiler/es5ModuleInternalNamedImports.ts(24,5): error TS1194: Export declarations are not permitted in a namespace. +tests/cases/compiler/es5ModuleInternalNamedImports.ts(25,5): error TS1194: Export declarations are not permitted in a namespace. +tests/cases/compiler/es5ModuleInternalNamedImports.ts(26,5): error TS1194: Export declarations are not permitted in a namespace. +tests/cases/compiler/es5ModuleInternalNamedImports.ts(27,5): error TS1194: Export declarations are not permitted in a namespace. +tests/cases/compiler/es5ModuleInternalNamedImports.ts(28,5): error TS1194: Export declarations are not permitted in a namespace. +tests/cases/compiler/es5ModuleInternalNamedImports.ts(29,5): error TS1194: Export declarations are not permitted in a namespace. +tests/cases/compiler/es5ModuleInternalNamedImports.ts(30,5): error TS1194: Export declarations are not permitted in a namespace. ==== tests/cases/compiler/es5ModuleInternalNamedImports.ts (8 errors) ==== @@ -33,27 +33,27 @@ tests/cases/compiler/es5ModuleInternalNamedImports.ts(30,5): error TS1194: Expor // Reexports export {M_V as v}; ~~~~~~~~~~~~~~~~~~ -!!! error TS1194: Export declarations are not permitted in an internal module. +!!! error TS1194: Export declarations are not permitted in a namespace. export {M_I as i}; ~~~~~~~~~~~~~~~~~~ -!!! error TS1194: Export declarations are not permitted in an internal module. +!!! error TS1194: Export declarations are not permitted in a namespace. export {M_C as c}; ~~~~~~~~~~~~~~~~~~ -!!! error TS1194: Export declarations are not permitted in an internal module. +!!! error TS1194: Export declarations are not permitted in a namespace. export {M_M as m}; ~~~~~~~~~~~~~~~~~~ -!!! error TS1194: Export declarations are not permitted in an internal module. +!!! error TS1194: Export declarations are not permitted in a namespace. export {M_MU as mu}; ~~~~~~~~~~~~~~~~~~~~ -!!! error TS1194: Export declarations are not permitted in an internal module. +!!! error TS1194: Export declarations are not permitted in a namespace. export {M_F as f}; ~~~~~~~~~~~~~~~~~~ -!!! error TS1194: Export declarations are not permitted in an internal module. +!!! error TS1194: Export declarations are not permitted in a namespace. export {M_E as e}; ~~~~~~~~~~~~~~~~~~ -!!! error TS1194: Export declarations are not permitted in an internal module. +!!! error TS1194: Export declarations are not permitted in a namespace. export {M_A as a}; ~~~~~~~~~~~~~~~~~~ -!!! error TS1194: Export declarations are not permitted in an internal module. +!!! error TS1194: Export declarations are not permitted in a namespace. } \ No newline at end of file diff --git a/tests/baselines/reference/es5ModuleWithoutModuleGenTarget.errors.txt b/tests/baselines/reference/es5ModuleWithoutModuleGenTarget.errors.txt index 25e64fc72d0b7..faf27a8520659 100644 --- a/tests/baselines/reference/es5ModuleWithoutModuleGenTarget.errors.txt +++ b/tests/baselines/reference/es5ModuleWithoutModuleGenTarget.errors.txt @@ -1,10 +1,10 @@ -tests/cases/compiler/es5ModuleWithoutModuleGenTarget.ts(1,14): error TS1148: Cannot compile external modules unless the '--module' flag is provided. +tests/cases/compiler/es5ModuleWithoutModuleGenTarget.ts(1,14): error TS1148: Cannot compile modules unless the '--module' flag is provided. ==== tests/cases/compiler/es5ModuleWithoutModuleGenTarget.ts (1 errors) ==== export class A ~ -!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. { constructor () { diff --git a/tests/baselines/reference/es6-amd.errors.txt b/tests/baselines/reference/es6-amd.errors.txt index e1e44b4a49390..eab88c7255abc 100644 --- a/tests/baselines/reference/es6-amd.errors.txt +++ b/tests/baselines/reference/es6-amd.errors.txt @@ -1,7 +1,7 @@ -error TS1204: Cannot compile external modules into 'amd', 'commonjs' or 'umd' when targeting 'ES6' or higher. +error TS1204: Cannot compile modules into 'amd', 'commonjs' or 'umd' when targeting 'ES6' or higher. -!!! error TS1204: Cannot compile external modules into 'amd', 'commonjs' or 'umd' when targeting 'ES6' or higher. +!!! error TS1204: Cannot compile modules into 'amd', 'commonjs' or 'umd' when targeting 'ES6' or higher. ==== tests/cases/compiler/es6-amd.ts (0 errors) ==== class A diff --git a/tests/baselines/reference/es6-declaration-amd.errors.txt b/tests/baselines/reference/es6-declaration-amd.errors.txt index 30cf14f08619a..e675d6458fac5 100644 --- a/tests/baselines/reference/es6-declaration-amd.errors.txt +++ b/tests/baselines/reference/es6-declaration-amd.errors.txt @@ -1,7 +1,7 @@ -error TS1204: Cannot compile external modules into 'amd', 'commonjs' or 'umd' when targeting 'ES6' or higher. +error TS1204: Cannot compile modules into 'amd', 'commonjs' or 'umd' when targeting 'ES6' or higher. -!!! error TS1204: Cannot compile external modules into 'amd', 'commonjs' or 'umd' when targeting 'ES6' or higher. +!!! error TS1204: Cannot compile modules into 'amd', 'commonjs' or 'umd' when targeting 'ES6' or higher. ==== tests/cases/compiler/es6-declaration-amd.ts (0 errors) ==== class A diff --git a/tests/baselines/reference/es6-sourcemap-amd.errors.txt b/tests/baselines/reference/es6-sourcemap-amd.errors.txt index da8968e9d5ee7..d929248bd6243 100644 --- a/tests/baselines/reference/es6-sourcemap-amd.errors.txt +++ b/tests/baselines/reference/es6-sourcemap-amd.errors.txt @@ -1,7 +1,7 @@ -error TS1204: Cannot compile external modules into 'amd', 'commonjs' or 'umd' when targeting 'ES6' or higher. +error TS1204: Cannot compile modules into 'amd', 'commonjs' or 'umd' when targeting 'ES6' or higher. -!!! error TS1204: Cannot compile external modules into 'amd', 'commonjs' or 'umd' when targeting 'ES6' or higher. +!!! error TS1204: Cannot compile modules into 'amd', 'commonjs' or 'umd' when targeting 'ES6' or higher. ==== tests/cases/compiler/es6-sourcemap-amd.ts (0 errors) ==== class A diff --git a/tests/baselines/reference/es6-umd.errors.txt b/tests/baselines/reference/es6-umd.errors.txt index 874b41552c5a1..4a8965327952e 100644 --- a/tests/baselines/reference/es6-umd.errors.txt +++ b/tests/baselines/reference/es6-umd.errors.txt @@ -1,7 +1,7 @@ -error TS1204: Cannot compile external modules into 'amd', 'commonjs' or 'umd' when targeting 'ES6' or higher. +error TS1204: Cannot compile modules into 'amd', 'commonjs' or 'umd' when targeting 'ES6' or higher. -!!! error TS1204: Cannot compile external modules into 'amd', 'commonjs' or 'umd' when targeting 'ES6' or higher. +!!! error TS1204: Cannot compile modules into 'amd', 'commonjs' or 'umd' when targeting 'ES6' or higher. ==== tests/cases/compiler/es6-umd.ts (0 errors) ==== class A diff --git a/tests/baselines/reference/es6-umd2.errors.txt b/tests/baselines/reference/es6-umd2.errors.txt index 88d732df12299..8d8aa0185d33a 100644 --- a/tests/baselines/reference/es6-umd2.errors.txt +++ b/tests/baselines/reference/es6-umd2.errors.txt @@ -1,7 +1,7 @@ -error TS1204: Cannot compile external modules into 'amd', 'commonjs' or 'umd' when targeting 'ES6' or higher. +error TS1204: Cannot compile modules into 'amd', 'commonjs' or 'umd' when targeting 'ES6' or higher. -!!! error TS1204: Cannot compile external modules into 'amd', 'commonjs' or 'umd' when targeting 'ES6' or higher. +!!! error TS1204: Cannot compile modules into 'amd', 'commonjs' or 'umd' when targeting 'ES6' or higher. ==== tests/cases/compiler/es6-umd2.ts (0 errors) ==== export class A diff --git a/tests/baselines/reference/es6ExportEqualsInterop.errors.txt b/tests/baselines/reference/es6ExportEqualsInterop.errors.txt index 7cc8418714580..98e39cf73e716 100644 --- a/tests/baselines/reference/es6ExportEqualsInterop.errors.txt +++ b/tests/baselines/reference/es6ExportEqualsInterop.errors.txt @@ -1,35 +1,35 @@ tests/cases/compiler/main.ts(15,1): error TS2304: Cannot find name 'z1'. tests/cases/compiler/main.ts(21,4): error TS2339: Property 'a' does not exist on type '() => any'. tests/cases/compiler/main.ts(23,4): error TS2339: Property 'a' does not exist on type 'typeof Foo'. -tests/cases/compiler/main.ts(27,8): error TS1192: External module '"interface"' has no default export. -tests/cases/compiler/main.ts(28,8): error TS1192: External module '"variable"' has no default export. -tests/cases/compiler/main.ts(29,8): error TS1192: External module '"interface-variable"' has no default export. -tests/cases/compiler/main.ts(30,8): error TS1192: External module '"module"' has no default export. -tests/cases/compiler/main.ts(31,8): error TS1192: External module '"interface-module"' has no default export. -tests/cases/compiler/main.ts(32,8): error TS1192: External module '"variable-module"' has no default export. -tests/cases/compiler/main.ts(33,8): error TS1192: External module '"function"' has no default export. -tests/cases/compiler/main.ts(34,8): error TS1192: External module '"function-module"' has no default export. -tests/cases/compiler/main.ts(35,8): error TS1192: External module '"class"' has no default export. -tests/cases/compiler/main.ts(36,8): error TS1192: External module '"class-module"' has no default export. -tests/cases/compiler/main.ts(39,21): error TS2497: External module '"interface"' resolves to a non-module entity and cannot be imported using this construct. -tests/cases/compiler/main.ts(45,21): error TS2497: External module '"function"' resolves to a non-module entity and cannot be imported using this construct. -tests/cases/compiler/main.ts(47,21): error TS2497: External module '"class"' resolves to a non-module entity and cannot be imported using this construct. -tests/cases/compiler/main.ts(62,25): error TS2497: External module '"interface"' resolves to a non-module entity and cannot be imported using this construct. -tests/cases/compiler/main.ts(68,25): error TS2497: External module '"function"' resolves to a non-module entity and cannot be imported using this construct. -tests/cases/compiler/main.ts(70,25): error TS2497: External module '"class"' resolves to a non-module entity and cannot be imported using this construct. -tests/cases/compiler/main.ts(85,25): error TS2497: External module '"interface"' resolves to a non-module entity and cannot be imported using this construct. -tests/cases/compiler/main.ts(91,25): error TS2497: External module '"function"' resolves to a non-module entity and cannot be imported using this construct. -tests/cases/compiler/main.ts(93,25): error TS2497: External module '"class"' resolves to a non-module entity and cannot be imported using this construct. -tests/cases/compiler/main.ts(97,15): error TS2498: External module '"interface"' uses 'export =' and cannot be used with 'export *'. -tests/cases/compiler/main.ts(98,15): error TS2498: External module '"variable"' uses 'export =' and cannot be used with 'export *'. -tests/cases/compiler/main.ts(99,15): error TS2498: External module '"interface-variable"' uses 'export =' and cannot be used with 'export *'. -tests/cases/compiler/main.ts(100,15): error TS2498: External module '"module"' uses 'export =' and cannot be used with 'export *'. -tests/cases/compiler/main.ts(101,15): error TS2498: External module '"interface-module"' uses 'export =' and cannot be used with 'export *'. -tests/cases/compiler/main.ts(102,15): error TS2498: External module '"variable-module"' uses 'export =' and cannot be used with 'export *'. -tests/cases/compiler/main.ts(103,15): error TS2498: External module '"function"' uses 'export =' and cannot be used with 'export *'. -tests/cases/compiler/main.ts(104,15): error TS2498: External module '"function-module"' uses 'export =' and cannot be used with 'export *'. -tests/cases/compiler/main.ts(105,15): error TS2498: External module '"class"' uses 'export =' and cannot be used with 'export *'. -tests/cases/compiler/main.ts(106,15): error TS2498: External module '"class-module"' uses 'export =' and cannot be used with 'export *'. +tests/cases/compiler/main.ts(27,8): error TS1192: Module '"interface"' has no default export. +tests/cases/compiler/main.ts(28,8): error TS1192: Module '"variable"' has no default export. +tests/cases/compiler/main.ts(29,8): error TS1192: Module '"interface-variable"' has no default export. +tests/cases/compiler/main.ts(30,8): error TS1192: Module '"module"' has no default export. +tests/cases/compiler/main.ts(31,8): error TS1192: Module '"interface-module"' has no default export. +tests/cases/compiler/main.ts(32,8): error TS1192: Module '"variable-module"' has no default export. +tests/cases/compiler/main.ts(33,8): error TS1192: Module '"function"' has no default export. +tests/cases/compiler/main.ts(34,8): error TS1192: Module '"function-module"' has no default export. +tests/cases/compiler/main.ts(35,8): error TS1192: Module '"class"' has no default export. +tests/cases/compiler/main.ts(36,8): error TS1192: Module '"class-module"' has no default export. +tests/cases/compiler/main.ts(39,21): error TS2497: Module '"interface"' resolves to a non-module entity and cannot be imported using this construct. +tests/cases/compiler/main.ts(45,21): error TS2497: Module '"function"' resolves to a non-module entity and cannot be imported using this construct. +tests/cases/compiler/main.ts(47,21): error TS2497: Module '"class"' resolves to a non-module entity and cannot be imported using this construct. +tests/cases/compiler/main.ts(62,25): error TS2497: Module '"interface"' resolves to a non-module entity and cannot be imported using this construct. +tests/cases/compiler/main.ts(68,25): error TS2497: Module '"function"' resolves to a non-module entity and cannot be imported using this construct. +tests/cases/compiler/main.ts(70,25): error TS2497: Module '"class"' resolves to a non-module entity and cannot be imported using this construct. +tests/cases/compiler/main.ts(85,25): error TS2497: Module '"interface"' resolves to a non-module entity and cannot be imported using this construct. +tests/cases/compiler/main.ts(91,25): error TS2497: Module '"function"' resolves to a non-module entity and cannot be imported using this construct. +tests/cases/compiler/main.ts(93,25): error TS2497: Module '"class"' resolves to a non-module entity and cannot be imported using this construct. +tests/cases/compiler/main.ts(97,15): error TS2498: Module '"interface"' uses 'export =' and cannot be used with 'export *'. +tests/cases/compiler/main.ts(98,15): error TS2498: Module '"variable"' uses 'export =' and cannot be used with 'export *'. +tests/cases/compiler/main.ts(99,15): error TS2498: Module '"interface-variable"' uses 'export =' and cannot be used with 'export *'. +tests/cases/compiler/main.ts(100,15): error TS2498: Module '"module"' uses 'export =' and cannot be used with 'export *'. +tests/cases/compiler/main.ts(101,15): error TS2498: Module '"interface-module"' uses 'export =' and cannot be used with 'export *'. +tests/cases/compiler/main.ts(102,15): error TS2498: Module '"variable-module"' uses 'export =' and cannot be used with 'export *'. +tests/cases/compiler/main.ts(103,15): error TS2498: Module '"function"' uses 'export =' and cannot be used with 'export *'. +tests/cases/compiler/main.ts(104,15): error TS2498: Module '"function-module"' uses 'export =' and cannot be used with 'export *'. +tests/cases/compiler/main.ts(105,15): error TS2498: Module '"class"' uses 'export =' and cannot be used with 'export *'. +tests/cases/compiler/main.ts(106,15): error TS2498: Module '"class-module"' uses 'export =' and cannot be used with 'export *'. ==== tests/cases/compiler/main.ts (32 errors) ==== @@ -67,39 +67,39 @@ tests/cases/compiler/main.ts(106,15): error TS2498: External module '"class-modu // default import import x1 from "interface"; ~~ -!!! error TS1192: External module '"interface"' has no default export. +!!! error TS1192: Module '"interface"' has no default export. import x2 from "variable"; ~~ -!!! error TS1192: External module '"variable"' has no default export. +!!! error TS1192: Module '"variable"' has no default export. import x3 from "interface-variable"; ~~ -!!! error TS1192: External module '"interface-variable"' has no default export. +!!! error TS1192: Module '"interface-variable"' has no default export. import x4 from "module"; ~~ -!!! error TS1192: External module '"module"' has no default export. +!!! error TS1192: Module '"module"' has no default export. import x5 from "interface-module"; ~~ -!!! error TS1192: External module '"interface-module"' has no default export. +!!! error TS1192: Module '"interface-module"' has no default export. import x6 from "variable-module"; ~~ -!!! error TS1192: External module '"variable-module"' has no default export. +!!! error TS1192: Module '"variable-module"' has no default export. import x7 from "function"; ~~ -!!! error TS1192: External module '"function"' has no default export. +!!! error TS1192: Module '"function"' has no default export. import x8 from "function-module"; ~~ -!!! error TS1192: External module '"function-module"' has no default export. +!!! error TS1192: Module '"function-module"' has no default export. import x9 from "class"; ~~ -!!! error TS1192: External module '"class"' has no default export. +!!! error TS1192: Module '"class"' has no default export. import x0 from "class-module"; ~~ -!!! error TS1192: External module '"class-module"' has no default export. +!!! error TS1192: Module '"class-module"' has no default export. // namespace import import * as y1 from "interface"; ~~~~~~~~~~~ -!!! error TS2497: External module '"interface"' resolves to a non-module entity and cannot be imported using this construct. +!!! error TS2497: Module '"interface"' resolves to a non-module entity and cannot be imported using this construct. import * as y2 from "variable"; import * as y3 from "interface-variable"; import * as y4 from "module"; @@ -107,11 +107,11 @@ tests/cases/compiler/main.ts(106,15): error TS2498: External module '"class-modu import * as y6 from "variable-module"; import * as y7 from "function"; ~~~~~~~~~~ -!!! error TS2497: External module '"function"' resolves to a non-module entity and cannot be imported using this construct. +!!! error TS2497: Module '"function"' resolves to a non-module entity and cannot be imported using this construct. import * as y8 from "function-module"; import * as y9 from "class"; ~~~~~~~ -!!! error TS2497: External module '"class"' resolves to a non-module entity and cannot be imported using this construct. +!!! error TS2497: Module '"class"' resolves to a non-module entity and cannot be imported using this construct. import * as y0 from "class-module"; y1.a; @@ -128,7 +128,7 @@ tests/cases/compiler/main.ts(106,15): error TS2498: External module '"class-modu // named import import { a as a1 } from "interface"; ~~~~~~~~~~~ -!!! error TS2497: External module '"interface"' resolves to a non-module entity and cannot be imported using this construct. +!!! error TS2497: Module '"interface"' resolves to a non-module entity and cannot be imported using this construct. import { a as a2 } from "variable"; import { a as a3 } from "interface-variable"; import { a as a4 } from "module"; @@ -136,11 +136,11 @@ tests/cases/compiler/main.ts(106,15): error TS2498: External module '"class-modu import { a as a6 } from "variable-module"; import { a as a7 } from "function"; ~~~~~~~~~~ -!!! error TS2497: External module '"function"' resolves to a non-module entity and cannot be imported using this construct. +!!! error TS2497: Module '"function"' resolves to a non-module entity and cannot be imported using this construct. import { a as a8 } from "function-module"; import { a as a9 } from "class"; ~~~~~~~ -!!! error TS2497: External module '"class"' resolves to a non-module entity and cannot be imported using this construct. +!!! error TS2497: Module '"class"' resolves to a non-module entity and cannot be imported using this construct. import { a as a0 } from "class-module"; a1; @@ -157,7 +157,7 @@ tests/cases/compiler/main.ts(106,15): error TS2498: External module '"class-modu // named export export { a as a1 } from "interface"; ~~~~~~~~~~~ -!!! error TS2497: External module '"interface"' resolves to a non-module entity and cannot be imported using this construct. +!!! error TS2497: Module '"interface"' resolves to a non-module entity and cannot be imported using this construct. export { a as a2 } from "variable"; export { a as a3 } from "interface-variable"; export { a as a4 } from "module"; @@ -165,44 +165,44 @@ tests/cases/compiler/main.ts(106,15): error TS2498: External module '"class-modu export { a as a6 } from "variable-module"; export { a as a7 } from "function"; ~~~~~~~~~~ -!!! error TS2497: External module '"function"' resolves to a non-module entity and cannot be imported using this construct. +!!! error TS2497: Module '"function"' resolves to a non-module entity and cannot be imported using this construct. export { a as a8 } from "function-module"; export { a as a9 } from "class"; ~~~~~~~ -!!! error TS2497: External module '"class"' resolves to a non-module entity and cannot be imported using this construct. +!!! error TS2497: Module '"class"' resolves to a non-module entity and cannot be imported using this construct. export { a as a0 } from "class-module"; // export-star export * from "interface"; ~~~~~~~~~~~ -!!! error TS2498: External module '"interface"' uses 'export =' and cannot be used with 'export *'. +!!! error TS2498: Module '"interface"' uses 'export =' and cannot be used with 'export *'. export * from "variable"; ~~~~~~~~~~ -!!! error TS2498: External module '"variable"' uses 'export =' and cannot be used with 'export *'. +!!! error TS2498: Module '"variable"' uses 'export =' and cannot be used with 'export *'. export * from "interface-variable"; ~~~~~~~~~~~~~~~~~~~~ -!!! error TS2498: External module '"interface-variable"' uses 'export =' and cannot be used with 'export *'. +!!! error TS2498: Module '"interface-variable"' uses 'export =' and cannot be used with 'export *'. export * from "module"; ~~~~~~~~ -!!! error TS2498: External module '"module"' uses 'export =' and cannot be used with 'export *'. +!!! error TS2498: Module '"module"' uses 'export =' and cannot be used with 'export *'. export * from "interface-module"; ~~~~~~~~~~~~~~~~~~ -!!! error TS2498: External module '"interface-module"' uses 'export =' and cannot be used with 'export *'. +!!! error TS2498: Module '"interface-module"' uses 'export =' and cannot be used with 'export *'. export * from "variable-module"; ~~~~~~~~~~~~~~~~~ -!!! error TS2498: External module '"variable-module"' uses 'export =' and cannot be used with 'export *'. +!!! error TS2498: Module '"variable-module"' uses 'export =' and cannot be used with 'export *'. export * from "function"; ~~~~~~~~~~ -!!! error TS2498: External module '"function"' uses 'export =' and cannot be used with 'export *'. +!!! error TS2498: Module '"function"' uses 'export =' and cannot be used with 'export *'. export * from "function-module"; ~~~~~~~~~~~~~~~~~ -!!! error TS2498: External module '"function-module"' uses 'export =' and cannot be used with 'export *'. +!!! error TS2498: Module '"function-module"' uses 'export =' and cannot be used with 'export *'. export * from "class"; ~~~~~~~ -!!! error TS2498: External module '"class"' uses 'export =' and cannot be used with 'export *'. +!!! error TS2498: Module '"class"' uses 'export =' and cannot be used with 'export *'. export * from "class-module"; ~~~~~~~~~~~~~~ -!!! error TS2498: External module '"class-module"' uses 'export =' and cannot be used with 'export *'. +!!! error TS2498: Module '"class-module"' uses 'export =' and cannot be used with 'export *'. ==== tests/cases/compiler/modules.d.ts (0 errors) ==== diff --git a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImport.errors.txt b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImport.errors.txt index 5844f39ed3a85..edaa0b81a5cd8 100644 --- a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImport.errors.txt +++ b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImport.errors.txt @@ -1,7 +1,7 @@ -error TS1204: Cannot compile external modules into 'amd', 'commonjs' or 'umd' when targeting 'ES6' or higher. +error TS1204: Cannot compile modules into 'amd', 'commonjs' or 'umd' when targeting 'ES6' or higher. -!!! error TS1204: Cannot compile external modules into 'amd', 'commonjs' or 'umd' when targeting 'ES6' or higher. +!!! error TS1204: Cannot compile modules into 'amd', 'commonjs' or 'umd' when targeting 'ES6' or higher. ==== tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImport_0.ts (0 errors) ==== export var a = 10; diff --git a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImportDts.errors.txt b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImportDts.errors.txt index 409c50d3a3fc9..451543d78f5bb 100644 --- a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImportDts.errors.txt +++ b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImportDts.errors.txt @@ -1,9 +1,9 @@ -tests/cases/compiler/client.ts(1,8): error TS1192: External module '"tests/cases/compiler/server"' has no default export. -tests/cases/compiler/client.ts(2,8): error TS1192: External module '"tests/cases/compiler/server"' has no default export. -tests/cases/compiler/client.ts(4,8): error TS1192: External module '"tests/cases/compiler/server"' has no default export. -tests/cases/compiler/client.ts(6,8): error TS1192: External module '"tests/cases/compiler/server"' has no default export. -tests/cases/compiler/client.ts(9,8): error TS1192: External module '"tests/cases/compiler/server"' has no default export. -tests/cases/compiler/client.ts(11,8): error TS1192: External module '"tests/cases/compiler/server"' has no default export. +tests/cases/compiler/client.ts(1,8): error TS1192: Module '"tests/cases/compiler/server"' has no default export. +tests/cases/compiler/client.ts(2,8): error TS1192: Module '"tests/cases/compiler/server"' has no default export. +tests/cases/compiler/client.ts(4,8): error TS1192: Module '"tests/cases/compiler/server"' has no default export. +tests/cases/compiler/client.ts(6,8): error TS1192: Module '"tests/cases/compiler/server"' has no default export. +tests/cases/compiler/client.ts(9,8): error TS1192: Module '"tests/cases/compiler/server"' has no default export. +tests/cases/compiler/client.ts(11,8): error TS1192: Module '"tests/cases/compiler/server"' has no default export. ==== tests/cases/compiler/server.ts (0 errors) ==== @@ -18,26 +18,26 @@ tests/cases/compiler/client.ts(11,8): error TS1192: External module '"tests/case ==== tests/cases/compiler/client.ts (6 errors) ==== import defaultBinding1, { } from "server"; ~~~~~~~~~~~~~~~ -!!! error TS1192: External module '"tests/cases/compiler/server"' has no default export. +!!! error TS1192: Module '"tests/cases/compiler/server"' has no default export. import defaultBinding2, { a } from "server"; ~~~~~~~~~~~~~~~ -!!! error TS1192: External module '"tests/cases/compiler/server"' has no default export. +!!! error TS1192: Module '"tests/cases/compiler/server"' has no default export. export var x1 = new a(); import defaultBinding3, { a11 as b } from "server"; ~~~~~~~~~~~~~~~ -!!! error TS1192: External module '"tests/cases/compiler/server"' has no default export. +!!! error TS1192: Module '"tests/cases/compiler/server"' has no default export. export var x2 = new b(); import defaultBinding4, { x, a12 as y } from "server"; ~~~~~~~~~~~~~~~ -!!! error TS1192: External module '"tests/cases/compiler/server"' has no default export. +!!! error TS1192: Module '"tests/cases/compiler/server"' has no default export. export var x4 = new x(); export var x5 = new y(); import defaultBinding5, { x11 as z, } from "server"; ~~~~~~~~~~~~~~~ -!!! error TS1192: External module '"tests/cases/compiler/server"' has no default export. +!!! error TS1192: Module '"tests/cases/compiler/server"' has no default export. export var x3 = new z(); import defaultBinding6, { m, } from "server"; ~~~~~~~~~~~~~~~ -!!! error TS1192: External module '"tests/cases/compiler/server"' has no default export. +!!! error TS1192: Module '"tests/cases/compiler/server"' has no default export. export var x6 = new m(); \ No newline at end of file diff --git a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImportInEs5.errors.txt b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImportInEs5.errors.txt index 502b1940576f1..c1c28416ec7ca 100644 --- a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImportInEs5.errors.txt +++ b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImportInEs5.errors.txt @@ -1,9 +1,9 @@ -tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImportInEs5_1.ts(1,8): error TS1192: External module '"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImportInEs5_0"' has no default export. -tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImportInEs5_1.ts(2,8): error TS1192: External module '"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImportInEs5_0"' has no default export. -tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImportInEs5_1.ts(4,8): error TS1192: External module '"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImportInEs5_0"' has no default export. -tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImportInEs5_1.ts(6,8): error TS1192: External module '"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImportInEs5_0"' has no default export. -tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImportInEs5_1.ts(9,8): error TS1192: External module '"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImportInEs5_0"' has no default export. -tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImportInEs5_1.ts(11,8): error TS1192: External module '"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImportInEs5_0"' has no default export. +tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImportInEs5_1.ts(1,8): error TS1192: Module '"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImportInEs5_0"' has no default export. +tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImportInEs5_1.ts(2,8): error TS1192: Module '"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImportInEs5_0"' has no default export. +tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImportInEs5_1.ts(4,8): error TS1192: Module '"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImportInEs5_0"' has no default export. +tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImportInEs5_1.ts(6,8): error TS1192: Module '"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImportInEs5_0"' has no default export. +tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImportInEs5_1.ts(9,8): error TS1192: Module '"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImportInEs5_0"' has no default export. +tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImportInEs5_1.ts(11,8): error TS1192: Module '"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImportInEs5_0"' has no default export. ==== tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImportInEs5_0.ts (0 errors) ==== @@ -15,26 +15,26 @@ tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImportInEs5_1.ts(11 ==== tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImportInEs5_1.ts (6 errors) ==== import defaultBinding1, { } from "es6ImportDefaultBindingFollowedWithNamedImportInEs5_0"; ~~~~~~~~~~~~~~~ -!!! error TS1192: External module '"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImportInEs5_0"' has no default export. +!!! error TS1192: Module '"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImportInEs5_0"' has no default export. import defaultBinding2, { a } from "es6ImportDefaultBindingFollowedWithNamedImportInEs5_0"; ~~~~~~~~~~~~~~~ -!!! error TS1192: External module '"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImportInEs5_0"' has no default export. +!!! error TS1192: Module '"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImportInEs5_0"' has no default export. var x1: number = a; import defaultBinding3, { a as b } from "es6ImportDefaultBindingFollowedWithNamedImportInEs5_0"; ~~~~~~~~~~~~~~~ -!!! error TS1192: External module '"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImportInEs5_0"' has no default export. +!!! error TS1192: Module '"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImportInEs5_0"' has no default export. var x1: number = b; import defaultBinding4, { x, a as y } from "es6ImportDefaultBindingFollowedWithNamedImportInEs5_0"; ~~~~~~~~~~~~~~~ -!!! error TS1192: External module '"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImportInEs5_0"' has no default export. +!!! error TS1192: Module '"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImportInEs5_0"' has no default export. var x1: number = x; var x1: number = y; import defaultBinding5, { x as z, } from "es6ImportDefaultBindingFollowedWithNamedImportInEs5_0"; ~~~~~~~~~~~~~~~ -!!! error TS1192: External module '"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImportInEs5_0"' has no default export. +!!! error TS1192: Module '"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImportInEs5_0"' has no default export. var x1: number = z; import defaultBinding6, { m, } from "es6ImportDefaultBindingFollowedWithNamedImportInEs5_0"; ~~~~~~~~~~~~~~~ -!!! error TS1192: External module '"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImportInEs5_0"' has no default export. +!!! error TS1192: Module '"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImportInEs5_0"' has no default export. var x1: number = m; \ No newline at end of file diff --git a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBinding.errors.txt b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBinding.errors.txt index ce7e8b1dc5dbf..eb28020ca9ebf 100644 --- a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBinding.errors.txt +++ b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBinding.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamespaceBinding_1.ts(1,8): error TS1192: External module '"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamespaceBinding_0"' has no default export. +tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamespaceBinding_1.ts(1,8): error TS1192: Module '"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamespaceBinding_0"' has no default export. ==== tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamespaceBinding_0.ts (0 errors) ==== @@ -8,5 +8,5 @@ tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamespaceBinding_1.ts(1, ==== tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamespaceBinding_1.ts (1 errors) ==== import defaultBinding, * as nameSpaceBinding from "es6ImportDefaultBindingFollowedWithNamespaceBinding_0"; ~~~~~~~~~~~~~~ -!!! error TS1192: External module '"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamespaceBinding_0"' has no default export. +!!! error TS1192: Module '"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamespaceBinding_0"' has no default export. var x: number = nameSpaceBinding.a; \ No newline at end of file diff --git a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBindingDts.errors.txt b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBindingDts.errors.txt index 8af978d3bb67c..19fa0383d5271 100644 --- a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBindingDts.errors.txt +++ b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBindingDts.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/client.ts(1,8): error TS1192: External module '"tests/cases/compiler/server"' has no default export. +tests/cases/compiler/client.ts(1,8): error TS1192: Module '"tests/cases/compiler/server"' has no default export. ==== tests/cases/compiler/server.ts (0 errors) ==== @@ -8,5 +8,5 @@ tests/cases/compiler/client.ts(1,8): error TS1192: External module '"tests/cases ==== tests/cases/compiler/client.ts (1 errors) ==== import defaultBinding, * as nameSpaceBinding from "server"; ~~~~~~~~~~~~~~ -!!! error TS1192: External module '"tests/cases/compiler/server"' has no default export. +!!! error TS1192: Module '"tests/cases/compiler/server"' has no default export. export var x = new nameSpaceBinding.a(); \ No newline at end of file diff --git a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBindingInEs5.errors.txt b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBindingInEs5.errors.txt index 48829f8e719d6..dbbbf67118e86 100644 --- a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBindingInEs5.errors.txt +++ b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBindingInEs5.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamespaceBindingInEs5_1.ts(1,8): error TS1192: External module '"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamespaceBindingInEs5_0"' has no default export. +tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamespaceBindingInEs5_1.ts(1,8): error TS1192: Module '"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamespaceBindingInEs5_0"' has no default export. ==== tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamespaceBindingInEs5_0.ts (0 errors) ==== @@ -8,5 +8,5 @@ tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamespaceBindingInEs5_1. ==== tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamespaceBindingInEs5_1.ts (1 errors) ==== import defaultBinding, * as nameSpaceBinding from "es6ImportDefaultBindingFollowedWithNamespaceBindingInEs5_0"; ~~~~~~~~~~~~~~ -!!! error TS1192: External module '"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamespaceBindingInEs5_0"' has no default export. +!!! error TS1192: Module '"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamespaceBindingInEs5_0"' has no default export. var x: number = nameSpaceBinding.a; \ No newline at end of file diff --git a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBindingWithExport.errors.txt b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBindingWithExport.errors.txt index 4730d493d8e99..3da1cf3fda8d5 100644 --- a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBindingWithExport.errors.txt +++ b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBindingWithExport.errors.txt @@ -1,5 +1,5 @@ tests/cases/compiler/client.ts(1,1): error TS1191: An import declaration cannot have modifiers. -tests/cases/compiler/client.ts(1,15): error TS1192: External module '"tests/cases/compiler/server"' has no default export. +tests/cases/compiler/client.ts(1,15): error TS1192: Module '"tests/cases/compiler/server"' has no default export. ==== tests/cases/compiler/server.ts (0 errors) ==== @@ -11,5 +11,5 @@ tests/cases/compiler/client.ts(1,15): error TS1192: External module '"tests/case ~~~~~~ !!! error TS1191: An import declaration cannot have modifiers. ~~~~~~~~~~~~~~ -!!! error TS1192: External module '"tests/cases/compiler/server"' has no default export. +!!! error TS1192: Module '"tests/cases/compiler/server"' has no default export. export var x: number = nameSpaceBinding.a; \ No newline at end of file diff --git a/tests/baselines/reference/es6ImportDefaultBindingInEs5.errors.txt b/tests/baselines/reference/es6ImportDefaultBindingInEs5.errors.txt index 5cccfd01094d2..109b322f4bbeb 100644 --- a/tests/baselines/reference/es6ImportDefaultBindingInEs5.errors.txt +++ b/tests/baselines/reference/es6ImportDefaultBindingInEs5.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/es6ImportDefaultBindingInEs5_1.ts(1,8): error TS1192: External module '"tests/cases/compiler/es6ImportDefaultBindingInEs5_0"' has no default export. +tests/cases/compiler/es6ImportDefaultBindingInEs5_1.ts(1,8): error TS1192: Module '"tests/cases/compiler/es6ImportDefaultBindingInEs5_0"' has no default export. ==== tests/cases/compiler/es6ImportDefaultBindingInEs5_0.ts (0 errors) ==== @@ -9,4 +9,4 @@ tests/cases/compiler/es6ImportDefaultBindingInEs5_1.ts(1,8): error TS1192: Exter ==== tests/cases/compiler/es6ImportDefaultBindingInEs5_1.ts (1 errors) ==== import defaultBinding from "es6ImportDefaultBindingInEs5_0"; ~~~~~~~~~~~~~~ -!!! error TS1192: External module '"tests/cases/compiler/es6ImportDefaultBindingInEs5_0"' has no default export. \ No newline at end of file +!!! error TS1192: Module '"tests/cases/compiler/es6ImportDefaultBindingInEs5_0"' has no default export. \ No newline at end of file diff --git a/tests/baselines/reference/es6ImportDefaultBindingNoDefaultProperty.errors.txt b/tests/baselines/reference/es6ImportDefaultBindingNoDefaultProperty.errors.txt index 43eaa16f639a9..a37a71e737890 100644 --- a/tests/baselines/reference/es6ImportDefaultBindingNoDefaultProperty.errors.txt +++ b/tests/baselines/reference/es6ImportDefaultBindingNoDefaultProperty.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/es6ImportDefaultBindingNoDefaultProperty_1.ts(1,8): error TS1192: External module '"tests/cases/compiler/es6ImportDefaultBindingNoDefaultProperty_0"' has no default export. +tests/cases/compiler/es6ImportDefaultBindingNoDefaultProperty_1.ts(1,8): error TS1192: Module '"tests/cases/compiler/es6ImportDefaultBindingNoDefaultProperty_0"' has no default export. ==== tests/cases/compiler/es6ImportDefaultBindingNoDefaultProperty_0.ts (0 errors) ==== @@ -8,5 +8,5 @@ tests/cases/compiler/es6ImportDefaultBindingNoDefaultProperty_1.ts(1,8): error T ==== tests/cases/compiler/es6ImportDefaultBindingNoDefaultProperty_1.ts (1 errors) ==== import defaultBinding from "es6ImportDefaultBindingNoDefaultProperty_0"; ~~~~~~~~~~~~~~ -!!! error TS1192: External module '"tests/cases/compiler/es6ImportDefaultBindingNoDefaultProperty_0"' has no default export. +!!! error TS1192: Module '"tests/cases/compiler/es6ImportDefaultBindingNoDefaultProperty_0"' has no default export. \ No newline at end of file diff --git a/tests/baselines/reference/es6ImportNameSpaceImport.errors.txt b/tests/baselines/reference/es6ImportNameSpaceImport.errors.txt index 20b74ee394e46..cd822712cd5d7 100644 --- a/tests/baselines/reference/es6ImportNameSpaceImport.errors.txt +++ b/tests/baselines/reference/es6ImportNameSpaceImport.errors.txt @@ -1,7 +1,7 @@ -error TS1204: Cannot compile external modules into 'amd', 'commonjs' or 'umd' when targeting 'ES6' or higher. +error TS1204: Cannot compile modules into 'amd', 'commonjs' or 'umd' when targeting 'ES6' or higher. -!!! error TS1204: Cannot compile external modules into 'amd', 'commonjs' or 'umd' when targeting 'ES6' or higher. +!!! error TS1204: Cannot compile modules into 'amd', 'commonjs' or 'umd' when targeting 'ES6' or higher. ==== tests/cases/compiler/es6ImportNameSpaceImport_0.ts (0 errors) ==== export var a = 10; diff --git a/tests/baselines/reference/es6ImportNamedImport.errors.txt b/tests/baselines/reference/es6ImportNamedImport.errors.txt index b20f3808c9512..2791c382d45c2 100644 --- a/tests/baselines/reference/es6ImportNamedImport.errors.txt +++ b/tests/baselines/reference/es6ImportNamedImport.errors.txt @@ -1,7 +1,7 @@ -error TS1204: Cannot compile external modules into 'amd', 'commonjs' or 'umd' when targeting 'ES6' or higher. +error TS1204: Cannot compile modules into 'amd', 'commonjs' or 'umd' when targeting 'ES6' or higher. -!!! error TS1204: Cannot compile external modules into 'amd', 'commonjs' or 'umd' when targeting 'ES6' or higher. +!!! error TS1204: Cannot compile modules into 'amd', 'commonjs' or 'umd' when targeting 'ES6' or higher. ==== tests/cases/compiler/es6ImportNamedImport_0.ts (0 errors) ==== export var a = 10; diff --git a/tests/baselines/reference/es6ImportNamedImportIdentifiersParsing.errors.txt b/tests/baselines/reference/es6ImportNamedImportIdentifiersParsing.errors.txt index bba30908b01b0..cb0a5caff8d09 100644 --- a/tests/baselines/reference/es6ImportNamedImportIdentifiersParsing.errors.txt +++ b/tests/baselines/reference/es6ImportNamedImportIdentifiersParsing.errors.txt @@ -1,16 +1,16 @@ tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(2,10): error TS2300: Duplicate identifier 'yield'. -tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(2,23): error TS2307: Cannot find external module 'somemodule'. +tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(2,23): error TS2307: Cannot find module 'somemodule'. tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(3,10): error TS1003: Identifier expected. tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(3,10): error TS2300: Duplicate identifier 'default'. -tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(3,25): error TS2307: Cannot find external module 'somemodule'. +tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(3,25): error TS2307: Cannot find module 'somemodule'. tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(4,19): error TS1003: Identifier expected. tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(4,19): error TS2300: Duplicate identifier 'default'. -tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(4,34): error TS2307: Cannot find external module 'somemodule'. +tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(4,34): error TS2307: Cannot find module 'somemodule'. tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(5,21): error TS2300: Duplicate identifier 'yield'. -tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(5,34): error TS2307: Cannot find external module 'somemodule'. +tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(5,34): error TS2307: Cannot find module 'somemodule'. tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(6,21): error TS1003: Identifier expected. tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(6,21): error TS2300: Duplicate identifier 'default'. -tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(6,36): error TS2307: Cannot find external module 'somemodule'. +tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(6,36): error TS2307: Cannot find module 'somemodule'. ==== tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts (13 errors) ==== @@ -19,30 +19,30 @@ tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(6,36): error TS23 ~~~~~ !!! error TS2300: Duplicate identifier 'yield'. ~~~~~~~~~~~~ -!!! error TS2307: Cannot find external module 'somemodule'. +!!! error TS2307: Cannot find module 'somemodule'. import { default } from "somemodule"; // Error - as this is keyword that is not allowed as identifier ~~~~~~~ !!! error TS1003: Identifier expected. ~~~~~~~ !!! error TS2300: Duplicate identifier 'default'. ~~~~~~~~~~~~ -!!! error TS2307: Cannot find external module 'somemodule'. +!!! error TS2307: Cannot find module 'somemodule'. import { yield as default } from "somemodule"; // error to use default as binding name ~~~~~~~ !!! error TS1003: Identifier expected. ~~~~~~~ !!! error TS2300: Duplicate identifier 'default'. ~~~~~~~~~~~~ -!!! error TS2307: Cannot find external module 'somemodule'. +!!! error TS2307: Cannot find module 'somemodule'. import { default as yield } from "somemodule"; // no error ~~~~~ !!! error TS2300: Duplicate identifier 'yield'. ~~~~~~~~~~~~ -!!! error TS2307: Cannot find external module 'somemodule'. +!!! error TS2307: Cannot find module 'somemodule'. import { default as default } from "somemodule"; // default as is ok, error of default binding name ~~~~~~~ !!! error TS1003: Identifier expected. ~~~~~~~ !!! error TS2300: Duplicate identifier 'default'. ~~~~~~~~~~~~ -!!! error TS2307: Cannot find external module 'somemodule'. \ No newline at end of file +!!! error TS2307: Cannot find module 'somemodule'. \ No newline at end of file diff --git a/tests/baselines/reference/es6ImportNamedImportInExportAssignment.errors.txt b/tests/baselines/reference/es6ImportNamedImportInExportAssignment.errors.txt index ce4d496592164..6559fbe6104cc 100644 --- a/tests/baselines/reference/es6ImportNamedImportInExportAssignment.errors.txt +++ b/tests/baselines/reference/es6ImportNamedImportInExportAssignment.errors.txt @@ -1,8 +1,8 @@ -error TS1204: Cannot compile external modules into 'amd', 'commonjs' or 'umd' when targeting 'ES6' or higher. +error TS1204: Cannot compile modules into 'amd', 'commonjs' or 'umd' when targeting 'ES6' or higher. tests/cases/compiler/es6ImportNamedImportInExportAssignment_1.ts(2,1): error TS1203: Export assignment cannot be used when targeting ECMAScript 6 or higher. Consider using 'export default' instead. -!!! error TS1204: Cannot compile external modules into 'amd', 'commonjs' or 'umd' when targeting 'ES6' or higher. +!!! error TS1204: Cannot compile modules into 'amd', 'commonjs' or 'umd' when targeting 'ES6' or higher. ==== tests/cases/compiler/es6ImportNamedImportInExportAssignment_0.ts (0 errors) ==== export var a = 10; diff --git a/tests/baselines/reference/es6ImportNamedImportParsingError.errors.txt b/tests/baselines/reference/es6ImportNamedImportParsingError.errors.txt index c9586d0169369..585cc51fb9252 100644 --- a/tests/baselines/reference/es6ImportNamedImportParsingError.errors.txt +++ b/tests/baselines/reference/es6ImportNamedImportParsingError.errors.txt @@ -3,7 +3,7 @@ tests/cases/compiler/es6ImportNamedImportParsingError_1.ts(1,10): error TS1141: tests/cases/compiler/es6ImportNamedImportParsingError_1.ts(1,12): error TS1109: Expression expected. tests/cases/compiler/es6ImportNamedImportParsingError_1.ts(1,14): error TS2304: Cannot find name 'from'. tests/cases/compiler/es6ImportNamedImportParsingError_1.ts(1,19): error TS1005: ';' expected. -tests/cases/compiler/es6ImportNamedImportParsingError_1.ts(2,8): error TS1192: External module '"tests/cases/compiler/es6ImportNamedImportParsingError_0"' has no default export. +tests/cases/compiler/es6ImportNamedImportParsingError_1.ts(2,8): error TS1192: Module '"tests/cases/compiler/es6ImportNamedImportParsingError_0"' has no default export. tests/cases/compiler/es6ImportNamedImportParsingError_1.ts(2,24): error TS1005: '{' expected. tests/cases/compiler/es6ImportNamedImportParsingError_1.ts(3,1): error TS1128: Declaration or statement expected. tests/cases/compiler/es6ImportNamedImportParsingError_1.ts(3,8): error TS1128: Declaration or statement expected. @@ -34,7 +34,7 @@ tests/cases/compiler/es6ImportNamedImportParsingError_1.ts(4,20): error TS1005: !!! error TS1005: ';' expected. import defaultBinding, from "es6ImportNamedImportParsingError_0"; ~~~~~~~~~~~~~~ -!!! error TS1192: External module '"tests/cases/compiler/es6ImportNamedImportParsingError_0"' has no default export. +!!! error TS1192: Module '"tests/cases/compiler/es6ImportNamedImportParsingError_0"' has no default export. ~~~~ !!! error TS1005: '{' expected. import , { a } from "es6ImportNamedImportParsingError_0"; diff --git a/tests/baselines/reference/es6ModuleInternalNamedImports.errors.txt b/tests/baselines/reference/es6ModuleInternalNamedImports.errors.txt index 4e097ec1a3383..fb49f08e2e0de 100644 --- a/tests/baselines/reference/es6ModuleInternalNamedImports.errors.txt +++ b/tests/baselines/reference/es6ModuleInternalNamedImports.errors.txt @@ -1,11 +1,11 @@ -tests/cases/compiler/es6ModuleInternalNamedImports.ts(23,5): error TS1194: Export declarations are not permitted in an internal module. -tests/cases/compiler/es6ModuleInternalNamedImports.ts(24,5): error TS1194: Export declarations are not permitted in an internal module. -tests/cases/compiler/es6ModuleInternalNamedImports.ts(25,5): error TS1194: Export declarations are not permitted in an internal module. -tests/cases/compiler/es6ModuleInternalNamedImports.ts(26,5): error TS1194: Export declarations are not permitted in an internal module. -tests/cases/compiler/es6ModuleInternalNamedImports.ts(27,5): error TS1194: Export declarations are not permitted in an internal module. -tests/cases/compiler/es6ModuleInternalNamedImports.ts(28,5): error TS1194: Export declarations are not permitted in an internal module. -tests/cases/compiler/es6ModuleInternalNamedImports.ts(29,5): error TS1194: Export declarations are not permitted in an internal module. -tests/cases/compiler/es6ModuleInternalNamedImports.ts(30,5): error TS1194: Export declarations are not permitted in an internal module. +tests/cases/compiler/es6ModuleInternalNamedImports.ts(23,5): error TS1194: Export declarations are not permitted in a namespace. +tests/cases/compiler/es6ModuleInternalNamedImports.ts(24,5): error TS1194: Export declarations are not permitted in a namespace. +tests/cases/compiler/es6ModuleInternalNamedImports.ts(25,5): error TS1194: Export declarations are not permitted in a namespace. +tests/cases/compiler/es6ModuleInternalNamedImports.ts(26,5): error TS1194: Export declarations are not permitted in a namespace. +tests/cases/compiler/es6ModuleInternalNamedImports.ts(27,5): error TS1194: Export declarations are not permitted in a namespace. +tests/cases/compiler/es6ModuleInternalNamedImports.ts(28,5): error TS1194: Export declarations are not permitted in a namespace. +tests/cases/compiler/es6ModuleInternalNamedImports.ts(29,5): error TS1194: Export declarations are not permitted in a namespace. +tests/cases/compiler/es6ModuleInternalNamedImports.ts(30,5): error TS1194: Export declarations are not permitted in a namespace. ==== tests/cases/compiler/es6ModuleInternalNamedImports.ts (8 errors) ==== @@ -33,27 +33,27 @@ tests/cases/compiler/es6ModuleInternalNamedImports.ts(30,5): error TS1194: Expor // Reexports export {M_V as v}; ~~~~~~~~~~~~~~~~~~ -!!! error TS1194: Export declarations are not permitted in an internal module. +!!! error TS1194: Export declarations are not permitted in a namespace. export {M_I as i}; ~~~~~~~~~~~~~~~~~~ -!!! error TS1194: Export declarations are not permitted in an internal module. +!!! error TS1194: Export declarations are not permitted in a namespace. export {M_C as c}; ~~~~~~~~~~~~~~~~~~ -!!! error TS1194: Export declarations are not permitted in an internal module. +!!! error TS1194: Export declarations are not permitted in a namespace. export {M_M as m}; ~~~~~~~~~~~~~~~~~~ -!!! error TS1194: Export declarations are not permitted in an internal module. +!!! error TS1194: Export declarations are not permitted in a namespace. export {M_MU as mu}; ~~~~~~~~~~~~~~~~~~~~ -!!! error TS1194: Export declarations are not permitted in an internal module. +!!! error TS1194: Export declarations are not permitted in a namespace. export {M_F as f}; ~~~~~~~~~~~~~~~~~~ -!!! error TS1194: Export declarations are not permitted in an internal module. +!!! error TS1194: Export declarations are not permitted in a namespace. export {M_E as e}; ~~~~~~~~~~~~~~~~~~ -!!! error TS1194: Export declarations are not permitted in an internal module. +!!! error TS1194: Export declarations are not permitted in a namespace. export {M_A as a}; ~~~~~~~~~~~~~~~~~~ -!!! error TS1194: Export declarations are not permitted in an internal module. +!!! error TS1194: Export declarations are not permitted in a namespace. } \ No newline at end of file diff --git a/tests/baselines/reference/es6ModuleInternalNamedImports2.errors.txt b/tests/baselines/reference/es6ModuleInternalNamedImports2.errors.txt index 77ee76cf9c86a..af8de2d7fe222 100644 --- a/tests/baselines/reference/es6ModuleInternalNamedImports2.errors.txt +++ b/tests/baselines/reference/es6ModuleInternalNamedImports2.errors.txt @@ -1,11 +1,11 @@ -tests/cases/compiler/es6ModuleInternalNamedImports2.ts(25,5): error TS1194: Export declarations are not permitted in an internal module. -tests/cases/compiler/es6ModuleInternalNamedImports2.ts(26,5): error TS1194: Export declarations are not permitted in an internal module. -tests/cases/compiler/es6ModuleInternalNamedImports2.ts(27,5): error TS1194: Export declarations are not permitted in an internal module. -tests/cases/compiler/es6ModuleInternalNamedImports2.ts(28,5): error TS1194: Export declarations are not permitted in an internal module. -tests/cases/compiler/es6ModuleInternalNamedImports2.ts(29,5): error TS1194: Export declarations are not permitted in an internal module. -tests/cases/compiler/es6ModuleInternalNamedImports2.ts(30,5): error TS1194: Export declarations are not permitted in an internal module. -tests/cases/compiler/es6ModuleInternalNamedImports2.ts(31,5): error TS1194: Export declarations are not permitted in an internal module. -tests/cases/compiler/es6ModuleInternalNamedImports2.ts(32,5): error TS1194: Export declarations are not permitted in an internal module. +tests/cases/compiler/es6ModuleInternalNamedImports2.ts(25,5): error TS1194: Export declarations are not permitted in a namespace. +tests/cases/compiler/es6ModuleInternalNamedImports2.ts(26,5): error TS1194: Export declarations are not permitted in a namespace. +tests/cases/compiler/es6ModuleInternalNamedImports2.ts(27,5): error TS1194: Export declarations are not permitted in a namespace. +tests/cases/compiler/es6ModuleInternalNamedImports2.ts(28,5): error TS1194: Export declarations are not permitted in a namespace. +tests/cases/compiler/es6ModuleInternalNamedImports2.ts(29,5): error TS1194: Export declarations are not permitted in a namespace. +tests/cases/compiler/es6ModuleInternalNamedImports2.ts(30,5): error TS1194: Export declarations are not permitted in a namespace. +tests/cases/compiler/es6ModuleInternalNamedImports2.ts(31,5): error TS1194: Export declarations are not permitted in a namespace. +tests/cases/compiler/es6ModuleInternalNamedImports2.ts(32,5): error TS1194: Export declarations are not permitted in a namespace. ==== tests/cases/compiler/es6ModuleInternalNamedImports2.ts (8 errors) ==== @@ -35,27 +35,27 @@ tests/cases/compiler/es6ModuleInternalNamedImports2.ts(32,5): error TS1194: Expo // Reexports export {M_V as v}; ~~~~~~~~~~~~~~~~~~ -!!! error TS1194: Export declarations are not permitted in an internal module. +!!! error TS1194: Export declarations are not permitted in a namespace. export {M_I as i}; ~~~~~~~~~~~~~~~~~~ -!!! error TS1194: Export declarations are not permitted in an internal module. +!!! error TS1194: Export declarations are not permitted in a namespace. export {M_C as c}; ~~~~~~~~~~~~~~~~~~ -!!! error TS1194: Export declarations are not permitted in an internal module. +!!! error TS1194: Export declarations are not permitted in a namespace. export {M_M as m}; ~~~~~~~~~~~~~~~~~~ -!!! error TS1194: Export declarations are not permitted in an internal module. +!!! error TS1194: Export declarations are not permitted in a namespace. export {M_MU as mu}; ~~~~~~~~~~~~~~~~~~~~ -!!! error TS1194: Export declarations are not permitted in an internal module. +!!! error TS1194: Export declarations are not permitted in a namespace. export {M_F as f}; ~~~~~~~~~~~~~~~~~~ -!!! error TS1194: Export declarations are not permitted in an internal module. +!!! error TS1194: Export declarations are not permitted in a namespace. export {M_E as e}; ~~~~~~~~~~~~~~~~~~ -!!! error TS1194: Export declarations are not permitted in an internal module. +!!! error TS1194: Export declarations are not permitted in a namespace. export {M_A as a}; ~~~~~~~~~~~~~~~~~~ -!!! error TS1194: Export declarations are not permitted in an internal module. +!!! error TS1194: Export declarations are not permitted in a namespace. } \ No newline at end of file diff --git a/tests/baselines/reference/es6ModuleWithModuleGenTargetAmd.errors.txt b/tests/baselines/reference/es6ModuleWithModuleGenTargetAmd.errors.txt index e851817ee8e1e..2dd610b57bf2e 100644 --- a/tests/baselines/reference/es6ModuleWithModuleGenTargetAmd.errors.txt +++ b/tests/baselines/reference/es6ModuleWithModuleGenTargetAmd.errors.txt @@ -1,7 +1,7 @@ -error TS1204: Cannot compile external modules into 'amd', 'commonjs' or 'umd' when targeting 'ES6' or higher. +error TS1204: Cannot compile modules into 'amd', 'commonjs' or 'umd' when targeting 'ES6' or higher. -!!! error TS1204: Cannot compile external modules into 'amd', 'commonjs' or 'umd' when targeting 'ES6' or higher. +!!! error TS1204: Cannot compile modules into 'amd', 'commonjs' or 'umd' when targeting 'ES6' or higher. ==== tests/cases/compiler/es6ModuleWithModuleGenTargetAmd.ts (0 errors) ==== export class A { diff --git a/tests/baselines/reference/es6ModuleWithModuleGenTargetCommonjs.errors.txt b/tests/baselines/reference/es6ModuleWithModuleGenTargetCommonjs.errors.txt index 1de27c03c54ad..e039e29064e37 100644 --- a/tests/baselines/reference/es6ModuleWithModuleGenTargetCommonjs.errors.txt +++ b/tests/baselines/reference/es6ModuleWithModuleGenTargetCommonjs.errors.txt @@ -1,7 +1,7 @@ -error TS1204: Cannot compile external modules into 'amd', 'commonjs' or 'umd' when targeting 'ES6' or higher. +error TS1204: Cannot compile modules into 'amd', 'commonjs' or 'umd' when targeting 'ES6' or higher. -!!! error TS1204: Cannot compile external modules into 'amd', 'commonjs' or 'umd' when targeting 'ES6' or higher. +!!! error TS1204: Cannot compile modules into 'amd', 'commonjs' or 'umd' when targeting 'ES6' or higher. ==== tests/cases/compiler/es6ModuleWithModuleGenTargetCommonjs.ts (0 errors) ==== export class A { diff --git a/tests/baselines/reference/exportAssignDottedName.errors.txt b/tests/baselines/reference/exportAssignDottedName.errors.txt index a63a62fccbe4b..39a0a2577eebf 100644 --- a/tests/baselines/reference/exportAssignDottedName.errors.txt +++ b/tests/baselines/reference/exportAssignDottedName.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/externalModules/foo1.ts(1,17): error TS1148: Cannot compile external modules unless the '--module' flag is provided. +tests/cases/conformance/externalModules/foo1.ts(1,17): error TS1148: Cannot compile modules unless the '--module' flag is provided. ==== tests/cases/conformance/externalModules/foo2.ts (0 errors) ==== @@ -8,7 +8,7 @@ tests/cases/conformance/externalModules/foo1.ts(1,17): error TS1148: Cannot comp ==== tests/cases/conformance/externalModules/foo1.ts (1 errors) ==== export function x(){ ~ -!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. return true; } \ No newline at end of file diff --git a/tests/baselines/reference/exportAssignImportedIdentifier.errors.txt b/tests/baselines/reference/exportAssignImportedIdentifier.errors.txt index a3e4702f1e634..753bc56761927 100644 --- a/tests/baselines/reference/exportAssignImportedIdentifier.errors.txt +++ b/tests/baselines/reference/exportAssignImportedIdentifier.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/externalModules/foo1.ts(1,17): error TS1148: Cannot compile external modules unless the '--module' flag is provided. +tests/cases/conformance/externalModules/foo1.ts(1,17): error TS1148: Cannot compile modules unless the '--module' flag is provided. ==== tests/cases/conformance/externalModules/foo3.ts (0 errors) ==== @@ -7,7 +7,7 @@ tests/cases/conformance/externalModules/foo1.ts(1,17): error TS1148: Cannot comp ==== tests/cases/conformance/externalModules/foo1.ts (1 errors) ==== export function x(){ ~ -!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. return true; } diff --git a/tests/baselines/reference/exportAssignNonIdentifier.errors.txt b/tests/baselines/reference/exportAssignNonIdentifier.errors.txt index 2935308909b9a..09e86ec12c477 100644 --- a/tests/baselines/reference/exportAssignNonIdentifier.errors.txt +++ b/tests/baselines/reference/exportAssignNonIdentifier.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/externalModules/foo1.ts(2,1): error TS1148: Cannot compile external modules unless the '--module' flag is provided. +tests/cases/conformance/externalModules/foo1.ts(2,1): error TS1148: Cannot compile modules unless the '--module' flag is provided. tests/cases/conformance/externalModules/foo3.ts(1,16): error TS9003: 'class' expressions are not currently supported. tests/cases/conformance/externalModules/foo6.ts(1,14): error TS1109: Expression expected. @@ -7,7 +7,7 @@ tests/cases/conformance/externalModules/foo6.ts(1,14): error TS1109: Expression var x = 10; export = typeof x; // Ok ~~~~~~~~~~~~~~~~~~ -!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. ==== tests/cases/conformance/externalModules/foo2.ts (0 errors) ==== export = "sausages"; // Ok diff --git a/tests/baselines/reference/exportAssignTypes.errors.txt b/tests/baselines/reference/exportAssignTypes.errors.txt index c35e7c0b8f6bb..ba5538777c514 100644 --- a/tests/baselines/reference/exportAssignTypes.errors.txt +++ b/tests/baselines/reference/exportAssignTypes.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/externalModules/expString.ts(2,1): error TS1148: Cannot compile external modules unless the '--module' flag is provided. +tests/cases/conformance/externalModules/expString.ts(2,1): error TS1148: Cannot compile modules unless the '--module' flag is provided. ==== tests/cases/conformance/externalModules/consumer.ts (0 errors) ==== @@ -27,7 +27,7 @@ tests/cases/conformance/externalModules/expString.ts(2,1): error TS1148: Cannot var x = "test"; export = x; ~~~~~~~~~~~ -!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. ==== tests/cases/conformance/externalModules/expNumber.ts (0 errors) ==== var x = 42; diff --git a/tests/baselines/reference/exportDeclaredModule.errors.txt b/tests/baselines/reference/exportDeclaredModule.errors.txt index 265061fe2f421..47ee543e0c0bb 100644 --- a/tests/baselines/reference/exportDeclaredModule.errors.txt +++ b/tests/baselines/reference/exportDeclaredModule.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/externalModules/foo1.ts(6,1): error TS1148: Cannot compile external modules unless the '--module' flag is provided. +tests/cases/conformance/externalModules/foo1.ts(6,1): error TS1148: Cannot compile modules unless the '--module' flag is provided. ==== tests/cases/conformance/externalModules/foo2.ts (0 errors) ==== @@ -12,5 +12,5 @@ tests/cases/conformance/externalModules/foo1.ts(6,1): error TS1148: Cannot compi } export = M1; ~~~~~~~~~~~~ -!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. \ No newline at end of file diff --git a/tests/baselines/reference/exportNonVisibleType.errors.txt b/tests/baselines/reference/exportNonVisibleType.errors.txt index 0eb73b2b04e46..04c174b49944f 100644 --- a/tests/baselines/reference/exportNonVisibleType.errors.txt +++ b/tests/baselines/reference/exportNonVisibleType.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/externalModules/foo1.ts(7,1): error TS1148: Cannot compile external modules unless the '--module' flag is provided. +tests/cases/conformance/externalModules/foo1.ts(7,1): error TS1148: Cannot compile modules unless the '--module' flag is provided. ==== tests/cases/conformance/externalModules/foo1.ts (1 errors) ==== @@ -10,7 +10,7 @@ tests/cases/conformance/externalModules/foo1.ts(7,1): error TS1148: Cannot compi var x: I1 = {a: "test", b: 42}; export = x; // Should fail, I1 not exported. ~~~~~~~~~~~ -!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. ==== tests/cases/conformance/externalModules/foo2.ts (0 errors) ==== diff --git a/tests/baselines/reference/exportStar-amd.errors.txt b/tests/baselines/reference/exportStar-amd.errors.txt index 87e4c4740a094..adab05161037e 100644 --- a/tests/baselines/reference/exportStar-amd.errors.txt +++ b/tests/baselines/reference/exportStar-amd.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/es6/modules/main.ts(1,8): error TS1192: External module '"tests/cases/conformance/es6/modules/t4"' has no default export. +tests/cases/conformance/es6/modules/main.ts(1,8): error TS1192: Module '"tests/cases/conformance/es6/modules/t4"' has no default export. ==== tests/cases/conformance/es6/modules/t1.ts (0 errors) ==== @@ -24,7 +24,7 @@ tests/cases/conformance/es6/modules/main.ts(1,8): error TS1192: External module ==== tests/cases/conformance/es6/modules/main.ts (1 errors) ==== import hello, { x, y, z, foo } from "./t4"; ~~~~~ -!!! error TS1192: External module '"tests/cases/conformance/es6/modules/t4"' has no default export. +!!! error TS1192: Module '"tests/cases/conformance/es6/modules/t4"' has no default export. hello; x; y; diff --git a/tests/baselines/reference/exportStar.errors.txt b/tests/baselines/reference/exportStar.errors.txt index 87e4c4740a094..adab05161037e 100644 --- a/tests/baselines/reference/exportStar.errors.txt +++ b/tests/baselines/reference/exportStar.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/es6/modules/main.ts(1,8): error TS1192: External module '"tests/cases/conformance/es6/modules/t4"' has no default export. +tests/cases/conformance/es6/modules/main.ts(1,8): error TS1192: Module '"tests/cases/conformance/es6/modules/t4"' has no default export. ==== tests/cases/conformance/es6/modules/t1.ts (0 errors) ==== @@ -24,7 +24,7 @@ tests/cases/conformance/es6/modules/main.ts(1,8): error TS1192: External module ==== tests/cases/conformance/es6/modules/main.ts (1 errors) ==== import hello, { x, y, z, foo } from "./t4"; ~~~~~ -!!! error TS1192: External module '"tests/cases/conformance/es6/modules/t4"' has no default export. +!!! error TS1192: Module '"tests/cases/conformance/es6/modules/t4"' has no default export. hello; x; y; diff --git a/tests/baselines/reference/exportStarFromEmptyModule.errors.txt b/tests/baselines/reference/exportStarFromEmptyModule.errors.txt index 598eb8bc02931..c88ac3b3f19cb 100644 --- a/tests/baselines/reference/exportStarFromEmptyModule.errors.txt +++ b/tests/baselines/reference/exportStarFromEmptyModule.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/exportStarFromEmptyModule_module3.ts(1,15): error TS2306: File 'tests/cases/compiler/exportStarFromEmptyModule_module2.ts' is not an external module. +tests/cases/compiler/exportStarFromEmptyModule_module3.ts(1,15): error TS2306: File 'tests/cases/compiler/exportStarFromEmptyModule_module2.ts' is not a module. tests/cases/compiler/exportStarFromEmptyModule_module4.ts(4,5): error TS2339: Property 'r' does not exist on type 'typeof A'. @@ -14,7 +14,7 @@ tests/cases/compiler/exportStarFromEmptyModule_module4.ts(4,5): error TS2339: Pr ==== tests/cases/compiler/exportStarFromEmptyModule_module3.ts (1 errors) ==== export * from "exportStarFromEmptyModule_module2"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2306: File 'exportStarFromEmptyModule_module2.ts' is not an external module. +!!! error TS2306: File 'exportStarFromEmptyModule_module2.ts' is not a module. export * from "exportStarFromEmptyModule_module1"; export class A { diff --git a/tests/baselines/reference/externalModuleWithoutCompilerFlag1.errors.txt b/tests/baselines/reference/externalModuleWithoutCompilerFlag1.errors.txt index f061276aa1a5b..64874c767ee56 100644 --- a/tests/baselines/reference/externalModuleWithoutCompilerFlag1.errors.txt +++ b/tests/baselines/reference/externalModuleWithoutCompilerFlag1.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/externalModuleWithoutCompilerFlag1.ts(3,17): error TS1148: Cannot compile external modules unless the '--module' flag is provided. +tests/cases/compiler/externalModuleWithoutCompilerFlag1.ts(3,17): error TS1148: Cannot compile modules unless the '--module' flag is provided. ==== tests/cases/compiler/externalModuleWithoutCompilerFlag1.ts (1 errors) ==== @@ -6,5 +6,5 @@ tests/cases/compiler/externalModuleWithoutCompilerFlag1.ts(3,17): error TS1148: // Not on line 0 because we want to verify the error is placed in the appropriate location. export module M { ~ -!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. } \ No newline at end of file diff --git a/tests/baselines/reference/funduleSplitAcrossFiles.errors.txt b/tests/baselines/reference/funduleSplitAcrossFiles.errors.txt index 1fc68fff7091b..02aa57937babd 100644 --- a/tests/baselines/reference/funduleSplitAcrossFiles.errors.txt +++ b/tests/baselines/reference/funduleSplitAcrossFiles.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/funduleSplitAcrossFiles_module.ts(1,8): error TS2433: A module declaration cannot be in a different file from a class or function with which it is merged +tests/cases/compiler/funduleSplitAcrossFiles_module.ts(1,8): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged ==== tests/cases/compiler/funduleSplitAcrossFiles_function.ts (0 errors) ==== @@ -7,7 +7,7 @@ tests/cases/compiler/funduleSplitAcrossFiles_module.ts(1,8): error TS2433: A mod ==== tests/cases/compiler/funduleSplitAcrossFiles_module.ts (1 errors) ==== module D { ~ -!!! error TS2433: A module declaration cannot be in a different file from a class or function with which it is merged +!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged export var y = "hi"; } D.y; \ No newline at end of file diff --git a/tests/baselines/reference/genericArrayExtenstions.errors.txt b/tests/baselines/reference/genericArrayExtenstions.errors.txt index e3004eb283834..f303549791020 100644 --- a/tests/baselines/reference/genericArrayExtenstions.errors.txt +++ b/tests/baselines/reference/genericArrayExtenstions.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/genericArrayExtenstions.ts(1,22): error TS1148: Cannot compile external modules unless the '--module' flag is provided. +tests/cases/compiler/genericArrayExtenstions.ts(1,22): error TS1148: Cannot compile modules unless the '--module' flag is provided. tests/cases/compiler/genericArrayExtenstions.ts(1,22): error TS2420: Class 'ObservableArray' incorrectly implements interface 'T[]'. Property 'length' is missing in type 'ObservableArray'. @@ -6,7 +6,7 @@ tests/cases/compiler/genericArrayExtenstions.ts(1,22): error TS2420: Class 'Obse ==== tests/cases/compiler/genericArrayExtenstions.ts (2 errors) ==== export declare class ObservableArray implements Array { // MS.Entertainment.ObservableArray ~~~~~~~~~~~~~~~ -!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. ~~~~~~~~~~~~~~~ !!! error TS2420: Class 'ObservableArray' incorrectly implements interface 'T[]'. !!! error TS2420: Property 'length' is missing in type 'ObservableArray'. diff --git a/tests/baselines/reference/importAliasAnExternalModuleInsideAnInternalModule.errors.txt b/tests/baselines/reference/importAliasAnExternalModuleInsideAnInternalModule.errors.txt index abd9ee65196fa..d12854648e500 100644 --- a/tests/baselines/reference/importAliasAnExternalModuleInsideAnInternalModule.errors.txt +++ b/tests/baselines/reference/importAliasAnExternalModuleInsideAnInternalModule.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/importAliasAnExternalModuleInsideAnInternalModule_file0.ts(1,15): error TS1148: Cannot compile external modules unless the '--module' flag is provided. +tests/cases/compiler/importAliasAnExternalModuleInsideAnInternalModule_file0.ts(1,15): error TS1148: Cannot compile modules unless the '--module' flag is provided. ==== tests/cases/compiler/importAliasAnExternalModuleInsideAnInternalModule_file1.ts (0 errors) ==== @@ -12,7 +12,7 @@ tests/cases/compiler/importAliasAnExternalModuleInsideAnInternalModule_file0.ts( ==== tests/cases/compiler/importAliasAnExternalModuleInsideAnInternalModule_file0.ts (1 errors) ==== export module m { ~ -!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. export function foo() { } } \ No newline at end of file diff --git a/tests/baselines/reference/importDeclRefereingExternalModuleWithNoResolve.errors.txt b/tests/baselines/reference/importDeclRefereingExternalModuleWithNoResolve.errors.txt index 7603a6943488a..e46ff8bea132f 100644 --- a/tests/baselines/reference/importDeclRefereingExternalModuleWithNoResolve.errors.txt +++ b/tests/baselines/reference/importDeclRefereingExternalModuleWithNoResolve.errors.txt @@ -1,20 +1,20 @@ -tests/cases/compiler/importDeclRefereingExternalModuleWithNoResolve.ts(1,1): error TS1148: Cannot compile external modules unless the '--module' flag is provided. -tests/cases/compiler/importDeclRefereingExternalModuleWithNoResolve.ts(1,20): error TS2307: Cannot find external module 'externalModule'. -tests/cases/compiler/importDeclRefereingExternalModuleWithNoResolve.ts(2,16): error TS2435: Ambient external modules cannot be nested in other modules. -tests/cases/compiler/importDeclRefereingExternalModuleWithNoResolve.ts(3,26): error TS2307: Cannot find external module 'externalModule'. +tests/cases/compiler/importDeclRefereingExternalModuleWithNoResolve.ts(1,1): error TS1148: Cannot compile modules unless the '--module' flag is provided. +tests/cases/compiler/importDeclRefereingExternalModuleWithNoResolve.ts(1,20): error TS2307: Cannot find module 'externalModule'. +tests/cases/compiler/importDeclRefereingExternalModuleWithNoResolve.ts(2,16): error TS2435: Ambient modules cannot be nested in other modules. +tests/cases/compiler/importDeclRefereingExternalModuleWithNoResolve.ts(3,26): error TS2307: Cannot find module 'externalModule'. ==== tests/cases/compiler/importDeclRefereingExternalModuleWithNoResolve.ts (4 errors) ==== import b = require("externalModule"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. ~~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find external module 'externalModule'. +!!! error TS2307: Cannot find module 'externalModule'. declare module "m1" { ~~~~ -!!! error TS2435: Ambient external modules cannot be nested in other modules. +!!! error TS2435: Ambient modules cannot be nested in other modules. import im2 = require("externalModule"); ~~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find external module 'externalModule'. +!!! error TS2307: Cannot find module 'externalModule'. } \ No newline at end of file diff --git a/tests/baselines/reference/importDeclWithDeclareModifier.errors.txt b/tests/baselines/reference/importDeclWithDeclareModifier.errors.txt index 56da8354977a2..13991aea7f7ba 100644 --- a/tests/baselines/reference/importDeclWithDeclareModifier.errors.txt +++ b/tests/baselines/reference/importDeclWithDeclareModifier.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/importDeclWithDeclareModifier.ts(5,1): error TS1148: Cannot compile external modules unless the '--module' flag is provided. +tests/cases/compiler/importDeclWithDeclareModifier.ts(5,1): error TS1148: Cannot compile modules unless the '--module' flag is provided. tests/cases/compiler/importDeclWithDeclareModifier.ts(5,9): error TS1029: 'export' modifier must precede 'declare' modifier. tests/cases/compiler/importDeclWithDeclareModifier.ts(5,29): error TS2305: Module 'x' has no exported member 'c'. @@ -10,7 +10,7 @@ tests/cases/compiler/importDeclWithDeclareModifier.ts(5,29): error TS2305: Modul } declare export import a = x.c; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. ~~~~~~ !!! error TS1029: 'export' modifier must precede 'declare' modifier. ~ diff --git a/tests/baselines/reference/importDeclarationInModuleDeclaration1.errors.txt b/tests/baselines/reference/importDeclarationInModuleDeclaration1.errors.txt index e8e9de076adbe..1f31509147fdc 100644 --- a/tests/baselines/reference/importDeclarationInModuleDeclaration1.errors.txt +++ b/tests/baselines/reference/importDeclarationInModuleDeclaration1.errors.txt @@ -1,9 +1,9 @@ -tests/cases/compiler/importDeclarationInModuleDeclaration1.ts(2,25): error TS1147: Import declarations in an internal module cannot reference an external module. +tests/cases/compiler/importDeclarationInModuleDeclaration1.ts(2,25): error TS1147: Import declarations in a namespace cannot reference a module. ==== tests/cases/compiler/importDeclarationInModuleDeclaration1.ts (1 errors) ==== module m2 { import m3 = require("use_glo_M1_public"); ~~~~~~~~~~~~~~~~~~~ -!!! error TS1147: Import declarations in an internal module cannot reference an external module. +!!! error TS1147: Import declarations in a namespace cannot reference a module. } \ No newline at end of file diff --git a/tests/baselines/reference/importInsideModule.errors.txt b/tests/baselines/reference/importInsideModule.errors.txt index efe9b78125f09..fcf82bd24940f 100644 --- a/tests/baselines/reference/importInsideModule.errors.txt +++ b/tests/baselines/reference/importInsideModule.errors.txt @@ -1,14 +1,14 @@ -tests/cases/compiler/importInsideModule_file2.ts(2,26): error TS1147: Import declarations in an internal module cannot reference an external module. -tests/cases/compiler/importInsideModule_file2.ts(2,26): error TS2307: Cannot find external module 'importInsideModule_file1'. +tests/cases/compiler/importInsideModule_file2.ts(2,26): error TS1147: Import declarations in a namespace cannot reference a module. +tests/cases/compiler/importInsideModule_file2.ts(2,26): error TS2307: Cannot find module 'importInsideModule_file1'. ==== tests/cases/compiler/importInsideModule_file2.ts (2 errors) ==== export module myModule { import foo = require("importInsideModule_file1"); ~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1147: Import declarations in an internal module cannot reference an external module. +!!! error TS1147: Import declarations in a namespace cannot reference a module. ~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find external module 'importInsideModule_file1'. +!!! error TS2307: Cannot find module 'importInsideModule_file1'. var a = foo.x; } ==== tests/cases/compiler/importInsideModule_file1.ts (0 errors) ==== diff --git a/tests/baselines/reference/importNonExternalModule.errors.txt b/tests/baselines/reference/importNonExternalModule.errors.txt index bce2c86d0f0e0..fb8294c5c0343 100644 --- a/tests/baselines/reference/importNonExternalModule.errors.txt +++ b/tests/baselines/reference/importNonExternalModule.errors.txt @@ -1,10 +1,10 @@ -tests/cases/conformance/externalModules/foo_1.ts(1,22): error TS2306: File 'tests/cases/conformance/externalModules/foo_0.ts' is not an external module. +tests/cases/conformance/externalModules/foo_1.ts(1,22): error TS2306: File 'tests/cases/conformance/externalModules/foo_0.ts' is not a module. ==== tests/cases/conformance/externalModules/foo_1.ts (1 errors) ==== import foo = require("./foo_0"); ~~~~~~~~~ -!!! error TS2306: File 'foo_0.ts' is not an external module. +!!! error TS2306: File 'foo_0.ts' is not a module. // Import should fail. foo_0 not an external module if(foo.answer === 42){ diff --git a/tests/baselines/reference/invalidNestedModules.errors.txt b/tests/baselines/reference/invalidNestedModules.errors.txt index 972c177fc0e5d..1f9551a0f0b3a 100644 --- a/tests/baselines/reference/invalidNestedModules.errors.txt +++ b/tests/baselines/reference/invalidNestedModules.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/internalModules/moduleDeclarations/invalidNestedModules.ts(1,12): error TS2434: A module declaration cannot be located prior to a class or function with which it is merged +tests/cases/conformance/internalModules/moduleDeclarations/invalidNestedModules.ts(1,12): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged tests/cases/conformance/internalModules/moduleDeclarations/invalidNestedModules.ts(17,18): error TS2300: Duplicate identifier 'Point'. tests/cases/conformance/internalModules/moduleDeclarations/invalidNestedModules.ts(24,20): error TS2300: Duplicate identifier 'Point'. @@ -6,7 +6,7 @@ tests/cases/conformance/internalModules/moduleDeclarations/invalidNestedModules. ==== tests/cases/conformance/internalModules/moduleDeclarations/invalidNestedModules.ts (3 errors) ==== module A.B.C { ~ -!!! error TS2434: A module declaration cannot be located prior to a class or function with which it is merged +!!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged export class Point { x: number; y: number; diff --git a/tests/baselines/reference/lambdaPropSelf.errors.txt b/tests/baselines/reference/lambdaPropSelf.errors.txt index ffdbc006423af..e0311c364cd51 100644 --- a/tests/baselines/reference/lambdaPropSelf.errors.txt +++ b/tests/baselines/reference/lambdaPropSelf.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/lambdaPropSelf.ts(21,13): error TS2331: 'this' cannot be referenced in a module body. +tests/cases/compiler/lambdaPropSelf.ts(21,13): error TS2331: 'this' cannot be referenced in a module or namespace body. ==== tests/cases/compiler/lambdaPropSelf.ts (1 errors) ==== @@ -24,6 +24,6 @@ tests/cases/compiler/lambdaPropSelf.ts(21,13): error TS2331: 'this' cannot be re module M { var x = this; ~~~~ -!!! error TS2331: 'this' cannot be referenced in a module body. +!!! error TS2331: 'this' cannot be referenced in a module or namespace body. } \ No newline at end of file diff --git a/tests/baselines/reference/mergedModuleDeclarationCodeGen.errors.txt b/tests/baselines/reference/mergedModuleDeclarationCodeGen.errors.txt index 25000ce2f5c45..d9b7fa55d719f 100644 --- a/tests/baselines/reference/mergedModuleDeclarationCodeGen.errors.txt +++ b/tests/baselines/reference/mergedModuleDeclarationCodeGen.errors.txt @@ -1,10 +1,10 @@ -tests/cases/compiler/mergedModuleDeclarationCodeGen.ts(1,15): error TS1148: Cannot compile external modules unless the '--module' flag is provided. +tests/cases/compiler/mergedModuleDeclarationCodeGen.ts(1,15): error TS1148: Cannot compile modules unless the '--module' flag is provided. ==== tests/cases/compiler/mergedModuleDeclarationCodeGen.ts (1 errors) ==== export module X { ~ -!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. export module Y { class A { constructor(Y: any) { diff --git a/tests/baselines/reference/moduleScoping.errors.txt b/tests/baselines/reference/moduleScoping.errors.txt index 1468d3e33bfa1..21471bc93a5f0 100644 --- a/tests/baselines/reference/moduleScoping.errors.txt +++ b/tests/baselines/reference/moduleScoping.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/externalModules/file3.ts(1,1): error TS1148: Cannot compile external modules unless the '--module' flag is provided. +tests/cases/conformance/externalModules/file3.ts(1,1): error TS1148: Cannot compile modules unless the '--module' flag is provided. ==== tests/cases/conformance/externalModules/file1.ts (0 errors) ==== @@ -11,7 +11,7 @@ tests/cases/conformance/externalModules/file3.ts(1,1): error TS1148: Cannot comp ==== tests/cases/conformance/externalModules/file3.ts (1 errors) ==== export var v3 = true; ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. var v2 = [1,2,3]; // Module scope. Should not appear in global scope ==== tests/cases/conformance/externalModules/file4.ts (0 errors) ==== diff --git a/tests/baselines/reference/multipleExports.errors.txt b/tests/baselines/reference/multipleExports.errors.txt index 254717843cfb4..430b8618dafad 100644 --- a/tests/baselines/reference/multipleExports.errors.txt +++ b/tests/baselines/reference/multipleExports.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/multipleExports.ts(10,5): error TS1194: Export declarations are not permitted in an internal module. +tests/cases/compiler/multipleExports.ts(10,5): error TS1194: Export declarations are not permitted in a namespace. tests/cases/compiler/multipleExports.ts(10,13): error TS2484: Export declaration conflicts with exported declaration of 'x' @@ -14,7 +14,7 @@ tests/cases/compiler/multipleExports.ts(10,13): error TS2484: Export declaration v; export {x}; ~~~~~~~~~~~ -!!! error TS1194: Export declarations are not permitted in an internal module. +!!! error TS1194: Export declarations are not permitted in a namespace. ~ !!! error TS2484: Export declaration conflicts with exported declaration of 'x' } diff --git a/tests/baselines/reference/nameCollisions.errors.txt b/tests/baselines/reference/nameCollisions.errors.txt index baa7c6cbfd55a..5eb7ea2cf8023 100644 --- a/tests/baselines/reference/nameCollisions.errors.txt +++ b/tests/baselines/reference/nameCollisions.errors.txt @@ -2,7 +2,7 @@ tests/cases/compiler/nameCollisions.ts(2,9): error TS2300: Duplicate identifier tests/cases/compiler/nameCollisions.ts(4,12): error TS2300: Duplicate identifier 'x'. tests/cases/compiler/nameCollisions.ts(10,12): error TS2300: Duplicate identifier 'z'. tests/cases/compiler/nameCollisions.ts(13,9): error TS2300: Duplicate identifier 'z'. -tests/cases/compiler/nameCollisions.ts(15,12): error TS2434: A module declaration cannot be located prior to a class or function with which it is merged +tests/cases/compiler/nameCollisions.ts(15,12): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged tests/cases/compiler/nameCollisions.ts(24,9): error TS2300: Duplicate identifier 'f'. tests/cases/compiler/nameCollisions.ts(25,14): error TS2300: Duplicate identifier 'f'. tests/cases/compiler/nameCollisions.ts(27,14): error TS2300: Duplicate identifier 'f2'. @@ -42,7 +42,7 @@ tests/cases/compiler/nameCollisions.ts(46,11): error TS2300: Duplicate identifie module y { ~ -!!! error TS2434: A module declaration cannot be located prior to a class or function with which it is merged +!!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged var b; } diff --git a/tests/baselines/reference/nameWithFileExtension.errors.txt b/tests/baselines/reference/nameWithFileExtension.errors.txt index ed4a1165e7e9e..2aa341271cddb 100644 --- a/tests/baselines/reference/nameWithFileExtension.errors.txt +++ b/tests/baselines/reference/nameWithFileExtension.errors.txt @@ -1,10 +1,10 @@ -tests/cases/conformance/externalModules/foo_1.ts(1,22): error TS2307: Cannot find external module './foo_0.js'. +tests/cases/conformance/externalModules/foo_1.ts(1,22): error TS2307: Cannot find module './foo_0.js'. ==== tests/cases/conformance/externalModules/foo_1.ts (1 errors) ==== import foo = require('./foo_0.js'); ~~~~~~~~~~~~ -!!! error TS2307: Cannot find external module './foo_0.js'. +!!! error TS2307: Cannot find module './foo_0.js'. var x = foo.foo + 42; ==== tests/cases/conformance/externalModules/foo_0.ts (0 errors) ==== diff --git a/tests/baselines/reference/parser0_004152.errors.txt b/tests/baselines/reference/parser0_004152.errors.txt index 43a8945ffea0e..9752741833737 100644 --- a/tests/baselines/reference/parser0_004152.errors.txt +++ b/tests/baselines/reference/parser0_004152.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/parser/ecmascript5/Fuzz/parser0_004152.ts(1,14): error TS1148: Cannot compile external modules unless the '--module' flag is provided. +tests/cases/conformance/parser/ecmascript5/Fuzz/parser0_004152.ts(1,14): error TS1148: Cannot compile modules unless the '--module' flag is provided. tests/cases/conformance/parser/ecmascript5/Fuzz/parser0_004152.ts(2,28): error TS2304: Cannot find name 'DisplayPosition'. tests/cases/conformance/parser/ecmascript5/Fuzz/parser0_004152.ts(2,45): error TS1137: Expression or comma expected. tests/cases/conformance/parser/ecmascript5/Fuzz/parser0_004152.ts(2,46): error TS1005: ';' expected. @@ -38,7 +38,7 @@ tests/cases/conformance/parser/ecmascript5/Fuzz/parser0_004152.ts(3,25): error T ==== tests/cases/conformance/parser/ecmascript5/Fuzz/parser0_004152.ts (35 errors) ==== export class Game { ~~~~ -!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. private position = new DisplayPosition([), 3, 3, 3, 3, 3, 0, 3, 3, 3, 3, 3, 3, 0], NoMove, 0); ~~~~~~~~~~~~~~~ !!! error TS2304: Cannot find name 'DisplayPosition'. diff --git a/tests/baselines/reference/parser509546.errors.txt b/tests/baselines/reference/parser509546.errors.txt index ad8bf69dc129d..6b98dc2aa3067 100644 --- a/tests/baselines/reference/parser509546.errors.txt +++ b/tests/baselines/reference/parser509546.errors.txt @@ -1,10 +1,10 @@ -tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509546.ts(1,14): error TS1148: Cannot compile external modules unless the '--module' flag is provided. +tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509546.ts(1,14): error TS1148: Cannot compile modules unless the '--module' flag is provided. ==== tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509546.ts (1 errors) ==== export class Logger { ~~~~~~ -!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. public } \ No newline at end of file diff --git a/tests/baselines/reference/parser509546_1.errors.txt b/tests/baselines/reference/parser509546_1.errors.txt index 2620036c5b6f3..5987aadff24fd 100644 --- a/tests/baselines/reference/parser509546_1.errors.txt +++ b/tests/baselines/reference/parser509546_1.errors.txt @@ -1,10 +1,10 @@ -tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509546_1.ts(1,14): error TS1148: Cannot compile external modules unless the '--module' flag is provided. +tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509546_1.ts(1,14): error TS1148: Cannot compile modules unless the '--module' flag is provided. ==== tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509546_1.ts (1 errors) ==== export class Logger { ~~~~~~ -!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. public } \ No newline at end of file diff --git a/tests/baselines/reference/parser509546_2.errors.txt b/tests/baselines/reference/parser509546_2.errors.txt index f945ccaac0052..617fec943213c 100644 --- a/tests/baselines/reference/parser509546_2.errors.txt +++ b/tests/baselines/reference/parser509546_2.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509546_2.ts(3,14): error TS1148: Cannot compile external modules unless the '--module' flag is provided. +tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509546_2.ts(3,14): error TS1148: Cannot compile modules unless the '--module' flag is provided. ==== tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509546_2.ts (1 errors) ==== @@ -6,7 +6,7 @@ tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509546_2.ts(3,1 export class Logger { ~~~~~~ -!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. public } \ No newline at end of file diff --git a/tests/baselines/reference/parser618973.errors.txt b/tests/baselines/reference/parser618973.errors.txt index 83cbfb3eb67fc..95e0872666130 100644 --- a/tests/baselines/reference/parser618973.errors.txt +++ b/tests/baselines/reference/parser618973.errors.txt @@ -1,5 +1,5 @@ tests/cases/conformance/parser/ecmascript5/RegressionTests/parser618973.ts(1,8): error TS1030: 'export' modifier already seen. -tests/cases/conformance/parser/ecmascript5/RegressionTests/parser618973.ts(1,21): error TS1148: Cannot compile external modules unless the '--module' flag is provided. +tests/cases/conformance/parser/ecmascript5/RegressionTests/parser618973.ts(1,21): error TS1148: Cannot compile modules unless the '--module' flag is provided. ==== tests/cases/conformance/parser/ecmascript5/RegressionTests/parser618973.ts (2 errors) ==== @@ -7,7 +7,7 @@ tests/cases/conformance/parser/ecmascript5/RegressionTests/parser618973.ts(1,21) ~~~~~~ !!! error TS1030: 'export' modifier already seen. ~~~ -!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. public Bar() { } } \ No newline at end of file diff --git a/tests/baselines/reference/parserArgumentList1.errors.txt b/tests/baselines/reference/parserArgumentList1.errors.txt index f20b47fa964f1..36d1a0fad371f 100644 --- a/tests/baselines/reference/parserArgumentList1.errors.txt +++ b/tests/baselines/reference/parserArgumentList1.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/parser/ecmascript5/parserArgumentList1.ts(1,17): error TS1148: Cannot compile external modules unless the '--module' flag is provided. +tests/cases/conformance/parser/ecmascript5/parserArgumentList1.ts(1,17): error TS1148: Cannot compile modules unless the '--module' flag is provided. tests/cases/conformance/parser/ecmascript5/parserArgumentList1.ts(1,35): error TS2304: Cannot find name 'HTMLElement'. tests/cases/conformance/parser/ecmascript5/parserArgumentList1.ts(2,42): error TS2304: Cannot find name '_classNameRegexp'. @@ -6,7 +6,7 @@ tests/cases/conformance/parser/ecmascript5/parserArgumentList1.ts(2,42): error T ==== tests/cases/conformance/parser/ecmascript5/parserArgumentList1.ts (3 errors) ==== export function removeClass (node:HTMLElement, className:string) { ~~~~~~~~~~~ -!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. ~~~~~~~~~~~ !!! error TS2304: Cannot find name 'HTMLElement'. node.className = node.className.replace(_classNameRegexp(className), function (everything, leftDelimiter, name, rightDelimiter) { diff --git a/tests/baselines/reference/parserClass1.errors.txt b/tests/baselines/reference/parserClass1.errors.txt index 62309f4ad615f..da4fc8d870de1 100644 --- a/tests/baselines/reference/parserClass1.errors.txt +++ b/tests/baselines/reference/parserClass1.errors.txt @@ -1,11 +1,11 @@ -tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClass1.ts(1,18): error TS1148: Cannot compile external modules unless the '--module' flag is provided. +tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClass1.ts(1,18): error TS1148: Cannot compile modules unless the '--module' flag is provided. tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClass1.ts(1,40): error TS2304: Cannot find name 'ILogger'. ==== tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClass1.ts (2 errors) ==== export class NullLogger implements ILogger { ~~~~~~~~~~ -!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. ~~~~~~~ !!! error TS2304: Cannot find name 'ILogger'. public information(): boolean { return false; } diff --git a/tests/baselines/reference/parserClass2.errors.txt b/tests/baselines/reference/parserClass2.errors.txt index d5ff6ff891071..39476805e1da3 100644 --- a/tests/baselines/reference/parserClass2.errors.txt +++ b/tests/baselines/reference/parserClass2.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClass2.ts(3,18): error TS1148: Cannot compile external modules unless the '--module' flag is provided. +tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClass2.ts(3,18): error TS1148: Cannot compile modules unless the '--module' flag is provided. tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClass2.ts(3,43): error TS2304: Cannot find name 'ILogger'. tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClass2.ts(4,37): error TS2304: Cannot find name 'ILogger'. tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClass2.ts(5,18): error TS2339: Property '_information' does not exist on type 'LoggerAdapter'. @@ -9,7 +9,7 @@ tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClass2.ts(5,1 export class LoggerAdapter implements ILogger { ~~~~~~~~~~~~~ -!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. ~~~~~~~ !!! error TS2304: Cannot find name 'ILogger'. constructor (public logger: ILogger) { diff --git a/tests/baselines/reference/parserEnum1.errors.txt b/tests/baselines/reference/parserEnum1.errors.txt index e4550bbed3bb1..ca89c5fc104a6 100644 --- a/tests/baselines/reference/parserEnum1.errors.txt +++ b/tests/baselines/reference/parserEnum1.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnum1.ts(3,17): error TS1148: Cannot compile external modules unless the '--module' flag is provided. +tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnum1.ts(3,17): error TS1148: Cannot compile modules unless the '--module' flag is provided. ==== tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnum1.ts (1 errors) ==== @@ -6,7 +6,7 @@ tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnum1.ts(3,17) export enum SignatureFlags { ~~~~~~~~~~~~~~ -!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. None = 0, IsIndexer = 1, IsStringIndexer = 1 << 1, diff --git a/tests/baselines/reference/parserEnum2.errors.txt b/tests/baselines/reference/parserEnum2.errors.txt index d2e2407387d6c..f8a841fd9ba8e 100644 --- a/tests/baselines/reference/parserEnum2.errors.txt +++ b/tests/baselines/reference/parserEnum2.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnum2.ts(3,17): error TS1148: Cannot compile external modules unless the '--module' flag is provided. +tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnum2.ts(3,17): error TS1148: Cannot compile modules unless the '--module' flag is provided. ==== tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnum2.ts (1 errors) ==== @@ -6,7 +6,7 @@ tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnum2.ts(3,17) export enum SignatureFlags { ~~~~~~~~~~~~~~ -!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. None = 0, IsIndexer = 1, IsStringIndexer = 1 << 1, diff --git a/tests/baselines/reference/parserEnum3.errors.txt b/tests/baselines/reference/parserEnum3.errors.txt index 7628a5e1feca0..463f338159a43 100644 --- a/tests/baselines/reference/parserEnum3.errors.txt +++ b/tests/baselines/reference/parserEnum3.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnum3.ts(3,17): error TS1148: Cannot compile external modules unless the '--module' flag is provided. +tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnum3.ts(3,17): error TS1148: Cannot compile modules unless the '--module' flag is provided. ==== tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnum3.ts (1 errors) ==== @@ -6,5 +6,5 @@ tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnum3.ts(3,17) export enum SignatureFlags { ~~~~~~~~~~~~~~ -!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. } \ No newline at end of file diff --git a/tests/baselines/reference/parserEnum4.errors.txt b/tests/baselines/reference/parserEnum4.errors.txt index 33c1f85a29da3..9f2cd1d186205 100644 --- a/tests/baselines/reference/parserEnum4.errors.txt +++ b/tests/baselines/reference/parserEnum4.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnum4.ts(3,17): error TS1148: Cannot compile external modules unless the '--module' flag is provided. +tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnum4.ts(3,17): error TS1148: Cannot compile modules unless the '--module' flag is provided. tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnum4.ts(4,9): error TS1132: Enum member expected. @@ -7,7 +7,7 @@ tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnum4.ts(4,9): export enum SignatureFlags { ~~~~~~~~~~~~~~ -!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. , ~ !!! error TS1132: Enum member expected. diff --git a/tests/baselines/reference/parserExportAssignment1.errors.txt b/tests/baselines/reference/parserExportAssignment1.errors.txt index e6711946d2556..cd153319f1a1a 100644 --- a/tests/baselines/reference/parserExportAssignment1.errors.txt +++ b/tests/baselines/reference/parserExportAssignment1.errors.txt @@ -1,10 +1,10 @@ -tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment1.ts(1,1): error TS1148: Cannot compile external modules unless the '--module' flag is provided. +tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment1.ts(1,1): error TS1148: Cannot compile modules unless the '--module' flag is provided. tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment1.ts(1,10): error TS2304: Cannot find name 'foo'. ==== tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment1.ts (2 errors) ==== export = foo ~~~~~~~~~~~~ -!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. ~~~ !!! error TS2304: Cannot find name 'foo'. \ No newline at end of file diff --git a/tests/baselines/reference/parserExportAssignment2.errors.txt b/tests/baselines/reference/parserExportAssignment2.errors.txt index 8a376dbe6d38e..60eb0c1f43e4e 100644 --- a/tests/baselines/reference/parserExportAssignment2.errors.txt +++ b/tests/baselines/reference/parserExportAssignment2.errors.txt @@ -1,10 +1,10 @@ -tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment2.ts(1,1): error TS1148: Cannot compile external modules unless the '--module' flag is provided. +tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment2.ts(1,1): error TS1148: Cannot compile modules unless the '--module' flag is provided. tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment2.ts(1,10): error TS2304: Cannot find name 'foo'. ==== tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment2.ts (2 errors) ==== export = foo; ~~~~~~~~~~~~~ -!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. ~~~ !!! error TS2304: Cannot find name 'foo'. \ No newline at end of file diff --git a/tests/baselines/reference/parserExportAssignment3.errors.txt b/tests/baselines/reference/parserExportAssignment3.errors.txt index 9836671be1e1d..b1e94a27469bf 100644 --- a/tests/baselines/reference/parserExportAssignment3.errors.txt +++ b/tests/baselines/reference/parserExportAssignment3.errors.txt @@ -1,10 +1,10 @@ -tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment3.ts(1,1): error TS1148: Cannot compile external modules unless the '--module' flag is provided. +tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment3.ts(1,1): error TS1148: Cannot compile modules unless the '--module' flag is provided. tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment3.ts(1,9): error TS1109: Expression expected. ==== tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment3.ts (2 errors) ==== export = ~~~~~~~~ -!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. !!! error TS1109: Expression expected. \ No newline at end of file diff --git a/tests/baselines/reference/parserExportAssignment4.errors.txt b/tests/baselines/reference/parserExportAssignment4.errors.txt index b681575396283..93e311bdb23d1 100644 --- a/tests/baselines/reference/parserExportAssignment4.errors.txt +++ b/tests/baselines/reference/parserExportAssignment4.errors.txt @@ -1,10 +1,10 @@ -tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment4.ts(1,1): error TS1148: Cannot compile external modules unless the '--module' flag is provided. +tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment4.ts(1,1): error TS1148: Cannot compile modules unless the '--module' flag is provided. tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment4.ts(1,10): error TS1109: Expression expected. ==== tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment4.ts (2 errors) ==== export = ; ~~~~~~~~~~ -!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. ~ !!! error TS1109: Expression expected. \ No newline at end of file diff --git a/tests/baselines/reference/parserExportAssignment5.errors.txt b/tests/baselines/reference/parserExportAssignment5.errors.txt index 8444cdbce64f6..7b07e1d225f23 100644 --- a/tests/baselines/reference/parserExportAssignment5.errors.txt +++ b/tests/baselines/reference/parserExportAssignment5.errors.txt @@ -1,9 +1,9 @@ -tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment5.ts(2,5): error TS1063: An export assignment cannot be used in an internal module. +tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment5.ts(2,5): error TS1063: An export assignment cannot be used in a namespace. ==== tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment5.ts (1 errors) ==== module M { export = A; ~~~~~~~~~~~ -!!! error TS1063: An export assignment cannot be used in an internal module. +!!! error TS1063: An export assignment cannot be used in a namespace. } \ No newline at end of file diff --git a/tests/baselines/reference/parserExportAssignment7.errors.txt b/tests/baselines/reference/parserExportAssignment7.errors.txt index a6650c2354002..7e54f2a4bce2b 100644 --- a/tests/baselines/reference/parserExportAssignment7.errors.txt +++ b/tests/baselines/reference/parserExportAssignment7.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment7.ts(1,14): error TS1148: Cannot compile external modules unless the '--module' flag is provided. +tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment7.ts(1,14): error TS1148: Cannot compile modules unless the '--module' flag is provided. tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment7.ts(4,1): error TS2309: An export assignment cannot be used in a module with other exported elements. tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment7.ts(4,10): error TS2304: Cannot find name 'B'. @@ -6,7 +6,7 @@ tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignm ==== tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment7.ts (3 errors) ==== export class C { ~ -!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. } export = B; diff --git a/tests/baselines/reference/parserExportAssignment8.errors.txt b/tests/baselines/reference/parserExportAssignment8.errors.txt index ac8feeeec5824..71b37c99db779 100644 --- a/tests/baselines/reference/parserExportAssignment8.errors.txt +++ b/tests/baselines/reference/parserExportAssignment8.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment8.ts(1,1): error TS1148: Cannot compile external modules unless the '--module' flag is provided. +tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment8.ts(1,1): error TS1148: Cannot compile modules unless the '--module' flag is provided. tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment8.ts(1,1): error TS2309: An export assignment cannot be used in a module with other exported elements. tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment8.ts(1,10): error TS2304: Cannot find name 'B'. @@ -6,7 +6,7 @@ tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignm ==== tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment8.ts (3 errors) ==== export = B; ~~~~~~~~~~~ -!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. ~~~~~~~~~~~ !!! error TS2309: An export assignment cannot be used in a module with other exported elements. ~ diff --git a/tests/baselines/reference/parserInterfaceDeclaration6.errors.txt b/tests/baselines/reference/parserInterfaceDeclaration6.errors.txt index d697e5d85264c..ab6985c5ab171 100644 --- a/tests/baselines/reference/parserInterfaceDeclaration6.errors.txt +++ b/tests/baselines/reference/parserInterfaceDeclaration6.errors.txt @@ -1,5 +1,5 @@ tests/cases/conformance/parser/ecmascript5/InterfaceDeclarations/parserInterfaceDeclaration6.ts(1,8): error TS1030: 'export' modifier already seen. -tests/cases/conformance/parser/ecmascript5/InterfaceDeclarations/parserInterfaceDeclaration6.ts(1,25): error TS1148: Cannot compile external modules unless the '--module' flag is provided. +tests/cases/conformance/parser/ecmascript5/InterfaceDeclarations/parserInterfaceDeclaration6.ts(1,25): error TS1148: Cannot compile modules unless the '--module' flag is provided. ==== tests/cases/conformance/parser/ecmascript5/InterfaceDeclarations/parserInterfaceDeclaration6.ts (2 errors) ==== @@ -7,5 +7,5 @@ tests/cases/conformance/parser/ecmascript5/InterfaceDeclarations/parserInterface ~~~~~~ !!! error TS1030: 'export' modifier already seen. ~ -!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. } \ No newline at end of file diff --git a/tests/baselines/reference/parserInterfaceDeclaration7.errors.txt b/tests/baselines/reference/parserInterfaceDeclaration7.errors.txt index acd7e83b6068c..344a5d9deb810 100644 --- a/tests/baselines/reference/parserInterfaceDeclaration7.errors.txt +++ b/tests/baselines/reference/parserInterfaceDeclaration7.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/parser/ecmascript5/InterfaceDeclarations/parserInterfaceDeclaration7.ts(1,18): error TS1148: Cannot compile external modules unless the '--module' flag is provided. +tests/cases/conformance/parser/ecmascript5/InterfaceDeclarations/parserInterfaceDeclaration7.ts(1,18): error TS1148: Cannot compile modules unless the '--module' flag is provided. ==== tests/cases/conformance/parser/ecmascript5/InterfaceDeclarations/parserInterfaceDeclaration7.ts (1 errors) ==== export interface I { ~ -!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. } \ No newline at end of file diff --git a/tests/baselines/reference/parserModifierOnStatementInBlock1.errors.txt b/tests/baselines/reference/parserModifierOnStatementInBlock1.errors.txt index 1530281b36ba3..973920e3584c4 100644 --- a/tests/baselines/reference/parserModifierOnStatementInBlock1.errors.txt +++ b/tests/baselines/reference/parserModifierOnStatementInBlock1.errors.txt @@ -1,11 +1,11 @@ -tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserModifierOnStatementInBlock1.ts(1,17): error TS1148: Cannot compile external modules unless the '--module' flag is provided. +tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserModifierOnStatementInBlock1.ts(1,17): error TS1148: Cannot compile modules unless the '--module' flag is provided. tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserModifierOnStatementInBlock1.ts(2,4): error TS1184: Modifiers cannot appear here. ==== tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserModifierOnStatementInBlock1.ts (2 errors) ==== export function foo() { ~~~ -!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. export var x = this; ~~~~~~ !!! error TS1184: Modifiers cannot appear here. diff --git a/tests/baselines/reference/parserModifierOnStatementInBlock3.errors.txt b/tests/baselines/reference/parserModifierOnStatementInBlock3.errors.txt index cff0ba1d50de6..7a3fb004225ed 100644 --- a/tests/baselines/reference/parserModifierOnStatementInBlock3.errors.txt +++ b/tests/baselines/reference/parserModifierOnStatementInBlock3.errors.txt @@ -1,11 +1,11 @@ -tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserModifierOnStatementInBlock3.ts(1,17): error TS1148: Cannot compile external modules unless the '--module' flag is provided. +tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserModifierOnStatementInBlock3.ts(1,17): error TS1148: Cannot compile modules unless the '--module' flag is provided. tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserModifierOnStatementInBlock3.ts(2,4): error TS1184: Modifiers cannot appear here. ==== tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserModifierOnStatementInBlock3.ts (2 errors) ==== export function foo() { ~~~ -!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. export function bar() { ~~~~~~ !!! error TS1184: Modifiers cannot appear here. diff --git a/tests/baselines/reference/parserModule1.errors.txt b/tests/baselines/reference/parserModule1.errors.txt index de879f9563c62..3a145493dd964 100644 --- a/tests/baselines/reference/parserModule1.errors.txt +++ b/tests/baselines/reference/parserModule1.errors.txt @@ -1,10 +1,10 @@ -tests/cases/conformance/parser/ecmascript5/ModuleDeclarations/parserModule1.ts(1,19): error TS1148: Cannot compile external modules unless the '--module' flag is provided. +tests/cases/conformance/parser/ecmascript5/ModuleDeclarations/parserModule1.ts(1,19): error TS1148: Cannot compile modules unless the '--module' flag is provided. ==== tests/cases/conformance/parser/ecmascript5/ModuleDeclarations/parserModule1.ts (1 errors) ==== export module CompilerDiagnostics { ~~~~~~~~~~~~~~~~~~~ -!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. export var debug = false; export interface IDiagnosticWriter { Alert(output: string): void; diff --git a/tests/baselines/reference/privacyGloImportParseErrors.errors.txt b/tests/baselines/reference/privacyGloImportParseErrors.errors.txt index ac19571b8c0d8..d6d24ebcb308b 100644 --- a/tests/baselines/reference/privacyGloImportParseErrors.errors.txt +++ b/tests/baselines/reference/privacyGloImportParseErrors.errors.txt @@ -1,21 +1,21 @@ -tests/cases/compiler/privacyGloImportParseErrors.ts(22,27): error TS2435: Ambient external modules cannot be nested in other modules. -tests/cases/compiler/privacyGloImportParseErrors.ts(30,20): error TS2435: Ambient external modules cannot be nested in other modules. +tests/cases/compiler/privacyGloImportParseErrors.ts(22,27): error TS2435: Ambient modules cannot be nested in other modules. +tests/cases/compiler/privacyGloImportParseErrors.ts(30,20): error TS2435: Ambient modules cannot be nested in other modules. tests/cases/compiler/privacyGloImportParseErrors.ts(49,29): error TS4000: Import declaration 'm1_im2_private' is using private name 'm1_M2_private'. -tests/cases/compiler/privacyGloImportParseErrors.ts(59,37): error TS1147: Import declarations in an internal module cannot reference an external module. -tests/cases/compiler/privacyGloImportParseErrors.ts(59,37): error TS2307: Cannot find external module 'm1_M3_public'. -tests/cases/compiler/privacyGloImportParseErrors.ts(69,37): error TS1147: Import declarations in an internal module cannot reference an external module. -tests/cases/compiler/privacyGloImportParseErrors.ts(69,37): error TS2307: Cannot find external module 'm1_M4_private'. +tests/cases/compiler/privacyGloImportParseErrors.ts(59,37): error TS1147: Import declarations in a namespace cannot reference a module. +tests/cases/compiler/privacyGloImportParseErrors.ts(59,37): error TS2307: Cannot find module 'm1_M3_public'. +tests/cases/compiler/privacyGloImportParseErrors.ts(69,37): error TS1147: Import declarations in a namespace cannot reference a module. +tests/cases/compiler/privacyGloImportParseErrors.ts(69,37): error TS2307: Cannot find module 'm1_M4_private'. tests/cases/compiler/privacyGloImportParseErrors.ts(80,35): error TS4000: Import declaration 'm1_im2_public' is using private name 'm1_M2_private'. -tests/cases/compiler/privacyGloImportParseErrors.ts(81,43): error TS1147: Import declarations in an internal module cannot reference an external module. -tests/cases/compiler/privacyGloImportParseErrors.ts(82,43): error TS1147: Import declarations in an internal module cannot reference an external module. -tests/cases/compiler/privacyGloImportParseErrors.ts(121,38): error TS1147: Import declarations in an internal module cannot reference an external module. -tests/cases/compiler/privacyGloImportParseErrors.ts(125,45): error TS1147: Import declarations in an internal module cannot reference an external module. +tests/cases/compiler/privacyGloImportParseErrors.ts(81,43): error TS1147: Import declarations in a namespace cannot reference a module. +tests/cases/compiler/privacyGloImportParseErrors.ts(82,43): error TS1147: Import declarations in a namespace cannot reference a module. +tests/cases/compiler/privacyGloImportParseErrors.ts(121,38): error TS1147: Import declarations in a namespace cannot reference a module. +tests/cases/compiler/privacyGloImportParseErrors.ts(125,45): error TS1147: Import declarations in a namespace cannot reference a module. tests/cases/compiler/privacyGloImportParseErrors.ts(133,9): error TS1038: A 'declare' modifier cannot be used in an already ambient context. -tests/cases/compiler/privacyGloImportParseErrors.ts(133,24): error TS2435: Ambient external modules cannot be nested in other modules. -tests/cases/compiler/privacyGloImportParseErrors.ts(138,16): error TS2435: Ambient external modules cannot be nested in other modules. -tests/cases/compiler/privacyGloImportParseErrors.ts(141,12): error TS2435: Ambient external modules cannot be nested in other modules. -tests/cases/compiler/privacyGloImportParseErrors.ts(146,25): error TS1147: Import declarations in an internal module cannot reference an external module. -tests/cases/compiler/privacyGloImportParseErrors.ts(149,29): error TS1147: Import declarations in an internal module cannot reference an external module. +tests/cases/compiler/privacyGloImportParseErrors.ts(133,24): error TS2435: Ambient modules cannot be nested in other modules. +tests/cases/compiler/privacyGloImportParseErrors.ts(138,16): error TS2435: Ambient modules cannot be nested in other modules. +tests/cases/compiler/privacyGloImportParseErrors.ts(141,12): error TS2435: Ambient modules cannot be nested in other modules. +tests/cases/compiler/privacyGloImportParseErrors.ts(146,25): error TS1147: Import declarations in a namespace cannot reference a module. +tests/cases/compiler/privacyGloImportParseErrors.ts(149,29): error TS1147: Import declarations in a namespace cannot reference a module. ==== tests/cases/compiler/privacyGloImportParseErrors.ts (18 errors) ==== @@ -42,7 +42,7 @@ tests/cases/compiler/privacyGloImportParseErrors.ts(149,29): error TS1147: Impor export declare module "m1_M3_public" { ~~~~~~~~~~~~~~ -!!! error TS2435: Ambient external modules cannot be nested in other modules. +!!! error TS2435: Ambient modules cannot be nested in other modules. export function f1(); export class c1 { } @@ -52,7 +52,7 @@ tests/cases/compiler/privacyGloImportParseErrors.ts(149,29): error TS1147: Impor declare module "m1_M4_private" { ~~~~~~~~~~~~~~~ -!!! error TS2435: Ambient external modules cannot be nested in other modules. +!!! error TS2435: Ambient modules cannot be nested in other modules. export function f1(); export class c1 { } @@ -85,9 +85,9 @@ tests/cases/compiler/privacyGloImportParseErrors.ts(149,29): error TS1147: Impor import m1_im3_private = require("m1_M3_public"); ~~~~~~~~~~~~~~ -!!! error TS1147: Import declarations in an internal module cannot reference an external module. +!!! error TS1147: Import declarations in a namespace cannot reference a module. ~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find external module 'm1_M3_public'. +!!! error TS2307: Cannot find module 'm1_M3_public'. export var m1_im3_private_v1_public = m1_im3_private.c1; export var m1_im3_private_v2_public = new m1_im3_private.c1(); export var m1_im3_private_v3_public = m1_im3_private.f1; @@ -99,9 +99,9 @@ tests/cases/compiler/privacyGloImportParseErrors.ts(149,29): error TS1147: Impor import m1_im4_private = require("m1_M4_private"); ~~~~~~~~~~~~~~~ -!!! error TS1147: Import declarations in an internal module cannot reference an external module. +!!! error TS1147: Import declarations in a namespace cannot reference a module. ~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find external module 'm1_M4_private'. +!!! error TS2307: Cannot find module 'm1_M4_private'. export var m1_im4_private_v1_public = m1_im4_private.c1; export var m1_im4_private_v2_public = new m1_im4_private.c1(); export var m1_im4_private_v3_public = m1_im4_private.f1; @@ -117,10 +117,10 @@ tests/cases/compiler/privacyGloImportParseErrors.ts(149,29): error TS1147: Impor !!! error TS4000: Import declaration 'm1_im2_public' is using private name 'm1_M2_private'. export import m1_im3_public = require("m1_M3_public"); ~~~~~~~~~~~~~~ -!!! error TS1147: Import declarations in an internal module cannot reference an external module. +!!! error TS1147: Import declarations in a namespace cannot reference a module. export import m1_im4_public = require("m1_M4_private"); ~~~~~~~~~~~~~~~ -!!! error TS1147: Import declarations in an internal module cannot reference an external module. +!!! error TS1147: Import declarations in a namespace cannot reference a module. } module glo_M1_public { @@ -161,13 +161,13 @@ tests/cases/compiler/privacyGloImportParseErrors.ts(149,29): error TS1147: Impor module m2 { import errorImport = require("glo_M2_public"); ~~~~~~~~~~~~~~~ -!!! error TS1147: Import declarations in an internal module cannot reference an external module. +!!! error TS1147: Import declarations in a namespace cannot reference a module. import nonerrorImport = glo_M1_public; module m5 { import m5_errorImport = require("glo_M2_public"); ~~~~~~~~~~~~~~~ -!!! error TS1147: Import declarations in an internal module cannot reference an external module. +!!! error TS1147: Import declarations in a namespace cannot reference a module. import m5_nonerrorImport = glo_M1_public; } } @@ -179,31 +179,31 @@ tests/cases/compiler/privacyGloImportParseErrors.ts(149,29): error TS1147: Impor ~~~~~~~ !!! error TS1038: A 'declare' modifier cannot be used in an already ambient context. ~~~~~ -!!! error TS2435: Ambient external modules cannot be nested in other modules. +!!! error TS2435: Ambient modules cannot be nested in other modules. } } module m2 { module "abc2" { ~~~~~~ -!!! error TS2435: Ambient external modules cannot be nested in other modules. +!!! error TS2435: Ambient modules cannot be nested in other modules. } } module "abc3" { ~~~~~~ -!!! error TS2435: Ambient external modules cannot be nested in other modules. +!!! error TS2435: Ambient modules cannot be nested in other modules. } } module m2 { import m3 = require("use_glo_M1_public"); ~~~~~~~~~~~~~~~~~~~ -!!! error TS1147: Import declarations in an internal module cannot reference an external module. +!!! error TS1147: Import declarations in a namespace cannot reference a module. module m4 { var a = 10; import m2 = require("use_glo_M1_public"); ~~~~~~~~~~~~~~~~~~~ -!!! error TS1147: Import declarations in an internal module cannot reference an external module. +!!! error TS1147: Import declarations in a namespace cannot reference a module. } } \ No newline at end of file diff --git a/tests/baselines/reference/privacyImportParseErrors.errors.txt b/tests/baselines/reference/privacyImportParseErrors.errors.txt index a81bfbe738bc9..06277c63b230f 100644 --- a/tests/baselines/reference/privacyImportParseErrors.errors.txt +++ b/tests/baselines/reference/privacyImportParseErrors.errors.txt @@ -1,52 +1,52 @@ -tests/cases/compiler/privacyImportParseErrors.ts(22,27): error TS2435: Ambient external modules cannot be nested in other modules. -tests/cases/compiler/privacyImportParseErrors.ts(30,20): error TS2435: Ambient external modules cannot be nested in other modules. -tests/cases/compiler/privacyImportParseErrors.ts(59,37): error TS1147: Import declarations in an internal module cannot reference an external module. -tests/cases/compiler/privacyImportParseErrors.ts(59,37): error TS2307: Cannot find external module 'm1_M3_public'. -tests/cases/compiler/privacyImportParseErrors.ts(69,37): error TS1147: Import declarations in an internal module cannot reference an external module. -tests/cases/compiler/privacyImportParseErrors.ts(69,37): error TS2307: Cannot find external module 'm1_M4_private'. -tests/cases/compiler/privacyImportParseErrors.ts(81,43): error TS1147: Import declarations in an internal module cannot reference an external module. -tests/cases/compiler/privacyImportParseErrors.ts(82,43): error TS1147: Import declarations in an internal module cannot reference an external module. -tests/cases/compiler/privacyImportParseErrors.ts(106,27): error TS2435: Ambient external modules cannot be nested in other modules. -tests/cases/compiler/privacyImportParseErrors.ts(114,20): error TS2435: Ambient external modules cannot be nested in other modules. -tests/cases/compiler/privacyImportParseErrors.ts(143,37): error TS1147: Import declarations in an internal module cannot reference an external module. -tests/cases/compiler/privacyImportParseErrors.ts(143,37): error TS2307: Cannot find external module 'm2_M3_public'. -tests/cases/compiler/privacyImportParseErrors.ts(153,37): error TS1147: Import declarations in an internal module cannot reference an external module. -tests/cases/compiler/privacyImportParseErrors.ts(153,37): error TS2307: Cannot find external module 'm2_M4_private'. -tests/cases/compiler/privacyImportParseErrors.ts(166,43): error TS1147: Import declarations in an internal module cannot reference an external module. -tests/cases/compiler/privacyImportParseErrors.ts(167,43): error TS1147: Import declarations in an internal module cannot reference an external module. -tests/cases/compiler/privacyImportParseErrors.ts(180,23): error TS2435: Ambient external modules cannot be nested in other modules. -tests/cases/compiler/privacyImportParseErrors.ts(198,23): error TS2435: Ambient external modules cannot be nested in other modules. -tests/cases/compiler/privacyImportParseErrors.ts(218,34): error TS2307: Cannot find external module 'glo_M2_public'. -tests/cases/compiler/privacyImportParseErrors.ts(238,34): error TS2307: Cannot find external module 'glo_M4_private'. -tests/cases/compiler/privacyImportParseErrors.ts(251,40): error TS2307: Cannot find external module 'glo_M2_public'. -tests/cases/compiler/privacyImportParseErrors.ts(252,40): error TS2307: Cannot find external module 'glo_M4_private'. -tests/cases/compiler/privacyImportParseErrors.ts(255,23): error TS2435: Ambient external modules cannot be nested in other modules. +tests/cases/compiler/privacyImportParseErrors.ts(22,27): error TS2435: Ambient modules cannot be nested in other modules. +tests/cases/compiler/privacyImportParseErrors.ts(30,20): error TS2435: Ambient modules cannot be nested in other modules. +tests/cases/compiler/privacyImportParseErrors.ts(59,37): error TS1147: Import declarations in a namespace cannot reference a module. +tests/cases/compiler/privacyImportParseErrors.ts(59,37): error TS2307: Cannot find module 'm1_M3_public'. +tests/cases/compiler/privacyImportParseErrors.ts(69,37): error TS1147: Import declarations in a namespace cannot reference a module. +tests/cases/compiler/privacyImportParseErrors.ts(69,37): error TS2307: Cannot find module 'm1_M4_private'. +tests/cases/compiler/privacyImportParseErrors.ts(81,43): error TS1147: Import declarations in a namespace cannot reference a module. +tests/cases/compiler/privacyImportParseErrors.ts(82,43): error TS1147: Import declarations in a namespace cannot reference a module. +tests/cases/compiler/privacyImportParseErrors.ts(106,27): error TS2435: Ambient modules cannot be nested in other modules. +tests/cases/compiler/privacyImportParseErrors.ts(114,20): error TS2435: Ambient modules cannot be nested in other modules. +tests/cases/compiler/privacyImportParseErrors.ts(143,37): error TS1147: Import declarations in a namespace cannot reference a module. +tests/cases/compiler/privacyImportParseErrors.ts(143,37): error TS2307: Cannot find module 'm2_M3_public'. +tests/cases/compiler/privacyImportParseErrors.ts(153,37): error TS1147: Import declarations in a namespace cannot reference a module. +tests/cases/compiler/privacyImportParseErrors.ts(153,37): error TS2307: Cannot find module 'm2_M4_private'. +tests/cases/compiler/privacyImportParseErrors.ts(166,43): error TS1147: Import declarations in a namespace cannot reference a module. +tests/cases/compiler/privacyImportParseErrors.ts(167,43): error TS1147: Import declarations in a namespace cannot reference a module. +tests/cases/compiler/privacyImportParseErrors.ts(180,23): error TS2435: Ambient modules cannot be nested in other modules. +tests/cases/compiler/privacyImportParseErrors.ts(198,23): error TS2435: Ambient modules cannot be nested in other modules. +tests/cases/compiler/privacyImportParseErrors.ts(218,34): error TS2307: Cannot find module 'glo_M2_public'. +tests/cases/compiler/privacyImportParseErrors.ts(238,34): error TS2307: Cannot find module 'glo_M4_private'. +tests/cases/compiler/privacyImportParseErrors.ts(251,40): error TS2307: Cannot find module 'glo_M2_public'. +tests/cases/compiler/privacyImportParseErrors.ts(252,40): error TS2307: Cannot find module 'glo_M4_private'. +tests/cases/compiler/privacyImportParseErrors.ts(255,23): error TS2435: Ambient modules cannot be nested in other modules. tests/cases/compiler/privacyImportParseErrors.ts(258,45): error TS2304: Cannot find name 'use_glo_M1_public'. tests/cases/compiler/privacyImportParseErrors.ts(261,39): error TS2304: Cannot find name 'use_glo_M1_public'. -tests/cases/compiler/privacyImportParseErrors.ts(264,40): error TS2307: Cannot find external module 'glo_M2_public'. -tests/cases/compiler/privacyImportParseErrors.ts(273,38): error TS1147: Import declarations in an internal module cannot reference an external module. -tests/cases/compiler/privacyImportParseErrors.ts(277,45): error TS1147: Import declarations in an internal module cannot reference an external module. -tests/cases/compiler/privacyImportParseErrors.ts(284,16): error TS2435: Ambient external modules cannot be nested in other modules. +tests/cases/compiler/privacyImportParseErrors.ts(264,40): error TS2307: Cannot find module 'glo_M2_public'. +tests/cases/compiler/privacyImportParseErrors.ts(273,38): error TS1147: Import declarations in a namespace cannot reference a module. +tests/cases/compiler/privacyImportParseErrors.ts(277,45): error TS1147: Import declarations in a namespace cannot reference a module. +tests/cases/compiler/privacyImportParseErrors.ts(284,16): error TS2435: Ambient modules cannot be nested in other modules. tests/cases/compiler/privacyImportParseErrors.ts(287,46): error TS2304: Cannot find name 'use_glo_M3_private'. tests/cases/compiler/privacyImportParseErrors.ts(290,40): error TS2304: Cannot find name 'use_glo_M3_private'. -tests/cases/compiler/privacyImportParseErrors.ts(293,41): error TS2307: Cannot find external module 'glo_M4_private'. -tests/cases/compiler/privacyImportParseErrors.ts(302,38): error TS1147: Import declarations in an internal module cannot reference an external module. -tests/cases/compiler/privacyImportParseErrors.ts(306,45): error TS1147: Import declarations in an internal module cannot reference an external module. -tests/cases/compiler/privacyImportParseErrors.ts(312,16): error TS2435: Ambient external modules cannot be nested in other modules. +tests/cases/compiler/privacyImportParseErrors.ts(293,41): error TS2307: Cannot find module 'glo_M4_private'. +tests/cases/compiler/privacyImportParseErrors.ts(302,38): error TS1147: Import declarations in a namespace cannot reference a module. +tests/cases/compiler/privacyImportParseErrors.ts(306,45): error TS1147: Import declarations in a namespace cannot reference a module. +tests/cases/compiler/privacyImportParseErrors.ts(312,16): error TS2435: Ambient modules cannot be nested in other modules. tests/cases/compiler/privacyImportParseErrors.ts(314,9): error TS1038: A 'declare' modifier cannot be used in an already ambient context. -tests/cases/compiler/privacyImportParseErrors.ts(314,24): error TS2435: Ambient external modules cannot be nested in other modules. -tests/cases/compiler/privacyImportParseErrors.ts(319,16): error TS2435: Ambient external modules cannot be nested in other modules. -tests/cases/compiler/privacyImportParseErrors.ts(322,12): error TS2435: Ambient external modules cannot be nested in other modules. +tests/cases/compiler/privacyImportParseErrors.ts(314,24): error TS2435: Ambient modules cannot be nested in other modules. +tests/cases/compiler/privacyImportParseErrors.ts(319,16): error TS2435: Ambient modules cannot be nested in other modules. +tests/cases/compiler/privacyImportParseErrors.ts(322,12): error TS2435: Ambient modules cannot be nested in other modules. tests/cases/compiler/privacyImportParseErrors.ts(326,9): error TS1029: 'export' modifier must precede 'declare' modifier. -tests/cases/compiler/privacyImportParseErrors.ts(326,23): error TS2435: Ambient external modules cannot be nested in other modules. +tests/cases/compiler/privacyImportParseErrors.ts(326,23): error TS2435: Ambient modules cannot be nested in other modules. tests/cases/compiler/privacyImportParseErrors.ts(328,9): error TS1038: A 'declare' modifier cannot be used in an already ambient context. -tests/cases/compiler/privacyImportParseErrors.ts(328,24): error TS2435: Ambient external modules cannot be nested in other modules. -tests/cases/compiler/privacyImportParseErrors.ts(333,16): error TS2435: Ambient external modules cannot be nested in other modules. -tests/cases/compiler/privacyImportParseErrors.ts(336,12): error TS2435: Ambient external modules cannot be nested in other modules. -tests/cases/compiler/privacyImportParseErrors.ts(341,25): error TS1147: Import declarations in an internal module cannot reference an external module. -tests/cases/compiler/privacyImportParseErrors.ts(344,29): error TS1147: Import declarations in an internal module cannot reference an external module. -tests/cases/compiler/privacyImportParseErrors.ts(350,25): error TS1147: Import declarations in an internal module cannot reference an external module. -tests/cases/compiler/privacyImportParseErrors.ts(353,29): error TS1147: Import declarations in an internal module cannot reference an external module. +tests/cases/compiler/privacyImportParseErrors.ts(328,24): error TS2435: Ambient modules cannot be nested in other modules. +tests/cases/compiler/privacyImportParseErrors.ts(333,16): error TS2435: Ambient modules cannot be nested in other modules. +tests/cases/compiler/privacyImportParseErrors.ts(336,12): error TS2435: Ambient modules cannot be nested in other modules. +tests/cases/compiler/privacyImportParseErrors.ts(341,25): error TS1147: Import declarations in a namespace cannot reference a module. +tests/cases/compiler/privacyImportParseErrors.ts(344,29): error TS1147: Import declarations in a namespace cannot reference a module. +tests/cases/compiler/privacyImportParseErrors.ts(350,25): error TS1147: Import declarations in a namespace cannot reference a module. +tests/cases/compiler/privacyImportParseErrors.ts(353,29): error TS1147: Import declarations in a namespace cannot reference a module. ==== tests/cases/compiler/privacyImportParseErrors.ts (49 errors) ==== @@ -73,7 +73,7 @@ tests/cases/compiler/privacyImportParseErrors.ts(353,29): error TS1147: Import d export declare module "m1_M3_public" { ~~~~~~~~~~~~~~ -!!! error TS2435: Ambient external modules cannot be nested in other modules. +!!! error TS2435: Ambient modules cannot be nested in other modules. export function f1(); export class c1 { } @@ -83,7 +83,7 @@ tests/cases/compiler/privacyImportParseErrors.ts(353,29): error TS1147: Import d declare module "m1_M4_private" { ~~~~~~~~~~~~~~~ -!!! error TS2435: Ambient external modules cannot be nested in other modules. +!!! error TS2435: Ambient modules cannot be nested in other modules. export function f1(); export class c1 { } @@ -114,9 +114,9 @@ tests/cases/compiler/privacyImportParseErrors.ts(353,29): error TS1147: Import d import m1_im3_private = require("m1_M3_public"); ~~~~~~~~~~~~~~ -!!! error TS1147: Import declarations in an internal module cannot reference an external module. +!!! error TS1147: Import declarations in a namespace cannot reference a module. ~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find external module 'm1_M3_public'. +!!! error TS2307: Cannot find module 'm1_M3_public'. export var m1_im3_private_v1_public = m1_im3_private.c1; export var m1_im3_private_v2_public = new m1_im3_private.c1(); export var m1_im3_private_v3_public = m1_im3_private.f1; @@ -128,9 +128,9 @@ tests/cases/compiler/privacyImportParseErrors.ts(353,29): error TS1147: Import d import m1_im4_private = require("m1_M4_private"); ~~~~~~~~~~~~~~~ -!!! error TS1147: Import declarations in an internal module cannot reference an external module. +!!! error TS1147: Import declarations in a namespace cannot reference a module. ~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find external module 'm1_M4_private'. +!!! error TS2307: Cannot find module 'm1_M4_private'. export var m1_im4_private_v1_public = m1_im4_private.c1; export var m1_im4_private_v2_public = new m1_im4_private.c1(); export var m1_im4_private_v3_public = m1_im4_private.f1; @@ -144,10 +144,10 @@ tests/cases/compiler/privacyImportParseErrors.ts(353,29): error TS1147: Import d export import m1_im2_public = m1_M2_private; export import m1_im3_public = require("m1_M3_public"); ~~~~~~~~~~~~~~ -!!! error TS1147: Import declarations in an internal module cannot reference an external module. +!!! error TS1147: Import declarations in a namespace cannot reference a module. export import m1_im4_public = require("m1_M4_private"); ~~~~~~~~~~~~~~~ -!!! error TS1147: Import declarations in an internal module cannot reference an external module. +!!! error TS1147: Import declarations in a namespace cannot reference a module. } module m2 { @@ -173,7 +173,7 @@ tests/cases/compiler/privacyImportParseErrors.ts(353,29): error TS1147: Import d export declare module "m2_M3_public" { ~~~~~~~~~~~~~~ -!!! error TS2435: Ambient external modules cannot be nested in other modules. +!!! error TS2435: Ambient modules cannot be nested in other modules. export function f1(); export class c1 { } @@ -183,7 +183,7 @@ tests/cases/compiler/privacyImportParseErrors.ts(353,29): error TS1147: Import d declare module "m2_M4_private" { ~~~~~~~~~~~~~~~ -!!! error TS2435: Ambient external modules cannot be nested in other modules. +!!! error TS2435: Ambient modules cannot be nested in other modules. export function f1(); export class c1 { } @@ -214,9 +214,9 @@ tests/cases/compiler/privacyImportParseErrors.ts(353,29): error TS1147: Import d import m1_im3_private = require("m2_M3_public"); ~~~~~~~~~~~~~~ -!!! error TS1147: Import declarations in an internal module cannot reference an external module. +!!! error TS1147: Import declarations in a namespace cannot reference a module. ~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find external module 'm2_M3_public'. +!!! error TS2307: Cannot find module 'm2_M3_public'. export var m1_im3_private_v1_public = m1_im3_private.c1; export var m1_im3_private_v2_public = new m1_im3_private.c1(); export var m1_im3_private_v3_public = m1_im3_private.f1; @@ -228,9 +228,9 @@ tests/cases/compiler/privacyImportParseErrors.ts(353,29): error TS1147: Import d import m1_im4_private = require("m2_M4_private"); ~~~~~~~~~~~~~~~ -!!! error TS1147: Import declarations in an internal module cannot reference an external module. +!!! error TS1147: Import declarations in a namespace cannot reference a module. ~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find external module 'm2_M4_private'. +!!! error TS2307: Cannot find module 'm2_M4_private'. export var m1_im4_private_v1_public = m1_im4_private.c1; export var m1_im4_private_v2_public = new m1_im4_private.c1(); export var m1_im4_private_v3_public = m1_im4_private.f1; @@ -245,10 +245,10 @@ tests/cases/compiler/privacyImportParseErrors.ts(353,29): error TS1147: Import d export import m1_im2_public = m2_M2_private; export import m1_im3_public = require("m2_M3_public"); ~~~~~~~~~~~~~~ -!!! error TS1147: Import declarations in an internal module cannot reference an external module. +!!! error TS1147: Import declarations in a namespace cannot reference a module. export import m1_im4_public = require("m2_M4_private"); ~~~~~~~~~~~~~~~ -!!! error TS1147: Import declarations in an internal module cannot reference an external module. +!!! error TS1147: Import declarations in a namespace cannot reference a module. } export module glo_M1_public { @@ -263,7 +263,7 @@ tests/cases/compiler/privacyImportParseErrors.ts(353,29): error TS1147: Import d export declare module "glo_M2_public" { ~~~~~~~~~~~~~~~ -!!! error TS2435: Ambient external modules cannot be nested in other modules. +!!! error TS2435: Ambient modules cannot be nested in other modules. export function f1(); export class c1 { } @@ -283,7 +283,7 @@ tests/cases/compiler/privacyImportParseErrors.ts(353,29): error TS1147: Import d export declare module "glo_M4_private" { ~~~~~~~~~~~~~~~~ -!!! error TS2435: Ambient external modules cannot be nested in other modules. +!!! error TS2435: Ambient modules cannot be nested in other modules. export function f1(); export class c1 { } @@ -305,7 +305,7 @@ tests/cases/compiler/privacyImportParseErrors.ts(353,29): error TS1147: Import d import glo_im2_private = require("glo_M2_public"); ~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find external module 'glo_M2_public'. +!!! error TS2307: Cannot find module 'glo_M2_public'. export var glo_im2_private_v1_public = glo_im2_private.c1; export var glo_im2_private_v2_public = new glo_im2_private.c1(); export var glo_im2_private_v3_public = glo_im2_private.f1; @@ -327,7 +327,7 @@ tests/cases/compiler/privacyImportParseErrors.ts(353,29): error TS1147: Import d import glo_im4_private = require("glo_M4_private"); ~~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find external module 'glo_M4_private'. +!!! error TS2307: Cannot find module 'glo_M4_private'. export var glo_im4_private_v1_public = glo_im4_private.c1; export var glo_im4_private_v2_public = new glo_im4_private.c1(); export var glo_im4_private_v3_public = glo_im4_private.f1; @@ -342,15 +342,15 @@ tests/cases/compiler/privacyImportParseErrors.ts(353,29): error TS1147: Import d export import glo_im2_public = glo_M3_private; export import glo_im3_public = require("glo_M2_public"); ~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find external module 'glo_M2_public'. +!!! error TS2307: Cannot find module 'glo_M2_public'. export import glo_im4_public = require("glo_M4_private"); ~~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find external module 'glo_M4_private'. +!!! error TS2307: Cannot find module 'glo_M4_private'. export declare module "use_glo_M1_public" { ~~~~~~~~~~~~~~~~~~~ -!!! error TS2435: Ambient external modules cannot be nested in other modules. +!!! error TS2435: Ambient modules cannot be nested in other modules. import use_glo_M1_public = glo_M1_public; export var use_glo_M1_public_v1_public: { new (): use_glo_M1_public.c1; }; export var use_glo_M1_public_v2_public: use_glo_M1_public; @@ -365,7 +365,7 @@ tests/cases/compiler/privacyImportParseErrors.ts(353,29): error TS1147: Import d import use_glo_M2_public = require("glo_M2_public"); ~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find external module 'glo_M2_public'. +!!! error TS2307: Cannot find module 'glo_M2_public'. export var use_glo_M2_public_v1_public: { new (): use_glo_M2_public.c1; }; export var use_glo_M2_public_v2_public: use_glo_M2_public; export var use_glo_M2_public_v3_public: () => use_glo_M2_public.c1; @@ -376,13 +376,13 @@ tests/cases/compiler/privacyImportParseErrors.ts(353,29): error TS1147: Import d module m2 { import errorImport = require("glo_M2_public"); ~~~~~~~~~~~~~~~ -!!! error TS1147: Import declarations in an internal module cannot reference an external module. +!!! error TS1147: Import declarations in a namespace cannot reference a module. import nonerrorImport = glo_M1_public; module m5 { import m5_errorImport = require("glo_M2_public"); ~~~~~~~~~~~~~~~ -!!! error TS1147: Import declarations in an internal module cannot reference an external module. +!!! error TS1147: Import declarations in a namespace cannot reference a module. import m5_nonerrorImport = glo_M1_public; } } @@ -391,7 +391,7 @@ tests/cases/compiler/privacyImportParseErrors.ts(353,29): error TS1147: Import d declare module "use_glo_M3_private" { ~~~~~~~~~~~~~~~~~~~~ -!!! error TS2435: Ambient external modules cannot be nested in other modules. +!!! error TS2435: Ambient modules cannot be nested in other modules. import use_glo_M3_private = glo_M3_private; export var use_glo_M3_private_v1_public: { new (): use_glo_M3_private.c1; }; export var use_glo_M3_private_v2_public: use_glo_M3_private; @@ -406,7 +406,7 @@ tests/cases/compiler/privacyImportParseErrors.ts(353,29): error TS1147: Import d import use_glo_M4_private = require("glo_M4_private"); ~~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find external module 'glo_M4_private'. +!!! error TS2307: Cannot find module 'glo_M4_private'. export var use_glo_M4_private_v1_public: { new (): use_glo_M4_private.c1; }; export var use_glo_M4_private_v2_public: use_glo_M4_private; export var use_glo_M4_private_v3_public: () => use_glo_M4_private.c1; @@ -417,13 +417,13 @@ tests/cases/compiler/privacyImportParseErrors.ts(353,29): error TS1147: Import d module m2 { import errorImport = require("glo_M4_private"); ~~~~~~~~~~~~~~~~ -!!! error TS1147: Import declarations in an internal module cannot reference an external module. +!!! error TS1147: Import declarations in a namespace cannot reference a module. import nonerrorImport = glo_M3_private; module m5 { import m5_errorImport = require("glo_M4_private"); ~~~~~~~~~~~~~~~~ -!!! error TS1147: Import declarations in an internal module cannot reference an external module. +!!! error TS1147: Import declarations in a namespace cannot reference a module. import m5_nonerrorImport = glo_M3_private; } } @@ -431,25 +431,25 @@ tests/cases/compiler/privacyImportParseErrors.ts(353,29): error TS1147: Import d declare module "anotherParseError" { ~~~~~~~~~~~~~~~~~~~ -!!! error TS2435: Ambient external modules cannot be nested in other modules. +!!! error TS2435: Ambient modules cannot be nested in other modules. module m2 { declare module "abc" { ~~~~~~~ !!! error TS1038: A 'declare' modifier cannot be used in an already ambient context. ~~~~~ -!!! error TS2435: Ambient external modules cannot be nested in other modules. +!!! error TS2435: Ambient modules cannot be nested in other modules. } } module m2 { module "abc2" { ~~~~~~ -!!! error TS2435: Ambient external modules cannot be nested in other modules. +!!! error TS2435: Ambient modules cannot be nested in other modules. } } module "abc3" { ~~~~~~ -!!! error TS2435: Ambient external modules cannot be nested in other modules. +!!! error TS2435: Ambient modules cannot be nested in other modules. } } @@ -457,37 +457,37 @@ tests/cases/compiler/privacyImportParseErrors.ts(353,29): error TS1147: Import d ~~~~~~ !!! error TS1029: 'export' modifier must precede 'declare' modifier. ~~~~~~~~~~~~~~~~~~~~ -!!! error TS2435: Ambient external modules cannot be nested in other modules. +!!! error TS2435: Ambient modules cannot be nested in other modules. module m2 { declare module "abc" { ~~~~~~~ !!! error TS1038: A 'declare' modifier cannot be used in an already ambient context. ~~~~~ -!!! error TS2435: Ambient external modules cannot be nested in other modules. +!!! error TS2435: Ambient modules cannot be nested in other modules. } } module m2 { module "abc2" { ~~~~~~ -!!! error TS2435: Ambient external modules cannot be nested in other modules. +!!! error TS2435: Ambient modules cannot be nested in other modules. } } module "abc3" { ~~~~~~ -!!! error TS2435: Ambient external modules cannot be nested in other modules. +!!! error TS2435: Ambient modules cannot be nested in other modules. } } module m2 { import m3 = require("use_glo_M1_public"); ~~~~~~~~~~~~~~~~~~~ -!!! error TS1147: Import declarations in an internal module cannot reference an external module. +!!! error TS1147: Import declarations in a namespace cannot reference a module. module m4 { var a = 10; import m2 = require("use_glo_M1_public"); ~~~~~~~~~~~~~~~~~~~ -!!! error TS1147: Import declarations in an internal module cannot reference an external module. +!!! error TS1147: Import declarations in a namespace cannot reference a module. } } @@ -495,12 +495,12 @@ tests/cases/compiler/privacyImportParseErrors.ts(353,29): error TS1147: Import d export module m3 { import m3 = require("use_glo_M1_public"); ~~~~~~~~~~~~~~~~~~~ -!!! error TS1147: Import declarations in an internal module cannot reference an external module. +!!! error TS1147: Import declarations in a namespace cannot reference a module. module m4 { var a = 10; import m2 = require("use_glo_M1_public"); ~~~~~~~~~~~~~~~~~~~ -!!! error TS1147: Import declarations in an internal module cannot reference an external module. +!!! error TS1147: Import declarations in a namespace cannot reference a module. } } \ No newline at end of file diff --git a/tests/baselines/reference/project/cantFindTheModule/amd/cantFindTheModule.errors.txt b/tests/baselines/reference/project/cantFindTheModule/amd/cantFindTheModule.errors.txt index cd1e6ff521c11..7c071fdc208c2 100644 --- a/tests/baselines/reference/project/cantFindTheModule/amd/cantFindTheModule.errors.txt +++ b/tests/baselines/reference/project/cantFindTheModule/amd/cantFindTheModule.errors.txt @@ -1,18 +1,18 @@ -decl.ts(1,26): error TS2307: Cannot find external module './foo/bar.js'. -decl.ts(2,26): error TS2307: Cannot find external module 'baz'. -decl.ts(3,26): error TS2307: Cannot find external module './baz'. +decl.ts(1,26): error TS2307: Cannot find module './foo/bar.js'. +decl.ts(2,26): error TS2307: Cannot find module 'baz'. +decl.ts(3,26): error TS2307: Cannot find module './baz'. ==== decl.ts (3 errors) ==== import modErr = require("./foo/bar.js"); ~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find external module './foo/bar.js'. +!!! error TS2307: Cannot find module './foo/bar.js'. import modErr1 = require("baz"); ~~~~~ -!!! error TS2307: Cannot find external module 'baz'. +!!! error TS2307: Cannot find module 'baz'. import modErr2 = require("./baz"); ~~~~~~~ -!!! error TS2307: Cannot find external module './baz'. +!!! error TS2307: Cannot find module './baz'. //import modErr1 = require("\bar"); diff --git a/tests/baselines/reference/project/cantFindTheModule/node/cantFindTheModule.errors.txt b/tests/baselines/reference/project/cantFindTheModule/node/cantFindTheModule.errors.txt index cd1e6ff521c11..7c071fdc208c2 100644 --- a/tests/baselines/reference/project/cantFindTheModule/node/cantFindTheModule.errors.txt +++ b/tests/baselines/reference/project/cantFindTheModule/node/cantFindTheModule.errors.txt @@ -1,18 +1,18 @@ -decl.ts(1,26): error TS2307: Cannot find external module './foo/bar.js'. -decl.ts(2,26): error TS2307: Cannot find external module 'baz'. -decl.ts(3,26): error TS2307: Cannot find external module './baz'. +decl.ts(1,26): error TS2307: Cannot find module './foo/bar.js'. +decl.ts(2,26): error TS2307: Cannot find module 'baz'. +decl.ts(3,26): error TS2307: Cannot find module './baz'. ==== decl.ts (3 errors) ==== import modErr = require("./foo/bar.js"); ~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find external module './foo/bar.js'. +!!! error TS2307: Cannot find module './foo/bar.js'. import modErr1 = require("baz"); ~~~~~ -!!! error TS2307: Cannot find external module 'baz'. +!!! error TS2307: Cannot find module 'baz'. import modErr2 = require("./baz"); ~~~~~~~ -!!! error TS2307: Cannot find external module './baz'. +!!! error TS2307: Cannot find module './baz'. //import modErr1 = require("\bar"); diff --git a/tests/baselines/reference/project/intReferencingExtAndInt/amd/intReferencingExtAndInt.errors.txt b/tests/baselines/reference/project/intReferencingExtAndInt/amd/intReferencingExtAndInt.errors.txt index bfc09e40188e4..c4ad5e69c83d8 100644 --- a/tests/baselines/reference/project/intReferencingExtAndInt/amd/intReferencingExtAndInt.errors.txt +++ b/tests/baselines/reference/project/intReferencingExtAndInt/amd/intReferencingExtAndInt.errors.txt @@ -1,14 +1,14 @@ -internal2.ts(2,21): error TS1147: Import declarations in an internal module cannot reference an external module. -internal2.ts(2,21): error TS2307: Cannot find external module 'external2'. +internal2.ts(2,21): error TS1147: Import declarations in a namespace cannot reference a module. +internal2.ts(2,21): error TS2307: Cannot find module 'external2'. ==== internal2.ts (2 errors) ==== module outer { import g = require("external2") ~~~~~~~~~~~ -!!! error TS1147: Import declarations in an internal module cannot reference an external module. +!!! error TS1147: Import declarations in a namespace cannot reference a module. ~~~~~~~~~~~ -!!! error TS2307: Cannot find external module 'external2'. +!!! error TS2307: Cannot find module 'external2'. export var a = g.square(5); export var b = "foo"; } \ No newline at end of file diff --git a/tests/baselines/reference/project/intReferencingExtAndInt/node/intReferencingExtAndInt.errors.txt b/tests/baselines/reference/project/intReferencingExtAndInt/node/intReferencingExtAndInt.errors.txt index bfc09e40188e4..c4ad5e69c83d8 100644 --- a/tests/baselines/reference/project/intReferencingExtAndInt/node/intReferencingExtAndInt.errors.txt +++ b/tests/baselines/reference/project/intReferencingExtAndInt/node/intReferencingExtAndInt.errors.txt @@ -1,14 +1,14 @@ -internal2.ts(2,21): error TS1147: Import declarations in an internal module cannot reference an external module. -internal2.ts(2,21): error TS2307: Cannot find external module 'external2'. +internal2.ts(2,21): error TS1147: Import declarations in a namespace cannot reference a module. +internal2.ts(2,21): error TS2307: Cannot find module 'external2'. ==== internal2.ts (2 errors) ==== module outer { import g = require("external2") ~~~~~~~~~~~ -!!! error TS1147: Import declarations in an internal module cannot reference an external module. +!!! error TS1147: Import declarations in a namespace cannot reference a module. ~~~~~~~~~~~ -!!! error TS2307: Cannot find external module 'external2'. +!!! error TS2307: Cannot find module 'external2'. export var a = g.square(5); export var b = "foo"; } \ No newline at end of file diff --git a/tests/baselines/reference/project/nestedLocalModuleSimpleCase/amd/nestedLocalModuleSimpleCase.errors.txt b/tests/baselines/reference/project/nestedLocalModuleSimpleCase/amd/nestedLocalModuleSimpleCase.errors.txt index d8a57865c2253..2b17a05139aff 100644 --- a/tests/baselines/reference/project/nestedLocalModuleSimpleCase/amd/nestedLocalModuleSimpleCase.errors.txt +++ b/tests/baselines/reference/project/nestedLocalModuleSimpleCase/amd/nestedLocalModuleSimpleCase.errors.txt @@ -1,11 +1,11 @@ -test1.ts(2,23): error TS1147: Import declarations in an internal module cannot reference an external module. +test1.ts(2,23): error TS1147: Import declarations in a namespace cannot reference a module. ==== test1.ts (1 errors) ==== export module myModule { import foo = require("test2"); ~~~~~~~ -!!! error TS1147: Import declarations in an internal module cannot reference an external module. +!!! error TS1147: Import declarations in a namespace cannot reference a module. //console.log(foo.$); } diff --git a/tests/baselines/reference/project/nestedLocalModuleSimpleCase/node/nestedLocalModuleSimpleCase.errors.txt b/tests/baselines/reference/project/nestedLocalModuleSimpleCase/node/nestedLocalModuleSimpleCase.errors.txt index d8a57865c2253..2b17a05139aff 100644 --- a/tests/baselines/reference/project/nestedLocalModuleSimpleCase/node/nestedLocalModuleSimpleCase.errors.txt +++ b/tests/baselines/reference/project/nestedLocalModuleSimpleCase/node/nestedLocalModuleSimpleCase.errors.txt @@ -1,11 +1,11 @@ -test1.ts(2,23): error TS1147: Import declarations in an internal module cannot reference an external module. +test1.ts(2,23): error TS1147: Import declarations in a namespace cannot reference a module. ==== test1.ts (1 errors) ==== export module myModule { import foo = require("test2"); ~~~~~~~ -!!! error TS1147: Import declarations in an internal module cannot reference an external module. +!!! error TS1147: Import declarations in a namespace cannot reference a module. //console.log(foo.$); } diff --git a/tests/baselines/reference/project/nestedLocalModuleWithRecursiveTypecheck/amd/nestedLocalModuleWithRecursiveTypecheck.errors.txt b/tests/baselines/reference/project/nestedLocalModuleWithRecursiveTypecheck/amd/nestedLocalModuleWithRecursiveTypecheck.errors.txt index e205f308c0ad3..a8fb4fc1b2318 100644 --- a/tests/baselines/reference/project/nestedLocalModuleWithRecursiveTypecheck/amd/nestedLocalModuleWithRecursiveTypecheck.errors.txt +++ b/tests/baselines/reference/project/nestedLocalModuleWithRecursiveTypecheck/amd/nestedLocalModuleWithRecursiveTypecheck.errors.txt @@ -1,5 +1,5 @@ -test1.ts(3,23): error TS1147: Import declarations in an internal module cannot reference an external module. -test1.ts(3,23): error TS2307: Cannot find external module 'test2'. +test1.ts(3,23): error TS1147: Import declarations in a namespace cannot reference a module. +test1.ts(3,23): error TS2307: Cannot find module 'test2'. ==== test1.ts (2 errors) ==== @@ -7,9 +7,9 @@ test1.ts(3,23): error TS2307: Cannot find external module 'test2'. import foo = require("test2"); ~~~~~~~ -!!! error TS1147: Import declarations in an internal module cannot reference an external module. +!!! error TS1147: Import declarations in a namespace cannot reference a module. ~~~~~~~ -!!! error TS2307: Cannot find external module 'test2'. +!!! error TS2307: Cannot find module 'test2'. //console.log(foo.$); diff --git a/tests/baselines/reference/project/nestedLocalModuleWithRecursiveTypecheck/node/nestedLocalModuleWithRecursiveTypecheck.errors.txt b/tests/baselines/reference/project/nestedLocalModuleWithRecursiveTypecheck/node/nestedLocalModuleWithRecursiveTypecheck.errors.txt index e205f308c0ad3..a8fb4fc1b2318 100644 --- a/tests/baselines/reference/project/nestedLocalModuleWithRecursiveTypecheck/node/nestedLocalModuleWithRecursiveTypecheck.errors.txt +++ b/tests/baselines/reference/project/nestedLocalModuleWithRecursiveTypecheck/node/nestedLocalModuleWithRecursiveTypecheck.errors.txt @@ -1,5 +1,5 @@ -test1.ts(3,23): error TS1147: Import declarations in an internal module cannot reference an external module. -test1.ts(3,23): error TS2307: Cannot find external module 'test2'. +test1.ts(3,23): error TS1147: Import declarations in a namespace cannot reference a module. +test1.ts(3,23): error TS2307: Cannot find module 'test2'. ==== test1.ts (2 errors) ==== @@ -7,9 +7,9 @@ test1.ts(3,23): error TS2307: Cannot find external module 'test2'. import foo = require("test2"); ~~~~~~~ -!!! error TS1147: Import declarations in an internal module cannot reference an external module. +!!! error TS1147: Import declarations in a namespace cannot reference a module. ~~~~~~~ -!!! error TS2307: Cannot find external module 'test2'. +!!! error TS2307: Cannot find module 'test2'. //console.log(foo.$); diff --git a/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/amd/privacyCheckOnImportedModuleDeclarationsInsideModule.errors.txt b/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/amd/privacyCheckOnImportedModuleDeclarationsInsideModule.errors.txt index eabc4e5656a18..0ed31c4ea38c1 100644 --- a/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/amd/privacyCheckOnImportedModuleDeclarationsInsideModule.errors.txt +++ b/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/amd/privacyCheckOnImportedModuleDeclarationsInsideModule.errors.txt @@ -1,16 +1,16 @@ -testGlo.ts(2,39): error TS1147: Import declarations in an internal module cannot reference an external module. -testGlo.ts(2,39): error TS2307: Cannot find external module 'mExported'. -testGlo.ts(21,35): error TS1147: Import declarations in an internal module cannot reference an external module. -testGlo.ts(21,35): error TS2307: Cannot find external module 'mNonExported'. +testGlo.ts(2,39): error TS1147: Import declarations in a namespace cannot reference a module. +testGlo.ts(2,39): error TS2307: Cannot find module 'mExported'. +testGlo.ts(21,35): error TS1147: Import declarations in a namespace cannot reference a module. +testGlo.ts(21,35): error TS2307: Cannot find module 'mNonExported'. ==== testGlo.ts (4 errors) ==== module m2 { export import mExported = require("mExported"); ~~~~~~~~~~~ -!!! error TS1147: Import declarations in an internal module cannot reference an external module. +!!! error TS1147: Import declarations in a namespace cannot reference a module. ~~~~~~~~~~~ -!!! error TS2307: Cannot find external module 'mExported'. +!!! error TS2307: Cannot find module 'mExported'. export var c1 = new mExported.me.class1; export function f1() { return new mExported.me.class1(); @@ -31,9 +31,9 @@ testGlo.ts(21,35): error TS2307: Cannot find external module 'mNonExported'. import mNonExported = require("mNonExported"); ~~~~~~~~~~~~~~ -!!! error TS1147: Import declarations in an internal module cannot reference an external module. +!!! error TS1147: Import declarations in a namespace cannot reference a module. ~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find external module 'mNonExported'. +!!! error TS2307: Cannot find module 'mNonExported'. export var c3 = new mNonExported.mne.class1; export function f3() { return new mNonExported.mne.class1(); diff --git a/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/node/privacyCheckOnImportedModuleDeclarationsInsideModule.errors.txt b/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/node/privacyCheckOnImportedModuleDeclarationsInsideModule.errors.txt index eabc4e5656a18..0ed31c4ea38c1 100644 --- a/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/node/privacyCheckOnImportedModuleDeclarationsInsideModule.errors.txt +++ b/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/node/privacyCheckOnImportedModuleDeclarationsInsideModule.errors.txt @@ -1,16 +1,16 @@ -testGlo.ts(2,39): error TS1147: Import declarations in an internal module cannot reference an external module. -testGlo.ts(2,39): error TS2307: Cannot find external module 'mExported'. -testGlo.ts(21,35): error TS1147: Import declarations in an internal module cannot reference an external module. -testGlo.ts(21,35): error TS2307: Cannot find external module 'mNonExported'. +testGlo.ts(2,39): error TS1147: Import declarations in a namespace cannot reference a module. +testGlo.ts(2,39): error TS2307: Cannot find module 'mExported'. +testGlo.ts(21,35): error TS1147: Import declarations in a namespace cannot reference a module. +testGlo.ts(21,35): error TS2307: Cannot find module 'mNonExported'. ==== testGlo.ts (4 errors) ==== module m2 { export import mExported = require("mExported"); ~~~~~~~~~~~ -!!! error TS1147: Import declarations in an internal module cannot reference an external module. +!!! error TS1147: Import declarations in a namespace cannot reference a module. ~~~~~~~~~~~ -!!! error TS2307: Cannot find external module 'mExported'. +!!! error TS2307: Cannot find module 'mExported'. export var c1 = new mExported.me.class1; export function f1() { return new mExported.me.class1(); @@ -31,9 +31,9 @@ testGlo.ts(21,35): error TS2307: Cannot find external module 'mNonExported'. import mNonExported = require("mNonExported"); ~~~~~~~~~~~~~~ -!!! error TS1147: Import declarations in an internal module cannot reference an external module. +!!! error TS1147: Import declarations in a namespace cannot reference a module. ~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find external module 'mNonExported'. +!!! error TS2307: Cannot find module 'mNonExported'. export var c3 = new mNonExported.mne.class1; export function f3() { return new mNonExported.mne.class1(); diff --git a/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideNonExportedModule/amd/privacyCheckOnImportedModuleDeclarationsInsideNonExportedModule.errors.txt b/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideNonExportedModule/amd/privacyCheckOnImportedModuleDeclarationsInsideNonExportedModule.errors.txt index 820d18ffb989b..126d5b696c1cf 100644 --- a/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideNonExportedModule/amd/privacyCheckOnImportedModuleDeclarationsInsideNonExportedModule.errors.txt +++ b/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideNonExportedModule/amd/privacyCheckOnImportedModuleDeclarationsInsideNonExportedModule.errors.txt @@ -1,7 +1,7 @@ -test.ts(5,39): error TS1147: Import declarations in an internal module cannot reference an external module. -test.ts(5,39): error TS2307: Cannot find external module 'mExported'. -test.ts(24,35): error TS1147: Import declarations in an internal module cannot reference an external module. -test.ts(24,35): error TS2307: Cannot find external module 'mNonExported'. +test.ts(5,39): error TS1147: Import declarations in a namespace cannot reference a module. +test.ts(5,39): error TS2307: Cannot find module 'mExported'. +test.ts(24,35): error TS1147: Import declarations in a namespace cannot reference a module. +test.ts(24,35): error TS2307: Cannot find module 'mNonExported'. ==== test.ts (4 errors) ==== @@ -11,9 +11,9 @@ test.ts(24,35): error TS2307: Cannot find external module 'mNonExported'. module m2 { export import mExported = require("mExported"); ~~~~~~~~~~~ -!!! error TS1147: Import declarations in an internal module cannot reference an external module. +!!! error TS1147: Import declarations in a namespace cannot reference a module. ~~~~~~~~~~~ -!!! error TS2307: Cannot find external module 'mExported'. +!!! error TS2307: Cannot find module 'mExported'. export var c1 = new mExported.me.class1; export function f1() { return new mExported.me.class1(); @@ -34,9 +34,9 @@ test.ts(24,35): error TS2307: Cannot find external module 'mNonExported'. import mNonExported = require("mNonExported"); ~~~~~~~~~~~~~~ -!!! error TS1147: Import declarations in an internal module cannot reference an external module. +!!! error TS1147: Import declarations in a namespace cannot reference a module. ~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find external module 'mNonExported'. +!!! error TS2307: Cannot find module 'mNonExported'. export var c3 = new mNonExported.mne.class1; export function f3() { return new mNonExported.mne.class1(); diff --git a/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideNonExportedModule/node/privacyCheckOnImportedModuleDeclarationsInsideNonExportedModule.errors.txt b/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideNonExportedModule/node/privacyCheckOnImportedModuleDeclarationsInsideNonExportedModule.errors.txt index 820d18ffb989b..126d5b696c1cf 100644 --- a/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideNonExportedModule/node/privacyCheckOnImportedModuleDeclarationsInsideNonExportedModule.errors.txt +++ b/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideNonExportedModule/node/privacyCheckOnImportedModuleDeclarationsInsideNonExportedModule.errors.txt @@ -1,7 +1,7 @@ -test.ts(5,39): error TS1147: Import declarations in an internal module cannot reference an external module. -test.ts(5,39): error TS2307: Cannot find external module 'mExported'. -test.ts(24,35): error TS1147: Import declarations in an internal module cannot reference an external module. -test.ts(24,35): error TS2307: Cannot find external module 'mNonExported'. +test.ts(5,39): error TS1147: Import declarations in a namespace cannot reference a module. +test.ts(5,39): error TS2307: Cannot find module 'mExported'. +test.ts(24,35): error TS1147: Import declarations in a namespace cannot reference a module. +test.ts(24,35): error TS2307: Cannot find module 'mNonExported'. ==== test.ts (4 errors) ==== @@ -11,9 +11,9 @@ test.ts(24,35): error TS2307: Cannot find external module 'mNonExported'. module m2 { export import mExported = require("mExported"); ~~~~~~~~~~~ -!!! error TS1147: Import declarations in an internal module cannot reference an external module. +!!! error TS1147: Import declarations in a namespace cannot reference a module. ~~~~~~~~~~~ -!!! error TS2307: Cannot find external module 'mExported'. +!!! error TS2307: Cannot find module 'mExported'. export var c1 = new mExported.me.class1; export function f1() { return new mExported.me.class1(); @@ -34,9 +34,9 @@ test.ts(24,35): error TS2307: Cannot find external module 'mNonExported'. import mNonExported = require("mNonExported"); ~~~~~~~~~~~~~~ -!!! error TS1147: Import declarations in an internal module cannot reference an external module. +!!! error TS1147: Import declarations in a namespace cannot reference a module. ~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find external module 'mNonExported'. +!!! error TS2307: Cannot find module 'mNonExported'. export var c3 = new mNonExported.mne.class1; export function f3() { return new mNonExported.mne.class1(); diff --git a/tests/baselines/reference/project/privacyCheckOnImportedModuleImportStatementInParentModule/amd/privacyCheckOnImportedModuleImportStatementInParentModule.errors.txt b/tests/baselines/reference/project/privacyCheckOnImportedModuleImportStatementInParentModule/amd/privacyCheckOnImportedModuleImportStatementInParentModule.errors.txt index ed865949b87c8..872e43a9b4f1d 100644 --- a/tests/baselines/reference/project/privacyCheckOnImportedModuleImportStatementInParentModule/amd/privacyCheckOnImportedModuleImportStatementInParentModule.errors.txt +++ b/tests/baselines/reference/project/privacyCheckOnImportedModuleImportStatementInParentModule/amd/privacyCheckOnImportedModuleImportStatementInParentModule.errors.txt @@ -1,16 +1,16 @@ -test.ts(2,39): error TS1147: Import declarations in an internal module cannot reference an external module. -test.ts(2,39): error TS2307: Cannot find external module 'mExported'. -test.ts(42,35): error TS1147: Import declarations in an internal module cannot reference an external module. -test.ts(42,35): error TS2307: Cannot find external module 'mNonExported'. +test.ts(2,39): error TS1147: Import declarations in a namespace cannot reference a module. +test.ts(2,39): error TS2307: Cannot find module 'mExported'. +test.ts(42,35): error TS1147: Import declarations in a namespace cannot reference a module. +test.ts(42,35): error TS2307: Cannot find module 'mNonExported'. ==== test.ts (4 errors) ==== export module m2 { export import mExported = require("mExported"); ~~~~~~~~~~~ -!!! error TS1147: Import declarations in an internal module cannot reference an external module. +!!! error TS1147: Import declarations in a namespace cannot reference a module. ~~~~~~~~~~~ -!!! error TS2307: Cannot find external module 'mExported'. +!!! error TS2307: Cannot find module 'mExported'. module Internal_M1 { export var c1 = new mExported.me.class1; @@ -52,9 +52,9 @@ test.ts(42,35): error TS2307: Cannot find external module 'mNonExported'. import mNonExported = require("mNonExported"); ~~~~~~~~~~~~~~ -!!! error TS1147: Import declarations in an internal module cannot reference an external module. +!!! error TS1147: Import declarations in a namespace cannot reference a module. ~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find external module 'mNonExported'. +!!! error TS2307: Cannot find module 'mNonExported'. module Internal_M3 { export var c3 = new mNonExported.mne.class1; export function f3() { diff --git a/tests/baselines/reference/project/privacyCheckOnImportedModuleImportStatementInParentModule/node/privacyCheckOnImportedModuleImportStatementInParentModule.errors.txt b/tests/baselines/reference/project/privacyCheckOnImportedModuleImportStatementInParentModule/node/privacyCheckOnImportedModuleImportStatementInParentModule.errors.txt index ed865949b87c8..872e43a9b4f1d 100644 --- a/tests/baselines/reference/project/privacyCheckOnImportedModuleImportStatementInParentModule/node/privacyCheckOnImportedModuleImportStatementInParentModule.errors.txt +++ b/tests/baselines/reference/project/privacyCheckOnImportedModuleImportStatementInParentModule/node/privacyCheckOnImportedModuleImportStatementInParentModule.errors.txt @@ -1,16 +1,16 @@ -test.ts(2,39): error TS1147: Import declarations in an internal module cannot reference an external module. -test.ts(2,39): error TS2307: Cannot find external module 'mExported'. -test.ts(42,35): error TS1147: Import declarations in an internal module cannot reference an external module. -test.ts(42,35): error TS2307: Cannot find external module 'mNonExported'. +test.ts(2,39): error TS1147: Import declarations in a namespace cannot reference a module. +test.ts(2,39): error TS2307: Cannot find module 'mExported'. +test.ts(42,35): error TS1147: Import declarations in a namespace cannot reference a module. +test.ts(42,35): error TS2307: Cannot find module 'mNonExported'. ==== test.ts (4 errors) ==== export module m2 { export import mExported = require("mExported"); ~~~~~~~~~~~ -!!! error TS1147: Import declarations in an internal module cannot reference an external module. +!!! error TS1147: Import declarations in a namespace cannot reference a module. ~~~~~~~~~~~ -!!! error TS2307: Cannot find external module 'mExported'. +!!! error TS2307: Cannot find module 'mExported'. module Internal_M1 { export var c1 = new mExported.me.class1; @@ -52,9 +52,9 @@ test.ts(42,35): error TS2307: Cannot find external module 'mNonExported'. import mNonExported = require("mNonExported"); ~~~~~~~~~~~~~~ -!!! error TS1147: Import declarations in an internal module cannot reference an external module. +!!! error TS1147: Import declarations in a namespace cannot reference a module. ~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find external module 'mNonExported'. +!!! error TS2307: Cannot find module 'mNonExported'. module Internal_M3 { export var c3 = new mNonExported.mne.class1; export function f3() { diff --git a/tests/baselines/reference/relativePathMustResolve.errors.txt b/tests/baselines/reference/relativePathMustResolve.errors.txt index 700913f65d736..1ff89a74623ca 100644 --- a/tests/baselines/reference/relativePathMustResolve.errors.txt +++ b/tests/baselines/reference/relativePathMustResolve.errors.txt @@ -1,10 +1,10 @@ -tests/cases/conformance/externalModules/foo_1.ts(1,22): error TS2307: Cannot find external module './test/foo'. +tests/cases/conformance/externalModules/foo_1.ts(1,22): error TS2307: Cannot find module './test/foo'. ==== tests/cases/conformance/externalModules/foo_1.ts (1 errors) ==== import foo = require('./test/foo'); ~~~~~~~~~~~~ -!!! error TS2307: Cannot find external module './test/foo'. +!!! error TS2307: Cannot find module './test/foo'. var z = foo.x + 10; ==== tests/cases/conformance/externalModules/foo_0.ts (0 errors) ==== diff --git a/tests/baselines/reference/relativePathToDeclarationFile.errors.txt b/tests/baselines/reference/relativePathToDeclarationFile.errors.txt index 51ea1f54c4cbf..041dd5c3a8f58 100644 --- a/tests/baselines/reference/relativePathToDeclarationFile.errors.txt +++ b/tests/baselines/reference/relativePathToDeclarationFile.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/externalModules/test/foo.d.ts(1,23): error TS1148: Cannot compile external modules unless the '--module' flag is provided. +tests/cases/conformance/externalModules/test/foo.d.ts(1,23): error TS1148: Cannot compile modules unless the '--module' flag is provided. ==== tests/cases/conformance/externalModules/test/file1.ts (0 errors) ==== @@ -13,7 +13,7 @@ tests/cases/conformance/externalModules/test/foo.d.ts(1,23): error TS1148: Canno ==== tests/cases/conformance/externalModules/test/foo.d.ts (1 errors) ==== export declare module M2 { ~~ -!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. export var x: boolean; } diff --git a/tests/baselines/reference/requireOfAnEmptyFile1.errors.txt b/tests/baselines/reference/requireOfAnEmptyFile1.errors.txt index ca5f178193b98..7094bc6699f11 100644 --- a/tests/baselines/reference/requireOfAnEmptyFile1.errors.txt +++ b/tests/baselines/reference/requireOfAnEmptyFile1.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/requireOfAnEmptyFile1_a.ts(3,21): error TS2306: File 'tests/cases/compiler/requireOfAnEmptyFile1_b.ts' is not an external module. +tests/cases/compiler/requireOfAnEmptyFile1_a.ts(3,21): error TS2306: File 'tests/cases/compiler/requireOfAnEmptyFile1_b.ts' is not a module. ==== tests/cases/compiler/requireOfAnEmptyFile1_a.ts (1 errors) ==== @@ -6,7 +6,7 @@ tests/cases/compiler/requireOfAnEmptyFile1_a.ts(3,21): error TS2306: File 'tests import fs = require('requireOfAnEmptyFile1_b'); ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2306: File 'requireOfAnEmptyFile1_b.ts' is not an external module. +!!! error TS2306: File 'requireOfAnEmptyFile1_b.ts' is not a module. ==== tests/cases/compiler/requireOfAnEmptyFile1_b.ts (0 errors) ==== \ No newline at end of file diff --git a/tests/baselines/reference/reservedWords2.errors.txt b/tests/baselines/reference/reservedWords2.errors.txt index 3b3fe2c502cb0..471eef4710a56 100644 --- a/tests/baselines/reference/reservedWords2.errors.txt +++ b/tests/baselines/reference/reservedWords2.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/reservedWords2.ts(1,1): error TS1148: Cannot compile external modules unless the '--module' flag is provided. +tests/cases/compiler/reservedWords2.ts(1,1): error TS1148: Cannot compile modules unless the '--module' flag is provided. tests/cases/compiler/reservedWords2.ts(1,8): error TS1109: Expression expected. tests/cases/compiler/reservedWords2.ts(1,14): error TS1005: '(' expected. tests/cases/compiler/reservedWords2.ts(1,16): error TS2304: Cannot find name 'require'. @@ -34,7 +34,7 @@ tests/cases/compiler/reservedWords2.ts(10,6): error TS1003: Identifier expected. ==== tests/cases/compiler/reservedWords2.ts (31 errors) ==== import while = require("dfdf"); ~~~~~~ -!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. ~~~~~ !!! error TS1109: Expression expected. ~ diff --git a/tests/baselines/reference/scannerClass2.errors.txt b/tests/baselines/reference/scannerClass2.errors.txt index 7a59478ade27f..74b62602dada1 100644 --- a/tests/baselines/reference/scannerClass2.errors.txt +++ b/tests/baselines/reference/scannerClass2.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/scanner/ecmascript5/scannerClass2.ts(3,18): error TS1148: Cannot compile external modules unless the '--module' flag is provided. +tests/cases/conformance/scanner/ecmascript5/scannerClass2.ts(3,18): error TS1148: Cannot compile modules unless the '--module' flag is provided. tests/cases/conformance/scanner/ecmascript5/scannerClass2.ts(3,43): error TS2304: Cannot find name 'ILogger'. tests/cases/conformance/scanner/ecmascript5/scannerClass2.ts(4,37): error TS2304: Cannot find name 'ILogger'. tests/cases/conformance/scanner/ecmascript5/scannerClass2.ts(5,18): error TS2339: Property '_information' does not exist on type 'LoggerAdapter'. @@ -9,7 +9,7 @@ tests/cases/conformance/scanner/ecmascript5/scannerClass2.ts(5,18): error TS2339 export class LoggerAdapter implements ILogger { ~~~~~~~~~~~~~ -!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. ~~~~~~~ !!! error TS2304: Cannot find name 'ILogger'. constructor (public logger: ILogger) { diff --git a/tests/baselines/reference/scannerEnum1.errors.txt b/tests/baselines/reference/scannerEnum1.errors.txt index b55fa92503c55..64d7508980ff8 100644 --- a/tests/baselines/reference/scannerEnum1.errors.txt +++ b/tests/baselines/reference/scannerEnum1.errors.txt @@ -1,10 +1,10 @@ -tests/cases/conformance/scanner/ecmascript5/scannerEnum1.ts(1,17): error TS1148: Cannot compile external modules unless the '--module' flag is provided. +tests/cases/conformance/scanner/ecmascript5/scannerEnum1.ts(1,17): error TS1148: Cannot compile modules unless the '--module' flag is provided. ==== tests/cases/conformance/scanner/ecmascript5/scannerEnum1.ts (1 errors) ==== export enum CodeGenTarget { ~~~~~~~~~~~~~ -!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. ES3 = 0, ES5 = 1, } \ No newline at end of file diff --git a/tests/baselines/reference/separateCompilationImportExportElision.errors.txt b/tests/baselines/reference/separateCompilationImportExportElision.errors.txt index db418681e8394..0bac01d813432 100644 --- a/tests/baselines/reference/separateCompilationImportExportElision.errors.txt +++ b/tests/baselines/reference/separateCompilationImportExportElision.errors.txt @@ -1,20 +1,20 @@ -tests/cases/compiler/separateCompilationImportExportElision.ts(2,17): error TS2307: Cannot find external module 'module'. -tests/cases/compiler/separateCompilationImportExportElision.ts(3,18): error TS2307: Cannot find external module 'module'. -tests/cases/compiler/separateCompilationImportExportElision.ts(4,21): error TS2307: Cannot find external module 'module'. -tests/cases/compiler/separateCompilationImportExportElision.ts(12,18): error TS2307: Cannot find external module 'module'. +tests/cases/compiler/separateCompilationImportExportElision.ts(2,17): error TS2307: Cannot find module 'module'. +tests/cases/compiler/separateCompilationImportExportElision.ts(3,18): error TS2307: Cannot find module 'module'. +tests/cases/compiler/separateCompilationImportExportElision.ts(4,21): error TS2307: Cannot find module 'module'. +tests/cases/compiler/separateCompilationImportExportElision.ts(12,18): error TS2307: Cannot find module 'module'. ==== tests/cases/compiler/separateCompilationImportExportElision.ts (4 errors) ==== import {c} from "module" ~~~~~~~~ -!!! error TS2307: Cannot find external module 'module'. +!!! error TS2307: Cannot find module 'module'. import {c2} from "module" ~~~~~~~~ -!!! error TS2307: Cannot find external module 'module'. +!!! error TS2307: Cannot find module 'module'. import * as ns from "module" ~~~~~~~~ -!!! error TS2307: Cannot find external module 'module'. +!!! error TS2307: Cannot find module 'module'. class C extends c2.C { } @@ -24,5 +24,5 @@ tests/cases/compiler/separateCompilationImportExportElision.ts(12,18): error TS2 export {c1} from "module"; ~~~~~~~~ -!!! error TS2307: Cannot find external module 'module'. +!!! error TS2307: Cannot find module 'module'. export var z = x; \ No newline at end of file diff --git a/tests/baselines/reference/separateCompilationNoExternalModule.errors.txt b/tests/baselines/reference/separateCompilationNoExternalModule.errors.txt index 269727584d485..71d7da73a8030 100644 --- a/tests/baselines/reference/separateCompilationNoExternalModule.errors.txt +++ b/tests/baselines/reference/separateCompilationNoExternalModule.errors.txt @@ -1,8 +1,8 @@ -tests/cases/compiler/separateCompilationNoExternalModule.ts(2,1): error TS1208: Cannot compile non-external modules when the '--separateCompilation' flag is provided. +tests/cases/compiler/separateCompilationNoExternalModule.ts(2,1): error TS1208: Cannot compile namespaces when the '--separateCompilation' flag is provided. ==== tests/cases/compiler/separateCompilationNoExternalModule.ts (1 errors) ==== var x; ~~~ -!!! error TS1208: Cannot compile non-external modules when the '--separateCompilation' flag is provided. \ No newline at end of file +!!! error TS1208: Cannot compile namespaces when the '--separateCompilation' flag is provided. \ No newline at end of file diff --git a/tests/baselines/reference/separateCompilationOut.errors.txt b/tests/baselines/reference/separateCompilationOut.errors.txt index 7c2631a71822b..9017809901f99 100644 --- a/tests/baselines/reference/separateCompilationOut.errors.txt +++ b/tests/baselines/reference/separateCompilationOut.errors.txt @@ -1,5 +1,5 @@ error TS5046: Option 'out' cannot be specified with option 'separateCompilation'. -tests/cases/compiler/file2.ts(1,1): error TS1208: Cannot compile non-external modules when the '--separateCompilation' flag is provided. +tests/cases/compiler/file2.ts(1,1): error TS1208: Cannot compile namespaces when the '--separateCompilation' flag is provided. !!! error TS5046: Option 'out' cannot be specified with option 'separateCompilation'. @@ -9,4 +9,4 @@ tests/cases/compiler/file2.ts(1,1): error TS1208: Cannot compile non-external mo ==== tests/cases/compiler/file2.ts (1 errors) ==== var y; ~~~ -!!! error TS1208: Cannot compile non-external modules when the '--separateCompilation' flag is provided. \ No newline at end of file +!!! error TS1208: Cannot compile namespaces when the '--separateCompilation' flag is provided. \ No newline at end of file diff --git a/tests/baselines/reference/staticInstanceResolution5.errors.txt b/tests/baselines/reference/staticInstanceResolution5.errors.txt index 3dea3485af9eb..3c1cee93fd548 100644 --- a/tests/baselines/reference/staticInstanceResolution5.errors.txt +++ b/tests/baselines/reference/staticInstanceResolution5.errors.txt @@ -1,10 +1,10 @@ -tests/cases/compiler/staticInstanceResolution5_1.ts(1,24): error TS2307: Cannot find external module 'staticInstanceResolution5_0.ts'. +tests/cases/compiler/staticInstanceResolution5_1.ts(1,24): error TS2307: Cannot find module 'staticInstanceResolution5_0.ts'. ==== tests/cases/compiler/staticInstanceResolution5_1.ts (1 errors) ==== import WinJS = require('staticInstanceResolution5_0.ts'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find external module 'staticInstanceResolution5_0.ts'. +!!! error TS2307: Cannot find module 'staticInstanceResolution5_0.ts'. // these 3 should be errors var x = (w1: WinJS) => { }; diff --git a/tests/baselines/reference/strictModeReservedWordInImportEqualDeclaration.errors.txt b/tests/baselines/reference/strictModeReservedWordInImportEqualDeclaration.errors.txt index 408cf161f3c37..7511e88f53a6a 100644 --- a/tests/baselines/reference/strictModeReservedWordInImportEqualDeclaration.errors.txt +++ b/tests/baselines/reference/strictModeReservedWordInImportEqualDeclaration.errors.txt @@ -1,5 +1,5 @@ tests/cases/compiler/strictModeReservedWordInImportEqualDeclaration.ts(3,8): error TS1212: Identifier expected. 'public' is a reserved word in strict mode -tests/cases/compiler/strictModeReservedWordInImportEqualDeclaration.ts(3,25): error TS2307: Cannot find external module '1'. +tests/cases/compiler/strictModeReservedWordInImportEqualDeclaration.ts(3,25): error TS2307: Cannot find module '1'. ==== tests/cases/compiler/strictModeReservedWordInImportEqualDeclaration.ts (2 errors) ==== @@ -9,4 +9,4 @@ tests/cases/compiler/strictModeReservedWordInImportEqualDeclaration.ts(3,25): er ~~~~~~ !!! error TS1212: Identifier expected. 'public' is a reserved word in strict mode ~~~ -!!! error TS2307: Cannot find external module '1'. \ No newline at end of file +!!! error TS2307: Cannot find module '1'. \ No newline at end of file diff --git a/tests/baselines/reference/strictModeWordInImportDeclaration.errors.txt b/tests/baselines/reference/strictModeWordInImportDeclaration.errors.txt index 83e44ab50b975..b5da09b424066 100644 --- a/tests/baselines/reference/strictModeWordInImportDeclaration.errors.txt +++ b/tests/baselines/reference/strictModeWordInImportDeclaration.errors.txt @@ -1,8 +1,8 @@ tests/cases/compiler/strictModeWordInImportDeclaration.ts(2,13): error TS1212: Identifier expected. 'package' is a reserved word in strict mode -tests/cases/compiler/strictModeWordInImportDeclaration.ts(2,26): error TS2307: Cannot find external module './1'. +tests/cases/compiler/strictModeWordInImportDeclaration.ts(2,26): error TS2307: Cannot find module './1'. tests/cases/compiler/strictModeWordInImportDeclaration.ts(3,16): error TS1212: Identifier expected. 'private' is a reserved word in strict mode -tests/cases/compiler/strictModeWordInImportDeclaration.ts(3,30): error TS2307: Cannot find external module './1'. -tests/cases/compiler/strictModeWordInImportDeclaration.ts(4,20): error TS2307: Cannot find external module './1'. +tests/cases/compiler/strictModeWordInImportDeclaration.ts(3,30): error TS2307: Cannot find module './1'. +tests/cases/compiler/strictModeWordInImportDeclaration.ts(4,20): error TS2307: Cannot find module './1'. ==== tests/cases/compiler/strictModeWordInImportDeclaration.ts (5 errors) ==== @@ -11,12 +11,12 @@ tests/cases/compiler/strictModeWordInImportDeclaration.ts(4,20): error TS2307: C ~~~~~~~ !!! error TS1212: Identifier expected. 'package' is a reserved word in strict mode ~~~~~ -!!! error TS2307: Cannot find external module './1'. +!!! error TS2307: Cannot find module './1'. import {foo as private} from "./1" ~~~~~~~ !!! error TS1212: Identifier expected. 'private' is a reserved word in strict mode ~~~~~ -!!! error TS2307: Cannot find external module './1'. +!!! error TS2307: Cannot find module './1'. import public from "./1" ~~~~~ -!!! error TS2307: Cannot find external module './1'. \ No newline at end of file +!!! error TS2307: Cannot find module './1'. \ No newline at end of file diff --git a/tests/baselines/reference/thisInInvalidContexts.errors.txt b/tests/baselines/reference/thisInInvalidContexts.errors.txt index 481c4747c99ac..055e0770dea8f 100644 --- a/tests/baselines/reference/thisInInvalidContexts.errors.txt +++ b/tests/baselines/reference/thisInInvalidContexts.errors.txt @@ -1,6 +1,6 @@ tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(3,16): error TS2334: 'this' cannot be referenced in a static property initializer. tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(22,15): error TS2332: 'this' cannot be referenced in current location. -tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(28,13): error TS2331: 'this' cannot be referenced in a module body. +tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(28,13): error TS2331: 'this' cannot be referenced in a module or namespace body. tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(38,25): error TS9002: Only identifiers/qualified-names with optional type arguments are currently supported in a class 'extends' clauses. tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(44,9): error TS2332: 'this' cannot be referenced in current location. tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(45,9): error TS2332: 'this' cannot be referenced in current location. @@ -40,7 +40,7 @@ tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(45,9): //'this' in module variable var x = this; // Error ~~~~ -!!! error TS2331: 'this' cannot be referenced in a module body. +!!! error TS2331: 'this' cannot be referenced in a module or namespace body. } //'this' as type parameter constraint diff --git a/tests/baselines/reference/thisInInvalidContextsExternalModule.errors.txt b/tests/baselines/reference/thisInInvalidContextsExternalModule.errors.txt index a8bf99de27b78..03c494cad4561 100644 --- a/tests/baselines/reference/thisInInvalidContextsExternalModule.errors.txt +++ b/tests/baselines/reference/thisInInvalidContextsExternalModule.errors.txt @@ -1,10 +1,10 @@ tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts(3,16): error TS2334: 'this' cannot be referenced in a static property initializer. tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts(22,15): error TS2332: 'this' cannot be referenced in current location. -tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts(28,13): error TS2331: 'this' cannot be referenced in a module body. +tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts(28,13): error TS2331: 'this' cannot be referenced in a module or namespace body. tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts(38,25): error TS9002: Only identifiers/qualified-names with optional type arguments are currently supported in a class 'extends' clauses. tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts(44,9): error TS2332: 'this' cannot be referenced in current location. tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts(45,9): error TS2332: 'this' cannot be referenced in current location. -tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts(48,1): error TS1148: Cannot compile external modules unless the '--module' flag is provided. +tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts(48,1): error TS1148: Cannot compile modules unless the '--module' flag is provided. ==== tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts (7 errors) ==== @@ -41,7 +41,7 @@ tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalMod //'this' in module variable var x = this; // Error ~~~~ -!!! error TS2331: 'this' cannot be referenced in a module body. +!!! error TS2331: 'this' cannot be referenced in a module or namespace body. } //'this' as type parameter constraint @@ -69,4 +69,4 @@ tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalMod export = this; // Should be an error ~~~~~~~~~~~~~~ -!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. \ No newline at end of file +!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. \ No newline at end of file diff --git a/tests/baselines/reference/thisInModule.errors.txt b/tests/baselines/reference/thisInModule.errors.txt index d60bf51c1bae1..5c4374b14a3e7 100644 --- a/tests/baselines/reference/thisInModule.errors.txt +++ b/tests/baselines/reference/thisInModule.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/thisInModule.ts(3,5): error TS2331: 'this' cannot be referenced in a module body. +tests/cases/compiler/thisInModule.ts(3,5): error TS2331: 'this' cannot be referenced in a module or namespace body. ==== tests/cases/compiler/thisInModule.ts (1 errors) ==== @@ -6,5 +6,5 @@ tests/cases/compiler/thisInModule.ts(3,5): error TS2331: 'this' cannot be refere var x; this.x = 5; ~~~~ -!!! error TS2331: 'this' cannot be referenced in a module body. +!!! error TS2331: 'this' cannot be referenced in a module or namespace body. } \ No newline at end of file diff --git a/tests/baselines/reference/thisKeyword.errors.txt b/tests/baselines/reference/thisKeyword.errors.txt index ba55df7bff34c..facf52a3995cd 100644 --- a/tests/baselines/reference/thisKeyword.errors.txt +++ b/tests/baselines/reference/thisKeyword.errors.txt @@ -1,9 +1,9 @@ -tests/cases/compiler/thisKeyword.ts(2,5): error TS2331: 'this' cannot be referenced in a module body. +tests/cases/compiler/thisKeyword.ts(2,5): error TS2331: 'this' cannot be referenced in a module or namespace body. ==== tests/cases/compiler/thisKeyword.ts (1 errors) ==== module foo { this.bar = 4; ~~~~ -!!! error TS2331: 'this' cannot be referenced in a module body. +!!! error TS2331: 'this' cannot be referenced in a module or namespace body. } \ No newline at end of file diff --git a/tests/baselines/reference/topLevelFileModuleMissing.errors.txt b/tests/baselines/reference/topLevelFileModuleMissing.errors.txt index ebeaf2e347414..7642bfd86a2ab 100644 --- a/tests/baselines/reference/topLevelFileModuleMissing.errors.txt +++ b/tests/baselines/reference/topLevelFileModuleMissing.errors.txt @@ -1,10 +1,10 @@ -tests/cases/conformance/externalModules/foo_1.ts(1,22): error TS2307: Cannot find external module 'vs/foo'. +tests/cases/conformance/externalModules/foo_1.ts(1,22): error TS2307: Cannot find module 'vs/foo'. ==== tests/cases/conformance/externalModules/foo_1.ts (1 errors) ==== import foo = require("vs/foo"); ~~~~~~~~ -!!! error TS2307: Cannot find external module 'vs/foo'. +!!! error TS2307: Cannot find module 'vs/foo'. var z = foo.x + 10; ==== tests/cases/conformance/externalModules/vs/foo_0.ts (0 errors) ==== diff --git a/tests/baselines/reference/topLevelLambda.errors.txt b/tests/baselines/reference/topLevelLambda.errors.txt index f83921cb5c8c4..c36864d243fd2 100644 --- a/tests/baselines/reference/topLevelLambda.errors.txt +++ b/tests/baselines/reference/topLevelLambda.errors.txt @@ -1,10 +1,10 @@ -tests/cases/compiler/topLevelLambda.ts(2,17): error TS2331: 'this' cannot be referenced in a module body. +tests/cases/compiler/topLevelLambda.ts(2,17): error TS2331: 'this' cannot be referenced in a module or namespace body. ==== tests/cases/compiler/topLevelLambda.ts (1 errors) ==== module M { var f = () => {this.window;} ~~~~ -!!! error TS2331: 'this' cannot be referenced in a module body. +!!! error TS2331: 'this' cannot be referenced in a module or namespace body. } \ No newline at end of file diff --git a/tests/baselines/reference/typeofANonExportedType.errors.txt b/tests/baselines/reference/typeofANonExportedType.errors.txt index 9bcef8a3dedde..b6b165cdd4fd1 100644 --- a/tests/baselines/reference/typeofANonExportedType.errors.txt +++ b/tests/baselines/reference/typeofANonExportedType.errors.txt @@ -1,11 +1,11 @@ -tests/cases/conformance/types/specifyingTypes/typeQueries/typeofANonExportedType.ts(2,1): error TS1148: Cannot compile external modules unless the '--module' flag is provided. +tests/cases/conformance/types/specifyingTypes/typeQueries/typeofANonExportedType.ts(2,1): error TS1148: Cannot compile modules unless the '--module' flag is provided. ==== tests/cases/conformance/types/specifyingTypes/typeQueries/typeofANonExportedType.ts (1 errors) ==== var x = 1; export var r1: typeof x; ~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. var y = { foo: '' }; export var r2: typeof y; class C { diff --git a/tests/baselines/reference/typeofAnExportedType.errors.txt b/tests/baselines/reference/typeofAnExportedType.errors.txt index dc23127aa0525..9f64f697c0868 100644 --- a/tests/baselines/reference/typeofAnExportedType.errors.txt +++ b/tests/baselines/reference/typeofAnExportedType.errors.txt @@ -1,10 +1,10 @@ -tests/cases/conformance/types/specifyingTypes/typeQueries/typeofAnExportedType.ts(1,1): error TS1148: Cannot compile external modules unless the '--module' flag is provided. +tests/cases/conformance/types/specifyingTypes/typeQueries/typeofAnExportedType.ts(1,1): error TS1148: Cannot compile modules unless the '--module' flag is provided. ==== tests/cases/conformance/types/specifyingTypes/typeQueries/typeofAnExportedType.ts (1 errors) ==== export var x = 1; ~~~~~~~~~~~~~~~~~ -!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. export var r1: typeof x; export var y = { foo: '' }; export var r2: typeof y; diff --git a/tests/baselines/reference/umdDependencyComment2.errors.txt b/tests/baselines/reference/umdDependencyComment2.errors.txt index 66c4adf4c1ddc..316bac0576ce8 100644 --- a/tests/baselines/reference/umdDependencyComment2.errors.txt +++ b/tests/baselines/reference/umdDependencyComment2.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/umdDependencyComment2.ts(3,21): error TS2307: Cannot find external module 'm2'. +tests/cases/compiler/umdDependencyComment2.ts(3,21): error TS2307: Cannot find module 'm2'. ==== tests/cases/compiler/umdDependencyComment2.ts (1 errors) ==== @@ -6,6 +6,6 @@ tests/cases/compiler/umdDependencyComment2.ts(3,21): error TS2307: Cannot find e import m1 = require("m2") ~~~~ -!!! error TS2307: Cannot find external module 'm2'. +!!! error TS2307: Cannot find module 'm2'. m1.f(); \ No newline at end of file diff --git a/tests/baselines/reference/umdDependencyCommentName1.errors.txt b/tests/baselines/reference/umdDependencyCommentName1.errors.txt index 6acb71c4b000f..197753127d1bd 100644 --- a/tests/baselines/reference/umdDependencyCommentName1.errors.txt +++ b/tests/baselines/reference/umdDependencyCommentName1.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/umdDependencyCommentName1.ts(3,21): error TS2307: Cannot find external module 'm2'. +tests/cases/compiler/umdDependencyCommentName1.ts(3,21): error TS2307: Cannot find module 'm2'. ==== tests/cases/compiler/umdDependencyCommentName1.ts (1 errors) ==== @@ -6,6 +6,6 @@ tests/cases/compiler/umdDependencyCommentName1.ts(3,21): error TS2307: Cannot fi import m1 = require("m2") ~~~~ -!!! error TS2307: Cannot find external module 'm2'. +!!! error TS2307: Cannot find module 'm2'. m1.f(); \ No newline at end of file diff --git a/tests/baselines/reference/umdDependencyCommentName2.errors.txt b/tests/baselines/reference/umdDependencyCommentName2.errors.txt index 3481ca6114857..d8920aed91b8b 100644 --- a/tests/baselines/reference/umdDependencyCommentName2.errors.txt +++ b/tests/baselines/reference/umdDependencyCommentName2.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/umdDependencyCommentName2.ts(5,21): error TS2307: Cannot find external module 'm2'. +tests/cases/compiler/umdDependencyCommentName2.ts(5,21): error TS2307: Cannot find module 'm2'. ==== tests/cases/compiler/umdDependencyCommentName2.ts (1 errors) ==== @@ -8,6 +8,6 @@ tests/cases/compiler/umdDependencyCommentName2.ts(5,21): error TS2307: Cannot fi import m1 = require("m2") ~~~~ -!!! error TS2307: Cannot find external module 'm2'. +!!! error TS2307: Cannot find module 'm2'. m1.f(); \ No newline at end of file diff --git a/tests/baselines/reference/undeclaredModuleError.errors.txt b/tests/baselines/reference/undeclaredModuleError.errors.txt index 62faef02eeac4..74e3631859582 100644 --- a/tests/baselines/reference/undeclaredModuleError.errors.txt +++ b/tests/baselines/reference/undeclaredModuleError.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/undeclaredModuleError.ts(1,21): error TS2307: Cannot find external module 'fs'. +tests/cases/compiler/undeclaredModuleError.ts(1,21): error TS2307: Cannot find module 'fs'. tests/cases/compiler/undeclaredModuleError.ts(8,29): error TS2345: Argument of type '() => void' is not assignable to parameter of type '(stat: any, name: string) => boolean'. Type 'void' is not assignable to type 'boolean'. tests/cases/compiler/undeclaredModuleError.ts(11,41): error TS2304: Cannot find name 'IDoNotExist'. @@ -7,7 +7,7 @@ tests/cases/compiler/undeclaredModuleError.ts(11,41): error TS2304: Cannot find ==== tests/cases/compiler/undeclaredModuleError.ts (3 errors) ==== import fs = require('fs'); ~~~~ -!!! error TS2307: Cannot find external module 'fs'. +!!! error TS2307: Cannot find module 'fs'. function readdir(path: string, accept: (stat: fs.Stats, name: string) => boolean, callback: (error: Error, results: { name: string; stat: fs.Stats; }[]) => void ) {} function join(...paths: string[]) {} From 477189dbb9f07af03aa42b394542e8d8bec38eb8 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Tue, 28 Apr 2015 17:03:39 -0700 Subject: [PATCH 6/7] Accepting new baselines --- ...eparateCompilationPlainFile-AMD.errors.txt | 4 ++-- ...teCompilationPlainFile-CommonJS.errors.txt | 4 ++-- ...eparateCompilationPlainFile-ES6.errors.txt | 4 ++-- ...rateCompilationPlainFile-System.errors.txt | 4 ++-- ...eparateCompilationPlainFile-UMD.errors.txt | 4 ++-- .../reference/systemModule1.errors.txt | 4 ++-- .../reference/systemModule10.errors.txt | 8 +++---- .../reference/systemModule10_ES5.errors.txt | 8 +++---- .../reference/systemModule11.errors.txt | 4 ++-- .../reference/systemModule9.errors.txt | 24 +++++++++---------- 10 files changed, 34 insertions(+), 34 deletions(-) diff --git a/tests/baselines/reference/separateCompilationPlainFile-AMD.errors.txt b/tests/baselines/reference/separateCompilationPlainFile-AMD.errors.txt index 3605dc7f44e99..6b80da30d33c3 100644 --- a/tests/baselines/reference/separateCompilationPlainFile-AMD.errors.txt +++ b/tests/baselines/reference/separateCompilationPlainFile-AMD.errors.txt @@ -1,10 +1,10 @@ -tests/cases/compiler/separateCompilationPlainFile-AMD.ts(2,1): error TS1208: Cannot compile non-external modules when the '--separateCompilation' flag is provided. +tests/cases/compiler/separateCompilationPlainFile-AMD.ts(2,1): error TS1208: Cannot compile namespaces when the '--separateCompilation' flag is provided. ==== tests/cases/compiler/separateCompilationPlainFile-AMD.ts (1 errors) ==== declare function run(a: number): void; ~~~~~~~ -!!! error TS1208: Cannot compile non-external modules when the '--separateCompilation' flag is provided. +!!! error TS1208: Cannot compile namespaces when the '--separateCompilation' flag is provided. run(1); \ No newline at end of file diff --git a/tests/baselines/reference/separateCompilationPlainFile-CommonJS.errors.txt b/tests/baselines/reference/separateCompilationPlainFile-CommonJS.errors.txt index d56e82fd6e181..48a23a39653a6 100644 --- a/tests/baselines/reference/separateCompilationPlainFile-CommonJS.errors.txt +++ b/tests/baselines/reference/separateCompilationPlainFile-CommonJS.errors.txt @@ -1,10 +1,10 @@ -tests/cases/compiler/separateCompilationPlainFile-CommonJS.ts(2,1): error TS1208: Cannot compile non-external modules when the '--separateCompilation' flag is provided. +tests/cases/compiler/separateCompilationPlainFile-CommonJS.ts(2,1): error TS1208: Cannot compile namespaces when the '--separateCompilation' flag is provided. ==== tests/cases/compiler/separateCompilationPlainFile-CommonJS.ts (1 errors) ==== declare function run(a: number): void; ~~~~~~~ -!!! error TS1208: Cannot compile non-external modules when the '--separateCompilation' flag is provided. +!!! error TS1208: Cannot compile namespaces when the '--separateCompilation' flag is provided. run(1); \ No newline at end of file diff --git a/tests/baselines/reference/separateCompilationPlainFile-ES6.errors.txt b/tests/baselines/reference/separateCompilationPlainFile-ES6.errors.txt index 6054ab552c8b9..b0b059c73bdb9 100644 --- a/tests/baselines/reference/separateCompilationPlainFile-ES6.errors.txt +++ b/tests/baselines/reference/separateCompilationPlainFile-ES6.errors.txt @@ -1,10 +1,10 @@ -tests/cases/compiler/separateCompilationPlainFile-ES6.ts(2,1): error TS1208: Cannot compile non-external modules when the '--separateCompilation' flag is provided. +tests/cases/compiler/separateCompilationPlainFile-ES6.ts(2,1): error TS1208: Cannot compile namespaces when the '--separateCompilation' flag is provided. ==== tests/cases/compiler/separateCompilationPlainFile-ES6.ts (1 errors) ==== declare function run(a: number): void; ~~~~~~~ -!!! error TS1208: Cannot compile non-external modules when the '--separateCompilation' flag is provided. +!!! error TS1208: Cannot compile namespaces when the '--separateCompilation' flag is provided. run(1); \ No newline at end of file diff --git a/tests/baselines/reference/separateCompilationPlainFile-System.errors.txt b/tests/baselines/reference/separateCompilationPlainFile-System.errors.txt index 716909cee4f36..c3161c572754f 100644 --- a/tests/baselines/reference/separateCompilationPlainFile-System.errors.txt +++ b/tests/baselines/reference/separateCompilationPlainFile-System.errors.txt @@ -1,10 +1,10 @@ -tests/cases/compiler/separateCompilationPlainFile-System.ts(2,1): error TS1208: Cannot compile non-external modules when the '--separateCompilation' flag is provided. +tests/cases/compiler/separateCompilationPlainFile-System.ts(2,1): error TS1208: Cannot compile namespaces when the '--separateCompilation' flag is provided. ==== tests/cases/compiler/separateCompilationPlainFile-System.ts (1 errors) ==== declare function run(a: number): void; ~~~~~~~ -!!! error TS1208: Cannot compile non-external modules when the '--separateCompilation' flag is provided. +!!! error TS1208: Cannot compile namespaces when the '--separateCompilation' flag is provided. run(1); \ No newline at end of file diff --git a/tests/baselines/reference/separateCompilationPlainFile-UMD.errors.txt b/tests/baselines/reference/separateCompilationPlainFile-UMD.errors.txt index c86daeabddfa7..6a0fb1ac8df05 100644 --- a/tests/baselines/reference/separateCompilationPlainFile-UMD.errors.txt +++ b/tests/baselines/reference/separateCompilationPlainFile-UMD.errors.txt @@ -1,10 +1,10 @@ -tests/cases/compiler/separateCompilationPlainFile-UMD.ts(2,1): error TS1208: Cannot compile non-external modules when the '--separateCompilation' flag is provided. +tests/cases/compiler/separateCompilationPlainFile-UMD.ts(2,1): error TS1208: Cannot compile namespaces when the '--separateCompilation' flag is provided. ==== tests/cases/compiler/separateCompilationPlainFile-UMD.ts (1 errors) ==== declare function run(a: number): void; ~~~~~~~ -!!! error TS1208: Cannot compile non-external modules when the '--separateCompilation' flag is provided. +!!! error TS1208: Cannot compile namespaces when the '--separateCompilation' flag is provided. run(1); \ No newline at end of file diff --git a/tests/baselines/reference/systemModule1.errors.txt b/tests/baselines/reference/systemModule1.errors.txt index a01e4795d102c..18b64607455e3 100644 --- a/tests/baselines/reference/systemModule1.errors.txt +++ b/tests/baselines/reference/systemModule1.errors.txt @@ -1,7 +1,7 @@ -error TS1204: Cannot compile external modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher. +error TS1204: Cannot compile modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher. -!!! error TS1204: Cannot compile external modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher. +!!! error TS1204: Cannot compile modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher. ==== tests/cases/compiler/systemModule1.ts (0 errors) ==== export var x = 1; \ No newline at end of file diff --git a/tests/baselines/reference/systemModule10.errors.txt b/tests/baselines/reference/systemModule10.errors.txt index 9be815836aae8..524e9bbe85d91 100644 --- a/tests/baselines/reference/systemModule10.errors.txt +++ b/tests/baselines/reference/systemModule10.errors.txt @@ -1,15 +1,15 @@ -tests/cases/compiler/systemModule10.ts(2,20): error TS2307: Cannot find external module 'file1'. -tests/cases/compiler/systemModule10.ts(3,21): error TS2307: Cannot find external module 'file2'. +tests/cases/compiler/systemModule10.ts(2,20): error TS2307: Cannot find module 'file1'. +tests/cases/compiler/systemModule10.ts(3,21): error TS2307: Cannot find module 'file2'. ==== tests/cases/compiler/systemModule10.ts (2 errors) ==== import n, {x} from 'file1' ~~~~~~~ -!!! error TS2307: Cannot find external module 'file1'. +!!! error TS2307: Cannot find module 'file1'. import n2 = require('file2'); ~~~~~~~ -!!! error TS2307: Cannot find external module 'file2'. +!!! error TS2307: Cannot find module 'file2'. export {x} export {x as y} export {n} diff --git a/tests/baselines/reference/systemModule10_ES5.errors.txt b/tests/baselines/reference/systemModule10_ES5.errors.txt index 5c384837a8404..6f0e530516658 100644 --- a/tests/baselines/reference/systemModule10_ES5.errors.txt +++ b/tests/baselines/reference/systemModule10_ES5.errors.txt @@ -1,15 +1,15 @@ -tests/cases/compiler/systemModule10_ES5.ts(2,20): error TS2307: Cannot find external module 'file1'. -tests/cases/compiler/systemModule10_ES5.ts(3,21): error TS2307: Cannot find external module 'file2'. +tests/cases/compiler/systemModule10_ES5.ts(2,20): error TS2307: Cannot find module 'file1'. +tests/cases/compiler/systemModule10_ES5.ts(3,21): error TS2307: Cannot find module 'file2'. ==== tests/cases/compiler/systemModule10_ES5.ts (2 errors) ==== import n, {x} from 'file1' ~~~~~~~ -!!! error TS2307: Cannot find external module 'file1'. +!!! error TS2307: Cannot find module 'file1'. import n2 = require('file2'); ~~~~~~~ -!!! error TS2307: Cannot find external module 'file2'. +!!! error TS2307: Cannot find module 'file2'. export {x} export {x as y} export {n} diff --git a/tests/baselines/reference/systemModule11.errors.txt b/tests/baselines/reference/systemModule11.errors.txt index a2c30e5fa6401..daa830b565a59 100644 --- a/tests/baselines/reference/systemModule11.errors.txt +++ b/tests/baselines/reference/systemModule11.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/systemModule11.ts(3,17): error TS2307: Cannot find external module 'bar'. +tests/cases/compiler/systemModule11.ts(3,17): error TS2307: Cannot find module 'bar'. ==== tests/cases/compiler/systemModule11.ts (1 errors) ==== @@ -6,6 +6,6 @@ tests/cases/compiler/systemModule11.ts(3,17): error TS2307: Cannot find external import 'foo' import {f} from 'bar'; ~~~~~ -!!! error TS2307: Cannot find external module 'bar'. +!!! error TS2307: Cannot find module 'bar'. f(); \ No newline at end of file diff --git a/tests/baselines/reference/systemModule9.errors.txt b/tests/baselines/reference/systemModule9.errors.txt index f997ed97703a5..27af70cce6a03 100644 --- a/tests/baselines/reference/systemModule9.errors.txt +++ b/tests/baselines/reference/systemModule9.errors.txt @@ -1,29 +1,29 @@ -tests/cases/compiler/systemModule9.ts(2,21): error TS2307: Cannot find external module 'file1'. -tests/cases/compiler/systemModule9.ts(3,25): error TS2307: Cannot find external module 'file2'. -tests/cases/compiler/systemModule9.ts(4,15): error TS2307: Cannot find external module 'file3'. -tests/cases/compiler/systemModule9.ts(6,25): error TS2307: Cannot find external module 'file5'. -tests/cases/compiler/systemModule9.ts(7,22): error TS2307: Cannot find external module 'file6'. -tests/cases/compiler/systemModule9.ts(17,15): error TS2307: Cannot find external module 'file7'. +tests/cases/compiler/systemModule9.ts(2,21): error TS2307: Cannot find module 'file1'. +tests/cases/compiler/systemModule9.ts(3,25): error TS2307: Cannot find module 'file2'. +tests/cases/compiler/systemModule9.ts(4,15): error TS2307: Cannot find module 'file3'. +tests/cases/compiler/systemModule9.ts(6,25): error TS2307: Cannot find module 'file5'. +tests/cases/compiler/systemModule9.ts(7,22): error TS2307: Cannot find module 'file6'. +tests/cases/compiler/systemModule9.ts(17,15): error TS2307: Cannot find module 'file7'. ==== tests/cases/compiler/systemModule9.ts (6 errors) ==== import * as ns from 'file1'; ~~~~~~~ -!!! error TS2307: Cannot find external module 'file1'. +!!! error TS2307: Cannot find module 'file1'. import {a, b as c} from 'file2'; ~~~~~~~ -!!! error TS2307: Cannot find external module 'file2'. +!!! error TS2307: Cannot find module 'file2'. import d from 'file3' ~~~~~~~ -!!! error TS2307: Cannot find external module 'file3'. +!!! error TS2307: Cannot find module 'file3'. import 'file4' import e, * as ns2 from 'file5'; ~~~~~~~ -!!! error TS2307: Cannot find external module 'file5'. +!!! error TS2307: Cannot find module 'file5'. import ns3 = require('file6'); ~~~~~~~ -!!! error TS2307: Cannot find external module 'file6'. +!!! error TS2307: Cannot find module 'file6'. ns.f(); a(); @@ -35,7 +35,7 @@ tests/cases/compiler/systemModule9.ts(17,15): error TS2307: Cannot find external export * from 'file7'; ~~~~~~~ -!!! error TS2307: Cannot find external module 'file7'. +!!! error TS2307: Cannot find module 'file7'. var x, y = true; export {x}; From 4db61d84be6ecd6649a9797b7c1717ebf9968f33 Mon Sep 17 00:00:00 2001 From: Mohamed Hegazy Date: Tue, 28 Apr 2015 17:13:47 -0700 Subject: [PATCH 7/7] Accept baselines --- .../reference/constDeclarations-access5.errors.txt | 12 ++---------- tests/baselines/reference/es6-amd.errors.txt | 11 ++--------- .../reference/es6-declaration-amd.errors.txt | 11 ++--------- .../baselines/reference/es6-sourcemap-amd.errors.txt | 11 ++--------- tests/baselines/reference/es6-umd.errors.txt | 11 ++--------- tests/baselines/reference/es6-umd2.errors.txt | 11 ++--------- ...tDefaultBindingFollowedWithNamedImport.errors.txt | 11 ++--------- .../reference/es6ImportNameSpaceImport.errors.txt | 11 ++--------- .../reference/es6ImportNamedImport.errors.txt | 11 ++--------- ...es6ImportNamedImportInExportAssignment.errors.txt | 12 ++---------- .../es6ModuleWithModuleGenTargetAmd.errors.txt | 11 ++--------- .../es6ModuleWithModuleGenTargetCommonjs.errors.txt | 11 ++--------- 12 files changed, 24 insertions(+), 110 deletions(-) diff --git a/tests/baselines/reference/constDeclarations-access5.errors.txt b/tests/baselines/reference/constDeclarations-access5.errors.txt index 6e72fa9ecff78..d58abfe6bd4a3 100644 --- a/tests/baselines/reference/constDeclarations-access5.errors.txt +++ b/tests/baselines/reference/constDeclarations-access5.errors.txt @@ -1,8 +1,4 @@ -<<<<<<< HEAD -error TS1204: Cannot compile modules into 'amd', 'commonjs' or 'umd' when targeting 'ES6' or higher. -======= -error TS1204: Cannot compile external modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher. ->>>>>>> master +error TS1204: Cannot compile modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher. tests/cases/compiler/constDeclarations_access_2.ts(2,1): error TS1202: Import assignment cannot be used when targeting ECMAScript 6 or higher. Consider using 'import * as ns from "mod"', 'import {a} from "mod"' or 'import d from "mod"' instead. tests/cases/compiler/constDeclarations_access_2.ts(4,1): error TS2450: Left-hand side of assignment expression cannot be a constant. tests/cases/compiler/constDeclarations_access_2.ts(5,1): error TS2450: Left-hand side of assignment expression cannot be a constant. @@ -24,11 +20,7 @@ tests/cases/compiler/constDeclarations_access_2.ts(22,3): error TS2449: The oper tests/cases/compiler/constDeclarations_access_2.ts(24,1): error TS2450: Left-hand side of assignment expression cannot be a constant. -<<<<<<< HEAD -!!! error TS1204: Cannot compile modules into 'amd', 'commonjs' or 'umd' when targeting 'ES6' or higher. -======= -!!! error TS1204: Cannot compile external modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher. ->>>>>>> master +!!! error TS1204: Cannot compile modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher. ==== tests/cases/compiler/constDeclarations_access_2.ts (19 errors) ==== /// import m = require('constDeclarations_access_1'); diff --git a/tests/baselines/reference/es6-amd.errors.txt b/tests/baselines/reference/es6-amd.errors.txt index 76a234523c6a7..b4a6442458b78 100644 --- a/tests/baselines/reference/es6-amd.errors.txt +++ b/tests/baselines/reference/es6-amd.errors.txt @@ -1,14 +1,7 @@ -<<<<<<< HEAD -error TS1204: Cannot compile modules into 'amd', 'commonjs' or 'umd' when targeting 'ES6' or higher. +error TS1204: Cannot compile modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher. -!!! error TS1204: Cannot compile modules into 'amd', 'commonjs' or 'umd' when targeting 'ES6' or higher. -======= -error TS1204: Cannot compile external modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher. - - -!!! error TS1204: Cannot compile external modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher. ->>>>>>> master +!!! error TS1204: Cannot compile modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher. ==== tests/cases/compiler/es6-amd.ts (0 errors) ==== class A diff --git a/tests/baselines/reference/es6-declaration-amd.errors.txt b/tests/baselines/reference/es6-declaration-amd.errors.txt index 8e44033bdb9d7..fe5a254dd54a4 100644 --- a/tests/baselines/reference/es6-declaration-amd.errors.txt +++ b/tests/baselines/reference/es6-declaration-amd.errors.txt @@ -1,14 +1,7 @@ -<<<<<<< HEAD -error TS1204: Cannot compile modules into 'amd', 'commonjs' or 'umd' when targeting 'ES6' or higher. +error TS1204: Cannot compile modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher. -!!! error TS1204: Cannot compile modules into 'amd', 'commonjs' or 'umd' when targeting 'ES6' or higher. -======= -error TS1204: Cannot compile external modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher. - - -!!! error TS1204: Cannot compile external modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher. ->>>>>>> master +!!! error TS1204: Cannot compile modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher. ==== tests/cases/compiler/es6-declaration-amd.ts (0 errors) ==== class A diff --git a/tests/baselines/reference/es6-sourcemap-amd.errors.txt b/tests/baselines/reference/es6-sourcemap-amd.errors.txt index 35d109a41c576..8ffa16aaa2397 100644 --- a/tests/baselines/reference/es6-sourcemap-amd.errors.txt +++ b/tests/baselines/reference/es6-sourcemap-amd.errors.txt @@ -1,14 +1,7 @@ -<<<<<<< HEAD -error TS1204: Cannot compile modules into 'amd', 'commonjs' or 'umd' when targeting 'ES6' or higher. +error TS1204: Cannot compile modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher. -!!! error TS1204: Cannot compile modules into 'amd', 'commonjs' or 'umd' when targeting 'ES6' or higher. -======= -error TS1204: Cannot compile external modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher. - - -!!! error TS1204: Cannot compile external modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher. ->>>>>>> master +!!! error TS1204: Cannot compile modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher. ==== tests/cases/compiler/es6-sourcemap-amd.ts (0 errors) ==== class A diff --git a/tests/baselines/reference/es6-umd.errors.txt b/tests/baselines/reference/es6-umd.errors.txt index 206aabe9c7a4a..72a58585073bc 100644 --- a/tests/baselines/reference/es6-umd.errors.txt +++ b/tests/baselines/reference/es6-umd.errors.txt @@ -1,14 +1,7 @@ -<<<<<<< HEAD -error TS1204: Cannot compile modules into 'amd', 'commonjs' or 'umd' when targeting 'ES6' or higher. +error TS1204: Cannot compile modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher. -!!! error TS1204: Cannot compile modules into 'amd', 'commonjs' or 'umd' when targeting 'ES6' or higher. -======= -error TS1204: Cannot compile external modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher. - - -!!! error TS1204: Cannot compile external modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher. ->>>>>>> master +!!! error TS1204: Cannot compile modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher. ==== tests/cases/compiler/es6-umd.ts (0 errors) ==== class A diff --git a/tests/baselines/reference/es6-umd2.errors.txt b/tests/baselines/reference/es6-umd2.errors.txt index f64f018f653e7..00becfb105fa1 100644 --- a/tests/baselines/reference/es6-umd2.errors.txt +++ b/tests/baselines/reference/es6-umd2.errors.txt @@ -1,14 +1,7 @@ -<<<<<<< HEAD -error TS1204: Cannot compile modules into 'amd', 'commonjs' or 'umd' when targeting 'ES6' or higher. +error TS1204: Cannot compile modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher. -!!! error TS1204: Cannot compile modules into 'amd', 'commonjs' or 'umd' when targeting 'ES6' or higher. -======= -error TS1204: Cannot compile external modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher. - - -!!! error TS1204: Cannot compile external modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher. ->>>>>>> master +!!! error TS1204: Cannot compile modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher. ==== tests/cases/compiler/es6-umd2.ts (0 errors) ==== export class A diff --git a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImport.errors.txt b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImport.errors.txt index 0578172af10de..2688d4af06f1c 100644 --- a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImport.errors.txt +++ b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImport.errors.txt @@ -1,14 +1,7 @@ -<<<<<<< HEAD -error TS1204: Cannot compile modules into 'amd', 'commonjs' or 'umd' when targeting 'ES6' or higher. +error TS1204: Cannot compile modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher. -!!! error TS1204: Cannot compile modules into 'amd', 'commonjs' or 'umd' when targeting 'ES6' or higher. -======= -error TS1204: Cannot compile external modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher. - - -!!! error TS1204: Cannot compile external modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher. ->>>>>>> master +!!! error TS1204: Cannot compile modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher. ==== tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImport_0.ts (0 errors) ==== export var a = 10; diff --git a/tests/baselines/reference/es6ImportNameSpaceImport.errors.txt b/tests/baselines/reference/es6ImportNameSpaceImport.errors.txt index d39f89685a2a2..00a6dcb2cfddb 100644 --- a/tests/baselines/reference/es6ImportNameSpaceImport.errors.txt +++ b/tests/baselines/reference/es6ImportNameSpaceImport.errors.txt @@ -1,14 +1,7 @@ -<<<<<<< HEAD -error TS1204: Cannot compile modules into 'amd', 'commonjs' or 'umd' when targeting 'ES6' or higher. +error TS1204: Cannot compile modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher. -!!! error TS1204: Cannot compile modules into 'amd', 'commonjs' or 'umd' when targeting 'ES6' or higher. -======= -error TS1204: Cannot compile external modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher. - - -!!! error TS1204: Cannot compile external modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher. ->>>>>>> master +!!! error TS1204: Cannot compile modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher. ==== tests/cases/compiler/es6ImportNameSpaceImport_0.ts (0 errors) ==== export var a = 10; diff --git a/tests/baselines/reference/es6ImportNamedImport.errors.txt b/tests/baselines/reference/es6ImportNamedImport.errors.txt index 9eeca83953f2b..12dcf331967e6 100644 --- a/tests/baselines/reference/es6ImportNamedImport.errors.txt +++ b/tests/baselines/reference/es6ImportNamedImport.errors.txt @@ -1,14 +1,7 @@ -<<<<<<< HEAD -error TS1204: Cannot compile modules into 'amd', 'commonjs' or 'umd' when targeting 'ES6' or higher. +error TS1204: Cannot compile modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher. -!!! error TS1204: Cannot compile modules into 'amd', 'commonjs' or 'umd' when targeting 'ES6' or higher. -======= -error TS1204: Cannot compile external modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher. - - -!!! error TS1204: Cannot compile external modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher. ->>>>>>> master +!!! error TS1204: Cannot compile modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher. ==== tests/cases/compiler/es6ImportNamedImport_0.ts (0 errors) ==== export var a = 10; diff --git a/tests/baselines/reference/es6ImportNamedImportInExportAssignment.errors.txt b/tests/baselines/reference/es6ImportNamedImportInExportAssignment.errors.txt index 827833a258872..970c51973b218 100644 --- a/tests/baselines/reference/es6ImportNamedImportInExportAssignment.errors.txt +++ b/tests/baselines/reference/es6ImportNamedImportInExportAssignment.errors.txt @@ -1,16 +1,8 @@ -<<<<<<< HEAD -error TS1204: Cannot compile modules into 'amd', 'commonjs' or 'umd' when targeting 'ES6' or higher. +error TS1204: Cannot compile modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher. tests/cases/compiler/es6ImportNamedImportInExportAssignment_1.ts(2,1): error TS1203: Export assignment cannot be used when targeting ECMAScript 6 or higher. Consider using 'export default' instead. -!!! error TS1204: Cannot compile modules into 'amd', 'commonjs' or 'umd' when targeting 'ES6' or higher. -======= -error TS1204: Cannot compile external modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher. -tests/cases/compiler/es6ImportNamedImportInExportAssignment_1.ts(2,1): error TS1203: Export assignment cannot be used when targeting ECMAScript 6 or higher. Consider using 'export default' instead. - - -!!! error TS1204: Cannot compile external modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher. ->>>>>>> master +!!! error TS1204: Cannot compile modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher. ==== tests/cases/compiler/es6ImportNamedImportInExportAssignment_0.ts (0 errors) ==== export var a = 10; diff --git a/tests/baselines/reference/es6ModuleWithModuleGenTargetAmd.errors.txt b/tests/baselines/reference/es6ModuleWithModuleGenTargetAmd.errors.txt index e869ef94f03e1..9592a9f899e64 100644 --- a/tests/baselines/reference/es6ModuleWithModuleGenTargetAmd.errors.txt +++ b/tests/baselines/reference/es6ModuleWithModuleGenTargetAmd.errors.txt @@ -1,14 +1,7 @@ -<<<<<<< HEAD -error TS1204: Cannot compile modules into 'amd', 'commonjs' or 'umd' when targeting 'ES6' or higher. +error TS1204: Cannot compile modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher. -!!! error TS1204: Cannot compile modules into 'amd', 'commonjs' or 'umd' when targeting 'ES6' or higher. -======= -error TS1204: Cannot compile external modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher. - - -!!! error TS1204: Cannot compile external modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher. ->>>>>>> master +!!! error TS1204: Cannot compile modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher. ==== tests/cases/compiler/es6ModuleWithModuleGenTargetAmd.ts (0 errors) ==== export class A { diff --git a/tests/baselines/reference/es6ModuleWithModuleGenTargetCommonjs.errors.txt b/tests/baselines/reference/es6ModuleWithModuleGenTargetCommonjs.errors.txt index 410de3005da8c..b740104009982 100644 --- a/tests/baselines/reference/es6ModuleWithModuleGenTargetCommonjs.errors.txt +++ b/tests/baselines/reference/es6ModuleWithModuleGenTargetCommonjs.errors.txt @@ -1,14 +1,7 @@ -<<<<<<< HEAD -error TS1204: Cannot compile modules into 'amd', 'commonjs' or 'umd' when targeting 'ES6' or higher. +error TS1204: Cannot compile modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher. -!!! error TS1204: Cannot compile modules into 'amd', 'commonjs' or 'umd' when targeting 'ES6' or higher. -======= -error TS1204: Cannot compile external modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher. - - -!!! error TS1204: Cannot compile external modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher. ->>>>>>> master +!!! error TS1204: Cannot compile modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher. ==== tests/cases/compiler/es6ModuleWithModuleGenTargetCommonjs.ts (0 errors) ==== export class A {