customer-riverside/web/modules/custom/riverside_pt/js/globals.d.ts

43 lines
1.1 KiB
TypeScript
Raw Normal View History

2026-06-14 00:55:30 -08:00
import type { Calendar } from "@fullcalendar/core";
2026-06-13 23:07:39 -08:00
2026-06-14 00:55:30 -08:00
declare global {
interface RiversidePtSettings {
eventsUrl: string;
storeSlotUrl: string;
bookingUrl?: string;
holidays: Record<string, boolean>;
scrollTo?: string;
}
2026-06-13 23:38:35 -08:00
2026-06-14 00:55:30 -08:00
interface RiversidePtEvent {
id: number | string;
title?: string;
start: string;
end: string;
startStr?: string;
}
2026-06-13 23:38:35 -08:00
2026-06-14 00:55:30 -08:00
interface ConfirmedAppointment {
start: string;
service: string;
firstName: string;
lastName: string;
email: string;
}
// FullCalendar is loaded as a UMD global. The Calendar constructor accepts
// any options object because plugin-specific options (e.g. dateClick from
// @fullcalendar/interaction) are not reflected in @fullcalendar/core types.
namespace FullCalendar {
const Calendar: new (el: HTMLElement, options?: Record<string, any>) => Calendar;
}
interface Window {
FullCalendar?: typeof FullCalendar;
rptScrollTo: (el: Element, animate?: boolean) => void;
drupalSettings?: {
riversidePt?: RiversidePtSettings;
};
}
}