At work, when I was helping with some frontend stuff, we used object literals.
const DIRECTIONS = {
UP: "UP",
DOWN: "DOWN"
} as const;
type DIRECTIONS = typeof DIRECTIONS[keyof typeof DIRECTIONS];
Taken from option 2 in this blog post. https://maxheiber.medium.com/alternatives-to-typescript-enums-50e4c16600b1`___`