Title: Destructuring strings is supported by TS but not by TSTL/Lua · Issue #1429 · TypeScriptToLua/TypeScriptToLua · GitHub
Open Graph Title: Destructuring strings is supported by TS but not by TSTL/Lua · Issue #1429 · TypeScriptToLua/TypeScriptToLua
X Title: Destructuring strings is supported by TS but not by TSTL/Lua · Issue #1429 · TypeScriptToLua/TypeScriptToLua
Description: Because strings are iterable, TS supports destructuring them into individual characters: const [a, b] = "test"; // a = "t" ; b = "e"; We currently do not support that in TSTL. We should think about adding support for handling strings in ...
Open Graph Description: Because strings are iterable, TS supports destructuring them into individual characters: const [a, b] = "test"; // a = "t" ; b = "e"; We currently do not support that in TSTL. We should think about...
X Description: Because strings are iterable, TS supports destructuring them into individual characters: const [a, b] = "test"; // a = "t" ; b = "e"; We currently do not support that ...
Opengraph URL: https://github.com/TypeScriptToLua/TypeScriptToLua/issues/1429
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Destructuring strings is supported by TS but not by TSTL/Lua","articleBody":"Because strings are iterable, TS supports destructuring them into individual characters:\r\n\r\n`const [a, b] = \"test\"; // a = \"t\" ; b = \"e\"`;\r\n\r\nWe currently do not support that in TSTL.\r\nWe should think about adding support for handling strings in restructuring assignments. At the very least, we should throw a diagnostic that this currently does not work.\r\n\r\n\r\nCurrent behavior:\r\n\r\nhttps://typescripttolua.github.io/play/#code/GYVwdgxgLglg9mABMOcAUUAWMDOAuRANzhgBMBKAnKAJxjAHNEBvAKEQ8RoFMoQakAIijdqggNysAvq1YQE1RAG0AhgBpEAIwC6iALzJUacpNYAHOmChp1Wk0A\r\n\r\nEpected behaviour a = \"t\", b = \"e\";\r\n\r\nhttps://www.typescriptlang.org/play?#code/GYVwdgxgLglg9mABMOcAUUAWMDOAuRANzhgBMBKAnKAJxjAHNEBvAKEQ8RoFMoQakAIijdqggNysAvq1YQE1RAG0AhgBpEAIwC6iALzJUacpLkK4AG24A6C3AZp1Wk0A\r\n\r\n\r\nDiscovered while fixing #1411 \r\n","author":{"url":"https://github.com/lolleko","@type":"Person","name":"lolleko"},"datePublished":"2023-04-10T22:20:33.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":5},"url":"https://github.com/1429/TypeScriptToLua/issues/1429"}
| 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:58fee3df-0ff9-1adb-6327-c3eafe01b395 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A8EC:2F60ED:794C75:AAA215:69724DA0 |
| html-safe-nonce | 10f88ab83c23884e0123a850d965009ee9a68932c0e4aca1e4497695513f7043 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBOEVDOjJGNjBFRDo3OTRDNzU6QUFBMjE1OjY5NzI0REEwIiwidmlzaXRvcl9pZCI6IjI1ODQxMjcyNDM2MDQzNDgzMjAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 7db6c474c0462ea6c52c9a8d1a1d825f4b565800da35e81ec828e62707664776 |
| hovercard-subject-tag | issue:1661462055 |
| 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/1429/issue_layout |
| twitter:image | https://opengraph.githubassets.com/bddc8f2b76f1520eb17c16ee40cfa2e840a7e04ce834af8a6e22d6020e860cb3/TypeScriptToLua/TypeScriptToLua/issues/1429 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/bddc8f2b76f1520eb17c16ee40cfa2e840a7e04ce834af8a6e22d6020e860cb3/TypeScriptToLua/TypeScriptToLua/issues/1429 |
| og:image:alt | Because strings are iterable, TS supports destructuring them into individual characters: const [a, b] = "test"; // a = "t" ; b = "e"; We currently do not support that in TSTL. We should think about... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | lolleko |
| hostname | github.com |
| expected-hostname | github.com |
| None | 0bf8f9c572ee803398ae08d37b5c4215b9e90e3afebbe4c722ebdecb8f680830 |
| 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 | f1a765aea9b6f5dcd4bf980043cb1434723fac64 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width