Function onUnsubscribe

  • Calls the given teardown function when the subscriber unsubscribes. Completion and an error send by the observable will lead to unsubscribing and therefore also trigger a call of the given teardown function.

    Type Parameters

    • T

    Parameters

    • teardown: (() => void)

      function that should be called

        • (): void
        • Returns void

    Returns ((source) => Observable<T>)

      • (source): Observable<T>
      • Parameters

        • source: Observable<T>

        Returns Observable<T>

Generated using TypeDoc