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