Type Alias: RbacEnv<T, G>
ts
type RbacEnv<T, G> = object;Defined in: packages/hono/src/middleware.ts:39
Hono env for apps using rbacMiddleware(): new Hono<RbacEnv>() types c.var.rbac, and new Hono<RbacEnv<typeof rbac>>() types it with the names of a typed engine. Combine it with your own variables: new Hono<{ Variables: RbacVariables<AppRbac> & { user: User } }>(). With per-guard names, RbacEnv<typeof rbac, 'api'> types c.var.rbac with the names of guard api.
Type Parameters
| Type Parameter | Default type |
|---|---|
T extends RbacTypeConfig | Rbac<RbacTypeConfig> | DefaultRbacTypes |
G extends string | DefaultGuardName<TypesOf<T>> |
Properties
Variables
ts
Variables: RbacVariables<TypesOf<T>, G>;Defined in: packages/hono/src/middleware.ts:43
