• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1{
2  "type": "Program",
3  "statements": [
4    {
5      "type": "TSInterfaceDeclaration",
6      "body": {
7        "type": "TSInterfaceBody",
8        "body": [
9          {
10            "type": "TSPropertySignature",
11            "computed": false,
12            "optional": false,
13            "readonly": true,
14            "key": {
15              "type": "Identifier",
16              "name": "c",
17              "decorators": [],
18              "loc": {
19                "start": {
20                  "line": 18,
21                  "column": 14
22                },
23                "end": {
24                  "line": 18,
25                  "column": 15
26                }
27              }
28            },
29            "typeAnnotation": {
30              "type": "TSNumberKeyword",
31              "loc": {
32                "start": {
33                  "line": 18,
34                  "column": 17
35                },
36                "end": {
37                  "line": 18,
38                  "column": 23
39                }
40              }
41            },
42            "loc": {
43              "start": {
44                "line": 18,
45                "column": 5
46              },
47              "end": {
48                "line": 18,
49                "column": 24
50              }
51            }
52          }
53        ],
54        "loc": {
55          "start": {
56            "line": 17,
57            "column": 15
58          },
59          "end": {
60            "line": 19,
61            "column": 2
62          }
63        }
64      },
65      "id": {
66        "type": "Identifier",
67        "name": "foo",
68        "decorators": [],
69        "loc": {
70          "start": {
71            "line": 17,
72            "column": 11
73          },
74          "end": {
75            "line": 17,
76            "column": 14
77          }
78        }
79      },
80      "extends": [],
81      "loc": {
82        "start": {
83          "line": 17,
84          "column": 1
85        },
86        "end": {
87          "line": 19,
88          "column": 2
89        }
90      }
91    },
92    {
93      "type": "VariableDeclaration",
94      "declarations": [
95        {
96          "type": "VariableDeclarator",
97          "id": {
98            "type": "Identifier",
99            "name": "a",
100            "typeAnnotation": {
101              "type": "TSTypeLiteral",
102              "members": [
103                {
104                  "type": "TSPropertySignature",
105                  "computed": false,
106                  "optional": false,
107                  "readonly": false,
108                  "key": {
109                    "type": "Identifier",
110                    "name": "b",
111                    "decorators": [],
112                    "loc": {
113                      "start": {
114                        "line": 21,
115                        "column": 9
116                      },
117                      "end": {
118                        "line": 21,
119                        "column": 10
120                      }
121                    }
122                  },
123                  "typeAnnotation": {
124                    "type": "TSTypeReference",
125                    "typeName": {
126                      "type": "Identifier",
127                      "name": "foo",
128                      "decorators": [],
129                      "loc": {
130                        "start": {
131                          "line": 21,
132                          "column": 12
133                        },
134                        "end": {
135                          "line": 21,
136                          "column": 15
137                        }
138                      }
139                    },
140                    "loc": {
141                      "start": {
142                        "line": 21,
143                        "column": 12
144                      },
145                      "end": {
146                        "line": 21,
147                        "column": 15
148                      }
149                    }
150                  },
151                  "loc": {
152                    "start": {
153                      "line": 21,
154                      "column": 9
155                    },
156                    "end": {
157                      "line": 21,
158                      "column": 16
159                    }
160                  }
161                }
162              ],
163              "loc": {
164                "start": {
165                  "line": 21,
166                  "column": 8
167                },
168                "end": {
169                  "line": 21,
170                  "column": 16
171                }
172              }
173            },
174            "decorators": [],
175            "loc": {
176              "start": {
177                "line": 21,
178                "column": 5
179              },
180              "end": {
181                "line": 21,
182                "column": 6
183              }
184            }
185          },
186          "init": null,
187          "loc": {
188            "start": {
189              "line": 21,
190              "column": 5
191            },
192            "end": {
193              "line": 21,
194              "column": 6
195            }
196          }
197        }
198      ],
199      "kind": "var",
200      "loc": {
201        "start": {
202          "line": 21,
203          "column": 1
204        },
205        "end": {
206          "line": 21,
207          "column": 17
208        }
209      }
210    },
211    {
212      "type": "ExpressionStatement",
213      "expression": {
214        "type": "AssignmentExpression",
215        "operator": "=",
216        "left": {
217          "type": "MemberExpression",
218          "object": {
219            "type": "MemberExpression",
220            "object": {
221              "type": "Identifier",
222              "name": "a",
223              "decorators": [],
224              "loc": {
225                "start": {
226                  "line": 22,
227                  "column": 1
228                },
229                "end": {
230                  "line": 22,
231                  "column": 2
232                }
233              }
234            },
235            "property": {
236              "type": "Identifier",
237              "name": "b",
238              "decorators": [],
239              "loc": {
240                "start": {
241                  "line": 22,
242                  "column": 3
243                },
244                "end": {
245                  "line": 22,
246                  "column": 4
247                }
248              }
249            },
250            "computed": false,
251            "optional": false,
252            "loc": {
253              "start": {
254                "line": 22,
255                "column": 1
256              },
257              "end": {
258                "line": 22,
259                "column": 4
260              }
261            }
262          },
263          "property": {
264            "type": "Identifier",
265            "name": "c",
266            "decorators": [],
267            "loc": {
268              "start": {
269                "line": 22,
270                "column": 5
271              },
272              "end": {
273                "line": 22,
274                "column": 6
275              }
276            }
277          },
278          "computed": false,
279          "optional": false,
280          "loc": {
281            "start": {
282              "line": 22,
283              "column": 1
284            },
285            "end": {
286              "line": 22,
287              "column": 6
288            }
289          }
290        },
291        "right": {
292          "type": "NumberLiteral",
293          "value": 5,
294          "loc": {
295            "start": {
296              "line": 22,
297              "column": 9
298            },
299            "end": {
300              "line": 22,
301              "column": 10
302            }
303          }
304        },
305        "loc": {
306          "start": {
307            "line": 22,
308            "column": 1
309          },
310          "end": {
311            "line": 22,
312            "column": 10
313          }
314        }
315      },
316      "loc": {
317        "start": {
318          "line": 22,
319          "column": 1
320        },
321        "end": {
322          "line": 22,
323          "column": 11
324        }
325      }
326    }
327  ],
328  "loc": {
329    "start": {
330      "line": 1,
331      "column": 1
332    },
333    "end": {
334      "line": 23,
335      "column": 1
336    }
337  }
338}
339TypeError: Cannot assign to this property because it is readonly. [member_expression_76.ts:22:1]
340