are you making an array?
if so i dont think individual integers can be a literals but you can do:
{string|boolean|number} or {[number]:string|boolean|number} (the same thing but without sugar)
alternatively in your second example:
{first: string, second: number: third: boolean}
Would force you to have table like:
{
first = “hi”;
second = 0;
third = true
}
And its not what you want+overhead+not idiomatic.
I would also recomend you to just have arguments instead and collapse the table through table.unpack() when passing arguments like: example.new(table.unpack(TableHere))
when you make a function also put local in the beggining becouse global variables suck.
Or you can just return a constructor if its a module: