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

3580 lines
89 KiB
JSON

{
"type": "Module",
"span": {
"start": 23,
"end": 1885,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 23,
"end": 77,
"ctxt": 0
},
"declaration": {
"type": "TsTypeAliasDeclaration",
"span": {
"start": 30,
"end": 77,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
"start": 35,
"end": 42,
"ctxt": 0
},
"value": "Segment",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsTupleType",
"span": {
"start": 45,
"end": 76,
"ctxt": 0
},
"elemTypes": [
{
"type": "TsTupleElement",
"span": {
"start": 46,
"end": 60,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 46,
"end": 52,
"ctxt": 0
},
"value": "length",
"optional": false,
"typeAnnotation": null
},
"ty": {
"type": "TsKeywordType",
"span": {
"start": 54,
"end": 60,
"ctxt": 0
},
"kind": "number"
}
},
{
"type": "TsTupleElement",
"span": {
"start": 62,
"end": 75,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 62,
"end": 67,
"ctxt": 0
},
"value": "count",
"optional": false,
"typeAnnotation": null
},
"ty": {
"type": "TsKeywordType",
"span": {
"start": 69,
"end": 75,
"ctxt": 0
},
"kind": "number"
}
}
]
}
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 79,
"end": 273,
"ctxt": 0
},
"declaration": {
"type": "TsTypeAliasDeclaration",
"span": {
"start": 86,
"end": 273,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
"start": 91,
"end": 107,
"ctxt": 0
},
"value": "SegmentAnnotated",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsTupleType",
"span": {
"start": 110,
"end": 272,
"ctxt": 0
},
"elemTypes": [
{
"type": "TsTupleElement",
"span": {
"start": 179,
"end": 193,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 179,
"end": 185,
"ctxt": 0
},
"value": "length",
"optional": false,
"typeAnnotation": null
},
"ty": {
"type": "TsKeywordType",
"span": {
"start": 187,
"end": 193,
"ctxt": 0
},
"kind": "number"
}
},
{
"type": "TsTupleElement",
"span": {
"start": 257,
"end": 270,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 257,
"end": 262,
"ctxt": 0
},
"value": "count",
"optional": false,
"typeAnnotation": null
},
"ty": {
"type": "TsKeywordType",
"span": {
"start": 264,
"end": 270,
"ctxt": 0
},
"kind": "number"
}
}
]
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 275,
"end": 298,
"ctxt": 0
},
"kind": "var",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 287,
"end": 297,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 287,
"end": 288,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 288,
"end": 297,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 290,
"end": 297,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 290,
"end": 297,
"ctxt": 0
},
"value": "Segment",
"optional": false
},
"typeParams": null
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 299,
"end": 331,
"ctxt": 0
},
"kind": "var",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 311,
"end": 330,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 311,
"end": 312,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 312,
"end": 330,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 314,
"end": 330,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 314,
"end": 330,
"ctxt": 0
},
"value": "SegmentAnnotated",
"optional": false
},
"typeParams": null
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 332,
"end": 364,
"ctxt": 0
},
"kind": "var",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 344,
"end": 363,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 344,
"end": 345,
"ctxt": 0
},
"value": "c",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 345,
"end": 363,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTupleType",
"span": {
"start": 347,
"end": 363,
"ctxt": 0
},
"elemTypes": [
{
"type": "TsTupleElement",
"span": {
"start": 348,
"end": 354,
"ctxt": 0
},
"label": null,
"ty": {
"type": "TsKeywordType",
"span": {
"start": 348,
"end": 354,
"ctxt": 0
},
"kind": "number"
}
},
{
"type": "TsTupleElement",
"span": {
"start": 356,
"end": 362,
"ctxt": 0
},
"label": null,
"ty": {
"type": "TsKeywordType",
"span": {
"start": 356,
"end": 362,
"ctxt": 0
},
"kind": "number"
}
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 365,
"end": 403,
"ctxt": 0
},
"kind": "var",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 377,
"end": 402,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 377,
"end": 378,
"ctxt": 0
},
"value": "d",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 378,
"end": 402,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTupleType",
"span": {
"start": 380,
"end": 402,
"ctxt": 0
},
"elemTypes": [
{
"type": "TsTupleElement",
"span": {
"start": 381,
"end": 390,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 381,
"end": 382,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"ty": {
"type": "TsKeywordType",
"span": {
"start": 384,
"end": 390,
"ctxt": 0
},
"kind": "number"
}
},
{
"type": "TsTupleElement",
"span": {
"start": 392,
"end": 401,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 392,
"end": 393,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
},
"ty": {
"type": "TsKeywordType",
"span": {
"start": 395,
"end": 401,
"ctxt": 0
},
"kind": "number"
}
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 405,
"end": 411,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 405,
"end": 410,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 405,
"end": 406,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 409,
"end": 410,
"ctxt": 0
},
"value": "b",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 412,
"end": 418,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 412,
"end": 417,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 412,
"end": 413,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 416,
"end": 417,
"ctxt": 0
},
"value": "c",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 419,
"end": 425,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 419,
"end": 424,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 419,
"end": 420,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 423,
"end": 424,
"ctxt": 0
},
"value": "d",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 427,
"end": 433,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 427,
"end": 432,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 427,
"end": 428,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 431,
"end": 432,
"ctxt": 0
},
"value": "a",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 434,
"end": 440,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 434,
"end": 439,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 434,
"end": 435,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 438,
"end": 439,
"ctxt": 0
},
"value": "c",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 441,
"end": 447,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 441,
"end": 446,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 441,
"end": 442,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 445,
"end": 446,
"ctxt": 0
},
"value": "d",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 449,
"end": 455,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 449,
"end": 454,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 449,
"end": 450,
"ctxt": 0
},
"value": "c",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 453,
"end": 454,
"ctxt": 0
},
"value": "a",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 456,
"end": 462,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 456,
"end": 461,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 456,
"end": 457,
"ctxt": 0
},
"value": "c",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 460,
"end": 461,
"ctxt": 0
},
"value": "b",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 463,
"end": 469,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 463,
"end": 468,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 463,
"end": 464,
"ctxt": 0
},
"value": "c",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 467,
"end": 468,
"ctxt": 0
},
"value": "d",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 471,
"end": 477,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 471,
"end": 476,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 471,
"end": 472,
"ctxt": 0
},
"value": "d",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 475,
"end": 476,
"ctxt": 0
},
"value": "a",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 478,
"end": 484,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 478,
"end": 483,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 478,
"end": 479,
"ctxt": 0
},
"value": "d",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 482,
"end": 483,
"ctxt": 0
},
"value": "b",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 485,
"end": 491,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 485,
"end": 490,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 485,
"end": 486,
"ctxt": 0
},
"value": "d",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 489,
"end": 490,
"ctxt": 0
},
"value": "c",
"optional": false
}
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 493,
"end": 574,
"ctxt": 0
},
"declaration": {
"type": "TsTypeAliasDeclaration",
"span": {
"start": 500,
"end": 574,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
"start": 505,
"end": 519,
"ctxt": 0
},
"value": "WithOptAndRest",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsTupleType",
"span": {
"start": 522,
"end": 573,
"ctxt": 0
},
"elemTypes": [
{
"type": "TsTupleElement",
"span": {
"start": 523,
"end": 536,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 523,
"end": 528,
"ctxt": 0
},
"value": "first",
"optional": false,
"typeAnnotation": null
},
"ty": {
"type": "TsKeywordType",
"span": {
"start": 530,
"end": 536,
"ctxt": 0
},
"kind": "number"
}
},
{
"type": "TsTupleElement",
"span": {
"start": 538,
"end": 553,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 538,
"end": 545,
"ctxt": 0
},
"value": "second",
"optional": true,
"typeAnnotation": null
},
"ty": {
"type": "TsKeywordType",
"span": {
"start": 547,
"end": 553,
"ctxt": 0
},
"kind": "number"
}
},
{
"type": "TsTupleElement",
"span": {
"start": 555,
"end": 572,
"ctxt": 0
},
"label": {
"type": "RestElement",
"span": {
"start": 555,
"end": 563,
"ctxt": 0
},
"rest": {
"start": 555,
"end": 558,
"ctxt": 0
},
"argument": {
"type": "Identifier",
"span": {
"start": 558,
"end": 562,
"ctxt": 0
},
"value": "rest",
"optional": false,
"typeAnnotation": null
},
"typeAnnotation": null
},
"ty": {
"type": "TsArrayType",
"span": {
"start": 564,
"end": 572,
"ctxt": 0
},
"elemType": {
"type": "TsKeywordType",
"span": {
"start": 564,
"end": 570,
"ctxt": 0
},
"kind": "string"
}
}
}
]
}
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 576,
"end": 630,
"ctxt": 0
},
"declaration": {
"type": "TsTypeAliasDeclaration",
"span": {
"start": 583,
"end": 630,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
"start": 588,
"end": 592,
"ctxt": 0
},
"value": "Func",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 592,
"end": 609,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 593,
"end": 608,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 593,
"end": 594,
"ctxt": 0
},
"value": "T",
"optional": false
},
"constraint": {
"type": "TsArrayType",
"span": {
"start": 603,
"end": 608,
"ctxt": 0
},
"elemType": {
"type": "TsKeywordType",
"span": {
"start": 603,
"end": 606,
"ctxt": 0
},
"kind": "any"
}
},
"default": null
}
]
},
"typeAnnotation": {
"type": "TsFunctionType",
"span": {
"start": 612,
"end": 629,
"ctxt": 0
},
"params": [
{
"type": "RestElement",
"span": {
"start": 613,
"end": 620,
"ctxt": 0
},
"rest": {
"start": 613,
"end": 616,
"ctxt": 0
},
"argument": {
"type": "Identifier",
"span": {
"start": 616,
"end": 617,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 617,
"end": 620,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 619,
"end": 620,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 619,
"end": 620,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
}
],
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 622,
"end": 629,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 625,
"end": 629,
"ctxt": 0
},
"kind": "void"
}
}
}
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 632,
"end": 690,
"ctxt": 0
},
"declaration": {
"type": "VariableDeclaration",
"span": {
"start": 639,
"end": 690,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 645,
"end": 689,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 645,
"end": 649,
"ctxt": 0
},
"value": "func",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "TsAsExpression",
"span": {
"start": 652,
"end": 689,
"ctxt": 0
},
"expression": {
"type": "TsAsExpression",
"span": {
"start": 652,
"end": 663,
"ctxt": 0
},
"expression": {
"type": "NullLiteral",
"span": {
"start": 652,
"end": 656,
"ctxt": 0
}
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 660,
"end": 663,
"ctxt": 0
},
"kind": "any"
}
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 667,
"end": 689,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 667,
"end": 671,
"ctxt": 0
},
"value": "Func",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 671,
"end": 689,
"ctxt": 0
},
"params": [
{
"type": "TsTypeReference",
"span": {
"start": 672,
"end": 688,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 672,
"end": 688,
"ctxt": 0
},
"value": "SegmentAnnotated",
"optional": false
},
"typeParams": null
}
]
}
}
},
"definite": false
}
]
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 692,
"end": 792,
"ctxt": 0
},
"declaration": {
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 708,
"end": 716,
"ctxt": 0
},
"value": "useState",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 720,
"end": 730,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 720,
"end": 730,
"ctxt": 0
},
"value": "initial",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 727,
"end": 730,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 729,
"end": 730,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 729,
"end": 730,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
}
}
],
"decorators": [],
"span": {
"start": 699,
"end": 792,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 765,
"end": 792,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 771,
"end": 790,
"ctxt": 0
},
"argument": {
"type": "TsAsExpression",
"span": {
"start": 778,
"end": 789,
"ctxt": 0
},
"expression": {
"type": "NullLiteral",
"span": {
"start": 778,
"end": 782,
"ctxt": 0
}
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 786,
"end": 789,
"ctxt": 0
},
"kind": "any"
}
}
}
]
},
"generator": false,
"async": false,
"typeParameters": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 716,
"end": 719,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 717,
"end": 718,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 717,
"end": 718,
"ctxt": 0
},
"value": "T",
"optional": false
},
"constraint": null,
"default": null
}
]
},
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 731,
"end": 764,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTupleType",
"span": {
"start": 733,
"end": 764,
"ctxt": 0
},
"elemTypes": [
{
"type": "TsTupleElement",
"span": {
"start": 734,
"end": 742,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 734,
"end": 739,
"ctxt": 0
},
"value": "value",
"optional": false,
"typeAnnotation": null
},
"ty": {
"type": "TsTypeReference",
"span": {
"start": 741,
"end": 742,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 741,
"end": 742,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
},
{
"type": "TsTupleElement",
"span": {
"start": 744,
"end": 763,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 744,
"end": 750,
"ctxt": 0
},
"value": "setter",
"optional": false,
"typeAnnotation": null
},
"ty": {
"type": "TsFunctionType",
"span": {
"start": 752,
"end": 763,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 753,
"end": 754,
"ctxt": 0
},
"value": "T",
"optional": false,
"typeAnnotation": null
}
],
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 756,
"end": 763,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 759,
"end": 763,
"ctxt": 0
},
"kind": "void"
}
}
}
}
]
}
}
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 795,
"end": 855,
"ctxt": 0
},
"declaration": {
"type": "TsTypeAliasDeclaration",
"span": {
"start": 802,
"end": 855,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
"start": 807,
"end": 811,
"ctxt": 0
},
"value": "Iter",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 814,
"end": 854,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 814,
"end": 818,
"ctxt": 0
},
"value": "Func",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 818,
"end": 854,
"ctxt": 0
},
"params": [
{
"type": "TsTupleType",
"span": {
"start": 819,
"end": 853,
"ctxt": 0
},
"elemTypes": [
{
"type": "TsTupleElement",
"span": {
"start": 820,
"end": 832,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 820,
"end": 824,
"ctxt": 0
},
"value": "step",
"optional": false,
"typeAnnotation": null
},
"ty": {
"type": "TsKeywordType",
"span": {
"start": 826,
"end": 832,
"ctxt": 0
},
"kind": "number"
}
},
{
"type": "TsTupleElement",
"span": {
"start": 834,
"end": 852,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 834,
"end": 844,
"ctxt": 0
},
"value": "iterations",
"optional": false,
"typeAnnotation": null
},
"ty": {
"type": "TsKeywordType",
"span": {
"start": 846,
"end": 852,
"ctxt": 0
},
"kind": "number"
}
}
]
}
]
}
}
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 857,
"end": 922,
"ctxt": 0
},
"declaration": {
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 873,
"end": 884,
"ctxt": 0
},
"value": "readSegment",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 885,
"end": 918,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "ArrayPattern",
"span": {
"start": 885,
"end": 918,
"ctxt": 0
},
"elements": [
{
"type": "Identifier",
"span": {
"start": 886,
"end": 892,
"ctxt": 0
},
"value": "length",
"optional": false,
"typeAnnotation": null
},
{
"type": "Identifier",
"span": {
"start": 894,
"end": 899,
"ctxt": 0
},
"value": "count",
"optional": false,
"typeAnnotation": null
}
],
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 900,
"end": 918,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTupleType",
"span": {
"start": 902,
"end": 918,
"ctxt": 0
},
"elemTypes": [
{
"type": "TsTupleElement",
"span": {
"start": 903,
"end": 909,
"ctxt": 0
},
"label": null,
"ty": {
"type": "TsKeywordType",
"span": {
"start": 903,
"end": 909,
"ctxt": 0
},
"kind": "number"
}
},
{
"type": "TsTupleElement",
"span": {
"start": 911,
"end": 917,
"ctxt": 0
},
"label": null,
"ty": {
"type": "TsKeywordType",
"span": {
"start": 911,
"end": 917,
"ctxt": 0
},
"kind": "number"
}
}
]
}
}
}
}
],
"decorators": [],
"span": {
"start": 864,
"end": 922,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 920,
"end": 922,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 1008,
"end": 1076,
"ctxt": 0
},
"declaration": {
"type": "VariableDeclaration",
"span": {
"start": 1015,
"end": 1076,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1021,
"end": 1075,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1021,
"end": 1024,
"ctxt": 0
},
"value": "val",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "TsAsExpression",
"span": {
"start": 1027,
"end": 1075,
"ctxt": 0
},
"expression": {
"type": "TsAsExpression",
"span": {
"start": 1027,
"end": 1038,
"ctxt": 0
},
"expression": {
"type": "NullLiteral",
"span": {
"start": 1027,
"end": 1031,
"ctxt": 0
}
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1035,
"end": 1038,
"ctxt": 0
},
"kind": "any"
}
},
"typeAnnotation": {
"type": "TsIndexedAccessType",
"span": {
"start": 1042,
"end": 1075,
"ctxt": 0
},
"readonly": false,
"objectType": {
"type": "TsTypeReference",
"span": {
"start": 1042,
"end": 1072,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1042,
"end": 1052,
"ctxt": 0
},
"value": "Parameters",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 1052,
"end": 1072,
"ctxt": 0
},
"params": [
{
"type": "TsTypeQuery",
"span": {
"start": 1053,
"end": 1071,
"ctxt": 0
},
"exprName": {
"type": "Identifier",
"span": {
"start": 1060,
"end": 1071,
"ctxt": 0
},
"value": "readSegment",
"optional": false
}
}
]
}
},
"indexType": {
"type": "TsLiteralType",
"span": {
"start": 1073,
"end": 1074,
"ctxt": 0
},
"literal": {
"type": "NumericLiteral",
"span": {
"start": 1073,
"end": 1074,
"ctxt": 0
},
"value": 0.0
}
}
}
},
"definite": false
}
]
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 1078,
"end": 1149,
"ctxt": 0
},
"declaration": {
"type": "TsTypeAliasDeclaration",
"span": {
"start": 1085,
"end": 1149,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
"start": 1090,
"end": 1105,
"ctxt": 0
},
"value": "RecursiveTupleA",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsTupleType",
"span": {
"start": 1108,
"end": 1148,
"ctxt": 0
},
"elemTypes": [
{
"type": "TsTupleElement",
"span": {
"start": 1109,
"end": 1124,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 1109,
"end": 1116,
"ctxt": 0
},
"value": "initial",
"optional": false,
"typeAnnotation": null
},
"ty": {
"type": "TsKeywordType",
"span": {
"start": 1118,
"end": 1124,
"ctxt": 0
},
"kind": "string"
}
},
{
"type": "TsTupleElement",
"span": {
"start": 1126,
"end": 1147,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 1126,
"end": 1130,
"ctxt": 0
},
"value": "next",
"optional": false,
"typeAnnotation": null
},
"ty": {
"type": "TsTypeReference",
"span": {
"start": 1132,
"end": 1147,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1132,
"end": 1147,
"ctxt": 0
},
"value": "RecursiveTupleA",
"optional": false
},
"typeParams": null
}
}
]
}
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 1151,
"end": 1219,
"ctxt": 0
},
"declaration": {
"type": "TsTypeAliasDeclaration",
"span": {
"start": 1158,
"end": 1219,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
"start": 1163,
"end": 1178,
"ctxt": 0
},
"value": "RecursiveTupleB",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsTupleType",
"span": {
"start": 1181,
"end": 1218,
"ctxt": 0
},
"elemTypes": [
{
"type": "TsTupleElement",
"span": {
"start": 1182,
"end": 1195,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 1182,
"end": 1187,
"ctxt": 0
},
"value": "first",
"optional": false,
"typeAnnotation": null
},
"ty": {
"type": "TsKeywordType",
"span": {
"start": 1189,
"end": 1195,
"ctxt": 0
},
"kind": "string"
}
},
{
"type": "TsTupleElement",
"span": {
"start": 1197,
"end": 1217,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 1197,
"end": 1200,
"ctxt": 0
},
"value": "ptr",
"optional": false,
"typeAnnotation": null
},
"ty": {
"type": "TsTypeReference",
"span": {
"start": 1202,
"end": 1217,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1202,
"end": 1217,
"ctxt": 0
},
"value": "RecursiveTupleB",
"optional": false
},
"typeParams": null
}
}
]
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 1221,
"end": 1252,
"ctxt": 0
},
"kind": "var",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1233,
"end": 1251,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1233,
"end": 1234,
"ctxt": 0
},
"value": "q",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1234,
"end": 1251,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 1236,
"end": 1251,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1236,
"end": 1251,
"ctxt": 0
},
"value": "RecursiveTupleA",
"optional": false
},
"typeParams": null
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 1253,
"end": 1284,
"ctxt": 0
},
"kind": "var",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1265,
"end": 1283,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1265,
"end": 1266,
"ctxt": 0
},
"value": "r",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1266,
"end": 1283,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 1268,
"end": 1283,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1268,
"end": 1283,
"ctxt": 0
},
"value": "RecursiveTupleB",
"optional": false
},
"typeParams": null
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 1286,
"end": 1292,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 1286,
"end": 1291,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 1286,
"end": 1287,
"ctxt": 0
},
"value": "q",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 1290,
"end": 1291,
"ctxt": 0
},
"value": "r",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 1293,
"end": 1299,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 1293,
"end": 1298,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 1293,
"end": 1294,
"ctxt": 0
},
"value": "r",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 1297,
"end": 1298,
"ctxt": 0
},
"value": "q",
"optional": false
}
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 1301,
"end": 1369,
"ctxt": 0
},
"declaration": {
"type": "TsTypeAliasDeclaration",
"span": {
"start": 1308,
"end": 1369,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
"start": 1313,
"end": 1325,
"ctxt": 0
},
"value": "RecusiveRest",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsTupleType",
"span": {
"start": 1328,
"end": 1368,
"ctxt": 0
},
"elemTypes": [
{
"type": "TsTupleElement",
"span": {
"start": 1329,
"end": 1342,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 1329,
"end": 1334,
"ctxt": 0
},
"value": "first",
"optional": false,
"typeAnnotation": null
},
"ty": {
"type": "TsKeywordType",
"span": {
"start": 1336,
"end": 1342,
"ctxt": 0
},
"kind": "string"
}
},
{
"type": "TsTupleElement",
"span": {
"start": 1344,
"end": 1367,
"ctxt": 0
},
"label": {
"type": "RestElement",
"span": {
"start": 1344,
"end": 1352,
"ctxt": 0
},
"rest": {
"start": 1344,
"end": 1347,
"ctxt": 0
},
"argument": {
"type": "Identifier",
"span": {
"start": 1347,
"end": 1351,
"ctxt": 0
},
"value": "rest",
"optional": false,
"typeAnnotation": null
},
"typeAnnotation": null
},
"ty": {
"type": "TsArrayType",
"span": {
"start": 1353,
"end": 1367,
"ctxt": 0
},
"elemType": {
"type": "TsTypeReference",
"span": {
"start": 1353,
"end": 1365,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1353,
"end": 1365,
"ctxt": 0
},
"value": "RecusiveRest",
"optional": false
},
"typeParams": null
}
}
}
]
}
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 1370,
"end": 1427,
"ctxt": 0
},
"declaration": {
"type": "TsTypeAliasDeclaration",
"span": {
"start": 1377,
"end": 1427,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
"start": 1382,
"end": 1395,
"ctxt": 0
},
"value": "RecusiveRest2",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsTupleType",
"span": {
"start": 1398,
"end": 1426,
"ctxt": 0
},
"elemTypes": [
{
"type": "TsTupleElement",
"span": {
"start": 1399,
"end": 1405,
"ctxt": 0
},
"label": null,
"ty": {
"type": "TsKeywordType",
"span": {
"start": 1399,
"end": 1405,
"ctxt": 0
},
"kind": "string"
}
},
{
"type": "TsTupleElement",
"span": {
"start": 1407,
"end": 1425,
"ctxt": 0
},
"label": null,
"ty": {
"type": "TsRestType",
"span": {
"start": 1407,
"end": 1425,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsArrayType",
"span": {
"start": 1410,
"end": 1425,
"ctxt": 0
},
"elemType": {
"type": "TsTypeReference",
"span": {
"start": 1410,
"end": 1423,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1410,
"end": 1423,
"ctxt": 0
},
"value": "RecusiveRest2",
"optional": false
},
"typeParams": null
}
}
}
}
]
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 1429,
"end": 1457,
"ctxt": 0
},
"kind": "var",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1441,
"end": 1456,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1441,
"end": 1442,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1442,
"end": 1456,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 1444,
"end": 1456,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1444,
"end": 1456,
"ctxt": 0
},
"value": "RecusiveRest",
"optional": false
},
"typeParams": null
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 1458,
"end": 1487,
"ctxt": 0
},
"kind": "var",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1470,
"end": 1486,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1470,
"end": 1471,
"ctxt": 0
},
"value": "y",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1471,
"end": 1486,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 1473,
"end": 1486,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1473,
"end": 1486,
"ctxt": 0
},
"value": "RecusiveRest2",
"optional": false
},
"typeParams": null
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 1489,
"end": 1495,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 1489,
"end": 1494,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 1489,
"end": 1490,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 1493,
"end": 1494,
"ctxt": 0
},
"value": "y",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 1496,
"end": 1502,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 1496,
"end": 1501,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 1496,
"end": 1497,
"ctxt": 0
},
"value": "y",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 1500,
"end": 1501,
"ctxt": 0
},
"value": "x",
"optional": false
}
}
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 1521,
"end": 1522,
"ctxt": 0
},
"value": "f",
"optional": false
},
"declare": true,
"params": [
{
"type": "Parameter",
"span": {
"start": 1540,
"end": 1547,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "RestElement",
"span": {
"start": 1540,
"end": 1547,
"ctxt": 0
},
"rest": {
"start": 1540,
"end": 1543,
"ctxt": 0
},
"argument": {
"type": "Identifier",
"span": {
"start": 1543,
"end": 1544,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1544,
"end": 1547,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 1546,
"end": 1547,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1546,
"end": 1547,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
}
}
],
"decorators": [],
"span": {
"start": 1504,
"end": 1552,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 1522,
"end": 1539,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 1523,
"end": 1538,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 1523,
"end": 1524,
"ctxt": 0
},
"value": "T",
"optional": false
},
"constraint": {
"type": "TsArrayType",
"span": {
"start": 1533,
"end": 1538,
"ctxt": 0
},
"elemType": {
"type": "TsKeywordType",
"span": {
"start": 1533,
"end": 1536,
"ctxt": 0
},
"kind": "any"
}
},
"default": null
}
]
},
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 1548,
"end": 1551,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 1550,
"end": 1551,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1550,
"end": 1551,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 1570,
"end": 1571,
"ctxt": 0
},
"value": "g",
"optional": false
},
"declare": true,
"params": [
{
"type": "Parameter",
"span": {
"start": 1572,
"end": 1584,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 1572,
"end": 1584,
"ctxt": 0
},
"value": "elem",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1576,
"end": 1584,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1578,
"end": 1584,
"ctxt": 0
},
"kind": "object"
}
}
}
},
{
"type": "Parameter",
"span": {
"start": 1586,
"end": 1599,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 1586,
"end": 1599,
"ctxt": 0
},
"value": "index",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1591,
"end": 1599,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1593,
"end": 1599,
"ctxt": 0
},
"kind": "number"
}
}
}
}
],
"decorators": [],
"span": {
"start": 1553,
"end": 1609,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": null,
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 1600,
"end": 1608,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1602,
"end": 1608,
"ctxt": 0
},
"kind": "object"
}
}
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 1627,
"end": 1646,
"ctxt": 0
},
"value": "getArgsForInjection",
"optional": false
},
"declare": true,
"params": [
{
"type": "Parameter",
"span": {
"start": 1682,
"end": 1686,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 1682,
"end": 1686,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1683,
"end": 1686,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 1685,
"end": 1686,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1685,
"end": 1686,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
}
}
],
"decorators": [],
"span": {
"start": 1610,
"end": 1703,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 1646,
"end": 1681,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 1647,
"end": 1680,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 1647,
"end": 1648,
"ctxt": 0
},
"value": "T",
"optional": false
},
"constraint": {
"type": "TsFunctionType",
"span": {
"start": 1657,
"end": 1680,
"ctxt": 0
},
"params": [
{
"type": "RestElement",
"span": {
"start": 1658,
"end": 1672,
"ctxt": 0
},
"rest": {
"start": 1658,
"end": 1661,
"ctxt": 0
},
"argument": {
"type": "Identifier",
"span": {
"start": 1661,
"end": 1665,
"ctxt": 0
},
"value": "args",
"optional": false,
"typeAnnotation": null
},
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1665,
"end": 1672,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsArrayType",
"span": {
"start": 1667,
"end": 1672,
"ctxt": 0
},
"elemType": {
"type": "TsKeywordType",
"span": {
"start": 1667,
"end": 1670,
"ctxt": 0
},
"kind": "any"
}
}
}
}
],
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1674,
"end": 1680,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1677,
"end": 1680,
"ctxt": 0
},
"kind": "any"
}
}
},
"default": null
}
]
},
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 1687,
"end": 1702,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 1689,
"end": 1702,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1689,
"end": 1699,
"ctxt": 0
},
"value": "Parameters",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 1699,
"end": 1702,
"ctxt": 0
},
"params": [
{
"type": "TsTypeReference",
"span": {
"start": 1700,
"end": 1701,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1700,
"end": 1701,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
]
}
}
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 1705,
"end": 1774,
"ctxt": 0
},
"declaration": {
"type": "VariableDeclaration",
"span": {
"start": 1712,
"end": 1774,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1718,
"end": 1773,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1718,
"end": 1745,
"ctxt": 0
},
"value": "argumentsOfGAsFirstArgument",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 1748,
"end": 1773,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 1748,
"end": 1749,
"ctxt": 0
},
"value": "f",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "CallExpression",
"span": {
"start": 1750,
"end": 1772,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 1750,
"end": 1769,
"ctxt": 0
},
"value": "getArgsForInjection",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 1770,
"end": 1771,
"ctxt": 0
},
"value": "g",
"optional": false
}
}
],
"typeArguments": null
}
}
],
"typeArguments": null
},
"definite": false
}
]
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 1828,
"end": 1885,
"ctxt": 0
},
"declaration": {
"type": "VariableDeclaration",
"span": {
"start": 1835,
"end": 1885,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1841,
"end": 1884,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1841,
"end": 1853,
"ctxt": 0
},
"value": "argumentsOfG",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 1856,
"end": 1884,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 1856,
"end": 1857,
"ctxt": 0
},
"value": "f",
"optional": false
},
"arguments": [
{
"spread": {
"start": 1858,
"end": 1861,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 1861,
"end": 1883,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 1861,
"end": 1880,
"ctxt": 0
},
"value": "getArgsForInjection",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 1881,
"end": 1882,
"ctxt": 0
},
"value": "g",
"optional": false
}
}
],
"typeArguments": null
}
}
],
"typeArguments": null
},
"definite": false
}
]
}
}
],
"interpreter": null
}