TypeScript/tests/baselines/reference/constDeclarations-scopes2.types
2015-04-15 16:44:20 -07:00

37 lines
499 B
Plaintext

=== tests/cases/compiler/constDeclarations-scopes2.ts ===
// global
const c = "string";
>c : string
>"string" : string
var n: number;
>n : number
var b: boolean;
>b : boolean
// for scope
for (const c = 0; c < 10; n = c ) {
>c : number
>0 : number
>c < 10 : boolean
>c : number
>10 : number
>n = c : number
>n : number
>c : number
// for block
const c = false;
>c : boolean
>false : boolean
b = c;
>b = c : boolean
>b : boolean
>c : boolean
}