14. ThisParameterType<T>を実装する

TypeScript

  - accepted / - tried

function type T に対して、 ThisParameterType<T>thistypeを返す。 指定していない場合はunknownになる。

MyThisParameterType<T>を実装してみてください。

function Foo(this: {a: string}) {}function Bar() {}type A = MyThisParameterType<typeof Foo> // {a: string}type B = MyThisParameterType<typeof Bar> // unknown

5分間以内で解いてみて