fn
applyStep
testedApply a single step to a document, returning the next document and the exact inverse step (so undo is correct by construction). Pure: never mutates input. If the addressed block is missing the step is a no-op (defends against remote steps referencing concurrently-removed blocks).
Signature
ts
export function applyStep(doc: EditorDocument, step: Step, schema: Schema): StepResult{ ... }Parameters
| Parameter | Type | Description |
|---|---|---|
doc | EditorDocument | — |
step | Step | — |
schema | Schema | — |
Returns
StepResult