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: patch-diff.githubusercontent.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:30d79fd7-26aa-e00e-1ab9-41454c8dc6d2 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D628:1022EC:316BF5C:4246E2C:6971E471 |
| html-safe-nonce | 505bab20334fe45268bb75ce91ae24cc097ba7a9b9938fdedb307f936851de21 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENjI4OjEwMjJFQzozMTZCRjVDOjQyNDZFMkM6Njk3MUU0NzEiLCJ2aXNpdG9yX2lkIjoiMjAxMzI3MDE2OTQ5MTcyNzQ3MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 3e29ec32c614441fafea3190bf07fb378ab959a8249ce95174fd96cbb46f0428 |
| 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 | 683712716975b3393656edf09255a1d488d0e68ab7b9ac97e40ecf40036f696c |
| 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 | ed99da4e2de688dd1056894c1eccd4c82c6bbbfe |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width