File: stringIndexerAssignments1.symbols

package info (click to toggle)
node-typescript 3.3.3333-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 324,548 kB
  • sloc: makefile: 6; sh: 3
file content (23 lines) | stat: -rw-r--r-- 933 bytes parent folder | download | duplicates (5)
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))