Class ReplaceMessages.ProtectedJsMessage

java.lang.Object
com.google.javascript.jscomp.ReplaceMessages.ProtectedJsMessage
Enclosing class:
ReplaceMessages

public static class ReplaceMessages.ProtectedJsMessage extends Object
Holds information about the protected form of a translatable message that appears in the AST.

The original translatable messages are replaced with this protected form by the logic in `ReplaceMessages` to protect the message information through the optimization passes.


   // original
   var MSG_GREETING = goog.getMsg('Hello, {$name}!', {name: person.getName()}, {html: false});
   // protected form
   var MSG_GREETING = __jscomp_define_msg__(
       {
         'key': 'MSG_GREETING',
         'msg_text': 'Hello, {$name}!',
         'escapeLessThan': ''
       },
       {'name': person.getName()});