Reference · Tiles, layouts and deals
MahjongFacetype
One face of the set: its suit and its rank within it (1–9 for a suit, 1–4 or 1–3 for the rest).
Import it
import type { MahjongFace } from "@johnmorrisdotca/jarajara";
Definition
type MahjongFace = {
code: string;
suit: MahjongSuit;
rank: number;
};
Members
| Name | Type | Description |
|---|---|---|
code | string | |
suit | MahjongSuit | |
rank | number |
Examples
import { faceOf } from "@johnmorrisdotca/jarajara";
import type { MahjongFace } from "@johnmorrisdotca/jarajara";
const face = faceOf("a")!;
const value: MahjongFace = face;
console.log(value);{ code: 'a', suit: 'characters', rank: 1 }What it prints (run when this page was built)