owltide/shared/utils/luxon.ts

12 lines
324 B
TypeScript
Raw Normal View History

// 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 }