mirror of
https://github.com/centau/vide.git
synced 2026-08-20 14:41:37 +00:00
Refactor codebase
This commit is contained in:
parent
07ae542e28
commit
a3f03fd067
15 changed files with 228 additions and 128 deletions
|
|
@ -6,10 +6,14 @@ local refs = graph.refs
|
|||
|
||||
local function untrack<T>(source: () -> T): T
|
||||
local initial = #refs
|
||||
|
||||
local value = source()
|
||||
|
||||
-- remove any references made since `untrack()` was called
|
||||
for i = initial, #refs do
|
||||
refs[i] = nil
|
||||
end
|
||||
|
||||
return value
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue