fix: Update `$derived.call` type declaration (#10349)

---------

Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
pull/10327/head
Jayden Carey 12 months ago committed by GitHub
parent 0279546e02
commit f9ed9cfc4b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -0,0 +1,5 @@
---
'svelte': patch
---
Use generic `T` as the return type for `$derived.call()`

@ -77,7 +77,7 @@ declare namespace $derived {
*
* https://svelte-5-preview.vercel.app/docs/runes#$derived-call
*/
export function call<T>(fn: () => T): void;
export function call<T>(fn: () => T): T;
}
/**

@ -2511,7 +2511,7 @@ declare namespace $derived {
*
* https://svelte-5-preview.vercel.app/docs/runes#$derived-call
*/
export function call<T>(fn: () => T): void;
export function call<T>(fn: () => T): T;
}
/**

Loading…
Cancel
Save