-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(merge/concat): add typed overloads for merge/concat (#84)
* feat(merge/concat): add typed overloads for merge/concat * feat(merge/concat): adding ignore to overloads * feat(merge/concat): fix build errors
- Loading branch information
1 parent
f47179c
commit 752aa96
Showing
16 changed files
with
400 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { AsyncIterableX } from '../asynciterable'; | ||
|
||
class ConcatAllAsyncIterable<TSource> extends AsyncIterableX<TSource> { | ||
private _source: AsyncIterable<AsyncIterable<TSource>>; | ||
|
||
constructor(source: AsyncIterable<AsyncIterable<TSource>>) { | ||
super(); | ||
this._source = source; | ||
} | ||
|
||
async *[Symbol.asyncIterator]() { | ||
for await (let outer of this._source) { | ||
for await (let item of outer) { | ||
yield item; | ||
} | ||
} | ||
} | ||
} | ||
|
||
export function concatAll<TSource>( | ||
source: AsyncIterable<AsyncIterable<TSource>> | ||
): AsyncIterableX<TSource> { | ||
return new ConcatAllAsyncIterable<TSource>(source); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.