• 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              "loc": {
16                "start": {
17                  "line": 17,
18                  "column": 8
19                },
20                "end": {
21                  "line": 17,
22                  "column": 10
23                }
24              }
25            },
26            "decorators": [],
27            "loc": {
28              "start": {
29                "line": 17,
30                "column": 5
31              },
32              "end": {
33                "line": 17,
34                "column": 6
35              }
36            }
37          },
38          "init": null,
39          "loc": {
40            "start": {
41              "line": 17,
42              "column": 5
43            },
44            "end": {
45              "line": 17,
46              "column": 6
47            }
48          }
49        }
50      ],
51      "kind": "var",
52      "loc": {
53        "start": {
54          "line": 17,
55          "column": 1
56        },
57        "end": {
58          "line": 17,
59          "column": 11
60        }
61      }
62    },
63    {
64      "type": "VariableDeclaration",
65      "declarations": [
66        {
67          "type": "VariableDeclarator",
68          "id": {
69            "type": "Identifier",
70            "name": "b",
71            "typeAnnotation": {
72              "type": "TSTupleType",
73              "elementTypes": [
74                {
75                  "type": "TSTupleType",
76                  "elementTypes": [],
77                  "loc": {
78                    "start": {
79                      "line": 18,
80                      "column": 9
81                    },
82                    "end": {
83                      "line": 18,
84                      "column": 12
85                    }
86                  }
87                }
88              ],
89              "loc": {
90                "start": {
91                  "line": 18,
92                  "column": 8
93                },
94                "end": {
95                  "line": 18,
96                  "column": 12
97                }
98              }
99            },
100            "decorators": [],
101            "loc": {
102              "start": {
103                "line": 18,
104                "column": 5
105              },
106              "end": {
107                "line": 18,
108                "column": 6
109              }
110            }
111          },
112          "init": null,
113          "loc": {
114            "start": {
115              "line": 18,
116              "column": 5
117            },
118            "end": {
119              "line": 18,
120              "column": 6
121            }
122          }
123        }
124      ],
125      "kind": "var",
126      "loc": {
127        "start": {
128          "line": 18,
129          "column": 1
130        },
131        "end": {
132          "line": 18,
133          "column": 13
134        }
135      }
136    },
137    {
138      "type": "ExpressionStatement",
139      "expression": {
140        "type": "AssignmentExpression",
141        "operator": "=",
142        "left": {
143          "type": "Identifier",
144          "name": "a",
145          "decorators": [],
146          "loc": {
147            "start": {
148              "line": 19,
149              "column": 1
150            },
151            "end": {
152              "line": 19,
153              "column": 2
154            }
155          }
156        },
157        "right": {
158          "type": "Identifier",
159          "name": "b",
160          "decorators": [],
161          "loc": {
162            "start": {
163              "line": 19,
164              "column": 5
165            },
166            "end": {
167              "line": 19,
168              "column": 6
169            }
170          }
171        },
172        "loc": {
173          "start": {
174            "line": 19,
175            "column": 1
176          },
177          "end": {
178            "line": 19,
179            "column": 6
180          }
181        }
182      },
183      "loc": {
184        "start": {
185          "line": 19,
186          "column": 1
187        },
188        "end": {
189          "line": 19,
190          "column": 7
191        }
192      }
193    }
194  ],
195  "loc": {
196    "start": {
197      "line": 1,
198      "column": 1
199    },
200    "end": {
201      "line": 19,
202      "column": 7
203    }
204  }
205}
206TypeError: Type '[[]]' is not assignable to type '[]'. [tupleAssignability11.ts:19:1]
207