import { Curried2, Curried3, Curried4, Curried5, Curried6, Curried7, Curried8, Curried9, Function1, Function2, Function3, Function4, Function5, Function6, Function7, Function8, Function9, Function_21, Function_211, Function_2111, Function_31, Function_311, Function_41, Function_51, Function_61, Complement, PossiblyCurried } from './helper-types'; export declare const define: any; export declare const defineFunctionProperties: (fn: A, obj: object) => A; /** * Functional pipe, chain applies functions starting from the left and moves right * * @example * const myFormula = pipe( multiply(2), add(5) ) * myFormula(10) // 25 * * :: f1 |> f2 |> f3 |> ... fn */ export declare function pipe(ab: (a: A) => B): (a: A) => B; export declare function pipe(ab: (a: A) => B, bc: (b: B) => C): (a: A) => C; export declare function pipe(ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D): (a: A) => D; export declare function pipe(ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E): (a: A) => E; export declare function pipe(ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F): (a: A) => F; export declare function pipe(ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: F) => G): (a: A) => G; export declare function pipe(ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: F) => G, gh: (g: G) => H): (a: A) => H; export declare function pipe(ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: F) => G, gh: (g: G) => H, hi: (h: H) => I): (a: A) => I; export declare function pipe(ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: F) => G, gh: (g: G) => H, hi: (h: H) => I, ij: (i: I) => J): (a: A) => J; /** * Functional composition, chain applies functions starting from the end and moves left * * @example * const myFormula = compose( add(5), multiply(2) ) * myFormula(10) // 25 * * :: fn |> ... f3 |> f2 |> f1 */ export declare function compose(bc: (b: B) => C, ab: (a: A) => B): (a: A) => C; export declare function compose(cd: (c: C) => D, bc: (b: B) => C, ab: (a: A) => B): (a: A) => D; export declare function compose(de: (d: D) => E, cd: (c: C) => D, bc: (b: B) => C, ab: (a: A) => B): (a: A) => E; export declare function compose(ef: (e: E) => F, de: (d: D) => E, cd: (c: C) => D, bc: (b: B) => C, ab: (a: A) => B): (a: A) => F; export declare function compose(fg: (f: F) => G, ef: (e: E) => F, de: (d: D) => E, cd: (c: C) => D, bc: (b: B) => C, ab: (a: A) => B): (a: A) => G; export declare function compose(gh: (g: G) => H, fg: (f: F) => G, ef: (e: E) => F, de: (d: D) => E, cd: (c: C) => D, bc: (b: B) => C, ab: (a: A) => B): (a: A) => H; export declare function compose(hi: (h: H) => I, gh: (g: G) => H, fg: (f: F) => G, ef: (e: E) => F, de: (d: D) => E, cd: (c: C) => D, bc: (b: B) => C, ab: (a: A) => B): (a: A) => I; export declare function compose(ij: (i: I) => J, hi: (h: H) => I, gh: (g: G) => H, fg: (f: F) => G, ef: (e: E) => F, de: (d: D) => E, cd: (c: C) => D, bc: (b: B) => C, ab: (a: A) => B): (a: A) => J; /** * A function similar to `pipe`, however, it starts with the input parameter first. * * @example * pipeline( 10, multiply(2), add(5) ) // 25 * :: input |> f1 |> f2 |> f3 |> ...fn */ export declare function pipeline(a: A, ab: (a: A) => B): B; export declare function pipeline(a: A, ab: (a: A) => B, bc: (b: B) => C): C; export declare function pipeline(a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D): D; export declare function pipeline(a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E): E; export declare function pipeline(a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F): F; export declare function pipeline(a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: F) => G): G; export declare function pipeline(a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: F) => G, gh: (g: G) => H): H; export declare function pipeline(a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: F) => G, gh: (g: G) => H, hi: (h: H) => I): I; export declare function pipeline(a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: G) => G, gh: (g: G) => H, hi: (h: H) => I, ij: (i: I) => J): J; export declare function pipeline(a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: G) => G, gh: (g: G) => H, hi: (h: H) => I, ij: (i: I) => J, jk: (j: J) => K): K; export declare function pipeline(a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: G) => G, gh: (g: G) => H, hi: (h: H) => I, ij: (i: I) => J, jk: (j: J) => K, kl: (k: K) => L): L; export declare function pipeline(a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: G) => G, gh: (g: G) => H, hi: (h: H) => I, ij: (i: I) => J, jk: (j: J) => K, kl: (k: K) => L, lm: (l: L) => M): M; export declare function pipeline(a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: G) => G, gh: (g: G) => H, hi: (h: H) => I, ij: (i: I) => J, jk: (j: J) => K, kl: (k: K) => L, lm: (l: L) => M, mn: (m: M) => N): N; export declare function pipeline(a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: G) => G, gh: (g: G) => H, hi: (h: H) => I, ij: (i: I) => J, jk: (j: J) => K, kl: (k: K) => L, lm: (l: L) => M, mn: (m: M) => N, no: (n: N) => O): O; export declare function pipeline(a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: G) => G, gh: (g: G) => H, hi: (h: H) => I, ij: (i: I) => J, jk: (j: J) => K, kl: (k: K) => L, lm: (l: L) => M, mn: (m: M) => N, no: (n: N) => O, op: (o: O) => P): P; export declare function pipeline(a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: G) => G, gh: (g: G) => H, hi: (h: H) => I, ij: (i: I) => J, jk: (j: J) => K, kl: (k: K) => L, lm: (l: L) => M, mn: (m: M) => N, no: (n: N) => O, op: (o: O) => P, pq: (p: P) => Q): Q; export declare function pipeline(a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: G) => G, gh: (g: G) => H, hi: (h: H) => I, ij: (i: I) => J, jk: (j: J) => K, kl: (k: K) => L, lm: (l: L) => M, mn: (m: M) => N, no: (n: N) => O, op: (o: O) => P, pq: (p: P) => Q, qr: (q: Q) => R): R; export declare function pipeline(a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: G) => G, gh: (g: G) => H, hi: (h: H) => I, ij: (i: I) => J, jk: (j: J) => K, kl: (k: K) => L, lm: (l: L) => M, mn: (m: M) => N, no: (n: N) => O, op: (o: O) => P, pq: (p: P) => Q, qr: (q: Q) => R, rs: (r: R) => S): S; export declare function pipeline(a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: G) => G, gh: (g: G) => H, hi: (h: H) => I, ij: (i: I) => J, jk: (j: J) => K, kl: (k: K) => L, lm: (l: L) => M, mn: (m: M) => N, no: (n: N) => O, op: (o: O) => P, pq: (p: P) => Q, qr: (q: Q) => R, rs: (r: R) => S, st: (s: S) => T): T; export declare function pipeline(a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: G) => G, gh: (g: G) => H, hi: (h: H) => I, ij: (i: I) => J, jk: (j: J) => K, kl: (k: K) => L, lm: (l: L) => M, mn: (m: M) => N, no: (n: N) => O, op: (o: O) => P, pq: (p: P) => Q, qr: (q: Q) => R, rs: (r: R) => S, st: (s: S) => T, tu: (t: T) => U): U; export declare function pipeline(a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: G) => G, gh: (g: G) => H, hi: (h: H) => I, ij: (i: I) => J, jk: (j: J) => K, kl: (k: K) => L, lm: (l: L) => M, mn: (m: M) => N, no: (n: N) => O, op: (o: O) => P, pq: (p: P) => Q, qr: (q: Q) => R, rs: (r: R) => S, st: (s: S) => T, tu: (t: T) => U, uv: (u: U) => V): V; export declare function pipeline(a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: G) => G, gh: (g: G) => H, hi: (h: H) => I, ij: (i: I) => J, jk: (j: J) => K, kl: (k: K) => L, lm: (l: L) => M, mn: (m: M) => N, no: (n: N) => O, op: (o: O) => P, pq: (p: P) => Q, qr: (q: Q) => R, rs: (r: R) => S, st: (s: S) => T, tu: (t: T) => U, uv: (u: U) => V, vw: (v: V) => W): W; export declare function pipeline(a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: G) => G, gh: (g: G) => H, hi: (h: H) => I, ij: (i: I) => J, jk: (j: J) => K, kl: (k: K) => L, lm: (l: L) => M, mn: (m: M) => N, no: (n: N) => O, op: (o: O) => P, pq: (p: P) => Q, qr: (q: Q) => R, rs: (r: R) => S, st: (s: S) => T, tu: (t: T) => U, uv: (u: U) => V, vw: (v: V) => W, wx: (w: W) => X): X; export declare function pipeline(a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: G) => G, gh: (g: G) => H, hi: (h: H) => I, ij: (i: I) => J, jk: (j: J) => K, kl: (k: K) => L, lm: (l: L) => M, mn: (m: M) => N, no: (n: N) => O, op: (o: O) => P, pq: (p: P) => Q, qr: (q: Q) => R, rs: (r: R) => S, st: (s: S) => T, tu: (t: T) => U, uv: (u: U) => V, vw: (v: V) => W, wx: (w: W) => X, xy: (x: X) => Y): Y; export declare function pipeline(a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: G) => G, gh: (g: G) => H, hi: (h: H) => I, ij: (i: I) => J, jk: (j: J) => K, kl: (k: K) => L, lm: (l: L) => M, mn: (m: M) => N, no: (n: N) => O, op: (o: O) => P, pq: (p: P) => Q, qr: (q: Q) => R, rs: (r: R) => S, st: (s: S) => T, tu: (t: T) => U, uv: (u: U) => V, vw: (v: V) => W, wx: (w: W) => X, xy: (x: X) => Y, yz: (y: Y) => Z): Z; /** * Curries a function. * * @example * add = curry( (a: number, b: number): number => a + b ) * const increment = add(1) * increment( 10 ) // 11 * * :: ( fn( a, b, ... c) -> x ) -> fn -> a -> b -> c -> x */ export declare function curry(f: Function2): (Curried2 & Function2); export declare function curry(f: Function2): (Curried2 & Function2); export declare function curry(f: Function2): (Curried2 & Function2); export declare function curry(f: Function2): (Curried2 & Function2); export declare function curry(f: Function3): (Curried3 & Function3 & Function_21); export declare function curry(f: Function4): (Curried4 & Function4 & Function_211 & Function_31); export declare function curry(f: Function5): (Curried5 & Function5 & Function_2111 & Function_311 & Function_41); export declare function curry(f: Function6): (Curried6 & Function6 & Function_51); export declare function curry(f: Function7): (Curried7 & Function7 & Function_61); export declare function curry(f: Function8): Curried8; export declare function curry(f: Function9): Curried9; /** * Curries a function. Untyped parameters, easily adapts to various situations, best coupled with typed signature * * @example * untypedCurry( (a: any, cb: Function) => cb(a) ) * * :: ( fn( a, b, ... c) -> x ) -> fn -> a -> b -> c -> x */ export declare function untypedCurry(fn: Function, ...args: any[]): any; /** * Takes array of functions, array of arguments, and returns array of functions with arguments applied. * :: (...f) -> (...a) -> [ f1(...a),f2(...a),...] */ export declare function parallel(...funcs: [Function1]): (arg: Input) => [A]; export declare function parallel(...funcs: [Function1, Function1]): (arg: Input) => [A, B]; export declare function parallel(...funcs: [Function1, Function1, Function1]): (arg: Input) => [A, B, C]; export declare function parallel(...funcs: [Function1, Function1, Function1, Function1]): (arg: Input) => [A, B, C, D]; export declare function parallel(...funcs: [Function1, Function1, Function1, Function1, Function1]): (arg: Input) => [A, B, C, D, E]; export declare function parallel(...funcs: [Function1, Function1, Function1, Function1, Function1, Function1]): (arg: Input) => [A, B, C, D, E, F]; export declare function parallel(...funcs: [Function1, Function1, Function1, Function1, Function1, Function1, Function1]): (arg: Input) => [A, B, C, D, E, F, G]; export declare function parallel(...funcs: [Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1]): (arg: Input) => [A, B, C, D, E, F, G, H]; export declare function parallel(...funcs: [Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1]): (arg: Input) => [A, B, C, D, E, F, G, H, I]; export declare function parallel(...funcs: [Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1]): (arg: Input) => [A, B, C, D, E, F, G, H, I, J]; export declare function parallel(...funcs: [Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1]): (arg: Input) => [A, B, C, D, E, F, G, H, I, J, K]; export declare function parallel(...funcs: [Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1]): (arg: Input) => [A, B, C, D, E, F, G, H, I, J, K, L]; export declare function parallel(...funcs: [Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1]): (arg: Input) => [A, B, C, D, E, F, G, H, I, J, K, L, M]; export declare function parallel(...funcs: [Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1]): (arg: Input) => [A, B, C, D, E, F, G, H, I, J, K, L, M, N]; export declare function parallel(...funcs: [Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1]): (arg: Input) => [A, B, C, D, E, F, G, H, I, J, K, L, M, N, O]; export declare function parallel(...funcs: [Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1]): (arg: Input) => [A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P]; export declare function parallel(...funcs: [Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1]): (arg: Input) => [A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q]; export declare function parallel(...funcs: [Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1]): (arg: Input) => [A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R]; export declare function parallel(...funcs: [Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1]): (arg: Input) => [A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S]; export declare function parallel(...funcs: [Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1]): (arg: Input) => [A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T]; export declare function parallel(...funcs: [Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1]): (arg: Input) => [A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U]; export declare function parallel(...funcs: [Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1]): (arg: Input) => [A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V]; export declare function parallel(...funcs: [Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1]): (arg: Input) => [A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W]; export declare function parallel(...funcs: [Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1]): (arg: Input) => [A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X]; export declare function parallel(...funcs: [Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1]): (arg: Input) => [A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y]; export declare function parallel(...funcs: [Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1, Function1]): (arg: Input) => [A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z]; export declare function bindToInstance(obj: T, method: K): T[K]; export declare function bindToInstance(obj: T): (method: K) => T[K]; /** * A looser typed version of parallel * :: f[] -> a[] -> [ f1(...a),f2(...a),...] */ export declare const parallelLoose: (...funcs: Function[]) => (...args: any[]) => any[]; /** * Take a function, then its arguements, then return the boolean opposite of said function * :: (...args) -> (fn) -> boolean */ export declare const complement: (f: (...args: A[]) => boolean) => (...args: A[]) => boolean; /** * Take a function, then its arguements, then return the boolean opposite of said function. * Returns a curried function. * :: (...args) -> (fn) -> boolean */ export declare function complementCurry(f: Function1): (Function1>); export declare function complementCurry(f: Function2): (Curried2> & Function2>); export declare function complementCurry(f: Function2): (Curried2> & Function2>); export declare function complementCurry(f: Function3): (Curried3> & Function3> & Function_21>); export declare function complementCurry(f: Function4): (Curried4> & Function4> & Function_211> & Function_31>); export declare function complementCurry(f: Function5): (Curried5> & Function5> & Function_2111> & Function_311> & Function_41>); export declare function complementCurry(f: Function6): (Curried6> & Function6> & Function_51>); export declare function complementCurry(f: Function7): (Curried7> & Function7> & Function_61>); export declare function complementCurry(f: Function8): Curried8>; export declare function complementCurry(f: Function9): Curried9>; export declare function complementWithArity(fn: Function, arity: number, ...args: any[]): (...args: any[]) => boolean | Function; export declare const not: (value: A) => Complement; /** * Constant / Kestrel. Returns the first value, ignores second. * * @example * const constant5 = always(5) * constant5() === 5 // true * :: a -> b -> a */ export declare const always: (a: A) => (b: any) => A; /** * Identity, returns same object given * @example * const one = identity(1) // 1 */ export declare const identity: (a: A) => A; /** * Flip parameters of a function. * Takes a function and two parameters and flips the parameter order * * @example * const doubleThenAdd = flip( addThenDouble ) * * :: f -> a -> b -> f(b)(a) */ export declare function flip(fn: Curried2, b: B, a: A): Z; export declare function flip(fn: Curried2, b: B): (a: A) => Z; export declare function flip(fn: Curried2): PossiblyCurried; export declare function flip(fn: Function2, b: B, a: A): Z; export declare function flip(fn: Function2, b: B): (a: A) => Z; export declare function flip(fn: Function2): PossiblyCurried; /** * A function for use with TypeScript to validate input types. * Function takes a given type for A and returns an identity function * expecting and returning data of type A * @example * ;[1,2,3] * .map(toString) * // check type incoming value to be of type `string` * .map(type()) * .join('-') * // => '1-2-3' */ export declare const type: () => (a: A) => A;