import { Builtin } from "../built-in"; import { IsUnknown } from "../is-unknown"; export type DeepWritable = Type extends Exclude ? Type : Type extends Map ? Map, DeepWritable> : Type extends ReadonlyMap ? Map, DeepWritable> : Type extends WeakMap ? WeakMap, DeepWritable> : Type extends Set ? Set> : Type extends ReadonlySet ? Set> : Type extends WeakSet ? WeakSet> : Type extends Promise ? Promise> : Type extends {} ? { -readonly [Key in keyof Type]: DeepWritable; } : IsUnknown extends true ? unknown : Type;