You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
declarefunctionvoidCallback(cb: ()=>void)// actual: no error// expected: error: callback ignores return value voidCallback(()=>23)constf=()=>45// should still work:voidCallback(f)voidCallback(()=>{// should still be allowed for flow controlreturn})
The text was updated successfully, but these errors were encountered:
Yeah they are similar, but if I'm not mistaken in this case returning a value is definitely useless (like for object literals) while those are describing more general cases of not using return values.
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
The text was updated successfully, but these errors were encountered: