import { FrcsSurveyFile, InvalidFrcsSurveyFile, ParseFrcsSurveyFileOptions, } from './FrcsSurveyFile' import { Unit, Length, Angle, UnitizedNumber } from '@speleotica/unitized' import { ParseIssue } from '../ParseIssue' import { SourceLoc } from '../SourceLoc' export type JsonLengthUnit = 'm' | 'km' | 'cm' | 'ft' | 'mi' | 'yd' | 'in' export type JsonAngleUnit = 'rad' | 'deg' | 'grad' | 'mil' | '%' export type JsonLength = [number, JsonLengthUnit] export type JsonAngle = [number, JsonAngleUnit] export type DeepMapJson = T extends | string | number | boolean | undefined | ParseIssue | SourceLoc ? T : T extends Date ? string : T extends readonly (infer E)[] ? DeepMapJson[] : T extends Unit ? JsonLengthUnit : T extends Unit ? JsonAngleUnit : T extends UnitizedNumber ? JsonLength : T extends UnitizedNumber ? JsonAngle : { [K in keyof T]: DeepMapJson } export type FrcsSurveyFileJson = DeepMapJson export type InvalidFrcsSurveyFileJson = DeepMapJson export type ParseFrcsSurveyFileOptionsJson = DeepMapJson