Skip to content

Commit 28d5563

Browse files
authored
Update spring.js
1 parent 7f8acb8 commit 28d5563

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/svelte/src/motion/spring.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { get } from '../internal/client/runtime.js';
1111
import { deferred, noop } from '../internal/shared/utils.js';
1212

1313
/**
14-
* @template T
14+
* @template {number} T
1515
* @param {TickContext} ctx
1616
* @param {T} last_value
1717
* @param {T} current_value
@@ -58,7 +58,7 @@ function tick_spring(ctx, last_value, current_value, target_value) {
5858
* The spring function in Svelte creates a store whose value is animated, with a motion that simulates the behavior of a spring. This means when the value changes, instead of transitioning at a steady rate, it "bounces" like a spring would, depending on the physics parameters provided. This adds a level of realism to the transitions and can enhance the user experience.
5959
*
6060
* @deprecated Use [`Spring`](https://svelte.dev/docs/svelte/svelte-motion#Spring) instead
61-
* @template [T=any]
61+
* @template {number} T
6262
* @param {T} [value]
6363
* @param {SpringOpts} [opts]
6464
* @returns {SpringStore<T>}
@@ -159,7 +159,7 @@ export function spring(value, opts = {}) {
159159
* <input type="range" bind:value={spring.target} />
160160
* <input type="range" bind:value={spring.current} disabled />
161161
* ```
162-
* @template T
162+
* @template {number} T
163163
* @since 5.8.0
164164
*/
165165
export class Spring {
@@ -207,7 +207,7 @@ export class Spring {
207207
* const spring = Spring.of(() => number);
208208
* </script>
209209
* ```
210-
* @template U
210+
* @template {number} U
211211
* @param {() => U} fn
212212
* @param {SpringOpts} [options]
213213
*/

0 commit comments

Comments
 (0)