( value: string | undefined, label: LocationCoordinateLabel, )
| 10 | type LocationCoordinateInput = Partial<LocationCoordinates> | undefined; |
| 11 | |
| 12 | export 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 | |
| 22 | export function requireLocationCoordinates(options: LocationCoordinateInput): LocationCoordinates { |
| 23 | return { |
no test coverage detected