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
- T
type of data.
Hierarchy
- Readable<T>
- MinimalWritable (View Summary)
Methods
set
subscribe
Subscribe on value changes.
Parameters
- this: void
- run: Subscriber<T>
subscription callback
Optionalinvalidate: 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
setmethod omitting theupdatemethod fromWritable.