it-pb-stream
Advanced tools
Comparing version 1.0.0 to 1.0.1
import type { Duplex } from 'it-stream-types'; | ||
import type { Uint8ArrayList } from 'uint8arraylist'; | ||
export interface WrappedDuplex { | ||
export interface PBStream { | ||
read: (bytes?: number) => Promise<Uint8ArrayList>; | ||
@@ -39,3 +39,3 @@ readLP: () => Promise<Uint8ArrayList>; | ||
} | ||
export declare function pbStream(duplex: Duplex<Uint8Array>, opts?: {}): WrappedDuplex; | ||
export declare function pbStream(duplex: Duplex<Uint8Array>, opts?: {}): PBStream; | ||
//# sourceMappingURL=index.d.ts.map |
{ | ||
"name": "it-pb-stream", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "A convenience-wrapper around protocol-buffers and lp-messages functions", | ||
@@ -5,0 +5,0 @@ "author": "Alex Potsides <alex@achingbrain.net>", |
@@ -6,3 +6,3 @@ import { handshake } from 'it-handshake' | ||
export interface WrappedDuplex { | ||
export interface PBStream { | ||
read: (bytes?: number) => Promise<Uint8ArrayList> | ||
@@ -42,3 +42,3 @@ readLP: () => Promise<Uint8ArrayList> | ||
export function pbStream (duplex: Duplex<Uint8Array>, opts = {}): WrappedDuplex { | ||
export function pbStream (duplex: Duplex<Uint8Array>, opts = {}): PBStream { | ||
const shake = handshake(duplex) | ||
@@ -50,3 +50,3 @@ const lpReader = lp.decode.fromReader( | ||
const W: WrappedDuplex = { | ||
const W: PBStream = { | ||
read: async (bytes) => { | ||
@@ -53,0 +53,0 @@ // just read |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
14673