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