Function tuple

  • Let Typescript see that you're working with tuples!

    Type Parameters

    • T extends any[]

    Parameters

    • Rest...args: T

      A spread array to interpret as a tuple

    Returns T

    The given arg, its type now interpreted as a tuple