• Returns the last item of the array

    Example

    last([1, 2, 3]); // 3
    

    Type Parameters

    • T extends unknown[]

    Parameters

    • array: T

    Returns T extends [...(infer I), infer L] ? L : T extends (infer P)[] ? P : never

Generated using TypeDoc