enum.ts 297 B

12345678910111213141516171819202122232425
  1. enum Direction {
  2. Up = 1,
  3. Down,
  4. Left,
  5. Right
  6. }
  7. enum FileAccess {
  8. // constant members
  9. None,
  10. Read = 1 << 1,
  11. Write = 1 << 2,
  12. ReadWrite = Read | Write,
  13. // computed member
  14. G = "123".length
  15. }
  16. enum Empty {
  17. }
  18. const enum Enum {
  19. A = 1,
  20. B = A * 2
  21. }