[Transforms] fix8038 and 8047#8071
Conversation
| getSynthesizedClone(name), | ||
| /*location*/ node | ||
| ); | ||
| if (name.originalKeywordKind === SyntaxKind.DefaultKeyword && languageVersion <= ScriptTarget.ES3) { |
There was a problem hiding this comment.
default is not necessarily the only thing that needs an element access in ES3. ES3 permits _IdentifierName_s but not ES3 _ReservedWord_s to be on the right of a property access.
There was a problem hiding this comment.
I am aware of that. However, my understanding is this case, export/import, only "default" will be affected because other reservedWords can't be used in exportClause and therefore shouldn't be able to appear in importSpecifier
Originally I do check for all other ES3 and I won't mind to do that approach. I didn't keep it because I am not sure it will be more confusing
There was a problem hiding this comment.
This is the brhaviour in master today as well. In the future we should add an es3 transform that will write keywords correctelly as well as trailing commas removal etc.
|
👍 |
fix #8047 and fix #8038