Amend dynamic imports
This commit is contained in:
@@ -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 `
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user