• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1{
2  "type": "Program",
3  "statements": [
4    {
5      "type": "VariableDeclaration",
6      "declarations": [
7        {
8          "type": "VariableDeclarator",
9          "id": {
10            "type": "Identifier",
11            "name": "a",
12            "typeAnnotation": {
13              "type": "TSTupleType",
14              "elementTypes": [
15                {
16                  "type": "TSNumberKeyword",
17                  "loc": {
18                    "start": {
19                      "line": 17,
20                      "column": 9
21                    },
22                    "end": {
23                      "line": 17,
24                      "column": 16
25                    }
26                  }
27                },
28                {
29                  "type": "TSStringKeyword",
30                  "loc": {
31                    "start": {
32                      "line": 17,
33                      "column": 17
34                    },
35                    "end": {
36                      "line": 17,
37                      "column": 24
38                    }
39                  }
40                }
41              ],
42              "loc": {
43                "start": {
44                  "line": 17,
45                  "column": 8
46                },
47                "end": {
48                  "line": 17,
49                  "column": 24
50                }
51              }
52            },
53            "decorators": [],
54            "loc": {
55              "start": {
56                "line": 17,
57                "column": 5
58              },
59              "end": {
60                "line": 17,
61                "column": 6
62              }
63            }
64          },
65          "init": {
66            "type": "ArrayExpression",
67            "elements": [
68              {
69                "type": "NumberLiteral",
70                "value": 5,
71                "loc": {
72                  "start": {
73                    "line": 17,
74                    "column": 28
75                  },
76                  "end": {
77                    "line": 17,
78                    "column": 29
79                  }
80                }
81              },
82              {
83                "type": "NumberLiteral",
84                "value": 6,
85                "loc": {
86                  "start": {
87                    "line": 17,
88                    "column": 31
89                  },
90                  "end": {
91                    "line": 17,
92                    "column": 32
93                  }
94                }
95              }
96            ],
97            "loc": {
98              "start": {
99                "line": 17,
100                "column": 27
101              },
102              "end": {
103                "line": 17,
104                "column": 33
105              }
106            }
107          },
108          "loc": {
109            "start": {
110              "line": 17,
111              "column": 5
112            },
113            "end": {
114              "line": 17,
115              "column": 33
116            }
117          }
118        }
119      ],
120      "kind": "var",
121      "loc": {
122        "start": {
123          "line": 17,
124          "column": 1
125        },
126        "end": {
127          "line": 17,
128          "column": 34
129        }
130      }
131    }
132  ],
133  "loc": {
134    "start": {
135      "line": 1,
136      "column": 1
137    },
138    "end": {
139      "line": 17,
140      "column": 34
141    }
142  }
143}
144TypeError: Type 'number' is not assignable to type 'string'. [tupleAssignability5.ts:17:31]
145