@messageformat/fluent
Version:
Conversion & compatibility tools for using Fluent with MessageFormat 2
15 lines (14 loc) • 708 B
TypeScript
import * as Fluent from '@fluent/syntax';
import type { FluentMessageResourceData } from './index.ts';
/**
* Convert a Map of {@link MF.Message | Model.Message} data objects into a
* {@link https://projectfluent.org/fluent.js/syntax/classes/resource.html | Fluent.Resource}.
*
* @param options.functionMap - A mapping of custom MessageFormat 2 → Fluent function names.
* @param options.template - If set, defines the resource-level comments, message order,
* and the default variant identifiers for messages.
*/
export declare function resourceToFluent(resource: FluentMessageResourceData, options?: {
functionMap?: Record<string, string>;
template?: Fluent.Resource;
}): Fluent.Resource;