import { Builtin } from "../built-in"; import { IsTuple } from "../is-tuple"; import { IsUnknown } from "../is-unknown"; export type DeepPartial = Type extends Exclude ? Type : Type extends Map ? Map, DeepPartial> : Type extends ReadonlyMap ? ReadonlyMap, DeepPartial> : Type extends WeakMap ? WeakMap, DeepPartial> : Type extends Set ? Set> : Type extends ReadonlySet ? ReadonlySet> : Type extends WeakSet ? WeakSet> : Type extends ReadonlyArray ? Type extends IsTuple ? { [Key in keyof Type]?: DeepPartial; } : Type extends Array ? Array | undefined> : ReadonlyArray | undefined> : Type extends Promise ? Promise> : Type extends {} ? { [Key in keyof Type]?: DeepPartial; } : IsUnknown extends true ? unknown : Partial;