Makes all shallow properties of an object optional if they accept undefined or null as a value.
optional
undefined
null
type MyOptionalType = MakeUndefinedOptional<{ id: number | undefined, firstName: string, lastName: string | null,}>;// is equal totype MyOptionalType = { // this property is optional. id?: number | undefined, firstName: string, // this property is optional. lastName?: string | null,};
Generated using TypeDoc
Makes all shallow properties of an object
optional
if they acceptundefined
ornull
as a value.Example