@metreeca/core - v0.12.0
    Preparing search index...

    Type Alias DeepReadonly<T>

    DeepReadonly: T extends Atomic
        ? T
        : T extends object ? { readonly [K in keyof T]: DeepReadonly<T[K]> } : T

    A deeply read-only view of a value.

    Marks every property read-only at any nesting depth, arrays and tuples included, and carries an Atomic through unchanged: a caller holding a frozen structure is refused a write by the compiler, rather than by an assignment that throws at run time. Take this view where a structure is handed out for reading only: immutable keeps the declared type of its argument, so the constraint holds only where the type states it.

    Type Parameters

    • T

      The type to be viewed as deeply read-only