import type { Prefix, Suffix } from "../aff/affix"; import type { Word } from "../dic/word"; import { LKWord } from "./lk-word"; export interface AffixFormOpts { /** Outermost prefix. */ prefix?: Prefix; /** Outermost suffix. */ suffix?: Suffix; /** Innermost prefix. */ prefix2?: Prefix; /** Innermost suffix. */ suffix2?: Suffix; /** The word as found in the spellchecker's dictionary. */ inDictionary?: Word; } /** * Represents a hypothesis of how a word may be represented as a * {@link Prefix}, stem, and {@link Suffix}. A word always has a full text * and stem, but may optionally have up to two prefixes and suffixes. * Instances with no actual affixes are valid, as well. */ export declare class AffixForm { /** The full text of the word. */ text: string; /** The hypothesized stem of the word. */ stem: string; /** Outermost prefix. */ prefix?: Prefix; /** Outermost suffix. */ suffix?: Suffix; /** Innermost prefix. */ prefix2?: Prefix; /** Innermost suffix. */ suffix2?: Suffix; /** The word as found in the spellchecker's dictionary. */ inDictionary?: Word; constructor(text: string | LKWord, stem?: string, { prefix, suffix, prefix2, suffix2, inDictionary }?: AffixFormOpts); /** * Returns a new {@link AffixForm}, cloned from this current instance, but * with any properties given replaced. */ replace(opts: { text?: string | LKWord; stem?: string; } & AffixFormOpts): AffixForm; /** True if the form has any affixes. */ get hasAffixes(): boolean; /** The complete set of flags this form has. */ get flags(): Set; /** Returns every {@link Prefix} and {@link Suffix} this form has. */ affixes(): (Prefix | Suffix)[]; has(flag: string): boolean; }