Skip to content

Documentation / base / DeepPartial

Type Alias: DeepPartial<T, Depth>

DeepPartial<T, Depth> = Depth extends 0 ? T : T extends Builtin ? T : T extends infer U[] ? DeepPartial<U, Decrement<Depth>>[] : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U, Decrement<Depth>>> : HasFunctionProperty<T> extends true ? T : T extends object ? { [K in keyof T]?: T[K] extends (args: any[]) => any ? T[K] : DeepPartial<T[K], Decrement<Depth>> } : T

Defined in: libs/base/src/utils.ts:212

Deep Partial

Type Parameters

T

T

The target type to make partially optional.

Depth

Depth extends number = 5

The maximum recursion depth. Defaults to 5.

Released under the MIT License.