Cardtype
A card as an object: its suit and its rank.
Import it
import type { Card } from "@johnmorrisdotca/toranpu/deck";
Definition
type Card = {
suit: Suit;
rank: Rank;
};
Members
| Name | Type | Description |
|---|---|---|
suit | Suit | |
rank | Rank |
Examples
import type { Card } from "@johnmorrisdotca/toranpu/deck";
import { cardId } from "@johnmorrisdotca/toranpu/deck";
const value: Card = { suit: "spades", rank: 1 };
console.log(cardId(value));ASWhat it prints (run when this page was built)