TS4112

error TS4112: This member cannot have an ‘override’ modifier because its containing class does not extend another class.

Broken Code ❌

1
2
3
4
5
class Cat {
override makeNoise(): string {
return 'Meow!';
}
}

Fixed Code ✔️

1
2
3
4
5
class Cat {
makeNoise(): string {
return 'Meow!';
}
}