2014-07-13 01:04:16 +02:00
|
|
|
//// [augmentedTypeBracketAccessIndexSignature.ts]
|
|
|
|
interface Foo { a }
|
|
|
|
interface Bar { b }
|
|
|
|
|
|
|
|
interface Object {
|
|
|
|
[n: number]: Foo;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface Function {
|
|
|
|
[n: number]: Bar;
|
|
|
|
}
|
|
|
|
|
|
|
|
var a = {}[0]; // Should be Foo
|
|
|
|
var b = (() => { })[0]; // Should be Bar
|
|
|
|
|
|
|
|
//// [augmentedTypeBracketAccessIndexSignature.js]
|
2014-08-15 22:18:54 +02:00
|
|
|
var a = {}[0]; // Should be Foo
|
2014-07-13 01:04:16 +02:00
|
|
|
var b = (function () {
|
2014-08-15 23:32:08 +02:00
|
|
|
})[0]; // Should be Bar
|