luau
luau copied to clipboard
Setting variable to a table field with string literal type causes the variable to infer as generic string type
source:
type Color = "Red" | "Green" | "Blue"
local t: { color: Color }
local color = t.color