Skip to content

Commit d4d397d

Browse files
authored
Update spring.js
1 parent 124c94d commit d4d397d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/svelte/src/motion/spring.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,14 @@ function tick_spring(ctx, last_value, current_value, target_value) {
6666
export function spring(value, opts = {}) {
6767
const store = writable(value);
6868
const { stiffness = 0.15, damping = 0.8, precision = 0.01 } = opts;
69-
/** @type {number} */
69+
/** @type {number | undefined} */
7070
let last_time;
7171
/** @type {Task | null} */
7272
let task;
7373
/** @type {object} */
7474
let current_token;
7575

76-
let last_value = /** @type {T} */ (value);
76+
let last_value = /** @type {T | undefined} */ (value);
7777
let target_value = /** @type {T | undefined} */ (value);
7878

7979
let inv_mass = 1;

0 commit comments

Comments
 (0)