diff --git a/apps/t3/src/runtimeApiServer.ts b/apps/t3/src/runtimeApiServer.ts index d1b784cf38..465cb3403b 100644 --- a/apps/t3/src/runtimeApiServer.ts +++ b/apps/t3/src/runtimeApiServer.ts @@ -13,6 +13,7 @@ import { type ProviderSession, type WsClientMessage, type WsResponseMessage, + type WsServerMessage, WS_EVENT_CHANNELS, WS_CLOSE_CODES, WS_CLOSE_REASONS, @@ -68,6 +69,8 @@ interface BootstrapSessionResult { bootstrapError: string | undefined; } +type WsServerEventMessage = Extract; + function raceWithTimeout( promise: Promise, timeoutMs: number, @@ -368,7 +371,10 @@ export async function startRuntimeApiServer( let launchSessionPromise: Promise | null = null; let bootstrapFallbackSession: ProviderSession | null = null; - const emitEvent = (channel: string, payload: unknown) => { + const emitEvent = ( + channel: TChannel, + payload: Extract["payload"], + ) => { if (!activeClient) { return; }