Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ReadWriteStream

Hierarchy

Index

Properties

readable

readable: boolean

writable

writable: boolean

Methods

[Symbol.asyncIterator]

  • [Symbol.asyncIterator](): AsyncIterableIterator<string | Buffer>

addListener

  • addListener(event: string | symbol, listener: (...args: any[]) => void): ReadWriteStream
  • Parameters

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

          • Rest ...args: any[]

          Returns void

    Returns ReadWriteStream

emit

  • emit(event: string | symbol, ...args: any[]): boolean
  • Parameters

    • event: string | symbol
    • Rest ...args: any[]

    Returns boolean

end

  • end(cb?: () => void): void
  • end(data: string | Uint8Array, cb?: () => void): void
  • end(str: string, encoding?: string, cb?: () => void): void
  • Parameters

    • Optional cb: () => void
        • (): void
        • Returns void

    Returns void

  • Parameters

    • data: string | Uint8Array
    • Optional cb: () => void
        • (): void
        • Returns void

    Returns void

  • Parameters

    • str: string
    • Optional encoding: string
    • Optional cb: () => void
        • (): void
        • Returns void

    Returns void

eventNames

  • eventNames(): (string | symbol)[]
  • Returns (string | symbol)[]

getMaxListeners

  • getMaxListeners(): number

isPaused

  • isPaused(): boolean

listenerCount

  • listenerCount(type: string | symbol): number
  • Parameters

    • type: string | symbol

    Returns number

listeners

  • listeners(event: string | symbol): Function[]
  • Parameters

    • event: string | symbol

    Returns Function[]

off

  • off(event: string | symbol, listener: (...args: any[]) => void): ReadWriteStream
  • Parameters

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

          • Rest ...args: any[]

          Returns void

    Returns ReadWriteStream

on

  • on(event: string | symbol, listener: (...args: any[]) => void): ReadWriteStream
  • Parameters

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

          • Rest ...args: any[]

          Returns void

    Returns ReadWriteStream

once

  • once(event: string | symbol, listener: (...args: any[]) => void): ReadWriteStream
  • Parameters

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

          • Rest ...args: any[]

          Returns void

    Returns ReadWriteStream

pause

pipe

  • pipe<T>(destination: T, options?: { end?: undefined | boolean }): T
  • Type parameters

    Parameters

    • destination: T
    • Optional options: { end?: undefined | boolean }
      • Optional end?: undefined | boolean

    Returns T

prependListener

  • prependListener(event: string | symbol, listener: (...args: any[]) => void): ReadWriteStream
  • Parameters

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

          • Rest ...args: any[]

          Returns void

    Returns ReadWriteStream

prependOnceListener

  • prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): ReadWriteStream
  • Parameters

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

          • Rest ...args: any[]

          Returns void

    Returns ReadWriteStream

rawListeners

  • rawListeners(event: string | symbol): Function[]
  • Parameters

    • event: string | symbol

    Returns Function[]

read

  • read(size?: number): string | Buffer
  • Parameters

    • Optional size: number

    Returns string | Buffer

removeAllListeners

removeListener

  • removeListener(event: string | symbol, listener: (...args: any[]) => void): ReadWriteStream
  • Parameters

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

          • Rest ...args: any[]

          Returns void

    Returns ReadWriteStream

resume

setEncoding

setMaxListeners

unpipe

unshift

  • unshift(chunk: string | Uint8Array, encoding?: "ascii" | "utf8" | "utf-8" | "utf16le" | "ucs2" | "ucs-2" | "base64" | "latin1" | "binary" | "hex"): void
  • Parameters

    • chunk: string | Uint8Array
    • Optional encoding: "ascii" | "utf8" | "utf-8" | "utf16le" | "ucs2" | "ucs-2" | "base64" | "latin1" | "binary" | "hex"

    Returns void

wrap

write

  • write(buffer: string | Uint8Array, cb?: (err?: null | Error) => void): boolean
  • write(str: string, encoding?: string, cb?: (err?: null | Error) => void): boolean
  • Parameters

    • buffer: string | Uint8Array
    • Optional cb: (err?: null | Error) => void
        • (err?: null | Error): void
        • Parameters

          • Optional err: null | Error

          Returns void

    Returns boolean

  • Parameters

    • str: string
    • Optional encoding: string
    • Optional cb: (err?: null | Error) => void
        • (err?: null | Error): void
        • Parameters

          • Optional err: null | Error

          Returns void

    Returns boolean

Generated using TypeDoc