{ "type": "Program", "statements": [ { "type": "FunctionDeclaration", "function": { "type": "ScriptFunction", "id": { "type": "Identifier", "name": "foo", "loc": { "start": { "line": 17, "column": 10 }, "end": { "line": 17, "column": 13 } } }, "generator": false, "async": false, "expression": false, "params": [ { "type": "Identifier", "name": "testBool", "typeAnnotation": { "type": "TSBooleanKeyword", "loc": { "start": { "line": 17, "column": 24 }, "end": { "line": 17, "column": 31 } } }, "loc": { "start": { "line": 17, "column": 14 }, "end": { "line": 17, "column": 22 } } } ], "body": { "type": "BlockStatement", "statements": [ { "type": "ReturnStatement", "argument": { "type": "ConditionalExpression", "test": { "type": "Identifier", "name": "testBool", "loc": { "start": { "line": 18, "column": 12 }, "end": { "line": 18, "column": 20 } } }, "consequent": { "type": "ArrowFunctionExpression", "function": { "type": "ScriptFunction", "id": null, "generator": false, "async": false, "expression": true, "params": [ { "type": "Identifier", "name": "x", "typeAnnotation": { "type": "TSNumberKeyword", "loc": { "start": { "line": 18, "column": 27 }, "end": { "line": 18, "column": 33 } } }, "loc": { "start": { "line": 18, "column": 24 }, "end": { "line": 18, "column": 25 } } }, { "type": "Identifier", "name": "y", "typeAnnotation": { "type": "TSNumberKeyword", "loc": { "start": { "line": 18, "column": 38 }, "end": { "line": 18, "column": 44 } } }, "loc": { "start": { "line": 18, "column": 35 }, "end": { "line": 18, "column": 36 } } } ], "body": { "type": "ConditionalExpression", "test": { "type": "BinaryExpression", "operator": "<", "left": { "type": "Identifier", "name": "x", "loc": { "start": { "line": 18, "column": 50 }, "end": { "line": 18, "column": 51 } } }, "right": { "type": "Identifier", "name": "y", "loc": { "start": { "line": 18, "column": 54 }, "end": { "line": 18, "column": 55 } } }, "loc": { "start": { "line": 18, "column": 50 }, "end": { "line": 18, "column": 55 } } }, "consequent": { "type": "Identifier", "name": "x", "loc": { "start": { "line": 18, "column": 58 }, "end": { "line": 18, "column": 59 } } }, "alternate": { "type": "Identifier", "name": "y", "loc": { "start": { "line": 18, "column": 62 }, "end": { "line": 18, "column": 63 } } }, "loc": { "start": { "line": 18, "column": 49 }, "end": { "line": 18, "column": 64 } } }, "loc": { "start": { "line": 18, "column": 23 }, "end": { "line": 18, "column": 64 } } }, "loc": { "start": { "line": 18, "column": 23 }, "end": { "line": 18, "column": 64 } } }, "alternate": { "type": "ArrowFunctionExpression", "function": { "type": "ScriptFunction", "id": null, "generator": false, "async": false, "expression": true, "params": [ { "type": "Identifier", "name": "x", "typeAnnotation": { "type": "TSNumberKeyword", "loc": { "start": { "line": 18, "column": 71 }, "end": { "line": 18, "column": 77 } } }, "loc": { "start": { "line": 18, "column": 68 }, "end": { "line": 18, "column": 69 } } }, { "type": "Identifier", "name": "y", "typeAnnotation": { "type": "TSNumberKeyword", "loc": { "start": { "line": 18, "column": 82 }, "end": { "line": 18, "column": 88 } } }, "loc": { "start": { "line": 18, "column": 79 }, "end": { "line": 18, "column": 80 } } } ], "body": { "type": "ConditionalExpression", "test": { "type": "BinaryExpression", "operator": ">", "left": { "type": "Identifier", "name": "x", "loc": { "start": { "line": 18, "column": 94 }, "end": { "line": 18, "column": 95 } } }, "right": { "type": "Identifier", "name": "y", "loc": { "start": { "line": 18, "column": 98 }, "end": { "line": 18, "column": 99 } } }, "loc": { "start": { "line": 18, "column": 94 }, "end": { "line": 18, "column": 99 } } }, "consequent": { "type": "Identifier", "name": "x", "loc": { "start": { "line": 18, "column": 102 }, "end": { "line": 18, "column": 103 } } }, "alternate": { "type": "Identifier", "name": "y", "loc": { "start": { "line": 18, "column": 106 }, "end": { "line": 18, "column": 107 } } }, "loc": { "start": { "line": 18, "column": 93 }, "end": { "line": 18, "column": 108 } } }, "loc": { "start": { "line": 18, "column": 67 }, "end": { "line": 18, "column": 108 } } }, "loc": { "start": { "line": 18, "column": 67 }, "end": { "line": 18, "column": 108 } } }, "loc": { "start": { "line": 18, "column": 12 }, "end": { "line": 18, "column": 108 } } }, "loc": { "start": { "line": 18, "column": 5 }, "end": { "line": 18, "column": 108 } } } ], "loc": { "start": { "line": 17, "column": 33 }, "end": { "line": 19, "column": 2 } } }, "loc": { "start": { "line": 17, "column": 1 }, "end": { "line": 19, "column": 2 } } }, "loc": { "start": { "line": 17, "column": 1 }, "end": { "line": 19, "column": 2 } } } ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 20, "column": 1 } } }