• 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            "decorators": [],
13            "loc": {
14              "start": {
15                "line": 17,
16                "column": 5
17              },
18              "end": {
19                "line": 17,
20                "column": 6
21              }
22            }
23          },
24          "init": {
25            "type": "TSAsExpression",
26            "expression": {
27              "type": "ArrayExpression",
28              "elements": [
29                {
30                  "type": "NumberLiteral",
31                  "value": 5,
32                  "loc": {
33                    "start": {
34                      "line": 17,
35                      "column": 10
36                    },
37                    "end": {
38                      "line": 17,
39                      "column": 11
40                    }
41                  }
42                },
43                {
44                  "type": "NumberLiteral",
45                  "value": 5,
46                  "loc": {
47                    "start": {
48                      "line": 17,
49                      "column": 13
50                    },
51                    "end": {
52                      "line": 17,
53                      "column": 14
54                    }
55                  }
56                },
57                {
58                  "type": "NumberLiteral",
59                  "value": 5,
60                  "loc": {
61                    "start": {
62                      "line": 17,
63                      "column": 16
64                    },
65                    "end": {
66                      "line": 17,
67                      "column": 17
68                    }
69                  }
70                },
71                {
72                  "type": "NumberLiteral",
73                  "value": 5,
74                  "loc": {
75                    "start": {
76                      "line": 17,
77                      "column": 19
78                    },
79                    "end": {
80                      "line": 17,
81                      "column": 20
82                    }
83                  }
84                }
85              ],
86              "loc": {
87                "start": {
88                  "line": 17,
89                  "column": 9
90                },
91                "end": {
92                  "line": 17,
93                  "column": 21
94                }
95              }
96            },
97            "typeAnnotation": {
98              "type": "TSTypeReference",
99              "typeName": {
100                "type": "Identifier",
101                "name": "const",
102                "decorators": [],
103                "loc": {
104                  "start": {
105                    "line": 17,
106                    "column": 25
107                  },
108                  "end": {
109                    "line": 17,
110                    "column": 30
111                  }
112                }
113              },
114              "loc": {
115                "start": {
116                  "line": 17,
117                  "column": 25
118                },
119                "end": {
120                  "line": 17,
121                  "column": 30
122                }
123              }
124            },
125            "loc": {
126              "start": {
127                "line": 17,
128                "column": 9
129              },
130              "end": {
131                "line": 17,
132                "column": 31
133              }
134            }
135          },
136          "loc": {
137            "start": {
138              "line": 17,
139              "column": 5
140            },
141            "end": {
142              "line": 17,
143              "column": 31
144            }
145          }
146        }
147      ],
148      "kind": "var",
149      "loc": {
150        "start": {
151          "line": 17,
152          "column": 1
153        },
154        "end": {
155          "line": 17,
156          "column": 31
157        }
158      }
159    },
160    {
161      "type": "ExpressionStatement",
162      "expression": {
163        "type": "AssignmentExpression",
164        "operator": "=",
165        "left": {
166          "type": "Identifier",
167          "name": "a",
168          "decorators": [],
169          "loc": {
170            "start": {
171              "line": 18,
172              "column": 1
173            },
174            "end": {
175              "line": 18,
176              "column": 2
177            }
178          }
179        },
180        "right": {
181          "type": "ArrayExpression",
182          "elements": [
183            {
184              "type": "NumberLiteral",
185              "value": 5,
186              "loc": {
187                "start": {
188                  "line": 18,
189                  "column": 6
190                },
191                "end": {
192                  "line": 18,
193                  "column": 7
194                }
195              }
196            },
197            {
198              "type": "NumberLiteral",
199              "value": 5,
200              "loc": {
201                "start": {
202                  "line": 18,
203                  "column": 9
204                },
205                "end": {
206                  "line": 18,
207                  "column": 10
208                }
209              }
210            },
211            {
212              "type": "NumberLiteral",
213              "value": 5,
214              "loc": {
215                "start": {
216                  "line": 18,
217                  "column": 12
218                },
219                "end": {
220                  "line": 18,
221                  "column": 13
222                }
223              }
224            },
225            {
226              "type": "NumberLiteral",
227              "value": 4,
228              "loc": {
229                "start": {
230                  "line": 18,
231                  "column": 15
232                },
233                "end": {
234                  "line": 18,
235                  "column": 16
236                }
237              }
238            }
239          ],
240          "loc": {
241            "start": {
242              "line": 18,
243              "column": 5
244            },
245            "end": {
246              "line": 18,
247              "column": 17
248            }
249          }
250        },
251        "loc": {
252          "start": {
253            "line": 18,
254            "column": 1
255          },
256          "end": {
257            "line": 18,
258            "column": 17
259          }
260        }
261      },
262      "loc": {
263        "start": {
264          "line": 18,
265          "column": 1
266        },
267        "end": {
268          "line": 18,
269          "column": 18
270        }
271      }
272    }
273  ],
274  "loc": {
275    "start": {
276      "line": 1,
277      "column": 1
278    },
279    "end": {
280      "line": 19,
281      "column": 1
282    }
283  }
284}
285TypeError: Type '4' is not assignable to type '5'. [as_expression_6.ts:18:15]
286