fix effect typing not including cleanup as parameter for callback

This commit is contained in:
alihsaas 2025-07-22 22:10:03 +03:00 • committed by GitHub
parent d7a1f62c3c
commit 258fe13191
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.
* @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