# TS2567: Enum declarations can only merge with namespace or other enum declarations.

> An enum shares its name with a class, function, interface or variable. Rename one of them; enums only merge with other enums and namespaces.

## What it means

An enum can be declared more than once, and it can merge with a namespace of the same name.
It can't share its name with any other kind of declaration, such as a function, class or
variable, because the enum's object and the other value would collide at runtime.

## Example

```ts
enum Color { Red }
function Color() {}
export {};
```

## How to fix

- Rename the enum or the other declaration.
- If you wanted to add members or helpers to the enum, use a `namespace` of the same name.

Source: https://ts-r.dev/errors/TS2567/
