Skip to content

Type Alias: GuardSyncDefinition<T, G> ​

ts
type GuardSyncDefinition<T, G> = 
  | SyncDefinition<T, G> & object
  | { [K in GuardName<T>]: SyncDefinition<T, K> & { guard: K } }[GuardName<T>];

Defined in: packages/core/src/sync.ts:51

With per-guard names: a block of guard K (guard: K, a literal), with the names of K. A block without guard takes the names of G: the guard option of sync(), else the default guard.

Type Parameters ​

Type ParameterDefault type
T extends RbacTypeConfig-
G extends stringDefaultGuardName<T>

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