mirror of
https://github.com/centau/vide.git
synced 2026-08-20 14:41:37 +00:00
Update cleanup() docs
This commit is contained in:
parent
bbda0426da
commit
3959f5119e
1 changed files with 5 additions and 0 deletions
|
|
@ -8,6 +8,11 @@ Runs a callback anytime a reactive scope is reran or destroyed.
|
|||
|
||||
```lua
|
||||
function cleanup(callback: () -> ())
|
||||
function cleanup(obj: Destroyable)
|
||||
function cleanup(obj: Disconnectable)
|
||||
|
||||
type Destroyable = { destroy: () -> () }
|
||||
type Disconnectable = { disconnect: () -> () }
|
||||
```
|
||||
|
||||
- **Example**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue