• 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": true,
13            "readonly": false,
14            "key": {
15              "type": "Identifier",
16              "name": "a",
17              "decorators": [],
18              "loc": {
19                "start": {
20                  "line": 18,
21                  "column": 5,
22                  "program": "test-interface.ts"
23                },
24                "end": {
25                  "line": 18,
26                  "column": 6,
27                  "program": "test-interface.ts"
28                }
29              }
30            },
31            "typeAnnotation": {
32              "type": "TSNumberKeyword",
33              "loc": {
34                "start": {
35                  "line": 18,
36                  "column": 9,
37                  "program": "test-interface.ts"
38                },
39                "end": {
40                  "line": 18,
41                  "column": 15,
42                  "program": "test-interface.ts"
43                }
44              }
45            },
46            "loc": {
47              "start": {
48                "line": 18,
49                "column": 5,
50                "program": "test-interface.ts"
51              },
52              "end": {
53                "line": 18,
54                "column": 16,
55                "program": "test-interface.ts"
56              }
57            }
58          },
59          {
60            "type": "TSPropertySignature",
61            "computed": false,
62            "optional": false,
63            "readonly": false,
64            "key": {
65              "type": "Identifier",
66              "name": "b",
67              "decorators": [],
68              "loc": {
69                "start": {
70                  "line": 19,
71                  "column": 5,
72                  "program": "test-interface.ts"
73                },
74                "end": {
75                  "line": 19,
76                  "column": 6,
77                  "program": "test-interface.ts"
78                }
79              }
80            },
81            "typeAnnotation": {
82              "type": "TSUnionType",
83              "types": [
84                {
85                  "type": "TSStringKeyword",
86                  "loc": {
87                    "start": {
88                      "line": 19,
89                      "column": 8,
90                      "program": "test-interface.ts"
91                    },
92                    "end": {
93                      "line": 19,
94                      "column": 14,
95                      "program": "test-interface.ts"
96                    }
97                  }
98                },
99                {
100                  "type": "TSBooleanKeyword",
101                  "loc": {
102                    "start": {
103                      "line": 19,
104                      "column": 17,
105                      "program": "test-interface.ts"
106                    },
107                    "end": {
108                      "line": 19,
109                      "column": 24,
110                      "program": "test-interface.ts"
111                    }
112                  }
113                }
114              ],
115              "loc": {
116                "start": {
117                  "line": 19,
118                  "column": 8,
119                  "program": "test-interface.ts"
120                },
121                "end": {
122                  "line": 19,
123                  "column": 24,
124                  "program": "test-interface.ts"
125                }
126              }
127            },
128            "loc": {
129              "start": {
130                "line": 19,
131                "column": 5,
132                "program": "test-interface.ts"
133              },
134              "end": {
135                "line": 19,
136                "column": 25,
137                "program": "test-interface.ts"
138              }
139            }
140          },
141          {
142            "type": "TSMethodSignature",
143            "computed": false,
144            "optional": false,
145            "key": {
146              "type": "Identifier",
147              "name": "c",
148              "decorators": [],
149              "loc": {
150                "start": {
151                  "line": 20,
152                  "column": 5,
153                  "program": "test-interface.ts"
154                },
155                "end": {
156                  "line": 20,
157                  "column": 6,
158                  "program": "test-interface.ts"
159                }
160              }
161            },
162            "params": [
163              {
164                "type": "Identifier",
165                "name": "a",
166                "typeAnnotation": {
167                  "type": "TSFunctionType",
168                  "params": [
169                    {
170                      "type": "Identifier",
171                      "name": "a",
172                      "typeAnnotation": {
173                        "type": "TSNumberKeyword",
174                        "loc": {
175                          "start": {
176                            "line": 20,
177                            "column": 14,
178                            "program": "test-interface.ts"
179                          },
180                          "end": {
181                            "line": 20,
182                            "column": 20,
183                            "program": "test-interface.ts"
184                          }
185                        }
186                      },
187                      "decorators": [],
188                      "loc": {
189                        "start": {
190                          "line": 20,
191                          "column": 11,
192                          "program": "test-interface.ts"
193                        },
194                        "end": {
195                          "line": 20,
196                          "column": 12,
197                          "program": "test-interface.ts"
198                        }
199                      }
200                    },
201                    {
202                      "type": "Identifier",
203                      "name": "b",
204                      "typeAnnotation": {
205                        "type": "TSVoidKeyword",
206                        "loc": {
207                          "start": {
208                            "line": 20,
209                            "column": 25,
210                            "program": "test-interface.ts"
211                          },
212                          "end": {
213                            "line": 20,
214                            "column": 29,
215                            "program": "test-interface.ts"
216                          }
217                        }
218                      },
219                      "decorators": [],
220                      "loc": {
221                        "start": {
222                          "line": 20,
223                          "column": 22,
224                          "program": "test-interface.ts"
225                        },
226                        "end": {
227                          "line": 20,
228                          "column": 23,
229                          "program": "test-interface.ts"
230                        }
231                      }
232                    }
233                  ],
234                  "returnType": {
235                    "type": "TSStringKeyword",
236                    "loc": {
237                      "start": {
238                        "line": 20,
239                        "column": 34,
240                        "program": "test-interface.ts"
241                      },
242                      "end": {
243                        "line": 20,
244                        "column": 40,
245                        "program": "test-interface.ts"
246                      }
247                    }
248                  },
249                  "loc": {
250                    "start": {
251                      "line": 20,
252                      "column": 10,
253                      "program": "test-interface.ts"
254                    },
255                    "end": {
256                      "line": 20,
257                      "column": 40,
258                      "program": "test-interface.ts"
259                    }
260                  }
261                },
262                "decorators": [],
263                "loc": {
264                  "start": {
265                    "line": 20,
266                    "column": 7,
267                    "program": "test-interface.ts"
268                  },
269                  "end": {
270                    "line": 20,
271                    "column": 8,
272                    "program": "test-interface.ts"
273                  }
274                }
275              },
276              {
277                "type": "Identifier",
278                "name": "b",
279                "typeAnnotation": {
280                  "type": "TSArrayType",
281                  "elementType": {
282                    "type": "TSNumberKeyword",
283                    "loc": {
284                      "start": {
285                        "line": 20,
286                        "column": 46,
287                        "program": "test-interface.ts"
288                      },
289                      "end": {
290                        "line": 20,
291                        "column": 52,
292                        "program": "test-interface.ts"
293                      }
294                    }
295                  },
296                  "annotations": [],
297                  "loc": {
298                    "start": {
299                      "line": 20,
300                      "column": 46,
301                      "program": "test-interface.ts"
302                    },
303                    "end": {
304                      "line": 20,
305                      "column": 54,
306                      "program": "test-interface.ts"
307                    }
308                  }
309                },
310                "optional": true,
311                "decorators": [],
312                "loc": {
313                  "start": {
314                    "line": 20,
315                    "column": 42,
316                    "program": "test-interface.ts"
317                  },
318                  "end": {
319                    "line": 20,
320                    "column": 43,
321                    "program": "test-interface.ts"
322                  }
323                }
324              }
325            ],
326            "typeAnnotation": {
327              "type": "TSUndefinedKeyword",
328              "loc": {
329                "start": {
330                  "line": 20,
331                  "column": 57,
332                  "program": "test-interface.ts"
333                },
334                "end": {
335                  "line": 20,
336                  "column": 66,
337                  "program": "test-interface.ts"
338                }
339              }
340            },
341            "loc": {
342              "start": {
343                "line": 20,
344                "column": 5,
345                "program": "test-interface.ts"
346              },
347              "end": {
348                "line": 20,
349                "column": 67,
350                "program": "test-interface.ts"
351              }
352            }
353          },
354          {
355            "type": "TSCallSignatureDeclaration",
356            "params": [
357              {
358                "type": "Identifier",
359                "name": "a",
360                "typeAnnotation": {
361                  "type": "TSStringKeyword",
362                  "loc": {
363                    "start": {
364                      "line": 21,
365                      "column": 9,
366                      "program": "test-interface.ts"
367                    },
368                    "end": {
369                      "line": 21,
370                      "column": 15,
371                      "program": "test-interface.ts"
372                    }
373                  }
374                },
375                "decorators": [],
376                "loc": {
377                  "start": {
378                    "line": 21,
379                    "column": 6,
380                    "program": "test-interface.ts"
381                  },
382                  "end": {
383                    "line": 21,
384                    "column": 7,
385                    "program": "test-interface.ts"
386                  }
387                }
388              }
389            ],
390            "returnType": {
391              "type": "TSStringKeyword",
392              "loc": {
393                "start": {
394                  "line": 21,
395                  "column": 18,
396                  "program": "test-interface.ts"
397                },
398                "end": {
399                  "line": 21,
400                  "column": 24,
401                  "program": "test-interface.ts"
402                }
403              }
404            },
405            "loc": {
406              "start": {
407                "line": 21,
408                "column": 5,
409                "program": "test-interface.ts"
410              },
411              "end": {
412                "line": 21,
413                "column": 25,
414                "program": "test-interface.ts"
415              }
416            }
417          },
418          {
419            "type": "TSCallSignatureDeclaration",
420            "params": [
421              {
422                "type": "Identifier",
423                "name": "a",
424                "typeAnnotation": {
425                  "type": "TSNumberKeyword",
426                  "loc": {
427                    "start": {
428                      "line": 22,
429                      "column": 9,
430                      "program": "test-interface.ts"
431                    },
432                    "end": {
433                      "line": 22,
434                      "column": 15,
435                      "program": "test-interface.ts"
436                    }
437                  }
438                },
439                "decorators": [],
440                "loc": {
441                  "start": {
442                    "line": 22,
443                    "column": 6,
444                    "program": "test-interface.ts"
445                  },
446                  "end": {
447                    "line": 22,
448                    "column": 7,
449                    "program": "test-interface.ts"
450                  }
451                }
452              }
453            ],
454            "returnType": {
455              "type": "TSNumberKeyword",
456              "loc": {
457                "start": {
458                  "line": 22,
459                  "column": 18,
460                  "program": "test-interface.ts"
461                },
462                "end": {
463                  "line": 22,
464                  "column": 24,
465                  "program": "test-interface.ts"
466                }
467              }
468            },
469            "loc": {
470              "start": {
471                "line": 22,
472                "column": 5,
473                "program": "test-interface.ts"
474              },
475              "end": {
476                "line": 22,
477                "column": 25,
478                "program": "test-interface.ts"
479              }
480            }
481          },
482          {
483            "type": "TSConstructSignatureDeclaration",
484            "params": [
485              {
486                "type": "Identifier",
487                "name": "a",
488                "typeAnnotation": {
489                  "type": "TSNullKeyword",
490                  "loc": {
491                    "start": {
492                      "line": 23,
493                      "column": 12,
494                      "program": "test-interface.ts"
495                    },
496                    "end": {
497                      "line": 23,
498                      "column": 16,
499                      "program": "test-interface.ts"
500                    }
501                  }
502                },
503                "decorators": [],
504                "loc": {
505                  "start": {
506                    "line": 23,
507                    "column": 9,
508                    "program": "test-interface.ts"
509                  },
510                  "end": {
511                    "line": 23,
512                    "column": 10,
513                    "program": "test-interface.ts"
514                  }
515                }
516              },
517              {
518                "type": "Identifier",
519                "name": "b",
520                "typeAnnotation": {
521                  "type": "TSStringKeyword",
522                  "loc": {
523                    "start": {
524                      "line": 23,
525                      "column": 22,
526                      "program": "test-interface.ts"
527                    },
528                    "end": {
529                      "line": 23,
530                      "column": 28,
531                      "program": "test-interface.ts"
532                    }
533                  }
534                },
535                "optional": true,
536                "decorators": [],
537                "loc": {
538                  "start": {
539                    "line": 23,
540                    "column": 18,
541                    "program": "test-interface.ts"
542                  },
543                  "end": {
544                    "line": 23,
545                    "column": 19,
546                    "program": "test-interface.ts"
547                  }
548                }
549              }
550            ],
551            "returnType": {
552              "type": "TSTypeLiteral",
553              "members": [
554                {
555                  "type": "TSPropertySignature",
556                  "computed": false,
557                  "optional": false,
558                  "readonly": false,
559                  "key": {
560                    "type": "Identifier",
561                    "name": "a",
562                    "decorators": [],
563                    "loc": {
564                      "start": {
565                        "line": 23,
566                        "column": 33,
567                        "program": "test-interface.ts"
568                      },
569                      "end": {
570                        "line": 23,
571                        "column": 34,
572                        "program": "test-interface.ts"
573                      }
574                    }
575                  },
576                  "typeAnnotation": {
577                    "type": "TSNumberKeyword",
578                    "loc": {
579                      "start": {
580                        "line": 23,
581                        "column": 36,
582                        "program": "test-interface.ts"
583                      },
584                      "end": {
585                        "line": 23,
586                        "column": 42,
587                        "program": "test-interface.ts"
588                      }
589                    }
590                  },
591                  "loc": {
592                    "start": {
593                      "line": 23,
594                      "column": 33,
595                      "program": "test-interface.ts"
596                    },
597                    "end": {
598                      "line": 23,
599                      "column": 43,
600                      "program": "test-interface.ts"
601                    }
602                  }
603                },
604                {
605                  "type": "TSPropertySignature",
606                  "computed": false,
607                  "optional": false,
608                  "readonly": false,
609                  "key": {
610                    "type": "Identifier",
611                    "name": "b",
612                    "decorators": [],
613                    "loc": {
614                      "start": {
615                        "line": 23,
616                        "column": 44,
617                        "program": "test-interface.ts"
618                      },
619                      "end": {
620                        "line": 23,
621                        "column": 45,
622                        "program": "test-interface.ts"
623                      }
624                    }
625                  },
626                  "typeAnnotation": {
627                    "type": "TSStringKeyword",
628                    "loc": {
629                      "start": {
630                        "line": 23,
631                        "column": 47,
632                        "program": "test-interface.ts"
633                      },
634                      "end": {
635                        "line": 23,
636                        "column": 53,
637                        "program": "test-interface.ts"
638                      }
639                    }
640                  },
641                  "loc": {
642                    "start": {
643                      "line": 23,
644                      "column": 44,
645                      "program": "test-interface.ts"
646                    },
647                    "end": {
648                      "line": 23,
649                      "column": 54,
650                      "program": "test-interface.ts"
651                    }
652                  }
653                },
654                {
655                  "type": "TSMethodSignature",
656                  "computed": false,
657                  "optional": true,
658                  "key": {
659                    "type": "Identifier",
660                    "name": "c",
661                    "decorators": [],
662                    "loc": {
663                      "start": {
664                        "line": 23,
665                        "column": 55,
666                        "program": "test-interface.ts"
667                      },
668                      "end": {
669                        "line": 23,
670                        "column": 56,
671                        "program": "test-interface.ts"
672                      }
673                    }
674                  },
675                  "params": [
676                    {
677                      "type": "ArrayPattern",
678                      "elements": [
679                        {
680                          "type": "Identifier",
681                          "name": "a",
682                          "decorators": [],
683                          "loc": {
684                            "start": {
685                              "line": 23,
686                              "column": 59,
687                              "program": "test-interface.ts"
688                            },
689                            "end": {
690                              "line": 23,
691                              "column": 60,
692                              "program": "test-interface.ts"
693                            }
694                          }
695                        },
696                        {
697                          "type": "Identifier",
698                          "name": "b",
699                          "decorators": [],
700                          "loc": {
701                            "start": {
702                              "line": 23,
703                              "column": 62,
704                              "program": "test-interface.ts"
705                            },
706                            "end": {
707                              "line": 23,
708                              "column": 63,
709                              "program": "test-interface.ts"
710                            }
711                          }
712                        }
713                      ],
714                      "loc": {
715                        "start": {
716                          "line": 23,
717                          "column": 58,
718                          "program": "test-interface.ts"
719                        },
720                        "end": {
721                          "line": 23,
722                          "column": 64,
723                          "program": "test-interface.ts"
724                        }
725                      }
726                    }
727                  ],
728                  "typeAnnotation": {
729                    "type": "TSStringKeyword",
730                    "loc": {
731                      "start": {
732                        "line": 23,
733                        "column": 67,
734                        "program": "test-interface.ts"
735                      },
736                      "end": {
737                        "line": 23,
738                        "column": 73,
739                        "program": "test-interface.ts"
740                      }
741                    }
742                  },
743                  "loc": {
744                    "start": {
745                      "line": 23,
746                      "column": 55,
747                      "program": "test-interface.ts"
748                    },
749                    "end": {
750                      "line": 23,
751                      "column": 75,
752                      "program": "test-interface.ts"
753                    }
754                  }
755                }
756              ],
757              "loc": {
758                "start": {
759                  "line": 23,
760                  "column": 31,
761                  "program": "test-interface.ts"
762                },
763                "end": {
764                  "line": 23,
765                  "column": 75,
766                  "program": "test-interface.ts"
767                }
768              }
769            },
770            "loc": {
771              "start": {
772                "line": 23,
773                "column": 5,
774                "program": "test-interface.ts"
775              },
776              "end": {
777                "line": 24,
778                "column": 2,
779                "program": "test-interface.ts"
780              }
781            }
782          }
783        ],
784        "loc": {
785          "start": {
786            "line": 17,
787            "column": 27,
788            "program": "test-interface.ts"
789          },
790          "end": {
791            "line": 24,
792            "column": 2,
793            "program": "test-interface.ts"
794          }
795        }
796      },
797      "id": {
798        "type": "Identifier",
799        "name": "foo",
800        "decorators": [],
801        "loc": {
802          "start": {
803            "line": 17,
804            "column": 11,
805            "program": "test-interface.ts"
806          },
807          "end": {
808            "line": 17,
809            "column": 14,
810            "program": "test-interface.ts"
811          }
812        }
813      },
814      "extends": [
815        {
816          "type": "TSInterfaceHeritage",
817          "expression": {
818            "type": "TSTypeReference",
819            "typeName": {
820              "type": "TSQualifiedName",
821              "left": {
822                "type": "Identifier",
823                "name": "a",
824                "decorators": [],
825                "loc": {
826                  "start": {
827                    "line": 17,
828                    "column": 23,
829                    "program": "test-interface.ts"
830                  },
831                  "end": {
832                    "line": 17,
833                    "column": 24,
834                    "program": "test-interface.ts"
835                  }
836                }
837              },
838              "right": {
839                "type": "Identifier",
840                "name": "b",
841                "decorators": [],
842                "loc": {
843                  "start": {
844                    "line": 17,
845                    "column": 25,
846                    "program": "test-interface.ts"
847                  },
848                  "end": {
849                    "line": 17,
850                    "column": 26,
851                    "program": "test-interface.ts"
852                  }
853                }
854              },
855              "loc": {
856                "start": {
857                  "line": 17,
858                  "column": 23,
859                  "program": "test-interface.ts"
860                },
861                "end": {
862                  "line": 17,
863                  "column": 28,
864                  "program": "test-interface.ts"
865                }
866              }
867            },
868            "loc": {
869              "start": {
870                "line": 17,
871                "column": 27,
872                "program": "test-interface.ts"
873              },
874              "end": {
875                "line": 17,
876                "column": 24,
877                "program": "test-interface.ts"
878              }
879            }
880          },
881          "loc": {
882            "start": {
883              "line": 17,
884              "column": 27,
885              "program": "test-interface.ts"
886            },
887            "end": {
888              "line": 17,
889              "column": 24,
890              "program": "test-interface.ts"
891            }
892          }
893        }
894      ],
895      "loc": {
896        "start": {
897          "line": 17,
898          "column": 1,
899          "program": "test-interface.ts"
900        },
901        "end": {
902          "line": 24,
903          "column": 2,
904          "program": "test-interface.ts"
905        }
906      }
907    }
908  ],
909  "loc": {
910    "start": {
911      "line": 1,
912      "column": 1,
913      "program": "test-interface.ts"
914    },
915    "end": {
916      "line": 24,
917      "column": 2,
918      "program": "test-interface.ts"
919    }
920  }
921}
922