Expand description
Writing a universe out as TypeScript.
Structs become interfaces, inheritance becomes extends, and an enum
becomes a discriminated union tagged the way the wire tags it. Nothing here
invents a representation: what a generated interface describes is exactly
what arrives over a pipe, which is what lets a TypeScript proof and a Rust
proof of the same proposition agree without either being told about the
other.
Generic declarations and signatures keep their parameters, and a bound
becomes extends: TypeScript is structural, so T extends Named says what
the bound says, and several bounds are one intersection.
Structs§
- Type
Script - The TypeScript backend.
Functions§
- literal
- Writes a value as a TypeScript literal.