fix: set constructor typing
This commit is contained in:
parent
77bd77ad47
commit
331e5adbf7
10
src/index.ts
10
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 { 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;
|
||||||
|
|
Loading…
Reference in New Issue