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

2071 lines
53 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 54,
"end": 784,
"ctxt": 0
},
"body": [
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 71,
"end": 73,
"ctxt": 0
},
"value": "f1",
"optional": false
},
"declare": true,
"params": [
{
"type": "Parameter",
"span": {
"start": 77,
"end": 83,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 77,
"end": 83,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 78,
"end": 83,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsArrayType",
"span": {
"start": 80,
"end": 83,
"ctxt": 0
},
"elemType": {
"type": "TsTypeReference",
"span": {
"start": 80,
"end": 81,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 80,
"end": 81,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
}
}
}
],
"decorators": [],
"span": {
"start": 54,
"end": 88,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 73,
"end": 76,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 74,
"end": 75,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 74,
"end": 75,
"ctxt": 0
},
"value": "T",
"optional": false
},
"in": false,
"out": false,
"constraint": null,
"default": null
}
]
},
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 84,
"end": 87,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 86,
"end": 87,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 86,
"end": 87,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 90,
"end": 119,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 94,
"end": 118,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 94,
"end": 104,
"ctxt": 0
},
"value": "neverArray",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 104,
"end": 113,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsArrayType",
"span": {
"start": 106,
"end": 113,
"ctxt": 0
},
"elemType": {
"type": "TsKeywordType",
"span": {
"start": 106,
"end": 111,
"ctxt": 0
},
"kind": "never"
}
}
}
},
"init": {
"type": "ArrayExpression",
"span": {
"start": 116,
"end": 118,
"ctxt": 0
},
"elements": []
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 121,
"end": 137,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 125,
"end": 136,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 125,
"end": 127,
"ctxt": 0
},
"value": "a1",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 130,
"end": 136,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 130,
"end": 132,
"ctxt": 0
},
"value": "f1",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "ArrayExpression",
"span": {
"start": 133,
"end": 135,
"ctxt": 0
},
"elements": []
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 148,
"end": 172,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 152,
"end": 171,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 152,
"end": 154,
"ctxt": 0
},
"value": "a2",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 157,
"end": 171,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 157,
"end": 159,
"ctxt": 0
},
"value": "f1",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 160,
"end": 170,
"ctxt": 0
},
"value": "neverArray",
"optional": false
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "TsTypeAliasDeclaration",
"span": {
"start": 206,
"end": 250,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
"start": 211,
"end": 221,
"ctxt": 0
},
"value": "Comparator",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 221,
"end": 224,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 222,
"end": 223,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 222,
"end": 223,
"ctxt": 0
},
"value": "T",
"optional": false
},
"in": false,
"out": false,
"constraint": null,
"default": null
}
]
},
"typeAnnotation": {
"type": "TsFunctionType",
"span": {
"start": 227,
"end": 249,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 228,
"end": 232,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 229,
"end": 232,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 231,
"end": 232,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 231,
"end": 232,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
},
{
"type": "Identifier",
"span": {
"start": 234,
"end": 238,
"ctxt": 0
},
"value": "y",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 235,
"end": 238,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 237,
"end": 238,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 237,
"end": 238,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
}
],
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 240,
"end": 249,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 243,
"end": 249,
"ctxt": 0
},
"kind": "number"
}
}
}
},
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 252,
"end": 329,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 262,
"end": 272,
"ctxt": 0
},
"value": "LinkedList",
"optional": false
},
"declare": false,
"typeParams": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 272,
"end": 275,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 273,
"end": 274,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 273,
"end": 274,
"ctxt": 0
},
"value": "T",
"optional": false
},
"in": false,
"out": false,
"constraint": null,
"default": null
}
]
},
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 276,
"end": 329,
"ctxt": 0
},
"body": [
{
"type": "TsPropertySignature",
"span": {
"start": 282,
"end": 308,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 282,
"end": 292,
"ctxt": 0
},
"value": "comparator",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 292,
"end": 307,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 294,
"end": 307,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 294,
"end": 304,
"ctxt": 0
},
"value": "Comparator",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 304,
"end": 307,
"ctxt": 0
},
"params": [
{
"type": "TsTypeReference",
"span": {
"start": 305,
"end": 306,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 305,
"end": 306,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
]
}
}
},
"typeParams": null
},
{
"type": "TsPropertySignature",
"span": {
"start": 313,
"end": 327,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 313,
"end": 318,
"ctxt": 0
},
"value": "nodes",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 318,
"end": 327,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 320,
"end": 327,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 320,
"end": 324,
"ctxt": 0
},
"value": "Node",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 324,
"end": 327,
"ctxt": 0
},
"params": [
{
"type": "TsTypeReference",
"span": {
"start": 325,
"end": 326,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 325,
"end": 326,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
]
}
}
},
"typeParams": null
}
]
}
},
{
"type": "TsTypeAliasDeclaration",
"span": {
"start": 331,
"end": 380,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
"start": 336,
"end": 340,
"ctxt": 0
},
"value": "Node",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 340,
"end": 343,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 341,
"end": 342,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 341,
"end": 342,
"ctxt": 0
},
"value": "T",
"optional": false
},
"in": false,
"out": false,
"constraint": null,
"default": null
}
]
},
"typeAnnotation": {
"type": "TsUnionType",
"span": {
"start": 346,
"end": 380,
"ctxt": 0
},
"types": [
{
"type": "TsTypeLiteral",
"span": {
"start": 346,
"end": 373,
"ctxt": 0
},
"members": [
{
"type": "TsPropertySignature",
"span": {
"start": 348,
"end": 357,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 348,
"end": 353,
"ctxt": 0
},
"value": "value",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 353,
"end": 356,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 355,
"end": 356,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 355,
"end": 356,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
},
"typeParams": null
},
{
"type": "TsPropertySignature",
"span": {
"start": 358,
"end": 371,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 358,
"end": 362,
"ctxt": 0
},
"value": "next",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 362,
"end": 371,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 364,
"end": 371,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 364,
"end": 368,
"ctxt": 0
},
"value": "Node",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 368,
"end": 371,
"ctxt": 0
},
"params": [
{
"type": "TsTypeReference",
"span": {
"start": 369,
"end": 370,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 369,
"end": 370,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
]
}
}
},
"typeParams": null
}
]
},
{
"type": "TsKeywordType",
"span": {
"start": 376,
"end": 380,
"ctxt": 0
},
"kind": "null"
}
]
}
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 399,
"end": 413,
"ctxt": 0
},
"value": "compareNumbers",
"optional": false
},
"declare": true,
"params": [
{
"type": "Parameter",
"span": {
"start": 414,
"end": 423,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 414,
"end": 423,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 415,
"end": 423,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 417,
"end": 423,
"ctxt": 0
},
"kind": "number"
}
}
}
},
{
"type": "Parameter",
"span": {
"start": 425,
"end": 434,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 425,
"end": 434,
"ctxt": 0
},
"value": "y",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 426,
"end": 434,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 428,
"end": 434,
"ctxt": 0
},
"kind": "number"
}
}
}
}
],
"decorators": [],
"span": {
"start": 382,
"end": 444,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": null,
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 435,
"end": 443,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 437,
"end": 443,
"ctxt": 0
},
"kind": "number"
}
}
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 462,
"end": 468,
"ctxt": 0
},
"value": "mkList",
"optional": false
},
"declare": true,
"params": [
{
"type": "Parameter",
"span": {
"start": 472,
"end": 482,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 472,
"end": 482,
"ctxt": 0
},
"value": "items",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 477,
"end": 482,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsArrayType",
"span": {
"start": 479,
"end": 482,
"ctxt": 0
},
"elemType": {
"type": "TsTypeReference",
"span": {
"start": 479,
"end": 480,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 479,
"end": 480,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
}
}
},
{
"type": "Parameter",
"span": {
"start": 484,
"end": 509,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 484,
"end": 509,
"ctxt": 0
},
"value": "comparator",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 494,
"end": 509,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 496,
"end": 509,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 496,
"end": 506,
"ctxt": 0
},
"value": "Comparator",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 506,
"end": 509,
"ctxt": 0
},
"params": [
{
"type": "TsTypeReference",
"span": {
"start": 507,
"end": 508,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 507,
"end": 508,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
]
}
}
}
}
}
],
"decorators": [],
"span": {
"start": 445,
"end": 526,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 468,
"end": 471,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 469,
"end": 470,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 469,
"end": 470,
"ctxt": 0
},
"value": "T",
"optional": false
},
"in": false,
"out": false,
"constraint": null,
"default": null
}
]
},
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 510,
"end": 525,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 512,
"end": 525,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 512,
"end": 522,
"ctxt": 0
},
"value": "LinkedList",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 522,
"end": 525,
"ctxt": 0
},
"params": [
{
"type": "TsTypeReference",
"span": {
"start": 523,
"end": 524,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 523,
"end": 524,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
]
}
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 528,
"end": 588,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 534,
"end": 587,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 534,
"end": 538,
"ctxt": 0
},
"value": "list",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 538,
"end": 558,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 540,
"end": 558,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 540,
"end": 550,
"ctxt": 0
},
"value": "LinkedList",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 550,
"end": 558,
"ctxt": 0
},
"params": [
{
"type": "TsKeywordType",
"span": {
"start": 551,
"end": 557,
"ctxt": 0
},
"kind": "number"
}
]
}
}
}
},
"init": {
"type": "CallExpression",
"span": {
"start": 561,
"end": 587,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 561,
"end": 567,
"ctxt": 0
},
"value": "mkList",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "ArrayExpression",
"span": {
"start": 568,
"end": 570,
"ctxt": 0
},
"elements": []
}
},
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 572,
"end": 586,
"ctxt": 0
},
"value": "compareNumbers",
"optional": false
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 629,
"end": 631,
"ctxt": 0
},
"value": "f2",
"optional": false
},
"declare": true,
"params": [
{
"type": "Parameter",
"span": {
"start": 635,
"end": 643,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 635,
"end": 643,
"ctxt": 0
},
"value": "as1",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 638,
"end": 643,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsArrayType",
"span": {
"start": 640,
"end": 643,
"ctxt": 0
},
"elemType": {
"type": "TsTypeReference",
"span": {
"start": 640,
"end": 641,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 640,
"end": 641,
"ctxt": 0
},
"value": "a",
"optional": false
},
"typeParams": null
}
}
}
}
},
{
"type": "Parameter",
"span": {
"start": 645,
"end": 653,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 645,
"end": 653,
"ctxt": 0
},
"value": "as2",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 648,
"end": 653,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsArrayType",
"span": {
"start": 650,
"end": 653,
"ctxt": 0
},
"elemType": {
"type": "TsTypeReference",
"span": {
"start": 650,
"end": 651,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 650,
"end": 651,
"ctxt": 0
},
"value": "a",
"optional": false
},
"typeParams": null
}
}
}
}
},
{
"type": "Parameter",
"span": {
"start": 655,
"end": 684,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 655,
"end": 684,
"ctxt": 0
},
"value": "cmp",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 658,
"end": 684,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsFunctionType",
"span": {
"start": 660,
"end": 684,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 661,
"end": 666,
"ctxt": 0
},
"value": "a1",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 663,
"end": 666,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 665,
"end": 666,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 665,
"end": 666,
"ctxt": 0
},
"value": "a",
"optional": false
},
"typeParams": null
}
}
},
{
"type": "Identifier",
"span": {
"start": 668,
"end": 673,
"ctxt": 0
},
"value": "a2",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 670,
"end": 673,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 672,
"end": 673,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 672,
"end": 673,
"ctxt": 0
},
"value": "a",
"optional": false
},
"typeParams": null
}
}
}
],
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 675,
"end": 684,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 678,
"end": 684,
"ctxt": 0
},
"kind": "number"
}
}
}
}
}
}
],
"decorators": [],
"span": {
"start": 612,
"end": 692,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 631,
"end": 634,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 632,
"end": 633,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 632,
"end": 633,
"ctxt": 0
},
"value": "a",
"optional": false
},
"in": false,
"out": false,
"constraint": null,
"default": null
}
]
},
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 685,
"end": 691,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 687,
"end": 691,
"ctxt": 0
},
"kind": "void"
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 693,
"end": 738,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 693,
"end": 737,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 693,
"end": 695,
"ctxt": 0
},
"value": "f2",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "CallExpression",
"span": {
"start": 696,
"end": 711,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 696,
"end": 706,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 696,
"end": 701,
"ctxt": 0
},
"value": "Array",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 702,
"end": 706,
"ctxt": 0
},
"value": "from",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "ArrayExpression",
"span": {
"start": 707,
"end": 710,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 708,
"end": 709,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
}
]
}
}
],
"typeArguments": null
}
},
{
"spread": null,
"expression": {
"type": "ArrayExpression",
"span": {
"start": 713,
"end": 715,
"ctxt": 0
},
"elements": []
}
},
{
"spread": null,
"expression": {
"type": "ArrowFunctionExpression",
"span": {
"start": 717,
"end": 736,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 718,
"end": 720,
"ctxt": 0
},
"value": "a1",
"optional": false,
"typeAnnotation": null
},
{
"type": "Identifier",
"span": {
"start": 722,
"end": 724,
"ctxt": 0
},
"value": "a2",
"optional": false,
"typeAnnotation": null
}
],
"body": {
"type": "BinaryExpression",
"span": {
"start": 729,
"end": 736,
"ctxt": 0
},
"operator": "-",
"left": {
"type": "Identifier",
"span": {
"start": 729,
"end": 731,
"ctxt": 0
},
"value": "a1",
"optional": false
},
"right": {
"type": "Identifier",
"span": {
"start": 734,
"end": 736,
"ctxt": 0
},
"value": "a2",
"optional": false
}
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
}
}
],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 739,
"end": 784,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 739,
"end": 783,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 739,
"end": 741,
"ctxt": 0
},
"value": "f2",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "CallExpression",
"span": {
"start": 742,
"end": 756,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 742,
"end": 752,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 742,
"end": 747,
"ctxt": 0
},
"value": "Array",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 748,
"end": 752,
"ctxt": 0
},
"value": "from",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "ArrayExpression",
"span": {
"start": 753,
"end": 755,
"ctxt": 0
},
"elements": []
}
}
],
"typeArguments": null
}
},
{
"spread": null,
"expression": {
"type": "ArrayExpression",
"span": {
"start": 758,
"end": 761,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 759,
"end": 760,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
}
]
}
},
{
"spread": null,
"expression": {
"type": "ArrowFunctionExpression",
"span": {
"start": 763,
"end": 782,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 764,
"end": 766,
"ctxt": 0
},
"value": "a1",
"optional": false,
"typeAnnotation": null
},
{
"type": "Identifier",
"span": {
"start": 768,
"end": 770,
"ctxt": 0
},
"value": "a2",
"optional": false,
"typeAnnotation": null
}
],
"body": {
"type": "BinaryExpression",
"span": {
"start": 775,
"end": 782,
"ctxt": 0
},
"operator": "-",
"left": {
"type": "Identifier",
"span": {
"start": 775,
"end": 777,
"ctxt": 0
},
"value": "a1",
"optional": false
},
"right": {
"type": "Identifier",
"span": {
"start": 780,
"end": 782,
"ctxt": 0
},
"value": "a2",
"optional": false
}
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
}
}
],
"typeArguments": null
}
}
],
"interpreter": null
}