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