Skip to content

typescript/no-unsafe-declaration-merging Correctness

This rule is turned on by default.

What it does

Disallow unsafe declaration merging.

Why is this bad?

Declaration merging between classes and interfaces is unsafe. The TypeScript compiler doesn't check whether properties are initialized, which can cause lead to TypeScript not detecting code that will cause runtime errors.

Example

ts
interface Foo {}
class Foo {}

References

Released under the MIT License.