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": "TSStringKeyword", 23 "loc": { 24 "start": { 25 "line": 17, 26 "column": 19 27 }, 28 "end": { 29 "line": 17, 30 "column": 25 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": "TSNumberKeyword", 51 "loc": { 52 "start": { 53 "line": 17, 54 "column": 30 55 }, 56 "end": { 57 "line": 17, 58 "column": 36 59 } 60 } 61 }, 62 "decorators": [], 63 "loc": { 64 "start": { 65 "line": 17, 66 "column": 27 67 }, 68 "end": { 69 "line": 17, 70 "column": 28 71 } 72 } 73 } 74 ], 75 "returnType": { 76 "type": "TSAnyKeyword", 77 "loc": { 78 "start": { 79 "line": 17, 80 "column": 39 81 }, 82 "end": { 83 "line": 17, 84 "column": 42 85 } 86 } 87 }, 88 "loc": { 89 "start": { 90 "line": 17, 91 "column": 12 92 }, 93 "end": { 94 "line": 17, 95 "column": 44 96 } 97 } 98 } 99 ], 100 "loc": { 101 "start": { 102 "line": 17, 103 "column": 10 104 }, 105 "end": { 106 "line": 17, 107 "column": 45 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": 46 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": "NumberLiteral", 188 "value": 5, 189 "loc": { 190 "start": { 191 "line": 18, 192 "column": 17 193 }, 194 "end": { 195 "line": 18, 196 "column": 18 197 } 198 } 199 } 200 ], 201 "loc": { 202 "start": { 203 "line": 18, 204 "column": 9 205 }, 206 "end": { 207 "line": 18, 208 "column": 19 209 } 210 } 211 }, 212 "loc": { 213 "start": { 214 "line": 18, 215 "column": 5 216 }, 217 "end": { 218 "line": 18, 219 "column": 19 220 } 221 } 222 } 223 ], 224 "kind": "var", 225 "loc": { 226 "start": { 227 "line": 18, 228 "column": 1 229 }, 230 "end": { 231 "line": 18, 232 "column": 20 233 } 234 } 235 } 236 ], 237 "loc": { 238 "start": { 239 "line": 1, 240 "column": 1 241 }, 242 "end": { 243 "line": 19, 244 "column": 1 245 } 246 } 247} 248TypeError: Expected 2 arguments, but got 1. [new_expression_11.ts:18:9] 249