1 | import { _Pick } from './Pick';
|
2 | import { Depth } from './_Internal';
|
3 | import { Key } from '../Any/Key';
|
4 | import { PatchFlat } from './Patch';
|
5 | import { BuiltIn } from '../Misc/BuiltIn';
|
6 |
|
7 |
|
8 |
|
9 | export declare type WritableFlat<O> = {
|
10 | -readonly [K in keyof O]: O[K];
|
11 | } & {};
|
12 |
|
13 |
|
14 |
|
15 | export declare type WritableDeep<O> = {
|
16 | -readonly [K in keyof O]: O[K] extends BuiltIn ? O[K] : WritableDeep<O[K]>;
|
17 | };
|
18 |
|
19 |
|
20 |
|
21 | export declare type WritablePart<O extends object, depth extends Depth> = {
|
22 | 'flat': WritableFlat<O>;
|
23 | 'deep': WritableDeep<O>;
|
24 | }[depth];
|
25 |
|
26 |
|
27 |
|
28 | export declare type _Writable<O extends object, K extends Key, depth extends Depth> = PatchFlat<WritablePart<_Pick<O, K>, depth>, O>;
|
29 |
|
30 |
|
31 |
|
32 |
|
33 |
|
34 |
|
35 |
|
36 |
|
37 |
|
38 |
|
39 | export declare type Writable<O extends object, K extends Key = Key, depth extends Depth = 'flat'> = O extends unknown ? _Writable<O, K, depth> : never;
|