Problem Statement
Extract function parameter types:
Explanation
Parameters<T> gives the parameter tuple type of a function. ConstructorParameters<T> does the same for class constructors.
Code Solution
SolutionRead Only
function f(a: string, b: number) {}
type P = Parameters<typeof f>; // [string, number]