Skip to main content

Interface: LicenseHandle

Defined in: types.ts:180

Structural view of createLicense()'s handle (docs/17 §10). state$ is the one member enforcement is built on: the provider and <FormRenderer> subscribe through useSyncExternalStore, so a license transition re-renders only the watermark / gate, never the fields (docs/06 §2.2).

Properties

state$

readonly state$: object;

Defined in: types.ts:181

get()

get(): LicenseSnapshot;
Returns

LicenseSnapshot

subscribe()

subscribe(listener): Unsubscribe;
Parameters
ParameterType
listener(snapshot) => void
Returns

Unsubscribe

Methods

can()?

optional can(feature): boolean;

Defined in: types.ts:186

Feature gating (docs/15 §4.4). Absent ⇒ the handle conveys no gating.

Parameters

ParameterType
featurestring

Returns

boolean


refresh()?

optional refresh(): Promise<void>;

Defined in: types.ts:188

Manual refresh; failures are the handle's own events, never throws.

Returns

Promise<void>


setToken()?

optional setToken(token): void | Promise<void>;

Defined in: types.ts:194

Accept a token that arrived out of band — in practice, on a sync response header. Absent ⇒ the handle cannot be updated and the provider leaves it alone.

Parameters

ParameterType
tokenstring

Returns

void | Promise<void>