Arrays with nested tables not checked with TypeChecker

In the image, I’m trying to create a type and export via ModuleScript to use it within another ModuleScript to organize types in tables.


However, the issue here is since arrays dont have a set index when indexing, (for example: myTable = {2,5,8,10}, there is no indexName = value in the table) I assumed that there was no need for a [type]: operator before the nested array. However, without the [type]: operator before the array, the type checker failed to identify the nested array and considered the first index within the table a unique type (outlined in blue text).

Expected behavior

I expected the type checker to identify the unassigned [type]: array and use it global within the nested table.

Hi there, thank you for the report. If I’m understanding you correctly, the undesired behavior here is specifically the highlighting of newBackgroundImageId in blue, despite being a property name, not a type? If so, this is not actually related to type checking at all, but I’ll poke the Script Editor team to fix the bug in the highlighter.

Thank you for your patience; this syntax highlighting bug should now be fixed!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.