30 lines
407 B
Plaintext
30 lines
407 B
Plaintext
=== 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
|
|
|