From fb72f09fdcb434b01605e1de329892a37fa2e533 Mon Sep 17 00:00:00 2001 From: Sjoerd Smink Date: Wed, 8 Dec 2021 16:29:09 +0100 Subject: [PATCH] Add missing TypeScript types Minor improvement to add missing TypeScript types. These are required by some linters. --- lib/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/index.ts b/lib/index.ts index f322f13..1b9cd5e 100644 --- a/lib/index.ts +++ b/lib/index.ts @@ -36,7 +36,7 @@ interface Request { */ const EMITTER_UID = "emitter"; -const hasBinary = (obj: any, toJSON?: boolean) => { +const hasBinary = (obj: any, toJSON?: boolean): boolean => { if (!obj || typeof obj !== "object") { return false; } @@ -121,7 +121,7 @@ export function createAdapter( pool: any, opts: Partial = {} ) { - return function (nsp) { + return function (nsp: any) { return new PostgresAdapter(nsp, pool, opts); }; } @@ -194,7 +194,7 @@ export class PostgresAdapter extends Adapter { debug("client listening to %s", this.channel); await client.query(`LISTEN "${this.channel}"`); - client.on("notification", async (msg) => { + client.on("notification", async (msg: any) => { try { await this.onEvent(msg.payload); } catch (err) {