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