RequiredNonOptional<T>:T extends object ? { [P in keyof T]-?: NonOptional<T[P]> } : T
Converts a type T that may have optional properties into a type T with only required
properties (e.g. undefined values are not allowed). Explicit nulls in value unions
will still be possible. This is similar to the Required builtin mapped type, but also
subtracts undefined from value union types as well as the optional property declaration.
Converts a type
Tthat may have optional properties into a typeTwith only required properties (e.g.undefinedvalues are not allowed). Explicitnulls in value unions will still be possible. This is similar to theRequiredbuiltin mapped type, but also subtractsundefinedfrom value union types as well as the optional property declaration.