import type { NumStr, Rec, types } from "../types"; declare global { namespace facades { namespace lang { interface Context { } interface Word { } } } } export declare const lang: import("../functions").Facade; export declare namespace lang { type Context = types.object.keys.Pick">; interface Dictionary { /** * Sets context. * @param context - Context. * @returns Dictionary. */ readonly context: (context: C) => Lang; /** * Returns word. Uses previously set context, count and replacements. * @param key - Word ID. * @returns Word. */ readonly get: (key: Key) => string; /** * Returns word. Uses previously set context, count and replacements. * @param key - Word ID. * @returns Word. */ readonly getIfExists: (key: string) => string; /** * Checks if word exists. * @param key - Word ID. * @returns _True_ if word exists, _false_ otherwise. */ readonly has: (key: string) => key is Key; readonly keys: Rec, Transforms>; /** * Wraps plain text. * @param str - Plain text. * @returns Wrapped plain text. */ readonly plain: (str: string) => Plain; /** * Sets count for plural form. * @param count - Count for plural form. * @returns Dictionary. */ readonly plural: (count: number) => Lang; /** * Adds replacement. * @param name - Name. * @param replacement - Value or word ID. * @returns Dictionary. */ readonly with: (name: string, replacement: NumStr) => Lang; } type Facade = Lang; type Key = Plain | Transforms; type Lang = Dictionary & Rec, string>; type Plain = `plain:${string}`; type Transforms = Capitalize | Lowercase | Uncapitalize | Uppercase; type Word = types.object.keys.Pick">; } //# sourceMappingURL=lang.d.ts.map