Type Alias: ScopedGuard<T, G, K, O>
ts
type ScopedGuard<T, G, K, O> = <A>(...args) => GuardHook;Defined in: packages/fastify/src/guards.ts:179
A guard of createGuards<T, G>() when T has per-guard names (RbacTypeConfig['guards']): like Guard, but the names are those of the guard the call checks in, its { guard } option or else G (the guard of the request). requirePermission('orders.read', { guard: 'api' }) takes the api names.
Type Parameters
| Type Parameter |
|---|
T extends RbacTypeConfig |
G extends string |
K extends GuardKind |
O |
Type Parameters
| Type Parameter |
|---|
A extends readonly (GuardNames | O)[] |
Parameters
| Parameter | Type |
|---|---|
...args | A & GuardRequirementArgs<A, T, K, G, O> |
