{ "type": "Program", "statements": [ { "type": "ClassDeclaration", "definition": { "id": { "type": "Identifier", "name": "ETSGLOBAL", "decorators": [], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 1 } } }, "superClass": null, "implements": [], "body": [ { "type": "MethodDefinition", "key": { "type": "Identifier", "name": "_$init$_", "decorators": [], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 1 } } }, "kind": "method", "accessibility": "public", "static": true, "optional": false, "computed": false, "value": { "type": "FunctionExpression", "function": { "type": "ScriptFunction", "id": { "type": "Identifier", "name": "_$init$_", "decorators": [], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 1 } } }, "generator": false, "async": false, "expression": false, "params": [], "body": { "type": "BlockStatement", "statements": [], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 1 } } }, "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 1 } } }, "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 1 } } }, "overloads": [], "decorators": [], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 1 } } }, { "type": "MethodDefinition", "key": { "type": "Identifier", "name": "foo", "decorators": [], "loc": { "start": { "line": 16, "column": 10 }, "end": { "line": 16, "column": 13 } } }, "kind": "method", "accessibility": "public", "static": true, "optional": false, "computed": false, "value": { "type": "FunctionExpression", "function": { "type": "ScriptFunction", "id": { "type": "Identifier", "name": "foo", "decorators": [], "loc": { "start": { "line": 16, "column": 10 }, "end": { "line": 16, "column": 13 } } }, "generator": false, "async": false, "expression": false, "params": [], "body": { "type": "BlockStatement", "statements": [], "loc": { "start": { "line": 16, "column": 15 }, "end": { "line": 16, "column": 17 } } }, "loc": { "start": { "line": 16, "column": 13 }, "end": { "line": 16, "column": 17 } } }, "loc": { "start": { "line": 16, "column": 13 }, "end": { "line": 16, "column": 17 } } }, "overloads": [], "decorators": [], "loc": { "start": { "line": 16, "column": 1 }, "end": { "line": 16, "column": 17 } } }, { "type": "MethodDefinition", "key": { "type": "Identifier", "name": "main", "decorators": [], "loc": { "start": { "line": 18, "column": 10 }, "end": { "line": 18, "column": 14 } } }, "kind": "method", "accessibility": "public", "static": true, "optional": false, "computed": false, "value": { "type": "FunctionExpression", "function": { "type": "ScriptFunction", "id": { "type": "Identifier", "name": "main", "decorators": [], "loc": { "start": { "line": 18, "column": 10 }, "end": { "line": 18, "column": 14 } } }, "generator": false, "async": false, "expression": false, "params": [], "body": { "type": "BlockStatement", "statements": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "x", "decorators": [], "loc": { "start": { "line": 19, "column": 9 }, "end": { "line": 19, "column": 10 } } }, "init": { "type": "NumberLiteral", "value": 1, "loc": { "start": { "line": 19, "column": 13 }, "end": { "line": 19, "column": 14 } } }, "loc": { "start": { "line": 19, "column": 9 }, "end": { "line": 19, "column": 14 } } } ], "kind": "let", "loc": { "start": { "line": 19, "column": 5 }, "end": { "line": 19, "column": 15 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "y", "decorators": [], "loc": { "start": { "line": 20, "column": 9 }, "end": { "line": 20, "column": 10 } } }, "init": { "type": "ConditionalExpression", "test": { "type": "BinaryExpression", "operator": "<", "left": { "type": "Identifier", "name": "x", "decorators": [], "loc": { "start": { "line": 20, "column": 13 }, "end": { "line": 20, "column": 14 } } }, "right": { "type": "NumberLiteral", "value": 2, "loc": { "start": { "line": 20, "column": 15 }, "end": { "line": 20, "column": 16 } } }, "loc": { "start": { "line": 20, "column": 13 }, "end": { "line": 20, "column": 16 } } }, "consequent": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "foo", "decorators": [], "loc": { "start": { "line": 20, "column": 17 }, "end": { "line": 20, "column": 20 } } }, "arguments": [], "optional": false, "loc": { "start": { "line": 20, "column": 17 }, "end": { "line": 20, "column": 22 } } }, "alternate": { "type": "NumberLiteral", "value": 1, "loc": { "start": { "line": 20, "column": 23 }, "end": { "line": 20, "column": 24 } } }, "loc": { "start": { "line": 20, "column": 13 }, "end": { "line": 20, "column": 24 } } }, "loc": { "start": { "line": 20, "column": 9 }, "end": { "line": 20, "column": 24 } } } ], "kind": "let", "loc": { "start": { "line": 20, "column": 5 }, "end": { "line": 20, "column": 25 } } } ], "loc": { "start": { "line": 18, "column": 16 }, "end": { "line": 21, "column": 2 } } }, "loc": { "start": { "line": 18, "column": 14 }, "end": { "line": 21, "column": 2 } } }, "loc": { "start": { "line": 18, "column": 14 }, "end": { "line": 21, "column": 2 } } }, "overloads": [], "decorators": [], "loc": { "start": { "line": 18, "column": 1 }, "end": { "line": 21, "column": 2 } } } ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 1 } } }, "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 1 } } } ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 22, "column": 1 } } } TypeError: Cannot use type 'void' as value. [ConditionalExpressionCallVoidNeg.sts:20:17]