Skip to content

Type Alias: GuardHandlerContext<T, G> ​

ts
type GuardHandlerContext<T, G> = RbacRequestContext & RbacContext<T, G>;

Defined in: packages/elysia/src/guards.ts:39

The context the handlers of createGuards<T>() get: the request context plus an rbac with the names of T (of guard G with per-guard names).

Type Parameters ​

Type ParameterDefault type
T extends RbacTypeConfig | Rbac<RbacTypeConfig>DefaultRbacTypes
G extends stringDefaultGuardName<TypesOf<T>>

Released under the MIT License. Inspired by spatie/laravel-permission.