error TS4122: This member cannot have a JSDoc comment with an '@override' tag because it is not declared in the base class 'Shape'. is reported for an @override tag on a member that overrides nothing. It is checked whether or not noImplicitOverride is on.
This is the check that makes @override worth writing: if the base class renames area to surface, every subclass area that says @override is reported, instead of quietly becoming an unrelated method.
At a glance
| Code | TS4122 |
|---|---|
| Message | This member cannot have a JSDoc comment with an '@override' tag because it is not declared in the base class '{0}'. |
| TypeScript's category | error |
| Listed under | Classes, JSX and unused code |
| Turned on by | No option: every checked file reports it |
| In .js files | Reported when the file is checked: checkJs in jsconfig.json, or // @ts-check at the top of the file |
The message is TypeScript's own text from its diagnostic messages file (Apache-2.0); {0} is filled in by tsc for each error.
What it looks like
export class Shape {
area() {
return 0;
}
}
export class Square extends Shape {
/** @param {number} side */
constructor(side) {
super();
this.side = side;
}
/** @override */
perimeter() {error TS4122: This member cannot have a JSDoc comment with an '@override' tag because it is not declared in the base class 'Shape'.
return 4 * this.side;
}
}jsconfig.json for this example
{
"compilerOptions": {
"checkJs": true,
"noEmit": true,
"strict": true,
"target": "es2022",
"module": "nodenext",
"types": []
},
"include": ["*.js"]
} What causes it
- The member's name is misspelled, or the base class method was renamed or removed.
- The method is new in the subclass and was tagged by habit.
How to fix it
Override a real member, or remove the tag
Rename the method to the base class's name if it was meant to override, or drop @override from a method that is new in the subclass.
export class Shape {
area() {
return 0;
}
}
export class Square extends Shape {
/** @param {number} side */
constructor(side) {
super();
this.side = side;
}
/** @override */
area() {
return this.side ** 2;
}
perimeter() {
return 4 * this.side;
}
}jsconfig.json for this example
{
"compilerOptions": {
"checkJs": true,
"noEmit": true,
"strict": true,
"target": "es2022",
"module": "nodenext",
"types": []
},
"include": ["*.js"]
} Gotchas
- A class without an
extendsclause has no base class, so@overridethere is a different error, TS4121 ("its containing class ... does not extend another class").
Sources
- JSDoc Reference: @override · TypeScript handbook
- TSConfig Reference: noImplicitOverride · TypeScript
- diagnosticMessages.json (TypeScript 5.9.3) · TypeScript on GitHub
Last reviewed 20 October 2026.