Files
leim-tools/models/Events.ts
Alexis 5772ab7aa3 Base nuxt move after refactoring until no warnings
There still exists an issue with one Adobe led library ; @international-dates don't seem to compile their sourcemaps correctly.
I don't think this is something I can fix however, and it may require hacks and workarounds to solve from what I've gathered
2024-05-12 22:11:28 +02:00

40 lines
805 B
TypeScript

import type { LeimDate } from './Date'
export interface CalendarEvent {
title: string
startDate: LeimDate
endDate?: LeimDate
description?: string
category?: CalendarEventCategory
secondaryCategories?: CalendarEventCategory[]
hidden?: boolean
wiki?: string
}
export const calendarEventCategories = [
'naissance',
'mort',
'catastrophe',
'législation',
'catastrophe naturelle',
'inauguration',
'religion',
'invention',
'science',
'bénédiction',
'joueurs',
'découverte',
'exploration',
'construction',
'arcanologie',
'criminalité',
'scandale',
'commerce'
] as const
export type CalendarEventCategory = (typeof calendarEventCategories)[number]
export function isCalendarEvent(object: any): object is CalendarEvent {
return 'startDate' in object
}