Skip to content
This repository was archived by the owner on Jul 21, 2023. It is now read-only.

Commit 12d6b9c

Browse files
authored
fix: specify protocol stream sink return type (#60)
To be specific with tsc and avoid the `unknown` type.
1 parent 39584c1 commit 12d6b9c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/index.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import type { AbortOptions } from '@libp2p/interfaces'
44

55
export { PROTOCOL_ID }
66

7-
export interface ProtocolStream<TSource, TSink = TSource> {
8-
stream: Duplex<AsyncGenerator<TSource>, Source<TSink>>
7+
export interface ProtocolStream<TSource, TSink = TSource, RSink = Promise<void>> {
8+
stream: Duplex<AsyncGenerator<TSource>, Source<TSink>, RSink>
99
protocol: string
1010
}
1111

0 commit comments

Comments
 (0)