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

Commit 5260314

Browse files
authored
fix: update mock duplex type (#380)
Updates to be compatible with mock multiaddr connection
1 parent ad18a26 commit 5260314

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
import type { Duplex } from 'it-stream-types'
1+
import type { Duplex, Source } from 'it-stream-types'
22

3-
export function mockDuplex (): Duplex<Iterable<Uint8Array>> {
3+
export function mockDuplex (): Duplex<AsyncGenerator<Uint8Array>, Source<Uint8Array>, Promise<void>> {
44
return {
5-
source: [],
5+
source: (async function * () {
6+
yield * []
7+
}()),
68
sink: async () => {}
79
}
810
}

0 commit comments

Comments
 (0)