Class Behavior<A>

A dynamic, time-varying value.

See

Example

const prop = new Behavior<number>(0);
prop.subscribe(() => {
console.log("property updated: ", prop.value);
}); // prints: "property updated: 0"
prop.next(1); // "property updated: 1"
prop.next(2); // "property updated: 2" ...

Type Parameters

  • A

Hierarchy (view full)

Implements

Constructors

Properties

Accessors

Methods

Constructors

Properties

_done: boolean = false
_subscribers: Observer<A, unknown>[] = []
_value: A

Accessors

  • get done(): boolean
  • Flag indicating whether the wire has finished execution.

    Returns boolean

Methods

Generated using TypeDoc