typedoc 0.23.19 → 0.23.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,7 +1,27 @@
|
|
|
1
1
|
import { ConverterComponent } from "../components";
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
3
|
+
* Handles most behavior triggered by comments. `@group` and `@category` are handled by their respective plugins, but everything else is here.
|
|
4
|
+
*
|
|
5
|
+
* During conversion:
|
|
6
|
+
* - Handle visibility flags (`@private`, `@protected`. `@public`)
|
|
7
|
+
* - Handle module renames (`@module`)
|
|
8
|
+
* - Remove excluded tags & comment discovery tags (`@module`, `@packageDocumentation`)
|
|
9
|
+
* - Copy comments for type parameters from the parent container
|
|
10
|
+
*
|
|
11
|
+
* Resolve begin:
|
|
12
|
+
* - Remove hidden reflections
|
|
13
|
+
*
|
|
14
|
+
* Resolve:
|
|
15
|
+
* - Apply `@label` tag
|
|
16
|
+
* - Copy comments on signature containers to the signature if signatures don't already have a comment
|
|
17
|
+
* and then remove the comment on the container.
|
|
18
|
+
* - Copy comments from signatures to parameters and type parameters (again? why?)
|
|
19
|
+
* - Apply `@group` and `@category` tags
|
|
20
|
+
*
|
|
21
|
+
* Resolve end:
|
|
22
|
+
* - Copy auto inherited comments from heritage clauses
|
|
23
|
+
* - Handle `@inheritDoc`
|
|
24
|
+
* - Resolve `@link` tags to point to target reflections
|
|
5
25
|
*/
|
|
6
26
|
export declare class CommentPlugin extends ConverterComponent {
|
|
7
27
|
excludeTags: `@${string}`[];
|
|
@@ -33,8 +33,28 @@ const NEVER_RENDERED = [
|
|
|
33
33
|
"@typedef",
|
|
34
34
|
];
|
|
35
35
|
/**
|
|
36
|
-
*
|
|
37
|
-
*
|
|
36
|
+
* Handles most behavior triggered by comments. `@group` and `@category` are handled by their respective plugins, but everything else is here.
|
|
37
|
+
*
|
|
38
|
+
* During conversion:
|
|
39
|
+
* - Handle visibility flags (`@private`, `@protected`. `@public`)
|
|
40
|
+
* - Handle module renames (`@module`)
|
|
41
|
+
* - Remove excluded tags & comment discovery tags (`@module`, `@packageDocumentation`)
|
|
42
|
+
* - Copy comments for type parameters from the parent container
|
|
43
|
+
*
|
|
44
|
+
* Resolve begin:
|
|
45
|
+
* - Remove hidden reflections
|
|
46
|
+
*
|
|
47
|
+
* Resolve:
|
|
48
|
+
* - Apply `@label` tag
|
|
49
|
+
* - Copy comments on signature containers to the signature if signatures don't already have a comment
|
|
50
|
+
* and then remove the comment on the container.
|
|
51
|
+
* - Copy comments from signatures to parameters and type parameters (again? why?)
|
|
52
|
+
* - Apply `@group` and `@category` tags
|
|
53
|
+
*
|
|
54
|
+
* Resolve end:
|
|
55
|
+
* - Copy auto inherited comments from heritage clauses
|
|
56
|
+
* - Handle `@inheritDoc`
|
|
57
|
+
* - Resolve `@link` tags to point to target reflections
|
|
38
58
|
*/
|
|
39
59
|
let CommentPlugin = class CommentPlugin extends components_1.ConverterComponent {
|
|
40
60
|
/**
|
|
@@ -89,6 +89,17 @@ let InheritDocPlugin = class InheritDocPlugin extends components_1.ConverterComp
|
|
|
89
89
|
copyComment(source, target) {
|
|
90
90
|
if (!target.comment)
|
|
91
91
|
return;
|
|
92
|
+
if (!source.comment &&
|
|
93
|
+
source instanceof models_1.DeclarationReflection &&
|
|
94
|
+
source.signatures) {
|
|
95
|
+
source = source.signatures[0];
|
|
96
|
+
}
|
|
97
|
+
if (!source.comment &&
|
|
98
|
+
source instanceof models_1.DeclarationReflection &&
|
|
99
|
+
source.type instanceof models_1.ReflectionType &&
|
|
100
|
+
source.type.declaration.signatures) {
|
|
101
|
+
source = source.type.declaration.signatures[0];
|
|
102
|
+
}
|
|
92
103
|
if (!source.comment) {
|
|
93
104
|
this.application.logger.warn(`${target.getFullName()} tried to copy a comment from ${source.getFullName()} with @inheritDoc, but the source has no associated comment.`);
|
|
94
105
|
return;
|