Skip to main content
Version: v0.0.4

Function: invertGem()

invertGem(map): never

Refuse to invert a directional GEM map. Always throws FATAL_CODES.TERM_MAP_NOT_INVERTIBLE.

The never-invert invariant made explicit and discoverable: a forward GEM (9→10) is not the inverse of the backward GEM (10→9) - CMS ships them as separate artifacts and "forward and backward mappings are not simply the reverse". To resolve the other direction, load the other file with loadGems; the engine never synthesizes an inverse.

Parameters

map

GemMap

The map an inversion was (incorrectly) requested for.

Returns

never

Never - always throws.

Throws

TERM_MAP_NOT_INVERTIBLE, always.

Example

import { loadGems, invertGem } from "@cosyte/terminology";

const gems = loadGems({ direction: "9-to-10", content: "0010 A000 00000\n" });
invertGem(gems); // throws TERM_MAP_NOT_INVERTIBLE