Type alias Initial<Input>

Initial<Input>: First<InitialAndLast<Input>>

Initial values of an ArrayLike (omitting the last).

Remarks

Given a type argument (an ArrayLike), this returns the type of the items from the start of the ArrayLike until the before to last item.

Example

const array = ["🟢", "🟩", "💚"];
const initial: Initial<typeof array> = ["🟢", "🟩"];

See

Type Parameters

  • Input extends ArrayLike

    ArrayLike value (such as Array or string).