Interface Observable<T, TChange>

Represents an observable value.

interface Observable<T, TChange> {
    TChange: undefined | TChange;
    addObserver(observer): void;
    get(accessor?): T;
    getUntracked(): T;
    removeObserver(observer): void;
    update(): void;
}

Type Parameters

  • T

    The type of values the observable can hold.

  • TChange = unknown

    Describes how or why the observable changed. While observers might miss intermediate values of an observable, they will receive all change notifications as long as they are subscribed.

Hierarchy (view full)

Implemented by

Properties

TChange: undefined | TChange

This property captures the type of change information. It should not be used at runtime.

Methods