diff --git a/src/constants/card.ts b/src/constants/card.ts index 87b77a3..ad43dd3 100644 --- a/src/constants/card.ts +++ b/src/constants/card.ts @@ -1,11 +1,13 @@ -export const SUIT = { +import { RankType, SuitType } from '@/types/card' + +export const SUIT: Record = { HEARTS: 'hearts', DIAMONDS: 'diamonds', CLUBS: 'clubs', SPADES: 'spades', } -export const RANK = { +export const RANK: Record = { TWO: '2', THREE: '3', FOUR: '4', @@ -21,8 +23,8 @@ export const RANK = { ACE: 'A', } -export const SUITS = [SUIT.HEARTS, SUIT.DIAMONDS, SUIT.CLUBS, SUIT.SPADES] -export const RANKS = [ +export const SUITS: SuitType[] = [SUIT.HEARTS, SUIT.DIAMONDS, SUIT.CLUBS, SUIT.SPADES] +export const RANKS: RankType[] = [ RANK.TWO, RANK.THREE, RANK.FOUR,