• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1{
2  "type": "Program",
3  "statements": [
4    {
5      "type": "FunctionDeclaration",
6      "function": {
7        "type": "ScriptFunction",
8        "id": {
9          "type": "Identifier",
10          "name": "func",
11          "decorators": [],
12          "loc": {
13            "start": {
14              "line": 17,
15              "column": 10
16            },
17            "end": {
18              "line": 17,
19              "column": 14
20            }
21          }
22        },
23        "generator": false,
24        "async": false,
25        "expression": false,
26        "params": [
27          {
28            "type": "Identifier",
29            "name": "a",
30            "typeAnnotation": {
31              "type": "TSNumberKeyword",
32              "loc": {
33                "start": {
34                  "line": 17,
35                  "column": 18
36                },
37                "end": {
38                  "line": 17,
39                  "column": 24
40                }
41              }
42            },
43            "decorators": [],
44            "loc": {
45              "start": {
46                "line": 17,
47                "column": 15
48              },
49              "end": {
50                "line": 17,
51                "column": 16
52              }
53            }
54          },
55          {
56            "type": "Identifier",
57            "name": "b",
58            "typeAnnotation": {
59              "type": "TSStringKeyword",
60              "loc": {
61                "start": {
62                  "line": 17,
63                  "column": 29
64                },
65                "end": {
66                  "line": 17,
67                  "column": 35
68                }
69              }
70            },
71            "decorators": [],
72            "loc": {
73              "start": {
74                "line": 17,
75                "column": 26
76              },
77              "end": {
78                "line": 17,
79                "column": 27
80              }
81            }
82          },
83          {
84            "type": "RestElement",
85            "argument": {
86              "type": "Identifier",
87              "name": "c",
88              "decorators": [],
89              "loc": {
90                "start": {
91                  "line": 17,
92                  "column": 40
93                },
94                "end": {
95                  "line": 17,
96                  "column": 41
97                }
98              }
99            },
100            "loc": {
101              "start": {
102                "line": 17,
103                "column": 37
104              },
105              "end": {
106                "line": 17,
107                "column": 41
108              }
109            }
110          }
111        ],
112        "body": {
113          "type": "BlockStatement",
114          "statements": [
115            {
116              "type": "ReturnStatement",
117              "argument": {
118                "type": "NumberLiteral",
119                "value": 5,
120                "loc": {
121                  "start": {
122                    "line": 18,
123                    "column": 12
124                  },
125                  "end": {
126                    "line": 18,
127                    "column": 13
128                  }
129                }
130              },
131              "loc": {
132                "start": {
133                  "line": 18,
134                  "column": 5
135                },
136                "end": {
137                  "line": 18,
138                  "column": 14
139                }
140              }
141            }
142          ],
143          "loc": {
144            "start": {
145              "line": 17,
146              "column": 43
147            },
148            "end": {
149              "line": 19,
150              "column": 2
151            }
152          }
153        },
154        "loc": {
155          "start": {
156            "line": 17,
157            "column": 1
158          },
159          "end": {
160            "line": 19,
161            "column": 2
162          }
163        }
164      },
165      "loc": {
166        "start": {
167          "line": 17,
168          "column": 1
169        },
170        "end": {
171          "line": 19,
172          "column": 2
173        }
174      }
175    },
176    {
177      "type": "ExpressionStatement",
178      "expression": {
179        "type": "CallExpression",
180        "callee": {
181          "type": "Identifier",
182          "name": "func",
183          "decorators": [],
184          "loc": {
185            "start": {
186              "line": 21,
187              "column": 1
188            },
189            "end": {
190              "line": 21,
191              "column": 5
192            }
193          }
194        },
195        "arguments": [],
196        "optional": false,
197        "loc": {
198          "start": {
199            "line": 21,
200            "column": 1
201          },
202          "end": {
203            "line": 21,
204            "column": 7
205          }
206        }
207      },
208      "loc": {
209        "start": {
210          "line": 21,
211          "column": 1
212        },
213        "end": {
214          "line": 21,
215          "column": 7
216        }
217      }
218    }
219  ],
220  "loc": {
221    "start": {
222      "line": 1,
223      "column": 1
224    },
225    "end": {
226      "line": 21,
227      "column": 7
228    }
229  }
230}
231TypeError: Expected at least 2 arguments, but got 0. [functionCall_5.ts:21:1]
232