9 lines
270 B
TypeScript
9 lines
270 B
TypeScript
/**
|
|
* Recursively remove the `readonly` directive from an object properties or tuple items
|
|
*
|
|
* @param O Object / Tuple
|
|
* @return Object / Tuple
|
|
*/
|
|
export declare type DeepWriteable<O> = O extends object ? {
|
|
-readonly [K in keyof O]: DeepWriteable<O[K]>;
|
|
} : O;
|