Skip to content

ChangeDesc

Unofficial

Import:

import type { ChangeDesc } from '@codemirror/state';

Signature:

export interface ChangeDesc

Methods

MethodReturnsDescription
composeDesc(other)ChangeDescCompute the combined effect of applying another set of changes after this one.
iterChangedRanges(f, individual?)voidIterate over the ranges changed by these changes.
iterGaps(f)voidIterate over the unchanged parts left by these changes.
mapDesc(other, before?)ChangeDescMap this description over another set of changes.
mapPos(pos, assoc?)numberMap a given position through these changes.
mapPos(pos, assoc, mode)null | numberMap a given position through these changes with a specific mode.
toJSON()readonly number[]Serialize this change desc to a JSON-representable value.
touchesRange(from, to?)'cover' | booleanCheck whether these changes touch a given range.

Links to this page: