GO Online Toolset
home
search
To Boss

Go Struct to TypeScript tool
57  |   |   |  1

🛠 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 TypeTypeScript Type
stringstring
int / int64number
float32 / float64number
boolboolean
[]TT[]
TT
otherstring

📝 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[];
}