import { DateRangeSelectValue, mapDateRangeSelectValueToDateRange as map } from '@prefecthq/prefect-design' import { MapFunction } from '@/services/Mapper' type Source = NonNullable type Target = NonNullable> export const mapDateRangeSelectValueToDateRange: MapFunction = (source) => { const value = map(source) if (!value) { throw new Error('Failed to map date range because value is null') } return value }