refactor: remove recursive()

This commit is contained in:
littensy 2026-02-22 23:21:57 -08:00
parent 78dbaa476c
commit d741640d28
2 changed files with 0 additions and 37 deletions

View file

@ -272,21 +272,6 @@ export function observe<V, K extends Key>(
fn: (value: V, key: K) => Cleanup | void,
): Cleanup;
/**
* Disables recursive checks for the current reactive node. Currently, only
* computed signals use recursion checks, as effects allow recursion.
*
* @example
* ```ts
* computed(() => {
* recursive();
* setCount(getCount() + 1);
* return getCount();
* })
* ```
*/
export function recursive(): void;
/**
* Creates a deep reactive value that tracks properties when they're accessed.
* Returns a proxy object that subscribes to changes on any nested property

View file

@ -876,27 +876,6 @@ local function subscribe<T>(getter: () -> T, fn: (state: T, lastState: T) -> ())
end)
end
--[[
Disables recursive checks for the current reactive node. Currently, only
computed signals use recursion checks, as effects allow recursion.
@example
```luau
computed(function()
recursive()
setCount(getCount() + 1)
return getCount()
end)
```
]]
local function recursive()
if activeSub then
activeSub.flags = bit32.band(activeSub.flags, bit32.bnot(RECURSED_CHECK))
else
warn(debug.traceback("recursive() can only be called inside a reactive node.", 2))
end
end
--[[
Calls the callback function for each unique key in the table returned by the
getter. The callback is called once for each key, and again when a new key
@ -1185,7 +1164,6 @@ return {
batch = batch,
subscribe = subscribe,
listen = listen,
recursive = recursive,
observe = observe,
mapped = mapped :: (<KI, VI, KO, VO>(
getter: () -> { [KI]: VI },