-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Added enum example in variables section. #25
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
Added enum example in variables section. #25
Conversation
README.md
Outdated
|
||
```ts | ||
enum GENRE { | ||
ROMANTIC = 'Romantic', |
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.
What is the motivation behind this enum being string-based?
It is then arguable that it has advantage over bad example with just constants.
Would it be better maybe to use constant member, like:
enum Genre {
Romantic,
Drama,
...
}
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.
I rethought the intent and motivation of enum.
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.
Much better now!
Please fix only the small typo I suggested in comments.
README.md
Outdated
configureFilm(genre) { | ||
switch (genre) { | ||
case GENRE.ROMANTIC: | ||
// some logit to be executed |
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.
Typo: logit
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.
Done!
README.md
Outdated
configureFilm(genre) { | ||
switch (genre) { | ||
case GENRE.ROMANTIC: | ||
// some logit to be executed |
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.
Same typo logit
No description provided.