Skip to content

Type Alias: GuardsFor<T, G> ​

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

Defined in: packages/fastify/src/guards.ts:201

What createGuards<T, G>() returns: Guards for a config without per-guard names (as in 1.1), and ScopedGuards for one with guards.

Type Parameters ​

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

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