{"id":24096439,"url":"https://github.com/exeteres/opc-types","last_synced_at":"2025-05-07T12:44:49.727Z","repository":{"id":40290551,"uuid":"231757852","full_name":"Exeteres/opc-types","owner":"Exeteres","description":"OpenComputers and TypeScript","archived":false,"fork":false,"pushed_at":"2022-12-12T13:47:37.000Z","size":619,"stargazers_count":21,"open_issues_count":8,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-07T07:42:17.677Z","etag":null,"topics":["opencomputers","openos","typescript","typings"],"latest_commit_sha":null,"homepage":"","language":null,"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/Exeteres.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2020-01-04T12:17:42.000Z","updated_at":"2024-12-17T02:59:23.000Z","dependencies_parsed_at":"2023-01-27T20:16:36.440Z","dependency_job_id":null,"html_url":"https://github.com/Exeteres/opc-types","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Exeteres%2Fopc-types","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Exeteres%2Fopc-types/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Exeteres%2Fopc-types/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Exeteres%2Fopc-types/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Exeteres","download_url":"https://codeload.github.com/Exeteres/opc-types/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252881320,"owners_count":21819146,"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":["opencomputers","openos","typescript","typings"],"created_at":"2025-01-10T12:32:04.323Z","updated_at":"2025-05-07T12:44:49.700Z","avatar_url":"https://github.com/Exeteres.png","language":null,"readme":"# OpenComputers and TypeScript\n\n\u003cdiv align=\"center\"\u003e\n\u003cimg src=\"https://gamepedia.cursecdn.com/minecraft_ru_gamepedia/f/f4/Корпус_компьютера1_(OpenComputers).png\" alt=\"TypeScriptToLua\" width=\"256\" /\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/TypeScriptToLua/TypeScriptToLua/master/logo-hq.png\" alt=\"TypeScriptToLua\" width=\"256\" /\u003e\n\u003c/div\u003e\n\n\u003cdetails open\u003e\n\u003csummary\u003eLanguage\u003c/summary\u003e\n\u003cbr\u003e\n\u003ca href=\"README.md\"\u003e\n\u003cimg alt=\"Build status\" src=\"https://img.shields.io/badge/english-red.svg?style=for-the-badge\" /\u003e\u003c/a\u003e\n\n\u003ca href=\"README.ru.md\"\u003e\n\u003cimg alt=\"Build status\" src=\"https://img.shields.io/badge/russian-red.svg?style=for-the-badge\" /\u003e\u003c/a\u003e\n\u003c/details\u003e\n\n## Introduction\n\nThis repository contains type declarations for [OpenOS](https://ocdoc.cil.li/) and [GUI](https://github.com/IgorTimofeev/GUI) (and also some of it dependencies).\n\nIt is assumed that you will use [TypeScriptToLua](https://github.com/TypeScriptToLua/TypeScriptToLua) as a transpiler.\n\nSome examples can be found in the `examples` folder. Also look at [VSCode extension](https://github.com/Exeteres/oc-ts-extension), which integrates TypeScript with OpenComputers.\n\n## Installation\n\n```shell\n# Typings for OpenOS\nyarn add @opct/openos # or npm install @opct/openos -S\n\n# Typings for MineOS\nyarn add @opct/mineos\n\n# Typings for GUI\nyarn add @opct/gui\n\n# TSTL\nyarn add typescript-to-lua\n```\n\n```json\n// tsconfig.json\n{\n    \"compilerOptions\": {\n        \"target\": \"esnext\",\n        \"outDir\": \"dist\",\n        \"module\": \"commonjs\",\n        \"lib\": [\"esnext\"],\n        \"strict\": true,\n        \"moduleResolution\": \"node\",\n        \"rootDir\": \"src\",\n        \"types\": [\n            \"lua-types/jit\",\n            \"@opct/openos\",\n            \"@opct/gui\",\n            \"@opct/mineos\"\n        ]\n    },\n    \"tstl\": {\n        \"luaTarget\": \"JIT\"\n    }\n}\n```\n\n## Setting up a comfortable working environment\n\n- You can use Visual Studio Code or any other editor with TypeScript support.\n- Instead of a real mod, you can use an emulator. Otherwise, it is necessary to set `filesystem.bufferChanges` to `false` in order to have external access to the disk.\n- Create a link to the disk to keep the source code separate from it:\n\n    ```shell\n    # linux / macos\n    ln -s /path/to/disk/home/app dist\n    ```\n\n    ```cmd\n    # windows (cmd)\n    mklink /j dist C:\\path\\to\\disk\\home\n    ```\n\n- Use `tstl --watch`\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexeteres%2Fopc-types","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fexeteres%2Fopc-types","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexeteres%2Fopc-types/lists"}