*Define constructor bag types
This commit is contained in:
parent
73846a5eda
commit
4f08c07489
|
@ -9,9 +9,13 @@ export default class DHTOnline extends DHTOnlineBase {
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
swarm: any,
|
swarm: any,
|
||||||
{ id = swarm.keyPair.publicKey, data = {}, ...opts } = {}
|
{
|
||||||
|
id = swarm.keyPair.publicKey,
|
||||||
|
data = {},
|
||||||
|
...opts
|
||||||
|
}: { id?: Buffer; data?: {}; opts?: any } = {}
|
||||||
) {
|
) {
|
||||||
super(id, opts);
|
super(id, opts as any);
|
||||||
this.flood = new DHTFlood({ id, swarm, ...opts });
|
this.flood = new DHTFlood({ id, swarm, ...opts });
|
||||||
this.swarm = swarm;
|
this.swarm = swarm;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue