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