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 > ;
2
2
3
3
export function filter < T , U extends T > (
4
4
iterable : AsyncIterableLike < T > ,
@@ -108,7 +108,7 @@ export const asyncMapFn = mapFn;
108
108
109
109
export async function * asyncConcatMap < T , U > (
110
110
iterable : AsyncIterableLike < T > ,
111
- f : ( element : T ) => AsyncIterableLike < U > | Iterable < U >
111
+ f : ( element : T ) => AsyncIterableLike < U >
112
112
) : AsyncIterable < U > {
113
113
for await ( const a of iterable ) {
114
114
for await ( const b of f ( a ) ) {
@@ -118,7 +118,7 @@ export async function* asyncConcatMap<T, U>(
118
118
}
119
119
120
120
export function asyncConcatMapFn < T , U > (
121
- f : ( element : T ) => AsyncIterableLike < U > | Iterable < U >
121
+ f : ( element : T ) => AsyncIterableLike < U >
122
122
) : ( iterable : AsyncIterableLike < T > ) => AsyncIterable < U > {
123
123
return iterable => asyncConcatMap ( iterable , f ) ;
124
124
}
You can’t perform that action at this time.
0 commit comments