resourceToFluent() 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 a Map of Message data objects into a Fluent.Resource.


export declare function resourceToFluent(resource: FluentMessageResourceData, template?: Fluent.Resource, functionMap?: FunctionMap): Fluent.Resource;


Parameter Type Description
resource FluentMessageResourceData  
template Fluent.Resource (Optional) If set, defines the resource-level comments, message order, and the default variant identifiers for messages.
functionMap FunctionMap (Optional) A mapping of MessageFormat 2 → Fluent function names. The special value FluentMessageRef maps to Fluent message/term references.