# Function: schemaFromDump()

> **schemaFromDump**(`dump`, `gameVersion?`): [`SaveSchema`](../interfaces/SaveSchema.md)

Defined in: [artifacts.ts:147](https://github.com/laruss/react-text-game/blob/37ebb1fd49045bfbb1d2a2fa96b8f14a2f8c2644/packages/devtools/src/artifacts.ts#L147)

Derives a schema from an IndexedDB record copied out of a browser.

Accepts any of:
- a whole `saves` table copy (an array of records)
- one record, such as the `__SYSTEM_INITIAL_STATE__` row
- a bare state object, in which case `gameVersion` is required

## Parameters

### dump

`unknown`

Parsed JSON from the browser

### gameVersion?

`string`

Required only for a bare state object or a mixed dump

## Returns

[`SaveSchema`](../interfaces/SaveSchema.md)

The derived schema

## Throws

Error if the dump holds no recognisable state
