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

Commit

Permalink
fix: specify protocol stream sink return type (#60)
Browse files Browse the repository at this point in the history
To be specific with tsc and avoid the `unknown` type.
  • Loading branch information
achingbrain authored Apr 18, 2023
1 parent 39584c1 commit 12d6b9c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import type { AbortOptions } from '@libp2p/interfaces'

export { PROTOCOL_ID }

export interface ProtocolStream<TSource, TSink = TSource> {
stream: Duplex<AsyncGenerator<TSource>, Source<TSink>>
export interface ProtocolStream<TSource, TSink = TSource, RSink = Promise<void>> {
stream: Duplex<AsyncGenerator<TSource>, Source<TSink>, RSink>
protocol: string
}

Expand Down

0 comments on commit 12d6b9c

Please sign in to comment.