import type { LinkOptions } from "../index.js"; import { HypernymDAG } from "../lib/hypernymDAG.js"; import { LengthDistribution } from "../lib/lengthDistribution.js"; import { LogNum } from "../lib/logNum.js"; import type { Wordlist } from "../lib/wordlist.js"; import * as T from "../templating/index.js"; /** * A PartialLink is the subset of Link that a Linker needs to return. We do * some processing before it ends up being a Link. See Link for full details. */ export type PartialLink = { /** A human-readable link name; defaults to the name of the linker. */ name?: T.Inline; /** * Log prob we'd expect to see this link. * * Note that this should describe the log prob of the *name* of the link. * A link with name "two distinct length values" should have the log prob * that the words have *any two* distinct lengths, and the description * should report more specifically what those lengths are. */ logProb: LogNum; /** Any extra info to include in the link. Can be blank. */ description?: T.Table; }; /** * A Linker is a function that takes a list of slugs and returns PartialLinks. */ export type Linker = { name: T.Inline; eval: (slugs: string[], options: Required) => Iterable; }; /** All linkers. */ export declare function allLinkers({ lengthDist, wordlist, hypernymDAG, }: { lengthDist: LengthDistribution; wordlist: Wordlist; hypernymDAG: HypernymDAG | undefined; }): Linker[]; /** For testing purposes. */ export declare function testLinker(linkerFn: (...args: Args) => Linker, ...args: Args): (slugs: string[]) => (string | undefined)[][]; //# sourceMappingURL=index.d.ts.map