TypeScript/tests/baselines/reference/commentsExternalModules3.types
2015-04-13 14:29:37 -07:00

156 lines
7 KiB
Plaintext

=== tests/cases/compiler/commentsExternalModules_1.ts ===
/**This is on import declaration*/
import extMod = require("commentsExternalModules2_0"); // trailing comment 1
>extMod : typeof extMod, Symbol(extMod, Decl(commentsExternalModules_1.ts, 0, 0))
extMod.m1.fooExport();
>extMod.m1.fooExport() : number
>extMod.m1.fooExport : () => number, Symbol(extMod.m1.fooExport, Decl(commentsExternalModules2_0.ts, 16, 5))
>extMod.m1 : typeof extMod.m1, Symbol(extMod.m1, Decl(commentsExternalModules2_0.ts, 0, 0))
>extMod : typeof extMod, Symbol(extMod, Decl(commentsExternalModules_1.ts, 0, 0))
>m1 : typeof extMod.m1, Symbol(extMod.m1, Decl(commentsExternalModules2_0.ts, 0, 0))
>fooExport : () => number, Symbol(extMod.m1.fooExport, Decl(commentsExternalModules2_0.ts, 16, 5))
export var newVar = new extMod.m1.m2.c();
>newVar : extMod.m1.m2.c, Symbol(newVar, Decl(commentsExternalModules_1.ts, 3, 10))
>new extMod.m1.m2.c() : extMod.m1.m2.c
>extMod.m1.m2.c : typeof extMod.m1.m2.c, Symbol(extMod.m1.m2.c, Decl(commentsExternalModules2_0.ts, 10, 22))
>extMod.m1.m2 : typeof extMod.m1.m2, Symbol(extMod.m1.m2, Decl(commentsExternalModules2_0.ts, 8, 5))
>extMod.m1 : typeof extMod.m1, Symbol(extMod.m1, Decl(commentsExternalModules2_0.ts, 0, 0))
>extMod : typeof extMod, Symbol(extMod, Decl(commentsExternalModules_1.ts, 0, 0))
>m1 : typeof extMod.m1, Symbol(extMod.m1, Decl(commentsExternalModules2_0.ts, 0, 0))
>m2 : typeof extMod.m1.m2, Symbol(extMod.m1.m2, Decl(commentsExternalModules2_0.ts, 8, 5))
>c : typeof extMod.m1.m2.c, Symbol(extMod.m1.m2.c, Decl(commentsExternalModules2_0.ts, 10, 22))
extMod.m4.fooExport();
>extMod.m4.fooExport() : number
>extMod.m4.fooExport : () => number, Symbol(extMod.m4.fooExport, Decl(commentsExternalModules2_0.ts, 42, 5))
>extMod.m4 : typeof extMod.m4, Symbol(extMod.m4, Decl(commentsExternalModules2_0.ts, 23, 26))
>extMod : typeof extMod, Symbol(extMod, Decl(commentsExternalModules_1.ts, 0, 0))
>m4 : typeof extMod.m4, Symbol(extMod.m4, Decl(commentsExternalModules2_0.ts, 23, 26))
>fooExport : () => number, Symbol(extMod.m4.fooExport, Decl(commentsExternalModules2_0.ts, 42, 5))
export var newVar2 = new extMod.m4.m2.c();
>newVar2 : extMod.m4.m2.c, Symbol(newVar2, Decl(commentsExternalModules_1.ts, 5, 10))
>new extMod.m4.m2.c() : extMod.m4.m2.c
>extMod.m4.m2.c : typeof extMod.m4.m2.c, Symbol(extMod.m4.m2.c, Decl(commentsExternalModules2_0.ts, 36, 22))
>extMod.m4.m2 : typeof extMod.m4.m2, Symbol(extMod.m4.m2, Decl(commentsExternalModules2_0.ts, 33, 5))
>extMod.m4 : typeof extMod.m4, Symbol(extMod.m4, Decl(commentsExternalModules2_0.ts, 23, 26))
>extMod : typeof extMod, Symbol(extMod, Decl(commentsExternalModules_1.ts, 0, 0))
>m4 : typeof extMod.m4, Symbol(extMod.m4, Decl(commentsExternalModules2_0.ts, 23, 26))
>m2 : typeof extMod.m4.m2, Symbol(extMod.m4.m2, Decl(commentsExternalModules2_0.ts, 33, 5))
>c : typeof extMod.m4.m2.c, Symbol(extMod.m4.m2.c, Decl(commentsExternalModules2_0.ts, 36, 22))
=== tests/cases/compiler/commentsExternalModules2_0.ts ===
/** Module comment*/
export module m1 {
>m1 : typeof m1, Symbol(m1, Decl(commentsExternalModules2_0.ts, 0, 0))
/** b's comment*/
export var b: number;
>b : number, Symbol(b, Decl(commentsExternalModules2_0.ts, 4, 14))
/** foo's comment*/
function foo() {
>foo : () => number, Symbol(foo, Decl(commentsExternalModules2_0.ts, 4, 25))
return b;
>b : number, Symbol(b, Decl(commentsExternalModules2_0.ts, 4, 14))
}
/** m2 comments*/
export module m2 {
>m2 : typeof m2, Symbol(m2, Decl(commentsExternalModules2_0.ts, 8, 5))
/** class comment;*/
export class c {
>c : c, Symbol(c, Decl(commentsExternalModules2_0.ts, 10, 22))
};
/** i*/
export var i = new c();
>i : c, Symbol(i, Decl(commentsExternalModules2_0.ts, 15, 18))
>new c() : c
>c : typeof c, Symbol(c, Decl(commentsExternalModules2_0.ts, 10, 22))
}
/** exported function*/
export function fooExport() {
>fooExport : () => number, Symbol(fooExport, Decl(commentsExternalModules2_0.ts, 16, 5))
return foo();
>foo() : number
>foo : () => number, Symbol(foo, Decl(commentsExternalModules2_0.ts, 4, 25))
}
}
m1.fooExport();
>m1.fooExport() : number
>m1.fooExport : () => number, Symbol(m1.fooExport, Decl(commentsExternalModules2_0.ts, 16, 5))
>m1 : typeof m1, Symbol(m1, Decl(commentsExternalModules2_0.ts, 0, 0))
>fooExport : () => number, Symbol(m1.fooExport, Decl(commentsExternalModules2_0.ts, 16, 5))
var myvar = new m1.m2.c();
>myvar : m1.m2.c, Symbol(myvar, Decl(commentsExternalModules2_0.ts, 23, 3))
>new m1.m2.c() : m1.m2.c
>m1.m2.c : typeof m1.m2.c, Symbol(m1.m2.c, Decl(commentsExternalModules2_0.ts, 10, 22))
>m1.m2 : typeof m1.m2, Symbol(m1.m2, Decl(commentsExternalModules2_0.ts, 8, 5))
>m1 : typeof m1, Symbol(m1, Decl(commentsExternalModules2_0.ts, 0, 0))
>m2 : typeof m1.m2, Symbol(m1.m2, Decl(commentsExternalModules2_0.ts, 8, 5))
>c : typeof m1.m2.c, Symbol(m1.m2.c, Decl(commentsExternalModules2_0.ts, 10, 22))
/** Module comment */
export module m4 {
>m4 : typeof m4, Symbol(m4, Decl(commentsExternalModules2_0.ts, 23, 26))
/** b's comment */
export var b: number;
>b : number, Symbol(b, Decl(commentsExternalModules2_0.ts, 28, 14))
/** foo's comment
*/
function foo() {
>foo : () => number, Symbol(foo, Decl(commentsExternalModules2_0.ts, 28, 25))
return b;
>b : number, Symbol(b, Decl(commentsExternalModules2_0.ts, 28, 14))
}
/** m2 comments
*/
export module m2 {
>m2 : typeof m2, Symbol(m2, Decl(commentsExternalModules2_0.ts, 33, 5))
/** class comment; */
export class c {
>c : c, Symbol(c, Decl(commentsExternalModules2_0.ts, 36, 22))
};
/** i */
export var i = new c();
>i : c, Symbol(i, Decl(commentsExternalModules2_0.ts, 41, 18))
>new c() : c
>c : typeof c, Symbol(c, Decl(commentsExternalModules2_0.ts, 36, 22))
}
/** exported function */
export function fooExport() {
>fooExport : () => number, Symbol(fooExport, Decl(commentsExternalModules2_0.ts, 42, 5))
return foo();
>foo() : number
>foo : () => number, Symbol(foo, Decl(commentsExternalModules2_0.ts, 28, 25))
}
}
m4.fooExport();
>m4.fooExport() : number
>m4.fooExport : () => number, Symbol(m4.fooExport, Decl(commentsExternalModules2_0.ts, 42, 5))
>m4 : typeof m4, Symbol(m4, Decl(commentsExternalModules2_0.ts, 23, 26))
>fooExport : () => number, Symbol(m4.fooExport, Decl(commentsExternalModules2_0.ts, 42, 5))
var myvar2 = new m4.m2.c();
>myvar2 : m4.m2.c, Symbol(myvar2, Decl(commentsExternalModules2_0.ts, 49, 3))
>new m4.m2.c() : m4.m2.c
>m4.m2.c : typeof m4.m2.c, Symbol(m4.m2.c, Decl(commentsExternalModules2_0.ts, 36, 22))
>m4.m2 : typeof m4.m2, Symbol(m4.m2, Decl(commentsExternalModules2_0.ts, 33, 5))
>m4 : typeof m4, Symbol(m4, Decl(commentsExternalModules2_0.ts, 23, 26))
>m2 : typeof m4.m2, Symbol(m4.m2, Decl(commentsExternalModules2_0.ts, 33, 5))
>c : typeof m4.m2.c, Symbol(m4.m2.c, Decl(commentsExternalModules2_0.ts, 36, 22))