• 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": 12
50                    },
51                    "end": {
52                      "line": 17,
53                      "column": 13
54                    }
55                  }
56                },
57                {
58                  "type": "NumberLiteral",
59                  "value": 5,
60                  "loc": {
61                    "start": {
62                      "line": 17,
63                      "column": 14
64                    },
65                    "end": {
66                      "line": 17,
67                      "column": 15
68                    }
69                  }
70                },
71                {
72                  "type": "NumberLiteral",
73                  "value": 5,
74                  "loc": {
75                    "start": {
76                      "line": 17,
77                      "column": 16
78                    },
79                    "end": {
80                      "line": 17,
81                      "column": 17
82                    }
83                  }
84                }
85              ],
86              "loc": {
87                "start": {
88                  "line": 17,
89                  "column": 9
90                },
91                "end": {
92                  "line": 17,
93                  "column": 18
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": 22
107                  },
108                  "end": {
109                    "line": 17,
110                    "column": 27
111                  }
112                }
113              },
114              "loc": {
115                "start": {
116                  "line": 17,
117                  "column": 22
118                },
119                "end": {
120                  "line": 17,
121                  "column": 27
122                }
123              }
124            },
125            "loc": {
126              "start": {
127                "line": 17,
128                "column": 9
129              },
130              "end": {
131                "line": 17,
132                "column": 28
133              }
134            }
135          },
136          "loc": {
137            "start": {
138              "line": 17,
139              "column": 5
140            },
141            "end": {
142              "line": 17,
143              "column": 28
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": 28
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": "NumberLiteral",
182          "value": 5,
183          "loc": {
184            "start": {
185              "line": 18,
186              "column": 5
187            },
188            "end": {
189              "line": 18,
190              "column": 6
191            }
192          }
193        },
194        "loc": {
195          "start": {
196            "line": 18,
197            "column": 1
198          },
199          "end": {
200            "line": 18,
201            "column": 6
202          }
203        }
204      },
205      "loc": {
206        "start": {
207          "line": 18,
208          "column": 1
209        },
210        "end": {
211          "line": 18,
212          "column": 7
213        }
214      }
215    }
216  ],
217  "loc": {
218    "start": {
219      "line": 1,
220      "column": 1
221    },
222    "end": {
223      "line": 19,
224      "column": 1
225    }
226  }
227}
228TypeError: Type 'number' is not assignable to type 'readonly [5, 5, 5, 5]'. [as_expression_10.ts:18:1]
229