I define a simple enum like so:
export enum Type {
TEST_ONE = "testing.one",
TEST_TWO = "testing.two",
BETA = "beta.one"
}
Now I want to execute a function for each enum string value. Let's say something like this:
executeType(type: string) { console.log(type) }
Object.keys(Type).forEach(
type => {
executeType(type);
}
)
This outputs the enum values like TEST_ONE and BETA. How would I go about printing testing.one and beta.one. I've tried using type.toString() and type.valueOf().