Luau Type Expert Expert guidance for writing type-safe, clean Luau code that passes strict type checking. Type Modes Always use at file top. Three modes exist: | Mode | Behavior | |------|----------| | | Disables type checking entirely | | | Unknown types become (default) | | | Full type tracking, catches mismatches | Type Annotation Syntax Type Aliases Union and Intersection Types Type Narrowing (Refinements) Luau automatically narrows types in conditional blocks: Early return preserves refinements: Type Casts Use to override inferred types: Cast rules: One operand must be subtype of the oth…