-
Notifications
You must be signed in to change notification settings - Fork 12.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
() => void 0 causes TS7011 with noImplicitAny #36651
Comments
I can't reproduce this in playground https://www.typescriptlang.org/play/?ts=3.8-Beta#code/BQSgBAvAfGBuD2BLAJmADEA or VSCode, how are you seeing the error? |
Web Storm. It's probably a web storm bug, web storm is also bugged on other typescript fronts. (It keeps auto-completing imports from |
You need to enable |
I see. |
This issue has been marked as 'Question' and has seen no recent activity. It has been automatically closed for house-keeping purposes. If you're still waiting on a response, questions are usually better suited to stackoverflow. |
If you want to return undefined, you can simply write an empty arrow function. As functions that don't return nothing actually returns undefined.
|
This function is guaranteed to return
undefined
under any and all conditions. Why is it saying that "Function expression, which lacks return-type annotation, implicitly has an 'any' return type"? When I look at this code, I see function expression, which lacks return-type annotation will always return undefined so why do I need to annotate this with types?The text was updated successfully, but these errors were encountered: