Skip to content

Support omitted declarations for destructured tuples#682

Merged
Perryvw merged 1 commit intoTypeScriptToLua:masterfrom
martinjlowm:bugfix/unnamed-array-destructuring
Jul 25, 2019
Merged

Support omitted declarations for destructured tuples#682
Perryvw merged 1 commit intoTypeScriptToLua:masterfrom
martinjlowm:bugfix/unnamed-array-destructuring

Conversation

@martinjlowm
Copy link
Copy Markdown
Contributor

@martinjlowm martinjlowm commented Jul 23, 2019

Functions marked as @tupleReturn now correctly support omitted declarations, e.g.:

TypeScript:

const [,,c] = tupleFunction();

Lua:

local ____, ____, c = tupleFunction();

Unlike prior to this PR where the result would be:

local ____ = tupleFunction();
local c = ____[3];

@Perryvw Perryvw merged commit 1741286 into TypeScriptToLua:master Jul 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants