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