Skip to content

Commit

Permalink
fix: add transform stream type (#2)
Browse files Browse the repository at this point in the history
Adds type for transform streams
  • Loading branch information
achingbrain authored Jan 10, 2022
1 parent 5a5cbf8 commit a102eea
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
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>> {
Expand Down

0 comments on commit a102eea

Please sign in to comment.