Writable interface for both updating and subscribing. See the main SvelteStore article on how to use it in Micrio.

interface Writable<T> {
    set(this, value): void;
    subscribe(this, run, invalidate?): Unsubscriber;
    update(this, updater): void;
}

Type Parameters

  • T

Hierarchy (view full)

Methods

  • Set value and inform subscribers.

    Parameters

    • this: void
    • value: T

      to set

    Returns void

  • Update value using callback and inform subscribers.

    Parameters

    Returns void