UNPKG

872 BTypeScriptView Raw
1import { BiTypedMethodDecorator1 } from './factory';
2/**
3 * Creates a function that invokes func with the this binding of thisArg and partials prepended to the arguments it receives.
4 *
5 * The _.bind.placeholder value, which defaults to _ in monolithic builds, may be used as a placeholder for partially applied arguments.
6 *
7 * Note: Unlike native Function#bind, this method doesn't set the "length" property of bound functions.
8 * @param {...*} [partials] The argument to be partially applied.
9 * @example
10 *
11 * class MyClass {
12 * @Bind()
13 * bound() {
14 * return this;
15 * }
16 *
17 * unbound() {
18 * return this;
19 * }
20 * }
21 *
22 * const myClass = new MyClass();
23 *
24 * myClass.bound.call(null); // => myClass {}
25 * myClass.unbound.call(null); // => null
26 */
27export declare const Bind: BiTypedMethodDecorator1<any>;
28export { Bind as bind };
29export default Bind;