{"id":21977358,"url":"https://github.com/zmitry/go2typings","last_synced_at":"2025-04-28T16:43:13.274Z","repository":{"id":56691447,"uuid":"218152919","full_name":"zmitry/go2typings","owner":"zmitry","description":"convert golang structs to typescript interfaces or swagger spec","archived":false,"fork":false,"pushed_at":"2020-10-24T22:59:32.000Z","size":60,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-30T11:24:06.008Z","etag":null,"topics":["golang","typescript","typings"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zmitry.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-10-28T21:58:17.000Z","updated_at":"2024-07-14T10:21:33.000Z","dependencies_parsed_at":"2022-08-15T23:20:59.346Z","dependency_job_id":null,"html_url":"https://github.com/zmitry/go2typings","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zmitry%2Fgo2typings","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zmitry%2Fgo2typings/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zmitry%2Fgo2typings/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zmitry%2Fgo2typings/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zmitry","download_url":"https://codeload.github.com/zmitry/go2typings/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251347772,"owners_count":21575145,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["golang","typescript","typings"],"created_at":"2024-11-29T16:14:25.602Z","updated_at":"2025-04-28T16:43:13.255Z","avatar_url":"https://github.com/zmitry.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Golang structs to typescript typings convertor\n\n## Example\n\n[example.main.go](https://github.com/zmitry/go2typings/blob/master/example/main.go)\n\n## How to setup\n\n- create go file with the code bellow\n- run this code with `go run`\n\n```golang\npackage main\n\nimport (\n  \"github.com/zmitry/go2ts\"\n   // you can use your own\n  \"github.com/zmitry/go2ts/example/types\"\n)\n\ntype Root struct {\n\tUser types.User\n\tT    types.T\n}\n\nfunc main() {\n\ts := go2ts.New()\n\ts.Add(types.T{})\n\ts.Add(types.User{})\n\n\terr := s.GenerateFile(\"./test.ts\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n}\n```\n\n# Custom tags\n\nwe support custom tag `ts` it has the following syntax\n\n```\ntype M struct {\n\tUsername string `json:\"Username2\" ts:\"string,optional\"`\n}\n```\n\ntsTag type\n\n```\ntsTag[0] = \"string\"|\"date\"|\"-\"\ntsTag[1] = \"optional\"|\"no-null\"|\"null\"\n```\n\nsee field.go for more info\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzmitry%2Fgo2typings","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzmitry%2Fgo2typings","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzmitry%2Fgo2typings/lists"}