interface Entry { forms: string[]; classes: string[]; pron?: string[]; } interface Table { name: string; subs: string[]; entries: Entry[]; } interface Dictionary { tables: Record; } declare const enUS: Dictionary; interface RantOptions { seed?: number | string; dictionary?: Dictionary; nsfw?: boolean; } interface RantInstance { run(pattern: string, options?: RantOptions): string; channels: Record; } declare function createRant(options?: RantOptions): RantInstance; declare function rant(pattern: string, second?: RantOptions | Dictionary | unknown): string; type CarrierKind = "match" | "unique" | "rhyme"; type Node = TextNode | QueryNode | TagNode | BlockNode | EscapeNode; interface TextNode { type: "text"; value: string; } interface QueryNode { type: "query"; table: string; args: string[]; exclude: string[]; carrier?: string; carrierKind?: CarrierKind; raw: string; } interface TagNode { type: "tag"; name: string; arg: string; args: Node[][]; } interface BlockAlt { weight: Node[] | null; nodes: Node[]; } interface BlockNode { type: "block"; alternatives: BlockAlt[]; } interface EscapeNode { type: "escape"; code: string; } declare function parse(input: string): Node[]; interface CompileOptions { aliases?: Record; } declare function compileDic(source: string, fallbackName?: string): Table; declare function compileDictionaries(files: { name: string; source: string; }[], options?: CompileOptions): Dictionary; interface Rng { next(): number; int(max: number): number; pick(items: readonly T[]): T; } /** Mulberry32 — small, fast, deterministic 32-bit PRNG. */ declare function createRng(seed?: number | string): Rng; export { type Dictionary, type Entry, type RantInstance, type RantOptions, type Table, compileDic, compileDictionaries, createRant, createRng, enUS, parse, rant };