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
40 lines
805 B
TypeScript
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
|
|
}
|