import { GenericCallback } from "../models.mjs"; import { UnwrapValue } from "../result/models.mjs"; //#region src/function/work.d.ts /** * A synchronous _Flow_, a function that pipe a value through a series of functions */ type Flow = (...args: Parameters) => UnwrapValue; /** * An asynchronous _Flow_, a function that pipes a value through a series of functions */ type FlowPromise = (...args: Parameters) => Promise>; /** * Create an asynchronous _Flow_, a function that pipes values through a function * * _Available as `asyncFlow` and `flow.async`_ * * @returns _Flow_ function */ declare function asyncFlow(fn: Fn): FlowPromise>; /** * Create an asynchronous _Flow_, a function that pipes values through a series of functions * * _Available as `asyncFlow` and `flow.async`_ * * @returns _Flow_ function */ declare function asyncFlow(first: First, second: (value: Awaited>>) => Second): FlowPromise; /** * Create an asynchronous _Flow_, a function that pipes values through a series of functions * * _Available as `asyncFlow` and `flow.async`_ * * @returns _Flow_ function */ declare function asyncFlow(first: First, second: (value: Awaited>>) => Second, third: (value: Awaited>) => Third): FlowPromise; /** * Create an asynchronous _Flow_, a function that pipes values through a series of functions * * _Available as `asyncFlow` and `flow.async`_ * * @returns _Flow_ function */ declare function asyncFlow(first: First, second: (value: Awaited>>) => Second, third: (value: Awaited>) => Third, fourth: (value: Awaited>) => Fourth): FlowPromise; /** * Create an asynchronous _Flow_, a function that pipes values through a series of functions * * _Available as `asyncFlow` and `flow.async`_ * * @returns _Flow_ function */ declare function asyncFlow(first: First, second: (value: Awaited>>) => Second, third: (value: Awaited>) => Third, fourth: (value: Awaited>) => Fourth, fifth: (value: Awaited>) => Fifth): FlowPromise; /** * Create an asynchronous _Flow_, a function that pipes values through a series of functions * * _Available as `asyncFlow` and `flow.async`_ * * @returns _Flow_ function */ declare function asyncFlow(first: First, second: (value: Awaited>>) => Second, third: (value: Awaited>) => Third, fourth: (value: Awaited>) => Fourth, fifth: (value: Awaited>) => Fifth, sixth: (value: Awaited>) => Sixth): FlowPromise; /** * Create an asynchronous _Flow_, a function that pipes values through a series of functions * * _Available as `asyncFlow` and `flow.async`_ * * @returns _Flow_ function */ declare function asyncFlow(first: First, second: (value: Awaited>>) => Second, third: (value: Awaited>) => Third, fourth: (value: Awaited>) => Fourth, fifth: (value: Awaited>) => Fifth, sixth: (value: Awaited>) => Sixth, seventh: (value: Awaited>) => Seventh): FlowPromise; /** * Create an asynchronous _Flow_, a function that pipes values through a series of functions * * _Available as `asyncFlow` and `flow.async`_ * * @returns _Flow_ function */ declare function asyncFlow(first: First, second: (value: Awaited>>) => Second, third: (value: Awaited>) => Third, fourth: (value: Awaited>) => Fourth, fifth: (value: Awaited>) => Fifth, sixth: (value: Awaited>) => Sixth, seventh: (value: Awaited>) => Seventh, eighth: (value: Awaited>) => Eighth): FlowPromise; /** * Create an asynchronous _Flow_, a function that pipes values through a series of functions * * _Available as `asyncFlow` and `flow.async`_ * * @returns _Flow_ function */ declare function asyncFlow(first: First, second: (value: Awaited>>) => Second, third: (value: Awaited>) => Third, fourth: (value: Awaited>) => Fourth, fifth: (value: Awaited>) => Fifth, sixth: (value: Awaited>) => Sixth, seventh: (value: Awaited>) => Seventh, eighth: (value: Awaited>) => Eighth, ninth: (value: Awaited>) => Ninth): FlowPromise; /** * Create an asynchronous _Flow_, a function that pipes values through a series of functions * * _Available as `asyncFlow` and `flow.async`_ * * @returns _Flow_ function */ declare function asyncFlow(first: First, second: (value: Awaited>>) => Second, third: (value: Awaited>) => Third, fourth: (value: Awaited>) => Fourth, fifth: (value: Awaited>) => Fifth, sixth: (value: Awaited>) => Sixth, seventh: (value: Awaited>) => Seventh, eighth: (value: Awaited>) => Eighth, ninth: (value: Awaited>) => Ninth, tenth: (value: Awaited>) => Tenth): FlowPromise; /** * Create an asynchronous _Flow_, a function that pipes values through a series of functions * * _Available as `asyncFlow` and `flow.async`_ * * @returns _Flow_ function */ declare function asyncFlow(fn: Fn, ...fns: Array<(value: Awaited>>) => unknown>): FlowPromise>; /** * Create an asynchronous _Flow_, a function that pipes values through a series of functions * * _Available as `asyncFlow` and `flow.async`_ * * @returns _Flow_ function */ declare function asyncFlow(...fns: GenericCallback[]): (...args: unknown[]) => Promise; /** * Create a _Flow_, a function that pipes values through a function * * @returns _Flow_ function */ declare function flow(fn: Fn): Flow>; /** * Create a _Flow_, a function that pipes values through a series of functions * * @returns _Flow_ function */ declare function flow(first: First, second: (value: UnwrapValue>) => Second): Flow; /** * Create a _Flow_, a function that pipes values through a series of functions * * @returns _Flow_ function */ declare function flow(first: First, second: (value: UnwrapValue>) => Second, third: (value: UnwrapValue) => Third): Flow; /** * Create a _Flow_, a function that pipes values through a series of functions * * @returns _Flow_ function */ declare function flow(first: First, second: (value: UnwrapValue>) => Second, third: (value: UnwrapValue) => Third, fourth: (value: UnwrapValue) => Fourth): Flow; /** * Create a _Flow_, a function that pipes values through a series of functions * * @returns _Flow_ function */ declare function flow(first: First, second: (value: UnwrapValue>) => Second, third: (value: UnwrapValue) => Third, fourth: (value: UnwrapValue) => Fourth, fifth: (value: UnwrapValue) => Fifth): Flow; /** * Create a _Flow_, a function that pipes values through a series of functions * * @returns _Flow_ function */ declare function flow(first: First, second: (value: UnwrapValue>) => Second, third: (value: UnwrapValue) => Third, fourth: (value: UnwrapValue) => Fourth, fifth: (value: UnwrapValue) => Fifth, sixth: (value: UnwrapValue) => Sixth): Flow; /** * Create a _Flow_, a function that pipes values through a series of functions * * @returns _Flow_ function */ declare function flow(first: First, second: (value: UnwrapValue>) => Second, third: (value: UnwrapValue) => Third, fourth: (value: UnwrapValue) => Fourth, fifth: (value: UnwrapValue) => Fifth, sixth: (value: UnwrapValue) => Sixth, seventh: (value: UnwrapValue) => Seventh): Flow; /** * Create a _Flow_, a function that pipes values through a series of functions * * @returns _Flow_ function */ declare function flow(first: First, second: (value: UnwrapValue>) => Second, third: (value: UnwrapValue) => Third, fourth: (value: UnwrapValue) => Fourth, fifth: (value: UnwrapValue) => Fifth, sixth: (value: UnwrapValue) => Sixth, seventh: (value: UnwrapValue) => Seventh, eighth: (value: UnwrapValue) => Eighth): Flow; /** * Create a _Flow_, a function that pipes values through a series of functions * * @returns _Flow_ function */ declare function flow(first: First, second: (value: UnwrapValue>) => Second, third: (value: UnwrapValue) => Third, fourth: (value: UnwrapValue) => Fourth, fifth: (value: UnwrapValue) => Fifth, sixth: (value: UnwrapValue) => Sixth, seventh: (value: UnwrapValue) => Seventh, eighth: (value: UnwrapValue) => Eighth, ninth: (value: UnwrapValue) => Ninth): Flow; /** * Create a _Flow_, a function that pipes values through a series of functions * * @returns _Flow_ function */ declare function flow(first: First, second: (value: UnwrapValue>) => Second, third: (value: UnwrapValue) => Third, fourth: (value: UnwrapValue) => Fourth, fifth: (value: UnwrapValue) => Fifth, sixth: (value: UnwrapValue) => Sixth, seventh: (value: UnwrapValue) => Seventh, eighth: (value: UnwrapValue) => Eighth, ninth: (value: UnwrapValue) => Ninth, tenth: (value: UnwrapValue) => Tenth): Flow; /** * Create a _Flow_, a function that pipes values through a series of functions * * @returns _Flow_ function */ declare function flow(first: First, ...fns: Array<(value: UnwrapValue>) => unknown>): Flow>; /** * Create a _Flow_, a function that pipes values through a series of functions * * @returns _Flow_ function */ declare function flow(...fns: GenericCallback[]): (...args: unknown[]) => unknown; declare namespace flow { var async: typeof asyncFlow; } /** * Pipe a value through a function * * _Available as `asyncPipe` and `pipe.async`_ * * @param value Initial value * @returns _Piped_ result */ declare function asyncPipe(value: Initial, pipe: (value: UnwrapValue) => Piped): Promise>; /** * Pipe a value through a series of functions * * _Available as `asyncPipe` and `pipe.async`_ * * @param value Initial value * @returns _Piped_ result */ declare function asyncPipe(value: Initial, first: (value: UnwrapValue) => First, second: (value: UnwrapValue) => Second): Promise>; /** * Pipe a value through a series of functions * * _Available as `asyncPipe` and `pipe.async`_ * * @param value Initial value * @returns _Piped_ result */ declare function asyncPipe(value: Initial, first: (value: UnwrapValue) => First, second: (value: UnwrapValue) => Second, third: (value: UnwrapValue) => Third): Promise>; /** * Pipe a value through a series of functions * * _Available as `asyncPipe` and `pipe.async`_ * * @param value Initial value * @returns _Piped_ result */ declare function asyncPipe(value: Initial, first: (value: UnwrapValue) => First, second: (value: UnwrapValue) => Second, third: (value: UnwrapValue) => Third, fourth: (value: UnwrapValue) => Fourth): Promise>; /** * Pipe a value through a series of functions * * _Available as `asyncPipe` and `pipe.async`_ * * @param value Initial value * @returns _Piped_ result */ declare function asyncPipe(value: Initial, first: (value: UnwrapValue) => First, second: (value: UnwrapValue) => Second, third: (value: UnwrapValue) => Third, fourth: (value: UnwrapValue) => Fourth, fifth: (value: UnwrapValue) => Fifth): Promise>; /** * Pipe a value through a series of functions * * _Available as `asyncPipe` and `pipe.async`_ * * @param value Initial value * @returns _Piped_ result */ declare function asyncPipe(value: Initial, first: (value: UnwrapValue) => First, second: (value: UnwrapValue) => Second, third: (value: UnwrapValue) => Third, fourth: (value: UnwrapValue) => Fourth, fifth: (value: UnwrapValue) => Fifth, sixth: (value: UnwrapValue) => Sixth): Promise>; /** * Pipe a value through a series of functions * * _Available as `asyncPipe` and `pipe.async`_ * * @param value Initial value * @returns _Piped_ result */ declare function asyncPipe(value: Initial, first: (value: UnwrapValue) => First, second: (value: UnwrapValue) => Second, third: (value: UnwrapValue) => Third, fourth: (value: UnwrapValue) => Fourth, fifth: (value: UnwrapValue) => Fifth, sixth: (value: UnwrapValue) => Sixth, seventh: (value: UnwrapValue) => Seventh): Promise>; /** * Pipe a value through a series of functions * * _Available as `asyncPipe` and `pipe.async`_ * * @param value Initial value * @returns _Piped_ result */ declare function asyncPipe(value: Initial, first: (value: UnwrapValue) => First, second: (value: UnwrapValue) => Second, third: (value: UnwrapValue) => Third, fourth: (value: UnwrapValue) => Fourth, fifth: (value: UnwrapValue) => Fifth, sixth: (value: UnwrapValue) => Sixth, seventh: (value: UnwrapValue) => Seventh, eighth: (value: UnwrapValue) => Eighth): Promise>; /** * Pipe a value through a series of functions * * _Available as `asyncPipe` and `pipe.async`_ * * @param value Initial value * @returns _Piped_ result */ declare function asyncPipe(value: Initial, first: (value: UnwrapValue) => First, second: (value: UnwrapValue) => Second, third: (value: UnwrapValue) => Third, fourth: (value: UnwrapValue) => Fourth, fifth: (value: UnwrapValue) => Fifth, sixth: (value: UnwrapValue) => Sixth, seventh: (value: UnwrapValue) => Seventh, eighth: (value: UnwrapValue) => Eighth, ninth: (value: UnwrapValue) => Ninth): Promise>; /** * Pipe a value through a series of functions * * _Available as `asyncPipe` and `pipe.async`_ * * @param value Initial value * @returns _Piped_ result */ declare function asyncPipe(value: Initial, first: (value: UnwrapValue) => First, second: (value: UnwrapValue) => Second, third: (value: UnwrapValue) => Third, fourth: (value: UnwrapValue) => Fourth, fifth: (value: UnwrapValue) => Fifth, sixth: (value: UnwrapValue) => Sixth, seventh: (value: UnwrapValue) => Seventh, eighth: (value: UnwrapValue) => Eighth, ninth: (value: UnwrapValue) => Ninth, tenth: (value: UnwrapValue) => Tenth): Promise>; /** * Pipe a value through a series of functions * * _Available as `asyncPipe` and `pipe.async`_ * * @param value Initial value * @returns _Piped_ result */ declare function asyncPipe(value: Value, ...pipes: Array<(value: Value) => Value>): Promise>; /** * Pipe a value through a series of functions * * _Available as `asyncPipe` and `pipe.async`_ * * @param value Initial value * @returns _Piped_ result */ declare function asyncPipe(value: unknown, ...pipes: Array<(value: unknown) => unknown>): Promise; /** * Pipe a value through a function * * @param value Initial value * @returns _Piped_ result */ declare function pipe(value: Initial, pipe: (value: UnwrapValue) => Piped): UnwrapValue; /** * Pipe a value through a series of functions * * @param value Initial value * @returns _Piped_ result */ declare function pipe(value: Initial, first: (value: UnwrapValue) => First, second: (value: UnwrapValue) => Second): UnwrapValue; /** * Pipe a value through a series of functions * * @param value Initial value * @returns _Piped_ result */ declare function pipe(value: Initial, first: (value: UnwrapValue) => First, second: (value: UnwrapValue) => Second, third: (value: UnwrapValue) => Third): UnwrapValue; /** * Pipe a value through a series of functions * * @param value Initial value * @returns _Piped_ result */ declare function pipe(value: Initial, first: (value: UnwrapValue) => First, second: (value: UnwrapValue) => Second, third: (value: UnwrapValue) => Third, fourth: (value: UnwrapValue) => Fourth): UnwrapValue; /** * Pipe a value through a series of functions * * @param value Initial value * @returns _Piped_ result */ declare function pipe(value: Initial, first: (value: UnwrapValue) => First, second: (value: UnwrapValue) => Second, third: (value: UnwrapValue) => Third, fourth: (value: UnwrapValue) => Fourth, fifth: (value: UnwrapValue) => Fifth): UnwrapValue; /** * Pipe a value through a series of functions * * @param value Initial value * @returns _Piped_ result */ declare function pipe(value: Initial, first: (value: UnwrapValue) => First, second: (value: UnwrapValue) => Second, third: (value: UnwrapValue) => Third, fourth: (value: UnwrapValue) => Fourth, fifth: (value: UnwrapValue) => Fifth, sixth: (value: UnwrapValue) => Sixth): UnwrapValue; /** * Pipe a value through a series of functions * * @param value Initial value * @returns _Piped_ result */ declare function pipe(value: Initial, first: (value: UnwrapValue) => First, second: (value: UnwrapValue) => Second, third: (value: UnwrapValue) => Third, fourth: (value: UnwrapValue) => Fourth, fifth: (value: UnwrapValue) => Fifth, sixth: (value: UnwrapValue) => Sixth, seventh: (value: UnwrapValue) => Seventh): UnwrapValue; /** * Pipe a value through a series of functions * * @param value Initial value * @returns _Piped_ result */ declare function pipe(value: Initial, first: (value: UnwrapValue) => First, second: (value: UnwrapValue) => Second, third: (value: UnwrapValue) => Third, fourth: (value: UnwrapValue) => Fourth, fifth: (value: UnwrapValue) => Fifth, sixth: (value: UnwrapValue) => Sixth, seventh: (value: UnwrapValue) => Seventh, eighth: (value: UnwrapValue) => Eighth): UnwrapValue; /** * Pipe a value through a series of functions * * @param value Initial value * @returns _Piped_ result */ declare function pipe(value: Initial, first: (value: UnwrapValue) => First, second: (value: UnwrapValue) => Second, third: (value: UnwrapValue) => Third, fourth: (value: UnwrapValue) => Fourth, fifth: (value: UnwrapValue) => Fifth, sixth: (value: UnwrapValue) => Sixth, seventh: (value: UnwrapValue) => Seventh, eighth: (value: UnwrapValue) => Eighth, ninth: (value: UnwrapValue) => Ninth): UnwrapValue; /** * Pipe a value through a series of functions * * @param value Initial value * @returns _Piped_ result */ declare function pipe(value: Initial, first: (value: UnwrapValue) => First, second: (value: UnwrapValue) => Second, third: (value: UnwrapValue) => Third, fourth: (value: UnwrapValue) => Fourth, fifth: (value: UnwrapValue) => Fifth, sixth: (value: UnwrapValue) => Sixth, seventh: (value: UnwrapValue) => Seventh, eighth: (value: UnwrapValue) => Eighth, ninth: (value: UnwrapValue) => Ninth, tenth: (value: UnwrapValue) => Tenth): UnwrapValue; /** * Pipe a value through a series of functions * * @param value Initial value * @returns _Piped_ result */ declare function pipe(value: Value, ...pipes: Array<(value: Value) => Value>): UnwrapValue; /** * Pipe a value through a series of functions * * @param value Initial value * @returns _Piped_ result */ declare function pipe(value: unknown, ...pipes: Array<(value: unknown) => unknown>): unknown; declare namespace pipe { var async: typeof asyncPipe; } //#endregion export { Flow, FlowPromise, asyncFlow, asyncPipe, flow, pipe };