Skip to main content

View as Markdown · AI documentation index

Function: findLatestSchema()

findLatestSchema(directory): Promise<{ path: string; schema: SaveSchema; } | null>

Defined in: store.ts:119

Finds the highest-versioned snapshot in a directory.

Parameters​

directory​

string

Snapshot directory

Returns​

Promise<{ path: string; schema: SaveSchema; } | null>

The snapshot and its path, or null when the directory holds none

Throws​

Error if a .json file in the directory is not a valid snapshot