A generic TypeScript to Lua transpiler that converts TypeScript code into readable and efficient Lua code. Current stable version is 0.0.1, released as an initial alpha. Development is active on GitHub with regular commits. Key differentiators: allows writing TypeScript for any Lua environment, supports declaring existing Lua APIs via declaration files, and integrates with standard TypeScript tooling.
npm install un-typescript-to-luaNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Transpile a simple TypeScript function to Lua using the API.
Pin exact version and watch changelog.
Consult documentation for supported features.
Set luaTarget option explicitly to '5.1', '5.2', '5.3', or 'JIT'.
Use template literals or explicit toString() calls.
Use the JavaScript API or migrate to new CLI if available.
npm install -D typescript@~4.5.2
Use import { transpileString } from 'typescript-to-lua'Set luaTarget to a valid target version.