Two ways to assign an array's length:
array.length = 0;
[array.length] = [0];
The first results in the ArraySetLength LuaLib being used to correctly shorten the array. The second becomes #array = 0 which doesn't run.
Thinking a prior transformation may need to convert a destructuring pattern to TypeScript assignment statements.
Two ways to assign an array's length:
The first results in the
ArraySetLengthLuaLib being used to correctly shorten the array. The second becomes#array = 0which doesn't run.Thinking a prior transformation may need to convert a destructuring pattern to TypeScript assignment statements.