interface AbstractStream {
    get streamDone(): boolean;
    appendBuffer(data: string): void;
    closeBuffer(): void;
    nextChunk(): Promise<any>;
}

Implemented by

Accessors

  • get streamDone(): boolean
  • Is the stream done? A stream is only done if all of the following are true:

    • There is no more data to be added to the text buffer
    • There is no more data in the text buffer
    • There are no chunks that are waiting to be consumed

    Returns boolean

Methods

  • Add more text to the buffer

    Parameters

    • data: string

    Returns void

  • Indicate that there is no more text to be added to the buffer (ie - our source material is done)

    Returns void

  • Get the next chunk that is coming from the stream. This chunk may be null, usually indicating the last chunk in the stream.

    Returns Promise<any>