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 "loc": { 172 "start": { 173 "line": 18, 174 "column": 9 175 }, 176 "end": { 177 "line": 18, 178 "column": 18 179 } 180 } 181 }, 182 "loc": { 183 "start": { 184 "line": 18, 185 "column": 5 186 }, 187 "end": { 188 "line": 18, 189 "column": 18 190 } 191 } 192 } 193 ], 194 "kind": "var", 195 "loc": { 196 "start": { 197 "line": 18, 198 "column": 1 199 }, 200 "end": { 201 "line": 18, 202 "column": 19 203 } 204 } 205 } 206 ], 207 "loc": { 208 "start": { 209 "line": 1, 210 "column": 1 211 }, 212 "end": { 213 "line": 19, 214 "column": 1 215 } 216 } 217} 218TypeError: Expected 2 arguments, but got 0. [new_expression_156.ts:18:9] 219