mf1ToMessageData() function

This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Convert an ICU MessageFormat 1 message into a Message data object.

If the source message contains any inner selectors, they will be lifted into a single top-level selector.

Only literal values are supported in formatter parameters. Any such value will be passed in as an option { param: string }.

Signature:

export declare function mf1ToMessageData(ast: AST.Token[]): Message;

Parameters

Parameter Type Description
ast AST.Token[] An ICU MessageFormat message as an array of @messageformat/parser AST tokens.

Returns:

Message