Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Functions

Const concatMap

  • concatMap<T, R>(project: function): OperatorFunction<T, R>
  • Like RxJS concatMap, but passes an AbortSignal that is aborted when the returned Observable is unsubscribed from.

    Type parameters

    • T

    • R

    Parameters

    • project: function
        • (value: T, index: number, abortSignal: AbortSignal): ObservableInput<R>
        • Parameters

          • value: T
          • index: number
          • abortSignal: AbortSignal

          Returns ObservableInput<R>

    Returns OperatorFunction<T, R>

Const create

  • create<T>(subscribe?: undefined | function): Observable<T>
  • Creates an Observable just like RxJS create, but exposes an AbortSignal in addition to the subscriber

    Type parameters

    • T

    Parameters

    • Optional subscribe: undefined | function

    Returns Observable<T>

Const createAbortError

  • createAbortError(): Error

Const defer

  • defer<T>(factory: function): Observable<T>
  • Easiest way to wrap an abortable async function into a Promise. The factory is called every time the Observable is subscribed to, and the AbortSignal is aborted on unsubscription.

    Type parameters

    • T

    Parameters

    • factory: function
        • (signal: AbortSignal): ObservableInput<T>
        • Parameters

          • signal: AbortSignal

          Returns ObservableInput<T>

    Returns Observable<T>

Const forEach

  • forEach<T>(source: Observable<T>, next: function, signal?: AbortSignal): Promise<void>
  • Calls next for every emission and returns a Promise that resolves when the Observable completed, rejects if the Observable errors or rejects with an AbortError when the AbortSignal is aborted.

    Type parameters

    • T

    Parameters

    • source: Observable<T>
    • next: function
        • (value: T): void
        • Parameters

          • value: T

          Returns void

    • Optional signal: AbortSignal

    Returns Promise<void>

Const mergeMap

  • mergeMap<T, R>(project: function): OperatorFunction<T, R>
  • Like RxJS mergeMap, but passes an AbortSignal that is aborted when the returned Observable is unsubscribed from.

    Type parameters

    • T

    • R

    Parameters

    • project: function
        • (value: T, index: number, abortSignal: AbortSignal): ObservableInput<R>
        • Parameters

          • value: T
          • index: number
          • abortSignal: AbortSignal

          Returns ObservableInput<R>

    Returns OperatorFunction<T, R>

Const switchMap

  • switchMap<T, R>(project: function): OperatorFunction<T, R>
  • Like RxJS switchMap, but passes an AbortSignal that is aborted when the source emits another element.

    Type parameters

    • T

    • R

    Parameters

    • project: function
        • (value: T, index: number, abortSignal: AbortSignal): ObservableInput<R>
        • Parameters

          • value: T
          • index: number
          • abortSignal: AbortSignal

          Returns ObservableInput<R>

    Returns OperatorFunction<T, R>

Const toPromise

  • toPromise<T>(observable: Observable<T>, signal?: AbortSignal): Promise<T>
  • Returns a Promise that resolves with the last emission of the given Observable, rejects if the Observable errors or rejects with an AbortError when the AbortSignal is aborted.

    Type parameters

    • T

    Parameters

    • observable: Observable<T>
    • Optional signal: AbortSignal

    Returns Promise<T>

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc