JSDoc tags get lost when inheriting from a grandparent class #58151
Labels
Help Wanted
You can do this
Possible Improvement
The current behavior isn't wrong, but it's possible to see that it might be better in some cases
Milestone
π Search Terms
jsdoc tag inherit
π Version & Regression Information
β― Playground Link
https://www.typescriptlang.org/play?#code/MYGwhgzhAECC0G8CwAoa7oHoBU3qo3TwBEBTCYAJwEsAHAF2oHsA7aAC1MtIDoDC8-DHgACAN2qV6AVzAghRaNkwKAZkyYAKAJSJoAX1SGUqUJBgAhaKQAe9UiwAmMeMjQYmYrjUelo6rV0EAyNUU3AoaABhazsHZ2grN0JPb2pffw0dPWN9IA
π» Code
π Actual behavior
Only the description text is provided for
C.foo
.π Expected behavior
Both the description text and the tag should be provided for
C.foo
, just as the behavior ofB.foo
.Additional information about the issue
I'm trying to provide a solution for #1534 by using typescript-eslint + JSDoc tag. This bug makes
@virtual
tag disappear and I will not be able to overrideC.foo
in "strict-virtual" mode.Also note that
@inheritdoc
tag doesn't work here. Adding@inheritdoc
toB.foo
will only provide@inheritdoc
itself toC.foo
, instead of the@virtual
tag, which is an unexpected and unuseful behavior.The text was updated successfully, but these errors were encountered: