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

3581 lines
89 KiB
JSON
Raw Normal View History

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