Type alias DeepReadonly<T>

DeepReadonly<T>: T extends object
    ? {
        readonly [k in keyof T]: DeepReadonly<T[k]>
    }
    : Readonly<T>

Recursively make everything readonly in the type. To simulate 'true' const types.

Type Parameters

  • T

Generated using TypeDoc