Type alias StreamReadable<T>

StreamReadable<T>: Omit<Stream.Readable, "on"> & {
    [asyncIterator]() => AsyncIterableIterator<T>;
    on(event, listener) => Readable;
    on(event, listener) => Readable;
    on(event, listener) => Readable;
    on(event, listener) => Readable;
    on(event, listener) => Readable;
    on(event, listener) => Readable;
    on(event, listener) => Readable;
    on(event, listener) => Readable;
    on(event, listener) => Readable;
    on(event, listener) => Readable;
    on(event, listener) => Readable;
    on(event, listener) => Readable;
}

Stream.Readable with additional types for the on(data) method and the async iterator. Everything else is an exact copy from stream.d.ts

Type Parameters

  • T

Type declaration

  • [asyncIterator]:function
    • Returns AsyncIterableIterator<T>

  • on:function
    • Parameters

      • event: "data"
      • listener: ((chunk) => void)
          • (chunk): void
          • Parameters

            • chunk: T

            Returns void

      Returns Readable

    • Parameters

      • event: "close"
      • listener: (() => void)
          • (): void
          • Returns void

      Returns Readable

    • Parameters

      • event: "drain"
      • listener: (() => void)
          • (): void
          • Returns void

      Returns Readable

    • Parameters

      • event: "end"
      • listener: (() => void)
          • (): void
          • Returns void

      Returns Readable

    • Parameters

      • event: "error"
      • listener: ((err) => void)
          • (err): void
          • Parameters

            • err: Error

            Returns void

      Returns Readable

    • Parameters

      • event: "finish"
      • listener: (() => void)
          • (): void
          • Returns void

      Returns Readable

    • Parameters

      • event: "pause"
      • listener: (() => void)
          • (): void
          • Returns void

      Returns Readable

    • Parameters

      • event: "pipe"
      • listener: ((src) => void)
          • (src): void
          • Parameters

            • src: Readable

            Returns void

      Returns Readable

    • Parameters

      • event: "readable"
      • listener: (() => void)
          • (): void
          • Returns void

      Returns Readable

    • Parameters

      • event: "resume"
      • listener: (() => void)
          • (): void
          • Returns void

      Returns Readable

    • Parameters

      • event: "unpipe"
      • listener: ((src) => void)
          • (src): void
          • Parameters

            • src: Readable

            Returns void

      Returns Readable

    • Parameters

      • event: string | symbol
      • listener: ((...args) => void)
          • (...args): void
          • Parameters

            • Rest ...args: any[]
              Rest

            Returns void

      Returns Readable

Generated using TypeDoc