• 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": "MethodDefinition",
11            "key": {
12              "type": "Identifier",
13              "name": "foo",
14              "decorators": [],
15              "loc": {
16                "start": {
17                  "line": 17,
18                  "column": 3,
19                  "program": "interfaceMethodWithOptional.ets"
20                },
21                "end": {
22                  "line": 17,
23                  "column": 6,
24                  "program": "interfaceMethodWithOptional.ets"
25                }
26              }
27            },
28            "kind": "method",
29            "accessibility": "public",
30            "static": false,
31            "optional": false,
32            "computed": false,
33            "value": {
34              "type": "FunctionExpression",
35              "function": {
36                "type": "ScriptFunction",
37                "id": {
38                  "type": "Identifier",
39                  "name": "foo",
40                  "decorators": [],
41                  "loc": {
42                    "start": {
43                      "line": 17,
44                      "column": 3,
45                      "program": "interfaceMethodWithOptional.ets"
46                    },
47                    "end": {
48                      "line": 17,
49                      "column": 6,
50                      "program": "interfaceMethodWithOptional.ets"
51                    }
52                  }
53                },
54                "generator": false,
55                "async": false,
56                "expression": false,
57                "params": [
58                  {
59                    "type": "ETSParameterExpression",
60                    "name": {
61                      "type": "Identifier",
62                      "name": "a",
63                      "typeAnnotation": {
64                        "type": "ETSTypeReference",
65                        "part": {
66                          "type": "ETSTypeReferencePart",
67                          "name": {
68                            "type": "Identifier",
69                            "name": "Number",
70                            "decorators": [],
71                            "loc": {
72                              "start": {
73                                "line": 17,
74                                "column": 11,
75                                "program": "interfaceMethodWithOptional.ets"
76                              },
77                              "end": {
78                                "line": 17,
79                                "column": 17,
80                                "program": "interfaceMethodWithOptional.ets"
81                              }
82                            }
83                          },
84                          "loc": {
85                            "start": {
86                              "line": 17,
87                              "column": 11,
88                              "program": "interfaceMethodWithOptional.ets"
89                            },
90                            "end": {
91                              "line": 17,
92                              "column": 18,
93                              "program": "interfaceMethodWithOptional.ets"
94                            }
95                          }
96                        },
97                        "loc": {
98                          "start": {
99                            "line": 17,
100                            "column": 11,
101                            "program": "interfaceMethodWithOptional.ets"
102                          },
103                          "end": {
104                            "line": 17,
105                            "column": 18,
106                            "program": "interfaceMethodWithOptional.ets"
107                          }
108                        }
109                      },
110                      "decorators": [],
111                      "loc": {
112                        "start": {
113                          "line": 17,
114                          "column": 7,
115                          "program": "interfaceMethodWithOptional.ets"
116                        },
117                        "end": {
118                          "line": 17,
119                          "column": 18,
120                          "program": "interfaceMethodWithOptional.ets"
121                        }
122                      }
123                    },
124                    "loc": {
125                      "start": {
126                        "line": 17,
127                        "column": 7,
128                        "program": "interfaceMethodWithOptional.ets"
129                      },
130                      "end": {
131                        "line": 17,
132                        "column": 18,
133                        "program": "interfaceMethodWithOptional.ets"
134                      }
135                    }
136                  }
137                ],
138                "body": {
139                  "type": "BlockStatement",
140                  "statements": [],
141                  "loc": {
142                    "start": {
143                      "line": 17,
144                      "column": 18,
145                      "program": "interfaceMethodWithOptional.ets"
146                    },
147                    "end": {
148                      "line": 17,
149                      "column": 20,
150                      "program": "interfaceMethodWithOptional.ets"
151                    }
152                  }
153                },
154                "annotations": [
155                  {
156                    "expr_": {
157                      "type": "ETSTypeReference",
158                      "part": {
159                        "type": "ETSTypeReferencePart",
160                        "name": {
161                          "type": "TSQualifiedName",
162                          "left": {
163                            "type": "Identifier",
164                            "name": "functions",
165                            "decorators": [],
166                            "loc": {
167                              "start": {
168                                "line": 17,
169                                "column": 6,
170                                "program": "interfaceMethodWithOptional.ets"
171                              },
172                              "end": {
173                                "line": 17,
174                                "column": 20,
175                                "program": "interfaceMethodWithOptional.ets"
176                              }
177                            }
178                          },
179                          "right": {
180                            "type": "Identifier",
181                            "name": "OptionalParametersAnnotation",
182                            "decorators": [],
183                            "loc": {
184                              "start": {
185                                "line": 17,
186                                "column": 6,
187                                "program": "interfaceMethodWithOptional.ets"
188                              },
189                              "end": {
190                                "line": 17,
191                                "column": 20,
192                                "program": "interfaceMethodWithOptional.ets"
193                              }
194                            }
195                          },
196                          "loc": {
197                            "start": {
198                              "line": 17,
199                              "column": 6,
200                              "program": "interfaceMethodWithOptional.ets"
201                            },
202                            "end": {
203                              "line": 17,
204                              "column": 20,
205                              "program": "interfaceMethodWithOptional.ets"
206                            }
207                          }
208                        },
209                        "loc": {
210                          "start": {
211                            "line": 17,
212                            "column": 6,
213                            "program": "interfaceMethodWithOptional.ets"
214                          },
215                          "end": {
216                            "line": 17,
217                            "column": 20,
218                            "program": "interfaceMethodWithOptional.ets"
219                          }
220                        }
221                      },
222                      "loc": {
223                        "start": {
224                          "line": 17,
225                          "column": 6,
226                          "program": "interfaceMethodWithOptional.ets"
227                        },
228                        "end": {
229                          "line": 17,
230                          "column": 20,
231                          "program": "interfaceMethodWithOptional.ets"
232                        }
233                      }
234                    },
235                    "properties": [
236                      {
237                        "type": "ClassProperty",
238                        "key": {
239                          "type": "Identifier",
240                          "name": "minArgCount",
241                          "decorators": [],
242                          "loc": {
243                            "start": {
244                              "line": 17,
245                              "column": 6,
246                              "program": "interfaceMethodWithOptional.ets"
247                            },
248                            "end": {
249                              "line": 17,
250                              "column": 20,
251                              "program": "interfaceMethodWithOptional.ets"
252                            }
253                          }
254                        },
255                        "value": {
256                          "type": "NumberLiteral",
257                          "value": 0,
258                          "loc": {
259                            "start": {
260                              "line": 17,
261                              "column": 6,
262                              "program": "interfaceMethodWithOptional.ets"
263                            },
264                            "end": {
265                              "line": 17,
266                              "column": 20,
267                              "program": "interfaceMethodWithOptional.ets"
268                            }
269                          }
270                        },
271                        "static": false,
272                        "readonly": false,
273                        "declare": false,
274                        "optional": false,
275                        "computed": false,
276                        "definite": false,
277                        "decorators": [],
278                        "loc": {
279                          "start": {
280                            "line": 17,
281                            "column": 6,
282                            "program": "interfaceMethodWithOptional.ets"
283                          },
284                          "end": {
285                            "line": 17,
286                            "column": 20,
287                            "program": "interfaceMethodWithOptional.ets"
288                          }
289                        }
290                      }
291                    ],
292                    "loc": {
293                      "start": {
294                        "line": 17,
295                        "column": 6,
296                        "program": "interfaceMethodWithOptional.ets"
297                      },
298                      "end": {
299                        "line": 17,
300                        "column": 20,
301                        "program": "interfaceMethodWithOptional.ets"
302                      }
303                    }
304                  }
305                ],
306                "loc": {
307                  "start": {
308                    "line": 17,
309                    "column": 6,
310                    "program": "interfaceMethodWithOptional.ets"
311                  },
312                  "end": {
313                    "line": 17,
314                    "column": 20,
315                    "program": "interfaceMethodWithOptional.ets"
316                  }
317                }
318              },
319              "loc": {
320                "start": {
321                  "line": 17,
322                  "column": 6,
323                  "program": "interfaceMethodWithOptional.ets"
324                },
325                "end": {
326                  "line": 17,
327                  "column": 20,
328                  "program": "interfaceMethodWithOptional.ets"
329                }
330              }
331            },
332            "overloads": [],
333            "decorators": [],
334            "loc": {
335              "start": {
336                "line": 17,
337                "column": 3,
338                "program": "interfaceMethodWithOptional.ets"
339              },
340              "end": {
341                "line": 17,
342                "column": 20,
343                "program": "interfaceMethodWithOptional.ets"
344              }
345            }
346          }
347        ],
348        "loc": {
349          "start": {
350            "line": 16,
351            "column": 13,
352            "program": "interfaceMethodWithOptional.ets"
353          },
354          "end": {
355            "line": 18,
356            "column": 2,
357            "program": "interfaceMethodWithOptional.ets"
358          }
359        }
360      },
361      "id": {
362        "type": "Identifier",
363        "name": "A",
364        "decorators": [],
365        "loc": {
366          "start": {
367            "line": 16,
368            "column": 11,
369            "program": "interfaceMethodWithOptional.ets"
370          },
371          "end": {
372            "line": 16,
373            "column": 12,
374            "program": "interfaceMethodWithOptional.ets"
375          }
376        }
377      },
378      "extends": [],
379      "loc": {
380        "start": {
381          "line": 16,
382          "column": 1,
383          "program": "interfaceMethodWithOptional.ets"
384        },
385        "end": {
386          "line": 19,
387          "column": 1,
388          "program": "interfaceMethodWithOptional.ets"
389        }
390      }
391    },
392    {
393      "type": "ClassDeclaration",
394      "definition": {
395        "id": {
396          "type": "Identifier",
397          "name": "ETSGLOBAL",
398          "decorators": [],
399          "loc": {
400            "start": {
401              "line": 1,
402              "column": 1,
403              "program": "interfaceMethodWithOptional.ets"
404            },
405            "end": {
406              "line": 1,
407              "column": 1,
408              "program": "interfaceMethodWithOptional.ets"
409            }
410          }
411        },
412        "superClass": null,
413        "implements": [],
414        "body": [
415          {
416            "type": "MethodDefinition",
417            "key": {
418              "type": "Identifier",
419              "name": "main",
420              "decorators": [],
421              "loc": {
422                "start": {
423                  "line": 1,
424                  "column": 1,
425                  "program": null
426                },
427                "end": {
428                  "line": 1,
429                  "column": 1,
430                  "program": null
431                }
432              }
433            },
434            "kind": "method",
435            "accessibility": "public",
436            "static": true,
437            "optional": false,
438            "computed": false,
439            "value": {
440              "type": "FunctionExpression",
441              "function": {
442                "type": "ScriptFunction",
443                "id": {
444                  "type": "Identifier",
445                  "name": "main",
446                  "decorators": [],
447                  "loc": {
448                    "start": {
449                      "line": 1,
450                      "column": 1,
451                      "program": null
452                    },
453                    "end": {
454                      "line": 1,
455                      "column": 1,
456                      "program": null
457                    }
458                  }
459                },
460                "generator": false,
461                "async": false,
462                "expression": false,
463                "params": [],
464                "body": {
465                  "type": "BlockStatement",
466                  "statements": [],
467                  "loc": {
468                    "start": {
469                      "line": 1,
470                      "column": 1,
471                      "program": null
472                    },
473                    "end": {
474                      "line": 1,
475                      "column": 1,
476                      "program": null
477                    }
478                  }
479                },
480                "loc": {
481                  "start": {
482                    "line": 1,
483                    "column": 1,
484                    "program": null
485                  },
486                  "end": {
487                    "line": 1,
488                    "column": 1,
489                    "program": null
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            "overloads": [],
507            "decorators": [],
508            "loc": {
509              "start": {
510                "line": 1,
511                "column": 1,
512                "program": "interfaceMethodWithOptional.ets"
513              },
514              "end": {
515                "line": 1,
516                "column": 1,
517                "program": "interfaceMethodWithOptional.ets"
518              }
519            }
520          },
521          {
522            "type": "MethodDefinition",
523            "key": {
524              "type": "Identifier",
525              "name": "_$init$_",
526              "decorators": [],
527              "loc": {
528                "start": {
529                  "line": 1,
530                  "column": 1,
531                  "program": null
532                },
533                "end": {
534                  "line": 1,
535                  "column": 1,
536                  "program": null
537                }
538              }
539            },
540            "kind": "method",
541            "accessibility": "public",
542            "static": true,
543            "optional": false,
544            "computed": false,
545            "value": {
546              "type": "FunctionExpression",
547              "function": {
548                "type": "ScriptFunction",
549                "id": {
550                  "type": "Identifier",
551                  "name": "_$init$_",
552                  "decorators": [],
553                  "loc": {
554                    "start": {
555                      "line": 1,
556                      "column": 1,
557                      "program": null
558                    },
559                    "end": {
560                      "line": 1,
561                      "column": 1,
562                      "program": null
563                    }
564                  }
565                },
566                "generator": false,
567                "async": false,
568                "expression": false,
569                "params": [],
570                "body": {
571                  "type": "BlockStatement",
572                  "statements": [],
573                  "loc": {
574                    "start": {
575                      "line": 1,
576                      "column": 1,
577                      "program": null
578                    },
579                    "end": {
580                      "line": 1,
581                      "column": 1,
582                      "program": null
583                    }
584                  }
585                },
586                "loc": {
587                  "start": {
588                    "line": 1,
589                    "column": 1,
590                    "program": null
591                  },
592                  "end": {
593                    "line": 1,
594                    "column": 1,
595                    "program": null
596                  }
597                }
598              },
599              "loc": {
600                "start": {
601                  "line": 1,
602                  "column": 1,
603                  "program": null
604                },
605                "end": {
606                  "line": 1,
607                  "column": 1,
608                  "program": null
609                }
610              }
611            },
612            "overloads": [],
613            "decorators": [],
614            "loc": {
615              "start": {
616                "line": 1,
617                "column": 1,
618                "program": "interfaceMethodWithOptional.ets"
619              },
620              "end": {
621                "line": 1,
622                "column": 1,
623                "program": "interfaceMethodWithOptional.ets"
624              }
625            }
626          }
627        ],
628        "loc": {
629          "start": {
630            "line": 1,
631            "column": 1,
632            "program": "interfaceMethodWithOptional.ets"
633          },
634          "end": {
635            "line": 1,
636            "column": 1,
637            "program": "interfaceMethodWithOptional.ets"
638          }
639        }
640      },
641      "loc": {
642        "start": {
643          "line": 1,
644          "column": 1,
645          "program": "interfaceMethodWithOptional.ets"
646        },
647        "end": {
648          "line": 1,
649          "column": 1,
650          "program": "interfaceMethodWithOptional.ets"
651        }
652      }
653    }
654  ],
655  "loc": {
656    "start": {
657      "line": 1,
658      "column": 1,
659      "program": "interfaceMethodWithOptional.ets"
660    },
661    "end": {
662      "line": 19,
663      "column": 1,
664      "program": "interfaceMethodWithOptional.ets"
665    }
666  }
667}
668