From ee3f928b0ee65b4cc2a7ecad746e1585e8a41b0b Mon Sep 17 00:00:00 2001 From: Juan Castro Date: Fri, 25 Sep 2026 14:39:23 -0400 Subject: [PATCH] fix: annotate the seat-lookup catch so the baselined typecheck passes --- src/backend/services/socket/SocketService.ts | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/backend/services/socket/SocketService.ts b/src/backend/services/socket/SocketService.ts index f85147ca2..3bdd8a095 100644 --- a/src/backend/services/socket/SocketService.ts +++ b/src/backend/services/socket/SocketService.ts @@ -390,7 +390,7 @@ export class SocketService extends PuterService { } ) ?.getOrgSeat?.(id) - .catch(() => null); + .catch((): null => null); return { ...base, teamRequires2fa: Number(seat?.require_2fa) === 1 }; } @@ -408,8 +408,7 @@ export class SocketService extends PuterService { // `{ auth: { ... } }`, not the query string. puter-js uses // `io(url, { auth: { auth_token } })`. const handshakeAuth = socket.handshake.auth as - | Record - | undefined; + Record | undefined; const tokenRaw = typeof handshakeAuth?.auth_token === 'string' ? handshakeAuth.auth_token @@ -857,8 +856,7 @@ export class SocketService extends PuterService { // their next poll of /cache/last-change-timestamp. const originalSocketId = ( data.response as - | { original_client_socket_id?: string } - | undefined + { original_client_socket_id?: string } | undefined )?.original_client_socket_id; await this.send({ room: userId }, 'cache.updated', { timestamp, @@ -872,9 +870,7 @@ export class SocketService extends PuterService { #handleUploadProgress(data: UploadProgressPayload): void { const meta = data.meta ?? {}; const userId = (meta.user_id ?? meta.userId) as - | number - | string - | undefined; + number | string | undefined; if (!userId) { console.warn('[socket] upload-progress missing user_id', { meta }); return;