Skip to content

Commit

Permalink
fix: add proper typings for $derived.call
Browse files Browse the repository at this point in the history
fixes #10330
  • Loading branch information
dummdidumm committed Jan 30, 2024
1 parent 77b4c4b commit 6145be5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/real-items-suffer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"svelte": patch
---

fix: add proper typings for `$derived.call`
2 changes: 1 addition & 1 deletion packages/svelte/src/main/ambient.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ declare namespace $derived {
*
* https://svelte-5-preview.vercel.app/docs/runes#$derived-call
*/
export function fn<T>(fn: () => T): void;
export function call<T>(fn: () => T): void;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/svelte/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2485,7 +2485,7 @@ declare namespace $derived {
*
* https://svelte-5-preview.vercel.app/docs/runes#$derived-call
*/
export function fn<T>(fn: () => T): void;
export function call<T>(fn: () => T): void;
}

/**
Expand Down

0 comments on commit 6145be5

Please sign in to comment.