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: redirect.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:5689a927-4848-57cc-cfbb-6c95beaf0347 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8F72:29874B:103EDD5:16FA162:69723554 |
| html-safe-nonce | dbcec2d1ab2178d3a8ca1e9dc8a42d6f64d8a76b4949a9644eee57945d7238dc |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RjcyOjI5ODc0QjoxMDNFREQ1OjE2RkExNjI6Njk3MjM1NTQiLCJ2aXNpdG9yX2lkIjoiMzEyNTQzMTQ0NjYxNzA3NzA3NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 7dc02d07358d643625902229b9adb25c07b89b09128c178dccf10ecd9e595b1f |
| 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 | 2c16db4e575031f6e3be03e0437c1ab663e0b4643ba5cbbfba48c1e4fc056a11 |
| 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 | a12ab519e1537fa080535ea933f81d4fcef34da0 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width