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

4526 lines
119 KiB
JSON

{
"type": "Script",
"span": {
"start": 123,
"end": 4791,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 123,
"end": 156,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 127,
"end": 155,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 127,
"end": 128,
"ctxt": 0
},
"value": "v",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 128,
"end": 134,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 130,
"end": 134,
"ctxt": 0
},
"kind": "void"
}
}
},
"init": {
"type": "CallExpression",
"span": {
"start": 137,
"end": 155,
"ctxt": 0
},
"callee": {
"type": "FunctionExpression",
"identifier": null,
"params": [],
"decorators": [],
"span": {
"start": 137,
"end": 152,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 149,
"end": 152,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"arguments": [],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 263,
"end": 307,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 267,
"end": 306,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 267,
"end": 268,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 268,
"end": 273,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 270,
"end": 273,
"ctxt": 0
},
"kind": "any"
}
}
},
"init": {
"type": "FunctionExpression",
"identifier": {
"type": "Identifier",
"span": {
"start": 285,
"end": 286,
"ctxt": 0
},
"value": "f",
"optional": false
},
"params": [],
"decorators": [],
"span": {
"start": 276,
"end": 306,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 289,
"end": 306,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 295,
"end": 304,
"ctxt": 0
},
"argument": {
"type": "Identifier",
"span": {
"start": 302,
"end": 303,
"ctxt": 0
},
"value": "f",
"optional": false
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 308,
"end": 354,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 312,
"end": 353,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 312,
"end": 313,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 313,
"end": 318,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 315,
"end": 318,
"ctxt": 0
},
"kind": "any"
}
}
},
"init": {
"type": "FunctionExpression",
"identifier": {
"type": "Identifier",
"span": {
"start": 330,
"end": 331,
"ctxt": 0
},
"value": "f",
"optional": false
},
"params": [],
"decorators": [],
"span": {
"start": 321,
"end": 353,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 334,
"end": 353,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 340,
"end": 351,
"ctxt": 0
},
"argument": {
"type": "CallExpression",
"span": {
"start": 347,
"end": 350,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 347,
"end": 348,
"ctxt": 0
},
"value": "f",
"optional": false
},
"arguments": [],
"typeArguments": null
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 463,
"end": 522,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 467,
"end": 521,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 467,
"end": 468,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 468,
"end": 473,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 470,
"end": 473,
"ctxt": 0
},
"kind": "any"
}
}
},
"init": {
"type": "FunctionExpression",
"identifier": {
"type": "Identifier",
"span": {
"start": 485,
"end": 486,
"ctxt": 0
},
"value": "f",
"optional": false
},
"params": [],
"decorators": [],
"span": {
"start": 476,
"end": 521,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 489,
"end": 521,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 495,
"end": 505,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 499,
"end": 504,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 499,
"end": 500,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "Identifier",
"span": {
"start": 503,
"end": 504,
"ctxt": 0
},
"value": "f",
"optional": false
},
"definite": false
}
]
},
{
"type": "ReturnStatement",
"span": {
"start": 510,
"end": 519,
"ctxt": 0
},
"argument": {
"type": "Identifier",
"span": {
"start": 517,
"end": 518,
"ctxt": 0
},
"value": "x",
"optional": false
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"definite": false
}
]
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 616,
"end": 620,
"ctxt": 0
},
"value": "rec1",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
"start": 607,
"end": 645,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 623,
"end": 645,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 629,
"end": 643,
"ctxt": 0
},
"argument": {
"type": "CallExpression",
"span": {
"start": 636,
"end": 642,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 636,
"end": 640,
"ctxt": 0
},
"value": "rec2",
"optional": false
},
"arguments": [],
"typeArguments": null
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 655,
"end": 659,
"ctxt": 0
},
"value": "rec2",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
"start": 646,
"end": 684,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 662,
"end": 684,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 668,
"end": 682,
"ctxt": 0
},
"argument": {
"type": "CallExpression",
"span": {
"start": 675,
"end": 681,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 675,
"end": 679,
"ctxt": 0
},
"value": "rec1",
"optional": false
},
"arguments": [],
"typeArguments": null
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "VariableDeclaration",
"span": {
"start": 685,
"end": 700,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 689,
"end": 699,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 689,
"end": 690,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 693,
"end": 699,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 693,
"end": 697,
"ctxt": 0
},
"value": "rec1",
"optional": false
},
"arguments": [],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 701,
"end": 716,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 705,
"end": 715,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 705,
"end": 706,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 709,
"end": 715,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 709,
"end": 713,
"ctxt": 0
},
"value": "rec2",
"optional": false
},
"arguments": [],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 813,
"end": 817,
"ctxt": 0
},
"value": "rec3",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
"start": 804,
"end": 850,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 828,
"end": 850,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 834,
"end": 848,
"ctxt": 0
},
"argument": {
"type": "CallExpression",
"span": {
"start": 841,
"end": 847,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 841,
"end": 845,
"ctxt": 0
},
"value": "rec4",
"optional": false
},
"arguments": [],
"typeArguments": null
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 819,
"end": 827,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 821,
"end": 827,
"ctxt": 0
},
"kind": "number"
}
}
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 860,
"end": 864,
"ctxt": 0
},
"value": "rec4",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
"start": 851,
"end": 889,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 867,
"end": 889,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 873,
"end": 887,
"ctxt": 0
},
"argument": {
"type": "CallExpression",
"span": {
"start": 880,
"end": 886,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 880,
"end": 884,
"ctxt": 0
},
"value": "rec3",
"optional": false
},
"arguments": [],
"typeArguments": null
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "VariableDeclaration",
"span": {
"start": 890,
"end": 904,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 894,
"end": 903,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 894,
"end": 895,
"ctxt": 0
},
"value": "n",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 895,
"end": 903,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 897,
"end": 903,
"ctxt": 0
},
"kind": "number"
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 905,
"end": 920,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 909,
"end": 919,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 909,
"end": 910,
"ctxt": 0
},
"value": "n",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 913,
"end": 919,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 913,
"end": 917,
"ctxt": 0
},
"value": "rec3",
"optional": false
},
"arguments": [],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 921,
"end": 936,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 925,
"end": 935,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 925,
"end": 926,
"ctxt": 0
},
"value": "n",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 929,
"end": 935,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 929,
"end": 933,
"ctxt": 0
},
"value": "rec4",
"optional": false
},
"arguments": [],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 1012,
"end": 1053,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1016,
"end": 1052,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1016,
"end": 1017,
"ctxt": 0
},
"value": "n",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 1020,
"end": 1052,
"ctxt": 0
},
"callee": {
"type": "FunctionExpression",
"identifier": null,
"params": [],
"decorators": [],
"span": {
"start": 1020,
"end": 1049,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 1032,
"end": 1049,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 1038,
"end": 1047,
"ctxt": 0
},
"argument": {
"type": "NumericLiteral",
"span": {
"start": 1045,
"end": 1046,
"ctxt": 0
},
"value": 3.0,
"raw": "3"
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"arguments": [],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 1125,
"end": 1139,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1129,
"end": 1138,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1129,
"end": 1131,
"ctxt": 0
},
"value": "nu",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "NullLiteral",
"span": {
"start": 1134,
"end": 1138,
"ctxt": 0
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 1140,
"end": 1185,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1144,
"end": 1184,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1144,
"end": 1146,
"ctxt": 0
},
"value": "nu",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 1149,
"end": 1184,
"ctxt": 0
},
"callee": {
"type": "FunctionExpression",
"identifier": null,
"params": [],
"decorators": [],
"span": {
"start": 1149,
"end": 1181,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 1161,
"end": 1181,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 1167,
"end": 1179,
"ctxt": 0
},
"argument": {
"type": "NullLiteral",
"span": {
"start": 1174,
"end": 1178,
"ctxt": 0
}
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"arguments": [],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 1262,
"end": 1281,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1266,
"end": 1280,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1266,
"end": 1268,
"ctxt": 0
},
"value": "un",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "Identifier",
"span": {
"start": 1271,
"end": 1280,
"ctxt": 0
},
"value": "undefined",
"optional": false
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 1282,
"end": 1332,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1286,
"end": 1331,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1286,
"end": 1288,
"ctxt": 0
},
"value": "un",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 1291,
"end": 1331,
"ctxt": 0
},
"callee": {
"type": "FunctionExpression",
"identifier": null,
"params": [],
"decorators": [],
"span": {
"start": 1291,
"end": 1328,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 1303,
"end": 1328,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 1309,
"end": 1326,
"ctxt": 0
},
"argument": {
"type": "Identifier",
"span": {
"start": 1316,
"end": 1325,
"ctxt": 0
},
"value": "undefined",
"optional": false
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"arguments": [],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 1421,
"end": 1470,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1425,
"end": 1469,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1425,
"end": 1426,
"ctxt": 0
},
"value": "n",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 1429,
"end": 1469,
"ctxt": 0
},
"callee": {
"type": "FunctionExpression",
"identifier": null,
"params": [
{
"type": "Parameter",
"span": {
"start": 1442,
"end": 1446,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 1442,
"end": 1446,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1443,
"end": 1446,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 1445,
"end": 1446,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1445,
"end": 1446,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
}
}
],
"decorators": [],
"span": {
"start": 1429,
"end": 1465,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 1448,
"end": 1465,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 1454,
"end": 1463,
"ctxt": 0
},
"argument": {
"type": "Identifier",
"span": {
"start": 1461,
"end": 1462,
"ctxt": 0
},
"value": "x",
"optional": false
}
}
]
},
"generator": false,
"async": false,
"typeParameters": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 1438,
"end": 1441,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 1439,
"end": 1440,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 1439,
"end": 1440,
"ctxt": 0
},
"value": "T",
"optional": false
},
"in": false,
"out": false,
"const": false,
"constraint": null,
"default": null
}
]
},
"returnType": null
},
"arguments": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 1467,
"end": 1468,
"ctxt": 0
},
"value": 4.0,
"raw": "4"
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 1571,
"end": 1631,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1575,
"end": 1630,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1575,
"end": 1576,
"ctxt": 0
},
"value": "n",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 1579,
"end": 1630,
"ctxt": 0
},
"callee": {
"type": "FunctionExpression",
"identifier": null,
"params": [
{
"type": "Parameter",
"span": {
"start": 1603,
"end": 1607,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 1603,
"end": 1607,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1604,
"end": 1607,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 1606,
"end": 1607,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1606,
"end": 1607,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
}
}
],
"decorators": [],
"span": {
"start": 1579,
"end": 1626,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 1609,
"end": 1626,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 1615,
"end": 1624,
"ctxt": 0
},
"argument": {
"type": "Identifier",
"span": {
"start": 1622,
"end": 1623,
"ctxt": 0
},
"value": "x",
"optional": false
}
}
]
},
"generator": false,
"async": false,
"typeParameters": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 1588,
"end": 1602,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 1589,
"end": 1601,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 1589,
"end": 1590,
"ctxt": 0
},
"value": "T",
"optional": false
},
"in": false,
"out": false,
"const": false,
"constraint": {
"type": "TsTypeLiteral",
"span": {
"start": 1599,
"end": 1601,
"ctxt": 0
},
"members": []
},
"default": null
}
]
},
"returnType": null
},
"arguments": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 1628,
"end": 1629,
"ctxt": 0
},
"value": 4.0,
"raw": "4"
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 1739,
"end": 1793,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1743,
"end": 1792,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1743,
"end": 1744,
"ctxt": 0
},
"value": "n",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 1747,
"end": 1792,
"ctxt": 0
},
"callee": {
"type": "FunctionExpression",
"identifier": null,
"params": [],
"decorators": [],
"span": {
"start": 1747,
"end": 1790,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 1759,
"end": 1790,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 1765,
"end": 1774,
"ctxt": 0
},
"argument": {
"type": "NumericLiteral",
"span": {
"start": 1772,
"end": 1773,
"ctxt": 0
},
"value": 3.0,
"raw": "3"
}
},
{
"type": "ReturnStatement",
"span": {
"start": 1779,
"end": 1788,
"ctxt": 0
},
"argument": {
"type": "NumericLiteral",
"span": {
"start": 1786,
"end": 1787,
"ctxt": 0
},
"value": 5.0,
"raw": "5"
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"arguments": [],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 2265,
"end": 2269,
"ctxt": 0
},
"value": "Base",
"optional": false
},
"declare": false,
"span": {
"start": 2259,
"end": 2284,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 2272,
"end": 2282,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 2280,
"end": 2281,
"ctxt": 0
},
"value": "m",
"optional": false
},
"value": null,
"typeAnnotation": null,
"isStatic": false,
"decorators": [],
"accessibility": "private",
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 2291,
"end": 2298,
"ctxt": 0
},
"value": "Derived",
"optional": false
},
"declare": false,
"span": {
"start": 2285,
"end": 2326,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 2314,
"end": 2324,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 2322,
"end": 2323,
"ctxt": 0
},
"value": "q",
"optional": false
},
"value": null,
"typeAnnotation": null,
"isStatic": false,
"decorators": [],
"accessibility": "private",
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
}
],
"superClass": {
"type": "Identifier",
"span": {
"start": 2307,
"end": 2311,
"ctxt": 0
},
"value": "Base",
"optional": false
},
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "VariableDeclaration",
"span": {
"start": 2327,
"end": 2339,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 2331,
"end": 2338,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 2331,
"end": 2332,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 2332,
"end": 2338,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 2334,
"end": 2338,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 2334,
"end": 2338,
"ctxt": 0
},
"value": "Base",
"optional": false
},
"typeParams": null
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 2340,
"end": 2412,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 2344,
"end": 2411,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 2344,
"end": 2345,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 2348,
"end": 2411,
"ctxt": 0
},
"callee": {
"type": "FunctionExpression",
"identifier": null,
"params": [],
"decorators": [],
"span": {
"start": 2348,
"end": 2408,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 2360,
"end": 2408,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 2366,
"end": 2384,
"ctxt": 0
},
"argument": {
"type": "NewExpression",
"span": {
"start": 2373,
"end": 2383,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 2377,
"end": 2381,
"ctxt": 0
},
"value": "Base",
"optional": false
},
"arguments": [],
"typeArguments": null
}
},
{
"type": "ReturnStatement",
"span": {
"start": 2385,
"end": 2406,
"ctxt": 0
},
"argument": {
"type": "NewExpression",
"span": {
"start": 2392,
"end": 2405,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 2396,
"end": 2403,
"ctxt": 0
},
"value": "Derived",
"optional": false
},
"arguments": [],
"typeArguments": null
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"arguments": [],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 2525,
"end": 2615,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 2529,
"end": 2614,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 2529,
"end": 2530,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 2533,
"end": 2614,
"ctxt": 0
},
"callee": {
"type": "FunctionExpression",
"identifier": {
"type": "Identifier",
"span": {
"start": 2542,
"end": 2543,
"ctxt": 0
},
"value": "f",
"optional": false
},
"params": [],
"decorators": [],
"span": {
"start": 2533,
"end": 2611,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 2546,
"end": 2611,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 2552,
"end": 2570,
"ctxt": 0
},
"argument": {
"type": "NewExpression",
"span": {
"start": 2559,
"end": 2569,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 2563,
"end": 2567,
"ctxt": 0
},
"value": "Base",
"optional": false
},
"arguments": [],
"typeArguments": null
}
},
{
"type": "ReturnStatement",
"span": {
"start": 2571,
"end": 2592,
"ctxt": 0
},
"argument": {
"type": "NewExpression",
"span": {
"start": 2578,
"end": 2591,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 2582,
"end": 2589,
"ctxt": 0
},
"value": "Derived",
"optional": false
},
"arguments": [],
"typeArguments": null
}
},
{
"type": "ReturnStatement",
"span": {
"start": 2593,
"end": 2604,
"ctxt": 0
},
"argument": {
"type": "CallExpression",
"span": {
"start": 2600,
"end": 2603,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 2600,
"end": 2601,
"ctxt": 0
},
"value": "f",
"optional": false
},
"arguments": [],
"typeArguments": null
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"arguments": [],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 2707,
"end": 2766,
"ctxt": 0
},
"expression": {
"type": "BinaryExpression",
"span": {
"start": 2707,
"end": 2765,
"ctxt": 0
},
"operator": "===",
"left": {
"type": "Identifier",
"span": {
"start": 2707,
"end": 2716,
"ctxt": 0
},
"value": "undefined",
"optional": false
},
"right": {
"type": "FunctionExpression",
"identifier": null,
"params": [],
"decorators": [],
"span": {
"start": 2721,
"end": 2765,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 2741,
"end": 2765,
"ctxt": 0
},
"stmts": [
{
"type": "ThrowStatement",
"span": {
"start": 2747,
"end": 2763,
"ctxt": 0
},
"argument": {
"type": "Identifier",
"span": {
"start": 2753,
"end": 2762,
"ctxt": 0
},
"value": "undefined",
"optional": false
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 2732,
"end": 2740,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 2734,
"end": 2740,
"ctxt": 0
},
"kind": "number"
}
}
}
}
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 2831,
"end": 2839,
"ctxt": 0
},
"value": "thisFunc",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
"start": 2822,
"end": 2879,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 2842,
"end": 2879,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 2848,
"end": 2861,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 2852,
"end": 2860,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 2852,
"end": 2853,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ThisExpression",
"span": {
"start": 2856,
"end": 2860,
"ctxt": 0
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 2866,
"end": 2877,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 2870,
"end": 2876,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 2870,
"end": 2871,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 2871,
"end": 2876,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 2873,
"end": 2876,
"ctxt": 0
},
"kind": "any"
}
}
},
"init": null,
"definite": false
}
]
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 2995,
"end": 2999,
"ctxt": 0
},
"value": "opt1",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 3000,
"end": 3005,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "AssignmentPattern",
"span": {
"start": 3000,
"end": 3005,
"ctxt": 0
},
"left": {
"type": "Identifier",
"span": {
"start": 3000,
"end": 3001,
"ctxt": 0
},
"value": "n",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 3004,
"end": 3005,
"ctxt": 0
},
"value": 4.0,
"raw": "4"
},
"typeAnnotation": null
}
}
],
"decorators": [],
"span": {
"start": 2986,
"end": 3044,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 3007,
"end": 3044,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 3013,
"end": 3023,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 3017,
"end": 3022,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 3017,
"end": 3018,
"ctxt": 0
},
"value": "m",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "Identifier",
"span": {
"start": 3021,
"end": 3022,
"ctxt": 0
},
"value": "n",
"optional": false
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 3028,
"end": 3042,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 3032,
"end": 3041,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 3032,
"end": 3033,
"ctxt": 0
},
"value": "m",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 3033,
"end": 3041,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 3035,
"end": 3041,
"ctxt": 0
},
"kind": "number"
}
}
},
"init": null,
"definite": false
}
]
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 3168,
"end": 3172,
"ctxt": 0
},
"value": "opt2",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 3173,
"end": 3202,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "AssignmentPattern",
"span": {
"start": 3173,
"end": 3202,
"ctxt": 0
},
"left": {
"type": "Identifier",
"span": {
"start": 3173,
"end": 3174,
"ctxt": 0
},
"value": "n",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "ObjectExpression",
"span": {
"start": 3177,
"end": 3202,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 3179,
"end": 3180,
"ctxt": 0
},
"value": "x",
"optional": false
},
"value": {
"type": "NullLiteral",
"span": {
"start": 3182,
"end": 3186,
"ctxt": 0
}
}
},
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 3188,
"end": 3189,
"ctxt": 0
},
"value": "y",
"optional": false
},
"value": {
"type": "Identifier",
"span": {
"start": 3191,
"end": 3200,
"ctxt": 0
},
"value": "undefined",
"optional": false
}
}
]
},
"typeAnnotation": null
}
}
],
"decorators": [],
"span": {
"start": 3159,
"end": 3253,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 3204,
"end": 3253,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 3210,
"end": 3220,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 3214,
"end": 3219,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 3214,
"end": 3215,
"ctxt": 0
},
"value": "m",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "Identifier",
"span": {
"start": 3218,
"end": 3219,
"ctxt": 0
},
"value": "n",
"optional": false
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 3225,
"end": 3251,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 3229,
"end": 3250,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 3229,
"end": 3230,
"ctxt": 0
},
"value": "m",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 3230,
"end": 3250,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 3232,
"end": 3250,
"ctxt": 0
},
"members": [
{
"type": "TsPropertySignature",
"span": {
"start": 3234,
"end": 3241,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 3234,
"end": 3235,
"ctxt": 0
},
"value": "x",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 3235,
"end": 3240,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 3237,
"end": 3240,
"ctxt": 0
},
"kind": "any"
}
},
"typeParams": null
},
{
"type": "TsPropertySignature",
"span": {
"start": 3242,
"end": 3248,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 3242,
"end": 3243,
"ctxt": 0
},
"value": "y",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 3243,
"end": 3248,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 3245,
"end": 3248,
"ctxt": 0
},
"kind": "any"
}
},
"typeParams": null
}
]
}
}
},
"init": null,
"definite": false
}
]
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 3343,
"end": 3347,
"ctxt": 0
},
"value": "opt3",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 3348,
"end": 3357,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 3348,
"end": 3357,
"ctxt": 0
},
"value": "n",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 3349,
"end": 3357,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 3351,
"end": 3357,
"ctxt": 0
},
"kind": "number"
}
}
}
},
{
"type": "Parameter",
"span": {
"start": 3359,
"end": 3364,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "AssignmentPattern",
"span": {
"start": 3359,
"end": 3364,
"ctxt": 0
},
"left": {
"type": "Identifier",
"span": {
"start": 3359,
"end": 3360,
"ctxt": 0
},
"value": "m",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 3363,
"end": 3364,
"ctxt": 0
},
"value": "n",
"optional": false
},
"typeAnnotation": null
}
}
],
"decorators": [],
"span": {
"start": 3334,
"end": 3403,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 3366,
"end": 3403,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 3372,
"end": 3382,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 3376,
"end": 3381,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 3376,
"end": 3377,
"ctxt": 0
},
"value": "y",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "Identifier",
"span": {
"start": 3380,
"end": 3381,
"ctxt": 0
},
"value": "m",
"optional": false
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 3387,
"end": 3401,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 3391,
"end": 3400,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 3391,
"end": 3392,
"ctxt": 0
},
"value": "y",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 3392,
"end": 3400,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 3394,
"end": 3400,
"ctxt": 0
},
"kind": "number"
}
}
},
"init": null,
"definite": false
}
]
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 3586,
"end": 3588,
"ctxt": 0
},
"value": "f6",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
"start": 3577,
"end": 3614,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 3599,
"end": 3614,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 3605,
"end": 3612,
"ctxt": 0
},
"argument": null
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 3590,
"end": 3598,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 3592,
"end": 3598,
"ctxt": 0
},
"kind": "number"
}
}
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 3622,
"end": 3630,
"ctxt": 0
},
"value": "Derived2",
"optional": false
},
"declare": false,
"span": {
"start": 3616,
"end": 3666,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 3646,
"end": 3664,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 3654,
"end": 3655,
"ctxt": 0
},
"value": "r",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 3655,
"end": 3663,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 3657,
"end": 3663,
"ctxt": 0
},
"kind": "string"
}
},
"isStatic": false,
"decorators": [],
"accessibility": "private",
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
}
],
"superClass": {
"type": "Identifier",
"span": {
"start": 3639,
"end": 3643,
"ctxt": 0
},
"value": "Base",
"optional": false
},
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 3673,
"end": 3685,
"ctxt": 0
},
"value": "AnotherClass",
"optional": false
},
"declare": false,
"span": {
"start": 3667,
"end": 3699,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 3688,
"end": 3697,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 3696,
"end": 3697,
"ctxt": 0
},
"value": "x",
"optional": false
},
"value": null,
"typeAnnotation": null,
"isStatic": false,
"decorators": [],
"accessibility": "private",
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "VariableDeclaration",
"span": {
"start": 3922,
"end": 4069,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 3926,
"end": 4069,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 3926,
"end": 3928,
"ctxt": 0
},
"value": "f7",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 3928,
"end": 3960,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsFunctionType",
"span": {
"start": 3930,
"end": 3960,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 3931,
"end": 3940,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 3932,
"end": 3940,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 3934,
"end": 3940,
"ctxt": 0
},
"kind": "number"
}
}
}
],
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 3942,
"end": 3960,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsUnionType",
"span": {
"start": 3945,
"end": 3960,
"ctxt": 0
},
"types": [
{
"type": "TsKeywordType",
"span": {
"start": 3945,
"end": 3951,
"ctxt": 0
},
"kind": "string"
},
{
"type": "TsKeywordType",
"span": {
"start": 3954,
"end": 3960,
"ctxt": 0
},
"kind": "number"
}
]
}
}
}
}
},
"init": {
"type": "ArrowFunctionExpression",
"span": {
"start": 3963,
"end": 4069,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 3963,
"end": 3964,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
}
],
"body": {
"type": "BlockStatement",
"span": {
"start": 3968,
"end": 4069,
"ctxt": 0
},
"stmts": [
{
"type": "IfStatement",
"span": {
"start": 4018,
"end": 4042,
"ctxt": 0
},
"test": {
"type": "BinaryExpression",
"span": {
"start": 4022,
"end": 4027,
"ctxt": 0
},
"operator": "<",
"left": {
"type": "Identifier",
"span": {
"start": 4022,
"end": 4023,
"ctxt": 0
},
"value": "x",
"optional": false
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 4026,
"end": 4027,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
},
"consequent": {
"type": "BlockStatement",
"span": {
"start": 4029,
"end": 4042,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 4031,
"end": 4040,
"ctxt": 0
},
"argument": {
"type": "Identifier",
"span": {
"start": 4038,
"end": 4039,
"ctxt": 0
},
"value": "x",
"optional": false
}
}
]
},
"alternate": null
},
{
"type": "ReturnStatement",
"span": {
"start": 4047,
"end": 4067,
"ctxt": 0
},
"argument": {
"type": "CallExpression",
"span": {
"start": 4054,
"end": 4066,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 4054,
"end": 4064,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 4054,
"end": 4055,
"ctxt": 0
},
"value": "x",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 4056,
"end": 4064,
"ctxt": 0
},
"value": "toString",
"optional": false
}
},
"arguments": [],
"typeArguments": null
}
}
]
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 4070,
"end": 4190,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 4074,
"end": 4190,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 4074,
"end": 4076,
"ctxt": 0
},
"value": "f8",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 4076,
"end": 4096,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsFunctionType",
"span": {
"start": 4078,
"end": 4096,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 4079,
"end": 4088,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 4080,
"end": 4088,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 4082,
"end": 4088,
"ctxt": 0
},
"kind": "number"
}
}
}
],
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 4090,
"end": 4096,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 4093,
"end": 4096,
"ctxt": 0
},
"kind": "any"
}
}
}
}
},
"init": {
"type": "ArrowFunctionExpression",
"span": {
"start": 4099,
"end": 4190,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 4099,
"end": 4100,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
}
],
"body": {
"type": "BlockStatement",
"span": {
"start": 4104,
"end": 4190,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 4143,
"end": 4161,
"ctxt": 0
},
"argument": {
"type": "NewExpression",
"span": {
"start": 4150,
"end": 4160,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 4154,
"end": 4158,
"ctxt": 0
},
"value": "Base",
"optional": false
},
"arguments": [],
"typeArguments": null
}
},
{
"type": "ReturnStatement",
"span": {
"start": 4166,
"end": 4188,
"ctxt": 0
},
"argument": {
"type": "NewExpression",
"span": {
"start": 4173,
"end": 4187,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 4177,
"end": 4185,
"ctxt": 0
},
"value": "Derived2",
"optional": false
},
"arguments": [],
"typeArguments": null
}
}
]
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 4191,
"end": 4337,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 4195,
"end": 4337,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 4195,
"end": 4197,
"ctxt": 0
},
"value": "f9",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 4197,
"end": 4217,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsFunctionType",
"span": {
"start": 4199,
"end": 4217,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 4200,
"end": 4209,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 4201,
"end": 4209,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 4203,
"end": 4209,
"ctxt": 0
},
"kind": "number"
}
}
}
],
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 4211,
"end": 4217,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 4214,
"end": 4217,
"ctxt": 0
},
"kind": "any"
}
}
}
}
},
"init": {
"type": "ArrowFunctionExpression",
"span": {
"start": 4220,
"end": 4337,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 4220,
"end": 4221,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
}
],
"body": {
"type": "BlockStatement",
"span": {
"start": 4225,
"end": 4337,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 4264,
"end": 4282,
"ctxt": 0
},
"argument": {
"type": "NewExpression",
"span": {
"start": 4271,
"end": 4281,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 4275,
"end": 4279,
"ctxt": 0
},
"value": "Base",
"optional": false
},
"arguments": [],
"typeArguments": null
}
},
{
"type": "ReturnStatement",
"span": {
"start": 4287,
"end": 4308,
"ctxt": 0
},
"argument": {
"type": "NewExpression",
"span": {
"start": 4294,
"end": 4307,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 4298,
"end": 4305,
"ctxt": 0
},
"value": "Derived",
"optional": false
},
"arguments": [],
"typeArguments": null
}
},
{
"type": "ReturnStatement",
"span": {
"start": 4313,
"end": 4335,
"ctxt": 0
},
"argument": {
"type": "NewExpression",
"span": {
"start": 4320,
"end": 4334,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 4324,
"end": 4332,
"ctxt": 0
},
"value": "Derived2",
"optional": false
},
"arguments": [],
"typeArguments": null
}
}
]
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 4338,
"end": 4476,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 4342,
"end": 4476,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 4342,
"end": 4345,
"ctxt": 0
},
"value": "f10",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 4345,
"end": 4365,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsFunctionType",
"span": {
"start": 4347,
"end": 4365,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 4348,
"end": 4357,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 4349,
"end": 4357,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 4351,
"end": 4357,
"ctxt": 0
},
"kind": "number"
}
}
}
],
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 4359,
"end": 4365,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 4362,
"end": 4365,
"ctxt": 0
},
"kind": "any"
}
}
}
}
},
"init": {
"type": "ArrowFunctionExpression",
"span": {
"start": 4368,
"end": 4476,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 4368,
"end": 4369,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
}
],
"body": {
"type": "BlockStatement",
"span": {
"start": 4373,
"end": 4476,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 4426,
"end": 4447,
"ctxt": 0
},
"argument": {
"type": "NewExpression",
"span": {
"start": 4433,
"end": 4446,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 4437,
"end": 4444,
"ctxt": 0
},
"value": "Derived",
"optional": false
},
"arguments": [],
"typeArguments": null
}
},
{
"type": "ReturnStatement",
"span": {
"start": 4452,
"end": 4474,
"ctxt": 0
},
"argument": {
"type": "NewExpression",
"span": {
"start": 4459,
"end": 4473,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 4463,
"end": 4471,
"ctxt": 0
},
"value": "Derived2",
"optional": false
},
"arguments": [],
"typeArguments": null
}
}
]
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 4477,
"end": 4617,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 4481,
"end": 4617,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 4481,
"end": 4484,
"ctxt": 0
},
"value": "f11",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 4484,
"end": 4504,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsFunctionType",
"span": {
"start": 4486,
"end": 4504,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 4487,
"end": 4496,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 4488,
"end": 4496,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 4490,
"end": 4496,
"ctxt": 0
},
"kind": "number"
}
}
}
],
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 4498,
"end": 4504,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 4501,
"end": 4504,
"ctxt": 0
},
"kind": "any"
}
}
}
}
},
"init": {
"type": "ArrowFunctionExpression",
"span": {
"start": 4507,
"end": 4617,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 4507,
"end": 4508,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
}
],
"body": {
"type": "BlockStatement",
"span": {
"start": 4512,
"end": 4617,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 4566,
"end": 4584,
"ctxt": 0
},
"argument": {
"type": "NewExpression",
"span": {
"start": 4573,
"end": 4583,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 4577,
"end": 4581,
"ctxt": 0
},
"value": "Base",
"optional": false
},
"arguments": [],
"typeArguments": null
}
},
{
"type": "ReturnStatement",
"span": {
"start": 4589,
"end": 4615,
"ctxt": 0
},
"argument": {
"type": "NewExpression",
"span": {
"start": 4596,
"end": 4614,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 4600,
"end": 4612,
"ctxt": 0
},
"value": "AnotherClass",
"optional": false
},
"arguments": [],
"typeArguments": null
}
}
]
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 4618,
"end": 4791,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 4622,
"end": 4791,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 4622,
"end": 4625,
"ctxt": 0
},
"value": "f12",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 4625,
"end": 4645,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsFunctionType",
"span": {
"start": 4627,
"end": 4645,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 4628,
"end": 4637,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 4629,
"end": 4637,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 4631,
"end": 4637,
"ctxt": 0
},
"kind": "number"
}
}
}
],
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 4639,
"end": 4645,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 4642,
"end": 4645,
"ctxt": 0
},
"kind": "any"
}
}
}
}
},
"init": {
"type": "ArrowFunctionExpression",
"span": {
"start": 4648,
"end": 4791,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 4648,
"end": 4649,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
}
],
"body": {
"type": "BlockStatement",
"span": {
"start": 4653,
"end": 4791,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 4707,
"end": 4725,
"ctxt": 0
},
"argument": {
"type": "NewExpression",
"span": {
"start": 4714,
"end": 4724,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 4718,
"end": 4722,
"ctxt": 0
},
"value": "Base",
"optional": false
},
"arguments": [],
"typeArguments": null
}
},
{
"type": "ReturnStatement",
"span": {
"start": 4730,
"end": 4737,
"ctxt": 0
},
"argument": null
},
{
"type": "ReturnStatement",
"span": {
"start": 4763,
"end": 4789,
"ctxt": 0
},
"argument": {
"type": "NewExpression",
"span": {
"start": 4770,
"end": 4788,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 4774,
"end": 4786,
"ctxt": 0
},
"value": "AnotherClass",
"optional": false
},
"arguments": [],
"typeArguments": null
}
}
]
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
},
"definite": false
}
]
}
],
"interpreter": null
}