• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1{
2  "type": "Program",
3  "statements": [
4    {
5      "type": "FunctionDeclaration",
6      "function": {
7        "type": "ScriptFunction",
8        "id": {
9          "type": "Identifier",
10          "name": "foo",
11          "decorators": [],
12          "loc": {
13            "start": {
14              "line": 17,
15              "column": 10
16            },
17            "end": {
18              "line": 17,
19              "column": 13
20            }
21          }
22        },
23        "generator": false,
24        "async": false,
25        "expression": false,
26        "params": [],
27        "returnType": {
28          "type": "TSNeverKeyword",
29          "loc": {
30            "start": {
31              "line": 17,
32              "column": 17
33            },
34            "end": {
35              "line": 17,
36              "column": 22
37            }
38          }
39        },
40        "body": {
41          "type": "BlockStatement",
42          "statements": [],
43          "loc": {
44            "start": {
45              "line": 17,
46              "column": 23
47            },
48            "end": {
49              "line": 18,
50              "column": 2
51            }
52          }
53        },
54        "loc": {
55          "start": {
56            "line": 17,
57            "column": 1
58          },
59          "end": {
60            "line": 18,
61            "column": 2
62          }
63        }
64      },
65      "loc": {
66        "start": {
67          "line": 17,
68          "column": 1
69        },
70        "end": {
71          "line": 18,
72          "column": 2
73        }
74      }
75    }
76  ],
77  "loc": {
78    "start": {
79      "line": 1,
80      "column": 1
81    },
82    "end": {
83      "line": 19,
84      "column": 1
85    }
86  }
87}
88TypeError: A function returning 'never' cannot have a reachable end point. [function_declaration_11.ts:17:17]
89