GatedAction
State + runner returned by useGatedAction.
Type Parameters
Section titled “Type Parameters”A extends unknown[]
R
Properties
Section titled “Properties”denied
Section titled “denied”denied:
boolean
True when the last run was denied by the entitlement.
entitlement
Section titled “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
Section titled “isRunning”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.
Parameters
Section titled “Parameters”…A
Returns
Section titled “Returns”Promise<RevTurbineGateResult<R>>