typedoc 0.26.11 → 0.27.0-beta.1
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 +212 -239
- package/dist/lib/converter/factories/index-signature.d.ts +3 -3
- package/dist/lib/converter/factories/index-signature.js +43 -26
- 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 +372 -2
- package/dist/lib/internationalization/locales/en.d.cts +343 -2
- package/dist/lib/internationalization/locales/jp.cjs +13 -14
- package/dist/lib/internationalization/locales/jp.d.cts +307 -1
- package/dist/lib/internationalization/locales/ko.cjs +12 -11
- package/dist/lib/internationalization/locales/ko.d.cts +221 -1
- package/dist/lib/internationalization/locales/zh.cjs +43 -19
- package/dist/lib/internationalization/locales/zh.d.cts +409 -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 +29 -16
- 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 +624 -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 +14 -0
- package/dist/lib/output/output.js +91 -0
- package/dist/lib/output/plugins/AssetsPlugin.d.ts +9 -8
- package/dist/lib/output/plugins/AssetsPlugin.js +64 -80
- package/dist/lib/output/plugins/HierarchyPlugin.d.ts +7 -0
- package/dist/lib/output/plugins/HierarchyPlugin.js +67 -0
- 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 +7 -6
- package/dist/lib/output/plugins/index.js +7 -15
- package/dist/lib/output/renderer.d.ts +14 -13
- package/dist/lib/output/renderer.js +130 -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 +48 -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 +4 -4
- package/dist/lib/output/themes/default/partials/hierarchy.js +12 -15
- 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 +222 -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 +24 -22
- 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 +32 -34
- package/dist/lib/output/themes/lib.d.ts +17 -3
- package/dist/lib/output/themes/lib.js +118 -50
- 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 -6
- package/dist/lib/utils/jsx.elements.d.ts +1 -1
- package/dist/lib/utils/jsx.elements.js +3 -4
- package/dist/lib/utils/jsx.js +82 -52
- 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 +35 -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 +232 -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 +17 -14
- package/static/main.js +4 -4
- package/static/style.css +109 -17
- 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,5 +1,5 @@
|
|
|
1
|
-
export type { SerializerComponent } from "./components";
|
|
2
|
-
export { Deserializer, type Deserializable, type DeserializerComponent, } from "./deserializer";
|
|
3
|
-
export { SerializeEvent } from "./events";
|
|
4
|
-
export * as JSONOutput from "./schema";
|
|
5
|
-
export { Serializer, type SerializerEvents } from "./serializer";
|
|
1
|
+
export type { SerializerComponent } from "./components.js";
|
|
2
|
+
export { Deserializer, type Deserializable, type DeserializerComponent, } from "./deserializer.js";
|
|
3
|
+
export { SerializeEvent } from "./events.js";
|
|
4
|
+
export * as JSONOutput from "./schema.js";
|
|
5
|
+
export { Serializer, type SerializerEvents } from "./serializer.js";
|
|
@@ -1,33 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.Serializer = exports.JSONOutput = exports.SerializeEvent = exports.Deserializer = void 0;
|
|
27
|
-
var deserializer_1 = require("./deserializer");
|
|
28
|
-
Object.defineProperty(exports, "Deserializer", { enumerable: true, get: function () { return deserializer_1.Deserializer; } });
|
|
29
|
-
var events_1 = require("./events");
|
|
30
|
-
Object.defineProperty(exports, "SerializeEvent", { enumerable: true, get: function () { return events_1.SerializeEvent; } });
|
|
31
|
-
exports.JSONOutput = __importStar(require("./schema"));
|
|
32
|
-
var serializer_1 = require("./serializer");
|
|
33
|
-
Object.defineProperty(exports, "Serializer", { enumerable: true, get: function () { return serializer_1.Serializer; } });
|
|
1
|
+
export { Deserializer, } from "./deserializer.js";
|
|
2
|
+
export { SerializeEvent } from "./events.js";
|
|
3
|
+
export * as JSONOutput from "./schema.js";
|
|
4
|
+
export { Serializer } from "./serializer.js";
|
|
@@ -25,10 +25,11 @@
|
|
|
25
25
|
* ```
|
|
26
26
|
*
|
|
27
27
|
* For documentation on the JSON output properties, view the corresponding model.
|
|
28
|
+
* @summary Contains interfaces which describe the JSON output.
|
|
28
29
|
* @module
|
|
29
30
|
*/
|
|
30
|
-
import type * as M from "../models";
|
|
31
|
-
import type { IfInternal } from "../utils";
|
|
31
|
+
import type * as M from "../models/index.js";
|
|
32
|
+
import type { IfInternal } from "../utils/index.js";
|
|
32
33
|
/**
|
|
33
34
|
* Describes the mapping from Model types to the corresponding JSON output type.
|
|
34
35
|
*/
|
|
@@ -170,6 +171,7 @@ export interface ReferenceType extends Type, S<M.ReferenceType, "type" | "name"
|
|
|
170
171
|
qualifiedName?: string;
|
|
171
172
|
refersToTypeParameter?: boolean;
|
|
172
173
|
preferValues?: boolean;
|
|
174
|
+
highlightedProperties?: Record<string, CommentDisplayPart[]>;
|
|
173
175
|
}
|
|
174
176
|
/** @category Types */
|
|
175
177
|
export interface ReflectionType extends Type, S<M.ReflectionType, "type" | "declaration"> {
|
|
@@ -258,6 +260,10 @@ export interface RelativeLinkDisplayPart {
|
|
|
258
260
|
* File ID, if present
|
|
259
261
|
*/
|
|
260
262
|
target?: number;
|
|
263
|
+
/**
|
|
264
|
+
* Anchor within the target file, if present
|
|
265
|
+
*/
|
|
266
|
+
targetAnchor?: string;
|
|
261
267
|
}
|
|
262
268
|
export interface SourceReference extends S<M.SourceReference, "fileName" | "line" | "character" | "url"> {
|
|
263
269
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
/**
|
|
3
2
|
* Contains interfaces which describe the JSON output. Each interface is related to a specific type of serializer.
|
|
4
3
|
*
|
|
@@ -26,6 +25,7 @@
|
|
|
26
25
|
* ```
|
|
27
26
|
*
|
|
28
27
|
* For documentation on the JSON output properties, view the corresponding model.
|
|
28
|
+
* @summary Contains interfaces which describe the JSON output.
|
|
29
29
|
* @module
|
|
30
30
|
*/
|
|
31
|
-
|
|
31
|
+
export {};
|
|
@@ -1,12 +1,18 @@
|
|
|
1
|
-
import { EventDispatcher } from "../utils";
|
|
2
|
-
import type { ProjectReflection } from "../models";
|
|
3
|
-
import { SerializeEvent } from "./events";
|
|
4
|
-
import type { ModelToObject } from "./schema";
|
|
5
|
-
import type { SerializerComponent } from "./components";
|
|
1
|
+
import { EventDispatcher } from "../utils/index.js";
|
|
2
|
+
import type { ProjectReflection } from "../models/index.js";
|
|
3
|
+
import { SerializeEvent } from "./events.js";
|
|
4
|
+
import type { ModelToObject } from "./schema.js";
|
|
5
|
+
import type { SerializerComponent } from "./components.js";
|
|
6
6
|
export interface SerializerEvents {
|
|
7
7
|
begin: [SerializeEvent];
|
|
8
8
|
end: [SerializeEvent];
|
|
9
9
|
}
|
|
10
|
+
/**
|
|
11
|
+
* Serializes TypeDoc's models to JSON
|
|
12
|
+
*
|
|
13
|
+
* @group Common
|
|
14
|
+
* @summary Serializes TypeDoc's models to JSON
|
|
15
|
+
*/
|
|
10
16
|
export declare class Serializer extends EventDispatcher<SerializerEvents> {
|
|
11
17
|
/**
|
|
12
18
|
* Triggered when the {@link Serializer} begins transforming a project.
|
|
@@ -1,16 +1,34 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import { EventDispatcher } from "../utils/index.js";
|
|
2
|
+
import { SerializeEvent } from "./events.js";
|
|
3
|
+
import { insertPrioritySorted } from "../utils/array.js";
|
|
4
|
+
/**
|
|
5
|
+
* Serializes TypeDoc's models to JSON
|
|
6
|
+
*
|
|
7
|
+
* @group Common
|
|
8
|
+
* @summary Serializes TypeDoc's models to JSON
|
|
9
|
+
*/
|
|
10
|
+
export class Serializer extends EventDispatcher {
|
|
11
|
+
/**
|
|
12
|
+
* Triggered when the {@link Serializer} begins transforming a project.
|
|
13
|
+
* @event
|
|
14
|
+
*/
|
|
15
|
+
static EVENT_BEGIN = "begin";
|
|
16
|
+
/**
|
|
17
|
+
* Triggered when the {@link Serializer} has finished transforming a project.
|
|
18
|
+
* @event
|
|
19
|
+
*/
|
|
20
|
+
static EVENT_END = "end";
|
|
21
|
+
serializers = [];
|
|
22
|
+
/**
|
|
23
|
+
* Only set when serializing.
|
|
24
|
+
*/
|
|
25
|
+
projectRoot;
|
|
26
|
+
/**
|
|
27
|
+
* Only set when serializing
|
|
28
|
+
*/
|
|
29
|
+
project;
|
|
12
30
|
addSerializer(serializer) {
|
|
13
|
-
|
|
31
|
+
insertPrioritySorted(this.serializers, serializer);
|
|
14
32
|
}
|
|
15
33
|
toObject(value) {
|
|
16
34
|
if (value === undefined) {
|
|
@@ -33,24 +51,13 @@ class Serializer extends utils_1.EventDispatcher {
|
|
|
33
51
|
projectToObject(value, projectRoot) {
|
|
34
52
|
this.projectRoot = projectRoot;
|
|
35
53
|
this.project = value;
|
|
36
|
-
const eventBegin = new
|
|
54
|
+
const eventBegin = new SerializeEvent(value);
|
|
37
55
|
this.trigger(Serializer.EVENT_BEGIN, eventBegin);
|
|
38
56
|
const project = this.toObject(value);
|
|
39
|
-
const eventEnd = new
|
|
57
|
+
const eventEnd = new SerializeEvent(value, project);
|
|
40
58
|
this.trigger(Serializer.EVENT_END, eventEnd);
|
|
41
59
|
this.project = undefined;
|
|
42
60
|
this.projectRoot = undefined;
|
|
43
61
|
return project;
|
|
44
62
|
}
|
|
45
63
|
}
|
|
46
|
-
exports.Serializer = Serializer;
|
|
47
|
-
/**
|
|
48
|
-
* Triggered when the {@link Serializer} begins transforming a project.
|
|
49
|
-
* @event
|
|
50
|
-
*/
|
|
51
|
-
Serializer.EVENT_BEGIN = "begin";
|
|
52
|
-
/**
|
|
53
|
-
* Triggered when the {@link Serializer} has finished transforming a project.
|
|
54
|
-
* @event
|
|
55
|
-
*/
|
|
56
|
-
Serializer.EVENT_END = "end";
|
|
@@ -51,3 +51,6 @@ export declare function zip<T extends Iterable<any>[]>(...args: T): Iterable<{
|
|
|
51
51
|
export declare function filterMap<T, U>(iter: Iterable<T> | undefined, fn: (item: T) => U | undefined): U[];
|
|
52
52
|
export declare function firstDefined<T, U>(array: readonly T[] | undefined, callback: (element: T, index: number) => U | undefined): U | undefined;
|
|
53
53
|
export declare function filter<T>(array: readonly T[] | undefined, predicate: (value: T, index: number, array: readonly T[]) => boolean): readonly T[];
|
|
54
|
+
export declare function aggregate<T>(arr: T[], fn: (item: T) => number): number;
|
|
55
|
+
export declare function aggregateWithJoiner<T>(arr: T[], fn: (item: T) => number, joiner: string): number;
|
|
56
|
+
export declare function joinArray<T>(arr: readonly T[] | undefined, joiner: string, mapper: (item: T) => string): string;
|
package/dist/lib/utils/array.js
CHANGED
|
@@ -1,25 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.emptyArray = void 0;
|
|
4
|
-
exports.insertPrioritySorted = insertPrioritySorted;
|
|
5
|
-
exports.insertOrderSorted = insertOrderSorted;
|
|
6
|
-
exports.binaryFindPartition = binaryFindPartition;
|
|
7
|
-
exports.removeIfPresent = removeIfPresent;
|
|
8
|
-
exports.removeIf = removeIf;
|
|
9
|
-
exports.unique = unique;
|
|
10
|
-
exports.partition = partition;
|
|
11
|
-
exports.zip = zip;
|
|
12
|
-
exports.filterMap = filterMap;
|
|
13
|
-
exports.firstDefined = firstDefined;
|
|
14
|
-
exports.filter = filter;
|
|
15
|
-
exports.emptyArray = [];
|
|
1
|
+
export const emptyArray = [];
|
|
16
2
|
/**
|
|
17
3
|
* Inserts an item into an array sorted by priority. If two items have the same priority,
|
|
18
4
|
* the item will be inserted later will be placed later in the array.
|
|
19
5
|
* @param arr modified by inserting item.
|
|
20
6
|
* @param item
|
|
21
7
|
*/
|
|
22
|
-
function insertPrioritySorted(arr, item) {
|
|
8
|
+
export function insertPrioritySorted(arr, item) {
|
|
23
9
|
const index = binaryFindPartition(arr, (v) => v.priority < item.priority);
|
|
24
10
|
arr.splice(index === -1 ? arr.length : index, 0, item);
|
|
25
11
|
return arr;
|
|
@@ -31,7 +17,7 @@ function insertPrioritySorted(arr, item) {
|
|
|
31
17
|
* @param arr modified by inserting item.
|
|
32
18
|
* @param item
|
|
33
19
|
*/
|
|
34
|
-
function insertOrderSorted(arr, item) {
|
|
20
|
+
export function insertOrderSorted(arr, item) {
|
|
35
21
|
const index = binaryFindPartition(arr, (v) => v.order > item.order);
|
|
36
22
|
arr.splice(index === -1 ? arr.length : index, 0, item);
|
|
37
23
|
return arr;
|
|
@@ -43,7 +29,7 @@ function insertOrderSorted(arr, item) {
|
|
|
43
29
|
* @param arr
|
|
44
30
|
* @param partition should return true while less than the partition point.
|
|
45
31
|
*/
|
|
46
|
-
function binaryFindPartition(arr, partition) {
|
|
32
|
+
export function binaryFindPartition(arr, partition) {
|
|
47
33
|
if (arr.length === 0) {
|
|
48
34
|
return -1;
|
|
49
35
|
}
|
|
@@ -65,7 +51,7 @@ function binaryFindPartition(arr, partition) {
|
|
|
65
51
|
* @param arr
|
|
66
52
|
* @param item
|
|
67
53
|
*/
|
|
68
|
-
function removeIfPresent(arr, item) {
|
|
54
|
+
export function removeIfPresent(arr, item) {
|
|
69
55
|
if (!arr) {
|
|
70
56
|
return;
|
|
71
57
|
}
|
|
@@ -79,7 +65,7 @@ function removeIfPresent(arr, item) {
|
|
|
79
65
|
* @param arr
|
|
80
66
|
* @param predicate
|
|
81
67
|
*/
|
|
82
|
-
function removeIf(arr, predicate) {
|
|
68
|
+
export function removeIf(arr, predicate) {
|
|
83
69
|
for (let i = 0; i < arr.length; i++) {
|
|
84
70
|
if (predicate(arr[i])) {
|
|
85
71
|
arr.splice(i, 1);
|
|
@@ -91,10 +77,10 @@ function removeIf(arr, predicate) {
|
|
|
91
77
|
* Filters out duplicate values from the given iterable.
|
|
92
78
|
* @param arr
|
|
93
79
|
*/
|
|
94
|
-
function unique(arr) {
|
|
80
|
+
export function unique(arr) {
|
|
95
81
|
return Array.from(new Set(arr));
|
|
96
82
|
}
|
|
97
|
-
function partition(iter, predicate) {
|
|
83
|
+
export function partition(iter, predicate) {
|
|
98
84
|
const left = [];
|
|
99
85
|
const right = [];
|
|
100
86
|
for (const item of iter) {
|
|
@@ -107,7 +93,7 @@ function partition(iter, predicate) {
|
|
|
107
93
|
}
|
|
108
94
|
return [left, right];
|
|
109
95
|
}
|
|
110
|
-
function* zip(...args) {
|
|
96
|
+
export function* zip(...args) {
|
|
111
97
|
const iterators = args.map((x) => x[Symbol.iterator]());
|
|
112
98
|
for (;;) {
|
|
113
99
|
const next = iterators.map((i) => i.next());
|
|
@@ -117,7 +103,7 @@ function* zip(...args) {
|
|
|
117
103
|
yield next.map((v) => v.value);
|
|
118
104
|
}
|
|
119
105
|
}
|
|
120
|
-
function filterMap(iter, fn) {
|
|
106
|
+
export function filterMap(iter, fn) {
|
|
121
107
|
const result = [];
|
|
122
108
|
for (const item of iter || []) {
|
|
123
109
|
const newItem = fn(item);
|
|
@@ -127,7 +113,7 @@ function filterMap(iter, fn) {
|
|
|
127
113
|
}
|
|
128
114
|
return result;
|
|
129
115
|
}
|
|
130
|
-
function firstDefined(array, callback) {
|
|
116
|
+
export function firstDefined(array, callback) {
|
|
131
117
|
if (array === undefined) {
|
|
132
118
|
return undefined;
|
|
133
119
|
}
|
|
@@ -139,6 +125,19 @@ function firstDefined(array, callback) {
|
|
|
139
125
|
}
|
|
140
126
|
return undefined;
|
|
141
127
|
}
|
|
142
|
-
function filter(array, predicate) {
|
|
143
|
-
return array ? array.filter(predicate) :
|
|
128
|
+
export function filter(array, predicate) {
|
|
129
|
+
return array ? array.filter(predicate) : emptyArray;
|
|
130
|
+
}
|
|
131
|
+
export function aggregate(arr, fn) {
|
|
132
|
+
return arr.reduce((sum, it) => sum + fn(it), 0);
|
|
133
|
+
}
|
|
134
|
+
export function aggregateWithJoiner(arr, fn, joiner) {
|
|
135
|
+
return (arr.reduce((sum, it) => sum + fn(it), 0) +
|
|
136
|
+
(arr.length - 1) * joiner.length);
|
|
137
|
+
}
|
|
138
|
+
export function joinArray(arr, joiner, mapper) {
|
|
139
|
+
if (arr?.length) {
|
|
140
|
+
return arr.map(mapper).join(joiner);
|
|
141
|
+
}
|
|
142
|
+
return "";
|
|
144
143
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Application } from "../application";
|
|
2
|
-
import { EventDispatcher } from "./events";
|
|
1
|
+
import type { Application } from "../application.js";
|
|
2
|
+
import { EventDispatcher } from "./events.js";
|
|
3
3
|
/**
|
|
4
4
|
* Exposes a reference to the root Application component.
|
|
5
5
|
*/
|
|
@@ -8,22 +8,6 @@ export interface ComponentHost {
|
|
|
8
8
|
}
|
|
9
9
|
export interface Component<E extends Record<keyof E, unknown[]> = {}> extends AbstractComponent<ComponentHost, E> {
|
|
10
10
|
}
|
|
11
|
-
export interface ComponentClass<T extends Component, O extends ComponentHost = ComponentHost> {
|
|
12
|
-
new (owner: O): T;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Option-bag passed to Component decorator.
|
|
16
|
-
*/
|
|
17
|
-
export interface ComponentOptions {
|
|
18
|
-
name?: string;
|
|
19
|
-
/** Specify valid child component class. Used to prove that children are valid via `instanceof` checks */
|
|
20
|
-
childClass?: Function;
|
|
21
|
-
internal?: boolean;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Class decorator applied to Components
|
|
25
|
-
*/
|
|
26
|
-
export declare function Component(options: ComponentOptions): (target: Function, _context: unknown) => void;
|
|
27
11
|
/**
|
|
28
12
|
* Component base class. Has an owner (unless it's the application root component),
|
|
29
13
|
* can dispatch events to its children, and has access to the root Application component.
|
|
@@ -43,10 +27,6 @@ export declare abstract class AbstractComponent<O extends ComponentHost, E exten
|
|
|
43
27
|
* Create new Component instance.
|
|
44
28
|
*/
|
|
45
29
|
constructor(owner: O);
|
|
46
|
-
/**
|
|
47
|
-
* Initialize this component.
|
|
48
|
-
*/
|
|
49
|
-
protected initialize(): void;
|
|
50
30
|
/**
|
|
51
31
|
* Return the application / root component instance.
|
|
52
32
|
*/
|
|
@@ -56,25 +36,3 @@ export declare abstract class AbstractComponent<O extends ComponentHost, E exten
|
|
|
56
36
|
*/
|
|
57
37
|
get owner(): O;
|
|
58
38
|
}
|
|
59
|
-
/**
|
|
60
|
-
* Component that can have child components.
|
|
61
|
-
*
|
|
62
|
-
* @template O type of Component's owner
|
|
63
|
-
* @template C type of Component's children
|
|
64
|
-
*/
|
|
65
|
-
export declare abstract class ChildableComponent<O extends ComponentHost, C extends Component, E extends Record<keyof E, unknown[]>> extends AbstractComponent<O, E> {
|
|
66
|
-
private _componentChildren?;
|
|
67
|
-
private _defaultComponents?;
|
|
68
|
-
/**
|
|
69
|
-
* Create new Component instance.
|
|
70
|
-
*/
|
|
71
|
-
constructor(owner: O);
|
|
72
|
-
/**
|
|
73
|
-
* Retrieve a plugin instance.
|
|
74
|
-
*
|
|
75
|
-
* @returns The instance of the plugin or undefined if no plugin with the given class is attached.
|
|
76
|
-
*/
|
|
77
|
-
getComponent(name: string): C | undefined;
|
|
78
|
-
getComponents(): C[];
|
|
79
|
-
addComponent<T extends C>(name: string, componentClass: T | ComponentClass<T, O>): T;
|
|
80
|
-
}
|
|
@@ -1,69 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ChildableComponent = exports.AbstractComponent = void 0;
|
|
4
|
-
exports.Component = Component;
|
|
5
|
-
const events_1 = require("./events");
|
|
6
|
-
const childMappings = [];
|
|
7
|
-
/**
|
|
8
|
-
* Class decorator applied to Components
|
|
9
|
-
*/
|
|
10
|
-
function Component(options) {
|
|
11
|
-
// _context is ClassDecoratorContext, but that then requires a public constructor
|
|
12
|
-
// which Application does not have.
|
|
13
|
-
return (target, _context) => {
|
|
14
|
-
const proto = target.prototype;
|
|
15
|
-
if (!(proto instanceof AbstractComponent)) {
|
|
16
|
-
throw new Error("The `Component` decorator can only be used with a subclass of `AbstractComponent`.");
|
|
17
|
-
}
|
|
18
|
-
if (options.childClass) {
|
|
19
|
-
if (!(proto instanceof ChildableComponent)) {
|
|
20
|
-
throw new Error("The `Component` decorator accepts the parameter `childClass` only when used with a subclass of `ChildableComponent`.");
|
|
21
|
-
}
|
|
22
|
-
childMappings.push({
|
|
23
|
-
host: proto,
|
|
24
|
-
child: options.childClass,
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
const name = options.name;
|
|
28
|
-
if (name) {
|
|
29
|
-
proto.componentName = name;
|
|
30
|
-
}
|
|
31
|
-
// If not marked internal, and if we are a subclass of another component T's declared
|
|
32
|
-
// childClass, then register ourselves as a _defaultComponents of T.
|
|
33
|
-
const internal = !!options.internal;
|
|
34
|
-
if (name && !internal) {
|
|
35
|
-
for (const childMapping of childMappings) {
|
|
36
|
-
if (!(proto instanceof childMapping.child)) {
|
|
37
|
-
continue;
|
|
38
|
-
}
|
|
39
|
-
const host = childMapping.host;
|
|
40
|
-
host["_defaultComponents"] = host["_defaultComponents"] || {};
|
|
41
|
-
host["_defaultComponents"][name] = target;
|
|
42
|
-
break;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
}
|
|
1
|
+
import { EventDispatcher } from "./events.js";
|
|
47
2
|
/**
|
|
48
3
|
* Component base class. Has an owner (unless it's the application root component),
|
|
49
4
|
* can dispatch events to its children, and has access to the root Application component.
|
|
50
5
|
*
|
|
51
6
|
* @template O type of component's owner.
|
|
52
7
|
*/
|
|
53
|
-
class AbstractComponent extends
|
|
8
|
+
export class AbstractComponent extends EventDispatcher {
|
|
9
|
+
/**
|
|
10
|
+
* The owner of this component instance.
|
|
11
|
+
*/
|
|
12
|
+
_componentOwner;
|
|
13
|
+
/**
|
|
14
|
+
* The name of this component as set by the `@Component` decorator.
|
|
15
|
+
*/
|
|
16
|
+
componentName;
|
|
54
17
|
/**
|
|
55
18
|
* Create new Component instance.
|
|
56
19
|
*/
|
|
57
20
|
constructor(owner) {
|
|
58
21
|
super();
|
|
59
22
|
this._componentOwner = owner;
|
|
60
|
-
this.initialize();
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* Initialize this component.
|
|
64
|
-
*/
|
|
65
|
-
initialize() {
|
|
66
|
-
// empty default implementation
|
|
67
23
|
}
|
|
68
24
|
/**
|
|
69
25
|
* Return the application / root component instance.
|
|
@@ -83,51 +39,3 @@ class AbstractComponent extends events_1.EventDispatcher {
|
|
|
83
39
|
: this._componentOwner;
|
|
84
40
|
}
|
|
85
41
|
}
|
|
86
|
-
exports.AbstractComponent = AbstractComponent;
|
|
87
|
-
/**
|
|
88
|
-
* Component that can have child components.
|
|
89
|
-
*
|
|
90
|
-
* @template O type of Component's owner
|
|
91
|
-
* @template C type of Component's children
|
|
92
|
-
*/
|
|
93
|
-
class ChildableComponent extends AbstractComponent {
|
|
94
|
-
/**
|
|
95
|
-
* Create new Component instance.
|
|
96
|
-
*/
|
|
97
|
-
constructor(owner) {
|
|
98
|
-
super(owner);
|
|
99
|
-
Object.entries(this._defaultComponents || {}).forEach(([name, component]) => {
|
|
100
|
-
this.addComponent(name, component);
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
|
-
/**
|
|
104
|
-
* Retrieve a plugin instance.
|
|
105
|
-
*
|
|
106
|
-
* @returns The instance of the plugin or undefined if no plugin with the given class is attached.
|
|
107
|
-
*/
|
|
108
|
-
getComponent(name) {
|
|
109
|
-
return (this._componentChildren || {})[name];
|
|
110
|
-
}
|
|
111
|
-
getComponents() {
|
|
112
|
-
return Object.values(this._componentChildren || {});
|
|
113
|
-
}
|
|
114
|
-
addComponent(name, componentClass) {
|
|
115
|
-
if (!this._componentChildren) {
|
|
116
|
-
this._componentChildren = {};
|
|
117
|
-
}
|
|
118
|
-
if (this._componentChildren[name]) {
|
|
119
|
-
// Component already added so we will return the existing component
|
|
120
|
-
// TODO: add better logging around this because it could be unexpected but shouldn't be fatal
|
|
121
|
-
// See https://github.com/TypeStrong/typedoc/issues/846
|
|
122
|
-
return this._componentChildren[name];
|
|
123
|
-
}
|
|
124
|
-
else {
|
|
125
|
-
const component = typeof componentClass === "function"
|
|
126
|
-
? new componentClass(this)
|
|
127
|
-
: componentClass;
|
|
128
|
-
this._componentChildren[name] = component;
|
|
129
|
-
return component;
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
exports.ChildableComponent = ChildableComponent;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import ts from "typescript";
|
|
2
|
-
import type { Logger } from "./loggers";
|
|
3
|
-
import type { Options } from "./options";
|
|
2
|
+
import type { Logger } from "./loggers.js";
|
|
3
|
+
import type { Options } from "./options/index.js";
|
|
4
4
|
/**
|
|
5
5
|
* Defines how entry points are interpreted.
|
|
6
6
|
* @enum
|
|
@@ -29,15 +29,14 @@ export declare const EntryPointStrategy: {
|
|
|
29
29
|
export type EntryPointStrategy = (typeof EntryPointStrategy)[keyof typeof EntryPointStrategy];
|
|
30
30
|
export interface DocumentationEntryPoint {
|
|
31
31
|
displayName: string;
|
|
32
|
-
readmeFile?: string;
|
|
33
32
|
program: ts.Program;
|
|
34
33
|
sourceFile: ts.SourceFile;
|
|
35
|
-
version?: string;
|
|
36
34
|
}
|
|
37
35
|
export interface DocumentEntryPoint {
|
|
38
36
|
displayName: string;
|
|
39
37
|
path: string;
|
|
40
38
|
}
|
|
39
|
+
export declare function inferEntryPoints(logger: Logger, options: Options): Promise<DocumentationEntryPoint[]>;
|
|
41
40
|
export declare function getEntryPoints(logger: Logger, options: Options): DocumentationEntryPoint[] | undefined;
|
|
42
41
|
/**
|
|
43
42
|
* Document entry points are markdown documents that the user has requested we include in the project with
|