medium-proeditor
Version:
A powerful & customizable Medium-style rich text editor
17 lines • 713 B
TypeScript
import type { Transform } from 'prosemirror-transform';
import type { ChangedRange } from '../types';
/**
* Removes duplicate values within an array.
* Supports numbers, strings, and objects.
*
* @param array The input array to remove duplicates from.
* @param by A function to generate a unique key for each element. Defaults to JSON.stringify.
* @returns A new array with duplicates removed.
*/
export declare function removeDuplicates<T>(array: T[], by?: (item: T) => string): T[];
/**
* Returns a list of changed ranges
* based on the first and last state of all steps.
*/
export declare function getChangedRanges(transform: Transform): ChangedRange[];
//# sourceMappingURL=getChangedRanges.d.ts.map