From 331e5adbf7b91ca01d44b3647442ad056a50957e Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Thu, 31 Aug 2023 18:30:41 -0400 Subject: [PATCH] fix: set constructor typing --- src/index.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index 63db797..324db06 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,4 +1,4 @@ -import { BasePeer, Logger } from "@lumeweb/libs5"; +import { BasePeer, Logger, PeerConstructorOptions } from "@lumeweb/libs5"; import { URL } from "url"; import { Buffer } from "buffer"; import { Readable } from "streamx"; @@ -10,7 +10,13 @@ export default class HyperTransportPeer extends BasePeer { protected _socket = new Readable(); private _pipe?: any; - constructor(options: any) { + constructor( + options: PeerConstructorOptions & { + peer: any; + muxer: any; + protocol: string; + }, + ) { super(options); const { peer, muxer, protocol } = options; this._peer = peer;