Skip to content

RpcHandler

RpcHandler<TReq, TRes> = (request, context) => Promise<z.infer<TRes>>

Defined in: packages/hoppity/src/handlers/types.ts:79

Handler for RPC operations. Must be async and return the response type.

TReq extends ZodTypeAny

The Zod schema for the request payload

TRes extends ZodTypeAny

The Zod schema for the response payload

z.infer<TReq>

HandlerContext

Promise<z.infer<TRes>>