import { Context } from 'react'; /** * Map of api name → resolved typed rpc client. Installed by the * framework's mount() bootstrap. Consumers read it via useAppClient(). */ export declare type AppClients = ReadonlyMap; export declare const AppClientsContext: Context; /** * Returns the typed rpc client mounted under `apiName`. Generic narrows * the result to the caller's group; pass `typeof appGroup` from the api's * generated rpcGroup module: * * import type { appGroup } from '@app/api/rpcGroup' * import type { RpcClient, RpcGroup } from '@effect/rpc' * type ApiClient = RpcClient.RpcClient> * * const client = useAppClient('api') * const { data } = useSubscription('api', () => client.todos.list({}), []) * * Throws if no api is mounted under `apiName` (typo, missing entry in * app.config.ts, or app not mounted yet). */ export declare const useAppClient: (apiName: string) => Client; export { }