From b7878753bd8fe131035b51887413b35334851444 Mon Sep 17 00:00:00 2001 From: aaron <83140718+centau@users.noreply.github.com> Date: Tue, 7 Jan 2025 00:06:39 +0000 Subject: [PATCH] Update `untrack()` type to allow no return --- src/untrack.luau | 2 +- test/tests.luau | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/untrack.luau b/src/untrack.luau index 577da25..6e15578 100644 --- a/src/untrack.luau +++ b/src/untrack.luau @@ -22,4 +22,4 @@ local function untrack(source: () -> T): T end end -return untrack +return untrack :: ( (fn: () -> T) -> T ) & ( (fn: () -> ()) -> () ) diff --git a/test/tests.luau b/test/tests.luau index cd627fc..e9365c2 100644 --- a/test/tests.luau +++ b/test/tests.luau @@ -1250,7 +1250,6 @@ TEST("show()", wrap_root(function() destroyed += 1 end) end) - return nil end) end) end) @@ -2863,7 +2862,6 @@ TEST("strict", wrap_root(function() vide.cleanup(function() count_2 += 1 end) return {} end) - return nil end) end) end) @@ -2890,7 +2888,6 @@ TEST("strict", wrap_root(function() vide.cleanup(function() count_2 += 1 end) return {} end) - return nil end) end) end)