{"id":51308028,"url":"https://github.com/dozro/ts-golike-errors","last_synced_at":"2026-07-05T05:00:42.792Z","repository":{"id":368037304,"uuid":"1283270766","full_name":"dozro/ts-golike-errors","owner":"dozro","description":null,"archived":false,"fork":false,"pushed_at":"2026-06-29T13:33:35.000Z","size":163,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-07-01T01:32:16.351Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dozro.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-28T18:31:07.000Z","updated_at":"2026-06-29T13:33:38.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/dozro/ts-golike-errors","commit_stats":null,"previous_names":["dozro/ts-golike-errors"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dozro/ts-golike-errors","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dozro%2Fts-golike-errors","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dozro%2Fts-golike-errors/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dozro%2Fts-golike-errors/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dozro%2Fts-golike-errors/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dozro","download_url":"https://codeload.github.com/dozro/ts-golike-errors/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dozro%2Fts-golike-errors/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35029796,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-02T02:00:06.368Z","response_time":173,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2026-07-01T01:30:51.907Z","updated_at":"2026-07-02T02:00:36.281Z","avatar_url":"https://github.com/dozro.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Go-like errors\n\na foolish approach to error handling utilizing typescript.\n\n## examples\n\n```typescript\nconst result: Result\u003cnumber, string\u003e = {\n   success: true,\n   data: 42,\n};\n\nif (result.success) {\n    // result is { success: true; data: number }\n    console.log(result.data);\n} else {\n    // result is { success: false; error: string }\n    console.error(result.error);\n}\n```\n\nor \n\n```typescript\ntype ParseError = {\n    code: \"INVALID_JSON\";\n    message: string;\n};\n\nfunction parseJson(text: string): Result\u003cunknown, ParseError\u003e {\n    try {\n        return {\n            success: true,\n            data: JSON.parse(text),\n        };\n    } catch {\n        return {\n            success: false,\n            error: {\n                code: \"INVALID_JSON\",\n                message: \"Failed to parse JSON.\",\n            },\n        };\n    }\n }\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdozro%2Fts-golike-errors","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdozro%2Fts-golike-errors","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdozro%2Fts-golike-errors/lists"}