import type { ErrorContext } from './types'; /** A locale catalog maps `code` → message template (with `{{var}}`). */ export type MessageCatalog = Record; /** * Locale to use when `format` is called without one. This is a plain fallback * label, not a special catalog: the untagged default copy lives in the registry * itself, so there is no built-in `'en'` catalog to keep in sync. */ export declare const DEFAULT_LOCALE = "en"; /** * Register or extend a locale catalog. Merges with any existing entries for * that locale (new entries win), so hosts can override individual codes — pass * the default locale to override the base copy. */ export declare function registerCatalog(locale: string, catalog: MessageCatalog): void; /** * Render a localized message for a code. * * Resolution order: * 1. requested-locale overlay entry (template) → interpolate * 2. registry default message (template → interpolate, or function → call) * 3. humanized code */ export declare function format(code: string, context?: ErrorContext, locale?: string): string;