Type Alias DeepReadonlyTupleOrArray<T>

DeepReadonlyTupleOrArray<T>: T extends [infer V0]
    ? readonly [DeepReadonly<V0>]
    : T extends [infer V0, infer V1]
        ? readonly [DeepReadonly<V0>, DeepReadonly<V1>]
        : T extends [infer V0, infer V1, infer V2]
            ? readonly [DeepReadonly<V0>, DeepReadonly<V1>, DeepReadonly<V2>]
            : T extends [infer V0, infer V1, infer V2, infer V3]
                ? readonly [DeepReadonly<V0>, DeepReadonly<V1>, DeepReadonly<V2>, DeepReadonly<V3>]
                : T extends [infer V0, infer V1, infer V2, infer V3, infer V4]
                    ? readonly [DeepReadonly<V0>, DeepReadonly<V1>, DeepReadonly<V2>, DeepReadonly<V3>, DeepReadonly<V4>]
                    : DeepReadonlyArray<T[number]>

Recursively marks a tuple (up to 5 in length) or an array as read only.

Type Parameters

  • T extends any[]