Recursively removes the ? optional modifier from all properties of an object or array.
Handles Map and Set types by applying DeepRequired to their keys/values.
Primitives and functions are returned as is.
Note: passing any yields a union of both conditional branches
(standard TypeScript behavior for any in conditional types).
Type Parameters
T
The type to make deeply required.
Returns
A new type with all nested properties marked as required.
Recursively removes the
?optional modifier from all properties of an object or array. Handles Map and Set types by applyingDeepRequiredto their keys/values. Primitives and functions are returned as is. Note: passinganyyields a union of both conditional branches (standard TypeScript behavior foranyin conditional types).