/** * @param {Config} config * Configuration (required). * @returns * Plugin. */ export function createPlugin(config: Config): (options?: Readonly | null | undefined) => (tree: Root, file: VFile) => undefined; export type Root = import('nlcst').Root; export type Handler = import('nlcst-search').Handler; export type VFile = import('vfile').VFile; /** * Configuration. */ export type Config = { /** * BCP-47 tag. */ lang: string; /** * Cuss. */ cuss: Record; /** * Pluralize instance. */ pluralize?: Pluralize | undefined; /** * Phrases not to make plural/singular. */ ignorePluralize?: ReadonlyArray | undefined; /** * Phrases not to normalize. */ regular?: ReadonlyArray | undefined; }; /** * Configuration (optional). */ export type Options = { /** * Phrases *not* to warn about (optional). */ ignore?: ReadonlyArray | null | undefined; /** * Minimum *sureness* to warn about, see `cuss` (default: `0`). */ sureness?: 0 | 1 | 2 | null | undefined; }; /** * Pluralize instance. */ export type Pluralize = { /** * Transform to singular. */ singular: Transform; /** * Transform to plural. */ plural: Transform; }; /** * Transform a word. */ export type Transform = (word: string) => string;