@henrychien/value-semantics
v2.0.0
Published
Shared runtime types and formatters for canonical value semantics
Readme
@henrychien/value-semantics
TypeScript mirror of packages/value-semantics-core. Consumed as raw .ts via the
root package.json file: dependency — no build step.
| File | Role |
|---|---|
| src/generated.ts | Generated, do not edit — kind/scale/basis enums, ISO codes, decimal-wire and unit-label patterns, NumericDisplaySpec/Quantity/PeriodRef types |
| src/numericDisplay.ts | Hand-written port: parseNumericDisplaySpec, toDisplayValue, renderDisplay, normalizeDeclaredNumeric, formatDateDisplay, and the PY_GLYPHS/TS_GLYPHS tables |
| src/types.ts | GlyphTable interface consumed by renderDisplay |
| src/index.ts | Re-exports all three |
Regenerate: npm run generate (check-only: npm run generate:check). The repo root
runs the same check as npm run value-semantics:check on every prebuild.
The generation commands require the sibling value-semantics-core package and
the Hank-monorepo generator at
scripts/generate_value_semantics_typescript.py. The corresponding consumer
parity test is tests/taskpane/value-semantics-numeric-display.test.js in that
monorepo. Published consumers use the checked-in src/generated.ts and do not
need either repository path.
