We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Use the first enum style like in this wasm proposal.
type MyEnum = | { tag: 'A' } | { tag: 'B', value: number } | { tag: 'C', value: [number, number] } | { tag: 'D', value: { x: number, y: number } ;
It allows writing switch cases:
switch (enum.tag) { case 'A': ...; break; case 'B': .... }
The text was updated successfully, but these errors were encountered:
implements #1
e6d38ab
No branches or pull requests
Use the first enum style like in this wasm proposal.
It allows writing switch cases:
The text was updated successfully, but these errors were encountered: