Interface Reader

Implemented by entities from which data can be read.

interface Reader {
    read(buf: Uint8Array): Promise<number>;
}

Hierarchy (view full)

Methods

Methods

  • Reads data into the given buffer. Resolves to the number of read bytes or null for EOF.

    Parameters

    • buf: Uint8Array

      Buffer to read data into.

    Returns Promise<number>