Skip to main content

Interface: LicenseView

Defined in: types.ts:201

What useLicense() returns (docs/06 §4): the live snapshot fields plus can/refresh, re-rendering on state transitions only.

Properties​

enforcement​

enforcement: "soft" | "hard";

Defined in: types.ts:205


expiresAt?​

optional expiresAt?: string;

Defined in: types.ts:206


features​

features: readonly string[];

Defined in: types.ts:204


graceUntil?​

optional graceUntil?: string;

Defined in: types.ts:207


handle?​

optional handle?: LicenseHandle;

Defined in: types.ts:212

The raw handle, when the provider has one — setToken et al. live there.


plan?​

optional plan?: string;

Defined in: types.ts:203


state​

state: LicenseState | string & object;

Defined in: types.ts:202

Methods​

can()​

can(feature): boolean;

Defined in: types.ts:209

true outside any gate: no handle, or a handle without can, never gates.

Parameters​

ParameterType
featurestring

Returns​

boolean


refresh()​

refresh(): Promise<void>;

Defined in: types.ts:210

Returns​

Promise<void>