π Search Terms
noImplicitOverride, JSDoc @overload, @override, TS4119, checkJs
π Version & Regression Information
- This changed between versions 6.0.3 and 7.0.2 (still present in 7.1.0-dev.20260929.1)
β― Playground Link
No response
π» Code
// a.js
class Base {
/**
* @param {string} x
* @returns {string}
*/
f(x) {
return x
}
}
class Derived extends Base {
/**
* @override
* @overload
* @param {'a'} x
* @returns {'a'}
*/
/**
* @override
* @param {string} x
* @returns {string}
*/
f(x) {
return x
}
}
export {}
π Actual behavior
a.js(14,7): error TS4119: This member must have a JSDoc comment with an '@override' tag because it overrides a member in the base class 'Base'.
π Expected behavior
No error, as in 6.0.3. The overload signature has an @override tag.
Additional information about the issue
Possibly related: microsoft/typescript-go#4044 (JSDoc @override not mapped to the override modifier in declaration emit; fixed), which suggests the overload path wasn't covered.
π Search Terms
noImplicitOverride, JSDoc@overload,@override, TS4119, checkJsπ Version & Regression Information
β― Playground Link
No response
π» Code
π Actual behavior
π Expected behavior
No error, as in 6.0.3. The overload signature has an
@overridetag.Additional information about the issue
Possibly related: microsoft/typescript-go#4044 (JSDoc
@overridenot mapped to theoverridemodifier in declaration emit; fixed), which suggests the overload path wasn't covered.