@messageformat/fluent
Version:
Conversion & compatibility tools for using Fluent with MessageFormat 2
13 lines (12 loc) • 577 B
TypeScript
import * as Fluent from '@fluent/syntax';
import type { Model as MF } from 'messageformat';
/**
* Compile a {@link https://projectfluent.org/fluent.js/syntax/classes/pattern.html | Fluent.Pattern}
* (i.e. the value of a Fluent message or an attribute) into a
* {@link MF.Message | Model.Message} data object.
*
* @param options.detectNumberSelection - Set `false` to disable number selector detection based on keys.
*/
export declare function fluentToMessage(ast: Fluent.Pattern, options?: {
detectNumberSelection?: boolean;
}): MF.PatternMessage | MF.SelectMessage;