import type { ParseError } from "./errors.ts"; export type CompiledMessage = DeferredParseError | string | CompiledMessage[] | VarArg | PluralArg | ElementArg; export type VarArg = StringArg | NumberArg | DateTimeArg; export type StringArg = { type: "Var"; name: string | number; argType: "string"; }; export declare function StringArg(name: string | number): StringArg; export type NumberArg = { type: "Var"; name: string | number; argType: "number"; argStyle: Intl.NumberFormatOptions; subtract: number; }; export type NumberArgInternalOptions = { subtract?: number; }; export declare function NumberArg(name: string | number, argStyle: Intl.NumberFormatOptions, options?: NumberArgInternalOptions): NumberArg; export type DateTimeArg = { type: "Var"; name: string | number; argType: "datetime"; argStyle: Intl.DateTimeFormatOptions; }; export declare function DateTimeArg(name: string | number, argStyle: Intl.DateTimeFormatOptions): DateTimeArg; export type PluralArg = { type: "Plural"; name: string | number; subtract: number; branches: PluralBranch[]; fallback: CompiledMessage; }; export type PluralArgInternalOptions = { subtract?: number; }; export declare function PluralArg(name: string | number, branches: PluralBranch[], fallback: CompiledMessage, options?: PluralArgInternalOptions): PluralArg; export type PluralBranch = { selector: number | string; message: CompiledMessage; }; export declare function PluralBranch(selector: number | string, message: CompiledMessage): PluralBranch; export type ArgType = NonNullable; export type ElementArg = { type: "Element"; name: string | number; message?: CompiledMessage | undefined; }; export declare function ElementArg(name: string | number, message?: CompiledMessage): ElementArg; export type DeferredParseError = { type: "DeferredParseError"; sourceText: string; error: ParseError; }; export declare function DeferredParseError(sourceText: string, error: ParseError): DeferredParseError; /** * In @hi18n/core v0.2.x, the Catalog constructor rejects bare string messages * to prevent accidental usage of unparsed messages. * * This function is here to allow use of msg(), mf1(), or msg`` messages * even when the message is a plain string. * @param msg * @returns */ export declare function destringify(msg: CompiledMessage): CompiledMessage; //# sourceMappingURL=msgfmt.d.ts.map