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