swc/crates/swc_ecma_parser/tests/tsc/neverInference.json
2022-02-04 17:08:38 +09:00

2057 lines
53 KiB
JSON

{
"type": "Script",
"span": {
"start": 57,
"end": 814,
"ctxt": 0
},
"body": [
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 74,
"end": 76,
"ctxt": 0
},
"value": "f1",
"optional": false
},
"declare": true,
"params": [
{
"type": "Parameter",
"span": {
"start": 80,
"end": 86,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 80,
"end": 86,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 81,
"end": 86,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsArrayType",
"span": {
"start": 83,
"end": 86,
"ctxt": 0
},
"elemType": {
"type": "TsTypeReference",
"span": {
"start": 83,
"end": 84,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 83,
"end": 84,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
}
}
}
],
"decorators": [],
"span": {
"start": 57,
"end": 91,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 76,
"end": 79,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 77,
"end": 78,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 77,
"end": 78,
"ctxt": 0
},
"value": "T",
"optional": false
},
"constraint": null,
"default": null
}
]
},
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 87,
"end": 90,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 89,
"end": 90,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 89,
"end": 90,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 95,
"end": 124,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 99,
"end": 123,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 99,
"end": 109,
"ctxt": 0
},
"value": "neverArray",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 109,
"end": 118,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsArrayType",
"span": {
"start": 111,
"end": 118,
"ctxt": 0
},
"elemType": {
"type": "TsKeywordType",
"span": {
"start": 111,
"end": 116,
"ctxt": 0
},
"kind": "never"
}
}
}
},
"init": {
"type": "ArrayExpression",
"span": {
"start": 121,
"end": 123,
"ctxt": 0
},
"elements": []
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 128,
"end": 144,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 132,
"end": 143,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 132,
"end": 134,
"ctxt": 0
},
"value": "a1",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 137,
"end": 143,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 137,
"end": 139,
"ctxt": 0
},
"value": "f1",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "ArrayExpression",
"span": {
"start": 140,
"end": 142,
"ctxt": 0
},
"elements": []
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 156,
"end": 180,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 160,
"end": 179,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 160,
"end": 162,
"ctxt": 0
},
"value": "a2",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 165,
"end": 179,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 165,
"end": 167,
"ctxt": 0
},
"value": "f1",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 168,
"end": 178,
"ctxt": 0
},
"value": "neverArray",
"optional": false
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "TsTypeAliasDeclaration",
"span": {
"start": 218,
"end": 262,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
"start": 223,
"end": 233,
"ctxt": 0
},
"value": "Comparator",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 233,
"end": 236,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 234,
"end": 235,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 234,
"end": 235,
"ctxt": 0
},
"value": "T",
"optional": false
},
"constraint": null,
"default": null
}
]
},
"typeAnnotation": {
"type": "TsFunctionType",
"span": {
"start": 239,
"end": 261,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 240,
"end": 244,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 241,
"end": 244,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 243,
"end": 244,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 243,
"end": 244,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
},
{
"type": "Identifier",
"span": {
"start": 246,
"end": 250,
"ctxt": 0
},
"value": "y",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 247,
"end": 250,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 249,
"end": 250,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 249,
"end": 250,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
}
],
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 252,
"end": 261,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 255,
"end": 261,
"ctxt": 0
},
"kind": "number"
}
}
}
},
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 266,
"end": 346,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 276,
"end": 286,
"ctxt": 0
},
"value": "LinkedList",
"optional": false
},
"declare": false,
"typeParams": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 286,
"end": 289,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 287,
"end": 288,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 287,
"end": 288,
"ctxt": 0
},
"value": "T",
"optional": false
},
"constraint": null,
"default": null
}
]
},
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 290,
"end": 346,
"ctxt": 0
},
"body": [
{
"type": "TsPropertySignature",
"span": {
"start": 297,
"end": 323,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 297,
"end": 307,
"ctxt": 0
},
"value": "comparator",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 307,
"end": 322,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 309,
"end": 322,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 309,
"end": 319,
"ctxt": 0
},
"value": "Comparator",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 319,
"end": 322,
"ctxt": 0
},
"params": [
{
"type": "TsTypeReference",
"span": {
"start": 320,
"end": 321,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 320,
"end": 321,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
]
}
}
},
"typeParams": null
},
{
"type": "TsPropertySignature",
"span": {
"start": 329,
"end": 343,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 329,
"end": 334,
"ctxt": 0
},
"value": "nodes",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 334,
"end": 343,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 336,
"end": 343,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 336,
"end": 340,
"ctxt": 0
},
"value": "Node",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 340,
"end": 343,
"ctxt": 0
},
"params": [
{
"type": "TsTypeReference",
"span": {
"start": 341,
"end": 342,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 341,
"end": 342,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
]
}
}
},
"typeParams": null
}
]
}
},
{
"type": "TsTypeAliasDeclaration",
"span": {
"start": 350,
"end": 399,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
"start": 355,
"end": 359,
"ctxt": 0
},
"value": "Node",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 359,
"end": 362,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 360,
"end": 361,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 360,
"end": 361,
"ctxt": 0
},
"value": "T",
"optional": false
},
"constraint": null,
"default": null
}
]
},
"typeAnnotation": {
"type": "TsUnionType",
"span": {
"start": 365,
"end": 399,
"ctxt": 0
},
"types": [
{
"type": "TsTypeLiteral",
"span": {
"start": 365,
"end": 392,
"ctxt": 0
},
"members": [
{
"type": "TsPropertySignature",
"span": {
"start": 367,
"end": 376,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 367,
"end": 372,
"ctxt": 0
},
"value": "value",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 372,
"end": 375,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 374,
"end": 375,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 374,
"end": 375,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
},
"typeParams": null
},
{
"type": "TsPropertySignature",
"span": {
"start": 377,
"end": 390,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 377,
"end": 381,
"ctxt": 0
},
"value": "next",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 381,
"end": 390,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 383,
"end": 390,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 383,
"end": 387,
"ctxt": 0
},
"value": "Node",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 387,
"end": 390,
"ctxt": 0
},
"params": [
{
"type": "TsTypeReference",
"span": {
"start": 388,
"end": 389,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 388,
"end": 389,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
]
}
}
},
"typeParams": null
}
]
},
{
"type": "TsKeywordType",
"span": {
"start": 395,
"end": 399,
"ctxt": 0
},
"kind": "null"
}
]
}
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 420,
"end": 434,
"ctxt": 0
},
"value": "compareNumbers",
"optional": false
},
"declare": true,
"params": [
{
"type": "Parameter",
"span": {
"start": 435,
"end": 444,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 435,
"end": 444,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 436,
"end": 444,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 438,
"end": 444,
"ctxt": 0
},
"kind": "number"
}
}
}
},
{
"type": "Parameter",
"span": {
"start": 446,
"end": 455,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 446,
"end": 455,
"ctxt": 0
},
"value": "y",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 447,
"end": 455,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 449,
"end": 455,
"ctxt": 0
},
"kind": "number"
}
}
}
}
],
"decorators": [],
"span": {
"start": 403,
"end": 465,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": null,
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 456,
"end": 464,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 458,
"end": 464,
"ctxt": 0
},
"kind": "number"
}
}
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 484,
"end": 490,
"ctxt": 0
},
"value": "mkList",
"optional": false
},
"declare": true,
"params": [
{
"type": "Parameter",
"span": {
"start": 494,
"end": 504,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 494,
"end": 504,
"ctxt": 0
},
"value": "items",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 499,
"end": 504,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsArrayType",
"span": {
"start": 501,
"end": 504,
"ctxt": 0
},
"elemType": {
"type": "TsTypeReference",
"span": {
"start": 501,
"end": 502,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 501,
"end": 502,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
}
}
},
{
"type": "Parameter",
"span": {
"start": 506,
"end": 531,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 506,
"end": 531,
"ctxt": 0
},
"value": "comparator",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 516,
"end": 531,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 518,
"end": 531,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 518,
"end": 528,
"ctxt": 0
},
"value": "Comparator",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 528,
"end": 531,
"ctxt": 0
},
"params": [
{
"type": "TsTypeReference",
"span": {
"start": 529,
"end": 530,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 529,
"end": 530,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
]
}
}
}
}
}
],
"decorators": [],
"span": {
"start": 467,
"end": 548,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 490,
"end": 493,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 491,
"end": 492,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 491,
"end": 492,
"ctxt": 0
},
"value": "T",
"optional": false
},
"constraint": null,
"default": null
}
]
},
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 532,
"end": 547,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 534,
"end": 547,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 534,
"end": 544,
"ctxt": 0
},
"value": "LinkedList",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 544,
"end": 547,
"ctxt": 0
},
"params": [
{
"type": "TsTypeReference",
"span": {
"start": 545,
"end": 546,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 545,
"end": 546,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
]
}
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 552,
"end": 612,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 558,
"end": 611,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 558,
"end": 562,
"ctxt": 0
},
"value": "list",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 562,
"end": 582,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 564,
"end": 582,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 564,
"end": 574,
"ctxt": 0
},
"value": "LinkedList",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 574,
"end": 582,
"ctxt": 0
},
"params": [
{
"type": "TsKeywordType",
"span": {
"start": 575,
"end": 581,
"ctxt": 0
},
"kind": "number"
}
]
}
}
}
},
"init": {
"type": "CallExpression",
"span": {
"start": 585,
"end": 611,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 585,
"end": 591,
"ctxt": 0
},
"value": "mkList",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "ArrayExpression",
"span": {
"start": 592,
"end": 594,
"ctxt": 0
},
"elements": []
}
},
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 596,
"end": 610,
"ctxt": 0
},
"value": "compareNumbers",
"optional": false
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 657,
"end": 659,
"ctxt": 0
},
"value": "f2",
"optional": false
},
"declare": true,
"params": [
{
"type": "Parameter",
"span": {
"start": 663,
"end": 671,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 663,
"end": 671,
"ctxt": 0
},
"value": "as1",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 666,
"end": 671,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsArrayType",
"span": {
"start": 668,
"end": 671,
"ctxt": 0
},
"elemType": {
"type": "TsTypeReference",
"span": {
"start": 668,
"end": 669,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 668,
"end": 669,
"ctxt": 0
},
"value": "a",
"optional": false
},
"typeParams": null
}
}
}
}
},
{
"type": "Parameter",
"span": {
"start": 673,
"end": 681,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 673,
"end": 681,
"ctxt": 0
},
"value": "as2",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 676,
"end": 681,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsArrayType",
"span": {
"start": 678,
"end": 681,
"ctxt": 0
},
"elemType": {
"type": "TsTypeReference",
"span": {
"start": 678,
"end": 679,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 678,
"end": 679,
"ctxt": 0
},
"value": "a",
"optional": false
},
"typeParams": null
}
}
}
}
},
{
"type": "Parameter",
"span": {
"start": 683,
"end": 712,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 683,
"end": 712,
"ctxt": 0
},
"value": "cmp",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 686,
"end": 712,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsFunctionType",
"span": {
"start": 688,
"end": 712,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 689,
"end": 694,
"ctxt": 0
},
"value": "a1",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 691,
"end": 694,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 693,
"end": 694,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 693,
"end": 694,
"ctxt": 0
},
"value": "a",
"optional": false
},
"typeParams": null
}
}
},
{
"type": "Identifier",
"span": {
"start": 696,
"end": 701,
"ctxt": 0
},
"value": "a2",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 698,
"end": 701,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 700,
"end": 701,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 700,
"end": 701,
"ctxt": 0
},
"value": "a",
"optional": false
},
"typeParams": null
}
}
}
],
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 703,
"end": 712,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 706,
"end": 712,
"ctxt": 0
},
"kind": "number"
}
}
}
}
}
}
],
"decorators": [],
"span": {
"start": 640,
"end": 720,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 659,
"end": 662,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 660,
"end": 661,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 660,
"end": 661,
"ctxt": 0
},
"value": "a",
"optional": false
},
"constraint": null,
"default": null
}
]
},
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 713,
"end": 719,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 715,
"end": 719,
"ctxt": 0
},
"kind": "void"
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 722,
"end": 767,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 722,
"end": 766,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 722,
"end": 724,
"ctxt": 0
},
"value": "f2",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "CallExpression",
"span": {
"start": 725,
"end": 740,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 725,
"end": 735,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 725,
"end": 730,
"ctxt": 0
},
"value": "Array",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 731,
"end": 735,
"ctxt": 0
},
"value": "from",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "ArrayExpression",
"span": {
"start": 736,
"end": 739,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 737,
"end": 738,
"ctxt": 0
},
"value": 0.0
}
}
]
}
}
],
"typeArguments": null
}
},
{
"spread": null,
"expression": {
"type": "ArrayExpression",
"span": {
"start": 742,
"end": 744,
"ctxt": 0
},
"elements": []
}
},
{
"spread": null,
"expression": {
"type": "ArrowFunctionExpression",
"span": {
"start": 746,
"end": 765,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 747,
"end": 749,
"ctxt": 0
},
"value": "a1",
"optional": false,
"typeAnnotation": null
},
{
"type": "Identifier",
"span": {
"start": 751,
"end": 753,
"ctxt": 0
},
"value": "a2",
"optional": false,
"typeAnnotation": null
}
],
"body": {
"type": "BinaryExpression",
"span": {
"start": 758,
"end": 765,
"ctxt": 0
},
"operator": "-",
"left": {
"type": "Identifier",
"span": {
"start": 758,
"end": 760,
"ctxt": 0
},
"value": "a1",
"optional": false
},
"right": {
"type": "Identifier",
"span": {
"start": 763,
"end": 765,
"ctxt": 0
},
"value": "a2",
"optional": false
}
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
}
}
],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 769,
"end": 814,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 769,
"end": 813,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 769,
"end": 771,
"ctxt": 0
},
"value": "f2",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "CallExpression",
"span": {
"start": 772,
"end": 786,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 772,
"end": 782,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 772,
"end": 777,
"ctxt": 0
},
"value": "Array",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 778,
"end": 782,
"ctxt": 0
},
"value": "from",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "ArrayExpression",
"span": {
"start": 783,
"end": 785,
"ctxt": 0
},
"elements": []
}
}
],
"typeArguments": null
}
},
{
"spread": null,
"expression": {
"type": "ArrayExpression",
"span": {
"start": 788,
"end": 791,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 789,
"end": 790,
"ctxt": 0
},
"value": 0.0
}
}
]
}
},
{
"spread": null,
"expression": {
"type": "ArrowFunctionExpression",
"span": {
"start": 793,
"end": 812,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 794,
"end": 796,
"ctxt": 0
},
"value": "a1",
"optional": false,
"typeAnnotation": null
},
{
"type": "Identifier",
"span": {
"start": 798,
"end": 800,
"ctxt": 0
},
"value": "a2",
"optional": false,
"typeAnnotation": null
}
],
"body": {
"type": "BinaryExpression",
"span": {
"start": 805,
"end": 812,
"ctxt": 0
},
"operator": "-",
"left": {
"type": "Identifier",
"span": {
"start": 805,
"end": 807,
"ctxt": 0
},
"value": "a1",
"optional": false
},
"right": {
"type": "Identifier",
"span": {
"start": 810,
"end": 812,
"ctxt": 0
},
"value": "a2",
"optional": false
}
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
}
}
],
"typeArguments": null
}
}
],
"interpreter": null
}