Skip to content

Type Alias: ScopedGuard<T, G, K, O> ​

ts
type ScopedGuard<T, G, K, O> = <A>(...args) => BeforeHandle;

Defined in: packages/elysia/src/guards.ts:159

A guard of createGuards<T, G>() when T has per-guard names: the names are those of the guard the call checks in, its { guard } option or else G (the guard of the request).

Type Parameters ​

Type Parameter
T extends RbacTypeConfig
G extends string
K extends GuardKind
O

Type Parameters ​

Type Parameter
A extends readonly (GuardNames | O)[]

Parameters ​

ParameterType
...argsA & GuardRequirementArgs<A, T, K, G, O>

Returns ​

BeforeHandle

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