{ "type": "Program", "statements": [ { "type": "FunctionDeclaration", "function": { "type": "ScriptFunction", "id": { "type": "Identifier", "name": "foo", "decorators": [], "loc": { "start": { "line": 17, "column": 10 }, "end": { "line": 17, "column": 13 } } }, "generator": false, "async": false, "expression": false, "params": [], "returnType": { "type": "TSNeverKeyword", "loc": { "start": { "line": 17, "column": 17 }, "end": { "line": 17, "column": 22 } } }, "body": { "type": "BlockStatement", "statements": [], "loc": { "start": { "line": 17, "column": 23 }, "end": { "line": 18, "column": 2 } } }, "loc": { "start": { "line": 17, "column": 1 }, "end": { "line": 18, "column": 2 } } }, "loc": { "start": { "line": 17, "column": 1 }, "end": { "line": 18, "column": 2 } } } ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 19, "column": 1 } } } TypeError: A function returning 'never' cannot have a reachable end point. [function_declaration_11.ts:17:17]