Type alias Last<Input>

Last<Input>: InitialAndLast<Input>[1]

Last value of an array or string.

Example

const array = ["🟢", "🟩", "💚"];
const last: Last<typeof array> = "💚";

Type Parameters

  • Input extends ArrayLike<unknown>