BugDomain: check: Control FlowHelp Wanted
Métricas do repositório
- Stars
- (48.455 stars)
- Métricas de merge de PR
- (Mesclagem média 6d 17h) (9 fundiu PRs em 30d)
Description
🔎 Search Terms
logical and, generic, NonNullable
🕗 Version & Regression Information
There has been this problem since 4.8.4 (I tried it on the playground)
⏯ Playground Link
💻 Code
const f = <T,>(x: T) => x && x // <T>(x: T) => NonNullable<T>
🙁 Actual behavior
Since f returns NonNullable<T>, we can make every value NonNullable, and never can be created by calling f(null).
🙂 Expected behavior
f should return T.
Additional information about the issue
No response