• Returns all the elements of an array except the last one

    Example

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

    Type Parameters

    • T extends unknown[]

    Parameters

    • array: T

    Returns T extends [...(infer F), unknown] ? F : T

Generated using TypeDoc