Skip to content

EntitlementState

Defined in: src/react/compute.ts:40

A feature’s state, computed client-side by useEntitlement.

Type Parameter Default type
V | JsonValue | undefined
Property Type Description Defined in
allowed boolean Would a request for amount be allowed right now (UX hint, not enforcement). src/react/compute.ts:42
enabled boolean Included at all (boolean on, numeric in plan, value present). src/react/compute.ts:44
kind | FeatureKind | "unknown" "unknown" before data arrives or for features the data doesn’t know. src/react/compute.ts:46
limit number | null | undefined Numeric features: null = unlimited, undefined = not numeric. src/react/compute.ts:48
loading boolean No data yet. src/react/compute.ts:59
overage number | undefined Usage beyond the limit this period (overage allowed). src/react/compute.ts:53
remaining number | null | undefined null = unlimited. src/react/compute.ts:51
resetsAt string | null | undefined When usage starts over (null = never). src/react/compute.ts:57
unlockedBy string[] Plans / add-ons (from the public pricing) that would allow it, cheapest first. src/react/compute.ts:61
used number | undefined - src/react/compute.ts:49
value V Value features: the resolved value. src/react/compute.ts:55