From 355f84930014d5d580111a583ac59a261df15b6b Mon Sep 17 00:00:00 2001 From: richard <56808540+littensy@users.noreply.github.com> Date: Sun, 2 Jun 2024 01:13:00 -0700 Subject: [PATCH] fix: `effect()` type --- src/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.d.ts b/src/index.d.ts index 8c03719..95b766a 100644 --- a/src/index.d.ts +++ b/src/index.d.ts @@ -83,12 +83,12 @@ declare namespace Charm { * changes. Returns a cleanup function that unsubscribes the callback. * * Note that dependencies are only evaluated once when the effect is created, - * conditional dependencies may not work as expected. + * so conditional dependencies may not work as expected. * * @param callback The function to run. * @returns A function that unsubscribes the callback. */ - function effect(callback: () => void): Cleanup; + function effect(callback: () => Cleanup | void): Cleanup; /** * Returns the result of the function without subscribing to changes. If a