fix: resolve type errors for new luau version
Some checks are pending
CI / analyze (push) Waiting to run

This commit is contained in:
littensy 2026-09-30 18:52:58 -07:00
parent b05f3a9de6
commit 73fbfb2685
6 changed files with 13 additions and 13 deletions

View file

@ -36,9 +36,9 @@ end
]]
local function toRaw<T>(value: T): T
if isReactive(value) then
value = value :: ReactiveProxy<T>
value.__track()
return toRaw(value.__target)
local proxy = value :: ReactiveProxy<T>
proxy.__track()
return toRaw(proxy.__target)
end
return value
end
@ -115,7 +115,7 @@ end
@return A reactive proxy if the value is a table
]]
local function toReactive<T>(value: T, trackParent: (() -> ())?): T
return if type(value) == "table" then reactive(value, trackParent) else value
return if type(value) == "table" then reactive(value, trackParent) :: T else value :: T
end
function ReactiveProxy.__index(self: ReactiveProxy, key: any): any