typedoc 0.23.18 → 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
- * A handler that parses TypeDoc comments and attaches {@link Comment} instances to
4
- * the generated reflections.
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
- * A handler that parses TypeDoc comments and attaches {@link Comment} instances to
37
- * the generated reflections.
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;
@@ -13,7 +13,7 @@ const toolbar = (context, props) => (utils_1.JSX.createElement("header", { class
13
13
  utils_1.JSX.createElement("ul", { class: "results" },
14
14
  utils_1.JSX.createElement("li", { class: "state loading" }, "Preparing search index..."),
15
15
  utils_1.JSX.createElement("li", { class: "state failure" }, "The search index is not available")),
16
- utils_1.JSX.createElement("a", { href: context.options.getValue("titleLink") ?? context.relativeURL("index.html"), class: "title" }, props.project.name)),
16
+ utils_1.JSX.createElement("a", { href: context.options.getValue("titleLink") || context.relativeURL("index.html"), class: "title" }, props.project.name)),
17
17
  utils_1.JSX.createElement("div", { class: "table-cell", id: "tsd-widgets" },
18
18
  utils_1.JSX.createElement("a", { href: "#", class: "tsd-widget tsd-toolbar-icon menu no-caption", "data-toggle": "menu", "aria-label": "Menu" }, context.icons.menu())))));
19
19
  exports.toolbar = toolbar;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "typedoc",
3
3
  "description": "Create api documentation for TypeScript projects.",
4
- "version": "0.23.18",
4
+ "version": "0.23.20",
5
5
  "homepage": "https://typedoc.org",
6
6
  "main": "./dist/index.js",
7
7
  "exports": {