feat: add peek and roblox-ts types

This commit is contained in:
littensy 2025-07-02 21:58:55 -07:00
parent d2979ebd4c
commit 708bc55de7
37 changed files with 363 additions and 1234 deletions

View file

@ -1,24 +1,23 @@
local suite = require("../../../../test/suite")
suite.describe("charm-sync", function()
if not game then
return suite.skip()
end
suite.describe("client", function()
require("./client.spec")
end)
suite.describe("server", function()
require("./server.spec")
end)
suite.describe("flatten", function()
require("./flatten.spec")
end)
suite.describe("patch", function()
require("./patch.spec")
end)
suite.describe("validate", function()
require("./validate.spec")
end)
suite.describe("client", function()
require("./client.spec")
end)
suite.describe("server", function()
require("./server.spec")
end)
suite.describe("flatten", function()
require("./flatten.spec")
end)
suite.describe("patch", function()
require("./patch.spec")
end)
suite.describe("validate", function()
require("./validate.spec")
end)
return {}

View file

@ -1,6 +1,8 @@
local Charm = require("../Charm")
local validate = require("./validate")
local flags = Charm.flags
--- A special symbol that denotes the absence of a value. Used to represent
--- deleted values in patches.
local None = { __none = "__none" }
@ -63,7 +65,7 @@ local function diff(prevState: { [any]: any }, nextState: { [any]: any }, serial
patches = stringifySparseArray(patches)
end
if serialize and Charm.strict.enabled then
if serialize and flags.strict then
for key, value in next, patches do
validate(value, key)
end