mirror of
https://github.com/littensy/charm.git
synced 2026-10-21 11:44:08 +00:00
feat: add toRaw()
This commit is contained in:
parent
f082956ed9
commit
9f66803f04
13 changed files with 297 additions and 198 deletions
|
|
@ -1,4 +1,4 @@
|
|||
local function isTableUnsafe(object: { [any]: any })
|
||||
local function isTableUnsafe(object: {})
|
||||
local key = next(object)
|
||||
|
||||
if key == nil then
|
||||
|
|
@ -12,7 +12,7 @@ local function isTableUnsafe(object: { [any]: any })
|
|||
for key in object do
|
||||
if type(key) ~= keyType then
|
||||
return true
|
||||
elseif keyType == "number" and key > maxKey then
|
||||
elseif type(key) == "number" and key > maxKey then
|
||||
maxKey = key
|
||||
end
|
||||
end
|
||||
|
|
@ -33,7 +33,7 @@ end
|
|||
@param value The table value.
|
||||
@param key The key of the value.
|
||||
]]
|
||||
local function validate(value: { [any]: any })
|
||||
local function validate(value: {})
|
||||
if isTableUnsafe(value) then
|
||||
warn(
|
||||
`Cannot sync tables unsupported by remote events! See the table below for more info.\n\n`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue