Not sure how you would get an enum from a Union but you can easily do the reverse if you need both.
enum Status {
start,
loading,
stop
}
type StatusAsUnion = keyof typeof Status
Hopefully this was useful
Not sure how you would get an enum from a Union but you can easily do the reverse if you need both.
enum Status {
start,
loading,
stop
}
type StatusAsUnion = keyof typeof Status
Hopefully this was useful