TypeScript/tests/baselines/reference/constDeclarations.js

31 lines
570 B
TypeScript
Raw Normal View History

//// [constDeclarations.ts]
// No error
const c1 = false;
const c2: number = 23;
const c3 = 0, c4 :string = "", c5 = null;
2014-10-15 02:37:46 +02:00
for(const c4 = 0; c4 < 9; ) { break; }
for(const c5 = 0, c6 = 0; c5 < c6; ) { break; }
//// [constDeclarations.js]
// No error
const c1 = false;
const c2 = 23;
const c3 = 0, c4 = "", c5 = null;
2014-10-15 18:20:46 +02:00
for (const c4 = 0; c4 < 9;) {
2014-10-15 02:37:46 +02:00
break;
}
2014-10-15 18:20:46 +02:00
for (const c5 = 0, c6 = 0; c5 < c6;) {
2014-10-15 02:37:46 +02:00
break;
}
//// [constDeclarations.d.ts]
declare const c1: boolean;
declare const c2: number;
declare const c3: number, c4: string, c5: any;