export type LocalizedStrings = { [lang: string]: Record; }; /** * Stores a mapping of localized strings. Can be used to find the * closest available string for a given locale. */ export class LocalizedStringDictionary { constructor(messages: LocalizedStrings, defaultLocale?: string); /** Returns a localized string for the given key and locale. */ getStringForLocale(key: K, locale: string): T; /** Returns all localized strings for the given locale. */ getStringsForLocale(locale: string): Record; static getGlobalDictionaryForPackage(packageName: string): LocalizedStringDictionary | null; } export type Variables = Record | undefined; export type LocalizedString = string | ((args: Variables, formatter?: LocalizedStringFormatter) => string); type InternalString = string | (() => string); /** * Formats localized strings from a LocalizedStringDictionary. Supports interpolating variables, * selecting the correct pluralization, and formatting numbers for the locale. */ export class LocalizedStringFormatter { constructor(locale: string, strings: LocalizedStringDictionary); /** Formats a localized string for the given key with the provided variables. */ format(key: K, variables?: Variables): string; protected plural(count: number, options: Record, type?: Intl.PluralRuleType): string; protected number(value: number): string; protected select(options: Record, value: string): string; } //# sourceMappingURL=types.d.ts.map