AboutSupportDeveloper GuideVersion 47.154.100.2
OpenFin JavaScript API
    Preparing search index...

    Interface Readable<T>

    A readonly implementation of the observable pattern. Frameworks and vanilla consumers use this to read state and subscribe to changes.

    interface Readable<T> {
        get(): T;
        subscribe(listener: () => void): () => void;
    }

    Type Parameters

    • T
    Index
    • Synchronously returns the current value.

      Returns T

    • Subscribes to changes.

      Parameters

      • listener: () => void

        A callback that is invoked when the value changes.

      Returns () => void

      An unsubscribe function to clean up the listener.