TS2814
Function with bodies can only merge with classes that are ambient.
Broken Code ❌
class MyClass {}
function MyClass(): void {}Your function cannot be named after your class, so you will have to rename your function:
Fixed Code ✔️
class MyClass {}
function MyFunctionWithAnotherName(): void {}Alternatively you can declare an ambient class which gets implemented by your function:
declare class MyClass {}
function MyClass(): void {}