Type alias Head<Input>

Head<Input>: First<HeadAndTail<Input>>

Initial value of an ArrayLike.

Remarks

Given a type argument (an ArrayLike), this returns the type of the item in index 0.

Example

const array = ["🟢", "🟩", "💚"];
const head: Head<typeof array> = "🟢";

See

Type Parameters

  • Input extends ArrayLike

    ArrayLike value (such as Array or string).