-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
There are a few mismatches between how Javadoc and Java annotations work vs how typescript and typedoc behave around inheritance:
- Inherited members in TS must be re-declared in subtypes
- In Java,
@Deprecatedis inherited (though confusingly, it isn't itself marked as@Inherited, and I can't find specific docs that suggest it should be treated that way). The Typedoc tool treats@deprecatedlike it is inherited, and displays overrides as being deprecated, but typescript in VSCode does not show the overridden member to be deprecated. - The ts annotation
@deprecatedis a typedoc tag, so to explicitly mark downstream members as deprecated (as Java treats them), the downstream member needs jsdoc. - Like javadoc, if an overriding member has its own jsdoc, the overridden element's docs are ignored. One way to deal with that is
@inheritDoc.
My conclusion is that a Java type/method with a) no javadoc that b) extends from or overrides something deprecated should always have a short typedoc string attached to it:
/**
* @inheritDoc
* @deprecated
*/This will correctly show that the type/member is deprecated, and will still show the expected documentation.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels