Skip to the content

Dominoドミノ

Deal seeded dominoes, play Mexican Train with native rules and computers, and replay a saved game.

Domino is the Japanese borrowed word ドミノ for dominoes. About the name

Contents

Reference · Tiles, Mexican Train and replay

CliResulttype

What the command line came to.

Import it

import type { CliResult } from "@johnmorrisdotca/domino";

Definition

type CliResult = {
    code: 0 | 1 | 2;
    out: string;
    err: string;
};

Members

NameTypeDescription
code0 | 1 | 2

0 when all went well, 1 when what was asked for could not be done, 2 when the command itself was wrong.

outstring

For standard output.

errstring

For standard error.

Examples

import type { CliResult } from "@johnmorrisdotca/domino";
import { runCli } from "@johnmorrisdotca/domino";

const value: CliResult = runCli(["--version"]);
console.log(value);
{ code: 0, out: '1.1.4\n', err: '' }

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/domino 1.1.4.