Skip to content

tslua

A fast TypeScript-to-Lua transpiler, written in Go, powered by typescript-go. Built on the architecture and test suite of TypeScriptToLua.
Terminal window
npm install @tslua/cli
// tslua eval -e
const items = [10, 20, 30];
for (const x of items) {
print(x * 2);
}
// output:
// items = {10, 20, 30}
// for ____, x in ipairs(items) do
// print(x * 2)
// end

Targets LuaJIT and Lua 5.0-5.5. Passes 99% of TSTL’s test suite. See the CLI reference for all commands and flags.