@arcgis/api-extractor 5.0.0-next.135 → 5.0.0-next.137

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 (63) hide show
  1. package/dist/ApiExtractor-BwOcUvPV.js +2644 -0
  2. package/dist/apiJson.d.ts +706 -760
  3. package/dist/cli.js +26 -2
  4. package/dist/compilerHints.d.ts +62 -0
  5. package/dist/diff/diffApiJson.d.ts +6 -3
  6. package/dist/diff/diffApiJson.js +142 -0
  7. package/dist/diff/fetchApiJsonFromNpm.d.ts +5 -2
  8. package/dist/diff/fetchApiJsonFromNpm.js +9 -0
  9. package/dist/diff/types.d.ts +70 -56
  10. package/dist/diffTypes/index.d.ts +20 -23
  11. package/dist/diffTypes/index.js +4 -2
  12. package/dist/extractor/ApiExtractor.d.ts +72 -137
  13. package/dist/extractor/ApiExtractor.js +9 -0
  14. package/dist/extractor/config.d.ts +425 -39
  15. package/dist/extractor/config.js +17 -0
  16. package/dist/extractor/extractors/copyDoc.d.ts +25 -0
  17. package/dist/extractor/privateContext.d.ts +19 -0
  18. package/dist/extractor/privateContext.js +84 -0
  19. package/dist/extractor/processing/links.d.ts +12 -0
  20. package/dist/extractor/processing/links.js +177 -0
  21. package/dist/extractor/types.d.ts +40 -0
  22. package/dist/extractor/webComponent/findComponents.d.ts +19 -0
  23. package/dist/extractor/webComponent/findComponents.js +36 -0
  24. package/dist/extractor/webComponent/pathMapping.d.ts +11 -0
  25. package/dist/extractor/webComponent/pathMapping.js +44 -0
  26. package/dist/index.d.ts +164 -12
  27. package/dist/index.js +3 -841
  28. package/dist/typeScript-CzUTFiYO.js +64 -0
  29. package/dist/uiUtils/index.d.ts +10 -19
  30. package/dist/uiUtils/index.js +3 -55
  31. package/dist/utils/apiHelpers.d.ts +28 -61
  32. package/dist/utils/apiHelpers.js +80 -0
  33. package/dist/utils/astHelpers.d.ts +22 -21
  34. package/dist/utils/astHelpers.js +67 -0
  35. package/dist/utils/hydrateApiType.d.ts +26 -0
  36. package/dist/utils/hydrateApiType.js +62 -0
  37. package/dist/utils/inferEntrypoints.d.ts +17 -0
  38. package/dist/utils/inferEntrypoints.js +26 -0
  39. package/dist/utils/internalTypeScriptApis.d.ts +92 -0
  40. package/dist/utils/internalTypeScriptApis.js +58 -0
  41. package/dist/utils/partPrinter.d.ts +25 -19
  42. package/dist/utils/partPrinter.js +82 -0
  43. package/dist/vite/plugin.d.ts +53 -0
  44. package/dist/vite/plugin.js +107 -0
  45. package/dist/vite/typeScript.d.ts +16 -0
  46. package/dist/vite/typeScript.js +6 -0
  47. package/dist/worker-CULPfolw.js +3599 -0
  48. package/package.json +40 -9
  49. package/dist/cli.d.ts +0 -2
  50. package/dist/config/typeReferences/docLinkAdditions.d.ts +0 -51
  51. package/dist/config/typeReferences/globals.d.ts +0 -11
  52. package/dist/config/typeReferences/stringDocLinkAdditions.d.ts +0 -17
  53. package/dist/config/typeReferences/typeScriptGlobals.json.d.ts +0 -3
  54. package/dist/diff/index.d.ts +0 -3
  55. package/dist/diff/index.js +0 -149
  56. package/dist/ensureCemCompatibility.d.ts +0 -1
  57. package/dist/internalTypeScriptApis.d.ts +0 -31
  58. package/dist/types.d.ts +0 -22
  59. package/dist/utils/error.d.ts +0 -17
  60. package/dist/utils/jsDocHelpers.d.ts +0 -2
  61. package/dist/utils/jsDocParser.d.ts +0 -46
  62. package/dist/utils/jsDocPrinter.d.ts +0 -13
  63. package/dist/utils/print.d.ts +0 -6
package/dist/cli.js CHANGED
@@ -1,7 +1,31 @@
1
1
  #!/usr/bin/env node
2
- import { Command as i } from "@commander-js/extra-typings";
3
- const e = new i();
2
+ import { Command as p } from "@commander-js/extra-typings";
3
+ const e = new p();
4
4
  e.name("api-extractor").description("Extract public API from a TypeScript project to produce .d.ts types and api.json docs");
5
+ e.command("run").description("Generate .d.ts types and api.json API reference for a project").option("--cwd <arcgis-js-api>", "Path to the root of the project (default: process.cwd())").option("--dts <outputDirectory>", "Destination for the .d.ts files (example: dist/)").option("--api-json <outputLocation>", "Destination for the api.json file (example: dist/docs/api.json)").option("--environment <environment>", "Environment to run in (production or development) (default: production)").option("--type-check", "Run full type checking before the extraction (default: false)").option("--verify", "Run type checker on the emitted types (default: false)").option("--watch", "Watch for file changes and re-run the extraction automatically", !1).option(
6
+ "--config <configPath>",
7
+ "Path to the ./api-extractor.config.ts file. The provided path will be used as is in import(). The config file should export a `config` object of type ApiExtractorConfig (default: api-extractor.config.ts in the cwd)"
8
+ ).option(
9
+ "--silence-broken-links",
10
+ "(deprecated) Do not emit errors for broken @links in JSDoc comments. Temporary option for migration period (default: false)"
11
+ ).action(async (t) => {
12
+ const { loadApiExtractorConfig: o, mergeApiExtractorConfigs: n } = await import("./extractor/config.js"), a = await o(t.cwd, t.config), r = n(a, {
13
+ context: {
14
+ dtsEmitPath: t.dts,
15
+ apiJsonEmitPath: t.apiJson,
16
+ environment: t.environment === "development" ? "development" : void 0,
17
+ cwd: t.cwd
18
+ },
19
+ types: {
20
+ fullTypeCheck: t.typeCheck
21
+ },
22
+ verify: {
23
+ typeCheckTypes: t.verify,
24
+ detectBrokenLinks: t.silenceBrokenLinks === !0 ? !1 : void 0
25
+ }
26
+ }), { ApiExtractor: c } = await import("./extractor/ApiExtractor.js"), i = new c(r);
27
+ t.watch ? await i.watch() : await i.run();
28
+ });
5
29
  e.command("diff-types").description("Generate a types diff summary .md file").requiredOption("--original-dts <originalTypings>", "Path to the original types folder").requiredOption("--new-dts <newTypings>", "Path to the new types folder").option("--output-md <outputMd>", "Path to the output markdown file", "types-diff.md").option("--no-truncate", "Do not truncate output if it is longer than 1000 lines", !0).action(async (t) => {
6
30
  const { diffTypes: o } = await import("./diffTypes/index.js");
7
31
  await o({
@@ -0,0 +1,62 @@
1
+ /**
2
+ * We try to keep public and private types close to keep the API more
3
+ * maintainable. However, occasionally we must diverge to hide some private
4
+ * details from the public API.
5
+ *
6
+ * Use this type helper when public TypeScript type must diverge from the
7
+ * private type.
8
+ *
9
+ * @example
10
+ * ```ts
11
+ * type ActionType = PublicApiNarrowType<
12
+ * "create" | "update" | "delete",
13
+ * "create" | "delete"
14
+ * >;
15
+ * ```
16
+ *
17
+ * In private types, the 1st type parameter will be used for type checking,
18
+ * making the effective type `"create" | "update" | "delete"`.
19
+ *
20
+ * But in public `.d.ts` and public docs, the above will appear like this:
21
+ *
22
+ * ```ts
23
+ * type ActionType = "create" | "delete";
24
+ * ```
25
+ *
26
+ * Remember that properties without `public` tag are not publicly exposed.
27
+ * Thus, in practice, `PublicApiNarrowType` is most commonly needed to hide
28
+ * private union members.
29
+ *
30
+ * To ensure public type does not get out of date, `PublicApiNarrowType`
31
+ * requires that the public type extends the private type (or in other words, a
32
+ * subset of the private type). If that restriction is too tight, use
33
+ * `PublicApiRelaxType` instead.
34
+ */
35
+ export type PublicApiNarrowType<PrivateType, _PublicType extends PrivateType> = PrivateType;
36
+
37
+ /**
38
+ * Most of the time, when the public type must diverge from the private type,
39
+ * the public type is a subset of the private type - in such cases use
40
+ * `PublicApiNarrowType`.
41
+ *
42
+ * Occasionally, the public type may need to be a superset of the private type
43
+ * or even an unrelated type. For those cases, use `PublicApiRelaxType`.
44
+ *
45
+ * Keep usages of `PublicApiRelaxType` at minimum as it disables type
46
+ * checking between public and private types.
47
+ *
48
+ * @example
49
+ * ```ts
50
+ * type EditableLayers = FeatureLayer | ...;
51
+ * class MyClass {
52
+ * // Layer is a superset of EditableLayers, not subset,
53
+ * // so we must use PublicApiRelaxType.
54
+ * layer: PublicApiRelaxType<EditableLayers, Layer>;
55
+ *
56
+ * // StrictNumberType is a branded type that is incompatible
57
+ * // with regular number type.
58
+ * jobId: PublicApiRelaxType<StrictNumberType<"JobId">, number>;
59
+ * }
60
+ * ```
61
+ */
62
+ export type PublicApiRelaxType<PrivateType, _PublicType> = PrivateType;
@@ -1,6 +1,9 @@
1
- import { ApiJson } from '../apiJson.ts';
2
- import { ApiDiff } from './types.ts';
1
+ import type { ApiJson } from "../apiJson.js";
2
+ import type { ApiDiff } from "./types.js";
3
+
3
4
  /**
5
+ * @param oldApiJson
6
+ * @param newApiJson
4
7
  * @example
5
8
  * ```js
6
9
  * import { diffApiJson, fetchApiJsonFromNpm } from "@arcgis/api-extractor/diff";
@@ -20,4 +23,4 @@ import { ApiDiff } from './types.ts';
20
23
  * writeFileSync("api-diff.json", JSON.stringify(diff, null, 2));
21
24
  * ```
22
25
  */
23
- export declare function diffApiJson(oldApiJson: Pick<ApiJson, "modules">, newApiJson: Pick<ApiJson, "modules">): ApiDiff;
26
+ export function diffApiJson(oldApiJson: Pick<ApiJson, "modules">, newApiJson: Pick<ApiJson, "modules">): ApiDiff;
@@ -0,0 +1,142 @@
1
+ function M(r, a) {
2
+ const n = new Map(r.modules.map((e) => [e.path, e])), t = [];
3
+ for (const e of a.modules) {
4
+ const s = n.get(e.path), i = k(s, e, !0);
5
+ i !== void 0 && t.push(i), n.delete(e.path);
6
+ }
7
+ for (const e of n.values()) {
8
+ const s = k(void 0, e, !1);
9
+ s !== void 0 && t.push(s);
10
+ }
11
+ return { modules: t };
12
+ }
13
+ function k(r, a, n) {
14
+ const t = [], e = h(r?.declarations ?? []), s = h(a.declarations ?? []);
15
+ for (const i of s.values()) {
16
+ const o = i.at(-1), p = o.tagName, u = p ?? o.name, f = e.get(u);
17
+ e.delete(u);
18
+ const g = f === void 0 && !n ? !0 : void 0, m = n && // Only mark as deprecated if all overloads are deprecated
19
+ (i.length === 1 || i.every((d) => d.deprecated !== void 0)) ? o.deprecated : void 0, D = !m && f === void 0 && n ? !0 : void 0;
20
+ if (g || D) {
21
+ t.push({
22
+ kind: o.kind,
23
+ name: o.name,
24
+ tagName: p,
25
+ members: void 0,
26
+ removed: g,
27
+ added: D,
28
+ deprecated: m
29
+ });
30
+ continue;
31
+ } else if (!n)
32
+ continue;
33
+ if (p !== void 0) {
34
+ const d = o, c = f?.[0], l = {
35
+ kind: d.kind,
36
+ name: d.name,
37
+ tagName: d.tagName,
38
+ deprecated: m,
39
+ added: void 0,
40
+ removed: void 0,
41
+ members: b(c?.members, d.members),
42
+ events: v(c?.events, d.events),
43
+ slots: v(c?.slots, d.slots),
44
+ cssParts: v(c?.cssParts, d.cssParts),
45
+ cssProperties: v(c?.cssProperties, d.cssProperties),
46
+ cssStates: v(c?.cssStates, d.cssStates)
47
+ };
48
+ (m !== void 0 || l.members !== void 0 || l.events !== void 0 || l.slots !== void 0 || l.cssParts !== void 0 || l.cssProperties !== void 0 || l.cssStates !== void 0) && t.push(l);
49
+ } else if (o.kind === "class" || o.kind === "interface" || o.kind === "mixin") {
50
+ const d = f?.[0], c = {
51
+ kind: o.kind,
52
+ name: o.name,
53
+ deprecated: m,
54
+ added: void 0,
55
+ removed: void 0,
56
+ members: b(d?.members, o.members),
57
+ events: "events" in o ? v(d?.events, o.events) : void 0
58
+ };
59
+ (m !== void 0 || c.members !== void 0 || c.events !== void 0) && t.push(c);
60
+ } else m !== void 0 && t.push({
61
+ kind: o.kind,
62
+ name: o.name,
63
+ deprecated: m,
64
+ added: void 0,
65
+ removed: void 0
66
+ });
67
+ }
68
+ if (n)
69
+ for (const [i] of e.values())
70
+ t.push({
71
+ kind: i.kind,
72
+ name: i.name,
73
+ tagName: i.tagName,
74
+ members: void 0,
75
+ removed: !0,
76
+ added: void 0,
77
+ deprecated: void 0
78
+ });
79
+ if (t.length !== 0)
80
+ return {
81
+ path: a.path,
82
+ declarations: t
83
+ };
84
+ }
85
+ function h(r) {
86
+ const a = /* @__PURE__ */ new Map();
87
+ for (let n = 0; n < r.length; ++n) {
88
+ const t = r[n], e = t.tagName ?? t.name ?? t.kind, s = a.get(e);
89
+ s === void 0 ? a.set(e, [t]) : s.push(t);
90
+ }
91
+ return a;
92
+ }
93
+ function v(r, a) {
94
+ const n = h(r ?? []), t = [];
95
+ if (a !== void 0)
96
+ for (const e of a)
97
+ n.get(e.name) === void 0 ? t.push({
98
+ name: e.name,
99
+ added: !0
100
+ }) : e.deprecated && t.push({
101
+ name: e.name,
102
+ deprecated: e.deprecated
103
+ }), n.delete(e.name);
104
+ for (const [e] of n.values())
105
+ t.push({
106
+ name: e.name,
107
+ removed: !0
108
+ });
109
+ return t.length ? t : void 0;
110
+ }
111
+ function b(r, a) {
112
+ const n = h(r ?? []), t = h(a ?? []), e = [];
113
+ for (const [s, i] of t.entries()) {
114
+ const o = i.at(-1), p = n.get(s);
115
+ n.delete(s);
116
+ const u = (
117
+ // Only mark as deprecated if all overloads are deprecated
118
+ i.length === 1 || i.every((g) => g.deprecated !== void 0) ? o.deprecated : void 0
119
+ ), f = s === "constructor" || s === "call-signature" ? void 0 : s;
120
+ u ? e.push({
121
+ kind: o.kind,
122
+ name: f,
123
+ deprecated: u
124
+ }) : p === void 0 && e.push({
125
+ kind: o.kind,
126
+ name: f,
127
+ added: !0
128
+ });
129
+ }
130
+ for (const [s, [i]] of n.entries()) {
131
+ const o = s === "constructor" || s === "call-signature" ? void 0 : s;
132
+ e.push({
133
+ kind: i.kind,
134
+ name: o,
135
+ removed: !0
136
+ });
137
+ }
138
+ return e.length ? e : void 0;
139
+ }
140
+ export {
141
+ M as diffApiJson
142
+ };
@@ -1,7 +1,10 @@
1
- import { ApiJson } from '../apiJson.ts';
1
+ import type { ApiJson } from "../apiJson.js";
2
+
2
3
  /**
3
4
  * Read dist/docs/api.json for a given NPM package.
4
5
  *
6
+ * @param packageName
7
+ * @param semverVersion
5
8
  * @example fetchApiJsonFromNpm("@arcgis/map-components", "latest");
6
9
  */
7
- export declare function fetchApiJsonFromNpm(packageName: string, semverVersion: string): Promise<ApiJson>;
10
+ export function fetchApiJsonFromNpm(packageName: string, semverVersion: string): Promise<ApiJson>;
@@ -0,0 +1,9 @@
1
+ async function a(t, s) {
2
+ const o = await fetch(`https://unpkg.com/${t}@${s}/dist/docs/api.json`);
3
+ if (!o.ok)
4
+ throw new Error(`Failed to fetch api.json: ${o.statusText}`);
5
+ return await o.json();
6
+ }
7
+ export {
8
+ a as fetchApiJsonFromNpm
9
+ };
@@ -1,83 +1,97 @@
1
- import { ApiClassCallSignature, ApiClassConstructor, ApiClassDeclaration, ApiClassField, ApiClassMethod, ApiCustomElementDeclaration, ApiFunctionDeclaration, ApiInterfaceDeclaration, ApiMixinDeclaration, ApiModule, ApiVariableDeclaration } from '../apiJson.ts';
1
+ import type { ApiClassCallSignature, ApiClassConstructor, ApiClassDeclaration, ApiClassField, ApiClassMethod, ApiCustomElementDeclaration, ApiFunctionDeclaration, ApiInterfaceDeclaration, ApiMixinDeclaration, ApiModule, ApiVariableDeclaration } from "../apiJson.js";
2
+
2
3
  export interface ApiDiff {
3
- modules: ApiModuleDiff[];
4
+ modules: ApiModuleDiff[];
4
5
  }
6
+
5
7
  export interface ApiModuleDiff {
6
- path: ApiModule["path"];
7
- declarations: ApiDeclarationDiff[];
8
+ path: ApiModule["path"];
9
+ declarations: ApiDeclarationDiff[];
8
10
  }
11
+
9
12
  export interface ApiDiffBase {
10
- name: string;
11
- /**
12
- * True if this declaration was removed in the new api.json.
13
- * If class is removed, members are not listed.
14
- * @default false
15
- */
16
- removed?: true;
17
- /**
18
- * True if this declaration was added in the new api.json.
19
- * If class is added, members are not listed.
20
- *
21
- * @default false
22
- */
23
- added?: true;
24
- /**
25
- * Whether this declaration is deprecated in the new api.json, regardless of
26
- * whether it was deprecated in the old api.json.
27
- * If the value is a string, it's the reason for the deprecation.
28
- * Deprecated takes precedence over added.
29
- *
30
- * @default false
31
- */
32
- deprecated?: boolean | string;
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, regardless of
30
+ * whether it was deprecated in the old api.json.
31
+ * If the value is a string, it's the reason for the deprecation.
32
+ * Deprecated takes precedence over added.
33
+ *
34
+ * @default false
35
+ */
36
+ deprecated?: boolean | string;
33
37
  }
38
+
34
39
  export type ApiDeclarationDiff = ApiClassDeclarationDiff | ApiCustomElementDeclarationDiff | ApiFunctionDeclarationDiff | ApiInterfaceDeclarationDiff | ApiMixinDeclarationDiff | ApiVariableDeclarationDiff;
40
+
35
41
  export interface ApiClassDeclarationDiff extends ApiDiffBase {
36
- kind: ApiClassDeclaration["kind"];
37
- /**
38
- * Inherited members are not included in the diff.
39
- * Also, if entire class is added/removed, members are not included in the diff.
40
- */
41
- members?: ApiClassMemberDiff[];
42
- events?: ApiDiffBase[];
42
+ kind: ApiClassDeclaration["kind"];
43
+ /**
44
+ * Inherited members are not included in the diff.
45
+ * Also, if entire class is added/removed, members are not included in the diff.
46
+ */
47
+ members?: ApiClassMemberDiff[];
48
+ events?: ApiDiffBase[];
43
49
  }
50
+
44
51
  export interface ApiInterfaceDeclarationDiff extends ApiDiffBase {
45
- kind: ApiInterfaceDeclaration["kind"];
46
- /**
47
- * Inherited members are not included in the diff.
48
- * Also, if entire class is added/removed, members are not included in the diff.
49
- */
50
- members?: ApiClassMemberDiff[];
52
+ kind: ApiInterfaceDeclaration["kind"];
53
+ /**
54
+ * Inherited members are not included in the diff.
55
+ * Also, if entire class is added/removed, members are not included in the diff.
56
+ */
57
+ members?: ApiClassMemberDiff[];
51
58
  }
59
+
52
60
  export interface ApiMixinDeclarationDiff extends Omit<ApiClassDeclarationDiff, "kind"> {
53
- kind: ApiMixinDeclaration["kind"];
61
+ kind: ApiMixinDeclaration["kind"];
54
62
  }
63
+
55
64
  export interface ApiCustomElementDeclarationDiff extends ApiClassDeclarationDiff {
56
- /**
57
- * Attributes diff is not included as attributes are based on members.
58
- */
59
- tagName: ApiCustomElementDeclaration["tagName"];
60
- slots?: ApiDiffBase[];
61
- cssParts?: ApiDiffBase[];
62
- cssProperties?: ApiDiffBase[];
63
- cssStates?: ApiDiffBase[];
65
+ /** Attributes diff is not included as attributes are based on members. */
66
+ tagName: ApiCustomElementDeclaration["tagName"];
67
+ slots?: ApiDiffBase[];
68
+ cssParts?: ApiDiffBase[];
69
+ cssProperties?: ApiDiffBase[];
70
+ cssStates?: ApiDiffBase[];
64
71
  }
72
+
65
73
  export type ApiClassMemberDiff = ApiClassCallSignatureDiff | ApiClassConstructorDiff | ApiClassFieldDiff | ApiClassMethodDiff;
74
+
66
75
  export interface ApiClassFieldDiff extends ApiDiffBase {
67
- kind: ApiClassField["kind"];
76
+ kind: ApiClassField["kind"];
68
77
  }
78
+
69
79
  export interface ApiClassMethodDiff extends ApiDiffBase {
70
- kind: ApiClassMethod["kind"];
80
+ kind: ApiClassMethod["kind"];
71
81
  }
82
+
72
83
  export interface ApiClassConstructorDiff extends Omit<ApiDiffBase, "name"> {
73
- kind: ApiClassConstructor["kind"];
84
+ kind: ApiClassConstructor["kind"];
74
85
  }
86
+
75
87
  export interface ApiClassCallSignatureDiff extends Omit<ApiDiffBase, "name"> {
76
- kind: ApiClassCallSignature["kind"];
88
+ kind: ApiClassCallSignature["kind"];
77
89
  }
90
+
78
91
  export interface ApiFunctionDeclarationDiff extends ApiDiffBase {
79
- kind: ApiFunctionDeclaration["kind"];
92
+ kind: ApiFunctionDeclaration["kind"];
80
93
  }
94
+
81
95
  export interface ApiVariableDeclarationDiff extends ApiDiffBase {
82
- kind: ApiVariableDeclaration["kind"];
83
- }
96
+ kind: ApiVariableDeclaration["kind"];
97
+ }
@@ -1,24 +1,21 @@
1
- interface DiffTypesOptions {
2
- /**
3
- * Path to the original types folder.
4
- */
5
- originalDtsPath: string;
6
- /**
7
- * Path to the new types folder.
8
- */
9
- newDtsPath: string;
10
- /**
11
- * Path to the output markdown file.
12
- *
13
- * @default "types-diff.md"
14
- */
15
- outputMdPath: string;
16
- /**
17
- * Whether to truncate output if the diff is longer than 1000 lines.
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
- export declare function diffTypes({ originalDtsPath, newDtsPath, outputMdPath, truncate, }: DiffTypesOptions): Promise<void>;
24
- export {};
19
+
20
+ /** @param options */
21
+ export function diffTypes(options: DiffTypesOptions): Promise<void>;
@@ -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