Type Editor / @type-editor/changeset / types/ChangeJSON / ChangeJSON
Interface: ChangeJSON<Data>
Defined in: types/ChangeJSON.ts:10
JSON-serializable representation of a Change.
Describes a change between two document versions (A and B), including the affected ranges and the deleted/inserted content spans.
Type Parameters
| Type Parameter | Description |
|---|---|
Data | The type of metadata associated with each span. |
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
deleted | readonly { data: Data; length: number; }[] | The spans that were deleted from document A. | types/ChangeJSON.ts:20 |
fromA | number | The start position in document A where the change begins. | types/ChangeJSON.ts:12 |
fromB | number | The start position in document B where the change begins. | types/ChangeJSON.ts:16 |
inserted | readonly { data: Data; length: number; }[] | The spans that were inserted into document B. | types/ChangeJSON.ts:22 |
toA | number | The end position in document A where the change ends. | types/ChangeJSON.ts:14 |
toB | number | The end position in document B where the change ends. | types/ChangeJSON.ts:18 |