Our website uses cookies to enhance your browsing experience.
Accept
to the top
>
>
>
V7034. The method in the child class...
menu mobile close menu
Additional information
toggle menu Contents

V7034. The method in the child class does not override or implement the method of the ancestor class. A typo may be present in the name of the child class method.

Aug 04 2026

The analyzer has detected that a method does not override another method from the ancestor class or implement a method from an interface, although their signatures are very similar.

The example:

class ClassA {
    public receiveArguments(arg1: string, arg2: number): void {
       // ....
    }

    // ....
}

class ClassB extends ClassA {
    recieveArguments(arg1: string, arg2: number): void {   // <=
        // ....
    }

    // ....
}

In the example, a typo is in the name of the receiveArguments method in the ClassB class. As a result, the method does not override the base class method as intended.

The fixed code:

class ClassB extends ClassA {
    receiveArguments(arg1: string, arg2: number): void {
        ....
    }
}

To avoid such errors related to method override in TypeScript, use the override keyword:

class ClassB extends ClassA {
    override receiveArguments(arg1: string, arg2: number): void {
        // ....
    }
}

If the override keyword is specified, but the method does not override an existing method, the compiler reports an error and the program will not compile.

To make the override keyword mandatory for all overridden methods, the compiler's noImplicitOverride settings can be enabled in tsconfig.json.

{
  "compilerOptions": {
    "noImplicitOverride": true
  }
}

To avoid such errors in JavaScript, use the @override JSDoc annotation to mark overriding methods. It allows development tools to generate special warnings on the non-existent method that is attempted to override.

What a quick draw in the Wild West of Coding —
you caught the bug in sec!
But we catch them in milliseconds. How about a duel?

Try free