DEV Community

Discussion on: Basic TypeScript {Day - 28}

ronaldoperes profile image
Ronaldo Peres • Edited on


C#: An enumeration type (or enum type) is a value type defined by a set of named constants of the underlying integral numeric type.

Typescript: Enums are one of the few features TypeScript has which is not a type-level extension of JavaScript. Enums allow a developer to define a set of named constants. Using enums can make it easier to document intent, or create a set of distinct cases. TypeScript provides both numeric and string-based enums.