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

Typed switch statement #145

Open
armoha opened this issue Oct 12, 2024 · 0 comments
Open

Typed switch statement #145

armoha opened this issue Oct 12, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@armoha
Copy link
Owner

armoha commented Oct 12, 2024

// unitType is TrgUnit
const unitType = cunit.unitType;
switch (unitType) {
case TrgUnit("Terran Marine"):
    // do something
    break;
}

var player: TrgPlayer = P12;
switch (player) {
case P1:
case P3, P4:
default:
}
@armoha armoha added the enhancement New feature or request label Oct 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant