@arcgis/api-extractor 5.0.0-next.78 → 5.0.0-next.79
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.
|
@@ -90,7 +90,7 @@ export declare abstract class ApiExtractor {
|
|
|
90
90
|
* we compute inheritance data lazily).
|
|
91
91
|
*/
|
|
92
92
|
ApiExtractorInheritanceData | false | undefined>;
|
|
93
|
-
noInheritMembers: Record<string, string[]
|
|
93
|
+
noInheritMembers: Readonly<Record<string, readonly string[]>>;
|
|
94
94
|
/**
|
|
95
95
|
* Based on the superclass name, find the actual declaration in the modules.
|
|
96
96
|
*/
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { CopyDocDefinitions } from '../types.ts';
|
|
2
|
+
export interface ApiExtractorConfig {
|
|
3
|
+
/**
|
|
4
|
+
* The environment in which the extractor is running.
|
|
5
|
+
*
|
|
6
|
+
* @public
|
|
7
|
+
* @default "production"
|
|
8
|
+
*/
|
|
9
|
+
readonly environment?: "development" | "production";
|
|
10
|
+
/**
|
|
11
|
+
* The path to the root of the project to extract.
|
|
12
|
+
*
|
|
13
|
+
* @public
|
|
14
|
+
* @default process.cwd()
|
|
15
|
+
*/
|
|
16
|
+
readonly cwd?: string;
|
|
17
|
+
/**
|
|
18
|
+
* @public
|
|
19
|
+
* @default undefined
|
|
20
|
+
*/
|
|
21
|
+
readonly copyDocDefinitions?: CopyDocDefinitions;
|
|
22
|
+
/** @public */
|
|
23
|
+
readonly typeReplacements?: TypeReplacements;
|
|
24
|
+
/**
|
|
25
|
+
* api-extractor automatically discovers files that contain `@public`. Not
|
|
26
|
+
* having to manually maintain a list of entries saves labor.
|
|
27
|
+
*
|
|
28
|
+
* As a performance optimization, you can exclude some directories from
|
|
29
|
+
* `@public` file discovery. This should be a flat list of folders inside
|
|
30
|
+
* basePath without slashes or deep paths.
|
|
31
|
+
*
|
|
32
|
+
* @public
|
|
33
|
+
* @example ["tests"]
|
|
34
|
+
*/
|
|
35
|
+
readonly excludedDirectories?: Set<string>;
|
|
36
|
+
/** @public */
|
|
37
|
+
readonly noInheritMembers?: NoInheritMembers;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Privately, arcgis-js-api has interfaces that mirror some of the most widely
|
|
41
|
+
* used types. They are in the process of refactoring out many of them. Until
|
|
42
|
+
* that is complete, this hardcoded table is used to replace the usages of these
|
|
43
|
+
* interfaces with their concrete types.
|
|
44
|
+
*
|
|
45
|
+
* Keep this list minimal. Type replacements have pitfalls:
|
|
46
|
+
* - In a .ts file there is no indication that a given type will be replaced.
|
|
47
|
+
* It can be surprising why some types are replaced and some are not.
|
|
48
|
+
* - The replaced type is not equivalent (LayerUnion=>Layer). These do affect
|
|
49
|
+
* type checking in some cases.
|
|
50
|
+
* - If the name we are replacing with is already present in the current scope,
|
|
51
|
+
* there will be a collision. Detecting such collisions is tricky - extractor
|
|
52
|
+
* does it minimally.
|
|
53
|
+
*
|
|
54
|
+
* @public
|
|
55
|
+
* @see https://devtopia.esri.com/WebGIS/arcgis-js-api/discussions/60843
|
|
56
|
+
* @see https://devtopia.esri.com/WebGIS/arcgis-js-api/issues/69911
|
|
57
|
+
* @see https://devtopia.esri.com/WebGIS/arcgis-js-api/issues/73395
|
|
58
|
+
*/
|
|
59
|
+
export type TypeReplacements = Record<string, Record<string, readonly [modulePath: string, name: string, type: "default" | "named"] | undefined> | undefined>;
|
|
60
|
+
/**
|
|
61
|
+
* Don't include these members in each subclass to keep api reference pages cleaner.
|
|
62
|
+
* These has no typings impact since their inheritance is still done by TypeScript.
|
|
63
|
+
*
|
|
64
|
+
* @public
|
|
65
|
+
*/
|
|
66
|
+
export type NoInheritMembers = Readonly<Record<string, readonly string[]>>;
|
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import d from "typescript";
|
|
|
2
2
|
import $, { supportsColorStderr as z } from "chalk";
|
|
3
3
|
import { path as q } from "@arcgis/components-build-utils";
|
|
4
4
|
import { mappedFind as J } from "@arcgis/toolkit/array";
|
|
5
|
-
const j = "@arcgis/api-extractor", X = "5.0.0-next.
|
|
5
|
+
const j = "@arcgis/api-extractor", X = "5.0.0-next.79", P = {
|
|
6
6
|
name: j,
|
|
7
7
|
version: X
|
|
8
8
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcgis/api-extractor",
|
|
3
|
-
"version": "5.0.0-next.
|
|
3
|
+
"version": "5.0.0-next.79",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -10,6 +10,9 @@
|
|
|
10
10
|
"./diff": "./dist/diff/index.js",
|
|
11
11
|
"./diffTypes": "./dist/diffTypes/index.js",
|
|
12
12
|
"./uiUtils": "./dist/uiUtils/index.js",
|
|
13
|
+
"./extractor/config": {
|
|
14
|
+
"types": "./dist/extractor/config.d.ts"
|
|
15
|
+
},
|
|
13
16
|
"./package.json": "./package.json"
|
|
14
17
|
},
|
|
15
18
|
"files": [
|
|
@@ -18,8 +21,8 @@
|
|
|
18
21
|
"bin": "./dist/cli.js",
|
|
19
22
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
20
23
|
"dependencies": {
|
|
21
|
-
"@arcgis/components-build-utils": "5.0.0-next.
|
|
22
|
-
"@arcgis/toolkit": "5.0.0-next.
|
|
24
|
+
"@arcgis/components-build-utils": "5.0.0-next.79",
|
|
25
|
+
"@arcgis/toolkit": "5.0.0-next.79",
|
|
23
26
|
"@commander-js/extra-typings": "^14.0.0",
|
|
24
27
|
"chalk": "^5.4.1",
|
|
25
28
|
"commander": "^14.0.0",
|