export type KeyData = string | DeprecatedPluralValue | PluralValue; export type KeysData = Record; export type KeysetData = Record; type NoEnumLikeStringLiteral = string extends T ? T : never; export type I18NFn = { (keysetName: K, key: G | NoEnumLikeStringLiteral, params?: { [key: string]: any; }): S extends G ? T[K][G] : string; keyset(keysetName: K): (key: G | NoEnumLikeStringLiteral, params?: { [key: string]: any; }) => S extends G ? T[K][G] : string; i18n(keysetName: K, key: G | NoEnumLikeStringLiteral): () => S extends G ? T[K][G] : string; has(keysetName: K, key: string): () => boolean; bind(thisArg: any): (keysetName: K, key: G | NoEnumLikeStringLiteral, params?: { [key: string]: any; }) => S extends G ? T[K][G] : string; bind(thisArg: any, keysetName: K): (key: G | NoEnumLikeStringLiteral, params?: { [key: string]: any; }) => S extends G ? T[K][G] : string; bind(thisArg: any, keysetName: K, key: G | NoEnumLikeStringLiteral): (params?: { [key: string]: any; }) => S extends G ? T[K][G] : string; bind(thisArg: any, keysetName: K, key: G | NoEnumLikeStringLiteral, params?: { [key: string]: any; }): () => S extends G ? T[K][G] : string; }; type KeyParam = Path extends `${infer L}{{${infer K}}}${infer R}` ? K | KeyParam | KeyParam : never; type StringKey = string; type RequiredPluralValue = { count: number; }; export type TypedParams = (K extends StringKey ? Record, V> : (K extends PluralValue ? Record> | KeyParam> | KeyParam> | KeyParam> | KeyParam> | KeyParam>, V> & RequiredPluralValue : unknown)); export type TypedParamsI18NFn = { (keysetName: K, key: G | NoEnumLikeStringLiteral, params?: TypedParams): string; keyset(keysetName: K): (key: G | NoEnumLikeStringLiteral, params?: TypedParams) => string; i18n(keysetName: K, key: G | NoEnumLikeStringLiteral): () => string; has(keysetName: K, key: string): () => boolean; bind(thisArg: any): (keysetName: K, key: G | NoEnumLikeStringLiteral, params?: TypedParams) => string; bind(thisArg: any, keysetName: K): (key: G | NoEnumLikeStringLiteral, params?: TypedParams) => string; bind(thisArg: any, keysetName: K, key: G | NoEnumLikeStringLiteral): (params?: TypedParams) => string; bind(thisArg: any, keysetName: K, key: G | NoEnumLikeStringLiteral, params?: TypedParams): () => string; }; export type Params = { [key: string]: any; }; export type Pluralizer = (count: number, pluralForms: typeof PluralForm) => PluralForm; export declare enum PluralForm { One = 0, Few = 1, Many = 2, None = 3 } /** * @deprecated Old plurals format. Use new format from type PluralValue. Will be removed in v2. */ export type DeprecatedPluralValue = string[]; export type PluralValue = { zero?: string; one?: string; two?: string; few?: string; many?: string; other?: string; }; export declare function isPluralValue(value: KeyData): value is DeprecatedPluralValue | PluralValue; export interface Logger { log(message: string, options?: { level?: string; logger?: string; extra?: Record; }): void; } export {};