Options
All
  • Public
  • Public/Protected
  • All
Menu

Class BehaviorSubject<T>

A stream-based state class.

Type parameters

  • T

Hierarchy

  • BehaviorSubject

Index

Constructors

constructor

Properties

Protected Optional currentValue

currentValue: T

The current value of this subject.

Protected hasPush

hasPush: boolean = false

True if any value has been pushed to this subject.

Protected subjectIsComplete

subjectIsComplete: boolean = false

True if this subject has been marked complete.

Protected subscribers

subscribers: ComplexSubscriber<T>[] = []

Subscribers to this subject.

Methods

complete

  • complete(finalValue?: T): Promise<void>
  • Mark this subject as complete. The promise resolves when all subscribers have been pushed to.

    Parameters

    • Optional finalValue: T

    Returns Promise<void>

    Promise

isComplete

  • isComplete(): boolean

next

  • next(val: T): Promise<void>
  • Push a new value to this subject. The promise resolves when all subscribers have been pushed to.

    Parameters

    • val: T

    Returns Promise<void>

    Promise

push

  • push(vals: T[]): Promise<void>
  • Push the given array of values to this subject in order. The promise resolves when all subscribers have been pushed to for all values.

    Parameters

    • vals: T[]

    Returns Promise<void>

    Promise

subscribe

toPromise

  • toPromise(): Promise<T>

value

  • value(): undefined | T
Extollo Logo

extollo (v. latin) - to lift up, to elevate

Extollo is a free & libre application framework in TypeScript.