Skip to content

Commit

Permalink
fix: fix up sink output types (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
achingbrain committed Jan 11, 2022
1 parent 853914d commit 3271588
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ export interface Transform<A, B> {
(source: Source<A>): Source<B>
}

export type Source<T> = AsyncIterable<T> | Iterable<T>

export interface Sink<T, R = Promise<void>> {
export interface Sink<T, R> {
(source: Source<T>): R
}

export type Source<T> = AsyncIterable<T> | Iterable<T>

export interface Duplex<TSource, TSink = TSource, RSink = Promise<void>> {
source: Source<TSource>
sink: Sink<TSink, RSink>
Expand Down

0 comments on commit 3271588

Please sign in to comment.