Creates a signal whose value morphs from the old value to the new over a specified duration.

Either a value, signal, observable, or function that can be used in a computed function.

Options for the signal. If a number, number[] or Record<string | number symbol, number> is passed then this is not required. Otherwise an interpolator is required to translate the change of the value.

const fastLinearChange = tweenSignal(1);
const slowEaseInChange = tweenSignal(1, { duration: 5000, easing: easeInQuad });
function demo(): void {
fastLinearChange.set(5); // in 400ms will display something like 1, 1.453, 2.134, 3.521, 4.123, 5.
slowEaseInChange.set(5, { duration: 10000 }); // in 10000ms will display something like 1, 1.21, 1.4301...
}