|
|
|
|
|
by lucasyvas
1608 days ago
|
|
This is the way, because iterating enums produces odd results due to a bidirectional mapping. I had always used enums in TS until this year, but union literals are better. I create my own enums with const objects, compute the type based off the object's values. So very similar this, just with an object as the source instead of an array. |
|