TypeScript · Generics and utility types

Parameters<T>

A tuple of a function’s parameter types.

Syntax
Parameters<typeof fn>

Example

Example
function move(x: number, y: number) {}
type Args = Parameters<typeof move>;

More in this group

as const Awaited<T> Generic constraint Generic function Indexed access keyof Partial<T> Pick<T, K> / Omit<T, K>

Learn this in the course

Reference pages are the quick answer. The course explains the why, shows the full example and ends with a challenge.

Open the course