fix: add cleanup parameter to effect type (#52)

This commit is contained in:
alihsaas 2025-07-23 10:35:39 +03:00 • committed by GitHub
parent d7a1f62c3c
commit d0b7cff943
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -86,7 +86,7 @@ declare namespace Charm {
* @param callback The function to run. * @param callback The function to run.
* @returns A function that unsubscribes the callback. * @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 * Returns the result of the function without subscribing to changes. If a