diff --git a/packages/svelte/src/motion/public.d.ts b/packages/svelte/src/motion/public.d.ts index 4e74d4b76f06..4eea1204c869 100644 --- a/packages/svelte/src/motion/public.d.ts +++ b/packages/svelte/src/motion/public.d.ts @@ -5,7 +5,7 @@ import { SpringUpdateOpts, TweenedOptions, Updater, SpringOpts } from './private // this means both the Spring class and the Spring interface are merged into one with some things only // existing on one side. In Svelte 6, remove the type definition and move the jsdoc onto the class in spring.js -export interface Spring extends Readable { +export interface Spring extends Readable { set(new_value: T, opts?: SpringUpdateOpts): Promise; /** * @deprecated Only exists on the legacy `spring` store, not the `Spring` class @@ -36,7 +36,7 @@ export interface Spring extends Readable { * ``` * @since 5.8.0 */ -export class Spring { +export class Spring { constructor(value: T, options?: SpringOpts); /** @@ -53,7 +53,7 @@ export class Spring { * * ``` */ - static of(fn: () => U, options?: SpringOpts): Spring; + static of(fn: () => U, options?: SpringOpts): Spring; /** * Sets `spring.target` to `value` and returns a `Promise` that resolves if and when `spring.current` catches up to it. @@ -80,7 +80,7 @@ export class Spring { get current(): T; } -export interface Tweened extends Readable { +export interface Tweened extends Readable { set(value: T, opts?: TweenedOptions): Promise; update(updater: Updater, opts?: TweenedOptions): Promise; }