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
I acknowledge that issues using this template may be closed without further explanation at the maintainer's discretion.
Comment
In the code below, mainBar and mainQux are exhibiting errors as if the return type of bar() and qux() were 'undefined'.
Is it by intention or is it kind of a bug?
If it's so by intention, What's inferred differently?
Duplicate of #46254 and others. It's a known design limitation that all identifiers in a call expression must have explicit type annotations in order for the call to affect control flow, but the type of bar in your example is inferred (the : never return annotation applies to the arrow function expression itself, so doesn't count).
Acknowledgement
Comment
In the code below, mainBar and mainQux are exhibiting errors as if the return type of bar() and qux() were 'undefined'.
Is it by intention or is it kind of a bug?
If it's so by intention, What's inferred differently?
(playground)
The text was updated successfully, but these errors were encountered: