Skip to content

Commit

Permalink
fix(types): correct type annotation for act
Browse files Browse the repository at this point in the history
  • Loading branch information
mcous committed Jan 24, 2024
1 parent c0ff791 commit 38f7518
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ export type FireObject = {
export const fireEvent: FireFunction & FireObject;

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

0 comments on commit 38f7518

Please sign in to comment.