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