TypeScript·

3312 - Parameters

  • #Type Challenges
  • #TypeScript

질문

내장 제네릭 Parameters<T>를 이를 사용하지 않고 구현하세요.

예시:

1
const foo = (arg1: string, arg2: number): void => {}
2
3
type FunctionParamsType = MyParameters<typeof foo> // [arg1: string, arg2: number]
4
5

풀이