declare function MV_INDEX_TO_NUM(tbl: {}): {}

will replace all instances of named indexes with a unique number constant.

Valid Usage

local foo = MV_INDEX_TO_NUM({total = 0})
for i = 1, 10 do
  foo.total = foo.total + i
end
return foo.total