bind < Scope , MethodName extends string , Partials extends any [] > ( scope : Scope , name : MethodName , ... partials : Partials , ) : ( ... args : any [] ) => any Type Parameters Scope MethodName extends string Partials extends any [] Returns ( ... args : any [] ) => any a callable function
bind < Scope , A extends any [] , R > ( scope : Scope , fn : ( this : Scope , ... a : A ) => R , ) : ( ... a : A ) => R Returns ( ... a : A ) => R bind < Scope , A0 , A extends any [] , R > ( scope : Scope , fn : ( this : Scope , a0 : A0 , ... a : A ) => R , a0 : A0 , ) : ( ... a : A ) => R Returns ( ... a : A ) => R bind < Scope , A0 , A1 , A extends any [] , R > ( scope : Scope , fn : ( this : Scope , a0 : A0 , a1 : A1 , ... a : A ) => R , a0 : A0 , a1 : A1 , ) : ( ... a : A ) => R Type Parameters Scope A0 A1 A extends any [] R Returns ( ... a : A ) => R bind < Scope , A0 , A1 , A2 , A extends any [] , R > ( scope : Scope , fn : ( this : Scope , a0 : A0 , a1 : A1 , a2 : A2 , ... a : A ) => R , a0 : A0 , a1 : A1 , a2 : A2 , ) : ( ... a : A ) => R Type Parameters Scope A0 A1 A2 A extends any [] R Returns ( ... a : A ) => R bind < Scope , A0 , A1 , A2 , A3 , A extends any [] , R > ( scope : Scope , fn : ( this : Scope , a0 : A0 , a1 : A1 , a2 : A2 , a3 : A3 , ... a : A ) => R , a0 : A0 , a1 : A1 , a2 : A2 , a3 : A3 , ) : ( ... a : A ) => R Type Parameters Scope A0 A1 A2 A3 A extends any [] R Returns ( ... a : A ) => R
Creates a new function, which has
this
bound toscope
. Only difference to Function.bind is, that it can bind a string value so the real executed function may change in the scope. Hint: It is semantically equal to the behavior of dojo/_base/lang#hitch.