{"id":14156644,"url":"https://github.com/inngest/cuetypescript","last_synced_at":"2025-08-06T03:31:00.272Z","repository":{"id":43413240,"uuid":"463679168","full_name":"inngest/cuetypescript","owner":"inngest","description":"Converts Cue types to TypeScript types and vice-versa.","archived":true,"fork":false,"pushed_at":"2023-09-06T19:14:10.000Z","size":72,"stargazers_count":15,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-08T21:16:49.854Z","etag":null,"topics":["cue","cuelang","typescript","typescript-type-tool","typescript-types"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/inngest.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}},"created_at":"2022-02-25T21:22:49.000Z","updated_at":"2024-11-02T08:23:38.000Z","dependencies_parsed_at":"2024-03-30T22:31:55.247Z","dependency_job_id":"3ba73778-1f34-48d2-9cd9-691cfaa52043","html_url":"https://github.com/inngest/cuetypescript","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inngest%2Fcuetypescript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inngest%2Fcuetypescript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inngest%2Fcuetypescript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inngest%2Fcuetypescript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/inngest","download_url":"https://codeload.github.com/inngest/cuetypescript/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228835541,"owners_count":17979163,"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":["cue","cuelang","typescript","typescript-type-tool","typescript-types"],"created_at":"2024-08-17T08:07:31.564Z","updated_at":"2024-12-09T04:30:44.852Z","avatar_url":"https://github.com/inngest.png","language":"Go","funding_links":[],"categories":["typescript"],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eCue + TypeScript\u003c/h1\u003e\n\u003cbr /\u003e\n\n**This package converts Cue types to TypeScript types, and soon vice-versa.**\n\nCue is a concise language for defining types and constraints in one file.  It's\nbest practice to have a single source of truth for your types.  This package\nallows you to convert your Cue types to TypeScript for the frontend.\n\n### Usage\n\nThis is a library for converting cue types, intended for use within a go\napplication.  Run the following command to install the package:\n\n```\ngo get github.com/inngest/cuetypescript\n```\n\n## Examples\n\n\n\u003ctable\u003e\n\u003ctr\u003e\u003cth\u003eCUE\u003c/th\u003e\u003cth\u003eTypeScript\u003c/th\u003e\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\n\n```cue\n#Post: {\n\tid:        string\n\tslug:      string\n\ttitle:     string\n\tsubtitle?: string\n\trating:    float \u0026 \u003c=5\n\tcategory:  \"tech\" | \"finance\" | \"hr\"\n\ttags: [...string]\n\treferences: [...{\n\t\tslug:  string\n\t\ttitle: string\n\t}]\n}\n```\n\n\u003c/td\u003e\n\u003ctd\u003e\n\n```typescript\nexport const Category = {\n  TECH: \"tech\",\n  FINANCE: \"finance\",\n  HR: \"hr\",\n} as const;\nexport type Category = typeof Category[keyof typeof Category];\n\nexport interface Post {\n  id: string;\n  slug: string;\n  title: string;\n  subtitle?: string;\n  rating: number;\n  category: Category;\n  tags: Array\u003cstring\u003e;\n  references: Array\u003c{\n    slug: string;\n    title: string;\n  }\u003e;\n};\n```\n\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n## Features\n\n- Interface generation\n- Type conversion and support\n- Nested struct support\n- Union support\n- \"Best practice\" enum generation.  We create enums with both `const` and `type` values, allowing you to properly reference enum values via eg. `Category.TECH`.\n\nIn the future, we plan on adding:\n\n- Function generation for checking and validating Cue constraints\n- Default value generation and constructors\n- Typescript to Cue support\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finngest%2Fcuetypescript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finngest%2Fcuetypescript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finngest%2Fcuetypescript/lists"}