From 38f75184e47bfe43a02a77ccfe6aa8a89eff7965 Mon Sep 17 00:00:00 2001 From: Michael Cousins Date: Wed, 24 Jan 2024 18:34:16 +1000 Subject: [PATCH] fix(types): correct type annotation for `act` --- types/index.d.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/types/index.d.ts b/types/index.d.ts index 63072c1..c1de78a 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -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): Promise +export function act(fn?: () => unknown): Promise