Content-Length: 257223 | pFad | http://github.com/babel/babel/pull/15922/commits/db24d0abd47a6ce908c947fa1cd43f686dae86cf

4D Improve output when wrapping functions (e.g. `async` functions) by liuxingbaoyu · Pull Request #15922 · babel/babel · GitHub
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

Improve output when wrapping functions (e.g. async functions) #15922

Merged
merged 6 commits into from
Sep 7, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
clean
  • Loading branch information
liuxingbaoyu authored and nicolo-ribaudo committed Sep 7, 2023
commit db24d0abd47a6ce908c947fa1cd43f686dae86cf
6 changes: 2 additions & 4 deletions packages/babel-helper-wrap-function/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,14 +142,12 @@ function plainFunction(
let container, ref;
if (functionId) {
container = buildNamedExpressionWrapper({
NAME: functionId || null,
NAME: functionId,
FUNCTION: built,
PARAMS: params,
});
} else {
ref = path.scope.generateUidIdentifier(
functionId ? functionId.name : "ref",
);
ref = path.scope.generateUidIdentifier("ref");
container = buildAnonymousExpressionWrapper({
REF: ref,
FUNCTION: built,
Expand Down








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/babel/babel/pull/15922/commits/db24d0abd47a6ce908c947fa1cd43f686dae86cf

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy