Skip to content

Kiln API / kiln / restoreSnapshot

Function: restoreSnapshot() ​

ts
function restoreSnapshot(app, snap): object;

Replaces the app's entities with the snapshot's. Traits are looked up by name, so a snapshot taken before a code change restores into the new code; unknown traits are reported, not lost silently. Entity ids are remapped; relations follow the remap.

Parameters ​

ParameterType
appApp
snapSnapshot

Returns ​

object

missingTraits ​

ts
missingTraits: string[];