GOTS
بواسطة @BelkacemYerfa
28
A little transpiler to generate interface types from go struct types
عن هذا المشروع
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.
من ملف README الخاص بالمشروع على GitHub
- النجوم
- 28
- التفريعات
- 1
- الرخصة
- MIT
- آخر تحديث
- 01/02/2025
أضف هذه الشارة إلى ملف README
أظهر أن مشروعك مُدرج على «صُنع في الجزائر».
[](https://www.madeinalgeria.dev/projects/gots)