messageformat
Version:
Intl.MessageFormat / Unicode MessageFormat 2 parser, runtime and polyfill
15 lines (14 loc) • 615 B
TypeScript
import { MessageFunctionError } from '../errors.ts';
import type { Context } from '../format-context.ts';
import { Options } from '../data-model/types.ts';
export declare class MessageFunctionContext {
#private;
readonly dir: 'ltr' | 'rtl' | 'auto' | undefined;
readonly id: string | undefined;
constructor(ctx: Context, source: string, options?: Options);
get literalOptionKeys(): Set<string>;
get localeMatcher(): "best fit" | "lookup";
get locales(): string[];
onError(error: unknown): void;
onError(type: typeof MessageFunctionError.prototype.type, message: string): void;
}