gen-ts: a spec becomes TypeScript

You will learn

What gen-ts writes for constants and functions, and how a host program uses it.

t27c gen-ts turns each constant into an export const line that TypeScript type-checks. Functions are not emitted: the backend says it lowers declarations, not bodies. This is how this site uses specs: a generator reads a .t27 file and writes the numbers and words a page imports. The table under this lesson shows what gen-ts wrote for the lesson spec.

Open the interactive lesson →