I have a custom enum called PathDirection that represents different directions
export enum PathDirection {
LEFT="LEFT";
RIGHT="RIGHT";
};
Within my code, I need to toggle between the two directions. For example:
let currentDirection = PathDirection.LEFT;
currentDirection = !currentDirection;
Is there a way to modify the logical operator !
so it can handle this scenario?