UNPKG

tsoid

Version:

Typed functional library to deal with async operations.

20 lines (19 loc) 602 B
import { FunctionA2, FunctionA3, FunctionA4 } from '../types'; /** * Flip arguments of the given function * * @param {function} fn */ export default function flip<A, B, C>(fn: FunctionA2<A, B, C>): (arg0: B, arg1: A) => C; /** * Flip arguments of the given function * * @param {function} fn */ export declare function flip3<A, B, C, D>(fn: FunctionA3<A, B, C, D>): (arg0: C, arg1: B, arg2: A) => D; /** * Flip arguments of the given function * * @param {function} fn */ export declare function flip4<A, B, C, D, E>(fn: FunctionA4<A, B, C, D, E>): (arg0: D, arg1: C, arg2: B, arg3: A) => E;