Skip to content

TS2Swift: emit enums for string literal unions#654

Merged
krodak merged 2 commits intomainfrom
katei/5460-ts2swift-generat
Feb 18, 2026
Merged

TS2Swift: emit enums for string literal unions#654
krodak merged 2 commits intomainfrom
katei/5460-ts2swift-generat

Conversation

@kateinoigakukun
Copy link
Member

Overview

  • Detect unions composed only of string literals and emit Swift enums with escaped, deduped case names.
  • Keep mixed/non-literal unions falling back to String as before.
  • Add a string-literal-union fixture and refresh snapshots to cover the new enum output.

Testing

  • npm -C Plugins/BridgeJS/Sources/TS2Swift/JavaScript/ test -- --update

@kateinoigakukun kateinoigakukun marked this pull request as draft February 18, 2026 11:59
@kateinoigakukun kateinoigakukun marked this pull request as ready for review February 18, 2026 12:02
@kateinoigakukun kateinoigakukun force-pushed the katei/5460-ts2swift-generat branch from 773471f to 002ffd9 Compare February 18, 2026 12:11
Copy link
Member

@krodak krodak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice 👌🏻

@krodak krodak merged commit b18be89 into main Feb 18, 2026
12 checks passed
@krodak krodak deleted the katei/5460-ts2swift-generat branch February 18, 2026 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments