owltide/shared/utils/luxon.ts

16 lines
439 B
TypeScript
Raw Normal View History

/*
SPDX-FileCopyrightText: © 2025 Hornwitser <code@hornwitser.no>
SPDX-License-Identifier: AGPL-3.0-or-later
*/
// 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 }