import { Builtin } from "../built-in"; import { IsTuple } from "../is-tuple"; export type DeepRequired = Type extends Error ? Required : Type extends Builtin ? Type : Type extends Map ? Map, DeepRequired> : Type extends ReadonlyMap ? ReadonlyMap, DeepRequired> : Type extends WeakMap ? WeakMap, DeepRequired> : Type extends Set ? Set> : Type extends ReadonlySet ? ReadonlySet> : Type extends WeakSet ? WeakSet> : Type extends Promise ? Promise> : Type extends ReadonlyArray ? Type extends IsTuple ? { [Key in keyof Type]-?: DeepRequired; } : Type extends Array ? Array, undefined>> : ReadonlyArray, undefined>> : Type extends {} ? { [Key in keyof Type]-?: DeepRequired; } : Required;