You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
--- es5.d.ts+++ es5.d.ts
interface CallableFunction extends Function {
@@ @@+ /**+ * For a given function, creates a bound function that has the same body as the original function.+ * The this object of the bound function is associated with the specified object, and has the specified initial parameters.+ * @param thisArg The object to be used as the this object.+ */+ bind<T>(this: T, thisArg: ThisParameterType<T>): OmitThisParameter<T>;
/**
* For a given function, creates a bound function that has the same body as the original function.
* The this object of the bound function is associated with the specified object, and has the specified initial parameters.
* @param thisArg The object to be used as the this object.
* @param args Arguments to bind to the parameters of the function.
*/
bind<T, A extends any[], B extends any[], R>(this: (this: T, ...args: [...A, ...B]) => R, thisArg: T, ...args: A): (...args: B) => R;
}
interface NewableFunction extends Function {
@@ @@+ /**+ * For a given function, creates a bound function that has the same body as the original function.+ * The this object of the bound function is associated with the specified object, and has the specified initial parameters.+ * @param thisArg The object to be used as the this object.+ */+ bind<T>(this: T, thisArg: any): T;
/**
* For a given function, creates a bound function that has the same body as the original function.
* The this object of the bound function is associated with the specified object, and has the specified initial parameters.
* @param thisArg The object to be used as the this object.
* @param args Arguments to bind to the parameters of the function.
*/
bind<A extends any[], B extends any[], R>(this: new (...args: [...A, ...B]) => R, thisArg: any, ...args: A): new (...args: B) => R;
}
The text was updated successfully, but these errors were encountered:
graphemecluster
changed the title
{CallableFunction, NewableFunction}.bind failed to infer overload and generic functions{CallableFunction, NewableFunction}.bind failed to infer overload and generic functions for zero-arguments binding
Jul 11, 2022
https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/functions/strictBindCallApply1.ts
Fix:
The text was updated successfully, but these errors were encountered: