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: patch-diff.githubusercontent.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:7e6b807c-771f-a19a-687f-5aa0a1c320aa |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9466:393D7B:BFF224:10C1435:6971F41C |
| html-safe-nonce | 6bcf9ff694035f56238b21ed51b5494b95096ae38a64a593036d343b132340d1 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NDY2OjM5M0Q3QjpCRkYyMjQ6MTBDMTQzNTo2OTcxRjQxQyIsInZpc2l0b3JfaWQiOiI0MjQzMjMxMzcxNTU2OTQyODc2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 6818d68af19ab3917c8f30ad1b3ea45a6ad59164d3cdf4cf5020c09b3dd9ebdc |
| 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 | 3d9da1aa47d387dfb2aca0f2e5c19150dc936b8128a6b2ecd6a02fc26a378fff |
| 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 | 4332d3e3368b9bce3dfd3c4a2643112933072734 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width