UNPKG

672 BTypeScriptView Raw
1import { Operation, Range } from '..';
2/**
3 * `RangeRef` objects keep a specific range in a document synced over time as new
4 * operations are applied to the editor. You can access their `current` property
5 * at any time for the up-to-date range value.
6 */
7export interface RangeRef {
8 current: Range | null;
9 affinity: 'forward' | 'backward' | 'outward' | 'inward' | null;
10 unref(): Range | null;
11}
12export interface RangeRefInterface {
13 /**
14 * Transform the range ref's current value by an operation.
15 */
16 transform: (ref: RangeRef, op: Operation) => void;
17}
18export declare const RangeRef: RangeRefInterface;
19//# sourceMappingURL=range-ref.d.ts.map
\No newline at end of file