Skip to content

evaluateGuard

function evaluateGuard<C, Ctx>(
engine,
feature,
options,
ctx
): Promise<GuardOutcome>;

Defined in: src/adapters/guard.ts:71

Run the guard for one request context. Never throws for a denial; errors from the customer / amount resolvers or the engine propagate.

Type Parameter
C extends AnyCatalog
Ctx
Parameter Type
engine Entitlements<C>
feature FeatureKey<C>
options RequireEntitlementOptions<Ctx>
ctx Ctx

Promise<GuardOutcome>