Skip to content

Type Alias: GuardRequirementArgs<A, T, K, G, O> ​

ts
type GuardRequirementArgs<A, T, K, G, O> = RequirementArgs<A, RequirementName<T, K, RequirementGuard<A, G>>, O & GuardOptions<CheckRequirementGuard<T, RequirementGuard<A, G>>>>;

Defined in: packages/core/src/requirements.ts:128

RequirementArgs with per-guard names: the names of kind K are those of the guard the call checks in (RequirementGuard: the options' guard, else G), and guard must be one of the typed guards (or any string, which accepts the names of every guard). Without guards in T, the same as RequirementArgs<A, RequirementName<T, K>, O>.

Type Parameters ​

Type Parameter
A extends readonly unknown[]
T extends RbacTypeConfig
K extends RequirementKind
G extends string
O

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