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

fix: specify protocol stream sink return type #60

Merged
merged 1 commit into from
Apr 18, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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