// Types for respell.mjs (the module's comments say what a respelling is). export type Respelling = { // What the transcript says, one or more forms (words, not patterns). heard: string[]; // What was said. reads: string; // Show the reading bracketed, as an altered quote is marked. Off by default: an // obvious correction reads plainly. bracket?: boolean; note?: string; }; // "display": each respelling as it says (bracketed or plain) — what a reader sees. // "plain": every reading unbracketed — what the checks compare. export type RespellMark = "display" | "plain"; export function applyRespellings( text: string, respellings: readonly Respelling[] | undefined, mark?: RespellMark, ): string; export function countRespellings(text: string, respellings: readonly Respelling[] | undefined): number; export function cleanRespellings(input: unknown): Respelling[]; export function mergeRespellings( existing: readonly Respelling[] | undefined, added: readonly Respelling[], ): Respelling[];