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

Function requiredString

src/commands/command-input.ts:358–364  ·  view source on GitHub ↗
(record: Record<string, unknown>, key: string)

Source from the content-addressed store, hash-verified

356}
357
358function requiredString(record: Record<string, unknown>, key: string): string {
359 const value = record[key];
360 if (typeof value !== 'string' || value.length === 0) {
361 throw new Error(`Expected ${key} to be a non-empty string.`);
362 }
363 return value;
364}
365
366function optionalString(record: Record<string, unknown>, key: string): string | undefined {
367 const value = record[key];

Callers 2

readInteractionTargetFunction · 0.70
readElementTargetFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…