-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
super()
call should return this
, not undefined
#3538
Comments
super()
Call breached the standard
Sorry, I'm confused. Please follow the issue reporting instructions. Provide the input to esbuild (as text, not a bitmap) as well as the esbuild options used, and describe what esbuild is doing and what you think it should be doing instead. A link to a test case on https://esbuild.github.io/try/ would be ideal. I'm marking this issue as |
sry, I don't know the internal logic of esbuild, so I can't give a specific configuration trigger.
But for this part of the code, it should be the " |
I don't understand what this is or where it came from or how it relates to esbuild at all: What is
|
should be: class X extends Base {
constructor(...props) {
var __super = (...args) => {
const ret = super(...args); // note the ret
__publicField(this, "desc");
__publicField(this, "superNames");
return ret; // should return it
};
const base = __super(...props);
this.desc = Object.getOwnPropertyDescriptors(base);
this.superNames = Object.getOwnPropertyNames(base);
console.log(this.superNames, Object.getOwnPropertyDescriptor(base, "any"));
}
} |
Thank you for the additional details. I understand what you're saying now. I think it's sufficient to Edit: In the meantime, I believe you can write code that uses |
super()
Call breached the standardsuper()
call should return this
, not undefined
esbuild/internal/js_parser/js_parser_lower_class.go
Line 1686 in ce4f100
It is wrong about what super can really return. It's actually wrong
should be:
some materials:
microsoft/TypeScript#37847
microsoft/TypeScript#39758
The text was updated successfully, but these errors were encountered: