TS2814
error TS2814: Function with bodies can only merge with classes that are ambient.
Solution
Broken Code ❌
1 |
|
Your function
cannot be named after your class
, so you will have to rename your function:
Fixed Code ✔️
1 |
|
Alternatively you can declare an ambient class which gets implemented by your function:
1 |
|