• 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": "Identifier",
85            "name": "c",
86            "typeAnnotation": {
87              "type": "TSArrayType",
88              "elementType": {
89                "type": "TSNumberKeyword",
90                "loc": {
91                  "start": {
92                    "line": 17,
93                    "column": 41
94                  },
95                  "end": {
96                    "line": 17,
97                    "column": 47
98                  }
99                }
100              },
101              "loc": {
102                "start": {
103                  "line": 17,
104                  "column": 41
105                },
106                "end": {
107                  "line": 17,
108                  "column": 49
109                }
110              }
111            },
112            "optional": true,
113            "decorators": [],
114            "loc": {
115              "start": {
116                "line": 17,
117                "column": 37
118              },
119              "end": {
120                "line": 17,
121                "column": 38
122              }
123            }
124          }
125        ],
126        "body": {
127          "type": "BlockStatement",
128          "statements": [],
129          "loc": {
130            "start": {
131              "line": 17,
132              "column": 51
133            },
134            "end": {
135              "line": 19,
136              "column": 2
137            }
138          }
139        },
140        "loc": {
141          "start": {
142            "line": 17,
143            "column": 1
144          },
145          "end": {
146            "line": 19,
147            "column": 2
148          }
149        }
150      },
151      "loc": {
152        "start": {
153          "line": 17,
154          "column": 1
155        },
156        "end": {
157          "line": 19,
158          "column": 2
159        }
160      }
161    },
162    {
163      "type": "ExpressionStatement",
164      "expression": {
165        "type": "CallExpression",
166        "callee": {
167          "type": "Identifier",
168          "name": "func",
169          "decorators": [],
170          "loc": {
171            "start": {
172              "line": 21,
173              "column": 1
174            },
175            "end": {
176              "line": 21,
177              "column": 5
178            }
179          }
180        },
181        "arguments": [
182          {
183            "type": "NumberLiteral",
184            "value": 1,
185            "loc": {
186              "start": {
187                "line": 21,
188                "column": 6
189              },
190              "end": {
191                "line": 21,
192                "column": 7
193              }
194            }
195          }
196        ],
197        "optional": false,
198        "loc": {
199          "start": {
200            "line": 21,
201            "column": 1
202          },
203          "end": {
204            "line": 21,
205            "column": 8
206          }
207        }
208      },
209      "loc": {
210        "start": {
211          "line": 21,
212          "column": 1
213        },
214        "end": {
215          "line": 21,
216          "column": 9
217        }
218      }
219    }
220  ],
221  "loc": {
222    "start": {
223      "line": 1,
224      "column": 1
225    },
226    "end": {
227      "line": 21,
228      "column": 9
229    }
230  }
231}
232TypeError: Expected 2-3 arguments, but got 1 [functionCall_9.ts:21:1]
233