-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Fix 'Missing class properties transform' error when parsing class properties with Typescript syntax #8007
Conversation
…perties with Typescript syntax
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/8353/ |
The way to fix this in line with the Flow strip plugin would be for the Typescript plugin to remove the class properties in the
|
@loganfsmyth Thanks, I've changed the implementation as you suggested. Now, there's is another issue: the class C {
x: T;
y = 0;
constructor(T) {}
} should be transpiled to class C {
constructor(T) {
this.x = void 0;
this.y = 0;
}
} So, the What should be the correct behavior in this case? P.S. The CI process has hung, so these particular tests are not shown |
…m class if property is not used in it
TypeScript compiler also removes the unused type declarations inside a class: |
Thanks for the PR! |
Fixes issue in https://babeljs.io/repl/#?babili=false&browsers=&build=&builtIns=false&code_lz=MYGwhgzhAEBiD29oG8BQ1oCMwCcBc0EALjgJYB2A5qgL5A&debug=false&forceAllTransforms=false&shippedProposals=false&circleciRepo=&evaluate=false&fileSize=false&lineWrap=false&presets=es2015%2Ctypescript&prettier=false&targets=&version=7.0.0-beta.33&envVersion=7.0.0-beta.36