Skip to content

Instantly share code, notes, and snippets.

@dagda1
Last active Apr 9, 2021
Embed
What would you like to do?
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