Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

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

Open
rkirov opened this issue Apr 25, 2018 · 1 comment
Open

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

rkirov opened this issue Apr 25, 2018 · 1 comment
Labels

Comments

@rkirov
Copy link
Contributor

rkirov commented Apr 25, 2018

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 rkirov added the gents label Apr 25, 2018
@ukrukarg
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants