TypeScript/tests/baselines/reference/contextualTypingOfArrayLiterals1.js

15 lines
252 B
TypeScript
Raw Normal View History

2014-07-13 01:04:16 +02:00
//// [contextualTypingOfArrayLiterals1.ts]
interface I {
[x: number]: Date;
}
var x3: I = [new Date(), 1];
var r2 = x3[1];
r2.getDate();
//// [contextualTypingOfArrayLiterals1.js]
var x3 = [new Date(), 1];
2014-07-13 01:04:16 +02:00
var r2 = x3[1];
r2.getDate();