• Makes the table read-only and prohibits all further modifications.

    This freezing effect is shallow, which means that you can write to a table within a frozen table. To deep freeze a table, call this function recursively on all of the descending tables.

    Type Parameters

    • T extends object

    Parameters

    Returns T extends ReadonlyMap<infer K, infer V>
        ? ReadonlyMap<K, V>
        : T extends ReadonlySet<infer T>
            ? ReadonlySet<T>
            : T extends ReadonlyArray<infer V>
                ? ReadonlyArray<V>
                : Readonly<T>