@arcgis/api-extractor 5.0.0-next.98 → 5.0.0
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/README.md +2 -3
- package/dist/ApiExtractor-DIxlsiLk.js +2664 -0
- package/dist/apiHelpers-BYzO767m.js +161 -0
- package/dist/apiJson.d.ts +706 -760
- package/dist/cli-7PX_wNxb.js +34 -0
- package/dist/cli.js +50 -7
- package/dist/compilerHints.d.ts +62 -0
- package/dist/diff/apiDiffToMarkdown.d.ts +9 -0
- package/dist/diff/apiDiffToMarkdown.js +140 -0
- package/dist/diff/diffApiJson.d.ts +8 -5
- package/dist/diff/diffApiJson.js +260 -0
- package/dist/diff/fetchApiJsonFromNpm.d.ts +5 -2
- package/dist/diff/fetchApiJsonFromNpm.js +9 -0
- package/dist/diff/types.d.ts +71 -56
- package/dist/diffTypes/index.d.ts +20 -23
- package/dist/diffTypes/index.js +4 -2
- package/dist/extractor/ApiExtractor.d.ts +64 -137
- package/dist/extractor/ApiExtractor.js +9 -0
- package/dist/extractor/config.d.ts +459 -39
- package/dist/extractor/config.js +18 -0
- package/dist/extractor/extractors/copyDoc.d.ts +25 -0
- package/dist/extractor/processing/links.d.ts +15 -0
- package/dist/extractor/processing/links.js +172 -0
- package/dist/extractor/types.d.ts +19 -0
- package/dist/extractor/webComponent/findComponents.d.ts +19 -0
- package/dist/extractor/webComponent/findComponents.js +36 -0
- package/dist/extractor/webComponent/pathMapping.d.ts +11 -0
- package/dist/extractor/webComponent/pathMapping.js +44 -0
- package/dist/index.d.ts +164 -12
- package/dist/index.js +3 -837
- package/dist/typeScript-Dsim-EQC.js +64 -0
- package/dist/uiUtils/index.d.ts +10 -19
- package/dist/uiUtils/index.js +3 -55
- package/dist/utils/apiHelpers.d.ts +28 -61
- package/dist/utils/apiHelpers.js +17 -0
- package/dist/utils/astHelpers.d.ts +22 -21
- package/dist/utils/astHelpers.js +67 -0
- package/dist/utils/createIndex.d.ts +30 -0
- package/dist/utils/createIndex.js +81 -0
- package/dist/utils/hydrateApiType.d.ts +26 -0
- package/dist/utils/hydrateApiType.js +62 -0
- package/dist/utils/inferEntrypoints.d.ts +17 -0
- package/dist/utils/inferEntrypoints.js +26 -0
- package/dist/utils/internalTypeScriptApis.d.ts +92 -0
- package/dist/utils/internalTypeScriptApis.js +58 -0
- package/dist/utils/partPrinter.d.ts +25 -19
- package/dist/utils/partPrinter.js +82 -0
- package/dist/vite/plugin.d.ts +53 -0
- package/dist/vite/plugin.js +107 -0
- package/dist/vite/typeScript.d.ts +16 -0
- package/dist/vite/typeScript.js +6 -0
- package/dist/worker-1ouniZM0.js +3680 -0
- package/package.json +43 -9
- package/dist/cli.d.ts +0 -2
- package/dist/config/typeReferences/docLinkAdditions.d.ts +0 -51
- package/dist/config/typeReferences/globals.d.ts +0 -11
- package/dist/config/typeReferences/stringDocLinkAdditions.d.ts +0 -17
- package/dist/config/typeReferences/typeScriptGlobals.json.d.ts +0 -3
- package/dist/diff/index.d.ts +0 -3
- package/dist/diff/index.js +0 -149
- package/dist/ensureCemCompatibility.d.ts +0 -1
- package/dist/internalTypeScriptApis.d.ts +0 -31
- package/dist/types.d.ts +0 -22
- package/dist/utils/error.d.ts +0 -17
- package/dist/utils/jsDocHelpers.d.ts +0 -2
- package/dist/utils/jsDocParser.d.ts +0 -46
- package/dist/utils/jsDocPrinter.d.ts +0 -13
- package/dist/utils/print.d.ts +0 -6
package/dist/diff/types.d.ts
CHANGED
|
@@ -1,83 +1,98 @@
|
|
|
1
|
-
import { ApiClassCallSignature, ApiClassConstructor, ApiClassDeclaration, ApiClassField, ApiClassMethod, ApiCustomElementDeclaration, ApiFunctionDeclaration, ApiInterfaceDeclaration, ApiMixinDeclaration, ApiModule, ApiVariableDeclaration } from
|
|
1
|
+
import type { ApiClassCallSignature, ApiClassConstructor, ApiClassDeclaration, ApiClassField, ApiClassMethod, ApiCustomElementDeclaration, ApiFunctionDeclaration, ApiInterfaceDeclaration, ApiMixinDeclaration, ApiModule, ApiVariableDeclaration } from "../apiJson.js";
|
|
2
|
+
|
|
2
3
|
export interface ApiDiff {
|
|
3
|
-
|
|
4
|
+
modules: ApiModuleDiff[];
|
|
4
5
|
}
|
|
6
|
+
|
|
5
7
|
export interface ApiModuleDiff {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
+
path: ApiModule["path"];
|
|
9
|
+
declarations: ApiDeclarationDiff[];
|
|
8
10
|
}
|
|
11
|
+
|
|
9
12
|
export interface ApiDiffBase {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
13
|
+
name: string;
|
|
14
|
+
/**
|
|
15
|
+
* True if this declaration was removed in the new api.json.
|
|
16
|
+
* If class is removed, members are not listed.
|
|
17
|
+
*
|
|
18
|
+
* @default false
|
|
19
|
+
*/
|
|
20
|
+
removed?: true;
|
|
21
|
+
/**
|
|
22
|
+
* True if this declaration was added in the new api.json.
|
|
23
|
+
* If class is added, members are not listed.
|
|
24
|
+
*
|
|
25
|
+
* @default false
|
|
26
|
+
*/
|
|
27
|
+
added?: true;
|
|
28
|
+
/**
|
|
29
|
+
* Whether this declaration is deprecated in the new api.json. If declaration
|
|
30
|
+
* was removed, but was deprecated in the old api.json, this will show the old
|
|
31
|
+
* deprecation message as it points at the replacement API.
|
|
32
|
+
* If the value is a string, it's the reason for the deprecation.
|
|
33
|
+
* Deprecated takes precedence over added.
|
|
34
|
+
*
|
|
35
|
+
* @default false
|
|
36
|
+
*/
|
|
37
|
+
deprecated?: boolean | string;
|
|
33
38
|
}
|
|
39
|
+
|
|
34
40
|
export type ApiDeclarationDiff = ApiClassDeclarationDiff | ApiCustomElementDeclarationDiff | ApiFunctionDeclarationDiff | ApiInterfaceDeclarationDiff | ApiMixinDeclarationDiff | ApiVariableDeclarationDiff;
|
|
41
|
+
|
|
35
42
|
export interface ApiClassDeclarationDiff extends ApiDiffBase {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
+
kind: ApiClassDeclaration["kind"];
|
|
44
|
+
/**
|
|
45
|
+
* Inherited members are not included in the diff.
|
|
46
|
+
* Also, if entire class is added/removed, members are not included in the diff.
|
|
47
|
+
*/
|
|
48
|
+
members?: ApiClassMemberDiff[];
|
|
49
|
+
events?: ApiDiffBase[];
|
|
43
50
|
}
|
|
51
|
+
|
|
44
52
|
export interface ApiInterfaceDeclarationDiff extends ApiDiffBase {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
53
|
+
kind: ApiInterfaceDeclaration["kind"];
|
|
54
|
+
/**
|
|
55
|
+
* Inherited members are not included in the diff.
|
|
56
|
+
* Also, if entire class is added/removed, members are not included in the diff.
|
|
57
|
+
*/
|
|
58
|
+
members?: ApiClassMemberDiff[];
|
|
51
59
|
}
|
|
60
|
+
|
|
52
61
|
export interface ApiMixinDeclarationDiff extends Omit<ApiClassDeclarationDiff, "kind"> {
|
|
53
|
-
|
|
62
|
+
kind: ApiMixinDeclaration["kind"];
|
|
54
63
|
}
|
|
64
|
+
|
|
55
65
|
export interface ApiCustomElementDeclarationDiff extends ApiClassDeclarationDiff {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
cssProperties?: ApiDiffBase[];
|
|
63
|
-
cssStates?: ApiDiffBase[];
|
|
66
|
+
/** Attributes diff is not included as attributes are based on members. */
|
|
67
|
+
tagName: ApiCustomElementDeclaration["tagName"];
|
|
68
|
+
slots?: ApiDiffBase[];
|
|
69
|
+
cssParts?: ApiDiffBase[];
|
|
70
|
+
cssProperties?: ApiDiffBase[];
|
|
71
|
+
cssStates?: ApiDiffBase[];
|
|
64
72
|
}
|
|
73
|
+
|
|
65
74
|
export type ApiClassMemberDiff = ApiClassCallSignatureDiff | ApiClassConstructorDiff | ApiClassFieldDiff | ApiClassMethodDiff;
|
|
75
|
+
|
|
66
76
|
export interface ApiClassFieldDiff extends ApiDiffBase {
|
|
67
|
-
|
|
77
|
+
kind: ApiClassField["kind"];
|
|
68
78
|
}
|
|
79
|
+
|
|
69
80
|
export interface ApiClassMethodDiff extends ApiDiffBase {
|
|
70
|
-
|
|
81
|
+
kind: ApiClassMethod["kind"];
|
|
71
82
|
}
|
|
83
|
+
|
|
72
84
|
export interface ApiClassConstructorDiff extends Omit<ApiDiffBase, "name"> {
|
|
73
|
-
|
|
85
|
+
kind: ApiClassConstructor["kind"];
|
|
74
86
|
}
|
|
87
|
+
|
|
75
88
|
export interface ApiClassCallSignatureDiff extends Omit<ApiDiffBase, "name"> {
|
|
76
|
-
|
|
89
|
+
kind: ApiClassCallSignature["kind"];
|
|
77
90
|
}
|
|
91
|
+
|
|
78
92
|
export interface ApiFunctionDeclarationDiff extends ApiDiffBase {
|
|
79
|
-
|
|
93
|
+
kind: ApiFunctionDeclaration["kind"];
|
|
80
94
|
}
|
|
95
|
+
|
|
81
96
|
export interface ApiVariableDeclarationDiff extends ApiDiffBase {
|
|
82
|
-
|
|
83
|
-
}
|
|
97
|
+
kind: ApiVariableDeclaration["kind"];
|
|
98
|
+
}
|
|
@@ -1,24 +1,21 @@
|
|
|
1
|
-
interface DiffTypesOptions {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
*
|
|
19
|
-
* @default true
|
|
20
|
-
*/
|
|
21
|
-
truncate?: boolean;
|
|
1
|
+
export interface DiffTypesOptions {
|
|
2
|
+
/** Path to the original types folder. */
|
|
3
|
+
originalDtsPath: string;
|
|
4
|
+
/** Path to the new types folder. */
|
|
5
|
+
newDtsPath: string;
|
|
6
|
+
/**
|
|
7
|
+
* Path to the output markdown file.
|
|
8
|
+
*
|
|
9
|
+
* @default "types-diff.md"
|
|
10
|
+
*/
|
|
11
|
+
outputMdPath: string;
|
|
12
|
+
/**
|
|
13
|
+
* Whether to truncate output if the diff is longer than 1000 lines.
|
|
14
|
+
*
|
|
15
|
+
* @default true
|
|
16
|
+
*/
|
|
17
|
+
truncate?: boolean;
|
|
22
18
|
}
|
|
23
|
-
|
|
24
|
-
|
|
19
|
+
|
|
20
|
+
/** @param options */
|
|
21
|
+
export function diffTypes(options: DiffTypesOptions): Promise<void>;
|
package/dist/diffTypes/index.js
CHANGED
|
@@ -21,7 +21,9 @@ async function b({
|
|
|
21
21
|
|
|
22
22
|
🧐 please verify that the changes to the public API/doc below are intentional.
|
|
23
23
|
🟥 If removing/changing APIs, remember the semver promise.
|
|
24
|
-
🟩 If adding APIs, add to release notes
|
|
24
|
+
🟩 If adding APIs, add to release notes.
|
|
25
|
+
|
|
26
|
+
`;
|
|
25
27
|
let f = g(r.split(`
|
|
26
28
|
`), n);
|
|
27
29
|
i && f.length > l && (o += `> [!WARNING]
|
|
@@ -34,7 +36,7 @@ async function b({
|
|
|
34
36
|
await m(s.dirname(e), { recursive: !0 }), await d(e, o);
|
|
35
37
|
}
|
|
36
38
|
function g(t, n) {
|
|
37
|
-
for (let e = 0; e < t.length; e
|
|
39
|
+
for (let e = 0; e < t.length; ++e) {
|
|
38
40
|
const i = t[e];
|
|
39
41
|
if (
|
|
40
42
|
// Make diff smaller by excluding the `diff ...` lines
|
|
@@ -1,139 +1,66 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
sortModules: boolean;
|
|
6
|
-
/** The path relative to which module.path will be resolved */
|
|
7
|
-
cwd: string;
|
|
8
|
-
environment: "development" | "production";
|
|
9
|
-
};
|
|
1
|
+
import type ts from "typescript";
|
|
2
|
+
import type { ApiExtractorConfig, ResolvedApiExtractorConfig } from "./config.js";
|
|
3
|
+
import type { ApiExtractorResult, ApiExtractorWatcher } from "./types.js";
|
|
4
|
+
|
|
10
5
|
/**
|
|
11
|
-
*
|
|
12
|
-
*
|
|
6
|
+
* ApiExtractor's main JavaScript entrypoint.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```js
|
|
10
|
+
*
|
|
11
|
+
* import { loadApiExtractorConfig, mergeApiExtractorConfigs } from "@arcgis/api-extractor/extractor/config";
|
|
12
|
+
* import { ApiExtractor } from "@arcgis/api-extractor/extractor/ApiExtractor";
|
|
13
|
+
*
|
|
14
|
+
* const baseConfig = await loadApiExtractorConfig(process.cwd(), "api-extractor.config.ts");
|
|
15
|
+
*
|
|
16
|
+
* // Optionally override parts of the config
|
|
17
|
+
* const mergedConfig = mergeApiExtractorConfigs(baseConfig, {
|
|
18
|
+
* types: {
|
|
19
|
+
* fullTypeCheck: true,
|
|
20
|
+
* },
|
|
21
|
+
* });
|
|
22
|
+
*
|
|
23
|
+
* const extractor = new ApiExtractor(mergedConfig);
|
|
24
|
+
*
|
|
25
|
+
* const { apiJson, dtsFiles } = await extractor.run();
|
|
26
|
+
* // OR, start a watcher:
|
|
27
|
+
* const watcher = await extractor.watch();
|
|
28
|
+
* ```
|
|
13
29
|
*/
|
|
14
|
-
export
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
* For each statement in a module, extract a declaration if it is a public API
|
|
52
|
-
*/
|
|
53
|
-
protected abstract extractDeclaration(statement: ts.Statement, index: number): ApiDeclaration | undefined;
|
|
54
|
-
/**
|
|
55
|
-
* Add ApiModule.exports entry based on ApiDeclaration
|
|
56
|
-
*
|
|
57
|
-
* To reduce the size of the api.json, we only add exports entries for web
|
|
58
|
-
* components or default exports.
|
|
59
|
-
*/
|
|
60
|
-
addExport(declaration: ApiDeclaration, isDefault: boolean): void;
|
|
61
|
-
copyDoc(errorReportingNode: ts.Node, copyDocDefinitions: CopyDocDefinitions["properties"], apiProperty: ApiCustomElementField, apiComponent: ApiObjectLikeDeclaration, apiModule: ApiModule): void;
|
|
62
|
-
copyDoc(errorReportingNode: ts.Node, copyDocDefinitions: CopyDocDefinitions["methods"], method: ApiClassMethod, component: ApiObjectLikeDeclaration, apiModule: ApiModule): void;
|
|
63
|
-
copyDoc(errorReportingNode: ts.Node, copyDocDefinitions: CopyDocDefinitions["events"], event: ApiEvent, component: ApiObjectLikeDeclaration, apiModule: ApiModule): void;
|
|
64
|
-
copyDoc(errorReportingNode: ts.Node, copyDocDefinitions: CopyDocDefinitions["functions"], apiFunction: ApiFunctionDeclaration, apiModule: ApiModule): void;
|
|
65
|
-
copyDoc(errorReportingNode: ts.Node, copyDocDefinitions: CopyDocDefinitions["variables"], variable: ApiVariableDeclaration, apiModule: ApiModule): void;
|
|
66
|
-
copyDoc(errorReportingNode: ts.Node, copyDocDefinitions: CopyDocDefinitions["classes"], classDeclaration: ApiClassDeclaration, apiModule: ApiModule): void;
|
|
67
|
-
copyDoc(errorReportingNode: ts.Node, copyDocDefinitions: CopyDocDefinitions["customElements"], componentDeclaration: ApiCustomElementDeclaration, apiModule: ApiModule): void;
|
|
68
|
-
copyDoc(errorReportingNode: ts.Node, copyDocDefinitions: CopyDocDefinitions["interfaces"], interfaceDeclaration: ApiInterfaceDeclaration, apiModule: ApiModule): void;
|
|
69
|
-
/**
|
|
70
|
-
* Inherit public members from mixins and superclass.
|
|
71
|
-
*
|
|
72
|
-
* In cast of Lumina, for this to work, the superclass needs to be in a file
|
|
73
|
-
* named like a component (src/components/name/name.tsx), even if it is not a
|
|
74
|
-
* standalone component. See
|
|
75
|
-
* https://devtopia.esri.com/WebGIS/arcgis-web-components/issues/3212
|
|
76
|
-
*/
|
|
77
|
-
inheritMembers(moduleName: string, component: ApiClassDeclaration | ApiMixinDeclaration, modules: ApiModule[]): void;
|
|
78
|
-
/**
|
|
79
|
-
* Inherit members from a superclass or mixin.
|
|
80
|
-
*/
|
|
81
|
-
protected inheritMembersFrom(parent: ApiExtractorInheritanceData, destination: ApiClassDeclaration | ApiMixinDeclaration, eventsWereExplicitlyInherited: boolean): void;
|
|
82
|
-
protected inheritMembersOfKind<T extends ApiAttribute | ApiCssCustomProperty | ApiCssCustomState | ApiCssPart | ApiEvent | ApiSlot>(members: T[] | undefined, parentMembers: T[], parentIndexedMembers: Record<string, T>, inheritedFrom?: ApiReference): T[];
|
|
83
|
-
resolvedInheritance: Record<string,
|
|
84
|
-
/**
|
|
85
|
-
* `false` means don't inherit (or resolution failed).
|
|
86
|
-
*
|
|
87
|
-
* `undefined` means we already inherited the members, but have not yet
|
|
88
|
-
* computed the inheritance data for this module (almost every class
|
|
89
|
-
* inherits some class, but only a few are inherited by other classes, so
|
|
90
|
-
* we compute inheritance data lazily).
|
|
91
|
-
*/
|
|
92
|
-
ApiExtractorInheritanceData | false | undefined>;
|
|
93
|
-
noInheritMembers: Readonly<Record<string, readonly string[]>>;
|
|
94
|
-
/**
|
|
95
|
-
* Based on the superclass name, find the actual declaration in the modules.
|
|
96
|
-
*/
|
|
97
|
-
protected resolveInheritance(superClassModule: string, modules: ApiModule[], isMixin: boolean): ApiExtractorInheritanceData | false;
|
|
98
|
-
/**
|
|
99
|
-
* Overwrite point
|
|
100
|
-
*
|
|
101
|
-
* FINAL: jsapi-extractor has a more efficient implementation because it
|
|
102
|
-
* has to deal with inheritance a lot. Unify it with Lumina.
|
|
103
|
-
*/
|
|
104
|
-
protected findSuperclassDeclaration(moduleName: string, modules: ApiModule[], _isMixin: boolean): readonly [string, ApiClassDeclaration | ApiMixinDeclaration] | false;
|
|
105
|
-
protected handleEventTypesProperty(_apiMember: ApiClassMember, _apiComponent: ApiClassDeclaration | ApiMixinDeclaration, _moduleName: string): void;
|
|
106
|
-
protected resolvePropertyAutoCastingType(_apiMember: ApiClassMember, _moduleName: string): void;
|
|
107
|
-
/**
|
|
108
|
-
* This method should check if the super property is an accessor, then the
|
|
109
|
-
* override property should be promoted to an accessor too.
|
|
110
|
-
* This is necessary until we migrate to standard decorators since - after
|
|
111
|
-
* that internal accessor status will match the status in the public typings.
|
|
112
|
-
*/
|
|
113
|
-
protected maybePromotePropertyToAutoAccessor(_apiProperty: ApiClassField, _superApiProperty: ApiClassField): void;
|
|
114
|
-
protected maybeResolveMixinBaseClass(_apiReference: ApiReferenceWithTypeArguments, _currentModule: string): ApiInterfaceDeclaration | undefined;
|
|
115
|
-
}
|
|
116
|
-
type ApiExtractorInheritanceData = {
|
|
117
|
-
inheritanceData: ApiReference;
|
|
118
|
-
declaration: ApiClassDeclaration | ApiMixinDeclaration;
|
|
119
|
-
/**
|
|
120
|
-
* Used for validation only. If class has any settable fields, and class is
|
|
121
|
-
* extended by another one, require that the class module exports the
|
|
122
|
-
* `<className>Properties` interface. It will be extended by the superclass'
|
|
123
|
-
* properties interface.
|
|
124
|
-
*/
|
|
125
|
-
hasSettableField: boolean;
|
|
126
|
-
/**
|
|
127
|
-
* Indexed by name for quick lookup of "overridden" status.
|
|
128
|
-
* Using a map because we do .get() during constructor of the Map, and because
|
|
129
|
-
* there are often 10+ items with random access.
|
|
130
|
-
*/
|
|
131
|
-
indexedMembers: Map<string, ApiClassMember | ApiCustomElementMember | undefined> | undefined;
|
|
132
|
-
indexedEvents: Record<string, ApiEvent> | undefined;
|
|
133
|
-
indexedAttributes: Record<string, ApiAttribute> | undefined;
|
|
134
|
-
indexedSlots: Record<string, ApiSlot> | undefined;
|
|
135
|
-
indexedCssParts: Record<string, ApiCssPart> | undefined;
|
|
136
|
-
indexedCssProperties: Record<string, ApiCssCustomProperty> | undefined;
|
|
137
|
-
indexedCssStates: Record<string, ApiCssCustomState> | undefined;
|
|
138
|
-
};
|
|
139
|
-
export {};
|
|
30
|
+
export class ApiExtractor {
|
|
31
|
+
constructor(rawConfig?: ApiExtractorConfig);
|
|
32
|
+
readonly config: ResolvedApiExtractorConfig;
|
|
33
|
+
/**
|
|
34
|
+
* Number of errors logged during the extraction process.
|
|
35
|
+
* Errors will be logged using the `config.logger.error` callback if provided.
|
|
36
|
+
* Otherwise, they will be logged using `console.error`.
|
|
37
|
+
*
|
|
38
|
+
* @default 0
|
|
39
|
+
*/
|
|
40
|
+
errorCount: number;
|
|
41
|
+
/**
|
|
42
|
+
* If doing typed extraction or full type check, this will be the ts.Program.
|
|
43
|
+
* If doing untyped watch, this will be a minimal Program-like object to reuse
|
|
44
|
+
* SourceFiles for unchanged files.
|
|
45
|
+
* Otherwise, undefined.
|
|
46
|
+
*/
|
|
47
|
+
program?: {
|
|
48
|
+
getSourceFile: ts.Program["getSourceFile"];
|
|
49
|
+
getSourceFiles: ts.Program["getSourceFiles"];
|
|
50
|
+
getTypeChecker?: ts.Program["getTypeChecker"];
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* @deprecated
|
|
54
|
+
* @default 0
|
|
55
|
+
*/
|
|
56
|
+
silencedBrokenLinkCount: number;
|
|
57
|
+
/** The high-level API for running the extractor on the current project. */
|
|
58
|
+
run(): Promise<ApiExtractorResult>;
|
|
59
|
+
/**
|
|
60
|
+
* The high-level API for starting a watch-mode extraction on the current project.
|
|
61
|
+
* When watching, double check that the configuration options the ApiExtractor
|
|
62
|
+
* was created with are appropriate for watch mode (disable full type check
|
|
63
|
+
* and type verifier if not necessary).
|
|
64
|
+
*/
|
|
65
|
+
watch(): Promise<ApiExtractorWatcher>;
|
|
66
|
+
}
|