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
Methods
set
- set(value, opts?): Promise<void>
Parameters
- value: T
Optional
opts: TweenedOptions<T>
Returns Promise<void>
subscribe
- subscribe(this, run, invalidate?): Unsubscriber
Subscribe on value changes.
Parameters
- this: void
- run: Subscriber<T>
subscription callback
Optional
invalidate: Invalidator<T>cleanup callback
Returns Unsubscriber
Readable interface for subscribing.