/** * @typedef {import('micromark-util-types').Event} Event */ /** * @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 /** * Create an edit: a remove and/or add at a certain place. * * @param {number} index * @param {number} remove * @param {Array} add * @returns {undefined} */ add( index: number, remove: number, add: Array ): undefined /** * Done, change the events. * * @param {Array} events * @returns {undefined} */ consume(events: Array): undefined } export type Event = import('micromark-util-types').Event export type Change = [ number, number, Array< [ 'enter' | 'exit', import('micromark-util-types').Token, import('micromark-util-types').TokenizeContext ] > ] export type Jump = [number, number, number]