mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Update remaining test files to replace module with namespace declarations
Co-authored-by: RyanCavanaugh <6685088+RyanCavanaugh@users.noreply.github.com>
This commit is contained in:
co-authored by
RyanCavanaugh
parent
6e09dc20ed
commit
116285f84e
@@ -1,145 +0,0 @@
|
||||
commentsModules.ts(41,1): error TS1547: The 'module' keyword is not allowed for namespace declarations. Use the 'namespace' keyword instead.
|
||||
commentsModules.ts(41,11): error TS1547: The 'module' keyword is not allowed for namespace declarations. Use the 'namespace' keyword instead.
|
||||
commentsModules.ts(48,1): error TS1547: The 'module' keyword is not allowed for namespace declarations. Use the 'namespace' keyword instead.
|
||||
commentsModules.ts(48,11): error TS1547: The 'module' keyword is not allowed for namespace declarations. Use the 'namespace' keyword instead.
|
||||
commentsModules.ts(48,14): error TS1547: The 'module' keyword is not allowed for namespace declarations. Use the 'namespace' keyword instead.
|
||||
commentsModules.ts(55,1): error TS1547: The 'module' keyword is not allowed for namespace declarations. Use the 'namespace' keyword instead.
|
||||
commentsModules.ts(55,11): error TS1547: The 'module' keyword is not allowed for namespace declarations. Use the 'namespace' keyword instead.
|
||||
commentsModules.ts(55,14): error TS1547: The 'module' keyword is not allowed for namespace declarations. Use the 'namespace' keyword instead.
|
||||
commentsModules.ts(64,1): error TS1547: The 'module' keyword is not allowed for namespace declarations. Use the 'namespace' keyword instead.
|
||||
commentsModules.ts(64,11): error TS1547: The 'module' keyword is not allowed for namespace declarations. Use the 'namespace' keyword instead.
|
||||
commentsModules.ts(64,14): error TS1547: The 'module' keyword is not allowed for namespace declarations. Use the 'namespace' keyword instead.
|
||||
commentsModules.ts(73,1): error TS1547: The 'module' keyword is not allowed for namespace declarations. Use the 'namespace' keyword instead.
|
||||
commentsModules.ts(73,11): error TS1547: The 'module' keyword is not allowed for namespace declarations. Use the 'namespace' keyword instead.
|
||||
commentsModules.ts(81,1): error TS1547: The 'module' keyword is not allowed for namespace declarations. Use the 'namespace' keyword instead.
|
||||
commentsModules.ts(81,11): error TS1547: The 'module' keyword is not allowed for namespace declarations. Use the 'namespace' keyword instead.
|
||||
|
||||
|
||||
==== commentsModules.ts (15 errors) ====
|
||||
/** Module comment*/
|
||||
namespace m1 {
|
||||
/** b's comment*/
|
||||
export var b: number;
|
||||
/** foo's comment*/
|
||||
function foo() {
|
||||
return b;
|
||||
}
|
||||
/** m2 comments*/
|
||||
export namespace m2 {
|
||||
/** class comment;*/
|
||||
export class c {
|
||||
};
|
||||
/** i*/
|
||||
export var i = new c();
|
||||
}
|
||||
/** exported function*/
|
||||
export function fooExport() {
|
||||
return foo();
|
||||
}
|
||||
|
||||
// shouldn't appear
|
||||
export function foo2Export(/**hm*/ a: string) {
|
||||
}
|
||||
|
||||
/** foo3Export
|
||||
* comment
|
||||
*/
|
||||
export function foo3Export() {
|
||||
}
|
||||
|
||||
/** foo4Export
|
||||
* comment
|
||||
*/
|
||||
function foo4Export() {
|
||||
}
|
||||
} // trailing comment module
|
||||
m1.fooExport();
|
||||
var myvar = new m1.m2.c();
|
||||
/** module comment of m2.m3*/
|
||||
module m2.m3 {
|
||||
~~~~~~
|
||||
!!! error TS1547: The 'module' keyword is not allowed for namespace declarations. Use the 'namespace' keyword instead.
|
||||
~~
|
||||
!!! error TS1547: The 'module' keyword is not allowed for namespace declarations. Use the 'namespace' keyword instead.
|
||||
/** Exported class comment*/
|
||||
export class c {
|
||||
}
|
||||
} /* trailing dotted module comment*/
|
||||
new m2.m3.c();
|
||||
/** module comment of m3.m4.m5*/
|
||||
module m3.m4.m5 {
|
||||
~~~~~~
|
||||
!!! error TS1547: The 'module' keyword is not allowed for namespace declarations. Use the 'namespace' keyword instead.
|
||||
~~
|
||||
!!! error TS1547: The 'module' keyword is not allowed for namespace declarations. Use the 'namespace' keyword instead.
|
||||
~~
|
||||
!!! error TS1547: The 'module' keyword is not allowed for namespace declarations. Use the 'namespace' keyword instead.
|
||||
/** Exported class comment*/
|
||||
export class c {
|
||||
}
|
||||
} // trailing dotted module 2
|
||||
new m3.m4.m5.c();
|
||||
/** module comment of m4.m5.m6*/
|
||||
module m4.m5.m6 {
|
||||
~~~~~~
|
||||
!!! error TS1547: The 'module' keyword is not allowed for namespace declarations. Use the 'namespace' keyword instead.
|
||||
~~
|
||||
!!! error TS1547: The 'module' keyword is not allowed for namespace declarations. Use the 'namespace' keyword instead.
|
||||
~~
|
||||
!!! error TS1547: The 'module' keyword is not allowed for namespace declarations. Use the 'namespace' keyword instead.
|
||||
export namespace m7 {
|
||||
/** Exported class comment*/
|
||||
export class c {
|
||||
}
|
||||
} /* trailing inner module */ /* multiple comments*/
|
||||
}
|
||||
new m4.m5.m6.m7.c();
|
||||
/** module comment of m5.m6.m7*/
|
||||
module m5.m6.m7 {
|
||||
~~~~~~
|
||||
!!! error TS1547: The 'module' keyword is not allowed for namespace declarations. Use the 'namespace' keyword instead.
|
||||
~~
|
||||
!!! error TS1547: The 'module' keyword is not allowed for namespace declarations. Use the 'namespace' keyword instead.
|
||||
~~
|
||||
!!! error TS1547: The 'module' keyword is not allowed for namespace declarations. Use the 'namespace' keyword instead.
|
||||
/** module m8 comment*/
|
||||
export namespace m8 {
|
||||
/** Exported class comment*/
|
||||
export class c {
|
||||
}
|
||||
}
|
||||
}
|
||||
new m5.m6.m7.m8.c();
|
||||
module m6.m7 {
|
||||
~~~~~~
|
||||
!!! error TS1547: The 'module' keyword is not allowed for namespace declarations. Use the 'namespace' keyword instead.
|
||||
~~
|
||||
!!! error TS1547: The 'module' keyword is not allowed for namespace declarations. Use the 'namespace' keyword instead.
|
||||
export namespace m8 {
|
||||
/** Exported class comment*/
|
||||
export class c {
|
||||
}
|
||||
}
|
||||
}
|
||||
new m6.m7.m8.c();
|
||||
module m7.m8 {
|
||||
~~~~~~
|
||||
!!! error TS1547: The 'module' keyword is not allowed for namespace declarations. Use the 'namespace' keyword instead.
|
||||
~~
|
||||
!!! error TS1547: The 'module' keyword is not allowed for namespace declarations. Use the 'namespace' keyword instead.
|
||||
/** module m9 comment*/
|
||||
export namespace m9 {
|
||||
/** Exported class comment*/
|
||||
export class c {
|
||||
}
|
||||
|
||||
/** class d */
|
||||
class d {
|
||||
}
|
||||
|
||||
// class e
|
||||
export class e {
|
||||
}
|
||||
}
|
||||
}
|
||||
new m7.m8.m9.c();
|
||||
@@ -41,21 +41,21 @@ namespace m1 {
|
||||
m1.fooExport();
|
||||
var myvar = new m1.m2.c();
|
||||
/** module comment of m2.m3*/
|
||||
module m2.m3 {
|
||||
namespace m2.m3 {
|
||||
/** Exported class comment*/
|
||||
export class c {
|
||||
}
|
||||
} /* trailing dotted module comment*/
|
||||
new m2.m3.c();
|
||||
/** module comment of m3.m4.m5*/
|
||||
module m3.m4.m5 {
|
||||
namespace m3.m4.m5 {
|
||||
/** Exported class comment*/
|
||||
export class c {
|
||||
}
|
||||
} // trailing dotted module 2
|
||||
new m3.m4.m5.c();
|
||||
/** module comment of m4.m5.m6*/
|
||||
module m4.m5.m6 {
|
||||
namespace m4.m5.m6 {
|
||||
export namespace m7 {
|
||||
/** Exported class comment*/
|
||||
export class c {
|
||||
@@ -64,7 +64,7 @@ module m4.m5.m6 {
|
||||
}
|
||||
new m4.m5.m6.m7.c();
|
||||
/** module comment of m5.m6.m7*/
|
||||
module m5.m6.m7 {
|
||||
namespace m5.m6.m7 {
|
||||
/** module m8 comment*/
|
||||
export namespace m8 {
|
||||
/** Exported class comment*/
|
||||
@@ -73,7 +73,7 @@ module m5.m6.m7 {
|
||||
}
|
||||
}
|
||||
new m5.m6.m7.m8.c();
|
||||
module m6.m7 {
|
||||
namespace m6.m7 {
|
||||
export namespace m8 {
|
||||
/** Exported class comment*/
|
||||
export class c {
|
||||
@@ -81,7 +81,7 @@ module m6.m7 {
|
||||
}
|
||||
}
|
||||
new m6.m7.m8.c();
|
||||
module m7.m8 {
|
||||
namespace m7.m8 {
|
||||
/** module m9 comment*/
|
||||
export namespace m9 {
|
||||
/** Exported class comment*/
|
||||
|
||||
@@ -72,50 +72,50 @@ var myvar = new m1.m2.c();
|
||||
>c : Symbol(m1.m2.c, Decl(commentsModules.ts, 9, 25))
|
||||
|
||||
/** module comment of m2.m3*/
|
||||
module m2.m3 {
|
||||
namespace m2.m3 {
|
||||
>m2 : Symbol(m2, Decl(commentsModules.ts, 38, 26))
|
||||
>m3 : Symbol(m3, Decl(commentsModules.ts, 40, 10))
|
||||
>m3 : Symbol(m3, Decl(commentsModules.ts, 40, 13))
|
||||
|
||||
/** Exported class comment*/
|
||||
export class c {
|
||||
>c : Symbol(c, Decl(commentsModules.ts, 40, 14))
|
||||
>c : Symbol(c, Decl(commentsModules.ts, 40, 17))
|
||||
}
|
||||
} /* trailing dotted module comment*/
|
||||
new m2.m3.c();
|
||||
>m2.m3.c : Symbol(m2.m3.c, Decl(commentsModules.ts, 40, 14))
|
||||
>m2.m3 : Symbol(m2.m3, Decl(commentsModules.ts, 40, 10))
|
||||
>m2.m3.c : Symbol(m2.m3.c, Decl(commentsModules.ts, 40, 17))
|
||||
>m2.m3 : Symbol(m2.m3, Decl(commentsModules.ts, 40, 13))
|
||||
>m2 : Symbol(m2, Decl(commentsModules.ts, 38, 26))
|
||||
>m3 : Symbol(m2.m3, Decl(commentsModules.ts, 40, 10))
|
||||
>c : Symbol(m2.m3.c, Decl(commentsModules.ts, 40, 14))
|
||||
>m3 : Symbol(m2.m3, Decl(commentsModules.ts, 40, 13))
|
||||
>c : Symbol(m2.m3.c, Decl(commentsModules.ts, 40, 17))
|
||||
|
||||
/** module comment of m3.m4.m5*/
|
||||
module m3.m4.m5 {
|
||||
namespace m3.m4.m5 {
|
||||
>m3 : Symbol(m3, Decl(commentsModules.ts, 45, 14))
|
||||
>m4 : Symbol(m4, Decl(commentsModules.ts, 47, 10))
|
||||
>m5 : Symbol(m5, Decl(commentsModules.ts, 47, 13))
|
||||
>m4 : Symbol(m4, Decl(commentsModules.ts, 47, 13))
|
||||
>m5 : Symbol(m5, Decl(commentsModules.ts, 47, 16))
|
||||
|
||||
/** Exported class comment*/
|
||||
export class c {
|
||||
>c : Symbol(c, Decl(commentsModules.ts, 47, 17))
|
||||
>c : Symbol(c, Decl(commentsModules.ts, 47, 20))
|
||||
}
|
||||
} // trailing dotted module 2
|
||||
new m3.m4.m5.c();
|
||||
>m3.m4.m5.c : Symbol(m3.m4.m5.c, Decl(commentsModules.ts, 47, 17))
|
||||
>m3.m4.m5 : Symbol(m3.m4.m5, Decl(commentsModules.ts, 47, 13))
|
||||
>m3.m4 : Symbol(m3.m4, Decl(commentsModules.ts, 47, 10))
|
||||
>m3.m4.m5.c : Symbol(m3.m4.m5.c, Decl(commentsModules.ts, 47, 20))
|
||||
>m3.m4.m5 : Symbol(m3.m4.m5, Decl(commentsModules.ts, 47, 16))
|
||||
>m3.m4 : Symbol(m3.m4, Decl(commentsModules.ts, 47, 13))
|
||||
>m3 : Symbol(m3, Decl(commentsModules.ts, 45, 14))
|
||||
>m4 : Symbol(m3.m4, Decl(commentsModules.ts, 47, 10))
|
||||
>m5 : Symbol(m3.m4.m5, Decl(commentsModules.ts, 47, 13))
|
||||
>c : Symbol(m3.m4.m5.c, Decl(commentsModules.ts, 47, 17))
|
||||
>m4 : Symbol(m3.m4, Decl(commentsModules.ts, 47, 13))
|
||||
>m5 : Symbol(m3.m4.m5, Decl(commentsModules.ts, 47, 16))
|
||||
>c : Symbol(m3.m4.m5.c, Decl(commentsModules.ts, 47, 20))
|
||||
|
||||
/** module comment of m4.m5.m6*/
|
||||
module m4.m5.m6 {
|
||||
namespace m4.m5.m6 {
|
||||
>m4 : Symbol(m4, Decl(commentsModules.ts, 52, 17))
|
||||
>m5 : Symbol(m5, Decl(commentsModules.ts, 54, 10))
|
||||
>m6 : Symbol(m6, Decl(commentsModules.ts, 54, 13))
|
||||
>m5 : Symbol(m5, Decl(commentsModules.ts, 54, 13))
|
||||
>m6 : Symbol(m6, Decl(commentsModules.ts, 54, 16))
|
||||
|
||||
export namespace m7 {
|
||||
>m7 : Symbol(m7, Decl(commentsModules.ts, 54, 17))
|
||||
>m7 : Symbol(m7, Decl(commentsModules.ts, 54, 20))
|
||||
|
||||
/** Exported class comment*/
|
||||
export class c {
|
||||
@@ -125,24 +125,24 @@ module m4.m5.m6 {
|
||||
}
|
||||
new m4.m5.m6.m7.c();
|
||||
>m4.m5.m6.m7.c : Symbol(m4.m5.m6.m7.c, Decl(commentsModules.ts, 55, 25))
|
||||
>m4.m5.m6.m7 : Symbol(m4.m5.m6.m7, Decl(commentsModules.ts, 54, 17))
|
||||
>m4.m5.m6 : Symbol(m4.m5.m6, Decl(commentsModules.ts, 54, 13))
|
||||
>m4.m5 : Symbol(m4.m5, Decl(commentsModules.ts, 54, 10))
|
||||
>m4.m5.m6.m7 : Symbol(m4.m5.m6.m7, Decl(commentsModules.ts, 54, 20))
|
||||
>m4.m5.m6 : Symbol(m4.m5.m6, Decl(commentsModules.ts, 54, 16))
|
||||
>m4.m5 : Symbol(m4.m5, Decl(commentsModules.ts, 54, 13))
|
||||
>m4 : Symbol(m4, Decl(commentsModules.ts, 52, 17))
|
||||
>m5 : Symbol(m4.m5, Decl(commentsModules.ts, 54, 10))
|
||||
>m6 : Symbol(m4.m5.m6, Decl(commentsModules.ts, 54, 13))
|
||||
>m7 : Symbol(m4.m5.m6.m7, Decl(commentsModules.ts, 54, 17))
|
||||
>m5 : Symbol(m4.m5, Decl(commentsModules.ts, 54, 13))
|
||||
>m6 : Symbol(m4.m5.m6, Decl(commentsModules.ts, 54, 16))
|
||||
>m7 : Symbol(m4.m5.m6.m7, Decl(commentsModules.ts, 54, 20))
|
||||
>c : Symbol(m4.m5.m6.m7.c, Decl(commentsModules.ts, 55, 25))
|
||||
|
||||
/** module comment of m5.m6.m7*/
|
||||
module m5.m6.m7 {
|
||||
namespace m5.m6.m7 {
|
||||
>m5 : Symbol(m5, Decl(commentsModules.ts, 61, 20))
|
||||
>m6 : Symbol(m6, Decl(commentsModules.ts, 63, 10))
|
||||
>m7 : Symbol(m7, Decl(commentsModules.ts, 63, 13))
|
||||
>m6 : Symbol(m6, Decl(commentsModules.ts, 63, 13))
|
||||
>m7 : Symbol(m7, Decl(commentsModules.ts, 63, 16))
|
||||
|
||||
/** module m8 comment*/
|
||||
export namespace m8 {
|
||||
>m8 : Symbol(m8, Decl(commentsModules.ts, 63, 17))
|
||||
>m8 : Symbol(m8, Decl(commentsModules.ts, 63, 20))
|
||||
|
||||
/** Exported class comment*/
|
||||
export class c {
|
||||
@@ -152,21 +152,21 @@ module m5.m6.m7 {
|
||||
}
|
||||
new m5.m6.m7.m8.c();
|
||||
>m5.m6.m7.m8.c : Symbol(m5.m6.m7.m8.c, Decl(commentsModules.ts, 65, 25))
|
||||
>m5.m6.m7.m8 : Symbol(m5.m6.m7.m8, Decl(commentsModules.ts, 63, 17))
|
||||
>m5.m6.m7 : Symbol(m5.m6.m7, Decl(commentsModules.ts, 63, 13))
|
||||
>m5.m6 : Symbol(m5.m6, Decl(commentsModules.ts, 63, 10))
|
||||
>m5.m6.m7.m8 : Symbol(m5.m6.m7.m8, Decl(commentsModules.ts, 63, 20))
|
||||
>m5.m6.m7 : Symbol(m5.m6.m7, Decl(commentsModules.ts, 63, 16))
|
||||
>m5.m6 : Symbol(m5.m6, Decl(commentsModules.ts, 63, 13))
|
||||
>m5 : Symbol(m5, Decl(commentsModules.ts, 61, 20))
|
||||
>m6 : Symbol(m5.m6, Decl(commentsModules.ts, 63, 10))
|
||||
>m7 : Symbol(m5.m6.m7, Decl(commentsModules.ts, 63, 13))
|
||||
>m8 : Symbol(m5.m6.m7.m8, Decl(commentsModules.ts, 63, 17))
|
||||
>m6 : Symbol(m5.m6, Decl(commentsModules.ts, 63, 13))
|
||||
>m7 : Symbol(m5.m6.m7, Decl(commentsModules.ts, 63, 16))
|
||||
>m8 : Symbol(m5.m6.m7.m8, Decl(commentsModules.ts, 63, 20))
|
||||
>c : Symbol(m5.m6.m7.m8.c, Decl(commentsModules.ts, 65, 25))
|
||||
|
||||
module m6.m7 {
|
||||
namespace m6.m7 {
|
||||
>m6 : Symbol(m6, Decl(commentsModules.ts, 71, 20))
|
||||
>m7 : Symbol(m7, Decl(commentsModules.ts, 72, 10))
|
||||
>m7 : Symbol(m7, Decl(commentsModules.ts, 72, 13))
|
||||
|
||||
export namespace m8 {
|
||||
>m8 : Symbol(m8, Decl(commentsModules.ts, 72, 14))
|
||||
>m8 : Symbol(m8, Decl(commentsModules.ts, 72, 17))
|
||||
|
||||
/** Exported class comment*/
|
||||
export class c {
|
||||
@@ -176,20 +176,20 @@ module m6.m7 {
|
||||
}
|
||||
new m6.m7.m8.c();
|
||||
>m6.m7.m8.c : Symbol(m6.m7.m8.c, Decl(commentsModules.ts, 73, 25))
|
||||
>m6.m7.m8 : Symbol(m6.m7.m8, Decl(commentsModules.ts, 72, 14))
|
||||
>m6.m7 : Symbol(m6.m7, Decl(commentsModules.ts, 72, 10))
|
||||
>m6.m7.m8 : Symbol(m6.m7.m8, Decl(commentsModules.ts, 72, 17))
|
||||
>m6.m7 : Symbol(m6.m7, Decl(commentsModules.ts, 72, 13))
|
||||
>m6 : Symbol(m6, Decl(commentsModules.ts, 71, 20))
|
||||
>m7 : Symbol(m6.m7, Decl(commentsModules.ts, 72, 10))
|
||||
>m8 : Symbol(m6.m7.m8, Decl(commentsModules.ts, 72, 14))
|
||||
>m7 : Symbol(m6.m7, Decl(commentsModules.ts, 72, 13))
|
||||
>m8 : Symbol(m6.m7.m8, Decl(commentsModules.ts, 72, 17))
|
||||
>c : Symbol(m6.m7.m8.c, Decl(commentsModules.ts, 73, 25))
|
||||
|
||||
module m7.m8 {
|
||||
namespace m7.m8 {
|
||||
>m7 : Symbol(m7, Decl(commentsModules.ts, 79, 17))
|
||||
>m8 : Symbol(m8, Decl(commentsModules.ts, 80, 10))
|
||||
>m8 : Symbol(m8, Decl(commentsModules.ts, 80, 13))
|
||||
|
||||
/** module m9 comment*/
|
||||
export namespace m9 {
|
||||
>m9 : Symbol(m9, Decl(commentsModules.ts, 80, 14))
|
||||
>m9 : Symbol(m9, Decl(commentsModules.ts, 80, 17))
|
||||
|
||||
/** Exported class comment*/
|
||||
export class c {
|
||||
@@ -209,10 +209,10 @@ module m7.m8 {
|
||||
}
|
||||
new m7.m8.m9.c();
|
||||
>m7.m8.m9.c : Symbol(m7.m8.m9.c, Decl(commentsModules.ts, 82, 25))
|
||||
>m7.m8.m9 : Symbol(m7.m8.m9, Decl(commentsModules.ts, 80, 14))
|
||||
>m7.m8 : Symbol(m7.m8, Decl(commentsModules.ts, 80, 10))
|
||||
>m7.m8.m9 : Symbol(m7.m8.m9, Decl(commentsModules.ts, 80, 17))
|
||||
>m7.m8 : Symbol(m7.m8, Decl(commentsModules.ts, 80, 13))
|
||||
>m7 : Symbol(m7, Decl(commentsModules.ts, 79, 17))
|
||||
>m8 : Symbol(m7.m8, Decl(commentsModules.ts, 80, 10))
|
||||
>m9 : Symbol(m7.m8.m9, Decl(commentsModules.ts, 80, 14))
|
||||
>m8 : Symbol(m7.m8, Decl(commentsModules.ts, 80, 13))
|
||||
>m9 : Symbol(m7.m8.m9, Decl(commentsModules.ts, 80, 17))
|
||||
>c : Symbol(m7.m8.m9.c, Decl(commentsModules.ts, 82, 25))
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@ var myvar = new m1.m2.c();
|
||||
> : ^^^^^^^^^^^^^^
|
||||
|
||||
/** module comment of m2.m3*/
|
||||
module m2.m3 {
|
||||
namespace m2.m3 {
|
||||
>m2 : typeof m2
|
||||
> : ^^^^^^^^^
|
||||
>m3 : typeof m3
|
||||
@@ -130,7 +130,7 @@ new m2.m3.c();
|
||||
> : ^^^^^^^^^^^^^^
|
||||
|
||||
/** module comment of m3.m4.m5*/
|
||||
module m3.m4.m5 {
|
||||
namespace m3.m4.m5 {
|
||||
>m3 : typeof m3
|
||||
> : ^^^^^^^^^
|
||||
>m4 : typeof m4
|
||||
@@ -163,7 +163,7 @@ new m3.m4.m5.c();
|
||||
> : ^^^^^^^^^^^^^^^^^
|
||||
|
||||
/** module comment of m4.m5.m6*/
|
||||
module m4.m5.m6 {
|
||||
namespace m4.m5.m6 {
|
||||
>m4 : typeof m4
|
||||
> : ^^^^^^^^^
|
||||
>m5 : typeof m5
|
||||
@@ -205,7 +205,7 @@ new m4.m5.m6.m7.c();
|
||||
> : ^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
/** module comment of m5.m6.m7*/
|
||||
module m5.m6.m7 {
|
||||
namespace m5.m6.m7 {
|
||||
>m5 : typeof m5
|
||||
> : ^^^^^^^^^
|
||||
>m6 : typeof m6
|
||||
@@ -247,7 +247,7 @@ new m5.m6.m7.m8.c();
|
||||
>c : typeof m5.m6.m7.m8.c
|
||||
> : ^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
module m6.m7 {
|
||||
namespace m6.m7 {
|
||||
>m6 : typeof m6
|
||||
> : ^^^^^^^^^
|
||||
>m7 : typeof m7
|
||||
@@ -282,7 +282,7 @@ new m6.m7.m8.c();
|
||||
>c : typeof m6.m7.m8.c
|
||||
> : ^^^^^^^^^^^^^^^^^
|
||||
|
||||
module m7.m8 {
|
||||
namespace m7.m8 {
|
||||
>m7 : typeof m7
|
||||
> : ^^^^^^^^^
|
||||
>m8 : typeof m8
|
||||
|
||||
@@ -1,100 +1,100 @@
|
||||
// @target: ES5
|
||||
// @declaration: true
|
||||
// @removeComments: false
|
||||
/** Module comment*/
|
||||
namespace m1 {
|
||||
/** b's comment*/
|
||||
export var b: number;
|
||||
/** foo's comment*/
|
||||
function foo() {
|
||||
return b;
|
||||
}
|
||||
/** m2 comments*/
|
||||
export namespace m2 {
|
||||
/** class comment;*/
|
||||
export class c {
|
||||
};
|
||||
/** i*/
|
||||
export var i = new c();
|
||||
}
|
||||
/** exported function*/
|
||||
export function fooExport() {
|
||||
return foo();
|
||||
}
|
||||
|
||||
// shouldn't appear
|
||||
export function foo2Export(/**hm*/ a: string) {
|
||||
}
|
||||
|
||||
/** foo3Export
|
||||
* comment
|
||||
*/
|
||||
export function foo3Export() {
|
||||
}
|
||||
|
||||
/** foo4Export
|
||||
* comment
|
||||
*/
|
||||
function foo4Export() {
|
||||
}
|
||||
} // trailing comment module
|
||||
m1.fooExport();
|
||||
var myvar = new m1.m2.c();
|
||||
/** module comment of m2.m3*/
|
||||
module m2.m3 {
|
||||
/** Exported class comment*/
|
||||
export class c {
|
||||
}
|
||||
} /* trailing dotted module comment*/
|
||||
new m2.m3.c();
|
||||
/** module comment of m3.m4.m5*/
|
||||
module m3.m4.m5 {
|
||||
/** Exported class comment*/
|
||||
export class c {
|
||||
}
|
||||
} // trailing dotted module 2
|
||||
new m3.m4.m5.c();
|
||||
/** module comment of m4.m5.m6*/
|
||||
module m4.m5.m6 {
|
||||
export namespace m7 {
|
||||
/** Exported class comment*/
|
||||
export class c {
|
||||
}
|
||||
} /* trailing inner module */ /* multiple comments*/
|
||||
}
|
||||
new m4.m5.m6.m7.c();
|
||||
/** module comment of m5.m6.m7*/
|
||||
module m5.m6.m7 {
|
||||
/** module m8 comment*/
|
||||
export namespace m8 {
|
||||
/** Exported class comment*/
|
||||
export class c {
|
||||
}
|
||||
}
|
||||
}
|
||||
new m5.m6.m7.m8.c();
|
||||
module m6.m7 {
|
||||
export namespace m8 {
|
||||
/** Exported class comment*/
|
||||
export class c {
|
||||
}
|
||||
}
|
||||
}
|
||||
new m6.m7.m8.c();
|
||||
module m7.m8 {
|
||||
/** module m9 comment*/
|
||||
export namespace m9 {
|
||||
/** Exported class comment*/
|
||||
export class c {
|
||||
}
|
||||
|
||||
/** class d */
|
||||
class d {
|
||||
}
|
||||
|
||||
// class e
|
||||
export class e {
|
||||
}
|
||||
}
|
||||
}
|
||||
// @target: ES5
|
||||
// @declaration: true
|
||||
// @removeComments: false
|
||||
/** Module comment*/
|
||||
namespace m1 {
|
||||
/** b's comment*/
|
||||
export var b: number;
|
||||
/** foo's comment*/
|
||||
function foo() {
|
||||
return b;
|
||||
}
|
||||
/** m2 comments*/
|
||||
export namespace m2 {
|
||||
/** class comment;*/
|
||||
export class c {
|
||||
};
|
||||
/** i*/
|
||||
export var i = new c();
|
||||
}
|
||||
/** exported function*/
|
||||
export function fooExport() {
|
||||
return foo();
|
||||
}
|
||||
|
||||
// shouldn't appear
|
||||
export function foo2Export(/**hm*/ a: string) {
|
||||
}
|
||||
|
||||
/** foo3Export
|
||||
* comment
|
||||
*/
|
||||
export function foo3Export() {
|
||||
}
|
||||
|
||||
/** foo4Export
|
||||
* comment
|
||||
*/
|
||||
function foo4Export() {
|
||||
}
|
||||
} // trailing comment module
|
||||
m1.fooExport();
|
||||
var myvar = new m1.m2.c();
|
||||
/** module comment of m2.m3*/
|
||||
namespace m2.m3 {
|
||||
/** Exported class comment*/
|
||||
export class c {
|
||||
}
|
||||
} /* trailing dotted module comment*/
|
||||
new m2.m3.c();
|
||||
/** module comment of m3.m4.m5*/
|
||||
namespace m3.m4.m5 {
|
||||
/** Exported class comment*/
|
||||
export class c {
|
||||
}
|
||||
} // trailing dotted module 2
|
||||
new m3.m4.m5.c();
|
||||
/** module comment of m4.m5.m6*/
|
||||
namespace m4.m5.m6 {
|
||||
export namespace m7 {
|
||||
/** Exported class comment*/
|
||||
export class c {
|
||||
}
|
||||
} /* trailing inner module */ /* multiple comments*/
|
||||
}
|
||||
new m4.m5.m6.m7.c();
|
||||
/** module comment of m5.m6.m7*/
|
||||
namespace m5.m6.m7 {
|
||||
/** module m8 comment*/
|
||||
export namespace m8 {
|
||||
/** Exported class comment*/
|
||||
export class c {
|
||||
}
|
||||
}
|
||||
}
|
||||
new m5.m6.m7.m8.c();
|
||||
namespace m6.m7 {
|
||||
export namespace m8 {
|
||||
/** Exported class comment*/
|
||||
export class c {
|
||||
}
|
||||
}
|
||||
}
|
||||
new m6.m7.m8.c();
|
||||
namespace m7.m8 {
|
||||
/** module m9 comment*/
|
||||
export namespace m9 {
|
||||
/** Exported class comment*/
|
||||
export class c {
|
||||
}
|
||||
|
||||
/** class d */
|
||||
class d {
|
||||
}
|
||||
|
||||
// class e
|
||||
export class e {
|
||||
}
|
||||
}
|
||||
}
|
||||
new m7.m8.m9.c();
|
||||
@@ -1,10 +1,10 @@
|
||||
// @declaration: true
|
||||
module A.C {
|
||||
export interface Z {
|
||||
}
|
||||
}
|
||||
|
||||
module A.B.C {
|
||||
export class W implements A.C.Z {
|
||||
}
|
||||
// @declaration: true
|
||||
namespace A.C {
|
||||
export interface Z {
|
||||
}
|
||||
}
|
||||
|
||||
namespace A.B.C {
|
||||
export class W implements A.C.Z {
|
||||
}
|
||||
}
|
||||
@@ -1,12 +1,12 @@
|
||||
// @declaration: true
|
||||
|
||||
module X.A.C {
|
||||
export interface Z {
|
||||
}
|
||||
namespace X.A.C {
|
||||
export interface Z {
|
||||
}
|
||||
}
|
||||
module X.A.B.C {
|
||||
namespace A {
|
||||
}
|
||||
export class W implements X.A.C.Z { // This needs to be referred as X.A.C.Z as A has conflict
|
||||
}
|
||||
namespace X.A.B.C {
|
||||
namespace A {
|
||||
}
|
||||
export class W implements X.A.C.Z { // This needs to be referred as X.A.C.Z as A has conflict
|
||||
}
|
||||
}
|
||||
@@ -1,15 +1,15 @@
|
||||
// @declaration: true
|
||||
|
||||
module X.A.C {
|
||||
export interface Z {
|
||||
}
|
||||
}
|
||||
module X.A.B.C {
|
||||
export class W implements A.C.Z { // This can refer to it as A.C.Z
|
||||
}
|
||||
}
|
||||
|
||||
module X.A.B.C {
|
||||
namespace A {
|
||||
}
|
||||
namespace X.A.C {
|
||||
export interface Z {
|
||||
}
|
||||
}
|
||||
namespace X.A.B.C {
|
||||
export class W implements A.C.Z { // This can refer to it as A.C.Z
|
||||
}
|
||||
}
|
||||
|
||||
namespace X.A.B.C {
|
||||
namespace A {
|
||||
}
|
||||
}
|
||||
@@ -1,15 +1,15 @@
|
||||
// @declaration: true
|
||||
|
||||
module X.A.C {
|
||||
export interface Z {
|
||||
}
|
||||
}
|
||||
module X.A.B.C {
|
||||
export class W implements X.A.C.Z { // This needs to be referred as X.A.C.Z as A has conflict
|
||||
}
|
||||
}
|
||||
|
||||
module X.A.B.C {
|
||||
export namespace A {
|
||||
}
|
||||
namespace X.A.C {
|
||||
export interface Z {
|
||||
}
|
||||
}
|
||||
namespace X.A.B.C {
|
||||
export class W implements X.A.C.Z { // This needs to be referred as X.A.C.Z as A has conflict
|
||||
}
|
||||
}
|
||||
|
||||
namespace X.A.B.C {
|
||||
export namespace A {
|
||||
}
|
||||
}
|
||||
@@ -1,11 +1,11 @@
|
||||
// @declaration: true
|
||||
namespace M {
|
||||
module P.Q { } // This shouldnt be emitted
|
||||
}
|
||||
|
||||
namespace M {
|
||||
export module R.S { } //This should be emitted
|
||||
}
|
||||
|
||||
module T.U { // This needs to be emitted
|
||||
// @declaration: true
|
||||
namespace M {
|
||||
namespace P.Q { } // This shouldnt be emitted
|
||||
}
|
||||
|
||||
namespace M {
|
||||
export namespace R.S { } //This should be emitted
|
||||
}
|
||||
|
||||
namespace T.U { // This needs to be emitted
|
||||
}
|
||||
@@ -1,18 +1,18 @@
|
||||
namespace M {
|
||||
export namespace N {
|
||||
export function f(x:number)=>2*x;
|
||||
export module X.Y.Z {
|
||||
export var v2=f(v);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
module M.N {
|
||||
export namespace X {
|
||||
export module Y.Z {
|
||||
export var v=f(10);
|
||||
}
|
||||
}
|
||||
}
|
||||
namespace M {
|
||||
export namespace N {
|
||||
export function f(x:number)=>2*x;
|
||||
export module X.Y.Z {
|
||||
export var v2=f(v);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
namespace M.N {
|
||||
export namespace X {
|
||||
export namespace Y.Z {
|
||||
export var v=f(10);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
module A.B {
|
||||
namespace A.B {
|
||||
|
||||
export var x = 1;
|
||||
|
||||
@@ -19,7 +19,7 @@ var tmpOK = AA.B.x;
|
||||
var tmpError = A.B.x;
|
||||
|
||||
|
||||
module A.B.C
|
||||
namespace A.B.C
|
||||
|
||||
{
|
||||
|
||||
|
||||
@@ -25,8 +25,8 @@ b ++;
|
||||
namespace moduleType1 {
|
||||
export var baz1: number;
|
||||
}
|
||||
module moduleType\u0032 {
|
||||
export var baz2: number;
|
||||
namespace moduleType\u0032 {
|
||||
export var baz2: number;
|
||||
}
|
||||
|
||||
moduleType1.baz1 = 3;
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
function foo(title: string) {
|
||||
var x = 10;
|
||||
}
|
||||
|
||||
module foo.Bar {
|
||||
export function f() {
|
||||
}
|
||||
}
|
||||
|
||||
module foo.Baz {
|
||||
export function g() {
|
||||
Bar.f();
|
||||
}
|
||||
function foo(title: string) {
|
||||
var x = 10;
|
||||
}
|
||||
|
||||
namespace foo.Bar {
|
||||
export function f() {
|
||||
}
|
||||
}
|
||||
|
||||
namespace foo.Baz {
|
||||
export function g() {
|
||||
Bar.f();
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
module my.data.foo {
|
||||
namespace my.data.foo {
|
||||
export function buz() { }
|
||||
}
|
||||
module my.data {
|
||||
namespace my.data {
|
||||
function data(my) {
|
||||
foo.buz();
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
module my.data {
|
||||
namespace my.data {
|
||||
export function buz() { }
|
||||
}
|
||||
module my.data.foo {
|
||||
namespace my.data.foo {
|
||||
function data(my, foo) {
|
||||
buz();
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
module M.buz.plop {
|
||||
namespace M.buz.plop {
|
||||
export function doom() { }
|
||||
export function M() { }
|
||||
}
|
||||
module M.buz.plop {
|
||||
namespace M.buz.plop {
|
||||
function gunk() { }
|
||||
function buz() { }
|
||||
export class fudge { }
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
"use strict"
|
||||
namespace public { }
|
||||
namespace private { }
|
||||
module public.whatever {
|
||||
}
|
||||
module private.public.foo { }
|
||||
"use strict"
|
||||
namespace public { }
|
||||
namespace private { }
|
||||
namespace public.whatever {
|
||||
}
|
||||
namespace private.public.foo { }
|
||||
Reference in New Issue
Block a user