Link Search Menu Expand Document

compileFluentResourceData() function

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

Compile a Fluent resource (i.e. and FTL file) into a Map of Message data objects.


export declare function compileFluentResourceData(src: string): {
    data: Map<string, Message>;
    comments: string;


Parameter Type Description
src string A Fluent resource, as the string contents of an FTL file.


{ data: Map<string, Message>; comments: string; }

An object containing the messages as data and any resource-level comments of the resource.