Skip to content

ConnectDeviceResult

Defined in: console-sdk/src/device/deviceModel.ts:309

The result of useConnectDevice (SDK_PLAN.md §3.6.2, post-revision). Follows the paired-verb contract (§3.8.3): the bare connect never rejects (failure routes into errors, keyed by device), while connectAsync rejects for imperative composition. State is per-device, so two rows tapped quickly each spin and each report their own failure.

connect(target, options?): Promise<Device | null>

Defined in: console-sdk/src/device/deviceModel.ts:315

Resolves the Device at ready, or null on failure — NEVER rejects (§3.8.3); the ConnectError lands in errors, keyed by device.

ConnectTarget

ConnectOptions

Promise<Device | null>


connectAsync(target, options?): Promise<Device>

Defined in: console-sdk/src/device/deviceModel.ts:320

Rejecting twin for imperative composition (NFC/QR flows, sequencing).

ConnectTarget

ConnectOptions

Promise<Device>


reset(deviceId?): void

Defined in: console-sdk/src/device/deviceModel.ts:336

Clear one device’s failure, or omit to clear all — a real clear.

DeviceId

void

errors: readonly ConnectErrorEntry[]

Defined in: console-sdk/src/device/deviceModel.ts:334

One entry per failed device; concurrent failures never overwrite each other.


isPending: boolean

Defined in: console-sdk/src/device/deviceModel.ts:325

true while any connect is in flight.


pendingIds: readonly DeviceId[]

Defined in: console-sdk/src/device/deviceModel.ts:332

Devices with a connect in flight. Concurrent connects are tracked independently — no single-flight bottleneck. The canonical per-row busy signal is device.connection.status === 'connecting'; this exists for screens without the row’s Device at hand.