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": 19, 49 "column": 2 50 } 51 } 52 } 53 ], 54 "loc": { 55 "start": { 56 "line": 17, 57 "column": 13 58 }, 59 "end": { 60 "line": 19, 61 "column": 2 62 } 63 } 64 }, 65 "id": { 66 "type": "Identifier", 67 "name": "z", 68 "decorators": [], 69 "loc": { 70 "start": { 71 "line": 17, 72 "column": 11 73 }, 74 "end": { 75 "line": 17, 76 "column": 12 77 } 78 } 79 }, 80 "extends": [], 81 "loc": { 82 "start": { 83 "line": 17, 84 "column": 1 85 }, 86 "end": { 87 "line": 19, 88 "column": 2 89 } 90 } 91 }, 92 { 93 "type": "TSInterfaceDeclaration", 94 "body": { 95 "type": "TSInterfaceBody", 96 "body": [ 97 { 98 "type": "TSConstructSignatureDeclaration", 99 "params": [ 100 { 101 "type": "Identifier", 102 "name": "a", 103 "typeAnnotation": { 104 "type": "TSNumberKeyword", 105 "loc": { 106 "start": { 107 "line": 22, 108 "column": 12 109 }, 110 "end": { 111 "line": 22, 112 "column": 18 113 } 114 } 115 }, 116 "decorators": [], 117 "loc": { 118 "start": { 119 "line": 22, 120 "column": 9 121 }, 122 "end": { 123 "line": 22, 124 "column": 10 125 } 126 } 127 }, 128 { 129 "type": "Identifier", 130 "name": "b", 131 "typeAnnotation": { 132 "type": "TSStringKeyword", 133 "loc": { 134 "start": { 135 "line": 22, 136 "column": 23 137 }, 138 "end": { 139 "line": 22, 140 "column": 29 141 } 142 } 143 }, 144 "decorators": [], 145 "loc": { 146 "start": { 147 "line": 22, 148 "column": 20 149 }, 150 "end": { 151 "line": 22, 152 "column": 21 153 } 154 } 155 } 156 ], 157 "returnType": { 158 "type": "TSNumberKeyword", 159 "loc": { 160 "start": { 161 "line": 22, 162 "column": 32 163 }, 164 "end": { 165 "line": 22, 166 "column": 38 167 } 168 } 169 }, 170 "loc": { 171 "start": { 172 "line": 22, 173 "column": 5 174 }, 175 "end": { 176 "line": 23, 177 "column": 2 178 } 179 } 180 } 181 ], 182 "loc": { 183 "start": { 184 "line": 21, 185 "column": 13 186 }, 187 "end": { 188 "line": 23, 189 "column": 2 190 } 191 } 192 }, 193 "id": { 194 "type": "Identifier", 195 "name": "b", 196 "decorators": [], 197 "loc": { 198 "start": { 199 "line": 21, 200 "column": 11 201 }, 202 "end": { 203 "line": 21, 204 "column": 12 205 } 206 } 207 }, 208 "extends": [], 209 "loc": { 210 "start": { 211 "line": 21, 212 "column": 1 213 }, 214 "end": { 215 "line": 23, 216 "column": 2 217 } 218 } 219 }, 220 { 221 "type": "TSInterfaceDeclaration", 222 "body": { 223 "type": "TSInterfaceBody", 224 "body": [ 225 { 226 "type": "TSConstructSignatureDeclaration", 227 "params": [ 228 { 229 "type": "Identifier", 230 "name": "a", 231 "typeAnnotation": { 232 "type": "TSNumberKeyword", 233 "loc": { 234 "start": { 235 "line": 26, 236 "column": 12 237 }, 238 "end": { 239 "line": 26, 240 "column": 18 241 } 242 } 243 }, 244 "decorators": [], 245 "loc": { 246 "start": { 247 "line": 26, 248 "column": 9 249 }, 250 "end": { 251 "line": 26, 252 "column": 10 253 } 254 } 255 }, 256 { 257 "type": "Identifier", 258 "name": "b", 259 "typeAnnotation": { 260 "type": "TSStringKeyword", 261 "loc": { 262 "start": { 263 "line": 26, 264 "column": 23 265 }, 266 "end": { 267 "line": 26, 268 "column": 29 269 } 270 } 271 }, 272 "decorators": [], 273 "loc": { 274 "start": { 275 "line": 26, 276 "column": 20 277 }, 278 "end": { 279 "line": 26, 280 "column": 21 281 } 282 } 283 } 284 ], 285 "returnType": { 286 "type": "TSNumberKeyword", 287 "loc": { 288 "start": { 289 "line": 26, 290 "column": 32 291 }, 292 "end": { 293 "line": 26, 294 "column": 38 295 } 296 } 297 }, 298 "loc": { 299 "start": { 300 "line": 26, 301 "column": 5 302 }, 303 "end": { 304 "line": 27, 305 "column": 2 306 } 307 } 308 } 309 ], 310 "loc": { 311 "start": { 312 "line": 25, 313 "column": 26 314 }, 315 "end": { 316 "line": 27, 317 "column": 2 318 } 319 } 320 }, 321 "id": { 322 "type": "Identifier", 323 "name": "c", 324 "decorators": [], 325 "loc": { 326 "start": { 327 "line": 25, 328 "column": 11 329 }, 330 "end": { 331 "line": 25, 332 "column": 12 333 } 334 } 335 }, 336 "extends": [ 337 { 338 "type": "TSInterfaceHeritage", 339 "expression": { 340 "type": "TSTypeReference", 341 "typeName": { 342 "type": "Identifier", 343 "name": "z", 344 "decorators": [], 345 "loc": { 346 "start": { 347 "line": 25, 348 "column": 21 349 }, 350 "end": { 351 "line": 25, 352 "column": 22 353 } 354 } 355 }, 356 "loc": { 357 "start": { 358 "line": 25, 359 "column": 22 360 }, 361 "end": { 362 "line": 25, 363 "column": 22 364 } 365 } 366 }, 367 "loc": { 368 "start": { 369 "line": 25, 370 "column": 22 371 }, 372 "end": { 373 "line": 25, 374 "column": 22 375 } 376 } 377 }, 378 { 379 "type": "TSInterfaceHeritage", 380 "expression": { 381 "type": "TSTypeReference", 382 "typeName": { 383 "type": "Identifier", 384 "name": "b", 385 "decorators": [], 386 "loc": { 387 "start": { 388 "line": 25, 389 "column": 24 390 }, 391 "end": { 392 "line": 25, 393 "column": 25 394 } 395 } 396 }, 397 "loc": { 398 "start": { 399 "line": 25, 400 "column": 26 401 }, 402 "end": { 403 "line": 25, 404 "column": 25 405 } 406 } 407 }, 408 "loc": { 409 "start": { 410 "line": 25, 411 "column": 26 412 }, 413 "end": { 414 "line": 25, 415 "column": 25 416 } 417 } 418 } 419 ], 420 "loc": { 421 "start": { 422 "line": 25, 423 "column": 1 424 }, 425 "end": { 426 "line": 27, 427 "column": 2 428 } 429 } 430 }, 431 { 432 "type": "TSInterfaceDeclaration", 433 "body": { 434 "type": "TSInterfaceBody", 435 "body": [ 436 { 437 "type": "TSPropertySignature", 438 "computed": false, 439 "optional": false, 440 "readonly": false, 441 "key": { 442 "type": "Identifier", 443 "name": "a", 444 "decorators": [], 445 "loc": { 446 "start": { 447 "line": 30, 448 "column": 5 449 }, 450 "end": { 451 "line": 30, 452 "column": 6 453 } 454 } 455 }, 456 "typeAnnotation": { 457 "type": "TSNumberKeyword", 458 "loc": { 459 "start": { 460 "line": 30, 461 "column": 8 462 }, 463 "end": { 464 "line": 30, 465 "column": 14 466 } 467 } 468 }, 469 "loc": { 470 "start": { 471 "line": 30, 472 "column": 5 473 }, 474 "end": { 475 "line": 30, 476 "column": 15 477 } 478 } 479 }, 480 { 481 "type": "TSConstructSignatureDeclaration", 482 "params": [ 483 { 484 "type": "Identifier", 485 "name": "a", 486 "typeAnnotation": { 487 "type": "TSNumberKeyword", 488 "loc": { 489 "start": { 490 "line": 31, 491 "column": 12 492 }, 493 "end": { 494 "line": 31, 495 "column": 18 496 } 497 } 498 }, 499 "decorators": [], 500 "loc": { 501 "start": { 502 "line": 31, 503 "column": 9 504 }, 505 "end": { 506 "line": 31, 507 "column": 10 508 } 509 } 510 }, 511 { 512 "type": "Identifier", 513 "name": "b", 514 "typeAnnotation": { 515 "type": "TSStringKeyword", 516 "loc": { 517 "start": { 518 "line": 31, 519 "column": 23 520 }, 521 "end": { 522 "line": 31, 523 "column": 29 524 } 525 } 526 }, 527 "decorators": [], 528 "loc": { 529 "start": { 530 "line": 31, 531 "column": 20 532 }, 533 "end": { 534 "line": 31, 535 "column": 21 536 } 537 } 538 } 539 ], 540 "returnType": { 541 "type": "TSNumberKeyword", 542 "loc": { 543 "start": { 544 "line": 31, 545 "column": 32 546 }, 547 "end": { 548 "line": 31, 549 "column": 38 550 } 551 } 552 }, 553 "loc": { 554 "start": { 555 "line": 31, 556 "column": 5 557 }, 558 "end": { 559 "line": 32, 560 "column": 2 561 } 562 } 563 } 564 ], 565 "loc": { 566 "start": { 567 "line": 29, 568 "column": 13 569 }, 570 "end": { 571 "line": 32, 572 "column": 2 573 } 574 } 575 }, 576 "id": { 577 "type": "Identifier", 578 "name": "d", 579 "decorators": [], 580 "loc": { 581 "start": { 582 "line": 29, 583 "column": 11 584 }, 585 "end": { 586 "line": 29, 587 "column": 12 588 } 589 } 590 }, 591 "extends": [], 592 "loc": { 593 "start": { 594 "line": 29, 595 "column": 1 596 }, 597 "end": { 598 "line": 32, 599 "column": 2 600 } 601 } 602 }, 603 { 604 "type": "VariableDeclaration", 605 "declarations": [ 606 { 607 "type": "VariableDeclarator", 608 "id": { 609 "type": "Identifier", 610 "name": "a", 611 "typeAnnotation": { 612 "type": "TSTypeReference", 613 "typeName": { 614 "type": "Identifier", 615 "name": "d", 616 "decorators": [], 617 "loc": { 618 "start": { 619 "line": 34, 620 "column": 8 621 }, 622 "end": { 623 "line": 34, 624 "column": 9 625 } 626 } 627 }, 628 "loc": { 629 "start": { 630 "line": 34, 631 "column": 8 632 }, 633 "end": { 634 "line": 34, 635 "column": 9 636 } 637 } 638 }, 639 "decorators": [], 640 "loc": { 641 "start": { 642 "line": 34, 643 "column": 5 644 }, 645 "end": { 646 "line": 34, 647 "column": 6 648 } 649 } 650 }, 651 "init": null, 652 "loc": { 653 "start": { 654 "line": 34, 655 "column": 5 656 }, 657 "end": { 658 "line": 34, 659 "column": 6 660 } 661 } 662 } 663 ], 664 "kind": "var", 665 "loc": { 666 "start": { 667 "line": 34, 668 "column": 1 669 }, 670 "end": { 671 "line": 34, 672 "column": 10 673 } 674 } 675 }, 676 { 677 "type": "VariableDeclaration", 678 "declarations": [ 679 { 680 "type": "VariableDeclarator", 681 "id": { 682 "type": "Identifier", 683 "name": "a", 684 "typeAnnotation": { 685 "type": "TSTypeReference", 686 "typeName": { 687 "type": "Identifier", 688 "name": "c", 689 "decorators": [], 690 "loc": { 691 "start": { 692 "line": 35, 693 "column": 8 694 }, 695 "end": { 696 "line": 35, 697 "column": 9 698 } 699 } 700 }, 701 "loc": { 702 "start": { 703 "line": 35, 704 "column": 8 705 }, 706 "end": { 707 "line": 35, 708 "column": 9 709 } 710 } 711 }, 712 "decorators": [], 713 "loc": { 714 "start": { 715 "line": 35, 716 "column": 5 717 }, 718 "end": { 719 "line": 35, 720 "column": 6 721 } 722 } 723 }, 724 "init": null, 725 "loc": { 726 "start": { 727 "line": 35, 728 "column": 5 729 }, 730 "end": { 731 "line": 35, 732 "column": 6 733 } 734 } 735 } 736 ], 737 "kind": "var", 738 "loc": { 739 "start": { 740 "line": 35, 741 "column": 1 742 }, 743 "end": { 744 "line": 35, 745 "column": 10 746 } 747 } 748 } 749 ], 750 "loc": { 751 "start": { 752 "line": 1, 753 "column": 1 754 }, 755 "end": { 756 "line": 36, 757 "column": 1 758 } 759 } 760} 761TypeError: Subsequent variable declaration must have the same type. Variable 'a' must be of type 'd', but here has type 'c'. [varRedeclaration13.ts:35:5] 762