Uh oh!
There was an error while loading. Please reload this page.
Gh 41788 incorrect output for esprivate with nested class in esnext - #42663
Conversation
Uh oh!
There was an error while loading. Please reload this page.
Nathan Shively-Sanders (sandersn)
left a comment
There was a problem hiding this comment.
I think it's missing a check that the property is static.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Nathan Shively-Sanders (@sandersn) Thank you for the review. I fixed the issues. Let me know if there are any others changes I should make. |
Nathan Shively-Sanders (sandersn)
commented
Apr 2, 2021
Titian Cernicova-Dragomir (@dragomirtitian) Sorry for the delay on this. I tried merging from master but there are some changes in the emit that were so complex that I couldn't tell whether they were correct. Can you take a look? I'll merge after that. |
… if target:ESNext and useDefineForClassFields:false.
…true for target esnext
90e6067 to
dc0a347CompareExE Boss (ExE-Boss)
commented
May 27, 2021
This also fixed #34787 |
Since TypeScript 4.3, `target: "esnext"` indicates that `useDefineForClassFields: true` as the new default. See <microsoft/TypeScript#42663> So I'm explicitly adding this field to the tsconfigs to avoid any confusions. Note that `lit-element` projects must use `useDefineForClassFields: false` because of <https://github.com/lit/lit-element/issues/1030> Vue projects must use `useDefineForClassFields: true` so as to support class style `prop` definition in `vue-class-component`: <vuejs/vue-class-component#465> Popular React state management library MobX requires it to be `true`: <https://mobx.js.org/installation.html#use-spec-compliant-transpilation-for-class-properties> Other frameworks seem to have no particular opinion on this. So I turned it on in all templates except for the `lit-element` one.
Fixes#41788
Fixed as described in comment