Skip to content

Interface: OperationDef<Doc, Op> ​

Defined in: core/dist/plugin.d.ts:29

Type Parameters ​

Doc ​

Doc

Op ​

Op extends OperationBase<string> = OperationBase<string>

Properties ​

migrate? ​

optional migrate?: (fromVersion, op) => unknown

Defined in: core/dist/plugin.d.ts:38

Upgrades an op written by an older plugin version. Called with the raw value before validation. Return the op in the current shape.

Parameters ​

fromVersion ​

number

op ​

unknown

Returns ​

unknown


reduce ​

reduce: (slice, op) => Doc

Defined in: core/dist/plugin.d.ts:33

Pure: returns the plugin's next document slice.

Parameters ​

slice ​

Doc

op ​

Op

Returns ​

Doc


schema ​

schema: OperationSchema<Op>

Defined in: core/dist/plugin.d.ts:31


type ​

type: Op["type"]

Defined in: core/dist/plugin.d.ts:30