Recursively applies the ? optional modifier to all properties of an UnknownRecord or array.
Handles Map and Set types by applying DeepPartial 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 partial.
Returns
A new type with all nested properties marked as optional.
Recursively applies the
?optional modifier to all properties of an UnknownRecord or array. Handles Map and Set types by applyingDeepPartialto their keys/values. Primitives and functions are returned as is. Note: passinganyyields a union of both conditional branches (standard TypeScript behavior foranyin conditional types).