36 lines
499 B
Text
36 lines
499 B
Text
=== 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
|
|
}
|
|
|
|
|