Skip to content

Commit

Permalink
Merge pull request #288 from mcous/fix-134
Browse files Browse the repository at this point in the history
fix(types): correct type annotation for `act`
  • Loading branch information
yanick committed Jan 24, 2024
2 parents c0ff791 + 38f7518 commit 9ef86c7
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 9ef86c7

Please sign in to comment.