IF Commons GitHub

dialect

Written to: 1 requirement: 1 proved, 0 partly, 0 failing, 0 with no test recorded. 0002-anyfs-ssh-helper FR-002

The dialects of the helper, as a closed union: the language of the shell on the host. The posix dialect is a script for any shell of POSIX; a dialect for the hosts that have PowerShell is a later member of the union, and a function that takes a HostDialect states every case, so adding it is a compile error where a case is missing and nowhere else.

import { helperOf, POSIX } from "./dialect.ts";
helperOf(POSIX).sha256.length; // 64

Source: commons/anyfs-ssh/src/dialect.ts

2 of 4 exports are imported by a test of the run. A test that imports an export may not call it or check what it returns.

helperOffunction
function helperOf(dialect: HostDialect): Helper

The helper of a dialect.

Imported by 5 tests of the run (5 passed, 0 failed): the library's results

Helpertypeno test imports it
type Helper = { readonly dialect: HostDialect; readonly text: string; readonly sha256: string; readonly shell: string };

A helper: the script that runs on the host, its SHA-256 in hex and the program that runs it.

HostDialecttypeno test imports it
type HostDialect = { readonly kind: "posix" };

The shell language of a host: a closed union with one member today.

POSIXconst
const POSIX: HostDialect

The posix dialect.

Imported by 5 tests of the run (5 passed, 0 failed): the library's results

Titles, headings, exports, tables, columns and requirements. Esc closes.