Skip to content

Override keyword on properties is being emitted in ESNext output #44455

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

Closed
arciisine opened this issue Jun 6, 2021 · 3 comments
Closed

Override keyword on properties is being emitted in ESNext output #44455

arciisine opened this issue Jun 6, 2021 · 3 comments

Comments

@arciisine
Copy link

Bug Report

πŸ”Ž Search Terms

override esnext emit output

πŸ•— Version & Regression Information

  • This is new behavior introduced in the 4.3 release

⏯ Playground Link

Playground link with relevant code

πŸ’» Code

export class ServiceInherit {
  age = 30;
}

export class ServiceInherit2 extends ServiceInherit {
  override age = 31;
}

πŸ™ Actual behavior

Output is currently being produced with the override keyword, when targetting ESNext as the language target.

Common JS Output

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ServiceInherit2 = exports.ServiceInherit = void 0;
class ServiceInherit {
    age = 30;
}
exports.ServiceInherit = ServiceInherit;
class ServiceInherit2 extends ServiceInherit {
    override age = 31;
}
exports.ServiceInherit2 = ServiceInherit2;

ESNext Module Ouptut

export class ServiceInherit {
    age = 30;
}
export class ServiceInherit2 extends ServiceInherit {
    override age = 31;
}

πŸ™‚ Expected behavior

The output should not include non-standard keywords like override.

@MartinJohns
Copy link
Contributor

What version are you using? You didn't provide it in the issue template. It's been fixed in 4.3.3: #44273

@arciisine
Copy link
Author

The playground link is for 4.3.2, I didn't realize 4.3.3 had already been released, but great to hear this is already fixed.

@arciisine
Copy link
Author

So not released yet, but soon. Closing this as a duplicate of #44273

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants