Title: Array unpacking handling · Issue #1651 · TypeScriptToLua/TypeScriptToLua · GitHub
Open Graph Title: Array unpacking handling · Issue #1651 · TypeScriptToLua/TypeScriptToLua
X Title: Array unpacking handling · Issue #1651 · TypeScriptToLua/TypeScriptToLua
Description: I have a suggestion. When transpiling code like the following: const [x, y] = an_array The current result is: local x, y = table.unpack(an_array) I would suggest adding range to the unpack function, such as local x, y = table.unpack(an_a...
Open Graph Description: I have a suggestion. When transpiling code like the following: const [x, y] = an_array The current result is: local x, y = table.unpack(an_array) I would suggest adding range to the unpack function...
X Description: I have a suggestion. When transpiling code like the following: const [x, y] = an_array The current result is: local x, y = table.unpack(an_array) I would suggest adding range to the unpack function...
Opengraph URL: https://github.com/TypeScriptToLua/TypeScriptToLua/issues/1651
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Array unpacking handling","articleBody":"I have a suggestion.\n\nWhen transpiling code like the following:\n`const [x, y] = an_array`\n\nThe current result is:\n`local x, y = table.unpack(an_array)`\n\nI would suggest adding range to the unpack function, such as\n`local x, y = table.unpack(an_array, 1, 2)`\n\nIt will greatly improve compatibility with TypeScript and should be more efficient to run.","author":{"url":"https://github.com/LibertasIoT","@type":"Person","name":"LibertasIoT"},"datePublished":"2025-08-05T15:35:12.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/1651/TypeScriptToLua/issues/1651"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:2292fac4-d6f0-0ce4-765f-8c85cb0bea48 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A6A0:2AD947:2A93AD0:3BCBD7D:6971041B |
| html-safe-nonce | 78c48663a161763ec92ceb35167adcc4cad523794f0d7841fa7301de4767fa54 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNkEwOjJBRDk0NzoyQTkzQUQwOjNCQ0JEN0Q6Njk3MTA0MUIiLCJ2aXNpdG9yX2lkIjoiODg0MjkzOTk1NDU1NjM3MTk5NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | eda8fbfb073ca1d00ccceb41b84efd921c818d2d0237973f82d8dcffb9efa978 |
| hovercard-subject-tag | issue:3293566606 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/TypeScriptToLua/TypeScriptToLua/1651/issue_layout |
| twitter:image | https://opengraph.githubassets.com/72d73287678dd5f141d4f3f74365e6fee88f9ecfd7c181ffb12792aeb43b11f5/TypeScriptToLua/TypeScriptToLua/issues/1651 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/72d73287678dd5f141d4f3f74365e6fee88f9ecfd7c181ffb12792aeb43b11f5/TypeScriptToLua/TypeScriptToLua/issues/1651 |
| og:image:alt | I have a suggestion. When transpiling code like the following: const [x, y] = an_array The current result is: local x, y = table.unpack(an_array) I would suggest adding range to the unpack function... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | LibertasIoT |
| hostname | github.com |
| expected-hostname | github.com |
| None | 2d17fd2bbd784dc91f3a78a2f1d2c41d9f4f8ce86136d09833e3cf21b2bde1b7 |
| turbo-cache-control | no-preview |
| go-import | github.com/TypeScriptToLua/TypeScriptToLua git https://github.com/TypeScriptToLua/TypeScriptToLua.git |
| octolytics-dimension-user_id | 44121206 |
| octolytics-dimension-user_login | TypeScriptToLua |
| octolytics-dimension-repository_id | 115876595 |
| octolytics-dimension-repository_nwo | TypeScriptToLua/TypeScriptToLua |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 115876595 |
| octolytics-dimension-repository_network_root_nwo | TypeScriptToLua/TypeScriptToLua |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | e053d923fb27a9d948f8cefae8ba3bf43f7b938f |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width