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": "TSAnyKeyword", 20 "loc": { 21 "start": { 22 "line": 17, 23 "column": 18 24 }, 25 "end": { 26 "line": 17, 27 "column": 21 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": "TSAnyKeyword", 48 "loc": { 49 "start": { 50 "line": 17, 51 "column": 26 52 }, 53 "end": { 54 "line": 17, 55 "column": 29 56 } 57 } 58 }, 59 "decorators": [], 60 "loc": { 61 "start": { 62 "line": 17, 63 "column": 23 64 }, 65 "end": { 66 "line": 17, 67 "column": 24 68 } 69 } 70 } 71 ], 72 "returnType": { 73 "type": "TSAnyKeyword", 74 "loc": { 75 "start": { 76 "line": 17, 77 "column": 34 78 }, 79 "end": { 80 "line": 17, 81 "column": 37 82 } 83 } 84 }, 85 "loc": { 86 "start": { 87 "line": 17, 88 "column": 10 89 }, 90 "end": { 91 "line": 17, 92 "column": 37 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": 38 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": "StringLiteral", 173 "value": "foo", 174 "loc": { 175 "start": { 176 "line": 18, 177 "column": 17 178 }, 179 "end": { 180 "line": 18, 181 "column": 22 182 } 183 } 184 }, 185 { 186 "type": "NumberLiteral", 187 "value": 5, 188 "loc": { 189 "start": { 190 "line": 18, 191 "column": 23 192 }, 193 "end": { 194 "line": 18, 195 "column": 24 196 } 197 } 198 }, 199 { 200 "type": "BooleanLiteral", 201 "value": false, 202 "loc": { 203 "start": { 204 "line": 18, 205 "column": 25 206 }, 207 "end": { 208 "line": 18, 209 "column": 30 210 } 211 } 212 } 213 ], 214 "loc": { 215 "start": { 216 "line": 18, 217 "column": 9 218 }, 219 "end": { 220 "line": 18, 221 "column": 31 222 } 223 } 224 }, 225 "loc": { 226 "start": { 227 "line": 18, 228 "column": 5 229 }, 230 "end": { 231 "line": 18, 232 "column": 31 233 } 234 } 235 } 236 ], 237 "kind": "var", 238 "loc": { 239 "start": { 240 "line": 18, 241 "column": 1 242 }, 243 "end": { 244 "line": 18, 245 "column": 32 246 } 247 } 248 } 249 ], 250 "loc": { 251 "start": { 252 "line": 1, 253 "column": 1 254 }, 255 "end": { 256 "line": 19, 257 "column": 1 258 } 259 } 260} 261TypeError: Expected 2 arguments, but got 3. [new_expression_157.ts:18:25] 262