Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "subs/timeout"

Index

Classes

Interfaces

Functions

Functions

Const timeout

  • Returns a Subscription that calls the ISubscriber.error handlers of all child subscriptions with an arbitrary error object after a given time.

    remarks

    If no error is given, uses a new Error instance by default. If resetTimeout is false (default), the error is emitted regardless of any received values in the meantime. However, if true, the timeout resets with each received value and then only triggers once the time interval since the last value has exceeded.

    Type parameters

    • T

    Parameters

    • timeoutMs: number

      timeout period in milliseconds

    • Optional opts: Partial<TimeoutOpts>

      -

    Returns Subscription<T, T>

Generated using TypeDoc