Type Alias CreateTuple<L, T, Fail>

CreateTuple<L, T, Fail>: number extends L
    ? T[]
    : IsPositive<L> extends true
        ? IsInteger<L> extends true
            ? ToTuple<[], DigitArray.FromString<`${L}`>, T>
            : Fail
        : Fail

Creates Tuple<T> with L number of elements.

Type Parameters

  • L extends number
  • T = unknown
  • Fail = never