@arcgis/api-extractor 5.0.0-next.136 → 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/apiJson.d.ts CHANGED
@@ -4,157 +4,154 @@
4
4
  * `api.json` is a superset of custom-elements-manifest.
5
5
  *
6
6
  * @see https://custom-elements-manifest.open-wc.org/analyzer/getting-started/
7
- * @privateRemarks
8
- * PERF: when most code is moved from jsapi-extractor into api-extractor, replace
9
- * ? with |undefined here to ensure more consistent shape.
10
7
  */
11
8
  export interface ApiJson {
12
- /**
13
- * The timestamp at which the metadata was generated, in the format
14
- * `YYYY-MM-DDThh:mm:ss`.
15
- *
16
- * @example "2000-00-00T00:00:00"
17
- *
18
- * @remarks
19
- * Not present in vanilla custom-elements-manifest.
20
- */
21
- timestamp: string;
22
- /**
23
- * @remarks
24
- * Not present in vanilla custom-elements-manifest.
25
- */
26
- compiler: ApiJsonCompiler;
27
- /**
28
- * The version of the schema used in this file.
29
- *
30
- * @example "1.0.0"
31
- */
32
- schemaVersion: string;
33
- /**
34
- * The Markdown to use for the main readme of this package.
35
- *
36
- * This can be used to override the readme used by Github or npm if that file
37
- * contains information irrelevant to custom element catalogs and
38
- * documentation viewers.
39
- *
40
- * @deprecated
41
- * Not used by `@arcgis/api-extractor`. Preserved in typings for compatibility
42
- * with custom-elements-manifest.
43
- */
44
- readme?: string;
45
- /**
46
- * An array of the modules this package contains.
47
- *
48
- * The modules should be public entrypoints that other packages may import
49
- * from.
50
- */
51
- modules: ApiModule[];
52
- /**
53
- * Whether the package is deprecated.
54
- * If the value is a string, it's the reason for the deprecation.
55
- *
56
- * @default false
57
- *
58
- * @deprecated
59
- * Not used by `@arcgis/api-extractor`. Preserved in typings for compatibility
60
- * with custom-elements-manifest.
61
- */
62
- deprecated?: string | true;
63
- }
9
+ /**
10
+ * The timestamp at which the api.json was generated, in the format
11
+ * `YYYY-MM-DDThh:mm:ss`.
12
+ *
13
+ * > Not present in vanilla custom-elements-manifest.
14
+ *
15
+ * @example "2000-00-00T00:00:00"
16
+ */
17
+ timestamp: string;
18
+ /** > Not present in vanilla custom-elements-manifest. */
19
+ compiler: ApiJsonCompiler;
20
+ /**
21
+ * The version of the schema used in this file.
22
+ *
23
+ * @example "1.0.0"
24
+ */
25
+ schemaVersion: string;
26
+ /**
27
+ * The Markdown to use for the main readme of this package.
28
+ *
29
+ * This can be used to override the readme used by Github or npm if that file
30
+ * contains information irrelevant to custom element catalogs and
31
+ * documentation viewers.
32
+ *
33
+ * @deprecated
34
+ * Not used by `@arcgis/api-extractor`. Preserved in types for compatibility
35
+ * with custom-elements-manifest.
36
+ */
37
+ readme?: string;
38
+ /**
39
+ * An array of the modules this package contains.
40
+ *
41
+ * The modules should be public entrypoints that other packages may import
42
+ * from.
43
+ */
44
+ modules: ApiModule[];
45
+ /**
46
+ * Whether the package is deprecated.
47
+ * If the value is a string, it's the reason for the deprecation.
48
+ *
49
+ * @deprecated
50
+ * Not used by `@arcgis/api-extractor`. Preserved in types for compatibility
51
+ * with custom-elements-manifest.
52
+ * @default false
53
+ */
54
+ deprecated?: string | true;
55
+ }
56
+
64
57
  export interface ApiJsonCompiler {
65
- /**
66
- * The name of the compiler that generated the metadata.
67
- *
68
- * @example "@arcgis/api-extractor"
69
- */
70
- name: string;
71
- /**
72
- * The version of the compiler that generated the metadata.
73
- *
74
- * @example "4.32.0"
75
- */
76
- version: string;
77
- /**
78
- * The version of TypeScript that was used to generate the metadata.
79
- *
80
- * @example "5.4.5"
81
- */
82
- typescriptVersion: string;
83
- }
58
+ /**
59
+ * The name of the compiler that generated the metadata.
60
+ *
61
+ * @example "@arcgis/api-extractor"
62
+ */
63
+ name: string;
64
+ /**
65
+ * The version of the compiler that generated the metadata.
66
+ *
67
+ * @example "4.32.0"
68
+ */
69
+ version: string;
70
+ /**
71
+ * The version of TypeScript that was used to generate the metadata.
72
+ *
73
+ * @example "5.4.5"
74
+ */
75
+ typescriptVersion: string;
76
+ }
77
+
84
78
  export type ApiModule = ApiJavaScriptModule;
79
+
85
80
  export interface ApiJavaScriptModule extends ApiWithDescription, ApiWithDocsTags, ApiWithUnusedSummary {
86
- kind: "javascript-module";
87
- /**
88
- * Public import path for the module
89
- *
90
- * @example "components/arcgis-map"
91
- */
92
- path: string;
93
- /**
94
- * The original source file path, relative to extraction root (most commonly
95
- * src/ folder).
96
- *
97
- * @example "components/map/map.tsx"
98
- *
99
- * @remarks
100
- * Not present in vanilla custom-elements-manifest.
101
- */
102
- sourcePath: string;
103
- /**
104
- * The declarations of a module.
105
- *
106
- * For documentation purposes, all declarations that are reachable from
107
- * exports should be described here. Ie, functions and objects that may be
108
- * properties of exported objects, or passed as arguments to functions.
109
- */
110
- declarations: ApiDeclaration[];
111
- /**
112
- * The exports of a module. This includes JavaScript exports and
113
- * custom element definitions.
114
- */
115
- exports?: ApiExport[];
116
- /**
117
- * Whether the module is deprecated.
118
- * If the value is a string, it's the reason for the deprecation.
119
- *
120
- * @remarks
121
- * If module is marked as deprecated, all its declarations should also be
122
- * marked as deprecated. This is because in TypeScript, a usage of a
123
- * declaration will only be marked as deprecated if the declaration itself
124
- * is marked as deprecated, rather than its module.
125
- *
126
- * @default false
127
- */
128
- deprecated?: string | true;
129
- }
81
+ kind: "javascript-module";
82
+ /**
83
+ * Public import path for the module. If package.json "exports" was used, this
84
+ * is the import path, not the .d.ts file path.
85
+ *
86
+ * @example "components/arcgis-map"
87
+ */
88
+ path: string;
89
+ /**
90
+ * The original source file path, relative to extraction root (most commonly
91
+ * src/ folder).
92
+ *
93
+ * > Not present in vanilla custom-elements-manifest.
94
+ *
95
+ * @example "components/map/map.tsx"
96
+ */
97
+ sourcePath: string;
98
+ /**
99
+ * Whether the module is deprecated.
100
+ * If the value is a string, it's the reason for the deprecation.
101
+ *
102
+ * If module is marked as deprecated, all its declarations should also be
103
+ * marked as deprecated. This is because in TypeScript, a usage of a
104
+ * declaration will only be marked as deprecated if the declaration itself
105
+ * is marked as deprecated, rather than its module.
106
+ *
107
+ * @default false
108
+ */
109
+ deprecated?: string | true;
110
+ /**
111
+ * The declarations of a module.
112
+ *
113
+ * For documentation purposes, all declarations that are reachable from
114
+ * exports should be described here. Ie, functions and objects that may be
115
+ * properties of exported objects, or passed as arguments to functions.
116
+ */
117
+ declarations: ApiDeclaration[];
118
+ /**
119
+ * The exports of a module. This includes JavaScript exports and
120
+ * custom element definitions.
121
+ */
122
+ exports?: ApiExport[];
123
+ }
124
+
130
125
  export interface ApiWithDescription {
131
- /**
132
- * A markdown description of an api node
133
- */
134
- description?: string;
126
+ /** A markdown description of an api node */
127
+ description?: string;
135
128
  }
129
+
136
130
  export interface ApiWithDocsTags {
137
- docsTags?: ApiDocsTag[];
131
+ docsTags?: ApiDocsTag[];
138
132
  }
133
+
139
134
  export interface ApiWithDeprecated {
140
- /**
141
- * Whether the node is deprecated.
142
- * If the value is a string, it's the reason for the deprecation.
143
- *
144
- * @default false
145
- */
146
- deprecated?: string | true;
147
- }
135
+ /**
136
+ * Whether the node is deprecated.
137
+ * If the value is a string, it's the reason for the deprecation.
138
+ *
139
+ * @default false
140
+ */
141
+ deprecated?: string | true;
142
+ }
143
+
148
144
  export interface ApiWithUnusedSummary {
149
- /**
150
- * A markdown summary suitable for display in a listing.
151
- *
152
- * @deprecated
153
- * Not used by `@arcgis/api-extractor`. Preserved in typings for compatibility
154
- * with custom-elements-manifest.
155
- */
156
- summary?: string;
157
- }
145
+ /**
146
+ * A markdown summary suitable for display in a listing.
147
+ *
148
+ * @deprecated
149
+ * Not used by `@arcgis/api-extractor`. Preserved in types for compatibility
150
+ * with custom-elements-manifest.
151
+ */
152
+ summary?: string;
153
+ }
154
+
158
155
  /**
159
156
  * A descriptor for a single JSDoc tag found in a block comment.
160
157
  *
@@ -163,63 +160,66 @@ export interface ApiWithUnusedSummary {
163
160
  * "docsTags".
164
161
  */
165
162
  export interface ApiDocsTag {
166
- /**
167
- * The tag name (immediately following the '@').
168
- *
169
- * @example "since"
170
- */
171
- name: string;
172
- /**
173
- * The description that immediately follows the tag name.
174
- *
175
- * @example "4.31"
176
- */
177
- text?: string;
178
- }
163
+ /**
164
+ * The tag name (immediately following the '@').
165
+ *
166
+ * @example "since"
167
+ */
168
+ name: string;
169
+ /**
170
+ * The description that immediately follows the tag name.
171
+ *
172
+ * @example "4.31"
173
+ */
174
+ text?: string;
175
+ }
176
+
179
177
  export type ApiExport = ApiCustomElementExport | ApiJavaScriptExport | ApiTypeScriptExport;
178
+
180
179
  export interface ApiJavaScriptExport {
181
- kind: "js";
182
- /**
183
- * The name of the exported symbol.
184
- *
185
- * JavaScript has a number of ways to export objects which determine the
186
- * correct name to use.
187
- *
188
- * - Default exports must use the name "default".
189
- * - Named exports use the name that is exported. If the export is renamed
190
- * with the "as" clause, use the exported name.
191
- * - Aggregating exports (`* from`) should use the name `*`
192
- */
193
- name: string;
194
- /**
195
- * A reference to the exported declaration.
196
- *
197
- * In the case of aggregating exports, the reference's `module` field must be
198
- * defined and the `name` field must be `"*"`.
199
- */
200
- declaration: ApiReference;
201
- /**
202
- * Whether the export is deprecated. For example, the name of the export was changed.
203
- * If the value is a string, it's the reason for the deprecation.
204
- *
205
- * @default false
206
- * @deprecated
207
- * Not used by `@arcgis/api-extractor`. Preserved in typings for compatibility
208
- * with custom-elements-manifest. Read the deprecated status from the declaration.
209
- */
210
- deprecated?: string | true;
211
- }
180
+ kind: "js";
181
+ /**
182
+ * The name of the exported symbol.
183
+ *
184
+ * JavaScript has a number of ways to export objects which determine the
185
+ * correct name to use.
186
+ *
187
+ * - Default exports must use the name "default".
188
+ * - Named exports use the name that is exported. If the export is renamed
189
+ * with the "as" clause, use the exported name.
190
+ * - Aggregating exports (`* from`) should use the name `*`
191
+ */
192
+ name: string;
193
+ /**
194
+ * A reference to the exported declaration.
195
+ *
196
+ * In the case of aggregating exports, the reference's `module` field must be
197
+ * defined and the `name` field must be `"*"`.
198
+ */
199
+ declaration: ApiReference;
200
+ /**
201
+ * Whether the export is deprecated. For example, the name of the export was changed.
202
+ * If the value is a string, it's the reason for the deprecation.
203
+ *
204
+ * @deprecated
205
+ * Not used by `@arcgis/api-extractor`. Preserved in types for compatibility
206
+ * with custom-elements-manifest. Read the deprecated status from the declaration.
207
+ * @default false
208
+ */
209
+ deprecated?: string | true;
210
+ }
211
+
212
212
  /**
213
213
  * Indicates that the export is type-only and has no runtime impact (is a type alias
214
214
  * or an interface).
215
215
  *
216
- * @remarks
217
- * Not present in vanilla custom-elements-manifest, but may be added in the future.
218
- * See https://github.com/webcomponents/custom-elements-manifest/pull/77#issuecomment-873552677
216
+ * > Not present in vanilla custom-elements-manifest, but may be added in the future.
217
+ * > See https://github.com/webcomponents/custom-elements-manifest/pull/77#issuecomment-873552677
219
218
  */
220
219
  export interface ApiTypeScriptExport extends Omit<ApiJavaScriptExport, "kind"> {
221
- kind: "ts";
220
+ kind: "ts";
222
221
  }
222
+
223
223
  /**
224
224
  * A global custom element definition, ie the result of a
225
225
  * `customElements.define()` call.
@@ -228,31 +228,33 @@ export interface ApiTypeScriptExport extends Omit<ApiJavaScriptExport, "kind"> {
228
228
  * available outside of the module it's defined it.
229
229
  */
230
230
  export interface ApiCustomElementExport {
231
- kind: "custom-element-definition";
232
- /**
233
- * The tag name of the custom element.
234
- *
235
- * @example "arcgis-counter"
236
- */
237
- name: string;
238
- /**
239
- * A reference to the class or other declaration that implements the
240
- * custom element.
241
- */
242
- declaration: ApiReference;
243
- /**
244
- * Whether the custom-element export is deprecated.
245
- * For example, a future version will not register the custom element in this file.
246
- * If the value is a string, it's the reason for the deprecation.
247
- *
248
- * @default false
249
- * @deprecated
250
- * Not used by `@arcgis/api-extractor`. Preserved in typings for compatibility
251
- * with custom-elements-manifest. Read the deprecated status from the declaration.
252
- */
253
- deprecated?: string | true;
254
- }
231
+ kind: "custom-element-definition";
232
+ /**
233
+ * The tag name of the custom element.
234
+ *
235
+ * @example "arcgis-counter"
236
+ */
237
+ name: string;
238
+ /**
239
+ * A reference to the class or other declaration that implements the
240
+ * custom element.
241
+ */
242
+ declaration: ApiReference;
243
+ /**
244
+ * Whether the custom-element export is deprecated.
245
+ * For example, a future version will not register the custom element in this file.
246
+ * If the value is a string, it's the reason for the deprecation.
247
+ *
248
+ * @deprecated
249
+ * Not used by `@arcgis/api-extractor`. Preserved in types for compatibility
250
+ * with custom-elements-manifest. Read the deprecated status from the declaration.
251
+ * @default false
252
+ */
253
+ deprecated?: string | true;
254
+ }
255
+
255
256
  export type ApiDeclaration = ApiClassDeclaration | ApiCustomElementDeclaration | ApiCustomElementMixinDeclaration | ApiFunctionDeclaration | ApiInterfaceDeclaration | ApiMixinDeclaration | ApiVariableDeclaration;
257
+
256
258
  /**
257
259
  * A reference to an export of a module.
258
260
  *
@@ -267,32 +269,25 @@ export type ApiDeclaration = ApiClassDeclaration | ApiCustomElementDeclaration |
267
269
  * use a `package` name of `"global:"`.
268
270
  */
269
271
  export interface ApiReference {
270
- /**
271
- * @example "AreaMeasurementAnalysis"
272
- */
273
- name: string;
274
- /**
275
- * @example "@arcgis/core"
276
- */
277
- package?: string;
278
- /**
279
- * @example "interfaces.d.ts"
280
- */
281
- module?: string;
282
- /**
283
- * A URL to see user-friendly documentation for the type.
284
- *
285
- * @example "https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html"
286
- */
287
- viewUrl?: string;
288
- }
289
- /**
290
- * @remarks
291
- * Not present in vanilla custom-elements-manifest.
292
- */
272
+ /** @example "AreaMeasurementAnalysis" */
273
+ name: string;
274
+ /** @example "interfaces.d.ts" */
275
+ module?: string;
276
+ /** @example "@arcgis/core" */
277
+ package?: string;
278
+ /**
279
+ * A URL to see user-friendly documentation for the type.
280
+ *
281
+ * @example "https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html"
282
+ */
283
+ viewUrl?: string;
284
+ }
285
+
286
+ /** > Not present in vanilla custom-elements-manifest. */
293
287
  export interface ApiReferenceWithTypeArguments extends ApiReference {
294
- typeArguments?: ApiType[];
288
+ typeArguments?: ApiType[];
295
289
  }
290
+
296
291
  /**
297
292
  * Custom elements are JavaScript classes, so this extends from
298
293
  * `ClassDeclaration` and adds custom-element-specific features like attributes,
@@ -311,331 +306,288 @@ export interface ApiReferenceWithTypeArguments extends ApiReference {
311
306
  * tagName, and another `Module` should contain the `CustomElementExport`.
312
307
  */
313
308
  export interface ApiCustomElementDeclaration extends ApiClassDeclaration, ApiWithPrivacy {
314
- /**
315
- * An optional tag name that should be specified if this is a
316
- * self-registering element.
317
- *
318
- * Self-registering elements must also include a CustomElementExport in the
319
- * module's exports.
320
- *
321
- * @example "arcgis-counter"
322
- */
323
- tagName: string;
324
- /**
325
- * Tag name converted to PascalCase.
326
- * The interfaces for the custom element are based on this name.
327
- *
328
- * @example "ArcgisCounter" (even if class name is `Counter`)
329
- *
330
- * @remarks
331
- * Not present in vanilla custom-elements-manifest.
332
- */
333
- pascalCaseName: string;
334
- members: ApiCustomElementMember[];
335
- /**
336
- * The attributes that this element is known to understand.
337
- *
338
- * For most use cases, the "members" array includes properties will all the
339
- * information included in the "attributes" array. Thus directly accessing
340
- * "attributes" is not necessary.
341
- */
342
- attributes?: ApiAttribute[];
343
- /**
344
- * The shadow dom content slots that this element accepts.
345
- */
346
- slots?: ApiSlot[];
347
- cssParts?: ApiCssPart[];
348
- cssProperties?: ApiCssCustomProperty[];
349
- cssStates?: ApiCssCustomState[];
350
- demos?: ApiDemo[];
351
- /**
352
- * Distinguishes a regular JavaScript class from a custom element class
353
- */
354
- customElement: true;
355
- /**
356
- * @default "shadow"
357
- *
358
- * @remarks
359
- * Not present in vanilla custom-elements-manifest.
360
- */
361
- encapsulation?: "none" | "shadow";
362
- /**
363
- * The path from which the component can be imported.
364
- *
365
- * @deprecated Use ApiModule.path instead.
366
- *
367
- * @example "components/arcgis-area-measurement-2d"
368
- *
369
- * @remarks
370
- * Not present in vanilla custom-elements-manifest.
371
- */
372
- importPath: string;
373
- }
309
+ /**
310
+ * An optional tag name that should be specified if this is a
311
+ * self-registering element.
312
+ *
313
+ * Self-registering elements must also include a CustomElementExport in the
314
+ * module's exports.
315
+ *
316
+ * @example "arcgis-counter"
317
+ */
318
+ tagName: string;
319
+ /**
320
+ * Tag name converted to PascalCase.
321
+ * The interfaces for the custom element are based on this name.
322
+ *
323
+ * > Not present in vanilla custom-elements-manifest.
324
+ *
325
+ * @deprecated
326
+ * Use `import { kebabToPascal } from "@arcgis/toolkit/string";`
327
+ * utility to convert tag name to pascal case.
328
+ * @example "ArcgisCounter" (even if class name is `Counter`)
329
+ */
330
+ pascalCaseName: string;
331
+ members: ApiCustomElementMember[];
332
+ /**
333
+ * The attributes that this element is known to understand.
334
+ *
335
+ * For most use cases, the "members" array includes properties will all the
336
+ * information included in the "attributes" array. Thus directly accessing
337
+ * "attributes" is not necessary.
338
+ */
339
+ attributes?: ApiAttribute[];
340
+ /** The shadow dom content slots that this element accepts. */
341
+ slots?: ApiSlot[];
342
+ cssParts?: ApiCssPart[];
343
+ cssProperties?: ApiCssCustomProperty[];
344
+ cssStates?: ApiCssCustomState[];
345
+ demos?: ApiDemo[];
346
+ /** Distinguishes a regular JavaScript class from a custom element class */
347
+ customElement: true;
348
+ /**
349
+ * > Not present in vanilla custom-elements-manifest.
350
+ *
351
+ * @default "shadow"
352
+ */
353
+ encapsulation?: "none" | "shadow";
354
+ /**
355
+ * The path from which the component can be imported.
356
+ *
357
+ * > Not present in vanilla custom-elements-manifest.
358
+ *
359
+ * @deprecated Use ApiModule.path instead.
360
+ * @example "components/arcgis-area-measurement-2d"
361
+ */
362
+ importPath: string;
363
+ }
364
+
374
365
  export interface ApiWithPrivacy {
375
- /**
376
- * @default "public"
377
- *
378
- * If this field is absent, default value is assumed.
379
- * All private fields are excluded from the api.json.
380
- * So in practice, this value will be either "protected" or undefined.
381
- *
382
- * \@arcgis/api-extractor may only ever set this field on class members, even
383
- * though the original spec also allows it on classes and events.
384
- */
385
- privacy?: "private" | "protected" | "public";
386
- }
366
+ /**
367
+ * If this field is absent, default value is assumed.
368
+ * All private fields are excluded from the api.json.
369
+ * So in practice, this value will be either "protected" or undefined.
370
+ *
371
+ * \@arcgis/api-extractor may only ever set this field on class members, even
372
+ * though the original spec also allows it on classes and events.
373
+ *
374
+ * @default "public"
375
+ */
376
+ privacy?: "private" | "protected" | "public";
377
+ }
378
+
387
379
  /**
388
380
  * For most use cases, the "members" array includes properties with all the
389
381
  * information included in the "attributes" array. Thus directly accessing
390
382
  * "attributes" is not necessary.
391
383
  */
392
384
  export interface ApiAttribute extends ApiWithDeprecated, ApiWithDescription, ApiWithInheritance, ApiWithUnusedSummary {
393
- /**
394
- * @example "initial-count"
395
- */
396
- name: string;
397
- /**
398
- * The type that the attribute will be serialized/deserialized as.
399
- */
400
- type: ApiType;
401
- /**
402
- * The default value of the attribute, if any.
403
- *
404
- * As attributes are always strings, this is the actual value, not a human
405
- * readable description.
406
- *
407
- * @example "10"
408
- */
409
- default?: string;
410
- /**
411
- * The name of the field this attribute is associated with.
412
- *
413
- * @example "initialCount"
414
- */
415
- fieldName?: string;
416
- }
385
+ /** @example "initial-count" */
386
+ name: string;
387
+ /** The type that the attribute will be serialized/deserialized as. */
388
+ type: ApiType;
389
+ /**
390
+ * The default value of the attribute, if any.
391
+ *
392
+ * As attributes are always strings, this is the actual value, not a human
393
+ * readable description.
394
+ *
395
+ * @example "10"
396
+ */
397
+ default?: string;
398
+ /**
399
+ * The name of the field this attribute is associated with.
400
+ *
401
+ * @example "initialCount"
402
+ */
403
+ fieldName?: string;
404
+ }
405
+
417
406
  export interface ApiEvent extends ApiWithDescription, ApiWithDocsTags, ApiWithDeprecated, ApiWithInheritance, ApiWithPrivacy, ApiWithUnusedSummary {
418
- /**
419
- * @example "arcgisClick"
420
- */
421
- name: string;
422
- /**
423
- * The type of the event object that's fired.
424
- */
425
- type: ApiType;
426
- /**
427
- * @default true
428
- *
429
- * @remarks
430
- * Not present in vanilla custom-elements-manifest.
431
- */
432
- bubbles?: false;
433
- /**
434
- * @default true
435
- *
436
- * @remarks
437
- * Not present in vanilla custom-elements-manifest.
438
- */
439
- cancelable?: false;
440
- /**
441
- * @default true
442
- *
443
- * @remarks
444
- * Not present in vanilla custom-elements-manifest.
445
- */
446
- composed?: false;
447
- }
407
+ /** @example "arcgisClick" */
408
+ name: string;
409
+ /** The type of the event object that's fired. */
410
+ type: ApiType;
411
+ /**
412
+ * > Not present in vanilla custom-elements-manifest.
413
+ *
414
+ * @default true
415
+ */
416
+ bubbles?: false;
417
+ /**
418
+ * > Not present in vanilla custom-elements-manifest.
419
+ *
420
+ * @default true
421
+ */
422
+ cancelable?: false;
423
+ /**
424
+ * > Not present in vanilla custom-elements-manifest.
425
+ *
426
+ * @default true
427
+ */
428
+ composed?: false;
429
+ }
430
+
448
431
  export interface ApiWithInheritance {
449
- /**
450
- * To keep api.json size in check, `inheritedFrom` object does not include
451
- * `viewUrl`.
452
- */
453
- inheritedFrom?: ApiReference;
454
- }
455
- /**
456
- * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/slot
457
- */
432
+ /**
433
+ * To keep api.json size in check, `inheritedFrom` object does not include
434
+ * `viewUrl`.
435
+ */
436
+ inheritedFrom?: ApiReference;
437
+ }
438
+
439
+ /** @see [MDN Slot](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/slot) */
458
440
  export interface ApiSlot extends ApiWithDescription, ApiWithUnusedSummary {
459
- /**
460
- * The slot name, or the empty string for an unnamed slot.
461
- *
462
- * @example "header"
463
- */
464
- name: string;
465
- /**
466
- * Whether the slot is deprecated.
467
- * If the value is a string, it's the reason for the deprecation.
468
- *
469
- * @default false
470
- *
471
- * @deprecated
472
- * Not used by `@arcgis/api-extractor`. Preserved in typings for compatibility
473
- * with custom-elements-manifest.
474
- */
475
- deprecated?: string | true;
476
- }
441
+ /**
442
+ * The slot name, or the empty string for an unnamed slot.
443
+ *
444
+ * @example "header"
445
+ */
446
+ name: string;
447
+ /**
448
+ * Whether the slot is deprecated.
449
+ * If the value is a string, it's the reason for the deprecation.
450
+ *
451
+ * @deprecated
452
+ * Not used by `@arcgis/api-extractor`. Preserved in types for compatibility
453
+ * with custom-elements-manifest.
454
+ * @default false
455
+ */
456
+ deprecated?: string | true;
457
+ }
458
+
477
459
  /**
478
460
  * The description of exposed CSS Parts
479
461
  *
480
462
  * @see https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_shadow_parts
481
463
  */
482
464
  export interface ApiCssPart extends ApiWithDescription, ApiWithUnusedSummary {
483
- /**
484
- * @example "tab"
485
- */
486
- name: string;
487
- /**
488
- * Whether the CSS shadow part is deprecated.
489
- * If the value is a string, it's the reason for the deprecation.
490
- *
491
- * @default false
492
- *
493
- * @deprecated
494
- * Not used by `@arcgis/api-extractor`. Preserved in typings for compatibility
495
- * with custom-elements-manifest.
496
- */
497
- deprecated?: string | true;
498
- }
465
+ /** @example "tab" */
466
+ name: string;
467
+ /**
468
+ * Whether the CSS shadow part is deprecated.
469
+ * If the value is a string, it's the reason for the deprecation.
470
+ *
471
+ * @deprecated
472
+ * Not used by `@arcgis/api-extractor`. Preserved in types for compatibility
473
+ * with custom-elements-manifest.
474
+ * @default false
475
+ */
476
+ deprecated?: string | true;
477
+ }
478
+
499
479
  /**
500
480
  * The description of a CSS Custom State.
501
481
  *
502
482
  * @see https://developer.mozilla.org/en-US/docs/Web/API/CustomStateSet
503
483
  */
504
484
  export interface ApiCssCustomState extends ApiWithDescription, ApiWithUnusedSummary {
505
- /**
506
- * The name of the state. Note: Unlike CSS custom properties, custom states
507
- * do not have a leading `--`.
508
- *
509
- * @example "active"
510
- */
511
- name: string;
512
- /**
513
- * Whether the CSS custom state is deprecated.
514
- * If the value is a string, it's the reason for the deprecation.
515
- *
516
- * @default false
517
- *
518
- * @deprecated
519
- * Not used by `@arcgis/api-extractor`. Preserved in typings for compatibility
520
- * with custom-elements-manifest.
521
- */
522
- deprecated?: string | true;
523
- }
485
+ /**
486
+ * The name of the state. Note: Unlike CSS custom properties, custom states
487
+ * do not have a leading `--`.
488
+ *
489
+ * @example "active"
490
+ */
491
+ name: string;
492
+ /**
493
+ * Whether the CSS custom state is deprecated.
494
+ * If the value is a string, it's the reason for the deprecation.
495
+ *
496
+ * @deprecated
497
+ * Not used by `@arcgis/api-extractor`. Preserved in types for compatibility
498
+ * with custom-elements-manifest.
499
+ * @default false
500
+ */
501
+ deprecated?: string | true;
502
+ }
503
+
524
504
  export interface ApiCssCustomProperty extends ApiWithDescription, ApiWithUnusedSummary {
525
- /**
526
- * The name of the property, including leading `--`.
527
- *
528
- * @example "--calcite-text-color"
529
- */
530
- name: string;
531
- /**
532
- * The expected syntax of the defined property. Defaults to "*".
533
- *
534
- * The syntax must be a valid CSS
535
- * [syntax string](https://developer.mozilla.org/en-US/docs/Web/CSS/@property/syntax)
536
- * as defined in the CSS Properties and Values API.
537
- *
538
- * Examples:
539
- *
540
- * "<color>": accepts a color
541
- * "<length> | <percentage>": accepts lengths or percentages but not calc expressions with a combination of the two
542
- * "small | medium | large": accepts one of these values set as custom indents.
543
- * "*": any valid token
544
- *
545
- * @deprecated
546
- * Not used by `@arcgis/api-extractor`. Preserved in typings for compatibility
547
- * with custom-elements-manifest.
548
- */
549
- syntax?: string;
550
- default?: string;
551
- /**
552
- * Whether the CSS custom property is deprecated.
553
- * If the value is a string, it's the reason for the deprecation.
554
- *
555
- * @default false
556
- *
557
- * @deprecated
558
- * Not used by `@arcgis/api-extractor`. Preserved in typings for compatibility
559
- * with custom-elements-manifest.
560
- */
561
- deprecated?: string | true;
562
- }
505
+ /**
506
+ * The name of the property, including leading `--`.
507
+ *
508
+ * @example "--calcite-text-color"
509
+ */
510
+ name: string;
511
+ /**
512
+ * The expected syntax of the defined property. Defaults to "*".
513
+ *
514
+ * The syntax must be a valid CSS
515
+ * [syntax string](https://developer.mozilla.org/en-US/docs/Web/CSS/@property/syntax)
516
+ * as defined in the CSS Properties and Values API.
517
+ *
518
+ * Examples:
519
+ *
520
+ * "<color>": accepts a color
521
+ * "<length> | <percentage>": accepts lengths or percentages but not calc expressions with a combination of the two
522
+ * "small | medium | large": accepts one of these values set as custom indents.
523
+ * "*": any valid token
524
+ *
525
+ * @deprecated
526
+ * Not used by `@arcgis/api-extractor`. Preserved in types for compatibility
527
+ * with custom-elements-manifest.
528
+ */
529
+ syntax?: string;
530
+ default?: string;
531
+ /**
532
+ * Whether the CSS custom property is deprecated.
533
+ * If the value is a string, it's the reason for the deprecation.
534
+ *
535
+ * @deprecated
536
+ * Not used by `@arcgis/api-extractor`. Preserved in types for compatibility
537
+ * with custom-elements-manifest.
538
+ * @default false
539
+ */
540
+ deprecated?: string | true;
541
+ }
542
+
563
543
  export interface ApiType extends ApiWithUnusedSource {
564
- /**
565
- * The full string representation of the type, in whatever type syntax is
566
- * used, such as JSDoc, Closure, or TypeScript.
567
- *
568
- * This represents a 'resolved' type, where e.g. imported types have been
569
- * resolved and inlined.
570
- *
571
- * @example Array<"active" | "inactive">
572
- */
573
- text: string;
574
- /**
575
- * An array of references to the types in the type string.
576
- *
577
- * These references have optional indices into the type string so that tools
578
- * can understand the references in the type string independently of the type
579
- * system and syntax. For example, a documentation viewer could display the
580
- * type `Array<FooElement | BarElement>` with cross-references to `FooElement`
581
- * and `BarElement` without understanding arrays, generics, or union types.
582
- */
583
- references?: ApiTypeReference[];
584
- /**
585
- * An enum of possible values for this type.
586
- *
587
- * @remarks
588
- * Not present in vanilla custom-elements-manifest.
589
- *
590
- * @privateRemarks
591
- * FINAL: should we drop this field in favor of offering a util that infers
592
- * type values from the type string?
593
- *
594
- * Pros:
595
- * - smaller api.json
596
- * - simpler implementation in some ways (don't need to keep type string and
597
- * values in sync when doing post processing)
598
- * - one less non-standard field
599
- *
600
- * Cons:
601
- * - Lumina compiler at present relies on type values in several places, so
602
- * it may have to compute this anyway
603
- * - inferring it from the type string is not trivial, think of:
604
- *
605
- * ```ts
606
- * type A = "a|\"" | { b: string | undefined } | T extends `a${1|2}b` ? X | Y : Z;
607
- * ```
608
- *
609
- * though, ChatGPT one-shotted a working solution:
610
- * https://chatgpt.com/share/68ccd574-2a8c-8003-a6cc-aa3ef01c40ad
611
- *
612
- * still, it will be a maintenance burden whenever new TS syntax is added
613
- */
614
- values?: ApiValue[];
615
- }
544
+ /**
545
+ * The full string representation of the type, in whatever type syntax is
546
+ * used, such as JSDoc, Closure, or TypeScript.
547
+ *
548
+ * This represents a 'resolved' type, where e.g. imported types have been
549
+ * resolved and inlined.
550
+ *
551
+ * @example Array<"active" | "inactive">
552
+ */
553
+ text: string;
554
+ /**
555
+ * An array of references to the types in the type string.
556
+ *
557
+ * These references have optional indices into the type string so that tools
558
+ * can understand the references in the type string independently of the type
559
+ * system and syntax. For example, a documentation viewer could display the
560
+ * type `Array<FooElement | BarElement>` with cross-references to `FooElement`
561
+ * and `BarElement` without understanding arrays, generics, or union types.
562
+ */
563
+ references?: ApiTypeReference[];
564
+ /**
565
+ * An enum of possible values for this type.
566
+ *
567
+ * > Not present in vanilla custom-elements-manifest.
568
+ */
569
+ values?: ApiValue[];
570
+ }
571
+
616
572
  export interface ApiWithUnusedSource {
617
- /**
618
- * A reference to the source of a declaration or member.
619
- * An absolute URL to the source (ie. a GitHub URL).
620
- *
621
- * @deprecated
622
- * Not used by `@arcgis/api-extractor`. Preserved in typings for compatibility
623
- * with custom-elements-manifest.
624
- */
625
- source?: {
626
- href: string;
627
- };
628
- }
573
+ /**
574
+ * A reference to the source of a declaration or member.
575
+ * An absolute URL to the source (ie. a GitHub URL).
576
+ *
577
+ * @deprecated
578
+ * Not used by `@arcgis/api-extractor`. Preserved in types for compatibility
579
+ * with custom-elements-manifest.
580
+ */
581
+ source?: { href: string; };
582
+ }
583
+
629
584
  export interface ApiValue {
630
- /**
631
- * @example "string"
632
- */
633
- type: string;
634
- /**
635
- * @example "active"
636
- */
637
- value?: string;
585
+ /** @example "string" */
586
+ type: string;
587
+ /** @example "active" */
588
+ value?: string;
638
589
  }
590
+
639
591
  /**
640
592
  * A reference that is associated with a type string and optionally a range
641
593
  * within the string.
@@ -646,279 +598,273 @@ export interface ApiValue {
646
598
  * string.
647
599
  */
648
600
  export interface ApiTypeReference extends ApiReference {
649
- start?: number;
650
- end?: number;
601
+ start?: number;
602
+ end?: number;
651
603
  }
604
+
652
605
  export interface ApiObjectLikeDeclaration extends ApiWithDescription, ApiWithDocsTags, ApiWithDeprecated, ApiWithUnusedSource, ApiWithUnusedSummary, ApiWithTypeParameters {
653
- /**
654
- * @example "ArcgisCounter"
655
- */
656
- name: string;
657
- members?: ApiClassMember[];
606
+ /** @example "ArcgisCounter" */
607
+ name: string;
608
+ members?: ApiClassMember[];
658
609
  }
610
+
659
611
  export interface ApiWithTypeParameters {
660
- typeParameters?: ApiTypeParameter[];
612
+ typeParameters?: ApiTypeParameter[];
661
613
  }
662
- /**
663
- * @remarks
664
- * Not present in vanilla custom-elements-manifest.
665
- */
614
+
615
+ /** > Not present in vanilla custom-elements-manifest. */
666
616
  export interface ApiTypeParameter {
667
- name: string;
668
- constraint?: ApiType;
669
- default?: ApiType;
670
- /** @default false */
671
- const?: true;
672
- /** @default false */
673
- in?: true;
674
- /** @default false */
675
- out?: true;
676
- }
677
- /**
678
- * The common interface of classes and mixins.
679
- */
617
+ name: string;
618
+ constraint?: ApiType;
619
+ default?: ApiType;
620
+ /** @default false */
621
+ const?: true;
622
+ /**
623
+ * @default false
624
+ * @see [Type Parameter variance annotations](https://www.typescriptlang.org/docs/handbook/2/generics.html#variance-annotations)
625
+ */
626
+ in?: true;
627
+ /** @default false */
628
+ out?: true;
629
+ }
630
+
631
+ /** The common interface of classes and mixins. */
680
632
  export interface ApiClassDeclaration extends ApiObjectLikeDeclaration, ApiWithEvents {
681
- kind: "class";
682
- /**
683
- * The superclass of this class.
684
- *
685
- * If this class is defined with mixin applications, the prototype chain
686
- * includes the mixin applications and the true superclass is computed
687
- * from them.
688
- */
689
- superclass?: ApiReferenceWithTypeArguments;
690
- /**
691
- * Any class mixins applied in the extends clause of this class.
692
- *
693
- * If mixins are applied in the class definition, then the true superclass
694
- * of this class is the result of applying mixins in order to the superclass.
695
- *
696
- * Mixins must be listed in order of their application to the superclass or
697
- * previous mixin application. This means that the innermost mixin is listed
698
- * first. This may read backwards from the common order in JavaScript, but
699
- * matches the order of language used to describe mixin application, like
700
- * "S with A, B".
701
- *
702
- * @see https://webgis.esri.com/webgis/core/core/mixins
703
- *
704
- */
705
- mixins?: ApiReferenceWithTypeArguments[];
706
- }
633
+ kind: "class";
634
+ /**
635
+ * The superclass of this class.
636
+ *
637
+ * If this class is defined with mixin applications, the prototype chain
638
+ * includes the mixin applications and the true superclass is computed
639
+ * from them.
640
+ */
641
+ superclass?: ApiReferenceWithTypeArguments;
642
+ /**
643
+ * Any class mixins applied in the extends clause of this class.
644
+ *
645
+ * If mixins are applied in the class definition, then the true superclass
646
+ * of this class is the result of applying mixins in order to the superclass.
647
+ *
648
+ * Mixins must be listed in order of their application to the superclass or
649
+ * previous mixin application. This means that the innermost mixin is listed
650
+ * first. This may read backwards from the common order in JavaScript, but
651
+ * matches the order of language used to describe mixin application, like
652
+ * "S with A, B".
653
+ *
654
+ * @see https://webgis.esri.com/webgis/core/core/mixins
655
+ */
656
+ mixins?: ApiReferenceWithTypeArguments[];
657
+ }
658
+
707
659
  export interface ApiWithEvents {
708
- /**
709
- * The events that this object fires.
710
- */
711
- events?: ApiEvent[];
660
+ /** The events that this object fires. */
661
+ events?: ApiEvent[];
712
662
  }
663
+
713
664
  /**
714
665
  * An interface that describes the properties and methods of an object.
715
666
  *
716
- * @remarks
717
- * Not yet part of vanilla custom-elements-manifest, but may be added in the
718
- * future. See https://github.com/webcomponents/custom-elements-manifest/pull/77
667
+ * > Not yet part of vanilla custom-elements-manifest, but may be added in the
668
+ * > future. See https://github.com/webcomponents/custom-elements-manifest/pull/77
719
669
  */
720
670
  export interface ApiInterfaceDeclaration extends ApiObjectLikeDeclaration {
721
- kind: "interface";
722
- /**
723
- * The interfaces that this interface extends.
724
- */
725
- supertypes?: ApiReferenceWithTypeArguments[];
726
- /**
727
- * Present in type aliases only. If type alias is an intersection, then type
728
- * reference members will be represented in the `supertypes` field. If type
729
- * alias is an object literal, then object members will be represented in
730
- * the `members` field. Thus, the `type` field will only be used for unions,
731
- * mapped types, conditional types, and other types that cannot be represented
732
- * as supertypes/members.
733
- */
734
- type?: ApiType;
735
- }
671
+ kind: "interface";
672
+ /** The interfaces that this interface extends. */
673
+ supertypes?: ApiReferenceWithTypeArguments[];
674
+ /**
675
+ * Present in type aliases only. If type alias is an intersection, then type
676
+ * reference members will be represented in the `supertypes` field. If type
677
+ * alias is an object literal, then object members will be represented in
678
+ * the `members` field. Thus, the `type` field will only be used for unions,
679
+ * mapped types, conditional types, and other types that cannot be represented
680
+ * as supertypes/members.
681
+ */
682
+ type?: ApiType;
683
+ }
684
+
736
685
  export type ApiClassMember = ApiClassCallSignature | ApiClassConstructor | ApiClassField | ApiClassMethod;
686
+
737
687
  export type ApiCustomElementMember = ApiClassMethod | ApiCustomElementField;
688
+
738
689
  /**
739
690
  * The common interface of variables, class fields, and function
740
691
  * parameters.
741
692
  */
742
693
  export interface ApiPropertyLike extends ApiWithDescription, ApiWithDocsTags, ApiWithDeprecated, ApiWithUnusedSummary {
743
- /**
744
- * @example "initialCount"
745
- * @example Special names appear unquoted and unescaped: "@eventTypes"
746
- * @example Computed Symbol properties appear as "[Symbol.iterator]"
747
- */
748
- name: string;
749
- type: ApiType;
750
- /**
751
- * @example 10
752
- */
753
- default?: string;
754
- }
694
+ /**
695
+ * @example "initialCount"
696
+ * @example // Special names appear unquoted and unescaped: "@eventTypes"
697
+ * @example // Computed Symbol properties appear as "[Symbol.iterator]"
698
+ */
699
+ name: string;
700
+ type: ApiType;
701
+ /** @example 10 */
702
+ default?: string;
703
+ }
704
+
755
705
  export interface ApiClassField extends ApiPropertyLike, ApiWithInheritance, ApiWithStatic, ApiWithPrivacy, ApiWithUnusedSource {
756
- kind: "field";
757
- /**
758
- * Whether the property is read-only.
759
- *
760
- * @default false
761
- */
762
- readonly?: true;
763
- /**
764
- * Getter type if any.
765
- *
766
- * This property will only be set if it differs from `type` property in order
767
- * to keep documentation UI cleaner, and api.json smaller.
768
- *
769
- * If property is read-only, only the `type` property will be set.
770
- *
771
- * @default undefined
772
- *
773
- * @remarks
774
- * Not present in vanilla custom-elements-manifest.
775
- */
776
- getterType?: ApiType;
777
- }
706
+ kind: "field";
707
+ /**
708
+ * Whether the property is read-only.
709
+ *
710
+ * @default false
711
+ */
712
+ readonly?: true;
713
+ /**
714
+ * Getter type if any.
715
+ *
716
+ * This property will only be set if it differs from `type` property in order
717
+ * to keep documentation UI cleaner, and api.json smaller.
718
+ *
719
+ * If the property is read-only, only the `type` property will be set.
720
+ *
721
+ * > Not present in vanilla custom-elements-manifest.
722
+ *
723
+ * @default undefined
724
+ */
725
+ getterType?: ApiType;
726
+ }
727
+
778
728
  export interface ApiWithStatic {
779
- /**
780
- * @default false
781
- */
782
- static?: true;
729
+ /** @default false */
730
+ static?: true;
783
731
  }
784
- /**
785
- * Additional metadata for fields on custom elements.
786
- */
732
+
733
+ /** Additional metadata for fields on custom elements. */
787
734
  export interface ApiCustomElementField extends ApiClassField {
788
- /**
789
- * The corresponding attribute name if there is one.
790
- *
791
- * If this property is defined, the attribute must be listed in the classes'
792
- * `attributes` array.
793
- *
794
- * @example "initial-counter"
795
- */
796
- attribute?: string;
797
- /**
798
- * If the property reflects to an attribute.
799
- *
800
- * If this is true, the `attribute` property must be defined.
801
- *
802
- * @default false
803
- */
804
- reflects?: true;
805
- /**
806
- * For some properties, we show them as read-only in the docs and in the
807
- * typings but don't actually enforce read-only at runtime.
808
- *
809
- * Such properties are represented in the manifest with both `readonly` and
810
- * `docsOnlyReadonly` set to true.
811
- *
812
- * Runtime read-only properties are represented with only `readonly` true.
813
- *
814
- * @default false
815
- *
816
- * @remarks
817
- * Not present in vanilla custom-elements-manifest.
818
- */
819
- docsOnlyReadonly?: true;
820
- }
735
+ /**
736
+ * The corresponding attribute name if there is one.
737
+ *
738
+ * If this property is defined, the attribute must be listed in the classes'
739
+ * `attributes` array.
740
+ *
741
+ * @example "initial-counter"
742
+ */
743
+ attribute?: string;
744
+ /**
745
+ * If the property reflects to an attribute.
746
+ *
747
+ * If this is true, the `attribute` property must be defined.
748
+ *
749
+ * @default false
750
+ */
751
+ reflects?: true;
752
+ /**
753
+ * For some properties, we show them as read-only in the docs and in the
754
+ * types but don't actually enforce read-only at runtime.
755
+ *
756
+ * Such properties are represented in the manifest with both `readonly` and
757
+ * `docsOnlyReadonly` set to true.
758
+ *
759
+ * Runtime read-only properties are represented with only `readonly` true.
760
+ *
761
+ * > Not present in vanilla custom-elements-manifest.
762
+ *
763
+ * @deprecated fuse regular .readonly field instead
764
+ * @default false
765
+ */
766
+ docsOnlyReadonly?: true;
767
+ }
768
+
821
769
  export interface ApiClassMethod extends ApiFunctionLike, ApiWithInheritance, ApiWithStatic, ApiWithPrivacy, ApiWithUnusedSource {
822
- kind: "method";
823
- /**
824
- * @default false
825
- */
826
- static?: true;
827
- /**
828
- * @example "(options?: __esri.PopupViewOpenPopupOptions): Promise<void>"
829
- * @deprecated
830
- * If documentation UI shows a table with parameters and the return type, then
831
- * displaying the signature is redundant.
832
- * Still, if needed, you can use printSignature() util from
833
- * `@arcgis/api-extractor`.
834
- * @remarks
835
- * Not present in vanilla custom-elements-manifest.
836
- */
837
- signature: string;
838
- }
839
- /**
840
- * @remarks
841
- * Not present in vanilla custom-elements-manifest.
842
- */
770
+ kind: "method";
771
+ /** @default false */
772
+ static?: true;
773
+ /**
774
+ * > Not present in vanilla custom-elements-manifest.
775
+ *
776
+ * @deprecated
777
+ * If documentation UI shows a table with parameters and the return type, then
778
+ * displaying the signature is redundant.
779
+ * Still, if needed, you can use printSignature() util from
780
+ * `@arcgis/api-extractor`.
781
+ * @example "(options?: __esri.PopupViewOpenPopupOptions): Promise<void>"
782
+ */
783
+ signature: string;
784
+ }
785
+
786
+ /** > Not present in vanilla custom-elements-manifest. */
843
787
  export interface ApiClassConstructor extends Omit<ApiFunctionLike, "name" | "return">, ApiWithInheritance, ApiWithPrivacy {
844
- kind: "constructor";
788
+ kind: "constructor";
845
789
  }
846
- /**
847
- * @remarks
848
- * Not present in vanilla custom-elements-manifest.
849
- */
790
+
791
+ /** > Not present in vanilla custom-elements-manifest. */
850
792
  export interface ApiClassCallSignature extends Omit<ApiFunctionLike, "name">, ApiWithInheritance, ApiWithPrivacy {
851
- kind: "call-signature";
793
+ kind: "call-signature";
852
794
  }
795
+
853
796
  /**
854
797
  * A description of a class mixin.
855
798
  *
856
- * @see https://webgis.esri.com/webgis/core/core/mixins
799
+ * @see [WebGIS - Mixins](https://webgis.esri.com/webgis/core/core/mixins)
857
800
  */
858
801
  export interface ApiMixinDeclaration extends Omit<ApiFunctionLike, "return">, ApiObjectLikeDeclaration, ApiWithEvents {
859
- kind: "mixin";
860
- /**
861
- * The mixins that this mixin uses, if any.
862
- */
863
- mixins?: ApiReferenceWithTypeArguments[];
864
- /**
865
- * @deprecated
866
- * Not used by `@arcgis/api-extractor`. Preserved in typings for compatibility
867
- * with custom-elements-manifest.
868
- */
869
- return?: ApiFunctionLikeReturn;
870
- }
802
+ kind: "mixin";
803
+ /** The mixins that this mixin uses, if any. */
804
+ mixins?: ApiReferenceWithTypeArguments[];
805
+ /**
806
+ * @deprecated
807
+ * Not used by `@arcgis/api-extractor`. Preserved in types for compatibility
808
+ * with custom-elements-manifest.
809
+ */
810
+ return?: ApiFunctionLikeReturn;
811
+ }
812
+
871
813
  /**
872
814
  * A class mixin that also adds custom element related properties.
873
815
  *
874
816
  * @deprecated
875
- * Not used by `@arcgis/api-extractor`. Preserved in typings for compatibility
817
+ * Not used by `@arcgis/api-extractor`. Preserved in types for compatibility
876
818
  * with custom-elements-manifest.
877
819
  */
878
- export interface ApiCustomElementMixinDeclaration extends Omit<ApiCustomElementDeclaration, "kind">, Omit<ApiMixinDeclaration, "members"> {
879
- }
820
+ export interface ApiCustomElementMixinDeclaration extends Omit<ApiCustomElementDeclaration, "kind">, Omit<ApiMixinDeclaration, "members"> {}
821
+
880
822
  export interface ApiVariableDeclaration extends ApiPropertyLike, ApiWithUnusedSource {
881
- kind: "variable";
823
+ kind: "variable";
882
824
  }
825
+
883
826
  export interface ApiFunctionDeclaration extends ApiFunctionLike, ApiWithUnusedSource {
884
- kind: "function";
827
+ kind: "function";
885
828
  }
829
+
886
830
  export interface ApiParameter extends ApiPropertyLike {
887
- /**
888
- * Whether the parameter is optional.
889
- *
890
- * @default false
891
- */
892
- optional?: true;
893
- /**
894
- * @default false
895
- *
896
- * Whether the parameter is a rest parameter. Only the last parameter may be a rest parameter.
897
- * Undefined implies single parameter.
898
- */
899
- rest?: true;
900
- }
831
+ /**
832
+ * Whether the parameter had `?`. If there is a default value, that takes
833
+ * precedence over `optional` flag.
834
+ *
835
+ * @default false
836
+ */
837
+ optional?: true;
838
+ /**
839
+ * Whether the parameter is a rest parameter. Only the last parameter may be a rest parameter.
840
+ * Undefined implies single parameter.
841
+ *
842
+ * @default false
843
+ */
844
+ rest?: true;
845
+ }
846
+
901
847
  export interface ApiFunctionLike extends ApiWithDescription, ApiWithDocsTags, ApiWithDeprecated, ApiWithUnusedSummary, ApiWithTypeParameters {
902
- /**
903
- * @example "increment"
904
- * @example Special names appear unquoted and unescaped: "@eventTypes"
905
- * @example Computed Symbol properties appear as "[Symbol.iterator]"
906
- */
907
- name: string;
908
- /**
909
- * @default []
910
- */
911
- parameters?: ApiParameter[];
912
- return: ApiFunctionLikeReturn;
913
- }
848
+ /**
849
+ * @example "increment"
850
+ * @example // Special names appear unquoted and unescaped: "@eventTypes"
851
+ * @example // Computed Symbol properties appear as "[Symbol.iterator]"
852
+ */
853
+ name: string;
854
+ /** @default [] */
855
+ parameters?: ApiParameter[];
856
+ return: ApiFunctionLikeReturn;
857
+ }
858
+
914
859
  export interface ApiFunctionLikeReturn extends ApiWithDescription, ApiWithUnusedSummary {
915
- type: ApiType;
860
+ type: ApiType;
916
861
  }
862
+
917
863
  export interface ApiDemo extends ApiWithUnusedSource {
918
- /**
919
- * Relative URL of the demo if it's published with the package. Absolute URL
920
- * if it's hosted.
921
- */
922
- url: string;
923
- description: NonNullable<ApiWithDescription["description"]>;
924
- }
864
+ /**
865
+ * Relative URL of the demo if it's published with the package. Absolute URL
866
+ * if it's hosted.
867
+ */
868
+ url: string;
869
+ description: NonNullable<ApiWithDescription["description"]>;
870
+ }