UNPKG

741 BTypeScriptView Raw
1import { ResolvableFunction, LodashDecorator } 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 * @Flow('getName', toUpperCase)
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 Flow(...fns: ResolvableFunction[]): LodashDecorator;
25export { Flow as flow };
26export default decorator;