TS2567

Enum declarations can only merge with namespace or other enum declarations. lib.dom.d.ts(18299, 6): 'ResponseType' was also declared here.

Broken Code ❌

enum ResponseType {
  ACTIVE,
  ERROR,
}

Fixed Code ✔️

In the broken code shown above, a type ResponseType is already declared as part of the "dom" typings. Enums can be merged with other enums but since the other declaration of ResponseType is a type, we cannot merge the existing declaration with our custom one. That's why we have to remove "dom" from the "lib" entries in our "tsconfig.json" file or use a different name for our enum:

enum MyResponseType {
  ACTIVE,
  ERROR,
}