Skip to content

asDeviceId

asDeviceId(raw): DeviceId

Defined in: console-sdk/src/ids.ts:57

Escape hatch for persisted ids: brands a raw string as a DeviceId. Intended for rehydrating values the SDK previously handed out (e.g. a device id stored by the host app); it performs no validation or transformation.

string

DeviceId

const lastUsed = asDeviceId(await storage.get('last-device-id'));