A CLI tool to examine Go type structures, interfaces, and their transitive dependencies, and export them as TypeScript declarations.
Typex is a CLI tool that examines Go type structures, interfaces, and their transitive dependencies across packages. It generates a visual hierarchy tree and exports these types as TypeScript declarations, either as bare types or value object classes, facilitating interoperability between Go and TypeScript codebases.
Go developers working in polyglot environments who need to share type definitions with TypeScript frontends or APIs, and developers maintaining Go libraries with TypeScript clients.
It provides a straightforward, command-line driven way to analyze complex Go type relationships and automatically generate corresponding TypeScript definitions, reducing manual translation errors and saving development time.
[TOOL/CLI] - Filter and examine Go type structures, interfaces and their transitive dependencies and relationships. Export structural types as TypeScript value object or bare type representations.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Generates a clear tree view of Go type structures and dependencies, as shown in examples with the -f filter, making it easy to analyze complex relationships across packages.
Supports exporting to TypeScript as both bare type declarations (ts-type) and value object classes (ts-class), offering versatility for different frontend or API integration needs.
Allows filtering by name, path part, or regex, and includes options to handle unexported types and test files, enabling precise analysis of relevant code sections.
Enables regex-based substitution of fully qualified type names, such as pruning 'github.com' prefixes, for cleaner and more customizable TypeScript output.
Go channels, interfaces, and functions are omitted or mapped to TypeScript 'any', limiting accurate representation for codebases relying on these features, as admitted in the type mapping table.
All Go integer and float types export to TypeScript 'number', which is a float, potentially causing type safety issues with integer arithmetic, as highlighted in the documentation.
Heavily relies on Go's package management, leading to occasional internal errors on specific Go versions, with known issues reported for Go 1.14.6, affecting reliability.