@audiotool/nexus - v0.0.12
    Preparing search index...

    Class ValueNotifier<T>

    A value to which observers can subscribe to, which will then be notified whenever the value changes. If relevant, the following pattern can be used to only expose the subscribe function:

    class Foo {
    #notifier: ValueNotifier<number> = new ValueNotifier(0)
    get notifier(): ObservableValue<number> {
    return this.#notifier
    }
    }

    or

    class Test {
    readonly #notifier: ValueNotifier<number> = new ValueNotifier(0)
    readonly observer = this.#notifier as ObservableValue<number>
    }

    Type Parameters

    • T

    Implements

    Index

    Constructors

    Methods