Options
All
  • Public
  • Public/Protected
  • All
Menu

Class TimeoutStream

A timeout stream is triggered by a timer, the Handler will be call when the timer is fired, it can be once or several times depending on the nature of the timer related to this stream. The will be called after the timer handler has been called.

Pausing the timer inhibits the timer shots until the stream is resumed. Setting a null handler callback cancels the timer.

Hierarchy

  • TimeoutStream

Implements

Index

Methods

cancel

  • cancel(): void
  • Cancels the timeout. Note this has the same effect as calling {@link TimeoutStream#handler} with a null argument.

    Returns void

endHandler

  • Parameters

    • endHandler: ((res: void) => void) | Handler<void> | null | undefined

    Returns TimeoutStream

exceptionHandler

fetch

  • Parameters

    • amount: number

    Returns TimeoutStream

handler

  • Parameters

    • handler: ((res: number) => void) | Handler<number> | null | undefined

    Returns TimeoutStream

pause

pipe

  • pipe(): Pipe<number>
  • Pause this stream and return a to transfer the elements of this stream to a destination .

    The stream will be resumed when the pipe will be wired to a WriteStream.

    Returns Pipe<number>

pipeTo

  • Pipe this ReadStream to the WriteStream.

    Elements emitted by this stream will be written to the write stream until this stream ends or fails.

    Once this stream has ended or failed, the write stream will be ended and the handler will be called with the result.

    Parameters

    Returns PromiseLike<void>

  • Pipe this ReadStream to the WriteStream.

    Elements emitted by this stream will be written to the write stream until this stream ends or fails.

    Once this stream has ended or failed, the write stream will be ended and the handler will be called with the result.

    Parameters

    Returns void

resume

Generated using TypeDoc