Last active
April 9, 2021 16:57
-
-
Save dagda1/12996048a837c193ab760b0a1e0dec56 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let isActive | |
if (inactive === false || (active && !inactive)) { | |
isActive = true | |
} else if (active === false || (inactive && !active)) { | |
isActive = false | |
} | |
// mutually exclusive string union cures this | |
// type State = 'ACTIVE' | 'INACTIVE'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment