TypeScript/tests/baselines/reference/commentsModules.types

227 lines
4.2 KiB
Text
Raw Normal View History

2014-08-15 23:33:16 +02:00
=== tests/cases/compiler/commentsModules.ts ===
/** Module comment*/
module m1 {
2014-08-28 21:40:58 +02:00
>m1 : typeof m1
2014-08-15 23:33:16 +02:00
/** b's comment*/
export var b: number;
>b : number
/** foo's comment*/
function foo() {
>foo : () => number
2014-08-15 23:33:16 +02:00
return b;
>b : number
}
/** m2 comments*/
export module m2 {
2014-08-28 21:40:58 +02:00
>m2 : typeof m2
2014-08-15 23:33:16 +02:00
/** class comment;*/
export class c {
>c : c
};
/** i*/
export var i = new c();
>i : c
>new c() : c
>c : typeof c
}
/** exported function*/
export function fooExport() {
>fooExport : () => number
2014-08-15 23:33:16 +02:00
return foo();
>foo() : number
>foo : () => number
2014-08-15 23:33:16 +02:00
}
// shouldn't appear
export function foo2Export(/**hm*/ a: string) {
>foo2Export : (a: string) => void
2014-08-15 23:33:16 +02:00
>a : string
}
/** foo3Export
* comment
*/
export function foo3Export() {
>foo3Export : () => void
2014-08-15 23:33:16 +02:00
}
/** foo4Export
* comment
*/
function foo4Export() {
>foo4Export : () => void
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
>m1.fooExport : () => number
2014-08-15 23:33:16 +02:00
>m1 : typeof m1
>fooExport : () => number
2014-08-15 23:33:16 +02:00
var myvar = new m1.m2.c();
2014-08-25 19:36:12 +02:00
>myvar : m1.m2.c
>new m1.m2.c() : m1.m2.c
>m1.m2.c : typeof m1.m2.c
>m1.m2 : typeof m1.m2
2014-08-15 23:33:16 +02:00
>m1 : typeof m1
2014-08-25 19:36:12 +02:00
>m2 : typeof m1.m2
>c : typeof m1.m2.c
2014-08-15 23:33:16 +02:00
/** module comment of m2.m3*/
module m2.m3 {
2014-08-28 21:40:58 +02:00
>m2 : typeof m2
>m3 : typeof m3
2014-08-15 23:33:16 +02:00
/** Exported class comment*/
export class c {
>c : c
}
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
>m2.m3.c : typeof m2.m3.c
>m2.m3 : typeof m2.m3
2014-08-15 23:33:16 +02:00
>m2 : typeof m2
2014-08-25 19:36:12 +02:00
>m3 : typeof m2.m3
>c : typeof m2.m3.c
2014-08-15 23:33:16 +02:00
/** module comment of m3.m4.m5*/
module m3.m4.m5 {
2014-08-28 21:40:58 +02:00
>m3 : typeof m3
>m4 : typeof m4
>m5 : typeof m5
2014-08-15 23:33:16 +02:00
/** Exported class comment*/
export class c {
>c : c
}
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
>m3.m4.m5.c : typeof m3.m4.m5.c
>m3.m4.m5 : typeof m3.m4.m5
>m3.m4 : typeof m3.m4
2014-08-15 23:33:16 +02:00
>m3 : typeof m3
2014-08-25 19:36:12 +02:00
>m4 : typeof m3.m4
>m5 : typeof m3.m4.m5
>c : typeof m3.m4.m5.c
2014-08-15 23:33:16 +02:00
/** module comment of m4.m5.m6*/
module m4.m5.m6 {
2014-08-28 21:40:58 +02:00
>m4 : typeof m4
>m5 : typeof m5
>m6 : typeof m6
2014-08-15 23:33:16 +02:00
export module m7 {
2014-08-28 21:40:58 +02:00
>m7 : typeof m7
2014-08-15 23:33:16 +02:00
/** Exported class comment*/
export class c {
>c : c
}
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
>m4.m5.m6.m7.c : typeof m4.m5.m6.m7.c
>m4.m5.m6.m7 : typeof m4.m5.m6.m7
>m4.m5.m6 : typeof m4.m5.m6
>m4.m5 : typeof m4.m5
2014-08-15 23:33:16 +02:00
>m4 : typeof m4
2014-08-25 19:36:12 +02:00
>m5 : typeof m4.m5
>m6 : typeof m4.m5.m6
>m7 : typeof m4.m5.m6.m7
>c : typeof m4.m5.m6.m7.c
2014-08-15 23:33:16 +02:00
/** module comment of m5.m6.m7*/
module m5.m6.m7 {
2014-08-28 21:40:58 +02:00
>m5 : typeof m5
>m6 : typeof m6
>m7 : typeof m7
2014-08-15 23:33:16 +02:00
/** module m8 comment*/
export module m8 {
2014-08-28 21:40:58 +02:00
>m8 : typeof m8
2014-08-15 23:33:16 +02:00
/** Exported class comment*/
export class c {
>c : c
}
}
}
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
>m5.m6.m7.m8.c : typeof m5.m6.m7.m8.c
>m5.m6.m7.m8 : typeof m5.m6.m7.m8
>m5.m6.m7 : typeof m5.m6.m7
>m5.m6 : typeof m5.m6
2014-08-15 23:33:16 +02:00
>m5 : typeof m5
2014-08-25 19:36:12 +02:00
>m6 : typeof m5.m6
>m7 : typeof m5.m6.m7
>m8 : typeof m5.m6.m7.m8
>c : typeof m5.m6.m7.m8.c
2014-08-15 23:33:16 +02:00
module m6.m7 {
2014-08-28 21:40:58 +02:00
>m6 : typeof m6
>m7 : typeof m7
2014-08-15 23:33:16 +02:00
export module m8 {
2014-08-28 21:40:58 +02:00
>m8 : typeof m8
2014-08-15 23:33:16 +02:00
/** Exported class comment*/
export class c {
>c : c
}
}
}
new m6.m7.m8.c();
2014-08-25 19:36:12 +02:00
>new m6.m7.m8.c() : m6.m7.m8.c
>m6.m7.m8.c : typeof m6.m7.m8.c
>m6.m7.m8 : typeof m6.m7.m8
>m6.m7 : typeof m6.m7
2014-08-15 23:33:16 +02:00
>m6 : typeof m6
2014-08-25 19:36:12 +02:00
>m7 : typeof m6.m7
>m8 : typeof m6.m7.m8
>c : typeof m6.m7.m8.c
2014-08-15 23:33:16 +02:00
module m7.m8 {
2014-08-28 21:40:58 +02:00
>m7 : typeof m7
>m8 : typeof m8
2014-08-15 23:33:16 +02:00
/** module m9 comment*/
export module m9 {
2014-08-28 21:40:58 +02:00
>m9 : typeof m9
2014-08-15 23:33:16 +02:00
/** Exported class comment*/
export class c {
>c : c
}
/** class d */
class d {
>d : d
}
// class e
export class e {
>e : e
}
}
}
new m7.m8.m9.c();
2014-08-25 19:36:12 +02:00
>new m7.m8.m9.c() : m7.m8.m9.c
>m7.m8.m9.c : typeof m7.m8.m9.c
>m7.m8.m9 : typeof m7.m8.m9
>m7.m8 : typeof m7.m8
2014-08-15 23:33:16 +02:00
>m7 : typeof m7
2014-08-25 19:36:12 +02:00
>m8 : typeof m7.m8
>m9 : typeof m7.m8.m9
>c : typeof m7.m8.m9.c
2014-08-15 23:33:16 +02:00