From d4d397d19b9bf0f69884ee3ba570e4bbf2c6278f Mon Sep 17 00:00:00 2001 From: ComputerGuy <63362464+Ocean-OS@users.noreply.github.com> Date: Thu, 26 Dec 2024 12:51:58 -0800 Subject: [PATCH] Update spring.js --- packages/svelte/src/motion/spring.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/svelte/src/motion/spring.js b/packages/svelte/src/motion/spring.js index 15481483d615..d14c025d6a38 100644 --- a/packages/svelte/src/motion/spring.js +++ b/packages/svelte/src/motion/spring.js @@ -66,14 +66,14 @@ function tick_spring(ctx, last_value, current_value, target_value) { export function spring(value, opts = {}) { const store = writable(value); const { stiffness = 0.15, damping = 0.8, precision = 0.01 } = opts; - /** @type {number} */ + /** @type {number | undefined} */ let last_time; /** @type {Task | null} */ let task; /** @type {object} */ let current_token; - let last_value = /** @type {T} */ (value); + let last_value = /** @type {T | undefined} */ (value); let target_value = /** @type {T | undefined} */ (value); let inv_mass = 1;