{"id":20565733,"url":"https://github.com/phenax/ts-types-runtime","last_synced_at":"2025-06-15T14:13:00.378Z","repository":{"id":65182355,"uuid":"585556137","full_name":"phenax/ts-types-runtime","owner":"phenax","description":"A runtime for typescript's type system that turns it into a general purpose, purely functional programming language with effects!","archived":false,"fork":false,"pushed_at":"2023-01-15T10:57:21.000Z","size":176,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-18T14:50:58.926Z","etag":null,"topics":["effects","functional-programming","type-level-programming","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/phenax.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":"2023-01-05T13:26:21.000Z","updated_at":"2023-03-04T05:16:17.000Z","dependencies_parsed_at":"2023-02-09T22:00:38.966Z","dependency_job_id":null,"html_url":"https://github.com/phenax/ts-types-runtime","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/phenax%2Fts-types-runtime","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phenax%2Fts-types-runtime/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phenax%2Fts-types-runtime/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phenax%2Fts-types-runtime/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phenax","download_url":"https://codeload.github.com/phenax/ts-types-runtime/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242179251,"owners_count":20084940,"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":["effects","functional-programming","type-level-programming","typescript"],"created_at":"2024-11-16T04:38:52.177Z","updated_at":"2025-03-06T08:44:24.472Z","avatar_url":"https://github.com/phenax.png","language":"TypeScript","readme":"# TS Types lang\nA runtime for typescript's **type system** that turns it into a **general purpose**, **purely functional** programming language with effects!\n\n\n## Documentation\n- [stdlib reference](./docs/modules.md)\n- [examples](./examples/)\n\n\n## Implemented effects\n  * read/write file\n  * simple stdio interactions\n  * error handling\n  * test runner\n  * mutable references\n  * js ffi\n  * get cli args, env vars\n\n\n## Example\n\nTake a look at the [./examples](./examples/) directory for more examples on how to write a program in typescript types\n\n```typescript\nimport { Bind, Do, Kind1 } from 'ts-types-lang/stdlib/effect'\nimport { WriteFile } from 'ts-types-lang/stdlib/fs'\nimport { PutString, ReadLine, PutStringLn } from 'ts-types-lang/stdlib/stdio'\n\nexport type main = [\n  PutStringLn\u003c'Greetotron 6000 initializing...'\u003e,\n  PutStringLn\u003c''\u003e,\n\n  PutString\u003c'Your name? '\u003e,\n  Bind\u003cReadLine, \u003cname extends string\u003e() =\u003e\n    PutStringLn\u003c`Hello, ${name}`\u003e\u003e,\n\n  PutString\u003c'Your purpose in life? '\u003e,\n  Bind\u003cReadLine, HandleResponseK\u003e,\n\n  PutStringLn\u003c'Bye bye'\u003e,\n]\n\n// :: string -\u003e Effect ()\ninterface HandleResponseK extends Kind1\u003cstring, Effect\u003e {\n  return: Do\u003c[\n    PutStringLn\u003c`Interesting that you believe \"${this['input']}\" is your purpose. Hmmmm...`\u003e,\n    PutStringLn\u003c'Judging harshly...'\u003e,\n    PutStringLn\u003c'Saving response...'\u003e,\n    WriteFile\u003c'./response.txt', this['input']\u003e,\n  ]\u003e\n}\n```\n\n\n## Run a types-lang module\n\nInstall it -\n```bash\nnpm i --save ts-types-lang\n# OR\nyarn add ts-types-lang\n```\n\nOr just run it -\n```bash\nnpx tsr run ./examples/guess-number.ts\n# OR\nyarn exec tsr run ./examples/guess-number.ts\n```\n\n\n## FAQ\n\n#### Why?\nWhy not?\n\n#### How?\nWhy?\n\n#### What?\nWhat?\n\n#### Should I use this?\nNo\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphenax%2Fts-types-runtime","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphenax%2Fts-types-runtime","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphenax%2Fts-types-runtime/lists"}