Options
All
  • Public
  • Public/Protected
  • All
Menu

Class WriteableStreamImpl<T>

Type parameters

  • T

Hierarchy

  • WriteableStreamImpl

Implements

Index

Constructors

constructor

Properties

Private Optional options

Private Readonly pendingWritePromises

pendingWritePromises: Function[] = []

Private reducer

reducer: Reducer<T>

Methods

destroy

  • destroy(): void

end

  • end(result?: T | Error): void

error

  • error(error: Error): void

Private flowData

  • flowData(): void

Private flowEnd

  • flowEnd(): boolean

Private flowErrors

  • flowErrors(): void

on

  • on(event: "data", callback: (data: T) => void): void
  • on(event: "error", callback: (err: Error) => void): void
  • on(event: "end", callback: () => void): void

pause

  • pause(): void

removeListener

  • removeListener(event: string, callback: Function): void

resume

  • resume(): void

write

  • write(data: T): void | Promise<void>

Object literals

Private Readonly buffer

buffer: object

data

data: T[] = [] as T[]

error

error: Error[] = [] as Error[]

Private Readonly listeners

listeners: object

data

data: ((data: T) => void)[] = [] as { (data: T): void }[]

end

end: (() => void)[] = [] as { (): void }[]

error

error: ((error: Error) => void)[] = [] as { (error: Error): void }[]

Private Readonly state

state: object

destroyed

destroyed: boolean = false

ended

ended: boolean = false

flowing

flowing: boolean = false