Handling untyped Luau
If your .luau source has no type annotations (no --!strict, no local x: number), the compiler still emits valid TypeScript, but the output is full of any and may not type-check under a strict tsconfig.
What gets any
- Top-level globals (
local x = _G.something) are typed asany. - Anonymous tables (
{ foo = 1 }) are typed as inline object literals, usually fine. - Untyped function parameters become
any.
Options
-
Annotate the Luau source. The compiler picks up
--!strictand individuallocal x: numberannotations and propagates them through. -
Loosen the output
tsconfig. Set"noImplicitAny": falseand"strict": falseon the emitted code. This is the right call for a one-time migration: get the project compiling, then incrementally re-tighten the settings as you add annotations. -
Hand-edit after compile. The output is normal TypeScript,
git addit and edit. Source maps make this safe.
Recommendation
For a real migration: start with --mode rbxts and a loose tsconfig, get the project building, then tighten settings file by file. Don't try to land a strict tsconfig in the same PR as the initial compile.