Skip to content

Instantly share code, notes, and snippets.

@alaboudi
Last active June 16, 2020 17:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alaboudi/e0539cd061b77a201a14faa613029102 to your computer and use it in GitHub Desktop.
Save alaboudi/e0539cd061b77a201a14faa613029102 to your computer and use it in GitHub Desktop.
traffic Light Enum
Enum TrafficLightColors {
Red,
Yellow,
Green
}
const passingTrafficLight: TrafficLightColors = TrafficLightColors.Red; // this will pass
const failingTrafficLight: TrafficLightColors = "green" // :( This will fail
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment