Interface PushableV<T, R, N>

Similar to pushable, except it yields multiple buffered chunks at a time. All values yielded from the iterable will be arrays.

Type Parameters

  • T

  • R = void

  • N = unknown

Hierarchy

Properties

readableLength: number

This property contains the number of bytes (or objects) in the queue ready to be read.

If objectMode is true, this is the number of objects in the queue, if false it's the total number of bytes in the queue.

Methods

  • Returns AsyncGenerator<T[], R, N>

  • End the iterable after all values in the buffer (if any) have been yielded. If an error is passed the buffer is cleared immediately and the next iteration will throw the passed error

    Parameters

    Returns PushableV<T, R, N>

  • Parameters

    • Rest ...args: [] | [N]

    Returns Promise<IteratorResult<T[], R>>

  • Returns a promise that resolves when the underlying queue becomes empty (e.g. this.readableLength === 0).

    If an AbortSignal is passed as an option and that signal aborts, it only causes the returned promise to reject - it does not end the pushable.

    Parameters

    Returns Promise<void>

  • Push a value into the iterable. Values are yielded from the iterable in the order they are pushed. Values not yet consumed from the iterable are buffered.

    Parameters

    • value: T

    Returns PushableV<T, R, N>

  • Parameters

    • value: R | PromiseLike<R>

    Returns Promise<IteratorResult<T[], R>>

  • Parameters

    • e: any

    Returns Promise<IteratorResult<T[], R>>

Generated using TypeDoc