roblox-ts is a TypeScript-to-Luau compiler that enables writing Roblox games using TypeScript syntax and tooling. Current stable version is 3.0.0, with active development and regular releases (major/minor every few months). Key differentiators: full support for TypeScript features (generics, JSX, async/await), macros for compile-time optimizations, and seamless integration with Roblox's object model. Unlike alternatives like Luau or bare Lua, roblox-ts provides type safety, IDE support, and modern language features while compiling to efficient Luau code.
npm install roblox-tsNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to programmatically invoke the compiler with configuration options.
Upgrade Node.js to 18 or later.
Use `npx create-roblox-ts` or `npm create roblox-ts` to scaffold projects.
Remove the flag or set `--optimizedLoops=false` to disable.
Wrap `@rbxts` scope in a folder and list other scopes as needed.
Use a custom map or `@rbxts/string-enum-utils` for reverse mapping.
Use getters/setters with explicit `get` and `set` syntax.
Install with `npm install -D rbxtsc` and import from 'rbxtsc'.
Install with `npm install -D @rbxts/compiler-types` and add to tsconfig.json `types`.
Use `import { Compiler } from 'rbxtsc'` or `const { Compiler } = require('rbxtsc')`.