@minecraft
    正在准备搜索索引...

    类 Observable<T>实验性

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

    类型参数

    • T extends string | number | boolean
    索引

    构造函数

    • 类型参数

      • T extends string | number | boolean

      返回 Observable<T>

    方法

    • 参数

      • listener: (newValue: T) => void

      返回 (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.

    • 参数

      • listener: (newValue: T) => void

      返回 void

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