diff --git a/.changeset/seven-jobs-sniff.md b/.changeset/seven-jobs-sniff.md new file mode 100644 index 0000000000..4faeced47b --- /dev/null +++ b/.changeset/seven-jobs-sniff.md @@ -0,0 +1,5 @@ +--- +'svelte': patch +--- + +fix: adjust `$inspect.with` type diff --git a/packages/svelte/src/main/ambient.d.ts b/packages/svelte/src/main/ambient.d.ts index 8b8eadf048..63b949de73 100644 --- a/packages/svelte/src/main/ambient.d.ts +++ b/packages/svelte/src/main/ambient.d.ts @@ -178,4 +178,4 @@ declare function $props(): T; */ declare function $inspect( ...values: T -): { with: (type: 'init' | 'update', ...values: T) => void }; +): { with: (fn: (type: 'init' | 'update', ...values: T) => void) => void }; diff --git a/packages/svelte/types/index.d.ts b/packages/svelte/types/index.d.ts index 72ec552cf8..9945df7735 100644 --- a/packages/svelte/types/index.d.ts +++ b/packages/svelte/types/index.d.ts @@ -2565,6 +2565,6 @@ declare function $props(): T; */ declare function $inspect( ...values: T -): { with: (type: 'init' | 'update', ...values: T) => void }; +): { with: (fn: (type: 'init' | 'update', ...values: T) => void) => void }; //# sourceMappingURL=index.d.ts.map \ No newline at end of file