• 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": false,
14            "key": {
15              "type": "Identifier",
16              "name": "a",
17              "decorators": [],
18              "loc": {
19                "start": {
20                  "line": 18,
21                  "column": 5
22                },
23                "end": {
24                  "line": 18,
25                  "column": 6
26                }
27              }
28            },
29            "typeAnnotation": {
30              "type": "TSNumberKeyword",
31              "loc": {
32                "start": {
33                  "line": 18,
34                  "column": 8
35                },
36                "end": {
37                  "line": 18,
38                  "column": 14
39                }
40              }
41            },
42            "loc": {
43              "start": {
44                "line": 18,
45                "column": 5
46              },
47              "end": {
48                "line": 18,
49                "column": 15
50              }
51            }
52          }
53        ],
54        "loc": {
55          "start": {
56            "line": 17,
57            "column": 13
58          },
59          "end": {
60            "line": 19,
61            "column": 2
62          }
63        }
64      },
65      "id": {
66        "type": "Identifier",
67        "name": "k",
68        "decorators": [],
69        "loc": {
70          "start": {
71            "line": 17,
72            "column": 11
73          },
74          "end": {
75            "line": 17,
76            "column": 12
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": "TSInterfaceDeclaration",
94      "body": {
95        "type": "TSInterfaceBody",
96        "body": [
97          {
98            "type": "TSPropertySignature",
99            "computed": false,
100            "optional": false,
101            "readonly": false,
102            "key": {
103              "type": "Identifier",
104              "name": "a",
105              "decorators": [],
106              "loc": {
107                "start": {
108                  "line": 22,
109                  "column": 5
110                },
111                "end": {
112                  "line": 22,
113                  "column": 6
114                }
115              }
116            },
117            "typeAnnotation": {
118              "type": "TSNumberKeyword",
119              "loc": {
120                "start": {
121                  "line": 22,
122                  "column": 8
123                },
124                "end": {
125                  "line": 22,
126                  "column": 14
127                }
128              }
129            },
130            "loc": {
131              "start": {
132                "line": 22,
133                "column": 5
134              },
135              "end": {
136                "line": 22,
137                "column": 15
138              }
139            }
140          }
141        ],
142        "loc": {
143          "start": {
144            "line": 21,
145            "column": 23
146          },
147          "end": {
148            "line": 23,
149            "column": 2
150          }
151        }
152      },
153      "id": {
154        "type": "Identifier",
155        "name": "b",
156        "decorators": [],
157        "loc": {
158          "start": {
159            "line": 21,
160            "column": 11
161          },
162          "end": {
163            "line": 21,
164            "column": 12
165          }
166        }
167      },
168      "extends": [
169        {
170          "type": "TSInterfaceHeritage",
171          "expression": {
172            "type": "TSTypeReference",
173            "typeName": {
174              "type": "Identifier",
175              "name": "k",
176              "decorators": [],
177              "loc": {
178                "start": {
179                  "line": 21,
180                  "column": 21
181                },
182                "end": {
183                  "line": 21,
184                  "column": 22
185                }
186              }
187            },
188            "loc": {
189              "start": {
190                "line": 21,
191                "column": 23
192              },
193              "end": {
194                "line": 21,
195                "column": 22
196              }
197            }
198          },
199          "loc": {
200            "start": {
201              "line": 21,
202              "column": 23
203            },
204            "end": {
205              "line": 21,
206              "column": 22
207            }
208          }
209        }
210      ],
211      "loc": {
212        "start": {
213          "line": 21,
214          "column": 1
215        },
216        "end": {
217          "line": 23,
218          "column": 2
219        }
220      }
221    },
222    {
223      "type": "TSInterfaceDeclaration",
224      "body": {
225        "type": "TSInterfaceBody",
226        "body": [
227          {
228            "type": "TSPropertySignature",
229            "computed": false,
230            "optional": false,
231            "readonly": false,
232            "key": {
233              "type": "Identifier",
234              "name": "a",
235              "decorators": [],
236              "loc": {
237                "start": {
238                  "line": 26,
239                  "column": 5
240                },
241                "end": {
242                  "line": 26,
243                  "column": 6
244                }
245              }
246            },
247            "typeAnnotation": {
248              "type": "TSUnionType",
249              "types": [
250                {
251                  "type": "TSNumberKeyword",
252                  "loc": {
253                    "start": {
254                      "line": 26,
255                      "column": 8
256                    },
257                    "end": {
258                      "line": 26,
259                      "column": 14
260                    }
261                  }
262                },
263                {
264                  "type": "TSStringKeyword",
265                  "loc": {
266                    "start": {
267                      "line": 26,
268                      "column": 17
269                    },
270                    "end": {
271                      "line": 26,
272                      "column": 23
273                    }
274                  }
275                }
276              ],
277              "loc": {
278                "start": {
279                  "line": 26,
280                  "column": 8
281                },
282                "end": {
283                  "line": 26,
284                  "column": 23
285                }
286              }
287            },
288            "loc": {
289              "start": {
290                "line": 26,
291                "column": 5
292              },
293              "end": {
294                "line": 26,
295                "column": 24
296              }
297            }
298          }
299        ],
300        "loc": {
301          "start": {
302            "line": 25,
303            "column": 13
304          },
305          "end": {
306            "line": 27,
307            "column": 2
308          }
309        }
310      },
311      "id": {
312        "type": "Identifier",
313        "name": "c",
314        "decorators": [],
315        "loc": {
316          "start": {
317            "line": 25,
318            "column": 11
319          },
320          "end": {
321            "line": 25,
322            "column": 12
323          }
324        }
325      },
326      "extends": [],
327      "loc": {
328        "start": {
329          "line": 25,
330          "column": 1
331        },
332        "end": {
333          "line": 27,
334          "column": 2
335        }
336      }
337    },
338    {
339      "type": "VariableDeclaration",
340      "declarations": [
341        {
342          "type": "VariableDeclarator",
343          "id": {
344            "type": "Identifier",
345            "name": "a",
346            "typeAnnotation": {
347              "type": "TSTypeReference",
348              "typeName": {
349                "type": "Identifier",
350                "name": "c",
351                "decorators": [],
352                "loc": {
353                  "start": {
354                    "line": 29,
355                    "column": 8
356                  },
357                  "end": {
358                    "line": 29,
359                    "column": 9
360                  }
361                }
362              },
363              "loc": {
364                "start": {
365                  "line": 29,
366                  "column": 8
367                },
368                "end": {
369                  "line": 29,
370                  "column": 9
371                }
372              }
373            },
374            "decorators": [],
375            "loc": {
376              "start": {
377                "line": 29,
378                "column": 5
379              },
380              "end": {
381                "line": 29,
382                "column": 6
383              }
384            }
385          },
386          "init": null,
387          "loc": {
388            "start": {
389              "line": 29,
390              "column": 5
391            },
392            "end": {
393              "line": 29,
394              "column": 6
395            }
396          }
397        }
398      ],
399      "kind": "var",
400      "loc": {
401        "start": {
402          "line": 29,
403          "column": 1
404        },
405        "end": {
406          "line": 29,
407          "column": 10
408        }
409      }
410    },
411    {
412      "type": "VariableDeclaration",
413      "declarations": [
414        {
415          "type": "VariableDeclarator",
416          "id": {
417            "type": "Identifier",
418            "name": "a",
419            "typeAnnotation": {
420              "type": "TSTypeReference",
421              "typeName": {
422                "type": "Identifier",
423                "name": "b",
424                "decorators": [],
425                "loc": {
426                  "start": {
427                    "line": 30,
428                    "column": 8
429                  },
430                  "end": {
431                    "line": 30,
432                    "column": 9
433                  }
434                }
435              },
436              "loc": {
437                "start": {
438                  "line": 30,
439                  "column": 8
440                },
441                "end": {
442                  "line": 30,
443                  "column": 9
444                }
445              }
446            },
447            "decorators": [],
448            "loc": {
449              "start": {
450                "line": 30,
451                "column": 5
452              },
453              "end": {
454                "line": 30,
455                "column": 6
456              }
457            }
458          },
459          "init": null,
460          "loc": {
461            "start": {
462              "line": 30,
463              "column": 5
464            },
465            "end": {
466              "line": 30,
467              "column": 6
468            }
469          }
470        }
471      ],
472      "kind": "var",
473      "loc": {
474        "start": {
475          "line": 30,
476          "column": 1
477        },
478        "end": {
479          "line": 30,
480          "column": 10
481        }
482      }
483    }
484  ],
485  "loc": {
486    "start": {
487      "line": 1,
488      "column": 1
489    },
490    "end": {
491      "line": 31,
492      "column": 1
493    }
494  }
495}
496TypeError: Subsequent variable declaration must have the same type. Variable 'a' must be of type 'c', but here has type 'b'. [varRedeclaration14.ts:30:5]
497