typedoc 0.24.0 → 0.24.2
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 +2 -3
- package/dist/index.js +2 -3
- package/dist/lib/application.js +2 -1
- package/dist/lib/converter/comments/parser.js +1 -1
- package/dist/lib/converter/plugins/ImplementsPlugin.js +16 -6
- package/dist/lib/converter/plugins/PackagePlugin.js +1 -1
- package/dist/lib/converter/plugins/SourcePlugin.js +2 -3
- package/dist/lib/converter/types.js +3 -1
- package/dist/lib/models/comments/comment.js +6 -1
- package/dist/lib/models/reflections/abstract.d.ts +5 -2
- package/dist/lib/models/reflections/abstract.js +0 -11
- package/dist/lib/models/reflections/container.d.ts +0 -8
- package/dist/lib/models/reflections/container.js +0 -8
- package/dist/lib/models/reflections/declaration.d.ts +0 -8
- package/dist/lib/models/reflections/declaration.js +0 -8
- package/dist/lib/models/reflections/kind.d.ts +2 -0
- package/dist/lib/models/reflections/kind.js +5 -0
- package/dist/lib/models/reflections/parameter.d.ts +0 -8
- package/dist/lib/models/reflections/parameter.js +0 -9
- package/dist/lib/models/reflections/project.d.ts +5 -0
- package/dist/lib/models/reflections/project.js +40 -9
- package/dist/lib/models/reflections/signature.d.ts +0 -8
- package/dist/lib/models/reflections/signature.js +0 -9
- package/dist/lib/models/reflections/type-parameter.d.ts +2 -1
- package/dist/lib/models/reflections/type-parameter.js +3 -0
- package/dist/lib/models/types.d.ts +15 -4
- package/dist/lib/models/types.js +20 -3
- package/dist/lib/output/themes/MarkedPlugin.js +4 -3
- package/dist/lib/output/themes/default/DefaultTheme.js +3 -9
- package/dist/lib/output/themes/default/layouts/default.js +1 -1
- package/dist/lib/output/themes/default/partials/icon.js +1 -1
- package/dist/lib/output/themes/default/partials/member.declaration.js +1 -1
- package/dist/lib/output/themes/default/partials/member.signature.body.js +1 -1
- package/dist/lib/output/themes/default/partials/member.signature.title.d.ts +4 -4
- package/dist/lib/output/themes/default/partials/member.signature.title.js +26 -13
- package/dist/lib/output/themes/default/partials/navigation.js +1 -1
- package/dist/lib/output/themes/default/partials/parameter.js +5 -5
- package/dist/lib/output/themes/default/partials/type.js +44 -31
- package/dist/lib/output/themes/default/partials/typeParameters.js +1 -1
- package/dist/lib/output/themes/lib.d.ts +2 -0
- package/dist/lib/output/themes/lib.js +13 -2
- package/dist/lib/serialization/schema.d.ts +1 -1
- package/dist/lib/serialization/schema.js +0 -1
- package/dist/lib/utils/entry-point.js +6 -16
- package/dist/lib/utils/fs.d.ts +1 -7
- package/dist/lib/utils/fs.js +19 -17
- package/dist/lib/utils/html-entities.json +2233 -0
- package/dist/lib/utils/html.d.ts +1 -0
- package/dist/lib/utils/html.js +28 -0
- package/dist/lib/utils/index.d.ts +3 -2
- package/dist/lib/utils/index.js +3 -2
- package/dist/lib/utils/jsx.js +8 -7
- package/dist/lib/utils/map.d.ts +1 -0
- package/dist/lib/utils/map.js +3 -0
- package/dist/lib/utils/options/declaration.d.ts +30 -29
- package/dist/lib/utils/options/index.d.ts +1 -1
- package/dist/lib/utils/options/readers/tsconfig.js +2 -2
- package/dist/lib/utils/options/readers/typedoc.js +1 -1
- package/dist/lib/utils/options/sources/typedoc.js +6 -0
- package/dist/lib/utils/paths.d.ts +7 -0
- package/dist/lib/utils/paths.js +15 -6
- package/dist/lib/utils/sort.d.ts +1 -1
- package/dist/lib/utils/sort.js +9 -1
- package/package.json +9 -9
- package/static/main.js +3 -3
- package/static/style.css +217 -91
package/dist/lib/models/types.js
CHANGED
|
@@ -681,7 +681,7 @@ class ReferenceType extends Type {
|
|
|
681
681
|
* to a reflection. This happens for type parameters and when representing a mapped type.
|
|
682
682
|
*/
|
|
683
683
|
isIntentionallyBroken() {
|
|
684
|
-
return this._target === -1;
|
|
684
|
+
return this._target === -1 || this.refersToTypeParameter;
|
|
685
685
|
}
|
|
686
686
|
/**
|
|
687
687
|
* Convert this reference type to a declaration reference used for resolution of external types.
|
|
@@ -700,6 +700,12 @@ class ReferenceType extends Type {
|
|
|
700
700
|
constructor(name, target, project, qualifiedName) {
|
|
701
701
|
super();
|
|
702
702
|
this.type = "reference";
|
|
703
|
+
/**
|
|
704
|
+
* If set, no warnings about something not being exported should be created
|
|
705
|
+
* since this may be referring to a type created with `infer X` which will not
|
|
706
|
+
* be registered on the project.
|
|
707
|
+
*/
|
|
708
|
+
this.refersToTypeParameter = false;
|
|
703
709
|
this.name = name;
|
|
704
710
|
if (typeof target === "number") {
|
|
705
711
|
this._target = target;
|
|
@@ -717,7 +723,9 @@ class ReferenceType extends Type {
|
|
|
717
723
|
// Type parameters should never have resolved references because they
|
|
718
724
|
// cannot be linked to, and might be declared within the type with conditional types.
|
|
719
725
|
if (symbol.flags & ts.SymbolFlags.TypeParameter) {
|
|
720
|
-
|
|
726
|
+
const ref = ReferenceType.createBrokenReference(name ?? symbol.name, context.project);
|
|
727
|
+
ref.refersToTypeParameter = true;
|
|
728
|
+
return ref;
|
|
721
729
|
}
|
|
722
730
|
const ref = new ReferenceType(name ?? symbol.name, new ReflectionSymbolId_1.ReflectionSymbolId(symbol), context.project, (0, tsutils_1.getQualifiedName)(symbol, name ?? symbol.name));
|
|
723
731
|
const symbolPath = symbol?.declarations?.[0]
|
|
@@ -742,7 +750,12 @@ class ReferenceType extends Type {
|
|
|
742
750
|
ref.package = (0, fs_1.findPackageForPath)(symbolPath);
|
|
743
751
|
return ref;
|
|
744
752
|
}
|
|
745
|
-
/**
|
|
753
|
+
/**
|
|
754
|
+
* This is used for type parameters, which don't actually point to something,
|
|
755
|
+
* and also for temporary references which will be cleaned up with real references
|
|
756
|
+
* later during conversion.
|
|
757
|
+
* @internal
|
|
758
|
+
*/
|
|
746
759
|
static createBrokenReference(name, project) {
|
|
747
760
|
return new ReferenceType(name, -1, project, name);
|
|
748
761
|
}
|
|
@@ -775,6 +788,9 @@ class ReferenceType extends Type {
|
|
|
775
788
|
if (this.name !== this.qualifiedName) {
|
|
776
789
|
result.qualifiedName = this.qualifiedName;
|
|
777
790
|
}
|
|
791
|
+
if (this.refersToTypeParameter) {
|
|
792
|
+
result.refersToTypeParameter = true;
|
|
793
|
+
}
|
|
778
794
|
return result;
|
|
779
795
|
}
|
|
780
796
|
fromObject(de, obj) {
|
|
@@ -800,6 +816,7 @@ class ReferenceType extends Type {
|
|
|
800
816
|
}
|
|
801
817
|
this.qualifiedName = obj.qualifiedName ?? obj.name;
|
|
802
818
|
this.package = obj.package;
|
|
819
|
+
this.refersToTypeParameter = !!obj.refersToTypeParameter;
|
|
803
820
|
}
|
|
804
821
|
}
|
|
805
822
|
exports.ReferenceType = ReferenceType;
|
|
@@ -37,6 +37,7 @@ const components_1 = require("../components");
|
|
|
37
37
|
const events_1 = require("../events");
|
|
38
38
|
const utils_1 = require("../../utils");
|
|
39
39
|
const highlighter_1 = require("../../utils/highlighter");
|
|
40
|
+
const html_1 = require("../../utils/html");
|
|
40
41
|
/**
|
|
41
42
|
* Implements markdown and relativeURL helpers for templates.
|
|
42
43
|
* @internal
|
|
@@ -166,11 +167,11 @@ output file :
|
|
|
166
167
|
const slug = slugger.slug(text);
|
|
167
168
|
// Prefix the slug with an extra `$` to prevent conflicts with TypeDoc's anchors.
|
|
168
169
|
this.page.pageHeadings.push({
|
|
169
|
-
link:
|
|
170
|
-
text,
|
|
170
|
+
link: `#md:${slug}`,
|
|
171
|
+
text: (0, html_1.getTextContent)(text),
|
|
171
172
|
level,
|
|
172
173
|
});
|
|
173
|
-
return `<a id="
|
|
174
|
+
return `<a id="md:${slug}" class="tsd-anchor"></a><h${level}><a href="#$${slug}" style="color:inherit;text-decoration:none">${text}</a></h${level}>`;
|
|
174
175
|
};
|
|
175
176
|
}
|
|
176
177
|
markedOptions.mangle ?? (markedOptions.mangle = false); // See https://github.com/TypeStrong/typedoc/issues/1395
|
|
@@ -6,6 +6,7 @@ const models_1 = require("../../../models");
|
|
|
6
6
|
const UrlMapping_1 = require("../../models/UrlMapping");
|
|
7
7
|
const DefaultThemeRenderContext_1 = require("./DefaultThemeRenderContext");
|
|
8
8
|
const utils_1 = require("../../../utils");
|
|
9
|
+
const lib_1 = require("../lib");
|
|
9
10
|
/**
|
|
10
11
|
* Default theme implementation of TypeDoc. If a theme does not provide a custom
|
|
11
12
|
* {@link Theme} implementation, this theme class will be used.
|
|
@@ -194,15 +195,8 @@ exports.DefaultTheme = DefaultTheme;
|
|
|
194
195
|
function hasReadme(readme) {
|
|
195
196
|
return !readme.endsWith("none");
|
|
196
197
|
}
|
|
197
|
-
function toStyleClass(str) {
|
|
198
|
-
return str.replace(/(\w)([A-Z])/g, (_m, m1, m2) => m1 + "-" + m2).toLowerCase();
|
|
199
|
-
}
|
|
200
198
|
function getReflectionClasses(reflection, filters) {
|
|
201
199
|
const classes = [];
|
|
202
|
-
classes.push(toStyleClass("tsd-kind-" + models_1.ReflectionKind[reflection.kind]));
|
|
203
|
-
if (reflection.parent && reflection.parent instanceof models_1.DeclarationReflection) {
|
|
204
|
-
classes.push(toStyleClass(`tsd-parent-kind-${models_1.ReflectionKind[reflection.parent.kind]}`));
|
|
205
|
-
}
|
|
206
200
|
// Filter classes should match up with the settings function in
|
|
207
201
|
// partials/navigation.tsx.
|
|
208
202
|
for (const key of Object.keys(filters)) {
|
|
@@ -229,12 +223,12 @@ function getReflectionClasses(reflection, filters) {
|
|
|
229
223
|
else if (key.startsWith("@")) {
|
|
230
224
|
if (key === "@deprecated") {
|
|
231
225
|
if (reflection.isDeprecated()) {
|
|
232
|
-
classes.push(toStyleClass(`tsd-is-${key.substring(1)}`));
|
|
226
|
+
classes.push((0, lib_1.toStyleClass)(`tsd-is-${key.substring(1)}`));
|
|
233
227
|
}
|
|
234
228
|
}
|
|
235
229
|
else if (reflection.comment?.hasModifier(key) ||
|
|
236
230
|
reflection.comment?.getTag(key)) {
|
|
237
|
-
classes.push(toStyleClass(`tsd-is-${key.substring(1)}`));
|
|
231
|
+
classes.push((0, lib_1.toStyleClass)(`tsd-is-${key.substring(1)}`));
|
|
238
232
|
}
|
|
239
233
|
}
|
|
240
234
|
}
|
|
@@ -17,7 +17,7 @@ const defaultLayout = (context, template, props) => (utils_1.JSX.createElement("
|
|
|
17
17
|
utils_1.JSX.createElement("link", { rel: "stylesheet", href: context.relativeURL("assets/highlight.css", true) }),
|
|
18
18
|
context.options.getValue("customCss") && (utils_1.JSX.createElement("link", { rel: "stylesheet", href: context.relativeURL("assets/custom.css", true) })),
|
|
19
19
|
utils_1.JSX.createElement("script", { defer: true, src: context.relativeURL("assets/main.js", true) }),
|
|
20
|
-
utils_1.JSX.createElement("script", { async: true, src: context.relativeURL("assets/search.js", true), id: "search-script" }),
|
|
20
|
+
utils_1.JSX.createElement("script", { async: true, src: context.relativeURL("assets/search.js", true), id: "tsd-search-script" }),
|
|
21
21
|
context.hook("head.end")),
|
|
22
22
|
utils_1.JSX.createElement("body", null,
|
|
23
23
|
context.hook("body.begin"),
|
|
@@ -66,7 +66,7 @@ exports.icons = {
|
|
|
66
66
|
[models_1.ReflectionKind.SetSignature]() {
|
|
67
67
|
return this[models_1.ReflectionKind.Accessor]();
|
|
68
68
|
},
|
|
69
|
-
[models_1.ReflectionKind.TypeAlias]: () => kindIcon(models_1.ReflectionKind.TypeAlias, utils_1.JSX.createElement("path", { d: "M11.31 16V8.224H8.91V7.24H14.79V8.224H12.39V16H11.31Z", fill: "var(--color-text)" }), "var(--color-ts)"),
|
|
69
|
+
[models_1.ReflectionKind.TypeAlias]: () => kindIcon(models_1.ReflectionKind.TypeAlias, utils_1.JSX.createElement("path", { d: "M11.31 16V8.224H8.91V7.24H14.79V8.224H12.39V16H11.31Z", fill: "var(--color-text)" }), "var(--color-ts-type-alias)"),
|
|
70
70
|
[models_1.ReflectionKind.TypeLiteral]() {
|
|
71
71
|
return this[models_1.ReflectionKind.TypeAlias]();
|
|
72
72
|
},
|
|
@@ -6,7 +6,7 @@ const utils_1 = require("../../../../utils");
|
|
|
6
6
|
const lib_1 = require("../../lib");
|
|
7
7
|
const memberDeclaration = (context, props) => (utils_1.JSX.createElement(utils_1.JSX.Fragment, null,
|
|
8
8
|
utils_1.JSX.createElement("div", { class: "tsd-signature" },
|
|
9
|
-
(0, lib_1.wbr)(props.name),
|
|
9
|
+
utils_1.JSX.createElement("span", { class: (0, lib_1.getKindClass)(props) }, (0, lib_1.wbr)(props.name)),
|
|
10
10
|
(0, lib_1.renderTypeParametersSignature)(props.typeParameters),
|
|
11
11
|
props.type && (utils_1.JSX.createElement(utils_1.JSX.Fragment, null,
|
|
12
12
|
utils_1.JSX.createElement("span", { class: "tsd-signature-symbol" },
|
|
@@ -14,7 +14,7 @@ const memberSignatureBody = (context, props, { hideSources = false } = {}) => (u
|
|
|
14
14
|
utils_1.JSX.createElement("h5", null,
|
|
15
15
|
(0, lib_1.renderFlags)(item.flags, item.comment),
|
|
16
16
|
!!item.flags.isRest && utils_1.JSX.createElement("span", { class: "tsd-signature-symbol" }, "..."),
|
|
17
|
-
item.name,
|
|
17
|
+
utils_1.JSX.createElement("span", { class: "tsd-kind-parameter" }, item.name),
|
|
18
18
|
": ",
|
|
19
19
|
context.type(item.type),
|
|
20
20
|
item.defaultValue != null && (utils_1.JSX.createElement("span", { class: "tsd-signature-symbol" },
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { DefaultThemeRenderContext } from "../DefaultThemeRenderContext";
|
|
2
2
|
import { JSX } from "../../../../utils";
|
|
3
3
|
import { SignatureReflection } from "../../../../models";
|
|
4
|
-
export declare
|
|
5
|
-
hideName?: boolean
|
|
6
|
-
arrowStyle?: boolean
|
|
7
|
-
})
|
|
4
|
+
export declare function memberSignatureTitle(context: DefaultThemeRenderContext, props: SignatureReflection, { hideName, arrowStyle }?: {
|
|
5
|
+
hideName?: boolean;
|
|
6
|
+
arrowStyle?: boolean;
|
|
7
|
+
}): JSX.Element;
|
|
@@ -4,22 +4,35 @@ exports.memberSignatureTitle = void 0;
|
|
|
4
4
|
const lib_1 = require("../../lib");
|
|
5
5
|
const utils_1 = require("../../../../utils");
|
|
6
6
|
const models_1 = require("../../../../models");
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
!!props.flags.isAbstract && utils_1.JSX.createElement("span", { class: "tsd-signature-symbol" }, "abstract "),
|
|
10
|
-
utils_1.JSX.createElement("span", { class: "tsd-signature-symbol" }, "new "))))),
|
|
11
|
-
(0, lib_1.renderTypeParametersSignature)(props.typeParameters),
|
|
12
|
-
utils_1.JSX.createElement("span", { class: "tsd-signature-symbol" }, "("),
|
|
13
|
-
(0, lib_1.join)(", ", props.parameters ?? [], (item) => (utils_1.JSX.createElement(utils_1.JSX.Fragment, null,
|
|
7
|
+
function renderParameterWithType(context, item) {
|
|
8
|
+
return (utils_1.JSX.createElement(utils_1.JSX.Fragment, null,
|
|
14
9
|
!!item.flags.isRest && utils_1.JSX.createElement("span", { class: "tsd-signature-symbol" }, "..."),
|
|
15
|
-
item.name,
|
|
10
|
+
utils_1.JSX.createElement("span", { class: "tsd-kind-parameter" }, item.name),
|
|
16
11
|
utils_1.JSX.createElement("span", { class: "tsd-signature-symbol" },
|
|
17
12
|
!!item.flags.isOptional && "?",
|
|
18
13
|
!!item.defaultValue && "?",
|
|
19
14
|
": "),
|
|
20
|
-
context.type(item.type)))
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
15
|
+
context.type(item.type)));
|
|
16
|
+
}
|
|
17
|
+
function renderParameterWithoutType(item) {
|
|
18
|
+
return (utils_1.JSX.createElement(utils_1.JSX.Fragment, null,
|
|
19
|
+
!!item.flags.isRest && utils_1.JSX.createElement("span", { class: "tsd-signature-symbol" }, "..."),
|
|
20
|
+
utils_1.JSX.createElement("span", { class: "tsd-kind-parameter" }, item.name),
|
|
21
|
+
(item.flags.isOptional || item.defaultValue) && utils_1.JSX.createElement("span", { class: "tsd-signature-symbol" }, "?")));
|
|
22
|
+
}
|
|
23
|
+
function memberSignatureTitle(context, props, { hideName = false, arrowStyle = false } = {}) {
|
|
24
|
+
const hideParamTypes = context.options.getValue("hideParameterTypesInTitle");
|
|
25
|
+
const renderParam = hideParamTypes ? renderParameterWithoutType : renderParameterWithType.bind(null, context);
|
|
26
|
+
return (utils_1.JSX.createElement(utils_1.JSX.Fragment, null,
|
|
27
|
+
!hideName ? (utils_1.JSX.createElement("span", { class: (0, lib_1.getKindClass)(props) }, (0, lib_1.wbr)(props.name))) : (utils_1.JSX.createElement(utils_1.JSX.Fragment, null, props.kind === models_1.ReflectionKind.ConstructorSignature && (utils_1.JSX.createElement(utils_1.JSX.Fragment, null,
|
|
28
|
+
!!props.flags.isAbstract && utils_1.JSX.createElement("span", { class: "tsd-signature-symbol" }, "abstract "),
|
|
29
|
+
utils_1.JSX.createElement("span", { class: "tsd-signature-symbol" }, "new "))))),
|
|
30
|
+
(0, lib_1.renderTypeParametersSignature)(props.typeParameters),
|
|
31
|
+
utils_1.JSX.createElement("span", { class: "tsd-signature-symbol" }, "("),
|
|
32
|
+
(0, lib_1.join)(", ", props.parameters ?? [], renderParam),
|
|
33
|
+
utils_1.JSX.createElement("span", { class: "tsd-signature-symbol" }, ")"),
|
|
34
|
+
!!props.type && (utils_1.JSX.createElement(utils_1.JSX.Fragment, null,
|
|
35
|
+
utils_1.JSX.createElement("span", { class: "tsd-signature-symbol" }, arrowStyle ? " => " : ": "),
|
|
36
|
+
context.type(props.type)))));
|
|
37
|
+
}
|
|
25
38
|
exports.memberSignatureTitle = memberSignatureTitle;
|
|
@@ -56,7 +56,7 @@ function settings(context) {
|
|
|
56
56
|
utils_1.JSX.createElement("ul", { id: "tsd-filter-options" }, ...visibilityOptions)))),
|
|
57
57
|
utils_1.JSX.createElement("div", { class: "tsd-theme-toggle" },
|
|
58
58
|
utils_1.JSX.createElement("h4", { class: "uppercase" }, "Theme"),
|
|
59
|
-
utils_1.JSX.createElement("select", { id: "theme" },
|
|
59
|
+
utils_1.JSX.createElement("select", { id: "tsd-theme" },
|
|
60
60
|
utils_1.JSX.createElement("option", { value: "os" }, "OS"),
|
|
61
61
|
utils_1.JSX.createElement("option", { value: "light" }, "Light"),
|
|
62
62
|
utils_1.JSX.createElement("option", { value: "dark" }, "Dark")))))));
|
|
@@ -20,7 +20,7 @@ const parameter = (context, props) => (utils_1.JSX.createElement(utils_1.JSX.Fra
|
|
|
20
20
|
utils_1.JSX.createElement("span", { class: "tsd-signature-symbol" }, "["),
|
|
21
21
|
props.indexSignature?.parameters?.map((item) => (utils_1.JSX.createElement(utils_1.JSX.Fragment, null,
|
|
22
22
|
!!item.flags.isRest && utils_1.JSX.createElement("span", { class: "tsd-signature-symbol" }, "..."),
|
|
23
|
-
item.name,
|
|
23
|
+
utils_1.JSX.createElement("span", { class: (0, lib_1.getKindClass)(item) }, item.name),
|
|
24
24
|
": ",
|
|
25
25
|
context.type(item.type)))),
|
|
26
26
|
utils_1.JSX.createElement("span", { class: "tsd-signature-symbol" }, "]: "),
|
|
@@ -31,7 +31,7 @@ const parameter = (context, props) => (utils_1.JSX.createElement(utils_1.JSX.Fra
|
|
|
31
31
|
props.children?.map((item) => (utils_1.JSX.createElement(utils_1.JSX.Fragment, null, item.signatures ? (utils_1.JSX.createElement("li", { class: "tsd-parameter" },
|
|
32
32
|
utils_1.JSX.createElement("h5", null,
|
|
33
33
|
!!item.flags.isRest && utils_1.JSX.createElement("span", { class: "tsd-signature-symbol" }, "..."),
|
|
34
|
-
(0, lib_1.wbr)(item.name),
|
|
34
|
+
utils_1.JSX.createElement("span", { class: (0, lib_1.getKindClass)(item) }, (0, lib_1.wbr)(item.name)),
|
|
35
35
|
utils_1.JSX.createElement("span", { class: "tsd-signature-symbol" },
|
|
36
36
|
!!item.flags.isOptional && "?",
|
|
37
37
|
":"),
|
|
@@ -41,7 +41,7 @@ const parameter = (context, props) => (utils_1.JSX.createElement(utils_1.JSX.Fra
|
|
|
41
41
|
utils_1.JSX.createElement("h5", null,
|
|
42
42
|
(0, lib_1.renderFlags)(item.flags, item.comment),
|
|
43
43
|
!!item.flags.isRest && utils_1.JSX.createElement("span", { class: "tsd-signature-symbol" }, "..."),
|
|
44
|
-
(0, lib_1.wbr)(item.name),
|
|
44
|
+
utils_1.JSX.createElement("span", { class: (0, lib_1.getKindClass)(item) }, (0, lib_1.wbr)(item.name)),
|
|
45
45
|
utils_1.JSX.createElement("span", { class: "tsd-signature-symbol" },
|
|
46
46
|
!!item.flags.isOptional && "?",
|
|
47
47
|
": "),
|
|
@@ -54,7 +54,7 @@ const parameter = (context, props) => (utils_1.JSX.createElement(utils_1.JSX.Fra
|
|
|
54
54
|
utils_1.JSX.createElement("h5", null,
|
|
55
55
|
(0, lib_1.renderFlags)(item.getSignature.flags, item.getSignature.comment),
|
|
56
56
|
utils_1.JSX.createElement("span", { class: "tsd-signature-symbol" }, "get "),
|
|
57
|
-
(0, lib_1.wbr)(item.name),
|
|
57
|
+
utils_1.JSX.createElement("span", { class: (0, lib_1.getKindClass)(item) }, (0, lib_1.wbr)(item.name)),
|
|
58
58
|
utils_1.JSX.createElement("span", { class: "tsd-signature-symbol" }, "(): "),
|
|
59
59
|
context.type(item.getSignature.type)),
|
|
60
60
|
context.comment(item.getSignature)))),
|
|
@@ -63,7 +63,7 @@ const parameter = (context, props) => (utils_1.JSX.createElement(utils_1.JSX.Fra
|
|
|
63
63
|
utils_1.JSX.createElement("h5", null,
|
|
64
64
|
(0, lib_1.renderFlags)(item.setSignature.flags, item.setSignature.comment),
|
|
65
65
|
utils_1.JSX.createElement("span", { class: "tsd-signature-symbol" }, "set "),
|
|
66
|
-
(0, lib_1.wbr)(item.name),
|
|
66
|
+
utils_1.JSX.createElement("span", { class: (0, lib_1.getKindClass)(item) }, (0, lib_1.wbr)(item.name)),
|
|
67
67
|
utils_1.JSX.createElement("span", { class: "tsd-signature-symbol" }, "("),
|
|
68
68
|
item.setSignature.parameters?.map((item) => (utils_1.JSX.createElement(utils_1.JSX.Fragment, null,
|
|
69
69
|
item.name,
|
|
@@ -50,7 +50,7 @@ function getNamespacedPath(reflection) {
|
|
|
50
50
|
return path;
|
|
51
51
|
}
|
|
52
52
|
function renderUniquePath(context, reflection) {
|
|
53
|
-
return (0, lib_1.join)(utils_1.JSX.createElement("span", { class: "tsd-signature-symbol" }, "."), getUniquePath(reflection), (item) => (utils_1.JSX.createElement("a", { href: context.urlTo(item), class: "tsd-signature-type",
|
|
53
|
+
return (0, lib_1.join)(utils_1.JSX.createElement("span", { class: "tsd-signature-symbol" }, "."), getUniquePath(reflection), (item) => (utils_1.JSX.createElement("a", { href: context.urlTo(item), class: "tsd-signature-type " + (0, lib_1.getKindClass)(item) }, item.name)));
|
|
54
54
|
}
|
|
55
55
|
let indentationDepth = 0;
|
|
56
56
|
function includeIndentation() {
|
|
@@ -71,14 +71,22 @@ const typeRenderers = {
|
|
|
71
71
|
utils_1.JSX.createElement("span", { class: "tsd-signature-symbol" }, "[]")));
|
|
72
72
|
},
|
|
73
73
|
conditional(context, type) {
|
|
74
|
-
|
|
74
|
+
indentationDepth++;
|
|
75
|
+
const parts = [
|
|
75
76
|
renderType(context, type.checkType, models_1.TypeContext.conditionalCheck),
|
|
76
77
|
utils_1.JSX.createElement("span", { class: "tsd-signature-symbol" }, " extends "),
|
|
77
78
|
renderType(context, type.extendsType, models_1.TypeContext.conditionalExtends),
|
|
78
|
-
utils_1.JSX.createElement("
|
|
79
|
+
utils_1.JSX.createElement("br", null),
|
|
80
|
+
includeIndentation(),
|
|
81
|
+
utils_1.JSX.createElement("span", { class: "tsd-signature-symbol" }, "? "),
|
|
79
82
|
renderType(context, type.trueType, models_1.TypeContext.conditionalTrue),
|
|
80
|
-
utils_1.JSX.createElement("
|
|
81
|
-
|
|
83
|
+
utils_1.JSX.createElement("br", null),
|
|
84
|
+
includeIndentation(),
|
|
85
|
+
utils_1.JSX.createElement("span", { class: "tsd-signature-symbol" }, ": "),
|
|
86
|
+
renderType(context, type.falseType, models_1.TypeContext.conditionalFalse),
|
|
87
|
+
];
|
|
88
|
+
indentationDepth--;
|
|
89
|
+
return utils_1.JSX.createElement(utils_1.JSX.Fragment, null, parts);
|
|
82
90
|
},
|
|
83
91
|
indexedAccess(context, type) {
|
|
84
92
|
let indexType = renderType(context, type.indexType, models_1.TypeContext.indexedIndex);
|
|
@@ -101,7 +109,7 @@ const typeRenderers = {
|
|
|
101
109
|
return (utils_1.JSX.createElement(utils_1.JSX.Fragment, null,
|
|
102
110
|
utils_1.JSX.createElement("span", { class: "tsd-signature-symbol" }, "infer "),
|
|
103
111
|
" ",
|
|
104
|
-
type.name,
|
|
112
|
+
utils_1.JSX.createElement("span", { class: "tsd-kind-type-parameter" }, type.name),
|
|
105
113
|
type.constraint && (utils_1.JSX.createElement(utils_1.JSX.Fragment, null,
|
|
106
114
|
utils_1.JSX.createElement("span", { class: "tsd-signature-symbol" }, " extends "),
|
|
107
115
|
renderType(context, type.constraint, models_1.TypeContext.inferredConstraint)))));
|
|
@@ -116,36 +124,37 @@ const typeRenderers = {
|
|
|
116
124
|
return utils_1.JSX.createElement("span", { class: "tsd-signature-type" }, (0, lib_1.stringify)(type.value));
|
|
117
125
|
},
|
|
118
126
|
mapped(context, type) {
|
|
119
|
-
|
|
127
|
+
indentationDepth++;
|
|
128
|
+
const parts = [utils_1.JSX.createElement("span", { class: "tsd-signature-symbol" }, "{"), utils_1.JSX.createElement("br", null), includeIndentation()];
|
|
120
129
|
switch (type.readonlyModifier) {
|
|
121
130
|
case "+":
|
|
122
|
-
|
|
131
|
+
parts.push(utils_1.JSX.createElement("span", { class: "tsd-signature-symbol" }, "readonly "));
|
|
123
132
|
break;
|
|
124
133
|
case "-":
|
|
125
|
-
|
|
134
|
+
parts.push(utils_1.JSX.createElement("span", { class: "tsd-signature-symbol" }, "-readonly "));
|
|
126
135
|
break;
|
|
127
136
|
}
|
|
128
|
-
|
|
137
|
+
parts.push(utils_1.JSX.createElement("span", { class: "tsd-signature-symbol" }, "["), utils_1.JSX.createElement("span", { class: "tsd-kind-type-parameter" }, type.parameter), utils_1.JSX.createElement("span", { class: "tsd-signature-symbol" }, " in "), renderType(context, type.parameterType, models_1.TypeContext.mappedParameter));
|
|
129
138
|
if (type.nameType) {
|
|
130
|
-
|
|
139
|
+
parts.push(utils_1.JSX.createElement("span", { class: "tsd-signature-symbol" }, " as "), renderType(context, type.nameType, models_1.TypeContext.mappedName));
|
|
131
140
|
}
|
|
132
|
-
|
|
141
|
+
parts.push(utils_1.JSX.createElement("span", { class: "tsd-signature-symbol" }, "]"));
|
|
133
142
|
switch (type.optionalModifier) {
|
|
134
143
|
case "+":
|
|
135
|
-
|
|
144
|
+
parts.push(utils_1.JSX.createElement("span", { class: "tsd-signature-symbol" }, "?: "));
|
|
136
145
|
break;
|
|
137
146
|
case "-":
|
|
138
|
-
|
|
147
|
+
parts.push(utils_1.JSX.createElement("span", { class: "tsd-signature-symbol" }, "-?: "));
|
|
139
148
|
break;
|
|
140
149
|
default:
|
|
141
|
-
|
|
150
|
+
parts.push(utils_1.JSX.createElement("span", { class: "tsd-signature-symbol" }, ": "));
|
|
142
151
|
}
|
|
143
|
-
|
|
152
|
+
parts.push(renderType(context, type.templateType, models_1.TypeContext.mappedTemplate));
|
|
153
|
+
indentationDepth--;
|
|
144
154
|
return (utils_1.JSX.createElement(utils_1.JSX.Fragment, null,
|
|
145
|
-
|
|
146
|
-
"
|
|
147
|
-
|
|
148
|
-
" ",
|
|
155
|
+
parts,
|
|
156
|
+
utils_1.JSX.createElement("br", null),
|
|
157
|
+
includeIndentation(),
|
|
149
158
|
utils_1.JSX.createElement("span", { class: "tsd-signature-symbol" }, "}")));
|
|
150
159
|
},
|
|
151
160
|
namedTupleMember(context, type) {
|
|
@@ -177,8 +186,8 @@ const typeRenderers = {
|
|
|
177
186
|
let name;
|
|
178
187
|
if (reflection) {
|
|
179
188
|
if (reflection.kindOf(models_1.ReflectionKind.TypeParameter)) {
|
|
180
|
-
// Don't generate a link will always point to this page
|
|
181
|
-
name =
|
|
189
|
+
// Don't generate a link as it will always point to this page.
|
|
190
|
+
name = utils_1.JSX.createElement("span", { class: "tsd-signature-type tsd-kind-type-parameter" }, reflection.name);
|
|
182
191
|
}
|
|
183
192
|
else {
|
|
184
193
|
name = renderUniquePath(context, reflection);
|
|
@@ -187,8 +196,11 @@ const typeRenderers = {
|
|
|
187
196
|
else if (type.externalUrl) {
|
|
188
197
|
name = (utils_1.JSX.createElement("a", { href: type.externalUrl, class: "tsd-signature-type external", target: "_blank" }, type.name));
|
|
189
198
|
}
|
|
199
|
+
else if (type.refersToTypeParameter) {
|
|
200
|
+
name = utils_1.JSX.createElement("span", { class: "tsd-signature-type tsd-kind-type-parameter" }, type.name);
|
|
201
|
+
}
|
|
190
202
|
else {
|
|
191
|
-
name = utils_1.JSX.createElement("span", { class: "tsd-signature-type" }, type.name);
|
|
203
|
+
name = utils_1.JSX.createElement("span", { class: "tsd-signature-type " }, type.name);
|
|
192
204
|
}
|
|
193
205
|
if (type.typeArguments?.length) {
|
|
194
206
|
return (utils_1.JSX.createElement(utils_1.JSX.Fragment, null,
|
|
@@ -206,7 +218,7 @@ const typeRenderers = {
|
|
|
206
218
|
for (const item of children) {
|
|
207
219
|
if (item.getSignature && item.setSignature) {
|
|
208
220
|
members.push(utils_1.JSX.createElement(utils_1.JSX.Fragment, null,
|
|
209
|
-
item.name,
|
|
221
|
+
utils_1.JSX.createElement("span", { class: (0, lib_1.getKindClass)(item) }, item.name),
|
|
210
222
|
utils_1.JSX.createElement("span", { class: "tsd-signature-symbol" }, ": "),
|
|
211
223
|
renderType(context, item.getSignature.type, models_1.TypeContext.none)));
|
|
212
224
|
continue;
|
|
@@ -214,7 +226,7 @@ const typeRenderers = {
|
|
|
214
226
|
if (item.getSignature) {
|
|
215
227
|
members.push(utils_1.JSX.createElement(utils_1.JSX.Fragment, null,
|
|
216
228
|
utils_1.JSX.createElement("span", { class: "tsd-signature-symbol" }, "get "),
|
|
217
|
-
item.name,
|
|
229
|
+
utils_1.JSX.createElement("span", { class: (0, lib_1.getKindClass)(item.getSignature) }, item.name),
|
|
218
230
|
utils_1.JSX.createElement("span", { class: "tsd-signature-symbol" }, "(): "),
|
|
219
231
|
renderType(context, item.getSignature.type, models_1.TypeContext.none)));
|
|
220
232
|
continue;
|
|
@@ -222,7 +234,7 @@ const typeRenderers = {
|
|
|
222
234
|
if (item.setSignature) {
|
|
223
235
|
members.push(utils_1.JSX.createElement(utils_1.JSX.Fragment, null,
|
|
224
236
|
utils_1.JSX.createElement("span", { class: "tsd-signature-symbol" }, "set "),
|
|
225
|
-
item.name,
|
|
237
|
+
utils_1.JSX.createElement("span", { class: (0, lib_1.getKindClass)(item.setSignature) }, item.name),
|
|
226
238
|
utils_1.JSX.createElement("span", { class: "tsd-signature-symbol" }, "("),
|
|
227
239
|
item.setSignature.parameters?.map((item) => (utils_1.JSX.createElement(utils_1.JSX.Fragment, null,
|
|
228
240
|
item.name,
|
|
@@ -234,17 +246,17 @@ const typeRenderers = {
|
|
|
234
246
|
if (item.signatures) {
|
|
235
247
|
for (const sig of item.signatures) {
|
|
236
248
|
members.push(utils_1.JSX.createElement(utils_1.JSX.Fragment, null,
|
|
237
|
-
item.name,
|
|
249
|
+
utils_1.JSX.createElement("span", { class: (0, lib_1.getKindClass)(sig) }, item.name),
|
|
238
250
|
item.flags.isOptional && utils_1.JSX.createElement("span", { class: "tsd-signature-symbol" }, "?"),
|
|
239
251
|
context.memberSignatureTitle(sig, {
|
|
240
252
|
hideName: true,
|
|
241
|
-
arrowStyle:
|
|
253
|
+
arrowStyle: true,
|
|
242
254
|
})));
|
|
243
255
|
}
|
|
244
256
|
continue;
|
|
245
257
|
}
|
|
246
258
|
members.push(utils_1.JSX.createElement(utils_1.JSX.Fragment, null,
|
|
247
|
-
item.name,
|
|
259
|
+
utils_1.JSX.createElement("span", { class: (0, lib_1.getKindClass)(item) }, item.name),
|
|
248
260
|
utils_1.JSX.createElement("span", { class: "tsd-signature-symbol" }, item.flags.isOptional ? "?: " : ": "),
|
|
249
261
|
renderType(context, item.type, models_1.TypeContext.none)));
|
|
250
262
|
}
|
|
@@ -252,8 +264,9 @@ const typeRenderers = {
|
|
|
252
264
|
const index = type.declaration.indexSignature;
|
|
253
265
|
members.push(utils_1.JSX.createElement(utils_1.JSX.Fragment, null,
|
|
254
266
|
"[",
|
|
255
|
-
index.parameters[0].name,
|
|
256
|
-
":
|
|
267
|
+
utils_1.JSX.createElement("span", { class: (0, lib_1.getKindClass)(type.declaration.indexSignature) }, index.parameters[0].name),
|
|
268
|
+
":",
|
|
269
|
+
" ",
|
|
257
270
|
renderType(context, index.parameters[0].type, models_1.TypeContext.none),
|
|
258
271
|
"]",
|
|
259
272
|
utils_1.JSX.createElement("span", { class: "tsd-signature-symbol" }, ": "),
|
|
@@ -10,7 +10,7 @@ function typeParameters(context, typeParameters) {
|
|
|
10
10
|
utils_1.JSX.createElement("h4", null,
|
|
11
11
|
item.flags.isConst && "const ",
|
|
12
12
|
item.varianceModifier ? `${item.varianceModifier} ` : "",
|
|
13
|
-
item.name,
|
|
13
|
+
utils_1.JSX.createElement("span", { class: "tsd-kind-type-parameter" }, item.name),
|
|
14
14
|
!!item.type && (utils_1.JSX.createElement(utils_1.JSX.Fragment, null,
|
|
15
15
|
utils_1.JSX.createElement("span", { class: "tsd-signature-symbol" }, " extends "),
|
|
16
16
|
context.type(item.type))),
|
|
@@ -2,6 +2,8 @@ import { Comment, Reflection, ReflectionFlags, TypeParameterReflection } from ".
|
|
|
2
2
|
import { JSX } from "../../utils";
|
|
3
3
|
export declare function stringify(data: unknown): string;
|
|
4
4
|
export declare function getDisplayName(refl: Reflection): string;
|
|
5
|
+
export declare function toStyleClass(str: string): string;
|
|
6
|
+
export declare function getKindClass(refl: Reflection): string;
|
|
5
7
|
/**
|
|
6
8
|
* Insert word break tags ``<wbr>`` into the given string.
|
|
7
9
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.renderName = exports.camelToTitleCase = exports.renderTypeParametersSignature = exports.hasTypeParameters = exports.classNames = exports.renderFlags = exports.join = exports.wbr = exports.getDisplayName = exports.stringify = void 0;
|
|
3
|
+
exports.renderName = exports.camelToTitleCase = exports.renderTypeParametersSignature = exports.hasTypeParameters = exports.classNames = exports.renderFlags = exports.join = exports.wbr = exports.getKindClass = exports.toStyleClass = exports.getDisplayName = exports.stringify = void 0;
|
|
4
4
|
const models_1 = require("../../models");
|
|
5
5
|
const utils_1 = require("../../utils");
|
|
6
6
|
function stringify(data) {
|
|
@@ -18,6 +18,17 @@ function getDisplayName(refl) {
|
|
|
18
18
|
return `${refl.name}${version}`;
|
|
19
19
|
}
|
|
20
20
|
exports.getDisplayName = getDisplayName;
|
|
21
|
+
function toStyleClass(str) {
|
|
22
|
+
return str.replace(/(\w)([A-Z])/g, (_m, m1, m2) => m1 + "-" + m2).toLowerCase();
|
|
23
|
+
}
|
|
24
|
+
exports.toStyleClass = toStyleClass;
|
|
25
|
+
function getKindClass(refl) {
|
|
26
|
+
if (refl instanceof models_1.ReferenceReflection) {
|
|
27
|
+
return getKindClass(refl.getTargetReflectionDeep());
|
|
28
|
+
}
|
|
29
|
+
return models_1.ReflectionKind.classString(refl.kind);
|
|
30
|
+
}
|
|
31
|
+
exports.getKindClass = getKindClass;
|
|
21
32
|
/**
|
|
22
33
|
* Insert word break tags ``<wbr>`` into the given string.
|
|
23
34
|
*
|
|
@@ -83,7 +94,7 @@ function renderTypeParametersSignature(typeParameters) {
|
|
|
83
94
|
join(utils_1.JSX.createElement("span", { class: "tsd-signature-symbol" }, ", "), typeParameters, (item) => (utils_1.JSX.createElement(utils_1.JSX.Fragment, null,
|
|
84
95
|
item.flags.isConst && "const ",
|
|
85
96
|
item.varianceModifier ? `${item.varianceModifier} ` : "",
|
|
86
|
-
utils_1.JSX.createElement("span", { class: "tsd-signature-type
|
|
97
|
+
utils_1.JSX.createElement("span", { class: "tsd-signature-type tsd-kind-type-parameter" }, item.name)))),
|
|
87
98
|
utils_1.JSX.createElement("span", { class: "tsd-signature-symbol" }, ">")))));
|
|
88
99
|
}
|
|
89
100
|
exports.renderTypeParametersSignature = renderTypeParametersSignature;
|
|
@@ -26,7 +26,6 @@
|
|
|
26
26
|
*
|
|
27
27
|
* For documentation on the JSON output properties, view the corresponding model.
|
|
28
28
|
* @module
|
|
29
|
-
* @internal
|
|
30
29
|
*/
|
|
31
30
|
import type * as M from "../models";
|
|
32
31
|
/**
|
|
@@ -130,6 +129,7 @@ export interface QueryType extends Type, S<M.QueryType, "type" | "queryType"> {
|
|
|
130
129
|
export interface ReferenceType extends Type, S<M.ReferenceType, "type" | "name" | "typeArguments" | "package" | "externalUrl"> {
|
|
131
130
|
target: number | ReflectionSymbolId;
|
|
132
131
|
qualifiedName?: string;
|
|
132
|
+
refersToTypeParameter?: boolean;
|
|
133
133
|
}
|
|
134
134
|
export interface ReflectionType extends Type, S<M.ReflectionType, "type" | "declaration"> {
|
|
135
135
|
}
|
|
@@ -34,7 +34,6 @@ const Path = __importStar(require("path"));
|
|
|
34
34
|
const package_manifest_1 = require("./package-manifest");
|
|
35
35
|
const paths_1 = require("./paths");
|
|
36
36
|
const fs_1 = require("./fs");
|
|
37
|
-
const array_1 = require("./array");
|
|
38
37
|
const general_1 = require("./general");
|
|
39
38
|
/**
|
|
40
39
|
* Defines how entry points are interpreted.
|
|
@@ -120,23 +119,23 @@ function getWatchEntryPoints(logger, options, program) {
|
|
|
120
119
|
exports.getWatchEntryPoints = getWatchEntryPoints;
|
|
121
120
|
function getPackageDirectories(logger, options, packageGlobPaths) {
|
|
122
121
|
const exclude = (0, paths_1.createMinimatch)(options.getValue("exclude"));
|
|
123
|
-
const rootDir = deriveRootDir(packageGlobPaths);
|
|
122
|
+
const rootDir = (0, fs_1.deriveRootDir)(packageGlobPaths);
|
|
124
123
|
// packages arguments are workspace tree roots, or glob patterns
|
|
125
124
|
// This expands them to leave only leaf packages
|
|
126
125
|
return (0, package_manifest_1.expandPackages)(logger, rootDir, packageGlobPaths, exclude);
|
|
127
126
|
}
|
|
128
127
|
exports.getPackageDirectories = getPackageDirectories;
|
|
129
128
|
function getModuleName(fileName, baseDir) {
|
|
130
|
-
return (0,
|
|
129
|
+
return (0, paths_1.normalizePath)((0, path_1.relative)(baseDir, fileName)).replace(/(\/index)?(\.d)?\.([cm][tj]s|[tj]sx?)$/, "");
|
|
131
130
|
}
|
|
132
131
|
/**
|
|
133
132
|
* Converts a list of file-oriented paths in to DocumentationEntryPoints for conversion.
|
|
134
133
|
* This is in contrast with the package-oriented `getEntryPointsForPackages`
|
|
135
134
|
*/
|
|
136
135
|
function getEntryPointsForPaths(logger, inputFiles, options, programs = getEntryPrograms(logger, options)) {
|
|
137
|
-
const baseDir = options.getValue("basePath") || (0, fs_1.
|
|
136
|
+
const baseDir = options.getValue("basePath") || (0, fs_1.deriveRootDir)(inputFiles);
|
|
138
137
|
const entryPoints = [];
|
|
139
|
-
entryLoop: for (const fileOrDir of inputFiles.map(
|
|
138
|
+
entryLoop: for (const fileOrDir of inputFiles.map(paths_1.normalizePath)) {
|
|
140
139
|
const toCheck = [fileOrDir];
|
|
141
140
|
if (!/\.([cm][tj]s|[tj]sx?)$/.test(fileOrDir)) {
|
|
142
141
|
toCheck.push(`${fileOrDir}/index.ts`, `${fileOrDir}/index.cts`, `${fileOrDir}/index.mts`, `${fileOrDir}/index.tsx`, `${fileOrDir}/index.js`, `${fileOrDir}/index.cjs`, `${fileOrDir}/index.mjs`, `${fileOrDir}/index.jsx`);
|
|
@@ -163,7 +162,7 @@ function getExpandedEntryPointsForPaths(logger, inputFiles, options, programs =
|
|
|
163
162
|
}
|
|
164
163
|
exports.getExpandedEntryPointsForPaths = getExpandedEntryPointsForPaths;
|
|
165
164
|
function expandGlobs(inputFiles) {
|
|
166
|
-
const base = (0, fs_1.
|
|
165
|
+
const base = (0, fs_1.deriveRootDir)(inputFiles);
|
|
167
166
|
const result = inputFiles.flatMap((entry) => (0, fs_1.glob)(entry, base, { includeDirectories: true, followSymlinks: true }));
|
|
168
167
|
return result;
|
|
169
168
|
}
|
|
@@ -230,7 +229,7 @@ function expandInputFiles(logger, entryPoints, options) {
|
|
|
230
229
|
if (!entryPoint && (0, paths_1.matchesAny)(exclude, file)) {
|
|
231
230
|
return;
|
|
232
231
|
}
|
|
233
|
-
files.push((0,
|
|
232
|
+
files.push((0, paths_1.normalizePath)(file));
|
|
234
233
|
}
|
|
235
234
|
}
|
|
236
235
|
entryPoints.forEach((file) => {
|
|
@@ -243,15 +242,6 @@ function expandInputFiles(logger, entryPoints, options) {
|
|
|
243
242
|
});
|
|
244
243
|
return files;
|
|
245
244
|
}
|
|
246
|
-
function deriveRootDir(packageGlobPaths) {
|
|
247
|
-
const globs = (0, paths_1.createMinimatch)(packageGlobPaths);
|
|
248
|
-
const rootPaths = globs.flatMap((glob) => (0, array_1.filterMap)(glob.set, (set) => {
|
|
249
|
-
const stop = set.findIndex((part) => typeof part !== "string");
|
|
250
|
-
const path = stop === -1 ? set : set.slice(0, stop);
|
|
251
|
-
return `/${path.join("/")}`;
|
|
252
|
-
}));
|
|
253
|
-
return (0, fs_1.getCommonDirectory)(rootPaths);
|
|
254
|
-
}
|
|
255
245
|
/**
|
|
256
246
|
* Expand the provided packages configuration paths, determining the entry points
|
|
257
247
|
* and creating the ts.Programs for any which are found.
|