Files
leim-tools/src/models/Characters.ts
2024-04-14 20:53:21 +02:00

20 lines
473 B
TypeScript

import type { LeimDate } from './Date'
export interface Character {
name: string
description?: string
birth?: LeimDate
death?: LeimDate
hiddenBirth?: boolean
hiddenDeath?: boolean
category?: CharacterCategory
secondaryCategories?: CharacterCategory[]
wiki?: string
}
export type CharacterCategory = 'joueur' | 'comte' | 'scientifique' | 'mage' | 'professeur'
export function isCharacter(object: any): object is Character {
return 'birth' in object
}