Converts a type T that may have optional, nullable properties into a new type with only required properties, while also subtracting null from all possible property values.
T
null
type Foo = { bar?: string | undefined | null };type RequiredNonNullableFoo = RequiredNonNullable<Foo>;// RequiredNonNullableFoo -> { bar: string }; Copy
type Foo = { bar?: string | undefined | null };type RequiredNonNullableFoo = RequiredNonNullable<Foo>;// RequiredNonNullableFoo -> { bar: string };
Converts a type
Tthat may have optional, nullable properties into a new type with only required properties, while also subtractingnullfrom all possible property values.