From 4f08c07489f41d4aeab2d32c88eb75974a2f06c5 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Wed, 16 Nov 2022 12:15:51 -0500 Subject: [PATCH] *Define constructor bag types --- src/index.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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;