diff --git a/src/index.ts b/src/index.ts index 0c8a0de..36bace2 100644 --- a/src/index.ts +++ b/src/index.ts @@ -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;