Skip to content

Fix pMapIterable when accepting async values in an iterator - #69

Merged
sindresorhus merged 2 commits into
sindresorhus:mainfrom
noamokman:fix-p-map-iterable
Dec 27, 2023
Merged

Fix pMapIterable when accepting async values in an iterator#69
sindresorhus merged 2 commits into
sindresorhus:mainfrom
noamokman:fix-p-map-iterable

Conversation

@noamokman

Copy link
Copy Markdown
Contributor

Hey,
Changed the shared input to include a promise as this is the sample in the basic usage.
I also fixed pMapIterable to await on values as it's type allows Iterator<Element | Promise<Element>>.
The tests cover this fix.

Related to https://github.com/sindresorhus/p-filter/pull/8

Thanks!

@sindresorhus

Copy link
Copy Markdown
Owner

// @Richienb

@Richienb

Copy link
Copy Markdown
Contributor

Seems fine but would appreciate some type tests for all four (?) types of input

@noamokman

Copy link
Copy Markdown
Contributor Author

Sure I'll add it now

@noamokman

Copy link
Copy Markdown
Contributor Author

@Richienb please take another look 🙏🏻

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.

3 participants