Skip to main content

ReadonlyObservable<T>

Defined in: src/lib/observable/types.ts:88

Read-only observable interface. Provides access to current value and subscription capability.

Extended by​

Type Parameters​

Type Parameter
T

Properties​

PropertyModifierTypeDescriptionDefined in
idreadonlystringThe unique identifier of this observable.src/lib/observable/types.ts:90
valuereadonlyTThe current value.src/lib/observable/types.ts:93

Methods​

pipe()​

pipe\<U\>(source: ReadonlyObservable\<U\>, transform?: (value: U) => T): Subscription;

Defined in: src/lib/observable/types.ts:111

Subscribe to another observable, updating this one when it changes. Creates a one-way binding from source to this observable.

Type Parameters​

Type Parameter
U

Parameters​

ParameterTypeDescription
sourceReadonlyObservable<U>The source observable to subscribe to
transform?(value: U) => TOptional transform function

Returns​

Subscription

Subscription that can be disposed to unsubscribe


subscribe()​

subscribe(callback: SubscriptionCallback\<T\>): Subscription;

Defined in: src/lib/observable/types.ts:101

Subscribe to value changes.

Parameters​

ParameterTypeDescription
callbackSubscriptionCallback<T>Function called when value changes

Returns​

Subscription

Subscription that can be disposed to unsubscribe