Type Alias: GuardHandler<C>
ts
type GuardHandler<C> = (c, context) => Response | Promise<Response>;Defined in: packages/hono/src/guards.ts:50
Returns the response to send (or throws, e.g. an HTTPException). C is the context it gets: GuardHandlerContext<T> in createGuards<T>(), so c.var.rbac has the names of T there.
Type Parameters
| Type Parameter | Default type |
|---|---|
C | Context |
Parameters
| Parameter | Type |
|---|---|
c | C |
context | GuardContext |
Returns
Response | Promise<Response>
