pipe
Defined in: Composition/pipe.ts:39
Properties
Section titled “Properties”
readonlyasync: {<A>(a):Promise<A>; <A,B>(a,ab):Promise<B>; <A,B,C>(a,ab,bc):Promise<C>; <A,B,C,D>(a,ab,bc,cd):Promise<D>; <A,B,C,D,E>(a,ab,bc,cd,de):Promise<E>; <A,B,C,D,E,F>(a,ab,bc,cd,de,ef):Promise<F>; <A,B,C,D,E,F,G>(a,ab,bc,cd,de,ef,fg):Promise<G>; <A,B,C,D,E,F,G,H>(a,ab,bc,cd,de,ef,fg,gh):Promise<H>; <A,B,C,D,E,F,G,H,I>(a,ab,bc,cd,de,ef,fg,gh,hi):Promise<I>; <A,B,C,D,E,F,G,H,I,J>(a,ab,bc,cd,de,ef,fg,gh,hi,ij):Promise<J>; <A,B,C,D,E,F,G,H,I,J,K>(a,ab,bc,cd,de,ef,fg,gh,hi,ij,jk):Promise<K>; }
Defined in: Composition/pipe.ts:392
Pipes a value through a sequence of operations, supporting asynchronous transitions at any step.
Call Signature
Section titled “Call Signature”<
A>(a):Promise<A>
Type Parameters
Section titled “Type Parameters”A
Parameters
Section titled “Parameters”A | Promise<A>
Returns
Section titled “Returns”Promise<A>
Call Signature
Section titled “Call Signature”<
A,B>(a,ab):Promise<B>
Type Parameters
Section titled “Type Parameters”A
B
Parameters
Section titled “Parameters”A | Promise<A>
(a) => B | Promise<B>
Returns
Section titled “Returns”Promise<B>
Call Signature
Section titled “Call Signature”<
A,B,C>(a,ab,bc):Promise<C>
Type Parameters
Section titled “Type Parameters”A
B
C
Parameters
Section titled “Parameters”A | Promise<A>
(a) => B | Promise<B>
(b) => C | Promise<C>
Returns
Section titled “Returns”Promise<C>
Call Signature
Section titled “Call Signature”<
A,B,C,D>(a,ab,bc,cd):Promise<D>
Type Parameters
Section titled “Type Parameters”A
B
C
D
Parameters
Section titled “Parameters”A | Promise<A>
(a) => B | Promise<B>
(b) => C | Promise<C>
(c) => D | Promise<D>
Returns
Section titled “Returns”Promise<D>
Call Signature
Section titled “Call Signature”<
A,B,C,D,E>(a,ab,bc,cd,de):Promise<E>
Type Parameters
Section titled “Type Parameters”A
B
C
D
E
Parameters
Section titled “Parameters”A | Promise<A>
(a) => B | Promise<B>
(b) => C | Promise<C>
(c) => D | Promise<D>
(d) => E | Promise<E>
Returns
Section titled “Returns”Promise<E>
Call Signature
Section titled “Call Signature”<
A,B,C,D,E,F>(a,ab,bc,cd,de,ef):Promise<F>
Type Parameters
Section titled “Type Parameters”A
B
C
D
E
F
Parameters
Section titled “Parameters”A | Promise<A>
(a) => B | Promise<B>
(b) => C | Promise<C>
(c) => D | Promise<D>
(d) => E | Promise<E>
(e) => F | Promise<F>
Returns
Section titled “Returns”Promise<F>
Call Signature
Section titled “Call Signature”<
A,B,C,D,E,F,G>(a,ab,bc,cd,de,ef,fg):Promise<G>
Type Parameters
Section titled “Type Parameters”A
B
C
D
E
F
G
Parameters
Section titled “Parameters”A | Promise<A>
(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”Promise<G>
Call Signature
Section titled “Call Signature”<
A,B,C,D,E,F,G,H>(a,ab,bc,cd,de,ef,fg,gh):Promise<H>
Type Parameters
Section titled “Type Parameters”A
B
C
D
E
F
G
H
Parameters
Section titled “Parameters”A | Promise<A>
(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”Promise<H>
Call Signature
Section titled “Call Signature”<
A,B,C,D,E,F,G,H,I>(a,ab,bc,cd,de,ef,fg,gh,hi):Promise<I>
Type Parameters
Section titled “Type Parameters”A
B
C
D
E
F
G
H
I
Parameters
Section titled “Parameters”A | Promise<A>
(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”Promise<I>
Call Signature
Section titled “Call Signature”<
A,B,C,D,E,F,G,H,I,J>(a,ab,bc,cd,de,ef,fg,gh,hi,ij):Promise<J>
Type Parameters
Section titled “Type Parameters”A
B
C
D
E
F
G
H
I
J
Parameters
Section titled “Parameters”A | Promise<A>
(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”Promise<J>
Call Signature
Section titled “Call Signature”<
A,B,C,D,E,F,G,H,I,J,K>(a,ab,bc,cd,de,ef,fg,gh,hi,ij,jk):Promise<K>
Type Parameters
Section titled “Type Parameters”A
B
C
D
E
F
G
H
I
J
K
Parameters
Section titled “Parameters”A | Promise<A>
(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”Promise<K>
either
Section titled “either”
readonlyeither: <A,B>(predicate,onTrue,onFalse) => (a) =>B
Defined in: Composition/pipe.ts:371
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>(a):A; <A,B>(a,ab):B|Extract<A,null|undefined>; <A,B,C>(a,ab,bc):C|Extract<A,null|undefined> |Extract<B,null|undefined>; <A,B,C,D>(a,ab,bc,cd):D|Extract<A,null|undefined> |Extract<B,null|undefined> |Extract<C,null|undefined>; <A,B,C,D,E>(a,ab,bc,cd,de):E|Extract<A,null|undefined> |Extract<B,null|undefined> |Extract<C,null|undefined> |Extract<D,null|undefined>; <A,B,C,D,E,F>(a,ab,bc,cd,de,ef):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>(a,ab,bc,cd,de,ef,fg):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>(a,ab,bc,cd,de,ef,fg,gh):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>(a,ab,bc,cd,de,ef,fg,gh,hi):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>(a,ab,bc,cd,de,ef,fg,gh,hi,ij):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>(a,ab,bc,cd,de,ef,fg,gh,hi,ij,jk):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/pipe.ts:387
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>(a):A
Type Parameters
Section titled “Type Parameters”A
Parameters
Section titled “Parameters”A
Returns
Section titled “Returns”A
Call Signature
Section titled “Call Signature”<
A,B>(a,ab):B|Extract<A,null|undefined>
Type Parameters
Section titled “Type Parameters”A
B
Parameters
Section titled “Parameters”A
(a) => B
Returns
Section titled “Returns”B | Extract<A, null | undefined>
Call Signature
Section titled “Call Signature”<
A,B,C>(a,ab,bc):C|Extract<A,null|undefined> |Extract<B,null|undefined>
Type Parameters
Section titled “Type Parameters”A
B
C
Parameters
Section titled “Parameters”A
(a) => B
(b) => C
Returns
Section titled “Returns”C | Extract<A, null | undefined> | Extract<B, null | undefined>
Call Signature
Section titled “Call Signature”<
A,B,C,D>(a,ab,bc,cd):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
(a) => B
(b) => C
(c) => D
Returns
Section titled “Returns”D | Extract<A, null | undefined> | Extract<B, null | undefined> | Extract<C, null | undefined>
Call Signature
Section titled “Call Signature”<
A,B,C,D,E>(a,ab,bc,cd,de):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
(a) => B
(b) => C
(c) => D
(d) => E
Returns
Section titled “Returns”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>(a,ab,bc,cd,de,ef):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
(a) => B
(b) => C
(c) => D
(d) => E
(e) => F
Returns
Section titled “Returns”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>(a,ab,bc,cd,de,ef,fg):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
(a) => B
(b) => C
(c) => D
(d) => E
(e) => F
(f) => G
Returns
Section titled “Returns”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>(a,ab,bc,cd,de,ef,fg,gh):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
(a) => B
(b) => C
(c) => D
(d) => E
(e) => F
(f) => G
(g) => H
Returns
Section titled “Returns”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>(a,ab,bc,cd,de,ef,fg,gh,hi):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
(a) => B
(b) => C
(c) => D
(d) => E
(e) => F
(f) => G
(g) => H
(h) => I
Returns
Section titled “Returns”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>(a,ab,bc,cd,de,ef,fg,gh,hi,ij):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
(a) => B
(b) => C
(c) => D
(d) => E
(e) => F
(f) => G
(g) => H
(h) => I
(i) => J
Returns
Section titled “Returns”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>(a,ab,bc,cd,de,ef,fg,gh,hi,ij,jk):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
(a) => B
(b) => C
(c) => D
(d) => E
(e) => F
(f) => G
(g) => H
(h) => I
(i) => J
(j) => K
Returns
Section titled “Returns”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/pipe.ts:381
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/pipe.ts:376
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/pipe.ts:366
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/pipe.ts:361
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