Class DefaultWatchableState<State>

A Watchable encapsulating a changing value which you can write and read.

Type Parameters

  • State

    The value stored, retrieved and watched.

Hierarchy

  • DefaultWatchable<State>
    • DefaultWatchableState

Implements

Constructors

Properties

Methods

Constructors

Properties

value: State
watchers: readonly Watcher<State>[]

Methods

  • Parameters

    • item: Value

    Returns Promise<void>

  • Subscribes watcher to receive notifications.

    Parameters

    • watcher: Watcher<Value>

      The subscribed function.

    Returns (() => void)

    • a callback for unsubscribing
      • (): void
      • Returns void

Generated using TypeDoc