feat(sync): add autoSerialize option (#42)

* feat(sync): add `autoSerialize` option

* docs: fix `autoSerialize` note

* docs: fix typo
This commit is contained in:
richard 2025-01-25 14:07:14 -08:00 • committed by GitHub
parent 8eddd182d3
commit b8bb123379
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 55 additions and 49 deletions

View file

@ -132,14 +132,13 @@ declare namespace CharmSync {
*/
preserveHistory?: boolean;
/**
* When `true`, convert problematic sparse arrays into dictionaries
* with string keys. Defaults to `true`.
* When `true`, Charm will apply validation and serialize unsafe arrays
* to address remote event argument limitations. Defaults to `true`.
*
* While this is mandatory for safely syncing arrays over vanilla Roblox
* remotes, it can be disabled if your network library uses a custom
* serialization method (i.e. Zap, ByteNet).
* This option should be disabled if your network library uses a custom
* serialization method (i.e. Zap, ByteNet) to prevent interference.
*/
serializeArrays?: boolean;
autoSerialize?: boolean;
}
interface ClientSyncer<Atoms extends AtomMap> {