• 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": "MemberExpression",
167          "object": {
168            "type": "Identifier",
169            "name": "a",
170            "decorators": [],
171            "loc": {
172              "start": {
173                "line": 18,
174                "column": 1
175              },
176              "end": {
177                "line": 18,
178                "column": 2
179              }
180            }
181          },
182          "property": {
183            "type": "NumberLiteral",
184            "value": 1,
185            "loc": {
186              "start": {
187                "line": 18,
188                "column": 3
189              },
190              "end": {
191                "line": 18,
192                "column": 4
193              }
194            }
195          },
196          "computed": true,
197          "optional": false,
198          "loc": {
199            "start": {
200              "line": 18,
201              "column": 1
202            },
203            "end": {
204              "line": 18,
205              "column": 5
206            }
207          }
208        },
209        "right": {
210          "type": "NumberLiteral",
211          "value": 5,
212          "loc": {
213            "start": {
214              "line": 18,
215              "column": 8
216            },
217            "end": {
218              "line": 18,
219              "column": 9
220            }
221          }
222        },
223        "loc": {
224          "start": {
225            "line": 18,
226            "column": 1
227          },
228          "end": {
229            "line": 18,
230            "column": 9
231          }
232        }
233      },
234      "loc": {
235        "start": {
236          "line": 18,
237          "column": 1
238        },
239        "end": {
240          "line": 18,
241          "column": 10
242        }
243      }
244    }
245  ],
246  "loc": {
247    "start": {
248      "line": 1,
249      "column": 1
250    },
251    "end": {
252      "line": 19,
253      "column": 1
254    }
255  }
256}
257TypeError: Cannot assign to this property because it is readonly. [as_expression_12.ts:18:1]
258