Skip to content

Type Editor


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 ParameterDescription
DataThe type of metadata associated with each span.

Properties

PropertyTypeDescriptionDefined in
deletedreadonly { data: Data; length: number; }[]The spans that were deleted from document A.types/ChangeJSON.ts:20
fromAnumberThe start position in document A where the change begins.types/ChangeJSON.ts:12
fromBnumberThe start position in document B where the change begins.types/ChangeJSON.ts:16
insertedreadonly { data: Data; length: number; }[]The spans that were inserted into document B.types/ChangeJSON.ts:22
toAnumberThe end position in document A where the change ends.types/ChangeJSON.ts:14
toBnumberThe end position in document B where the change ends.types/ChangeJSON.ts:18