feat(core): reduce(Async) accept single value#433
Conversation
Hanssen0
commented
Jul 4, 2026
- I have read the Contributing Guidelines
✅ Deploy Preview for docsccc ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for appccc ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
🦋 Changeset detectedLatest commit: 2a8f542 The changes in this PR will be included in the next version bump. This PR includes changesets to release 21 packages
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 |
✅ Deploy Preview for apiccc ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for liveccc ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Pull request overview
This PR expands the core reduce and reduceAsync utilities to accept a single (non-iterable) value in addition to iterables, updating the public API documentation and recording the change as a minor release.
Changes:
- Broadened
reduceandreduceAsyncTypeScript overloads to accept a single value alongside (async) iterables. - Added runtime wrapping logic to treat non-iterables as a single-element iterable.
- Added a changeset marking
@ckb-ccc/coreas a minor bump for this feature.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| packages/core/src/utils/index.ts | Updates reduce/reduceAsync types, docs, and runtime handling to accept single values. |
| .changeset/tangy-bugs-allow.md | Declares a minor version bump for the new reduce(Async) capability. |
4422591 to
c99f2b9
Compare
c99f2b9 to
2a8f542
Compare
