• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1{
2  "type": "Program",
3  "statements": [
4    {
5      "type": "VariableDeclaration",
6      "declarations": [
7        {
8          "type": "VariableDeclarator",
9          "id": {
10            "type": "Identifier",
11            "name": "foo",
12            "typeAnnotation": {
13              "type": "TSTypeLiteral",
14              "members": [
15                {
16                  "type": "TSConstructSignatureDeclaration",
17                  "params": [
18                    {
19                      "type": "Identifier",
20                      "name": "a",
21                      "typeAnnotation": {
22                        "type": "TSAnyKeyword",
23                        "loc": {
24                          "start": {
25                            "line": 17,
26                            "column": 19
27                          },
28                          "end": {
29                            "line": 17,
30                            "column": 22
31                          }
32                        }
33                      },
34                      "decorators": [],
35                      "loc": {
36                        "start": {
37                          "line": 17,
38                          "column": 16
39                        },
40                        "end": {
41                          "line": 17,
42                          "column": 17
43                        }
44                      }
45                    },
46                    {
47                      "type": "Identifier",
48                      "name": "b",
49                      "typeAnnotation": {
50                        "type": "TSAnyKeyword",
51                        "loc": {
52                          "start": {
53                            "line": 17,
54                            "column": 27
55                          },
56                          "end": {
57                            "line": 17,
58                            "column": 30
59                          }
60                        }
61                      },
62                      "decorators": [],
63                      "loc": {
64                        "start": {
65                          "line": 17,
66                          "column": 24
67                        },
68                        "end": {
69                          "line": 17,
70                          "column": 25
71                        }
72                      }
73                    }
74                  ],
75                  "returnType": {
76                    "type": "TSAnyKeyword",
77                    "loc": {
78                      "start": {
79                        "line": 17,
80                        "column": 33
81                      },
82                      "end": {
83                        "line": 17,
84                        "column": 36
85                      }
86                    }
87                  },
88                  "loc": {
89                    "start": {
90                      "line": 17,
91                      "column": 12
92                    },
93                    "end": {
94                      "line": 17,
95                      "column": 38
96                    }
97                  }
98                }
99              ],
100              "loc": {
101                "start": {
102                  "line": 17,
103                  "column": 10
104                },
105                "end": {
106                  "line": 17,
107                  "column": 39
108                }
109              }
110            },
111            "decorators": [],
112            "loc": {
113              "start": {
114                "line": 17,
115                "column": 5
116              },
117              "end": {
118                "line": 17,
119                "column": 8
120              }
121            }
122          },
123          "init": null,
124          "loc": {
125            "start": {
126              "line": 17,
127              "column": 5
128            },
129            "end": {
130              "line": 17,
131              "column": 8
132            }
133          }
134        }
135      ],
136      "kind": "var",
137      "loc": {
138        "start": {
139          "line": 17,
140          "column": 1
141        },
142        "end": {
143          "line": 17,
144          "column": 40
145        }
146      }
147    },
148    {
149      "type": "VariableDeclaration",
150      "declarations": [
151        {
152          "type": "VariableDeclarator",
153          "id": {
154            "type": "Identifier",
155            "name": "a",
156            "decorators": [],
157            "loc": {
158              "start": {
159                "line": 18,
160                "column": 5
161              },
162              "end": {
163                "line": 18,
164                "column": 6
165              }
166            }
167          },
168          "init": {
169            "type": "NewExpression",
170            "callee": {
171              "type": "Identifier",
172              "name": "foo",
173              "decorators": [],
174              "loc": {
175                "start": {
176                  "line": 18,
177                  "column": 13
178                },
179                "end": {
180                  "line": 18,
181                  "column": 16
182                }
183              }
184            },
185            "arguments": [
186              {
187                "type": "StringLiteral",
188                "value": "foo",
189                "loc": {
190                  "start": {
191                    "line": 18,
192                    "column": 17
193                  },
194                  "end": {
195                    "line": 18,
196                    "column": 22
197                  }
198                }
199              },
200              {
201                "type": "NumberLiteral",
202                "value": 5,
203                "loc": {
204                  "start": {
205                    "line": 18,
206                    "column": 23
207                  },
208                  "end": {
209                    "line": 18,
210                    "column": 24
211                  }
212                }
213              },
214              {
215                "type": "BigIntLiteral",
216                "value": "5",
217                "loc": {
218                  "start": {
219                    "line": 18,
220                    "column": 25
221                  },
222                  "end": {
223                    "line": 18,
224                    "column": 27
225                  }
226                }
227              },
228              {
229                "type": "BooleanLiteral",
230                "value": false,
231                "loc": {
232                  "start": {
233                    "line": 18,
234                    "column": 28
235                  },
236                  "end": {
237                    "line": 18,
238                    "column": 33
239                  }
240                }
241              }
242            ],
243            "loc": {
244              "start": {
245                "line": 18,
246                "column": 9
247              },
248              "end": {
249                "line": 18,
250                "column": 34
251              }
252            }
253          },
254          "loc": {
255            "start": {
256              "line": 18,
257              "column": 5
258            },
259            "end": {
260              "line": 18,
261              "column": 34
262            }
263          }
264        }
265      ],
266      "kind": "var",
267      "loc": {
268        "start": {
269          "line": 18,
270          "column": 1
271        },
272        "end": {
273          "line": 18,
274          "column": 35
275        }
276      }
277    }
278  ],
279  "loc": {
280    "start": {
281      "line": 1,
282      "column": 1
283    },
284    "end": {
285      "line": 19,
286      "column": 1
287    }
288  }
289}
290TypeError: Expected 2 arguments, but got 4. [new_expression_92.ts:18:25]
291