14. 实现ThisParameterType<T>
分享给更多人
-通过 / -执行
对于function type T,ThisParameterType<T>返回this type。
如果没有指定,则使用unknown。
请自行实现MyThisParameterType<T>。
function Foo(this: {a: string}) {}function Bar() {}type A = MyThisParameterType<typeof Foo> // {a: string}type B = MyThisParameterType<typeof Bar> // unknown