Function
Static Public Summary | ||
public |
Binds methods of an object to the object itself, overwriting the existing method. |
|
public |
Mixin(srcs: ...*): * |
Static Public
public BindAll(methods: string[]): ClassDecorator source
import {BindAll} from 'lodash-decorators/buildDocs/bindAll.js'
Binds methods of an object to the object itself, overwriting the existing method.
Params:
Name | Type | Attribute | Description |
methods | string[] |
|
Return:
ClassDecorator |
Example:
@BindAll()
class MyClass {
bound() {
return this;
}
unbound() {
return this;
}
}
const myClass = new MyClass();
myClass.bound.call(null); // => MyClass {}
myClass.unbound.call(null); // => MyClass {}
public Mixin(srcs: ...*): * source
import {Mixin} from 'lodash-decorators/buildDocs/mixin.js'
Params:
Name | Type | Attribute | Description |
srcs | ...* |
Return:
* |