diff --git a/tests/baselines/reference/ClassAndModuleWithSameNameAndCommonRoot.errors.txt b/tests/baselines/reference/ClassAndModuleWithSameNameAndCommonRoot.errors.txt index 6674f0311f1..d47fc51f4e8 100644 --- a/tests/baselines/reference/ClassAndModuleWithSameNameAndCommonRoot.errors.txt +++ b/tests/baselines/reference/ClassAndModuleWithSameNameAndCommonRoot.errors.txt @@ -13,12 +13,10 @@ ==== tests/cases/conformance/internalModules/DeclarationMerging/module.ts (1 errors) ==== module X.Y { export module Point { - ~~~~~~~~~~~~~~~~~~~~~ + ~~~~~ +!!! A module declaration cannot be in a different file from a class or function with which it is merged export var Origin = new Point(0, 0); - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } - ~~~~~ -!!! Module declaration cannot be in different file from class or function with which it is merged } ==== tests/cases/conformance/internalModules/DeclarationMerging/test.ts (0 errors) ==== diff --git a/tests/baselines/reference/FunctionAndModuleWithSameNameAndCommonRoot.errors.txt b/tests/baselines/reference/FunctionAndModuleWithSameNameAndCommonRoot.errors.txt index 8c1c451389a..1a9ea82a006 100644 --- a/tests/baselines/reference/FunctionAndModuleWithSameNameAndCommonRoot.errors.txt +++ b/tests/baselines/reference/FunctionAndModuleWithSameNameAndCommonRoot.errors.txt @@ -8,12 +8,10 @@ ==== tests/cases/conformance/internalModules/DeclarationMerging/module.ts (1 errors) ==== module A { export module Point { - ~~~~~~~~~~~~~~~~~~~~~ + ~~~~~ +!!! A module declaration cannot be in a different file from a class or function with which it is merged export var Origin = { x: 0, y: 0 }; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } - ~~~~~ -!!! Module declaration cannot be in different file from class or function with which it is merged } ==== tests/cases/conformance/internalModules/DeclarationMerging/test.ts (1 errors) ==== diff --git a/tests/baselines/reference/ModuleAndClassWithSameNameAndCommonRoot.errors.txt b/tests/baselines/reference/ModuleAndClassWithSameNameAndCommonRoot.errors.txt index 89f4449b95e..f8e4561e9a7 100644 --- a/tests/baselines/reference/ModuleAndClassWithSameNameAndCommonRoot.errors.txt +++ b/tests/baselines/reference/ModuleAndClassWithSameNameAndCommonRoot.errors.txt @@ -1,12 +1,10 @@ ==== tests/cases/conformance/internalModules/DeclarationMerging/module.ts (1 errors) ==== module X.Y { export module Point { - ~~~~~~~~~~~~~~~~~~~~~ + ~~~~~ +!!! A module declaration cannot be in a different file from a class or function with which it is merged export var Origin = new Point(0, 0); - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } - ~~~~~ -!!! Module declaration cannot be in different file from class or function with which it is merged } ==== tests/cases/conformance/internalModules/DeclarationMerging/classPoint.ts (0 errors) ==== @@ -24,12 +22,10 @@ ==== tests/cases/conformance/internalModules/DeclarationMerging/simple.ts (1 errors) ==== module A { - ~~~~~~~~~~ + ~ +!!! A module declaration cannot be located prior to a class or function with which it is merged export var Instance = new A(); - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } - ~ -!!! Module declaration cannot be located prior to class or function with which it is merged // duplicate identifier class A { diff --git a/tests/baselines/reference/ModuleAndFunctionWithSameNameAndCommonRoot.errors.txt b/tests/baselines/reference/ModuleAndFunctionWithSameNameAndCommonRoot.errors.txt index 2baeeccbffb..707e0dec513 100644 --- a/tests/baselines/reference/ModuleAndFunctionWithSameNameAndCommonRoot.errors.txt +++ b/tests/baselines/reference/ModuleAndFunctionWithSameNameAndCommonRoot.errors.txt @@ -1,12 +1,10 @@ ==== tests/cases/conformance/internalModules/DeclarationMerging/module.ts (1 errors) ==== module A { export module Point { - ~~~~~~~~~~~~~~~~~~~~~ + ~~~~~ +!!! A module declaration cannot be in a different file from a class or function with which it is merged export var Origin = { x: 0, y: 0 }; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } - ~~~~~ -!!! Module declaration cannot be in different file from class or function with which it is merged } ==== tests/cases/conformance/internalModules/DeclarationMerging/function.ts (0 errors) ==== @@ -21,12 +19,10 @@ module B { export module Point { - ~~~~~~~~~~~~~~~~~~~~~ + ~~~~~ +!!! A module declaration cannot be located prior to a class or function with which it is merged export var Origin = { x: 0, y: 0 }; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } - ~~~~~ -!!! Module declaration cannot be located prior to class or function with which it is merged // duplicate identifier error export function Point() { diff --git a/tests/baselines/reference/ambientErrors.errors.txt b/tests/baselines/reference/ambientErrors.errors.txt index 07c0259860b..146f9322100 100644 --- a/tests/baselines/reference/ambientErrors.errors.txt +++ b/tests/baselines/reference/ambientErrors.errors.txt @@ -72,13 +72,13 @@ // Ambient external module not in the global module module M2 { declare module 'nope' { } - ~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~ !!! Ambient external 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' { } - ~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~ !!! Ambient external module declaration cannot specify relative module name. // Ambient external module with export assignment and other exported members diff --git a/tests/baselines/reference/ambientExternalModuleInAnotherExternalModule.errors.txt b/tests/baselines/reference/ambientExternalModuleInAnotherExternalModule.errors.txt index 769f440b2db..d5fd7ed2296 100644 --- a/tests/baselines/reference/ambientExternalModuleInAnotherExternalModule.errors.txt +++ b/tests/baselines/reference/ambientExternalModuleInAnotherExternalModule.errors.txt @@ -4,12 +4,10 @@ export = D; declare module "ext" { - ~~~~~~~~~~~~~~~~~~~~~~ - export class C { } - ~~~~~~~~~~~~~~~~~~~~~~ - } - ~ + ~~~~~ !!! Ambient external modules cannot be nested in other modules. + export class C { } + } // Cannot resolve this ext module reference import ext = require("ext"); diff --git a/tests/baselines/reference/ambientExternalModuleWithRelativeModuleName.errors.txt b/tests/baselines/reference/ambientExternalModuleWithRelativeModuleName.errors.txt index 290199b0242..fba44282cc3 100644 --- a/tests/baselines/reference/ambientExternalModuleWithRelativeModuleName.errors.txt +++ b/tests/baselines/reference/ambientExternalModuleWithRelativeModuleName.errors.txt @@ -1,16 +1,12 @@ ==== tests/cases/compiler/ambientExternalModuleWithRelativeModuleName.ts (2 errors) ==== declare module "./relativeModule" { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - var x: string; - ~~~~~~~~~~~~~~~~~~ - } - ~ + ~~~~~~~~~~~~~~~~~~ !!! Ambient external module declaration cannot specify relative module name. + var x: string; + } declare module ".\\relativeModule" { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~~~~~~~~~~ +!!! Ambient external module declaration cannot specify relative module name. var x: string; - ~~~~~~~~~~~~~~~~~~ - } - ~ -!!! Ambient external module declaration cannot specify relative module name. \ No newline at end of file + } \ No newline at end of file diff --git a/tests/baselines/reference/augmentedTypesModules.errors.txt b/tests/baselines/reference/augmentedTypesModules.errors.txt index 146b0641479..6975ee37159 100644 --- a/tests/baselines/reference/augmentedTypesModules.errors.txt +++ b/tests/baselines/reference/augmentedTypesModules.errors.txt @@ -30,13 +30,13 @@ function m2() { }; // ok since the module is not instantiated module m2a { var y = 2; } - ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Module declaration cannot be located prior to 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 function m2a() { }; // error since the module is instantiated module m2b { export var y = 2; } - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Module declaration cannot be located prior to 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 function m2b() { }; // error since the module is instantiated // should be errors to have function first @@ -60,8 +60,8 @@ class m3 { } // ok since the module is not instantiated module m3a { var y = 2; } - ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Module declaration cannot be located prior to 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 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 30165cbc6dd..e25682fa39e 100644 --- a/tests/baselines/reference/augmentedTypesModules2.errors.txt +++ b/tests/baselines/reference/augmentedTypesModules2.errors.txt @@ -4,21 +4,21 @@ function m2() { }; // ok since the module is not instantiated module m2a { var y = 2; } - ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Module declaration cannot be located prior to 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 function m2a() { }; // error since the module is instantiated module m2b { export var y = 2; } - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Module declaration cannot be located prior to 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 function m2b() { }; // error since the module is instantiated function m2c() { }; module m2c { export var y = 2; } module m2cc { export var y = 2; } - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Module declaration cannot be located prior to 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 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 b2011b93734..aa5bc0336a4 100644 --- a/tests/baselines/reference/augmentedTypesModules3.errors.txt +++ b/tests/baselines/reference/augmentedTypesModules3.errors.txt @@ -4,6 +4,6 @@ class m3 { } // ok since the module is not instantiated module m3a { var y = 2; } - ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Module declaration cannot be located prior to 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 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/cloduleSplitAcrossFiles.errors.txt b/tests/baselines/reference/cloduleSplitAcrossFiles.errors.txt index c97f2e80103..4d33163d693 100644 --- a/tests/baselines/reference/cloduleSplitAcrossFiles.errors.txt +++ b/tests/baselines/reference/cloduleSplitAcrossFiles.errors.txt @@ -3,10 +3,8 @@ ==== tests/cases/compiler/cloduleSplitAcrossFiles_module.ts (1 errors) ==== module D { - ~~~~~~~~~~ + ~ +!!! A module declaration cannot be in a different file from a class or function with which it is merged export var y = "hi"; - ~~~~~~~~~~~~~~~~~~~~~~~~ } - ~ -!!! Module declaration cannot be in different file from class or function with which it is merged D.y; \ No newline at end of file diff --git a/tests/baselines/reference/funduleSplitAcrossFiles.errors.txt b/tests/baselines/reference/funduleSplitAcrossFiles.errors.txt index f98c41022c1..2d70aed4a3e 100644 --- a/tests/baselines/reference/funduleSplitAcrossFiles.errors.txt +++ b/tests/baselines/reference/funduleSplitAcrossFiles.errors.txt @@ -3,10 +3,8 @@ ==== tests/cases/compiler/funduleSplitAcrossFiles_module.ts (1 errors) ==== module D { - ~~~~~~~~~~ + ~ +!!! A module declaration cannot be in a different file from a class or function with which it is merged export var y = "hi"; - ~~~~~~~~~~~~~~~~~~~~~~~~ } - ~ -!!! Module declaration cannot be in different file from class or function with which it is merged D.y; \ No newline at end of file diff --git a/tests/baselines/reference/importDeclRefereingExternalModuleWithNoResolve.errors.txt b/tests/baselines/reference/importDeclRefereingExternalModuleWithNoResolve.errors.txt index a6a88424429..9cb444661b9 100644 --- a/tests/baselines/reference/importDeclRefereingExternalModuleWithNoResolve.errors.txt +++ b/tests/baselines/reference/importDeclRefereingExternalModuleWithNoResolve.errors.txt @@ -5,12 +5,10 @@ ~~~~~~~~~~~~~~~~ !!! Cannot find external module 'externalModule'. declare module "m1" { - ~~~~~~~~~~~~~~~~~~~~~ + ~~~~ +!!! Ambient external modules cannot be nested in other modules. import im2 = require("externalModule"); - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~ !!! Cannot find external module 'externalModule'. } - ~ -!!! Ambient external modules cannot be nested in other modules. \ No newline at end of file diff --git a/tests/baselines/reference/invalidNestedModules.errors.txt b/tests/baselines/reference/invalidNestedModules.errors.txt index 4426e9871ce..31e8ad29177 100644 --- a/tests/baselines/reference/invalidNestedModules.errors.txt +++ b/tests/baselines/reference/invalidNestedModules.errors.txt @@ -1,17 +1,12 @@ ==== tests/cases/conformance/internalModules/moduleDeclarations/invalidNestedModules.ts (2 errors) ==== module A.B.C { - ~~~ + ~ +!!! A module declaration cannot be located prior to a class or function with which it is merged export class Point { - ~~~~~~~~~~~~~~~~~~~~~~~~ x: number; - ~~~~~~~~~~~~~~~~~~ y: number; - ~~~~~~~~~~~~~~~~~~ } - ~~~~~ } - ~ -!!! Module declaration cannot be located prior to class or function with which it is merged module A { export module B { diff --git a/tests/baselines/reference/nameCollisions.errors.txt b/tests/baselines/reference/nameCollisions.errors.txt index 1982f6450d1..f6ac8c0bd67 100644 --- a/tests/baselines/reference/nameCollisions.errors.txt +++ b/tests/baselines/reference/nameCollisions.errors.txt @@ -18,12 +18,10 @@ !!! Duplicate identifier 'z'. module y { - ~~~~~~~~~~ + ~ +!!! A module declaration cannot be located prior to a class or function with which it is merged var b; - ~~~~~~~~~~~~~~ } - ~~~~~ -!!! Module declaration cannot be located prior to class or function with which it is merged class y { } // error diff --git a/tests/baselines/reference/privacyGloImport.errors.txt b/tests/baselines/reference/privacyGloImport.errors.txt index fdba7d6b441..38d31860a5b 100644 --- a/tests/baselines/reference/privacyGloImport.errors.txt +++ b/tests/baselines/reference/privacyGloImport.errors.txt @@ -23,36 +23,24 @@ declare export module "m1_M3_public" { ~~~~~~ !!! 'export' modifier must precede 'declare' modifier. - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - export function f1(); - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - export class c1 { - ~~~~~~~~~~~~~~~~~~~~~~~~~ - } - ~~~~~~~~~ - export var v1: { new (): c1; }; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - export var v2: c1; - ~~~~~~~~~~~~~~~~~~~~~~~~~~ - } - ~~~~~ + ~~~~~~~~~~~~~~ !!! Ambient external modules cannot be nested in other modules. + export function f1(); + export class c1 { + } + export var v1: { new (): c1; }; + export var v2: c1; + } declare module "m1_M4_private" { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - export function f1(); - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - export class c1 { - ~~~~~~~~~~~~~~~~~~~~~~~~~ - } - ~~~~~~~~~ - export var v1: { new (): c1; }; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - export var v2: c1; - ~~~~~~~~~~~~~~~~~~~~~~~~~~ - } - ~~~~~ + ~~~~~~~~~~~~~~~ !!! Ambient external modules cannot be nested in other modules. + export function f1(); + export class c1 { + } + export var v1: { new (): c1; }; + export var v2: c1; + } import m1_im1_private = m1_M1_public; export var m1_im1_private_v1_public = m1_im1_private.c1; @@ -177,24 +165,21 @@ declare module "abc" { ~~~~~~~ !!! A 'declare' modifier cannot be used in an already ambient context. - ~~~~~~~~~~~~~~~~~~~~~~ - } - ~~~~~~~~~ + ~~~~~ !!! Ambient external modules cannot be nested in other modules. + } } module m2 { module "abc2" { - ~~~~~~~~~~~~~~~ - } - ~~~~~~~~~ + ~~~~~~ !!! Ambient external modules cannot be nested in other modules. + } } module "abc3" { - ~~~~~~~~~~~~~~~ - } - ~~~~~ + ~~~~~~ !!! Ambient external modules cannot be nested in other modules. + } } module m2 { diff --git a/tests/baselines/reference/privacyImport.errors.txt b/tests/baselines/reference/privacyImport.errors.txt index 5758d6c5107..bb22a0c398c 100644 --- a/tests/baselines/reference/privacyImport.errors.txt +++ b/tests/baselines/reference/privacyImport.errors.txt @@ -21,36 +21,24 @@ } export declare module "m1_M3_public" { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - export function f1(); - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - export class c1 { - ~~~~~~~~~~~~~~~~~~~~~~~~~ - } - ~~~~~~~~~ - export var v1: { new (): c1; }; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - export var v2: c1; - ~~~~~~~~~~~~~~~~~~~~~~~~~~ - } - ~~~~~ + ~~~~~~~~~~~~~~ !!! Ambient external modules cannot be nested in other modules. + export function f1(); + export class c1 { + } + export var v1: { new (): c1; }; + export var v2: c1; + } declare module "m1_M4_private" { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - export function f1(); - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - export class c1 { - ~~~~~~~~~~~~~~~~~~~~~~~~~ - } - ~~~~~~~~~ - export var v1: { new (): c1; }; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - export var v2: c1; - ~~~~~~~~~~~~~~~~~~~~~~~~~~ - } - ~~~~~ + ~~~~~~~~~~~~~~~ !!! Ambient external modules cannot be nested in other modules. + export function f1(); + export class c1 { + } + export var v1: { new (): c1; }; + export var v2: c1; + } import m1_im1_private = m1_M1_public; export var m1_im1_private_v1_public = m1_im1_private.c1; @@ -133,36 +121,24 @@ } export declare module "m2_M3_public" { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - export function f1(); - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - export class c1 { - ~~~~~~~~~~~~~~~~~~~~~~~~~ - } - ~~~~~~~~~ - export var v1: { new (): c1; }; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - export var v2: c1; - ~~~~~~~~~~~~~~~~~~~~~~~~~~ - } - ~~~~~ + ~~~~~~~~~~~~~~ !!! Ambient external modules cannot be nested in other modules. + export function f1(); + export class c1 { + } + export var v1: { new (): c1; }; + export var v2: c1; + } declare module "m2_M4_private" { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - export function f1(); - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - export class c1 { - ~~~~~~~~~~~~~~~~~~~~~~~~~ - } - ~~~~~~~~~ - export var v1: { new (): c1; }; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - export var v2: c1; - ~~~~~~~~~~~~~~~~~~~~~~~~~~ - } - ~~~~~ + ~~~~~~~~~~~~~~~ !!! Ambient external modules cannot be nested in other modules. + export function f1(); + export class c1 { + } + export var v1: { new (): c1; }; + export var v2: c1; + } import m1_im1_private = m2_M1_public; export var m1_im1_private_v1_public = m1_im1_private.c1; @@ -235,20 +211,14 @@ } export declare module "glo_M2_public" { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - export function f1(); - ~~~~~~~~~~~~~~~~~~~~~~~~~ - export class c1 { - ~~~~~~~~~~~~~~~~~~~~~ - } - ~~~~~ - export var v1: { new (): c1; }; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - export var v2: c1; - ~~~~~~~~~~~~~~~~~~~~~~ - } - ~ + ~~~~~~~~~~~~~~~ !!! Ambient external modules cannot be nested in other modules. + export function f1(); + export class c1 { + } + export var v1: { new (): c1; }; + export var v2: c1; + } export module glo_M3_private { export class c1 { @@ -261,20 +231,14 @@ } export declare module "glo_M4_private" { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - export function f1(); - ~~~~~~~~~~~~~~~~~~~~~~~~~ - export class c1 { - ~~~~~~~~~~~~~~~~~~~~~ - } - ~~~~~ - export var v1: { new (): c1; }; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - export var v2: c1; - ~~~~~~~~~~~~~~~~~~~~~~ - } - ~ + ~~~~~~~~~~~~~~~~ !!! Ambient external modules cannot be nested in other modules. + export function f1(); + export class c1 { + } + export var v1: { new (): c1; }; + export var v2: c1; + } import glo_im1_private = glo_M1_public; @@ -334,217 +298,135 @@ export declare module "use_glo_M1_public" { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~~~~~~~~~~ +!!! Ambient external 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; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~ !!! Cannot find name 'use_glo_M1_public'. export var use_glo_M1_public_v3_public: () => use_glo_M1_public.c1; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ var use_glo_M1_public_v1_private: { new (): use_glo_M1_public.c1; }; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ var use_glo_M1_public_v2_private: use_glo_M1_public; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~ !!! Cannot find name 'use_glo_M1_public'. var use_glo_M1_public_v3_private: () => use_glo_M1_public.c1; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - import use_glo_M2_public = require("glo_M2_public"); - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~ !!! Cannot find external 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; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ var use_glo_M2_public_v1_private: { new (): use_glo_M2_public.c1; }; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ var use_glo_M2_public_v2_private: use_glo_M2_public; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ var use_glo_M2_public_v3_private: () => use_glo_M2_public.c1; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - module m2 { - ~~~~~~~~~~~~~~~ import errorImport = require("glo_M2_public"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! Import declarations in an internal module cannot reference an external module. - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ import nonerrorImport = glo_M1_public; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - module m5 { - ~~~~~~~~~~~~~~~~~~~ import m5_errorImport = require("glo_M2_public"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! Import declarations in an internal module cannot reference an external module. - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ import m5_nonerrorImport = glo_M1_public; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } - ~~~~~~~~~ } - ~~~~~ } - ~ -!!! Ambient external modules cannot be nested in other modules. declare module "use_glo_M3_private" { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~~~~~~~~~~~ +!!! Ambient external 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; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~ !!! Cannot find name 'use_glo_M3_private'. export var use_glo_M3_private_v3_public: () => use_glo_M3_private.c1; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ var use_glo_M3_private_v1_private: { new (): use_glo_M3_private.c1; }; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ var use_glo_M3_private_v2_private: use_glo_M3_private; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~ !!! Cannot find name 'use_glo_M3_private'. var use_glo_M3_private_v3_private: () => use_glo_M3_private.c1; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - import use_glo_M4_private = require("glo_M4_private"); - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~ !!! Cannot find external 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; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ var use_glo_M4_private_v1_private: { new (): use_glo_M4_private.c1; }; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ var use_glo_M4_private_v2_private: use_glo_M4_private; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ var use_glo_M4_private_v3_private: () => use_glo_M4_private.c1; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - module m2 { - ~~~~~~~~~~~~~~~ import errorImport = require("glo_M4_private"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! Import declarations in an internal module cannot reference an external module. - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ import nonerrorImport = glo_M3_private; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - module m5 { - ~~~~~~~~~~~~~~~~~~~ import m5_errorImport = require("glo_M4_private"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! Import declarations in an internal module cannot reference an external module. - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ import m5_nonerrorImport = glo_M3_private; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } - ~~~~~~~~~ } - ~~~~~ } - ~ -!!! Ambient external modules cannot be nested in other modules. declare module "anotherParseError" { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~~~~~~~~~~ +!!! Ambient external modules cannot be nested in other modules. module m2 { - ~~~~~~~~~~~~~~~ declare module "abc" { ~~~~~~~ !!! A 'declare' modifier cannot be used in an already ambient context. - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ~~~~~~~~~~~~~~~~~~~~~~ - } - ~~~~~~~~~ - ~~~~~~~~~ + ~~~~~ !!! Ambient external modules cannot be nested in other modules. + } } - ~~~~~ - module m2 { - ~~~~~~~~~~~~~~~ module "abc2" { - ~~~~~~~~~~~~~~~~~~~~~~~ - ~~~~~~~~~~~~~~~ + ~~~~~~ +!!! Ambient external modules cannot be nested in other modules. } - ~~~~~~~~~ - ~~~~~~~~~ -!!! Ambient external modules cannot be nested in other modules. } - ~~~~~ module "abc3" { - ~~~~~~~~~~~~~~~~~~~ - ~~~~~~~~~~~~~~~ + ~~~~~~ +!!! Ambient external modules cannot be nested in other modules. } - ~~~~~ - ~~~~~ -!!! Ambient external modules cannot be nested in other modules. } - ~ -!!! Ambient external modules cannot be nested in other modules. declare export module "anotherParseError2" { ~~~~~~ !!! 'export' modifier must precede 'declare' modifier. - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~~~~~~~~~~~ +!!! Ambient external modules cannot be nested in other modules. module m2 { - ~~~~~~~~~~~~~~~ declare module "abc" { ~~~~~~~ !!! A 'declare' modifier cannot be used in an already ambient context. - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ~~~~~~~~~~~~~~~~~~~~~~ - } - ~~~~~~~~~ - ~~~~~~~~~ + ~~~~~ !!! Ambient external modules cannot be nested in other modules. + } } - ~~~~~ - module m2 { - ~~~~~~~~~~~~~~~ module "abc2" { - ~~~~~~~~~~~~~~~~~~~~~~~ - ~~~~~~~~~~~~~~~ + ~~~~~~ +!!! Ambient external modules cannot be nested in other modules. } - ~~~~~~~~~ - ~~~~~~~~~ -!!! Ambient external modules cannot be nested in other modules. } - ~~~~~ module "abc3" { - ~~~~~~~~~~~~~~~~~~~ - ~~~~~~~~~~~~~~~ + ~~~~~~ +!!! Ambient external modules cannot be nested in other modules. } - ~~~~~ - ~~~~~ -!!! Ambient external modules cannot be nested in other modules. } - ~ -!!! Ambient external modules cannot be nested in other modules. module m2 { import m3 = require("use_glo_M1_public");