Skip to content
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

Transform static class field even target esnext #43113

Closed
Kingwl opened this issue Mar 6, 2021 · 3 comments
Closed

Transform static class field even target esnext #43113

Kingwl opened this issue Mar 6, 2021 · 3 comments

Comments

@Kingwl
Copy link
Contributor

Kingwl commented Mar 6, 2021

Bug Report

🔎 Search Terms

esnext, class, static

🕗 Version & Regression Information

  • This is the behavior in every version I tried, and I reviewed the FAQ for entries about _________

⏯ Playground Link

Playground link with relevant code

💻 Code

class C {
  static t = () => this
}

🙁 Actual behavior

class C {
}
C.t = () => this;

And with an exception.

🙂 Expected behavior

class C {
  static t = () => this
}

Works fine. And:
C.t() === C // true

@Kingwl
Copy link
Contributor Author

Kingwl commented Mar 6, 2021

BTW: I'm not sure which version is the bar that should we ignore the transform. (Might esnext)

@ExE-Boss
Copy link
Contributor

ExE-Boss commented Mar 6, 2021

@Kingwl
Copy link
Contributor Author

Kingwl commented Mar 6, 2021

Ohhh. Thanks!

@Kingwl Kingwl closed this as completed Mar 6, 2021
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