UNPKG

@bemedev/i18n

Version:

Internationalization library for Bemedev projects, providing utilities for managing translations and locale-specific content.

8 lines 797 B
import type { ExtractParamOptions, Fn, LanguageMessages } from './types'; export declare const defineTranslation: <S extends string, O extends ExtractParamOptions<S>>(string: S, options: O) => [S, O]; export declare const dt: <S extends string, O extends ExtractParamOptions<S>>(string: S, options: O) => [S, O]; export type FnBasic<Main extends Fn, Tr extends object> = Tr & Main; export declare const addFn: <Main extends Fn, const Tr extends object = object>(main: Main, extensions?: Tr) => FnBasic<Main, Tr>; export declare function getTranslation(locale: string, translations: LanguageMessages, key: string, args?: any): any; export declare const createConfig: <const R extends LanguageMessages>(func: ((define: typeof defineTranslation) => R) | R) => R; //# sourceMappingURL=helpers.d.ts.map