TypeScript/tests/baselines/reference/functionWithThrowButNoReturn1.errors.txt
2014-09-12 13:35:07 -07:00

11 lines
No EOL
529 B
Text

tests/cases/compiler/functionWithThrowButNoReturn1.ts(1,16): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement.
==== tests/cases/compiler/functionWithThrowButNoReturn1.ts (1 errors) ====
function fn(): number {
~~~~~~
!!! error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement.
throw new Error('NYI');
var t;
}