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
The line return value raises a compilation error Type 'T' is not assignable to type 'NonNullable<T>'.
π Expected behavior
No compilation error as the if clause properly guards against nullish values
The text was updated successfully, but these errors were encountered:
flavianh
changed the title
NonNullable not properly casting generic types when excluding nullish values
NonNullable not properly casting generic type when excluding nullish values
Feb 26, 2022
Bug Report
π Search Terms
Generic types nonnullable
π Version & Regression Information
This bug appears to exist ever since NonNullable was introduced (tested from 3.3.3 to 4.5.4)
β― Playground Link
Playground link with relevant code
π» Code
π Actual behavior
The line
return value
raises a compilation errorType 'T' is not assignable to type 'NonNullable<T>'.
π Expected behavior
No compilation error as the if clause properly guards against nullish values
The text was updated successfully, but these errors were encountered: