croupier
Version:
A library written in Typescript to create and handle a deck of playing cards
10 lines (9 loc) • 408 B
TypeScript
export declare const suits: readonly ["diamonds", "spades", "hearts", "clubs"];
export type Suit = typeof suits[number];
export declare const ranks: readonly ["two", "three", "four", "five", "six", "seven", "eight", "nine", "ten", "jack", "queen", "king", "ace"];
export type Rank = typeof ranks[number];
export default class Card {
suit: Suit;
rank: Rank;
constructor(suit: Suit, rank: Rank);
}