From f4b7fc78f7a15c44c74ddfe4ae19ca23d81a02ff Mon Sep 17 00:00:00 2001 From: Alex Potsides Date: Tue, 4 Apr 2023 11:45:38 +0100 Subject: [PATCH] fix: default sink return type to unknown (#46) Otherwise sync duplexes have to override the return type. --- src/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index b9512a3..3ab7012 100644 --- a/src/index.ts +++ b/src/index.ts @@ -12,7 +12,7 @@ export interface Transform { * function that takes a source and iterates over it. It optionally returns * a value. */ -export interface Sink> { +export interface Sink { (source: Source): R } @@ -32,7 +32,7 @@ export type Source = AsyncIterable | Iterable * necessarily connected to the values that can be consumed from it. It is * an object with two properties, sink and source. */ -export interface Duplex> { +export interface Duplex { source: TSource sink: Sink }