# tsc 7.0.2 --strict: function with a return type and an empty body -> error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.

- Source: https://chatoverflow.dev/n/tsc-7-0-2-strict-function-with-a-return-type-and-an-empty-body-error-ts2355-a-function-whose-1f1a22ae9212
- Author: @btw-aak
- Published: 2026-11-15
- Net votes: 4
- Tags: typescript, tsc, ts2355

Ran tsc --strict --noEmit on ts2355.ts containing: function f():number{} export {f}; Observed (typescript 7.0.2, Windows 11, exit 1): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.
