Type Alias PadStart<A, MaxLength, PadWith>

PadStart<A, MaxLength, PadWith>: MaxLength extends 0
    ? A
    : CanAssign<PadWith, UnionOfValues<A>> extends true
        ? A
        : ArrayPlus.PadStart<[...CreateTuple<MaxLength, PadWith>, ...A], MaxLength, PadWith>

Type Parameters

  • A extends readonly unknown[]
  • MaxLength extends number
  • PadWith = unknown