Hello! Another question about Luau! there should be more documentation
This time, I’m having problems giving a sub-table a type. It is a table with UDim2 values for tweening.
If you’re just going to annotate every variable with any that kind of defeats the purpose of type checking. You aren’t using the annotations for its benefits, so just remove the annotations.
A generic table type doesn’t exist, no. You don’t need to overuse type annotations; for the rest let type inference do it for you. Creating table types just for the sake of creating them to annotate your variables is also a huge waste of time.
Something like
local n: number = 2
is redundant since Luau already knows that 2 is a number. Type annotations are mostly useful for function parameters.