/** * @copyright Sister Software * @license AGPL-3.0 * @author Teffen Ellis, et al. */ import { PathBuilder, type PathBuilderLike } from "path-ts"; import type { Alpha3bLanguageCode } from "#resources/languages"; import type { TextNormalizer } from "#tokenization"; import { ResourceMapCache } from "../ResourceMapCache.ts"; import { DisposableSet } from "../set.ts"; /** * 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 type WhosOnFirstLocaleIndex = Map>; export type ReadonlyWhosOnFirstIndex = ReadonlyMap>; export interface WOFCacheOptions { dataDirectory: PathBuilderLike; internalDataDirectory: PathBuilderLike; patterns: string[]; normalizer: TextNormalizer; blacklist?: Set; } /** * Index mapping a specific **placename** to its originating languages. * * If a value is present in this index, it means that the value is a valid in at least one language. */ export declare class WOFPlacenameCache extends ResourceMapCache> { normalizer: TextNormalizer; blacklist?: Set; dataDirectory: PathBuilder; internalDataDirectory: PathBuilder; patterns: string[]; displayName: string; constructor(options: WOFCacheOptions); /** * Add a collection of language codes to a placename. * * @param placename The placename to add. * @param languageCodes The language codes to add. */ add(placename: string, ...languageCodes: Alpha3bLanguageCode[]): void; /** * Remove a placename from the index. * * @param placename The placename to remove. */ remove(placename: string): void; ready(): Promise; marshall(filePatterns: string[], dataDirectory: PathBuilder): Promise; toJSON(): [string, Alpha3bLanguageCode[]][]; } //# sourceMappingURL=loader.d.ts.map