From 3959f5119e406a77054bf91f7f20649f3bfc1145 Mon Sep 17 00:00:00 2001 From: Aaron Smith <83140718+centau@users.noreply.github.com> Date: Wed, 27 Sep 2023 10:33:38 +0100 Subject: [PATCH] Update `cleanup()` docs --- docs/api/reactivity-utility.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/api/reactivity-utility.md b/docs/api/reactivity-utility.md index 9c7980a..a16e251 100644 --- a/docs/api/reactivity-utility.md +++ b/docs/api/reactivity-utility.md @@ -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**