Last active
October 14, 2016 18:23
-
-
Save nikolovlazar/1ecfcc005bb35e947f5913e27149d238 to your computer and use it in GitHub Desktop.
TypeScript String Enums (or any type at all)
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
enum Screens { | |
Splash = <any>"Splash", | |
Login = <any>"Login", | |
Dashboard = <any>"Dashboard", | |
Settings = <any>"Settings", | |
Friends = <any>"Friends" | |
} | |
console.log(Screens.Splash) // => Splash | |
console.log(Screens.Login) // => Login | |
console.log(Screens.Dashboard) // => Dashboard | |
console.log(Screens.Settings) // => Settings | |
console.log(Screens.Friends) // => Friends |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment