{"id":26552097,"url":"https://github.com/go-generalize/go2ts","last_synced_at":"2025-03-22T08:23:45.924Z","repository":{"id":38322311,"uuid":"297261819","full_name":"go-generalize/go2ts","owner":"go-generalize","description":null,"archived":false,"fork":false,"pushed_at":"2024-04-05T03:27:43.000Z","size":176,"stargazers_count":23,"open_issues_count":4,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-21T21:34:27.709Z","etag":null,"topics":["go","typescript"],"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/go-generalize.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-09-21T07:28:43.000Z","updated_at":"2024-10-20T17:05:11.000Z","dependencies_parsed_at":"2024-06-21T02:13:12.705Z","dependency_job_id":"c04a3cfb-28db-4f03-aebf-6cfb45e64021","html_url":"https://github.com/go-generalize/go2ts","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-generalize%2Fgo2ts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-generalize%2Fgo2ts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-generalize%2Fgo2ts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-generalize%2Fgo2ts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/go-generalize","download_url":"https://codeload.github.com/go-generalize/go2ts/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244926920,"owners_count":20533212,"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":["go","typescript"],"created_at":"2025-03-22T08:23:45.282Z","updated_at":"2025-03-22T08:23:45.914Z","avatar_url":"https://github.com/go-generalize.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go2ts\n[![PkgGoDev](https://pkg.go.dev/badge/go-generalize/go2ts)](https://pkg.go.dev/github.com/go-generalize/go2ts)\n\n## What is go2ts?\n- go2ts is a TypeScript interface generator from Go struct.\n- Automatically recognize the Go module in the directory\n\n## Installation\n```console\n$ go get github.com/go-generalize/go2ts\n```\n\n## Usage\n\n```go\n// ./example/main.go\npackage main\n\nimport (\n    \"time\"\n)\n\ntype Status string\n\nconst (\n    StatusOK Status = \"OK\"\n    StatusFailure Status = \"Failure\"\n)\n\ntype Param struct {\n    Status    Status\n    Version   int\n    Action    string\n    CreatedAt time.Time\n}\n```\n\n```console\n$ go2ts ./example\nexport type Param = {\n        Action: string;\n        CreatedAt: string;\n        Status: \"Failure\" | \"OK\";\n        Version: number;\n}\n```\n\n## Known Issues\n- [#18](https://github.com/go-generalize/go2ts/issues/18): enums in indirectly parsed packages are not recognized.\n\n## TODO\n- Handle MarshalJSON/UnmarshalJSON\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgo-generalize%2Fgo2ts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgo-generalize%2Fgo2ts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgo-generalize%2Fgo2ts/lists"}