swc/crates/swc_ecma_parser/tests/tsc/destructuringParameterDeclaration3ES6.json
2022-03-22 07:54:08 +00:00

2697 lines
65 KiB
JSON

{
"type": "Script",
"span": {
"start": 221,
"end": 1340,
"ctxt": 0
},
"body": [
{
"type": "TsTypeAliasDeclaration",
"span": {
"start": 221,
"end": 253,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
"start": 226,
"end": 237,
"ctxt": 0
},
"value": "arrayString",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 240,
"end": 253,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 240,
"end": 245,
"ctxt": 0
},
"value": "Array",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 245,
"end": 253,
"ctxt": 0
},
"params": [
{
"type": "TsTypeReference",
"span": {
"start": 246,
"end": 252,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 246,
"end": 252,
"ctxt": 0
},
"value": "String",
"optional": false
},
"typeParams": null
}
]
}
}
},
{
"type": "TsTypeAliasDeclaration",
"span": {
"start": 254,
"end": 296,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
"start": 259,
"end": 268,
"ctxt": 0
},
"value": "someArray",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsUnionType",
"span": {
"start": 271,
"end": 295,
"ctxt": 0
},
"types": [
{
"type": "TsTypeReference",
"span": {
"start": 271,
"end": 284,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 271,
"end": 276,
"ctxt": 0
},
"value": "Array",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 276,
"end": 284,
"ctxt": 0
},
"params": [
{
"type": "TsTypeReference",
"span": {
"start": 277,
"end": 283,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 277,
"end": 283,
"ctxt": 0
},
"value": "String",
"optional": false
},
"typeParams": null
}
]
}
},
{
"type": "TsArrayType",
"span": {
"start": 287,
"end": 295,
"ctxt": 0
},
"elemType": {
"type": "TsKeywordType",
"span": {
"start": 287,
"end": 293,
"ctxt": 0
},
"kind": "number"
}
}
]
}
},
{
"type": "TsTypeAliasDeclaration",
"span": {
"start": 297,
"end": 342,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
"start": 302,
"end": 318,
"ctxt": 0
},
"value": "stringOrNumArray",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 321,
"end": 341,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 321,
"end": 326,
"ctxt": 0
},
"value": "Array",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 326,
"end": 341,
"ctxt": 0
},
"params": [
{
"type": "TsUnionType",
"span": {
"start": 327,
"end": 340,
"ctxt": 0
},
"types": [
{
"type": "TsTypeReference",
"span": {
"start": 327,
"end": 333,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 327,
"end": 333,
"ctxt": 0
},
"value": "String",
"optional": false
},
"typeParams": null
},
{
"type": "TsTypeReference",
"span": {
"start": 334,
"end": 340,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 334,
"end": 340,
"ctxt": 0
},
"value": "Number",
"optional": false
},
"typeParams": null
}
]
}
]
}
}
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 353,
"end": 355,
"ctxt": 0
},
"value": "a1",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 356,
"end": 379,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "RestElement",
"span": {
"start": 356,
"end": 379,
"ctxt": 0
},
"rest": {
"start": 356,
"end": 359,
"ctxt": 0
},
"argument": {
"type": "Identifier",
"span": {
"start": 359,
"end": 360,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 360,
"end": 379,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsArrayType",
"span": {
"start": 362,
"end": 379,
"ctxt": 0
},
"elemType": {
"type": "TsParenthesizedType",
"span": {
"start": 362,
"end": 377,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsUnionType",
"span": {
"start": 363,
"end": 376,
"ctxt": 0
},
"types": [
{
"type": "TsKeywordType",
"span": {
"start": 363,
"end": 369,
"ctxt": 0
},
"kind": "number"
},
{
"type": "TsKeywordType",
"span": {
"start": 370,
"end": 376,
"ctxt": 0
},
"kind": "string"
}
]
}
}
}
}
}
}
],
"decorators": [],
"span": {
"start": 344,
"end": 384,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 381,
"end": 384,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 394,
"end": 396,
"ctxt": 0
},
"value": "a2",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 397,
"end": 401,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "RestElement",
"span": {
"start": 397,
"end": 401,
"ctxt": 0
},
"rest": {
"start": 397,
"end": 400,
"ctxt": 0
},
"argument": {
"type": "Identifier",
"span": {
"start": 400,
"end": 401,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"typeAnnotation": null
}
}
],
"decorators": [],
"span": {
"start": 385,
"end": 406,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 403,
"end": 406,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 416,
"end": 418,
"ctxt": 0
},
"value": "a3",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 419,
"end": 438,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "RestElement",
"span": {
"start": 419,
"end": 438,
"ctxt": 0
},
"rest": {
"start": 419,
"end": 422,
"ctxt": 0
},
"argument": {
"type": "Identifier",
"span": {
"start": 422,
"end": 423,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 423,
"end": 438,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 425,
"end": 438,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 425,
"end": 430,
"ctxt": 0
},
"value": "Array",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 430,
"end": 438,
"ctxt": 0
},
"params": [
{
"type": "TsTypeReference",
"span": {
"start": 431,
"end": 437,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 431,
"end": 437,
"ctxt": 0
},
"value": "String",
"optional": false
},
"typeParams": null
}
]
}
}
}
}
}
],
"decorators": [],
"span": {
"start": 407,
"end": 443,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 440,
"end": 443,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 453,
"end": 455,
"ctxt": 0
},
"value": "a4",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 456,
"end": 473,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "RestElement",
"span": {
"start": 456,
"end": 473,
"ctxt": 0
},
"rest": {
"start": 456,
"end": 459,
"ctxt": 0
},
"argument": {
"type": "Identifier",
"span": {
"start": 459,
"end": 460,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 460,
"end": 473,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 462,
"end": 473,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 462,
"end": 473,
"ctxt": 0
},
"value": "arrayString",
"optional": false
},
"typeParams": null
}
}
}
}
],
"decorators": [],
"span": {
"start": 444,
"end": 478,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 475,
"end": 478,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 488,
"end": 490,
"ctxt": 0
},
"value": "a5",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 491,
"end": 513,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "RestElement",
"span": {
"start": 491,
"end": 513,
"ctxt": 0
},
"rest": {
"start": 491,
"end": 494,
"ctxt": 0
},
"argument": {
"type": "Identifier",
"span": {
"start": 494,
"end": 495,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 495,
"end": 513,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 497,
"end": 513,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 497,
"end": 513,
"ctxt": 0
},
"value": "stringOrNumArray",
"optional": false
},
"typeParams": null
}
}
}
}
],
"decorators": [],
"span": {
"start": 479,
"end": 518,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 515,
"end": 518,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 528,
"end": 530,
"ctxt": 0
},
"value": "a9",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 531,
"end": 544,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "ArrayPattern",
"span": {
"start": 531,
"end": 544,
"ctxt": 0
},
"elements": [
{
"type": "Identifier",
"span": {
"start": 532,
"end": 533,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
{
"type": "Identifier",
"span": {
"start": 535,
"end": 536,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
},
{
"type": "ArrayPattern",
"span": {
"start": 538,
"end": 543,
"ctxt": 0
},
"elements": [
{
"type": "ArrayPattern",
"span": {
"start": 539,
"end": 542,
"ctxt": 0
},
"elements": [
{
"type": "Identifier",
"span": {
"start": 540,
"end": 541,
"ctxt": 0
},
"value": "c",
"optional": false,
"typeAnnotation": null
}
],
"optional": false,
"typeAnnotation": null
}
],
"optional": false,
"typeAnnotation": null
}
],
"optional": false,
"typeAnnotation": null
}
}
],
"decorators": [],
"span": {
"start": 519,
"end": 549,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 546,
"end": 549,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 559,
"end": 562,
"ctxt": 0
},
"value": "a10",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 563,
"end": 582,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "ArrayPattern",
"span": {
"start": 563,
"end": 582,
"ctxt": 0
},
"elements": [
{
"type": "Identifier",
"span": {
"start": 564,
"end": 565,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
{
"type": "Identifier",
"span": {
"start": 567,
"end": 568,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
},
{
"type": "ArrayPattern",
"span": {
"start": 570,
"end": 575,
"ctxt": 0
},
"elements": [
{
"type": "ArrayPattern",
"span": {
"start": 571,
"end": 574,
"ctxt": 0
},
"elements": [
{
"type": "Identifier",
"span": {
"start": 572,
"end": 573,
"ctxt": 0
},
"value": "c",
"optional": false,
"typeAnnotation": null
}
],
"optional": false,
"typeAnnotation": null
}
],
"optional": false,
"typeAnnotation": null
},
{
"type": "RestElement",
"span": {
"start": 577,
"end": 581,
"ctxt": 0
},
"rest": {
"start": 577,
"end": 580,
"ctxt": 0
},
"argument": {
"type": "Identifier",
"span": {
"start": 580,
"end": 581,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"typeAnnotation": null
}
],
"optional": false,
"typeAnnotation": null
}
}
],
"decorators": [],
"span": {
"start": 550,
"end": 587,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 584,
"end": 587,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 597,
"end": 600,
"ctxt": 0
},
"value": "a11",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 601,
"end": 626,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "ArrayPattern",
"span": {
"start": 601,
"end": 626,
"ctxt": 0
},
"elements": [
{
"type": "Identifier",
"span": {
"start": 602,
"end": 603,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
{
"type": "Identifier",
"span": {
"start": 605,
"end": 606,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
},
{
"type": "Identifier",
"span": {
"start": 608,
"end": 609,
"ctxt": 0
},
"value": "c",
"optional": false,
"typeAnnotation": null
},
{
"type": "RestElement",
"span": {
"start": 611,
"end": 615,
"ctxt": 0
},
"rest": {
"start": 611,
"end": 614,
"ctxt": 0
},
"argument": {
"type": "Identifier",
"span": {
"start": 614,
"end": 615,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"typeAnnotation": null
}
],
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 616,
"end": 626,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsArrayType",
"span": {
"start": 618,
"end": 626,
"ctxt": 0
},
"elemType": {
"type": "TsKeywordType",
"span": {
"start": 618,
"end": 624,
"ctxt": 0
},
"kind": "number"
}
}
}
}
}
],
"decorators": [],
"span": {
"start": 588,
"end": 631,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 628,
"end": 631,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "VariableDeclaration",
"span": {
"start": 634,
"end": 656,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 638,
"end": 655,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 638,
"end": 643,
"ctxt": 0
},
"value": "array",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ArrayExpression",
"span": {
"start": 646,
"end": 655,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 647,
"end": 648,
"ctxt": 0
},
"value": 1.0
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 650,
"end": 651,
"ctxt": 0
},
"value": 2.0
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 653,
"end": 654,
"ctxt": 0
},
"value": 3.0
}
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 657,
"end": 693,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 661,
"end": 692,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 661,
"end": 667,
"ctxt": 0
},
"value": "array2",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ArrayExpression",
"span": {
"start": 670,
"end": 692,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "BooleanLiteral",
"span": {
"start": 671,
"end": 675,
"ctxt": 0
},
"value": true
}
},
{
"spread": null,
"expression": {
"type": "BooleanLiteral",
"span": {
"start": 677,
"end": 682,
"ctxt": 0
},
"value": false
}
},
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 684,
"end": 691,
"ctxt": 0
},
"value": "hello",
"raw": "\"hello\""
}
}
]
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 694,
"end": 709,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 694,
"end": 708,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 694,
"end": 696,
"ctxt": 0
},
"value": "a2",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "ArrayExpression",
"span": {
"start": 697,
"end": 707,
"ctxt": 0
},
"elements": [
{
"spread": {
"start": 698,
"end": 701,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 701,
"end": 706,
"ctxt": 0
},
"value": "array",
"optional": false
}
}
]
}
}
],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 710,
"end": 723,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 710,
"end": 722,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 710,
"end": 712,
"ctxt": 0
},
"value": "a1",
"optional": false
},
"arguments": [
{
"spread": {
"start": 713,
"end": 716,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 716,
"end": 721,
"ctxt": 0
},
"value": "array",
"optional": false
}
}
],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 725,
"end": 763,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 725,
"end": 762,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 725,
"end": 727,
"ctxt": 0
},
"value": "a9",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "ArrayExpression",
"span": {
"start": 728,
"end": 761,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 729,
"end": 730,
"ctxt": 0
},
"value": 1.0
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 732,
"end": 733,
"ctxt": 0
},
"value": 2.0
}
},
{
"spread": null,
"expression": {
"type": "ArrayExpression",
"span": {
"start": 735,
"end": 747,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "ArrayExpression",
"span": {
"start": 736,
"end": 746,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 737,
"end": 745,
"ctxt": 0
},
"value": "string",
"raw": "\"string\""
}
}
]
}
}
]
}
},
{
"spread": null,
"expression": {
"type": "BooleanLiteral",
"span": {
"start": 749,
"end": 754,
"ctxt": 0
},
"value": false
}
},
{
"spread": null,
"expression": {
"type": "BooleanLiteral",
"span": {
"start": 756,
"end": 760,
"ctxt": 0
},
"value": true
}
}
]
}
}
],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 808,
"end": 847,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 808,
"end": 846,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 808,
"end": 811,
"ctxt": 0
},
"value": "a10",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "ArrayExpression",
"span": {
"start": 812,
"end": 845,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 813,
"end": 814,
"ctxt": 0
},
"value": 1.0
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 816,
"end": 817,
"ctxt": 0
},
"value": 2.0
}
},
{
"spread": null,
"expression": {
"type": "ArrayExpression",
"span": {
"start": 819,
"end": 831,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "ArrayExpression",
"span": {
"start": 820,
"end": 830,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 821,
"end": 829,
"ctxt": 0
},
"value": "string",
"raw": "\"string\""
}
}
]
}
}
]
}
},
{
"spread": null,
"expression": {
"type": "BooleanLiteral",
"span": {
"start": 833,
"end": 838,
"ctxt": 0
},
"value": false
}
},
{
"spread": null,
"expression": {
"type": "BooleanLiteral",
"span": {
"start": 840,
"end": 844,
"ctxt": 0
},
"value": true
}
}
]
}
}
],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 877,
"end": 905,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 877,
"end": 904,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 877,
"end": 880,
"ctxt": 0
},
"value": "a10",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "ArrayExpression",
"span": {
"start": 881,
"end": 903,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 882,
"end": 883,
"ctxt": 0
},
"value": 1.0
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 885,
"end": 886,
"ctxt": 0
},
"value": 2.0
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 888,
"end": 889,
"ctxt": 0
},
"value": 3.0
}
},
{
"spread": null,
"expression": {
"type": "BooleanLiteral",
"span": {
"start": 891,
"end": 896,
"ctxt": 0
},
"value": false
}
},
{
"spread": null,
"expression": {
"type": "BooleanLiteral",
"span": {
"start": 898,
"end": 902,
"ctxt": 0
},
"value": true
}
}
]
}
}
],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 946,
"end": 958,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 946,
"end": 957,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 946,
"end": 949,
"ctxt": 0
},
"value": "a10",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "ArrayExpression",
"span": {
"start": 950,
"end": 956,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 951,
"end": 952,
"ctxt": 0
},
"value": 1.0
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 954,
"end": 955,
"ctxt": 0
},
"value": 2.0
}
}
]
}
}
],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 1015,
"end": 1027,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 1015,
"end": 1026,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 1015,
"end": 1018,
"ctxt": 0
},
"value": "a11",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "ArrayExpression",
"span": {
"start": 1019,
"end": 1025,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 1020,
"end": 1021,
"ctxt": 0
},
"value": 1.0
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 1023,
"end": 1024,
"ctxt": 0
},
"value": 2.0
}
}
]
}
}
],
"typeArguments": null
}
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 1128,
"end": 1131,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 1135,
"end": 1144,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "RestElement",
"span": {
"start": 1135,
"end": 1144,
"ctxt": 0
},
"rest": {
"start": 1135,
"end": 1138,
"ctxt": 0
},
"argument": {
"type": "Identifier",
"span": {
"start": 1138,
"end": 1139,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1139,
"end": 1144,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsArrayType",
"span": {
"start": 1141,
"end": 1144,
"ctxt": 0
},
"elemType": {
"type": "TsTypeReference",
"span": {
"start": 1141,
"end": 1142,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1141,
"end": 1142,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
}
}
}
],
"decorators": [],
"span": {
"start": 1119,
"end": 1149,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 1146,
"end": 1149,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 1131,
"end": 1134,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 1132,
"end": 1133,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 1132,
"end": 1133,
"ctxt": 0
},
"value": "T",
"optional": false
},
"constraint": null,
"default": null
}
]
},
"returnType": null
},
{
"type": "ExpressionStatement",
"span": {
"start": 1150,
"end": 1184,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 1150,
"end": 1183,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 1150,
"end": 1153,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 1169,
"end": 1176,
"ctxt": 0
},
"value": "hello",
"raw": "\"hello\""
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 1178,
"end": 1179,
"ctxt": 0
},
"value": 1.0
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 1181,
"end": 1182,
"ctxt": 0
},
"value": 2.0
}
}
],
"typeArguments": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 1153,
"end": 1168,
"ctxt": 0
},
"params": [
{
"type": "TsUnionType",
"span": {
"start": 1154,
"end": 1167,
"ctxt": 0
},
"types": [
{
"type": "TsKeywordType",
"span": {
"start": 1154,
"end": 1160,
"ctxt": 0
},
"kind": "number"
},
{
"type": "TsKeywordType",
"span": {
"start": 1161,
"end": 1167,
"ctxt": 0
},
"kind": "string"
}
]
}
]
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 1185,
"end": 1207,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 1185,
"end": 1206,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 1185,
"end": 1188,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 1189,
"end": 1196,
"ctxt": 0
},
"value": "hello",
"raw": "\"hello\""
}
},
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 1198,
"end": 1205,
"ctxt": 0
},
"value": "world",
"raw": "\"world\""
}
}
],
"typeArguments": null
}
},
{
"type": "TsEnumDeclaration",
"span": {
"start": 1209,
"end": 1224,
"ctxt": 0
},
"declare": false,
"isConst": false,
"id": {
"type": "Identifier",
"span": {
"start": 1214,
"end": 1215,
"ctxt": 0
},
"value": "E",
"optional": false
},
"members": [
{
"type": "TsEnumMember",
"span": {
"start": 1218,
"end": 1219,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1218,
"end": 1219,
"ctxt": 0
},
"value": "a",
"optional": false
},
"init": null
},
{
"type": "TsEnumMember",
"span": {
"start": 1221,
"end": 1222,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1221,
"end": 1222,
"ctxt": 0
},
"value": "b",
"optional": false
},
"init": null
}
]
},
{
"type": "TsEnumDeclaration",
"span": {
"start": 1225,
"end": 1247,
"ctxt": 0
},
"declare": false,
"isConst": true,
"id": {
"type": "Identifier",
"span": {
"start": 1236,
"end": 1238,
"ctxt": 0
},
"value": "E1",
"optional": false
},
"members": [
{
"type": "TsEnumMember",
"span": {
"start": 1241,
"end": 1242,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1241,
"end": 1242,
"ctxt": 0
},
"value": "a",
"optional": false
},
"init": null
},
{
"type": "TsEnumMember",
"span": {
"start": 1244,
"end": 1245,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1244,
"end": 1245,
"ctxt": 0
},
"value": "b",
"optional": false
},
"init": null
}
]
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 1257,
"end": 1261,
"ctxt": 0
},
"value": "foo1",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 1280,
"end": 1289,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "RestElement",
"span": {
"start": 1280,
"end": 1289,
"ctxt": 0
},
"rest": {
"start": 1280,
"end": 1283,
"ctxt": 0
},
"argument": {
"type": "Identifier",
"span": {
"start": 1283,
"end": 1284,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1284,
"end": 1289,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsArrayType",
"span": {
"start": 1286,
"end": 1289,
"ctxt": 0
},
"elemType": {
"type": "TsTypeReference",
"span": {
"start": 1286,
"end": 1287,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1286,
"end": 1287,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
}
}
}
],
"decorators": [],
"span": {
"start": 1248,
"end": 1294,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 1291,
"end": 1294,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 1261,
"end": 1279,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 1262,
"end": 1278,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 1262,
"end": 1263,
"ctxt": 0
},
"value": "T",
"optional": false
},
"constraint": {
"type": "TsTypeReference",
"span": {
"start": 1272,
"end": 1278,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1272,
"end": 1278,
"ctxt": 0
},
"value": "Number",
"optional": false
},
"typeParams": null
},
"default": null
}
]
},
"returnType": null
},
{
"type": "ExpressionStatement",
"span": {
"start": 1295,
"end": 1314,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 1295,
"end": 1313,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 1295,
"end": 1299,
"ctxt": 0
},
"value": "foo1",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 1300,
"end": 1301,
"ctxt": 0
},
"value": 1.0
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 1303,
"end": 1304,
"ctxt": 0
},
"value": 2.0
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 1306,
"end": 1307,
"ctxt": 0
},
"value": 3.0
}
},
{
"spread": null,
"expression": {
"type": "MemberExpression",
"span": {
"start": 1309,
"end": 1312,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 1309,
"end": 1310,
"ctxt": 0
},
"value": "E",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 1311,
"end": 1312,
"ctxt": 0
},
"value": "a",
"optional": false
}
}
}
],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 1315,
"end": 1340,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 1315,
"end": 1339,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 1315,
"end": 1319,
"ctxt": 0
},
"value": "foo1",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 1320,
"end": 1321,
"ctxt": 0
},
"value": 1.0
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 1323,
"end": 1324,
"ctxt": 0
},
"value": 2.0
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 1326,
"end": 1327,
"ctxt": 0
},
"value": 3.0
}
},
{
"spread": null,
"expression": {
"type": "MemberExpression",
"span": {
"start": 1329,
"end": 1333,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 1329,
"end": 1331,
"ctxt": 0
},
"value": "E1",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 1332,
"end": 1333,
"ctxt": 0
},
"value": "a",
"optional": false
}
}
},
{
"spread": null,
"expression": {
"type": "MemberExpression",
"span": {
"start": 1335,
"end": 1338,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 1335,
"end": 1336,
"ctxt": 0
},
"value": "E",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 1337,
"end": 1338,
"ctxt": 0
},
"value": "b",
"optional": false
}
}
}
],
"typeArguments": null
}
}
],
"interpreter": null
}