chore: type error on birpc@3.0.0 types (#9206)

This commit is contained in:
Ari Perkkiö 2025-12-08 10:07:15 +02:00 committed by GitHub
parent 300648fb10
commit b7717c1b64
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -87,7 +87,7 @@ export function createClient(url: string, options: VitestClientOptions = {}): Vi
}, },
} }
const birpcHandlers: BirpcOptions<WebSocketHandlers> = { const birpcHandlers = {
post: msg => ctx.ws.send(msg), post: msg => ctx.ws.send(msg),
on: fn => (onMessage = fn), on: fn => (onMessage = fn),
serialize: e => serialize: e =>
@ -103,7 +103,7 @@ export function createClient(url: string, options: VitestClientOptions = {}): Vi
}), }),
deserialize: parse, deserialize: parse,
timeout: -1, timeout: -1,
} } satisfies BirpcOptions<WebSocketHandlers>
ctx.rpc = createBirpc<WebSocketHandlers, WebSocketEvents>( ctx.rpc = createBirpc<WebSocketHandlers, WebSocketEvents>(
functions, functions,