import { FeatureLogProbCache } from "../lib/keyedCache.js"; import { LetterIndices } from "../lib/letterIndices.js"; import { Wordlist } from "../lib/wordlist.js"; import type { Linker } from "../linkers/index.js"; import * as T from "../templating/index.js"; /** * Computing feature LogProbs can be expensive; so we've precomputed some * cached values. */ export declare const FeatureLogProbs: FeatureLogProbCache; type Props = { letterIndices: LetterIndices; wordlist: Wordlist; }; /** * A Feature is a property that a slug can have. * * Features should be as specific as possible, like "can prepend T to get a * word", rather than "can prepend a letter to get a word". Instead, use * linkers to get more general features. */ export type Feature = { /** The name of the feature; will be used for the linker name. */ name: T.Inline; /** If the `slug` has the feature, returns a description. */ property: (slug: string, props: Props) => T.Row | null; }; /** Feature-based linkers. */ export declare function featureLinkers(wordlist: Wordlist): Linker[]; /** * For testing purposes. Takes a list of features, and returns * a function that takes a slug and returns all features it satisfies. */ export declare function makeFeatureGetter(features: Feature[], wordlist: Wordlist): (slug: string) => Record; export {}; //# sourceMappingURL=index.d.ts.map