Optional
decodeDecode text content before it is pushed to an MFML AST node. Use this method to decode HTML entities.
Text to decode.
Optional
fallbackMapping from a locale to a corresponding fallback locale.
For example, let's consider fallbackLocales set to:
{
'ru-RU': 'ru',
'en-US': 'en',
'ru': 'en'
}
In this case:
ru-RU
locale, then compiler would look for ru
locale.ru
locale isn't supported as well then a compiler would fall back to en
locale.en
isn't supported as well then null
would be returned from a message function when called with ru-RU
locale.Optional
getReturns the TypeScript type for a given argument.
Optional
hashNumber of characters in a message body hash.
Messages arranged by a locale.
Optional
outThe directory that contains node_modules.
Optional
packageThe name of the package from to which compiled messages are written.
Optional
postprocessorsThe array of callbacks that are run after the message was parsed as an MFML AST.
Preprocessors can be used to validate messages, rename arguments, or for other AST-based transformations.
Optional
preprocessorsThe array of callbacks that are run before message parsing.
Preprocessors can be used to transform Markdown messages to HTML, or other text-based transformations.
Optional
renameReturns the name of a message function for the given message key.
Optional
tokenizerOptions that define how input text MFML messages are tokenized.
By default, forgiving HTML tokenizer options are used.
The user-facing compilation config.