Using a type alias for a LuaIterable that iterates through LuaMultiReturn makes the compiler not recognize it as a LuaMultiReturn.
The code:
type IterableAlias = LuaIterable<LuaMultiReturn<[number, number]>>;
declare const iterable: IterableAlias;
for (const [a, b] of iterable) {}
Outputs:
for ____value in iterable do
local a = ____value[1]
local b = ____value[2]
end
When it should instead output:
for a, b in iterable do
end
Here's a playground link with some examples.
Using a type alias for a LuaIterable that iterates through LuaMultiReturn makes the compiler not recognize it as a LuaMultiReturn.
The code:
Outputs:
When it should instead output:
Here's a playground link with some examples.