11import type { DevframeRpcClient , DevframeRpcClientOptions } from '@devframes/hub/client'
2+ import type { DevframeRpcClientFunctions } from '@devframes/hub/types'
3+ import type { BirpcReturn } from 'devframe/rpc'
4+ import type { DevToolsRpcServerFunctions } from '../types/rpc-augments'
25import { getDevframeRpcClient } from '@devframes/hub/client'
36
7+ export type DevToolsRpcClientCall = BirpcReturn < DevToolsRpcServerFunctions , DevframeRpcClientFunctions > [ '$call' ]
8+ export type DevToolsRpcClientCallEvent = BirpcReturn < DevToolsRpcServerFunctions , DevframeRpcClientFunctions > [ '$callEvent' ]
9+ export type DevToolsRpcClientCallOptional = BirpcReturn < DevToolsRpcServerFunctions , DevframeRpcClientFunctions > [ '$callOptional' ]
10+ export type DevToolsRpcClientOptions = DevframeRpcClientOptions
11+
12+ export interface DevToolsRpcClient extends Omit <
13+ DevframeRpcClient ,
14+ 'call' | 'callEvent' | 'callOptional'
15+ > {
16+ call : DevToolsRpcClientCall
17+ callEvent : DevToolsRpcClientCallEvent
18+ callOptional : DevToolsRpcClientCallOptional
19+ }
20+
421/**
522 * The Vite DevTools flavour of devframe's {@link getDevframeRpcClient}. Kept as
623 * a dedicated export for naming symmetry with the kit's other `DevTools*`
@@ -17,10 +34,10 @@ import { getDevframeRpcClient } from '@devframes/hub/client'
1734 * devframe's native browser-prompt fallback for every kit-managed connection.
1835 */
1936export function getDevToolsRpcClient (
20- options : DevframeRpcClientOptions = { } ,
21- ) : Promise < DevframeRpcClient > {
37+ options : DevToolsRpcClientOptions = { } ,
38+ ) : Promise < DevToolsRpcClient > {
2239 return getDevframeRpcClient ( {
2340 ...options ,
2441 simpleAuth : false ,
25- } )
42+ } ) as Promise < DevToolsRpcClient >
2643}
0 commit comments