OptionaldecodeDecode text content before it is pushed to an MFML AST node. Use this method to decode HTML entities.
Text to decode.
OptionalfallbackMapping 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.OptionalgetReturns the TypeScript type for a given argument.
OptionalhashNumber of characters in a message body hash.
Messages arranged by a locale.
OptionaloutThe directory that contains node_modules.
OptionalpackageThe name of the package from to which compiled messages are written.
OptionalpostprocessorsThe 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.
OptionalpreprocessorsThe array of callbacks that are run before message parsing.
Preprocessors can be used to transform Markdown messages to HTML, or other text-based transformations.
OptionalrenameReturns the name of a message function for the given message key.
OptionaltokenizerOptions that define how input text MFML messages are tokenized.
By default, forgiving HTML tokenizer options are used.
The user-facing compilation config.