/** * @import {Event} from 'micromark-util-types' */ /** * @typedef {[number, number, Array]} Change * @typedef {[number, number, number]} Jump */ /** * Tracks a bunch of edits. */ export class EditMap { /** * Record of changes. * * @type {Array} */ map: Array; /** * Changes by index, so `add` does not scan `map` (quadratic on * table-heavy documents). * * @type {Map} */ index: Map; /** * Create an edit: a remove and/or add at a certain place. * * @param {number} index * Index at which to apply the edit. * @param {number} remove * Count of items to remove at the index. * @param {Array} add * Items to add at the index. * @returns {undefined} * Nothing. */ add(index: number, remove: number, add: Array): undefined; /** * Done, change the events. * * @param {Array} events * List of events to apply the edits to. * @returns {undefined} * Nothing. */ consume(events: Array): undefined; } export type Change = [number, number, Array]; export type Jump = [number, number, number]; import type { Event } from 'micromark-util-types'; //# sourceMappingURL=edit-map.d.ts.map