Options
All
  • Public
  • Public/Protected
  • All
Menu

Class DefaultStream

Hierarchy

  • Transform
    • DefaultStream

Implements

  • ReadableStream
  • Writable

Constructors

constructor

Properties

active

active: boolean = true

destroyed

destroyed: boolean

Private ifEmpty

ifEmpty: Buffer

readable

readable: boolean

readableEncoding

readableEncoding: BufferEncoding | null

readableEnded

readableEnded: boolean

readableFlowing

readableFlowing: boolean | null

readableHighWaterMark

readableHighWaterMark: number

readableLength

readableLength: number

readableObjectMode

readableObjectMode: boolean

writable

writable: boolean

writableCorked

writableCorked: number

writableEnded

writableEnded: boolean

writableFinished

writableFinished: boolean

writableHighWaterMark

writableHighWaterMark: number

writableLength

writableLength: number

writableObjectMode

writableObjectMode: boolean

Methods

[Symbol.asyncIterator]

  • [Symbol.asyncIterator](): AsyncIterableIterator<any>

_destroy

  • _destroy(error: Error | null, callback: function): void

_final

  • _final(callback: function): void

_flush

  • _flush(cb: any): void

_read

  • _read(size: number): void

_transform

  • _transform(chunk: Buffer, encoding: string, cb: any): void

_write

  • _write(chunk: any, encoding: BufferEncoding, callback: function): void

Optional _writev

  • _writev(chunks: Array<object>, callback: function): void

addListener

  • addListener(event: "close", listener: function): this
  • addListener(event: "data", listener: function): this
  • addListener(event: "end", listener: function): this
  • addListener(event: "error", listener: function): this
  • addListener(event: "pause", listener: function): this
  • addListener(event: "readable", listener: function): this
  • addListener(event: "resume", listener: function): this
  • addListener(event: string | symbol, listener: function): this

cork

  • cork(): void

destroy

  • destroy(error?: Error): void

emit

  • emit(event: "close"): boolean
  • emit(event: "data", chunk: any): boolean
  • emit(event: "end"): boolean
  • emit(event: "error", err: Error): boolean
  • emit(event: "pause"): boolean
  • emit(event: "readable"): boolean
  • emit(event: "resume"): boolean
  • emit(event: string | symbol, ...args: any[]): boolean

end

  • end(cb?: undefined | function): void
  • end(chunk: any, cb?: undefined | function): void
  • end(chunk: any, encoding?: BufferEncoding, cb?: undefined | function): void

eventNames

  • eventNames(): Array<string | symbol>

getMaxListeners

  • getMaxListeners(): number

isPaused

  • isPaused(): boolean

listenerCount

  • listenerCount(event: string | symbol): number

listeners

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

off

  • off(event: string | symbol, listener: function): this

on

  • on(event: "close", listener: function): this
  • on(event: "data", listener: function): this
  • on(event: "end", listener: function): this
  • on(event: "error", listener: function): this
  • on(event: "pause", listener: function): this
  • on(event: "readable", listener: function): this
  • on(event: "resume", listener: function): this
  • on(event: string | symbol, listener: function): this

once

  • once(event: "close", listener: function): this
  • once(event: "data", listener: function): this
  • once(event: "end", listener: function): this
  • once(event: "error", listener: function): this
  • once(event: "pause", listener: function): this
  • once(event: "readable", listener: function): this
  • once(event: "resume", listener: function): this
  • once(event: string | symbol, listener: function): this

pause

  • pause(): this

pipe

  • pipe<T>(destination: T, options?: undefined | object): T

prependListener

  • prependListener(event: "close", listener: function): this
  • prependListener(event: "data", listener: function): this
  • prependListener(event: "end", listener: function): this
  • prependListener(event: "error", listener: function): this
  • prependListener(event: "pause", listener: function): this
  • prependListener(event: "readable", listener: function): this
  • prependListener(event: "resume", listener: function): this
  • prependListener(event: string | symbol, listener: function): this

prependOnceListener

  • prependOnceListener(event: "close", listener: function): this
  • prependOnceListener(event: "data", listener: function): this
  • prependOnceListener(event: "end", listener: function): this
  • prependOnceListener(event: "error", listener: function): this
  • prependOnceListener(event: "pause", listener: function): this
  • prependOnceListener(event: "readable", listener: function): this
  • prependOnceListener(event: "resume", listener: function): this
  • prependOnceListener(event: string | symbol, listener: function): this

push

  • push(chunk: any, encoding?: BufferEncoding): boolean

rawListeners

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

read

  • read(size?: undefined | number): any

removeAllListeners

  • removeAllListeners(event?: string | symbol): this

removeListener

  • removeListener(event: "close", listener: function): this
  • removeListener(event: "data", listener: function): this
  • removeListener(event: "end", listener: function): this
  • removeListener(event: "error", listener: function): this
  • removeListener(event: "pause", listener: function): this
  • removeListener(event: "readable", listener: function): this
  • removeListener(event: "resume", listener: function): this
  • removeListener(event: string | symbol, listener: function): this

resume

  • resume(): this

setDefaultEncoding

  • setDefaultEncoding(encoding: BufferEncoding): this

setEncoding

  • setEncoding(encoding: BufferEncoding): this

setMaxListeners

  • setMaxListeners(n: number): this

uncork

  • uncork(): void

unpipe

  • unpipe(destination?: NodeJS.WritableStream): this

unshift

  • unshift(chunk: any, encoding?: BufferEncoding): void

wrap

  • wrap(oldStream: ReadableStream): this

write

  • write(chunk: any, encoding?: BufferEncoding, cb?: undefined | function): boolean
  • write(chunk: any, cb?: undefined | function): boolean

Static from

  • from(iterable: Iterable<any> | AsyncIterable<any>, options?: ReadableOptions): Readable

Generated using TypeDoc