Options
All
  • Public
  • Public/Protected
  • All
Menu

Class FinalizeWithLastSubscriber<T>

Type parameters

  • T

Hierarchy

  • Subscriber<T>
    • FinalizeWithLastSubscriber

Implements

  • SubscriptionLike
  • Observer<T>

Index

Constructors

constructor

Properties

Protected _parentOrParents

_parentOrParents: Subscription | Subscription[]
internal

Private callback

callback: function

Type declaration

    • (value: T): void
    • Parameters

      • value: T

      Returns void

closed

closed: boolean

A flag to indicate whether this Subscription has already been unsubscribed.

type

{boolean}

Protected destination

destination: PartialObserver<any> | Subscriber<any>

Protected isStopped

isStopped: boolean

syncErrorThrowable

syncErrorThrowable: boolean
internal

syncErrorThrown

syncErrorThrown: boolean
internal

syncErrorValue

syncErrorValue: any
internal

Private value

value: T

default value

Static EMPTY

EMPTY: Subscription
nocollapse

Methods

_complete

  • _complete(): void

Protected _error

  • _error(err: any): void
  • Parameters

    • err: any

    Returns void

_next

  • _next(value: T): void

_unsubscribeAndRecycle

  • _unsubscribeAndRecycle(): Subscriber<T>
  • deprecated

    This is an internal implementation detail, do not use.

    Returns Subscriber<T>

add

  • add(teardown: TeardownLogic): Subscription
  • Adds a tear down to be called during the unsubscribe() of this Subscription. Can also be used to add a child subscription.

    If the tear down being added is a subscription that is already unsubscribed, is the same reference add is being called on, or is Subscription.EMPTY, it will not be added.

    If this subscription is already in an closed state, the passed tear down logic will be executed immediately.

    When a parent subscription is unsubscribed, any child subscriptions that were added to it are also unsubscribed.

    Parameters

    • teardown: TeardownLogic

      The additional logic to execute on teardown.

    Returns Subscription

    Returns the Subscription used or created to be added to the inner subscriptions list. This Subscription can be used with remove() to remove the passed teardown logic from the inner subscriptions list.

complete

  • complete(): void
  • The {@link Observer} callback to receive a valueless notification of type complete from the Observable. Notifies the Observer that the Observable has finished sending push-based notifications.

    Returns void

error

  • error(err?: any): void
  • The {@link Observer} callback to receive notifications of type error from the Observable, with an attached Error. Notifies the Observer that the Observable has experienced an error condition.

    Parameters

    • Optional err: any

    Returns void

next

  • next(value?: T): void
  • The {@link Observer} callback to receive notifications of type next from the Observable, with a value. The Observable may call this method 0 or more times.

    Parameters

    • Optional value: T

    Returns void

remove

  • remove(subscription: Subscription): void
  • Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.

    Parameters

    • subscription: Subscription

      The subscription to remove.

    Returns void

unsubscribe

  • unsubscribe(): void
  • Returns void

Static create

  • create<T>(next?: undefined | function, error?: undefined | function, complete?: undefined | function): Subscriber<T>
  • A static factory for a Subscriber, given a (potentially partial) definition of an Observer.

    nocollapse

    Type parameters

    • T

    Parameters

    • Optional next: undefined | function
    • Optional error: undefined | function
    • Optional complete: undefined | function

    Returns Subscriber<T>

    A Subscriber wrapping the (partially defined) Observer represented by the given arguments.

Generated using TypeDoc