-
Notifications
You must be signed in to change notification settings - Fork 58
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
refactor: access policy enum #4601
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
…into js/refactor-access-policy-enum
The deployment to the dev cluster was successful. You can find the deployment here: https://4601.development.scrumlr.fra.ics.inovex.io Deployed Images
|
🐙 OctomindTest Report: 14/14 successful.
commit sha: 4d85aaf |
Description
Problem: Since the very beginning,
AccessPolicy
was an enum. This might look nice to use but actually causes some trouble, especially when trying to cast json data from an endpoint. Sure you can usetypeof keyof AccessPolicy
but that has other disadvantages.So, this PR simply replaces the enum in favour of an union type.
Further reading: https://dev.to/ivanzm123/dont-use-enums-in-typescript-they-are-very-dangerous-57bh
Changelog
AccessPolicy
from enum to union typeChecklist