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

Force use of enums #448

Open
baileys-li opened this issue Jan 10, 2025 · 2 comments · May be fixed by #450
Open

Force use of enums #448

baileys-li opened this issue Jan 10, 2025 · 2 comments · May be fixed by #450

Comments

@baileys-li
Copy link

It's a little annoying that the library forces me to use enгms in string props.

image

I think better way is change them to Union string type. Example

type  Theme =  "dark" | "light" | "auto"

This way is more preferred in the community, for example it is advised by Matt Pocock.

Also current way not only force pushing using enum in such context, but force push enum code style. Library's enums styled like UperCamelCase in name and SCREAMING_CASE for keys. It's not suitable for every project. Even Typescript Documentation use UperCamelCase for name and case

@ealush
Copy link
Owner

ealush commented Jan 10, 2025 via email

@baileys-li
Copy link
Author

Hi, @ealush! Yeah, I'll do it later

@baileys-li baileys-li linked a pull request Jan 28, 2025 that will close this issue
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 a pull request may close this issue.

2 participants