UNPKG

wuchale

Version:

Protobuf-like i18n from plain code

22 lines (21 loc) 849 B
import { type Adapter } from "./adapters.js"; import type { AI } from "./ai/index.js"; export type LogLevel = 'error' | 'warn' | 'info' | 'verbose'; export type ConfigPartial = { sourceLocale: string; otherLocales: string[]; ai: AI | null; logLevel: LogLevel; }; export type Config = ConfigPartial & { adapters: Record<string, Adapter>; hmr: boolean; }; type ConfigWithOptional = Partial<Config>; export declare const defaultConfig: Config; export declare function defineConfig(config: ConfigWithOptional): Partial<Config>; export declare function deepMergeObjects<Type extends {}>(source: Partial<Type>, target: Type): Type; export declare const defaultConfigNames: string[]; export declare const getLanguageName: (code: string) => string; export declare function getConfig(configPath?: string): Promise<Config>; export {};