Skip to content

Commit

Permalink
Update untrack() type to allow no return
Browse files Browse the repository at this point in the history
  • Loading branch information
centau committed Jan 7, 2025
1 parent a383c4c commit b787875
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 1 addition & 1 deletion src/untrack.luau
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ local function untrack<T>(source: () -> T): T
end
end

return untrack
return untrack :: ( <T>(fn: () -> T) -> T ) & ( (fn: () -> ()) -> () )
3 changes: 0 additions & 3 deletions test/tests.luau
Original file line number Diff line number Diff line change
Expand Up @@ -1250,7 +1250,6 @@ TEST("show()", wrap_root(function()
destroyed += 1
end)
end)
return nil
end)
end)
end)
Expand Down Expand Up @@ -2863,7 +2862,6 @@ TEST("strict", wrap_root(function()
vide.cleanup(function() count_2 += 1 end)
return {}
end)
return nil
end)
end)
end)
Expand All @@ -2890,7 +2888,6 @@ TEST("strict", wrap_root(function()
vide.cleanup(function() count_2 += 1 end)
return {}
end)
return nil
end)
end)
end)
Expand Down

0 comments on commit b787875

Please sign in to comment.