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,62 +1,45 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
|
|
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.addTypeDocOptions = addTypeDocOptions;
|
|
27
|
-
const loggers_1 = require("../../loggers");
|
|
28
|
-
const declaration_1 = require("../declaration");
|
|
29
|
-
const sort_1 = require("../../sort");
|
|
30
|
-
const entry_point_1 = require("../../entry-point");
|
|
31
|
-
const kind_1 = require("../../../models/reflections/kind");
|
|
32
|
-
const Validation = __importStar(require("../../validation"));
|
|
33
|
-
const enum_1 = require("../../enum");
|
|
34
|
-
const highlighter_1 = require("../../highlighter");
|
|
35
|
-
const set_1 = require("../../set");
|
|
36
|
-
const defaults_1 = require("../defaults");
|
|
1
|
+
import { LogLevel } from "../../loggers.js";
|
|
2
|
+
import { ParameterType, ParameterHint, EmitStrategy, CommentStyle, } from "../declaration.js";
|
|
3
|
+
import { OptionDefaults } from "../defaults.js";
|
|
4
|
+
import { SORT_STRATEGIES } from "../../sort.js";
|
|
5
|
+
import { EntryPointStrategy } from "../../entry-point.js";
|
|
6
|
+
import { ReflectionKind } from "../../../models/reflections/kind.js";
|
|
7
|
+
import * as Validation from "../../validation.js";
|
|
8
|
+
import { blockTags, inlineTags, modifierTags } from "../tsdoc-defaults.js";
|
|
9
|
+
import { getEnumKeys } from "../../enum.js";
|
|
10
|
+
import { getSupportedLanguagesWithoutAliases, getSupportedThemes, } from "../../highlighter.js";
|
|
11
|
+
import { setDifference } from "../../set.js";
|
|
12
|
+
import { extname } from "path";
|
|
13
|
+
function makeTagArrayValidator(name) {
|
|
14
|
+
return (value, i18n) => {
|
|
15
|
+
if (!Validation.validate([Array, Validation.isTagString], value)) {
|
|
16
|
+
throw new Error(i18n.option_0_values_must_be_array_of_tags(name));
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
}
|
|
37
20
|
// For convenience, added in the same order as they are documented on the website.
|
|
38
|
-
function addTypeDocOptions(options) {
|
|
21
|
+
export function addTypeDocOptions(options) {
|
|
39
22
|
///////////////////////////
|
|
40
23
|
// Configuration Options //
|
|
41
24
|
///////////////////////////
|
|
42
25
|
options.addDeclaration({
|
|
43
|
-
type:
|
|
26
|
+
type: ParameterType.Path,
|
|
44
27
|
name: "options",
|
|
45
28
|
help: (i18n) => i18n.help_options(),
|
|
46
|
-
hint:
|
|
29
|
+
hint: ParameterHint.File,
|
|
47
30
|
defaultValue: "",
|
|
48
31
|
});
|
|
49
32
|
options.addDeclaration({
|
|
50
|
-
type:
|
|
33
|
+
type: ParameterType.Path,
|
|
51
34
|
name: "tsconfig",
|
|
52
35
|
help: (i18n) => i18n.help_tsconfig(),
|
|
53
|
-
hint:
|
|
36
|
+
hint: ParameterHint.File,
|
|
54
37
|
defaultValue: "",
|
|
55
38
|
});
|
|
56
39
|
options.addDeclaration({
|
|
57
40
|
name: "compilerOptions",
|
|
58
41
|
help: (i18n) => i18n.help_compilerOptions(),
|
|
59
|
-
type:
|
|
42
|
+
type: ParameterType.Mixed,
|
|
60
43
|
configFileOnly: true,
|
|
61
44
|
validate(value, i18n) {
|
|
62
45
|
if (!Validation.validate({}, value)) {
|
|
@@ -67,13 +50,13 @@ function addTypeDocOptions(options) {
|
|
|
67
50
|
options.addDeclaration({
|
|
68
51
|
name: "lang",
|
|
69
52
|
help: (i18n) => i18n.help_lang(),
|
|
70
|
-
type:
|
|
53
|
+
type: ParameterType.String,
|
|
71
54
|
defaultValue: "en",
|
|
72
55
|
});
|
|
73
56
|
options.addDeclaration({
|
|
74
57
|
name: "locales",
|
|
75
58
|
help: (i18n) => i18n.help_locales(),
|
|
76
|
-
type:
|
|
59
|
+
type: ParameterType.Mixed,
|
|
77
60
|
configFileOnly: true,
|
|
78
61
|
defaultValue: {},
|
|
79
62
|
validate(value, i18n) {
|
|
@@ -95,7 +78,7 @@ function addTypeDocOptions(options) {
|
|
|
95
78
|
options.addDeclaration({
|
|
96
79
|
name: "packageOptions",
|
|
97
80
|
help: (i18n) => i18n.help_packageOptions(),
|
|
98
|
-
type:
|
|
81
|
+
type: ParameterType.Mixed,
|
|
99
82
|
configFileOnly: true,
|
|
100
83
|
defaultValue: {},
|
|
101
84
|
validate(value, i18n) {
|
|
@@ -110,60 +93,60 @@ function addTypeDocOptions(options) {
|
|
|
110
93
|
options.addDeclaration({
|
|
111
94
|
name: "entryPoints",
|
|
112
95
|
help: (i18n) => i18n.help_entryPoints(),
|
|
113
|
-
type:
|
|
96
|
+
type: ParameterType.GlobArray,
|
|
114
97
|
});
|
|
115
98
|
options.addDeclaration({
|
|
116
99
|
name: "entryPointStrategy",
|
|
117
100
|
help: (i18n) => i18n.help_entryPointStrategy(),
|
|
118
|
-
type:
|
|
119
|
-
map:
|
|
120
|
-
defaultValue:
|
|
101
|
+
type: ParameterType.Map,
|
|
102
|
+
map: EntryPointStrategy,
|
|
103
|
+
defaultValue: EntryPointStrategy.Resolve,
|
|
121
104
|
});
|
|
122
105
|
options.addDeclaration({
|
|
123
106
|
name: "alwaysCreateEntryPointModule",
|
|
124
107
|
help: (i18n) => i18n.help_alwaysCreateEntryPointModule(),
|
|
125
|
-
type:
|
|
108
|
+
type: ParameterType.Boolean,
|
|
126
109
|
});
|
|
127
110
|
options.addDeclaration({
|
|
128
111
|
name: "projectDocuments",
|
|
129
112
|
help: (i18n) => i18n.help_projectDocuments(),
|
|
130
|
-
type:
|
|
113
|
+
type: ParameterType.GlobArray,
|
|
131
114
|
});
|
|
132
115
|
options.addDeclaration({
|
|
133
116
|
name: "exclude",
|
|
134
117
|
help: (i18n) => i18n.help_exclude(),
|
|
135
|
-
type:
|
|
118
|
+
type: ParameterType.GlobArray,
|
|
136
119
|
});
|
|
137
120
|
options.addDeclaration({
|
|
138
121
|
name: "externalPattern",
|
|
139
122
|
help: (i18n) => i18n.help_externalPattern(),
|
|
140
|
-
type:
|
|
123
|
+
type: ParameterType.GlobArray,
|
|
141
124
|
defaultValue: ["**/node_modules/**"],
|
|
142
125
|
});
|
|
143
126
|
options.addDeclaration({
|
|
144
127
|
name: "excludeExternals",
|
|
145
128
|
help: (i18n) => i18n.help_excludeExternals(),
|
|
146
|
-
type:
|
|
129
|
+
type: ParameterType.Boolean,
|
|
147
130
|
});
|
|
148
131
|
options.addDeclaration({
|
|
149
132
|
name: "excludeNotDocumented",
|
|
150
133
|
help: (i18n) => i18n.help_excludeNotDocumented(),
|
|
151
|
-
type:
|
|
134
|
+
type: ParameterType.Boolean,
|
|
152
135
|
});
|
|
153
136
|
options.addDeclaration({
|
|
154
137
|
name: "excludeNotDocumentedKinds",
|
|
155
138
|
help: (i18n) => i18n.help_excludeNotDocumentedKinds(),
|
|
156
|
-
type:
|
|
139
|
+
type: ParameterType.Array,
|
|
157
140
|
validate(value, i18n) {
|
|
158
141
|
const invalid = new Set(value);
|
|
159
|
-
const valid = new Set(
|
|
142
|
+
const valid = new Set(getEnumKeys(ReflectionKind));
|
|
160
143
|
for (const notPermitted of [
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
144
|
+
ReflectionKind.Project,
|
|
145
|
+
ReflectionKind.TypeLiteral,
|
|
146
|
+
ReflectionKind.TypeParameter,
|
|
147
|
+
ReflectionKind.Parameter,
|
|
165
148
|
]) {
|
|
166
|
-
valid.delete(
|
|
149
|
+
valid.delete(ReflectionKind[notPermitted]);
|
|
167
150
|
}
|
|
168
151
|
for (const v of valid) {
|
|
169
152
|
invalid.delete(v);
|
|
@@ -172,39 +155,39 @@ function addTypeDocOptions(options) {
|
|
|
172
155
|
throw new Error(i18n.exclude_not_documented_specified_0_valid_values_are_1(Array.from(invalid).join(", "), Array.from(valid).join(", ")));
|
|
173
156
|
}
|
|
174
157
|
},
|
|
175
|
-
defaultValue:
|
|
158
|
+
defaultValue: OptionDefaults.excludeNotDocumentedKinds,
|
|
176
159
|
});
|
|
177
160
|
options.addDeclaration({
|
|
178
161
|
name: "excludeInternal",
|
|
179
162
|
help: (i18n) => i18n.help_excludeInternal(),
|
|
180
|
-
type:
|
|
163
|
+
type: ParameterType.Boolean,
|
|
181
164
|
});
|
|
182
165
|
options.addDeclaration({
|
|
183
166
|
name: "excludeCategories",
|
|
184
167
|
help: (i18n) => i18n.help_excludeCategories(),
|
|
185
|
-
type:
|
|
168
|
+
type: ParameterType.Array,
|
|
186
169
|
defaultValue: [],
|
|
187
170
|
});
|
|
188
171
|
options.addDeclaration({
|
|
189
172
|
name: "excludePrivate",
|
|
190
173
|
help: (i18n) => i18n.help_excludePrivate(),
|
|
191
|
-
type:
|
|
174
|
+
type: ParameterType.Boolean,
|
|
192
175
|
defaultValue: true,
|
|
193
176
|
});
|
|
194
177
|
options.addDeclaration({
|
|
195
178
|
name: "excludeProtected",
|
|
196
179
|
help: (i18n) => i18n.help_excludeProtected(),
|
|
197
|
-
type:
|
|
180
|
+
type: ParameterType.Boolean,
|
|
198
181
|
});
|
|
199
182
|
options.addDeclaration({
|
|
200
183
|
name: "excludeReferences",
|
|
201
184
|
help: (i18n) => i18n.help_excludeReferences(),
|
|
202
|
-
type:
|
|
185
|
+
type: ParameterType.Boolean,
|
|
203
186
|
});
|
|
204
187
|
options.addDeclaration({
|
|
205
188
|
name: "externalSymbolLinkMappings",
|
|
206
189
|
help: (i18n) => i18n.help_externalSymbolLinkMappings(),
|
|
207
|
-
type:
|
|
190
|
+
type: ParameterType.Mixed,
|
|
208
191
|
defaultValue: {},
|
|
209
192
|
validate(value, i18n) {
|
|
210
193
|
if (!Validation.validate({}, value)) {
|
|
@@ -225,36 +208,65 @@ function addTypeDocOptions(options) {
|
|
|
225
208
|
///////////////////////////
|
|
226
209
|
///// Output Options //////
|
|
227
210
|
///////////////////////////
|
|
211
|
+
options.addDeclaration({
|
|
212
|
+
name: "outputs",
|
|
213
|
+
help: (i18n) => i18n.help_out(),
|
|
214
|
+
type: ParameterType.Mixed,
|
|
215
|
+
configFileOnly: true,
|
|
216
|
+
defaultValue: undefined,
|
|
217
|
+
validate(value, i18n) {
|
|
218
|
+
if (!Validation.validate([
|
|
219
|
+
Array,
|
|
220
|
+
{
|
|
221
|
+
name: String,
|
|
222
|
+
path: String,
|
|
223
|
+
options: Validation.optional({
|
|
224
|
+
[Validation.additionalProperties]: true,
|
|
225
|
+
}),
|
|
226
|
+
},
|
|
227
|
+
], value)) {
|
|
228
|
+
throw new Error(i18n.option_outputs_must_be_array());
|
|
229
|
+
}
|
|
230
|
+
},
|
|
231
|
+
});
|
|
228
232
|
options.addDeclaration({
|
|
229
233
|
name: "out",
|
|
230
234
|
help: (i18n) => i18n.help_out(),
|
|
231
|
-
type:
|
|
232
|
-
hint:
|
|
235
|
+
type: ParameterType.Path,
|
|
236
|
+
hint: ParameterHint.Directory,
|
|
233
237
|
defaultValue: "./docs",
|
|
234
238
|
});
|
|
239
|
+
options.addDeclaration({
|
|
240
|
+
name: "html",
|
|
241
|
+
outputShortcut: "html",
|
|
242
|
+
help: (i18n) => i18n.help_html(),
|
|
243
|
+
type: ParameterType.Path,
|
|
244
|
+
hint: ParameterHint.Directory,
|
|
245
|
+
});
|
|
235
246
|
options.addDeclaration({
|
|
236
247
|
name: "json",
|
|
248
|
+
outputShortcut: "json",
|
|
237
249
|
help: (i18n) => i18n.help_json(),
|
|
238
|
-
type:
|
|
239
|
-
hint:
|
|
250
|
+
type: ParameterType.Path,
|
|
251
|
+
hint: ParameterHint.File,
|
|
240
252
|
});
|
|
241
253
|
options.addDeclaration({
|
|
242
254
|
name: "pretty",
|
|
243
255
|
help: (i18n) => i18n.help_pretty(),
|
|
244
|
-
type:
|
|
256
|
+
type: ParameterType.Boolean,
|
|
245
257
|
defaultValue: true,
|
|
246
258
|
});
|
|
247
259
|
options.addDeclaration({
|
|
248
260
|
name: "emit",
|
|
249
261
|
help: (i18n) => i18n.help_emit(),
|
|
250
|
-
type:
|
|
251
|
-
map:
|
|
262
|
+
type: ParameterType.Map,
|
|
263
|
+
map: EmitStrategy,
|
|
252
264
|
defaultValue: "docs",
|
|
253
265
|
});
|
|
254
266
|
options.addDeclaration({
|
|
255
267
|
name: "theme",
|
|
256
268
|
help: (i18n) => i18n.help_theme(),
|
|
257
|
-
type:
|
|
269
|
+
type: ParameterType.String,
|
|
258
270
|
defaultValue: "default",
|
|
259
271
|
});
|
|
260
272
|
const defaultLightTheme = "light-plus";
|
|
@@ -262,51 +274,57 @@ function addTypeDocOptions(options) {
|
|
|
262
274
|
options.addDeclaration({
|
|
263
275
|
name: "lightHighlightTheme",
|
|
264
276
|
help: (i18n) => i18n.help_lightHighlightTheme(),
|
|
265
|
-
type:
|
|
277
|
+
type: ParameterType.String,
|
|
266
278
|
defaultValue: defaultLightTheme,
|
|
267
279
|
validate(value, i18n) {
|
|
268
|
-
if (!
|
|
269
|
-
throw new Error(i18n.highlight_theme_0_must_be_one_of_1("lightHighlightTheme",
|
|
280
|
+
if (!getSupportedThemes().includes(value)) {
|
|
281
|
+
throw new Error(i18n.highlight_theme_0_must_be_one_of_1("lightHighlightTheme", getSupportedThemes().join(", ")));
|
|
270
282
|
}
|
|
271
283
|
},
|
|
272
284
|
});
|
|
273
285
|
options.addDeclaration({
|
|
274
286
|
name: "darkHighlightTheme",
|
|
275
287
|
help: (i18n) => i18n.help_darkHighlightTheme(),
|
|
276
|
-
type:
|
|
288
|
+
type: ParameterType.String,
|
|
277
289
|
defaultValue: defaultDarkTheme,
|
|
278
290
|
validate(value, i18n) {
|
|
279
|
-
if (!
|
|
280
|
-
throw new Error(i18n.highlight_theme_0_must_be_one_of_1("darkHighlightTheme",
|
|
291
|
+
if (!getSupportedThemes().includes(value)) {
|
|
292
|
+
throw new Error(i18n.highlight_theme_0_must_be_one_of_1("darkHighlightTheme", getSupportedThemes().join(", ")));
|
|
281
293
|
}
|
|
282
294
|
},
|
|
283
295
|
});
|
|
284
296
|
options.addDeclaration({
|
|
285
297
|
name: "highlightLanguages",
|
|
286
298
|
help: (i18n) => i18n.help_highlightLanguages(),
|
|
287
|
-
type:
|
|
288
|
-
defaultValue:
|
|
299
|
+
type: ParameterType.Array,
|
|
300
|
+
defaultValue: OptionDefaults.highlightLanguages,
|
|
289
301
|
validate(value, i18n) {
|
|
290
|
-
const invalid =
|
|
302
|
+
const invalid = setDifference(value, getSupportedLanguagesWithoutAliases());
|
|
291
303
|
if (invalid.size) {
|
|
292
304
|
throw new Error(i18n.highlightLanguages_contains_invalid_languages_0(Array.from(invalid).join(", ")));
|
|
293
305
|
}
|
|
294
306
|
},
|
|
295
307
|
});
|
|
308
|
+
options.addDeclaration({
|
|
309
|
+
name: "typePrintWidth",
|
|
310
|
+
help: (i18n) => i18n.help_typePrintWidth(),
|
|
311
|
+
type: ParameterType.Number,
|
|
312
|
+
defaultValue: 80,
|
|
313
|
+
});
|
|
296
314
|
options.addDeclaration({
|
|
297
315
|
name: "customCss",
|
|
298
316
|
help: (i18n) => i18n.help_customCss(),
|
|
299
|
-
type:
|
|
317
|
+
type: ParameterType.Path,
|
|
300
318
|
});
|
|
301
319
|
options.addDeclaration({
|
|
302
320
|
name: "customJs",
|
|
303
321
|
help: (i18n) => i18n.help_customJs(),
|
|
304
|
-
type:
|
|
322
|
+
type: ParameterType.Path,
|
|
305
323
|
});
|
|
306
324
|
options.addDeclaration({
|
|
307
325
|
name: "markdownItOptions",
|
|
308
326
|
help: (i18n) => i18n.help_markdownItOptions(),
|
|
309
|
-
type:
|
|
327
|
+
type: ParameterType.Mixed,
|
|
310
328
|
configFileOnly: true,
|
|
311
329
|
defaultValue: {
|
|
312
330
|
html: true,
|
|
@@ -321,7 +339,7 @@ function addTypeDocOptions(options) {
|
|
|
321
339
|
options.addDeclaration({
|
|
322
340
|
name: "markdownItLoader",
|
|
323
341
|
help: (i18n) => i18n.help_markdownItLoader(),
|
|
324
|
-
type:
|
|
342
|
+
type: ParameterType.Mixed,
|
|
325
343
|
configFileOnly: true,
|
|
326
344
|
defaultValue: () => { },
|
|
327
345
|
validate(value, i18n) {
|
|
@@ -334,7 +352,7 @@ function addTypeDocOptions(options) {
|
|
|
334
352
|
name: "maxTypeConversionDepth",
|
|
335
353
|
help: (i18n) => i18n.help_maxTypeConversionDepth(),
|
|
336
354
|
defaultValue: 10,
|
|
337
|
-
type:
|
|
355
|
+
type: ParameterType.Number,
|
|
338
356
|
});
|
|
339
357
|
options.addDeclaration({
|
|
340
358
|
name: "name",
|
|
@@ -343,12 +361,12 @@ function addTypeDocOptions(options) {
|
|
|
343
361
|
options.addDeclaration({
|
|
344
362
|
name: "includeVersion",
|
|
345
363
|
help: (i18n) => i18n.help_includeVersion(),
|
|
346
|
-
type:
|
|
364
|
+
type: ParameterType.Boolean,
|
|
347
365
|
});
|
|
348
366
|
options.addDeclaration({
|
|
349
367
|
name: "disableSources",
|
|
350
368
|
help: (i18n) => i18n.help_disableSources(),
|
|
351
|
-
type:
|
|
369
|
+
type: ParameterType.Boolean,
|
|
352
370
|
});
|
|
353
371
|
options.addDeclaration({
|
|
354
372
|
name: "sourceLinkTemplate",
|
|
@@ -366,48 +384,47 @@ function addTypeDocOptions(options) {
|
|
|
366
384
|
options.addDeclaration({
|
|
367
385
|
name: "disableGit",
|
|
368
386
|
help: (i18n) => i18n.help_disableGit(),
|
|
369
|
-
type:
|
|
387
|
+
type: ParameterType.Boolean,
|
|
370
388
|
});
|
|
371
389
|
options.addDeclaration({
|
|
372
390
|
name: "basePath",
|
|
373
391
|
help: (i18n) => i18n.help_basePath(),
|
|
374
|
-
type:
|
|
375
|
-
});
|
|
376
|
-
options.addDeclaration({
|
|
377
|
-
name: "excludeTags",
|
|
378
|
-
help: (i18n) => i18n.help_excludeTags(),
|
|
379
|
-
type: declaration_1.ParameterType.Array,
|
|
380
|
-
defaultValue: defaults_1.OptionDefaults.excludeTags,
|
|
381
|
-
validate(value, i18n) {
|
|
382
|
-
if (!Validation.validate([Array, Validation.isTagString], value)) {
|
|
383
|
-
throw new Error(i18n.option_0_values_must_be_array_of_tags("excludeTags"));
|
|
384
|
-
}
|
|
385
|
-
},
|
|
392
|
+
type: ParameterType.Path,
|
|
386
393
|
});
|
|
387
394
|
options.addDeclaration({
|
|
388
395
|
name: "readme",
|
|
389
396
|
help: (i18n) => i18n.help_readme(),
|
|
390
|
-
type:
|
|
397
|
+
type: ParameterType.Path,
|
|
391
398
|
});
|
|
392
399
|
options.addDeclaration({
|
|
393
400
|
name: "cname",
|
|
394
401
|
help: (i18n) => i18n.help_cname(),
|
|
395
402
|
});
|
|
403
|
+
options.addDeclaration({
|
|
404
|
+
name: "favicon",
|
|
405
|
+
help: (i18n) => i18n.help_favicon(),
|
|
406
|
+
validate(value, i18n) {
|
|
407
|
+
if (![".ico", ".svg"].includes(extname(value))) {
|
|
408
|
+
throw new Error(i18n.favicon_must_be_ico_or_svg());
|
|
409
|
+
}
|
|
410
|
+
},
|
|
411
|
+
type: ParameterType.Path,
|
|
412
|
+
});
|
|
396
413
|
options.addDeclaration({
|
|
397
414
|
name: "sourceLinkExternal",
|
|
398
415
|
help: (i18n) => i18n.help_sourceLinkExternal(),
|
|
399
|
-
type:
|
|
416
|
+
type: ParameterType.Boolean,
|
|
400
417
|
});
|
|
401
418
|
options.addDeclaration({
|
|
402
419
|
name: "markdownLinkExternal",
|
|
403
420
|
help: (i18n) => i18n.help_markdownLinkExternal(),
|
|
404
|
-
type:
|
|
421
|
+
type: ParameterType.Boolean,
|
|
405
422
|
defaultValue: true,
|
|
406
423
|
});
|
|
407
424
|
options.addDeclaration({
|
|
408
425
|
name: "githubPages",
|
|
409
426
|
help: (i18n) => i18n.help_githubPages(),
|
|
410
|
-
type:
|
|
427
|
+
type: ParameterType.Boolean,
|
|
411
428
|
defaultValue: true,
|
|
412
429
|
});
|
|
413
430
|
options.addDeclaration({
|
|
@@ -422,59 +439,53 @@ function addTypeDocOptions(options) {
|
|
|
422
439
|
options.addDeclaration({
|
|
423
440
|
name: "useHostedBaseUrlForAbsoluteLinks",
|
|
424
441
|
help: (i18n) => i18n.help_useHostedBaseUrlForAbsoluteLinks(),
|
|
425
|
-
type:
|
|
442
|
+
type: ParameterType.Boolean,
|
|
426
443
|
});
|
|
427
444
|
options.addDeclaration({
|
|
428
445
|
name: "hideGenerator",
|
|
429
446
|
help: (i18n) => i18n.help_hideGenerator(),
|
|
430
|
-
type:
|
|
447
|
+
type: ParameterType.Boolean,
|
|
431
448
|
});
|
|
432
449
|
options.addDeclaration({
|
|
433
450
|
name: "customFooterHtml",
|
|
434
451
|
help: (i18n) => i18n.help_customFooterHtml(),
|
|
435
|
-
type:
|
|
452
|
+
type: ParameterType.String,
|
|
436
453
|
});
|
|
437
454
|
options.addDeclaration({
|
|
438
455
|
name: "customFooterHtmlDisableWrapper",
|
|
439
456
|
help: (i18n) => i18n.help_customFooterHtmlDisableWrapper(),
|
|
440
|
-
type:
|
|
441
|
-
});
|
|
442
|
-
options.addDeclaration({
|
|
443
|
-
name: "hideParameterTypesInTitle",
|
|
444
|
-
help: (i18n) => i18n.help_hideParameterTypesInTitle(),
|
|
445
|
-
type: declaration_1.ParameterType.Boolean,
|
|
446
|
-
defaultValue: true,
|
|
457
|
+
type: ParameterType.Boolean,
|
|
447
458
|
});
|
|
448
459
|
options.addDeclaration({
|
|
449
460
|
name: "cacheBust",
|
|
450
461
|
help: (i18n) => i18n.help_cacheBust(),
|
|
451
|
-
type:
|
|
462
|
+
type: ParameterType.Boolean,
|
|
452
463
|
});
|
|
453
464
|
options.addDeclaration({
|
|
454
465
|
name: "searchInComments",
|
|
455
466
|
help: (i18n) => i18n.help_searchInComments(),
|
|
456
|
-
type:
|
|
467
|
+
type: ParameterType.Boolean,
|
|
457
468
|
});
|
|
458
469
|
options.addDeclaration({
|
|
459
470
|
name: "searchInDocuments",
|
|
460
471
|
help: (i18n) => i18n.help_searchInDocuments(),
|
|
461
|
-
type:
|
|
472
|
+
type: ParameterType.Boolean,
|
|
462
473
|
});
|
|
463
474
|
options.addDeclaration({
|
|
464
475
|
name: "cleanOutputDir",
|
|
465
476
|
help: (i18n) => i18n.help_cleanOutputDir(),
|
|
466
|
-
type:
|
|
477
|
+
type: ParameterType.Boolean,
|
|
467
478
|
defaultValue: true,
|
|
468
479
|
});
|
|
469
480
|
options.addDeclaration({
|
|
470
481
|
name: "titleLink",
|
|
471
482
|
help: (i18n) => i18n.help_titleLink(),
|
|
472
|
-
type:
|
|
483
|
+
type: ParameterType.String,
|
|
473
484
|
});
|
|
474
485
|
options.addDeclaration({
|
|
475
486
|
name: "navigationLinks",
|
|
476
487
|
help: (i18n) => i18n.help_navigationLinks(),
|
|
477
|
-
type:
|
|
488
|
+
type: ParameterType.Mixed,
|
|
478
489
|
defaultValue: {},
|
|
479
490
|
validate(value, i18n) {
|
|
480
491
|
if (!isObject(value)) {
|
|
@@ -488,7 +499,7 @@ function addTypeDocOptions(options) {
|
|
|
488
499
|
options.addDeclaration({
|
|
489
500
|
name: "sidebarLinks",
|
|
490
501
|
help: (i18n) => i18n.help_sidebarLinks(),
|
|
491
|
-
type:
|
|
502
|
+
type: ParameterType.Mixed,
|
|
492
503
|
defaultValue: {},
|
|
493
504
|
validate(value, i18n) {
|
|
494
505
|
if (!isObject(value)) {
|
|
@@ -502,12 +513,12 @@ function addTypeDocOptions(options) {
|
|
|
502
513
|
options.addDeclaration({
|
|
503
514
|
name: "navigationLeaves",
|
|
504
515
|
help: (i18n) => i18n.help_navigationLeaves(),
|
|
505
|
-
type:
|
|
516
|
+
type: ParameterType.Array,
|
|
506
517
|
});
|
|
507
518
|
options.addDeclaration({
|
|
508
519
|
name: "navigation",
|
|
509
520
|
help: (i18n) => i18n.help_navigation(),
|
|
510
|
-
type:
|
|
521
|
+
type: ParameterType.Flags,
|
|
511
522
|
defaults: {
|
|
512
523
|
includeCategories: false,
|
|
513
524
|
includeGroups: false,
|
|
@@ -519,16 +530,30 @@ function addTypeDocOptions(options) {
|
|
|
519
530
|
options.addDeclaration({
|
|
520
531
|
name: "headings",
|
|
521
532
|
help: (i18n) => i18n.help_headings(),
|
|
522
|
-
type:
|
|
533
|
+
type: ParameterType.Flags,
|
|
523
534
|
defaults: {
|
|
524
535
|
readme: true,
|
|
525
536
|
document: false,
|
|
526
537
|
},
|
|
527
538
|
});
|
|
539
|
+
options.addDeclaration({
|
|
540
|
+
name: "sluggerConfiguration",
|
|
541
|
+
help: (i18n) => i18n.help_sluggerConfiguration(),
|
|
542
|
+
type: ParameterType.Flags,
|
|
543
|
+
defaults: {
|
|
544
|
+
lowercase: true,
|
|
545
|
+
},
|
|
546
|
+
});
|
|
547
|
+
options.addDeclaration({
|
|
548
|
+
name: "includeHierarchySummary",
|
|
549
|
+
help: (i18n) => i18n.help_includeHierarchySummary(),
|
|
550
|
+
type: ParameterType.Boolean,
|
|
551
|
+
defaultValue: true,
|
|
552
|
+
});
|
|
528
553
|
options.addDeclaration({
|
|
529
554
|
name: "visibilityFilters",
|
|
530
555
|
help: (i18n) => i18n.help_visibilityFilters(),
|
|
531
|
-
type:
|
|
556
|
+
type: ParameterType.Mixed,
|
|
532
557
|
configFileOnly: true,
|
|
533
558
|
defaultValue: {
|
|
534
559
|
protected: false,
|
|
@@ -554,7 +579,7 @@ function addTypeDocOptions(options) {
|
|
|
554
579
|
options.addDeclaration({
|
|
555
580
|
name: "searchCategoryBoosts",
|
|
556
581
|
help: (i18n) => i18n.help_searchCategoryBoosts(),
|
|
557
|
-
type:
|
|
582
|
+
type: ParameterType.Mixed,
|
|
558
583
|
configFileOnly: true,
|
|
559
584
|
defaultValue: {},
|
|
560
585
|
validate(value, i18n) {
|
|
@@ -569,7 +594,7 @@ function addTypeDocOptions(options) {
|
|
|
569
594
|
options.addDeclaration({
|
|
570
595
|
name: "searchGroupBoosts",
|
|
571
596
|
help: (i18n) => i18n.help_searchGroupBoosts(),
|
|
572
|
-
type:
|
|
597
|
+
type: ParameterType.Mixed,
|
|
573
598
|
configFileOnly: true,
|
|
574
599
|
defaultValue: {},
|
|
575
600
|
validate(value, i18n) {
|
|
@@ -581,13 +606,18 @@ function addTypeDocOptions(options) {
|
|
|
581
606
|
}
|
|
582
607
|
},
|
|
583
608
|
});
|
|
609
|
+
options.addDeclaration({
|
|
610
|
+
name: "useFirstParagraphOfCommentAsSummary",
|
|
611
|
+
help: (i18n) => i18n.help_useFirstParagraphOfCommentAsSummary(),
|
|
612
|
+
type: ParameterType.Boolean,
|
|
613
|
+
});
|
|
584
614
|
///////////////////////////
|
|
585
615
|
///// Comment Options /////
|
|
586
616
|
///////////////////////////
|
|
587
617
|
options.addDeclaration({
|
|
588
618
|
name: "jsDocCompatibility",
|
|
589
619
|
help: (i18n) => i18n.help_jsDocCompatibility(),
|
|
590
|
-
type:
|
|
620
|
+
type: ParameterType.Flags,
|
|
591
621
|
defaults: {
|
|
592
622
|
defaultTag: true,
|
|
593
623
|
exampleTag: true,
|
|
@@ -598,70 +628,69 @@ function addTypeDocOptions(options) {
|
|
|
598
628
|
options.addDeclaration({
|
|
599
629
|
name: "suppressCommentWarningsInDeclarationFiles",
|
|
600
630
|
help: (i18n) => i18n.help_lang(),
|
|
601
|
-
type:
|
|
631
|
+
type: ParameterType.Boolean,
|
|
632
|
+
defaultValue: true,
|
|
602
633
|
});
|
|
603
634
|
options.addDeclaration({
|
|
604
635
|
name: "commentStyle",
|
|
605
636
|
help: (i18n) => i18n.help_commentStyle(),
|
|
606
|
-
type:
|
|
607
|
-
map:
|
|
608
|
-
defaultValue:
|
|
637
|
+
type: ParameterType.Map,
|
|
638
|
+
map: CommentStyle,
|
|
639
|
+
defaultValue: CommentStyle.JSDoc,
|
|
609
640
|
});
|
|
610
641
|
options.addDeclaration({
|
|
611
642
|
name: "useTsLinkResolution",
|
|
612
643
|
help: (i18n) => i18n.help_useTsLinkResolution(),
|
|
613
|
-
type:
|
|
644
|
+
type: ParameterType.Boolean,
|
|
614
645
|
defaultValue: true,
|
|
615
646
|
});
|
|
616
647
|
options.addDeclaration({
|
|
617
648
|
name: "preserveLinkText",
|
|
618
649
|
help: (i18n) => i18n.help_preserveLinkText(),
|
|
619
|
-
type:
|
|
650
|
+
type: ParameterType.Boolean,
|
|
620
651
|
defaultValue: true,
|
|
621
652
|
});
|
|
622
653
|
options.addDeclaration({
|
|
623
654
|
name: "blockTags",
|
|
624
655
|
help: (i18n) => i18n.help_blockTags(),
|
|
625
|
-
type:
|
|
626
|
-
defaultValue:
|
|
627
|
-
validate(
|
|
628
|
-
if (!Validation.validate([Array, Validation.isTagString], value)) {
|
|
629
|
-
throw new Error(i18n.option_0_values_must_be_array_of_tags("blockTags"));
|
|
630
|
-
}
|
|
631
|
-
},
|
|
656
|
+
type: ParameterType.Array,
|
|
657
|
+
defaultValue: blockTags,
|
|
658
|
+
validate: makeTagArrayValidator("blockTags"),
|
|
632
659
|
});
|
|
633
660
|
options.addDeclaration({
|
|
634
661
|
name: "inlineTags",
|
|
635
662
|
help: (i18n) => i18n.help_inlineTags(),
|
|
636
|
-
type:
|
|
637
|
-
defaultValue:
|
|
638
|
-
validate(
|
|
639
|
-
if (!Validation.validate([Array, Validation.isTagString], value)) {
|
|
640
|
-
throw new Error(i18n.option_0_values_must_be_array_of_tags("inlineTags"));
|
|
641
|
-
}
|
|
642
|
-
},
|
|
663
|
+
type: ParameterType.Array,
|
|
664
|
+
defaultValue: inlineTags,
|
|
665
|
+
validate: makeTagArrayValidator("inlineTags"),
|
|
643
666
|
});
|
|
644
667
|
options.addDeclaration({
|
|
645
668
|
name: "modifierTags",
|
|
646
669
|
help: (i18n) => i18n.help_modifierTags(),
|
|
647
|
-
type:
|
|
648
|
-
defaultValue:
|
|
649
|
-
validate(
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
670
|
+
type: ParameterType.Array,
|
|
671
|
+
defaultValue: modifierTags,
|
|
672
|
+
validate: makeTagArrayValidator("modifierTags"),
|
|
673
|
+
});
|
|
674
|
+
options.addDeclaration({
|
|
675
|
+
name: "excludeTags",
|
|
676
|
+
help: (i18n) => i18n.help_excludeTags(),
|
|
677
|
+
type: ParameterType.Array,
|
|
678
|
+
defaultValue: OptionDefaults.excludeTags,
|
|
679
|
+
validate: makeTagArrayValidator("excludeTags"),
|
|
680
|
+
});
|
|
681
|
+
options.addDeclaration({
|
|
682
|
+
name: "notRenderedTags",
|
|
683
|
+
help: (i18n) => i18n.help_notRenderedTags(),
|
|
684
|
+
type: ParameterType.Array,
|
|
685
|
+
defaultValue: OptionDefaults.notRenderedTags,
|
|
686
|
+
validate: makeTagArrayValidator("notRenderedTags"),
|
|
654
687
|
});
|
|
655
688
|
options.addDeclaration({
|
|
656
689
|
name: "cascadedModifierTags",
|
|
657
690
|
help: (i18n) => i18n.help_modifierTags(),
|
|
658
|
-
type:
|
|
659
|
-
defaultValue:
|
|
660
|
-
validate(
|
|
661
|
-
if (!Validation.validate([Array, Validation.isTagString], value)) {
|
|
662
|
-
throw new Error(i18n.option_0_values_must_be_array_of_tags("cascadedModifierTags"));
|
|
663
|
-
}
|
|
664
|
-
},
|
|
691
|
+
type: ParameterType.Array,
|
|
692
|
+
defaultValue: OptionDefaults.cascadedModifierTags,
|
|
693
|
+
validate: makeTagArrayValidator("cascadedModifierTags"),
|
|
665
694
|
});
|
|
666
695
|
///////////////////////////
|
|
667
696
|
// Organization Options ///
|
|
@@ -669,7 +698,13 @@ function addTypeDocOptions(options) {
|
|
|
669
698
|
options.addDeclaration({
|
|
670
699
|
name: "categorizeByGroup",
|
|
671
700
|
help: (i18n) => i18n.help_categorizeByGroup(),
|
|
672
|
-
type:
|
|
701
|
+
type: ParameterType.Boolean,
|
|
702
|
+
defaultValue: false,
|
|
703
|
+
});
|
|
704
|
+
options.addDeclaration({
|
|
705
|
+
name: "groupReferencesByType",
|
|
706
|
+
help: (i18n) => i18n.help_groupReferencesByType(),
|
|
707
|
+
type: ParameterType.Boolean,
|
|
673
708
|
defaultValue: false,
|
|
674
709
|
});
|
|
675
710
|
options.addDeclaration({
|
|
@@ -680,44 +715,44 @@ function addTypeDocOptions(options) {
|
|
|
680
715
|
options.addDeclaration({
|
|
681
716
|
name: "categoryOrder",
|
|
682
717
|
help: (i18n) => i18n.help_categoryOrder(),
|
|
683
|
-
type:
|
|
718
|
+
type: ParameterType.Array,
|
|
684
719
|
});
|
|
685
720
|
options.addDeclaration({
|
|
686
721
|
name: "groupOrder",
|
|
687
722
|
help: (i18n) => i18n.help_groupOrder(),
|
|
688
|
-
type:
|
|
723
|
+
type: ParameterType.Array,
|
|
689
724
|
// default order specified in GroupPlugin to correctly handle localization.
|
|
690
725
|
});
|
|
691
726
|
options.addDeclaration({
|
|
692
727
|
name: "sort",
|
|
693
728
|
help: (i18n) => i18n.help_sort(),
|
|
694
|
-
type:
|
|
695
|
-
defaultValue:
|
|
729
|
+
type: ParameterType.Array,
|
|
730
|
+
defaultValue: OptionDefaults.sort,
|
|
696
731
|
validate(value, i18n) {
|
|
697
732
|
const invalid = new Set(value);
|
|
698
|
-
for (const v of
|
|
733
|
+
for (const v of SORT_STRATEGIES) {
|
|
699
734
|
invalid.delete(v);
|
|
700
735
|
}
|
|
701
736
|
if (invalid.size !== 0) {
|
|
702
|
-
throw new Error(i18n.option_0_specified_1_but_only_2_is_valid("sort", Array.from(invalid).join(", "),
|
|
737
|
+
throw new Error(i18n.option_0_specified_1_but_only_2_is_valid("sort", Array.from(invalid).join(", "), SORT_STRATEGIES.join(", ")));
|
|
703
738
|
}
|
|
704
739
|
},
|
|
705
740
|
});
|
|
706
741
|
options.addDeclaration({
|
|
707
742
|
name: "sortEntryPoints",
|
|
708
743
|
help: (i18n) => i18n.help_sortEntryPoints(),
|
|
709
|
-
type:
|
|
744
|
+
type: ParameterType.Boolean,
|
|
710
745
|
defaultValue: true,
|
|
711
746
|
});
|
|
712
747
|
options.addDeclaration({
|
|
713
748
|
name: "kindSortOrder",
|
|
714
749
|
help: (i18n) => i18n.help_kindSortOrder(),
|
|
715
|
-
type:
|
|
750
|
+
type: ParameterType.Array,
|
|
716
751
|
defaultValue: [],
|
|
717
752
|
validate(value, i18n) {
|
|
718
|
-
const invalid =
|
|
753
|
+
const invalid = setDifference(value, getEnumKeys(ReflectionKind));
|
|
719
754
|
if (invalid.size !== 0) {
|
|
720
|
-
throw new Error(i18n.option_0_specified_1_but_only_2_is_valid(`kindSortOrder`, Array.from(invalid).join(", "),
|
|
755
|
+
throw new Error(i18n.option_0_specified_1_but_only_2_is_valid(`kindSortOrder`, Array.from(invalid).join(", "), getEnumKeys(ReflectionKind).join(", ")));
|
|
721
756
|
}
|
|
722
757
|
},
|
|
723
758
|
});
|
|
@@ -727,84 +762,85 @@ function addTypeDocOptions(options) {
|
|
|
727
762
|
options.addDeclaration({
|
|
728
763
|
name: "watch",
|
|
729
764
|
help: (i18n) => i18n.help_watch(),
|
|
730
|
-
type:
|
|
765
|
+
type: ParameterType.Boolean,
|
|
731
766
|
});
|
|
732
767
|
options.addDeclaration({
|
|
733
768
|
name: "preserveWatchOutput",
|
|
734
769
|
help: (i18n) => i18n.help_preserveWatchOutput(),
|
|
735
|
-
type:
|
|
770
|
+
type: ParameterType.Boolean,
|
|
736
771
|
});
|
|
737
772
|
options.addDeclaration({
|
|
738
773
|
name: "skipErrorChecking",
|
|
739
774
|
help: (i18n) => i18n.help_skipErrorChecking(),
|
|
740
|
-
type:
|
|
775
|
+
type: ParameterType.Boolean,
|
|
741
776
|
defaultValue: false,
|
|
742
777
|
});
|
|
743
778
|
options.addDeclaration({
|
|
744
779
|
name: "help",
|
|
745
780
|
help: (i18n) => i18n.help_help(),
|
|
746
|
-
type:
|
|
781
|
+
type: ParameterType.Boolean,
|
|
747
782
|
});
|
|
748
783
|
options.addDeclaration({
|
|
749
784
|
name: "version",
|
|
750
785
|
help: (i18n) => i18n.help_version(),
|
|
751
|
-
type:
|
|
786
|
+
type: ParameterType.Boolean,
|
|
752
787
|
});
|
|
753
788
|
options.addDeclaration({
|
|
754
789
|
name: "showConfig",
|
|
755
790
|
help: (i18n) => i18n.help_showConfig(),
|
|
756
|
-
type:
|
|
791
|
+
type: ParameterType.Boolean,
|
|
757
792
|
});
|
|
758
793
|
options.addDeclaration({
|
|
759
794
|
name: "plugin",
|
|
760
795
|
help: (i18n) => i18n.help_plugin(),
|
|
761
|
-
type:
|
|
796
|
+
type: ParameterType.ModuleArray,
|
|
762
797
|
});
|
|
763
798
|
options.addDeclaration({
|
|
764
799
|
name: "logLevel",
|
|
765
800
|
help: (i18n) => i18n.help_logLevel(),
|
|
766
|
-
type:
|
|
767
|
-
map:
|
|
768
|
-
defaultValue:
|
|
801
|
+
type: ParameterType.Map,
|
|
802
|
+
map: LogLevel,
|
|
803
|
+
defaultValue: LogLevel.Info,
|
|
769
804
|
});
|
|
770
805
|
options.addDeclaration({
|
|
771
806
|
name: "treatWarningsAsErrors",
|
|
772
807
|
help: (i18n) => i18n.help_treatWarningsAsErrors(),
|
|
773
|
-
type:
|
|
808
|
+
type: ParameterType.Boolean,
|
|
774
809
|
});
|
|
775
810
|
options.addDeclaration({
|
|
776
811
|
name: "treatValidationWarningsAsErrors",
|
|
777
812
|
help: (i18n) => i18n.help_treatValidationWarningsAsErrors(),
|
|
778
|
-
type:
|
|
813
|
+
type: ParameterType.Boolean,
|
|
779
814
|
});
|
|
780
815
|
options.addDeclaration({
|
|
781
816
|
name: "intentionallyNotExported",
|
|
782
817
|
help: (i18n) => i18n.help_intentionallyNotExported(),
|
|
783
|
-
type:
|
|
818
|
+
type: ParameterType.Array,
|
|
784
819
|
});
|
|
785
820
|
options.addDeclaration({
|
|
786
821
|
name: "requiredToBeDocumented",
|
|
787
822
|
help: (i18n) => i18n.help_requiredToBeDocumented(),
|
|
788
|
-
type:
|
|
823
|
+
type: ParameterType.Array,
|
|
789
824
|
validate(values, i18n) {
|
|
790
825
|
// this is good enough because the values of the ReflectionKind enum are all numbers
|
|
791
|
-
const validValues =
|
|
826
|
+
const validValues = getEnumKeys(ReflectionKind);
|
|
792
827
|
for (const kind of values) {
|
|
793
828
|
if (!validValues.includes(kind)) {
|
|
794
829
|
throw new Error(i18n.option_0_specified_1_but_only_2_is_valid("requiredToBeDocumented", kind, validValues.join(", ")));
|
|
795
830
|
}
|
|
796
831
|
}
|
|
797
832
|
},
|
|
798
|
-
defaultValue:
|
|
833
|
+
defaultValue: OptionDefaults.requiredToBeDocumented,
|
|
799
834
|
});
|
|
800
835
|
options.addDeclaration({
|
|
801
836
|
name: "validation",
|
|
802
837
|
help: (i18n) => i18n.help_validation(),
|
|
803
|
-
type:
|
|
838
|
+
type: ParameterType.Flags,
|
|
804
839
|
defaults: {
|
|
805
840
|
notExported: true,
|
|
806
841
|
invalidLink: true,
|
|
807
842
|
notDocumented: false,
|
|
843
|
+
unusedMergeModuleWith: true,
|
|
808
844
|
},
|
|
809
845
|
});
|
|
810
846
|
}
|