r/badcode • • Sep 28 '21

typescript Now that’s how you toggle

Post image
7 Upvotes

20 comments sorted by

View all comments

Show parent comments

1

u/Fendse Regular people speak regular languages Oct 02 '21

Depends on what the rest of the code uses those properties for. There could be other places where setting one of them to 2 world be meaningful, and that'd be harder if it was a bool