Interface Tweened<T>
interface Tweened<T> {
set(value: T, opts?: TweenedOptions<T>): Promise<void>;
subscribe(
this: void,
run: Subscriber<T>,
invalidate?: Invalidator<T>,
): Unsubscriber;
update(updater: Updater<T>, opts?: TweenedOptions<T>): Promise<void>;
}
set(value: T, opts?: TweenedOptions<T>): Promise<void>;
subscribe(
this: void,
run: Subscriber<T>,
invalidate?: Invalidator<T>,
): Unsubscriber;
update(updater: Updater<T>, opts?: TweenedOptions<T>): Promise<void>;
}
Type Parameters
Hierarchy
- Readable<T>
- Tweened (View Summary)
Methods
set
- set(value: T, opts?: TweenedOptions<T>): Promise<void>
Parameters
- value: T
Optional
opts: TweenedOptions<T>
Returns Promise<void>
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
update
- update(updater: Updater<T>, opts?: TweenedOptions<T>): Promise<void>
Parameters
- updater: Updater<T>
Optional
opts: TweenedOptions<T>
Returns Promise<void>
Readable interface for subscribing.