problemOffunctionno test imports itfunction problemOf(code: ProblemCode, message: string, fix?: string | undefined): ProblemA problem of a code, with the message of the run and the fix of the catalogue unless one is given.
How a verb ends (commons anyfs-cli 0003-anyfs-cli-logical FR-010): a run that did what was asked, a run that found something (a name that is not there, two files that differ), a command line that does not fit, and a computer that cannot do it are four endings with four exit names, and each problem has the code of the catalogue and the command that fixes it. Pure functions of their arguments.
import { finding, usage } from "./outcomes.ts";
usage("ls takes a place").exit; // "usage"
finding("E-FILESYSTEM", "ENOENT /a: no such name").problems[0]?.code; // "E-FILESYSTEM"problemOffunctionno test imports itfunction problemOf(code: ProblemCode, message: string, fix?: string | undefined): ProblemA problem of a code, with the message of the run and the fix of the catalogue unless one is given.
findingfunctionfunction finding(code: ProblemCode, message: string, fix?: string | undefined): OutcomeA run that found something, which is a result and not a failure of the program: exit findings.
usagefunctionfunction usage(message: string, fix?: string): OutcomeA run whose command line does not fit what the verb takes: exit usage.
environmentfunctionfunction environment(code: ProblemCode, message: string, fix?: string | undefined): OutcomeA run that cannot be made on this computer: exit environment.