Skip to content

GatedAction

State + runner returned by useGatedAction.

A extends unknown[]

R

denied: boolean

True when the last run was denied by the entitlement.


entitlement: { } | null

The entitlement result from the last run, or null.


error: ActionErrorCategory | null

The last action failure’s normalized category, or null.


isRunning: boolean

True while the gate check / action is in flight.


run: (…args) => Promise<RevTurbineGateResult<R>>

Run the gated action. Returns the RevTurbineGateResult: ran: true with the result, or ran: false with the entitlement.

A

Promise<RevTurbineGateResult<R>>