Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WASM: change Language to be a proper TypeScript enum #5726

Merged
merged 1 commit into from
Feb 13, 2025

Conversation

andiflabs
Copy link
Contributor

Summary

The current implementation makes Language a "string enum", however such enums do not get properly translated to Javascript/Typescript, in the sense that on the JS/TS side you cannot write Language.English, but you must write "en".

This PR changes Language to be a regular enum instead, so that the code on the JS/TS side is more clear, and in particular type-checking can find invalid enum values.

Testing Plan

Unit tests

@andiflabs andiflabs requested a review from a team as a code owner February 12, 2025 22:34
@andiflabs andiflabs force-pushed the andrea/wasm-langauge-enum-fix branch from 28c94d1 to 6b5051d Compare February 12, 2025 22:40
@andiflabs andiflabs enabled auto-merge (rebase) February 12, 2025 22:57
@andiflabs andiflabs merged commit 860dbba into staging Feb 13, 2025
24 checks passed
@andiflabs andiflabs deleted the andrea/wasm-langauge-enum-fix branch February 13, 2025 03:34
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