Type alias Second<Input>

Second<Input>: Input[1]

Second value of an ArrayLike.

Remarks

Type of the Second item of an ArrayLike, manly here to avoid magic numbers.

Example

const array = ["🟢", "🟩", "💚"];
const second: Second<typeof array> = "🟩";

See

Type Parameters

  • Input extends ArrayLike

    The input ArrayLike.