Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

KeyedSaveDeclaration

KeyedSaveDeclaration<Schema, Parent> = Readonly<KeyedSaveOptions<Schema, Parent>> & object

A keyed save as defineKeyedSave made it: its declaration, and for, which names one of its records.

Name Type Description
for() (…parts) => KeyedSaveHandle The handle of one record: plots.for(worldId, "ada") in a world, banks.for(playerId) under an account, vaults.for("42") in the game, as a board’s handle is named. The same parts give the same handle. Throws for an id or a key that is not 1 to 128 printable characters with no slash.
Type Parameter Default type
Schema extends SaveSchema SaveSchema
Parent extends `${KeyedSaveParent}` `${KeyedSaveParent}`