Title: Buggy enum transpilation with namespace · Issue #1677 · TypeScriptToLua/TypeScriptToLua · GitHub
Open Graph Title: Buggy enum transpilation with namespace · Issue #1677 · TypeScriptToLua/TypeScriptToLua
X Title: Buggy enum transpilation with namespace · Issue #1677 · TypeScriptToLua/TypeScriptToLua
Description: This Input: namespace What { export enum Is { Going, On } } Transpiles to: --[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]] What = What or ({}) do What.Is = Is or ({}) What.Is.Going = 0 What.Is[What.Is.Going] = "...
Open Graph Description: This Input: namespace What { export enum Is { Going, On } } Transpiles to: --[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]] What = What or ({}) do What.Is = Is or ({}) What...
X Description: This Input: namespace What { export enum Is { Going, On } } Transpiles to: --[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]] What = What or ({}) do What.Is = Is or ({}) What...
Opengraph URL: https://github.com/TypeScriptToLua/TypeScriptToLua/issues/1677
X: @github
Domain: redirect.github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Buggy enum transpilation with namespace","articleBody":"This Input:\nnamespace What {\n export enum Is {\n Going,\n On\n }\n}\nTranspiles to:\n--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]\nWhat = What or ({})\ndo\n What.Is = Is or ({})\n What.Is.Going = 0\n What.Is[What.Is.Going] = \"Going\"\n What.Is.On = 1\n What.Is[What.Is.On] = \"On\"\nend\n\nTwo points:\n- ~Why the bidirectional enum handling by default? What if someone wants to take advantage of lua's simplicity and iterates over it with \"pairs\"?~ I just learned that numeric typescript enums are bidirectional...\n- Why \"What.Is = Is or ({})\" ?? Should it not be \"What.Is = What.Is or ({})\"\n\nSee: https://typescripttolua.github.io/play/#code/5.4/PTA2FMBcAIEkGdoF5oCIByB7A4pzATVAKADsBDAW3HgAcyBjcaAdQAsyYBvI6acADxqYATjHAkArhTiJuvXrgCWJAOYAaHvIDyJTQF8iBgGYjoACggwA2gGs1ANwC60TEeh1Fw+GbYcAdAgAlIFy7sLKkGZ29oGGQA\n","author":{"url":"https://github.com/felixhirt","@type":"Person","name":"felixhirt"},"datePublished":"2026-01-21T14:01:42.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/1677/TypeScriptToLua/issues/1677"}
| 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:830fedb5-b0f1-38f9-1e58-a33770c73a4a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | ADFA:AF22:1B15391:259F6D2:69727CBC |
| html-safe-nonce | 56c493aa08ec291ae8a5a7dcb43620f06b6b082bfbbe3b0fc9a98caf0fa5665e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBREZBOkFGMjI6MUIxNTM5MToyNTlGNkQyOjY5NzI3Q0JDIiwidmlzaXRvcl9pZCI6IjI0ODkyOTUwODcyNjMxODYxMDgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 337b0e0f573d101a5ca5393b7c4b5fd432b51d1ab13ecca0bafbf056e5245938 |
| hovercard-subject-tag | issue:3838412544 |
| 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/1677/issue_layout |
| twitter:image | https://opengraph.githubassets.com/439dead2fafc95708a3ea195cb0883aa8cdd3292877299f36745d4698ca71bda/TypeScriptToLua/TypeScriptToLua/issues/1677 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/439dead2fafc95708a3ea195cb0883aa8cdd3292877299f36745d4698ca71bda/TypeScriptToLua/TypeScriptToLua/issues/1677 |
| og:image:alt | This Input: namespace What { export enum Is { Going, On } } Transpiles to: --[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]] What = What or ({}) do What.Is = Is or ({}) What... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | felixhirt |
| hostname | github.com |
| expected-hostname | github.com |
| None | f3cc591a09ecfa43f68be4fde9ec95eccfdf6298db2cd7d08e9eae6c9f833329 |
| 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 | 208d56d4b5936bcb8a1d3b43096d573261817603 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width