@busy-hour/blaze
Version:
<h1 align='center'>🔥 Blaze</h1> <div align='center'> An event driven framework for 🔥 Hono.js </div>
21 lines (20 loc) • 687 B
TypeScript
import type { Blaze } from '../../router/index';
import type { BlazeTrpc, TrpcOption } from '../../types/trpc';
export declare function loadTrpc(app: Blaze): BlazeTrpc;
/**
* Load all the service actions to Trpc adapter
* @example
* ```ts
*
* const { router } = app.trpc('/trpc/*', {
* middlewares: [cors()],
* })
*
* // Re-export the router like this
* export type BlazeTrpcRouter = typeof router;
* // or export the types from the modules
* export { BlazeTrpcRouter } from '@busy-hour/blaze/trpc'
* ```
*/
export declare function useTrpc(this: Blaze, path: string, { endpoint, middlewares, ...options }?: TrpcOption): BlazeTrpc;
export type UseTrpc = typeof useTrpc;