Interface Spring<T>
interface Spring<T> {
damping: number;
precision: number;
set: (new_value: T, opts?: SpringUpdateOpts) => Promise<void>;
stiffness: number;
update: (fn: Updater<T>, opts?: SpringUpdateOpts) => Promise<void>;
subscribe(
this: void,
run: Subscriber<T>,
invalidate?: Invalidator<T>,
): Unsubscriber;
}
damping: number;
precision: number;
set: (new_value: T, opts?: SpringUpdateOpts) => Promise<void>;
stiffness: number;
update: (fn: Updater<T>, opts?: SpringUpdateOpts) => Promise<void>;
subscribe(
this: void,
run: Subscriber<T>,
invalidate?: Invalidator<T>,
): Unsubscriber;
}
Type Parameters
Hierarchy
- Readable<T>
- Spring (View Summary)
Methods
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
Readable interface for subscribing.