Skip to main content

Type Alias: DeepReadonly<T>

DeepReadonly<T>: T extends Builtin ? T : T extends AbstractConstructor<unknown> | (...args: any[]) => unknown ? T : T extends ReadonlyMap<infer K, infer V> ? ReadonlyMap<DeepReadonly<K>, DeepReadonly<V>> : T extends ReadonlySet<infer U> ? ReadonlySet<DeepReadonly<U>> : T extends readonly [] | readonly [...never[]] ? readonly [] : T extends readonly [infer U, ...(infer V)] ? readonly [DeepReadonly<U>, ...DeepReadonly<V>] : T extends readonly [...(infer U), infer V] ? readonly [...DeepReadonly<(...)>, DeepReadonly<V>] : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepReadonly<U>> : T extends object ? { readonly [K in keyof (...)]: DeepReadonly<(...)> } : unknown

Type Parameters

Type Parameter
T

Defined in

types.ts:6