typedoc 0.27.6 → 0.27.7

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.
Files changed (52) hide show
  1. package/bin/typedoc +21 -2
  2. package/dist/index.d.ts +1 -1
  3. package/dist/lib/application.d.ts +30 -1
  4. package/dist/lib/application.js +96 -20
  5. package/dist/lib/cli.js +4 -4
  6. package/dist/lib/converter/converter.d.ts +2 -3
  7. package/dist/lib/converter/converter.js +15 -20
  8. package/dist/lib/converter/factories/signature.js +16 -4
  9. package/dist/lib/converter/plugins/IncludePlugin.d.ts +2 -0
  10. package/dist/lib/converter/plugins/IncludePlugin.js +177 -4
  11. package/dist/lib/converter/plugins/PackagePlugin.js +2 -0
  12. package/dist/lib/converter/symbols.js +21 -7
  13. package/dist/lib/converter/types.d.ts +2 -2
  14. package/dist/lib/converter/types.js +21 -18
  15. package/dist/lib/internationalization/internationalization.js +3 -1
  16. package/dist/lib/internationalization/locales/en.cjs +14 -0
  17. package/dist/lib/internationalization/locales/en.d.cts +13 -0
  18. package/dist/lib/internationalization/locales/ja.cjs +321 -0
  19. package/dist/lib/internationalization/locales/ja.d.cts +308 -0
  20. package/dist/lib/internationalization/locales/jp.cjs +2 -320
  21. package/dist/lib/internationalization/locales/jp.d.cts +2 -308
  22. package/dist/lib/internationalization/locales/zh.cjs +6 -3
  23. package/dist/lib/internationalization/locales/zh.d.cts +5 -2
  24. package/dist/lib/internationalization/translatable.d.ts +2 -1
  25. package/dist/lib/output/index.d.ts +1 -0
  26. package/dist/lib/output/plugins/AssetsPlugin.d.ts +1 -7
  27. package/dist/lib/output/plugins/AssetsPlugin.js +18 -7
  28. package/dist/lib/output/themes/default/DefaultTheme.d.ts +3 -39
  29. package/dist/lib/output/themes/default/DefaultTheme.js +19 -10
  30. package/dist/lib/output/themes/default/DefaultThemeRenderContext.d.ts +12 -12
  31. package/dist/lib/output/themes/default/partials/icon.d.ts +17 -2
  32. package/dist/lib/output/themes/default/partials/icon.js +77 -79
  33. package/dist/lib/output/themes/default/partials/member.getterSetter.js +6 -6
  34. package/dist/lib/output/themes/default/partials/member.signatures.js +3 -3
  35. package/dist/lib/output/themes/default/templates/reflection.js +2 -2
  36. package/dist/lib/utils/fs.d.ts +2 -2
  37. package/dist/lib/utils/fs.js +4 -3
  38. package/dist/lib/utils/general.d.ts +1 -0
  39. package/dist/lib/utils/general.js +11 -0
  40. package/dist/lib/utils/options/options.d.ts +3 -2
  41. package/dist/lib/utils/options/options.js +2 -2
  42. package/dist/lib/utils/options/readers/package-json.d.ts +1 -1
  43. package/dist/lib/utils/options/readers/package-json.js +2 -2
  44. package/dist/lib/utils/options/readers/tsconfig.d.ts +1 -1
  45. package/dist/lib/utils/options/readers/tsconfig.js +2 -2
  46. package/dist/lib/utils/options/readers/typedoc.d.ts +1 -1
  47. package/dist/lib/utils/options/readers/typedoc.js +4 -4
  48. package/dist/lib/utils/tsconfig.d.ts +1 -1
  49. package/dist/lib/utils/tsconfig.js +2 -2
  50. package/package.json +1 -1
  51. package/static/main.js +3 -3
  52. package/static/style.css +5 -4
@@ -1,9 +1,9 @@
1
1
  import type { PageEvent, Renderer } from "../../index.js";
2
2
  import type { Internationalization, TranslationProxy } from "../../../internationalization/internationalization.js";
3
- import type { DocumentReflection, CommentDisplayPart, DeclarationReflection, Reflection } from "../../../models/index.js";
3
+ import type { CommentDisplayPart, Reflection } from "../../../models/index.js";
4
4
  import { type NeverIfInternal, type Options } from "../../../utils/index.js";
5
5
  import type { DefaultTheme } from "./DefaultTheme.js";
6
- import { type icons } from "./partials/icon.js";
6
+ import { type Icons } from "./partials/icon.js";
7
7
  export declare class DefaultThemeRenderContext {
8
8
  readonly theme: DefaultTheme;
9
9
  page: PageEvent<Reflection>;
@@ -18,7 +18,7 @@ export declare class DefaultThemeRenderContext {
18
18
  * Note: This creates a reference to icons declared by {@link DefaultTheme.icons},
19
19
  * to customize icons, that object must be modified instead.
20
20
  */
21
- get icons(): Readonly<typeof icons>;
21
+ get icons(): Readonly<Icons>;
22
22
  get slugger(): import("./Slugger.js").Slugger;
23
23
  hook: Renderer["hooks"]["emit"];
24
24
  /** Avoid this in favor of urlTo if possible */
@@ -28,8 +28,8 @@ export declare class DefaultThemeRenderContext {
28
28
  /** Renders user comment markdown wrapped in a tsd-comment div */
29
29
  displayParts: (parts: readonly CommentDisplayPart[] | undefined) => import("../../../utils/jsx.elements.js").JsxElement | undefined;
30
30
  getNavigation: () => import("./DefaultTheme.js").NavigationElement[];
31
- getReflectionClasses: (refl: DeclarationReflection | DocumentReflection) => string;
32
- documentTemplate: (props: PageEvent<DocumentReflection>) => import("../../../utils/jsx.elements.js").JsxElement;
31
+ getReflectionClasses: (refl: Reflection) => string;
32
+ documentTemplate: (props: PageEvent<import("../../../models/index.js").DocumentReflection>) => import("../../../utils/jsx.elements.js").JsxElement;
33
33
  reflectionTemplate: (props: PageEvent<import("../../../models/index.js").ContainerReflection>) => import("../../../utils/jsx.elements.js").JsxElement;
34
34
  indexTemplate: (props: PageEvent<import("../../../models/index.js").ProjectReflection>) => import("../../../utils/jsx.elements.js").JsxElement;
35
35
  hierarchyTemplate: (props: PageEvent<import("../../../models/index.js").ProjectReflection>) => import("../../../utils/jsx.elements.js").JsxElement;
@@ -67,19 +67,19 @@ export declare class DefaultThemeRenderContext {
67
67
  header: (props: PageEvent<Reflection>) => import("../../../utils/jsx.elements.js").JsxElement;
68
68
  hierarchy: (typeHierarchy: import("../../../models/index.js").DeclarationHierarchy | undefined) => import("../../../utils/jsx.elements.js").JsxElement | undefined;
69
69
  index: (props: import("../../../models/index.js").ContainerReflection) => import("../../../utils/jsx.elements.js").JsxElement;
70
- member: (props: DeclarationReflection | DocumentReflection) => import("../../../utils/jsx.elements.js").JsxElement;
71
- moduleReflection: (mod: DeclarationReflection | import("../../../models/index.js").ProjectReflection) => import("../../../utils/jsx.elements.js").JsxElement;
72
- moduleMemberSummary: (member: DeclarationReflection | DocumentReflection) => import("../../../utils/jsx.elements.js").JsxElement;
73
- memberDeclaration: (props: DeclarationReflection) => import("../../../utils/jsx.elements.js").JsxElement;
74
- memberGetterSetter: (props: DeclarationReflection) => import("../../../utils/jsx.elements.js").JsxElement;
70
+ member: (props: import("../../../models/index.js").DeclarationReflection | import("../../../models/index.js").DocumentReflection) => import("../../../utils/jsx.elements.js").JsxElement;
71
+ moduleReflection: (mod: import("../../../models/index.js").DeclarationReflection | import("../../../models/index.js").ProjectReflection) => import("../../../utils/jsx.elements.js").JsxElement;
72
+ moduleMemberSummary: (member: import("../../../models/index.js").DeclarationReflection | import("../../../models/index.js").DocumentReflection) => import("../../../utils/jsx.elements.js").JsxElement;
73
+ memberDeclaration: (props: import("../../../models/index.js").DeclarationReflection) => import("../../../utils/jsx.elements.js").JsxElement;
74
+ memberGetterSetter: (props: import("../../../models/index.js").DeclarationReflection) => import("../../../utils/jsx.elements.js").JsxElement;
75
75
  memberSignatureBody: (props: import("../../../models/index.js").SignatureReflection, r_1?: {
76
76
  hideSources?: boolean;
77
77
  } | undefined) => import("../../../utils/jsx.elements.js").JsxElement;
78
78
  memberSignatureTitle: (props: import("../../../models/index.js").SignatureReflection, options?: {
79
79
  hideName?: boolean;
80
80
  } | undefined) => import("../../../utils/jsx.elements.js").JsxElement;
81
- memberSignatures: (props: DeclarationReflection) => import("../../../utils/jsx.elements.js").JsxElement;
82
- memberSources: (props: DeclarationReflection | import("../../../models/index.js").SignatureReflection) => import("../../../utils/jsx.elements.js").JsxElement;
81
+ memberSignatures: (props: import("../../../models/index.js").DeclarationReflection) => import("../../../utils/jsx.elements.js").JsxElement;
82
+ memberSources: (props: import("../../../models/index.js").DeclarationReflection | import("../../../models/index.js").SignatureReflection) => import("../../../utils/jsx.elements.js").JsxElement;
83
83
  members: (props: import("../../../models/index.js").ContainerReflection) => import("../../../utils/jsx.elements.js").JsxElement;
84
84
  sidebar: (props: PageEvent<Reflection>) => import("../../../utils/jsx.elements.js").JsxElement;
85
85
  pageSidebar: (props: PageEvent<Reflection>) => import("../../../utils/jsx.elements.js").JsxElement;
@@ -1,5 +1,20 @@
1
1
  import { ReflectionKind } from "../../../../models/index.js";
2
2
  import { JSX } from "../../../../utils/index.js";
3
3
  import type { DefaultThemeRenderContext } from "../DefaultThemeRenderContext.js";
4
- export declare function buildRefIcons<T extends Record<string, () => JSX.Element>>(icons: T, context: DefaultThemeRenderContext): T;
5
- export declare const icons: Record<ReflectionKind | "chevronDown" | "checkbox" | "menu" | "search" | "chevronSmall" | "anchor" | "folder" | "alertNote" | "alertTip" | "alertImportant" | "alertWarning" | "alertCaution", () => JSX.Element>;
4
+ import type { TranslationProxy } from "../../../../internationalization/index.js";
5
+ export declare function buildRefIcons(icons: Icons, context: DefaultThemeRenderContext): Icons;
6
+ export interface Icons extends Record<ReflectionKind, () => JSX.Element> {
7
+ chevronDown(): JSX.Element;
8
+ checkbox(): JSX.Element;
9
+ menu(): JSX.Element;
10
+ search(): JSX.Element;
11
+ chevronSmall(): JSX.Element;
12
+ anchor(): JSX.Element;
13
+ folder(): JSX.Element;
14
+ alertNote(): JSX.Element;
15
+ alertTip(): JSX.Element;
16
+ alertImportant(): JSX.Element;
17
+ alertWarning(): JSX.Element;
18
+ alertCaution(): JSX.Element;
19
+ }
20
+ export declare function getIcons(i18n: TranslationProxy): Icons;
@@ -3,10 +3,10 @@
3
3
  import assert from "assert";
4
4
  import { ReflectionKind } from "../../../../models/index.js";
5
5
  import { JSX } from "../../../../utils/index.js";
6
- const kindIcon = (letterPath, color, circular = false) => (JSX.createElement("svg", { class: "tsd-kind-icon", viewBox: "0 0 24 24" },
6
+ const kindIcon = (letterPath, color, label, circular = false) => (JSX.createElement("svg", { class: "tsd-kind-icon", viewBox: "0 0 24 24", "aria-label": label },
7
7
  JSX.createElement("rect", { fill: "var(--color-icon-background)", stroke: color, "stroke-width": "1.5", x: "1", y: "1", width: "22", height: "22", rx: circular ? "12" : "6" }),
8
8
  letterPath));
9
- const textIcon = (letter, color, circular = false) => kindIcon(JSX.createElement("text", { fill: "var(--color-icon-text)", x: "50%", y: "50%", "dominant-baseline": "central", "text-anchor": "middle" }, letter), color, circular);
9
+ const textIcon = (letter, color, label, circular = false) => kindIcon(JSX.createElement("text", { fill: "var(--color-icon-text)", x: "50%", y: "50%", "dominant-baseline": "central", "text-anchor": "middle" }, letter), color, label, circular);
10
10
  export function buildRefIcons(icons, context) {
11
11
  const refs = {};
12
12
  for (const [name, builder] of Object.entries(icons)) {
@@ -24,80 +24,78 @@ export function buildRefIcons(icons, context) {
24
24
  }
25
25
  return refs;
26
26
  }
27
- export const icons = {
28
- [ReflectionKind.Accessor]: () => textIcon("A", "var(--color-ts-accessor)", true),
29
- [ReflectionKind.CallSignature]() {
30
- return this[ReflectionKind.Function]();
31
- },
32
- [ReflectionKind.Class]: () => textIcon("C", "var(--color-ts-class)"),
33
- [ReflectionKind.Constructor]: () => textIcon("C", "var(--color-ts-constructor)", true),
34
- [ReflectionKind.ConstructorSignature]() {
35
- return this[ReflectionKind.Constructor]();
36
- },
37
- [ReflectionKind.Enum]: () => textIcon("E", "var(--color-ts-enum)"),
38
- [ReflectionKind.EnumMember]() {
39
- return this[ReflectionKind.Property]();
40
- },
41
- [ReflectionKind.Function]: () => textIcon("F", "var(--color-ts-function)"),
42
- [ReflectionKind.GetSignature]() {
43
- return this[ReflectionKind.Accessor]();
44
- },
45
- [ReflectionKind.IndexSignature]() {
46
- return this[ReflectionKind.Property]();
47
- },
48
- [ReflectionKind.Interface]: () => textIcon("I", "var(--color-ts-interface)"),
49
- [ReflectionKind.Method]: () => textIcon("M", "var(--color-ts-method)", true),
50
- [ReflectionKind.Module]: () => textIcon("M", "var(--color-ts-module)"),
51
- [ReflectionKind.Namespace]: () => textIcon("N", "var(--color-ts-namespace)"),
52
- [ReflectionKind.Parameter]() {
53
- return this[ReflectionKind.Property]();
54
- },
55
- [ReflectionKind.Project]() {
56
- return this[ReflectionKind.Module]();
57
- },
58
- [ReflectionKind.Property]: () => textIcon("P", "var(--color-ts-property)", true),
59
- [ReflectionKind.Reference]: () => textIcon("R", "var(--color-ts-reference)", true),
60
- [ReflectionKind.SetSignature]() {
61
- return this[ReflectionKind.Accessor]();
62
- },
63
- [ReflectionKind.TypeAlias]: () => textIcon("T", "var(--color-ts-type-alias)"),
64
- [ReflectionKind.TypeLiteral]() {
65
- return this[ReflectionKind.TypeAlias]();
66
- },
67
- [ReflectionKind.TypeParameter]() {
68
- return this[ReflectionKind.TypeAlias]();
69
- },
70
- [ReflectionKind.Variable]: () => textIcon("V", "var(--color-ts-variable)"),
71
- [ReflectionKind.Document]: () => kindIcon(JSX.createElement("g", { stroke: "var(--color-icon-text)", fill: "none", "stroke-width": "1.5" },
72
- JSX.createElement("polygon", { points: "6,5 6,19 18,19, 18,10 13,5" }),
73
- JSX.createElement("line", { x1: "9", y1: "9", x2: "13", y2: "9" }),
74
- JSX.createElement("line", { x1: "9", y1: "12", x2: "15", y2: "12" }),
75
- JSX.createElement("line", { x1: "9", y1: "15", x2: "15", y2: "15" })), "var(--color-document)"),
76
- folder: () => kindIcon(JSX.createElement("g", { stroke: "var(--color-icon-text)", fill: "none", "stroke-width": "1.5" },
77
- JSX.createElement("polygon", { points: "5,5 10,5 12,8 19,8 19,18 5,18" })), "var(--color-document)"),
78
- chevronDown: () => (JSX.createElement("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none" },
79
- JSX.createElement("path", { d: "M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z", fill: "var(--color-icon-text)" }))),
80
- chevronSmall: () => (JSX.createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none" },
81
- JSX.createElement("path", { d: "M1.5 5.50969L8 11.6609L14.5 5.50969L12.5466 3.66086L8 7.96494L3.45341 3.66086L1.5 5.50969Z", fill: "var(--color-icon-text)" }))),
82
- checkbox: () => (JSX.createElement("svg", { width: "32", height: "32", viewBox: "0 0 32 32", "aria-hidden": "true" },
83
- JSX.createElement("rect", { class: "tsd-checkbox-background", width: "30", height: "30", x: "1", y: "1", rx: "6", fill: "none" }),
84
- JSX.createElement("path", { class: "tsd-checkbox-checkmark", d: "M8.35422 16.8214L13.2143 21.75L24.6458 10.25", stroke: "none", "stroke-width": "3.5", "stroke-linejoin": "round", fill: "none" }))),
85
- menu: () => (JSX.createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none" }, ["3", "7", "11"].map((y) => (JSX.createElement("rect", { x: "1", y: y, width: "14", height: "2", fill: "var(--color-icon-text)" }))))),
86
- search: () => (JSX.createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none" },
87
- JSX.createElement("path", { d: "M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z", fill: "var(--color-icon-text)" }))),
88
- anchor: () => (JSX.createElement("svg", { viewBox: "0 0 24 24" },
89
- JSX.createElement("g", { "stroke-width": "2", stroke: "currentColor", fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" },
90
- JSX.createElement("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }),
91
- JSX.createElement("path", { d: "M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5" }),
92
- JSX.createElement("path", { d: "M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5" })))),
93
- alertNote: () => (JSX.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16" },
94
- JSX.createElement("path", { fill: "var(--color-alert-note)", d: "M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm8-6.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13ZM6.5 7.75A.75.75 0 0 1 7.25 7h1a.75.75 0 0 1 .75.75v2.75h.25a.75.75 0 0 1 0 1.5h-2a.75.75 0 0 1 0-1.5h.25v-2h-.25a.75.75 0 0 1-.75-.75ZM8 6a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z" }))),
95
- alertTip: () => (JSX.createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16" },
96
- JSX.createElement("path", { fill: "var(--color-alert-tip)", d: "M8 1.5c-2.363 0-4 1.69-4 3.75 0 .984.424 1.625.984 2.304l.214.253c.223.264.47.556.673.848.284.411.537.896.621 1.49a.75.75 0 0 1-1.484.211c-.04-.282-.163-.547-.37-.847a8.456 8.456 0 0 0-.542-.68c-.084-.1-.173-.205-.268-.32C3.201 7.75 2.5 6.766 2.5 5.25 2.5 2.31 4.863 0 8 0s5.5 2.31 5.5 5.25c0 1.516-.701 2.5-1.328 3.259-.095.115-.184.22-.268.319-.207.245-.383.453-.541.681-.208.3-.33.565-.37.847a.751.751 0 0 1-1.485-.212c.084-.593.337-1.078.621-1.489.203-.292.45-.584.673-.848.075-.088.147-.173.213-.253.561-.679.985-1.32.985-2.304 0-2.06-1.637-3.75-4-3.75ZM5.75 12h4.5a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1 0-1.5ZM6 15.25a.75.75 0 0 1 .75-.75h2.5a.75.75 0 0 1 0 1.5h-2.5a.75.75 0 0 1-.75-.75Z" }))),
97
- alertImportant: () => (JSX.createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16" },
98
- JSX.createElement("path", { fill: "var(--color-alert-important)", d: "M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v9.5A1.75 1.75 0 0 1 14.25 13H8.06l-2.573 2.573A1.458 1.458 0 0 1 3 14.543V13H1.75A1.75 1.75 0 0 1 0 11.25Zm1.75-.25a.25.25 0 0 0-.25.25v9.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h6.5a.25.25 0 0 0 .25-.25v-9.5a.25.25 0 0 0-.25-.25Zm7 2.25v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 9a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z" }))),
99
- alertWarning: () => (JSX.createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16" },
100
- JSX.createElement("path", { fill: "var(--color-alert-warning)", d: "M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z" }))),
101
- alertCaution: () => (JSX.createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16" },
102
- JSX.createElement("path", { fill: "var(--color-alert-caution)", d: "M4.47.22A.749.749 0 0 1 5 0h6c.199 0 .389.079.53.22l4.25 4.25c.141.14.22.331.22.53v6a.749.749 0 0 1-.22.53l-4.25 4.25A.749.749 0 0 1 11 16H5a.749.749 0 0 1-.53-.22L.22 11.53A.749.749 0 0 1 0 11V5c0-.199.079-.389.22-.53Zm.84 1.28L1.5 5.31v5.38l3.81 3.81h5.38l3.81-3.81V5.31L10.69 1.5ZM8 4a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 4Zm0 8a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z" }))),
103
- };
27
+ export function getIcons(i18n) {
28
+ return {
29
+ [ReflectionKind.Accessor]: () => textIcon("A", "var(--color-ts-accessor)", i18n.kind_accessor(), true),
30
+ [ReflectionKind.CallSignature]() {
31
+ return this[ReflectionKind.Function]();
32
+ },
33
+ [ReflectionKind.Class]: () => textIcon("C", "var(--color-ts-class)", i18n.kind_class()),
34
+ [ReflectionKind.Constructor]: () => textIcon("C", "var(--color-ts-constructor)", i18n.kind_constructor(), true),
35
+ [ReflectionKind.ConstructorSignature]() {
36
+ return this[ReflectionKind.Constructor]();
37
+ },
38
+ [ReflectionKind.Enum]: () => textIcon("E", "var(--color-ts-enum)", i18n.kind_enum()),
39
+ [ReflectionKind.EnumMember]: () => textIcon("P", "var(--color-ts-property)", i18n.kind_enum_member(), true),
40
+ [ReflectionKind.Function]: () => textIcon("F", "var(--color-ts-function)", i18n.kind_function()),
41
+ [ReflectionKind.GetSignature]() {
42
+ return this[ReflectionKind.Accessor]();
43
+ },
44
+ [ReflectionKind.IndexSignature]: () => textIcon("P", "var(--color-ts-property)", i18n.kind_index_signature(), true),
45
+ [ReflectionKind.Interface]: () => textIcon("I", "var(--color-ts-interface)", i18n.kind_interface()),
46
+ [ReflectionKind.Method]: () => textIcon("M", "var(--color-ts-method)", i18n.kind_method(), true),
47
+ [ReflectionKind.Module]: () => textIcon("M", "var(--color-ts-module)", i18n.kind_module()),
48
+ [ReflectionKind.Namespace]: () => textIcon("N", "var(--color-ts-namespace)", i18n.kind_namespace()),
49
+ [ReflectionKind.Parameter]() {
50
+ return this[ReflectionKind.Property]();
51
+ },
52
+ [ReflectionKind.Project]() {
53
+ return this[ReflectionKind.Module]();
54
+ },
55
+ [ReflectionKind.Property]: () => textIcon("P", "var(--color-ts-property)", i18n.kind_property(), true),
56
+ [ReflectionKind.Reference]: () => textIcon("R", "var(--color-ts-reference)", i18n.kind_reference(), true),
57
+ [ReflectionKind.SetSignature]() {
58
+ return this[ReflectionKind.Accessor]();
59
+ },
60
+ [ReflectionKind.TypeAlias]: () => textIcon("T", "var(--color-ts-type-alias)", i18n.kind_type_alias()),
61
+ [ReflectionKind.TypeLiteral]() {
62
+ return this[ReflectionKind.TypeAlias]();
63
+ },
64
+ [ReflectionKind.TypeParameter]() {
65
+ return this[ReflectionKind.TypeAlias]();
66
+ },
67
+ [ReflectionKind.Variable]: () => textIcon("V", "var(--color-ts-variable)", i18n.kind_variable()),
68
+ [ReflectionKind.Document]: () => kindIcon(JSX.createElement("g", { stroke: "var(--color-icon-text)", fill: "none", "stroke-width": "1.5" },
69
+ JSX.createElement("polygon", { points: "6,5 6,19 18,19, 18,10 13,5" }),
70
+ JSX.createElement("line", { x1: "9", y1: "9", x2: "13", y2: "9" }),
71
+ JSX.createElement("line", { x1: "9", y1: "12", x2: "15", y2: "12" }),
72
+ JSX.createElement("line", { x1: "9", y1: "15", x2: "15", y2: "15" })), "var(--color-document)", i18n.kind_document()),
73
+ folder: () => kindIcon(JSX.createElement("g", { stroke: "var(--color-icon-text)", fill: "none", "stroke-width": "1.5" },
74
+ JSX.createElement("polygon", { points: "5,5 10,5 12,8 19,8 19,18 5,18" })), "var(--color-document)", i18n.theme_folder()),
75
+ chevronDown: () => (JSX.createElement("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true" },
76
+ JSX.createElement("path", { d: "M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z", fill: "var(--color-icon-text)" }))),
77
+ chevronSmall: () => (JSX.createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true" },
78
+ JSX.createElement("path", { d: "M1.5 5.50969L8 11.6609L14.5 5.50969L12.5466 3.66086L8 7.96494L3.45341 3.66086L1.5 5.50969Z", fill: "var(--color-icon-text)" }))),
79
+ checkbox: () => (JSX.createElement("svg", { width: "32", height: "32", viewBox: "0 0 32 32", "aria-hidden": "true" },
80
+ JSX.createElement("rect", { class: "tsd-checkbox-background", width: "30", height: "30", x: "1", y: "1", rx: "6", fill: "none" }),
81
+ JSX.createElement("path", { class: "tsd-checkbox-checkmark", d: "M8.35422 16.8214L13.2143 21.75L24.6458 10.25", stroke: "none", "stroke-width": "3.5", "stroke-linejoin": "round", fill: "none" }))),
82
+ menu: () => (JSX.createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true" }, ["3", "7", "11"].map((y) => (JSX.createElement("rect", { x: "1", y: y, width: "14", height: "2", fill: "var(--color-icon-text)" }))))),
83
+ search: () => (JSX.createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true" },
84
+ JSX.createElement("path", { d: "M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z", fill: "var(--color-icon-text)" }))),
85
+ anchor: () => (JSX.createElement("svg", { viewBox: "0 0 24 24", "aria-hidden": "true" },
86
+ JSX.createElement("g", { "stroke-width": "2", stroke: "currentColor", fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" },
87
+ JSX.createElement("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }),
88
+ JSX.createElement("path", { d: "M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5" }),
89
+ JSX.createElement("path", { d: "M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5" })))),
90
+ alertNote: () => (JSX.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", "aria-hidden": "true" },
91
+ JSX.createElement("path", { fill: "var(--color-alert-note)", d: "M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm8-6.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13ZM6.5 7.75A.75.75 0 0 1 7.25 7h1a.75.75 0 0 1 .75.75v2.75h.25a.75.75 0 0 1 0 1.5h-2a.75.75 0 0 1 0-1.5h.25v-2h-.25a.75.75 0 0 1-.75-.75ZM8 6a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z" }))),
92
+ alertTip: () => (JSX.createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16", "aria-hidden": "true" },
93
+ JSX.createElement("path", { fill: "var(--color-alert-tip)", d: "M8 1.5c-2.363 0-4 1.69-4 3.75 0 .984.424 1.625.984 2.304l.214.253c.223.264.47.556.673.848.284.411.537.896.621 1.49a.75.75 0 0 1-1.484.211c-.04-.282-.163-.547-.37-.847a8.456 8.456 0 0 0-.542-.68c-.084-.1-.173-.205-.268-.32C3.201 7.75 2.5 6.766 2.5 5.25 2.5 2.31 4.863 0 8 0s5.5 2.31 5.5 5.25c0 1.516-.701 2.5-1.328 3.259-.095.115-.184.22-.268.319-.207.245-.383.453-.541.681-.208.3-.33.565-.37.847a.751.751 0 0 1-1.485-.212c.084-.593.337-1.078.621-1.489.203-.292.45-.584.673-.848.075-.088.147-.173.213-.253.561-.679.985-1.32.985-2.304 0-2.06-1.637-3.75-4-3.75ZM5.75 12h4.5a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1 0-1.5ZM6 15.25a.75.75 0 0 1 .75-.75h2.5a.75.75 0 0 1 0 1.5h-2.5a.75.75 0 0 1-.75-.75Z" }))),
94
+ alertImportant: () => (JSX.createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16", "aria-hidden": "true" },
95
+ JSX.createElement("path", { fill: "var(--color-alert-important)", d: "M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v9.5A1.75 1.75 0 0 1 14.25 13H8.06l-2.573 2.573A1.458 1.458 0 0 1 3 14.543V13H1.75A1.75 1.75 0 0 1 0 11.25Zm1.75-.25a.25.25 0 0 0-.25.25v9.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h6.5a.25.25 0 0 0 .25-.25v-9.5a.25.25 0 0 0-.25-.25Zm7 2.25v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 9a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z" }))),
96
+ alertWarning: () => (JSX.createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16", "aria-hidden": "true" },
97
+ JSX.createElement("path", { fill: "var(--color-alert-warning)", d: "M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z" }))),
98
+ alertCaution: () => (JSX.createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16", "aria-hidden": "true" },
99
+ JSX.createElement("path", { fill: "var(--color-alert-caution)", d: "M4.47.22A.749.749 0 0 1 5 0h6c.199 0 .389.079.53.22l4.25 4.25c.141.14.22.331.22.53v6a.749.749 0 0 1-.22.53l-4.25 4.25A.749.749 0 0 1 11 16H5a.749.749 0 0 1-.53-.22L.22 11.53A.749.749 0 0 1 0 11V5c0-.199.079-.389.22-.53Zm.84 1.28L1.5 5.31v5.38l3.81 3.81h5.38l3.81-3.81V5.31L10.69 1.5ZM8 4a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 4Zm0 8a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z" }))),
100
+ };
101
+ }
@@ -4,9 +4,9 @@ export const memberGetterSetter = (context, props) => (JSX.createElement(JSX.Fra
4
4
  JSX.createElement("ul", { class: classNames({
5
5
  "tsd-signatures": true,
6
6
  }, context.getReflectionClasses(props)) },
7
- !!props.getSignature && (JSX.createElement(JSX.Fragment, null,
8
- JSX.createElement("li", { class: "tsd-signature", id: props.getSignature.anchor }, context.memberSignatureTitle(props.getSignature)),
9
- JSX.createElement("li", { class: "tsd-description" }, context.memberSignatureBody(props.getSignature)))),
10
- !!props.setSignature && (JSX.createElement(JSX.Fragment, null,
11
- JSX.createElement("li", { class: "tsd-signature", id: props.setSignature.anchor }, context.memberSignatureTitle(props.setSignature)),
12
- JSX.createElement("li", { class: "tsd-description" }, context.memberSignatureBody(props.setSignature)))))));
7
+ !!props.getSignature && (JSX.createElement("li", { class: context.getReflectionClasses(props.getSignature) },
8
+ JSX.createElement("div", { class: "tsd-signature", id: props.getSignature.anchor }, context.memberSignatureTitle(props.getSignature)),
9
+ JSX.createElement("div", { class: "tsd-description" }, context.memberSignatureBody(props.getSignature)))),
10
+ !!props.setSignature && (JSX.createElement("li", { class: context.getReflectionClasses(props.setSignature) },
11
+ JSX.createElement("div", { class: "tsd-signature", id: props.setSignature.anchor }, context.memberSignatureTitle(props.setSignature)),
12
+ JSX.createElement("div", { class: "tsd-description" }, context.memberSignatureBody(props.setSignature)))))));
@@ -2,9 +2,9 @@ import { JSX } from "../../../../utils/index.js";
2
2
  import { anchorIcon } from "./anchor-icon.js";
3
3
  import { classNames } from "../../lib.js";
4
4
  export const memberSignatures = (context, props) => (JSX.createElement(JSX.Fragment, null,
5
- JSX.createElement("ul", { class: classNames({ "tsd-signatures": true }, context.getReflectionClasses(props)) }, props.signatures?.map((item) => (JSX.createElement(JSX.Fragment, null,
6
- JSX.createElement("li", { class: "tsd-signature tsd-anchor-link" },
5
+ JSX.createElement("ul", { class: classNames({ "tsd-signatures": true }, context.getReflectionClasses(props)) }, props.signatures?.map((item) => (JSX.createElement("li", { class: context.getReflectionClasses(item) },
6
+ JSX.createElement("div", { class: "tsd-signature tsd-anchor-link" },
7
7
  item.anchor && JSX.createElement("a", { id: item.anchor, class: "tsd-anchor" }),
8
8
  context.memberSignatureTitle(item),
9
9
  anchorIcon(context, item.anchor)),
10
- JSX.createElement("li", { class: "tsd-description" }, context.memberSignatureBody(item))))))));
10
+ JSX.createElement("div", { class: "tsd-description" }, context.memberSignatureBody(item))))))));
@@ -28,7 +28,7 @@ export function reflectionTemplate(context, props) {
28
28
  JSX.createElement("h4", null, context.i18n.theme_implemented_by()),
29
29
  JSX.createElement("ul", { class: "tsd-hierarchy" }, props.model.implementedBy.map((item) => (JSX.createElement("li", null, context.type(item))))))),
30
30
  !!props.model.signatures?.length && (JSX.createElement("section", { class: "tsd-panel" }, context.memberSignatures(props.model))),
31
- !!props.model.indexSignatures?.length && (JSX.createElement("section", { class: classNames({ "tsd-panel": true }, context.getReflectionClasses(props.model)) },
31
+ !!props.model.indexSignatures?.length && (JSX.createElement("section", { class: "tsd-panel" },
32
32
  JSX.createElement("h4", { class: "tsd-before-signature" }, context.i18n.theme_indexable()),
33
33
  JSX.createElement("ul", { class: "tsd-signatures" }, props.model.indexSignatures.map((index) => renderIndexSignature(context, index))))),
34
34
  !props.model.signatures && context.memberSources(props.model))),
@@ -36,7 +36,7 @@ export function reflectionTemplate(context, props) {
36
36
  context.members(props.model)));
37
37
  }
38
38
  function renderIndexSignature(context, index) {
39
- return (JSX.createElement("li", { class: "tsd-index-signature" },
39
+ return (JSX.createElement("li", { class: classNames({ "tsd-index-signature": true }, context.getReflectionClasses(index)) },
40
40
  JSX.createElement("div", { class: "tsd-signature" },
41
41
  index.flags.isReadonly && JSX.createElement("span", { class: "tsd-signature-keyword" }, "readonly "),
42
42
  JSX.createElement("span", { class: "tsd-signature-symbol" }, "["),
@@ -57,11 +57,11 @@ export declare function discoverInParentDir<T extends {}>(name: string, dir: str
57
57
  file: string;
58
58
  content: T;
59
59
  } | undefined;
60
- export declare function discoverInParentDirExactMatch<T extends {}>(name: string, dir: string, read: (content: string) => T | undefined): {
60
+ export declare function discoverInParentDirExactMatch<T extends {}>(name: string, dir: string, read: (content: string) => T | undefined, usedFile?: (path: string) => void): {
61
61
  file: string;
62
62
  content: T;
63
63
  } | undefined;
64
- export declare function discoverPackageJson(dir: string): {
64
+ export declare function discoverPackageJson(dir: string, usedFile?: (path: string) => void): {
65
65
  file: string;
66
66
  content: {
67
67
  version?: string | undefined;
@@ -278,11 +278,12 @@ export function discoverInParentDir(name, dir, read) {
278
278
  dir = resolve(join(dir, ".."));
279
279
  }
280
280
  }
281
- export function discoverInParentDirExactMatch(name, dir, read) {
281
+ export function discoverInParentDirExactMatch(name, dir, read, usedFile) {
282
282
  if (!isDir(dir))
283
283
  return;
284
284
  const reachedTopDirectory = (dirName) => dirName === resolve(join(dirName, ".."));
285
285
  while (!reachedTopDirectory(dir)) {
286
+ usedFile?.(join(dir, name));
286
287
  try {
287
288
  const content = read(readFile(join(dir, name)));
288
289
  if (content != null) {
@@ -295,13 +296,13 @@ export function discoverInParentDirExactMatch(name, dir, read) {
295
296
  dir = resolve(join(dir, ".."));
296
297
  }
297
298
  }
298
- export function discoverPackageJson(dir) {
299
+ export function discoverPackageJson(dir, usedFile) {
299
300
  return discoverInParentDirExactMatch("package.json", dir, (content) => {
300
301
  const pkg = JSON.parse(content);
301
302
  if (validate({ name: String, version: optional(String) }, pkg)) {
302
303
  return pkg;
303
304
  }
304
- });
305
+ }, usedFile);
305
306
  }
306
307
  // dir -> package name according to package.json in this or some parent dir
307
308
  const packageCache = new Map();
@@ -41,6 +41,7 @@ export type Chars<T extends string> = T extends `${infer C}${infer R}` ? C | Cha
41
41
  export declare function assertNever(x: never): never;
42
42
  export declare function escapeRegExp(s: string): string;
43
43
  export declare function editDistance(s: string, t: string): number;
44
+ export declare function dedent(text: string): string;
44
45
  export declare function getSimilarValues(values: Iterable<string>, compareTo: string): string[];
45
46
  export declare function NonEnumerable(_cls: unknown, context: ClassFieldDecoratorContext): void;
46
47
  export declare const TYPEDOC_ROOT: string;
@@ -40,6 +40,17 @@ export function editDistance(s, t) {
40
40
  }
41
41
  return v0[t.length];
42
42
  }
43
+ export function dedent(text) {
44
+ const lines = text.split(/\r?\n/);
45
+ while (lines.length && lines[0].search(/\S/) === -1) {
46
+ lines.shift();
47
+ }
48
+ while (lines.length && lines[lines.length - 1].search(/\S/) === -1) {
49
+ lines.pop();
50
+ }
51
+ const minIndent = lines.reduce((indent, line) => line.length ? Math.min(indent, line.search(/\S/)) : indent, Infinity);
52
+ return lines.map((line) => line.substring(minIndent)).join("\n");
53
+ }
43
54
  export function getSimilarValues(values, compareTo) {
44
55
  const results = new DefaultMap(() => []);
45
56
  let lowest = Infinity;
@@ -38,8 +38,9 @@ export interface OptionsReader {
38
38
  * @param container the options container that provides declarations
39
39
  * @param logger logger to be used to report errors
40
40
  * @param cwd the directory which should be treated as the current working directory for option file discovery
41
+ * @param usedFile a callback to track files that were read or whose existence was checked, for purposes of restarting a build when watching files
41
42
  */
42
- read(container: Options, logger: Logger, cwd: string): void | Promise<void>;
43
+ read(container: Options, logger: Logger, cwd: string, usedFile: (file: string) => void): void | Promise<void>;
43
44
  }
44
45
  /**
45
46
  * Maintains a collection of option declarations split into TypeDoc options
@@ -108,7 +109,7 @@ export declare class Options {
108
109
  * @param reader
109
110
  */
110
111
  addReader(reader: OptionsReader): void;
111
- read(logger: Logger, cwd?: string): Promise<void>;
112
+ read(logger: Logger, cwd?: string, usedFile?: (path: string) => void): Promise<void>;
112
113
  /**
113
114
  * Adds an option declaration to the container with extra type checking to ensure that
114
115
  * the runtime type is consistent with the declared type.
@@ -107,9 +107,9 @@ export class Options {
107
107
  addReader(reader) {
108
108
  insertOrderSorted(this._readers, reader);
109
109
  }
110
- async read(logger, cwd = process.cwd()) {
110
+ async read(logger, cwd = process.cwd(), usedFile = () => { }) {
111
111
  for (const reader of this._readers) {
112
- await reader.read(this, logger, cwd);
112
+ await reader.read(this, logger, cwd, usedFile);
113
113
  }
114
114
  }
115
115
  addDeclaration(declaration) {
@@ -5,5 +5,5 @@ export declare class PackageJsonReader implements OptionsReader {
5
5
  order: number;
6
6
  supportsPackages: boolean;
7
7
  name: string;
8
- read(container: Options, logger: Logger, cwd: string): void;
8
+ read(container: Options, logger: Logger, cwd: string, usedFile: (path: string) => void): void;
9
9
  }
@@ -8,8 +8,8 @@ export class PackageJsonReader {
8
8
  order = 150;
9
9
  supportsPackages = true;
10
10
  name = "package-json";
11
- read(container, logger, cwd) {
12
- const result = discoverPackageJson(cwd);
11
+ read(container, logger, cwd, usedFile) {
12
+ const result = discoverPackageJson(cwd, usedFile);
13
13
  if (!result) {
14
14
  return;
15
15
  }
@@ -8,7 +8,7 @@ export declare class TSConfigReader implements OptionsReader {
8
8
  name: string;
9
9
  supportsPackages: boolean;
10
10
  private seenTsdocPaths;
11
- read(container: Options, logger: Logger, cwd: string): void;
11
+ read(container: Options, logger: Logger, cwd: string, usedFile?: (path: string) => void): void;
12
12
  private addTagsFromTsdocJson;
13
13
  private readTsDoc;
14
14
  }
@@ -42,9 +42,9 @@ export class TSConfigReader {
42
42
  name = "tsconfig-json";
43
43
  supportsPackages = true;
44
44
  seenTsdocPaths = new Set();
45
- read(container, logger, cwd) {
45
+ read(container, logger, cwd, usedFile) {
46
46
  const file = container.getValue("tsconfig") || cwd;
47
- let fileToRead = findTsConfigFile(file);
47
+ let fileToRead = findTsConfigFile(file, usedFile);
48
48
  if (!fileToRead) {
49
49
  // If the user didn't give us this option, we shouldn't complain about not being able to find it.
50
50
  if (container.isSet("tsconfig")) {
@@ -14,7 +14,7 @@ export declare class TypeDocReader implements OptionsReader {
14
14
  /**
15
15
  * Read user configuration from a typedoc.json or typedoc.js configuration file.
16
16
  */
17
- read(container: Options, logger: Logger, cwd: string): Promise<void>;
17
+ read(container: Options, logger: Logger, cwd: string, usedFile: (path: string) => void): Promise<void>;
18
18
  /**
19
19
  * Read the given options file + any extended files.
20
20
  * @param file
@@ -21,9 +21,9 @@ export class TypeDocReader {
21
21
  /**
22
22
  * Read user configuration from a typedoc.json or typedoc.js configuration file.
23
23
  */
24
- async read(container, logger, cwd) {
24
+ async read(container, logger, cwd, usedFile) {
25
25
  const path = container.getValue("options") || cwd;
26
- const file = this.findTypedocFile(path);
26
+ const file = this.findTypedocFile(path, usedFile);
27
27
  if (!file) {
28
28
  if (container.isSet("options")) {
29
29
  logger.error(logger.i18n.options_file_0_does_not_exist(nicePath(path)));
@@ -109,7 +109,7 @@ export class TypeDocReader {
109
109
  * typedoc file will be attempted to be found at the root of this path
110
110
  * @returns the typedoc.(js|json) file path or undefined
111
111
  */
112
- findTypedocFile(path) {
112
+ findTypedocFile(path, usedFile) {
113
113
  path = resolve(path);
114
114
  return [
115
115
  path,
@@ -129,7 +129,7 @@ export class TypeDocReader {
129
129
  join(path, ".config/typedoc.js"),
130
130
  join(path, ".config/typedoc.cjs"),
131
131
  join(path, ".config/typedoc.mjs"),
132
- ].find(isFile);
132
+ ].find((file) => (usedFile?.(file), isFile(file)));
133
133
  }
134
134
  }
135
135
  function getStringArray(arg) {
@@ -1,5 +1,5 @@
1
1
  import ts from "typescript";
2
2
  import type { Logger } from "./loggers.js";
3
- export declare function findTsConfigFile(path: string): string | undefined;
3
+ export declare function findTsConfigFile(path: string, usedFile?: (path: string) => void): string | undefined;
4
4
  export declare function getTypeDocOptionsFromTsConfig(file: string): any;
5
5
  export declare function readTsConfig(path: string, logger: Logger): ts.ParsedCommandLine | undefined;
@@ -1,10 +1,10 @@
1
1
  import ts from "typescript";
2
2
  import { isFile, isDir, readFile } from "./fs.js";
3
3
  import { createRequire } from "module";
4
- export function findTsConfigFile(path) {
4
+ export function findTsConfigFile(path, usedFile) {
5
5
  let fileToRead = path;
6
6
  if (isDir(fileToRead)) {
7
- fileToRead = ts.findConfigFile(path, isFile);
7
+ fileToRead = ts.findConfigFile(path, (file) => (usedFile?.(file), isFile(file)));
8
8
  }
9
9
  if (!fileToRead || !isFile(fileToRead)) {
10
10
  return;
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.27.6",
4
+ "version": "0.27.7",
5
5
  "homepage": "https://typedoc.org",
6
6
  "type": "module",
7
7
  "exports": {