From 85e3910ef86d52a0f45216c65c92ba8ab647377a Mon Sep 17 00:00:00 2001 From: Timo Bechtel Date: Thu, 13 Jul 2023 10:32:03 +0200 Subject: [PATCH] fix(client): wrong types for connect function type was missing the function argument --- packages/client/src/lib/client.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/client/src/lib/client.ts b/packages/client/src/lib/client.ts index 8bfa5fb..fd4cea3 100644 --- a/packages/client/src/lib/client.ts +++ b/packages/client/src/lib/client.ts @@ -38,7 +38,7 @@ import { } from './socket-implementation/websocketClient'; export type SocketDBClientAPI = { - connect: () => void; + connect: (url?: string) => void; disconnect: () => void; intercept: ( hook: Hook, @@ -397,7 +397,7 @@ export function SocketDBClient({ disconnect() { connection.close(); }, - connect(url?: string) { + connect(url) { url = url || (typeof window !== 'undefined'