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
This commit is contained in:
39
models/Events.ts
Normal file
39
models/Events.ts
Normal file
@@ -0,0 +1,39 @@
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user