wavesurfer.js
    Preparing search index...

    Interface WritableSignal<T>

    Reactive primitives for managing state in WaveSurfer. Signals notify synchronously; use batch() to coalesce. computed/effect auto-track dependencies when no dependency array is given, and are always disposable.

    interface WritableSignal<T> {
        get value(): T;
        set(value: T): void;
        subscribe(callback: (value: T) => void): () => void;
        update(fn: (current: T) => T): void;
    }

    Type Parameters

    • T

    Hierarchy (View Summary)

    Index
    • get value(): T

      Returns T

    • Parameters

      • value: T

      Returns void

    • Parameters

      • callback: (value: T) => void

      Returns () => void

    • Parameters

      • fn: (current: T) => T

      Returns void