fix(es/compat): Hoist arguments in object method while lowering async functions#10167
fix(es/compat): Hoist arguments in object method while lowering async functions#10167kdy1 merged 3 commits intoswc-project:mainfrom
arguments in object method while lowering async functions#10167Conversation
|
During my investigation of this issue, I discovered that esbuild employs a more streamlined approach compared to Babel. Rather than hoisting Here's a code example demonstrating this approach: var foo = {
bar(_0) {
return __async(this, arguments, function* ({ name }) {
console.log("arguments.length", arguments.length);
});
}
};This optimization eliminates the hoisting process for Maybe in another PR. |
kdy1
left a comment
There was a problem hiding this comment.
Changeset bot is refusing to work 🤣
I'll add them manually
|
Why isn't this implemented using |
🦋 Changeset detectedLatest commit: 96ef752 The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Oh I forgot the comment. @magic-akari Is there a particular reason? |
Are you referring to esbuild's approach? |
Do you mean |
|
Sorry, you are right. Now it uses the |
That's good.
I don't like apply and bind. IIRC they may introduce some nasty problems. |
Related issue:
argumentsis not transform correct in async function #10149