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

2106 lines
56 KiB
JSON

{
"type": "Script",
"span": {
"start": 28,
"end": 1462,
"ctxt": 0
},
"body": [
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 45,
"end": 48,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"declare": true,
"params": [],
"decorators": [],
"span": {
"start": 28,
"end": 71,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": null,
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 50,
"end": 70,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsUnionType",
"span": {
"start": 52,
"end": 70,
"ctxt": 0
},
"types": [
{
"type": "TsKeywordType",
"span": {
"start": 52,
"end": 58,
"ctxt": 0
},
"kind": "string"
},
{
"type": "TsKeywordType",
"span": {
"start": 61,
"end": 70,
"ctxt": 0
},
"kind": "undefined"
}
]
}
}
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 82,
"end": 84,
"ctxt": 0
},
"value": "f1",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
"start": 73,
"end": 199,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 87,
"end": 199,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 93,
"end": 107,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 97,
"end": 106,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 97,
"end": 98,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 101,
"end": 106,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 101,
"end": 104,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"arguments": [],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "IfStatement",
"span": {
"start": 112,
"end": 197,
"ctxt": 0
},
"test": {
"type": "Identifier",
"span": {
"start": 116,
"end": 117,
"ctxt": 0
},
"value": "x",
"optional": false
},
"consequent": {
"type": "BlockStatement",
"span": {
"start": 119,
"end": 147,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 129,
"end": 131,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 129,
"end": 130,
"ctxt": 0
},
"value": "x",
"optional": false
}
}
]
},
"alternate": {
"type": "BlockStatement",
"span": {
"start": 157,
"end": 197,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 167,
"end": 169,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 167,
"end": 168,
"ctxt": 0
},
"value": "x",
"optional": false
}
}
]
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 210,
"end": 212,
"ctxt": 0
},
"value": "f2",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
"start": 201,
"end": 354,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 215,
"end": 354,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 221,
"end": 247,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 225,
"end": 246,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 225,
"end": 226,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 226,
"end": 246,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsUnionType",
"span": {
"start": 228,
"end": 246,
"ctxt": 0
},
"types": [
{
"type": "TsKeywordType",
"span": {
"start": 228,
"end": 234,
"ctxt": 0
},
"kind": "string"
},
{
"type": "TsKeywordType",
"span": {
"start": 237,
"end": 246,
"ctxt": 0
},
"kind": "undefined"
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 252,
"end": 262,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 252,
"end": 261,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 252,
"end": 253,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "CallExpression",
"span": {
"start": 256,
"end": 261,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 256,
"end": 259,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"arguments": [],
"typeArguments": null
}
}
},
{
"type": "IfStatement",
"span": {
"start": 267,
"end": 352,
"ctxt": 0
},
"test": {
"type": "Identifier",
"span": {
"start": 271,
"end": 272,
"ctxt": 0
},
"value": "x",
"optional": false
},
"consequent": {
"type": "BlockStatement",
"span": {
"start": 274,
"end": 302,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 284,
"end": 286,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 284,
"end": 285,
"ctxt": 0
},
"value": "x",
"optional": false
}
}
]
},
"alternate": {
"type": "BlockStatement",
"span": {
"start": 312,
"end": 352,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 322,
"end": 324,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 322,
"end": 323,
"ctxt": 0
},
"value": "x",
"optional": false
}
}
]
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 365,
"end": 367,
"ctxt": 0
},
"value": "f3",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
"start": 356,
"end": 502,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 370,
"end": 502,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 376,
"end": 402,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 380,
"end": 401,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 380,
"end": 381,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 381,
"end": 401,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsUnionType",
"span": {
"start": 383,
"end": 401,
"ctxt": 0
},
"types": [
{
"type": "TsKeywordType",
"span": {
"start": 383,
"end": 389,
"ctxt": 0
},
"kind": "string"
},
{
"type": "TsKeywordType",
"span": {
"start": 392,
"end": 401,
"ctxt": 0
},
"kind": "undefined"
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "IfStatement",
"span": {
"start": 407,
"end": 500,
"ctxt": 0
},
"test": {
"type": "AssignmentExpression",
"span": {
"start": 411,
"end": 420,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 411,
"end": 412,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "CallExpression",
"span": {
"start": 415,
"end": 420,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 415,
"end": 418,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"arguments": [],
"typeArguments": null
}
},
"consequent": {
"type": "BlockStatement",
"span": {
"start": 422,
"end": 450,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 432,
"end": 434,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 432,
"end": 433,
"ctxt": 0
},
"value": "x",
"optional": false
}
}
]
},
"alternate": {
"type": "BlockStatement",
"span": {
"start": 460,
"end": 500,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 470,
"end": 472,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 470,
"end": 471,
"ctxt": 0
},
"value": "x",
"optional": false
}
}
]
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 513,
"end": 515,
"ctxt": 0
},
"value": "f4",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
"start": 504,
"end": 653,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 518,
"end": 653,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 524,
"end": 550,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 528,
"end": 549,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 528,
"end": 529,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 529,
"end": 549,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsUnionType",
"span": {
"start": 531,
"end": 549,
"ctxt": 0
},
"types": [
{
"type": "TsKeywordType",
"span": {
"start": 531,
"end": 537,
"ctxt": 0
},
"kind": "string"
},
{
"type": "TsKeywordType",
"span": {
"start": 540,
"end": 549,
"ctxt": 0
},
"kind": "undefined"
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "IfStatement",
"span": {
"start": 555,
"end": 651,
"ctxt": 0
},
"test": {
"type": "UnaryExpression",
"span": {
"start": 559,
"end": 571,
"ctxt": 0
},
"operator": "!",
"argument": {
"type": "ParenthesisExpression",
"span": {
"start": 560,
"end": 571,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 561,
"end": 570,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 561,
"end": 562,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "CallExpression",
"span": {
"start": 565,
"end": 570,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 565,
"end": 568,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"arguments": [],
"typeArguments": null
}
}
}
},
"consequent": {
"type": "BlockStatement",
"span": {
"start": 573,
"end": 613,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 583,
"end": 585,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 583,
"end": 584,
"ctxt": 0
},
"value": "x",
"optional": false
}
}
]
},
"alternate": {
"type": "BlockStatement",
"span": {
"start": 623,
"end": 651,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 633,
"end": 635,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 633,
"end": 634,
"ctxt": 0
},
"value": "x",
"optional": false
}
}
]
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 664,
"end": 666,
"ctxt": 0
},
"value": "f5",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
"start": 655,
"end": 902,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 669,
"end": 902,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 675,
"end": 701,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 679,
"end": 700,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 679,
"end": 680,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 680,
"end": 700,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsUnionType",
"span": {
"start": 682,
"end": 700,
"ctxt": 0
},
"types": [
{
"type": "TsKeywordType",
"span": {
"start": 682,
"end": 688,
"ctxt": 0
},
"kind": "string"
},
{
"type": "TsKeywordType",
"span": {
"start": 691,
"end": 700,
"ctxt": 0
},
"kind": "undefined"
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 706,
"end": 732,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 710,
"end": 731,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 710,
"end": 711,
"ctxt": 0
},
"value": "y",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 711,
"end": 731,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsUnionType",
"span": {
"start": 713,
"end": 731,
"ctxt": 0
},
"types": [
{
"type": "TsKeywordType",
"span": {
"start": 713,
"end": 719,
"ctxt": 0
},
"kind": "string"
},
{
"type": "TsKeywordType",
"span": {
"start": 722,
"end": 731,
"ctxt": 0
},
"kind": "undefined"
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "IfStatement",
"span": {
"start": 737,
"end": 900,
"ctxt": 0
},
"test": {
"type": "AssignmentExpression",
"span": {
"start": 741,
"end": 754,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 741,
"end": 742,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "AssignmentExpression",
"span": {
"start": 745,
"end": 754,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 745,
"end": 746,
"ctxt": 0
},
"value": "y",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "CallExpression",
"span": {
"start": 749,
"end": 754,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 749,
"end": 752,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"arguments": [],
"typeArguments": null
}
}
},
"consequent": {
"type": "BlockStatement",
"span": {
"start": 756,
"end": 817,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 766,
"end": 768,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 766,
"end": 767,
"ctxt": 0
},
"value": "x",
"optional": false
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 787,
"end": 789,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 787,
"end": 788,
"ctxt": 0
},
"value": "y",
"optional": false
}
}
]
},
"alternate": {
"type": "BlockStatement",
"span": {
"start": 827,
"end": 900,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 837,
"end": 839,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 837,
"end": 838,
"ctxt": 0
},
"value": "x",
"optional": false
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 870,
"end": 872,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 870,
"end": 871,
"ctxt": 0
},
"value": "y",
"optional": false
}
}
]
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 913,
"end": 915,
"ctxt": 0
},
"value": "f6",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
"start": 904,
"end": 1158,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 918,
"end": 1158,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 924,
"end": 950,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 928,
"end": 949,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 928,
"end": 929,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 929,
"end": 949,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsUnionType",
"span": {
"start": 931,
"end": 949,
"ctxt": 0
},
"types": [
{
"type": "TsKeywordType",
"span": {
"start": 931,
"end": 937,
"ctxt": 0
},
"kind": "string"
},
{
"type": "TsKeywordType",
"span": {
"start": 940,
"end": 949,
"ctxt": 0
},
"kind": "undefined"
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 955,
"end": 981,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 959,
"end": 980,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 959,
"end": 960,
"ctxt": 0
},
"value": "y",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 960,
"end": 980,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsUnionType",
"span": {
"start": 962,
"end": 980,
"ctxt": 0
},
"types": [
{
"type": "TsKeywordType",
"span": {
"start": 962,
"end": 968,
"ctxt": 0
},
"kind": "string"
},
{
"type": "TsKeywordType",
"span": {
"start": 971,
"end": 980,
"ctxt": 0
},
"kind": "undefined"
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "IfStatement",
"span": {
"start": 986,
"end": 1156,
"ctxt": 0
},
"test": {
"type": "SequenceExpression",
"span": {
"start": 990,
"end": 1010,
"ctxt": 0
},
"expressions": [
{
"type": "AssignmentExpression",
"span": {
"start": 990,
"end": 999,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 990,
"end": 991,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "CallExpression",
"span": {
"start": 994,
"end": 999,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 994,
"end": 997,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"arguments": [],
"typeArguments": null
}
},
{
"type": "AssignmentExpression",
"span": {
"start": 1001,
"end": 1010,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 1001,
"end": 1002,
"ctxt": 0
},
"value": "y",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "CallExpression",
"span": {
"start": 1005,
"end": 1010,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 1005,
"end": 1008,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"arguments": [],
"typeArguments": null
}
}
]
},
"consequent": {
"type": "BlockStatement",
"span": {
"start": 1012,
"end": 1073,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 1022,
"end": 1024,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 1022,
"end": 1023,
"ctxt": 0
},
"value": "x",
"optional": false
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 1055,
"end": 1057,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 1055,
"end": 1056,
"ctxt": 0
},
"value": "y",
"optional": false
}
}
]
},
"alternate": {
"type": "BlockStatement",
"span": {
"start": 1083,
"end": 1156,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 1093,
"end": 1095,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 1093,
"end": 1094,
"ctxt": 0
},
"value": "x",
"optional": false
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 1126,
"end": 1128,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 1126,
"end": 1127,
"ctxt": 0
},
"value": "y",
"optional": false
}
}
]
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 1169,
"end": 1171,
"ctxt": 0
},
"value": "f7",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 1172,
"end": 1177,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 1172,
"end": 1177,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1173,
"end": 1177,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 1175,
"end": 1177,
"ctxt": 0
},
"members": []
}
}
}
}
],
"decorators": [],
"span": {
"start": 1160,
"end": 1252,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 1179,
"end": 1252,
"ctxt": 0
},
"stmts": [
{
"type": "IfStatement",
"span": {
"start": 1185,
"end": 1250,
"ctxt": 0
},
"test": {
"type": "Identifier",
"span": {
"start": 1189,
"end": 1190,
"ctxt": 0
},
"value": "x",
"optional": false
},
"consequent": {
"type": "BlockStatement",
"span": {
"start": 1192,
"end": 1216,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 1202,
"end": 1204,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 1202,
"end": 1203,
"ctxt": 0
},
"value": "x",
"optional": false
}
}
]
},
"alternate": {
"type": "BlockStatement",
"span": {
"start": 1226,
"end": 1250,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 1236,
"end": 1238,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 1236,
"end": 1237,
"ctxt": 0
},
"value": "x",
"optional": false
}
}
]
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 1263,
"end": 1265,
"ctxt": 0
},
"value": "f8",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 1269,
"end": 1273,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 1269,
"end": 1273,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1270,
"end": 1273,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 1272,
"end": 1273,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1272,
"end": 1273,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
}
}
],
"decorators": [],
"span": {
"start": 1254,
"end": 1348,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 1275,
"end": 1348,
"ctxt": 0
},
"stmts": [
{
"type": "IfStatement",
"span": {
"start": 1281,
"end": 1346,
"ctxt": 0
},
"test": {
"type": "Identifier",
"span": {
"start": 1285,
"end": 1286,
"ctxt": 0
},
"value": "x",
"optional": false
},
"consequent": {
"type": "BlockStatement",
"span": {
"start": 1288,
"end": 1312,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 1298,
"end": 1300,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 1298,
"end": 1299,
"ctxt": 0
},
"value": "x",
"optional": false
}
}
]
},
"alternate": {
"type": "BlockStatement",
"span": {
"start": 1322,
"end": 1346,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 1332,
"end": 1334,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 1332,
"end": 1333,
"ctxt": 0
},
"value": "x",
"optional": false
}
}
]
}
}
]
},
"generator": false,
"async": false,
"typeParameters": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 1265,
"end": 1268,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 1266,
"end": 1267,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 1266,
"end": 1267,
"ctxt": 0
},
"value": "T",
"optional": false
},
"constraint": null,
"default": null
}
]
},
"returnType": null
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 1359,
"end": 1361,
"ctxt": 0
},
"value": "f9",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 1380,
"end": 1384,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 1380,
"end": 1384,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1381,
"end": 1384,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 1383,
"end": 1384,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1383,
"end": 1384,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
}
}
],
"decorators": [],
"span": {
"start": 1350,
"end": 1462,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 1386,
"end": 1462,
"ctxt": 0
},
"stmts": [
{
"type": "IfStatement",
"span": {
"start": 1392,
"end": 1460,
"ctxt": 0
},
"test": {
"type": "Identifier",
"span": {
"start": 1396,
"end": 1397,
"ctxt": 0
},
"value": "x",
"optional": false
},
"consequent": {
"type": "BlockStatement",
"span": {
"start": 1399,
"end": 1423,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 1409,
"end": 1411,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 1409,
"end": 1410,
"ctxt": 0
},
"value": "x",
"optional": false
}
}
]
},
"alternate": {
"type": "BlockStatement",
"span": {
"start": 1433,
"end": 1460,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 1443,
"end": 1445,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 1443,
"end": 1444,
"ctxt": 0
},
"value": "x",
"optional": false
}
}
]
}
}
]
},
"generator": false,
"async": false,
"typeParameters": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 1361,
"end": 1379,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 1362,
"end": 1378,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 1362,
"end": 1363,
"ctxt": 0
},
"value": "T",
"optional": false
},
"constraint": {
"type": "TsKeywordType",
"span": {
"start": 1372,
"end": 1378,
"ctxt": 0
},
"kind": "object"
},
"default": null
}
]
},
"returnType": null
}
],
"interpreter": null
}