Skip to content

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

ts
type ScopedGuard<T, G, K, O> = <X>(request, ...rest) => Promise<SubjectRbac<T, ScopedGuardName<T, RequirementGuard<X, G>>>>;

Defined in: packages/tanstack-start/src/server.ts:104

A guard when the engine has per-guard names: the names (and the subject) follow the guard the call checks in.

Type Parameters ​

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

Type Parameters ​

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

Parameters ​

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

Returns ​

Promise<SubjectRbac<T, ScopedGuardName<T, RequirementGuard<X, G>>>>

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