Targets · TypeScript · Naming considerations
A Program name nests to any depth — Ui.Button.Integer.Increment . This page is how that dotted name is carried into TypeScript, at both the value and the type level.
How a Program becomes TypeScript, in parts. Start with the introduction, then follow each part into the rendered output and the runtime it links against.
Like JavaScript, the dotted name is kept exactly as written — and because TypeScript has real namespace s, the same path works as a type too.
Idiomatic TypeScript today leans on ES modules and named imports rather than namespace , which would discard the dotted shape. But TypeScript never removed namespaces, and they are exactly the right tool for mirroring Program's tree.
Each namespace segment becomes a nested TypeScript namespace ; the leaf is an export inside it. This gives a genuine dotted path at both levels: a function call and a type reference read the same as in Program, and the compiler resolves them natively.
A built-in value type folds to a native annotation instead of a namespace — Maths.Integer is number , Text is string . A record TYPE you define is a class named by its dotted path.
Use nested namespace s directly. It is the one target where the dotted name survives at both the value and the type level with no compromise; the tradeoff is only that the output uses a feature some style guides discourage, which is a fair price for names that match the source exactly. The only identifiers ever rewritten are ordinary variables that collide with a reserved word .