Amend dynamic imports

This commit is contained in:
2025-07-15 11:04:21 +02:00
parent bb114f16e0
commit 79814b18b1
21 changed files with 203 additions and 98 deletions

View File

@@ -1,14 +1,12 @@
import type {
Card,
CardType,
MonsterCard, MonsterCardSubType,
MonsterCard,
MonsterCardType,
SpellCard, SpellCardType,
TrapCard, TrapCardType
} from "../api/openapi";
type CardSubTypes = MonsterCardType | TrapCardType | SpellCardType
export const getCardType = (card: Card) => {
switch (card.cardType) {
case "MONSTER":
@@ -26,14 +24,6 @@ export const isMonsterCard = (card: Card): card is MonsterCard => {
return card.cardType === "MONSTER"
}
export const isTrapCard = (card: Card): card is TrapCard => {
return card.cardType === "TRAP"
}
export const isSpellCard = (card: Card): card is SpellCard => {
return card.cardType === "SPELL"
}
export const getMonsterCardType = (monsterCard: MonsterCard) => {
return `${monsterCard.type} MONSTER `
}