1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
=== tests/cases/compiler/stringIndexerAssignments1.ts ===
var x: { [index: string]: string; one: string; };
>x : Symbol(x, Decl(stringIndexerAssignments1.ts, 0, 3))
>index : Symbol(index, Decl(stringIndexerAssignments1.ts, 0, 10))
>one : Symbol(one, Decl(stringIndexerAssignments1.ts, 0, 33))
var a: { one: string; };
>a : Symbol(a, Decl(stringIndexerAssignments1.ts, 1, 3))
>one : Symbol(one, Decl(stringIndexerAssignments1.ts, 1, 8))
var b: { one: number; two: string; };
>b : Symbol(b, Decl(stringIndexerAssignments1.ts, 2, 3))
>one : Symbol(one, Decl(stringIndexerAssignments1.ts, 2, 8))
>two : Symbol(two, Decl(stringIndexerAssignments1.ts, 2, 21))
x = a;
>x : Symbol(x, Decl(stringIndexerAssignments1.ts, 0, 3))
>a : Symbol(a, Decl(stringIndexerAssignments1.ts, 1, 3))
x = b; // error
>x : Symbol(x, Decl(stringIndexerAssignments1.ts, 0, 3))
>b : Symbol(b, Decl(stringIndexerAssignments1.ts, 2, 3))
|