Parameters<T>

The utility type that gives a function type's parameter list as a tuple, such as [orderId: string, priority: boolean].

In more detail

A wrapper typed (...args: Parameters<F>) => ReturnType<F> accepts exactly the same arguments as the function it wraps and keeps its auto-complete. Like ReturnType, it is built from a conditional type with infer.

Related terms

Taught in

References