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
| Name | Type | Description |
|---|---|---|
code | 0 | 1 | 2 | 0 when all went well, 1 when what was asked for could not be done, 2 when the command itself was wrong. |
out | string | For standard output. |
err | string | 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)