Calendar/src/types/EventTypes.ts

33 lines
567 B
TypeScript
Raw Normal View History

/**
* Type definitions for calendar events
*/
export interface AllDayEvent {
id: string;
title: string;
start: Date | string;
end: Date | string;
allDay: true;
color?: string;
metadata?: {
color?: string;
category?: string;
location?: string;
};
}
export interface TimeEvent {
id: string;
title: string;
start: Date | string;
end: Date | string;
allDay?: false;
color?: string;
metadata?: {
color?: string;
category?: string;
location?: string;
};
}
export type CalendarEventData = AllDayEvent | TimeEvent;