getting value of enum type typescript code example Example: enum in ts enum Direction { Up, Down, Left, Right, }