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

Open enums: add fromStringOrUnknown convenience method #1626

Open
kubukoz opened this issue Dec 11, 2024 · 1 comment
Open

Open enums: add fromStringOrUnknown convenience method #1626

kubukoz opened this issue Dec 11, 2024 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@kubukoz
Copy link
Member

kubukoz commented Dec 11, 2024

Currently, we only have def fromString and a def $unknown. I think it'd be useful to have a total, Option-less function like def fromStringOrUnknown(s: String): TheEnum generated in all open enums' companion objects.

@Baccata
Copy link
Contributor

Baccata commented Jan 2, 2025

Agreed

@kubukoz kubukoz added enhancement New feature or request good first issue Good for newcomers labels Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants