Closed
Description
This would be the analog of the error for additional properties in object literals for function return values.
TypeScript Version: 2.5.3 / nightly (2.6.0-dev.20171007)
Code
declare function voidCallback(cb: () => void)
// actual: no error
// expected: error: callback ignores return value
voidCallback(() => 23)
const f = () => 45
// should still work:
voidCallback(f)
voidCallback(() => {
// should still be allowed for flow control
return
})