11. 实现ConstructorParameters<T>
分享给更多人
-通过 / -执行
Parameters<T>处理的是function type。
与之类似,ConstructorParameters<T>
针对的是class,返回constructor function T的其参数type组成的tuple type。
请自行实现MyConstructorParameters<T>
。
class Foo { constructor (a: string, b: number, c: boolean) {}}type C = MyConstructorParameters<typeof Foo>