TypeScript/tests/baselines/reference/commentsModules.types

227 lines
8.7 KiB
Plaintext
Raw Normal View History

2014-08-15 23:33:16 +02:00
=== tests/cases/compiler/commentsModules.ts ===
/** Module comment*/
module m1 {
2015-04-13 23:01:57 +02:00
>m1 : typeof m1, Symbol(m1, Decl(commentsModules.ts, 0, 0))
2014-08-15 23:33:16 +02:00
/** b's comment*/
export var b: number;
2015-04-13 23:01:57 +02:00
>b : number, Symbol(b, Decl(commentsModules.ts, 3, 14))
2014-08-15 23:33:16 +02:00
/** foo's comment*/
function foo() {
2015-04-13 23:01:57 +02:00
>foo : () => number, Symbol(foo, Decl(commentsModules.ts, 3, 25))
2014-08-15 23:33:16 +02:00
return b;
2015-04-13 23:01:57 +02:00
>b : number, Symbol(b, Decl(commentsModules.ts, 3, 14))
2014-08-15 23:33:16 +02:00
}
/** m2 comments*/
export module m2 {
2015-04-13 23:01:57 +02:00
>m2 : typeof m2, Symbol(m2, Decl(commentsModules.ts, 7, 5))
2014-08-15 23:33:16 +02:00
/** class comment;*/
export class c {
2015-04-13 23:01:57 +02:00
>c : c, Symbol(c, Decl(commentsModules.ts, 9, 22))
2014-08-15 23:33:16 +02:00
};
/** i*/
export var i = new c();
2015-04-13 23:01:57 +02:00
>i : c, Symbol(i, Decl(commentsModules.ts, 14, 18))
2014-08-15 23:33:16 +02:00
>new c() : c
2015-04-13 23:01:57 +02:00
>c : typeof c, Symbol(c, Decl(commentsModules.ts, 9, 22))
2014-08-15 23:33:16 +02:00
}
/** exported function*/
export function fooExport() {
2015-04-13 23:01:57 +02:00
>fooExport : () => number, Symbol(fooExport, Decl(commentsModules.ts, 15, 5))
2014-08-15 23:33:16 +02:00
return foo();
>foo() : number
2015-04-13 23:01:57 +02:00
>foo : () => number, Symbol(foo, Decl(commentsModules.ts, 3, 25))
2014-08-15 23:33:16 +02:00
}
// shouldn't appear
export function foo2Export(/**hm*/ a: string) {
2015-04-13 23:01:57 +02:00
>foo2Export : (a: string) => void, Symbol(foo2Export, Decl(commentsModules.ts, 19, 5))
>a : string, Symbol(a, Decl(commentsModules.ts, 22, 31))
2014-08-15 23:33:16 +02:00
}
/** foo3Export
* comment
*/
export function foo3Export() {
2015-04-13 23:01:57 +02:00
>foo3Export : () => void, Symbol(foo3Export, Decl(commentsModules.ts, 23, 5))
2014-08-15 23:33:16 +02:00
}
/** foo4Export
* comment
*/
function foo4Export() {
2015-04-13 23:01:57 +02:00
>foo4Export : () => void, Symbol(foo4Export, Decl(commentsModules.ts, 29, 5))
2014-08-15 23:33:16 +02:00
}
2014-08-28 01:58:31 +02:00
} // trailing comment module
2014-08-15 23:33:16 +02:00
m1.fooExport();
>m1.fooExport() : number
2015-04-13 23:01:57 +02:00
>m1.fooExport : () => number, Symbol(m1.fooExport, Decl(commentsModules.ts, 15, 5))
>m1 : typeof m1, Symbol(m1, Decl(commentsModules.ts, 0, 0))
>fooExport : () => number, Symbol(m1.fooExport, Decl(commentsModules.ts, 15, 5))
2014-08-15 23:33:16 +02:00
var myvar = new m1.m2.c();
2015-04-13 23:01:57 +02:00
>myvar : m1.m2.c, Symbol(myvar, Decl(commentsModules.ts, 38, 3))
2014-08-25 19:36:12 +02:00
>new m1.m2.c() : m1.m2.c
2015-04-13 23:01:57 +02:00
>m1.m2.c : typeof m1.m2.c, Symbol(m1.m2.c, Decl(commentsModules.ts, 9, 22))
>m1.m2 : typeof m1.m2, Symbol(m1.m2, Decl(commentsModules.ts, 7, 5))
>m1 : typeof m1, Symbol(m1, Decl(commentsModules.ts, 0, 0))
>m2 : typeof m1.m2, Symbol(m1.m2, Decl(commentsModules.ts, 7, 5))
>c : typeof m1.m2.c, Symbol(m1.m2.c, Decl(commentsModules.ts, 9, 22))
2014-08-15 23:33:16 +02:00
/** module comment of m2.m3*/
module m2.m3 {
2015-04-13 23:01:57 +02:00
>m2 : typeof m2, Symbol(m2, Decl(commentsModules.ts, 38, 26))
>m3 : typeof m3, Symbol(m3, Decl(commentsModules.ts, 40, 10))
2014-08-15 23:33:16 +02:00
/** Exported class comment*/
export class c {
2015-04-13 23:01:57 +02:00
>c : c, Symbol(c, Decl(commentsModules.ts, 40, 14))
2014-08-15 23:33:16 +02:00
}
2014-08-28 01:58:31 +02:00
} /* trailing dotted module comment*/
2014-08-15 23:33:16 +02:00
new m2.m3.c();
2014-08-25 19:36:12 +02:00
>new m2.m3.c() : m2.m3.c
2015-04-13 23:01:57 +02:00
>m2.m3.c : typeof m2.m3.c, Symbol(m2.m3.c, Decl(commentsModules.ts, 40, 14))
>m2.m3 : typeof m2.m3, Symbol(m2.m3, Decl(commentsModules.ts, 40, 10))
>m2 : typeof m2, Symbol(m2, Decl(commentsModules.ts, 38, 26))
>m3 : typeof m2.m3, Symbol(m2.m3, Decl(commentsModules.ts, 40, 10))
>c : typeof m2.m3.c, Symbol(m2.m3.c, Decl(commentsModules.ts, 40, 14))
2014-08-15 23:33:16 +02:00
/** module comment of m3.m4.m5*/
module m3.m4.m5 {
2015-04-13 23:01:57 +02:00
>m3 : typeof m3, Symbol(m3, Decl(commentsModules.ts, 45, 14))
>m4 : typeof m4, Symbol(m4, Decl(commentsModules.ts, 47, 10))
>m5 : typeof m5, Symbol(m5, Decl(commentsModules.ts, 47, 13))
2014-08-15 23:33:16 +02:00
/** Exported class comment*/
export class c {
2015-04-13 23:01:57 +02:00
>c : c, Symbol(c, Decl(commentsModules.ts, 47, 17))
2014-08-15 23:33:16 +02:00
}
2014-08-28 01:58:31 +02:00
} // trailing dotted module 2
2014-08-15 23:33:16 +02:00
new m3.m4.m5.c();
2014-08-25 19:36:12 +02:00
>new m3.m4.m5.c() : m3.m4.m5.c
2015-04-13 23:01:57 +02:00
>m3.m4.m5.c : typeof m3.m4.m5.c, Symbol(m3.m4.m5.c, Decl(commentsModules.ts, 47, 17))
>m3.m4.m5 : typeof m3.m4.m5, Symbol(m3.m4.m5, Decl(commentsModules.ts, 47, 13))
>m3.m4 : typeof m3.m4, Symbol(m3.m4, Decl(commentsModules.ts, 47, 10))
>m3 : typeof m3, Symbol(m3, Decl(commentsModules.ts, 45, 14))
>m4 : typeof m3.m4, Symbol(m3.m4, Decl(commentsModules.ts, 47, 10))
>m5 : typeof m3.m4.m5, Symbol(m3.m4.m5, Decl(commentsModules.ts, 47, 13))
>c : typeof m3.m4.m5.c, Symbol(m3.m4.m5.c, Decl(commentsModules.ts, 47, 17))
2014-08-15 23:33:16 +02:00
/** module comment of m4.m5.m6*/
module m4.m5.m6 {
2015-04-13 23:01:57 +02:00
>m4 : typeof m4, Symbol(m4, Decl(commentsModules.ts, 52, 17))
>m5 : typeof m5, Symbol(m5, Decl(commentsModules.ts, 54, 10))
>m6 : typeof m6, Symbol(m6, Decl(commentsModules.ts, 54, 13))
2014-08-15 23:33:16 +02:00
export module m7 {
2015-04-13 23:01:57 +02:00
>m7 : typeof m7, Symbol(m7, Decl(commentsModules.ts, 54, 17))
2014-08-15 23:33:16 +02:00
/** Exported class comment*/
export class c {
2015-04-13 23:01:57 +02:00
>c : c, Symbol(c, Decl(commentsModules.ts, 55, 22))
2014-08-15 23:33:16 +02:00
}
2014-08-28 01:58:31 +02:00
} /* trailing inner module */ /* multiple comments*/
2014-08-15 23:33:16 +02:00
}
new m4.m5.m6.m7.c();
2014-08-25 19:36:12 +02:00
>new m4.m5.m6.m7.c() : m4.m5.m6.m7.c
2015-04-13 23:01:57 +02:00
>m4.m5.m6.m7.c : typeof m4.m5.m6.m7.c, Symbol(m4.m5.m6.m7.c, Decl(commentsModules.ts, 55, 22))
>m4.m5.m6.m7 : typeof m4.m5.m6.m7, Symbol(m4.m5.m6.m7, Decl(commentsModules.ts, 54, 17))
>m4.m5.m6 : typeof m4.m5.m6, Symbol(m4.m5.m6, Decl(commentsModules.ts, 54, 13))
>m4.m5 : typeof m4.m5, Symbol(m4.m5, Decl(commentsModules.ts, 54, 10))
>m4 : typeof m4, Symbol(m4, Decl(commentsModules.ts, 52, 17))
>m5 : typeof m4.m5, Symbol(m4.m5, Decl(commentsModules.ts, 54, 10))
>m6 : typeof m4.m5.m6, Symbol(m4.m5.m6, Decl(commentsModules.ts, 54, 13))
>m7 : typeof m4.m5.m6.m7, Symbol(m4.m5.m6.m7, Decl(commentsModules.ts, 54, 17))
>c : typeof m4.m5.m6.m7.c, Symbol(m4.m5.m6.m7.c, Decl(commentsModules.ts, 55, 22))
2014-08-15 23:33:16 +02:00
/** module comment of m5.m6.m7*/
module m5.m6.m7 {
2015-04-13 23:01:57 +02:00
>m5 : typeof m5, Symbol(m5, Decl(commentsModules.ts, 61, 20))
>m6 : typeof m6, Symbol(m6, Decl(commentsModules.ts, 63, 10))
>m7 : typeof m7, Symbol(m7, Decl(commentsModules.ts, 63, 13))
2014-08-15 23:33:16 +02:00
/** module m8 comment*/
export module m8 {
2015-04-13 23:01:57 +02:00
>m8 : typeof m8, Symbol(m8, Decl(commentsModules.ts, 63, 17))
2014-08-15 23:33:16 +02:00
/** Exported class comment*/
export class c {
2015-04-13 23:01:57 +02:00
>c : c, Symbol(c, Decl(commentsModules.ts, 65, 22))
2014-08-15 23:33:16 +02:00
}
}
}
new m5.m6.m7.m8.c();
2014-08-25 19:36:12 +02:00
>new m5.m6.m7.m8.c() : m5.m6.m7.m8.c
2015-04-13 23:01:57 +02:00
>m5.m6.m7.m8.c : typeof m5.m6.m7.m8.c, Symbol(m5.m6.m7.m8.c, Decl(commentsModules.ts, 65, 22))
>m5.m6.m7.m8 : typeof m5.m6.m7.m8, Symbol(m5.m6.m7.m8, Decl(commentsModules.ts, 63, 17))
>m5.m6.m7 : typeof m5.m6.m7, Symbol(m5.m6.m7, Decl(commentsModules.ts, 63, 13))
>m5.m6 : typeof m5.m6, Symbol(m5.m6, Decl(commentsModules.ts, 63, 10))
>m5 : typeof m5, Symbol(m5, Decl(commentsModules.ts, 61, 20))
>m6 : typeof m5.m6, Symbol(m5.m6, Decl(commentsModules.ts, 63, 10))
>m7 : typeof m5.m6.m7, Symbol(m5.m6.m7, Decl(commentsModules.ts, 63, 13))
>m8 : typeof m5.m6.m7.m8, Symbol(m5.m6.m7.m8, Decl(commentsModules.ts, 63, 17))
>c : typeof m5.m6.m7.m8.c, Symbol(m5.m6.m7.m8.c, Decl(commentsModules.ts, 65, 22))
2014-08-15 23:33:16 +02:00
module m6.m7 {
2015-04-13 23:01:57 +02:00
>m6 : typeof m6, Symbol(m6, Decl(commentsModules.ts, 71, 20))
>m7 : typeof m7, Symbol(m7, Decl(commentsModules.ts, 72, 10))
2014-08-15 23:33:16 +02:00
export module m8 {
2015-04-13 23:01:57 +02:00
>m8 : typeof m8, Symbol(m8, Decl(commentsModules.ts, 72, 14))
2014-08-15 23:33:16 +02:00
/** Exported class comment*/
export class c {
2015-04-13 23:01:57 +02:00
>c : c, Symbol(c, Decl(commentsModules.ts, 73, 22))
2014-08-15 23:33:16 +02:00
}
}
}
new m6.m7.m8.c();
2014-08-25 19:36:12 +02:00
>new m6.m7.m8.c() : m6.m7.m8.c
2015-04-13 23:01:57 +02:00
>m6.m7.m8.c : typeof m6.m7.m8.c, Symbol(m6.m7.m8.c, Decl(commentsModules.ts, 73, 22))
>m6.m7.m8 : typeof m6.m7.m8, Symbol(m6.m7.m8, Decl(commentsModules.ts, 72, 14))
>m6.m7 : typeof m6.m7, Symbol(m6.m7, Decl(commentsModules.ts, 72, 10))
>m6 : typeof m6, Symbol(m6, Decl(commentsModules.ts, 71, 20))
>m7 : typeof m6.m7, Symbol(m6.m7, Decl(commentsModules.ts, 72, 10))
>m8 : typeof m6.m7.m8, Symbol(m6.m7.m8, Decl(commentsModules.ts, 72, 14))
>c : typeof m6.m7.m8.c, Symbol(m6.m7.m8.c, Decl(commentsModules.ts, 73, 22))
2014-08-15 23:33:16 +02:00
module m7.m8 {
2015-04-13 23:01:57 +02:00
>m7 : typeof m7, Symbol(m7, Decl(commentsModules.ts, 79, 17))
>m8 : typeof m8, Symbol(m8, Decl(commentsModules.ts, 80, 10))
2014-08-15 23:33:16 +02:00
/** module m9 comment*/
export module m9 {
2015-04-13 23:01:57 +02:00
>m9 : typeof m9, Symbol(m9, Decl(commentsModules.ts, 80, 14))
2014-08-15 23:33:16 +02:00
/** Exported class comment*/
export class c {
2015-04-13 23:01:57 +02:00
>c : c, Symbol(c, Decl(commentsModules.ts, 82, 22))
2014-08-15 23:33:16 +02:00
}
/** class d */
class d {
2015-04-13 23:01:57 +02:00
>d : d, Symbol(d, Decl(commentsModules.ts, 85, 9))
2014-08-15 23:33:16 +02:00
}
// class e
export class e {
2015-04-13 23:01:57 +02:00
>e : e, Symbol(e, Decl(commentsModules.ts, 89, 9))
2014-08-15 23:33:16 +02:00
}
}
}
new m7.m8.m9.c();
2014-08-25 19:36:12 +02:00
>new m7.m8.m9.c() : m7.m8.m9.c
2015-04-13 23:01:57 +02:00
>m7.m8.m9.c : typeof m7.m8.m9.c, Symbol(m7.m8.m9.c, Decl(commentsModules.ts, 82, 22))
>m7.m8.m9 : typeof m7.m8.m9, Symbol(m7.m8.m9, Decl(commentsModules.ts, 80, 14))
>m7.m8 : typeof m7.m8, Symbol(m7.m8, Decl(commentsModules.ts, 80, 10))
>m7 : typeof m7, Symbol(m7, Decl(commentsModules.ts, 79, 17))
>m8 : typeof m7.m8, Symbol(m7.m8, Decl(commentsModules.ts, 80, 10))
>m9 : typeof m7.m8.m9, Symbol(m7.m8.m9, Decl(commentsModules.ts, 80, 14))
>c : typeof m7.m8.m9.c, Symbol(m7.m8.m9.c, Decl(commentsModules.ts, 82, 22))
2014-08-15 23:33:16 +02:00