Script API - v1.26.10.23
    Preparing search index...

    Class Observable<T>Beta

    A class that represents data that can be Observed. Extensively used for UI.

    Type Parameters

    Index

    Constructors

    Methods

    • Returns T

      Gets the data from the Observable.

      This function can't be called in early-execution mode.

    • Parameters

      • data: T

      Returns void

      Sets the data on this Observable and notifies the subscribers.

      This function can't be called in early-execution mode.

    • Parameters

      • listener: (newValue: T) => void

      Returns (newValue: T) => void

      Subscribes a callback to any changes that occur to the Observable. The return value can be passed into the unsubscribe function to stop listening to changes.

      This function can't be called in early-execution mode.

    • Parameters

      • listener: (newValue: T) => void

      Returns void

      Unsubscribe a callback from any changes that occur to the Observable. This takes the return value from the subscribe function.

      This function can't be called in early-execution mode.