import { NonFunctionPropNames } from './NonFunctionPropNames'; /** * Mark a type and all its (sub) properties as read-only. */ export type DeepReadonly = T extends any[] ? DeepReadonlyArray : T extends object ? DeepReadonlyObject : T; interface DeepReadonlyArray extends ReadonlyArray> {} type DeepReadonlyObject = { +readonly [P in NonFunctionPropNames]: DeepReadonly; };