-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Fields #2
Conversation
Note that this is based on #1. |
no diffbase :( I will take a look again tomorrow after you submit #1 |
a69706d
to
ffdde64
Compare
Should be more reviewable now. |
} | ||
// Emit a synthetic ctor. | ||
// TODO(martinprobst): Handle inherited parent ctors. | ||
this.writeTextBetween(classNode, classNode.getFullStart(), classNode.getLastToken()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
every single call in this cl passes writeTextBetween(node, node.getFullStart(), child)
maybe create a helped writeTextUntilChild(node, child)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I'm not happy with these functions. There are users that pass a write offset; I split it into two functions.
I think you have a few features that have no tests, otherwise LGTM. |
Closure Compiler interprets accesses in the constructor as field declarations. When the code has no side effects, in particular no assignment, this is called a stub declaration. This change prints such a stub declaration, including a type annotations, for each field of each class.
- Properly print file names - Print the source that failed to parse - Check generated sources in Closure Compiler strict mode. This makes sure we don't forget to generate some field or variable. - start `gulp watch`ing without testing first. This allows to start up gulp watch with failing tests.
angular#180 - Minor cleanup comments I missed in the first update.
Imagine code like ``` import 'foo'; // #1 import * as foo from 'foo'; // #2 ``` tsickle currently produces something like: ``` var tsickle_module_1_ = goog.require('foo'); // #1 var foo_1 = tsickle_module_1_; // #2 ``` Using this alias ends up confusing some JSCompiler optimization (see bug). We can avoid it by producing the simpler emit done in this change, which looks instead like: ``` goog.require('foo'); // #1 var foo_1 = goog.require('foo'); // #2 ``` PiperOrigin-RevId: 317391228
Imagine code like ``` import 'foo'; // #1 import * as foo from 'foo'; // #2 ``` tsickle currently produces something like: ``` var tsickle_module_1_ = goog.require('foo'); // #1 var foo_1 = tsickle_module_1_; // #2 ``` Using this alias ends up confusing some JSCompiler optimization (see bug). We can avoid it by producing the simpler emit done in this change, which looks instead like: ``` goog.require('foo'); // #1 var foo_1 = goog.require('foo'); // #2 ``` PiperOrigin-RevId: 317391228
Imagine code like ``` import 'foo'; // #1 import * as foo from 'foo'; // #2 ``` tsickle currently produces something like: ``` var tsickle_module_1_ = goog.require('foo'); // #1 var foo_1 = tsickle_module_1_; // #2 ``` Using this alias ends up confusing some JSCompiler optimization (see bug). We can avoid it by producing the simpler emit done in this change, which looks instead like: ``` goog.require('foo'); // #1 var foo_1 = goog.require('foo'); // #2 ``` PiperOrigin-RevId: 317391228
Imagine code like ``` import 'foo'; // #1 import * as foo from 'foo'; // #2 ``` tsickle currently produces something like: ``` var tsickle_module_1_ = goog.require('foo'); // #1 var foo_1 = tsickle_module_1_; // #2 ``` Using this alias ends up confusing some JSCompiler optimization (see bug). We can avoid it by producing the simpler emit done in this change, which looks instead like: ``` goog.require('foo'); // #1 var foo_1 = goog.require('foo'); // #2 ``` PiperOrigin-RevId: 317957124
No description provided.