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: patch-diff.githubusercontent.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:4df56f55-2c4e-3e23-41cd-2ace0e6ffcc8 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BA7A:338A81:11F2D00:19276AD:697202A7 |
| html-safe-nonce | 308dc777d5f6cec0e15d65d449e1acf937836031eb5adea74cf0a4f24966f2fd |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQTdBOjMzOEE4MToxMUYyRDAwOjE5Mjc2QUQ6Njk3MjAyQTciLCJ2aXNpdG9yX2lkIjoiNDMzODAyOTU0MTgyMTkwNzYyMyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | b86900e67a484e398d89e8c15fcb2fdda7bb4cda19d15e6d4fbbdf9d1ad3dc2e |
| 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 | 5d01a3551afdd1a0e12e78acaf3ba43a9a1f7dcb518695d6ed59db76a9290f13 |
| 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 | 062b05dcdf64ee7a3dad7acabb746494ae0982cc |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width