﻿# 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\.

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:

```cpp
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:

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

To avoid such errors related to method override in TypeScript, use the [`override`](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-3.html#override-and-the---noimplicitoverride-flag) keyword:

```cpp
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`](https://www.typescriptlang.org/tsconfig/#noImplicitOverride) settings can be enabled in `tsconfig.json`\.

```cpp
{
  "compilerOptions": {
    "noImplicitOverride": true
  }
}
```

To avoid such errors in JavaScript, use the [`@override`](https://www.typescriptlang.org/docs/handbook/jsdoc-supported-types.html#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\.