Class ForkableRecallStream<T>

An extension to the :class that immediately queues the last received chunk to any fork.

See

ForkableRecallSink

Example

const forkable = new ForkableRecallStream<number>()
await fromCollection([1, 2, 3, 4, 5, 6, 7]).pipeTo(forkable)

Now the stream has finished, if we fork from it we'll receive the last thing that was emitted.

await forkable.fork().pipeTo(write(console.info))
// 7

Type Parameters

  • T

Hierarchy (view full)

Constructors

Properties

Accessors

Methods

Constructors

Properties

locked: boolean

Accessors

Methods

  • Parameters

    • Optional reason: any

    Returns Promise<void>

  • Returns Promise<void>

  • Returns WritableStreamDefaultWriter<T>

Generated using TypeDoc