Skip to content

feat: add unawaited function - #464

Open
aleclarson wants to merge 2 commits into
mainfrom
feat/unawaited
Open

feat: add unawaited function#464
aleclarson wants to merge 2 commits into
mainfrom
feat/unawaited

Conversation

@aleclarson

@aleclarson aleclarson commented Feb 13, 2026

Copy link
Copy Markdown
Member

Summary

This PR adds a new function unawaited to the async group. This function attaches a rejection handler to a given promise that logs any errors to console.error. This is useful for fire-and-forget promises where you want to ensure rejections are at least logged and don't result in unhandled promise rejections.

Related issue, if any:

None.

For any code change,

  • Related documentation has been updated, if needed
  • Related tests have been added or updated, if needed
  • Related benchmarks have been added or updated, if needed
  • Release notes in next-minor.md or next-major.md have been added, if needed

Does this PR introduce a breaking change?

No

Bundle impact

Status File Size 1 Difference
A src/async/unawaited.ts 61 +61

Footnotes

  1. Function size includes the import dependencies of the function.

@aleclarson aleclarson added the won't merge A rejected proposal. label Feb 24, 2026
@aleclarson aleclarson added the open library This PR should be listed in the Open Library label May 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

open library This PR should be listed in the Open Library won't merge A rejected proposal.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant