clutz icon indicating copy to clipboard operation
clutz copied to clipboard

goog.msg static fields need extra init statement in gents

Open rkirov opened this issue 6 years ago • 1 comments

The following input:

class C {

}
C.message = goog.msg("...");

gents is smart enough to not move this to a 'static' field, because that breaks goog.msg. However, that's not a valid TS. One answer is to have it emit:

class C {
  static message = '';
}
C.message = goog.msg("...");

rkirov avatar Apr 25 '18 21:04 rkirov

Actual working solution: Class C { /** @desc */ static message = goog.msg("..."); }

ukrukarg avatar Apr 25 '18 21:04 ukrukarg