Examples
The examples/ directory
has side-by-side input/output pairs showing specific features. Each .ts/.tsx file has a
matching .luau file showing the compiled output.
| Example | Features shown |
|---|---|
| react-component | useState, useCallback, JSX, props, element mapping |
| async-await | async/await to Promise transform |
| decorators | Class and method decorators |
| flow | Generator functions, coroutine adapter |
| optional-chaining | ?., ??, temp-var extraction |
| regex | RegExp literals and methods |
| roblox-services | @rbx-services, Instance API, : method calls |
| types | Interfaces, type aliases, generics, enums |
Demo project
Section titled “Demo project”The demo/ directory contains
a full Roblox project that demonstrates rbx-tsx in a real setup:
- Rojo project configuration (
default.project.json) - Wally package manager config for React and ReactRoblox dependencies
- Source TypeScript files and their compiled Luau output
- Build scripts for both Windows and Unix