Skip to content

Type Alias: GuardsFor<T, G, C> ​

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

Defined in: packages/trpc/src/guards.ts:195

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

Type Parameters ​

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

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