Skip to content
webtype.orgParameters

    ↑↓ move · ⏎ open · esc close

    Functions

    Parameters

    A function’s parameter list, as a tuple.

    What it is

    The same `infer` trick as `ReturnType`, aimed at the other end of the signature. The result is a tuple, which is what makes it composable: spread it, append to it, drop its head, and hand the result back to another signature.

    Examples

    • Parameters<typeof send>
      [to: string, retries: number]
    • Parameters<() => void>
      []
    • Parameters<(first: string, ...rest: number[]) => void>
      [first: string, ...rest: number[]]

      Rest parameters survive as a rest element, so the tuple stays as expressive as the signature was.

    Each resolved type above was printed by TypeScript 5.9.3, not written by hand.

    What it does not do

    • It does not keep the parameter names as anything you can read. They show in tooltips as tuple labels, but no type-level operation can get at them.
    • It does not handle overloads any better than `ReturnType` does — the last signature wins.

    Takeaway

    A parameter list is a tuple, and every tuple technique in the archive applies to it. That equivalence is why variadic tuples were added to the language.