typedoc 0.28.0-beta.2 → 0.28.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/dist/index.d.ts +1 -1
- package/dist/lib/application.d.ts +3 -3
- package/dist/lib/converter/converter.d.ts +12 -0
- package/dist/lib/converter/converter.js +27 -11
- package/dist/lib/converter/plugins/IncludePlugin.js +2 -3
- package/dist/lib/converter/symbols.js +2 -1
- package/dist/lib/converter/types.js +1 -1
- package/dist/lib/models/types.d.ts +1 -1
- package/dist/lib/models/types.js +7 -1
- package/dist/lib/output/components.d.ts +3 -3
- package/dist/lib/output/events.d.ts +4 -3
- package/dist/lib/output/events.js +4 -0
- package/dist/lib/output/index.d.ts +1 -1
- package/dist/lib/output/plugins/JavascriptIndexPlugin.js +4 -2
- package/dist/lib/output/renderer.d.ts +2 -2
- package/dist/lib/output/renderer.js +3 -3
- package/dist/lib/output/router.d.ts +49 -37
- package/dist/lib/output/router.js +77 -47
- package/dist/lib/output/theme.d.ts +1 -2
- package/dist/lib/output/themes/MarkedPlugin.js +19 -4
- package/dist/lib/output/themes/default/DefaultTheme.d.ts +1 -1
- package/dist/lib/output/themes/default/DefaultTheme.js +9 -2
- package/dist/lib/output/themes/default/layouts/default.js +1 -1
- package/dist/lib/utils/entry-point.d.ts +1 -1
- package/dist/lib/utils/entry-point.js +14 -4
- package/dist/lib/utils/html.js +1 -1
- package/dist/lib/utils/options/declaration.d.ts +4 -3
- package/dist/lib/utils/options/options.d.ts +2 -2
- package/package.json +8 -8
- package/static/main.js +3 -3
- package/static/style.css +3 -4
|
@@ -34,13 +34,16 @@ var __runInitializers = (this && this.__runInitializers) || function (thisArg, i
|
|
|
34
34
|
};
|
|
35
35
|
import { CategoryPlugin } from "../converter/plugins/CategoryPlugin.js";
|
|
36
36
|
import { GroupPlugin } from "../converter/plugins/GroupPlugin.js";
|
|
37
|
-
import {
|
|
37
|
+
import { ProjectReflection, Reflection, ReflectionKind } from "../models/index.js";
|
|
38
38
|
import { createNormalizedUrl } from "#node-utils";
|
|
39
39
|
import { Option } from "../utils/index.js";
|
|
40
40
|
import { Slugger } from "./themes/default/Slugger.js";
|
|
41
41
|
import { getHierarchyRoots } from "./themes/lib.js";
|
|
42
42
|
/**
|
|
43
43
|
* The type of page which should be rendered. This may be extended in the future.
|
|
44
|
+
*
|
|
45
|
+
* Note: TypeDoc any string may be used as the page kind. TypeDoc defines a few
|
|
46
|
+
* described by this object.
|
|
44
47
|
* @enum
|
|
45
48
|
*/
|
|
46
49
|
export const PageKind = {
|
|
@@ -49,6 +52,18 @@ export const PageKind = {
|
|
|
49
52
|
Document: "document",
|
|
50
53
|
Hierarchy: "hierarchy",
|
|
51
54
|
};
|
|
55
|
+
function getFullName(target) {
|
|
56
|
+
if (target instanceof ProjectReflection) {
|
|
57
|
+
return target.name;
|
|
58
|
+
}
|
|
59
|
+
const parts = [target.name];
|
|
60
|
+
let current = target;
|
|
61
|
+
while (!(current instanceof ProjectReflection)) {
|
|
62
|
+
parts.unshift(current.name);
|
|
63
|
+
current = current.parent;
|
|
64
|
+
}
|
|
65
|
+
return parts.join(".");
|
|
66
|
+
}
|
|
52
67
|
/**
|
|
53
68
|
* Base router class intended to make it easier to implement a router.
|
|
54
69
|
*
|
|
@@ -128,24 +143,27 @@ let BaseRouter = (() => {
|
|
|
128
143
|
}
|
|
129
144
|
return pages;
|
|
130
145
|
}
|
|
131
|
-
hasUrl(
|
|
132
|
-
return this.fullUrls.has(
|
|
146
|
+
hasUrl(target) {
|
|
147
|
+
return this.fullUrls.has(target);
|
|
133
148
|
}
|
|
134
|
-
|
|
149
|
+
getLinkTargets() {
|
|
135
150
|
return Array.from(this.fullUrls.keys());
|
|
136
151
|
}
|
|
137
|
-
getAnchor(
|
|
138
|
-
if (!this.anchors.has(
|
|
139
|
-
this.application.logger.verbose(`${
|
|
152
|
+
getAnchor(target) {
|
|
153
|
+
if (!this.anchors.has(target)) {
|
|
154
|
+
this.application.logger.verbose(`${getFullName(target)} does not have an anchor but one was requested, this is a bug in the theme`);
|
|
140
155
|
}
|
|
141
|
-
return this.anchors.get(
|
|
156
|
+
return this.anchors.get(target);
|
|
142
157
|
}
|
|
143
|
-
hasOwnDocument(
|
|
144
|
-
return this.anchors.get(
|
|
158
|
+
hasOwnDocument(target) {
|
|
159
|
+
return this.anchors.get(target) === undefined && this.hasUrl(target);
|
|
145
160
|
}
|
|
146
161
|
relativeUrl(from, to) {
|
|
147
162
|
let slashes = 0;
|
|
148
163
|
while (!this.hasOwnDocument(from)) {
|
|
164
|
+
// We know we must have a parent here as the Project is the only
|
|
165
|
+
// root level element without a parent, and the project always has
|
|
166
|
+
// an own document.
|
|
149
167
|
from = from.parent;
|
|
150
168
|
}
|
|
151
169
|
const fromUrl = this.getFullUrl(from);
|
|
@@ -163,7 +181,7 @@ let BaseRouter = (() => {
|
|
|
163
181
|
}
|
|
164
182
|
}
|
|
165
183
|
}
|
|
166
|
-
if (equal && !to
|
|
184
|
+
if (equal && !(to instanceof ProjectReflection)) {
|
|
167
185
|
if (fromUrl === toUrl) {
|
|
168
186
|
return "";
|
|
169
187
|
}
|
|
@@ -178,28 +196,35 @@ let BaseRouter = (() => {
|
|
|
178
196
|
if (full[i] === "/")
|
|
179
197
|
++slashes;
|
|
180
198
|
}
|
|
199
|
+
// #2910 avoid urls like ".././"
|
|
200
|
+
if (target == "./" && slashes !== 0) {
|
|
201
|
+
return "../".repeat(slashes);
|
|
202
|
+
}
|
|
181
203
|
return "../".repeat(slashes) + target;
|
|
182
204
|
}
|
|
183
|
-
getFullUrl(
|
|
184
|
-
const url = this.fullUrls.get(
|
|
205
|
+
getFullUrl(target) {
|
|
206
|
+
const url = this.fullUrls.get(target);
|
|
185
207
|
if (!url) {
|
|
186
|
-
throw new Error(`Tried to get a URL of a
|
|
208
|
+
throw new Error(`Tried to get a URL of a router target ${getFullName(target)} which did not receive a URL`);
|
|
187
209
|
}
|
|
188
210
|
return url;
|
|
189
211
|
}
|
|
190
|
-
getSlugger(
|
|
191
|
-
if (this.sluggers.has(
|
|
192
|
-
return this.sluggers.get(
|
|
212
|
+
getSlugger(target) {
|
|
213
|
+
if (this.sluggers.has(target)) {
|
|
214
|
+
return this.sluggers.get(target);
|
|
193
215
|
}
|
|
194
216
|
// A slugger should always be defined at least for the project
|
|
195
|
-
return this.getSlugger(
|
|
217
|
+
return this.getSlugger(target.parent);
|
|
196
218
|
}
|
|
197
219
|
/**
|
|
198
220
|
* Should the page kind to use if a reflection should have its own rendered
|
|
199
221
|
* page in the output. Note that once `undefined` is returned, children of
|
|
200
222
|
* that reflection will not have their own document.
|
|
201
223
|
*/
|
|
202
|
-
getPageKind(
|
|
224
|
+
getPageKind(target) {
|
|
225
|
+
if (!(target instanceof Reflection)) {
|
|
226
|
+
return undefined;
|
|
227
|
+
}
|
|
203
228
|
const pageReflectionKinds = ReflectionKind.Class |
|
|
204
229
|
ReflectionKind.Interface |
|
|
205
230
|
ReflectionKind.Enum |
|
|
@@ -209,38 +234,43 @@ let BaseRouter = (() => {
|
|
|
209
234
|
ReflectionKind.Function |
|
|
210
235
|
ReflectionKind.Variable;
|
|
211
236
|
const documentReflectionKinds = ReflectionKind.Document;
|
|
212
|
-
if (
|
|
237
|
+
if (target.kindOf(pageReflectionKinds)) {
|
|
213
238
|
return PageKind.Reflection;
|
|
214
239
|
}
|
|
215
|
-
if (
|
|
240
|
+
if (target.kindOf(documentReflectionKinds)) {
|
|
216
241
|
return PageKind.Document;
|
|
217
242
|
}
|
|
218
243
|
}
|
|
219
|
-
buildChildPages(
|
|
220
|
-
const kind = this.getPageKind(
|
|
244
|
+
buildChildPages(target, outPages) {
|
|
245
|
+
const kind = this.getPageKind(target);
|
|
221
246
|
if (kind) {
|
|
222
|
-
const idealName = this.getIdealBaseName(
|
|
247
|
+
const idealName = this.getIdealBaseName(target);
|
|
223
248
|
const actualName = this.getFileName(idealName);
|
|
224
|
-
this.fullUrls.set(
|
|
225
|
-
this.sluggers.set(
|
|
249
|
+
this.fullUrls.set(target, actualName);
|
|
250
|
+
this.sluggers.set(target, new Slugger(this.sluggerConfiguration));
|
|
226
251
|
outPages.push({
|
|
227
252
|
kind,
|
|
228
|
-
model:
|
|
253
|
+
model: target,
|
|
229
254
|
url: actualName,
|
|
230
255
|
});
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
256
|
+
if (target instanceof Reflection) {
|
|
257
|
+
target.traverse((child) => {
|
|
258
|
+
this.buildChildPages(child, outPages);
|
|
259
|
+
return true;
|
|
260
|
+
});
|
|
261
|
+
}
|
|
235
262
|
}
|
|
236
263
|
else {
|
|
237
|
-
this.buildAnchors(
|
|
264
|
+
this.buildAnchors(target, target.parent);
|
|
238
265
|
}
|
|
239
266
|
}
|
|
240
|
-
buildAnchors(
|
|
241
|
-
if (!
|
|
242
|
-
|
|
243
|
-
|
|
267
|
+
buildAnchors(target, pageTarget) {
|
|
268
|
+
if (!(target instanceof Reflection) || !(pageTarget instanceof Reflection)) {
|
|
269
|
+
return;
|
|
270
|
+
}
|
|
271
|
+
if (!target.isDeclaration() &&
|
|
272
|
+
!target.isSignature() &&
|
|
273
|
+
!target.isTypeParameter()) {
|
|
244
274
|
return;
|
|
245
275
|
}
|
|
246
276
|
// We support linking to reflections for types directly contained within an export
|
|
@@ -248,16 +278,16 @@ let BaseRouter = (() => {
|
|
|
248
278
|
// for a property depending on whether or not it is deemed useful, and defining a link
|
|
249
279
|
// which might not be used may result in a link being generated which isn't valid. #2808.
|
|
250
280
|
// This should be kept in sync with the renderingChildIsUseful function.
|
|
251
|
-
if (
|
|
252
|
-
(!
|
|
253
|
-
|
|
281
|
+
if (target.kindOf(ReflectionKind.TypeLiteral) &&
|
|
282
|
+
(!target.parent?.kindOf(ReflectionKind.SomeExport) ||
|
|
283
|
+
target.parent.type?.type !==
|
|
254
284
|
"reflection")) {
|
|
255
285
|
return;
|
|
256
286
|
}
|
|
257
|
-
if (!
|
|
258
|
-
let refl =
|
|
287
|
+
if (!target.kindOf(ReflectionKind.TypeLiteral)) {
|
|
288
|
+
let refl = target;
|
|
259
289
|
const parts = [refl.name];
|
|
260
|
-
while (refl.parent && refl.parent !==
|
|
290
|
+
while (refl.parent && refl.parent !== pageTarget) {
|
|
261
291
|
refl = refl.parent;
|
|
262
292
|
// Avoid duplicate names for signatures and useless __type in anchors
|
|
263
293
|
if (!refl.kindOf(ReflectionKind.TypeLiteral |
|
|
@@ -265,12 +295,12 @@ let BaseRouter = (() => {
|
|
|
265
295
|
parts.unshift(refl.name);
|
|
266
296
|
}
|
|
267
297
|
}
|
|
268
|
-
const anchor = this.getSlugger(
|
|
269
|
-
this.fullUrls.set(
|
|
270
|
-
this.anchors.set(
|
|
298
|
+
const anchor = this.getSlugger(pageTarget).slug(parts.join("."));
|
|
299
|
+
this.fullUrls.set(target, this.fullUrls.get(pageTarget) + "#" + anchor);
|
|
300
|
+
this.anchors.set(target, anchor);
|
|
271
301
|
}
|
|
272
|
-
|
|
273
|
-
this.buildAnchors(child,
|
|
302
|
+
target.traverse((child) => {
|
|
303
|
+
this.buildAnchors(child, pageTarget);
|
|
274
304
|
return true;
|
|
275
305
|
});
|
|
276
306
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { RendererComponent } from "./components.js";
|
|
2
2
|
import type { PageEvent, RendererEvent } from "./events.js";
|
|
3
|
-
import type { Reflection } from "../models/index.js";
|
|
4
3
|
/**
|
|
5
4
|
* Base class of all themes.
|
|
6
5
|
*
|
|
@@ -11,7 +10,7 @@ export declare abstract class Theme extends RendererComponent {
|
|
|
11
10
|
/**
|
|
12
11
|
* Renders the provided page to a string, which will be written to disk by the {@link Renderer}
|
|
13
12
|
*/
|
|
14
|
-
abstract render(event: PageEvent
|
|
13
|
+
abstract render(event: PageEvent): string;
|
|
15
14
|
/**
|
|
16
15
|
* Optional hook to call pre-render jobs
|
|
17
16
|
*/
|
|
@@ -39,7 +39,22 @@ import { Option } from "../../utils/index.js";
|
|
|
39
39
|
import { highlight, isLoadedLanguage, isSupportedLanguage } from "../../utils/highlighter.js";
|
|
40
40
|
import { assertNever, escapeHtml, i18n, JSX } from "#utils";
|
|
41
41
|
import { anchorIcon } from "./default/partials/anchor-icon.js";
|
|
42
|
-
import { ReflectionKind, } from "../../models/index.js";
|
|
42
|
+
import { Reflection, ReflectionKind, } from "../../models/index.js";
|
|
43
|
+
function getFriendlyFullName(target) {
|
|
44
|
+
if (target instanceof Reflection) {
|
|
45
|
+
return target.getFriendlyFullName();
|
|
46
|
+
}
|
|
47
|
+
if (target.parent) {
|
|
48
|
+
return target.name;
|
|
49
|
+
}
|
|
50
|
+
const parts = [target.name];
|
|
51
|
+
let current = target;
|
|
52
|
+
while (current.parent) {
|
|
53
|
+
parts.unshift(current.name);
|
|
54
|
+
current = current.parent;
|
|
55
|
+
}
|
|
56
|
+
return parts.join(".");
|
|
57
|
+
}
|
|
43
58
|
/**
|
|
44
59
|
* Implements markdown and relativeURL helpers for templates.
|
|
45
60
|
* @internal
|
|
@@ -115,11 +130,11 @@ let MarkedPlugin = (() => {
|
|
|
115
130
|
lang = lang || "typescript";
|
|
116
131
|
lang = lang.toLowerCase();
|
|
117
132
|
if (!isSupportedLanguage(lang)) {
|
|
118
|
-
this.application.logger.warn(i18n.unsupported_highlight_language_0_not_highlighted_in_comment_for_1(lang, this.page?.model
|
|
133
|
+
this.application.logger.warn(i18n.unsupported_highlight_language_0_not_highlighted_in_comment_for_1(lang, getFriendlyFullName(this.page?.model || { name: "(unknown)" })));
|
|
119
134
|
return text;
|
|
120
135
|
}
|
|
121
136
|
if (!isLoadedLanguage(lang)) {
|
|
122
|
-
this.application.logger.warn(i18n.unloaded_language_0_not_highlighted_in_comment_for_1(lang, this.page?.model
|
|
137
|
+
this.application.logger.warn(i18n.unloaded_language_0_not_highlighted_in_comment_for_1(lang, getFriendlyFullName(this.page?.model || { name: "(unknown)" })));
|
|
123
138
|
return text;
|
|
124
139
|
}
|
|
125
140
|
return highlight(text, lang);
|
|
@@ -258,7 +273,7 @@ let MarkedPlugin = (() => {
|
|
|
258
273
|
for (const { source, target, link } of this.renderedRelativeLinks) {
|
|
259
274
|
const slugger = this.owner.router.getSlugger(target);
|
|
260
275
|
if (!slugger.hasAnchor(link.targetAnchor)) {
|
|
261
|
-
this.application.logger.warn(i18n.reflection_0_links_to_1_but_anchor_does_not_exist_try_2(
|
|
276
|
+
this.application.logger.warn(i18n.reflection_0_links_to_1_but_anchor_does_not_exist_try_2(getFriendlyFullName(source), link.text, slugger
|
|
262
277
|
.getSimilarAnchors(link.targetAnchor)
|
|
263
278
|
.map((a) => link.text.replace(/#.*/, "#" + a))
|
|
264
279
|
.join("\n\t")));
|
|
@@ -61,7 +61,7 @@ export declare class DefaultTheme extends Theme {
|
|
|
61
61
|
* @param renderer The renderer this theme is attached to.
|
|
62
62
|
*/
|
|
63
63
|
constructor(renderer: Renderer);
|
|
64
|
-
render(page: PageEvent
|
|
64
|
+
render(page: PageEvent): string;
|
|
65
65
|
preRender(_event: RendererEvent): Promise<void>;
|
|
66
66
|
private _navigationCache;
|
|
67
67
|
/**
|
|
@@ -140,12 +140,19 @@ let DefaultTheme = (() => {
|
|
|
140
140
|
this.router = renderer.router;
|
|
141
141
|
}
|
|
142
142
|
render(page) {
|
|
143
|
-
const
|
|
143
|
+
const templateMapping = {
|
|
144
144
|
[PageKind.Index]: this.indexTemplate,
|
|
145
145
|
[PageKind.Document]: this.documentTemplate,
|
|
146
146
|
[PageKind.Hierarchy]: this.hierarchyTemplate,
|
|
147
147
|
[PageKind.Reflection]: this.reflectionTemplate,
|
|
148
|
-
}
|
|
148
|
+
};
|
|
149
|
+
const template = templateMapping[page.pageKind];
|
|
150
|
+
if (!template) {
|
|
151
|
+
throw new Error(`TypeDoc's DefaultTheme does not support the page kind ${page.pageKind}`);
|
|
152
|
+
}
|
|
153
|
+
if (!page.isReflectionEvent()) {
|
|
154
|
+
throw new Error(`TypeDoc's DefaultTheme requires that a page model be a reflection when rendering ${page.pageKind}`);
|
|
155
|
+
}
|
|
149
156
|
const templateOutput = this.defaultLayoutTemplate(page, template);
|
|
150
157
|
return "<!DOCTYPE html>" + JSX.renderElement(templateOutput) + "\n";
|
|
151
158
|
}
|
|
@@ -67,7 +67,7 @@ export const defaultLayout = (context, template, props) => (JSX.createElement("h
|
|
|
67
67
|
JSX.createElement("script", null,
|
|
68
68
|
JSX.createElement(JSX.Raw, { html: 'document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";' }),
|
|
69
69
|
JSX.createElement(JSX.Raw, { html: 'document.body.style.display="none";' }),
|
|
70
|
-
JSX.createElement(JSX.Raw, { html: 'setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)' })),
|
|
70
|
+
JSX.createElement(JSX.Raw, { html: 'setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)' })),
|
|
71
71
|
context.toolbar(props),
|
|
72
72
|
JSX.createElement("div", { class: "container container-main" },
|
|
73
73
|
JSX.createElement("div", { class: "col-content" },
|
|
@@ -36,7 +36,7 @@ export interface DocumentEntryPoint {
|
|
|
36
36
|
displayName: string;
|
|
37
37
|
path: NormalizedPath;
|
|
38
38
|
}
|
|
39
|
-
export declare function inferEntryPoints(logger: Logger, options: Options): DocumentationEntryPoint[];
|
|
39
|
+
export declare function inferEntryPoints(logger: Logger, options: Options, programs?: ts.Program[]): DocumentationEntryPoint[];
|
|
40
40
|
export declare function getEntryPoints(logger: Logger, options: Options): DocumentationEntryPoint[] | undefined;
|
|
41
41
|
/**
|
|
42
42
|
* Document entry points are markdown documents that the user has requested we include in the project with
|
|
@@ -30,7 +30,7 @@ export const EntryPointStrategy = {
|
|
|
30
30
|
*/
|
|
31
31
|
Merge: "merge",
|
|
32
32
|
};
|
|
33
|
-
export function inferEntryPoints(logger, options) {
|
|
33
|
+
export function inferEntryPoints(logger, options, programs) {
|
|
34
34
|
const packageJson = discoverPackageJson(options.packageDir ?? process.cwd());
|
|
35
35
|
if (!packageJson) {
|
|
36
36
|
logger.warn(i18n.no_entry_points_provided());
|
|
@@ -38,7 +38,7 @@ export function inferEntryPoints(logger, options) {
|
|
|
38
38
|
}
|
|
39
39
|
const pathEntries = inferPackageEntryPointPaths(packageJson.file);
|
|
40
40
|
const entryPoints = [];
|
|
41
|
-
|
|
41
|
+
programs ||= getEntryPrograms(pathEntries.map((p) => p[1]), logger, options);
|
|
42
42
|
// See also: addInferredDeclarationMapPaths in ReflectionSymbolId
|
|
43
43
|
const jsToTsSource = new Map();
|
|
44
44
|
for (const program of programs) {
|
|
@@ -137,10 +137,20 @@ export function getWatchEntryPoints(logger, options, program) {
|
|
|
137
137
|
const strategy = options.getValue("entryPointStrategy");
|
|
138
138
|
switch (strategy) {
|
|
139
139
|
case EntryPointStrategy.Resolve:
|
|
140
|
-
|
|
140
|
+
if (options.isSet("entryPoints")) {
|
|
141
|
+
result = getEntryPointsForPaths(logger, expandGlobs(entryPoints, exclude, logger), options, [program]);
|
|
142
|
+
}
|
|
143
|
+
else {
|
|
144
|
+
result = inferEntryPoints(logger, options, [program]);
|
|
145
|
+
}
|
|
141
146
|
break;
|
|
142
147
|
case EntryPointStrategy.Expand:
|
|
143
|
-
|
|
148
|
+
if (options.isSet("entryPoints")) {
|
|
149
|
+
result = getExpandedEntryPointsForPaths(logger, expandGlobs(entryPoints, exclude, logger), options, [program]);
|
|
150
|
+
}
|
|
151
|
+
else {
|
|
152
|
+
result = inferEntryPoints(logger, options, [program]);
|
|
153
|
+
}
|
|
144
154
|
break;
|
|
145
155
|
case EntryPointStrategy.Packages:
|
|
146
156
|
logger.error(i18n.watch_does_not_support_packages_mode());
|
package/dist/lib/utils/html.js
CHANGED
|
@@ -26,7 +26,7 @@ export type CommentStyle = (typeof CommentStyle)[keyof typeof CommentStyle];
|
|
|
26
26
|
export type OutputSpecification = {
|
|
27
27
|
name: string;
|
|
28
28
|
path: string;
|
|
29
|
-
options?:
|
|
29
|
+
options?: TypeDocOptions;
|
|
30
30
|
};
|
|
31
31
|
/**
|
|
32
32
|
* List of option names which, with `entryPointStrategy` set to `packages`
|
|
@@ -40,12 +40,13 @@ export declare const rootPackageOptions: readonly ["plugin", "packageOptions", "
|
|
|
40
40
|
* @interface
|
|
41
41
|
*/
|
|
42
42
|
export type TypeDocOptions = {
|
|
43
|
-
[K in keyof TypeDocOptionMap]
|
|
43
|
+
[K in keyof TypeDocOptionMap]?: unknown extends TypeDocOptionMap[K] ? unknown : TypeDocOptionMap[K] extends ManuallyValidatedOption<infer ManuallyValidated> ? ManuallyValidated : TypeDocOptionMap[K] extends NormalizedPath[] | NormalizedPathOrModule[] | GlobString[] ? string[] : TypeDocOptionMap[K] extends NormalizedPath ? string : TypeDocOptionMap[K] extends string | string[] | number | boolean ? TypeDocOptionMap[K] : TypeDocOptionMap[K] extends Record<string, boolean> ? Partial<TypeDocOptionMap[K]> | boolean : keyof TypeDocOptionMap[K] | TypeDocOptionMap[K][keyof TypeDocOptionMap[K]];
|
|
44
44
|
};
|
|
45
45
|
/**
|
|
46
46
|
* Describes all TypeDoc specific options as returned by {@link Options.getValue}, this is
|
|
47
47
|
* slightly more restrictive than the {@link TypeDocOptions} since it does not allow both
|
|
48
48
|
* keys and values for mapped option types, and does not allow partials of flag values.
|
|
49
|
+
* It also does not mark keys as optional.
|
|
49
50
|
* @interface
|
|
50
51
|
*/
|
|
51
52
|
export type TypeDocOptionValues = {
|
|
@@ -80,7 +81,7 @@ export interface TypeDocOptionMap {
|
|
|
80
81
|
plugin: NormalizedPathOrModule[];
|
|
81
82
|
lang: string;
|
|
82
83
|
locales: ManuallyValidatedOption<Record<string, Record<string, string>>>;
|
|
83
|
-
packageOptions: ManuallyValidatedOption<
|
|
84
|
+
packageOptions: ManuallyValidatedOption<TypeDocPackageOptions>;
|
|
84
85
|
entryPoints: GlobString[];
|
|
85
86
|
entryPointStrategy: typeof EntryPointStrategy;
|
|
86
87
|
alwaysCreateEntryPointModule: boolean;
|
|
@@ -138,7 +138,7 @@ export declare class Options {
|
|
|
138
138
|
/**
|
|
139
139
|
* Gets all of the TypeDoc option values defined in this option container.
|
|
140
140
|
*/
|
|
141
|
-
getRawValues(): Readonly<Partial<
|
|
141
|
+
getRawValues(): Readonly<Partial<TypeDocOptionValues>>;
|
|
142
142
|
/**
|
|
143
143
|
* Gets a value for the given option key, throwing if the option has not been declared.
|
|
144
144
|
* @param name
|
|
@@ -151,7 +151,7 @@ export declare class Options {
|
|
|
151
151
|
* @param value
|
|
152
152
|
* @param configPath the directory to resolve Path type values against
|
|
153
153
|
*/
|
|
154
|
-
setValue<K extends keyof TypeDocOptions>(name: K, value: TypeDocOptions[K], configPath?: string): void;
|
|
154
|
+
setValue<K extends keyof TypeDocOptions>(name: K, value: Exclude<TypeDocOptions[K], undefined>, configPath?: string): void;
|
|
155
155
|
setValue(name: NeverIfInternal<string>, value: NeverIfInternal<unknown>, configPath?: NeverIfInternal<string>): void;
|
|
156
156
|
/**
|
|
157
157
|
* Gets the set compiler options.
|
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.1",
|
|
5
5
|
"homepage": "https://typedoc.org",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"exports": {
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"pnpm": ">= 10"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@gerrit0/mini-shiki": "^3.
|
|
34
|
+
"@gerrit0/mini-shiki": "^3.2.1",
|
|
35
35
|
"lunr": "^2.3.9",
|
|
36
36
|
"markdown-it": "^14.1.0",
|
|
37
37
|
"minimatch": "^9.0.5",
|
|
@@ -41,7 +41,7 @@
|
|
|
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.22.0",
|
|
45
45
|
"@types/lunr": "^2.3.7",
|
|
46
46
|
"@types/markdown-it": "^14.1.2",
|
|
47
47
|
"@types/mocha": "^10.0.10",
|
|
@@ -49,14 +49,14 @@
|
|
|
49
49
|
"@typestrong/fs-fixture-builder": "github:TypeStrong/fs-fixture-builder#34113409e3a171e68ce5e2b55461ef5c35591cfe",
|
|
50
50
|
"c8": "^10.1.3",
|
|
51
51
|
"dprint": "^0.49.0",
|
|
52
|
-
"esbuild": "^0.
|
|
53
|
-
"eslint": "^9.
|
|
52
|
+
"esbuild": "^0.25.1",
|
|
53
|
+
"eslint": "^9.22.0",
|
|
54
54
|
"mocha": "^11.1.0",
|
|
55
|
-
"puppeteer": "^24.
|
|
55
|
+
"puppeteer": "^24.4.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.2",
|
|
59
|
+
"typescript-eslint": "^8.26.1"
|
|
60
60
|
},
|
|
61
61
|
"files": [
|
|
62
62
|
"/bin",
|