-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
Need to extends
static
getters and setters.
#4664
Comments
looks right to me. Also related to #2009 |
Consider this: class A {
static y;
static get x() {
return this.y;
}
}
class B extends A { }
B.y = 123;
console.log(B.x); The code emitted by TypeScript will log |
I guess you might expect us to define customized helper, but this could be a common usage I think. |
extends
static
getter and setters.extends
static
getters and setters.
@mhegazy Hi, this is still an issue. d[p] = b[p]; But it should better do: Object.defineProperty(d, p, Object.getOwnPropertyDescriptor(b, p)); |
I think this has always been an issue, which is why users are free to use their own |
Marking this as a duplicate of #1520. |
@DanielRosenwasser Thanks for the information! |
Maybe something like this?
Or is there a better polyfill around the corner?
The text was updated successfully, but these errors were encountered: