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