Created
June 7, 2021 15:37
-
-
Save topherPedersen/daae9e8a2fc33f078da6d528a71149cb to your computer and use it in GitHub Desktop.
Nested "Enums" in TypeScript
This file contains 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 Foo { | |
A = "ActivityCode.Foo.A", | |
B = "ActivityCode.Foo.B", | |
C = "ActivityCode.Foo.C", | |
} | |
enum Bar { | |
A = "ActivityCode.Bar.A", | |
B = "ActivityCode.Bar.B", | |
C = "ActivityCode.Bar.C", | |
} | |
enum Baz { | |
A = "ActivityCode.Baz.A", | |
B = "ActivityCode.Baz.B", | |
C = "ActivityCode.Baz.C", | |
} | |
const ActivityCode = { | |
Foo, | |
Bar, | |
Baz, | |
}; | |
console.log(ActivityCode.Foo.A); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment