Function pipeGeneratorWithSetup
- pipeGeneratorWithSetup<S, A, T, TReturn, TNext, U, UReturn, UNext>(to, generator, startSetup, signal, ...args): Promise<{
output: AsyncGenerator<U, UReturn, UNext>;
setup: Awaited<S>;
}> Type Parameters
- S
- A extends unknown[]
- T
- TReturn
- TNext
- U
- UReturn
- UNext
Parameters
- to: ((g: AsyncGenerator<T, TReturn, TNext>, s: S, ...args: A) => AsyncGenerator<U, UReturn, UNext>)
- generator: AsyncGenerator<T, TReturn, TNext>
- startSetup: (() => Promise<S>)
- (): Promise<S>
Returns Promise<S>
- signal: undefined | AbortSignal
Rest
...args: A
Returns Promise<{
output: AsyncGenerator<U, UReturn, UNext>;
setup: Awaited<S>;
}>