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

3590 lines
89 KiB
JSON
Raw Normal View History

{
"type": "Module",
"span": {
"start": 24,
"end": 1886,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 24,
"end": 78,
"ctxt": 0
},
"declaration": {
"type": "TsTypeAliasDeclaration",
"span": {
"start": 31,
"end": 78,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
"start": 36,
"end": 43,
"ctxt": 0
},
"value": "Segment",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsTupleType",
"span": {
"start": 46,
"end": 77,
"ctxt": 0
},
"elemTypes": [
{
"type": "TsTupleElement",
"span": {
"start": 47,
"end": 61,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 47,
"end": 53,
"ctxt": 0
},
"value": "length",
"optional": false,
"typeAnnotation": null
},
"ty": {
"type": "TsKeywordType",
"span": {
"start": 55,
"end": 61,
"ctxt": 0
},
"kind": "number"
}
},
{
"type": "TsTupleElement",
"span": {
"start": 63,
"end": 76,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 63,
"end": 68,
"ctxt": 0
},
"value": "count",
"optional": false,
"typeAnnotation": null
},
"ty": {
"type": "TsKeywordType",
"span": {
"start": 70,
"end": 76,
"ctxt": 0
},
"kind": "number"
}
}
]
}
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 80,
"end": 274,
"ctxt": 0
},
"declaration": {
"type": "TsTypeAliasDeclaration",
"span": {
"start": 87,
"end": 274,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
"start": 92,
"end": 108,
"ctxt": 0
},
"value": "SegmentAnnotated",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsTupleType",
"span": {
"start": 111,
"end": 273,
"ctxt": 0
},
"elemTypes": [
{
"type": "TsTupleElement",
"span": {
"start": 180,
"end": 194,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 180,
"end": 186,
"ctxt": 0
},
"value": "length",
"optional": false,
"typeAnnotation": null
},
"ty": {
"type": "TsKeywordType",
"span": {
"start": 188,
"end": 194,
"ctxt": 0
},
"kind": "number"
}
},
{
"type": "TsTupleElement",
"span": {
"start": 258,
"end": 271,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 258,
"end": 263,
"ctxt": 0
},
"value": "count",
"optional": false,
"typeAnnotation": null
},
"ty": {
"type": "TsKeywordType",
"span": {
"start": 265,
"end": 271,
"ctxt": 0
},
"kind": "number"
}
}
]
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 276,
"end": 299,
"ctxt": 0
},
"kind": "var",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 288,
"end": 298,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 288,
"end": 289,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 289,
"end": 298,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 291,
"end": 298,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 291,
"end": 298,
"ctxt": 0
},
"value": "Segment",
"optional": false
},
"typeParams": null
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 300,
"end": 332,
"ctxt": 0
},
"kind": "var",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 312,
"end": 331,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 312,
"end": 313,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 313,
"end": 331,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 315,
"end": 331,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 315,
"end": 331,
"ctxt": 0
},
"value": "SegmentAnnotated",
"optional": false
},
"typeParams": null
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 333,
"end": 365,
"ctxt": 0
},
"kind": "var",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 345,
"end": 364,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 345,
"end": 346,
"ctxt": 0
},
"value": "c",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 346,
"end": 364,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTupleType",
"span": {
"start": 348,
"end": 364,
"ctxt": 0
},
"elemTypes": [
{
"type": "TsTupleElement",
"span": {
"start": 349,
"end": 355,
"ctxt": 0
},
"label": null,
"ty": {
"type": "TsKeywordType",
"span": {
"start": 349,
"end": 355,
"ctxt": 0
},
"kind": "number"
}
},
{
"type": "TsTupleElement",
"span": {
"start": 357,
"end": 363,
"ctxt": 0
},
"label": null,
"ty": {
"type": "TsKeywordType",
"span": {
"start": 357,
"end": 363,
"ctxt": 0
},
"kind": "number"
}
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 366,
"end": 404,
"ctxt": 0
},
"kind": "var",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 378,
"end": 403,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 378,
"end": 379,
"ctxt": 0
},
"value": "d",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 379,
"end": 403,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTupleType",
"span": {
"start": 381,
"end": 403,
"ctxt": 0
},
"elemTypes": [
{
"type": "TsTupleElement",
"span": {
"start": 382,
"end": 391,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 382,
"end": 383,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"ty": {
"type": "TsKeywordType",
"span": {
"start": 385,
"end": 391,
"ctxt": 0
},
"kind": "number"
}
},
{
"type": "TsTupleElement",
"span": {
"start": 393,
"end": 402,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 393,
"end": 394,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
},
"ty": {
"type": "TsKeywordType",
"span": {
"start": 396,
"end": 402,
"ctxt": 0
},
"kind": "number"
}
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 406,
"end": 412,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 406,
"end": 411,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 406,
"end": 407,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 410,
"end": 411,
"ctxt": 0
},
"value": "b",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 413,
"end": 419,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 413,
"end": 418,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 413,
"end": 414,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 417,
"end": 418,
"ctxt": 0
},
"value": "c",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 420,
"end": 426,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 420,
"end": 425,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 420,
"end": 421,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 424,
"end": 425,
"ctxt": 0
},
"value": "d",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 428,
"end": 434,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 428,
"end": 433,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 428,
"end": 429,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 432,
"end": 433,
"ctxt": 0
},
"value": "a",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 435,
"end": 441,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 435,
"end": 440,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 435,
"end": 436,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 439,
"end": 440,
"ctxt": 0
},
"value": "c",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 442,
"end": 448,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 442,
"end": 447,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 442,
"end": 443,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 446,
"end": 447,
"ctxt": 0
},
"value": "d",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 450,
"end": 456,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 450,
"end": 455,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 450,
"end": 451,
"ctxt": 0
},
"value": "c",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 454,
"end": 455,
"ctxt": 0
},
"value": "a",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 457,
"end": 463,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 457,
"end": 462,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 457,
"end": 458,
"ctxt": 0
},
"value": "c",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 461,
"end": 462,
"ctxt": 0
},
"value": "b",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 464,
"end": 470,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 464,
"end": 469,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 464,
"end": 465,
"ctxt": 0
},
"value": "c",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 468,
"end": 469,
"ctxt": 0
},
"value": "d",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 472,
"end": 478,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 472,
"end": 477,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 472,
"end": 473,
"ctxt": 0
},
"value": "d",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 476,
"end": 477,
"ctxt": 0
},
"value": "a",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 479,
"end": 485,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 479,
"end": 484,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 479,
"end": 480,
"ctxt": 0
},
"value": "d",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 483,
"end": 484,
"ctxt": 0
},
"value": "b",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 486,
"end": 492,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 486,
"end": 491,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 486,
"end": 487,
"ctxt": 0
},
"value": "d",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 490,
"end": 491,
"ctxt": 0
},
"value": "c",
"optional": false
}
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 494,
"end": 575,
"ctxt": 0
},
"declaration": {
"type": "TsTypeAliasDeclaration",
"span": {
"start": 501,
"end": 575,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
"start": 506,
"end": 520,
"ctxt": 0
},
"value": "WithOptAndRest",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsTupleType",
"span": {
"start": 523,
"end": 574,
"ctxt": 0
},
"elemTypes": [
{
"type": "TsTupleElement",
"span": {
"start": 524,
"end": 537,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 524,
"end": 529,
"ctxt": 0
},
"value": "first",
"optional": false,
"typeAnnotation": null
},
"ty": {
"type": "TsKeywordType",
"span": {
"start": 531,
"end": 537,
"ctxt": 0
},
"kind": "number"
}
},
{
"type": "TsTupleElement",
"span": {
"start": 539,
"end": 554,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 539,
"end": 546,
"ctxt": 0
},
"value": "second",
"optional": true,
"typeAnnotation": null
},
"ty": {
"type": "TsKeywordType",
"span": {
"start": 548,
"end": 554,
"ctxt": 0
},
"kind": "number"
}
},
{
"type": "TsTupleElement",
"span": {
"start": 556,
"end": 573,
"ctxt": 0
},
"label": {
"type": "RestElement",
"span": {
"start": 556,
"end": 564,
"ctxt": 0
},
"rest": {
"start": 556,
"end": 559,
"ctxt": 0
},
"argument": {
"type": "Identifier",
"span": {
"start": 559,
"end": 563,
"ctxt": 0
},
"value": "rest",
"optional": false,
"typeAnnotation": null
},
"typeAnnotation": null
},
"ty": {
"type": "TsArrayType",
"span": {
"start": 565,
"end": 573,
"ctxt": 0
},
"elemType": {
"type": "TsKeywordType",
"span": {
"start": 565,
"end": 571,
"ctxt": 0
},
"kind": "string"
}
}
}
]
}
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 577,
"end": 631,
"ctxt": 0
},
"declaration": {
"type": "TsTypeAliasDeclaration",
"span": {
"start": 584,
"end": 631,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
"start": 589,
"end": 593,
"ctxt": 0
},
"value": "Func",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 593,
"end": 610,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 594,
"end": 609,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 594,
"end": 595,
"ctxt": 0
},
"value": "T",
"optional": false
},
"in": false,
"out": false,
"constraint": {
"type": "TsArrayType",
"span": {
"start": 604,
"end": 609,
"ctxt": 0
},
"elemType": {
"type": "TsKeywordType",
"span": {
"start": 604,
"end": 607,
"ctxt": 0
},
"kind": "any"
}
},
"default": null
}
]
},
"typeAnnotation": {
"type": "TsFunctionType",
"span": {
"start": 613,
"end": 630,
"ctxt": 0
},
"params": [
{
"type": "RestElement",
"span": {
"start": 614,
"end": 621,
"ctxt": 0
},
"rest": {
"start": 614,
"end": 617,
"ctxt": 0
},
"argument": {
"type": "Identifier",
"span": {
"start": 617,
"end": 618,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 618,
"end": 621,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 620,
"end": 621,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 620,
"end": 621,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
}
],
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 623,
"end": 630,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 626,
"end": 630,
"ctxt": 0
},
"kind": "void"
}
}
}
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 633,
"end": 691,
"ctxt": 0
},
"declaration": {
"type": "VariableDeclaration",
"span": {
"start": 640,
"end": 691,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 646,
"end": 690,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 646,
"end": 650,
"ctxt": 0
},
"value": "func",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "TsAsExpression",
"span": {
"start": 653,
"end": 690,
"ctxt": 0
},
"expression": {
"type": "TsAsExpression",
"span": {
"start": 653,
"end": 664,
"ctxt": 0
},
"expression": {
"type": "NullLiteral",
"span": {
"start": 653,
"end": 657,
"ctxt": 0
}
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 661,
"end": 664,
"ctxt": 0
},
"kind": "any"
}
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 668,
"end": 690,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 668,
"end": 672,
"ctxt": 0
},
"value": "Func",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 672,
"end": 690,
"ctxt": 0
},
"params": [
{
"type": "TsTypeReference",
"span": {
"start": 673,
"end": 689,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 673,
"end": 689,
"ctxt": 0
},
"value": "SegmentAnnotated",
"optional": false
},
"typeParams": null
}
]
}
}
},
"definite": false
}
]
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 693,
"end": 793,
"ctxt": 0
},
"declaration": {
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 709,
"end": 717,
"ctxt": 0
},
"value": "useState",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 721,
"end": 731,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 721,
"end": 731,
"ctxt": 0
},
"value": "initial",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 728,
"end": 731,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 730,
"end": 731,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 730,
"end": 731,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
}
}
],
"decorators": [],
"span": {
"start": 700,
"end": 793,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 766,
"end": 793,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 772,
"end": 791,
"ctxt": 0
},
"argument": {
"type": "TsAsExpression",
"span": {
"start": 779,
"end": 790,
"ctxt": 0
},
"expression": {
"type": "NullLiteral",
"span": {
"start": 779,
"end": 783,
"ctxt": 0
}
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 787,
"end": 790,
"ctxt": 0
},
"kind": "any"
}
}
}
]
},
"generator": false,
"async": false,
"typeParameters": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 717,
"end": 720,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 718,
"end": 719,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 718,
"end": 719,
"ctxt": 0
},
"value": "T",
"optional": false
},
"in": false,
"out": false,
"constraint": null,
"default": null
}
]
},
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 732,
"end": 765,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTupleType",
"span": {
"start": 734,
"end": 765,
"ctxt": 0
},
"elemTypes": [
{
"type": "TsTupleElement",
"span": {
"start": 735,
"end": 743,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 735,
"end": 740,
"ctxt": 0
},
"value": "value",
"optional": false,
"typeAnnotation": null
},
"ty": {
"type": "TsTypeReference",
"span": {
"start": 742,
"end": 743,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 742,
"end": 743,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
},
{
"type": "TsTupleElement",
"span": {
"start": 745,
"end": 764,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 745,
"end": 751,
"ctxt": 0
},
"value": "setter",
"optional": false,
"typeAnnotation": null
},
"ty": {
"type": "TsFunctionType",
"span": {
"start": 753,
"end": 764,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 754,
"end": 755,
"ctxt": 0
},
"value": "T",
"optional": false,
"typeAnnotation": null
}
],
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 757,
"end": 764,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 760,
"end": 764,
"ctxt": 0
},
"kind": "void"
}
}
}
}
]
}
}
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 796,
"end": 856,
"ctxt": 0
},
"declaration": {
"type": "TsTypeAliasDeclaration",
"span": {
"start": 803,
"end": 856,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
"start": 808,
"end": 812,
"ctxt": 0
},
"value": "Iter",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 815,
"end": 855,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 815,
"end": 819,
"ctxt": 0
},
"value": "Func",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 819,
"end": 855,
"ctxt": 0
},
"params": [
{
"type": "TsTupleType",
"span": {
"start": 820,
"end": 854,
"ctxt": 0
},
"elemTypes": [
{
"type": "TsTupleElement",
"span": {
"start": 821,
"end": 833,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 821,
"end": 825,
"ctxt": 0
},
"value": "step",
"optional": false,
"typeAnnotation": null
},
"ty": {
"type": "TsKeywordType",
"span": {
"start": 827,
"end": 833,
"ctxt": 0
},
"kind": "number"
}
},
{
"type": "TsTupleElement",
"span": {
"start": 835,
"end": 853,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 835,
"end": 845,
"ctxt": 0
},
"value": "iterations",
"optional": false,
"typeAnnotation": null
},
"ty": {
"type": "TsKeywordType",
"span": {
"start": 847,
"end": 853,
"ctxt": 0
},
"kind": "number"
}
}
]
}
]
}
}
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 858,
"end": 923,
"ctxt": 0
},
"declaration": {
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 874,
"end": 885,
"ctxt": 0
},
"value": "readSegment",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 886,
"end": 919,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "ArrayPattern",
"span": {
"start": 886,
"end": 919,
"ctxt": 0
},
"elements": [
{
"type": "Identifier",
"span": {
"start": 887,
"end": 893,
"ctxt": 0
},
"value": "length",
"optional": false,
"typeAnnotation": null
},
{
"type": "Identifier",
"span": {
"start": 895,
"end": 900,
"ctxt": 0
},
"value": "count",
"optional": false,
"typeAnnotation": null
}
],
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 901,
"end": 919,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTupleType",
"span": {
"start": 903,
"end": 919,
"ctxt": 0
},
"elemTypes": [
{
"type": "TsTupleElement",
"span": {
"start": 904,
"end": 910,
"ctxt": 0
},
"label": null,
"ty": {
"type": "TsKeywordType",
"span": {
"start": 904,
"end": 910,
"ctxt": 0
},
"kind": "number"
}
},
{
"type": "TsTupleElement",
"span": {
"start": 912,
"end": 918,
"ctxt": 0
},
"label": null,
"ty": {
"type": "TsKeywordType",
"span": {
"start": 912,
"end": 918,
"ctxt": 0
},
"kind": "number"
}
}
]
}
}
}
}
],
"decorators": [],
"span": {
"start": 865,
"end": 923,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 921,
"end": 923,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 1009,
"end": 1077,
"ctxt": 0
},
"declaration": {
"type": "VariableDeclaration",
"span": {
"start": 1016,
"end": 1077,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1022,
"end": 1076,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1022,
"end": 1025,
"ctxt": 0
},
"value": "val",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "TsAsExpression",
"span": {
"start": 1028,
"end": 1076,
"ctxt": 0
},
"expression": {
"type": "TsAsExpression",
"span": {
"start": 1028,
"end": 1039,
"ctxt": 0
},
"expression": {
"type": "NullLiteral",
"span": {
"start": 1028,
"end": 1032,
"ctxt": 0
}
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1036,
"end": 1039,
"ctxt": 0
},
"kind": "any"
}
},
"typeAnnotation": {
"type": "TsIndexedAccessType",
"span": {
"start": 1043,
"end": 1076,
"ctxt": 0
},
"readonly": false,
"objectType": {
"type": "TsTypeReference",
"span": {
"start": 1043,
"end": 1073,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1043,
"end": 1053,
"ctxt": 0
},
"value": "Parameters",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 1053,
"end": 1073,
"ctxt": 0
},
"params": [
{
"type": "TsTypeQuery",
"span": {
"start": 1054,
"end": 1072,
"ctxt": 0
},
"exprName": {
"type": "Identifier",
"span": {
"start": 1061,
"end": 1072,
"ctxt": 0
},
"value": "readSegment",
"optional": false
},
"typeArguments": null
}
]
}
},
"indexType": {
"type": "TsLiteralType",
"span": {
"start": 1074,
"end": 1075,
"ctxt": 0
},
"literal": {
"type": "NumericLiteral",
"span": {
"start": 1074,
"end": 1075,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
}
}
},
"definite": false
}
]
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 1079,
"end": 1150,
"ctxt": 0
},
"declaration": {
"type": "TsTypeAliasDeclaration",
"span": {
"start": 1086,
"end": 1150,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
"start": 1091,
"end": 1106,
"ctxt": 0
},
"value": "RecursiveTupleA",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsTupleType",
"span": {
"start": 1109,
"end": 1149,
"ctxt": 0
},
"elemTypes": [
{
"type": "TsTupleElement",
"span": {
"start": 1110,
"end": 1125,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 1110,
"end": 1117,
"ctxt": 0
},
"value": "initial",
"optional": false,
"typeAnnotation": null
},
"ty": {
"type": "TsKeywordType",
"span": {
"start": 1119,
"end": 1125,
"ctxt": 0
},
"kind": "string"
}
},
{
"type": "TsTupleElement",
"span": {
"start": 1127,
"end": 1148,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 1127,
"end": 1131,
"ctxt": 0
},
"value": "next",
"optional": false,
"typeAnnotation": null
},
"ty": {
"type": "TsTypeReference",
"span": {
"start": 1133,
"end": 1148,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1133,
"end": 1148,
"ctxt": 0
},
"value": "RecursiveTupleA",
"optional": false
},
"typeParams": null
}
}
]
}
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 1152,
"end": 1220,
"ctxt": 0
},
"declaration": {
"type": "TsTypeAliasDeclaration",
"span": {
"start": 1159,
"end": 1220,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
"start": 1164,
"end": 1179,
"ctxt": 0
},
"value": "RecursiveTupleB",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsTupleType",
"span": {
"start": 1182,
"end": 1219,
"ctxt": 0
},
"elemTypes": [
{
"type": "TsTupleElement",
"span": {
"start": 1183,
"end": 1196,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 1183,
"end": 1188,
"ctxt": 0
},
"value": "first",
"optional": false,
"typeAnnotation": null
},
"ty": {
"type": "TsKeywordType",
"span": {
"start": 1190,
"end": 1196,
"ctxt": 0
},
"kind": "string"
}
},
{
"type": "TsTupleElement",
"span": {
"start": 1198,
"end": 1218,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 1198,
"end": 1201,
"ctxt": 0
},
"value": "ptr",
"optional": false,
"typeAnnotation": null
},
"ty": {
"type": "TsTypeReference",
"span": {
"start": 1203,
"end": 1218,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1203,
"end": 1218,
"ctxt": 0
},
"value": "RecursiveTupleB",
"optional": false
},
"typeParams": null
}
}
]
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 1222,
"end": 1253,
"ctxt": 0
},
"kind": "var",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1234,
"end": 1252,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1234,
"end": 1235,
"ctxt": 0
},
"value": "q",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1235,
"end": 1252,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 1237,
"end": 1252,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1237,
"end": 1252,
"ctxt": 0
},
"value": "RecursiveTupleA",
"optional": false
},
"typeParams": null
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 1254,
"end": 1285,
"ctxt": 0
},
"kind": "var",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1266,
"end": 1284,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1266,
"end": 1267,
"ctxt": 0
},
"value": "r",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1267,
"end": 1284,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 1269,
"end": 1284,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1269,
"end": 1284,
"ctxt": 0
},
"value": "RecursiveTupleB",
"optional": false
},
"typeParams": null
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 1287,
"end": 1293,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 1287,
"end": 1292,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 1287,
"end": 1288,
"ctxt": 0
},
"value": "q",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 1291,
"end": 1292,
"ctxt": 0
},
"value": "r",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 1294,
"end": 1300,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 1294,
"end": 1299,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 1294,
"end": 1295,
"ctxt": 0
},
"value": "r",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 1298,
"end": 1299,
"ctxt": 0
},
"value": "q",
"optional": false
}
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 1302,
"end": 1370,
"ctxt": 0
},
"declaration": {
"type": "TsTypeAliasDeclaration",
"span": {
"start": 1309,
"end": 1370,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
"start": 1314,
"end": 1326,
"ctxt": 0
},
"value": "RecusiveRest",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsTupleType",
"span": {
"start": 1329,
"end": 1369,
"ctxt": 0
},
"elemTypes": [
{
"type": "TsTupleElement",
"span": {
"start": 1330,
"end": 1343,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 1330,
"end": 1335,
"ctxt": 0
},
"value": "first",
"optional": false,
"typeAnnotation": null
},
"ty": {
"type": "TsKeywordType",
"span": {
"start": 1337,
"end": 1343,
"ctxt": 0
},
"kind": "string"
}
},
{
"type": "TsTupleElement",
"span": {
"start": 1345,
"end": 1368,
"ctxt": 0
},
"label": {
"type": "RestElement",
"span": {
"start": 1345,
"end": 1353,
"ctxt": 0
},
"rest": {
"start": 1345,
"end": 1348,
"ctxt": 0
},
"argument": {
"type": "Identifier",
"span": {
"start": 1348,
"end": 1352,
"ctxt": 0
},
"value": "rest",
"optional": false,
"typeAnnotation": null
},
"typeAnnotation": null
},
"ty": {
"type": "TsArrayType",
"span": {
"start": 1354,
"end": 1368,
"ctxt": 0
},
"elemType": {
"type": "TsTypeReference",
"span": {
"start": 1354,
"end": 1366,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1354,
"end": 1366,
"ctxt": 0
},
"value": "RecusiveRest",
"optional": false
},
"typeParams": null
}
}
}
]
}
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 1371,
"end": 1428,
"ctxt": 0
},
"declaration": {
"type": "TsTypeAliasDeclaration",
"span": {
"start": 1378,
"end": 1428,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
"start": 1383,
"end": 1396,
"ctxt": 0
},
"value": "RecusiveRest2",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsTupleType",
"span": {
"start": 1399,
"end": 1427,
"ctxt": 0
},
"elemTypes": [
{
"type": "TsTupleElement",
"span": {
"start": 1400,
"end": 1406,
"ctxt": 0
},
"label": null,
"ty": {
"type": "TsKeywordType",
"span": {
"start": 1400,
"end": 1406,
"ctxt": 0
},
"kind": "string"
}
},
{
"type": "TsTupleElement",
"span": {
"start": 1408,
"end": 1426,
"ctxt": 0
},
"label": null,
"ty": {
"type": "TsRestType",
"span": {
"start": 1408,
"end": 1426,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsArrayType",
"span": {
"start": 1411,
"end": 1426,
"ctxt": 0
},
"elemType": {
"type": "TsTypeReference",
"span": {
"start": 1411,
"end": 1424,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1411,
"end": 1424,
"ctxt": 0
},
"value": "RecusiveRest2",
"optional": false
},
"typeParams": null
}
}
}
}
]
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 1430,
"end": 1458,
"ctxt": 0
},
"kind": "var",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1442,
"end": 1457,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1442,
"end": 1443,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1443,
"end": 1457,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 1445,
"end": 1457,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1445,
"end": 1457,
"ctxt": 0
},
"value": "RecusiveRest",
"optional": false
},
"typeParams": null
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 1459,
"end": 1488,
"ctxt": 0
},
"kind": "var",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1471,
"end": 1487,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1471,
"end": 1472,
"ctxt": 0
},
"value": "y",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1472,
"end": 1487,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 1474,
"end": 1487,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1474,
"end": 1487,
"ctxt": 0
},
"value": "RecusiveRest2",
"optional": false
},
"typeParams": null
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 1490,
"end": 1496,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 1490,
"end": 1495,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 1490,
"end": 1491,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 1494,
"end": 1495,
"ctxt": 0
},
"value": "y",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 1497,
"end": 1503,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 1497,
"end": 1502,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 1497,
"end": 1498,
"ctxt": 0
},
"value": "y",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 1501,
"end": 1502,
"ctxt": 0
},
"value": "x",
"optional": false
}
}
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 1522,
"end": 1523,
"ctxt": 0
},
"value": "f",
"optional": false
},
"declare": true,
"params": [
{
"type": "Parameter",
"span": {
"start": 1541,
"end": 1548,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "RestElement",
"span": {
"start": 1541,
"end": 1548,
"ctxt": 0
},
"rest": {
"start": 1541,
"end": 1544,
"ctxt": 0
},
"argument": {
"type": "Identifier",
"span": {
"start": 1544,
"end": 1545,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1545,
"end": 1548,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 1547,
"end": 1548,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1547,
"end": 1548,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
}
}
],
"decorators": [],
"span": {
"start": 1505,
"end": 1553,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 1523,
"end": 1540,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 1524,
"end": 1539,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 1524,
"end": 1525,
"ctxt": 0
},
"value": "T",
"optional": false
},
"in": false,
"out": false,
"constraint": {
"type": "TsArrayType",
"span": {
"start": 1534,
"end": 1539,
"ctxt": 0
},
"elemType": {
"type": "TsKeywordType",
"span": {
"start": 1534,
"end": 1537,
"ctxt": 0
},
"kind": "any"
}
},
"default": null
}
]
},
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 1549,
"end": 1552,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 1551,
"end": 1552,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1551,
"end": 1552,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 1571,
"end": 1572,
"ctxt": 0
},
"value": "g",
"optional": false
},
"declare": true,
"params": [
{
"type": "Parameter",
"span": {
"start": 1573,
"end": 1585,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 1573,
"end": 1585,
"ctxt": 0
},
"value": "elem",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1577,
"end": 1585,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1579,
"end": 1585,
"ctxt": 0
},
"kind": "object"
}
}
}
},
{
"type": "Parameter",
"span": {
"start": 1587,
"end": 1600,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 1587,
"end": 1600,
"ctxt": 0
},
"value": "index",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1592,
"end": 1600,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1594,
"end": 1600,
"ctxt": 0
},
"kind": "number"
}
}
}
}
],
"decorators": [],
"span": {
"start": 1554,
"end": 1610,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": null,
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 1601,
"end": 1609,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1603,
"end": 1609,
"ctxt": 0
},
"kind": "object"
}
}
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 1628,
"end": 1647,
"ctxt": 0
},
"value": "getArgsForInjection",
"optional": false
},
"declare": true,
"params": [
{
"type": "Parameter",
"span": {
"start": 1683,
"end": 1687,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 1683,
"end": 1687,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1684,
"end": 1687,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 1686,
"end": 1687,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1686,
"end": 1687,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
}
}
],
"decorators": [],
"span": {
"start": 1611,
"end": 1704,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 1647,
"end": 1682,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 1648,
"end": 1681,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 1648,
"end": 1649,
"ctxt": 0
},
"value": "T",
"optional": false
},
"in": false,
"out": false,
"constraint": {
"type": "TsFunctionType",
"span": {
"start": 1658,
"end": 1681,
"ctxt": 0
},
"params": [
{
"type": "RestElement",
"span": {
"start": 1659,
"end": 1673,
"ctxt": 0
},
"rest": {
"start": 1659,
"end": 1662,
"ctxt": 0
},
"argument": {
"type": "Identifier",
"span": {
"start": 1662,
"end": 1666,
"ctxt": 0
},
"value": "args",
"optional": false,
"typeAnnotation": null
},
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1666,
"end": 1673,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsArrayType",
"span": {
"start": 1668,
"end": 1673,
"ctxt": 0
},
"elemType": {
"type": "TsKeywordType",
"span": {
"start": 1668,
"end": 1671,
"ctxt": 0
},
"kind": "any"
}
}
}
}
],
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1675,
"end": 1681,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1678,
"end": 1681,
"ctxt": 0
},
"kind": "any"
}
}
},
"default": null
}
]
},
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 1688,
"end": 1703,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 1690,
"end": 1703,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1690,
"end": 1700,
"ctxt": 0
},
"value": "Parameters",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 1700,
"end": 1703,
"ctxt": 0
},
"params": [
{
"type": "TsTypeReference",
"span": {
"start": 1701,
"end": 1702,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1701,
"end": 1702,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
]
}
}
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 1706,
"end": 1775,
"ctxt": 0
},
"declaration": {
"type": "VariableDeclaration",
"span": {
"start": 1713,
"end": 1775,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1719,
"end": 1774,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1719,
"end": 1746,
"ctxt": 0
},
"value": "argumentsOfGAsFirstArgument",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 1749,
"end": 1774,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 1749,
"end": 1750,
"ctxt": 0
},
"value": "f",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "CallExpression",
"span": {
"start": 1751,
"end": 1773,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 1751,
"end": 1770,
"ctxt": 0
},
"value": "getArgsForInjection",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 1771,
"end": 1772,
"ctxt": 0
},
"value": "g",
"optional": false
}
}
],
"typeArguments": null
}
}
],
"typeArguments": null
},
"definite": false
}
]
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 1829,
"end": 1886,
"ctxt": 0
},
"declaration": {
"type": "VariableDeclaration",
"span": {
"start": 1836,
"end": 1886,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1842,
"end": 1885,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1842,
"end": 1854,
"ctxt": 0
},
"value": "argumentsOfG",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 1857,
"end": 1885,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 1857,
"end": 1858,
"ctxt": 0
},
"value": "f",
"optional": false
},
"arguments": [
{
"spread": {
"start": 1859,
"end": 1862,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 1862,
"end": 1884,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 1862,
"end": 1881,
"ctxt": 0
},
"value": "getArgsForInjection",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 1882,
"end": 1883,
"ctxt": 0
},
"value": "g",
"optional": false
}
}
],
"typeArguments": null
}
}
],
"typeArguments": null
},
"definite": false
}
]
}
}
],
"interpreter": null
}