@arcgis/api-extractor 5.0.0-next.157 → 5.0.0-next.159
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/{ApiExtractor-CJX4QuOC.js → ApiExtractor-D7Nr3SOt.js} +6 -3
- package/dist/cli-7PX_wNxb.js +34 -0
- package/dist/cli.js +29 -10
- package/dist/diff/apiDiffToMarkdown.d.ts +9 -0
- package/dist/diff/apiDiffToMarkdown.js +142 -0
- package/dist/diff/diffApiJson.d.ts +4 -4
- package/dist/diff/diffApiJson.js +208 -90
- package/dist/diff/types.d.ts +3 -2
- package/dist/extractor/ApiExtractor.js +3 -3
- package/dist/extractor/config.js +2 -2
- package/dist/{typeScript-LKgZovCd.js → typeScript-tNUtLuqc.js} +1 -1
- package/dist/vite/plugin.js +3 -3
- package/dist/vite/typeScript.js +1 -1
- package/dist/{worker--ArwFylB.js → worker-DMSidgi_.js} +424 -420
- package/package.json +7 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { path as $e, existsAsync as Qt, getCwd as Pi, retrievePackageJson as lt, toPosixPathSeparators as xi } from "@arcgis/components-build-utils";
|
|
2
|
-
import { b as Ri, p as Di, l as Li } from "./typeScript-
|
|
2
|
+
import { b as Ri, p as Di, l as Li } from "./typeScript-tNUtLuqc.js";
|
|
3
3
|
import { getDefaultBasePath as Yt, buildViewUrl as Ii, getViewUrl as Ge } from "./extractor/processing/links.js";
|
|
4
4
|
import o from "typescript";
|
|
5
5
|
import "fs/promises";
|
|
@@ -45,12 +45,12 @@ function da(e) {
|
|
|
45
45
|
}
|
|
46
46
|
},
|
|
47
47
|
configPath: p.configPath
|
|
48
|
-
}, u = t?.dtsEmitPath === void 0 || t?.dtsEmitPath === "" ? "" : `${$e.resolve(s, t.dtsEmitPath)}/`, g = t?.environment ?? "production", E = g === "development",
|
|
48
|
+
}, u = t?.dtsEmitPath === void 0 || t?.dtsEmitPath === "" ? "" : `${$e.resolve(s, t.dtsEmitPath)}/`, g = t?.environment ?? "production", E = g === "development", v = t?.emptyDtsEmitPath ?? (!E && u !== "");
|
|
49
49
|
return {
|
|
50
50
|
isResolvedConfig: !0,
|
|
51
51
|
context: {
|
|
52
52
|
dtsEmitPath: u,
|
|
53
|
-
emptyDtsEmitPath:
|
|
53
|
+
emptyDtsEmitPath: v,
|
|
54
54
|
apiJsonEmitPath: t?.apiJsonEmitPath ?? "",
|
|
55
55
|
environment: g,
|
|
56
56
|
cwd: s,
|
|
@@ -103,7 +103,7 @@ function da(e) {
|
|
|
103
103
|
// so doesn't need long debounce.
|
|
104
104
|
debounceTime: e.watch?.debounceTime ?? (m || d ? 50 : 20),
|
|
105
105
|
clearScreen: e.watch?.clearScreen ?? !1,
|
|
106
|
-
skipWritingUnchanged:
|
|
106
|
+
skipWritingUnchanged: v ? !1 : e.watch?.skipWritingUnchanged ?? !0
|
|
107
107
|
},
|
|
108
108
|
strict: e.strict ?? !c,
|
|
109
109
|
afterApiJsonCreate: e.afterApiJsonCreate ?? ge
|
|
@@ -327,22 +327,22 @@ function sn(e, t, n) {
|
|
|
327
327
|
}
|
|
328
328
|
) : u = u.slice(1)), u.startsWith("@")) {
|
|
329
329
|
r !== void 0 && !p && l.push(
|
|
330
|
-
|
|
330
|
+
V[r] ?? {
|
|
331
331
|
name: r,
|
|
332
332
|
text: c.trim().replaceAll("\\@", "@") || void 0
|
|
333
333
|
}
|
|
334
334
|
);
|
|
335
|
-
const g = u.indexOf(" "), E = g === -1 ? u.slice(1) : u.slice(1, g),
|
|
336
|
-
m ||=
|
|
337
|
-
const
|
|
338
|
-
r = E, c =
|
|
335
|
+
const g = u.indexOf(" "), E = g === -1 ? u.slice(1) : u.slice(1, g), v = t && E === "public";
|
|
336
|
+
m ||= v, d ||= t && E === "internal", p = v || E === "privateRemarks";
|
|
337
|
+
const b = g === -1 ? "" : u.slice(g + 1);
|
|
338
|
+
r = E, c = b;
|
|
339
339
|
} else r !== void 0 ? c = `${c}
|
|
340
340
|
${u}` : s += `${u}
|
|
341
341
|
`;
|
|
342
342
|
}
|
|
343
343
|
if (!(!m && !d))
|
|
344
344
|
return r !== void 0 && !p && l.push(
|
|
345
|
-
|
|
345
|
+
V[r] ?? {
|
|
346
346
|
name: r,
|
|
347
347
|
text: c.trim().replaceAll("\\@", "@") || void 0
|
|
348
348
|
}
|
|
@@ -363,7 +363,7 @@ function ii(e, t) {
|
|
|
363
363
|
const i = t.docsTags[n], { name: a, text: s } = i;
|
|
364
364
|
if (a === "deprecated")
|
|
365
365
|
e.deprecated = s || !0;
|
|
366
|
-
else if (i ===
|
|
366
|
+
else if (i === V.private)
|
|
367
367
|
e.privacy = "private";
|
|
368
368
|
else if (a === "csspart")
|
|
369
369
|
e.cssParts ??= [], e.cssParts.push(ot(s));
|
|
@@ -384,7 +384,7 @@ function ln(e, t) {
|
|
|
384
384
|
const s = t.docsTags[a], { name: l, text: r } = s;
|
|
385
385
|
if (l === "deprecated")
|
|
386
386
|
e.deprecated = r || !0;
|
|
387
|
-
else if (s ===
|
|
387
|
+
else if (s === V.private)
|
|
388
388
|
e.privacy = "private";
|
|
389
389
|
else if (l === "param")
|
|
390
390
|
i.push(s);
|
|
@@ -401,7 +401,7 @@ function ln(e, t) {
|
|
|
401
401
|
function cn(e, t) {
|
|
402
402
|
for (let n = 0; n < t.docsTags.length; ++n) {
|
|
403
403
|
const i = t.docsTags[n], { name: a, text: s } = i;
|
|
404
|
-
a === "deprecated" ? e.deprecated = s || !0 : a === "default" ? e.default = s : i ===
|
|
404
|
+
a === "deprecated" ? e.deprecated = s || !0 : a === "default" ? e.default = s : i === V.readonly ? e.readonly = !0 : i === V.private ? e.privacy = "private" : (e.docsTags ??= [], e.docsTags.push(i));
|
|
405
405
|
}
|
|
406
406
|
e.description = t.description;
|
|
407
407
|
}
|
|
@@ -423,7 +423,7 @@ function dn(e, t) {
|
|
|
423
423
|
function pn(e, t) {
|
|
424
424
|
for (let n = 0; n < t.docsTags.length; ++n) {
|
|
425
425
|
const i = t.docsTags[n], { name: a, text: s } = i;
|
|
426
|
-
a === "deprecated" ? e.deprecated = s || !0 : i ===
|
|
426
|
+
a === "deprecated" ? e.deprecated = s || !0 : i === V.private ? e.privacy = "private" : (e.docsTags ??= [], e.docsTags.push(i));
|
|
427
427
|
}
|
|
428
428
|
e.description = t.description;
|
|
429
429
|
}
|
|
@@ -469,7 +469,7 @@ function ot(e) {
|
|
|
469
469
|
default: n
|
|
470
470
|
};
|
|
471
471
|
}
|
|
472
|
-
const
|
|
472
|
+
const V = {
|
|
473
473
|
// Create a null prototype object to avoid collisions with Object.prototype when doing lookups
|
|
474
474
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
475
475
|
__proto__: null,
|
|
@@ -485,7 +485,7 @@ const W = {
|
|
|
485
485
|
docsTags: []
|
|
486
486
|
}, Ce = {
|
|
487
487
|
description: void 0,
|
|
488
|
-
docsTags: [
|
|
488
|
+
docsTags: [V.private]
|
|
489
489
|
};
|
|
490
490
|
function mn(e, t, n) {
|
|
491
491
|
switch (t.path) {
|
|
@@ -547,24 +547,24 @@ function ua(e, t) {
|
|
|
547
547
|
`, i = `
|
|
548
548
|
|
|
549
549
|
`, a = "", s = "", l = "", r = "", c = "", m = "", d = "", p = "", f = "", u = "", g = "", E = "";
|
|
550
|
-
for (let
|
|
551
|
-
const
|
|
552
|
-
for (let A = 0; A <
|
|
553
|
-
const
|
|
554
|
-
if (
|
|
550
|
+
for (let S = 0; S < e.length; ++S) {
|
|
551
|
+
const R = e[S];
|
|
552
|
+
for (let A = 0; A < R.declarations.length; ++A) {
|
|
553
|
+
const _ = R.declarations[A];
|
|
554
|
+
if (_.customElement !== !0)
|
|
555
555
|
continue;
|
|
556
|
-
const
|
|
557
|
-
if (
|
|
556
|
+
const W = _;
|
|
557
|
+
if (W.privacy !== void 0 || te(W).hasExplicitAbstract === !0)
|
|
558
558
|
continue;
|
|
559
|
-
const { name: F, tagName:
|
|
560
|
-
i += `import type { ${F} } from "./${
|
|
561
|
-
`, n += `import type { ${F} } from "../${
|
|
559
|
+
const { name: F, tagName: N, pascalCaseName: w, events: H } = W;
|
|
560
|
+
i += `import type { ${F} } from "./${R.path}/customElement.js";
|
|
561
|
+
`, n += `import type { ${F} } from "../${R.path}/customElement.js";
|
|
562
562
|
`;
|
|
563
|
-
const [me, ke] = un(
|
|
563
|
+
const [me, ke] = un(W.name, W.members);
|
|
564
564
|
let ie = "", q = "";
|
|
565
|
-
if (
|
|
566
|
-
for (let pe = 0; pe <
|
|
567
|
-
const Fe =
|
|
565
|
+
if (H !== void 0) {
|
|
566
|
+
for (let pe = 0; pe < H.length; ++pe) {
|
|
567
|
+
const Fe = H[pe], Pt = `EventHandler<${F}["${Fe.name}"]>`;
|
|
568
568
|
ie += ` ${xt(`on${Fe.name}`)}?: ${Pt};
|
|
569
569
|
`, q += ` ${xt(`on${Fe.name[0].toUpperCase()}${Fe.name.slice(1)}`)}?: ${Pt};
|
|
570
570
|
`;
|
|
@@ -579,23 +579,23 @@ function ua(e, t) {
|
|
|
579
579
|
}
|
|
580
580
|
s += ` type HTML${w}Element = ${F};
|
|
581
581
|
|
|
582
|
-
`, l += ` "${
|
|
582
|
+
`, l += ` "${N}": ${F};
|
|
583
583
|
`, r += `interface Lumina${w} extends ${me}h.JSX.HTMLAttributes<${F}> {
|
|
584
584
|
${ie}}
|
|
585
585
|
|
|
586
|
-
`, c += ` "${
|
|
586
|
+
`, c += ` "${N}": Lumina${w};
|
|
587
587
|
`, m += `interface Preact${w} extends ${me}HTMLAttributes<${F}> {
|
|
588
588
|
${ie}}
|
|
589
589
|
|
|
590
|
-
`, d += ` "${
|
|
590
|
+
`, d += ` "${N}": Preact${w};
|
|
591
591
|
`, p += `interface React${w} extends ${me}HTMLProps<${F}> {
|
|
592
592
|
${ie}}
|
|
593
593
|
|
|
594
|
-
`, f += ` "${
|
|
594
|
+
`, f += ` "${N}": React${w};
|
|
595
595
|
`, u += `interface Stencil${w} extends ${me}StencilJsx.HTMLAttributes<${F}> {
|
|
596
596
|
${q}}
|
|
597
597
|
|
|
598
|
-
`, g += ` "${
|
|
598
|
+
`, g += ` "${N}": Stencil${w};
|
|
599
599
|
`, ke !== "" && (E += ke);
|
|
600
600
|
}
|
|
601
601
|
}
|
|
@@ -603,9 +603,9 @@ ${q}}
|
|
|
603
603
|
t.vanillaComponentTypes = "";
|
|
604
604
|
return;
|
|
605
605
|
}
|
|
606
|
-
const
|
|
606
|
+
const v = "@arcgis/lumina";
|
|
607
607
|
t.vanillaComponentTypes = `${i}
|
|
608
|
-
export { ToEvents, TargetedEvent } from "${
|
|
608
|
+
export { ToEvents, TargetedEvent } from "${v}";
|
|
609
609
|
|
|
610
610
|
${a}
|
|
611
611
|
|
|
@@ -616,39 +616,39 @@ ${l}
|
|
|
616
616
|
|
|
617
617
|
${s}
|
|
618
618
|
}`;
|
|
619
|
-
const
|
|
620
|
-
export declare const defineCustomElements: import("${
|
|
621
|
-
t.dtsFiles.set(
|
|
622
|
-
const
|
|
619
|
+
const b = `import "./index.js";
|
|
620
|
+
export declare const defineCustomElements: import("${v}").DefineCustomElements;`, h = `${t.config.context.dtsEmitPath}loader.d.ts`;
|
|
621
|
+
t.dtsFiles.set(h, b);
|
|
622
|
+
const L = `${n}import type { h, EventHandler } from "${v}";
|
|
623
623
|
|
|
624
624
|
${E}${r}declare module "@arcgis/lumina" {
|
|
625
625
|
export namespace h.JSX {
|
|
626
626
|
interface IntrinsicElements {
|
|
627
627
|
${c} }
|
|
628
628
|
}
|
|
629
|
-
}`,
|
|
630
|
-
${d} }`,
|
|
631
|
-
import type { EventHandler } from "${
|
|
629
|
+
}`, I = ` interface IntrinsicElements {
|
|
630
|
+
${d} }`, y = `${n}import { HTMLAttributes } from "preact";
|
|
631
|
+
import type { EventHandler } from "${v}";
|
|
632
632
|
|
|
633
633
|
${E}${m}declare module 'preact' {
|
|
634
634
|
namespace createElement.JSX {
|
|
635
|
-
${
|
|
635
|
+
${I}
|
|
636
636
|
}
|
|
637
637
|
namespace h.JSX {
|
|
638
|
-
${
|
|
638
|
+
${I}
|
|
639
639
|
}
|
|
640
|
-
}`,
|
|
640
|
+
}`, k = `
|
|
641
641
|
namespace JSX {
|
|
642
642
|
interface IntrinsicElements {
|
|
643
643
|
${f} }
|
|
644
644
|
}
|
|
645
|
-
`,
|
|
646
|
-
import type { EventHandler } from "${
|
|
645
|
+
`, P = `${n}import type { HTMLProps } from 'react';
|
|
646
|
+
import type { EventHandler } from "${v}";
|
|
647
647
|
|
|
648
|
-
${E}${p}declare module "react" {${
|
|
649
|
-
declare module "react/jsx-runtime" {${
|
|
650
|
-
declare module "react/jsx-dev-runtime" {${
|
|
651
|
-
import type { EventHandler } from "${
|
|
648
|
+
${E}${p}declare module "react" {${k}}
|
|
649
|
+
declare module "react/jsx-runtime" {${k}}
|
|
650
|
+
declare module "react/jsx-dev-runtime" {${k}}`, D = `${n}import { JSXBase as StencilJsx } from "@stencil/core/internal";
|
|
651
|
+
import type { EventHandler } from "${v}";
|
|
652
652
|
|
|
653
653
|
${E}${u}interface ExposedElements {
|
|
654
654
|
${g}}
|
|
@@ -661,9 +661,9 @@ declare module "@stencil/core/internal/stencil-public-runtime" {
|
|
|
661
661
|
export namespace h.JSX {
|
|
662
662
|
interface IntrinsicElements extends ExposedElements {}
|
|
663
663
|
}
|
|
664
|
-
}`,
|
|
665
|
-
export * from "./stencil.js";`,
|
|
666
|
-
t.dtsFiles.set(
|
|
664
|
+
}`, x = `/** @deprecated import from stencil.d.ts instead */
|
|
665
|
+
export * from "./stencil.js";`, T = `${t.config.context.dtsEmitPath}types/`, K = `${T}lumina.d.ts`, O = `${T}preact.d.ts`, J = `${T}react.d.ts`, $ = `${T}stencil.d.ts`, C = `${T}components.d.ts`;
|
|
666
|
+
t.dtsFiles.set(K, L), t.dtsFiles.set(O, y), t.dtsFiles.set(J, P), t.dtsFiles.set($, D), t.dtsFiles.set(C, x);
|
|
667
667
|
}
|
|
668
668
|
function un(e, t) {
|
|
669
669
|
const n = [], i = [];
|
|
@@ -677,7 +677,7 @@ function un(e, t) {
|
|
|
677
677
|
a = !0;
|
|
678
678
|
continue;
|
|
679
679
|
}
|
|
680
|
-
c.docsTags?.includes(
|
|
680
|
+
c.docsTags?.includes(V.required) === !0 ? n.push(`"${c.name}"`) : i.push(`"${c.name}"`);
|
|
681
681
|
}
|
|
682
682
|
let s = n.length > 0 ? `Required<Pick<${e}, ${n.join(" | ")}>>` : "";
|
|
683
683
|
i.length > 0 && (s.length > 0 && (s += ", "), s += `Partial<Pick<${e}, ${i.join(" | ")}>>`), a && (s.length > 0 && (s += ", "), s += `${e}SetterTypes`);
|
|
@@ -967,7 +967,7 @@ function dt(e) {
|
|
|
967
967
|
if (c.inheritedFrom !== void 0 || c.privacy === "private")
|
|
968
968
|
continue;
|
|
969
969
|
const d = Te(c);
|
|
970
|
-
n += he(d), c.kind === "field" ? (s && c.getterType !== void 0 && (l += ` ${fe(!1, !1, !1, !1, !1, c.docsTags?.includes(
|
|
970
|
+
n += he(d), c.kind === "field" ? (s && c.getterType !== void 0 && (l += ` ${fe(!1, !1, !1, !1, !1, c.docsTags?.includes(V.required) !== !0, c.name, c.type.text)}
|
|
971
971
|
`), n += Nt(c)) : n += ri(c, !1), n += `
|
|
972
972
|
`;
|
|
973
973
|
}
|
|
@@ -1269,37 +1269,37 @@ function je(e, t, n, i, a) {
|
|
|
1269
1269
|
end: a
|
|
1270
1270
|
};
|
|
1271
1271
|
if (f === "typescript" && u?.startsWith("lib/") === !0) {
|
|
1272
|
-
let
|
|
1273
|
-
if (
|
|
1274
|
-
for (let
|
|
1275
|
-
if (o.isModuleDeclaration(
|
|
1276
|
-
|
|
1272
|
+
let v = mt[m], b, h = m;
|
|
1273
|
+
if (v === void 0) {
|
|
1274
|
+
for (let L = d.parent; L !== void 0; L = L.parent)
|
|
1275
|
+
if (o.isModuleDeclaration(L) && o.isIdentifier(L.name)) {
|
|
1276
|
+
b = L.name.escapedText, v = mt[b]?.[1]?.[m], h = `${b}.${m}`, Me(t, h);
|
|
1277
1277
|
break;
|
|
1278
1278
|
}
|
|
1279
1279
|
}
|
|
1280
1280
|
return {
|
|
1281
|
-
name:
|
|
1281
|
+
name: h,
|
|
1282
1282
|
module: void 0,
|
|
1283
1283
|
package: De,
|
|
1284
|
-
viewUrl:
|
|
1284
|
+
viewUrl: v?.[0]?.startsWith("https") === !1 ? `${ut}${v[0]}` : v?.[0] ?? void 0,
|
|
1285
1285
|
start: i,
|
|
1286
|
-
end: i +
|
|
1286
|
+
end: i + h.length
|
|
1287
1287
|
};
|
|
1288
1288
|
}
|
|
1289
1289
|
let g = m;
|
|
1290
1290
|
if (f !== void 0 && u === void 0 && r?.startsWith("HTML") === !0 && d.parent.kind === o.SyntaxKind.ModuleBlock && d.parent.parent.kind === o.SyntaxKind.ModuleDeclaration && d.parent.parent.name.escapedText === "global") {
|
|
1291
1291
|
if (r.endsWith("Element")) {
|
|
1292
|
-
const
|
|
1293
|
-
if (
|
|
1294
|
-
const
|
|
1295
|
-
if (
|
|
1296
|
-
const
|
|
1292
|
+
const v = o.isInterfaceDeclaration(d) ? d.heritageClauses?.[0]?.types[0]?.expression : o.isTypeAliasDeclaration(d) && o.isTypeReferenceNode(d.type) ? d.type.typeName : void 0;
|
|
1293
|
+
if (v !== void 0 && o.isIdentifier(v)) {
|
|
1294
|
+
const b = s.getSymbolAtLocation(v);
|
|
1295
|
+
if (b !== void 0) {
|
|
1296
|
+
const h = s.getAliasedSymbol(b);
|
|
1297
1297
|
return je(
|
|
1298
|
-
|
|
1298
|
+
h,
|
|
1299
1299
|
t,
|
|
1300
1300
|
n,
|
|
1301
1301
|
i,
|
|
1302
|
-
i +
|
|
1302
|
+
i + h.escapedName.length
|
|
1303
1303
|
);
|
|
1304
1304
|
}
|
|
1305
1305
|
}
|
|
@@ -1309,43 +1309,43 @@ function je(e, t, n, i, a) {
|
|
|
1309
1309
|
// As this interface is not likely to be used directly.
|
|
1310
1310
|
r.endsWith("ElementEventMap") && o.isTypeAliasDeclaration(d) && o.isIndexedAccessTypeNode(d.type) && o.isTypeReferenceNode(d.type.objectType) && o.isIdentifier(d.type.objectType.typeName) && o.isLiteralTypeNode(d.type.indexType) && o.isStringLiteral(d.type.indexType.literal) && d.type.indexType.literal.text === "@eventTypes"
|
|
1311
1311
|
) {
|
|
1312
|
-
const
|
|
1313
|
-
if (
|
|
1314
|
-
const
|
|
1315
|
-
|
|
1312
|
+
const v = s.getSymbolAtLocation(d.type.objectType.typeName);
|
|
1313
|
+
if (v !== void 0) {
|
|
1314
|
+
const b = s.getAliasedSymbol(v), h = je(
|
|
1315
|
+
b,
|
|
1316
1316
|
t,
|
|
1317
1317
|
n,
|
|
1318
1318
|
i,
|
|
1319
|
-
i +
|
|
1319
|
+
i + b.escapedName.length
|
|
1320
1320
|
);
|
|
1321
|
-
return Me(t, c), Me(t, `${
|
|
1321
|
+
return Me(t, c), Me(t, `${h.name}["@eventTypes"]`), h;
|
|
1322
1322
|
}
|
|
1323
1323
|
}
|
|
1324
1324
|
}
|
|
1325
1325
|
if (f !== void 0 || u !== void 0) {
|
|
1326
|
-
const
|
|
1327
|
-
for (let
|
|
1328
|
-
const
|
|
1329
|
-
let
|
|
1330
|
-
if (
|
|
1326
|
+
const v = r ?? ((u ?? f).split("/").pop()?.replaceAll(wn, "") || "type");
|
|
1327
|
+
for (let b = 1; ; b += 1) {
|
|
1328
|
+
const h = b === 1 ? v : `${v}${b}`;
|
|
1329
|
+
let L = n.functionLikeTypeParameters?.has(h) === !0 || n.objectLikeTypeParameters?.has(h) === !0 || n.localDeclarations.has(h);
|
|
1330
|
+
if (L)
|
|
1331
1331
|
continue;
|
|
1332
|
-
const
|
|
1333
|
-
if (
|
|
1332
|
+
const I = n.moduleContext.importsMap[h], y = I !== void 0 && (f === void 0 ? I.modulePath === u : I.specifier === f + (u === void 0 ? "" : `/${u}`));
|
|
1333
|
+
if (y ? I.wasUsed = !0 : L = n.moduleContext.importsMap[h] !== void 0, L)
|
|
1334
1334
|
continue;
|
|
1335
|
-
const
|
|
1336
|
-
|
|
1337
|
-
const
|
|
1338
|
-
|
|
1335
|
+
const k = h !== c;
|
|
1336
|
+
k && (Me(t, h), a = i + h.length);
|
|
1337
|
+
const P = Wn(l), D = P === "named";
|
|
1338
|
+
D || (g = P), f === void 0 && !n.config.strict && ze(
|
|
1339
1339
|
u,
|
|
1340
1340
|
p.fileName.slice(n.basePath.length),
|
|
1341
1341
|
g,
|
|
1342
1342
|
n
|
|
1343
|
-
),
|
|
1344
|
-
type:
|
|
1343
|
+
), y || (n.moduleContext.importsMap[h] = {
|
|
1344
|
+
type: P,
|
|
1345
1345
|
modulePath: f === void 0 ? u : void 0,
|
|
1346
1346
|
specifier: f === void 0 ? ye(ae(n.apiModule).dtsPath, u) : f + (u === void 0 ? "" : `/${u}`),
|
|
1347
1347
|
replacementName: void 0,
|
|
1348
|
-
actualName:
|
|
1348
|
+
actualName: D && k ? r : void 0,
|
|
1349
1349
|
wasUsed: !0
|
|
1350
1350
|
});
|
|
1351
1351
|
break;
|
|
@@ -1525,9 +1525,9 @@ function ht(e, t, n, i) {
|
|
|
1525
1525
|
return e.getText(n).includes("* @public") && i.emitError(
|
|
1526
1526
|
"@public is not permitted in nested types. See options in documentation: https://webgis.esri.com/webgis/core/core/documenting-api#describing-nested-object-types and https://webgis.esri.com/webgis/core/core/documenting-api#variables",
|
|
1527
1527
|
a
|
|
1528
|
-
),
|
|
1528
|
+
), B(e, t, a, i);
|
|
1529
1529
|
}
|
|
1530
|
-
const
|
|
1530
|
+
const G = {
|
|
1531
1531
|
false: 0,
|
|
1532
1532
|
/**
|
|
1533
1533
|
* True for literal types. False for object types
|
|
@@ -1535,34 +1535,34 @@ const O = {
|
|
|
1535
1535
|
shallow: 2,
|
|
1536
1536
|
true: 1
|
|
1537
1537
|
};
|
|
1538
|
-
function
|
|
1538
|
+
function B(e, t, n, i) {
|
|
1539
1539
|
if (e.kind === o.SyntaxKind.TrueKeyword || e.kind === o.SyntaxKind.FalseKeyword)
|
|
1540
|
-
return t ===
|
|
1540
|
+
return t === G.false ? o.factory.createKeywordTypeNode(o.SyntaxKind.BooleanKeyword) : o.factory.createLiteralTypeNode(e);
|
|
1541
1541
|
if (e.kind === o.SyntaxKind.NullKeyword)
|
|
1542
1542
|
return o.factory.createLiteralTypeNode(e);
|
|
1543
1543
|
if (e.kind === o.SyntaxKind.UndefinedKeyword || o.isVoidExpression(e))
|
|
1544
1544
|
return o.factory.createKeywordTypeNode(o.SyntaxKind.UndefinedKeyword);
|
|
1545
1545
|
if (o.isStringLiteral(e) || o.isNoSubstitutionTemplateLiteral(e))
|
|
1546
|
-
return t ===
|
|
1546
|
+
return t === G.false ? o.factory.createKeywordTypeNode(o.SyntaxKind.StringKeyword) : o.factory.createLiteralTypeNode(e);
|
|
1547
1547
|
if (o.isTemplateExpression(e))
|
|
1548
1548
|
return Se(n, t, i) ?? o.factory.createKeywordTypeNode(o.SyntaxKind.StringKeyword);
|
|
1549
1549
|
if (o.isNumericLiteral(e))
|
|
1550
|
-
return t ===
|
|
1550
|
+
return t === G.false ? o.factory.createKeywordTypeNode(o.SyntaxKind.NumberKeyword) : o.factory.createLiteralTypeNode(e);
|
|
1551
1551
|
if (o.isBigIntLiteral(e))
|
|
1552
|
-
return t ===
|
|
1552
|
+
return t === G.false ? o.factory.createKeywordTypeNode(o.SyntaxKind.BigIntKeyword) : o.factory.createLiteralTypeNode(e);
|
|
1553
1553
|
if (o.isAsExpression(e) || o.isTypeAssertionExpression(e))
|
|
1554
|
-
return o.isTypeReferenceNode(e.type) && o.isIdentifier(e.type.typeName) && e.type.typeName.escapedText === "const" ?
|
|
1554
|
+
return o.isTypeReferenceNode(e.type) && o.isIdentifier(e.type.typeName) && e.type.typeName.escapedText === "const" ? B(e.expression, G.true, n, i) : e.type;
|
|
1555
1555
|
if (o.isSatisfiesExpression(e))
|
|
1556
|
-
return t ===
|
|
1556
|
+
return t === G.false ? e.type : B(e.expression, t, n, i);
|
|
1557
1557
|
if (o.isRegularExpressionLiteral(e))
|
|
1558
1558
|
return o.factory.createTypeReferenceNode(o.factory.createIdentifier("RegExp"));
|
|
1559
1559
|
if (o.isArrayLiteralExpression(e)) {
|
|
1560
1560
|
if (i.isInLuminaMinimalExtraction)
|
|
1561
1561
|
return Oe;
|
|
1562
|
-
const a = t ===
|
|
1562
|
+
const a = t === G.shallow ? G.false : t, s = new Array(e.elements.length);
|
|
1563
1563
|
for (let l = 0; l < s.length; ++l) {
|
|
1564
1564
|
const r = e.elements[l];
|
|
1565
|
-
s[l] =
|
|
1565
|
+
s[l] = B(r, a, { ...n, node: r }, i);
|
|
1566
1566
|
}
|
|
1567
1567
|
return a ? o.factory.createTypeOperatorNode(o.SyntaxKind.ReadonlyKeyword, o.factory.createTupleTypeNode(s)) : o.factory.createArrayTypeNode(
|
|
1568
1568
|
s.length === 1 ? s[0] : o.factory.createUnionTypeNode(s)
|
|
@@ -1571,7 +1571,7 @@ function H(e, t, n, i) {
|
|
|
1571
1571
|
if (o.isObjectLiteralExpression(e)) {
|
|
1572
1572
|
if (i.isInLuminaMinimalExtraction)
|
|
1573
1573
|
return Oe;
|
|
1574
|
-
const a = t ===
|
|
1574
|
+
const a = t === G.shallow ? G.false : t, s = new Array(e.properties.length);
|
|
1575
1575
|
for (let l = 0; l < s.length; ++l) {
|
|
1576
1576
|
const r = e.properties[l];
|
|
1577
1577
|
s[l] = Hn(r, a, { ...n, node: r }, i);
|
|
@@ -1581,17 +1581,17 @@ function H(e, t, n, i) {
|
|
|
1581
1581
|
if (o.isPrefixUnaryExpression(e)) {
|
|
1582
1582
|
if (e.operator !== o.SyntaxKind.MinusToken)
|
|
1583
1583
|
return be(n, X, t, i);
|
|
1584
|
-
if (t ===
|
|
1584
|
+
if (t === G.false)
|
|
1585
1585
|
return o.factory.createKeywordTypeNode(o.SyntaxKind.NumberKeyword);
|
|
1586
1586
|
{
|
|
1587
|
-
const a =
|
|
1587
|
+
const a = B(e.operand, t, n, i);
|
|
1588
1588
|
return o.isLiteralTypeNode(a) ? o.factory.createLiteralTypeNode(
|
|
1589
1589
|
o.factory.createPrefixUnaryExpression(o.SyntaxKind.MinusToken, a.literal)
|
|
1590
1590
|
) : be(n, X, t, i);
|
|
1591
1591
|
}
|
|
1592
1592
|
}
|
|
1593
1593
|
if (o.isParenthesizedExpression(e))
|
|
1594
|
-
return
|
|
1594
|
+
return B(e.expression, t, n, i);
|
|
1595
1595
|
if (o.isNewExpression(e)) {
|
|
1596
1596
|
if (i.isInLuminaMinimalExtraction)
|
|
1597
1597
|
return Oe;
|
|
@@ -1600,7 +1600,7 @@ function H(e, t, n, i) {
|
|
|
1600
1600
|
let l = e.typeArguments, r = !1;
|
|
1601
1601
|
if ((s === "Set" || s === "WeakSet") && l === void 0)
|
|
1602
1602
|
if (e.arguments?.[0] !== void 0) {
|
|
1603
|
-
const c =
|
|
1603
|
+
const c = B(
|
|
1604
1604
|
e.arguments[0],
|
|
1605
1605
|
t,
|
|
1606
1606
|
{ ...n, node: e.arguments[0] },
|
|
@@ -1614,14 +1614,14 @@ function H(e, t, n, i) {
|
|
|
1614
1614
|
if (!r)
|
|
1615
1615
|
return o.factory.createTypeReferenceNode(e.expression, l);
|
|
1616
1616
|
}
|
|
1617
|
-
const a =
|
|
1617
|
+
const a = B(e.expression, t, n, i);
|
|
1618
1618
|
if (o.isTypeReferenceNode(a))
|
|
1619
1619
|
return a;
|
|
1620
1620
|
}
|
|
1621
1621
|
if (o.isConditionalExpression(e))
|
|
1622
1622
|
return o.factory.createUnionTypeNode([
|
|
1623
|
-
|
|
1624
|
-
|
|
1623
|
+
B(e.whenTrue, t, { ...n, node: e.whenTrue }, i),
|
|
1624
|
+
B(e.whenFalse, t, { ...n, node: e.whenFalse }, i)
|
|
1625
1625
|
]);
|
|
1626
1626
|
if (o.isIdentifier(e))
|
|
1627
1627
|
return Se(n, t, i) ?? o.factory.createTypeQueryNode(e);
|
|
@@ -1629,7 +1629,7 @@ function H(e, t, n, i) {
|
|
|
1629
1629
|
const a = Se(n, t, i);
|
|
1630
1630
|
if (a !== void 0)
|
|
1631
1631
|
return a;
|
|
1632
|
-
const s =
|
|
1632
|
+
const s = B(e.expression, t, n, i);
|
|
1633
1633
|
return o.isTypeQueryNode(s) ? o.factory.createTypeQueryNode(o.factory.createQualifiedName(s.exprName, e.name)) : s === yt ? yt : be(n, X, t, i);
|
|
1634
1634
|
}
|
|
1635
1635
|
if (o.isCallExpression(e)) {
|
|
@@ -1641,7 +1641,7 @@ function H(e, t, n, i) {
|
|
|
1641
1641
|
const l = Se(n, t, i);
|
|
1642
1642
|
if (l !== void 0)
|
|
1643
1643
|
return l;
|
|
1644
|
-
const r =
|
|
1644
|
+
const r = B(a, t, n, i);
|
|
1645
1645
|
return o.isTypeQueryNode(r) ? o.factory.createTypeReferenceNode(o.factory.createIdentifier("ReturnType"), [
|
|
1646
1646
|
o.factory.createTypeQueryNode(r.exprName, e.typeArguments)
|
|
1647
1647
|
]) : be(n, X, t, i);
|
|
@@ -1649,22 +1649,22 @@ function H(e, t, n, i) {
|
|
|
1649
1649
|
if (o.isArrowFunction(e)) {
|
|
1650
1650
|
if (i.isInLuminaMinimalExtraction)
|
|
1651
1651
|
return Oe;
|
|
1652
|
-
const a = t ===
|
|
1652
|
+
const a = t === G.shallow ? G.false : t;
|
|
1653
1653
|
return o.factory.createFunctionTypeNode(
|
|
1654
1654
|
e.typeParameters,
|
|
1655
1655
|
vt(e.parameters, a, n, i),
|
|
1656
|
-
e.type ?? (o.isBlock(e.body) ? Je(e, i) ?? Q(n, X, i) :
|
|
1656
|
+
e.type ?? (o.isBlock(e.body) ? Je(e, i) ?? Q(n, X, i) : B(e.body, a, n, i))
|
|
1657
1657
|
);
|
|
1658
1658
|
}
|
|
1659
1659
|
return be(n, X, t, i);
|
|
1660
1660
|
}
|
|
1661
1661
|
function Hn(e, t, n, i) {
|
|
1662
|
-
const a = t ===
|
|
1662
|
+
const a = t === G.false ? void 0 : Jn;
|
|
1663
1663
|
return o.isPropertyAssignment(e) ? o.factory.createPropertySignature(
|
|
1664
1664
|
a,
|
|
1665
1665
|
e.name,
|
|
1666
1666
|
void 0,
|
|
1667
|
-
|
|
1667
|
+
B(e.initializer, t, { ...n, node: e.initializer }, i)
|
|
1668
1668
|
) : o.isShorthandPropertyAssignment(e) ? o.factory.createPropertySignature(
|
|
1669
1669
|
a,
|
|
1670
1670
|
e.name,
|
|
@@ -1705,7 +1705,7 @@ function Se(e, t, n) {
|
|
|
1705
1705
|
const i = n.program?.getTypeChecker?.();
|
|
1706
1706
|
if (i !== void 0 && e.node !== void 0) {
|
|
1707
1707
|
let a;
|
|
1708
|
-
const s = t ===
|
|
1708
|
+
const s = t === G.false;
|
|
1709
1709
|
if (s && e.node.kind === o.SyntaxKind.Identifier) {
|
|
1710
1710
|
const r = i.getSymbolAtLocation(e.node);
|
|
1711
1711
|
a = r === void 0 ? void 0 : i.getTypeOfSymbol(r);
|
|
@@ -1754,7 +1754,7 @@ function vt(e, t, n, i) {
|
|
|
1754
1754
|
l.dotDotDotToken,
|
|
1755
1755
|
o.isIdentifier(l.name) ? l.name : o.factory.createIdentifier(`parameter${s}`),
|
|
1756
1756
|
l.questionToken,
|
|
1757
|
-
l.type ?? (l.initializer === void 0 ? Q({ ...n, node: l }, X, i) :
|
|
1757
|
+
l.type ?? (l.initializer === void 0 ? Q({ ...n, node: l }, X, i) : B(
|
|
1758
1758
|
l.initializer,
|
|
1759
1759
|
t,
|
|
1760
1760
|
{
|
|
@@ -1786,9 +1786,9 @@ function Qn(e) {
|
|
|
1786
1786
|
return !1;
|
|
1787
1787
|
}
|
|
1788
1788
|
function z(e, t) {
|
|
1789
|
-
if (
|
|
1789
|
+
if (M = t, We.clear(), U = [], qe.clear(), e.pos !== -1 && e.getText(M.file).includes("* @public") && M.emitError(
|
|
1790
1790
|
"@public JSDoc tag may only appear in interfaces, top-level of type alias, or top-level intersection inside a type-alias. @public JSDoc tag inside inline object literal types or deeper aliases is not supported as such are tricky to represent in the docs UI. Refactor out the type into a separate top-level interface/type-alias. Documentation: https://webgis.esri.com/webgis/core/core/documenting-api#describing-nested-object-types",
|
|
1791
|
-
{ file:
|
|
1791
|
+
{ file: M.file, node: e }
|
|
1792
1792
|
), e.kind === o.SyntaxKind.Identifier || e.kind === o.SyntaxKind.QualifiedName)
|
|
1793
1793
|
Ke(e);
|
|
1794
1794
|
else if (o.isFunctionTypeNode(e) || o.isConstructorTypeNode(e)) {
|
|
@@ -1806,7 +1806,7 @@ function z(e, t) {
|
|
|
1806
1806
|
source: void 0
|
|
1807
1807
|
};
|
|
1808
1808
|
}
|
|
1809
|
-
let
|
|
1809
|
+
let M;
|
|
1810
1810
|
const ve = (e, t, n) => {
|
|
1811
1811
|
switch (t.kind) {
|
|
1812
1812
|
case o.SyntaxKind.TypeReference:
|
|
@@ -1832,7 +1832,7 @@ const ve = (e, t, n) => {
|
|
|
1832
1832
|
Ke(a);
|
|
1833
1833
|
break;
|
|
1834
1834
|
case o.SyntaxKind.TypeQuery:
|
|
1835
|
-
const l = qn(t,
|
|
1835
|
+
const l = qn(t, M);
|
|
1836
1836
|
if (l !== void 0)
|
|
1837
1837
|
return ve(e, l, n);
|
|
1838
1838
|
Ke(t.exprName, eo);
|
|
@@ -1854,14 +1854,14 @@ const ve = (e, t, n) => {
|
|
|
1854
1854
|
if (
|
|
1855
1855
|
// In public types, Lumina's "component" and "el" have the same type
|
|
1856
1856
|
// Thus print ArcgisHome["el"] as just ArcgisHome
|
|
1857
|
-
|
|
1857
|
+
M.isComponentProject && d.indexType.kind === o.SyntaxKind.LiteralType && d.indexType.literal.text === "el"
|
|
1858
1858
|
)
|
|
1859
1859
|
return ve(e, d.objectType, n);
|
|
1860
1860
|
break;
|
|
1861
1861
|
case o.SyntaxKind.ImportType:
|
|
1862
|
-
|
|
1862
|
+
M.emitError(
|
|
1863
1863
|
`\`import()\` syntax inside types is not supported - refactor to import the type at the top of the file${t.pos === -1 ? ". The import() syntax might also be inserted by TypeScript if you are referencing a type that is not otherwise accessible - refactor such cases by adding explicit type annotation." : ""}`,
|
|
1864
|
-
{ file:
|
|
1864
|
+
{ file: M.file, node: t }
|
|
1865
1865
|
);
|
|
1866
1866
|
break;
|
|
1867
1867
|
}
|
|
@@ -1892,11 +1892,11 @@ function Ke(e, t = 0) {
|
|
|
1892
1892
|
const c = a;
|
|
1893
1893
|
if (c.pos === -1 && c.symbol !== void 0) {
|
|
1894
1894
|
U.push(
|
|
1895
|
-
je(c.symbol, c,
|
|
1895
|
+
je(c.symbol, c, M, l, r)
|
|
1896
1896
|
);
|
|
1897
1897
|
return;
|
|
1898
1898
|
}
|
|
1899
|
-
if (
|
|
1899
|
+
if (M.functionLikeTypeParameters?.has(s) === !0) {
|
|
1900
1900
|
U.push({
|
|
1901
1901
|
name: s,
|
|
1902
1902
|
module: void 0,
|
|
@@ -1907,7 +1907,7 @@ function Ke(e, t = 0) {
|
|
|
1907
1907
|
});
|
|
1908
1908
|
return;
|
|
1909
1909
|
}
|
|
1910
|
-
if (
|
|
1910
|
+
if (M.objectLikeTypeParameters?.has(s) === !0) {
|
|
1911
1911
|
U.push({
|
|
1912
1912
|
name: s,
|
|
1913
1913
|
module: void 0,
|
|
@@ -1918,70 +1918,70 @@ function Ke(e, t = 0) {
|
|
|
1918
1918
|
});
|
|
1919
1919
|
return;
|
|
1920
1920
|
}
|
|
1921
|
-
if (
|
|
1921
|
+
if (M.localDeclarations.has(s)) {
|
|
1922
1922
|
U.push({
|
|
1923
1923
|
name: s,
|
|
1924
1924
|
module: void 0,
|
|
1925
1925
|
package: void 0,
|
|
1926
1926
|
viewUrl: Ge(
|
|
1927
|
-
|
|
1928
|
-
s ===
|
|
1927
|
+
M.apiModule.path,
|
|
1928
|
+
s === M.exportDefaultName ? void 0 : s,
|
|
1929
1929
|
void 0,
|
|
1930
|
-
|
|
1930
|
+
M
|
|
1931
1931
|
),
|
|
1932
1932
|
start: l,
|
|
1933
1933
|
end: r
|
|
1934
1934
|
});
|
|
1935
1935
|
return;
|
|
1936
1936
|
}
|
|
1937
|
-
if (
|
|
1938
|
-
|
|
1937
|
+
if (M.localPrivateDeclarations?.has(s) === !0) {
|
|
1938
|
+
M.localPrivateDeclarations.set(s, Math.abs(M.localPrivateDeclarations.get(s))), U.push({
|
|
1939
1939
|
name: s,
|
|
1940
1940
|
module: void 0,
|
|
1941
1941
|
package: void 0,
|
|
1942
1942
|
viewUrl: Ge(
|
|
1943
|
-
|
|
1944
|
-
s ===
|
|
1943
|
+
M.apiModule.path,
|
|
1944
|
+
s === M.exportDefaultName ? void 0 : s,
|
|
1945
1945
|
void 0,
|
|
1946
|
-
|
|
1946
|
+
M
|
|
1947
1947
|
),
|
|
1948
1948
|
start: l,
|
|
1949
1949
|
end: r
|
|
1950
1950
|
});
|
|
1951
1951
|
return;
|
|
1952
1952
|
}
|
|
1953
|
-
const d =
|
|
1953
|
+
const d = M.moduleContext.importsMap[s];
|
|
1954
1954
|
if (d !== void 0) {
|
|
1955
1955
|
d.wasUsed = !0;
|
|
1956
1956
|
const g = d.type === "named";
|
|
1957
|
-
d.replacementName !== void 0 && (Me(a, d.replacementName), r = l + d.replacementName.length), d.replacementName !== void 0 && (
|
|
1957
|
+
d.replacementName !== void 0 && (Me(a, d.replacementName), r = l + d.replacementName.length), d.replacementName !== void 0 && (M.functionLikeTypeParameters?.has(d.replacementName) === !0 || M.objectLikeTypeParameters?.has(d.replacementName) === !0) && M.emitError(
|
|
1958
1958
|
`Can't do a type replacement of ${ne.green(s)} to ${ne.red(d.replacementName)} as the latter name conflicts with a type parameter name in the current scope. Rename the type parameter or refactor out the type replacement.`,
|
|
1959
|
-
{ file:
|
|
1959
|
+
{ file: M.file, node: e }
|
|
1960
1960
|
);
|
|
1961
1961
|
const E = g ? d.actualName ?? d.replacementName ?? s : void 0;
|
|
1962
1962
|
if (d.modulePath === void 0) {
|
|
1963
|
-
if (
|
|
1964
|
-
const
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
{ file:
|
|
1963
|
+
if (M.config.strict) {
|
|
1964
|
+
const h = ct(d.specifier);
|
|
1965
|
+
M.runtimeDependencyNames.has(h) || M.emitError(
|
|
1966
|
+
h === "esri" ? `Found unexpected absolute path import of ${ne.red(E ?? d.type)} from ${ne.red(d.specifier)}. Did you mean to use a relative import instead?` : `Type ${ne.red(E ?? d.type)} imported from ${ne.red(h)} cannot be referenced in public types as this dependency is not declared as a "dependency" in the package.json`,
|
|
1967
|
+
{ file: M.file, node: e }
|
|
1968
1968
|
);
|
|
1969
1969
|
}
|
|
1970
|
-
} else
|
|
1970
|
+
} else M.config.strict || ze(
|
|
1971
1971
|
d.modulePath,
|
|
1972
1972
|
pt(
|
|
1973
|
-
|
|
1973
|
+
M.apiModule.sourcePath.slice(M.config.context.basePath.length),
|
|
1974
1974
|
d.specifier
|
|
1975
1975
|
),
|
|
1976
1976
|
g ? E : d.type,
|
|
1977
|
-
|
|
1977
|
+
M
|
|
1978
1978
|
);
|
|
1979
|
-
let
|
|
1980
|
-
|
|
1979
|
+
let v, b = d.modulePath;
|
|
1980
|
+
b === void 0 && (v = ct(d.specifier), b = d.specifier.length === v.length ? void 0 : d.specifier.slice(v.length + 1)), U.push({
|
|
1981
1981
|
name: E ?? d.type,
|
|
1982
|
-
module:
|
|
1983
|
-
package:
|
|
1984
|
-
viewUrl: d.modulePath === void 0 ? di(
|
|
1982
|
+
module: b,
|
|
1983
|
+
package: v,
|
|
1984
|
+
viewUrl: d.modulePath === void 0 ? di(v, b, g ? s : d.type, M) : Ge(d.modulePath, E, void 0, M),
|
|
1985
1985
|
start: l,
|
|
1986
1986
|
end: r
|
|
1987
1987
|
});
|
|
@@ -1999,24 +1999,24 @@ function Ke(e, t = 0) {
|
|
|
1999
1999
|
});
|
|
2000
2000
|
let g = p;
|
|
2001
2001
|
if (g.length > 1) {
|
|
2002
|
-
let E = n.length - 2,
|
|
2002
|
+
let E = n.length - 2, v = r + 1;
|
|
2003
2003
|
for (; g[1] !== void 0 && E >= 0; ) {
|
|
2004
|
-
const
|
|
2005
|
-
if (g = g[1][
|
|
2006
|
-
|
|
2007
|
-
file:
|
|
2004
|
+
const b = n[E--];
|
|
2005
|
+
if (g = g[1][b.escapedText], g === void 0)
|
|
2006
|
+
M.emitError("Failed to resolve the definition of the type reference", {
|
|
2007
|
+
file: M.file,
|
|
2008
2008
|
node: e
|
|
2009
2009
|
});
|
|
2010
2010
|
else {
|
|
2011
|
-
const
|
|
2011
|
+
const h = v + b.escapedText.length;
|
|
2012
2012
|
U.push({
|
|
2013
|
-
name:
|
|
2013
|
+
name: b.escapedText,
|
|
2014
2014
|
module: void 0,
|
|
2015
2015
|
package: De,
|
|
2016
2016
|
viewUrl: g[0]?.startsWith("https") === !1 ? `${ut}${g[0]}` : g[0] ?? void 0,
|
|
2017
|
-
start:
|
|
2018
|
-
end:
|
|
2019
|
-
}),
|
|
2017
|
+
start: v,
|
|
2018
|
+
end: h
|
|
2019
|
+
}), v = h + 1;
|
|
2020
2020
|
}
|
|
2021
2021
|
}
|
|
2022
2022
|
}
|
|
@@ -2024,14 +2024,14 @@ function Ke(e, t = 0) {
|
|
|
2024
2024
|
}
|
|
2025
2025
|
if (qe.has(s))
|
|
2026
2026
|
return;
|
|
2027
|
-
const u =
|
|
2027
|
+
const u = M.program?.getTypeChecker?.()?.getSymbolAtLocation(a);
|
|
2028
2028
|
if (u !== void 0) {
|
|
2029
|
-
U.push(je(u, a,
|
|
2029
|
+
U.push(je(u, a, M, l, r));
|
|
2030
2030
|
return;
|
|
2031
2031
|
}
|
|
2032
|
-
|
|
2032
|
+
M.emitError(
|
|
2033
2033
|
"Failed to resolve the definition of the type reference. Ensure it has @public or refactor out its usage from the public API type",
|
|
2034
|
-
{ file:
|
|
2034
|
+
{ file: M.file, node: e }
|
|
2035
2035
|
);
|
|
2036
2036
|
}
|
|
2037
2037
|
function Me(e, t) {
|
|
@@ -2216,7 +2216,7 @@ const ro = Ze(), lo = {
|
|
|
2216
2216
|
function de(e, t, n, i, a) {
|
|
2217
2217
|
if (i.docsTags === void 0 || n === void 0)
|
|
2218
2218
|
return;
|
|
2219
|
-
const s = i.docsTags.indexOf(
|
|
2219
|
+
const s = i.docsTags.indexOf(V.copyDoc);
|
|
2220
2220
|
if (s === -1)
|
|
2221
2221
|
return;
|
|
2222
2222
|
const l = i.name;
|
|
@@ -2251,29 +2251,29 @@ function Ae(e, t, n, i) {
|
|
|
2251
2251
|
});
|
|
2252
2252
|
return;
|
|
2253
2253
|
}
|
|
2254
|
-
const a = n ?? e, s = n !== void 0 && !o.isVariableStatement(n), l = o.isMethodDeclaration(e), r = o.isMethodSignature(e), c = l || r || s, m = n !== void 0 && o.isVariableStatement(n), p = o.isFunctionDeclaration(e) || m, f = !s && !m && o.isFunctionTypeNode(e) || o.isCallSignatureDeclaration(e), u = o.isConstructorDeclaration(e), g = u || o.isConstructSignatureDeclaration(e) || o.isConstructorTypeNode(e), E = i.isInLuminaMinimalExtraction || i.jsDoc === Ce,
|
|
2255
|
-
let
|
|
2254
|
+
const a = n ?? e, s = n !== void 0 && !o.isVariableStatement(n), l = o.isMethodDeclaration(e), r = o.isMethodSignature(e), c = l || r || s, m = n !== void 0 && o.isVariableStatement(n), p = o.isFunctionDeclaration(e) || m, f = !s && !m && o.isFunctionTypeNode(e) || o.isCallSignatureDeclaration(e), u = o.isConstructorDeclaration(e), g = u || o.isConstructSignatureDeclaration(e) || o.isConstructorTypeNode(e), E = i.isInLuminaMinimalExtraction || i.jsDoc === Ce, v = Ze();
|
|
2255
|
+
let b, h, L = !1, I = !1;
|
|
2256
2256
|
if (!p && a.modifiers !== void 0)
|
|
2257
|
-
for (let
|
|
2258
|
-
switch (a.modifiers[
|
|
2257
|
+
for (let C = 0; C < a.modifiers.length; ++C)
|
|
2258
|
+
switch (a.modifiers[C].kind) {
|
|
2259
2259
|
case o.SyntaxKind.StaticKeyword:
|
|
2260
|
-
|
|
2260
|
+
b = !0;
|
|
2261
2261
|
break;
|
|
2262
2262
|
case o.SyntaxKind.ProtectedKeyword:
|
|
2263
|
-
|
|
2263
|
+
h = "protected";
|
|
2264
2264
|
break;
|
|
2265
2265
|
case o.SyntaxKind.AbstractKeyword:
|
|
2266
|
-
|
|
2266
|
+
L = !0;
|
|
2267
2267
|
break;
|
|
2268
2268
|
case o.SyntaxKind.AsyncKeyword:
|
|
2269
|
-
|
|
2269
|
+
I = !0;
|
|
2270
2270
|
break;
|
|
2271
2271
|
}
|
|
2272
|
-
const
|
|
2273
|
-
[Y]:
|
|
2272
|
+
const y = {
|
|
2273
|
+
[Y]: v,
|
|
2274
2274
|
kind: c ? "method" : p ? "function" : f ? "call-signature" : g ? "constructor" : void 0,
|
|
2275
2275
|
name: g || f ? void 0 : t,
|
|
2276
|
-
static:
|
|
2276
|
+
static: b,
|
|
2277
2277
|
deprecated: void 0,
|
|
2278
2278
|
summary: void 0,
|
|
2279
2279
|
description: void 0,
|
|
@@ -2283,7 +2283,7 @@ function Ae(e, t, n, i) {
|
|
|
2283
2283
|
return: u ? void 0 : {
|
|
2284
2284
|
summary: void 0,
|
|
2285
2285
|
description: void 0,
|
|
2286
|
-
type: E ?
|
|
2286
|
+
type: E ? I ? oo : ui : z(
|
|
2287
2287
|
e.type ?? Je(e, i) ?? Q(
|
|
2288
2288
|
{ file: i.file, node: e },
|
|
2289
2289
|
"@public function must have a return type annotation",
|
|
@@ -2294,20 +2294,20 @@ function Ae(e, t, n, i) {
|
|
|
2294
2294
|
},
|
|
2295
2295
|
inheritedFrom: void 0,
|
|
2296
2296
|
signature: void 0,
|
|
2297
|
-
privacy:
|
|
2297
|
+
privacy: h,
|
|
2298
2298
|
source: void 0
|
|
2299
|
-
},
|
|
2300
|
-
let
|
|
2301
|
-
for (let
|
|
2302
|
-
const
|
|
2299
|
+
}, k = y, P = ln(y, i.jsDoc), D = E ? [] : e.parameters;
|
|
2300
|
+
let x = P.length, T = !1, K = 0;
|
|
2301
|
+
for (let C = 0; C < D.length; ++C) {
|
|
2302
|
+
const S = D[C], A = o.isIdentifier(S.name) ? S.name.escapedText : void 0;
|
|
2303
2303
|
if (A === "this") {
|
|
2304
|
-
|
|
2304
|
+
K -= 1;
|
|
2305
2305
|
continue;
|
|
2306
2306
|
}
|
|
2307
|
-
const
|
|
2308
|
-
if (
|
|
2309
|
-
|
|
2310
|
-
const q = vi(
|
|
2307
|
+
const W = u && A !== void 0 && S.modifiers !== void 0 && S.modifiers.length > 0 ? j(S, !0, i) : void 0;
|
|
2308
|
+
if (W !== void 0) {
|
|
2309
|
+
K -= 1, x += 1, i.jsDoc = W;
|
|
2310
|
+
const q = vi(S, A, !1, i);
|
|
2311
2311
|
if (q === void 0)
|
|
2312
2312
|
continue;
|
|
2313
2313
|
i.apiObject.members.push(q);
|
|
@@ -2318,87 +2318,87 @@ function Ae(e, t, n, i) {
|
|
|
2318
2318
|
description: q.description,
|
|
2319
2319
|
docsTags: void 0,
|
|
2320
2320
|
optional: void 0,
|
|
2321
|
-
rest:
|
|
2321
|
+
rest: S.dotDotDotToken ? !0 : void 0,
|
|
2322
2322
|
type: q.type,
|
|
2323
2323
|
default: q.default
|
|
2324
2324
|
};
|
|
2325
|
-
pe.optional = Bt(
|
|
2325
|
+
pe.optional = Bt(S, pe), y.parameters.push(pe);
|
|
2326
2326
|
continue;
|
|
2327
2327
|
}
|
|
2328
|
-
let F =
|
|
2329
|
-
if (!i.config.strict && (F === void 0 || A === void 0) && (F = A ?? `parameter${
|
|
2328
|
+
let F = P[C + K]?.text, N, w;
|
|
2329
|
+
if (!i.config.strict && (F === void 0 || A === void 0) && (F = A ?? `parameter${C}`), F === void 0) {
|
|
2330
2330
|
i.emitError(
|
|
2331
2331
|
`Expected @param tag for every parameter on a public function. If you need to include a non-public parameter on a public function, see https://webgis.esri.com/webgis/core/core/documenting-api#param${g ? " and https://webgis.esri.com/webgis/core/core/documenting-api#constructor" : ""}`,
|
|
2332
|
-
{ file: i.file, node:
|
|
2333
|
-
),
|
|
2332
|
+
{ file: i.file, node: S }
|
|
2333
|
+
), T = !0;
|
|
2334
2334
|
break;
|
|
2335
2335
|
}
|
|
2336
|
-
const
|
|
2337
|
-
if (
|
|
2338
|
-
`)) && (w = w.slice(2).trim()), A !== void 0 && A !==
|
|
2339
|
-
const q =
|
|
2336
|
+
const H = F.indexOf(" ");
|
|
2337
|
+
if (N = H === -1 ? F : F.slice(0, H), w = H === -1 ? "" : F.slice(H + 1).trim(), (w.startsWith("- ") || w.startsWith(`-
|
|
2338
|
+
`)) && (w = w.slice(2).trim()), A !== void 0 && A !== N && `_${N}` !== A) {
|
|
2339
|
+
const q = N.startsWith("[") || N.endsWith("]");
|
|
2340
2340
|
if (i.config.strict) {
|
|
2341
2341
|
i.emitError(
|
|
2342
|
-
`The '${A}' TypeScript parameter name does not match the @param tag at position ${
|
|
2342
|
+
`The '${A}' TypeScript parameter name does not match the @param tag at position ${C}, '${N}'${q ? ". If you meant to mark the parameter as optional, use TypeScript's `?` syntax or `=` default value syntax instead of JSDoc [square brackets]" : ""}`,
|
|
2343
2343
|
{
|
|
2344
2344
|
file: i.file,
|
|
2345
|
-
node:
|
|
2345
|
+
node: S
|
|
2346
2346
|
}
|
|
2347
|
-
),
|
|
2347
|
+
), T = !0;
|
|
2348
2348
|
break;
|
|
2349
2349
|
} else
|
|
2350
|
-
|
|
2350
|
+
N = A.startsWith("_") ? A.slice(1) : A;
|
|
2351
2351
|
}
|
|
2352
|
-
const me =
|
|
2353
|
-
{ file: i.file, node:
|
|
2354
|
-
`Public parameter ${
|
|
2352
|
+
const me = S.type ?? (S.initializer === void 0 ? Q(
|
|
2353
|
+
{ file: i.file, node: S },
|
|
2354
|
+
`Public parameter ${N} must have a type annotation or a default value`,
|
|
2355
2355
|
i
|
|
2356
|
-
) : ht(
|
|
2357
|
-
name:
|
|
2356
|
+
) : ht(S.initializer, G.false, i.file, i)), ke = z(me, i), ie = {
|
|
2357
|
+
name: N,
|
|
2358
2358
|
deprecated: void 0,
|
|
2359
2359
|
summary: void 0,
|
|
2360
2360
|
description: w || void 0,
|
|
2361
2361
|
docsTags: void 0,
|
|
2362
2362
|
optional: void 0,
|
|
2363
|
-
rest:
|
|
2363
|
+
rest: S.dotDotDotToken ? !0 : void 0,
|
|
2364
2364
|
type: ke,
|
|
2365
|
-
default: Be(
|
|
2365
|
+
default: Be(S.initializer, void 0, i.file)
|
|
2366
2366
|
};
|
|
2367
|
-
ie.optional = Bt(
|
|
2367
|
+
ie.optional = Bt(S, ie), y.parameters.push(ie);
|
|
2368
2368
|
}
|
|
2369
|
-
if (i.config.strict && !
|
|
2370
|
-
`Expected @param tags to match the number of parameters on a public function. Found ${
|
|
2369
|
+
if (i.config.strict && !T && x !== y.parameters.length && i.emitError(
|
|
2370
|
+
`Expected @param tags to match the number of parameters on a public function. Found ${P.length} @param tags for ${y.parameters.length} TypeScript parameters. Documentation: https://webgis.esri.com/webgis/core/core/documenting-api#param${g ? " and https://webgis.esri.com/webgis/core/core/documenting-api#constructor" : ""}`,
|
|
2371
2371
|
{ file: i.file, node: e }
|
|
2372
|
-
),
|
|
2373
|
-
|
|
2372
|
+
), y.parameters.length === 0)
|
|
2373
|
+
y.parameters = void 0;
|
|
2374
2374
|
else {
|
|
2375
|
-
let
|
|
2376
|
-
for (let
|
|
2377
|
-
const
|
|
2378
|
-
|
|
2375
|
+
let C = !0;
|
|
2376
|
+
for (let S = y.parameters.length - 1; S >= 0; S--) {
|
|
2377
|
+
const R = y.parameters[S];
|
|
2378
|
+
C &&= R.optional === !0 || R.rest === !0, !C && R.optional && (R.optional = void 0, R.type.text += " | undefined");
|
|
2379
2379
|
}
|
|
2380
2380
|
}
|
|
2381
|
-
l && i.componentTagName !== void 0 && (
|
|
2381
|
+
l && i.componentTagName !== void 0 && (k.signature = Hi(k), I && !Fi(k) && i.emitError("Public method marked as async must have a Promise<SomeType> return type annotation.", {
|
|
2382
2382
|
file: i.file,
|
|
2383
2383
|
node: e
|
|
2384
2384
|
})), i.functionLikeTypeParameters = void 0;
|
|
2385
|
-
const
|
|
2386
|
-
return p && (
|
|
2385
|
+
const O = p ? et(a) : 0, J = p && i.exportDefaultName === t, $ = O === 2 || J;
|
|
2386
|
+
return p && ($ ? Ct(y, !0, i) : O === 0 && i.config.strict && i.emitError("Expected @public function to be exported using named or default export.", {
|
|
2387
2387
|
file: i.file,
|
|
2388
2388
|
node: e
|
|
2389
|
-
})), i.produceDts && (c || g || f ? (
|
|
2389
|
+
})), i.produceDts && (c || g || f ? (L && (v.isAbstract = !0), v.hasQuestionToken = a.questionToken !== void 0 ? !0 : void 0) : v.isDefaultExported = $ || void 0), c ? po(
|
|
2390
2390
|
i,
|
|
2391
2391
|
n ?? e,
|
|
2392
2392
|
i.config.documentation.copyDocDefinitions.methods,
|
|
2393
|
-
|
|
2393
|
+
y,
|
|
2394
2394
|
i.apiObject
|
|
2395
2395
|
) : p && uo(
|
|
2396
2396
|
i,
|
|
2397
2397
|
n ?? e,
|
|
2398
2398
|
i.config.documentation.copyDocDefinitions.functions,
|
|
2399
|
-
|
|
2399
|
+
y,
|
|
2400
2400
|
i.apiModule
|
|
2401
|
-
),
|
|
2401
|
+
), y;
|
|
2402
2402
|
}
|
|
2403
2403
|
const Bt = (e, t) => (
|
|
2404
2404
|
// Keep ? as is
|
|
@@ -2627,10 +2627,10 @@ function vi(e, t, n, i) {
|
|
|
2627
2627
|
return;
|
|
2628
2628
|
}
|
|
2629
2629
|
const a = e, s = xe(a.modifiers, "property") ?? (i.pairedSetter === void 0 ? void 0 : xe(i.pairedSetter.modifiers, "property")), l = s?.arguments[0], r = l !== void 0 && o.isObjectLiteralExpression(l) ? l.properties : void 0, c = o.isPropertyDeclaration(e) || o.isPropertySignature(e), m = o.isGetAccessor(e), d = wi(), p = i.isInLuminaMinimalExtraction || i.jsDoc === Ce;
|
|
2630
|
-
let f = !1, u = !1, g, E = !1,
|
|
2630
|
+
let f = !1, u = !1, g, E = !1, v, b, h;
|
|
2631
2631
|
if (c && e.modifiers !== void 0)
|
|
2632
|
-
for (let
|
|
2633
|
-
switch (e.modifiers[
|
|
2632
|
+
for (let C = 0; C < e.modifiers.length; ++C)
|
|
2633
|
+
switch (e.modifiers[C].kind) {
|
|
2634
2634
|
case o.SyntaxKind.ReadonlyKeyword:
|
|
2635
2635
|
f = !0;
|
|
2636
2636
|
continue;
|
|
@@ -2641,44 +2641,44 @@ function vi(e, t, n, i) {
|
|
|
2641
2641
|
g = "protected";
|
|
2642
2642
|
continue;
|
|
2643
2643
|
case o.SyntaxKind.StaticKeyword:
|
|
2644
|
-
|
|
2644
|
+
v = !0;
|
|
2645
2645
|
continue;
|
|
2646
2646
|
case o.SyntaxKind.AbstractKeyword:
|
|
2647
2647
|
E = !0;
|
|
2648
2648
|
continue;
|
|
2649
2649
|
}
|
|
2650
2650
|
n ||= f || m && i.pairedSetter === void 0;
|
|
2651
|
-
const
|
|
2652
|
-
let
|
|
2651
|
+
const L = i.apiObject.customElement === !0;
|
|
2652
|
+
let I = !1;
|
|
2653
2653
|
if (i.moduleHasAccessorLikeClass)
|
|
2654
2654
|
if (r !== void 0) {
|
|
2655
|
-
for (let
|
|
2656
|
-
const
|
|
2657
|
-
if (!o.isPropertyAssignment(
|
|
2658
|
-
|
|
2655
|
+
for (let C = 0; C < r.length; ++C) {
|
|
2656
|
+
const S = r[C];
|
|
2657
|
+
if (!o.isPropertyAssignment(S)) {
|
|
2658
|
+
I ||= o.isSpreadAssignment(S);
|
|
2659
2659
|
continue;
|
|
2660
2660
|
}
|
|
2661
|
-
const
|
|
2662
|
-
|
|
2661
|
+
const R = S.name.escapedText;
|
|
2662
|
+
R === "readOnly" && oe(S.initializer, i) ? n = !0 : R === "constructOnly" && oe(S.initializer, i) ? d.isConstructorOnly = !0 : R === "type" ? d.hasAutoCasting = !0 : R === "types" && Io(
|
|
2663
2663
|
d,
|
|
2664
|
-
|
|
2664
|
+
S.initializer?.kind === o.SyntaxKind.ObjectLiteralExpression ? S.initializer : void 0
|
|
2665
2665
|
);
|
|
2666
2666
|
}
|
|
2667
|
-
|
|
2667
|
+
I && d.hasAutoCasting === void 0 && (d.hasAutoCasting = !0, d.autoCastingRequiresType = !0);
|
|
2668
2668
|
} else l !== void 0 && (d.hasAutoCasting = !0, d.autoCastingRequiresType = !0);
|
|
2669
|
-
else if (
|
|
2670
|
-
const
|
|
2669
|
+
else if (L) {
|
|
2670
|
+
const C = i.apiObject;
|
|
2671
2671
|
if (s === void 0) {
|
|
2672
2672
|
if (p)
|
|
2673
2673
|
return;
|
|
2674
2674
|
{
|
|
2675
|
-
const
|
|
2676
|
-
if (
|
|
2677
|
-
|
|
2675
|
+
const S = c && !v ? Do(e, t, i) : void 0;
|
|
2676
|
+
if (S !== void 0) {
|
|
2677
|
+
C.events ??= [], C.events.push(S);
|
|
2678
2678
|
return;
|
|
2679
|
-
} else !i.config.strict && gi(e) ? (g = "protected",
|
|
2679
|
+
} else !i.config.strict && gi(e) ? (g = "protected", b = !1, i.jsDoc = {
|
|
2680
2680
|
...i.jsDoc,
|
|
2681
|
-
docsTags: [...i.jsDoc.docsTags,
|
|
2681
|
+
docsTags: [...i.jsDoc.docsTags, V.internal]
|
|
2682
2682
|
}) : s === void 0 && i.emitError(
|
|
2683
2683
|
"Public properties on a Lumina component must have a @property() decorator for lazy-loading compatibility.",
|
|
2684
2684
|
{
|
|
@@ -2688,124 +2688,124 @@ function vi(e, t, n, i) {
|
|
|
2688
2688
|
);
|
|
2689
2689
|
}
|
|
2690
2690
|
} else if (r !== void 0)
|
|
2691
|
-
for (let
|
|
2692
|
-
const
|
|
2693
|
-
if (!(!o.isPropertyAssignment(
|
|
2694
|
-
switch (
|
|
2691
|
+
for (let S = 0; S < r.length; ++S) {
|
|
2692
|
+
const R = r[S];
|
|
2693
|
+
if (!(!o.isPropertyAssignment(R) || !o.isIdentifier(R.name)))
|
|
2694
|
+
switch (R.name.escapedText) {
|
|
2695
2695
|
case "attribute":
|
|
2696
|
-
o.isStringLiteral(
|
|
2696
|
+
o.isStringLiteral(R.initializer) ? b = R.initializer.text : b = oe(R.initializer, i);
|
|
2697
2697
|
continue;
|
|
2698
2698
|
case "reflect":
|
|
2699
|
-
oe(
|
|
2699
|
+
oe(R.initializer, i) && (b ??= !0, h = !0);
|
|
2700
2700
|
continue;
|
|
2701
2701
|
case "readOnly":
|
|
2702
|
-
oe(
|
|
2702
|
+
oe(R.initializer, i) && (n = !0);
|
|
2703
2703
|
continue;
|
|
2704
2704
|
case "type":
|
|
2705
2705
|
case "converter":
|
|
2706
|
-
|
|
2706
|
+
b ??= !0;
|
|
2707
2707
|
continue;
|
|
2708
2708
|
}
|
|
2709
2709
|
}
|
|
2710
2710
|
}
|
|
2711
|
-
const
|
|
2712
|
-
u ||= s !== void 0 || m ||
|
|
2713
|
-
const
|
|
2714
|
-
let
|
|
2715
|
-
if (
|
|
2716
|
-
const
|
|
2717
|
-
if (c &&
|
|
2711
|
+
const y = i.pairedSetter ?? (o.isSetAccessor(e) ? e : void 0), k = n ? void 0 : y;
|
|
2712
|
+
u ||= s !== void 0 || m || y !== void 0, d.isAccessor = u || void 0;
|
|
2713
|
+
const P = k?.parameters[0].type, D = a.type;
|
|
2714
|
+
let x = P ?? D;
|
|
2715
|
+
if (x === void 0) {
|
|
2716
|
+
const C = k?.parameters[0].initializer ?? e.initializer;
|
|
2717
|
+
if (c && C !== void 0 && o.isArrowFunction(C)) {
|
|
2718
2718
|
if (n)
|
|
2719
|
-
return $t(
|
|
2719
|
+
return $t(C, t, e, i);
|
|
2720
2720
|
jt(e, i);
|
|
2721
2721
|
}
|
|
2722
|
-
|
|
2722
|
+
x = C === void 0 ? zn(e, i) ?? Q(
|
|
2723
2723
|
{ file: i.file, node: e },
|
|
2724
2724
|
"Public property must have a type annotation or a default value",
|
|
2725
2725
|
i
|
|
2726
|
-
) : ht(
|
|
2727
|
-
} else if (
|
|
2726
|
+
) : ht(C, n ? G.shallow : G.false, i.file, i);
|
|
2727
|
+
} else if (x = Et(x), c && o.isFunctionTypeNode(x)) {
|
|
2728
2728
|
if (n)
|
|
2729
|
-
return $t(
|
|
2729
|
+
return $t(x, t, e, i);
|
|
2730
2730
|
jt(e, i);
|
|
2731
2731
|
}
|
|
2732
|
-
const
|
|
2732
|
+
const T = {
|
|
2733
2733
|
[Y]: d,
|
|
2734
2734
|
kind: "field",
|
|
2735
2735
|
name: t,
|
|
2736
|
-
static:
|
|
2736
|
+
static: v,
|
|
2737
2737
|
deprecated: void 0,
|
|
2738
2738
|
summary: void 0,
|
|
2739
2739
|
description: void 0,
|
|
2740
2740
|
docsTags: void 0,
|
|
2741
2741
|
// In minimal extraction, we care only for type.values (set below)
|
|
2742
|
-
type: p ? { ...ui } : z(
|
|
2742
|
+
type: p ? { ...ui } : z(x, i),
|
|
2743
2743
|
getterType: void 0,
|
|
2744
2744
|
default: void 0,
|
|
2745
2745
|
readonly: n || void 0,
|
|
2746
2746
|
inheritedFrom: void 0,
|
|
2747
2747
|
privacy: g,
|
|
2748
2748
|
source: void 0,
|
|
2749
|
-
attribute: !
|
|
2750
|
-
reflects:
|
|
2749
|
+
attribute: !L || b === !1 ? void 0 : typeof b == "string" ? b : qi(t),
|
|
2750
|
+
reflects: h,
|
|
2751
2751
|
docsOnlyReadonly: void 0
|
|
2752
2752
|
};
|
|
2753
|
-
cn(
|
|
2754
|
-
const
|
|
2755
|
-
|
|
2756
|
-
const
|
|
2757
|
-
if (
|
|
2758
|
-
!n &&
|
|
2759
|
-
const
|
|
2760
|
-
|
|
2761
|
-
const
|
|
2753
|
+
cn(T, i.jsDoc);
|
|
2754
|
+
const K = T.default;
|
|
2755
|
+
L && t === "messageOverrides" && (d.dtsTypeOverride = T.type.text, T.type = ao);
|
|
2756
|
+
const O = L && s !== void 0;
|
|
2757
|
+
if (O) {
|
|
2758
|
+
!n && T.readonly === !0 && (T.docsOnlyReadonly = !0);
|
|
2759
|
+
const C = i.program?.getTypeChecker?.();
|
|
2760
|
+
T.type.values = C !== void 0 && x.pos === -1 && (x.kind === o.SyntaxKind.TypeQuery || x.kind === o.SyntaxKind.IndexedAccessType || x.kind === o.SyntaxKind.ImportType || x.kind === o.SyntaxKind.TypeReference) ? ho(C.getTypeAtLocation(y?.parameters[0] ?? e)) : To(x, C, y?.parameters[0] ?? e), (b === void 0 && T.type.values === void 0 && !i.config.context.isLuminaMinimalExtraction || T.readonly && !T.reflects) && (T.attribute = void 0);
|
|
2761
|
+
const S = C !== void 0 && o.isPropertyDeclaration(e) && // BUG: should not check node.type here? but do check in property.getterType below
|
|
2762
2762
|
e.type !== void 0 && e.initializer !== void 0 && o.isPropertyAccessExpression(e.initializer) && o.isPropertyAccessExpression(e.initializer.expression) && e.initializer.expression.expression.kind === o.SyntaxKind.ThisKeyword && o.isIdentifier(e.initializer.expression.name) && o.isIdentifier(e.initializer.name);
|
|
2763
|
-
if (("initializer" in e && e.initializer !== void 0 && (!
|
|
2764
|
-
const
|
|
2765
|
-
let
|
|
2766
|
-
const
|
|
2767
|
-
if (
|
|
2768
|
-
for (let w = 0; w <
|
|
2769
|
-
const
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2763
|
+
if (("initializer" in e && e.initializer !== void 0 && (!T.default || !T.description) || S) && !p) {
|
|
2764
|
+
const R = e.initializer, A = C?.getSymbolAtLocation(R), _ = A !== void 0 && ((A.flags ?? 0) & o.SymbolFlags.Alias) !== 0 ? C?.getAliasedSymbol(A) : A;
|
|
2765
|
+
let W, F;
|
|
2766
|
+
const N = _?.getDeclarations();
|
|
2767
|
+
if (N !== void 0)
|
|
2768
|
+
for (let w = 0; w < N.length; ++w) {
|
|
2769
|
+
const H = N[w];
|
|
2770
|
+
W ??= o.isGetAccessor(H) ? H : void 0, F ??= o.isSetAccessor(H) ? H : void 0, "initializer" in H && (T.default = Be(
|
|
2771
|
+
H.initializer,
|
|
2772
|
+
T.default,
|
|
2773
|
+
H.getSourceFile()
|
|
2774
2774
|
));
|
|
2775
2775
|
}
|
|
2776
|
-
|
|
2777
|
-
text: z(
|
|
2776
|
+
S && W?.type !== void 0 && F !== void 0 && W.type.getText() !== F.parameters[0]?.type?.getText() && (T.getterType = {
|
|
2777
|
+
text: z(W.type, i).text,
|
|
2778
2778
|
references: void 0,
|
|
2779
2779
|
values: void 0,
|
|
2780
2780
|
source: void 0
|
|
2781
2781
|
});
|
|
2782
2782
|
}
|
|
2783
2783
|
}
|
|
2784
|
-
if (
|
|
2784
|
+
if (D !== void 0 && P !== void 0 && !p && // Quick perf check: type is definitely the same if raw type string matches.
|
|
2785
2785
|
// More reliable check follows in processing/index.ts, where printed normalized
|
|
2786
2786
|
// type string is compared.
|
|
2787
|
-
|
|
2788
|
-
...
|
|
2789
|
-
references:
|
|
2790
|
-
}), n &&
|
|
2787
|
+
D.getText(i.file) !== P.getText(i.file) ? T.getterType = z(D, i) : T.readonly === !0 && T.name === "type" && x.kind === o.SyntaxKind.LiteralType && x.literal.kind === o.SyntaxKind.StringLiteral && (i.moduleContext.typeName = x.literal.text), (d.hasAutoCasting === !0 || d.isConstructorOnly === !0) && (T.readonly === !0 && d.isConstructorOnly !== !0 ? d.hasAutoCasting = void 0 : T.getterType ??= {
|
|
2788
|
+
...T.type,
|
|
2789
|
+
references: T.type.references === void 0 ? void 0 : [...T.type.references]
|
|
2790
|
+
}), n && x.kind === o.SyntaxKind.LiteralType || (T.default = Be(
|
|
2791
2791
|
e.initializer,
|
|
2792
|
-
|
|
2792
|
+
T.default,
|
|
2793
2793
|
i.file
|
|
2794
|
-
)),
|
|
2795
|
-
const
|
|
2796
|
-
|
|
2797
|
-
`${Li}Boolean properties should default to "false". Found default value "true" in ${i.apiObject.name}.${
|
|
2794
|
+
)), O) {
|
|
2795
|
+
const C = K === void 0 && T.default === "true";
|
|
2796
|
+
T.type.values?.length === 1 && T.type.values[0].type === "boolean" && (T.default === void 0 ? T.default = "false" : C && T.deprecated === void 0 && (i.loggedBooleanWarning || i.config.context.logger.error(
|
|
2797
|
+
`${Li}Boolean properties should default to "false". Found default value "true" in ${i.apiObject.name}.${T.name}. See https://webgis.esri.com/references/lumina/properties#boolean-properties`
|
|
2798
2798
|
), i.loggedBooleanWarning = !0));
|
|
2799
2799
|
}
|
|
2800
2800
|
return co(
|
|
2801
2801
|
i,
|
|
2802
2802
|
e,
|
|
2803
2803
|
i.config.documentation.copyDocDefinitions?.properties,
|
|
2804
|
-
|
|
2804
|
+
T,
|
|
2805
2805
|
i.apiObject
|
|
2806
|
-
), i.produceDts && E && (d.isAbstract = !0), c && e.questionToken !== void 0 && (
|
|
2806
|
+
), i.produceDts && E && (d.isAbstract = !0), c && e.questionToken !== void 0 && (T.type.text.endsWith(" | undefined") || (T.type.text = // Don't need to wrap non-accessors in |undefined as we replace |undefined
|
|
2807
2807
|
// with ? during printing
|
|
2808
|
-
u && (
|
|
2808
|
+
u && (x.kind === o.SyntaxKind.FunctionType || x.kind === o.SyntaxKind.ConstructorType || x.kind === o.SyntaxKind.ConditionalType || x.kind === o.SyntaxKind.InferType) ? `(${T.type.text}) | undefined` : `${T.type.text} | undefined`), T.getterType !== void 0 && !T.getterType.text.endsWith(" | undefined") && (T.getterType.text += " | undefined")), T;
|
|
2809
2809
|
}
|
|
2810
2810
|
function jt(e, t) {
|
|
2811
2811
|
if (!t.config.strict)
|
|
@@ -2899,8 +2899,8 @@ function Ye(e, t) {
|
|
|
2899
2899
|
node: e
|
|
2900
2900
|
}
|
|
2901
2901
|
) : Ao(l, n, m, e, t), a !== void 0 && so(p, t), d.members.length === 0 && (a === void 0 && (d.members = void 0), s && (t.moduleContext.constructorPropertiesInterface = f));
|
|
2902
|
-
const g = t.exportDefaultName === i, E = et(e),
|
|
2903
|
-
return (
|
|
2902
|
+
const g = t.exportDefaultName === i, E = et(e), v = g || E === 2;
|
|
2903
|
+
return (v || a !== void 0) && Ct(d, v, t), n ? (a === void 0 ? yo(
|
|
2904
2904
|
t,
|
|
2905
2905
|
e,
|
|
2906
2906
|
t.config.documentation.copyDocDefinitions.classes,
|
|
@@ -2921,7 +2921,7 @@ function Ye(e, t) {
|
|
|
2921
2921
|
t.config.documentation.copyDocDefinitions.interfaces,
|
|
2922
2922
|
f,
|
|
2923
2923
|
t.apiModule
|
|
2924
|
-
), t.produceDts && (c.isDefaultExported =
|
|
2924
|
+
), t.produceDts && (c.isDefaultExported = v || void 0, n && (!r && (!g && E === 0) && t.config.strict && t.emitError("Expected @public class to be exported using named or default export.", {
|
|
2925
2925
|
file: t.file,
|
|
2926
2926
|
node: e
|
|
2927
2927
|
}), li(e.modifiers, o.SyntaxKind.AbstractKeyword) ? c.hasExplicitAbstract = !0 : !u && (t.config.strict || a !== void 0) && (c.hasExplicitAbstract = !1))), t.objectLikeTypeParameters = void 0, d;
|
|
@@ -2996,7 +2996,7 @@ function Si(e, t, n, i) {
|
|
|
2996
2996
|
let u = j(r, !0, i) ?? (i.pairedSetter === void 0 ? void 0 : j(i.pairedSetter, !0, i));
|
|
2997
2997
|
if (u === void 0 && !i.config.strict && (a ? m !== void 0 && Jt(r, i.pairedSetter, !0) : !li(r.modifiers, o.SyntaxKind.PrivateKeyword))) {
|
|
2998
2998
|
const E = j(r, !1, i) ?? (i.pairedSetter === void 0 ? void 0 : j(i.pairedSetter, !1, i)) ?? Ue;
|
|
2999
|
-
E.docsTags.includes(
|
|
2999
|
+
E.docsTags.includes(V.private) ? a && i.config.context.includeLuminaPrivateComponents ? u = Ce : u = void 0 : u = E;
|
|
3000
3000
|
} else u === void 0 && a && i.config.context.includeLuminaPrivateComponents && Jt(r, i.pairedSetter, !1) && (u = Ce);
|
|
3001
3001
|
if (u === void 0) {
|
|
3002
3002
|
a && o.isPropertyDeclaration(r) && o.isIdentifier(r.name) && r.name.escapedText === "shadowRootOptions" && r.initializer !== void 0 && o.isIdentifier(r.initializer) && r.initializer.escapedText === "noShadowRoot" && (i.apiObject.encapsulation = "none");
|
|
@@ -3266,7 +3266,7 @@ function Oo(e, t) {
|
|
|
3266
3266
|
{ file: t.file, node: i },
|
|
3267
3267
|
"Public variable must have a type annotation or a default value",
|
|
3268
3268
|
t
|
|
3269
|
-
) : c = ht(u, m ?
|
|
3269
|
+
) : c = ht(u, m ? G.shallow : G.false, t.file, t);
|
|
3270
3270
|
} else if (c = Et(c), o.isFunctionTypeNode(c))
|
|
3271
3271
|
return Ht(c, s, e, t);
|
|
3272
3272
|
const d = Ni(), p = {
|
|
@@ -3332,114 +3332,118 @@ function Vo(e, t) {
|
|
|
3332
3332
|
named: /* @__PURE__ */ Object.create(null)
|
|
3333
3333
|
}, u = ei(e, r, c, f);
|
|
3334
3334
|
t.moduleContext = u;
|
|
3335
|
-
const g = t.implicitPublicModules?.[l]
|
|
3335
|
+
const g = t.implicitPublicModules?.[l];
|
|
3336
|
+
let E = !1;
|
|
3337
|
+
const v = t.isJsApi && l.startsWith("applications/");
|
|
3336
3338
|
t.statementJsDocs.length = 0;
|
|
3337
|
-
for (let
|
|
3338
|
-
const
|
|
3339
|
-
let
|
|
3339
|
+
for (let I = 0; I < e.statements.length; ++I) {
|
|
3340
|
+
const y = e.statements[I], k = y.kind === o.SyntaxKind.ClassDeclaration || y.kind === o.SyntaxKind.FunctionDeclaration || y.kind === o.SyntaxKind.InterfaceDeclaration || y.kind === o.SyntaxKind.TypeAliasDeclaration || y.kind === o.SyntaxKind.VariableStatement;
|
|
3341
|
+
let P;
|
|
3340
3342
|
if (
|
|
3341
3343
|
// Only look at web components in Lumina's dev server
|
|
3342
3344
|
t.isInLuminaMinimalExtraction
|
|
3343
3345
|
)
|
|
3344
|
-
|
|
3345
|
-
else if (
|
|
3346
|
-
if (
|
|
3347
|
-
const
|
|
3348
|
-
|
|
3349
|
-
} else
|
|
3350
|
-
|
|
3351
|
-
|
|
3352
|
-
|
|
3353
|
-
|
|
3354
|
-
|
|
3355
|
-
|
|
3356
|
-
|
|
3346
|
+
P = y.kind === o.SyntaxKind.ClassDeclaration && t.componentTagName !== void 0 && y.heritageClauses !== void 0 && y.modifiers !== void 0 ? Ue : void 0;
|
|
3347
|
+
else if (k) {
|
|
3348
|
+
if (P = j(y, !0, t), P === void 0 && !t.config.strict) {
|
|
3349
|
+
const D = j(y, !1, t) ?? { description: void 0, docsTags: [] }, x = y.kind === o.SyntaxKind.ClassDeclaration && t.componentTagName !== void 0 && y.heritageClauses !== void 0 && y.modifiers !== void 0;
|
|
3350
|
+
D.docsTags.includes(V.private) ? x && t.config.context.includeLuminaPrivateComponents ? (P = Ce, t.isInLuminaMinimalExtraction = !0) : P = void 0 : (x || g !== void 0 && Fn(y, g)) && (P = D);
|
|
3351
|
+
} else P === void 0 && t.componentTagName !== void 0 && t.config.context.includeLuminaPrivateComponents && y.kind === o.SyntaxKind.ClassDeclaration && (P = Ce, t.isInLuminaMinimalExtraction = !0);
|
|
3352
|
+
P !== void 0 && !t.config.strict && y.kind === o.SyntaxKind.ClassDeclaration && t.componentTagName !== void 0 && y.heritageClauses !== void 0 && y.modifiers !== void 0 && P.docsTags.includes(V.internal) && (E = !0);
|
|
3353
|
+
}
|
|
3354
|
+
if (t.statementJsDocs[I] = P, k || I === 0 && (p = j(e, !0, t)), P !== void 0)
|
|
3355
|
+
v && P.docsTags.push(V.internal), m.add(
|
|
3356
|
+
(y.name ?? y.declarationList?.declarations[0].name).escapedText
|
|
3357
|
+
), y.kind === o.SyntaxKind.ClassDeclaration ? t.apiClassLikeName = y.name?.escapedText : y.kind === o.SyntaxKind.VariableStatement && y.declarationList.declarations[0].initializer?.kind === o.SyntaxKind.ArrowFunction && (t.apiClassLikeName = y.declarationList.declarations[0].name.escapedText);
|
|
3358
|
+
else if (o.isImportDeclaration(y)) {
|
|
3359
|
+
const D = y.importClause;
|
|
3360
|
+
if (D === void 0)
|
|
3357
3361
|
continue;
|
|
3358
|
-
const
|
|
3359
|
-
if (Pn(
|
|
3360
|
-
const
|
|
3361
|
-
c[
|
|
3362
|
-
type:
|
|
3363
|
-
modulePath:
|
|
3364
|
-
specifier:
|
|
3365
|
-
replacementName:
|
|
3362
|
+
const x = y.moduleSpecifier.text, T = !x.startsWith("."), K = T ? x : Z(x), O = T ? void 0 : Ve(pt(s, K), t), J = O === void 0 ? void 0 : t.config.types.typeReplacements[O];
|
|
3363
|
+
if (Pn(y, t), D.name !== void 0) {
|
|
3364
|
+
const C = D.name.escapedText, S = J?.[C], R = S?.[1], A = S === void 0 ? !T && x.endsWith(".json") ? x : K : ye(r, S[0]), _ = S?.[0] ?? O;
|
|
3365
|
+
c[C] = {
|
|
3366
|
+
type: S?.[2] ?? "default",
|
|
3367
|
+
modulePath: _,
|
|
3368
|
+
specifier: A,
|
|
3369
|
+
replacementName: R,
|
|
3366
3370
|
actualName: void 0,
|
|
3367
3371
|
wasUsed: !1
|
|
3368
3372
|
};
|
|
3369
3373
|
}
|
|
3370
|
-
const $ =
|
|
3374
|
+
const $ = D.namedBindings;
|
|
3371
3375
|
if ($ === void 0)
|
|
3372
3376
|
continue;
|
|
3373
3377
|
if ($.kind === o.SyntaxKind.NamespaceImport) {
|
|
3374
|
-
const
|
|
3375
|
-
c[
|
|
3378
|
+
const C = $.name.escapedText, S = J?.[C], R = S?.[1], A = S === void 0 ? K : ye(r, S[0]), _ = S?.[0] ?? O;
|
|
3379
|
+
c[C] = {
|
|
3376
3380
|
type: "*",
|
|
3377
|
-
modulePath:
|
|
3378
|
-
specifier:
|
|
3379
|
-
replacementName:
|
|
3381
|
+
modulePath: _,
|
|
3382
|
+
specifier: A,
|
|
3383
|
+
replacementName: R,
|
|
3380
3384
|
actualName: void 0,
|
|
3381
3385
|
wasUsed: !1
|
|
3382
3386
|
};
|
|
3383
3387
|
} else
|
|
3384
|
-
for (let
|
|
3385
|
-
const
|
|
3386
|
-
c[
|
|
3387
|
-
type:
|
|
3388
|
-
modulePath:
|
|
3389
|
-
specifier:
|
|
3390
|
-
replacementName:
|
|
3391
|
-
actualName:
|
|
3388
|
+
for (let C = 0; C < $.elements.length; ++C) {
|
|
3389
|
+
const S = $.elements[C], R = S.propertyName === void 0 ? void 0 : S.propertyName.escapedText ?? S.propertyName.text, A = S.name.escapedText, _ = J?.[R ?? A], W = _?.[1], F = _ === void 0 ? K : ye(r, _[0]), N = _?.[0] ?? O;
|
|
3390
|
+
c[A] = {
|
|
3391
|
+
type: _?.[2] ?? "named",
|
|
3392
|
+
modulePath: N,
|
|
3393
|
+
specifier: F,
|
|
3394
|
+
replacementName: W,
|
|
3395
|
+
actualName: _ === void 0 ? R : void 0,
|
|
3392
3396
|
wasUsed: !1
|
|
3393
3397
|
};
|
|
3394
3398
|
}
|
|
3395
|
-
} else if (o.isExportAssignment(
|
|
3396
|
-
if (o.isIdentifier(
|
|
3397
|
-
const
|
|
3398
|
-
t.exportDefaultName =
|
|
3399
|
+
} else if (o.isExportAssignment(y)) {
|
|
3400
|
+
if (o.isIdentifier(y.expression)) {
|
|
3401
|
+
const D = y.expression.escapedText;
|
|
3402
|
+
t.exportDefaultName = D, !m.has(D) && d?.has(D) === !0 && g?.pendingNames?.has("default") === !0 && d.set(D, Math.abs(d.get(D)));
|
|
3399
3403
|
}
|
|
3400
|
-
} else if (o.isExportDeclaration(
|
|
3401
|
-
if (j(
|
|
3402
|
-
const
|
|
3404
|
+
} else if (o.isExportDeclaration(y) && y.moduleSpecifier !== void 0 && !t.isInLuminaMinimalExtraction) {
|
|
3405
|
+
if (j(y, !0, t) !== void 0) {
|
|
3406
|
+
const x = y.moduleSpecifier.text, T = !x.startsWith("."), K = T ? x : pt(s, Z(x)), O = T ? void 0 : Ve(K, t), J = T ? x : ye(r, O);
|
|
3403
3407
|
u.reExports ??= [];
|
|
3404
3408
|
const $ = [];
|
|
3405
|
-
if (
|
|
3406
|
-
const
|
|
3407
|
-
for (let
|
|
3408
|
-
const
|
|
3409
|
+
if (y.exportClause?.kind === o.SyntaxKind.NamedExports) {
|
|
3410
|
+
const C = y.exportClause.elements;
|
|
3411
|
+
for (let S = 0; S < C.length; ++S) {
|
|
3412
|
+
const R = C[S], A = Re(R.name), _ = R.propertyName === void 0 ? void 0 : Re(R.propertyName), W = _ ?? A, F = _ === void 0 ? void 0 : A;
|
|
3409
3413
|
$.push({
|
|
3410
|
-
exportName:
|
|
3411
|
-
aliasName:
|
|
3412
|
-
isTypeOnly:
|
|
3413
|
-
}), !t.config.strict &&
|
|
3414
|
+
exportName: W,
|
|
3415
|
+
aliasName: F,
|
|
3416
|
+
isTypeOnly: y.isTypeOnly
|
|
3417
|
+
}), !t.config.strict && O !== void 0 && ze(O, K, W, t);
|
|
3414
3418
|
}
|
|
3415
3419
|
} else
|
|
3416
3420
|
$.push({
|
|
3417
3421
|
exportName: "*",
|
|
3418
|
-
aliasName:
|
|
3422
|
+
aliasName: y.exportClause === void 0 ? void 0 : Re(y.exportClause.name),
|
|
3419
3423
|
isTypeOnly: !1
|
|
3420
|
-
}), !t.config.strict &&
|
|
3424
|
+
}), !t.config.strict && O !== void 0 && ze(O, K, "*", t);
|
|
3421
3425
|
u.reExports.push({
|
|
3422
|
-
modulePath:
|
|
3423
|
-
specifier:
|
|
3424
|
-
isTypeOnly:
|
|
3426
|
+
modulePath: O,
|
|
3427
|
+
specifier: J,
|
|
3428
|
+
isTypeOnly: y.isTypeOnly,
|
|
3425
3429
|
specifiers: $
|
|
3426
3430
|
});
|
|
3427
3431
|
}
|
|
3428
|
-
} else o.isModuleDeclaration(
|
|
3429
|
-
(
|
|
3430
|
-
-
|
|
3432
|
+
} else o.isModuleDeclaration(y) ? j(y, !0, t) !== void 0 && (u.namespaces ??= [], u.namespaces.push(y.getFullText(e))) : d !== void 0 && k && d.set(
|
|
3433
|
+
(y.name ?? y.declarationList?.declarations[0].name).escapedText,
|
|
3434
|
+
-I
|
|
3431
3435
|
);
|
|
3432
3436
|
}
|
|
3433
|
-
const
|
|
3434
|
-
if (
|
|
3435
|
-
const
|
|
3436
|
-
for (let
|
|
3437
|
-
const
|
|
3438
|
-
c[
|
|
3439
|
-
type:
|
|
3440
|
-
modulePath:
|
|
3441
|
-
specifier: ye(r,
|
|
3442
|
-
replacementName:
|
|
3437
|
+
const b = t.config.types.typeReplacements[l];
|
|
3438
|
+
if (b !== void 0) {
|
|
3439
|
+
const I = Object.keys(b);
|
|
3440
|
+
for (let y = 0; y < I.length; ++y) {
|
|
3441
|
+
const k = I[y], P = b[k];
|
|
3442
|
+
c[k] = {
|
|
3443
|
+
type: P[2],
|
|
3444
|
+
modulePath: P[0],
|
|
3445
|
+
specifier: ye(r, P[0]),
|
|
3446
|
+
replacementName: P[1],
|
|
3443
3447
|
actualName: void 0,
|
|
3444
3448
|
wasUsed: !1
|
|
3445
3449
|
};
|
|
@@ -3459,28 +3463,28 @@ function Vo(e, t) {
|
|
|
3459
3463
|
exports: []
|
|
3460
3464
|
};
|
|
3461
3465
|
if (t.apiModule = h, Go(e, t), d !== void 0) {
|
|
3462
|
-
let
|
|
3466
|
+
let I = !1;
|
|
3463
3467
|
do {
|
|
3464
|
-
|
|
3465
|
-
for (const [
|
|
3466
|
-
if (
|
|
3467
|
-
d.delete(
|
|
3468
|
-
const
|
|
3469
|
-
if (
|
|
3468
|
+
I = !1;
|
|
3469
|
+
for (const [y, k] of d)
|
|
3470
|
+
if (k > 0 || Object.is(k, 0)) {
|
|
3471
|
+
d.delete(y), m.add(y), I = !0;
|
|
3472
|
+
const P = e.statements[k], D = j(P, !1, t) ?? { description: void 0, docsTags: [] };
|
|
3473
|
+
if (D.docsTags.includes(V.private))
|
|
3470
3474
|
t.emitError(
|
|
3471
|
-
`Declaration "${
|
|
3475
|
+
`Declaration "${y}" is marked @private but is used by public API in the same file. Either refactor our its reference or remove the @private tag.`,
|
|
3472
3476
|
{
|
|
3473
3477
|
file: e,
|
|
3474
|
-
node:
|
|
3478
|
+
node: P
|
|
3475
3479
|
}
|
|
3476
3480
|
);
|
|
3477
3481
|
else {
|
|
3478
|
-
t.statementJsDocs[
|
|
3479
|
-
const
|
|
3480
|
-
|
|
3482
|
+
E && !D.docsTags.includes(V.internal) && D.docsTags.push(V.internal), t.statementJsDocs[k] = D;
|
|
3483
|
+
const T = hi(P, k, t);
|
|
3484
|
+
T !== void 0 && h.declarations.push(T);
|
|
3481
3485
|
}
|
|
3482
3486
|
}
|
|
3483
|
-
} while (
|
|
3487
|
+
} while (I);
|
|
3484
3488
|
}
|
|
3485
3489
|
if (h.declarations.length === 0 && u.reExports === void 0 && u.namespaces === void 0) {
|
|
3486
3490
|
i !== void 0 && (i.isEmptyModule = !0);
|
|
@@ -3497,11 +3501,11 @@ function Vo(e, t) {
|
|
|
3497
3501
|
hasDirtyLinks: !1,
|
|
3498
3502
|
wasRemoved: !1
|
|
3499
3503
|
}) : i.module = h);
|
|
3500
|
-
const
|
|
3504
|
+
const L = t.componentTagName === void 0 ? h.exports[0]?.declaration.name : void 0;
|
|
3501
3505
|
h.exports.length === 0 && (h.exports = void 0);
|
|
3502
|
-
for (let
|
|
3503
|
-
const
|
|
3504
|
-
(
|
|
3506
|
+
for (let I = 0; I < h.declarations.length; ++I) {
|
|
3507
|
+
const y = h.declarations[I];
|
|
3508
|
+
(y.kind === "class" || y.kind === "mixin") && (f.class = y), L === y.name && (f.default = y), f.named[y.name] = y;
|
|
3505
3509
|
}
|
|
3506
3510
|
return p !== void 0 && (t.moduleHasClass ? t.emitError(
|
|
3507
3511
|
"A module that exports a class must have JSDoc attached to the class, rather than module-top JSDoc. See https://webgis.esri.com/webgis/core/core/documenting-api#module-documentation",
|
|
@@ -3511,7 +3515,7 @@ function Vo(e, t) {
|
|
|
3511
3515
|
length: e.statements[0]?.getStart(e) ?? 1,
|
|
3512
3516
|
node: void 0
|
|
3513
3517
|
}
|
|
3514
|
-
) : (
|
|
3518
|
+
) : (v && p.docsTags.push(V.internal), rn(h, p))), h;
|
|
3515
3519
|
}
|
|
3516
3520
|
async function Sa(e) {
|
|
3517
3521
|
const t = [], n = e.basePath, i = e.config.context.excludedDirectories, a = `${e.basePath}components/`, s = [], l = !e.config.strict || e.config.context.includeLuminaPrivateComponents;
|
|
@@ -3530,8 +3534,8 @@ async function Sa(e) {
|
|
|
3530
3534
|
const u = r(p);
|
|
3531
3535
|
if (u && l || // Exclude files before paying .toString() cost
|
|
3532
3536
|
f.includes(Ho) && (f.includes($o) || f.includes(Bo))) {
|
|
3533
|
-
const E = f.toString("utf8"),
|
|
3534
|
-
c(
|
|
3537
|
+
const E = f.toString("utf8"), v = Xt(p, E);
|
|
3538
|
+
c(v, u);
|
|
3535
3539
|
}
|
|
3536
3540
|
});
|
|
3537
3541
|
else {
|
|
@@ -3572,27 +3576,27 @@ async function Sa(e) {
|
|
|
3572
3576
|
if (u.extractedNames === void 0)
|
|
3573
3577
|
continue;
|
|
3574
3578
|
if (u.pendingNames !== void 0) {
|
|
3575
|
-
const
|
|
3576
|
-
let
|
|
3577
|
-
const
|
|
3578
|
-
for (const
|
|
3579
|
-
if (!u.extractedNames.has(
|
|
3580
|
-
|
|
3579
|
+
const L = e.watchFiles?.get(e.config.context.basePath + u.sourcePath);
|
|
3580
|
+
let y = !(L !== void 0 && L.module === void 0 && !L.isEmptyModule);
|
|
3581
|
+
const k = E === void 0 ? void 0 : ae(E).index;
|
|
3582
|
+
for (const P of u.pendingNames)
|
|
3583
|
+
if (!u.extractedNames.has(P) && (k === void 0 || (P === "default" ? k.default === void 0 : k.named[P] === void 0))) {
|
|
3584
|
+
y = !1;
|
|
3581
3585
|
break;
|
|
3582
3586
|
}
|
|
3583
|
-
if (
|
|
3587
|
+
if (y)
|
|
3584
3588
|
continue;
|
|
3585
3589
|
}
|
|
3586
3590
|
if (E !== void 0) {
|
|
3587
3591
|
t.splice(t.indexOf(E), 1);
|
|
3588
|
-
const
|
|
3589
|
-
|
|
3592
|
+
const L = e.watchFiles?.get(E.sourcePath);
|
|
3593
|
+
L !== void 0 && (L.module = void 0);
|
|
3590
3594
|
}
|
|
3591
3595
|
p = !0, u.extractedNames = u.pendingNames === void 0 ? void 0 : new Set(u.pendingNames);
|
|
3592
|
-
let
|
|
3593
|
-
if (
|
|
3594
|
-
const
|
|
3595
|
-
|
|
3596
|
+
let v = e.basePath + u.sourcePath, b = !1, h = e.program?.getSourceFile(v) ?? e.program?.getSourceFile(`${v}.ts`) ?? e.program?.getSourceFile(`${v}.tsx`) ?? e.program?.getSourceFile(`${v}.d.ts`);
|
|
3597
|
+
if (h === void 0 && (h = e.program?.getSourceFile(`${v}/index.ts`) ?? e.program?.getSourceFile(`${v}/index.tsx`) ?? e.program?.getSourceFile(`${v}/index.d.ts`), h !== void 0 && (b = !0)), e.program === void 0 && (Z(v) === v && (v = ue(`${v}.ts`) ? `${v}.ts` : ue(`${v}.tsx`) ? `${v}.tsx` : ue(`${v}.d.ts`) ? `${v}.d.ts` : void 0, v === void 0 && (v = ue(`${v}/index.ts`) ? `${v}/index.ts` : ue(`${v}/index.tsx`) ? `${v}/index.tsx` : ue(`${v}/index.d.ts`) ? `${v}/index.d.ts` : void 0, v !== void 0 && (b = !0))), v !== void 0 && (h = Xt(v, await Dt(v, "utf8")))), h !== void 0) {
|
|
3598
|
+
const L = h.fileName.slice(e.basePath.length);
|
|
3599
|
+
L !== u.sourcePath && (u.sourcePath = L), b && (u.actualModulePath = `${g}/index`), d(h);
|
|
3596
3600
|
}
|
|
3597
3601
|
}
|
|
3598
3602
|
} while (p);
|