/** A configured hyphenator for one language. */ export interface Hyphenator { /** * Return the 0-indexed break positions inside `word`. A position `p` means the * word can be split between `word[p-1]` and `word[p]`; e.g. "computer" with * breaks `[3,5]` → "com·pu·ter". */ hyphenate: (word: string) => Array; } /** Options for {@link createHyphenator}. */ export interface HyphenatorOptions { /** Minimum characters before the first break (TeX default: 2). */ readonly leftMin?: number; /** Minimum characters after the last break (TeX default: 3 for English, often 2 elsewhere). */ readonly rightMin?: number; /** * Explicit exceptions that override pattern output. Each is a word with * hyphens marking the allowed breaks, e.g. `"as-so-ciate"`. */ readonly exceptions?: ReadonlyArray; } /** * Build a Liang pattern-based {@link Hyphenator} from a pattern list. * * @param patterns The TeX-style hyphenation patterns (e.g. `"hy3ph"`). * @param options Left/right minimums and explicit exceptions. * @returns The hyphenator. */ export declare function createHyphenator(patterns: ReadonlyArray, options?: HyphenatorOptions): Hyphenator; /** * Split a TeX-style pattern bundle (a whitespace-separated string) into the * pattern array {@link createHyphenator} expects. * * @param bundle The whitespace-separated patterns. * @returns The pattern array (empty entries removed). */ export declare function splitPatternBundle(bundle: string): Array;