/** * @copyright Sister Software * @license AGPL-3.0 * @author Teffen Ellis, et al. */ import type { TextNormalizer } from "../tokenization/normalizer.ts"; import type { Displayable } from "./debugging.ts"; /** * Options for the locale index. */ export interface LocaleIndexOptions { displayName: string; normalizer?: TextNormalizer; } /** * Index mapping a specific value to originating languages. * * If a value is present in this index, it means that the value is a valid value in at least one language. */ export declare class LocaleIndex extends Map> { /** * The normalizer to use for placenames. */ readonly normalizer?: TextNormalizer; /** * The source of the index. */ displayName: string; constructor(entries: Iterable]> | undefined, options: LocaleIndexOptions); /** * Add a placename to the index, associating it with the given language codes. * * @param placename The placename to add. * @param languageCodes The language codes to associate with the placename. */ add(placename: string, ...languageCodes: LanguageCodes[]): void; /** * Remove a placename from the index. * * @param placename The placename to remove. */ remove(placename: string): void; open(placename: string): Displayable>; /** * Get the language codes associated with a placename. */ get: (placename: string) => Displayable> | undefined; /** * Serialize the index to JSON. */ toJSON(): [string, LanguageCodes[]][]; } //# sourceMappingURL=LocaleIndex.d.ts.map