How can i use an enum in typescript?

Example:

enum Colors {
    Red,
    Green,
    Blue
}
const myColor: Colors = Colors.Red;
In TypeScript, enums allow for a clearer and more readable way to handle sets of related values.

Beginner's Guide to TypeScript