import { NonFunctionPropNames } from './NonFunctionPropNames'; /** * Mark a type and all its (sub) properties as mutable. */ export type DeepMutable = T extends any[] ? DeepMutableArray : T extends object ? DeepMutableObject : T; interface DeepMutableArray extends Array> {} type DeepMutableObject = { -readonly [P in NonFunctionPropNames]: DeepMutable; };