A Luau-to-TypeScript compiler for Roblox (v0.3.2). It transpiles Luau source code into TypeScript, enabling migration of Luau codebases to TypeScript, parallel runtime maintenance, or integration with TS-native tooling. Features include two emit modes (rbxts for roblox-ts compatibility, native for Roblox-native API), directory and Rojo-project mode with declaration file generation, 100% passing conformance tests, and full Roblox API coverage. Published on npm, requires Node >=18, and ships TypeScript types.
npm install luau2tsNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Compiles a Luau source string to TypeScript using the library API.
Add await to calls to compile(), compileFile(), and compileProject().
Replace --jsx with --mode native.
Use import statements or dynamic import() in CJS projects.
Install @rbxts/types and @rbxts/services as dev dependencies.
Switch to import syntax: import { compile } from 'luau2ts'Use import { compile } from 'luau2ts' (named export) and ensure version >=0.3.0.Run: npm install --save-dev @rbxts/types @rbxts/services
Pass source code string as first argument and options as second: compile(code, options).
No dependency data recorded yet.