You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Should it be documented somewhere (i.e. the "JSDoc Reference page"?) that you can write JSDoc comments on interfaces, and implementing classes automatically inherit them?
Maybe this is specific to the tooling and not to TypeScript itself, but @inheritdoc is mentioned in the TypeScript docs.
@inheritdoc is listed under Unsupported tags, which says there's an open issue for it (#23215). That issue is now closed, maybe docs should change to reflect this? It looks like @inheritdoc is now supported, but only for static class members? (I'm a bit unclear).
However, I noticed that in tooling I use (VSCode) and also the TS Playground, that the expected thing automatically happens without the need for @inheritdoc. In fact, if you do try to use @inheritdoc, it overwrites the summary section with the string {@inheritdoc ...}, but if you omit it completely, it correctly inherits all relevant parts of the JSDoc from the interface.
I'm not sure what happens with documentation site generation tools. Based on reading issue #1498, it looks like TypeDoc aims to support this, but someone at the bottom mentioned it was still not working, also it is maybe less powerful or complete than VSCode (does not work for some more complex cases like Omitting members).
If you want to send a PR to clarify something, we'd appreciate it, but per #2804, we aren't accepting issues that are not "critical", and it doesn't seem like you used the issue template.
Should it be documented somewhere (i.e. the "JSDoc Reference page"?) that you can write JSDoc comments on interfaces, and implementing classes automatically inherit them?
Maybe this is specific to the tooling and not to TypeScript itself, but
@inheritdoc
is mentioned in the TypeScript docs.@inheritdoc
is listed under Unsupported tags, which says there's an open issue for it (#23215). That issue is now closed, maybe docs should change to reflect this? It looks like@inheritdoc
is now supported, but only for static class members? (I'm a bit unclear).@inheritdoc
. In fact, if you do try to use@inheritdoc
, it overwrites the summary section with the string{@inheritdoc ...}
, but if you omit it completely, it correctly inherits all relevant parts of the JSDoc from the interface.Omit
ting members).Playground link
The text was updated successfully, but these errors were encountered: