owltide/shared/utils/luxon.ts
Hornwitser bb450fd583 Refactor to use ClientSchedule on client
Use the ClientSchedule data structure for deserialising and tracking
edit state on the client instead of trying to directly deal with the
ApiSchedule type which is not build for ease of edits or rendering.
2025-06-14 19:22:53 +02:00

11 lines
324 B
TypeScript

// Wrapper around Luxon to make sure the throwOnInvalid option is set
import { DateTime, Duration, FixedOffsetZone, Info, Settings, Zone } from "luxon";
Settings.throwOnInvalid = true;
declare module 'luxon' {
interface TSSettings {
throwOnInvalid: true;
}
}
export { DateTime, Duration, FixedOffsetZone, Info, Zone }