1{ 2 "type": "Program", 3 "statements": [ 4 { 5 "type": "TSInterfaceDeclaration", 6 "body": { 7 "type": "TSInterfaceBody", 8 "body": [ 9 { 10 "type": "TSPropertySignature", 11 "computed": false, 12 "optional": false, 13 "readonly": false, 14 "key": { 15 "type": "Identifier", 16 "name": "a", 17 "decorators": [], 18 "loc": { 19 "start": { 20 "line": 18, 21 "column": 5 22 }, 23 "end": { 24 "line": 18, 25 "column": 6 26 } 27 } 28 }, 29 "typeAnnotation": { 30 "type": "TSNumberKeyword", 31 "loc": { 32 "start": { 33 "line": 18, 34 "column": 8 35 }, 36 "end": { 37 "line": 18, 38 "column": 14 39 } 40 } 41 }, 42 "loc": { 43 "start": { 44 "line": 18, 45 "column": 5 46 }, 47 "end": { 48 "line": 18, 49 "column": 15 50 } 51 } 52 }, 53 { 54 "type": "TSPropertySignature", 55 "computed": false, 56 "optional": false, 57 "readonly": false, 58 "key": { 59 "type": "Identifier", 60 "name": "b", 61 "decorators": [], 62 "loc": { 63 "start": { 64 "line": 19, 65 "column": 5 66 }, 67 "end": { 68 "line": 19, 69 "column": 6 70 } 71 } 72 }, 73 "typeAnnotation": { 74 "type": "TSStringKeyword", 75 "loc": { 76 "start": { 77 "line": 19, 78 "column": 8 79 }, 80 "end": { 81 "line": 19, 82 "column": 14 83 } 84 } 85 }, 86 "loc": { 87 "start": { 88 "line": 19, 89 "column": 5 90 }, 91 "end": { 92 "line": 19, 93 "column": 15 94 } 95 } 96 }, 97 { 98 "type": "TSPropertySignature", 99 "computed": false, 100 "optional": false, 101 "readonly": false, 102 "key": { 103 "type": "Identifier", 104 "name": "c", 105 "decorators": [], 106 "loc": { 107 "start": { 108 "line": 20, 109 "column": 5 110 }, 111 "end": { 112 "line": 20, 113 "column": 6 114 } 115 } 116 }, 117 "typeAnnotation": { 118 "type": "TSNumberKeyword", 119 "loc": { 120 "start": { 121 "line": 20, 122 "column": 8 123 }, 124 "end": { 125 "line": 20, 126 "column": 14 127 } 128 } 129 }, 130 "loc": { 131 "start": { 132 "line": 20, 133 "column": 5 134 }, 135 "end": { 136 "line": 20, 137 "column": 15 138 } 139 } 140 } 141 ], 142 "loc": { 143 "start": { 144 "line": 17, 145 "column": 13 146 }, 147 "end": { 148 "line": 21, 149 "column": 2 150 } 151 } 152 }, 153 "id": { 154 "type": "Identifier", 155 "name": "a", 156 "decorators": [], 157 "loc": { 158 "start": { 159 "line": 17, 160 "column": 11 161 }, 162 "end": { 163 "line": 17, 164 "column": 12 165 } 166 } 167 }, 168 "extends": [], 169 "loc": { 170 "start": { 171 "line": 17, 172 "column": 1 173 }, 174 "end": { 175 "line": 21, 176 "column": 2 177 } 178 } 179 }, 180 { 181 "type": "TSInterfaceDeclaration", 182 "body": { 183 "type": "TSInterfaceBody", 184 "body": [ 185 { 186 "type": "TSPropertySignature", 187 "computed": false, 188 "optional": false, 189 "readonly": false, 190 "key": { 191 "type": "Identifier", 192 "name": "d", 193 "decorators": [], 194 "loc": { 195 "start": { 196 "line": 23, 197 "column": 5 198 }, 199 "end": { 200 "line": 23, 201 "column": 6 202 } 203 } 204 }, 205 "typeAnnotation": { 206 "type": "TSNumberKeyword", 207 "loc": { 208 "start": { 209 "line": 23, 210 "column": 8 211 }, 212 "end": { 213 "line": 23, 214 "column": 14 215 } 216 } 217 }, 218 "loc": { 219 "start": { 220 "line": 23, 221 "column": 5 222 }, 223 "end": { 224 "line": 24, 225 "column": 2 226 } 227 } 228 } 229 ], 230 "loc": { 231 "start": { 232 "line": 22, 233 "column": 23 234 }, 235 "end": { 236 "line": 24, 237 "column": 2 238 } 239 } 240 }, 241 "id": { 242 "type": "Identifier", 243 "name": "b", 244 "decorators": [], 245 "loc": { 246 "start": { 247 "line": 22, 248 "column": 11 249 }, 250 "end": { 251 "line": 22, 252 "column": 12 253 } 254 } 255 }, 256 "extends": [ 257 { 258 "type": "TSInterfaceHeritage", 259 "expression": { 260 "type": "TSTypeReference", 261 "typeName": { 262 "type": "Identifier", 263 "name": "a", 264 "decorators": [], 265 "loc": { 266 "start": { 267 "line": 22, 268 "column": 21 269 }, 270 "end": { 271 "line": 22, 272 "column": 22 273 } 274 } 275 }, 276 "loc": { 277 "start": { 278 "line": 22, 279 "column": 23 280 }, 281 "end": { 282 "line": 22, 283 "column": 22 284 } 285 } 286 }, 287 "loc": { 288 "start": { 289 "line": 22, 290 "column": 23 291 }, 292 "end": { 293 "line": 22, 294 "column": 22 295 } 296 } 297 } 298 ], 299 "loc": { 300 "start": { 301 "line": 22, 302 "column": 1 303 }, 304 "end": { 305 "line": 24, 306 "column": 2 307 } 308 } 309 }, 310 { 311 "type": "VariableDeclaration", 312 "declarations": [ 313 { 314 "type": "VariableDeclarator", 315 "id": { 316 "type": "Identifier", 317 "name": "c", 318 "typeAnnotation": { 319 "type": "TSTypeReference", 320 "typeName": { 321 "type": "Identifier", 322 "name": "b", 323 "decorators": [], 324 "loc": { 325 "start": { 326 "line": 26, 327 "column": 8 328 }, 329 "end": { 330 "line": 26, 331 "column": 9 332 } 333 } 334 }, 335 "loc": { 336 "start": { 337 "line": 26, 338 "column": 8 339 }, 340 "end": { 341 "line": 26, 342 "column": 9 343 } 344 } 345 }, 346 "decorators": [], 347 "loc": { 348 "start": { 349 "line": 26, 350 "column": 5 351 }, 352 "end": { 353 "line": 26, 354 "column": 6 355 } 356 } 357 }, 358 "init": null, 359 "loc": { 360 "start": { 361 "line": 26, 362 "column": 5 363 }, 364 "end": { 365 "line": 26, 366 "column": 6 367 } 368 } 369 } 370 ], 371 "kind": "var", 372 "loc": { 373 "start": { 374 "line": 26, 375 "column": 1 376 }, 377 "end": { 378 "line": 26, 379 "column": 10 380 } 381 } 382 }, 383 { 384 "type": "ExpressionStatement", 385 "expression": { 386 "type": "AssignmentExpression", 387 "operator": "=", 388 "left": { 389 "type": "MemberExpression", 390 "object": { 391 "type": "Identifier", 392 "name": "c", 393 "decorators": [], 394 "loc": { 395 "start": { 396 "line": 27, 397 "column": 1 398 }, 399 "end": { 400 "line": 27, 401 "column": 2 402 } 403 } 404 }, 405 "property": { 406 "type": "Identifier", 407 "name": "a", 408 "decorators": [], 409 "loc": { 410 "start": { 411 "line": 27, 412 "column": 3 413 }, 414 "end": { 415 "line": 27, 416 "column": 4 417 } 418 } 419 }, 420 "computed": false, 421 "optional": false, 422 "loc": { 423 "start": { 424 "line": 27, 425 "column": 1 426 }, 427 "end": { 428 "line": 27, 429 "column": 4 430 } 431 } 432 }, 433 "right": { 434 "type": "StringLiteral", 435 "value": "foo", 436 "loc": { 437 "start": { 438 "line": 27, 439 "column": 7 440 }, 441 "end": { 442 "line": 27, 443 "column": 12 444 } 445 } 446 }, 447 "loc": { 448 "start": { 449 "line": 27, 450 "column": 1 451 }, 452 "end": { 453 "line": 27, 454 "column": 12 455 } 456 } 457 }, 458 "loc": { 459 "start": { 460 "line": 27, 461 "column": 1 462 }, 463 "end": { 464 "line": 27, 465 "column": 13 466 } 467 } 468 } 469 ], 470 "loc": { 471 "start": { 472 "line": 1, 473 "column": 1 474 }, 475 "end": { 476 "line": 27, 477 "column": 13 478 } 479 } 480} 481TypeError: Type 'string' is not assignable to type 'number'. [memberExpTest_4.ts:27:1] 482