swc/crates/swc_ecma_parser/tests/tsc/contextualSignatureInstantiation.json
2022-02-04 20:17:42 +09:00

2389 lines
60 KiB
JSON

{
"type": "Script",
"span": {
"start": 495,
"end": 1422,
"ctxt": 0
},
"body": [
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 512,
"end": 515,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"declare": true,
"params": [
{
"type": "Parameter",
"span": {
"start": 519,
"end": 550,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 519,
"end": 550,
"ctxt": 0
},
"value": "cb",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 521,
"end": 550,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsFunctionType",
"span": {
"start": 523,
"end": 550,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 524,
"end": 533,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 525,
"end": 533,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 527,
"end": 533,
"ctxt": 0
},
"kind": "number"
}
}
},
{
"type": "Identifier",
"span": {
"start": 535,
"end": 544,
"ctxt": 0
},
"value": "y",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 536,
"end": 544,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 538,
"end": 544,
"ctxt": 0
},
"kind": "string"
}
}
}
],
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 546,
"end": 550,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 549,
"end": 550,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 549,
"end": 550,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
}
}
}
}
],
"decorators": [],
"span": {
"start": 495,
"end": 555,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 515,
"end": 518,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 516,
"end": 517,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 516,
"end": 517,
"ctxt": 0
},
"value": "T",
"optional": false
},
"constraint": null,
"default": null
}
]
},
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 551,
"end": 554,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 553,
"end": 554,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 553,
"end": 554,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 573,
"end": 576,
"ctxt": 0
},
"value": "bar",
"optional": false
},
"declare": true,
"params": [
{
"type": "Parameter",
"span": {
"start": 586,
"end": 590,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 586,
"end": 590,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 587,
"end": 590,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 589,
"end": 590,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 589,
"end": 590,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
}
},
{
"type": "Parameter",
"span": {
"start": 592,
"end": 596,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 592,
"end": 596,
"ctxt": 0
},
"value": "y",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 593,
"end": 596,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 595,
"end": 596,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 595,
"end": 596,
"ctxt": 0
},
"value": "U",
"optional": false
},
"typeParams": null
}
}
}
},
{
"type": "Parameter",
"span": {
"start": 598,
"end": 619,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 598,
"end": 619,
"ctxt": 0
},
"value": "cb",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 600,
"end": 619,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsFunctionType",
"span": {
"start": 602,
"end": 619,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 603,
"end": 607,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 604,
"end": 607,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 606,
"end": 607,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 606,
"end": 607,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
},
{
"type": "Identifier",
"span": {
"start": 609,
"end": 613,
"ctxt": 0
},
"value": "y",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 610,
"end": 613,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 612,
"end": 613,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 612,
"end": 613,
"ctxt": 0
},
"value": "U",
"optional": false
},
"typeParams": null
}
}
}
],
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 615,
"end": 619,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 618,
"end": 619,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 618,
"end": 619,
"ctxt": 0
},
"value": "V",
"optional": false
},
"typeParams": null
}
}
}
}
}
}
],
"decorators": [],
"span": {
"start": 556,
"end": 624,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 576,
"end": 585,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 577,
"end": 578,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 577,
"end": 578,
"ctxt": 0
},
"value": "T",
"optional": false
},
"constraint": null,
"default": null
},
{
"type": "TsTypeParameter",
"span": {
"start": 580,
"end": 581,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 580,
"end": 581,
"ctxt": 0
},
"value": "U",
"optional": false
},
"constraint": null,
"default": null
},
{
"type": "TsTypeParameter",
"span": {
"start": 583,
"end": 584,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 583,
"end": 584,
"ctxt": 0
},
"value": "V",
"optional": false
},
"constraint": null,
"default": null
}
]
},
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 620,
"end": 623,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 622,
"end": 623,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 622,
"end": 623,
"ctxt": 0
},
"value": "V",
"optional": false
},
"typeParams": null
}
}
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 642,
"end": 645,
"ctxt": 0
},
"value": "baz",
"optional": false
},
"declare": true,
"params": [
{
"type": "Parameter",
"span": {
"start": 652,
"end": 656,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 652,
"end": 656,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 653,
"end": 656,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 655,
"end": 656,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 655,
"end": 656,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
}
},
{
"type": "Parameter",
"span": {
"start": 658,
"end": 662,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 658,
"end": 662,
"ctxt": 0
},
"value": "y",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 659,
"end": 662,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 661,
"end": 662,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 661,
"end": 662,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
}
},
{
"type": "Parameter",
"span": {
"start": 664,
"end": 685,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 664,
"end": 685,
"ctxt": 0
},
"value": "cb",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 666,
"end": 685,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsFunctionType",
"span": {
"start": 668,
"end": 685,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 669,
"end": 673,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 670,
"end": 673,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 672,
"end": 673,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 672,
"end": 673,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
},
{
"type": "Identifier",
"span": {
"start": 675,
"end": 679,
"ctxt": 0
},
"value": "y",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 676,
"end": 679,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 678,
"end": 679,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 678,
"end": 679,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
}
],
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 681,
"end": 685,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 684,
"end": 685,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 684,
"end": 685,
"ctxt": 0
},
"value": "U",
"optional": false
},
"typeParams": null
}
}
}
}
}
}
],
"decorators": [],
"span": {
"start": 625,
"end": 690,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 645,
"end": 651,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 646,
"end": 647,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 646,
"end": 647,
"ctxt": 0
},
"value": "T",
"optional": false
},
"constraint": null,
"default": null
},
{
"type": "TsTypeParameter",
"span": {
"start": 649,
"end": 650,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 649,
"end": 650,
"ctxt": 0
},
"value": "U",
"optional": false
},
"constraint": null,
"default": null
}
]
},
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 686,
"end": 689,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 688,
"end": 689,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 688,
"end": 689,
"ctxt": 0
},
"value": "U",
"optional": false
},
"typeParams": null
}
}
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 709,
"end": 710,
"ctxt": 0
},
"value": "g",
"optional": false
},
"declare": true,
"params": [
{
"type": "Parameter",
"span": {
"start": 714,
"end": 718,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 714,
"end": 718,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 715,
"end": 718,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 717,
"end": 718,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 717,
"end": 718,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
}
},
{
"type": "Parameter",
"span": {
"start": 720,
"end": 724,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 720,
"end": 724,
"ctxt": 0
},
"value": "y",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 721,
"end": 724,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 723,
"end": 724,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 723,
"end": 724,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
}
}
],
"decorators": [],
"span": {
"start": 692,
"end": 729,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 710,
"end": 713,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 711,
"end": 712,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 711,
"end": 712,
"ctxt": 0
},
"value": "T",
"optional": false
},
"constraint": null,
"default": null
}
]
},
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 725,
"end": 728,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 727,
"end": 728,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 727,
"end": 728,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 747,
"end": 748,
"ctxt": 0
},
"value": "h",
"optional": false
},
"declare": true,
"params": [
{
"type": "Parameter",
"span": {
"start": 755,
"end": 759,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 755,
"end": 759,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 756,
"end": 759,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 758,
"end": 759,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 758,
"end": 759,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
}
},
{
"type": "Parameter",
"span": {
"start": 761,
"end": 765,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 761,
"end": 765,
"ctxt": 0
},
"value": "y",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 762,
"end": 765,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 764,
"end": 765,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 764,
"end": 765,
"ctxt": 0
},
"value": "U",
"optional": false
},
"typeParams": null
}
}
}
}
],
"decorators": [],
"span": {
"start": 730,
"end": 778,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 748,
"end": 754,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 749,
"end": 750,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 749,
"end": 750,
"ctxt": 0
},
"value": "T",
"optional": false
},
"constraint": null,
"default": null
},
{
"type": "TsTypeParameter",
"span": {
"start": 752,
"end": 753,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 752,
"end": 753,
"ctxt": 0
},
"value": "U",
"optional": false
},
"constraint": null,
"default": null
}
]
},
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 766,
"end": 777,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsUnionType",
"span": {
"start": 768,
"end": 777,
"ctxt": 0
},
"types": [
{
"type": "TsArrayType",
"span": {
"start": 768,
"end": 771,
"ctxt": 0
},
"elemType": {
"type": "TsTypeReference",
"span": {
"start": 768,
"end": 769,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 768,
"end": 769,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
},
{
"type": "TsArrayType",
"span": {
"start": 774,
"end": 777,
"ctxt": 0
},
"elemType": {
"type": "TsTypeReference",
"span": {
"start": 774,
"end": 775,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 774,
"end": 775,
"ctxt": 0
},
"value": "U",
"optional": false
},
"typeParams": null
}
}
]
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 780,
"end": 794,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 784,
"end": 793,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 784,
"end": 785,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 785,
"end": 793,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 787,
"end": 793,
"ctxt": 0
},
"kind": "number"
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 795,
"end": 816,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 799,
"end": 815,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 799,
"end": 800,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 803,
"end": 815,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 803,
"end": 806,
"ctxt": 0
},
"value": "bar",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 807,
"end": 808,
"ctxt": 0
},
"value": 1.0
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 810,
"end": 811,
"ctxt": 0
},
"value": 1.0
}
},
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 813,
"end": 814,
"ctxt": 0
},
"value": "g",
"optional": false
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 842,
"end": 863,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 846,
"end": 862,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 846,
"end": 847,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 850,
"end": 862,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 850,
"end": 853,
"ctxt": 0
},
"value": "baz",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 854,
"end": 855,
"ctxt": 0
},
"value": 1.0
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 857,
"end": 858,
"ctxt": 0
},
"value": 1.0
}
},
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 860,
"end": 861,
"ctxt": 0
},
"value": "g",
"optional": false
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 890,
"end": 913,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 894,
"end": 912,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 894,
"end": 895,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 895,
"end": 912,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsUnionType",
"span": {
"start": 897,
"end": 912,
"ctxt": 0
},
"types": [
{
"type": "TsKeywordType",
"span": {
"start": 897,
"end": 903,
"ctxt": 0
},
"kind": "number"
},
{
"type": "TsKeywordType",
"span": {
"start": 906,
"end": 912,
"ctxt": 0
},
"kind": "string"
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 914,
"end": 929,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 918,
"end": 928,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 918,
"end": 919,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 922,
"end": 928,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 922,
"end": 925,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 926,
"end": 927,
"ctxt": 0
},
"value": "g",
"optional": false
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 988,
"end": 1013,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 992,
"end": 1012,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 992,
"end": 993,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 996,
"end": 1012,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 996,
"end": 999,
"ctxt": 0
},
"value": "bar",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 1000,
"end": 1001,
"ctxt": 0
},
"value": 1.0
}
},
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 1003,
"end": 1008,
"ctxt": 0
},
"value": "one",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
},
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 1010,
"end": 1011,
"ctxt": 0
},
"value": "g",
"optional": false
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 1062,
"end": 1087,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1066,
"end": 1086,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1066,
"end": 1067,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 1070,
"end": 1086,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 1070,
"end": 1073,
"ctxt": 0
},
"value": "bar",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 1074,
"end": 1079,
"ctxt": 0
},
"value": "one",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 1081,
"end": 1082,
"ctxt": 0
},
"value": 1.0
}
},
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 1084,
"end": 1085,
"ctxt": 0
},
"value": "g",
"optional": false
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 1136,
"end": 1157,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1140,
"end": 1156,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1140,
"end": 1141,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 1144,
"end": 1156,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 1144,
"end": 1147,
"ctxt": 0
},
"value": "baz",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 1148,
"end": 1149,
"ctxt": 0
},
"value": "b",
"optional": false
}
},
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 1151,
"end": 1152,
"ctxt": 0
},
"value": "b",
"optional": false
}
},
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 1154,
"end": 1155,
"ctxt": 0
},
"value": "g",
"optional": false
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 1193,
"end": 1220,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1197,
"end": 1219,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1197,
"end": 1198,
"ctxt": 0
},
"value": "d",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1198,
"end": 1219,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsUnionType",
"span": {
"start": 1200,
"end": 1219,
"ctxt": 0
},
"types": [
{
"type": "TsArrayType",
"span": {
"start": 1200,
"end": 1208,
"ctxt": 0
},
"elemType": {
"type": "TsKeywordType",
"span": {
"start": 1200,
"end": 1206,
"ctxt": 0
},
"kind": "number"
}
},
{
"type": "TsArrayType",
"span": {
"start": 1211,
"end": 1219,
"ctxt": 0
},
"elemType": {
"type": "TsKeywordType",
"span": {
"start": 1211,
"end": 1217,
"ctxt": 0
},
"kind": "string"
}
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 1221,
"end": 1236,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1225,
"end": 1235,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1225,
"end": 1226,
"ctxt": 0
},
"value": "d",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 1229,
"end": 1235,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 1229,
"end": 1232,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 1233,
"end": 1234,
"ctxt": 0
},
"value": "h",
"optional": false
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 1281,
"end": 1306,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1285,
"end": 1305,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1285,
"end": 1286,
"ctxt": 0
},
"value": "d",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 1289,
"end": 1305,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 1289,
"end": 1292,
"ctxt": 0
},
"value": "bar",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 1293,
"end": 1294,
"ctxt": 0
},
"value": 1.0
}
},
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 1296,
"end": 1301,
"ctxt": 0
},
"value": "one",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
},
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 1303,
"end": 1304,
"ctxt": 0
},
"value": "h",
"optional": false
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 1341,
"end": 1366,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1345,
"end": 1365,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1345,
"end": 1346,
"ctxt": 0
},
"value": "d",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 1349,
"end": 1365,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 1349,
"end": 1352,
"ctxt": 0
},
"value": "bar",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 1353,
"end": 1358,
"ctxt": 0
},
"value": "one",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 1360,
"end": 1361,
"ctxt": 0
},
"value": 1.0
}
},
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 1363,
"end": 1364,
"ctxt": 0
},
"value": "h",
"optional": false
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 1401,
"end": 1422,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1405,
"end": 1421,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1405,
"end": 1406,
"ctxt": 0
},
"value": "d",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 1409,
"end": 1421,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 1409,
"end": 1412,
"ctxt": 0
},
"value": "baz",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 1413,
"end": 1414,
"ctxt": 0
},
"value": "d",
"optional": false
}
},
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 1416,
"end": 1417,
"ctxt": 0
},
"value": "d",
"optional": false
}
},
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 1419,
"end": 1420,
"ctxt": 0
},
"value": "g",
"optional": false
}
}
],
"typeArguments": null
},
"definite": false
}
]
}
],
"interpreter": null
}