TypeScriptLua
The TypeScriptLUA repo contains the complete source code implementation for TypeScript compiler for LUA bytecode
Install / Use
/learn @ASDAlexander77/TypeScriptLuaREADME
TypeScript for Lua
The TypeScriptLua repo contains the complete source code implementation for TypeScript compiler for Lua bytecode.
Chat Room
Want to chat with other members of the TypeScript for Lua community?
Engage, Contribute and Provide Feedback
Some of the best ways to contribute are to try things out, file bugs, and join in design conversations.
License
TypeScriptLua is licensed under the MIT license.
Quick Start
Prerequisite: nodejs, Lua 5.3, VSCode
- Build Project
npm install
npm run build
- Compile test.ts
create file test.ts
declare var print: any;
class Person {
protected name: string;
constructor(name: string) { this.name = name; }
}
class Employee extends Person {
private department: string;
constructor(name: string, department: string) {
super(name);
this.department = department;
}
public get ElevatorPitch() {
return `Hello, my name is ${this.name} and I work in ${this.department}.`;
}
}
let howard = new Employee("Howard", "Sales");
print(howard.ElevatorPitch);
node __out/main.js test.ts
Now you have test.lua
- Run it.
lua test.lua
Result:
Hello, my name is Howard and I work in Sales.
Enjoy it.
How to use JavaScript Library
- Compile JavaScript Library
cd experiments\jslib
node ../../__out/main.js -singleModule
-
Copy JS.lua into your folder where you run the compiled app.
-
Compile test.ts
create file test.ts
class Person {
protected name: string;
constructor(name: string) { this.name = name; }
}
class Employee extends Person {
private department: string;
constructor(name: string, department: string) {
super(name);
this.department = department;
}
public get ElevatorPitch() {
return `Hello, my name is ${this.name} and I work in ${this.department}.`;
}
}
let howard = new Employee("Howard", "Sales");
console.log(howard.ElevatorPitch);
node __out/main.js test.ts
- Run it.
lua -e "require('./JS')" test.lua
Result:
Hello, my name is Howard and I work in Sales.
Enjoy it
Related Skills
node-connect
342.5kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
85.3kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
Writing Hookify Rules
85.3kThis skill should be used when the user asks to "create a hookify rule", "write a hook rule", "configure hookify", "add a hookify rule", or needs guidance on hookify rule syntax and patterns.
review-duplication
99.6kUse this skill during code reviews to proactively investigate the codebase for duplicated functionality, reinvented wheels, or failure to reuse existing project best practices and shared utilities.
