Skip to content

Type Alias: GuardsFor<T, G> ​

ts
type GuardsFor<T, G> = T extends object ? ScopedGuards<T, G> : Guards<T>;

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

What createGuards<T, G>() returns: Guards, or ScopedGuards for a config with guards.

Type Parameters ​

Type ParameterDefault type
T extends RbacTypeConfigDefaultRbacTypes
G extends stringDefaultGuardName<T>

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