BugDomain: check: Control FlowHelp Wanted
Repository metrics
- Stars
- Â (48,455 stars)
- PR merge metrics
-  (å¹³åããŒãž 6d 17h) (30d ã§ 9 merged PRs)
説æ
ð 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