• Safely access an index of an array. If the accessed index is undefined, throws an error. Satisfies noUncheckedIndexedAccess of tsconfig.

    Type Parameters

    • T

    Parameters

    • array: T[]

      Array to access

    • index: number

      Index of Array to access

    Returns T