Installation
npm i @tslua/clinpx tslua eval -e 'print("hello")'From source
Section titled “From source”Requires Go 1.24+, Node 20+, and just ↗.
git clone https://github.com/RealColdFry/tsluacd tsluajust setupjust build./tslua eval -e 'print("hello")'# Transpile a projecttslua -p tsconfig.json
# Transpile inline codetslua eval -e 'const x: number = 1 + 2'
# Print the TypeScript ASTtslua ast -e 'const x = [1, 2, 3]'See the CLI reference for all commands and flags.
tsconfig.json
Section titled “tsconfig.json”tslua reads standard tsconfig.json files. tslua-specific options go under the "tstl" key:
{ "compilerOptions": { "target": "ESNext", "lib": ["ESNext"], "strict": true }, "tstl": { "luaTarget": "JIT" }}See tsconfig.json reference for all options.