Skip to content

Commit b94129f

Browse files
committed
Fix signature of flatmap
1 parent 435b1ad commit b94129f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/AsyncStream.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,9 @@ export default class AsyncStream<T> {
219219
* @param mapper the mapper which converts the item into a new AsyncStream
220220
*/
221221
public flatMap<R>(
222-
mapper: Mapper<T, AsyncStream<R>> | AsyncMapper<T, AsyncStream<R>>
222+
mapper:
223+
| Mapper<T, AsyncStream<R> | R[]>
224+
| AsyncMapper<T, AsyncStream<R> | R[]>
223225
): AsyncStream<R> {
224226
return new AsyncStream(flatMappedAsyncIterable(this.asyncIterable, mapper));
225227
}

0 commit comments

Comments
 (0)