# Function: writeSchema()

> **writeSchema**(`filePath`, `schema`): `Promise`\<`void`\>

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

Writes a snapshot, creating the directory if needed.

## Parameters

### filePath

`string`

Destination path

### schema

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

Schema to persist

## Returns

`Promise`\<`void`\>
