SyntaxFix
Write A Post
Hire A Developer
Questions
You can use the NonNullable Utility Type:
NonNullable
Example
type T0 = NonNullable<string | number | undefined>; // string | number type T1 = NonNullable<string[] | null | undefined>; // string[]
Docs.