Unicode MessageFormat for JavaScript
    Preparing search index...
    MF1Functions: {
        "mf1:currency": (
            ctx: MessageFunctionContext,
            options: Record<string, unknown>,
            operand?: unknown,
        ) => MessageNumber;
        "mf1:date": (
            ctx: MessageFunctionContext,
            options: Record<string, unknown>,
            operand?: unknown,
        ) => MessageDateTime;
        "mf1:duration": (
            _ctx: MessageFunctionContext,
            _options: unknown,
            operand?: unknown,
        ) => {
            toParts: () => [{ type: "mf1:duration"; value: string }];
            toString: () => string;
            type: "mf1:duration";
            valueOf: () => number;
        };
        "mf1:number": (
            ctx: MessageFunctionContext,
            options: Record<string, unknown>,
            operand?: unknown,
        ) => MessageNumber;
        "mf1:plural": (
            ctx: MessageFunctionContext,
            options: Record<string, unknown>,
            operand?: unknown,
        ) => MessageNumber;
        "mf1:time": (
            ctx: MessageFunctionContext,
            options: Record<string, unknown>,
            operand?: unknown,
        ) => MessageDateTime;
        "mf1:unit": (
            ctx: MessageFunctionContext,
            options: Record<string, unknown>,
            operand?: unknown,
        ) => MessageNumber;
    } = ...

    Function handlers for ICU MessageFormat 1.

    Used by mf1ToMessage.

    Type declaration

    • mf1:currency: (
          ctx: MessageFunctionContext,
          options: Record<string, unknown>,
          operand?: unknown,
      ) => MessageNumber

      A wrapper around DraftFunctions.currency, used for formatting a number, currency and number, ::currency placeholder.

    • mf1:date: (
          ctx: MessageFunctionContext,
          options: Record<string, unknown>,
          operand?: unknown,
      ) => MessageDateTime

      A wrapper around DraftFunctions.date, used for formatting date placeholders.

    • mf1:duration: (
          _ctx: MessageFunctionContext,
          _options: unknown,
          operand?: unknown,
      ) => {
          toParts: () => [{ type: "mf1:duration"; value: string }];
          toString: () => string;
          type: "mf1:duration";
          valueOf: () => number;
      }

      Formats a duration expressed as seconds.

      The formatted value includes one or two : separators, matching the pattern hhhh:mm:ss, possibly with a leading - for negative values and a trailing .sss part for non-integer input.

    • mf1:number: (
          ctx: MessageFunctionContext,
          options: Record<string, unknown>,
          operand?: unknown,
      ) => MessageNumber

      A wrapper around DefaultFunctions.number, used for formatting most number placeholders.

    • mf1:plural: (
          ctx: MessageFunctionContext,
          options: Record<string, unknown>,
          operand?: unknown,
      ) => MessageNumber

      A plural or selectordinal selector that includes an offset.

      Selectors without an offset are represented by :number.

    • mf1:time: (
          ctx: MessageFunctionContext,
          options: Record<string, unknown>,
          operand?: unknown,
      ) => MessageDateTime

      A wrapper around DraftFunctions.time, used for formatting time placeholders.

    • mf1:unit: (
          ctx: MessageFunctionContext,
          options: Record<string, unknown>,
          operand?: unknown,
      ) => MessageNumber

      A wrapper around DraftFunctions.unit, used for formatting number, percent, number, ::unit, and other placeholders.