Consider the following TypeScript:
interface MyInterface {
/** @tupleReturn */
getRaw(name: string): [number, number];
/** @tupleReturn */
getRaw2: (name: string) => [number, number];
}
declare var inst: MyInterface;
const [a, b] = inst.getRaw("abc");
const [c, d] = inst.getRaw2("abc");
I would expect both getRaw and getRaw2 to respect the tupleReturn directive and produce the same code, but instead this produces the following code:
local a, b = inst:getRaw("abc")
local c, d = table.unpack(inst:getRaw2("abc"))
Playground link
Consider the following TypeScript:
I would expect both
getRawandgetRaw2to respect the tupleReturn directive and produce the same code, but instead this produces the following code:Playground link