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 "loc": { 261 "start": { 262 "line": 19, 263 "column": 5 264 }, 265 "end": { 266 "line": 21, 267 "column": 6 268 } 269 } 270 }, 271 "body": [ 272 { 273 "type": "ClassProperty", 274 "key": { 275 "type": "Identifier", 276 "name": "name", 277 "loc": { 278 "start": { 279 "line": 18, 280 "column": 5 281 }, 282 "end": { 283 "line": 18, 284 "column": 9 285 } 286 } 287 }, 288 "static": false, 289 "readonly": false, 290 "declare": false, 291 "optional": false, 292 "computed": false, 293 "typeAnnotation": { 294 "type": "TSTypeReference", 295 "typeName": { 296 "type": "Identifier", 297 "name": "T", 298 "loc": { 299 "start": { 300 "line": 18, 301 "column": 11 302 }, 303 "end": { 304 "line": 18, 305 "column": 12 306 } 307 } 308 }, 309 "loc": { 310 "start": { 311 "line": 18, 312 "column": 11 313 }, 314 "end": { 315 "line": 18, 316 "column": 12 317 } 318 } 319 }, 320 "decorators": [], 321 "loc": { 322 "start": { 323 "line": 18, 324 "column": 5 325 }, 326 "end": { 327 "line": 18, 328 "column": 9 329 } 330 } 331 }, 332 { 333 "type": "MethodDefinition", 334 "key": { 335 "type": "Identifier", 336 "name": "getName", 337 "loc": { 338 "start": { 339 "line": 22, 340 "column": 5 341 }, 342 "end": { 343 "line": 22, 344 "column": 12 345 } 346 } 347 }, 348 "kind": "method", 349 "static": false, 350 "optional": false, 351 "computed": false, 352 "value": { 353 "type": "FunctionExpression", 354 "function": { 355 "type": "ScriptFunction", 356 "id": null, 357 "generator": false, 358 "async": false, 359 "expression": false, 360 "params": [], 361 "returnType": { 362 "type": "TSTypeReference", 363 "typeName": { 364 "type": "Identifier", 365 "name": "T", 366 "loc": { 367 "start": { 368 "line": 22, 369 "column": 16 370 }, 371 "end": { 372 "line": 22, 373 "column": 17 374 } 375 } 376 }, 377 "loc": { 378 "start": { 379 "line": 22, 380 "column": 16 381 }, 382 "end": { 383 "line": 22, 384 "column": 17 385 } 386 } 387 }, 388 "body": { 389 "type": "BlockStatement", 390 "statements": [ 391 { 392 "type": "ReturnStatement", 393 "argument": { 394 "type": "MemberExpression", 395 "object": { 396 "type": "ThisExpression", 397 "loc": { 398 "start": { 399 "line": 23, 400 "column": 15 401 }, 402 "end": { 403 "line": 23, 404 "column": 19 405 } 406 } 407 }, 408 "property": { 409 "type": "Identifier", 410 "name": "name", 411 "loc": { 412 "start": { 413 "line": 23, 414 "column": 20 415 }, 416 "end": { 417 "line": 23, 418 "column": 24 419 } 420 } 421 }, 422 "computed": false, 423 "optional": false, 424 "loc": { 425 "start": { 426 "line": 23, 427 "column": 15 428 }, 429 "end": { 430 "line": 23, 431 "column": 24 432 } 433 } 434 }, 435 "loc": { 436 "start": { 437 "line": 23, 438 "column": 8 439 }, 440 "end": { 441 "line": 23, 442 "column": 25 443 } 444 } 445 } 446 ], 447 "loc": { 448 "start": { 449 "line": 22, 450 "column": 18 451 }, 452 "end": { 453 "line": 24, 454 "column": 6 455 } 456 } 457 }, 458 "loc": { 459 "start": { 460 "line": 22, 461 "column": 12 462 }, 463 "end": { 464 "line": 24, 465 "column": 6 466 } 467 } 468 }, 469 "loc": { 470 "start": { 471 "line": 22, 472 "column": 12 473 }, 474 "end": { 475 "line": 24, 476 "column": 6 477 } 478 } 479 }, 480 "overloads": [], 481 "decorators": [], 482 "loc": { 483 "start": { 484 "line": 22, 485 "column": 5 486 }, 487 "end": { 488 "line": 24, 489 "column": 6 490 } 491 } 492 } 493 ], 494 "indexSignatures": [], 495 "loc": { 496 "start": { 497 "line": 17, 498 "column": 16 499 }, 500 "end": { 501 "line": 25, 502 "column": 2 503 } 504 } 505 }, 506 "decorators": [], 507 "loc": { 508 "start": { 509 "line": 17, 510 "column": 1 511 }, 512 "end": { 513 "line": 25, 514 "column": 2 515 } 516 } 517 }, 518 { 519 "type": "TSTypeAliasDeclaration", 520 "id": { 521 "type": "Identifier", 522 "name": "xxx", 523 "loc": { 524 "start": { 525 "line": 27, 526 "column": 6 527 }, 528 "end": { 529 "line": 27, 530 "column": 9 531 } 532 } 533 }, 534 "typeAnnotation": { 535 "type": "TSStringKeyword", 536 "loc": { 537 "start": { 538 "line": 27, 539 "column": 12 540 }, 541 "end": { 542 "line": 27, 543 "column": 18 544 } 545 } 546 }, 547 "loc": { 548 "start": { 549 "line": 27, 550 "column": 1 551 }, 552 "end": { 553 "line": 27, 554 "column": 19 555 } 556 } 557 }, 558 { 559 "type": "VariableDeclaration", 560 "declarations": [ 561 { 562 "type": "VariableDeclarator", 563 "id": { 564 "type": "Identifier", 565 "name": "obj", 566 "loc": { 567 "start": { 568 "line": 28, 569 "column": 5 570 }, 571 "end": { 572 "line": 28, 573 "column": 8 574 } 575 } 576 }, 577 "init": { 578 "type": "NewExpression", 579 "callee": { 580 "type": "Identifier", 581 "name": "async", 582 "loc": { 583 "start": { 584 "line": 28, 585 "column": 15 586 }, 587 "end": { 588 "line": 28, 589 "column": 20 590 } 591 } 592 }, 593 "typeParameters": { 594 "type": "TSTypeParameterInstantiation", 595 "params": [ 596 { 597 "type": "TSTypeReference", 598 "typeName": { 599 "type": "Identifier", 600 "name": "xxx", 601 "loc": { 602 "start": { 603 "line": 28, 604 "column": 21 605 }, 606 "end": { 607 "line": 28, 608 "column": 24 609 } 610 } 611 }, 612 "loc": { 613 "start": { 614 "line": 28, 615 "column": 21 616 }, 617 "end": { 618 "line": 28, 619 "column": 24 620 } 621 } 622 } 623 ], 624 "loc": { 625 "start": { 626 "line": 28, 627 "column": 20 628 }, 629 "end": { 630 "line": 28, 631 "column": 25 632 } 633 } 634 }, 635 "arguments": [ 636 { 637 "type": "StringLiteral", 638 "value": "Class_async", 639 "loc": { 640 "start": { 641 "line": 28, 642 "column": 26 643 }, 644 "end": { 645 "line": 28, 646 "column": 39 647 } 648 } 649 } 650 ], 651 "loc": { 652 "start": { 653 "line": 28, 654 "column": 11 655 }, 656 "end": { 657 "line": 28, 658 "column": 40 659 } 660 } 661 }, 662 "loc": { 663 "start": { 664 "line": 28, 665 "column": 5 666 }, 667 "end": { 668 "line": 28, 669 "column": 40 670 } 671 } 672 } 673 ], 674 "kind": "var", 675 "loc": { 676 "start": { 677 "line": 28, 678 "column": 1 679 }, 680 "end": { 681 "line": 28, 682 "column": 41 683 } 684 } 685 } 686 ], 687 "loc": { 688 "start": { 689 "line": 1, 690 "column": 1 691 }, 692 "end": { 693 "line": 29, 694 "column": 1 695 } 696 } 697} 698