File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -53,17 +53,22 @@ export async function* tail<T>(iterable: AsyncIterableLike<T>): AsyncIterable<T>
53
53
54
54
export const asyncTail = tail ;
55
55
56
- export async function * push < T > ( iterable : AsyncIterableLike < T > , value : T ) : AsyncIterable < T > {
56
+ export async function * push < T > (
57
+ iterable : AsyncIterableLike < T > ,
58
+ value : T | Promise < T >
59
+ ) : AsyncIterable < T > {
57
60
for await ( const element of await iterable ) {
58
61
yield element ;
59
62
}
60
63
61
- yield value ;
64
+ yield await value ;
62
65
}
63
66
64
67
export const asyncPush = push ;
65
68
66
- export function pushFn < T > ( value : T ) : ( iterable : AsyncIterableLike < T > ) => AsyncIterable < T > {
69
+ export function pushFn < T > (
70
+ value : T | Promise < T >
71
+ ) : ( iterable : AsyncIterableLike < T > ) => AsyncIterable < T > {
67
72
return iterable => push ( iterable , value ) ;
68
73
}
69
74
You can’t perform that action at this time.
0 commit comments