Skip to content

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

ts
type ScopedGuard<T, G, K, O, A> = <X>(context, ...rest) => Promise<Response | undefined>;

Defined in: packages/astro/src/server.ts:126

A guard when the engine has per-guard names: the names follow the guard the call checks in.

Type Parameters ​

Type ParameterDefault type
T extends RbacTypeConfig-
G extends string-
K extends GuardKind-
O-
A extends AstroContextAstroContext

Type Parameters ​

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

Parameters ​

ParameterType
contextA
...restX & GuardRequirementArgs<X, T, K, G, O>

Returns ​

Promise<Response | undefined>

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