From d0b7cff9436bf8c45c86f585a34775213b78de8e Mon Sep 17 00:00:00 2001 From: alihsaas <40891677+alihsaas@users.noreply.github.com> Date: Wed, 23 Jul 2025 10:35:39 +0300 Subject: [PATCH] fix: add cleanup parameter to effect type (#52) --- packages/charm/src/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/charm/src/index.d.ts b/packages/charm/src/index.d.ts index da1c5fa..8336177 100644 --- a/packages/charm/src/index.d.ts +++ b/packages/charm/src/index.d.ts @@ -86,7 +86,7 @@ declare namespace Charm { * @param callback The function to run. * @returns A function that unsubscribes the callback. */ - function effect(callback: () => Cleanup | void): Cleanup; + function effect(callback: (cleanup: Cleanup) => Cleanup | void): Cleanup; /** * Returns the result of the function without subscribing to changes. If a