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.

Signature:

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

Parameters

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

Returns:

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

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