UNPKG

761 BTypeScriptView Raw
1import { LodashDecorator, ResolvableFunction } from './factory';
2declare const decorator: (...args: any[]) => LodashDecorator;
3/**
4 * Creates a function that returns the result of invoking the given functions with the this binding of the created function,
5 * where each successive invocation is supplied the return value of the previous.
6 *
7 * @example
8 *
9 * class MyClass {
10 * name = 'Ted';
11 *
12 * @FlowRight(toUpperCase, 'getName')
13 * getUpperCaseName: () => string;
14 *
15 * getName() {
16 * return this.name;
17 * }
18 * }
19 *
20 * const myClass = new MyClass();
21 *
22 * myClass.getUpperCaseName(); // => 'TED'
23 */
24export declare function FlowRight(...fns: ResolvableFunction[]): LodashDecorator;
25export { FlowRight as flowRight };
26export default decorator;