TypeScript/tests/baselines/reference/constDeclarations.types

38 lines
1.1 KiB
Plaintext
Raw Normal View History

=== tests/cases/compiler/constDeclarations.ts ===
// No error
const c1 = false;
2015-04-13 23:01:57 +02:00
>c1 : boolean, Symbol(c1, Decl(constDeclarations.ts, 2, 5))
2015-04-13 21:36:11 +02:00
>false : boolean
const c2: number = 23;
2015-04-13 23:01:57 +02:00
>c2 : number, Symbol(c2, Decl(constDeclarations.ts, 3, 5))
2015-04-13 21:36:11 +02:00
>23 : number
const c3 = 0, c4 :string = "", c5 = null;
2015-04-13 23:01:57 +02:00
>c3 : number, Symbol(c3, Decl(constDeclarations.ts, 4, 5))
2015-04-13 21:36:11 +02:00
>0 : number
2015-04-13 23:01:57 +02:00
>c4 : string, Symbol(c4, Decl(constDeclarations.ts, 4, 13))
2015-04-13 21:36:11 +02:00
>"" : string
2015-04-13 23:01:57 +02:00
>c5 : any, Symbol(c5, Decl(constDeclarations.ts, 4, 30))
2015-04-13 21:36:11 +02:00
>null : null
2014-10-15 02:37:46 +02:00
for(const c4 = 0; c4 < 9; ) { break; }
2015-04-13 23:01:57 +02:00
>c4 : number, Symbol(c4, Decl(constDeclarations.ts, 7, 9))
2015-04-13 21:36:11 +02:00
>0 : number
2014-10-15 02:37:46 +02:00
>c4 < 9 : boolean
2015-04-13 23:01:57 +02:00
>c4 : number, Symbol(c4, Decl(constDeclarations.ts, 7, 9))
2015-04-13 21:36:11 +02:00
>9 : number
2014-10-15 02:37:46 +02:00
for(const c5 = 0, c6 = 0; c5 < c6; ) { break; }
2015-04-13 23:01:57 +02:00
>c5 : number, Symbol(c5, Decl(constDeclarations.ts, 10, 9))
2015-04-13 21:36:11 +02:00
>0 : number
2015-04-13 23:01:57 +02:00
>c6 : number, Symbol(c6, Decl(constDeclarations.ts, 10, 17))
2015-04-13 21:36:11 +02:00
>0 : number
2014-10-15 02:37:46 +02:00
>c5 < c6 : boolean
2015-04-13 23:01:57 +02:00
>c5 : number, Symbol(c5, Decl(constDeclarations.ts, 10, 9))
>c6 : number, Symbol(c6, Decl(constDeclarations.ts, 10, 17))
2014-10-15 02:37:46 +02:00