[**@wocart/theme v4.1.0**](../../README)

***

[@wocart/theme](../../README) / [index](../README) / PreviewEditorMessage

# Type Alias: PreviewEditorMessage

> **PreviewEditorMessage** = `object` & (\{ `draft`: `Record`\<`string`, `unknown`\>; `revision?`: `number`; `type`: `"render"`; \} \| \{ `patches`: readonly [`PreviewPatch`](PreviewPatch)[]; `type`: `"patch"`; \} \| \{ `mode`: [`PreviewMode`](PreviewMode); `type`: `"mode"`; \} \| \{ `id`: `string`; `type`: `"scroll-to"`; \} \| \{ `token`: `string`; `type`: `"token"`; \})

What the editor tells the preview page. `draft` is a `PreviewDraft` of
`@wocart/storefront`; `revision`, when given, comes back on the `rendered`
or `error` it causes, and a render answered after a newer one is dropped —
as is one answered after a `patch`, which the next render follows.

## Type Declaration

### source

> **source**: `"wocart-editor"`

### version

> **version**: *typeof* [`PREVIEW_PROTOCOL_VERSION`](../variables/PREVIEW_PROTOCOL_VERSION)
