sindresorhus / p-map

Map over promises concurrently
MIT License
1.27k stars 58 forks source link

Fix pMapIterable when accepting async values in an iterator #69

Closed noamokman closed 8 months ago

noamokman commented 8 months ago

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 commented 8 months ago

// @Richienb

Richienb commented 8 months ago

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

noamokman commented 8 months ago

Sure I'll add it now

noamokman commented 8 months ago

@Richienb please take another look 🙏🏻