Skip to main content

Type Alias: DeepReadonly<T>

DeepReadonly<T> = T extends infer U[] ? readonly DeepReadonly<U>[] : { readonly [P in keyof T as P]: DeepReadonly<T[P]> }

Defined in: src/sdk/utils/types/UtilityTypes.ts:5

Applies the readonly modifier recursively to all properties of a type. Primitive types are left unchanged. Array types are converted to their readonly versions.

Type Parameters

Type Parameter
T