GOTS
28
A little transpiler to generate interface types from go struct types
About this project
A little transpiler to generate interface types from go struct types GOTS is a tool that generates TypeScript interfaces from Go struct definitions (transpiler). It supports embedded types, custom types, and third-party package types. This project is built to work with Go Modules and leverages go/parser and go/types for analysis and type-checking. Installation Clone the repository: Install the deps:\ Build the project: Or use Makefile: Run the project: Usage Source file Specify the Go source file that contains the struct definitions. Source folder Specify the Go source directory that contains the struct definitions. Custom config file Specify the custom configuration file for the third party types. Activate recursive mode Specify the recursive mode to transpile all the files in the folder. Example Features Checklist ✅ Implemented Features [x] Generate TypeScript Interfaces Transpiles Go structs into TypeScript interfaces. [x] Embedded and Custom Types Supports Go embedded structs and custom types. [x] External Types from Go Modules Handles third-party package types. [x] Optional Fields for Pointer Types Pointer fields in Go are translated into optional fields in TypeScript.
From the project README on GitHub
- Stars
- 28
- Forks
- 1
- License
- MIT
- Last push
- 1 Feb 2025
Add this badge to your README
Show that your project is listed on Made in Algeria.
[](https://www.madeinalgeria.dev/projects/gots)