{"id":13898153,"url":"https://github.com/ASDAlexander77/TypeScriptLua","last_synced_at":"2025-07-17T15:32:32.259Z","repository":{"id":57383861,"uuid":"144989535","full_name":"ASDAlexander77/TypeScriptLua","owner":"ASDAlexander77","description":"The TypeScriptLUA repo contains the complete source code implementation for TypeScript compiler for LUA bytecode","archived":false,"fork":false,"pushed_at":"2019-11-05T12:58:11.000Z","size":14200,"stargazers_count":60,"open_issues_count":0,"forks_count":9,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-05-01T17:22:35.797Z","etag":null,"topics":["binary","lua","typescript","typescript-compiler"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ASDAlexander77.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-08-16T13:11:37.000Z","updated_at":"2024-04-22T03:54:43.000Z","dependencies_parsed_at":"2022-09-14T00:52:45.159Z","dependency_job_id":null,"html_url":"https://github.com/ASDAlexander77/TypeScriptLua","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/ASDAlexander77%2FTypeScriptLua","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ASDAlexander77%2FTypeScriptLua/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ASDAlexander77%2FTypeScriptLua/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ASDAlexander77%2FTypeScriptLua/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ASDAlexander77","download_url":"https://codeload.github.com/ASDAlexander77/TypeScriptLua/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226274683,"owners_count":17598860,"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":["binary","lua","typescript","typescript-compiler"],"created_at":"2024-08-06T18:04:07.596Z","updated_at":"2024-11-25T04:30:51.863Z","avatar_url":"https://github.com/ASDAlexander77.png","language":"TypeScript","readme":"TypeScript for Lua\r\n===========================\r\n\r\nThe TypeScriptLua repo contains the complete source code implementation for TypeScript compiler for Lua bytecode.\r\n\r\nChat Room\r\n---------\r\n\r\nWant to chat with other members of the TypeScript for Lua community?\r\n\r\n[![Join the chat at https://gitter.im/ASDAlexander77/cs2cpp](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/TypeScriptLua/Lobby?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\r\n\r\nEngage, Contribute and Provide Feedback\r\n---------------------------------------\r\n\r\nSome of the best ways to contribute are to try things out, file bugs, and join in design conversations.\r\n\r\n\r\nLicense\r\n-------\r\n\r\nTypeScriptLua is licensed under the MIT license.\r\n\r\nQuick Start\r\n-----------\r\n\r\nPrerequisite: nodejs, Lua 5.3, VSCode\r\n\r\n1) Build Project\r\n\r\n```\r\nnpm install\r\nnpm run build\r\n```\r\n\r\n2) Compile test.ts\r\n\r\ncreate file test.ts\r\n\r\n```TypeScript\r\ndeclare var print: any;\r\n\r\nclass Person {\r\n    protected name: string;\r\n    constructor(name: string) { this.name = name; }\r\n}\r\n\r\nclass Employee extends Person {\r\n    private department: string;\r\n\r\n    constructor(name: string, department: string) {\r\n        super(name);\r\n        this.department = department;\r\n    }\r\n\r\n    public get ElevatorPitch() {\r\n        return `Hello, my name is ${this.name} and I work in ${this.department}.`;\r\n    }\r\n}\r\n\r\nlet howard = new Employee(\"Howard\", \"Sales\");\r\nprint(howard.ElevatorPitch);\r\n```\r\n\r\n```\r\nnode __out/main.js test.ts\r\n```\r\n\r\nNow you have test.lua\r\n\r\n3) Run it.\r\n\r\n```\r\nlua test.lua\r\n```\r\n\r\nResult:\r\n```\r\nHello, my name is Howard and I work in Sales.\r\n```\r\n\r\nEnjoy it. \r\n\r\nHow to use JavaScript Library\r\n-----------\r\n\r\n1) Compile JavaScript Library\r\n\r\n```\r\ncd experiments\\jslib\r\nnode ../../__out/main.js -singleModule\r\n```\r\n\r\n2) Copy JS.lua into your folder where you run the compiled app.\r\n\r\n3) Compile test.ts\r\n\r\ncreate file test.ts\r\n\r\n```TypeScript\r\nclass Person {\r\n    protected name: string;\r\n    constructor(name: string) { this.name = name; }\r\n}\r\n\r\nclass Employee extends Person {\r\n    private department: string;\r\n\r\n    constructor(name: string, department: string) {\r\n        super(name);\r\n        this.department = department;\r\n    }\r\n\r\n    public get ElevatorPitch() {\r\n        return `Hello, my name is ${this.name} and I work in ${this.department}.`;\r\n    }\r\n}\r\n\r\nlet howard = new Employee(\"Howard\", \"Sales\");\r\nconsole.log(howard.ElevatorPitch);\r\n```\r\n\r\n```\r\nnode __out/main.js test.ts\r\n```\r\n\r\n4) Run it.\r\n\r\n```\r\nlua -e \"require('./JS')\" test.lua\r\n```\r\n\r\nResult:\r\n```\r\nHello, my name is Howard and I work in Sales.\r\n```\r\n\r\nEnjoy it","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FASDAlexander77%2FTypeScriptLua","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FASDAlexander77%2FTypeScriptLua","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FASDAlexander77%2FTypeScriptLua/lists"}