it-pushable
    Preparing search index...

    Interface Pushable<T, R, N>

    An iterable that you can push values into.

    interface Pushable<T, R = void, N = unknown> {
        readableLength: number;
        "[asyncDispose]"(): PromiseLike<void>;
        "[asyncIterator]"(): AsyncGenerator<T, R, N>;
        end(err?: Error): this;
        next(...__namedParameters: [] | [N]): Promise<IteratorResult<T, R>>;
        onEmpty(options?: AbortOptions): Promise<void>;
        push(value: T): this;
        return(value: R | PromiseLike<R>): Promise<IteratorResult<T, R>>;
        throw(e: any): Promise<IteratorResult<T, R>>;
    }

    Type Parameters

    • T
    • R = void
    • N = unknown

    Hierarchy

    Index

    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 PromiseLike<void>

    • 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 this

    • Parameters

      • ...__namedParameters: [] | [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 this

    • Parameters

      • value: R | PromiseLike<R>

      Returns Promise<IteratorResult<T, R>>

    • Parameters

      • e: any

      Returns Promise<IteratorResult<T, R>>