rxjs icon indicating copy to clipboard operation
rxjs copied to clipboard

firstValueFrom/lastValueFrom is missing AbortSignal support

Open ronag opened this issue 3 years ago • 10 comments

Promise based API's should generally also accept a signal property which is passed an AbortSignal instance.

const ac = new AbortController()
const promise = await rxjs.firstValueFrom(x$, { signal: ac.signal })
setTimeout(() => ac.abort(), 1e3)
await promise // Throws abort error.

ronag avatar Jun 01 '21 10:06 ronag