2014-08-15 23:33:16 +02:00
|
|
|
=== tests/cases/compiler/commentsExternalModules_1.ts ===
|
|
|
|
/**This is on import declaration*/
|
2014-08-21 02:07:24 +02:00
|
|
|
import extMod = require("commentsExternalModules_0"); // trailing comment1
|
2014-08-15 23:33:16 +02:00
|
|
|
>extMod : typeof "tests/cases/compiler/commentsExternalModules_0"
|
|
|
|
|
|
|
|
extMod.m1.fooExport();
|
|
|
|
>extMod.m1.fooExport() : number
|
2014-08-22 03:39:46 +02:00
|
|
|
>extMod.m1.fooExport : typeof fooExport
|
2014-08-15 23:33:16 +02:00
|
|
|
>extMod.m1 : typeof m1
|
|
|
|
>extMod : typeof "tests/cases/compiler/commentsExternalModules_0"
|
|
|
|
>m1 : typeof m1
|
2014-08-22 03:39:46 +02:00
|
|
|
>fooExport : typeof fooExport
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
var newVar = new extMod.m1.m2.c();
|
|
|
|
>newVar : c
|
|
|
|
>new extMod.m1.m2.c() : c
|
|
|
|
>extMod.m1.m2.c : typeof c
|
|
|
|
>extMod.m1.m2 : typeof m2
|
|
|
|
>extMod.m1 : typeof m1
|
|
|
|
>extMod : typeof "tests/cases/compiler/commentsExternalModules_0"
|
|
|
|
>m1 : typeof m1
|
|
|
|
>m2 : typeof m2
|
|
|
|
>c : typeof c
|
|
|
|
|
|
|
|
extMod.m4.fooExport();
|
|
|
|
>extMod.m4.fooExport() : number
|
2014-08-22 03:39:46 +02:00
|
|
|
>extMod.m4.fooExport : typeof fooExport
|
2014-08-15 23:33:16 +02:00
|
|
|
>extMod.m4 : typeof m4
|
|
|
|
>extMod : typeof "tests/cases/compiler/commentsExternalModules_0"
|
|
|
|
>m4 : typeof m4
|
2014-08-22 03:39:46 +02:00
|
|
|
>fooExport : typeof fooExport
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
var newVar2 = new extMod.m4.m2.c();
|
|
|
|
>newVar2 : c
|
|
|
|
>new extMod.m4.m2.c() : c
|
|
|
|
>extMod.m4.m2.c : typeof c
|
|
|
|
>extMod.m4.m2 : typeof m2
|
|
|
|
>extMod.m4 : typeof m4
|
|
|
|
>extMod : typeof "tests/cases/compiler/commentsExternalModules_0"
|
|
|
|
>m4 : typeof m4
|
|
|
|
>m2 : typeof m2
|
|
|
|
>c : typeof c
|
|
|
|
|
|
|
|
=== tests/cases/compiler/commentsExternalModules_0.ts ===
|
|
|
|
|
|
|
|
/** Module comment*/
|
|
|
|
export module m1 {
|
|
|
|
>m1 : typeof m1
|
|
|
|
|
|
|
|
/** b's comment*/
|
|
|
|
export var b: number;
|
|
|
|
>b : number
|
|
|
|
|
|
|
|
/** foo's comment*/
|
|
|
|
function foo() {
|
2014-08-22 03:39:46 +02:00
|
|
|
>foo : typeof foo
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
return b;
|
|
|
|
>b : number
|
|
|
|
}
|
|
|
|
/** m2 comments*/
|
|
|
|
export module m2 {
|
|
|
|
>m2 : typeof m2
|
|
|
|
|
|
|
|
/** 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() {
|
2014-08-22 03:39:46 +02:00
|
|
|
>fooExport : typeof fooExport
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
return foo();
|
|
|
|
>foo() : number
|
2014-08-22 03:39:46 +02:00
|
|
|
>foo : typeof foo
|
2014-08-15 23:33:16 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
m1.fooExport();
|
|
|
|
>m1.fooExport() : number
|
2014-08-22 03:39:46 +02:00
|
|
|
>m1.fooExport : typeof fooExport
|
2014-08-15 23:33:16 +02:00
|
|
|
>m1 : typeof m1
|
2014-08-22 03:39:46 +02:00
|
|
|
>fooExport : typeof fooExport
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
var myvar = new m1.m2.c();
|
|
|
|
>myvar : c
|
|
|
|
>new m1.m2.c() : c
|
|
|
|
>m1.m2.c : typeof c
|
|
|
|
>m1.m2 : typeof m2
|
|
|
|
>m1 : typeof m1
|
|
|
|
>m2 : typeof m2
|
|
|
|
>c : typeof c
|
|
|
|
|
|
|
|
/** Module comment */
|
|
|
|
export module m4 {
|
|
|
|
>m4 : typeof m4
|
|
|
|
|
|
|
|
/** b's comment */
|
|
|
|
export var b: number;
|
|
|
|
>b : number
|
|
|
|
|
|
|
|
/** foo's comment
|
|
|
|
*/
|
|
|
|
function foo() {
|
2014-08-22 03:39:46 +02:00
|
|
|
>foo : typeof foo
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
return b;
|
|
|
|
>b : number
|
|
|
|
}
|
|
|
|
/** m2 comments
|
|
|
|
*/
|
|
|
|
export module m2 {
|
|
|
|
>m2 : typeof m2
|
|
|
|
|
|
|
|
/** 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() {
|
2014-08-22 03:39:46 +02:00
|
|
|
>fooExport : typeof fooExport
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
return foo();
|
|
|
|
>foo() : number
|
2014-08-22 03:39:46 +02:00
|
|
|
>foo : typeof foo
|
2014-08-15 23:33:16 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
m4.fooExport();
|
|
|
|
>m4.fooExport() : number
|
2014-08-22 03:39:46 +02:00
|
|
|
>m4.fooExport : typeof fooExport
|
2014-08-15 23:33:16 +02:00
|
|
|
>m4 : typeof m4
|
2014-08-22 03:39:46 +02:00
|
|
|
>fooExport : typeof fooExport
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
var myvar2 = new m4.m2.c();
|
|
|
|
>myvar2 : c
|
|
|
|
>new m4.m2.c() : c
|
|
|
|
>m4.m2.c : typeof c
|
|
|
|
>m4.m2 : typeof m2
|
|
|
|
>m4 : typeof m4
|
|
|
|
>m2 : typeof m2
|
|
|
|
>c : typeof c
|
|
|
|
|