File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 1- export type AsyncIterableLike < T > = Iterable < Promise < T > > | AsyncIterable < T > ;
1+ export type AsyncIterableLike < T > = Iterable < Promise < T > | T > | AsyncIterable < T > ;
22
33export function filter < T , U extends T > (
44 iterable : AsyncIterableLike < T > ,
@@ -108,7 +108,7 @@ export const asyncMapFn = mapFn;
108108
109109export async function * asyncConcatMap < T , U > (
110110 iterable : AsyncIterableLike < T > ,
111- f : ( element : T ) => AsyncIterableLike < U > | Iterable < U >
111+ f : ( element : T ) => AsyncIterableLike < U >
112112) : AsyncIterable < U > {
113113 for await ( const a of iterable ) {
114114 for await ( const b of f ( a ) ) {
@@ -118,7 +118,7 @@ export async function* asyncConcatMap<T, U>(
118118}
119119
120120export function asyncConcatMapFn < T , U > (
121- f : ( element : T ) => AsyncIterableLike < U > | Iterable < U >
121+ f : ( element : T ) => AsyncIterableLike < U >
122122) : ( iterable : AsyncIterableLike < T > ) => AsyncIterable < U > {
123123 return iterable => asyncConcatMap ( iterable , f ) ;
124124}
You can’t perform that action at this time.
0 commit comments