@dcoffey/espells
Version:
Pure JS/TS spellchecker, using Hunspell dictionaries. Based on Spylls.
20 lines (19 loc) • 843 B
TypeScript
import { AffixForm } from "./forms.js";
import type { LKWord } from "./lk-word.js";
/**
* A hypothesis of how a compound word may be constructed, using an array
* of {@link AffixForm} instances to denote segements of the word.
*/
export type CompoundForm = AffixForm[];
/** Produces all valid {@link CompoundForm}s for a word. */
export declare function compoundForms(word: LKWord, allowNoSuggest?: boolean): Generator<CompoundForm, void, unknown>;
/**
* Determines if a {@link CompoundForm} is invalid for a {@link LKWord}, by
* various criteria.
*
* @param word - The word to validate against.
* @param compound - The {@link CompoundForm} to check.
* @param captype - The {@link CapType} of the original word.
* @see {@link CompoundPattern}
*/
export declare function isBadCompound(word: LKWord, compound: CompoundForm): boolean;