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

Function formatSelectorFailure

src/daemon/selectors-resolve.ts:82–94  ·  view source on GitHub ↗
(
  chain: SelectorChain,
  diagnostics: SelectorDiagnostics[],
  options: { unique?: boolean },
)

Source from the content-addressed store, hash-verified

80}
81
82export function formatSelectorFailure(
83 chain: SelectorChain,
84 diagnostics: SelectorDiagnostics[],
85 options: { unique?: boolean },
86): string {
87 if (diagnostics.length === 0) {
88 return `Selector did not match: ${chain.raw}`;
89 }
90 const summary = diagnostics.map((entry) => `${entry.selector} -> ${entry.matches}`).join(', ');
91 return (options.unique ?? true)
92 ? `Selector did not resolve uniquely (${summary})`
93 : `Selector did not match (${summary})`;
94}
95
96function analyzeSelectorMatches(
97 nodes: SnapshotState['nodes'],

Callers 4

isCommandFunction · 0.90
resolveSelectorNodeFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected