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

Function readLocationCoordinate

src/utils/location-coordinates.ts:12–20  ·  view source on GitHub ↗
(
  value: string | undefined,
  label: LocationCoordinateLabel,
)

Source from the content-addressed store, hash-verified

10type LocationCoordinateInput = Partial<LocationCoordinates> | undefined;
11
12export function readLocationCoordinate(
13 value: string | undefined,
14 label: LocationCoordinateLabel,
15): number {
16 if (value === undefined || value.trim() === '') {
17 throw new AppError('INVALID_ARGS', `settings location set requires ${label}`);
18 }
19 return validateLocationCoordinate(Number(value), label);
20}
21
22export function requireLocationCoordinates(options: LocationCoordinateInput): LocationCoordinates {
23 return {

Callers 2

handleSettingsCommandFunction · 0.90

Calls 1

Tested by

no test coverage detected