TypeScriptToLua
TypeScriptToLua copied to clipboard
Functions with tuple return types shouldn't be compatible with regular tuples
interface A {
/** @tupleReturn */
foo(): number[];
}
class B {
foo() {
return [1, 2];
}
}
const a: A = new B();
// type of `result` is `number`, but value is `{ 1, 2 }`
const [result] = a.foo();