Type Alias _D<A, B, C, DeleteCount, Insert>

_D<A, B, C, DeleteCount, Insert>: DeleteCount extends C["length"]
    ? IsTuple<Insert, {
        $else: [[...B, ...A], C];
        $then: [[...B, ...Insert, ...A], C];
    }>
    : A extends readonly [infer Head, ...(infer Tail)]
        ? ArrayPlus.SplitAt._D<Tail, B, [...C, Head], DeleteCount, Insert>
        : IsTuple<Insert, {
            $else: [B, C];
            $then: [[...Insert, ...B], C];
        }>

Type Parameters

  • A extends readonly unknown[]
  • B extends readonly unknown[]
  • C extends readonly unknown[]
  • DeleteCount
  • Insert extends readonly unknown[]