-
Notifications
You must be signed in to change notification settings - Fork 109
TypeScript / tsc drops comments, removes Closure-style casts #411
Comments
From @evmar Idea: introduce the Closure version of Might be pretty gross depending on how many casts we insert. Idea #2, pattern t5:
Idea #3 is of course fixing it upstream but I dunno how hard that is. I tried before and it seemed fairly hard but I didn't understand the code very well. |
Related upstream bugs:
|
Note: someone tried to fix this before (in one of the above bugs) and their patch was dropped because the transforms branch changed everything. But this bug made it through the transforms branch! |
Note that while working on the transfromer version of tsickle (see #516), I found that TypeScript does allow to emit comments in these places if they are added by a transformer (as a synthetic comment). However, this breaks in some places in G3:
|
This is required by closure ES6 to not produce an error. Note: In the current version of tsickle, type comments in interpolations are elided because of angular#411. In the upcoming transformer version, this is fixed though.
This is required by closure ES6 to not produce an error. Note: In the current version of tsickle, type comments in interpolations are elided because of #411. In the upcoming transformer version, this is fixed though.
Fixed. |
tsickle emits Closure style casts, i.e. JSDoc comments like this:
tsc drops these, and emits:
This happens in many syntactical positions.
The text was updated successfully, but these errors were encountered: