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

2701 lines
65 KiB
JSON

{
"type": "Script",
"span": {
"start": 250,
"end": 1369,
"ctxt": 0
},
"body": [
{
"type": "TsTypeAliasDeclaration",
"span": {
"start": 250,
"end": 282,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
"start": 255,
"end": 266,
"ctxt": 0
},
"value": "arrayString",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 269,
"end": 282,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 269,
"end": 274,
"ctxt": 0
},
"value": "Array",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 274,
"end": 282,
"ctxt": 0
},
"params": [
{
"type": "TsTypeReference",
"span": {
"start": 275,
"end": 281,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 275,
"end": 281,
"ctxt": 0
},
"value": "String",
"optional": false
},
"typeParams": null
}
]
}
}
},
{
"type": "TsTypeAliasDeclaration",
"span": {
"start": 283,
"end": 325,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
"start": 288,
"end": 297,
"ctxt": 0
},
"value": "someArray",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsUnionType",
"span": {
"start": 300,
"end": 324,
"ctxt": 0
},
"types": [
{
"type": "TsTypeReference",
"span": {
"start": 300,
"end": 313,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 300,
"end": 305,
"ctxt": 0
},
"value": "Array",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 305,
"end": 313,
"ctxt": 0
},
"params": [
{
"type": "TsTypeReference",
"span": {
"start": 306,
"end": 312,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 306,
"end": 312,
"ctxt": 0
},
"value": "String",
"optional": false
},
"typeParams": null
}
]
}
},
{
"type": "TsArrayType",
"span": {
"start": 316,
"end": 324,
"ctxt": 0
},
"elemType": {
"type": "TsKeywordType",
"span": {
"start": 316,
"end": 322,
"ctxt": 0
},
"kind": "number"
}
}
]
}
},
{
"type": "TsTypeAliasDeclaration",
"span": {
"start": 326,
"end": 371,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
"start": 331,
"end": 347,
"ctxt": 0
},
"value": "stringOrNumArray",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 350,
"end": 370,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 350,
"end": 355,
"ctxt": 0
},
"value": "Array",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 355,
"end": 370,
"ctxt": 0
},
"params": [
{
"type": "TsUnionType",
"span": {
"start": 356,
"end": 369,
"ctxt": 0
},
"types": [
{
"type": "TsTypeReference",
"span": {
"start": 356,
"end": 362,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 356,
"end": 362,
"ctxt": 0
},
"value": "String",
"optional": false
},
"typeParams": null
},
{
"type": "TsTypeReference",
"span": {
"start": 363,
"end": 369,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 363,
"end": 369,
"ctxt": 0
},
"value": "Number",
"optional": false
},
"typeParams": null
}
]
}
]
}
}
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 382,
"end": 384,
"ctxt": 0
},
"value": "a1",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 385,
"end": 408,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "RestElement",
"span": {
"start": 385,
"end": 408,
"ctxt": 0
},
"rest": {
"start": 385,
"end": 388,
"ctxt": 0
},
"argument": {
"type": "Identifier",
"span": {
"start": 388,
"end": 389,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 389,
"end": 408,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsArrayType",
"span": {
"start": 391,
"end": 408,
"ctxt": 0
},
"elemType": {
"type": "TsParenthesizedType",
"span": {
"start": 391,
"end": 406,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsUnionType",
"span": {
"start": 392,
"end": 405,
"ctxt": 0
},
"types": [
{
"type": "TsKeywordType",
"span": {
"start": 392,
"end": 398,
"ctxt": 0
},
"kind": "number"
},
{
"type": "TsKeywordType",
"span": {
"start": 399,
"end": 405,
"ctxt": 0
},
"kind": "string"
}
]
}
}
}
}
}
}
],
"decorators": [],
"span": {
"start": 373,
"end": 413,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 410,
"end": 413,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 423,
"end": 425,
"ctxt": 0
},
"value": "a2",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 426,
"end": 430,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "RestElement",
"span": {
"start": 426,
"end": 430,
"ctxt": 0
},
"rest": {
"start": 426,
"end": 429,
"ctxt": 0
},
"argument": {
"type": "Identifier",
"span": {
"start": 429,
"end": 430,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"typeAnnotation": null
}
}
],
"decorators": [],
"span": {
"start": 414,
"end": 435,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 432,
"end": 435,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 445,
"end": 447,
"ctxt": 0
},
"value": "a3",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 448,
"end": 467,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "RestElement",
"span": {
"start": 448,
"end": 467,
"ctxt": 0
},
"rest": {
"start": 448,
"end": 451,
"ctxt": 0
},
"argument": {
"type": "Identifier",
"span": {
"start": 451,
"end": 452,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 452,
"end": 467,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 454,
"end": 467,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 454,
"end": 459,
"ctxt": 0
},
"value": "Array",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 459,
"end": 467,
"ctxt": 0
},
"params": [
{
"type": "TsTypeReference",
"span": {
"start": 460,
"end": 466,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 460,
"end": 466,
"ctxt": 0
},
"value": "String",
"optional": false
},
"typeParams": null
}
]
}
}
}
}
}
],
"decorators": [],
"span": {
"start": 436,
"end": 472,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 469,
"end": 472,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 482,
"end": 484,
"ctxt": 0
},
"value": "a4",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 485,
"end": 502,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "RestElement",
"span": {
"start": 485,
"end": 502,
"ctxt": 0
},
"rest": {
"start": 485,
"end": 488,
"ctxt": 0
},
"argument": {
"type": "Identifier",
"span": {
"start": 488,
"end": 489,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 489,
"end": 502,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 491,
"end": 502,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 491,
"end": 502,
"ctxt": 0
},
"value": "arrayString",
"optional": false
},
"typeParams": null
}
}
}
}
],
"decorators": [],
"span": {
"start": 473,
"end": 507,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 504,
"end": 507,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 517,
"end": 519,
"ctxt": 0
},
"value": "a5",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 520,
"end": 542,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "RestElement",
"span": {
"start": 520,
"end": 542,
"ctxt": 0
},
"rest": {
"start": 520,
"end": 523,
"ctxt": 0
},
"argument": {
"type": "Identifier",
"span": {
"start": 523,
"end": 524,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 524,
"end": 542,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 526,
"end": 542,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 526,
"end": 542,
"ctxt": 0
},
"value": "stringOrNumArray",
"optional": false
},
"typeParams": null
}
}
}
}
],
"decorators": [],
"span": {
"start": 508,
"end": 547,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 544,
"end": 547,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 557,
"end": 559,
"ctxt": 0
},
"value": "a9",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 560,
"end": 573,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "ArrayPattern",
"span": {
"start": 560,
"end": 573,
"ctxt": 0
},
"elements": [
{
"type": "Identifier",
"span": {
"start": 561,
"end": 562,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
{
"type": "Identifier",
"span": {
"start": 564,
"end": 565,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
},
{
"type": "ArrayPattern",
"span": {
"start": 567,
"end": 572,
"ctxt": 0
},
"elements": [
{
"type": "ArrayPattern",
"span": {
"start": 568,
"end": 571,
"ctxt": 0
},
"elements": [
{
"type": "Identifier",
"span": {
"start": 569,
"end": 570,
"ctxt": 0
},
"value": "c",
"optional": false,
"typeAnnotation": null
}
],
"optional": false,
"typeAnnotation": null
}
],
"optional": false,
"typeAnnotation": null
}
],
"optional": false,
"typeAnnotation": null
}
}
],
"decorators": [],
"span": {
"start": 548,
"end": 578,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 575,
"end": 578,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 588,
"end": 591,
"ctxt": 0
},
"value": "a10",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 592,
"end": 611,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "ArrayPattern",
"span": {
"start": 592,
"end": 611,
"ctxt": 0
},
"elements": [
{
"type": "Identifier",
"span": {
"start": 593,
"end": 594,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
{
"type": "Identifier",
"span": {
"start": 596,
"end": 597,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
},
{
"type": "ArrayPattern",
"span": {
"start": 599,
"end": 604,
"ctxt": 0
},
"elements": [
{
"type": "ArrayPattern",
"span": {
"start": 600,
"end": 603,
"ctxt": 0
},
"elements": [
{
"type": "Identifier",
"span": {
"start": 601,
"end": 602,
"ctxt": 0
},
"value": "c",
"optional": false,
"typeAnnotation": null
}
],
"optional": false,
"typeAnnotation": null
}
],
"optional": false,
"typeAnnotation": null
},
{
"type": "RestElement",
"span": {
"start": 606,
"end": 610,
"ctxt": 0
},
"rest": {
"start": 606,
"end": 609,
"ctxt": 0
},
"argument": {
"type": "Identifier",
"span": {
"start": 609,
"end": 610,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"typeAnnotation": null
}
],
"optional": false,
"typeAnnotation": null
}
}
],
"decorators": [],
"span": {
"start": 579,
"end": 616,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 613,
"end": 616,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 626,
"end": 629,
"ctxt": 0
},
"value": "a11",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 630,
"end": 655,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "ArrayPattern",
"span": {
"start": 630,
"end": 655,
"ctxt": 0
},
"elements": [
{
"type": "Identifier",
"span": {
"start": 631,
"end": 632,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
{
"type": "Identifier",
"span": {
"start": 634,
"end": 635,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
},
{
"type": "Identifier",
"span": {
"start": 637,
"end": 638,
"ctxt": 0
},
"value": "c",
"optional": false,
"typeAnnotation": null
},
{
"type": "RestElement",
"span": {
"start": 640,
"end": 644,
"ctxt": 0
},
"rest": {
"start": 640,
"end": 643,
"ctxt": 0
},
"argument": {
"type": "Identifier",
"span": {
"start": 643,
"end": 644,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"typeAnnotation": null
}
],
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 645,
"end": 655,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsArrayType",
"span": {
"start": 647,
"end": 655,
"ctxt": 0
},
"elemType": {
"type": "TsKeywordType",
"span": {
"start": 647,
"end": 653,
"ctxt": 0
},
"kind": "number"
}
}
}
}
}
],
"decorators": [],
"span": {
"start": 617,
"end": 660,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 657,
"end": 660,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "VariableDeclaration",
"span": {
"start": 663,
"end": 685,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 667,
"end": 684,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 667,
"end": 672,
"ctxt": 0
},
"value": "array",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ArrayExpression",
"span": {
"start": 675,
"end": 684,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 676,
"end": 677,
"ctxt": 0
},
"value": 1.0
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 679,
"end": 680,
"ctxt": 0
},
"value": 2.0
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 682,
"end": 683,
"ctxt": 0
},
"value": 3.0
}
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 686,
"end": 722,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 690,
"end": 721,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 690,
"end": 696,
"ctxt": 0
},
"value": "array2",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ArrayExpression",
"span": {
"start": 699,
"end": 721,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "BooleanLiteral",
"span": {
"start": 700,
"end": 704,
"ctxt": 0
},
"value": true
}
},
{
"spread": null,
"expression": {
"type": "BooleanLiteral",
"span": {
"start": 706,
"end": 711,
"ctxt": 0
},
"value": false
}
},
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 713,
"end": 720,
"ctxt": 0
},
"value": "hello",
"raw": "\"hello\""
}
}
]
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 723,
"end": 738,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 723,
"end": 737,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 723,
"end": 725,
"ctxt": 0
},
"value": "a2",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "ArrayExpression",
"span": {
"start": 726,
"end": 736,
"ctxt": 0
},
"elements": [
{
"spread": {
"start": 727,
"end": 730,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 730,
"end": 735,
"ctxt": 0
},
"value": "array",
"optional": false
}
}
]
}
}
],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 739,
"end": 752,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 739,
"end": 751,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 739,
"end": 741,
"ctxt": 0
},
"value": "a1",
"optional": false
},
"arguments": [
{
"spread": {
"start": 742,
"end": 745,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 745,
"end": 750,
"ctxt": 0
},
"value": "array",
"optional": false
}
}
],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 754,
"end": 792,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 754,
"end": 791,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 754,
"end": 756,
"ctxt": 0
},
"value": "a9",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "ArrayExpression",
"span": {
"start": 757,
"end": 790,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 758,
"end": 759,
"ctxt": 0
},
"value": 1.0
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 761,
"end": 762,
"ctxt": 0
},
"value": 2.0
}
},
{
"spread": null,
"expression": {
"type": "ArrayExpression",
"span": {
"start": 764,
"end": 776,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "ArrayExpression",
"span": {
"start": 765,
"end": 775,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 766,
"end": 774,
"ctxt": 0
},
"value": "string",
"raw": "\"string\""
}
}
]
}
}
]
}
},
{
"spread": null,
"expression": {
"type": "BooleanLiteral",
"span": {
"start": 778,
"end": 783,
"ctxt": 0
},
"value": false
}
},
{
"spread": null,
"expression": {
"type": "BooleanLiteral",
"span": {
"start": 785,
"end": 789,
"ctxt": 0
},
"value": true
}
}
]
}
}
],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 837,
"end": 876,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 837,
"end": 875,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 837,
"end": 840,
"ctxt": 0
},
"value": "a10",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "ArrayExpression",
"span": {
"start": 841,
"end": 874,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 842,
"end": 843,
"ctxt": 0
},
"value": 1.0
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 845,
"end": 846,
"ctxt": 0
},
"value": 2.0
}
},
{
"spread": null,
"expression": {
"type": "ArrayExpression",
"span": {
"start": 848,
"end": 860,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "ArrayExpression",
"span": {
"start": 849,
"end": 859,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 850,
"end": 858,
"ctxt": 0
},
"value": "string",
"raw": "\"string\""
}
}
]
}
}
]
}
},
{
"spread": null,
"expression": {
"type": "BooleanLiteral",
"span": {
"start": 862,
"end": 867,
"ctxt": 0
},
"value": false
}
},
{
"spread": null,
"expression": {
"type": "BooleanLiteral",
"span": {
"start": 869,
"end": 873,
"ctxt": 0
},
"value": true
}
}
]
}
}
],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 906,
"end": 934,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 906,
"end": 933,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 906,
"end": 909,
"ctxt": 0
},
"value": "a10",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "ArrayExpression",
"span": {
"start": 910,
"end": 932,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 911,
"end": 912,
"ctxt": 0
},
"value": 1.0
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 914,
"end": 915,
"ctxt": 0
},
"value": 2.0
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 917,
"end": 918,
"ctxt": 0
},
"value": 3.0
}
},
{
"spread": null,
"expression": {
"type": "BooleanLiteral",
"span": {
"start": 920,
"end": 925,
"ctxt": 0
},
"value": false
}
},
{
"spread": null,
"expression": {
"type": "BooleanLiteral",
"span": {
"start": 927,
"end": 931,
"ctxt": 0
},
"value": true
}
}
]
}
}
],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 975,
"end": 987,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 975,
"end": 986,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 975,
"end": 978,
"ctxt": 0
},
"value": "a10",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "ArrayExpression",
"span": {
"start": 979,
"end": 985,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 980,
"end": 981,
"ctxt": 0
},
"value": 1.0
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 983,
"end": 984,
"ctxt": 0
},
"value": 2.0
}
}
]
}
}
],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 1044,
"end": 1056,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 1044,
"end": 1055,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 1044,
"end": 1047,
"ctxt": 0
},
"value": "a11",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "ArrayExpression",
"span": {
"start": 1048,
"end": 1054,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 1049,
"end": 1050,
"ctxt": 0
},
"value": 1.0
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 1052,
"end": 1053,
"ctxt": 0
},
"value": 2.0
}
}
]
}
}
],
"typeArguments": null
}
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 1157,
"end": 1160,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 1164,
"end": 1173,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "RestElement",
"span": {
"start": 1164,
"end": 1173,
"ctxt": 0
},
"rest": {
"start": 1164,
"end": 1167,
"ctxt": 0
},
"argument": {
"type": "Identifier",
"span": {
"start": 1167,
"end": 1168,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1168,
"end": 1173,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsArrayType",
"span": {
"start": 1170,
"end": 1173,
"ctxt": 0
},
"elemType": {
"type": "TsTypeReference",
"span": {
"start": 1170,
"end": 1171,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1170,
"end": 1171,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
}
}
}
],
"decorators": [],
"span": {
"start": 1148,
"end": 1178,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 1175,
"end": 1178,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 1160,
"end": 1163,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 1161,
"end": 1162,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 1161,
"end": 1162,
"ctxt": 0
},
"value": "T",
"optional": false
},
"in": false,
"out": false,
"constraint": null,
"default": null
}
]
},
"returnType": null
},
{
"type": "ExpressionStatement",
"span": {
"start": 1179,
"end": 1213,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 1179,
"end": 1212,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 1179,
"end": 1182,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 1198,
"end": 1205,
"ctxt": 0
},
"value": "hello",
"raw": "\"hello\""
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 1207,
"end": 1208,
"ctxt": 0
},
"value": 1.0
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 1210,
"end": 1211,
"ctxt": 0
},
"value": 2.0
}
}
],
"typeArguments": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 1182,
"end": 1197,
"ctxt": 0
},
"params": [
{
"type": "TsUnionType",
"span": {
"start": 1183,
"end": 1196,
"ctxt": 0
},
"types": [
{
"type": "TsKeywordType",
"span": {
"start": 1183,
"end": 1189,
"ctxt": 0
},
"kind": "number"
},
{
"type": "TsKeywordType",
"span": {
"start": 1190,
"end": 1196,
"ctxt": 0
},
"kind": "string"
}
]
}
]
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 1214,
"end": 1236,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 1214,
"end": 1235,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 1214,
"end": 1217,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 1218,
"end": 1225,
"ctxt": 0
},
"value": "hello",
"raw": "\"hello\""
}
},
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 1227,
"end": 1234,
"ctxt": 0
},
"value": "world",
"raw": "\"world\""
}
}
],
"typeArguments": null
}
},
{
"type": "TsEnumDeclaration",
"span": {
"start": 1238,
"end": 1253,
"ctxt": 0
},
"declare": false,
"isConst": false,
"id": {
"type": "Identifier",
"span": {
"start": 1243,
"end": 1244,
"ctxt": 0
},
"value": "E",
"optional": false
},
"members": [
{
"type": "TsEnumMember",
"span": {
"start": 1247,
"end": 1248,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1247,
"end": 1248,
"ctxt": 0
},
"value": "a",
"optional": false
},
"init": null
},
{
"type": "TsEnumMember",
"span": {
"start": 1250,
"end": 1251,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1250,
"end": 1251,
"ctxt": 0
},
"value": "b",
"optional": false
},
"init": null
}
]
},
{
"type": "TsEnumDeclaration",
"span": {
"start": 1254,
"end": 1276,
"ctxt": 0
},
"declare": false,
"isConst": true,
"id": {
"type": "Identifier",
"span": {
"start": 1265,
"end": 1267,
"ctxt": 0
},
"value": "E1",
"optional": false
},
"members": [
{
"type": "TsEnumMember",
"span": {
"start": 1270,
"end": 1271,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1270,
"end": 1271,
"ctxt": 0
},
"value": "a",
"optional": false
},
"init": null
},
{
"type": "TsEnumMember",
"span": {
"start": 1273,
"end": 1274,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1273,
"end": 1274,
"ctxt": 0
},
"value": "b",
"optional": false
},
"init": null
}
]
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 1286,
"end": 1290,
"ctxt": 0
},
"value": "foo1",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 1309,
"end": 1318,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "RestElement",
"span": {
"start": 1309,
"end": 1318,
"ctxt": 0
},
"rest": {
"start": 1309,
"end": 1312,
"ctxt": 0
},
"argument": {
"type": "Identifier",
"span": {
"start": 1312,
"end": 1313,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1313,
"end": 1318,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsArrayType",
"span": {
"start": 1315,
"end": 1318,
"ctxt": 0
},
"elemType": {
"type": "TsTypeReference",
"span": {
"start": 1315,
"end": 1316,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1315,
"end": 1316,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
}
}
}
],
"decorators": [],
"span": {
"start": 1277,
"end": 1323,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 1320,
"end": 1323,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 1290,
"end": 1308,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 1291,
"end": 1307,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 1291,
"end": 1292,
"ctxt": 0
},
"value": "T",
"optional": false
},
"in": false,
"out": false,
"constraint": {
"type": "TsTypeReference",
"span": {
"start": 1301,
"end": 1307,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1301,
"end": 1307,
"ctxt": 0
},
"value": "Number",
"optional": false
},
"typeParams": null
},
"default": null
}
]
},
"returnType": null
},
{
"type": "ExpressionStatement",
"span": {
"start": 1324,
"end": 1343,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 1324,
"end": 1342,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 1324,
"end": 1328,
"ctxt": 0
},
"value": "foo1",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 1329,
"end": 1330,
"ctxt": 0
},
"value": 1.0
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 1332,
"end": 1333,
"ctxt": 0
},
"value": 2.0
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 1335,
"end": 1336,
"ctxt": 0
},
"value": 3.0
}
},
{
"spread": null,
"expression": {
"type": "MemberExpression",
"span": {
"start": 1338,
"end": 1341,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 1338,
"end": 1339,
"ctxt": 0
},
"value": "E",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 1340,
"end": 1341,
"ctxt": 0
},
"value": "a",
"optional": false
}
}
}
],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 1344,
"end": 1369,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 1344,
"end": 1368,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 1344,
"end": 1348,
"ctxt": 0
},
"value": "foo1",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 1349,
"end": 1350,
"ctxt": 0
},
"value": 1.0
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 1352,
"end": 1353,
"ctxt": 0
},
"value": 2.0
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 1355,
"end": 1356,
"ctxt": 0
},
"value": 3.0
}
},
{
"spread": null,
"expression": {
"type": "MemberExpression",
"span": {
"start": 1358,
"end": 1362,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 1358,
"end": 1360,
"ctxt": 0
},
"value": "E1",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 1361,
"end": 1362,
"ctxt": 0
},
"value": "a",
"optional": false
}
}
},
{
"spread": null,
"expression": {
"type": "MemberExpression",
"span": {
"start": 1364,
"end": 1367,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 1364,
"end": 1365,
"ctxt": 0
},
"value": "E",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 1366,
"end": 1367,
"ctxt": 0
},
"value": "b",
"optional": false
}
}
}
],
"typeArguments": null
}
}
],
"interpreter": null
}