Skip to content

Commit c7cb90c

Browse files
committed
fix: adjust $inspect.with type
1 parent ba13c3d commit c7cb90c

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

.changeset/seven-jobs-sniff.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'svelte': patch
3+
---
4+
5+
fix: adjust `$inspect.with` type

packages/svelte/src/main/ambient.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,4 +178,4 @@ declare function $props<T>(): T;
178178
*/
179179
declare function $inspect<T extends any[]>(
180180
...values: T
181-
): { with: (type: 'init' | 'update', ...values: T) => void };
181+
): { with: (fn: (type: 'init' | 'update', ...values: T) => void) => void };

packages/svelte/types/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2565,6 +2565,6 @@ declare function $props<T>(): T;
25652565
*/
25662566
declare function $inspect<T extends any[]>(
25672567
...values: T
2568-
): { with: (type: 'init' | 'update', ...values: T) => void };
2568+
): { with: (fn: (type: 'init' | 'update', ...values: T) => void) => void };
25692569

25702570
//# sourceMappingURL=index.d.ts.map

0 commit comments

Comments
 (0)