it-stream-types
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -1,11 +0,9 @@ | ||
export interface Sink<T> { | ||
(source: AsyncIterable<T>): Promise<void>; | ||
export declare type Source<T> = AsyncIterable<T> | Iterable<T>; | ||
export interface Sink<T, R = Promise<void>> { | ||
(source: Source<T>): R; | ||
} | ||
export interface Source<T> { | ||
(source: AsyncIterable<T>): Promise<void>; | ||
export interface Duplex<TSource, TSink = TSource, RSink = Promise<void>> { | ||
source: Source<TSource>; | ||
sink: Sink<TSink, RSink>; | ||
} | ||
export interface Duplex<T> { | ||
source: Source<T>; | ||
sink: Sink<T>; | ||
} | ||
//# sourceMappingURL=index.d.ts.map |
{ | ||
"name": "it-stream-types", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Typescript types for AsyncIterable sink/source/duplex streams", | ||
@@ -5,0 +5,0 @@ "type": "module", |
@@ -0,13 +1,10 @@ | ||
export type Source<T> = AsyncIterable<T> | Iterable<T> | ||
export interface Sink<T> { | ||
(source: AsyncIterable<T>): Promise<void> | ||
export interface Sink<T, R = Promise<void>> { | ||
(source: Source<T>): R | ||
} | ||
export interface Source<T> { | ||
(source: AsyncIterable<T>): Promise<void> | ||
export interface Duplex<TSource, TSink = TSource, RSink = Promise<void>> { | ||
source: Source<TSource> | ||
sink: Sink<TSink, RSink> | ||
} | ||
export interface Duplex<T> { | ||
source: Source<T> | ||
sink: Sink<T> | ||
} |
Sorry, the diff of this file is not supported yet
5070
17