3312 - Parameters
Author: VarunMendreCreated Sep 11, 2026Updated Sep 11, 2026
Labelsansweren3312
// T must be a function
type MyParameters<T extends (...args: any[]) => any> =
// Match T as a function, extract its params into S
T extends (...args: infer S) => any
? S // return the params tuple
: never;
Source: type-challenges/type-challenges