• 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": 19,
49                "column": 2
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": "A",
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": "b",
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": "A",
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": "c",
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": "TSStringKeyword",
249              "loc": {
250                "start": {
251                  "line": 26,
252                  "column": 8
253                },
254                "end": {
255                  "line": 26,
256                  "column": 14
257                }
258              }
259            },
260            "loc": {
261              "start": {
262                "line": 26,
263                "column": 5
264              },
265              "end": {
266                "line": 27,
267                "column": 2
268              }
269            }
270          }
271        ],
272        "loc": {
273          "start": {
274            "line": 25,
275            "column": 23
276          },
277          "end": {
278            "line": 27,
279            "column": 2
280          }
281        }
282      },
283      "id": {
284        "type": "Identifier",
285        "name": "C",
286        "decorators": [],
287        "loc": {
288          "start": {
289            "line": 25,
290            "column": 11
291          },
292          "end": {
293            "line": 25,
294            "column": 12
295          }
296        }
297      },
298      "extends": [
299        {
300          "type": "TSInterfaceHeritage",
301          "expression": {
302            "type": "TSTypeReference",
303            "typeName": {
304              "type": "Identifier",
305              "name": "A",
306              "decorators": [],
307              "loc": {
308                "start": {
309                  "line": 25,
310                  "column": 21
311                },
312                "end": {
313                  "line": 25,
314                  "column": 22
315                }
316              }
317            },
318            "loc": {
319              "start": {
320                "line": 25,
321                "column": 23
322              },
323              "end": {
324                "line": 25,
325                "column": 22
326              }
327            }
328          },
329          "loc": {
330            "start": {
331              "line": 25,
332              "column": 23
333            },
334            "end": {
335              "line": 25,
336              "column": 22
337            }
338          }
339        }
340      ],
341      "loc": {
342        "start": {
343          "line": 25,
344          "column": 1
345        },
346        "end": {
347          "line": 27,
348          "column": 2
349        }
350      }
351    },
352    {
353      "type": "TSInterfaceDeclaration",
354      "body": {
355        "type": "TSInterfaceBody",
356        "body": [
357          {
358            "type": "TSPropertySignature",
359            "computed": false,
360            "optional": false,
361            "readonly": false,
362            "key": {
363              "type": "Identifier",
364              "name": "d",
365              "decorators": [],
366              "loc": {
367                "start": {
368                  "line": 30,
369                  "column": 5
370                },
371                "end": {
372                  "line": 30,
373                  "column": 6
374                }
375              }
376            },
377            "typeAnnotation": {
378              "type": "TSTupleType",
379              "elementTypes": [
380                {
381                  "type": "TSNumberKeyword",
382                  "loc": {
383                    "start": {
384                      "line": 30,
385                      "column": 9
386                    },
387                    "end": {
388                      "line": 30,
389                      "column": 16
390                    }
391                  }
392                },
393                {
394                  "type": "TSNumberKeyword",
395                  "loc": {
396                    "start": {
397                      "line": 30,
398                      "column": 17
399                    },
400                    "end": {
401                      "line": 30,
402                      "column": 24
403                    }
404                  }
405                }
406              ],
407              "loc": {
408                "start": {
409                  "line": 30,
410                  "column": 8
411                },
412                "end": {
413                  "line": 30,
414                  "column": 24
415                }
416              }
417            },
418            "loc": {
419              "start": {
420                "line": 30,
421                "column": 5
422              },
423              "end": {
424                "line": 30,
425                "column": 25
426              }
427            }
428          }
429        ],
430        "loc": {
431          "start": {
432            "line": 29,
433            "column": 26
434          },
435          "end": {
436            "line": 31,
437            "column": 2
438          }
439        }
440      },
441      "id": {
442        "type": "Identifier",
443        "name": "D",
444        "decorators": [],
445        "loc": {
446          "start": {
447            "line": 29,
448            "column": 11
449          },
450          "end": {
451            "line": 29,
452            "column": 12
453          }
454        }
455      },
456      "extends": [
457        {
458          "type": "TSInterfaceHeritage",
459          "expression": {
460            "type": "TSTypeReference",
461            "typeName": {
462              "type": "Identifier",
463              "name": "B",
464              "decorators": [],
465              "loc": {
466                "start": {
467                  "line": 29,
468                  "column": 21
469                },
470                "end": {
471                  "line": 29,
472                  "column": 22
473                }
474              }
475            },
476            "loc": {
477              "start": {
478                "line": 29,
479                "column": 22
480              },
481              "end": {
482                "line": 29,
483                "column": 22
484              }
485            }
486          },
487          "loc": {
488            "start": {
489              "line": 29,
490              "column": 22
491            },
492            "end": {
493              "line": 29,
494              "column": 22
495            }
496          }
497        },
498        {
499          "type": "TSInterfaceHeritage",
500          "expression": {
501            "type": "TSTypeReference",
502            "typeName": {
503              "type": "Identifier",
504              "name": "C",
505              "decorators": [],
506              "loc": {
507                "start": {
508                  "line": 29,
509                  "column": 24
510                },
511                "end": {
512                  "line": 29,
513                  "column": 25
514                }
515              }
516            },
517            "loc": {
518              "start": {
519                "line": 29,
520                "column": 26
521              },
522              "end": {
523                "line": 29,
524                "column": 25
525              }
526            }
527          },
528          "loc": {
529            "start": {
530              "line": 29,
531              "column": 26
532            },
533            "end": {
534              "line": 29,
535              "column": 25
536            }
537          }
538        }
539      ],
540      "loc": {
541        "start": {
542          "line": 29,
543          "column": 1
544        },
545        "end": {
546          "line": 31,
547          "column": 2
548        }
549      }
550    },
551    {
552      "type": "VariableDeclaration",
553      "declarations": [
554        {
555          "type": "VariableDeclarator",
556          "id": {
557            "type": "Identifier",
558            "name": "d",
559            "typeAnnotation": {
560              "type": "TSTypeReference",
561              "typeName": {
562                "type": "Identifier",
563                "name": "D",
564                "decorators": [],
565                "loc": {
566                  "start": {
567                    "line": 33,
568                    "column": 8
569                  },
570                  "end": {
571                    "line": 33,
572                    "column": 9
573                  }
574                }
575              },
576              "loc": {
577                "start": {
578                  "line": 33,
579                  "column": 8
580                },
581                "end": {
582                  "line": 33,
583                  "column": 9
584                }
585              }
586            },
587            "decorators": [],
588            "loc": {
589              "start": {
590                "line": 33,
591                "column": 5
592              },
593              "end": {
594                "line": 33,
595                "column": 6
596              }
597            }
598          },
599          "init": null,
600          "loc": {
601            "start": {
602              "line": 33,
603              "column": 5
604            },
605            "end": {
606              "line": 33,
607              "column": 6
608            }
609          }
610        }
611      ],
612      "kind": "var",
613      "loc": {
614        "start": {
615          "line": 33,
616          "column": 1
617        },
618        "end": {
619          "line": 33,
620          "column": 10
621        }
622      }
623    },
624    {
625      "type": "VariableDeclaration",
626      "declarations": [
627        {
628          "type": "VariableDeclarator",
629          "id": {
630            "type": "Identifier",
631            "name": "a",
632            "typeAnnotation": {
633              "type": "TSTypeReference",
634              "typeName": {
635                "type": "Identifier",
636                "name": "A",
637                "decorators": [],
638                "loc": {
639                  "start": {
640                    "line": 34,
641                    "column": 8
642                  },
643                  "end": {
644                    "line": 34,
645                    "column": 9
646                  }
647                }
648              },
649              "loc": {
650                "start": {
651                  "line": 34,
652                  "column": 8
653                },
654                "end": {
655                  "line": 34,
656                  "column": 9
657                }
658              }
659            },
660            "decorators": [],
661            "loc": {
662              "start": {
663                "line": 34,
664                "column": 5
665              },
666              "end": {
667                "line": 34,
668                "column": 6
669              }
670            }
671          },
672          "init": null,
673          "loc": {
674            "start": {
675              "line": 34,
676              "column": 5
677            },
678            "end": {
679              "line": 34,
680              "column": 6
681            }
682          }
683        }
684      ],
685      "kind": "var",
686      "loc": {
687        "start": {
688          "line": 34,
689          "column": 1
690        },
691        "end": {
692          "line": 34,
693          "column": 10
694        }
695      }
696    },
697    {
698      "type": "ExpressionStatement",
699      "expression": {
700        "type": "AssignmentExpression",
701        "operator": "=",
702        "left": {
703          "type": "Identifier",
704          "name": "a",
705          "decorators": [],
706          "loc": {
707            "start": {
708              "line": 36,
709              "column": 1
710            },
711            "end": {
712              "line": 36,
713              "column": 2
714            }
715          }
716        },
717        "right": {
718          "type": "Identifier",
719          "name": "d",
720          "decorators": [],
721          "loc": {
722            "start": {
723              "line": 36,
724              "column": 5
725            },
726            "end": {
727              "line": 36,
728              "column": 6
729            }
730          }
731        },
732        "loc": {
733          "start": {
734            "line": 36,
735            "column": 1
736          },
737          "end": {
738            "line": 36,
739            "column": 6
740          }
741        }
742      },
743      "loc": {
744        "start": {
745          "line": 36,
746          "column": 1
747        },
748        "end": {
749          "line": 36,
750          "column": 7
751        }
752      }
753    },
754    {
755      "type": "ExpressionStatement",
756      "expression": {
757        "type": "AssignmentExpression",
758        "operator": "=",
759        "left": {
760          "type": "Identifier",
761          "name": "d",
762          "decorators": [],
763          "loc": {
764            "start": {
765              "line": 37,
766              "column": 1
767            },
768            "end": {
769              "line": 37,
770              "column": 2
771            }
772          }
773        },
774        "right": {
775          "type": "Identifier",
776          "name": "a",
777          "decorators": [],
778          "loc": {
779            "start": {
780              "line": 37,
781              "column": 5
782            },
783            "end": {
784              "line": 37,
785              "column": 6
786            }
787          }
788        },
789        "loc": {
790          "start": {
791            "line": 37,
792            "column": 1
793          },
794          "end": {
795            "line": 37,
796            "column": 6
797          }
798        }
799      },
800      "loc": {
801        "start": {
802          "line": 37,
803          "column": 1
804        },
805        "end": {
806          "line": 37,
807          "column": 7
808        }
809      }
810    }
811  ],
812  "loc": {
813    "start": {
814      "line": 1,
815      "column": 1
816    },
817    "end": {
818      "line": 38,
819      "column": 1
820    }
821  }
822}
823TypeError: Type 'A' is not assignable to type 'D'. [interfaceAssignment3.ts:37:1]
824