29 lines
407 B
Text
29 lines
407 B
Text
=== tests/cases/compiler/numericIndexerConstraint4.ts ===
|
|
class A {
|
|
>A : A
|
|
|
|
foo: number;
|
|
>foo : number
|
|
}
|
|
|
|
class B extends A {
|
|
>B : B
|
|
>A : A
|
|
|
|
bar: string;
|
|
>bar : string
|
|
}
|
|
|
|
var x: {
|
|
>x : { [idx: number]: A; }
|
|
|
|
[idx: number]: A;
|
|
>idx : number
|
|
>A : A
|
|
|
|
} = { data: new B() }
|
|
>{ data: new B() } : { [x: number]: undefined; data: B; }
|
|
>data : B
|
|
>new B() : B
|
|
>B : typeof B
|
|
|