mirror of
https://github.com/littensy/charm.git
synced 2026-10-23 05:46:27 +00:00
fix: effect() type
This commit is contained in:
parent
6a2241884a
commit
355f849300
1 changed files with 2 additions and 2 deletions
4
src/index.d.ts
vendored
4
src/index.d.ts
vendored
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue