Documentation
¶
Overview ¶
Package tsrender generates TypeScript source code from the Go-oriented intermediate representation produced by the transform package. It outputs .ts files containing interfaces, enums, enum name mappings, and (later) validation metadata.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TSFile ¶
func TSFile(gf transform.GoFile, registry TypeRegistry) ([]byte, error)
TSFile generates a complete TypeScript file from a GoFile intermediate representation. The returned bytes are ready to write to disk as a .pb.ts file. The registry maps Go type names to their source .pb.ts output file name, used to generate ES module import statements for cross-file references.
Types ¶
type TypeRegistry ¶
TypeRegistry maps Go type names to their source .pb.ts output file name. Used to generate ES module import statements for cross-file type references.