Skip to content

Commit 204487e

Browse files
authored
Merge pull request #232 from arnog/patch-3
Clarify the behavior of @inheritdoc
2 parents b2bdf5c + 59313cc commit 204487e

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"changes": [
3+
{
4+
"packageName": "@microsoft/tsdoc",
5+
"comment": "Improve documentation for `@inheritDoc`",
6+
"type": "patch"
7+
}
8+
],
9+
"packageName": "@microsoft/tsdoc",
10+
"email": "arnog@users.noreply.github.com"
11+
}

tsdoc/src/details/StandardTags.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,18 @@ export class StandardTags {
124124
* to the other item, which may be an unrelated class, or even an import from a
125125
* separate NPM package.
126126
*
127+
* What gets copied
128+
*
129+
* The `@inheritDoc` tag does not copy the entire comment body. Only the following
130+
* components are copied:
131+
* - summary section
132+
* - `@remarks` block
133+
* - `@params` blocks
134+
* - `@typeParam` blocks
135+
* - `@returns` block
136+
* Other tags such as `@defaultValue` or `@example` are not copied, and need to be
137+
* explicitly included after the `@inheritDoc` tag.
138+
*
127139
* TODO: The notation for API item references is still being standardized. See this issue:
128140
* https://github.com/microsoft/tsdoc/issues/9
129141
*/

0 commit comments

Comments
 (0)