angular / clutz

Closure to TypeScript `.d.ts` generator
MIT License
162 stars 60 forks source link

goog.msg static fields need extra init statement in gents #734

Open rkirov opened 6 years ago

rkirov commented 6 years ago

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("...");
ukrukarg commented 6 years ago

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