This repository was archived by the owner on May 22, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 109
Support Fields #2
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
hess-g
added a commit
to hess-g/tsickle
that referenced
this pull request
Sep 20, 2016
angular#180 - Minor cleanup comments I missed in the first update.
copybara-service bot
pushed a commit
that referenced
this pull request
Jun 23, 2020
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
copybara-service bot
pushed a commit
that referenced
this pull request
Jun 23, 2020
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
copybara-service bot
pushed a commit
that referenced
this pull request
Jun 23, 2020
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
copybara-service bot
pushed a commit
that referenced
this pull request
Jun 23, 2020
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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.