Skip to main content
update wording
Source Link

You can annotate this in the following way:

function curry(fn: (...args: any[]) => any): (this: CallableFunction, ...args: any[]) => any {
...

In your context, youthe code is calling apply and bind on this. In order to do that this may be typed as a CallableFunction.

You can annotate this in the following way:

function curry(fn: (...args: any[]) => any): (this: CallableFunction, ...args: any[]) => any {
...

In your context, you calling apply and bind on this. In order to do that this may be CallableFunction.

You can annotate this in the following way:

function curry(fn: (...args: any[]) => any): (this: CallableFunction, ...args: any[]) => any {
...

In your context, the code is calling apply and bind on this. In order to do that this may be typed as a CallableFunction.

Source Link

You can annotate this in the following way:

function curry(fn: (...args: any[]) => any): (this: CallableFunction, ...args: any[]) => any {
...

In your context, you calling apply and bind on this. In order to do that this may be CallableFunction.