import { SrcMap } from 'mini-parse'; /** specify a start,end portion of a string to be replaced */ export interface SliceReplace { start: number; end: number; replacement: string; } /** * Rewrite a string by replacing segments them with provided texts. * * example: * src: * aaabbbbbc * ^ ^ * St End Repl='XXX' * * returns a srcMap with the new text and mappings from the original text to the new text * aaaXXXc */ export declare function sliceReplace(src: string, slices: SliceReplace[], start?: number, end?: number): SrcMap; /** find strings in a text - * found strings must be 'tokens', surrounded by spaces or punctuation * * @return SliceReplace elements */ export declare function sliceWords(text: string, replace: Record): SliceReplace[];