10. 请实现Parameters<T>
分享给更多人
-通过 / -执行
对于function type T, Parameters<T>
返回一个由其参数type组成的tuple type。
请自行实现MyParameters<T>
。
type Foo = (a: string, b: number, c: boolean) => stringtype A = MyParameters<Foo> // [a:string, b: number, c:boolean]type B = A[0] // stringtype C = MyParameters<{a: string}> // Error