refactor(sync): create AtomMap type

This commit is contained in:
Richard 2025-01-25 16:07:28 -08:00
parent 884e6c0e8c
commit 63388761f8
3 changed files with 11 additions and 2 deletions

View file

@ -4,13 +4,14 @@ local Charm = require(script.Parent.Parent.Charm)
local interval = require(script.Parent.interval)
local patch = require(script.Parent.patch)
local types = require(script.Parent.types)
type AtomMap = types.AtomMap
type SyncPayload = types.SyncPayload
type ServerOptions = {
--[=[
The atoms to synchronize with the client.
]=]
atoms: { [string | number]: Charm.Atom<any> },
atoms: AtomMap,
--[=[
The interval at which to send patches to the client, in seconds.
Defaults to `0` (patches are sent up to once per frame). Set to a