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.
Methods
Section titled “Methods”connect()
Section titled “connect()”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.
Parameters
Section titled “Parameters”target
Section titled “target”options?
Section titled “options?”Returns
Section titled “Returns”Promise<Device | null>
connectAsync()
Section titled “connectAsync()”connectAsync(
target,options?):Promise<Device>
Defined in: console-sdk/src/device/deviceModel.ts:320
Rejecting twin for imperative composition (NFC/QR flows, sequencing).
Parameters
Section titled “Parameters”target
Section titled “target”options?
Section titled “options?”Returns
Section titled “Returns”Promise<Device>
reset()
Section titled “reset()”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.
Parameters
Section titled “Parameters”deviceId?
Section titled “deviceId?”Returns
Section titled “Returns”void
Properties
Section titled “Properties”errors
Section titled “errors”errors: readonly
ConnectErrorEntry[]
Defined in: console-sdk/src/device/deviceModel.ts:334
One entry per failed device; concurrent failures never overwrite each other.
isPending
Section titled “isPending”isPending:
boolean
Defined in: console-sdk/src/device/deviceModel.ts:325
true while any connect is in flight.
pendingIds
Section titled “pendingIds”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.