tsconfig rbxts
Build options can live under the top-level "rbxts" key of tsconfig.json instead of the command line. The merge order is defaults, then rbxts, then command-line flags.
The rbxts values merge through the extends chain from parent to child. Path values resolve relative to the file that declares them. Command-line values override tsconfig values. Sloptor warns about command-line-only values such as watch, verbose, and usePolling under rbxts and ignores them.
nativeTypes and the experimental luauTypes also read the top-level key of the same name in rotor.toml. A declared tsconfig value takes precedence, even an explicit false. Otherwise the rotor.toml value applies, and both unset means off. luauTypes also has a command-line flag, --luauTypes, which overrides both files.
Source maps
Section titled “Source maps”Enable compilerOptions.sourceMap to write a .luau.map beside each Luau output:
{ "compilerOptions": { "sourceMap": true }}Source maps provide an anchor at generated column 0 on each mapped Luau line. They also mark where expressions and object fields begin, and where source operators start. Arithmetic, comparison, concatenation, logical, compound assignment, and optional chain operators point to their TypeScript tokens, including tokens on continuation lines. Generated and original columns use UTF-16 code units.
Binding names in declarations and parameters, punctuation, and synthesized literals don't get segments of their own. Compiler headers stay unmapped, and the maps have no names field. The compiler collects expression origins only with source maps on.
Editor schema
Section titled “Editor schema”The rotor.toml schema and the tsconfig rbxts schema are separate documents. Publish the rbxts one where your editors can read it:
sloptor schema --rbxts > rbxts-tsconfig.schema.jsonThen point tsconfig.json at it:
{ "$schema": "./rbxts-tsconfig.schema.json", "rbxts": { "type": "game", "optimizedLoops": true }}The site build generates this page from rbxts-tsconfig.schema.json.
rbxts
roblox-ts compiler options. CLI flags override these at runtime.
| Key | Type | Description |
|---|---|---|
allowCommentDirectives | boolean | Allow TypeScript comment directives such as @ts-ignore. |
includePath | string | Path to where the runtime library files should be stored. Resolved relative to this tsconfig.json. |
logTruthyChanges | boolean | Log changes to truthiness evaluation from Lua truthiness rules. |
luau | boolean | Emit files with .luau extension. |
luauTypes | boolean | Experimental. Emit full Luau type annotations (parameters, returns, locals, class fields, exported type aliases) in compiled output so Luau code can consume it with real types. Off by default; rotor.toml's luauTypes is the fallback when this is not set. Output may change between releases. |
nativeTypes | boolean | Emit Luau parameter and return annotations for files whose leading comments include //!native. Off by default; rotor.toml's nativeTypes is the fallback when this is not set. |
noInclude | boolean | Do not copy include files. |
optimizedArrayAppends | boolean | Replace eligible Array.push calls in loops with indexed writes. |
optimizedLoops | boolean | Enable numeric-for loop optimization. |
rojo | string | Path to the Rojo configuration file. Resolved relative to this tsconfig.json. If omitted, roblox-ts auto-detects a *.project.json in the project root. |
type | "game" | "model" | "package" | Override project type. |