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": "TSStringKeyword", 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 "type": "NumberLiteral", 187 "value": 5, 188 "loc": { 189 "start": { 190 "line": 18, 191 "column": 19 192 }, 193 "end": { 194 "line": 18, 195 "column": 20 196 } 197 } 198 } 199 ], 200 "loc": { 201 "start": { 202 "line": 18, 203 "column": 9 204 }, 205 "end": { 206 "line": 18, 207 "column": 21 208 } 209 } 210 }, 211 "loc": { 212 "start": { 213 "line": 18, 214 "column": 5 215 }, 216 "end": { 217 "line": 18, 218 "column": 21 219 } 220 } 221 } 222 ], 223 "kind": "var", 224 "loc": { 225 "start": { 226 "line": 18, 227 "column": 1 228 }, 229 "end": { 230 "line": 18, 231 "column": 22 232 } 233 } 234 } 235 ], 236 "loc": { 237 "start": { 238 "line": 1, 239 "column": 1 240 }, 241 "end": { 242 "line": 19, 243 "column": 1 244 } 245 } 246} 247TypeError: Type 'number' is not assignable to type 'string'. [new_expression_116.ts:18:19] 248