TS2390

error TS2390: Constructor implementation is missing.

Broken Code ❌

1
2
3
class MyMessenger {
constructor(public message: string);
}

Fixed Code ✔️

A constructor implementation must be put in curly brackets:

1
2
3
class MyMessenger {
constructor(public message: string) {}
}