Title: Encountered error with `{ ...(bCheck && obj) }` · Issue #1642 · TypeScriptToLua/TypeScriptToLua · GitHub
Open Graph Title: Encountered error with `{ ...(bCheck && obj) }` · Issue #1642 · TypeScriptToLua/TypeScriptToLua
X Title: Encountered error with `{ ...(bCheck && obj) }` · Issue #1642 · TypeScriptToLua/TypeScriptToLua
Description: The code works for TypeScript, but it causes errors when used with code generated by TSTL. const obj = { key: 1 } const num = Math.random() const a = 0 // 0, 0.5, 1 const b = { ...(num < a && obj) } generates obj = {key = 1} num = math.r...
Open Graph Description: The code works for TypeScript, but it causes errors when used with code generated by TSTL. const obj = { key: 1 } const num = Math.random() const a = 0 // 0, 0.5, 1 const b = { ...(num < a && obj) ...
X Description: The code works for TypeScript, but it causes errors when used with code generated by TSTL. const obj = { key: 1 } const num = Math.random() const a = 0 // 0, 0.5, 1 const b = { ...(num < a &...
Opengraph URL: https://github.com/TypeScriptToLua/TypeScriptToLua/issues/1642
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Encountered error with `{ ...(bCheck \u0026\u0026 obj) }`","articleBody":"The code works for TypeScript, but it causes errors when used with code generated by TSTL.\n\n```typescript\nconst obj = { key: 1 }\nconst num = Math.random()\nconst a = 0 // 0, 0.5, 1\nconst b = { ...(num \u003c a \u0026\u0026 obj) }\n```\ngenerates\n```lua\nobj = {key = 1}\nnum = math.random()\na = 0\nb = __TS__ObjectAssign({}, num \u003c a and obj)\n```\n\nplayground\n\nhttps://typescripttolua.github.io/play/#code/5.4/MYewdgzgLgBCBGArGBeGBvGBrApgTwC4YBGGAXwChRJYwBXAW1RgFkBDKACwDoAnNsABMQDABQBKKuGgw2zAAwwA9EpjyANGu4BWTcSk0Y8Zpm5nR9JgB5ZMAGR24SceQpA","author":{"url":"https://github.com/qin-tain","@type":"Person","name":"qin-tain"},"datePublished":"2025-06-17T04:13:33.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/1642/TypeScriptToLua/issues/1642"}
| 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:04f59fd0-8a6d-b3a3-48be-f4f993d26ecb |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D574:137523:3A9D0B:51B91E:697212CB |
| html-safe-nonce | 6b625cc6890ca617b63588b9e6288e803b40551d4b7882cffd49e1a65a519d3a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENTc0OjEzNzUyMzozQTlEMEI6NTFCOTFFOjY5NzIxMkNCIiwidmlzaXRvcl9pZCI6IjYxNjYyNTgwNzg3NTI4MzgzNDciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 626aed49d98af3c4fd4865e15e08f80cfb6a040300c7f82c22301ce8bf50f335 |
| hovercard-subject-tag | issue:3151995395 |
| 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/1642/issue_layout |
| twitter:image | https://opengraph.githubassets.com/6c7c6b30b5ce305f9dd44a57a15a779debc4552b498beb61cf8891f53d0b28ce/TypeScriptToLua/TypeScriptToLua/issues/1642 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/6c7c6b30b5ce305f9dd44a57a15a779debc4552b498beb61cf8891f53d0b28ce/TypeScriptToLua/TypeScriptToLua/issues/1642 |
| og:image:alt | The code works for TypeScript, but it causes errors when used with code generated by TSTL. const obj = { key: 1 } const num = Math.random() const a = 0 // 0, 0.5, 1 const b = { ...(num < a && obj) ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | qin-tain |
| hostname | github.com |
| expected-hostname | github.com |
| None | 453de246939b1e04d711e109432e2df10933270413df93b7a8f8f1df8dda7f18 |
| 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 | 12756e5bdb9000be815bbf20a1acc7935638e596 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width