Tuple Type Checking

I am currently using a table of tables to store data about models

local serializedModel = {
  {"propId1", 0, 1, 0, ...}, 
  {"propId2", 0, 4, 0, ...}
}

Is there a way to type check the individual indices of the tables, similar to tuples?
ie {string, number, number, number, ...}

No because we don’t have number literals (yet). You would either have to use string indices, or use { [number] = string | number } or { string | number } which is equivalent to what you have already (both are the same, one is just with an explicitly typed index)

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