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