Interface MinimalWritable<T>
interface MinimalWritable<T> {
set(this: void, value: T): void;
subscribe(
this: void,
run: Subscriber<T>,
invalidate?: Invalidator<T>,
): Unsubscriber;
}
set(this: void, value: T): void;
subscribe(
this: void,
run: Subscriber<T>,
invalidate?: Invalidator<T>,
): Unsubscriber;
}
Type Parameters
Hierarchy
- Readable<T>
- MinimalWritable (View Summary)
Methods
set
subscribe
- subscribe(
this: void,
run: Subscriber<T>,
invalidate?: Invalidator<T>,
): Unsubscriber Subscribe on value changes.
Parameters
- this: void
- run: Subscriber<T>
subscription callback
Optional
invalidate: Invalidator<T>cleanup callback
Returns Unsubscriber
The minimal requirements of the writable store contract.
A minimal writable is a Readable / subscribable, but only has a
set
method omitting theupdate
method fromWritable
.