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": "TSMethodSignature",
425            "computed": false,
426            "optional": false,
427            "key": {
428              "type": "Identifier",
429              "name": "readonly",
430              "decorators": [],
431              "loc": {
432                "start": {
433                  "line": 23,
434                  "column": 5
435                },
436                "end": {
437                  "line": 23,
438                  "column": 13
439                }
440              }
441            },
442            "params": [
443              {
444                "type": "Identifier",
445                "name": "a",
446                "typeAnnotation": {
447                  "type": "TSNumberKeyword",
448                  "loc": {
449                    "start": {
450                      "line": 23,
451                      "column": 18
452                    },
453                    "end": {
454                      "line": 23,
455                      "column": 24
456                    }
457                  }
458                },
459                "decorators": [],
460                "loc": {
461                  "start": {
462                    "line": 23,
463                    "column": 15
464                  },
465                  "end": {
466                    "line": 23,
467                    "column": 16
468                  }
469                }
470              }
471            ],
472            "typeAnnotation": {
473              "type": "TSNumberKeyword",
474              "loc": {
475                "start": {
476                  "line": 23,
477                  "column": 27
478                },
479                "end": {
480                  "line": 23,
481                  "column": 33
482                }
483              }
484            },
485            "loc": {
486              "start": {
487                "line": 23,
488                "column": 5
489              },
490              "end": {
491                "line": 23,
492                "column": 34
493              }
494            }
495          },
496          {
497            "type": "TSIndexSignature",
498            "parameters": {
499              "type": "Identifier",
500              "name": "a",
501              "typeAnnotation": {
502                "type": "TSNumberKeyword",
503                "loc": {
504                  "start": {
505                    "line": 24,
506                    "column": 8
507                  },
508                  "end": {
509                    "line": 24,
510                    "column": 14
511                  }
512                }
513              },
514              "decorators": [],
515              "loc": {
516                "start": {
517                  "line": 24,
518                  "column": 6
519                },
520                "end": {
521                  "line": 24,
522                  "column": 7
523                }
524              }
525            },
526            "typeAnnotation": {
527              "type": "TSNumberKeyword",
528              "loc": {
529                "start": {
530                  "line": 24,
531                  "column": 16
532                },
533                "end": {
534                  "line": 24,
535                  "column": 22
536                }
537              }
538            },
539            "readonly": false,
540            "loc": {
541              "start": {
542                "line": 24,
543                "column": 5
544              },
545              "end": {
546                "line": 24,
547                "column": 23
548              }
549            }
550          },
551          {
552            "type": "TSConstructSignatureDeclaration",
553            "params": [
554              {
555                "type": "Identifier",
556                "name": "a",
557                "typeAnnotation": {
558                  "type": "TSNullKeyword",
559                  "loc": {
560                    "start": {
561                      "line": 25,
562                      "column": 12
563                    },
564                    "end": {
565                      "line": 25,
566                      "column": 16
567                    }
568                  }
569                },
570                "decorators": [],
571                "loc": {
572                  "start": {
573                    "line": 25,
574                    "column": 9
575                  },
576                  "end": {
577                    "line": 25,
578                    "column": 10
579                  }
580                }
581              },
582              {
583                "type": "Identifier",
584                "name": "b",
585                "typeAnnotation": {
586                  "type": "TSStringKeyword",
587                  "loc": {
588                    "start": {
589                      "line": 25,
590                      "column": 22
591                    },
592                    "end": {
593                      "line": 25,
594                      "column": 28
595                    }
596                  }
597                },
598                "optional": true,
599                "decorators": [],
600                "loc": {
601                  "start": {
602                    "line": 25,
603                    "column": 18
604                  },
605                  "end": {
606                    "line": 25,
607                    "column": 19
608                  }
609                }
610              }
611            ],
612            "returnType": {
613              "type": "TSTypeLiteral",
614              "members": [
615                {
616                  "type": "TSPropertySignature",
617                  "computed": false,
618                  "optional": false,
619                  "readonly": false,
620                  "key": {
621                    "type": "Identifier",
622                    "name": "a",
623                    "decorators": [],
624                    "loc": {
625                      "start": {
626                        "line": 25,
627                        "column": 33
628                      },
629                      "end": {
630                        "line": 25,
631                        "column": 34
632                      }
633                    }
634                  },
635                  "typeAnnotation": {
636                    "type": "TSNumberKeyword",
637                    "loc": {
638                      "start": {
639                        "line": 25,
640                        "column": 36
641                      },
642                      "end": {
643                        "line": 25,
644                        "column": 42
645                      }
646                    }
647                  },
648                  "loc": {
649                    "start": {
650                      "line": 25,
651                      "column": 33
652                    },
653                    "end": {
654                      "line": 25,
655                      "column": 43
656                    }
657                  }
658                },
659                {
660                  "type": "TSPropertySignature",
661                  "computed": false,
662                  "optional": false,
663                  "readonly": false,
664                  "key": {
665                    "type": "Identifier",
666                    "name": "b",
667                    "decorators": [],
668                    "loc": {
669                      "start": {
670                        "line": 25,
671                        "column": 44
672                      },
673                      "end": {
674                        "line": 25,
675                        "column": 45
676                      }
677                    }
678                  },
679                  "typeAnnotation": {
680                    "type": "TSStringKeyword",
681                    "loc": {
682                      "start": {
683                        "line": 25,
684                        "column": 47
685                      },
686                      "end": {
687                        "line": 25,
688                        "column": 53
689                      }
690                    }
691                  },
692                  "loc": {
693                    "start": {
694                      "line": 25,
695                      "column": 44
696                    },
697                    "end": {
698                      "line": 25,
699                      "column": 54
700                    }
701                  }
702                },
703                {
704                  "type": "TSMethodSignature",
705                  "computed": false,
706                  "optional": true,
707                  "key": {
708                    "type": "Identifier",
709                    "name": "c",
710                    "decorators": [],
711                    "loc": {
712                      "start": {
713                        "line": 25,
714                        "column": 55
715                      },
716                      "end": {
717                        "line": 25,
718                        "column": 56
719                      }
720                    }
721                  },
722                  "params": [
723                    {
724                      "type": "ArrayPattern",
725                      "elements": [
726                        {
727                          "type": "Identifier",
728                          "name": "a",
729                          "decorators": [],
730                          "loc": {
731                            "start": {
732                              "line": 25,
733                              "column": 59
734                            },
735                            "end": {
736                              "line": 25,
737                              "column": 60
738                            }
739                          }
740                        },
741                        {
742                          "type": "Identifier",
743                          "name": "b",
744                          "decorators": [],
745                          "loc": {
746                            "start": {
747                              "line": 25,
748                              "column": 62
749                            },
750                            "end": {
751                              "line": 25,
752                              "column": 63
753                            }
754                          }
755                        }
756                      ],
757                      "loc": {
758                        "start": {
759                          "line": 25,
760                          "column": 58
761                        },
762                        "end": {
763                          "line": 25,
764                          "column": 64
765                        }
766                      }
767                    }
768                  ],
769                  "typeAnnotation": {
770                    "type": "TSStringKeyword",
771                    "loc": {
772                      "start": {
773                        "line": 25,
774                        "column": 67
775                      },
776                      "end": {
777                        "line": 25,
778                        "column": 73
779                      }
780                    }
781                  },
782                  "loc": {
783                    "start": {
784                      "line": 25,
785                      "column": 55
786                    },
787                    "end": {
788                      "line": 25,
789                      "column": 75
790                    }
791                  }
792                }
793              ],
794              "loc": {
795                "start": {
796                  "line": 25,
797                  "column": 31
798                },
799                "end": {
800                  "line": 25,
801                  "column": 75
802                }
803              }
804            },
805            "loc": {
806              "start": {
807                "line": 25,
808                "column": 5
809              },
810              "end": {
811                "line": 26,
812                "column": 2
813              }
814            }
815          }
816        ],
817        "loc": {
818          "start": {
819            "line": 17,
820            "column": 15
821          },
822          "end": {
823            "line": 26,
824            "column": 2
825          }
826        }
827      },
828      "id": {
829        "type": "Identifier",
830        "name": "foo",
831        "decorators": [],
832        "loc": {
833          "start": {
834            "line": 17,
835            "column": 11
836          },
837          "end": {
838            "line": 17,
839            "column": 14
840          }
841        }
842      },
843      "extends": [],
844      "loc": {
845        "start": {
846          "line": 17,
847          "column": 1
848        },
849        "end": {
850          "line": 26,
851          "column": 2
852        }
853      }
854    },
855    {
856      "type": "TSInterfaceDeclaration",
857      "body": {
858        "type": "TSInterfaceBody",
859        "body": [
860          {
861            "type": "TSPropertySignature",
862            "computed": false,
863            "optional": true,
864            "readonly": true,
865            "key": {
866              "type": "Identifier",
867              "name": "a",
868              "decorators": [],
869              "loc": {
870                "start": {
871                  "line": 29,
872                  "column": 14
873                },
874                "end": {
875                  "line": 29,
876                  "column": 15
877                }
878              }
879            },
880            "typeAnnotation": {
881              "type": "TSNumberKeyword",
882              "loc": {
883                "start": {
884                  "line": 29,
885                  "column": 18
886                },
887                "end": {
888                  "line": 29,
889                  "column": 24
890                }
891              }
892            },
893            "loc": {
894              "start": {
895                "line": 29,
896                "column": 5
897              },
898              "end": {
899                "line": 29,
900                "column": 25
901              }
902            }
903          },
904          {
905            "type": "TSPropertySignature",
906            "computed": false,
907            "optional": false,
908            "readonly": true,
909            "key": {
910              "type": "Identifier",
911              "name": "b",
912              "decorators": [],
913              "loc": {
914                "start": {
915                  "line": 30,
916                  "column": 14
917                },
918                "end": {
919                  "line": 30,
920                  "column": 15
921                }
922              }
923            },
924            "typeAnnotation": {
925              "type": "TSUnionType",
926              "types": [
927                {
928                  "type": "TSStringKeyword",
929                  "loc": {
930                    "start": {
931                      "line": 30,
932                      "column": 17
933                    },
934                    "end": {
935                      "line": 30,
936                      "column": 23
937                    }
938                  }
939                },
940                {
941                  "type": "TSBooleanKeyword",
942                  "loc": {
943                    "start": {
944                      "line": 30,
945                      "column": 26
946                    },
947                    "end": {
948                      "line": 30,
949                      "column": 33
950                    }
951                  }
952                }
953              ],
954              "loc": {
955                "start": {
956                  "line": 30,
957                  "column": 17
958                },
959                "end": {
960                  "line": 30,
961                  "column": 33
962                }
963              }
964            },
965            "loc": {
966              "start": {
967                "line": 30,
968                "column": 5
969              },
970              "end": {
971                "line": 30,
972                "column": 34
973              }
974            }
975          },
976          {
977            "type": "TSIndexSignature",
978            "parameters": {
979              "type": "Identifier",
980              "name": "a",
981              "typeAnnotation": {
982                "type": "TSNumberKeyword",
983                "loc": {
984                  "start": {
985                    "line": 31,
986                    "column": 17
987                  },
988                  "end": {
989                    "line": 31,
990                    "column": 23
991                  }
992                }
993              },
994              "decorators": [],
995              "loc": {
996                "start": {
997                  "line": 31,
998                  "column": 15
999                },
1000                "end": {
1001                  "line": 31,
1002                  "column": 16
1003                }
1004              }
1005            },
1006            "typeAnnotation": {
1007              "type": "TSNumberKeyword",
1008              "loc": {
1009                "start": {
1010                  "line": 31,
1011                  "column": 25
1012                },
1013                "end": {
1014                  "line": 31,
1015                  "column": 31
1016                }
1017              }
1018            },
1019            "readonly": true,
1020            "loc": {
1021              "start": {
1022                "line": 31,
1023                "column": 5
1024              },
1025              "end": {
1026                "line": 32,
1027                "column": 2
1028              }
1029            }
1030          }
1031        ],
1032        "loc": {
1033          "start": {
1034            "line": 28,
1035            "column": 15
1036          },
1037          "end": {
1038            "line": 32,
1039            "column": 2
1040          }
1041        }
1042      },
1043      "id": {
1044        "type": "Identifier",
1045        "name": "bar",
1046        "decorators": [],
1047        "loc": {
1048          "start": {
1049            "line": 28,
1050            "column": 11
1051          },
1052          "end": {
1053            "line": 28,
1054            "column": 14
1055          }
1056        }
1057      },
1058      "extends": [],
1059      "loc": {
1060        "start": {
1061          "line": 28,
1062          "column": 1
1063        },
1064        "end": {
1065          "line": 32,
1066          "column": 2
1067        }
1068      }
1069    }
1070  ],
1071  "loc": {
1072    "start": {
1073      "line": 1,
1074      "column": 1
1075    },
1076    "end": {
1077      "line": 32,
1078      "column": 2
1079    }
1080  }
1081}
1082