Interface MinimalIOWritable<W, R>

The minimal requirements of the writable store contract.

A minimal writable is a Readable / subscribable, but only has a set method omitting the update method from Writable.

Extends the minimal writable interface to allow type differentiation between writing and reading data. This is useful when converting or transforming input data to a different or more specific output.

interface MinimalIOWritable<W, R> {
    set(this: void, value: W): void;
    subscribe(
        this: void,
        run: Subscriber<R>,
        invalidate?: Invalidator<R>,
    ): Unsubscriber;
}

Type Parameters

  • W

    Writable / input type.

  • R

    Readable / output type.

Hierarchy

Methods

Methods

  • Set value and inform subscribers.

    Parameters

    • this: void
    • value: W

      to set

    Returns void