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