@arcgis/api-extractor 4.33.0-next.16 → 4.33.0-next.160

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/apiJson.d.ts CHANGED
@@ -88,6 +88,10 @@ export type ApiJavaScriptModule = {
88
88
  path: string;
89
89
  /**
90
90
  * A markdown summary suitable for display in a listing.
91
+ *
92
+ * @remarks
93
+ * Not used by `@arcgis/api-extractor`. Preserved in typings for compatibility
94
+ * with custom-elements-manifest.
91
95
  */
92
96
  summary?: string;
93
97
  /**
@@ -176,6 +180,9 @@ export type ApiCustomElementExport = {
176
180
  * If the value is a string, it's the reason for the deprecation.
177
181
  *
178
182
  * @default false
183
+ * @remarks
184
+ * Not used by `@arcgis/api-extractor`. Preserved in typings for compatibility
185
+ * with custom-elements-manifest.
179
186
  */
180
187
  deprecated?: boolean | string;
181
188
  };
@@ -245,7 +252,7 @@ export type ApiSourceReference = {
245
252
  * these cases one `Module` should contain the `CustomElement` without a
246
253
  * tagName, and another `Module` should contain the `CustomElementExport`.
247
254
  */
248
- export type ApiCustomElementDeclaration = ApiClassDeclaration & {
255
+ export type ApiCustomElementDeclaration = Omit<ApiClassDeclaration, "members"> & {
249
256
  /**
250
257
  * An optional tag name that should be specified if this is a
251
258
  * self-registering element.
@@ -347,6 +354,10 @@ export type ApiAttribute = {
347
354
  name: string;
348
355
  /**
349
356
  * A markdown summary suitable for display in a listing.
357
+ *
358
+ * @remarks
359
+ * Not used by `@arcgis/api-extractor`. Preserved in typings for compatibility
360
+ * with custom-elements-manifest.
350
361
  */
351
362
  summary?: string;
352
363
  /**
@@ -388,6 +399,10 @@ export type ApiEvent = {
388
399
  name: string;
389
400
  /**
390
401
  * A markdown summary suitable for display in a listing.
402
+ *
403
+ * @remarks
404
+ * Not used by `@arcgis/api-extractor`. Preserved in typings for compatibility
405
+ * with custom-elements-manifest.
391
406
  */
392
407
  summary?: string;
393
408
  /**
@@ -452,6 +467,10 @@ export type ApiSlot = {
452
467
  name: string;
453
468
  /**
454
469
  * A markdown summary suitable for display in a listing.
470
+ *
471
+ * @remarks
472
+ * Not used by `@arcgis/api-extractor`. Preserved in typings for compatibility
473
+ * with custom-elements-manifest.
455
474
  */
456
475
  summary?: string;
457
476
  /**
@@ -482,6 +501,10 @@ export type ApiCssPart = {
482
501
  name: string;
483
502
  /**
484
503
  * A markdown summary suitable for display in a listing.
504
+ *
505
+ * @remarks
506
+ * Not used by `@arcgis/api-extractor`. Preserved in typings for compatibility
507
+ * with custom-elements-manifest.
485
508
  */
486
509
  summary?: string;
487
510
  /**
@@ -515,6 +538,10 @@ export type ApiCssCustomState = {
515
538
  name: string;
516
539
  /**
517
540
  * A markdown summary suitable for display in a listing.
541
+ *
542
+ * @remarks
543
+ * Not used by `@arcgis/api-extractor`. Preserved in typings for compatibility
544
+ * with custom-elements-manifest.
518
545
  */
519
546
  summary?: string;
520
547
  /**
@@ -558,6 +585,10 @@ export type ApiCssCustomProperty = {
558
585
  default?: string;
559
586
  /**
560
587
  * A markdown summary suitable for display in a listing.
588
+ *
589
+ * @remarks
590
+ * Not used by `@arcgis/api-extractor`. Preserved in typings for compatibility
591
+ * with custom-elements-manifest.
561
592
  */
562
593
  summary?: string;
563
594
  /**
@@ -645,6 +676,10 @@ export type ApiClassDeclaration = {
645
676
  name: string;
646
677
  /**
647
678
  * A markdown summary suitable for display in a listing.
679
+ *
680
+ * @remarks
681
+ * Not used by `@arcgis/api-extractor`. Preserved in typings for compatibility
682
+ * with custom-elements-manifest.
648
683
  */
649
684
  summary?: string;
650
685
  /**
@@ -735,6 +770,10 @@ export type ApiPropertyLike = {
735
770
  name: string;
736
771
  /**
737
772
  * A markdown summary suitable for display in a listing.
773
+ *
774
+ * @remarks
775
+ * Not used by `@arcgis/api-extractor`. Preserved in typings for compatibility
776
+ * with custom-elements-manifest.
738
777
  */
739
778
  summary?: string;
740
779
  /**
@@ -817,16 +856,15 @@ export type ApiCustomElementField = ApiClassField & {
817
856
  */
818
857
  docsTags?: ApiDocsTag[];
819
858
  /**
820
- * Whether field has both getter and setter, and their types are different.
821
- * The actual getter type is not included in the api.json at the moment, but
822
- * can be added if that information is needed.
859
+ * If getter type differs from setter type, this property will
860
+ * contain the getter type.
823
861
  *
824
- * @default false
862
+ * @default undefined
825
863
  *
826
864
  * @remarks
827
865
  * Not present in vanilla custom-elements-manifest.
828
866
  */
829
- getterTypeDiffers?: boolean;
867
+ getterType?: Pick<ApiType, "text">;
830
868
  /**
831
869
  * For some properties, we show them as read-only in the docs and in the
832
870
  * typings but don't actually enforce read-only at runtime.
@@ -997,6 +1035,10 @@ export type ApiFunctionLike = {
997
1035
  name: string;
998
1036
  /**
999
1037
  * A markdown summary suitable for display in a listing.
1038
+ *
1039
+ * @remarks
1040
+ * Not used by `@arcgis/api-extractor`. Preserved in typings for compatibility
1041
+ * with custom-elements-manifest.
1000
1042
  */
1001
1043
  summary?: string;
1002
1044
  /**
@@ -1018,6 +1060,10 @@ export type ApiFunctionLike = {
1018
1060
  type?: ApiType;
1019
1061
  /**
1020
1062
  * A markdown summary suitable for display in a listing.
1063
+ *
1064
+ * @remarks
1065
+ * Not used by `@arcgis/api-extractor`. Preserved in typings for compatibility
1066
+ * with custom-elements-manifest.
1021
1067
  */
1022
1068
  summary?: string;
1023
1069
  /**
@@ -1032,11 +1078,6 @@ export type ApiFunctionLike = {
1032
1078
  * with custom-elements-manifest.
1033
1079
  */
1034
1080
  export type ApiPrivacy = "private" | "protected" | "public";
1035
- /**
1036
- * @remarks
1037
- * Not used by `@arcgis/api-extractor`. Preserved in typings for compatibility
1038
- * with custom-elements-manifest.
1039
- */
1040
1081
  export type ApiDemo = {
1041
1082
  /**
1042
1083
  * A markdown description of the demo.
@@ -1,5 +1,6 @@
1
- import type { ApiDeclaration, ApiExport, ApiJson, ApiModule } from "../apiJson";
2
- import ts from "typescript";
1
+ import { ApiClassMethod, ApiCustomElementDeclaration, ApiCustomElementField, ApiDeclaration, ApiEvent, ApiExport, ApiJson, ApiModule } from '../apiJson';
2
+ import { default as ts } from 'typescript';
3
+ import { CopyPropertyDoc, CopyMethodDoc, CopyEventDoc } from '../types';
3
4
  export type ApiExtractorOptions = {
4
5
  /**
5
6
  * Whether to extract full API information, with type-checking. This should be
@@ -39,4 +40,7 @@ export declare abstract class ApiExtractor {
39
40
  * Infer ApiExport based on ApiDeclaration
40
41
  */
41
42
  protected abstract inferExport(declaration: ApiDeclaration): ApiExport | undefined;
43
+ copyDoc(copyDocDefinition: CopyPropertyDoc | undefined, property: ApiCustomElementField, component: ApiCustomElementDeclaration): void;
44
+ copyDoc(copyDocDefinition: CopyMethodDoc | undefined, method: ApiClassMethod, component: ApiCustomElementDeclaration): void;
45
+ copyDoc(copyDocDefinition: CopyEventDoc | undefined, event: ApiEvent, component: ApiCustomElementDeclaration): void;
42
46
  }
package/dist/index.d.ts CHANGED
@@ -1,4 +1,6 @@
1
- export { ApiExtractor, type ApiExtractorOptions } from "./extractor";
2
- export type * from "./apiJson";
3
- export { hasIgnoredModifier, setDefaultFromInitializer, getMemberName } from "./utils/astHelpers";
4
- export { isApiMethod, isApiProperty, globalPackageIdentifier } from "./utils/apiHelpers";
1
+ export { ApiExtractor, type ApiExtractorOptions } from './extractor';
2
+ export type * from './apiJson';
3
+ export { hasIgnoredModifier, setDefaultFromInitializer, getMemberName, findDecorator } from './utils/astHelpers';
4
+ export { isApiMethod, isApiProperty, globalPackageIdentifier, multipleJsDocTags } from './utils/apiHelpers';
5
+ export type { CopyDocDefinitions } from './types';
6
+ export { symbolToDocs, apiMemberToSynthesizedComments, setApiDocFromJsDoc } from './utils/docHelpers';
package/dist/index.js CHANGED
@@ -1,141 +1,242 @@
1
- // package.json
2
- var name = "@arcgis/api-extractor";
3
- var version = "4.33.0-next.16";
4
-
5
- // src/extractor/index.ts
6
- import ts from "typescript";
7
-
8
- // src/utils/apiHelpers.ts
9
- var isApiMethod = (member) => member.kind === "method";
10
- var isApiProperty = (member) => member.kind === "field";
11
- function naturalSortModules(left, right) {
12
- const leftSplit = left.path.split("/");
13
- const leftName = leftSplit.pop();
14
- const leftDirectories = leftSplit.join("/");
15
- const rightSplit = right.path.split("/");
16
- const rightName = rightSplit.pop();
17
- const rightDirectories = rightSplit.join("/");
18
- if (leftDirectories === rightDirectories) {
19
- return leftName < rightName ? -1 : 1;
20
- } else if (leftDirectories.startsWith(rightDirectories)) {
21
- return 1;
22
- } else if (rightDirectories.startsWith(leftDirectories)) {
23
- return -1;
24
- } else {
25
- return leftDirectories < rightDirectories ? -1 : 1;
26
- }
1
+ import a from "typescript";
2
+ import { path as x } from "@arcgis/components-build-utils";
3
+ import { mappedFind as m } from "@arcgis/components-utils";
4
+ const h = "@arcgis/api-extractor", g = "4.33.0-next.160", j = (e) => e.kind === "method", A = (e) => e.kind === "field";
5
+ function v(e, s) {
6
+ const t = e.path.split("/"), n = t.pop(), i = t.join("/"), o = s.path.split("/"), c = o.pop(), r = o.join("/");
7
+ return i === r ? n < c ? -1 : 1 : i.startsWith(r) ? 1 : r.startsWith(i) || i < r ? -1 : 1;
27
8
  }
28
- var globalPackageIdentifier = "global:";
29
-
30
- // src/extractor/index.ts
31
- import { path } from "@arcgis/components-build-utils";
32
- var ApiExtractor = class {
33
- constructor(options) {
34
- this.options = options;
9
+ const C = "global:", T = /* @__PURE__ */ new Set([
10
+ "example",
11
+ "see",
12
+ "param",
13
+ "property",
14
+ "throws",
15
+ "slot",
16
+ "csspart",
17
+ "cssstate"
18
+ ]);
19
+ class F {
20
+ constructor(s) {
21
+ this.options = s;
35
22
  }
36
23
  /** Given an array of TypeScript source files, generate an api.json file */
37
- extract(files) {
24
+ extract(s) {
38
25
  return {
39
26
  timestamp: (/* @__PURE__ */ new Date()).toISOString().split(".")[0],
40
27
  compiler: {
41
- name,
42
- version,
43
- typescriptVersion: ts.version
28
+ name: h,
29
+ version: g,
30
+ typescriptVersion: a.version
44
31
  },
45
32
  schemaVersion: "1.0.0",
46
- modules: this.extractModules(files)
33
+ modules: this.extractModules(s)
47
34
  };
48
35
  }
49
- extractModules(files) {
50
- const modules = [];
51
- for (const file of files) {
52
- this.file = file;
53
- modules.push(this.extractModule(file));
54
- }
55
- if (this.options.isFullApiExtraction) {
56
- modules.sort(naturalSortModules);
57
- }
58
- return modules;
36
+ extractModules(s) {
37
+ const t = [];
38
+ for (const n of s)
39
+ this.file = n, t.push(this.extractModule(n));
40
+ return this.options.isFullApiExtraction && t.sort(v), t;
59
41
  }
60
- extractModule(module) {
61
- const apiModule = {
42
+ extractModule(s) {
43
+ const t = {
62
44
  kind: "javascript-module",
63
- path: path.relative(this.options.cwd, module.fileName),
45
+ path: x.relative(this.options.cwd, s.fileName),
64
46
  declarations: void 0,
65
47
  exports: void 0
66
48
  };
67
- this.apiModule = apiModule;
68
- const declarations = this.extractDeclarations(module);
69
- apiModule.declarations = declarations;
70
- if (this.options.isFullApiExtraction) {
71
- const exports = this.inferExports(declarations);
72
- if (exports.length > 0) {
73
- apiModule.exports = exports;
74
- }
49
+ this.apiModule = t;
50
+ const n = this.extractDeclarations(s);
51
+ if (t.declarations = n, this.options.isFullApiExtraction) {
52
+ const i = this.inferExports(n);
53
+ i.length > 0 && (t.exports = i);
75
54
  }
76
- return apiModule;
55
+ return t;
77
56
  }
78
57
  /**
79
58
  * For a given module, extract all public declarations.
80
59
  */
81
- extractDeclarations(module) {
82
- const declarations = [];
83
- for (const statement of module.statements) {
84
- const declaration = this.extractDeclaration(statement);
85
- if (declaration !== void 0) {
86
- declarations.push(declaration);
87
- }
60
+ extractDeclarations(s) {
61
+ const t = [];
62
+ for (const n of s.statements) {
63
+ const i = this.extractDeclaration(n);
64
+ i !== void 0 && t.push(i);
88
65
  }
89
- return declarations;
66
+ return t;
90
67
  }
91
68
  /**
92
69
  * Infer ApiModule.exports based on ApiModule.declarations.
93
70
  */
94
- inferExports(declarations) {
95
- const exports = [];
96
- for (const declaration of declarations) {
97
- const exported = this.inferExport(declaration);
98
- if (exported !== void 0) {
99
- exports.push(exported);
100
- }
71
+ inferExports(s) {
72
+ const t = [];
73
+ for (const n of s) {
74
+ const i = this.inferExport(n);
75
+ i !== void 0 && t.push(i);
101
76
  }
102
- return exports;
77
+ return t;
103
78
  }
104
- };
79
+ copyDoc(s, t, n) {
80
+ const i = t.docsTags?.findIndex((r) => r.name === "copyDoc");
81
+ if (i === void 0 || i === -1)
82
+ return;
83
+ if (s === void 0)
84
+ throw Error(
85
+ `The ${t.name} ${"kind" in t ? t.kind : "event"} in ${n.name} has @copyDoc tag, but failed to find copyDoc definition for it.`
86
+ );
87
+ const o = s?.(t, n);
88
+ if (o === void 0)
89
+ return;
90
+ for (const [r, d] of Object.entries(o))
91
+ r !== "docsTags" && (t[r] = t[r] ?? d);
92
+ t.docsTags.splice(i, 1);
93
+ const c = new Set(t.docsTags.map(({ name: r }) => r));
94
+ for (const r of o.docsTags ?? [])
95
+ c.has(r.name) && !T.has(r.name) || t.docsTags.push(r);
96
+ t.docsTags.length === 0 && (t.docsTags = void 0);
97
+ }
98
+ }
99
+ const N = (e) => e.modifiers?.some?.(
100
+ (s) => s.kind === a.SyntaxKind.StaticKeyword || s.kind === a.SyntaxKind.PrivateKeyword || s.kind === a.SyntaxKind.ProtectedKeyword
101
+ ) ?? !1;
102
+ function O(e, s, t) {
103
+ if (!s.default && "initializer" in e && e.initializer) {
104
+ const n = u(e.initializer);
105
+ y(n) && (s.default = n.getText(t));
106
+ }
107
+ }
108
+ const y = (e) => a.isLiteralExpression(e) || e.kind === a.SyntaxKind.TrueKeyword || e.kind === a.SyntaxKind.FalseKeyword || a.isPrefixUnaryExpression(e) && a.isLiteralExpression(e.operand);
109
+ function u(e) {
110
+ return a.isSatisfiesExpression(e) || a.isParenthesizedExpression(e) ? u(e.expression) : e;
111
+ }
112
+ function b(e) {
113
+ if (e !== void 0 && (a.isIdentifier(e) || a.isStringLiteralLike(e)))
114
+ return e.text;
115
+ }
116
+ const W = ({ modifiers: e = [] }, s) => m(
117
+ e,
118
+ (t) => a.isDecorator(t) && a.isCallExpression(t.expression) && a.isIdentifier(t.expression.expression) && t.expression.expression.text === s ? t.expression : void 0
119
+ );
120
+ function S(e, s) {
121
+ const t = $(s.getJsDocTags());
122
+ let n = a.displayPartsToString(s.getDocumentationComment(e));
123
+ const i = t.at(-1), o = i?.text?.indexOf(k);
124
+ if (o !== void 0 && o !== -1) {
125
+ const c = i.text.indexOf(D);
126
+ c !== -1 && (n += i.text.slice(c), i.text = i.text?.slice(0, c));
127
+ }
128
+ return {
129
+ docsTags: t,
130
+ description: n || void 0
131
+ };
132
+ }
133
+ const D = `
105
134
 
106
- // src/utils/astHelpers.ts
107
- import ts2 from "typescript";
108
- var hasIgnoredModifier = (member) => member.modifiers?.some?.(
109
- (modifier) => modifier.kind === ts2.SyntaxKind.StaticKeyword || modifier.kind === ts2.SyntaxKind.PrivateKeyword || modifier.kind === ts2.SyntaxKind.ProtectedKeyword
110
- ) ?? false;
111
- function setDefaultFromInitializer(node, property, sourceFile) {
112
- if (!property.default && "initializer" in node && node.initializer) {
113
- const unpacked = unpackInitializer(node.initializer);
114
- if (isDefaultValueDocumentationEligible(unpacked)) {
115
- property.default = unpacked.getText(sourceFile);
135
+ {@link `, k = "Read more...}", $ = (e) => e.map((s) => ({
136
+ name: s.name,
137
+ text: s.text?.map((t) => t.text).join("")
138
+ }));
139
+ function J(e) {
140
+ const s = Array.from(e.docsTags ?? []), t = e, n = e;
141
+ if (e.deprecated && s.push({
142
+ name: "deprecated",
143
+ text: e.deprecated === !0 ? void 0 : e.deprecated
144
+ }), t.default && s.push({
145
+ name: "default",
146
+ text: t.default
147
+ }), n.cssParts)
148
+ for (const o of n.cssParts)
149
+ s.push({
150
+ name: "csspart",
151
+ text: f(o)
152
+ });
153
+ if (n.cssStates)
154
+ for (const o of n.cssStates)
155
+ s.push({
156
+ name: "cssstate",
157
+ text: f(o)
158
+ });
159
+ if (n.slots)
160
+ for (const o of n.slots)
161
+ s.push({
162
+ name: "slot",
163
+ text: f(o)
164
+ });
165
+ n.privacy === "private" && s.push({
166
+ name: "private",
167
+ text: void 0
168
+ });
169
+ const i = e.description ?? "";
170
+ return s.length === 0 && i.length === 0 ? [] : [E(i, s)];
171
+ }
172
+ function E(e = "", s = []) {
173
+ return {
174
+ kind: a.SyntaxKind.MultiLineCommentTrivia,
175
+ pos: -1,
176
+ end: -1,
177
+ text: I(e, s),
178
+ hasTrailingNewLine: !0
179
+ };
180
+ }
181
+ function I(e = "", s = []) {
182
+ const t = e === "" ? [] : e.split(`
183
+ `), i = t.length + s.length > 1 || (s.at(0)?.text?.includes(`
184
+ `) ?? !1);
185
+ return `*${i ? t.map((o) => `
186
+ * ${o}`).join("") : ` ${e}`}${t.length > 0 && s.length > 0 ? `
187
+ *` : ""}${s.map((o) => {
188
+ const c = `@${o.name}`, r = o.text ?? "", d = o.text?.includes(`
189
+ `) ?? !1;
190
+ return `${i ? `
191
+ * ` : ""}${c}${d ? r.split(`
192
+ `).map((p) => `
193
+ * ${p}`).join("") : r.length > 0 ? ` ${r}` : ""}`;
194
+ }).join("")}${i ? `
195
+ ` : ""} `;
196
+ }
197
+ function V(e, s, t, n) {
198
+ const i = s.getSymbolAtLocation(e);
199
+ if (n ??= i === void 0 ? void 0 : S(s, i), n !== void 0) {
200
+ for (const o of n.docsTags) {
201
+ const { name: c, text: r } = o;
202
+ c === "deprecated" ? t.deprecated = r || !0 : c === "default" ? t.default = r : c === "readonly" ? t.readonly = !0 : c === "private" ? t.privacy = "private" : c === "csspart" ? t.cssParts.push(l(r)) : c === "cssstate" ? t.cssStates.push(l(r)) : c === "slot" ? t.slots.push(l(r)) : (t.docsTags ??= [], t.docsTags.push(o));
116
203
  }
204
+ t.description = n.description;
117
205
  }
118
206
  }
119
- var isDefaultValueDocumentationEligible = (initializer) => ts2.isLiteralExpression(initializer) || initializer.kind === ts2.SyntaxKind.TrueKeyword || initializer.kind === ts2.SyntaxKind.FalseKeyword || ts2.isPrefixUnaryExpression(initializer) && ts2.isLiteralExpression(initializer.operand);
120
- function unpackInitializer(expression) {
121
- if (ts2.isSatisfiesExpression(expression) || ts2.isParenthesizedExpression(expression)) {
122
- return unpackInitializer(expression.expression);
123
- } else {
124
- return expression;
207
+ function l(e) {
208
+ if (e === void 0)
209
+ return { name: "" };
210
+ const s = e.indexOf(" - ");
211
+ if (s === -1)
212
+ return e.startsWith("- ") ? { name: "", description: e.slice(2) } : { name: e };
213
+ let t, n = e.slice(0, s);
214
+ if (n.startsWith("[") && n.endsWith("]")) {
215
+ const o = n.slice(1, -1), c = o.indexOf("=");
216
+ n = o.slice(0, c), t = o.slice(c + 1);
125
217
  }
218
+ const i = e.slice(s + 3);
219
+ return {
220
+ name: n,
221
+ default: t,
222
+ description: i
223
+ };
126
224
  }
127
- function getMemberName(name2) {
128
- if (ts2.isIdentifier(name2) || ts2.isStringLiteralLike(name2)) {
129
- return name2.text;
130
- }
131
- return void 0;
225
+ function f(e) {
226
+ const s = e.name + (e.default !== void 0 ? `=${e.default}` : ""), t = s.length > 0 ? `[${s}]` : "", n = e.description ?? "", i = n.length > 0 ? ` - ${n}` : "";
227
+ return `${t}${i}`;
132
228
  }
133
229
  export {
134
- ApiExtractor,
135
- getMemberName,
136
- globalPackageIdentifier,
137
- hasIgnoredModifier,
138
- isApiMethod,
139
- isApiProperty,
140
- setDefaultFromInitializer
230
+ F as ApiExtractor,
231
+ J as apiMemberToSynthesizedComments,
232
+ W as findDecorator,
233
+ b as getMemberName,
234
+ C as globalPackageIdentifier,
235
+ N as hasIgnoredModifier,
236
+ j as isApiMethod,
237
+ A as isApiProperty,
238
+ T as multipleJsDocTags,
239
+ V as setApiDocFromJsDoc,
240
+ O as setDefaultFromInitializer,
241
+ S as symbolToDocs
141
242
  };
@@ -0,0 +1,25 @@
1
+ import { ApiCustomElementField, ApiCustomElementDeclaration, ApiClassMethod, ApiEvent } from './apiJson';
2
+ /**
3
+ * @example
4
+ * ```ts
5
+ * {
6
+ * properties: {
7
+ * // You only need to return the fields you wish to modify.
8
+ * autoDestroyDisabled: () => ({
9
+ * description: `If true, the component will not be destroyed automatically when it is
10
+ * disconnected from the document. This is useful when you want to move the
11
+ * component to a different place on the page, or temporarily hide it. If this
12
+ * is set, make sure to call the {@link #destroy} method when you are done to
13
+ * prevent memory leaks.`,
14
+ * }),
15
+ * },
16
+ * }
17
+ */
18
+ export type CopyDocDefinitions = {
19
+ properties?: Record<string, CopyPropertyDoc | undefined>;
20
+ methods?: Record<string, CopyMethodDoc | undefined>;
21
+ events?: Record<string, CopyEventDoc | undefined>;
22
+ };
23
+ export type CopyPropertyDoc = (property: ApiCustomElementField, component: ApiCustomElementDeclaration) => Partial<ApiCustomElementField> | undefined;
24
+ export type CopyMethodDoc = (method: ApiClassMethod, component: ApiCustomElementDeclaration) => Partial<ApiClassMethod> | undefined;
25
+ export type CopyEventDoc = (event: ApiEvent, component: ApiCustomElementDeclaration) => Partial<ApiEvent> | undefined;
@@ -1,4 +1,4 @@
1
- import type { ApiClassMember, ApiClassMethod, ApiCustomElementField, ApiModule } from "../apiJson";
1
+ import { ApiClassMember, ApiClassMethod, ApiCustomElementField, ApiModule } from '../apiJson';
2
2
  export declare const isApiMethod: (member: ApiClassMember) => member is ApiClassMethod;
3
3
  export declare const isApiProperty: (member: ApiClassMember) => member is ApiCustomElementField;
4
4
  /**
@@ -20,3 +20,4 @@ export declare function naturalSortModules(left: ApiModule, right: ApiModule): n
20
20
  * This is not made up by us - defined in the custom-elements-manifest spec
21
21
  */
22
22
  export declare const globalPackageIdentifier = "global:";
23
+ export declare const multipleJsDocTags: Set<string>;
@@ -1,9 +1,15 @@
1
- import ts from "typescript";
2
- import type { ApiPropertyLike } from "../apiJson";
1
+ import { default as ts } from 'typescript';
2
+ import { ApiPropertyLike } from '../apiJson';
3
+ /**
4
+ * Check if a member has a static, private, or protected modifier.
5
+ */
3
6
  export declare const hasIgnoredModifier: (member: ts.ClassElement) => boolean;
4
7
  export declare function setDefaultFromInitializer(node: ts.AccessorDeclaration | ts.PropertyDeclaration, property: ApiPropertyLike, sourceFile: ts.SourceFile): void;
5
8
  /**
6
9
  * Convert property name node into a string. Converts Identifier and
7
10
  * StringLiteralLike nodes. The rest return undefined.
8
11
  */
9
- export declare function getMemberName(name: ts.PropertyName): string | undefined;
12
+ export declare function getMemberName(name?: ts.PropertyName): string | undefined;
13
+ export declare const findDecorator: ({ modifiers }: {
14
+ modifiers?: readonly ts.ModifierLike[];
15
+ }, name: string) => ts.CallExpression | undefined;
@@ -0,0 +1,9 @@
1
+ import { default as ts } from 'typescript';
2
+ import { ApiCustomElementField, ApiCustomElementDeclaration, ApiEvent, ApiDocsTag, ApiCustomElementMember } from '../apiJson';
3
+ export declare function symbolToDocs(checker: ts.TypeChecker, symbol: ts.Signature | ts.Symbol): {
4
+ description: ApiCustomElementField["description"];
5
+ docsTags: ApiDocsTag[];
6
+ };
7
+ export declare const internalJsDocTag = "internal";
8
+ export declare function apiMemberToSynthesizedComments(apiMember: ApiCustomElementDeclaration | ApiCustomElementMember | ApiEvent): ts.SynthesizedComment[];
9
+ export declare function setApiDocFromJsDoc(node: ts.PropertyName, checker: ts.TypeChecker, api: Partial<Pick<ApiCustomElementDeclaration, "cssParts" | "cssProperties" | "cssStates" | "slots"> & Pick<ApiCustomElementField, "default" | "deprecated" | "description" | "docsTags" | "privacy" | "readonly">>, docs?: ReturnType<typeof symbolToDocs>): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/api-extractor",
3
- "version": "4.33.0-next.16",
3
+ "version": "4.33.0-next.160",
4
4
  "type": "module",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",
@@ -14,9 +14,9 @@
14
14
  ],
15
15
  "license": "SEE LICENSE IN LICENSE.md",
16
16
  "dependencies": {
17
- "@arcgis/components-build-utils": "4.33.0-next.16",
18
- "@arcgis/components-utils": "4.33.0-next.16",
19
- "tslib": "^2.7.0",
20
- "typescript": "~5.6.3"
17
+ "@arcgis/components-build-utils": "4.33.0-next.160",
18
+ "@arcgis/components-utils": "4.33.0-next.160",
19
+ "tslib": "^2.8.1",
20
+ "typescript": "~5.8.3"
21
21
  }
22
22
  }