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": 5
19                },
20                "end": {
21                  "line": 17,
22                  "column": 8
23                }
24              }
25            },
26            "kind": "method",
27            "accessibility": "public",
28            "static": false,
29            "optional": false,
30            "computed": false,
31            "value": {
32              "type": "FunctionExpression",
33              "function": {
34                "type": "ScriptFunction",
35                "id": {
36                  "type": "Identifier",
37                  "name": "foo",
38                  "decorators": [],
39                  "loc": {
40                    "start": {
41                      "line": 17,
42                      "column": 5
43                    },
44                    "end": {
45                      "line": 17,
46                      "column": 8
47                    }
48                  }
49                },
50                "generator": false,
51                "async": false,
52                "expression": false,
53                "params": [
54                  {
55                    "type": "ETSParameterExpression",
56                    "name": {
57                      "type": "Identifier",
58                      "name": "bar",
59                      "typeAnnotation": {
60                        "type": "ETSUnionType",
61                        "types": [
62                          {
63                            "type": "ETSFunctionType",
64                            "params": [],
65                            "returnType": {
66                              "type": "ETSPrimitiveType",
67                              "loc": {
68                                "start": {
69                                  "line": 17,
70                                  "column": 31
71                                },
72                                "end": {
73                                  "line": 17,
74                                  "column": 34
75                                }
76                              }
77                            },
78                            "loc": {
79                              "start": {
80                                "line": 1,
81                                "column": 1
82                              },
83                              "end": {
84                                "line": 1,
85                                "column": 1
86                              }
87                            }
88                          },
89                          {
90                            "type": "ETSFunctionType",
91                            "params": [
92                              {
93                                "type": "ETSParameterExpression",
94                                "name": {
95                                  "type": "Identifier",
96                                  "name": "value",
97                                  "typeAnnotation": {
98                                    "type": "ETSUnionType",
99                                    "types": [
100                                      {
101                                        "type": "ETSPrimitiveType",
102                                        "loc": {
103                                          "start": {
104                                            "line": 17,
105                                            "column": 23
106                                          },
107                                          "end": {
108                                            "line": 17,
109                                            "column": 26
110                                          }
111                                        }
112                                      },
113                                      {
114                                        "type": "ETSUndefinedType",
115                                        "loc": {
116                                          "start": {
117                                            "line": 17,
118                                            "column": 20
119                                          },
120                                          "end": {
121                                            "line": 17,
122                                            "column": 21
123                                          }
124                                        }
125                                      }
126                                    ],
127                                    "loc": {
128                                      "start": {
129                                        "line": 17,
130                                        "column": 23
131                                      },
132                                      "end": {
133                                        "line": 17,
134                                        "column": 26
135                                      }
136                                    }
137                                  },
138                                  "decorators": [],
139                                  "loc": {
140                                    "start": {
141                                      "line": 17,
142                                      "column": 15
143                                    },
144                                    "end": {
145                                      "line": 17,
146                                      "column": 26
147                                    }
148                                  }
149                                },
150                                "initializer": {
151                                  "type": "UndefinedLiteral",
152                                  "value": undefined,
153                                  "loc": {
154                                    "start": {
155                                      "line": 1,
156                                      "column": 1
157                                    },
158                                    "end": {
159                                      "line": 1,
160                                      "column": 1
161                                    }
162                                  }
163                                },
164                                "loc": {
165                                  "start": {
166                                    "line": 17,
167                                    "column": 15
168                                  },
169                                  "end": {
170                                    "line": 17,
171                                    "column": 26
172                                  }
173                                }
174                              }
175                            ],
176                            "returnType": {
177                              "type": "ETSPrimitiveType",
178                              "loc": {
179                                "start": {
180                                  "line": 17,
181                                  "column": 31
182                                },
183                                "end": {
184                                  "line": 17,
185                                  "column": 34
186                                }
187                              }
188                            },
189                            "loc": {
190                              "start": {
191                                "line": 1,
192                                "column": 1
193                              },
194                              "end": {
195                                "line": 1,
196                                "column": 1
197                              }
198                            }
199                          }
200                        ],
201                        "loc": {
202                          "start": {
203                            "line": 17,
204                            "column": 14
205                          },
206                          "end": {
207                            "line": 17,
208                            "column": 34
209                          }
210                        }
211                      },
212                      "decorators": [],
213                      "loc": {
214                        "start": {
215                          "line": 17,
216                          "column": 9
217                        },
218                        "end": {
219                          "line": 17,
220                          "column": 34
221                        }
222                      }
223                    },
224                    "loc": {
225                      "start": {
226                        "line": 17,
227                        "column": 9
228                      },
229                      "end": {
230                        "line": 17,
231                        "column": 34
232                      }
233                    }
234                  }
235                ],
236                "returnType": {
237                  "type": "ETSPrimitiveType",
238                  "loc": {
239                    "start": {
240                      "line": 17,
241                      "column": 37
242                    },
243                    "end": {
244                      "line": 17,
245                      "column": 41
246                    }
247                  }
248                },
249                "declare": true,
250                "loc": {
251                  "start": {
252                    "line": 17,
253                    "column": 8
254                  },
255                  "end": {
256                    "line": 17,
257                    "column": 41
258                  }
259                }
260              },
261              "loc": {
262                "start": {
263                  "line": 17,
264                  "column": 8
265                },
266                "end": {
267                  "line": 17,
268                  "column": 41
269                }
270              }
271            },
272            "overloads": [],
273            "decorators": [],
274            "loc": {
275              "start": {
276                "line": 17,
277                "column": 5
278              },
279              "end": {
280                "line": 17,
281                "column": 41
282              }
283            }
284          }
285        ],
286        "loc": {
287          "start": {
288            "line": 16,
289            "column": 13
290          },
291          "end": {
292            "line": 18,
293            "column": 2
294          }
295        }
296      },
297      "id": {
298        "type": "Identifier",
299        "name": "I",
300        "decorators": [],
301        "loc": {
302          "start": {
303            "line": 16,
304            "column": 11
305          },
306          "end": {
307            "line": 16,
308            "column": 12
309          }
310        }
311      },
312      "extends": [],
313      "loc": {
314        "start": {
315          "line": 16,
316          "column": 1
317        },
318        "end": {
319          "line": 19,
320          "column": 1
321        }
322      }
323    },
324    {
325      "type": "ClassDeclaration",
326      "definition": {
327        "id": {
328          "type": "Identifier",
329          "name": "ETSGLOBAL",
330          "decorators": [],
331          "loc": {
332            "start": {
333              "line": 1,
334              "column": 1
335            },
336            "end": {
337              "line": 1,
338              "column": 1
339            }
340          }
341        },
342        "superClass": null,
343        "implements": [],
344        "body": [
345          {
346            "type": "MethodDefinition",
347            "key": {
348              "type": "Identifier",
349              "name": "_$init$_",
350              "decorators": [],
351              "loc": {
352                "start": {
353                  "line": 1,
354                  "column": 1
355                },
356                "end": {
357                  "line": 1,
358                  "column": 1
359                }
360              }
361            },
362            "kind": "method",
363            "accessibility": "public",
364            "static": true,
365            "optional": false,
366            "computed": false,
367            "value": {
368              "type": "FunctionExpression",
369              "function": {
370                "type": "ScriptFunction",
371                "id": {
372                  "type": "Identifier",
373                  "name": "_$init$_",
374                  "decorators": [],
375                  "loc": {
376                    "start": {
377                      "line": 1,
378                      "column": 1
379                    },
380                    "end": {
381                      "line": 1,
382                      "column": 1
383                    }
384                  }
385                },
386                "generator": false,
387                "async": false,
388                "expression": false,
389                "params": [],
390                "body": {
391                  "type": "BlockStatement",
392                  "statements": [],
393                  "loc": {
394                    "start": {
395                      "line": 1,
396                      "column": 1
397                    },
398                    "end": {
399                      "line": 1,
400                      "column": 1
401                    }
402                  }
403                },
404                "loc": {
405                  "start": {
406                    "line": 1,
407                    "column": 1
408                  },
409                  "end": {
410                    "line": 1,
411                    "column": 1
412                  }
413                }
414              },
415              "loc": {
416                "start": {
417                  "line": 1,
418                  "column": 1
419                },
420                "end": {
421                  "line": 1,
422                  "column": 1
423                }
424              }
425            },
426            "overloads": [],
427            "decorators": [],
428            "loc": {
429              "start": {
430                "line": 1,
431                "column": 1
432              },
433              "end": {
434                "line": 1,
435                "column": 1
436              }
437            }
438          }
439        ],
440        "loc": {
441          "start": {
442            "line": 1,
443            "column": 1
444          },
445          "end": {
446            "line": 1,
447            "column": 1
448          }
449        }
450      },
451      "loc": {
452        "start": {
453          "line": 1,
454          "column": 1
455        },
456        "end": {
457          "line": 1,
458          "column": 1
459        }
460      }
461    }
462  ],
463  "loc": {
464    "start": {
465      "line": 1,
466      "column": 1
467    },
468    "end": {
469      "line": 19,
470      "column": 1
471    }
472  }
473}
474