1 | import { LodashDecorator, ResolvableFunction } from './factory';
|
2 | declare const decorator: (...args: any[]) => LodashDecorator;
|
3 | /**
|
4 | * Creates a function that invokes func with arguments reversed. Honestly, there is probably not much
|
5 | * use for this decorator but maybe you will find one?
|
6 | *
|
7 | * @example
|
8 | *
|
9 | * class MyClass {
|
10 | * value = 100;
|
11 | *
|
12 | * @Flip('fn')
|
13 | * fn2: (b: number, a: string) => [ number, string ];
|
14 | *
|
15 | * fn(a: string, b: number): [ string, number ] {
|
16 | * return [ a, b ];
|
17 | * }
|
18 | * }
|
19 | *
|
20 | * const myClass = new MyClass();
|
21 | *
|
22 | * myClass.fn2(10, '20'); // => [ '20', 10 ]
|
23 | */
|
24 | export declare function Flip(fn?: ResolvableFunction): LodashDecorator;
|
25 | export { Flip as flip };
|
26 | export default decorator;
|