Unicode MessageFormat for JavaScript
    Preparing search index...

    Interface MessageFunctionContext

    interface MessageFunctionContext {
        dir: undefined | "ltr" | "rtl" | "auto";
        id: undefined | string;
        get literalOptionKeys(): Set<string>;
        get localeMatcher(): "best fit" | "lookup";
        get locales(): string[];
        onError(error: unknown): void;
        onError(
            type:
                | "bad-operand"
                | "bad-option"
                | "bad-variant-key"
                | "function-error"
                | "not-formattable"
                | "unsupported-operation",
            message: string,
        ): void;
    }
    Index

    Properties

    dir: undefined | "ltr" | "rtl" | "auto"
    id: undefined | string

    Accessors

    Methods

    • Parameters

      • error: unknown

      Returns void

    • Parameters

      • type:
            | "bad-operand"
            | "bad-option"
            | "bad-variant-key"
            | "function-error"
            | "not-formattable"
            | "unsupported-operation"
      • message: string

      Returns void