| | |
🛠 Overview
This tool converts Go struct
definitions into TypeScript interfaces or types. It supports basic types, arrays, maps, nested structs, and json
tags.
✅ Supported Go Types
Go Type | TypeScript Type |
---|---|
string | string |
int / int64 | number |
float32 / float64 | number |
bool | boolean |
[]T | T[] |
T | T |
other | string |
📝 Example
Input Go Struct:
type User struct {
ID int `json:"id"`
Name string `json:"name"`
Email string `json:"email"`
CreatedAt time.Time `json:"created_at"`
Tags []string `json:"tags"`
}
Output TypeScript Interface:
interface User {
id: number;
name: string;
email: string;
created_at: string;
tags: string[];
}