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