Skip to content

vue-i18n / general / MessageCompiler

Type Alias: MessageCompiler()<Message, MessageSource>

ts
type MessageCompiler<Message, MessageSource> = (message, context) => MessageFunction<Message>;

Vue I18n General

The message compiler

Type Parameters

Type ParameterDefault type
Messagestring
MessageSourcestring | ResourceNode

Parameters

ParameterTypeDescription
messageMessageSourceA resolved message that ususally will be passed the string. if you can transform to it with bundler, will be passed the AST.
contextMessageCompilerContextA message context MessageCompilerContext

Returns

MessageFunction<Message>

A MessageFunction

Released under the MIT License.