/** * A string value being edited: which UTF-16 units of the original value are * left, and how each of them is now cased. Indices are into the current text. */ export declare class StringEdit { readonly original: string; private readonly kept; private readonly chars; constructor(original: string); get text(): string; /** Removes the units from `start` up to `end`. */ remove(start: number, end: number): void; /** * Changes the case of the character at `index` with `change`. Does nothing * where the change would not be one UTF-16 unit, as for "ß", or the unit * is half of a surrogate pair. */ recase(index: number, change: (char: string) => string): void; /** * The source of the string literal `raw`, which evaluates to the original * value, rewritten to evaluate to the current text: the quotes and every * escape that is left stay as written. Null where that cannot be done: an * escape is only partly removed, a letter to recase is written as an * escape, or what is left would read differently, as "\0" before a digit. */ toSource(raw: string): string | null; }