mirror of
https://github.com/littensy/charm.git
synced 2026-10-20 17:51:37 +00:00
fix: add cleanup parameter to effect type (#52)
This commit is contained in:
parent
d7a1f62c3c
commit
d0b7cff943
1 changed files with 1 additions and 1 deletions
2
packages/charm/src/index.d.ts
vendored
2
packages/charm/src/index.d.ts
vendored
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue