Skip to main content

Module export_ts

Module export_ts 

Source
Expand description

In-memory TS-binding rendering, shared by bin/export-ts.rs (which writes it to packages/yah/workload-spec/index.ts) and tests/ts_drift.rs (which compares render’s output against that committed file without writing anything or touching git — R605-B28).

render used to be inlined in bin/export-ts.rs’s main, which made “is the committed file what the Rust types imply” undecidable except by a git diff against HEAD — a question the drift guard actually needed to answer without going through git at all (R605-B28’s fix on the sibling .yah/schema/*.toml.schema.json guard, xtask::schemas::render_all, is the pattern this mirrors).

Constants§

HEADER

Functions§

render
Render the full single-file TS binding for WorkloadSpec and every type it references, in the same fixed leaves-first order bin/export-ts.rs always wrote. Pure — no filesystem access.