MCPcopy
hub / github.com/callstack/agent-device / readRequiredDeviceKind

Function readRequiredDeviceKind

src/utils/parsing.ts:66–68  ·  view source on GitHub ↗
(record: Record<string, unknown>, key: string)

Source from the content-addressed store, hash-verified

64}
65
66export function readRequiredDeviceKind(record: Record<string, unknown>, key: string): DeviceKind {
67 return readRequired(record, key, parseDeviceKind, `Daemon response has invalid "${key}".`);
68}
69
70export function readDeviceTarget(record: Record<string, unknown>, key: string): DeviceTarget {
71 return readOptional(record, key, parseDeviceTarget) ?? 'mobile';

Callers 1

normalizeDeviceFunction · 0.90

Calls 1

readRequiredFunction · 0.85

Tested by

no test coverage detected