typedoc 0.26.11 → 0.27.0-beta.0
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.
- package/bin/package.json +3 -0
- package/bin/typedoc +1 -1
- package/dist/index.d.ts +23 -13
- package/dist/index.js +22 -81
- package/dist/lib/application-events.js +1 -4
- package/dist/lib/application.d.ts +26 -16
- package/dist/lib/application.js +222 -242
- package/dist/lib/cli.js +3 -40
- package/dist/lib/converter/comments/blockLexer.d.ts +1 -1
- package/dist/lib/converter/comments/blockLexer.js +24 -30
- package/dist/lib/converter/comments/declarationReference.js +10 -21
- package/dist/lib/converter/comments/declarationReferenceResolver.d.ts +2 -2
- package/dist/lib/converter/comments/declarationReferenceResolver.js +40 -36
- package/dist/lib/converter/comments/discovery.d.ts +4 -4
- package/dist/lib/converter/comments/discovery.js +154 -172
- package/dist/lib/converter/comments/index.d.ts +4 -4
- package/dist/lib/converter/comments/index.js +39 -50
- package/dist/lib/converter/comments/lexer.d.ts +1 -1
- package/dist/lib/converter/comments/lexer.js +2 -5
- package/dist/lib/converter/comments/lineLexer.d.ts +1 -1
- package/dist/lib/converter/comments/lineLexer.js +12 -15
- package/dist/lib/converter/comments/linkResolver.d.ts +2 -2
- package/dist/lib/converter/comments/linkResolver.js +14 -21
- package/dist/lib/converter/comments/parser.d.ts +6 -6
- package/dist/lib/converter/comments/parser.js +69 -96
- package/dist/lib/converter/comments/rawLexer.d.ts +1 -1
- package/dist/lib/converter/comments/rawLexer.js +13 -16
- package/dist/lib/converter/comments/tagName.js +1 -4
- package/dist/lib/converter/comments/textParser.d.ts +4 -4
- package/dist/lib/converter/comments/textParser.js +28 -30
- package/dist/lib/converter/components.d.ts +2 -3
- package/dist/lib/converter/components.js +2 -7
- package/dist/lib/converter/context.d.ts +9 -9
- package/dist/lib/converter/context.js +54 -44
- package/dist/lib/converter/convert-expression.js +16 -23
- package/dist/lib/converter/converter-events.d.ts +1 -0
- package/dist/lib/converter/converter-events.js +2 -4
- package/dist/lib/converter/converter.d.ts +16 -13
- package/dist/lib/converter/converter.js +210 -238
- package/dist/lib/converter/factories/index-signature.d.ts +1 -1
- package/dist/lib/converter/factories/index-signature.js +11 -17
- package/dist/lib/converter/factories/signature.d.ts +2 -2
- package/dist/lib/converter/factories/signature.js +95 -106
- package/dist/lib/converter/index.d.ts +6 -7
- package/dist/lib/converter/index.js +3 -11
- package/dist/lib/converter/jsdoc.d.ts +1 -1
- package/dist/lib/converter/jsdoc.js +34 -41
- package/dist/lib/converter/plugins/CategoryPlugin.d.ts +6 -21
- package/dist/lib/converter/plugins/CategoryPlugin.js +57 -139
- package/dist/lib/converter/plugins/CommentPlugin.d.ts +3 -5
- package/dist/lib/converter/plugins/CommentPlugin.js +153 -163
- package/dist/lib/converter/plugins/GroupPlugin.d.ts +10 -9
- package/dist/lib/converter/plugins/GroupPlugin.js +87 -124
- package/dist/lib/converter/plugins/ImplementsPlugin.d.ts +3 -5
- package/dist/lib/converter/plugins/ImplementsPlugin.js +255 -321
- package/dist/lib/converter/plugins/IncludePlugin.d.ts +11 -0
- package/dist/lib/converter/plugins/IncludePlugin.js +72 -0
- package/dist/lib/converter/plugins/InheritDocPlugin.d.ts +4 -3
- package/dist/lib/converter/plugins/InheritDocPlugin.js +41 -72
- package/dist/lib/converter/plugins/LinkResolverPlugin.d.ts +5 -5
- package/dist/lib/converter/plugins/LinkResolverPlugin.js +37 -58
- package/dist/lib/converter/plugins/MergeModuleWithPlugin.d.ts +12 -0
- package/dist/lib/converter/plugins/MergeModuleWithPlugin.js +49 -0
- package/dist/lib/converter/plugins/PackagePlugin.d.ts +4 -3
- package/dist/lib/converter/plugins/PackagePlugin.js +62 -111
- package/dist/lib/converter/plugins/SourcePlugin.d.ts +3 -5
- package/dist/lib/converter/plugins/SourcePlugin.js +69 -110
- package/dist/lib/converter/plugins/TypePlugin.d.ts +4 -6
- package/dist/lib/converter/plugins/TypePlugin.js +95 -158
- package/dist/lib/converter/plugins/index.d.ts +10 -9
- package/dist/lib/converter/plugins/index.js +10 -21
- package/dist/lib/converter/symbols.d.ts +1 -1
- package/dist/lib/converter/symbols.js +234 -227
- package/dist/lib/converter/types.d.ts +2 -2
- package/dist/lib/converter/types.js +252 -237
- package/dist/lib/converter/utils/nodes.js +5 -13
- package/dist/lib/converter/utils/reflections.d.ts +1 -1
- package/dist/lib/converter/utils/reflections.js +4 -7
- package/dist/lib/converter/utils/repository.d.ts +1 -1
- package/dist/lib/converter/utils/repository.js +103 -97
- package/dist/lib/converter/utils/symbols.js +3 -9
- package/dist/lib/internationalization/index.d.ts +3 -4
- package/dist/lib/internationalization/index.js +3 -8
- package/dist/lib/internationalization/internationalization.d.ts +5 -4
- package/dist/lib/internationalization/internationalization.js +97 -103
- package/dist/lib/internationalization/locale-utils.cjs +8 -0
- package/dist/lib/internationalization/locale-utils.d.cts +8 -0
- package/dist/lib/internationalization/locales/en.cjs +366 -2
- package/dist/lib/internationalization/locales/en.d.cts +339 -2
- package/dist/lib/internationalization/locales/jp.cjs +8 -11
- package/dist/lib/internationalization/locales/jp.d.cts +310 -1
- package/dist/lib/internationalization/locales/ko.cjs +7 -9
- package/dist/lib/internationalization/locales/ko.d.cts +223 -1
- package/dist/lib/internationalization/locales/zh.cjs +7 -10
- package/dist/lib/internationalization/locales/zh.d.cts +381 -1
- package/dist/lib/internationalization/translatable.d.ts +4 -327
- package/dist/lib/internationalization/translatable.js +2 -360
- package/dist/lib/models/FileRegistry.d.ts +20 -9
- package/dist/lib/models/FileRegistry.js +54 -45
- package/dist/lib/models/ReflectionCategory.d.ts +2 -2
- package/dist/lib/models/ReflectionCategory.js +16 -12
- package/dist/lib/models/ReflectionGroup.d.ts +3 -3
- package/dist/lib/models/ReflectionGroup.js +23 -14
- package/dist/lib/models/comments/comment.d.ts +23 -37
- package/dist/lib/models/comments/comment.js +388 -325
- package/dist/lib/models/comments/index.d.ts +2 -2
- package/dist/lib/models/comments/index.js +1 -6
- package/dist/lib/models/index.d.ts +7 -7
- package/dist/lib/models/index.js +7 -23
- package/dist/lib/models/reflections/ReflectionSymbolId.d.ts +2 -2
- package/dist/lib/models/reflections/ReflectionSymbolId.js +42 -34
- package/dist/lib/models/reflections/abstract.d.ts +17 -20
- package/dist/lib/models/reflections/abstract.js +249 -256
- package/dist/lib/models/reflections/container.d.ts +7 -7
- package/dist/lib/models/reflections/container.js +43 -16
- package/dist/lib/models/reflections/declaration.d.ts +15 -12
- package/dist/lib/models/reflections/declaration.js +150 -29
- package/dist/lib/models/reflections/document.d.ts +3 -3
- package/dist/lib/models/reflections/document.js +26 -13
- package/dist/lib/models/reflections/index.d.ts +15 -15
- package/dist/lib/models/reflections/index.js +12 -31
- package/dist/lib/models/reflections/kind.d.ts +1 -1
- package/dist/lib/models/reflections/kind.js +3 -6
- package/dist/lib/models/reflections/parameter.d.ts +5 -4
- package/dist/lib/models/reflections/parameter.js +11 -13
- package/dist/lib/models/reflections/project.d.ts +14 -9
- package/dist/lib/models/reflections/project.js +104 -56
- package/dist/lib/models/reflections/reference.d.ts +3 -3
- package/dist/lib/models/reflections/reference.js +6 -9
- package/dist/lib/models/reflections/signature.d.ts +8 -8
- package/dist/lib/models/reflections/signature.js +35 -14
- package/dist/lib/models/reflections/type-parameter.d.ts +5 -5
- package/dist/lib/models/reflections/type-parameter.js +9 -10
- package/dist/lib/models/reflections/utils.js +1 -4
- package/dist/lib/models/reflections/variant.d.ts +8 -7
- package/dist/lib/models/reflections/variant.js +1 -2
- package/dist/lib/models/sources/file.d.ts +2 -2
- package/dist/lib/models/sources/file.js +22 -5
- package/dist/lib/models/sources/index.d.ts +1 -1
- package/dist/lib/models/sources/index.js +1 -5
- package/dist/lib/models/types.d.ts +26 -13
- package/dist/lib/models/types.js +236 -151
- package/dist/lib/output/components.d.ts +5 -11
- package/dist/lib/output/components.js +84 -125
- package/dist/lib/output/events.d.ts +3 -3
- package/dist/lib/output/events.js +128 -94
- package/dist/lib/output/formatter.d.ts +84 -0
- package/dist/lib/output/formatter.js +619 -0
- package/dist/lib/output/index.d.ts +9 -8
- package/dist/lib/output/index.js +7 -19
- package/dist/lib/output/models/UrlMapping.d.ts +2 -2
- package/dist/lib/output/models/UrlMapping.js +4 -5
- package/dist/lib/output/output.d.ts +13 -0
- package/dist/lib/output/output.js +72 -0
- package/dist/lib/output/plugins/AssetsPlugin.d.ts +7 -8
- package/dist/lib/output/plugins/AssetsPlugin.js +62 -80
- package/dist/lib/output/plugins/IconsPlugin.d.ts +3 -2
- package/dist/lib/output/plugins/IconsPlugin.js +28 -84
- package/dist/lib/output/plugins/JavascriptIndexPlugin.d.ts +9 -2
- package/dist/lib/output/plugins/JavascriptIndexPlugin.js +90 -96
- package/dist/lib/output/plugins/NavigationPlugin.d.ts +3 -2
- package/dist/lib/output/plugins/NavigationPlugin.js +22 -102
- package/dist/lib/output/plugins/SitemapPlugin.d.ts +3 -2
- package/dist/lib/output/plugins/SitemapPlugin.js +60 -120
- package/dist/lib/output/plugins/index.d.ts +6 -6
- package/dist/lib/output/plugins/index.js +6 -15
- package/dist/lib/output/renderer.d.ts +14 -13
- package/dist/lib/output/renderer.js +129 -185
- package/dist/lib/output/theme.d.ts +9 -5
- package/dist/lib/output/theme.js +14 -62
- package/dist/lib/output/themes/MarkedPlugin.d.ts +8 -9
- package/dist/lib/output/themes/MarkedPlugin.js +152 -117
- package/dist/lib/output/themes/default/DefaultTheme.d.ts +17 -29
- package/dist/lib/output/themes/default/DefaultTheme.js +334 -310
- package/dist/lib/output/themes/default/DefaultThemeRenderContext.d.ts +63 -48
- package/dist/lib/output/themes/default/DefaultThemeRenderContext.js +119 -95
- package/dist/lib/output/themes/default/Slugger.d.ts +13 -0
- package/dist/lib/output/themes/default/Slugger.js +46 -0
- package/dist/lib/output/themes/default/layouts/default.d.ts +5 -5
- package/dist/lib/output/themes/default/layouts/default.js +47 -36
- package/dist/lib/output/themes/default/partials/anchor-icon.d.ts +2 -2
- package/dist/lib/output/themes/default/partials/anchor-icon.js +4 -7
- package/dist/lib/output/themes/default/partials/breadcrumb.d.ts +3 -3
- package/dist/lib/output/themes/default/partials/breadcrumb.js +4 -8
- package/dist/lib/output/themes/default/partials/comment.d.ts +6 -4
- package/dist/lib/output/themes/default/partials/comment.js +52 -29
- package/dist/lib/output/themes/default/partials/footer.d.ts +2 -2
- package/dist/lib/output/themes/default/partials/footer.js +11 -14
- package/dist/lib/output/themes/default/partials/header.d.ts +4 -4
- package/dist/lib/output/themes/default/partials/header.js +9 -13
- package/dist/lib/output/themes/default/partials/hierarchy.d.ts +3 -3
- package/dist/lib/output/themes/default/partials/hierarchy.js +9 -12
- package/dist/lib/output/themes/default/partials/icon.d.ts +4 -4
- package/dist/lib/output/themes/default/partials/icon.js +78 -73
- package/dist/lib/output/themes/default/partials/index.d.ts +3 -3
- package/dist/lib/output/themes/default/partials/index.js +19 -22
- package/dist/lib/output/themes/default/partials/member.d.ts +3 -3
- package/dist/lib/output/themes/default/partials/member.declaration.d.ts +3 -3
- package/dist/lib/output/themes/default/partials/member.declaration.js +18 -61
- package/dist/lib/output/themes/default/partials/member.getterSetter.d.ts +3 -3
- package/dist/lib/output/themes/default/partials/member.getterSetter.js +10 -26
- package/dist/lib/output/themes/default/partials/member.js +19 -24
- package/dist/lib/output/themes/default/partials/member.signature.body.d.ts +3 -3
- package/dist/lib/output/themes/default/partials/member.signature.body.js +17 -21
- package/dist/lib/output/themes/default/partials/member.signature.title.d.ts +4 -7
- package/dist/lib/output/themes/default/partials/member.signature.title.js +8 -35
- package/dist/lib/output/themes/default/partials/member.signatures.d.ts +3 -3
- package/dist/lib/output/themes/default/partials/member.signatures.js +9 -13
- package/dist/lib/output/themes/default/partials/member.sources.d.ts +3 -3
- package/dist/lib/output/themes/default/partials/member.sources.js +13 -17
- package/dist/lib/output/themes/default/partials/members.d.ts +3 -3
- package/dist/lib/output/themes/default/partials/members.js +10 -42
- package/dist/lib/output/themes/default/partials/moduleReflection.d.ts +5 -0
- package/dist/lib/output/themes/default/partials/moduleReflection.js +62 -0
- package/dist/lib/output/themes/default/partials/navigation.d.ts +4 -4
- package/dist/lib/output/themes/default/partials/navigation.js +51 -62
- package/dist/lib/output/themes/default/partials/reflectionPreview.d.ts +3 -3
- package/dist/lib/output/themes/default/partials/reflectionPreview.js +12 -15
- package/dist/lib/output/themes/default/partials/toolbar.d.ts +4 -4
- package/dist/lib/output/themes/default/partials/toolbar.js +16 -20
- package/dist/lib/output/themes/default/partials/type.d.ts +4 -6
- package/dist/lib/output/themes/default/partials/type.js +8 -388
- package/dist/lib/output/themes/default/partials/typeAndParent.d.ts +3 -3
- package/dist/lib/output/themes/default/partials/typeAndParent.js +11 -15
- package/dist/lib/output/themes/default/partials/typeDetails.d.ts +8 -0
- package/dist/lib/output/themes/default/partials/typeDetails.js +221 -0
- package/dist/lib/output/themes/default/partials/typeParameters.d.ts +3 -3
- package/dist/lib/output/themes/default/partials/typeParameters.js +14 -17
- package/dist/lib/output/themes/default/templates/document.d.ts +4 -4
- package/dist/lib/output/themes/default/templates/document.js +3 -7
- package/dist/lib/output/themes/default/templates/hierarchy.d.ts +4 -4
- package/dist/lib/output/themes/default/templates/hierarchy.js +10 -13
- package/dist/lib/output/themes/default/templates/index.d.ts +4 -4
- package/dist/lib/output/themes/default/templates/index.js +3 -7
- package/dist/lib/output/themes/default/templates/reflection.d.ts +4 -4
- package/dist/lib/output/themes/default/templates/reflection.js +31 -34
- package/dist/lib/output/themes/lib.d.ts +17 -3
- package/dist/lib/output/themes/lib.js +110 -49
- package/dist/lib/serialization/components.d.ts +2 -5
- package/dist/lib/serialization/components.js +1 -2
- package/dist/lib/serialization/deserializer.d.ts +21 -7
- package/dist/lib/serialization/deserializer.js +138 -123
- package/dist/lib/serialization/events.d.ts +2 -2
- package/dist/lib/serialization/events.js +6 -5
- package/dist/lib/serialization/index.d.ts +5 -5
- package/dist/lib/serialization/index.js +4 -33
- package/dist/lib/serialization/schema.d.ts +8 -2
- package/dist/lib/serialization/schema.js +2 -2
- package/dist/lib/serialization/serializer.d.ts +11 -5
- package/dist/lib/serialization/serializer.js +32 -25
- package/dist/lib/utils/array.d.ts +3 -0
- package/dist/lib/utils/array.js +26 -27
- package/dist/lib/utils/component.d.ts +2 -44
- package/dist/lib/utils/component.js +10 -102
- package/dist/lib/utils/entry-point.d.ts +3 -4
- package/dist/lib/utils/entry-point.js +114 -85
- package/dist/lib/utils/enum.js +6 -14
- package/dist/lib/utils/events.js +6 -12
- package/dist/lib/utils/fs.js +50 -91
- package/dist/lib/utils/general.d.ts +2 -1
- package/dist/lib/utils/general.js +50 -40
- package/dist/lib/utils/highlighter.js +30 -57
- package/dist/lib/utils/hooks.js +7 -13
- package/dist/lib/utils/html-entities.d.ts +8926 -0
- package/dist/lib/utils/html-entities.js +2329 -0
- package/dist/lib/utils/html.d.ts +8 -0
- package/dist/lib/utils/html.js +81 -34
- package/dist/lib/utils/index.d.ts +22 -22
- package/dist/lib/utils/index.js +20 -91
- package/dist/lib/utils/jsx.d.ts +12 -5
- package/dist/lib/utils/jsx.elements.js +1 -4
- package/dist/lib/utils/jsx.js +53 -20
- package/dist/lib/utils/loggers.d.ts +3 -3
- package/dist/lib/utils/loggers.js +36 -46
- package/dist/lib/utils/map.js +6 -13
- package/dist/lib/utils/minimalSourceFile.js +5 -7
- package/dist/lib/utils/options/declaration.d.ts +33 -7
- package/dist/lib/utils/options/declaration.js +20 -22
- package/dist/lib/utils/options/defaults.d.ts +3 -2
- package/dist/lib/utils/options/defaults.js +18 -38
- package/dist/lib/utils/options/help.d.ts +2 -2
- package/dist/lib/utils/options/help.js +7 -10
- package/dist/lib/utils/options/index.d.ts +6 -6
- package/dist/lib/utils/options/index.js +4 -18
- package/dist/lib/utils/options/options.d.ts +8 -5
- package/dist/lib/utils/options/options.js +47 -71
- package/dist/lib/utils/options/readers/arguments.d.ts +2 -2
- package/dist/lib/utils/options/readers/arguments.js +15 -17
- package/dist/lib/utils/options/readers/index.d.ts +4 -4
- package/dist/lib/utils/options/readers/index.js +4 -11
- package/dist/lib/utils/options/readers/package-json.d.ts +3 -3
- package/dist/lib/utils/options/readers/package-json.js +15 -21
- package/dist/lib/utils/options/readers/tsconfig.d.ts +2 -2
- package/dist/lib/utils/options/readers/tsconfig.js +54 -63
- package/dist/lib/utils/options/readers/typedoc.d.ts +3 -3
- package/dist/lib/utils/options/readers/typedoc.js +44 -76
- package/dist/lib/utils/options/sources/index.d.ts +1 -1
- package/dist/lib/utils/options/sources/index.js +1 -5
- package/dist/lib/utils/options/sources/typedoc.d.ts +1 -1
- package/dist/lib/utils/options/sources/typedoc.js +220 -196
- package/dist/lib/utils/options/tsdoc-defaults.d.ts +3 -3
- package/dist/lib/utils/options/tsdoc-defaults.js +16 -12
- package/dist/lib/utils/package-manifest.d.ts +1 -1
- package/dist/lib/utils/package-manifest.js +15 -19
- package/dist/lib/utils/paths.js +9 -15
- package/dist/lib/utils/perf.js +6 -11
- package/dist/lib/utils/plugins.d.ts +1 -1
- package/dist/lib/utils/plugins.js +7 -10
- package/dist/lib/utils/reflections.d.ts +1 -1
- package/dist/lib/utils/reflections.js +9 -12
- package/dist/lib/utils/set.js +2 -6
- package/dist/lib/utils/sort.d.ts +3 -3
- package/dist/lib/utils/sort.js +20 -24
- package/dist/lib/utils/tsconfig.d.ts +1 -1
- package/dist/lib/utils/tsconfig.js +13 -21
- package/dist/lib/utils/tsutils.d.ts +1 -1
- package/dist/lib/utils/tsutils.js +3 -30
- package/dist/lib/utils/validation.js +6 -12
- package/dist/lib/validation/documentation.d.ts +2 -2
- package/dist/lib/validation/documentation.js +26 -29
- package/dist/lib/validation/exports.d.ts +2 -2
- package/dist/lib/validation/exports.js +9 -11
- package/dist/lib/validation/links.d.ts +2 -2
- package/dist/lib/validation/links.js +4 -7
- package/dist/lib/validation/unusedMergeModuleWith.d.ts +3 -0
- package/dist/lib/validation/unusedMergeModuleWith.js +11 -0
- package/package.json +14 -11
- package/static/main.js +4 -4
- package/static/style.css +91 -2
- package/tsdoc.json +30 -0
- package/dist/lib/output/themes/default/partials/member.reference.d.ts +0 -4
- package/dist/lib/output/themes/default/partials/member.reference.js +0 -30
- package/dist/lib/output/themes/default/partials/parameter.d.ts +0 -4
- package/dist/lib/output/themes/default/partials/parameter.js +0 -79
- package/dist/lib/utils/html-entities.json +0 -2326
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ReflectionCategory = void 0;
|
|
4
|
-
const comments_1 = require("./comments");
|
|
1
|
+
import { Comment } from "./comments/index.js";
|
|
5
2
|
/**
|
|
6
3
|
* A category of reflections.
|
|
7
4
|
*
|
|
@@ -9,17 +6,25 @@ const comments_1 = require("./comments");
|
|
|
9
6
|
* of the dispatcher. The main purpose of categories is to be able to more easily
|
|
10
7
|
* render human readable children lists in templates.
|
|
11
8
|
*/
|
|
12
|
-
class ReflectionCategory {
|
|
9
|
+
export class ReflectionCategory {
|
|
10
|
+
/**
|
|
11
|
+
* The title, a string representation of this category.
|
|
12
|
+
*/
|
|
13
|
+
title;
|
|
14
|
+
/**
|
|
15
|
+
* The user specified description, if any, set with `@categoryDescription`
|
|
16
|
+
*/
|
|
17
|
+
description;
|
|
18
|
+
/**
|
|
19
|
+
* All reflections of this category.
|
|
20
|
+
*/
|
|
21
|
+
children = [];
|
|
13
22
|
/**
|
|
14
23
|
* Create a new ReflectionCategory instance.
|
|
15
24
|
*
|
|
16
25
|
* @param title The title of this category.
|
|
17
26
|
*/
|
|
18
27
|
constructor(title) {
|
|
19
|
-
/**
|
|
20
|
-
* All reflections of this category.
|
|
21
|
-
*/
|
|
22
|
-
this.children = [];
|
|
23
28
|
this.title = title;
|
|
24
29
|
}
|
|
25
30
|
/**
|
|
@@ -32,7 +37,7 @@ class ReflectionCategory {
|
|
|
32
37
|
return {
|
|
33
38
|
title: this.title,
|
|
34
39
|
description: this.description
|
|
35
|
-
?
|
|
40
|
+
? Comment.serializeDisplayParts(serializer, this.description)
|
|
36
41
|
: undefined,
|
|
37
42
|
children: this.children.length > 0
|
|
38
43
|
? this.children.map((child) => child.id)
|
|
@@ -41,7 +46,7 @@ class ReflectionCategory {
|
|
|
41
46
|
}
|
|
42
47
|
fromObject(de, obj) {
|
|
43
48
|
if (obj.description) {
|
|
44
|
-
this.description =
|
|
49
|
+
this.description = Comment.deserializeDisplayParts(de, obj.description);
|
|
45
50
|
}
|
|
46
51
|
if (obj.children) {
|
|
47
52
|
de.defer((project) => {
|
|
@@ -55,4 +60,3 @@ class ReflectionCategory {
|
|
|
55
60
|
}
|
|
56
61
|
}
|
|
57
62
|
}
|
|
58
|
-
exports.ReflectionCategory = ReflectionCategory;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ReflectionCategory } from "./ReflectionCategory";
|
|
2
|
-
import type { CommentDisplayPart, DeclarationReflection, DocumentReflection, Reflection } from ".";
|
|
3
|
-
import type { Serializer, JSONOutput, Deserializer } from "../serialization";
|
|
1
|
+
import { ReflectionCategory } from "./ReflectionCategory.js";
|
|
2
|
+
import type { CommentDisplayPart, DeclarationReflection, DocumentReflection, Reflection } from "./index.js";
|
|
3
|
+
import type { Serializer, JSONOutput, Deserializer } from "../serialization/index.js";
|
|
4
4
|
/**
|
|
5
5
|
* A group of reflections. All reflections in a group are of the same kind.
|
|
6
6
|
*
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.ReflectionGroup = void 0;
|
|
4
|
-
const ReflectionCategory_1 = require("./ReflectionCategory");
|
|
5
|
-
const comments_1 = require("./comments");
|
|
1
|
+
import { ReflectionCategory } from "./ReflectionCategory.js";
|
|
2
|
+
import { Comment } from "./comments/index.js";
|
|
6
3
|
/**
|
|
7
4
|
* A group of reflections. All reflections in a group are of the same kind.
|
|
8
5
|
*
|
|
@@ -10,7 +7,24 @@ const comments_1 = require("./comments");
|
|
|
10
7
|
* of the dispatcher. The main purpose of groups is to be able to more easily
|
|
11
8
|
* render human readable children lists in templates.
|
|
12
9
|
*/
|
|
13
|
-
class ReflectionGroup {
|
|
10
|
+
export class ReflectionGroup {
|
|
11
|
+
owningReflection;
|
|
12
|
+
/**
|
|
13
|
+
* The title, a string representation of the typescript kind, of this group.
|
|
14
|
+
*/
|
|
15
|
+
title;
|
|
16
|
+
/**
|
|
17
|
+
* User specified description via `@groupDescription`, if specified.
|
|
18
|
+
*/
|
|
19
|
+
description;
|
|
20
|
+
/**
|
|
21
|
+
* All reflections of this group.
|
|
22
|
+
*/
|
|
23
|
+
children = [];
|
|
24
|
+
/**
|
|
25
|
+
* Categories contained within this group.
|
|
26
|
+
*/
|
|
27
|
+
categories;
|
|
14
28
|
/**
|
|
15
29
|
* Create a new ReflectionGroup instance.
|
|
16
30
|
*
|
|
@@ -19,10 +33,6 @@ class ReflectionGroup {
|
|
|
19
33
|
*/
|
|
20
34
|
constructor(title, owningReflection) {
|
|
21
35
|
this.owningReflection = owningReflection;
|
|
22
|
-
/**
|
|
23
|
-
* All reflections of this group.
|
|
24
|
-
*/
|
|
25
|
-
this.children = [];
|
|
26
36
|
this.title = title;
|
|
27
37
|
}
|
|
28
38
|
/**
|
|
@@ -35,7 +45,7 @@ class ReflectionGroup {
|
|
|
35
45
|
return {
|
|
36
46
|
title: this.title,
|
|
37
47
|
description: this.description
|
|
38
|
-
?
|
|
48
|
+
? Comment.serializeDisplayParts(serializer, this.description)
|
|
39
49
|
: undefined,
|
|
40
50
|
children: this.children.length > 0
|
|
41
51
|
? this.children.map((child) => child.id)
|
|
@@ -45,11 +55,11 @@ class ReflectionGroup {
|
|
|
45
55
|
}
|
|
46
56
|
fromObject(de, obj) {
|
|
47
57
|
if (obj.description) {
|
|
48
|
-
this.description =
|
|
58
|
+
this.description = Comment.deserializeDisplayParts(de, obj.description);
|
|
49
59
|
}
|
|
50
60
|
if (obj.categories) {
|
|
51
61
|
this.categories = obj.categories.map((catObj) => {
|
|
52
|
-
const cat = new
|
|
62
|
+
const cat = new ReflectionCategory(catObj.title);
|
|
53
63
|
de.fromObject(cat, catObj);
|
|
54
64
|
return cat;
|
|
55
65
|
});
|
|
@@ -66,4 +76,3 @@ class ReflectionGroup {
|
|
|
66
76
|
}
|
|
67
77
|
}
|
|
68
78
|
}
|
|
69
|
-
exports.ReflectionGroup = ReflectionGroup;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { Reflection } from "../reflections";
|
|
2
|
-
import { ReflectionSymbolId } from "../reflections/ReflectionSymbolId";
|
|
3
|
-
import type { Serializer, Deserializer, JSONOutput } from "../../serialization";
|
|
1
|
+
import type { Reflection } from "../reflections/index.js";
|
|
2
|
+
import { ReflectionSymbolId } from "../reflections/ReflectionSymbolId.js";
|
|
3
|
+
import type { Serializer, Deserializer, JSONOutput } from "../../serialization/index.js";
|
|
4
4
|
/**
|
|
5
5
|
* Represents a parsed piece of a comment.
|
|
6
6
|
* @category Comments
|
|
@@ -21,23 +21,16 @@ export type CommentDisplayPart =
|
|
|
21
21
|
| {
|
|
22
22
|
kind: "code";
|
|
23
23
|
text: string;
|
|
24
|
-
}
|
|
24
|
+
} | InlineTagDisplayPart | RelativeLinkDisplayPart;
|
|
25
25
|
/**
|
|
26
26
|
* Represents an inline tag like `{@link Foo}`
|
|
27
|
-
|
|
28
|
-
| InlineTagDisplayPart
|
|
29
|
-
/**
|
|
30
|
-
* Represents a reference to a path relative to where the comment resides.
|
|
31
|
-
* This is used to detect and copy relative image links.
|
|
32
|
-
* Use {@link FileRegistry} to determine what path on disc this refers to.
|
|
33
|
-
*/
|
|
34
|
-
| RelativeLinkDisplayPart;
|
|
35
|
-
/**
|
|
27
|
+
*
|
|
36
28
|
* The `@link`, `@linkcode`, and `@linkplain` tags may have a `target`
|
|
37
29
|
* property set indicating which reflection/url they link to. They may also
|
|
38
30
|
* have a `tsLinkText` property which includes the part of the `text` which
|
|
39
31
|
* TypeScript thinks should be displayed as the link text.
|
|
40
32
|
* @category Comments
|
|
33
|
+
* @expand
|
|
41
34
|
*/
|
|
42
35
|
export interface InlineTagDisplayPart {
|
|
43
36
|
kind: "inline-tag";
|
|
@@ -47,9 +40,16 @@ export interface InlineTagDisplayPart {
|
|
|
47
40
|
tsLinkText?: string;
|
|
48
41
|
}
|
|
49
42
|
/**
|
|
43
|
+
* Represents a reference to a path relative to where the comment resides.
|
|
44
|
+
* This is used to detect and copy relative image links.
|
|
45
|
+
*
|
|
46
|
+
* Use {@link FileRegistry} to determine what path on disc this refers to.
|
|
47
|
+
*
|
|
50
48
|
* This is used for relative links within comments/documents.
|
|
51
49
|
* It is used to mark pieces of text which need to be replaced
|
|
52
50
|
* to make links work properly.
|
|
51
|
+
* @category Comments
|
|
52
|
+
* @expand
|
|
53
53
|
*/
|
|
54
54
|
export interface RelativeLinkDisplayPart {
|
|
55
55
|
kind: "relative-link";
|
|
@@ -62,6 +62,10 @@ export interface RelativeLinkDisplayPart {
|
|
|
62
62
|
* This may be `undefined` if the relative path does not exist.
|
|
63
63
|
*/
|
|
64
64
|
target: number | undefined;
|
|
65
|
+
/**
|
|
66
|
+
* Anchor within the target page, validated after rendering if possible
|
|
67
|
+
*/
|
|
68
|
+
targetAnchor: string | undefined;
|
|
65
69
|
}
|
|
66
70
|
/**
|
|
67
71
|
* A model that represents a single TypeDoc comment tag.
|
|
@@ -119,30 +123,7 @@ export declare class Comment {
|
|
|
119
123
|
/**
|
|
120
124
|
* Helper utility to clone {@link Comment.summary} or {@link CommentTag.content}
|
|
121
125
|
*/
|
|
122
|
-
static cloneDisplayParts(parts: readonly CommentDisplayPart[]):
|
|
123
|
-
kind: "text";
|
|
124
|
-
text: string;
|
|
125
|
-
} | {
|
|
126
|
-
kind: "code";
|
|
127
|
-
text: string;
|
|
128
|
-
} | {
|
|
129
|
-
kind: "inline-tag";
|
|
130
|
-
tag: `@${string}`;
|
|
131
|
-
text: string;
|
|
132
|
-
target?: Reflection | string | ReflectionSymbolId;
|
|
133
|
-
tsLinkText?: string;
|
|
134
|
-
} | {
|
|
135
|
-
kind: "relative-link";
|
|
136
|
-
/**
|
|
137
|
-
* The original relative text from the parsed comment.
|
|
138
|
-
*/
|
|
139
|
-
text: string;
|
|
140
|
-
/**
|
|
141
|
-
* A link to either some document outside of the project or a reflection.
|
|
142
|
-
* This may be `undefined` if the relative path does not exist.
|
|
143
|
-
*/
|
|
144
|
-
target: number | undefined;
|
|
145
|
-
})[];
|
|
126
|
+
static cloneDisplayParts(parts: readonly CommentDisplayPart[]): CommentDisplayPart[];
|
|
146
127
|
static serializeDisplayParts(serializer: Serializer, parts: CommentDisplayPart[]): JSONOutput.CommentDisplayPart[];
|
|
147
128
|
/** @hidden no point in showing this signature in api docs */
|
|
148
129
|
static serializeDisplayParts(serializer: Serializer, parts: CommentDisplayPart[] | undefined): JSONOutput.CommentDisplayPart[] | undefined;
|
|
@@ -197,6 +178,11 @@ export declare class Comment {
|
|
|
197
178
|
* Creates a new Comment instance.
|
|
198
179
|
*/
|
|
199
180
|
constructor(summary?: CommentDisplayPart[], blockTags?: CommentTag[], modifierTags?: Set<`@${string}`>);
|
|
181
|
+
/**
|
|
182
|
+
* Gets either the `@summary` tag, or a short version of the comment summary
|
|
183
|
+
* section for rendering in module/namespace pages.
|
|
184
|
+
*/
|
|
185
|
+
getShortSummary(useFirstParagraph: boolean): readonly CommentDisplayPart[];
|
|
200
186
|
/**
|
|
201
187
|
* Checks if this comment is roughly equal to the other comment.
|
|
202
188
|
* This isn't exactly equal, but just "roughly equal" by the comment
|