typedoc 0.28.1 → 0.28.3
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/dist/lib/application.d.ts +2 -2
- package/dist/lib/application.js +6 -4
- package/dist/lib/cli.js +1 -1
- package/dist/lib/converter/comments/index.js +6 -1
- package/dist/lib/converter/context.js +2 -2
- package/dist/lib/converter/converter.d.ts +3 -3
- package/dist/lib/converter/converter.js +13 -6
- package/dist/lib/converter/factories/signature.d.ts +1 -0
- package/dist/lib/converter/factories/signature.js +28 -5
- package/dist/lib/converter/plugins/CategoryPlugin.js +1 -1
- package/dist/lib/converter/plugins/GroupPlugin.js +3 -0
- package/dist/lib/converter/plugins/IncludePlugin.js +2 -0
- package/dist/lib/converter/symbols.js +6 -2
- package/dist/lib/converter/types.js +28 -10
- package/dist/lib/internationalization/locales/en.cjs +1 -1
- package/dist/lib/internationalization/locales/en.d.cts +1 -1
- package/dist/lib/internationalization/locales/ja.cjs +0 -1
- package/dist/lib/internationalization/locales/zh.cjs +6 -1
- package/dist/lib/internationalization/locales/zh.d.cts +6 -1
- package/dist/lib/models/types.js +264 -216
- package/dist/lib/output/renderer.d.ts +5 -1
- package/dist/lib/output/renderer.js +9 -1
- package/dist/lib/output/router.js +17 -5
- package/dist/lib/output/themes/MarkedPlugin.js +6 -1
- package/dist/lib/output/themes/default/partials/index.js +5 -13
- package/dist/lib/output/themes/default/partials/members.js +9 -6
- package/dist/lib/output/themes/default/partials/moduleReflection.js +15 -8
- package/dist/lib/output/themes/default/partials/navigation.js +13 -5
- package/dist/lib/output/themes/lib.d.ts +3 -2
- package/dist/lib/output/themes/lib.js +22 -15
- package/dist/lib/serialization/deserializer.d.ts +1 -1
- package/dist/lib/serialization/deserializer.js +1 -1
- package/dist/lib/serialization/serializer.d.ts +1 -1
- package/dist/lib/serialization/serializer.js +1 -1
- package/dist/lib/utils/entry-point.js +5 -6
- package/dist/lib/utils/highlighter.js +3 -2
- package/dist/lib/utils/options/declaration.js +11 -1
- package/dist/lib/utils/options/defaults.js +2 -0
- package/dist/lib/utils/options/options.d.ts +1 -1
- package/dist/lib/utils/options/options.js +1 -1
- package/dist/lib/utils/options/readers/arguments.d.ts +2 -0
- package/dist/lib/utils/options/readers/arguments.js +17 -4
- package/dist/lib/utils/options/tsdoc-defaults.d.ts +1 -1
- package/dist/lib/utils/options/tsdoc-defaults.js +1 -0
- package/dist/lib/utils-common/array.d.ts +1 -0
- package/dist/lib/utils-common/array.js +1 -0
- package/dist/lib/utils-common/events.d.ts +1 -0
- package/dist/lib/utils-common/events.js +1 -0
- package/package.json +10 -10
- package/static/style.css +4 -4
- package/tsdoc.json +5 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { classNames, renderName } from "../../lib.js";
|
|
1
|
+
import { classNames, getMemberSections, isNoneSection, renderName } from "../../lib.js";
|
|
2
2
|
import { i18n, JSX } from "#utils";
|
|
3
|
-
function
|
|
3
|
+
function renderSection({ urlTo, reflectionIcon, getReflectionClasses, markdown }, item) {
|
|
4
4
|
return (JSX.createElement("section", { class: "tsd-index-section" },
|
|
5
|
-
JSX.createElement("h3", { class: "tsd-index-heading" },
|
|
5
|
+
!isNoneSection(item) && JSX.createElement("h3", { class: "tsd-index-heading" }, item.title),
|
|
6
6
|
item.description && (JSX.createElement("div", { class: "tsd-comment tsd-typography" },
|
|
7
7
|
JSX.createElement(JSX.Raw, { html: markdown(item.description) }))),
|
|
8
8
|
JSX.createElement("div", { class: "tsd-index-list" }, item.children.map((item) => (JSX.createElement(JSX.Fragment, null,
|
|
@@ -12,15 +12,7 @@ function renderCategory({ urlTo, reflectionIcon, getReflectionClasses, markdown
|
|
|
12
12
|
"\n"))))));
|
|
13
13
|
}
|
|
14
14
|
export function index(context, props) {
|
|
15
|
-
|
|
16
|
-
if (props.categories?.length) {
|
|
17
|
-
content = props.categories.map((item) => renderCategory(context, item));
|
|
18
|
-
}
|
|
19
|
-
else if (props.groups?.length) {
|
|
20
|
-
content = props.groups.flatMap((item) => item.categories
|
|
21
|
-
? item.categories.map((item2) => renderCategory(context, item2, item.title))
|
|
22
|
-
: renderCategory(context, item));
|
|
23
|
-
}
|
|
15
|
+
const sections = getMemberSections(props);
|
|
24
16
|
return (JSX.createElement(JSX.Fragment, null,
|
|
25
17
|
JSX.createElement("section", { class: "tsd-panel-group tsd-index-group" },
|
|
26
18
|
JSX.createElement("section", { class: "tsd-panel tsd-index-panel" },
|
|
@@ -28,5 +20,5 @@ export function index(context, props) {
|
|
|
28
20
|
JSX.createElement("summary", { class: "tsd-accordion-summary tsd-index-summary" },
|
|
29
21
|
context.icons.chevronSmall(),
|
|
30
22
|
JSX.createElement("h5", { class: "tsd-index-heading uppercase" }, i18n.theme_index())),
|
|
31
|
-
JSX.createElement("div", { class: "tsd-accordion-details" },
|
|
23
|
+
JSX.createElement("div", { class: "tsd-accordion-details" }, sections.map(s => renderSection(context, s))))))));
|
|
32
24
|
}
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import { JSX } from "#utils";
|
|
2
2
|
import {} from "../../../../models/index.js";
|
|
3
|
-
import { getMemberSections } from "../../lib.js";
|
|
3
|
+
import { getMemberSections, isNoneSection } from "../../lib.js";
|
|
4
4
|
export function members(context, props) {
|
|
5
5
|
const sections = getMemberSections(props, (child) => !context.router.hasOwnDocument(child));
|
|
6
|
-
return (JSX.createElement(JSX.Fragment, null, sections.map((
|
|
7
|
-
|
|
6
|
+
return (JSX.createElement(JSX.Fragment, null, sections.map((section) => {
|
|
7
|
+
if (isNoneSection(section)) {
|
|
8
|
+
return (JSX.createElement("section", { class: "tsd-panel-group tsd-member-group" }, section.children.map((item) => context.member(item))));
|
|
9
|
+
}
|
|
10
|
+
context.page.startNewSection(section.title);
|
|
8
11
|
return (JSX.createElement("details", { class: "tsd-panel-group tsd-member-group tsd-accordion", open: true },
|
|
9
|
-
JSX.createElement("summary", { class: "tsd-accordion-summary", "data-key": "section-" + title },
|
|
12
|
+
JSX.createElement("summary", { class: "tsd-accordion-summary", "data-key": "section-" + section.title },
|
|
10
13
|
context.icons.chevronDown(),
|
|
11
|
-
JSX.createElement("h2", null, title)),
|
|
12
|
-
JSX.createElement("section", null, children.map((item) => context.member(item)))));
|
|
14
|
+
JSX.createElement("h2", null, section.title)),
|
|
15
|
+
JSX.createElement("section", null, section.children.map((item) => context.member(item)))));
|
|
13
16
|
})));
|
|
14
17
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReferenceReflection, ReflectionKind, } from "../../../../models/index.js";
|
|
2
2
|
import { JSX } from "#utils";
|
|
3
|
-
import { classNames, getDisplayName, getMemberSections, getUniquePath, join } from "../../lib.js";
|
|
3
|
+
import { classNames, getDisplayName, getMemberSections, getUniquePath, isNoneSection, join } from "../../lib.js";
|
|
4
4
|
import { anchorIcon } from "./anchor-icon.js";
|
|
5
5
|
export function moduleReflection(context, mod) {
|
|
6
6
|
const sections = getMemberSections(mod);
|
|
@@ -10,15 +10,22 @@ export function moduleReflection(context, mod) {
|
|
|
10
10
|
context.commentTags(mod))),
|
|
11
11
|
mod.isDeclaration() && mod.kind === ReflectionKind.Module && mod.readme?.length && (JSX.createElement("section", { class: "tsd-panel tsd-typography" },
|
|
12
12
|
JSX.createElement(JSX.Raw, { html: context.markdown(mod.readme) }))),
|
|
13
|
-
sections.map((
|
|
14
|
-
|
|
13
|
+
sections.map((section) => {
|
|
14
|
+
if (!isNoneSection(section)) {
|
|
15
|
+
context.page.startNewSection(section.title);
|
|
16
|
+
}
|
|
17
|
+
const content = (JSX.createElement(JSX.Fragment, null,
|
|
18
|
+
section.description && (JSX.createElement("div", { class: "tsd-comment tsd-typography" },
|
|
19
|
+
JSX.createElement(JSX.Raw, { html: context.markdown(section.description) }))),
|
|
20
|
+
JSX.createElement("dl", { class: "tsd-member-summaries" }, section.children.map((item) => context.moduleMemberSummary(item)))));
|
|
21
|
+
if (isNoneSection(section)) {
|
|
22
|
+
return (JSX.createElement("section", { class: "tsd-panel-group tsd-member-group" }, content));
|
|
23
|
+
}
|
|
15
24
|
return (JSX.createElement("details", { class: "tsd-panel-group tsd-member-group tsd-accordion", open: true },
|
|
16
|
-
JSX.createElement("summary", { class: "tsd-accordion-summary", "data-key": "section-" + title },
|
|
25
|
+
JSX.createElement("summary", { class: "tsd-accordion-summary", "data-key": "section-" + section.title },
|
|
17
26
|
context.icons.chevronDown(),
|
|
18
|
-
JSX.createElement("h2", null, title)),
|
|
19
|
-
|
|
20
|
-
JSX.createElement(JSX.Raw, { html: context.markdown(description) }))),
|
|
21
|
-
JSX.createElement("dl", { class: "tsd-member-summaries" }, children.map((item) => context.moduleMemberSummary(item)))));
|
|
27
|
+
JSX.createElement("h2", null, section.title)),
|
|
28
|
+
content));
|
|
22
29
|
})));
|
|
23
30
|
}
|
|
24
31
|
export function moduleMemberSummary(context, member) {
|
|
@@ -87,12 +87,20 @@ function buildSectionNavigation(context, headings) {
|
|
|
87
87
|
const built = (JSX.createElement("ul", null, level.map((l) => JSX.createElement("li", null, l))));
|
|
88
88
|
levels[levels.length - 1].push(built);
|
|
89
89
|
}
|
|
90
|
+
function getInferredHeadingLevel(heading) {
|
|
91
|
+
if (heading.level) {
|
|
92
|
+
// Regular heading
|
|
93
|
+
return heading.level + 2;
|
|
94
|
+
}
|
|
95
|
+
if (heading.kind) {
|
|
96
|
+
// Reflection
|
|
97
|
+
return 2;
|
|
98
|
+
}
|
|
99
|
+
// Group/category
|
|
100
|
+
return 1;
|
|
101
|
+
}
|
|
90
102
|
for (const heading of headings) {
|
|
91
|
-
const inferredLevel = heading
|
|
92
|
-
? heading.level + 2 // regular heading
|
|
93
|
-
: heading.kind
|
|
94
|
-
? 2 // reflection
|
|
95
|
-
: 1; // group/category
|
|
103
|
+
const inferredLevel = getInferredHeadingLevel(heading);
|
|
96
104
|
while (inferredLevel < levels.length) {
|
|
97
105
|
finalizeLevel(false);
|
|
98
106
|
}
|
|
@@ -25,12 +25,13 @@ export declare function renderTypeParametersSignature(context: DefaultThemeRende
|
|
|
25
25
|
*/
|
|
26
26
|
export declare function renderName(refl: Reflection): JSX.Element | (string | JSX.Element)[];
|
|
27
27
|
export declare function getHierarchyRoots(project: ProjectReflection): DeclarationReflection[];
|
|
28
|
-
export
|
|
28
|
+
export declare function isNoneSection(section: MemberSection): boolean;
|
|
29
|
+
export interface MemberSection {
|
|
29
30
|
title: string;
|
|
30
31
|
description?: CommentDisplayPart[];
|
|
31
32
|
children: Array<DocumentReflection | DeclarationReflection>;
|
|
32
33
|
}
|
|
33
|
-
export declare function getMemberSections(parent: ContainerReflection, childFilter?: (refl: Reflection) => boolean):
|
|
34
|
+
export declare function getMemberSections(parent: ContainerReflection, childFilter?: (refl: Reflection) => boolean): MemberSection[];
|
|
34
35
|
/**
|
|
35
36
|
* Returns a (hopefully) globally unique path for the given reflection.
|
|
36
37
|
*
|
|
@@ -70,17 +70,6 @@ export function hasTypeParameters(reflection) {
|
|
|
70
70
|
export function renderTypeParametersSignature(context, typeParameters) {
|
|
71
71
|
if (!typeParameters || typeParameters.length === 0)
|
|
72
72
|
return JSX.createElement(JSX.Fragment, null);
|
|
73
|
-
const hideParamTypes = false; // context.options.getValue("hideTypesInSignatureTitle");
|
|
74
|
-
if (hideParamTypes) {
|
|
75
|
-
return (JSX.createElement(JSX.Fragment, null,
|
|
76
|
-
JSX.createElement("span", { class: "tsd-signature-symbol" }, "<"),
|
|
77
|
-
join(JSX.createElement("span", { class: "tsd-signature-symbol" }, ", "), typeParameters, (item) => (JSX.createElement(JSX.Fragment, null,
|
|
78
|
-
(item.flags.isConst || item.varianceModifier) && (JSX.createElement("span", { class: "tsd-signature-keyword" },
|
|
79
|
-
item.flags.isConst && "const ",
|
|
80
|
-
item.varianceModifier && `${item.varianceModifier} `)),
|
|
81
|
-
JSX.createElement("a", { class: "tsd-signature-type tsd-kind-type-parameter", href: context.urlTo(item) }, item.name)))),
|
|
82
|
-
JSX.createElement("span", { class: "tsd-signature-symbol" }, ">")));
|
|
83
|
-
}
|
|
84
73
|
return (JSX.createElement(JSX.Fragment, null,
|
|
85
74
|
JSX.createElement("span", { class: "tsd-signature-symbol" }, "<"),
|
|
86
75
|
join(JSX.createElement("span", { class: "tsd-signature-symbol" }, ", "), typeParameters, (item) => (JSX.createElement(JSX.Fragment, null,
|
|
@@ -135,6 +124,18 @@ export function getHierarchyRoots(project) {
|
|
|
135
124
|
rootsCache.set(project, result);
|
|
136
125
|
return result;
|
|
137
126
|
}
|
|
127
|
+
export function isNoneSection(section) {
|
|
128
|
+
return section.title.toLocaleLowerCase() === "none";
|
|
129
|
+
}
|
|
130
|
+
function sortNoneSectionFirst(a, b) {
|
|
131
|
+
if (isNoneSection(a)) {
|
|
132
|
+
return -1;
|
|
133
|
+
}
|
|
134
|
+
if (isNoneSection(b)) {
|
|
135
|
+
return 1;
|
|
136
|
+
}
|
|
137
|
+
return 0;
|
|
138
|
+
}
|
|
138
139
|
export function getMemberSections(parent, childFilter = () => true) {
|
|
139
140
|
if (parent.categories?.length) {
|
|
140
141
|
return filterMap(parent.categories, (cat) => {
|
|
@@ -146,17 +147,17 @@ export function getMemberSections(parent, childFilter = () => true) {
|
|
|
146
147
|
description: cat.description,
|
|
147
148
|
children,
|
|
148
149
|
};
|
|
149
|
-
});
|
|
150
|
+
}).sort(sortNoneSectionFirst);
|
|
150
151
|
}
|
|
151
152
|
if (parent.groups?.length) {
|
|
152
153
|
return parent.groups.flatMap((group) => {
|
|
153
154
|
if (group.categories?.length) {
|
|
154
|
-
return filterMap(group.categories, (cat) => {
|
|
155
|
+
return filterMap(group.categories.slice().sort(sortNoneSectionFirst), (cat) => {
|
|
155
156
|
const children = cat.children.filter(childFilter);
|
|
156
157
|
if (!children.length)
|
|
157
158
|
return;
|
|
158
159
|
return {
|
|
159
|
-
title: `${group.title} - ${cat.title}`,
|
|
160
|
+
title: isNoneSection(cat) ? group.title : `${group.title} - ${cat.title}`,
|
|
160
161
|
description: cat.description,
|
|
161
162
|
children,
|
|
162
163
|
};
|
|
@@ -170,7 +171,13 @@ export function getMemberSections(parent, childFilter = () => true) {
|
|
|
170
171
|
description: group.description,
|
|
171
172
|
children,
|
|
172
173
|
};
|
|
173
|
-
});
|
|
174
|
+
}).sort(sortNoneSectionFirst);
|
|
175
|
+
}
|
|
176
|
+
if (parent.children?.length) {
|
|
177
|
+
return [{
|
|
178
|
+
title: "none",
|
|
179
|
+
children: parent.children || [],
|
|
180
|
+
}];
|
|
174
181
|
}
|
|
175
182
|
return [];
|
|
176
183
|
}
|
|
@@ -5,7 +5,7 @@ const supportedSchemaVersions = [JSONOutput.SCHEMA_VERSION];
|
|
|
5
5
|
/**
|
|
6
6
|
* Deserializes TypeDoc's JSON output back to {@link Reflection} instances.
|
|
7
7
|
*
|
|
8
|
-
* @group
|
|
8
|
+
* @group None
|
|
9
9
|
* @summary Deserializes TypeDoc's JSON output
|
|
10
10
|
*/
|
|
11
11
|
export class Deserializer {
|
|
@@ -3,7 +3,7 @@ import { EventDispatcher, insertPrioritySorted, removeIfPresent } from "#utils";
|
|
|
3
3
|
/**
|
|
4
4
|
* Serializes TypeDoc's models to JSON
|
|
5
5
|
*
|
|
6
|
-
* @group
|
|
6
|
+
* @group None
|
|
7
7
|
* @summary Serializes TypeDoc's models to JSON
|
|
8
8
|
*/
|
|
9
9
|
export class Serializer extends EventDispatcher {
|
|
@@ -228,16 +228,15 @@ function expandGlobs(globs, exclude, logger) {
|
|
|
228
228
|
});
|
|
229
229
|
const filtered = result.filter((file) => file === entry || !excludePatterns.matchesAny(file));
|
|
230
230
|
if (result.length === 0) {
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
}
|
|
231
|
+
// #2918 - do not pass entry through nicePath here in case it contains
|
|
232
|
+
// windows path separators which should cause additional warnings.
|
|
233
|
+
logger.warn(i18n.glob_0_did_not_match_any_files(entry));
|
|
235
234
|
}
|
|
236
235
|
else if (filtered.length === 0) {
|
|
237
|
-
logger.warn(i18n.entry_point_0_did_not_match_any_files_after_exclude(
|
|
236
|
+
logger.warn(i18n.entry_point_0_did_not_match_any_files_after_exclude(entry));
|
|
238
237
|
}
|
|
239
238
|
else if (filtered.length !== 1) {
|
|
240
|
-
logger.verbose(`Expanded ${
|
|
239
|
+
logger.verbose(`Expanded ${entry} to:\n\t${filtered
|
|
241
240
|
.map(nicePath)
|
|
242
241
|
.join("\n\t")}`);
|
|
243
242
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as shiki from "@gerrit0/mini-shiki";
|
|
2
2
|
import { JSX, unique } from "#utils";
|
|
3
3
|
import assert from "assert";
|
|
4
|
-
const
|
|
4
|
+
const tsAliases = [["mts", "typescript"], ["cts", "typescript"]];
|
|
5
|
+
const aliases = new Map(tsAliases);
|
|
5
6
|
for (const lang of shiki.bundledLanguagesInfo) {
|
|
6
7
|
for (const alias of lang.aliases || []) {
|
|
7
8
|
aliases.set(alias, lang.id);
|
|
@@ -131,7 +132,7 @@ export function getSupportedThemes() {
|
|
|
131
132
|
return supportedThemes;
|
|
132
133
|
}
|
|
133
134
|
export function isLoadedLanguage(lang) {
|
|
134
|
-
return (
|
|
135
|
+
return (isSupportedLanguage(lang) || highlighter?.supports(lang) || false);
|
|
135
136
|
}
|
|
136
137
|
export function highlight(code, lang) {
|
|
137
138
|
assert(highlighter, "Tried to highlight with an uninitialized highlighter");
|
|
@@ -199,7 +199,17 @@ const converters = {
|
|
|
199
199
|
return resolved;
|
|
200
200
|
},
|
|
201
201
|
[ParameterType.GlobArray](value, option, configPath) {
|
|
202
|
-
const toGlobString = (v) =>
|
|
202
|
+
const toGlobString = (v) => {
|
|
203
|
+
const s = String(v);
|
|
204
|
+
// If the string tries to escape a character which isn't a special
|
|
205
|
+
// glob character, the user probably provided a Windows style path
|
|
206
|
+
// by accident due to shell completion, tell them to either remove
|
|
207
|
+
// the useless escape or switch to Unix path separators.
|
|
208
|
+
if (/\\[^?*()[\]\\{}]/.test(s)) {
|
|
209
|
+
throw new Error(i18n.glob_0_should_use_posix_slash(s));
|
|
210
|
+
}
|
|
211
|
+
return createGlobString(configPath, s);
|
|
212
|
+
};
|
|
203
213
|
const globs = Array.isArray(value) ? value.map(toGlobString) : [toGlobString(value)];
|
|
204
214
|
option.validate?.(globs);
|
|
205
215
|
return globs;
|
|
@@ -27,6 +27,7 @@ export const excludeTags = [
|
|
|
27
27
|
"@satisfies",
|
|
28
28
|
"@overload",
|
|
29
29
|
"@inline",
|
|
30
|
+
"@inlineType",
|
|
30
31
|
];
|
|
31
32
|
export const blockTags = TagDefaults.blockTags;
|
|
32
33
|
export const inlineTags = TagDefaults.inlineTags;
|
|
@@ -41,6 +42,7 @@ export const notRenderedTags = [
|
|
|
41
42
|
"@showGroups",
|
|
42
43
|
"@hideCategories",
|
|
43
44
|
"@hideGroups",
|
|
45
|
+
"@disableGroups",
|
|
44
46
|
"@expand",
|
|
45
47
|
"@preventExpand",
|
|
46
48
|
"@expandType",
|
|
@@ -60,7 +60,7 @@ export interface OptionsReader {
|
|
|
60
60
|
* 4. argv (300) - Read argv again since any options set there should override those set in config
|
|
61
61
|
* files.
|
|
62
62
|
*
|
|
63
|
-
* @group
|
|
63
|
+
* @group None
|
|
64
64
|
* @summary Contains all of TypeDoc's option declarations & values
|
|
65
65
|
*/
|
|
66
66
|
export declare class Options {
|
|
@@ -26,7 +26,7 @@ const optionSnapshots = new WeakMap();
|
|
|
26
26
|
* 4. argv (300) - Read argv again since any options set there should override those set in config
|
|
27
27
|
* files.
|
|
28
28
|
*
|
|
29
|
-
* @group
|
|
29
|
+
* @group None
|
|
30
30
|
* @summary Contains all of TypeDoc's option declarations & values
|
|
31
31
|
*/
|
|
32
32
|
export class Options {
|
|
@@ -8,6 +8,8 @@ export declare class ArgumentsReader implements OptionsReader {
|
|
|
8
8
|
readonly order: number;
|
|
9
9
|
readonly supportsPackages = false;
|
|
10
10
|
private args;
|
|
11
|
+
private skipErrorReporting;
|
|
11
12
|
constructor(priority: number, args?: string[]);
|
|
13
|
+
ignoreErrors(): this;
|
|
12
14
|
read(container: Options, logger: Logger): void;
|
|
13
15
|
}
|
|
@@ -15,10 +15,15 @@ export class ArgumentsReader {
|
|
|
15
15
|
order;
|
|
16
16
|
supportsPackages = false;
|
|
17
17
|
args;
|
|
18
|
+
skipErrorReporting = false;
|
|
18
19
|
constructor(priority, args = process.argv.slice(2)) {
|
|
19
20
|
this.order = priority;
|
|
20
21
|
this.args = args;
|
|
21
22
|
}
|
|
23
|
+
ignoreErrors() {
|
|
24
|
+
this.skipErrorReporting = true;
|
|
25
|
+
return this;
|
|
26
|
+
}
|
|
22
27
|
read(container, logger) {
|
|
23
28
|
// Make container's type more lax, we do the appropriate checks manually.
|
|
24
29
|
const options = container;
|
|
@@ -30,7 +35,9 @@ export class ArgumentsReader {
|
|
|
30
35
|
}
|
|
31
36
|
catch (err) {
|
|
32
37
|
ok(err instanceof Error);
|
|
33
|
-
|
|
38
|
+
if (!this.skipErrorReporting) {
|
|
39
|
+
logger.error(err.message);
|
|
40
|
+
}
|
|
34
41
|
}
|
|
35
42
|
};
|
|
36
43
|
while (index < this.args.length) {
|
|
@@ -40,7 +47,9 @@ export class ArgumentsReader {
|
|
|
40
47
|
: options.getDeclaration("entryPoints");
|
|
41
48
|
if (decl) {
|
|
42
49
|
if (decl.configFileOnly) {
|
|
43
|
-
|
|
50
|
+
if (!this.skipErrorReporting) {
|
|
51
|
+
logger.error(i18n.option_0_can_only_be_specified_by_config_file(decl.name));
|
|
52
|
+
}
|
|
44
53
|
continue;
|
|
45
54
|
}
|
|
46
55
|
if (seen.has(decl.name) && ARRAY_OPTION_TYPES.has(decl.type)) {
|
|
@@ -61,7 +70,9 @@ export class ArgumentsReader {
|
|
|
61
70
|
else {
|
|
62
71
|
if (index === this.args.length) {
|
|
63
72
|
// Only boolean values have optional values.
|
|
64
|
-
|
|
73
|
+
if (!this.skipErrorReporting) {
|
|
74
|
+
logger.warn(i18n.option_0_expected_a_value_but_none_provided(decl.name));
|
|
75
|
+
}
|
|
65
76
|
}
|
|
66
77
|
trySet(decl.name, this.args[index]);
|
|
67
78
|
}
|
|
@@ -87,7 +98,9 @@ export class ArgumentsReader {
|
|
|
87
98
|
continue;
|
|
88
99
|
}
|
|
89
100
|
}
|
|
90
|
-
|
|
101
|
+
if (!this.skipErrorReporting) {
|
|
102
|
+
logger.error(i18n.unknown_option_0_may_have_meant_1(name, options.getSimilarOptions(name).join("\n\t")));
|
|
103
|
+
}
|
|
91
104
|
index++;
|
|
92
105
|
}
|
|
93
106
|
}
|
|
@@ -3,4 +3,4 @@ export declare const blockTags: readonly ["@defaultValue", "@deprecated", "@exam
|
|
|
3
3
|
export declare const tsdocInlineTags: readonly ["@link", "@inheritDoc", "@label"];
|
|
4
4
|
export declare const inlineTags: readonly ["@link", "@inheritDoc", "@label", "@linkcode", "@linkplain", "@include", "@includeCode"];
|
|
5
5
|
export declare const tsdocModifierTags: readonly ["@alpha", "@beta", "@eventProperty", "@experimental", "@internal", "@override", "@packageDocumentation", "@public", "@readonly", "@sealed", "@virtual"];
|
|
6
|
-
export declare const modifierTags: readonly ["@alpha", "@beta", "@eventProperty", "@experimental", "@internal", "@override", "@packageDocumentation", "@public", "@readonly", "@sealed", "@virtual", "@abstract", "@class", "@enum", "@event", "@expand", "@hidden", "@hideCategories", "@hideconstructor", "@hideGroups", "@ignore", "@inline", "@interface", "@namespace", "@function", "@overload", "@private", "@protected", "@showCategories", "@showGroups", "@useDeclaredType", "@primaryExport"];
|
|
6
|
+
export declare const modifierTags: readonly ["@alpha", "@beta", "@eventProperty", "@experimental", "@internal", "@override", "@packageDocumentation", "@public", "@readonly", "@sealed", "@virtual", "@abstract", "@class", "@disableGroups", "@enum", "@event", "@expand", "@hidden", "@hideCategories", "@hideconstructor", "@hideGroups", "@ignore", "@inline", "@interface", "@namespace", "@function", "@overload", "@private", "@protected", "@showCategories", "@showGroups", "@useDeclaredType", "@primaryExport"];
|
|
@@ -2,6 +2,7 @@ export declare const emptyArray: readonly [];
|
|
|
2
2
|
/**
|
|
3
3
|
* Inserts an item into an array sorted by priority. If two items have the same priority,
|
|
4
4
|
* the item will be inserted later will be placed later in the array.
|
|
5
|
+
* Higher priority is placed earlier in the array.
|
|
5
6
|
* @param arr modified by inserting item.
|
|
6
7
|
* @param item
|
|
7
8
|
*/
|
|
@@ -2,6 +2,7 @@ export const emptyArray = [];
|
|
|
2
2
|
/**
|
|
3
3
|
* Inserts an item into an array sorted by priority. If two items have the same priority,
|
|
4
4
|
* the item will be inserted later will be placed later in the array.
|
|
5
|
+
* Higher priority is placed earlier in the array.
|
|
5
6
|
* @param arr modified by inserting item.
|
|
6
7
|
* @param item
|
|
7
8
|
*/
|
|
@@ -11,6 +11,7 @@ export declare class EventDispatcher<T extends Record<keyof T, unknown[]>> {
|
|
|
11
11
|
* @param event the event to listen to.
|
|
12
12
|
* @param listener function to be called when an this event is emitted.
|
|
13
13
|
* @param priority optional priority to insert this hook with.
|
|
14
|
+
* Higher priority is placed earlier in the listener array.
|
|
14
15
|
*/
|
|
15
16
|
on<K extends keyof T>(event: K, listener: (this: undefined, ...args: T[K]) => void, priority?: number): void;
|
|
16
17
|
/**
|
|
@@ -14,6 +14,7 @@ export class EventDispatcher {
|
|
|
14
14
|
* @param event the event to listen to.
|
|
15
15
|
* @param listener function to be called when an this event is emitted.
|
|
16
16
|
* @param priority optional priority to insert this hook with.
|
|
17
|
+
* Higher priority is placed earlier in the listener array.
|
|
17
18
|
*/
|
|
18
19
|
on(event, listener, priority = 0) {
|
|
19
20
|
const list = (this._listeners.get(event) || []).slice();
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "typedoc",
|
|
3
3
|
"description": "Create api documentation for TypeScript projects.",
|
|
4
|
-
"version": "0.28.
|
|
4
|
+
"version": "0.28.3",
|
|
5
5
|
"homepage": "https://typedoc.org",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"exports": {
|
|
@@ -31,32 +31,32 @@
|
|
|
31
31
|
"pnpm": ">= 10"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@gerrit0/mini-shiki": "^3.2.
|
|
34
|
+
"@gerrit0/mini-shiki": "^3.2.2",
|
|
35
35
|
"lunr": "^2.3.9",
|
|
36
36
|
"markdown-it": "^14.1.0",
|
|
37
37
|
"minimatch": "^9.0.5",
|
|
38
|
-
"yaml": "^2.7.
|
|
38
|
+
"yaml": "^2.7.1"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
41
|
"typescript": "5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x || 5.6.x || 5.7.x || 5.8.x"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@eslint/js": "^9.
|
|
44
|
+
"@eslint/js": "^9.24.0",
|
|
45
45
|
"@types/lunr": "^2.3.7",
|
|
46
46
|
"@types/markdown-it": "^14.1.2",
|
|
47
47
|
"@types/mocha": "^10.0.10",
|
|
48
48
|
"@types/node": "18",
|
|
49
49
|
"@typestrong/fs-fixture-builder": "github:TypeStrong/fs-fixture-builder#34113409e3a171e68ce5e2b55461ef5c35591cfe",
|
|
50
50
|
"c8": "^10.1.3",
|
|
51
|
-
"dprint": "^0.49.
|
|
52
|
-
"esbuild": "^0.25.
|
|
53
|
-
"eslint": "^9.
|
|
51
|
+
"dprint": "^0.49.1",
|
|
52
|
+
"esbuild": "^0.25.2",
|
|
53
|
+
"eslint": "^9.24.0",
|
|
54
54
|
"mocha": "^11.1.0",
|
|
55
|
-
"puppeteer": "^24.
|
|
55
|
+
"puppeteer": "^24.6.0",
|
|
56
56
|
"semver": "^7.7.1",
|
|
57
57
|
"tsx": "^4.19.3",
|
|
58
|
-
"typescript": "5.8.
|
|
59
|
-
"typescript-eslint": "^8.
|
|
58
|
+
"typescript": "5.8.3",
|
|
59
|
+
"typescript-eslint": "^8.29.0"
|
|
60
60
|
},
|
|
61
61
|
"files": [
|
|
62
62
|
"/bin",
|
package/static/style.css
CHANGED
|
@@ -1004,14 +1004,14 @@
|
|
|
1004
1004
|
margin-left: -1.5rem;
|
|
1005
1005
|
}
|
|
1006
1006
|
|
|
1007
|
-
.tsd-page-navigation-section {
|
|
1008
|
-
margin-left: 10px;
|
|
1009
|
-
}
|
|
1010
1007
|
.tsd-page-navigation-section > summary {
|
|
1011
1008
|
padding: 0.25rem;
|
|
1012
1009
|
}
|
|
1010
|
+
.tsd-page-navigation-section > summary > svg {
|
|
1011
|
+
margin-right: 0.25rem;
|
|
1012
|
+
}
|
|
1013
1013
|
.tsd-page-navigation-section > div {
|
|
1014
|
-
margin-left:
|
|
1014
|
+
margin-left: 30px;
|
|
1015
1015
|
}
|
|
1016
1016
|
.tsd-page-navigation ul {
|
|
1017
1017
|
padding-left: 1.75rem;
|