MCPcopy Index your code
hub / github.com/callstack/agent-device / toDaemonFindData

Function toDaemonFindData

src/daemon/selector-recording.ts:21–33  ·  view source on GitHub ↗
(result: Record<string, unknown>)

Source from the content-addressed store, hash-verified

19}
20
21export function toDaemonFindData(result: Record<string, unknown>): Record<string, unknown> {
22 if (result.kind === 'found') {
23 return {
24 found: true,
25 ...(typeof result.waitedMs === 'number' ? { waitedMs: result.waitedMs } : {}),
26 };
27 }
28 return {
29 ...(typeof result.ref === 'string' ? { ref: result.ref } : {}),
30 ...(typeof result.text === 'string' ? { text: result.text } : {}),
31 ...(result.node && typeof result.node === 'object' ? { node: result.node } : {}),
32 };
33}
34
35export function buildGetRecordResult(
36 result: Record<string, unknown>,

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected