这是indexloc提供的服务,不要输入任何密码
Skip to content

refactor: remove unnecessary promise wrapper #1213

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

Merged
merged 1 commit into from
Sep 19, 2024
Merged

Conversation

kricsleo
Copy link
Contributor

The await will automatically handle the following expression, whether a promise or not.
So there is no need to wrap it with Promise.resolve ❤️

  • Non-thenable value: An already-fulfilled Promise is constructed and used.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/await#description

Copy link

codesandbox bot commented Sep 18, 2024

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

Copy link

vercel bot commented Sep 18, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
tsup ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 18, 2024 3:31am

Copy link

pkg-pr-new bot commented Sep 19, 2024

Open in Stackblitz

pnpm add https://pkg.pr.new/egoist/tsup@1213

commit: 1a439eb

@sxzz sxzz merged commit 52b4e07 into egoist:main Sep 19, 2024
11 checks passed
@sxzz sxzz changed the title chore: remove unnecessary promise wrapper refactor: remove unnecessary promise wrapper Sep 19, 2024
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

Successfully merging this pull request may close these issues.

2 participants