TypeScript/tests/baselines/reference/numericIndexerConstraint4.types

30 lines
407 B
Plaintext
Raw Normal View History

2014-08-15 23:33:16 +02:00
=== tests/cases/compiler/numericIndexerConstraint4.ts ===
class A {
>A : A
2014-08-15 23:33:16 +02:00
foo: number;
>foo : number
2014-08-15 23:33:16 +02:00
}
class B extends A {
>B : B
>A : A
2014-08-15 23:33:16 +02:00
bar: string;
>bar : string
2014-08-15 23:33:16 +02:00
}
var x: {
>x : { [idx: number]: A; }
2014-08-15 23:33:16 +02:00
[idx: number]: A;
>idx : number
>A : A
2014-08-15 23:33:16 +02:00
} = { data: new B() }
2014-10-13 15:56:58 +02:00
>{ data: new B() } : { [x: number]: undefined; data: B; }
>data : B
2014-08-15 23:33:16 +02:00
>new B() : B
>B : typeof B
2014-08-15 23:33:16 +02:00