Skip to content

TS4124: This member cannot have an 'override' modifier

Error message

                This member cannot have an 'override' modifier because it is not declared in the base class.
              

Quick summary

You marked a method with 'override' but the base class doesn't have a method with that name.

Why this happens

  • Method name doesn't match any base class method

  • Typo in the method name

  • Base class method was removed or renamed

Minimal example

✗ Broken code
class Base { greet() {} }
class Child extends Base {
  override wave() {} // TS4124: 'wave' not in Base
}
✓ Fixed code
class Base { greet() {} }
class Child extends Base {
  wave() {} // ✅ no override needed
}

Remove 'override' since 'wave' is a new method, not an override.

How to diagnose

  • Check the base class for a method with the same name

  • Verify the spelling of the method name

How to fix

  • Remove the 'override' keyword if the method is new

  • Fix the method name to match the base class method

← Back to language