fix: set constructor typing

This commit is contained in:
Derrick Hammer 2023-08-31 18:30:41 -04:00
parent 77bd77ad47
commit 331e5adbf7
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 8 additions and 2 deletions

View File

@ -1,4 +1,4 @@
import { BasePeer, Logger } from "@lumeweb/libs5"; import { BasePeer, Logger, PeerConstructorOptions } from "@lumeweb/libs5";
import { URL } from "url"; import { URL } from "url";
import { Buffer } from "buffer"; import { Buffer } from "buffer";
import { Readable } from "streamx"; import { Readable } from "streamx";
@ -10,7 +10,13 @@ export default class HyperTransportPeer extends BasePeer {
protected _socket = new Readable(); protected _socket = new Readable();
private _pipe?: any; private _pipe?: any;
constructor(options: any) { constructor(
options: PeerConstructorOptions & {
peer: any;
muxer: any;
protocol: string;
},
) {
super(options); super(options);
const { peer, muxer, protocol } = options; const { peer, muxer, protocol } = options;
this._peer = peer; this._peer = peer;