flow
Defined in: Composition/flow.ts:41
Properties
Section titled “Properties”
readonlyasync: {<A,B>(ab): (a) =>Promise<B>; <A,B,C>(ab,bc): (a) =>Promise<C>; <A,B,C,D>(ab,bc,cd): (a) =>Promise<D>; <A,B,C,D,E>(ab,bc,cd,de): (a) =>Promise<E>; <A,B,C,D,E,F>(ab,bc,cd,de,ef): (a) =>Promise<F>; <A,B,C,D,E,F,G>(ab,bc,cd,de,ef,fg): (a) =>Promise<G>; <A,B,C,D,E,F,G,H>(ab,bc,cd,de,ef,fg,gh): (a) =>Promise<H>; <A,B,C,D,E,F,G,H,I>(ab,bc,cd,de,ef,fg,gh,hi): (a) =>Promise<I>; <A,B,C,D,E,F,G,H,I,J>(ab,bc,cd,de,ef,fg,gh,hi,ij): (a) =>Promise<J>; <A,B,C,D,E,F,G,H,I,J,K>(ab,bc,cd,de,ef,fg,gh,hi,ij,jk): (a) =>Promise<K>; }
Defined in: Composition/flow.ts:403
Pipes a value through a sequence of operations, supporting asynchronous transitions at any step.
Call Signature
Section titled “Call Signature”<
A,B>(ab): (a) =>Promise<B>
Type Parameters
Section titled “Type Parameters”A
B
Parameters
Section titled “Parameters”(a) => B | Promise<B>
Returns
Section titled “Returns”(a) => Promise<B>
Call Signature
Section titled “Call Signature”<
A,B,C>(ab,bc): (a) =>Promise<C>
Type Parameters
Section titled “Type Parameters”A
B
C
Parameters
Section titled “Parameters”(a) => B | Promise<B>
(b) => C | Promise<C>
Returns
Section titled “Returns”(a) => Promise<C>
Call Signature
Section titled “Call Signature”<
A,B,C,D>(ab,bc,cd): (a) =>Promise<D>
Type Parameters
Section titled “Type Parameters”A
B
C
D
Parameters
Section titled “Parameters”(a) => B | Promise<B>
(b) => C | Promise<C>
(c) => D | Promise<D>
Returns
Section titled “Returns”(a) => Promise<D>
Call Signature
Section titled “Call Signature”<
A,B,C,D,E>(ab,bc,cd,de): (a) =>Promise<E>
Type Parameters
Section titled “Type Parameters”A
B
C
D
E
Parameters
Section titled “Parameters”(a) => B | Promise<B>
(b) => C | Promise<C>
(c) => D | Promise<D>
(d) => E | Promise<E>
Returns
Section titled “Returns”(a) => Promise<E>
Call Signature
Section titled “Call Signature”<
A,B,C,D,E,F>(ab,bc,cd,de,ef): (a) =>Promise<F>
Type Parameters
Section titled “Type Parameters”A
B
C
D
E
F
Parameters
Section titled “Parameters”(a) => B | Promise<B>
(b) => C | Promise<C>
(c) => D | Promise<D>
(d) => E | Promise<E>
(e) => F | Promise<F>
Returns
Section titled “Returns”(a) => Promise<F>
Call Signature
Section titled “Call Signature”<
A,B,C,D,E,F,G>(ab,bc,cd,de,ef,fg): (a) =>Promise<G>
Type Parameters
Section titled “Type Parameters”A
B
C
D
E
F
G
Parameters
Section titled “Parameters”(a) => B | Promise<B>
(b) => C | Promise<C>
(c) => D | Promise<D>
(d) => E | Promise<E>
(e) => F | Promise<F>
(f) => G | Promise<G>
Returns
Section titled “Returns”(a) => Promise<G>
Call Signature
Section titled “Call Signature”<
A,B,C,D,E,F,G,H>(ab,bc,cd,de,ef,fg,gh): (a) =>Promise<H>
Type Parameters
Section titled “Type Parameters”A
B
C
D
E
F
G
H
Parameters
Section titled “Parameters”(a) => B | Promise<B>
(b) => C | Promise<C>
(c) => D | Promise<D>
(d) => E | Promise<E>
(e) => F | Promise<F>
(f) => G | Promise<G>
(g) => H | Promise<H>
Returns
Section titled “Returns”(a) => Promise<H>
Call Signature
Section titled “Call Signature”<
A,B,C,D,E,F,G,H,I>(ab,bc,cd,de,ef,fg,gh,hi): (a) =>Promise<I>
Type Parameters
Section titled “Type Parameters”A
B
C
D
E
F
G
H
I
Parameters
Section titled “Parameters”(a) => B | Promise<B>
(b) => C | Promise<C>
(c) => D | Promise<D>
(d) => E | Promise<E>
(e) => F | Promise<F>
(f) => G | Promise<G>
(g) => H | Promise<H>
(h) => I | Promise<I>
Returns
Section titled “Returns”(a) => Promise<I>
Call Signature
Section titled “Call Signature”<
A,B,C,D,E,F,G,H,I,J>(ab,bc,cd,de,ef,fg,gh,hi,ij): (a) =>Promise<J>
Type Parameters
Section titled “Type Parameters”A
B
C
D
E
F
G
H
I
J
Parameters
Section titled “Parameters”(a) => B | Promise<B>
(b) => C | Promise<C>
(c) => D | Promise<D>
(d) => E | Promise<E>
(e) => F | Promise<F>
(f) => G | Promise<G>
(g) => H | Promise<H>
(h) => I | Promise<I>
(i) => J
Returns
Section titled “Returns”(a) => Promise<J>
Call Signature
Section titled “Call Signature”<
A,B,C,D,E,F,G,H,I,J,K>(ab,bc,cd,de,ef,fg,gh,hi,ij,jk): (a) =>Promise<K>
Type Parameters
Section titled “Type Parameters”A
B
C
D
E
F
G
H
I
J
K
Parameters
Section titled “Parameters”(a) => B | Promise<B>
(b) => C | Promise<C>
(c) => D | Promise<D>
(d) => E | Promise<E>
(e) => F | Promise<F>
(f) => G | Promise<G>
(g) => H | Promise<H>
(h) => I | Promise<I>
(i) => J | Promise<J>
(j) => K | Promise<K>
Returns
Section titled “Returns”(a) => Promise<K>
either
Section titled “either”
readonlyeither: <A,B>(predicate,onTrue,onFalse) => (a) =>B
Defined in: Composition/flow.ts:382
Executes one of two functions based on a predicate, acting as a functional if-else/ternary helper.
Type Parameters
Section titled “Type Parameters”A
B
Parameters
Section titled “Parameters”predicate
Section titled “predicate”(a) => boolean
onTrue
Section titled “onTrue”(a) => B
onFalse
Section titled “onFalse”(a) => B
Returns
Section titled “Returns”(a) => B
readonlysafe: {<A,B>(ab): (a) =>B|Extract<A,null|undefined>; <A,B,C>(ab,bc): (a) =>C|Extract<A,null|undefined> |Extract<B,null|undefined>; <A,B,C,D>(ab,bc,cd): (a) =>D|Extract<A,null|undefined> |Extract<B,null|undefined> |Extract<C,null|undefined>; <A,B,C,D,E>(ab,bc,cd,de): (a) =>E|Extract<A,null|undefined> |Extract<B,null|undefined> |Extract<C,null|undefined> |Extract<D,null|undefined>; <A,B,C,D,E,F>(ab,bc,cd,de,ef): (a) =>F|Extract<A,null|undefined> |Extract<B,null|undefined> |Extract<C,null|undefined> |Extract<D,null|undefined> |Extract<E,null|undefined>; <A,B,C,D,E,F,G>(ab,bc,cd,de,ef,fg): (a) =>G|Extract<A,null|undefined> |Extract<B,null|undefined> |Extract<C,null|undefined> |Extract<D,null|undefined> |Extract<E,null|undefined> |Extract<F,null|undefined>; <A,B,C,D,E,F,G,H>(ab,bc,cd,de,ef,fg,gh): (a) =>H|Extract<A,null|undefined> |Extract<B,null|undefined> |Extract<C,null|undefined> |Extract<D,null|undefined> |Extract<E,null|undefined> |Extract<F,null|undefined> |Extract<G,null|undefined>; <A,B,C,D,E,F,G,H,I>(ab,bc,cd,de,ef,fg,gh,hi): (a) =>I|Extract<A,null|undefined> |Extract<B,null|undefined> |Extract<C,null|undefined> |Extract<D,null|undefined> |Extract<E,null|undefined> |Extract<F,null|undefined> |Extract<G,null|undefined> |Extract<H,null|undefined>; <A,B,C,D,E,F,G,H,I,J>(ab,bc,cd,de,ef,fg,gh,hi,ij): (a) =>J|Extract<A,null|undefined> |Extract<B,null|undefined> |Extract<C,null|undefined> |Extract<D,null|undefined> |Extract<E,null|undefined> |Extract<F,null|undefined> |Extract<G,null|undefined> |Extract<H,null|undefined> |Extract<I,null|undefined>; <A,B,C,D,E,F,G,H,I,J,K>(ab,bc,cd,de,ef,fg,gh,hi,ij,jk): (a) =>K|Extract<A,null|undefined> |Extract<B,null|undefined> |Extract<C,null|undefined> |Extract<D,null|undefined> |Extract<E,null|undefined> |Extract<F,null|undefined> |Extract<G,null|undefined> |Extract<H,null|undefined> |Extract<I,null|undefined> |Extract<J,null|undefined>; }
Defined in: Composition/flow.ts:398
Pipes a value through a sequence of operations, short-circuiting and propagating null or undefined immediately if any intermediate step evaluates to nil.
Call Signature
Section titled “Call Signature”<
A,B>(ab): (a) =>B|Extract<A,null|undefined>
Type Parameters
Section titled “Type Parameters”A
B
Parameters
Section titled “Parameters”(a) => B
Returns
Section titled “Returns”(a) => B | Extract<A, null | undefined>
Call Signature
Section titled “Call Signature”<
A,B,C>(ab,bc): (a) =>C|Extract<A,null|undefined> |Extract<B,null|undefined>
Type Parameters
Section titled “Type Parameters”A
B
C
Parameters
Section titled “Parameters”(a) => B
(b) => C
Returns
Section titled “Returns”(a) => C | Extract<A, null | undefined> | Extract<B, null | undefined>
Call Signature
Section titled “Call Signature”<
A,B,C,D>(ab,bc,cd): (a) =>D|Extract<A,null|undefined> |Extract<B,null|undefined> |Extract<C,null|undefined>
Type Parameters
Section titled “Type Parameters”A
B
C
D
Parameters
Section titled “Parameters”(a) => B
(b) => C
(c) => D
Returns
Section titled “Returns”(a) => D | Extract<A, null | undefined> | Extract<B, null | undefined> | Extract<C, null | undefined>
Call Signature
Section titled “Call Signature”<
A,B,C,D,E>(ab,bc,cd,de): (a) =>E|Extract<A,null|undefined> |Extract<B,null|undefined> |Extract<C,null|undefined> |Extract<D,null|undefined>
Type Parameters
Section titled “Type Parameters”A
B
C
D
E
Parameters
Section titled “Parameters”(a) => B
(b) => C
(c) => D
(d) => E
Returns
Section titled “Returns”(a) => E | Extract<A, null | undefined> | Extract<B, null | undefined> | Extract<C, null | undefined> | Extract<D, null | undefined>
Call Signature
Section titled “Call Signature”<
A,B,C,D,E,F>(ab,bc,cd,de,ef): (a) =>F|Extract<A,null|undefined> |Extract<B,null|undefined> |Extract<C,null|undefined> |Extract<D,null|undefined> |Extract<E,null|undefined>
Type Parameters
Section titled “Type Parameters”A
B
C
D
E
F
Parameters
Section titled “Parameters”(a) => B
(b) => C
(c) => D
(d) => E
(e) => F
Returns
Section titled “Returns”(a) => F | Extract<A, null | undefined> | Extract<B, null | undefined> | Extract<C, null | undefined> | Extract<D, null | undefined> | Extract<E, null | undefined>
Call Signature
Section titled “Call Signature”<
A,B,C,D,E,F,G>(ab,bc,cd,de,ef,fg): (a) =>G|Extract<A,null|undefined> |Extract<B,null|undefined> |Extract<C,null|undefined> |Extract<D,null|undefined> |Extract<E,null|undefined> |Extract<F,null|undefined>
Type Parameters
Section titled “Type Parameters”A
B
C
D
E
F
G
Parameters
Section titled “Parameters”(a) => B
(b) => C
(c) => D
(d) => E
(e) => F
(f) => G
Returns
Section titled “Returns”(a) => G | Extract<A, null | undefined> | Extract<B, null | undefined> | Extract<C, null | undefined> | Extract<D, null | undefined> | Extract<E, null | undefined> | Extract<F, null | undefined>
Call Signature
Section titled “Call Signature”<
A,B,C,D,E,F,G,H>(ab,bc,cd,de,ef,fg,gh): (a) =>H|Extract<A,null|undefined> |Extract<B,null|undefined> |Extract<C,null|undefined> |Extract<D,null|undefined> |Extract<E,null|undefined> |Extract<F,null|undefined> |Extract<G,null|undefined>
Type Parameters
Section titled “Type Parameters”A
B
C
D
E
F
G
H
Parameters
Section titled “Parameters”(a) => B
(b) => C
(c) => D
(d) => E
(e) => F
(f) => G
(g) => H
Returns
Section titled “Returns”(a) => H | Extract<A, null | undefined> | Extract<B, null | undefined> | Extract<C, null | undefined> | Extract<D, null | undefined> | Extract<E, null | undefined> | Extract<F, null | undefined> | Extract<G, null | undefined>
Call Signature
Section titled “Call Signature”<
A,B,C,D,E,F,G,H,I>(ab,bc,cd,de,ef,fg,gh,hi): (a) =>I|Extract<A,null|undefined> |Extract<B,null|undefined> |Extract<C,null|undefined> |Extract<D,null|undefined> |Extract<E,null|undefined> |Extract<F,null|undefined> |Extract<G,null|undefined> |Extract<H,null|undefined>
Type Parameters
Section titled “Type Parameters”A
B
C
D
E
F
G
H
I
Parameters
Section titled “Parameters”(a) => B
(b) => C
(c) => D
(d) => E
(e) => F
(f) => G
(g) => H
(h) => I
Returns
Section titled “Returns”(a) => I | Extract<A, null | undefined> | Extract<B, null | undefined> | Extract<C, null | undefined> | Extract<D, null | undefined> | Extract<E, null | undefined> | Extract<F, null | undefined> | Extract<G, null | undefined> | Extract<H, null | undefined>
Call Signature
Section titled “Call Signature”<
A,B,C,D,E,F,G,H,I,J>(ab,bc,cd,de,ef,fg,gh,hi,ij): (a) =>J|Extract<A,null|undefined> |Extract<B,null|undefined> |Extract<C,null|undefined> |Extract<D,null|undefined> |Extract<E,null|undefined> |Extract<F,null|undefined> |Extract<G,null|undefined> |Extract<H,null|undefined> |Extract<I,null|undefined>
Type Parameters
Section titled “Type Parameters”A
B
C
D
E
F
G
H
I
J
Parameters
Section titled “Parameters”(a) => B
(b) => C
(c) => D
(d) => E
(e) => F
(f) => G
(g) => H
(h) => I
(i) => J
Returns
Section titled “Returns”(a) => J | Extract<A, null | undefined> | Extract<B, null | undefined> | Extract<C, null | undefined> | Extract<D, null | undefined> | Extract<E, null | undefined> | Extract<F, null | undefined> | Extract<G, null | undefined> | Extract<H, null | undefined> | Extract<I, null | undefined>
Call Signature
Section titled “Call Signature”<
A,B,C,D,E,F,G,H,I,J,K>(ab,bc,cd,de,ef,fg,gh,hi,ij,jk): (a) =>K|Extract<A,null|undefined> |Extract<B,null|undefined> |Extract<C,null|undefined> |Extract<D,null|undefined> |Extract<E,null|undefined> |Extract<F,null|undefined> |Extract<G,null|undefined> |Extract<H,null|undefined> |Extract<I,null|undefined> |Extract<J,null|undefined>
Type Parameters
Section titled “Type Parameters”A
B
C
D
E
F
G
H
I
J
K
Parameters
Section titled “Parameters”(a) => B
(b) => C
(c) => D
(d) => E
(e) => F
(f) => G
(g) => H
(h) => I
(i) => J
(j) => K
Returns
Section titled “Returns”(a) => K | Extract<A, null | undefined> | Extract<B, null | undefined> | Extract<C, null | undefined> | Extract<D, null | undefined> | Extract<E, null | undefined> | Extract<F, null | undefined> | Extract<G, null | undefined> | Extract<H, null | undefined> | Extract<I, null | undefined> | Extract<J, null | undefined>
struct
Section titled “struct”
readonlystruct: <A,R>(fields) => (a) =>R
Defined in: Composition/flow.ts:392
Builds an object by applying a record of field-level transformer functions to the piped input.
Type Parameters
Section titled “Type Parameters”A
R extends Record<string, unknown>
Parameters
Section titled “Parameters”fields
Section titled “fields”{ [K in string | number | symbol]: (a: A) => R[K] }
Returns
Section titled “Returns”(a) => R
readonlytry: <A,B,C>(f,onError) => (a) =>B|C
Defined in: Composition/flow.ts:387
Creates a pipeline step that wraps a throwing function in a try/catch, returning a fallback value if an error occurs.
Type Parameters
Section titled “Type Parameters”A
B
C
Parameters
Section titled “Parameters”(a) => B
onError
Section titled “onError”(error, value) => C
Returns
Section titled “Returns”(a) => B | C
unless
Section titled “unless”
readonlyunless: <A>(predicate,onFalse) => (a) =>A
Defined in: Composition/flow.ts:377
Executes a function on the piped value if a predicate is NOT met, otherwise returns the value unchanged.
Type Parameters
Section titled “Type Parameters”A
Parameters
Section titled “Parameters”predicate
Section titled “predicate”(a) => boolean
onFalse
Section titled “onFalse”(a) => A
Returns
Section titled “Returns”(a) => A
readonlywhen: <A>(predicate,onTrue) => (a) =>A
Defined in: Composition/flow.ts:372
Executes a function on the piped value if a predicate is met, otherwise returns the value unchanged.
Type Parameters
Section titled “Type Parameters”A
Parameters
Section titled “Parameters”predicate
Section titled “predicate”(a) => boolean
onTrue
Section titled “onTrue”(a) => A
Returns
Section titled “Returns”(a) => A