Skip to content

Commit 38f7518

Browse files
committedJan 24, 2024
fix(types): correct type annotation for act
1 parent c0ff791 commit 38f7518

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed
 

‎types/index.d.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ export type FireObject = {
6060
export const fireEvent: FireFunction & FireObject;
6161

6262
/**
63-
* Calls a function or resolves a Promise and notifies Svelte to immediately flushes any pending
64-
* state changes.
63+
* Calls a function and notifies Svelte to flush any pending state changes.
64+
*
65+
* If the function returns a Promise, that Promise will be resolved first.
6566
*/
66-
export function act(fn?: Function | Promise<any>): Promise<void>
67+
export function act(fn?: () => unknown): Promise<void>

0 commit comments

Comments
 (0)
Please sign in to comment.