swc/crates/swc_ecma_parser/tests/tsc/contextualSignatureInstantiation.json

2399 lines
60 KiB
JSON

{
"type": "Script",
"span": {
"start": 496,
"end": 1423,
"ctxt": 0
},
"body": [
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 513,
"end": 516,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"declare": true,
"params": [
{
"type": "Parameter",
"span": {
"start": 520,
"end": 551,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 520,
"end": 551,
"ctxt": 0
},
"value": "cb",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 522,
"end": 551,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsFunctionType",
"span": {
"start": 524,
"end": 551,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 525,
"end": 534,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 526,
"end": 534,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 528,
"end": 534,
"ctxt": 0
},
"kind": "number"
}
}
},
{
"type": "Identifier",
"span": {
"start": 536,
"end": 545,
"ctxt": 0
},
"value": "y",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 537,
"end": 545,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 539,
"end": 545,
"ctxt": 0
},
"kind": "string"
}
}
}
],
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 547,
"end": 551,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 550,
"end": 551,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 550,
"end": 551,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
}
}
}
}
],
"decorators": [],
"span": {
"start": 496,
"end": 556,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 516,
"end": 519,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 517,
"end": 518,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 517,
"end": 518,
"ctxt": 0
},
"value": "T",
"optional": false
},
"in": false,
"out": false,
"constraint": null,
"default": null
}
]
},
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 552,
"end": 555,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 554,
"end": 555,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 554,
"end": 555,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 574,
"end": 577,
"ctxt": 0
},
"value": "bar",
"optional": false
},
"declare": true,
"params": [
{
"type": "Parameter",
"span": {
"start": 587,
"end": 591,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 587,
"end": 591,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 588,
"end": 591,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 590,
"end": 591,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 590,
"end": 591,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
}
},
{
"type": "Parameter",
"span": {
"start": 593,
"end": 597,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 593,
"end": 597,
"ctxt": 0
},
"value": "y",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 594,
"end": 597,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 596,
"end": 597,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 596,
"end": 597,
"ctxt": 0
},
"value": "U",
"optional": false
},
"typeParams": null
}
}
}
},
{
"type": "Parameter",
"span": {
"start": 599,
"end": 620,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 599,
"end": 620,
"ctxt": 0
},
"value": "cb",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 601,
"end": 620,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsFunctionType",
"span": {
"start": 603,
"end": 620,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 604,
"end": 608,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 605,
"end": 608,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 607,
"end": 608,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 607,
"end": 608,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
},
{
"type": "Identifier",
"span": {
"start": 610,
"end": 614,
"ctxt": 0
},
"value": "y",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 611,
"end": 614,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 613,
"end": 614,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 613,
"end": 614,
"ctxt": 0
},
"value": "U",
"optional": false
},
"typeParams": null
}
}
}
],
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 616,
"end": 620,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 619,
"end": 620,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 619,
"end": 620,
"ctxt": 0
},
"value": "V",
"optional": false
},
"typeParams": null
}
}
}
}
}
}
],
"decorators": [],
"span": {
"start": 557,
"end": 625,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 577,
"end": 586,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 578,
"end": 579,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 578,
"end": 579,
"ctxt": 0
},
"value": "T",
"optional": false
},
"in": false,
"out": false,
"constraint": null,
"default": null
},
{
"type": "TsTypeParameter",
"span": {
"start": 581,
"end": 582,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 581,
"end": 582,
"ctxt": 0
},
"value": "U",
"optional": false
},
"in": false,
"out": false,
"constraint": null,
"default": null
},
{
"type": "TsTypeParameter",
"span": {
"start": 584,
"end": 585,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 584,
"end": 585,
"ctxt": 0
},
"value": "V",
"optional": false
},
"in": false,
"out": false,
"constraint": null,
"default": null
}
]
},
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 621,
"end": 624,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 623,
"end": 624,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 623,
"end": 624,
"ctxt": 0
},
"value": "V",
"optional": false
},
"typeParams": null
}
}
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 643,
"end": 646,
"ctxt": 0
},
"value": "baz",
"optional": false
},
"declare": true,
"params": [
{
"type": "Parameter",
"span": {
"start": 653,
"end": 657,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 653,
"end": 657,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 654,
"end": 657,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 656,
"end": 657,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 656,
"end": 657,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
}
},
{
"type": "Parameter",
"span": {
"start": 659,
"end": 663,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 659,
"end": 663,
"ctxt": 0
},
"value": "y",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 660,
"end": 663,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 662,
"end": 663,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 662,
"end": 663,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
}
},
{
"type": "Parameter",
"span": {
"start": 665,
"end": 686,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 665,
"end": 686,
"ctxt": 0
},
"value": "cb",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 667,
"end": 686,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsFunctionType",
"span": {
"start": 669,
"end": 686,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 670,
"end": 674,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 671,
"end": 674,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 673,
"end": 674,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 673,
"end": 674,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
},
{
"type": "Identifier",
"span": {
"start": 676,
"end": 680,
"ctxt": 0
},
"value": "y",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 677,
"end": 680,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 679,
"end": 680,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 679,
"end": 680,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
}
],
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 682,
"end": 686,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 685,
"end": 686,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 685,
"end": 686,
"ctxt": 0
},
"value": "U",
"optional": false
},
"typeParams": null
}
}
}
}
}
}
],
"decorators": [],
"span": {
"start": 626,
"end": 691,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 646,
"end": 652,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 647,
"end": 648,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 647,
"end": 648,
"ctxt": 0
},
"value": "T",
"optional": false
},
"in": false,
"out": false,
"constraint": null,
"default": null
},
{
"type": "TsTypeParameter",
"span": {
"start": 650,
"end": 651,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 650,
"end": 651,
"ctxt": 0
},
"value": "U",
"optional": false
},
"in": false,
"out": false,
"constraint": null,
"default": null
}
]
},
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 687,
"end": 690,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 689,
"end": 690,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 689,
"end": 690,
"ctxt": 0
},
"value": "U",
"optional": false
},
"typeParams": null
}
}
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 710,
"end": 711,
"ctxt": 0
},
"value": "g",
"optional": false
},
"declare": true,
"params": [
{
"type": "Parameter",
"span": {
"start": 715,
"end": 719,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 715,
"end": 719,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 716,
"end": 719,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 718,
"end": 719,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 718,
"end": 719,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
}
},
{
"type": "Parameter",
"span": {
"start": 721,
"end": 725,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 721,
"end": 725,
"ctxt": 0
},
"value": "y",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 722,
"end": 725,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 724,
"end": 725,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 724,
"end": 725,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
}
}
],
"decorators": [],
"span": {
"start": 693,
"end": 730,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 711,
"end": 714,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 712,
"end": 713,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 712,
"end": 713,
"ctxt": 0
},
"value": "T",
"optional": false
},
"in": false,
"out": false,
"constraint": null,
"default": null
}
]
},
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 726,
"end": 729,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 728,
"end": 729,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 728,
"end": 729,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 748,
"end": 749,
"ctxt": 0
},
"value": "h",
"optional": false
},
"declare": true,
"params": [
{
"type": "Parameter",
"span": {
"start": 756,
"end": 760,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 756,
"end": 760,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 757,
"end": 760,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 759,
"end": 760,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 759,
"end": 760,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
}
},
{
"type": "Parameter",
"span": {
"start": 762,
"end": 766,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 762,
"end": 766,
"ctxt": 0
},
"value": "y",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 763,
"end": 766,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 765,
"end": 766,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 765,
"end": 766,
"ctxt": 0
},
"value": "U",
"optional": false
},
"typeParams": null
}
}
}
}
],
"decorators": [],
"span": {
"start": 731,
"end": 779,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 749,
"end": 755,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 750,
"end": 751,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 750,
"end": 751,
"ctxt": 0
},
"value": "T",
"optional": false
},
"in": false,
"out": false,
"constraint": null,
"default": null
},
{
"type": "TsTypeParameter",
"span": {
"start": 753,
"end": 754,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 753,
"end": 754,
"ctxt": 0
},
"value": "U",
"optional": false
},
"in": false,
"out": false,
"constraint": null,
"default": null
}
]
},
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 767,
"end": 778,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsUnionType",
"span": {
"start": 769,
"end": 778,
"ctxt": 0
},
"types": [
{
"type": "TsArrayType",
"span": {
"start": 769,
"end": 772,
"ctxt": 0
},
"elemType": {
"type": "TsTypeReference",
"span": {
"start": 769,
"end": 770,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 769,
"end": 770,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
},
{
"type": "TsArrayType",
"span": {
"start": 775,
"end": 778,
"ctxt": 0
},
"elemType": {
"type": "TsTypeReference",
"span": {
"start": 775,
"end": 776,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 775,
"end": 776,
"ctxt": 0
},
"value": "U",
"optional": false
},
"typeParams": null
}
}
]
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 781,
"end": 795,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 785,
"end": 794,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 785,
"end": 786,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 786,
"end": 794,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 788,
"end": 794,
"ctxt": 0
},
"kind": "number"
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 796,
"end": 817,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 800,
"end": 816,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 800,
"end": 801,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 804,
"end": 816,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 804,
"end": 807,
"ctxt": 0
},
"value": "bar",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 808,
"end": 809,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 811,
"end": 812,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
}
},
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 814,
"end": 815,
"ctxt": 0
},
"value": "g",
"optional": false
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 843,
"end": 864,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 847,
"end": 863,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 847,
"end": 848,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 851,
"end": 863,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 851,
"end": 854,
"ctxt": 0
},
"value": "baz",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 855,
"end": 856,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 858,
"end": 859,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
}
},
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 861,
"end": 862,
"ctxt": 0
},
"value": "g",
"optional": false
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 891,
"end": 914,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 895,
"end": 913,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 895,
"end": 896,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 896,
"end": 913,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsUnionType",
"span": {
"start": 898,
"end": 913,
"ctxt": 0
},
"types": [
{
"type": "TsKeywordType",
"span": {
"start": 898,
"end": 904,
"ctxt": 0
},
"kind": "number"
},
{
"type": "TsKeywordType",
"span": {
"start": 907,
"end": 913,
"ctxt": 0
},
"kind": "string"
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 915,
"end": 930,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 919,
"end": 929,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 919,
"end": 920,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 923,
"end": 929,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 923,
"end": 926,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 927,
"end": 928,
"ctxt": 0
},
"value": "g",
"optional": false
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 989,
"end": 1014,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 993,
"end": 1013,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 993,
"end": 994,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 997,
"end": 1013,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 997,
"end": 1000,
"ctxt": 0
},
"value": "bar",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 1001,
"end": 1002,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
}
},
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 1004,
"end": 1009,
"ctxt": 0
},
"value": "one",
"raw": "\"one\""
}
},
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 1011,
"end": 1012,
"ctxt": 0
},
"value": "g",
"optional": false
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 1063,
"end": 1088,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1067,
"end": 1087,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1067,
"end": 1068,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 1071,
"end": 1087,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 1071,
"end": 1074,
"ctxt": 0
},
"value": "bar",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 1075,
"end": 1080,
"ctxt": 0
},
"value": "one",
"raw": "\"one\""
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 1082,
"end": 1083,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
}
},
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 1085,
"end": 1086,
"ctxt": 0
},
"value": "g",
"optional": false
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 1137,
"end": 1158,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1141,
"end": 1157,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1141,
"end": 1142,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 1145,
"end": 1157,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 1145,
"end": 1148,
"ctxt": 0
},
"value": "baz",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 1149,
"end": 1150,
"ctxt": 0
},
"value": "b",
"optional": false
}
},
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 1152,
"end": 1153,
"ctxt": 0
},
"value": "b",
"optional": false
}
},
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 1155,
"end": 1156,
"ctxt": 0
},
"value": "g",
"optional": false
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 1194,
"end": 1221,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1198,
"end": 1220,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1198,
"end": 1199,
"ctxt": 0
},
"value": "d",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1199,
"end": 1220,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsUnionType",
"span": {
"start": 1201,
"end": 1220,
"ctxt": 0
},
"types": [
{
"type": "TsArrayType",
"span": {
"start": 1201,
"end": 1209,
"ctxt": 0
},
"elemType": {
"type": "TsKeywordType",
"span": {
"start": 1201,
"end": 1207,
"ctxt": 0
},
"kind": "number"
}
},
{
"type": "TsArrayType",
"span": {
"start": 1212,
"end": 1220,
"ctxt": 0
},
"elemType": {
"type": "TsKeywordType",
"span": {
"start": 1212,
"end": 1218,
"ctxt": 0
},
"kind": "string"
}
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 1222,
"end": 1237,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1226,
"end": 1236,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1226,
"end": 1227,
"ctxt": 0
},
"value": "d",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 1230,
"end": 1236,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 1230,
"end": 1233,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 1234,
"end": 1235,
"ctxt": 0
},
"value": "h",
"optional": false
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 1282,
"end": 1307,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1286,
"end": 1306,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1286,
"end": 1287,
"ctxt": 0
},
"value": "d",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 1290,
"end": 1306,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 1290,
"end": 1293,
"ctxt": 0
},
"value": "bar",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 1294,
"end": 1295,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
}
},
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 1297,
"end": 1302,
"ctxt": 0
},
"value": "one",
"raw": "\"one\""
}
},
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 1304,
"end": 1305,
"ctxt": 0
},
"value": "h",
"optional": false
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 1342,
"end": 1367,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1346,
"end": 1366,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1346,
"end": 1347,
"ctxt": 0
},
"value": "d",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 1350,
"end": 1366,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 1350,
"end": 1353,
"ctxt": 0
},
"value": "bar",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 1354,
"end": 1359,
"ctxt": 0
},
"value": "one",
"raw": "\"one\""
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 1361,
"end": 1362,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
}
},
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 1364,
"end": 1365,
"ctxt": 0
},
"value": "h",
"optional": false
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 1402,
"end": 1423,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1406,
"end": 1422,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1406,
"end": 1407,
"ctxt": 0
},
"value": "d",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 1410,
"end": 1422,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 1410,
"end": 1413,
"ctxt": 0
},
"value": "baz",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 1414,
"end": 1415,
"ctxt": 0
},
"value": "d",
"optional": false
}
},
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 1417,
"end": 1418,
"ctxt": 0
},
"value": "d",
"optional": false
}
},
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 1420,
"end": 1421,
"ctxt": 0
},
"value": "g",
"optional": false
}
}
],
"typeArguments": null
},
"definite": false
}
]
}
],
"interpreter": null
}