*Define constructor bag types

This commit is contained in:
Derrick Hammer 2022-11-16 12:15:51 -05:00
parent 73846a5eda
commit 4f08c07489
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 6 additions and 2 deletions

View File

@ -9,9 +9,13 @@ export default class DHTOnline extends DHTOnlineBase {
constructor(
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.swarm = swarm;