49 lines
1.4 KiB
Text
49 lines
1.4 KiB
Text
=== tests/cases/compiler/moduleVariables.ts ===
|
|
declare var console: any;
|
|
>console : any, Symbol(console, Decl(moduleVariables.ts, 0, 11))
|
|
|
|
var x = 1;
|
|
>x : number, Symbol(x, Decl(moduleVariables.ts, 2, 3))
|
|
>1 : number
|
|
|
|
module M {
|
|
>M : typeof M, Symbol(M, Decl(moduleVariables.ts, 2, 10), Decl(moduleVariables.ts, 6, 1), Decl(moduleVariables.ts, 10, 1))
|
|
|
|
export var x = 2;
|
|
>x : number, Symbol(x, Decl(moduleVariables.ts, 4, 14))
|
|
>2 : number
|
|
|
|
console.log(x); // 2
|
|
>console.log(x) : any
|
|
>console.log : any
|
|
>console : any, Symbol(console, Decl(moduleVariables.ts, 0, 11))
|
|
>log : any
|
|
>x : number, Symbol(x, Decl(moduleVariables.ts, 4, 14))
|
|
}
|
|
|
|
module M {
|
|
>M : typeof M, Symbol(M, Decl(moduleVariables.ts, 2, 10), Decl(moduleVariables.ts, 6, 1), Decl(moduleVariables.ts, 10, 1))
|
|
|
|
console.log(x); // 2
|
|
>console.log(x) : any
|
|
>console.log : any
|
|
>console : any, Symbol(console, Decl(moduleVariables.ts, 0, 11))
|
|
>log : any
|
|
>x : number, Symbol(x, Decl(moduleVariables.ts, 4, 14))
|
|
}
|
|
|
|
module M {
|
|
>M : typeof M, Symbol(M, Decl(moduleVariables.ts, 2, 10), Decl(moduleVariables.ts, 6, 1), Decl(moduleVariables.ts, 10, 1))
|
|
|
|
var x = 3;
|
|
>x : number, Symbol(x, Decl(moduleVariables.ts, 13, 7))
|
|
>3 : number
|
|
|
|
console.log(x); // 3
|
|
>console.log(x) : any
|
|
>console.log : any
|
|
>console : any, Symbol(console, Decl(moduleVariables.ts, 0, 11))
|
|
>log : any
|
|
>x : number, Symbol(x, Decl(moduleVariables.ts, 13, 7))
|
|
}
|
|
|