helperOffunctionfunction helperOf(dialect: HostDialect): HelperThe helper of a dialect.
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; // 64helperOffunctionfunction helperOf(dialect: HostDialect): HelperThe helper of a dialect.
Helpertypeno test imports ittype 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 ittype HostDialect = { readonly kind: "posix" };The shell language of a host: a closed union with one member today.
POSIXconstconst POSIX: HostDialectThe posix dialect.