• 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": 19
36                },
37                "end": {
38                  "line": 17,
39                  "column": 25
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        "returnType": {
57          "type": "TSVoidKeyword",
58          "loc": {
59            "start": {
60              "line": 17,
61              "column": 29
62            },
63            "end": {
64              "line": 17,
65              "column": 33
66            }
67          }
68        },
69        "body": {
70          "type": "BlockStatement",
71          "statements": [],
72          "loc": {
73            "start": {
74              "line": 17,
75              "column": 34
76            },
77            "end": {
78              "line": 17,
79              "column": 37
80            }
81          }
82        },
83        "loc": {
84          "start": {
85            "line": 17,
86            "column": 1
87          },
88          "end": {
89            "line": 17,
90            "column": 37
91          }
92        }
93      },
94      "loc": {
95        "start": {
96          "line": 17,
97          "column": 1
98        },
99        "end": {
100          "line": 17,
101          "column": 37
102        }
103      }
104    },
105    {
106      "type": "ExpressionStatement",
107      "expression": {
108        "type": "CallExpression",
109        "callee": {
110          "type": "Identifier",
111          "name": "func",
112          "decorators": [],
113          "loc": {
114            "start": {
115              "line": 18,
116              "column": 1
117            },
118            "end": {
119              "line": 18,
120              "column": 5
121            }
122          }
123        },
124        "arguments": [
125          {
126            "type": "NumberLiteral",
127            "value": 5,
128            "loc": {
129              "start": {
130                "line": 18,
131                "column": 6
132              },
133              "end": {
134                "line": 18,
135                "column": 7
136              }
137            }
138          },
139          {
140            "type": "NumberLiteral",
141            "value": 5,
142            "loc": {
143              "start": {
144                "line": 18,
145                "column": 9
146              },
147              "end": {
148                "line": 18,
149                "column": 10
150              }
151            }
152          }
153        ],
154        "optional": false,
155        "loc": {
156          "start": {
157            "line": 18,
158            "column": 1
159          },
160          "end": {
161            "line": 18,
162            "column": 11
163          }
164        }
165      },
166      "loc": {
167        "start": {
168          "line": 18,
169          "column": 1
170        },
171        "end": {
172          "line": 18,
173          "column": 12
174        }
175      }
176    }
177  ],
178  "loc": {
179    "start": {
180      "line": 1,
181      "column": 1
182    },
183    "end": {
184      "line": 18,
185      "column": 12
186    }
187  }
188}
189TypeError: Expected 1 arguments, but got 2. [functionCall_3.ts:18:9]
190