15. implement OmitThisParameter<T>

TypeScript

  - accepted / - tried

When Function.prototype.bind() is used, the returned function has a bound this. OmitThisParameter<T> could be used to type this.

Please implement MyOmitThisParameter<T> by yourself.

function foo(this: {a: string}) {}foo() // Errorconst bar = foo.bind({a: 'BFE.dev'})bar() // OKtype Foo = (this: {a: string}) => stringtype Bar = MyOmitThisParameter<Foo> // () => string

Let's try to solve this problem within 5 minutes.