@storm-software/linting-tools 1.132.110 → 1.132.111
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/bin/{chunk-SOMAG4OK.cjs → chunk-2LT5EY6I.cjs} +2 -2
- package/bin/{chunk-VLMX3NQP.js → chunk-4B2OZSS2.js} +2 -2
- package/bin/{chunk-4DJ7KEKM.cjs → chunk-4DRHEZYR.cjs} +6 -6
- package/bin/{chunk-EFYK7LSH.js → chunk-4GSPBIJ2.js} +1 -1
- package/bin/{chunk-3RO2ACDW.cjs → chunk-5KEGN5HP.cjs} +2 -2
- package/bin/{chunk-367FWK47.js → chunk-6UYR65MZ.js} +2 -2
- package/bin/{chunk-JXEBOJS5.js → chunk-7BW2TJUE.js} +2 -2
- package/bin/{chunk-TGLC342P.cjs → chunk-7YUR56NT.cjs} +91 -91
- package/bin/{chunk-EPDNAFTI.cjs → chunk-IDMQWAYL.cjs} +5 -5
- package/bin/{chunk-VTSQTSYF.js → chunk-JJF2V6EH.js} +1 -1
- package/bin/{chunk-CXVUGPJP.cjs → chunk-K2U6NAVJ.cjs} +2 -2
- package/bin/{chunk-ZXEWM77C.js → chunk-KVYUIUHN.js} +2 -2
- package/bin/{chunk-HJZ7TOM5.js → chunk-MFIEWZE5.js} +1 -1
- package/bin/{chunk-KM6YS7KN.js → chunk-NVXYMLZN.js} +2 -2
- package/bin/{chunk-46LPOEG7.cjs → chunk-QCOJBO4C.cjs} +20 -20
- package/bin/{chunk-6LJGNBH7.js → chunk-S5PY6M7X.js} +2 -2
- package/bin/{chunk-BPN5FB3V.cjs → chunk-SNEIIEHW.cjs} +5 -5
- package/bin/{chunk-XOSXF5GD.js → chunk-UKQVLWVF.js} +2 -2
- package/bin/{chunk-4RNOYHFR.cjs → chunk-WWN4NHLM.cjs} +14 -14
- package/bin/{chunk-NMQYBAZW.cjs → chunk-ZUCYKE44.cjs} +5 -5
- package/bin/{dist-XSR3RQ2H.js → dist-2S5JPQW5.js} +2 -2
- package/bin/{dist-AJLZ2YE4.js → dist-BLCVU4KN.js} +8 -8
- package/bin/{dist-KCUESUX7.cjs → dist-GZPPBLAY.cjs} +6 -6
- package/bin/{dist-KUW5R2G6.cjs → dist-XG7CCPX6.cjs} +206 -206
- package/bin/{esm-OLU4PZAL.js → esm-QR275H7A.js} +1 -1
- package/bin/{esm-BJVM57VT.cjs → esm-XZDHHDVL.cjs} +4 -4
- package/bin/json5-G2QRRXKH.js +10 -0
- package/bin/json5-ZHE3AMDS.cjs +10 -0
- package/bin/{jsonc-FADPE5LI.js → jsonc-LBXY5RKD.js} +3 -3
- package/bin/jsonc-RC3UGGKA.cjs +15 -0
- package/bin/lint.cjs +1973 -1969
- package/bin/lint.js +293 -289
- package/bin/{multipart-parser-Z6WM73LO.cjs → multipart-parser-HELCPOVW.cjs} +6 -6
- package/bin/{multipart-parser-VVPDLOND.js → multipart-parser-TQZY77J6.js} +2 -2
- package/bin/{package-json-63FLSD57.cjs → package-json-BHYHEYJH.cjs} +94 -94
- package/bin/{package-json-ZFCGQAYS.js → package-json-FUXIBCXB.js} +2 -2
- package/bin/toml-7RFNJIC6.js +10 -0
- package/bin/toml-J6YZC2KC.cjs +10 -0
- package/bin/{utils-IBDV3LTU.js → utils-CUB7Y3ZI.js} +2 -2
- package/bin/{utils-UPGZJAYV.cjs → utils-D24J2U3P.cjs} +5 -5
- package/bin/yaml-BSZEIRC7.cjs +10 -0
- package/bin/yaml-FGQHUFIW.js +10 -0
- package/package.json +3 -3
- package/bin/json5-7T7S6DGV.cjs +0 -10
- package/bin/json5-H2TGPWGY.js +0 -10
- package/bin/jsonc-Q674SJT2.cjs +0 -15
- package/bin/toml-3IPKAOPS.cjs +0 -10
- package/bin/toml-CJD72GZ3.js +0 -10
- package/bin/yaml-O3FERUKI.cjs +0 -10
- package/bin/yaml-ZE3I2LDD.js +0 -10
package/bin/lint.js
CHANGED
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
require_clean,
|
|
4
4
|
require_semver,
|
|
5
5
|
require_valid
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-4GSPBIJ2.js";
|
|
7
7
|
import {
|
|
8
8
|
basename,
|
|
9
9
|
be,
|
|
@@ -15,12 +15,12 @@ import {
|
|
|
15
15
|
join,
|
|
16
16
|
readPackageJSON,
|
|
17
17
|
resolve
|
|
18
|
-
} from "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-
|
|
18
|
+
} from "./chunk-UKQVLWVF.js";
|
|
19
|
+
import "./chunk-6UYR65MZ.js";
|
|
20
|
+
import "./chunk-4B2OZSS2.js";
|
|
21
|
+
import "./chunk-KVYUIUHN.js";
|
|
22
|
+
import "./chunk-NVXYMLZN.js";
|
|
23
|
+
import "./chunk-JJF2V6EH.js";
|
|
24
24
|
import {
|
|
25
25
|
__commonJS,
|
|
26
26
|
__dirname,
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
__require,
|
|
32
32
|
__toESM,
|
|
33
33
|
init_esm_shims
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-S5PY6M7X.js";
|
|
35
35
|
|
|
36
36
|
// ../../node_modules/.pnpm/dotenv@16.6.1/node_modules/dotenv/package.json
|
|
37
37
|
var package_exports = {};
|
|
@@ -36973,7 +36973,7 @@ var require_src4 = __commonJS({
|
|
|
36973
36973
|
}
|
|
36974
36974
|
});
|
|
36975
36975
|
|
|
36976
|
-
// ../../node_modules/.pnpm/flatted@3.
|
|
36976
|
+
// ../../node_modules/.pnpm/flatted@3.4.1/node_modules/flatted/esm/index.js
|
|
36977
36977
|
var esm_exports = {};
|
|
36978
36978
|
__export(esm_exports, {
|
|
36979
36979
|
fromJSON: () => fromJSON,
|
|
@@ -36981,9 +36981,9 @@ __export(esm_exports, {
|
|
|
36981
36981
|
stringify: () => stringify3,
|
|
36982
36982
|
toJSON: () => toJSON
|
|
36983
36983
|
});
|
|
36984
|
-
var $parse, $stringify, keys3, Primitive, primitive, ignore, object2, noop, primitives, Primitives,
|
|
36984
|
+
var $parse, $stringify, keys3, Primitive, primitive, ignore, object2, noop, primitives, Primitives, resolver, set2, parse6, stringify3, toJSON, fromJSON;
|
|
36985
36985
|
var init_esm = __esm({
|
|
36986
|
-
"../../node_modules/.pnpm/flatted@3.
|
|
36986
|
+
"../../node_modules/.pnpm/flatted@3.4.1/node_modules/flatted/esm/index.js"() {
|
|
36987
36987
|
init_esm_shims();
|
|
36988
36988
|
({ parse: $parse, stringify: $stringify } = JSON);
|
|
36989
36989
|
({ keys: keys3 } = Object);
|
|
@@ -36994,8 +36994,7 @@ var init_esm = __esm({
|
|
|
36994
36994
|
noop = (_2, value) => value;
|
|
36995
36995
|
primitives = (value) => value instanceof Primitive ? Primitive(value) : value;
|
|
36996
36996
|
Primitives = (_2, value) => typeof value === primitive ? new Primitive(value) : value;
|
|
36997
|
-
|
|
36998
|
-
const lazy = [];
|
|
36997
|
+
resolver = (input, lazy, parsed, $) => (output) => {
|
|
36999
36998
|
for (let ke = keys3(output), { length } = ke, y3 = 0; y3 < length; y3++) {
|
|
37000
36999
|
const k2 = ke[y3];
|
|
37001
37000
|
const value = output[k2];
|
|
@@ -37004,16 +37003,12 @@ var init_esm = __esm({
|
|
|
37004
37003
|
if (typeof tmp === object2 && !parsed.has(tmp)) {
|
|
37005
37004
|
parsed.add(tmp);
|
|
37006
37005
|
output[k2] = ignore;
|
|
37007
|
-
lazy.push({
|
|
37006
|
+
lazy.push({ o: output, k: k2, r: tmp });
|
|
37008
37007
|
} else
|
|
37009
37008
|
output[k2] = $.call(output, k2, tmp);
|
|
37010
37009
|
} else if (output[k2] !== ignore)
|
|
37011
37010
|
output[k2] = $.call(output, k2, value);
|
|
37012
37011
|
}
|
|
37013
|
-
for (let { length } = lazy, i2 = 0; i2 < length; i2++) {
|
|
37014
|
-
const { k: k2, a: a4 } = lazy[i2];
|
|
37015
|
-
output[k2] = $.call(output, k2, revive.apply(null, a4));
|
|
37016
|
-
}
|
|
37017
37012
|
return output;
|
|
37018
37013
|
};
|
|
37019
37014
|
set2 = (known, input, value) => {
|
|
@@ -37023,10 +37018,19 @@ var init_esm = __esm({
|
|
|
37023
37018
|
};
|
|
37024
37019
|
parse6 = (text, reviver) => {
|
|
37025
37020
|
const input = $parse(text, Primitives).map(primitives);
|
|
37026
|
-
const value = input[0];
|
|
37027
37021
|
const $ = reviver || noop;
|
|
37028
|
-
|
|
37029
|
-
|
|
37022
|
+
let value = input[0];
|
|
37023
|
+
if (typeof value === object2 && value) {
|
|
37024
|
+
const lazy = [];
|
|
37025
|
+
const revive = resolver(input, lazy, /* @__PURE__ */ new Set(), $);
|
|
37026
|
+
value = revive(value);
|
|
37027
|
+
let i2 = 0;
|
|
37028
|
+
while (i2 < lazy.length) {
|
|
37029
|
+
const { o, k: k2, r } = lazy[i2++];
|
|
37030
|
+
o[k2] = $.call(o, k2, revive(r));
|
|
37031
|
+
}
|
|
37032
|
+
}
|
|
37033
|
+
return $.call({ "": value }, "", value);
|
|
37030
37034
|
};
|
|
37031
37035
|
stringify3 = (value, replacer, space) => {
|
|
37032
37036
|
const $ = replacer && typeof replacer === object2 ? (k2, v2) => k2 === "" || -1 < replacer.indexOf(k2) ? v2 : void 0 : replacer || noop;
|
|
@@ -70349,8 +70353,8 @@ ${lanes.join("\n")}
|
|
|
70349
70353
|
function getCanonicalAbsolutePath(host, path32) {
|
|
70350
70354
|
return host.getCanonicalFileName(getNormalizedAbsolutePath(path32, host.getCurrentDirectory()));
|
|
70351
70355
|
}
|
|
70352
|
-
function getExternalModuleNameFromDeclaration(host,
|
|
70353
|
-
const file =
|
|
70356
|
+
function getExternalModuleNameFromDeclaration(host, resolver2, declaration) {
|
|
70357
|
+
const file = resolver2.getExternalModuleFileFromDeclaration(declaration);
|
|
70354
70358
|
if (!file || file.isDeclarationFile) {
|
|
70355
70359
|
return void 0;
|
|
70356
70360
|
}
|
|
@@ -83010,10 +83014,10 @@ ${lanes.join("\n")}
|
|
|
83010
83014
|
}
|
|
83011
83015
|
return void 0;
|
|
83012
83016
|
}
|
|
83013
|
-
function getExternalModuleNameLiteral(factory2, importNode, sourceFile, host,
|
|
83017
|
+
function getExternalModuleNameLiteral(factory2, importNode, sourceFile, host, resolver2, compilerOptions) {
|
|
83014
83018
|
const moduleName = getExternalModuleName(importNode);
|
|
83015
83019
|
if (moduleName && isStringLiteral(moduleName)) {
|
|
83016
|
-
return tryGetModuleNameFromDeclaration(importNode, host, factory2,
|
|
83020
|
+
return tryGetModuleNameFromDeclaration(importNode, host, factory2, resolver2, compilerOptions) || tryRenameExternalModule(factory2, moduleName, sourceFile) || factory2.cloneNode(moduleName);
|
|
83017
83021
|
}
|
|
83018
83022
|
return void 0;
|
|
83019
83023
|
}
|
|
@@ -83033,8 +83037,8 @@ ${lanes.join("\n")}
|
|
|
83033
83037
|
}
|
|
83034
83038
|
return void 0;
|
|
83035
83039
|
}
|
|
83036
|
-
function tryGetModuleNameFromDeclaration(declaration, host, factory2,
|
|
83037
|
-
return tryGetModuleNameFromFile(factory2,
|
|
83040
|
+
function tryGetModuleNameFromDeclaration(declaration, host, factory2, resolver2, compilerOptions) {
|
|
83041
|
+
return tryGetModuleNameFromFile(factory2, resolver2.getExternalModuleFileFromDeclaration(declaration), host, compilerOptions);
|
|
83038
83042
|
}
|
|
83039
83043
|
function getInitializerOfBindingOrAssignmentElement(bindingElement) {
|
|
83040
83044
|
if (isDeclarationBindingElement(bindingElement)) {
|
|
@@ -138822,30 +138826,30 @@ ${lanes.join("\n")}
|
|
|
138822
138826
|
}
|
|
138823
138827
|
}
|
|
138824
138828
|
function createGeneratorType(yieldType, returnType, nextType, isAsyncGenerator) {
|
|
138825
|
-
const
|
|
138826
|
-
const globalGeneratorType =
|
|
138829
|
+
const resolver2 = isAsyncGenerator ? asyncIterationTypesResolver : syncIterationTypesResolver;
|
|
138830
|
+
const globalGeneratorType = resolver2.getGlobalGeneratorType(
|
|
138827
138831
|
/*reportErrors*/
|
|
138828
138832
|
false
|
|
138829
138833
|
);
|
|
138830
|
-
yieldType =
|
|
138834
|
+
yieldType = resolver2.resolveIterationType(
|
|
138831
138835
|
yieldType,
|
|
138832
138836
|
/*errorNode*/
|
|
138833
138837
|
void 0
|
|
138834
138838
|
) || unknownType;
|
|
138835
|
-
returnType =
|
|
138839
|
+
returnType = resolver2.resolveIterationType(
|
|
138836
138840
|
returnType,
|
|
138837
138841
|
/*errorNode*/
|
|
138838
138842
|
void 0
|
|
138839
138843
|
) || unknownType;
|
|
138840
138844
|
if (globalGeneratorType === emptyGenericType) {
|
|
138841
|
-
const globalIterableIteratorType =
|
|
138845
|
+
const globalIterableIteratorType = resolver2.getGlobalIterableIteratorType(
|
|
138842
138846
|
/*reportErrors*/
|
|
138843
138847
|
false
|
|
138844
138848
|
);
|
|
138845
138849
|
if (globalIterableIteratorType !== emptyGenericType) {
|
|
138846
138850
|
return createTypeFromGenericGlobalType(globalIterableIteratorType, [yieldType, returnType, nextType]);
|
|
138847
138851
|
}
|
|
138848
|
-
|
|
138852
|
+
resolver2.getGlobalIterableIteratorType(
|
|
138849
138853
|
/*reportErrors*/
|
|
138850
138854
|
true
|
|
138851
138855
|
);
|
|
@@ -144587,43 +144591,43 @@ ${lanes.join("\n")}
|
|
|
144587
144591
|
}
|
|
144588
144592
|
return noIterationTypes;
|
|
144589
144593
|
}
|
|
144590
|
-
function getIterationTypesOfIterableCached(type2,
|
|
144591
|
-
return getCachedIterationTypes(type2,
|
|
144594
|
+
function getIterationTypesOfIterableCached(type2, resolver2) {
|
|
144595
|
+
return getCachedIterationTypes(type2, resolver2.iterableCacheKey);
|
|
144592
144596
|
}
|
|
144593
|
-
function getIterationTypesOfIterableFast(type2,
|
|
144594
|
-
if (isReferenceToType2(type2,
|
|
144597
|
+
function getIterationTypesOfIterableFast(type2, resolver2) {
|
|
144598
|
+
if (isReferenceToType2(type2, resolver2.getGlobalIterableType(
|
|
144595
144599
|
/*reportErrors*/
|
|
144596
144600
|
false
|
|
144597
|
-
)) || isReferenceToType2(type2,
|
|
144601
|
+
)) || isReferenceToType2(type2, resolver2.getGlobalIteratorObjectType(
|
|
144598
144602
|
/*reportErrors*/
|
|
144599
144603
|
false
|
|
144600
|
-
)) || isReferenceToType2(type2,
|
|
144604
|
+
)) || isReferenceToType2(type2, resolver2.getGlobalIterableIteratorType(
|
|
144601
144605
|
/*reportErrors*/
|
|
144602
144606
|
false
|
|
144603
|
-
)) || isReferenceToType2(type2,
|
|
144607
|
+
)) || isReferenceToType2(type2, resolver2.getGlobalGeneratorType(
|
|
144604
144608
|
/*reportErrors*/
|
|
144605
144609
|
false
|
|
144606
144610
|
))) {
|
|
144607
144611
|
const [yieldType, returnType, nextType] = getTypeArguments(type2);
|
|
144608
|
-
return setCachedIterationTypes(type2,
|
|
144612
|
+
return setCachedIterationTypes(type2, resolver2.iterableCacheKey, createIterationTypes(resolver2.resolveIterationType(
|
|
144609
144613
|
yieldType,
|
|
144610
144614
|
/*errorNode*/
|
|
144611
144615
|
void 0
|
|
144612
|
-
) || yieldType,
|
|
144616
|
+
) || yieldType, resolver2.resolveIterationType(
|
|
144613
144617
|
returnType,
|
|
144614
144618
|
/*errorNode*/
|
|
144615
144619
|
void 0
|
|
144616
144620
|
) || returnType, nextType));
|
|
144617
144621
|
}
|
|
144618
|
-
if (isReferenceToSomeType(type2,
|
|
144622
|
+
if (isReferenceToSomeType(type2, resolver2.getGlobalBuiltinIteratorTypes())) {
|
|
144619
144623
|
const [yieldType] = getTypeArguments(type2);
|
|
144620
144624
|
const returnType = getBuiltinIteratorReturnType();
|
|
144621
144625
|
const nextType = unknownType;
|
|
144622
|
-
return setCachedIterationTypes(type2,
|
|
144626
|
+
return setCachedIterationTypes(type2, resolver2.iterableCacheKey, createIterationTypes(resolver2.resolveIterationType(
|
|
144623
144627
|
yieldType,
|
|
144624
144628
|
/*errorNode*/
|
|
144625
144629
|
void 0
|
|
144626
|
-
) || yieldType,
|
|
144630
|
+
) || yieldType, resolver2.resolveIterationType(
|
|
144627
144631
|
returnType,
|
|
144628
144632
|
/*errorNode*/
|
|
144629
144633
|
void 0
|
|
@@ -144638,11 +144642,11 @@ ${lanes.join("\n")}
|
|
|
144638
144642
|
const uniqueType = ctorType && getTypeOfPropertyOfType(getTypeOfSymbol(ctorType), escapeLeadingUnderscores(symbolName2));
|
|
144639
144643
|
return uniqueType && isTypeUsableAsPropertyName(uniqueType) ? getPropertyNameFromType(uniqueType) : `__@${symbolName2}`;
|
|
144640
144644
|
}
|
|
144641
|
-
function getIterationTypesOfIterableSlow(type2,
|
|
144642
|
-
const method = getPropertyOfType(type2, getPropertyNameForKnownSymbolName(
|
|
144645
|
+
function getIterationTypesOfIterableSlow(type2, resolver2, errorNode, errorOutputContainer, noCache) {
|
|
144646
|
+
const method = getPropertyOfType(type2, getPropertyNameForKnownSymbolName(resolver2.iteratorSymbolName));
|
|
144643
144647
|
const methodType = method && !(method.flags & 16777216) ? getTypeOfSymbol(method) : void 0;
|
|
144644
144648
|
if (isTypeAny(methodType)) {
|
|
144645
|
-
return noCache ? anyIterationTypes : setCachedIterationTypes(type2,
|
|
144649
|
+
return noCache ? anyIterationTypes : setCachedIterationTypes(type2, resolver2.iterableCacheKey, anyIterationTypes);
|
|
144646
144650
|
}
|
|
144647
144651
|
const allSignatures = methodType ? getSignaturesOfType(
|
|
144648
144652
|
methodType,
|
|
@@ -144654,7 +144658,7 @@ ${lanes.join("\n")}
|
|
|
144654
144658
|
if (errorNode && some(allSignatures)) {
|
|
144655
144659
|
checkTypeAssignableTo(
|
|
144656
144660
|
type2,
|
|
144657
|
-
|
|
144661
|
+
resolver2.getGlobalIterableType(
|
|
144658
144662
|
/*reportErrors*/
|
|
144659
144663
|
true
|
|
144660
144664
|
),
|
|
@@ -144666,11 +144670,11 @@ ${lanes.join("\n")}
|
|
|
144666
144670
|
errorOutputContainer
|
|
144667
144671
|
);
|
|
144668
144672
|
}
|
|
144669
|
-
return noCache ? noIterationTypes : setCachedIterationTypes(type2,
|
|
144673
|
+
return noCache ? noIterationTypes : setCachedIterationTypes(type2, resolver2.iterableCacheKey, noIterationTypes);
|
|
144670
144674
|
}
|
|
144671
144675
|
const iteratorType = getIntersectionType(map4(validSignatures, getReturnTypeOfSignature));
|
|
144672
|
-
const iterationTypes = getIterationTypesOfIteratorWorker(iteratorType,
|
|
144673
|
-
return noCache ? iterationTypes : setCachedIterationTypes(type2,
|
|
144676
|
+
const iterationTypes = getIterationTypesOfIteratorWorker(iteratorType, resolver2, errorNode, errorOutputContainer, noCache) ?? noIterationTypes;
|
|
144677
|
+
return noCache ? iterationTypes : setCachedIterationTypes(type2, resolver2.iterableCacheKey, iterationTypes);
|
|
144674
144678
|
}
|
|
144675
144679
|
function reportTypeNotIterableError(errorNode, type2, allowAsyncIterables) {
|
|
144676
144680
|
const message = allowAsyncIterables ? Diagnostics.Type_0_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator : Diagnostics.Type_0_must_have_a_Symbol_iterator_method_that_returns_an_iterator;
|
|
@@ -144686,53 +144690,53 @@ ${lanes.join("\n")}
|
|
|
144686
144690
|
);
|
|
144687
144691
|
return errorAndMaybeSuggestAwait(errorNode, suggestAwait, message, typeToString(type2));
|
|
144688
144692
|
}
|
|
144689
|
-
function getIterationTypesOfIterator(type2,
|
|
144693
|
+
function getIterationTypesOfIterator(type2, resolver2, errorNode, errorOutputContainer) {
|
|
144690
144694
|
return getIterationTypesOfIteratorWorker(
|
|
144691
144695
|
type2,
|
|
144692
|
-
|
|
144696
|
+
resolver2,
|
|
144693
144697
|
errorNode,
|
|
144694
144698
|
errorOutputContainer,
|
|
144695
144699
|
/*noCache*/
|
|
144696
144700
|
false
|
|
144697
144701
|
);
|
|
144698
144702
|
}
|
|
144699
|
-
function getIterationTypesOfIteratorWorker(type2,
|
|
144703
|
+
function getIterationTypesOfIteratorWorker(type2, resolver2, errorNode, errorOutputContainer, noCache) {
|
|
144700
144704
|
if (isTypeAny(type2)) {
|
|
144701
144705
|
return anyIterationTypes;
|
|
144702
144706
|
}
|
|
144703
|
-
let iterationTypes = getIterationTypesOfIteratorCached(type2,
|
|
144707
|
+
let iterationTypes = getIterationTypesOfIteratorCached(type2, resolver2) || getIterationTypesOfIteratorFast(type2, resolver2);
|
|
144704
144708
|
if (iterationTypes === noIterationTypes && errorNode) {
|
|
144705
144709
|
iterationTypes = void 0;
|
|
144706
144710
|
noCache = true;
|
|
144707
144711
|
}
|
|
144708
|
-
iterationTypes ?? (iterationTypes = getIterationTypesOfIteratorSlow(type2,
|
|
144712
|
+
iterationTypes ?? (iterationTypes = getIterationTypesOfIteratorSlow(type2, resolver2, errorNode, errorOutputContainer, noCache));
|
|
144709
144713
|
return iterationTypes === noIterationTypes ? void 0 : iterationTypes;
|
|
144710
144714
|
}
|
|
144711
|
-
function getIterationTypesOfIteratorCached(type2,
|
|
144712
|
-
return getCachedIterationTypes(type2,
|
|
144715
|
+
function getIterationTypesOfIteratorCached(type2, resolver2) {
|
|
144716
|
+
return getCachedIterationTypes(type2, resolver2.iteratorCacheKey);
|
|
144713
144717
|
}
|
|
144714
|
-
function getIterationTypesOfIteratorFast(type2,
|
|
144715
|
-
if (isReferenceToType2(type2,
|
|
144718
|
+
function getIterationTypesOfIteratorFast(type2, resolver2) {
|
|
144719
|
+
if (isReferenceToType2(type2, resolver2.getGlobalIterableIteratorType(
|
|
144716
144720
|
/*reportErrors*/
|
|
144717
144721
|
false
|
|
144718
|
-
)) || isReferenceToType2(type2,
|
|
144722
|
+
)) || isReferenceToType2(type2, resolver2.getGlobalIteratorType(
|
|
144719
144723
|
/*reportErrors*/
|
|
144720
144724
|
false
|
|
144721
|
-
)) || isReferenceToType2(type2,
|
|
144725
|
+
)) || isReferenceToType2(type2, resolver2.getGlobalIteratorObjectType(
|
|
144722
144726
|
/*reportErrors*/
|
|
144723
144727
|
false
|
|
144724
|
-
)) || isReferenceToType2(type2,
|
|
144728
|
+
)) || isReferenceToType2(type2, resolver2.getGlobalGeneratorType(
|
|
144725
144729
|
/*reportErrors*/
|
|
144726
144730
|
false
|
|
144727
144731
|
))) {
|
|
144728
144732
|
const [yieldType, returnType, nextType] = getTypeArguments(type2);
|
|
144729
|
-
return setCachedIterationTypes(type2,
|
|
144733
|
+
return setCachedIterationTypes(type2, resolver2.iteratorCacheKey, createIterationTypes(yieldType, returnType, nextType));
|
|
144730
144734
|
}
|
|
144731
|
-
if (isReferenceToSomeType(type2,
|
|
144735
|
+
if (isReferenceToSomeType(type2, resolver2.getGlobalBuiltinIteratorTypes())) {
|
|
144732
144736
|
const [yieldType] = getTypeArguments(type2);
|
|
144733
144737
|
const returnType = getBuiltinIteratorReturnType();
|
|
144734
144738
|
const nextType = unknownType;
|
|
144735
|
-
return setCachedIterationTypes(type2,
|
|
144739
|
+
return setCachedIterationTypes(type2, resolver2.iteratorCacheKey, createIterationTypes(yieldType, returnType, nextType));
|
|
144736
144740
|
}
|
|
144737
144741
|
}
|
|
144738
144742
|
function isIteratorResult(type2, kind) {
|
|
@@ -144801,7 +144805,7 @@ ${lanes.join("\n")}
|
|
|
144801
144805
|
void 0
|
|
144802
144806
|
));
|
|
144803
144807
|
}
|
|
144804
|
-
function getIterationTypesOfMethod(type2,
|
|
144808
|
+
function getIterationTypesOfMethod(type2, resolver2, methodName, errorNode, errorOutputContainer) {
|
|
144805
144809
|
var _a4, _b, _c, _d;
|
|
144806
144810
|
const method = getPropertyOfType(type2, methodName);
|
|
144807
144811
|
if (!method && methodName !== "next") {
|
|
@@ -144822,7 +144826,7 @@ ${lanes.join("\n")}
|
|
|
144822
144826
|
) : emptyArray;
|
|
144823
144827
|
if (methodSignatures.length === 0) {
|
|
144824
144828
|
if (errorNode) {
|
|
144825
|
-
const diagnostic = methodName === "next" ?
|
|
144829
|
+
const diagnostic = methodName === "next" ? resolver2.mustHaveANextMethodDiagnostic : resolver2.mustBeAMethodDiagnostic;
|
|
144826
144830
|
if (errorOutputContainer) {
|
|
144827
144831
|
errorOutputContainer.errors ?? (errorOutputContainer.errors = []);
|
|
144828
144832
|
errorOutputContainer.errors.push(createDiagnosticForNode(errorNode, diagnostic, methodName));
|
|
@@ -144833,11 +144837,11 @@ ${lanes.join("\n")}
|
|
|
144833
144837
|
return methodName === "next" ? noIterationTypes : void 0;
|
|
144834
144838
|
}
|
|
144835
144839
|
if ((methodType == null ? void 0 : methodType.symbol) && methodSignatures.length === 1) {
|
|
144836
|
-
const globalGeneratorType =
|
|
144840
|
+
const globalGeneratorType = resolver2.getGlobalGeneratorType(
|
|
144837
144841
|
/*reportErrors*/
|
|
144838
144842
|
false
|
|
144839
144843
|
);
|
|
144840
|
-
const globalIteratorType =
|
|
144844
|
+
const globalIteratorType = resolver2.getGlobalIteratorType(
|
|
144841
144845
|
/*reportErrors*/
|
|
144842
144846
|
false
|
|
144843
144847
|
);
|
|
@@ -144868,21 +144872,21 @@ ${lanes.join("\n")}
|
|
|
144868
144872
|
if (methodName === "next") {
|
|
144869
144873
|
nextType = methodParameterType;
|
|
144870
144874
|
} else if (methodName === "return") {
|
|
144871
|
-
const resolvedMethodParameterType =
|
|
144875
|
+
const resolvedMethodParameterType = resolver2.resolveIterationType(methodParameterType, errorNode) || anyType;
|
|
144872
144876
|
returnTypes = append(returnTypes, resolvedMethodParameterType);
|
|
144873
144877
|
}
|
|
144874
144878
|
}
|
|
144875
144879
|
let yieldType;
|
|
144876
144880
|
const methodReturnType = methodReturnTypes ? getIntersectionType(methodReturnTypes) : neverType;
|
|
144877
|
-
const resolvedMethodReturnType =
|
|
144881
|
+
const resolvedMethodReturnType = resolver2.resolveIterationType(methodReturnType, errorNode) || anyType;
|
|
144878
144882
|
const iterationTypes = getIterationTypesOfIteratorResult(resolvedMethodReturnType);
|
|
144879
144883
|
if (iterationTypes === noIterationTypes) {
|
|
144880
144884
|
if (errorNode) {
|
|
144881
144885
|
if (errorOutputContainer) {
|
|
144882
144886
|
errorOutputContainer.errors ?? (errorOutputContainer.errors = []);
|
|
144883
|
-
errorOutputContainer.errors.push(createDiagnosticForNode(errorNode,
|
|
144887
|
+
errorOutputContainer.errors.push(createDiagnosticForNode(errorNode, resolver2.mustHaveAValueDiagnostic, methodName));
|
|
144884
144888
|
} else {
|
|
144885
|
-
error22(errorNode,
|
|
144889
|
+
error22(errorNode, resolver2.mustHaveAValueDiagnostic, methodName);
|
|
144886
144890
|
}
|
|
144887
144891
|
}
|
|
144888
144892
|
yieldType = anyType;
|
|
@@ -144893,13 +144897,13 @@ ${lanes.join("\n")}
|
|
|
144893
144897
|
}
|
|
144894
144898
|
return createIterationTypes(yieldType, getUnionType(returnTypes), nextType);
|
|
144895
144899
|
}
|
|
144896
|
-
function getIterationTypesOfIteratorSlow(type2,
|
|
144900
|
+
function getIterationTypesOfIteratorSlow(type2, resolver2, errorNode, errorOutputContainer, noCache) {
|
|
144897
144901
|
const iterationTypes = combineIterationTypes([
|
|
144898
|
-
getIterationTypesOfMethod(type2,
|
|
144899
|
-
getIterationTypesOfMethod(type2,
|
|
144900
|
-
getIterationTypesOfMethod(type2,
|
|
144902
|
+
getIterationTypesOfMethod(type2, resolver2, "next", errorNode, errorOutputContainer),
|
|
144903
|
+
getIterationTypesOfMethod(type2, resolver2, "return", errorNode, errorOutputContainer),
|
|
144904
|
+
getIterationTypesOfMethod(type2, resolver2, "throw", errorNode, errorOutputContainer)
|
|
144901
144905
|
]);
|
|
144902
|
-
return noCache ? iterationTypes : setCachedIterationTypes(type2,
|
|
144906
|
+
return noCache ? iterationTypes : setCachedIterationTypes(type2, resolver2.iteratorCacheKey, iterationTypes);
|
|
144903
144907
|
}
|
|
144904
144908
|
function getIterationTypeOfGeneratorFunctionReturnType(kind, returnType, isAsyncGenerator) {
|
|
144905
144909
|
if (isTypeAny(returnType)) {
|
|
@@ -144913,7 +144917,7 @@ ${lanes.join("\n")}
|
|
|
144913
144917
|
return anyIterationTypes;
|
|
144914
144918
|
}
|
|
144915
144919
|
const use = isAsyncGenerator ? 2 : 1;
|
|
144916
|
-
const
|
|
144920
|
+
const resolver2 = isAsyncGenerator ? asyncIterationTypesResolver : syncIterationTypesResolver;
|
|
144917
144921
|
return getIterationTypesOfIterable(
|
|
144918
144922
|
type2,
|
|
144919
144923
|
use,
|
|
@@ -144921,7 +144925,7 @@ ${lanes.join("\n")}
|
|
|
144921
144925
|
void 0
|
|
144922
144926
|
) || getIterationTypesOfIterator(
|
|
144923
144927
|
type2,
|
|
144924
|
-
|
|
144928
|
+
resolver2,
|
|
144925
144929
|
/*errorNode*/
|
|
144926
144930
|
void 0,
|
|
144927
144931
|
/*errorOutputContainer*/
|
|
@@ -153744,7 +153748,7 @@ ${lanes.join("\n")}
|
|
|
153744
153748
|
return !getImportNeedsImportStarHelper(node) && (isDefaultImport(node) || !!node.importClause && isNamedImports(node.importClause.namedBindings) && containsDefaultReference(node.importClause.namedBindings));
|
|
153745
153749
|
}
|
|
153746
153750
|
function collectExternalModuleInfo(context, sourceFile) {
|
|
153747
|
-
const
|
|
153751
|
+
const resolver2 = context.getEmitResolver();
|
|
153748
153752
|
const compilerOptions = context.getCompilerOptions();
|
|
153749
153753
|
const externalImports = [];
|
|
153750
153754
|
const exportSpecifiers = new IdentifierNameMultiMap();
|
|
@@ -153873,7 +153877,7 @@ ${lanes.join("\n")}
|
|
|
153873
153877
|
if (!node.moduleSpecifier) {
|
|
153874
153878
|
exportSpecifiers.add(name3, specifier);
|
|
153875
153879
|
}
|
|
153876
|
-
const decl =
|
|
153880
|
+
const decl = resolver2.getReferencedImportDeclaration(name3) || resolver2.getReferencedValueDeclaration(name3);
|
|
153877
153881
|
if (decl) {
|
|
153878
153882
|
if (decl.kind === 263) {
|
|
153879
153883
|
addExportedFunctionDeclaration(decl, specifier.name, moduleExportNameIsDefault(specifier.name));
|
|
@@ -155033,7 +155037,7 @@ ${lanes.join("\n")}
|
|
|
155033
155037
|
endLexicalEnvironment,
|
|
155034
155038
|
hoistVariableDeclaration
|
|
155035
155039
|
} = context;
|
|
155036
|
-
const
|
|
155040
|
+
const resolver2 = context.getEmitResolver();
|
|
155037
155041
|
const compilerOptions = context.getCompilerOptions();
|
|
155038
155042
|
const languageVersion = getEmitScriptTarget(compilerOptions);
|
|
155039
155043
|
const moduleKind = getEmitModuleKind(compilerOptions);
|
|
@@ -156346,7 +156350,7 @@ ${lanes.join("\n")}
|
|
|
156346
156350
|
/*generateNameForComputedPropertyName*/
|
|
156347
156351
|
false
|
|
156348
156352
|
);
|
|
156349
|
-
const evaluated =
|
|
156353
|
+
const evaluated = resolver2.getEnumMemberValue(member);
|
|
156350
156354
|
const valueExpression = transformEnumMemberDeclarationValue(member, evaluated == null ? void 0 : evaluated.value);
|
|
156351
156355
|
const innerAssignment = factory2.createAssignment(
|
|
156352
156356
|
factory2.createElementAccessExpression(
|
|
@@ -156627,7 +156631,7 @@ ${lanes.join("\n")}
|
|
|
156627
156631
|
return !node.isTypeOnly && shouldEmitAliasDeclaration(node) ? node : void 0;
|
|
156628
156632
|
}
|
|
156629
156633
|
function visitExportAssignment(node) {
|
|
156630
|
-
return compilerOptions.verbatimModuleSyntax ||
|
|
156634
|
+
return compilerOptions.verbatimModuleSyntax || resolver2.isValueAliasDeclaration(node) ? visitEachChild(node, visitor, context) : void 0;
|
|
156631
156635
|
}
|
|
156632
156636
|
function visitExportDeclaration(node) {
|
|
156633
156637
|
if (node.isTypeOnly) {
|
|
@@ -156670,10 +156674,10 @@ ${lanes.join("\n")}
|
|
|
156670
156674
|
return isNamespaceExport(node) ? visitNamespaceExports(node) : visitNamedExports(node, allowEmpty);
|
|
156671
156675
|
}
|
|
156672
156676
|
function visitExportSpecifier(node) {
|
|
156673
|
-
return !node.isTypeOnly && (compilerOptions.verbatimModuleSyntax ||
|
|
156677
|
+
return !node.isTypeOnly && (compilerOptions.verbatimModuleSyntax || resolver2.isValueAliasDeclaration(node)) ? node : void 0;
|
|
156674
156678
|
}
|
|
156675
156679
|
function shouldEmitImportEqualsDeclaration(node) {
|
|
156676
|
-
return shouldEmitAliasDeclaration(node) || !isExternalModule(currentSourceFile) &&
|
|
156680
|
+
return shouldEmitAliasDeclaration(node) || !isExternalModule(currentSourceFile) && resolver2.isTopLevelValueImportEqualsWithEntityName(node);
|
|
156677
156681
|
}
|
|
156678
156682
|
function visitImportEqualsDeclaration(node) {
|
|
156679
156683
|
if (node.isTypeOnly) {
|
|
@@ -156902,7 +156906,7 @@ ${lanes.join("\n")}
|
|
|
156902
156906
|
}
|
|
156903
156907
|
function trySubstituteNamespaceExportedName(node) {
|
|
156904
156908
|
if (enabledSubstitutions & applicableSubstitutions && !isGeneratedIdentifier(node) && !isLocalName(node)) {
|
|
156905
|
-
const container =
|
|
156909
|
+
const container = resolver2.getReferencedExportContainer(
|
|
156906
156910
|
node,
|
|
156907
156911
|
/*prefixLocals*/
|
|
156908
156912
|
false
|
|
@@ -156946,10 +156950,10 @@ ${lanes.join("\n")}
|
|
|
156946
156950
|
if (getIsolatedModules(compilerOptions)) {
|
|
156947
156951
|
return void 0;
|
|
156948
156952
|
}
|
|
156949
|
-
return isPropertyAccessExpression(node) || isElementAccessExpression(node) ?
|
|
156953
|
+
return isPropertyAccessExpression(node) || isElementAccessExpression(node) ? resolver2.getConstantValue(node) : void 0;
|
|
156950
156954
|
}
|
|
156951
156955
|
function shouldEmitAliasDeclaration(node) {
|
|
156952
|
-
return compilerOptions.verbatimModuleSyntax || isInJSFile(node) ||
|
|
156956
|
+
return compilerOptions.verbatimModuleSyntax || isInJSFile(node) || resolver2.isReferencedAliasDeclaration(node);
|
|
156953
156957
|
}
|
|
156954
156958
|
}
|
|
156955
156959
|
function transformClassFields(context) {
|
|
@@ -156962,7 +156966,7 @@ ${lanes.join("\n")}
|
|
|
156962
156966
|
resumeLexicalEnvironment,
|
|
156963
156967
|
addBlockScopedVariable
|
|
156964
156968
|
} = context;
|
|
156965
|
-
const
|
|
156969
|
+
const resolver2 = context.getEmitResolver();
|
|
156966
156970
|
const compilerOptions = context.getCompilerOptions();
|
|
156967
156971
|
const languageVersion = getEmitScriptTarget(compilerOptions);
|
|
156968
156972
|
const useDefineForClassFields = getUseDefineForClassFields(compilerOptions);
|
|
@@ -158001,7 +158005,7 @@ ${lanes.join("\n")}
|
|
|
158001
158005
|
containsInstancePrivateElements || (containsInstancePrivateElements = isPrivateIdentifierClassElementDeclaration(member));
|
|
158002
158006
|
} else if (isPrivateIdentifierClassElementDeclaration(member)) {
|
|
158003
158007
|
containsInstancePrivateElements = true;
|
|
158004
|
-
if (
|
|
158008
|
+
if (resolver2.hasNodeCheckFlag(
|
|
158005
158009
|
member,
|
|
158006
158010
|
262144
|
|
158007
158011
|
/* ContainsConstructorReference */
|
|
@@ -158112,7 +158116,7 @@ ${lanes.join("\n")}
|
|
|
158112
158116
|
if ((_b = node.emitNode) == null ? void 0 : _b.classThis) {
|
|
158113
158117
|
getClassLexicalEnvironment().classThis = node.emitNode.classThis;
|
|
158114
158118
|
}
|
|
158115
|
-
const isClassWithConstructorReference =
|
|
158119
|
+
const isClassWithConstructorReference = resolver2.hasNodeCheckFlag(
|
|
158116
158120
|
node,
|
|
158117
158121
|
262144
|
|
158118
158122
|
/* ContainsConstructorReference */
|
|
@@ -158186,12 +158190,12 @@ ${lanes.join("\n")}
|
|
|
158186
158190
|
var _a4, _b, _c;
|
|
158187
158191
|
const isDecoratedClassDeclaration = !!(facts & 1);
|
|
158188
158192
|
const staticPropertiesOrClassStaticBlocks = getStaticPropertiesAndClassStaticBlock(node);
|
|
158189
|
-
const isClassWithConstructorReference =
|
|
158193
|
+
const isClassWithConstructorReference = resolver2.hasNodeCheckFlag(
|
|
158190
158194
|
node,
|
|
158191
158195
|
262144
|
|
158192
158196
|
/* ContainsConstructorReference */
|
|
158193
158197
|
);
|
|
158194
|
-
const requiresBlockScopedVar =
|
|
158198
|
+
const requiresBlockScopedVar = resolver2.hasNodeCheckFlag(
|
|
158195
158199
|
node,
|
|
158196
158200
|
32768
|
|
158197
158201
|
/* BlockScopedBindingInLoop */
|
|
@@ -158836,7 +158840,7 @@ ${lanes.join("\n")}
|
|
|
158836
158840
|
const alreadyTransformed = !!cacheAssignment || isAssignmentExpression(innerExpression) && isGeneratedIdentifier(innerExpression.left);
|
|
158837
158841
|
if (!alreadyTransformed && !inlinable && shouldHoist) {
|
|
158838
158842
|
const generatedName = factory2.getGeneratedNameForNode(name3);
|
|
158839
|
-
if (
|
|
158843
|
+
if (resolver2.hasNodeCheckFlag(
|
|
158840
158844
|
name3,
|
|
158841
158845
|
32768
|
|
158842
158846
|
/* BlockScopedBindingInLoop */
|
|
@@ -158994,7 +158998,7 @@ ${lanes.join("\n")}
|
|
|
158994
158998
|
prefix,
|
|
158995
158999
|
suffix
|
|
158996
159000
|
);
|
|
158997
|
-
if (
|
|
159001
|
+
if (resolver2.hasNodeCheckFlag(
|
|
158998
159002
|
node,
|
|
158999
159003
|
32768
|
|
159000
159004
|
/* BlockScopedBindingInLoop */
|
|
@@ -159239,12 +159243,12 @@ ${lanes.join("\n")}
|
|
|
159239
159243
|
}
|
|
159240
159244
|
function trySubstituteClassAlias(node) {
|
|
159241
159245
|
if (enabledSubstitutions & 1) {
|
|
159242
|
-
if (
|
|
159246
|
+
if (resolver2.hasNodeCheckFlag(
|
|
159243
159247
|
node,
|
|
159244
159248
|
536870912
|
|
159245
159249
|
/* ConstructorReference */
|
|
159246
159250
|
)) {
|
|
159247
|
-
const declaration =
|
|
159251
|
+
const declaration = resolver2.getReferencedValueDeclaration(node);
|
|
159248
159252
|
if (declaration) {
|
|
159249
159253
|
const classAlias = classAliases[declaration.id];
|
|
159250
159254
|
if (classAlias) {
|
|
@@ -159300,7 +159304,7 @@ ${lanes.join("\n")}
|
|
|
159300
159304
|
factory: factory2,
|
|
159301
159305
|
hoistVariableDeclaration
|
|
159302
159306
|
} = context;
|
|
159303
|
-
const
|
|
159307
|
+
const resolver2 = context.getEmitResolver();
|
|
159304
159308
|
const compilerOptions = context.getCompilerOptions();
|
|
159305
159309
|
const languageVersion = getEmitScriptTarget(compilerOptions);
|
|
159306
159310
|
const strictNullChecks = getStrictOptionValue(compilerOptions, "strictNullChecks");
|
|
@@ -159562,7 +159566,7 @@ ${lanes.join("\n")}
|
|
|
159562
159566
|
);
|
|
159563
159567
|
}
|
|
159564
159568
|
function serializeTypeReferenceNode(node) {
|
|
159565
|
-
const kind =
|
|
159569
|
+
const kind = resolver2.getTypeReferenceSerializationKind(node.typeName, currentNameScope ?? currentLexicalScope);
|
|
159566
159570
|
switch (kind) {
|
|
159567
159571
|
case 0:
|
|
159568
159572
|
if (findAncestor(node, (n) => n.parent && isConditionalTypeNode(n.parent) && (n.parent.trueType === n || n.parent.falseType === n))) {
|
|
@@ -159672,7 +159676,7 @@ ${lanes.join("\n")}
|
|
|
159672
159676
|
getEmitHelperFactory: emitHelpers,
|
|
159673
159677
|
hoistVariableDeclaration
|
|
159674
159678
|
} = context;
|
|
159675
|
-
const
|
|
159679
|
+
const resolver2 = context.getEmitResolver();
|
|
159676
159680
|
const compilerOptions = context.getCompilerOptions();
|
|
159677
159681
|
const languageVersion = getEmitScriptTarget(compilerOptions);
|
|
159678
159682
|
const previousOnSubstituteNode = context.onSubstituteNode;
|
|
@@ -160174,7 +160178,7 @@ ${lanes.join("\n")}
|
|
|
160174
160178
|
}
|
|
160175
160179
|
}
|
|
160176
160180
|
function getClassAliasIfNeeded(node) {
|
|
160177
|
-
if (
|
|
160181
|
+
if (resolver2.hasNodeCheckFlag(
|
|
160178
160182
|
node,
|
|
160179
160183
|
262144
|
|
160180
160184
|
/* ContainsConstructorReference */
|
|
@@ -160211,12 +160215,12 @@ ${lanes.join("\n")}
|
|
|
160211
160215
|
}
|
|
160212
160216
|
function trySubstituteClassAlias(node) {
|
|
160213
160217
|
if (classAliases) {
|
|
160214
|
-
if (
|
|
160218
|
+
if (resolver2.hasNodeCheckFlag(
|
|
160215
160219
|
node,
|
|
160216
160220
|
536870912
|
|
160217
160221
|
/* ConstructorReference */
|
|
160218
160222
|
)) {
|
|
160219
|
-
const declaration =
|
|
160223
|
+
const declaration = resolver2.getReferencedValueDeclaration(node);
|
|
160220
160224
|
if (declaration) {
|
|
160221
160225
|
const classAlias = classAliases[declaration.id];
|
|
160222
160226
|
if (classAlias) {
|
|
@@ -162225,7 +162229,7 @@ ${lanes.join("\n")}
|
|
|
162225
162229
|
endLexicalEnvironment,
|
|
162226
162230
|
hoistVariableDeclaration
|
|
162227
162231
|
} = context;
|
|
162228
|
-
const
|
|
162232
|
+
const resolver2 = context.getEmitResolver();
|
|
162229
162233
|
const compilerOptions = context.getCompilerOptions();
|
|
162230
162234
|
const languageVersion = getEmitScriptTarget(compilerOptions);
|
|
162231
162235
|
let enabledSubstitutions = 0;
|
|
@@ -162304,7 +162308,7 @@ ${lanes.join("\n")}
|
|
|
162304
162308
|
case 261:
|
|
162305
162309
|
break;
|
|
162306
162310
|
case 80:
|
|
162307
|
-
if (lexicalArgumentsBinding &&
|
|
162311
|
+
if (lexicalArgumentsBinding && resolver2.isArgumentsLocalBinding(node)) {
|
|
162308
162312
|
return lexicalArgumentsBinding;
|
|
162309
162313
|
}
|
|
162310
162314
|
break;
|
|
@@ -162656,11 +162660,11 @@ ${lanes.join("\n")}
|
|
|
162656
162660
|
hasSuperElementAccess = false;
|
|
162657
162661
|
let updated = visitFunctionBody(node.body, visitor, context);
|
|
162658
162662
|
const originalMethod = getOriginalNode(node, isFunctionLikeDeclaration);
|
|
162659
|
-
const emitSuperHelpers = languageVersion >= 2 && (
|
|
162663
|
+
const emitSuperHelpers = languageVersion >= 2 && (resolver2.hasNodeCheckFlag(
|
|
162660
162664
|
node,
|
|
162661
162665
|
256
|
|
162662
162666
|
/* MethodWithSuperPropertyAssignmentInAsync */
|
|
162663
|
-
) ||
|
|
162667
|
+
) || resolver2.hasNodeCheckFlag(
|
|
162664
162668
|
node,
|
|
162665
162669
|
128
|
|
162666
162670
|
/* MethodWithSuperPropertyAccessInAsync */
|
|
@@ -162668,20 +162672,20 @@ ${lanes.join("\n")}
|
|
|
162668
162672
|
if (emitSuperHelpers) {
|
|
162669
162673
|
enableSubstitutionForAsyncMethodsWithSuper();
|
|
162670
162674
|
if (capturedSuperProperties.size) {
|
|
162671
|
-
const variableStatement = createSuperAccessVariableStatement(factory2,
|
|
162675
|
+
const variableStatement = createSuperAccessVariableStatement(factory2, resolver2, node, capturedSuperProperties);
|
|
162672
162676
|
substitutedSuperAccessors[getNodeId(variableStatement)] = true;
|
|
162673
162677
|
const statements = updated.statements.slice();
|
|
162674
162678
|
insertStatementsAfterStandardPrologue(statements, [variableStatement]);
|
|
162675
162679
|
updated = factory2.updateBlock(updated, statements);
|
|
162676
162680
|
}
|
|
162677
162681
|
if (hasSuperElementAccess) {
|
|
162678
|
-
if (
|
|
162682
|
+
if (resolver2.hasNodeCheckFlag(
|
|
162679
162683
|
node,
|
|
162680
162684
|
256
|
|
162681
162685
|
/* MethodWithSuperPropertyAssignmentInAsync */
|
|
162682
162686
|
)) {
|
|
162683
162687
|
addEmitHelper(updated, advancedAsyncSuperHelper);
|
|
162684
|
-
} else if (
|
|
162688
|
+
} else if (resolver2.hasNodeCheckFlag(
|
|
162685
162689
|
node,
|
|
162686
162690
|
128
|
|
162687
162691
|
/* MethodWithSuperPropertyAccessInAsync */
|
|
@@ -162767,7 +162771,7 @@ ${lanes.join("\n")}
|
|
|
162767
162771
|
const promiseConstructor = languageVersion < 2 ? getPromiseConstructor(nodeType) : void 0;
|
|
162768
162772
|
const isArrowFunction2 = node.kind === 220;
|
|
162769
162773
|
const savedLexicalArgumentsBinding = lexicalArgumentsBinding;
|
|
162770
|
-
const hasLexicalArguments =
|
|
162774
|
+
const hasLexicalArguments = resolver2.hasNodeCheckFlag(
|
|
162771
162775
|
node,
|
|
162772
162776
|
512
|
|
162773
162777
|
/* CaptureArguments */
|
|
@@ -162826,11 +162830,11 @@ ${lanes.join("\n")}
|
|
|
162826
162830
|
)
|
|
162827
162831
|
)
|
|
162828
162832
|
);
|
|
162829
|
-
const emitSuperHelpers = languageVersion >= 2 && (
|
|
162833
|
+
const emitSuperHelpers = languageVersion >= 2 && (resolver2.hasNodeCheckFlag(
|
|
162830
162834
|
node,
|
|
162831
162835
|
256
|
|
162832
162836
|
/* MethodWithSuperPropertyAssignmentInAsync */
|
|
162833
|
-
) ||
|
|
162837
|
+
) || resolver2.hasNodeCheckFlag(
|
|
162834
162838
|
node,
|
|
162835
162839
|
128
|
|
162836
162840
|
/* MethodWithSuperPropertyAccessInAsync */
|
|
@@ -162838,7 +162842,7 @@ ${lanes.join("\n")}
|
|
|
162838
162842
|
if (emitSuperHelpers) {
|
|
162839
162843
|
enableSubstitutionForAsyncMethodsWithSuper();
|
|
162840
162844
|
if (capturedSuperProperties.size) {
|
|
162841
|
-
const variableStatement = createSuperAccessVariableStatement(factory2,
|
|
162845
|
+
const variableStatement = createSuperAccessVariableStatement(factory2, resolver2, node, capturedSuperProperties);
|
|
162842
162846
|
substitutedSuperAccessors[getNodeId(variableStatement)] = true;
|
|
162843
162847
|
insertStatementsAfterStandardPrologue(statements, [variableStatement]);
|
|
162844
162848
|
}
|
|
@@ -162853,13 +162857,13 @@ ${lanes.join("\n")}
|
|
|
162853
162857
|
);
|
|
162854
162858
|
setTextRange(block, node.body);
|
|
162855
162859
|
if (emitSuperHelpers && hasSuperElementAccess) {
|
|
162856
|
-
if (
|
|
162860
|
+
if (resolver2.hasNodeCheckFlag(
|
|
162857
162861
|
node,
|
|
162858
162862
|
256
|
|
162859
162863
|
/* MethodWithSuperPropertyAssignmentInAsync */
|
|
162860
162864
|
)) {
|
|
162861
162865
|
addEmitHelper(block, advancedAsyncSuperHelper);
|
|
162862
|
-
} else if (
|
|
162866
|
+
} else if (resolver2.hasNodeCheckFlag(
|
|
162863
162867
|
node,
|
|
162864
162868
|
128
|
|
162865
162869
|
/* MethodWithSuperPropertyAccessInAsync */
|
|
@@ -162899,7 +162903,7 @@ ${lanes.join("\n")}
|
|
|
162899
162903
|
function getPromiseConstructor(type2) {
|
|
162900
162904
|
const typeName = type2 && getEntityNameFromTypeNode(type2);
|
|
162901
162905
|
if (typeName && isEntityName(typeName)) {
|
|
162902
|
-
const serializationKind =
|
|
162906
|
+
const serializationKind = resolver2.getTypeReferenceSerializationKind(typeName);
|
|
162903
162907
|
if (serializationKind === 1 || serializationKind === 0) {
|
|
162904
162908
|
return typeName;
|
|
162905
162909
|
}
|
|
@@ -162949,11 +162953,11 @@ ${lanes.join("\n")}
|
|
|
162949
162953
|
}
|
|
162950
162954
|
function onEmitNode(hint, node, emitCallback) {
|
|
162951
162955
|
if (enabledSubstitutions & 1 && isSuperContainer(node)) {
|
|
162952
|
-
const superContainerFlags = (
|
|
162956
|
+
const superContainerFlags = (resolver2.hasNodeCheckFlag(
|
|
162953
162957
|
node,
|
|
162954
162958
|
128
|
|
162955
162959
|
/* MethodWithSuperPropertyAccessInAsync */
|
|
162956
|
-
) ? 128 : 0) | (
|
|
162960
|
+
) ? 128 : 0) | (resolver2.hasNodeCheckFlag(
|
|
162957
162961
|
node,
|
|
162958
162962
|
256
|
|
162959
162963
|
/* MethodWithSuperPropertyAssignmentInAsync */
|
|
@@ -163072,8 +163076,8 @@ ${lanes.join("\n")}
|
|
|
163072
163076
|
}
|
|
163073
163077
|
}
|
|
163074
163078
|
}
|
|
163075
|
-
function createSuperAccessVariableStatement(factory2,
|
|
163076
|
-
const hasBinding =
|
|
163079
|
+
function createSuperAccessVariableStatement(factory2, resolver2, node, names) {
|
|
163080
|
+
const hasBinding = resolver2.hasNodeCheckFlag(
|
|
163077
163081
|
node,
|
|
163078
163082
|
256
|
|
163079
163083
|
/* MethodWithSuperPropertyAssignmentInAsync */
|
|
@@ -163210,7 +163214,7 @@ ${lanes.join("\n")}
|
|
|
163210
163214
|
endLexicalEnvironment,
|
|
163211
163215
|
hoistVariableDeclaration
|
|
163212
163216
|
} = context;
|
|
163213
|
-
const
|
|
163217
|
+
const resolver2 = context.getEmitResolver();
|
|
163214
163218
|
const compilerOptions = context.getCompilerOptions();
|
|
163215
163219
|
const languageVersion = getEmitScriptTarget(compilerOptions);
|
|
163216
163220
|
const previousOnEmitNode = context.onEmitNode;
|
|
@@ -164219,31 +164223,31 @@ ${lanes.join("\n")}
|
|
|
164219
164223
|
!!(hierarchyFacts & 1)
|
|
164220
164224
|
)
|
|
164221
164225
|
);
|
|
164222
|
-
const emitSuperHelpers = languageVersion >= 2 && (
|
|
164226
|
+
const emitSuperHelpers = languageVersion >= 2 && (resolver2.hasNodeCheckFlag(
|
|
164223
164227
|
node,
|
|
164224
164228
|
256
|
|
164225
164229
|
/* MethodWithSuperPropertyAssignmentInAsync */
|
|
164226
|
-
) ||
|
|
164230
|
+
) || resolver2.hasNodeCheckFlag(
|
|
164227
164231
|
node,
|
|
164228
164232
|
128
|
|
164229
164233
|
/* MethodWithSuperPropertyAccessInAsync */
|
|
164230
164234
|
));
|
|
164231
164235
|
if (emitSuperHelpers) {
|
|
164232
164236
|
enableSubstitutionForAsyncMethodsWithSuper();
|
|
164233
|
-
const variableStatement = createSuperAccessVariableStatement(factory2,
|
|
164237
|
+
const variableStatement = createSuperAccessVariableStatement(factory2, resolver2, node, capturedSuperProperties);
|
|
164234
164238
|
substitutedSuperAccessors[getNodeId(variableStatement)] = true;
|
|
164235
164239
|
insertStatementsAfterStandardPrologue(outerStatements, [variableStatement]);
|
|
164236
164240
|
}
|
|
164237
164241
|
outerStatements.push(returnStatement);
|
|
164238
164242
|
const block = factory2.updateBlock(node.body, outerStatements);
|
|
164239
164243
|
if (emitSuperHelpers && hasSuperElementAccess) {
|
|
164240
|
-
if (
|
|
164244
|
+
if (resolver2.hasNodeCheckFlag(
|
|
164241
164245
|
node,
|
|
164242
164246
|
256
|
|
164243
164247
|
/* MethodWithSuperPropertyAssignmentInAsync */
|
|
164244
164248
|
)) {
|
|
164245
164249
|
addEmitHelper(block, advancedAsyncSuperHelper);
|
|
164246
|
-
} else if (
|
|
164250
|
+
} else if (resolver2.hasNodeCheckFlag(
|
|
164247
164251
|
node,
|
|
164248
164252
|
128
|
|
164249
164253
|
/* MethodWithSuperPropertyAccessInAsync */
|
|
@@ -164439,11 +164443,11 @@ ${lanes.join("\n")}
|
|
|
164439
164443
|
}
|
|
164440
164444
|
function onEmitNode(hint, node, emitCallback) {
|
|
164441
164445
|
if (enabledSubstitutions & 1 && isSuperContainer(node)) {
|
|
164442
|
-
const superContainerFlags = (
|
|
164446
|
+
const superContainerFlags = (resolver2.hasNodeCheckFlag(
|
|
164443
164447
|
node,
|
|
164444
164448
|
128
|
|
164445
164449
|
/* MethodWithSuperPropertyAccessInAsync */
|
|
164446
|
-
) ? 128 : 0) | (
|
|
164450
|
+
) ? 128 : 0) | (resolver2.hasNodeCheckFlag(
|
|
164447
164451
|
node,
|
|
164448
164452
|
256
|
|
164449
164453
|
/* MethodWithSuperPropertyAssignmentInAsync */
|
|
@@ -166540,7 +166544,7 @@ ${lanes.join("\n")}
|
|
|
166540
166544
|
hoistVariableDeclaration
|
|
166541
166545
|
} = context;
|
|
166542
166546
|
const compilerOptions = context.getCompilerOptions();
|
|
166543
|
-
const
|
|
166547
|
+
const resolver2 = context.getEmitResolver();
|
|
166544
166548
|
const previousOnSubstituteNode = context.onSubstituteNode;
|
|
166545
166549
|
const previousOnEmitNode = context.onEmitNode;
|
|
166546
166550
|
context.onEmitNode = onEmitNode;
|
|
@@ -166892,7 +166896,7 @@ ${lanes.join("\n")}
|
|
|
166892
166896
|
}
|
|
166893
166897
|
function visitIdentifier(node) {
|
|
166894
166898
|
if (convertedLoopState) {
|
|
166895
|
-
if (
|
|
166899
|
+
if (resolver2.isArgumentsLocalBinding(node)) {
|
|
166896
166900
|
return convertedLoopState.argumentsName || (convertedLoopState.argumentsName = factory2.createUniqueName("arguments"));
|
|
166897
166901
|
}
|
|
166898
166902
|
}
|
|
@@ -168496,18 +168500,18 @@ ${lanes.join("\n")}
|
|
|
168496
168500
|
return createRange(pos, end);
|
|
168497
168501
|
}
|
|
168498
168502
|
function shouldEmitExplicitInitializerForLetDeclaration(node) {
|
|
168499
|
-
const isCapturedInFunction =
|
|
168503
|
+
const isCapturedInFunction = resolver2.hasNodeCheckFlag(
|
|
168500
168504
|
node,
|
|
168501
168505
|
16384
|
|
168502
168506
|
/* CapturedBlockScopedBinding */
|
|
168503
168507
|
);
|
|
168504
|
-
const isDeclaredInLoop =
|
|
168508
|
+
const isDeclaredInLoop = resolver2.hasNodeCheckFlag(
|
|
168505
168509
|
node,
|
|
168506
168510
|
32768
|
|
168507
168511
|
/* BlockScopedBindingInLoop */
|
|
168508
168512
|
);
|
|
168509
168513
|
const emittedAsTopLevel = (hierarchyFacts & 64) !== 0 || isCapturedInFunction && isDeclaredInLoop && (hierarchyFacts & 512) !== 0;
|
|
168510
|
-
const emitExplicitInitializer = !emittedAsTopLevel && (hierarchyFacts & 4096) === 0 && (!
|
|
168514
|
+
const emitExplicitInitializer = !emittedAsTopLevel && (hierarchyFacts & 4096) === 0 && (!resolver2.isDeclarationWithCollidingName(node) || isDeclaredInLoop && !isCapturedInFunction && (hierarchyFacts & (2048 | 4096)) === 0);
|
|
168511
168515
|
return emitExplicitInitializer;
|
|
168512
168516
|
}
|
|
168513
168517
|
function visitVariableDeclarationInLetDeclarationList(node) {
|
|
@@ -168982,7 +168986,7 @@ ${lanes.join("\n")}
|
|
|
168982
168986
|
return factory2.inlineExpressions(expressions);
|
|
168983
168987
|
}
|
|
168984
168988
|
function shouldConvertPartOfIterationStatement(node) {
|
|
168985
|
-
return
|
|
168989
|
+
return resolver2.hasNodeCheckFlag(
|
|
168986
168990
|
node,
|
|
168987
168991
|
8192
|
|
168988
168992
|
/* ContainsCapturedBlockScopeBinding */
|
|
@@ -169001,7 +169005,7 @@ ${lanes.join("\n")}
|
|
|
169001
169005
|
return shouldConvertBodyOfIterationStatement(node) || shouldConvertInitializerOfForStatement(node);
|
|
169002
169006
|
}
|
|
169003
169007
|
function shouldConvertBodyOfIterationStatement(node) {
|
|
169004
|
-
return
|
|
169008
|
+
return resolver2.hasNodeCheckFlag(
|
|
169005
169009
|
node,
|
|
169006
169010
|
4096
|
|
169007
169011
|
/* LoopWithCapturedBlockScopedBinding */
|
|
@@ -169576,7 +169580,7 @@ ${lanes.join("\n")}
|
|
|
169576
169580
|
void 0,
|
|
169577
169581
|
name3
|
|
169578
169582
|
));
|
|
169579
|
-
const needsOutParam =
|
|
169583
|
+
const needsOutParam = resolver2.hasNodeCheckFlag(
|
|
169580
169584
|
decl,
|
|
169581
169585
|
65536
|
|
169582
169586
|
/* NeedsLoopOutParameter */
|
|
@@ -169588,10 +169592,10 @@ ${lanes.join("\n")}
|
|
|
169588
169592
|
flags |= 1;
|
|
169589
169593
|
}
|
|
169590
169594
|
if (isForStatement(container)) {
|
|
169591
|
-
if (container.initializer &&
|
|
169595
|
+
if (container.initializer && resolver2.isBindingCapturedByNode(container.initializer, decl)) {
|
|
169592
169596
|
flags |= 2;
|
|
169593
169597
|
}
|
|
169594
|
-
if (container.condition &&
|
|
169598
|
+
if (container.condition && resolver2.isBindingCapturedByNode(container.condition, decl) || container.incrementor && resolver2.isBindingCapturedByNode(container.incrementor, decl)) {
|
|
169595
169599
|
flags |= 1;
|
|
169596
169600
|
}
|
|
169597
169601
|
}
|
|
@@ -170205,7 +170209,7 @@ ${lanes.join("\n")}
|
|
|
170205
170209
|
case 264:
|
|
170206
170210
|
case 267:
|
|
170207
170211
|
case 261:
|
|
170208
|
-
return node.parent.name === node &&
|
|
170212
|
+
return node.parent.name === node && resolver2.isDeclarationWithCollidingName(node.parent);
|
|
170209
170213
|
}
|
|
170210
170214
|
return false;
|
|
170211
170215
|
}
|
|
@@ -170220,7 +170224,7 @@ ${lanes.join("\n")}
|
|
|
170220
170224
|
}
|
|
170221
170225
|
function substituteExpressionIdentifier(node) {
|
|
170222
170226
|
if (enabledSubstitutions & 2 && !isInternalName(node)) {
|
|
170223
|
-
const declaration =
|
|
170227
|
+
const declaration = resolver2.getReferencedDeclarationWithCollidingName(node);
|
|
170224
170228
|
if (declaration && !(isClassLike(declaration) && isPartOfClassBody(declaration, node))) {
|
|
170225
170229
|
return setTextRange(factory2.getGeneratedNameForNode(getNameOfDeclaration(declaration)), node);
|
|
170226
170230
|
}
|
|
@@ -170307,7 +170311,7 @@ ${lanes.join("\n")}
|
|
|
170307
170311
|
} = context;
|
|
170308
170312
|
const compilerOptions = context.getCompilerOptions();
|
|
170309
170313
|
const languageVersion = getEmitScriptTarget(compilerOptions);
|
|
170310
|
-
const
|
|
170314
|
+
const resolver2 = context.getEmitResolver();
|
|
170311
170315
|
const previousOnSubstituteNode = context.onSubstituteNode;
|
|
170312
170316
|
context.onSubstituteNode = onSubstituteNode;
|
|
170313
170317
|
let renamedCatchVariables;
|
|
@@ -171454,7 +171458,7 @@ ${lanes.join("\n")}
|
|
|
171454
171458
|
if (!isGeneratedIdentifier(node) && renamedCatchVariables && renamedCatchVariables.has(idText(node))) {
|
|
171455
171459
|
const original = getOriginalNode(node);
|
|
171456
171460
|
if (isIdentifier(original) && original.parent) {
|
|
171457
|
-
const declaration =
|
|
171461
|
+
const declaration = resolver2.getReferencedValueDeclaration(original);
|
|
171458
171462
|
if (declaration) {
|
|
171459
171463
|
const name3 = renamedCatchVariableDeclarations[getOriginalNodeId(declaration)];
|
|
171460
171464
|
if (name3) {
|
|
@@ -172365,7 +172369,7 @@ ${lanes.join("\n")}
|
|
|
172365
172369
|
hoistVariableDeclaration
|
|
172366
172370
|
} = context;
|
|
172367
172371
|
const compilerOptions = context.getCompilerOptions();
|
|
172368
|
-
const
|
|
172372
|
+
const resolver2 = context.getEmitResolver();
|
|
172369
172373
|
const host = context.getEmitHost();
|
|
172370
172374
|
const languageVersion = getEmitScriptTarget(compilerOptions);
|
|
172371
172375
|
const moduleKind = getEmitModuleKind(compilerOptions);
|
|
@@ -172736,7 +172740,7 @@ ${lanes.join("\n")}
|
|
|
172736
172740
|
}
|
|
172737
172741
|
}
|
|
172738
172742
|
for (const importNode of currentModuleInfo.externalImports) {
|
|
172739
|
-
const externalModuleName = getExternalModuleNameLiteral(factory2, importNode, currentSourceFile, host,
|
|
172743
|
+
const externalModuleName = getExternalModuleNameLiteral(factory2, importNode, currentSourceFile, host, resolver2, compilerOptions);
|
|
172740
172744
|
const importAliasName = getLocalNameForExternalImport(factory2, importNode, currentSourceFile);
|
|
172741
172745
|
if (externalModuleName) {
|
|
172742
172746
|
if (includeNonAmdDependencies && importAliasName) {
|
|
@@ -172761,7 +172765,7 @@ ${lanes.join("\n")}
|
|
|
172761
172765
|
return { aliasedModuleNames, unaliasedModuleNames, importAliasNames };
|
|
172762
172766
|
}
|
|
172763
172767
|
function getAMDImportExpressionForImport(node) {
|
|
172764
|
-
if (isImportEqualsDeclaration(node) || isExportDeclaration(node) || !getExternalModuleNameLiteral(factory2, node, currentSourceFile, host,
|
|
172768
|
+
if (isImportEqualsDeclaration(node) || isExportDeclaration(node) || !getExternalModuleNameLiteral(factory2, node, currentSourceFile, host, resolver2, compilerOptions)) {
|
|
172765
172769
|
return void 0;
|
|
172766
172770
|
}
|
|
172767
172771
|
const name3 = getLocalNameForExternalImport(factory2, node, currentSourceFile);
|
|
@@ -173243,7 +173247,7 @@ ${lanes.join("\n")}
|
|
|
173243
173247
|
if (moduleKind === 0 && languageVersion >= 7) {
|
|
173244
173248
|
return visitEachChild(node, visitor, context);
|
|
173245
173249
|
}
|
|
173246
|
-
const externalModuleName = getExternalModuleNameLiteral(factory2, node, currentSourceFile, host,
|
|
173250
|
+
const externalModuleName = getExternalModuleNameLiteral(factory2, node, currentSourceFile, host, resolver2, compilerOptions);
|
|
173247
173251
|
const firstArgument = visitNode(firstOrUndefined(node.arguments), visitor, isExpression);
|
|
173248
173252
|
const argument = externalModuleName && (!firstArgument || !isStringLiteral(firstArgument) || firstArgument.text !== externalModuleName.text) ? externalModuleName : firstArgument && rewriteOrShim ? isStringLiteral(firstArgument) ? rewriteModuleSpecifier(firstArgument, compilerOptions) : emitHelpers().createRewriteRelativeImportExtensionsHelper(firstArgument) : firstArgument;
|
|
173249
173253
|
const containsLexicalThis = !!(node.transformFlags & 16384);
|
|
@@ -173583,7 +173587,7 @@ ${lanes.join("\n")}
|
|
|
173583
173587
|
return singleOrMany(statements);
|
|
173584
173588
|
}
|
|
173585
173589
|
function createRequireCall2(importNode) {
|
|
173586
|
-
const moduleName = getExternalModuleNameLiteral(factory2, importNode, currentSourceFile, host,
|
|
173590
|
+
const moduleName = getExternalModuleNameLiteral(factory2, importNode, currentSourceFile, host, resolver2, compilerOptions);
|
|
173587
173591
|
const args = [];
|
|
173588
173592
|
if (moduleName) {
|
|
173589
173593
|
args.push(rewriteModuleSpecifier(moduleName, compilerOptions));
|
|
@@ -174295,7 +174299,7 @@ ${lanes.join("\n")}
|
|
|
174295
174299
|
}
|
|
174296
174300
|
return node;
|
|
174297
174301
|
} else if (!(isGeneratedIdentifier(node) && !(node.emitNode.autoGenerate.flags & 64)) && !isLocalName(node)) {
|
|
174298
|
-
const exportContainer =
|
|
174302
|
+
const exportContainer = resolver2.getReferencedExportContainer(node, isExportName(node));
|
|
174299
174303
|
if (exportContainer && exportContainer.kind === 308) {
|
|
174300
174304
|
return setTextRange(
|
|
174301
174305
|
factory2.createPropertyAccessExpression(
|
|
@@ -174306,7 +174310,7 @@ ${lanes.join("\n")}
|
|
|
174306
174310
|
node
|
|
174307
174311
|
);
|
|
174308
174312
|
}
|
|
174309
|
-
const importDeclaration =
|
|
174313
|
+
const importDeclaration = resolver2.getReferencedImportDeclaration(node);
|
|
174310
174314
|
if (importDeclaration) {
|
|
174311
174315
|
if (isImportClause(importDeclaration)) {
|
|
174312
174316
|
return setTextRange(
|
|
@@ -174351,12 +174355,12 @@ ${lanes.join("\n")}
|
|
|
174351
174355
|
}
|
|
174352
174356
|
function getExports(name3) {
|
|
174353
174357
|
if (!isGeneratedIdentifier(name3)) {
|
|
174354
|
-
const importDeclaration =
|
|
174358
|
+
const importDeclaration = resolver2.getReferencedImportDeclaration(name3);
|
|
174355
174359
|
if (importDeclaration) {
|
|
174356
174360
|
return currentModuleInfo == null ? void 0 : currentModuleInfo.exportedBindings[getOriginalNodeId(importDeclaration)];
|
|
174357
174361
|
}
|
|
174358
174362
|
const bindingsSet = /* @__PURE__ */ new Set();
|
|
174359
|
-
const declarations =
|
|
174363
|
+
const declarations = resolver2.getReferencedValueDeclarations(name3);
|
|
174360
174364
|
if (declarations) {
|
|
174361
174365
|
for (const declaration of declarations) {
|
|
174362
174366
|
const bindings = currentModuleInfo == null ? void 0 : currentModuleInfo.exportedBindings[getOriginalNodeId(declaration)];
|
|
@@ -174396,7 +174400,7 @@ ${lanes.join("\n")}
|
|
|
174396
174400
|
hoistVariableDeclaration
|
|
174397
174401
|
} = context;
|
|
174398
174402
|
const compilerOptions = context.getCompilerOptions();
|
|
174399
|
-
const
|
|
174403
|
+
const resolver2 = context.getEmitResolver();
|
|
174400
174404
|
const host = context.getEmitHost();
|
|
174401
174405
|
const previousOnSubstituteNode = context.onSubstituteNode;
|
|
174402
174406
|
const previousOnEmitNode = context.onEmitNode;
|
|
@@ -174517,7 +174521,7 @@ ${lanes.join("\n")}
|
|
|
174517
174521
|
const groupIndices = /* @__PURE__ */ new Map();
|
|
174518
174522
|
const dependencyGroups = [];
|
|
174519
174523
|
for (const externalImport of externalImports) {
|
|
174520
|
-
const externalModuleName = getExternalModuleNameLiteral(factory2, externalImport, currentSourceFile, host,
|
|
174524
|
+
const externalModuleName = getExternalModuleNameLiteral(factory2, externalImport, currentSourceFile, host, resolver2, compilerOptions);
|
|
174521
174525
|
if (externalModuleName) {
|
|
174522
174526
|
const text = externalModuleName.text;
|
|
174523
174527
|
const groupIndex = groupIndices.get(text);
|
|
@@ -175483,7 +175487,7 @@ ${lanes.join("\n")}
|
|
|
175483
175487
|
return factory2.updatePartiallyEmittedExpression(node, visitNode(node.expression, valueIsDiscarded ? discardedValueVisitor : visitor, isExpression));
|
|
175484
175488
|
}
|
|
175485
175489
|
function visitImportCallExpression(node) {
|
|
175486
|
-
const externalModuleName = getExternalModuleNameLiteral(factory2, node, currentSourceFile, host,
|
|
175490
|
+
const externalModuleName = getExternalModuleNameLiteral(factory2, node, currentSourceFile, host, resolver2, compilerOptions);
|
|
175487
175491
|
const firstArgument = visitNode(firstOrUndefined(node.arguments), visitor, isExpression);
|
|
175488
175492
|
const argument = externalModuleName && (!firstArgument || !isStringLiteral(firstArgument) || firstArgument.text !== externalModuleName.text) ? externalModuleName : firstArgument;
|
|
175489
175493
|
return factory2.createCallExpression(
|
|
@@ -175526,7 +175530,7 @@ ${lanes.join("\n")}
|
|
|
175526
175530
|
} else if (isPropertyAssignment(node)) {
|
|
175527
175531
|
return hasExportedReferenceInDestructuringTarget(node.initializer);
|
|
175528
175532
|
} else if (isIdentifier(node)) {
|
|
175529
|
-
const container =
|
|
175533
|
+
const container = resolver2.getReferencedExportContainer(node);
|
|
175530
175534
|
return container !== void 0 && container.kind === 308;
|
|
175531
175535
|
} else {
|
|
175532
175536
|
return false;
|
|
@@ -175614,7 +175618,7 @@ ${lanes.join("\n")}
|
|
|
175614
175618
|
var _a4, _b;
|
|
175615
175619
|
const name3 = node.name;
|
|
175616
175620
|
if (!isGeneratedIdentifier(name3) && !isLocalName(name3)) {
|
|
175617
|
-
const importDeclaration =
|
|
175621
|
+
const importDeclaration = resolver2.getReferencedImportDeclaration(name3);
|
|
175618
175622
|
if (importDeclaration) {
|
|
175619
175623
|
if (isImportClause(importDeclaration)) {
|
|
175620
175624
|
return setTextRange(
|
|
@@ -175665,7 +175669,7 @@ ${lanes.join("\n")}
|
|
|
175665
175669
|
return node;
|
|
175666
175670
|
}
|
|
175667
175671
|
if (!isGeneratedIdentifier(node) && !isLocalName(node)) {
|
|
175668
|
-
const importDeclaration =
|
|
175672
|
+
const importDeclaration = resolver2.getReferencedImportDeclaration(node);
|
|
175669
175673
|
if (importDeclaration) {
|
|
175670
175674
|
if (isImportClause(importDeclaration)) {
|
|
175671
175675
|
return setTextRange(
|
|
@@ -175712,7 +175716,7 @@ ${lanes.join("\n")}
|
|
|
175712
175716
|
let exportedNames;
|
|
175713
175717
|
const valueDeclaration = getReferencedDeclaration(name3);
|
|
175714
175718
|
if (valueDeclaration) {
|
|
175715
|
-
const exportContainer =
|
|
175719
|
+
const exportContainer = resolver2.getReferencedExportContainer(
|
|
175716
175720
|
name3,
|
|
175717
175721
|
/*prefixLocals*/
|
|
175718
175722
|
false
|
|
@@ -175735,11 +175739,11 @@ ${lanes.join("\n")}
|
|
|
175735
175739
|
}
|
|
175736
175740
|
function getReferencedDeclaration(name3) {
|
|
175737
175741
|
if (!isGeneratedIdentifier(name3)) {
|
|
175738
|
-
const importDeclaration =
|
|
175742
|
+
const importDeclaration = resolver2.getReferencedImportDeclaration(name3);
|
|
175739
175743
|
if (importDeclaration) return importDeclaration;
|
|
175740
|
-
const valueDeclaration =
|
|
175744
|
+
const valueDeclaration = resolver2.getReferencedValueDeclaration(name3);
|
|
175741
175745
|
if (valueDeclaration && (moduleInfo == null ? void 0 : moduleInfo.exportedBindings[getOriginalNodeId(valueDeclaration)])) return valueDeclaration;
|
|
175742
|
-
const declarations =
|
|
175746
|
+
const declarations = resolver2.getReferencedValueDeclarations(name3);
|
|
175743
175747
|
if (declarations) {
|
|
175744
175748
|
for (const declaration of declarations) {
|
|
175745
175749
|
if (declaration !== valueDeclaration && (moduleInfo == null ? void 0 : moduleInfo.exportedBindings[getOriginalNodeId(declaration)])) return declaration;
|
|
@@ -175763,7 +175767,7 @@ ${lanes.join("\n")}
|
|
|
175763
175767
|
getEmitHelperFactory: emitHelpers
|
|
175764
175768
|
} = context;
|
|
175765
175769
|
const host = context.getEmitHost();
|
|
175766
|
-
const
|
|
175770
|
+
const resolver2 = context.getEmitResolver();
|
|
175767
175771
|
const compilerOptions = context.getCompilerOptions();
|
|
175768
175772
|
const languageVersion = getEmitScriptTarget(compilerOptions);
|
|
175769
175773
|
const previousOnEmitNode = context.onEmitNode;
|
|
@@ -175890,7 +175894,7 @@ ${lanes.join("\n")}
|
|
|
175890
175894
|
);
|
|
175891
175895
|
}
|
|
175892
175896
|
function createRequireCall2(importNode) {
|
|
175893
|
-
const moduleName = getExternalModuleNameLiteral(factory2, importNode, Debug.checkDefined(currentSourceFile), host,
|
|
175897
|
+
const moduleName = getExternalModuleNameLiteral(factory2, importNode, Debug.checkDefined(currentSourceFile), host, resolver2, compilerOptions);
|
|
175894
175898
|
const args = [];
|
|
175895
175899
|
if (moduleName) {
|
|
175896
175900
|
args.push(rewriteModuleSpecifier(moduleName, compilerOptions));
|
|
@@ -176476,7 +176480,7 @@ ${lanes.join("\n")}
|
|
|
176476
176480
|
};
|
|
176477
176481
|
}
|
|
176478
176482
|
}
|
|
176479
|
-
function createGetIsolatedDeclarationErrors(
|
|
176483
|
+
function createGetIsolatedDeclarationErrors(resolver2) {
|
|
176480
176484
|
const relatedSuggestionByDeclarationKind = {
|
|
176481
176485
|
[
|
|
176482
176486
|
220
|
|
@@ -176706,7 +176710,7 @@ ${lanes.join("\n")}
|
|
|
176706
176710
|
if (isSetAccessor(node.parent)) {
|
|
176707
176711
|
return createAccessorTypeError(node.parent);
|
|
176708
176712
|
}
|
|
176709
|
-
const addUndefined =
|
|
176713
|
+
const addUndefined = resolver2.requiresAddingImplicitUndefined(node, node.parent);
|
|
176710
176714
|
if (!addUndefined && node.initializer) {
|
|
176711
176715
|
return createExpressionError(node.initializer);
|
|
176712
176716
|
}
|
|
@@ -176756,11 +176760,11 @@ ${lanes.join("\n")}
|
|
|
176756
176760
|
return diag2;
|
|
176757
176761
|
}
|
|
176758
176762
|
}
|
|
176759
|
-
function getDeclarationDiagnostics(host,
|
|
176763
|
+
function getDeclarationDiagnostics(host, resolver2, file) {
|
|
176760
176764
|
const compilerOptions = host.getCompilerOptions();
|
|
176761
176765
|
const files = filter6(getSourceFilesToEmit(host, file), isSourceFileNotJson);
|
|
176762
176766
|
return contains(files, file) ? transformNodes(
|
|
176763
|
-
|
|
176767
|
+
resolver2,
|
|
176764
176768
|
host,
|
|
176765
176769
|
factory,
|
|
176766
176770
|
compilerOptions,
|
|
@@ -176818,13 +176822,13 @@ ${lanes.join("\n")}
|
|
|
176818
176822
|
let rawReferencedFiles;
|
|
176819
176823
|
let rawTypeReferenceDirectives;
|
|
176820
176824
|
let rawLibReferenceDirectives;
|
|
176821
|
-
const
|
|
176825
|
+
const resolver2 = context.getEmitResolver();
|
|
176822
176826
|
const options = context.getCompilerOptions();
|
|
176823
|
-
const getIsolatedDeclarationError = createGetIsolatedDeclarationErrors(
|
|
176827
|
+
const getIsolatedDeclarationError = createGetIsolatedDeclarationErrors(resolver2);
|
|
176824
176828
|
const { stripInternal, isolatedDeclarations } = options;
|
|
176825
176829
|
return transformRoot;
|
|
176826
176830
|
function reportExpandoFunctionErrors(node) {
|
|
176827
|
-
|
|
176831
|
+
resolver2.getPropertiesOfContainerFunction(node).forEach((p) => {
|
|
176828
176832
|
if (isExpandoPropertyDeclaration(p.valueDeclaration)) {
|
|
176829
176833
|
const errorTarget = isBinaryExpression(p.valueDeclaration) ? p.valueDeclaration.left : p.valueDeclaration;
|
|
176830
176834
|
context.addDiagnostic(createDiagnosticForNode(
|
|
@@ -176837,7 +176841,7 @@ ${lanes.join("\n")}
|
|
|
176837
176841
|
function reportInferenceFallback(node) {
|
|
176838
176842
|
if (!isolatedDeclarations || isSourceFileJS(currentSourceFile)) return;
|
|
176839
176843
|
if (getSourceFileOfNode(node) !== currentSourceFile) return;
|
|
176840
|
-
if (isVariableDeclaration(node) &&
|
|
176844
|
+
if (isVariableDeclaration(node) && resolver2.isExpandoFunctionDeclaration(node)) {
|
|
176841
176845
|
reportExpandoFunctionErrors(node);
|
|
176842
176846
|
} else {
|
|
176843
176847
|
context.addDiagnostic(getIsolatedDeclarationError(node));
|
|
@@ -176869,7 +176873,7 @@ ${lanes.join("\n")}
|
|
|
176869
176873
|
}
|
|
176870
176874
|
function trackSymbol(symbol, enclosingDeclaration2, meaning) {
|
|
176871
176875
|
if (symbol.flags & 262144) return false;
|
|
176872
|
-
const issuedDiagnostic = handleSymbolAccessibilityError(
|
|
176876
|
+
const issuedDiagnostic = handleSymbolAccessibilityError(resolver2.isSymbolAccessible(
|
|
176873
176877
|
symbol,
|
|
176874
176878
|
enclosingDeclaration2,
|
|
176875
176879
|
meaning,
|
|
@@ -176940,7 +176944,7 @@ ${lanes.join("\n")}
|
|
|
176940
176944
|
diagnosticMessage: s.errorModuleName ? Diagnostics.Declaration_emit_for_this_file_requires_using_private_name_0_from_module_1_An_explicit_type_annotation_may_unblock_declaration_emit : Diagnostics.Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_declaration_emit,
|
|
176941
176945
|
errorNode: s.errorNode || sourceFile
|
|
176942
176946
|
};
|
|
176943
|
-
const result =
|
|
176947
|
+
const result = resolver2.getDeclarationStatementsForSourceFile(sourceFile, declarationEmitNodeBuilderFlags, declarationEmitInternalNodeBuilderFlags, symbolTracker);
|
|
176944
176948
|
getSymbolAccessibilityDiagnostic = oldDiag;
|
|
176945
176949
|
return result;
|
|
176946
176950
|
}
|
|
@@ -177161,7 +177165,7 @@ ${lanes.join("\n")}
|
|
|
177161
177165
|
maskModifiers(factory2, p, modifierMask),
|
|
177162
177166
|
p.dotDotDotToken,
|
|
177163
177167
|
filterBindingPatternInitializers(p.name),
|
|
177164
|
-
|
|
177168
|
+
resolver2.isOptionalParameter(p) ? p.questionToken || factory2.createToken(
|
|
177165
177169
|
58
|
|
177166
177170
|
/* QuestionToken */
|
|
177167
177171
|
) : void 0,
|
|
@@ -177179,7 +177183,7 @@ ${lanes.join("\n")}
|
|
|
177179
177183
|
return newParam;
|
|
177180
177184
|
}
|
|
177181
177185
|
function shouldPrintWithInitializer(node) {
|
|
177182
|
-
return canHaveLiteralInitializer(node) && !!node.initializer &&
|
|
177186
|
+
return canHaveLiteralInitializer(node) && !!node.initializer && resolver2.isLiteralConstDeclaration(getParseTreeNode(node));
|
|
177183
177187
|
}
|
|
177184
177188
|
function ensureNoInitializer(node) {
|
|
177185
177189
|
if (shouldPrintWithInitializer(node)) {
|
|
@@ -177187,7 +177191,7 @@ ${lanes.join("\n")}
|
|
|
177187
177191
|
if (!isPrimitiveLiteralValue(unwrappedInitializer)) {
|
|
177188
177192
|
reportInferenceFallback(node);
|
|
177189
177193
|
}
|
|
177190
|
-
return
|
|
177194
|
+
return resolver2.createLiteralConstValue(getParseTreeNode(node, canHaveLiteralInitializer), symbolTracker);
|
|
177191
177195
|
}
|
|
177192
177196
|
return void 0;
|
|
177193
177197
|
}
|
|
@@ -177202,7 +177206,7 @@ ${lanes.join("\n")}
|
|
|
177202
177206
|
if (shouldPrintWithInitializer(node)) {
|
|
177203
177207
|
return;
|
|
177204
177208
|
}
|
|
177205
|
-
if (!isExportAssignment(node) && !isBindingElement(node) && node.type && (!isParameter(node) || !
|
|
177209
|
+
if (!isExportAssignment(node) && !isBindingElement(node) && node.type && (!isParameter(node) || !resolver2.requiresAddingImplicitUndefined(node, enclosingDeclaration))) {
|
|
177206
177210
|
return visitNode(node.type, visitDeclarationSubtree, isTypeNode);
|
|
177207
177211
|
}
|
|
177208
177212
|
const oldErrorNameNode = errorNameNode;
|
|
@@ -177216,9 +177220,9 @@ ${lanes.join("\n")}
|
|
|
177216
177220
|
}
|
|
177217
177221
|
let typeNode;
|
|
177218
177222
|
if (hasInferredType(node)) {
|
|
177219
|
-
typeNode =
|
|
177223
|
+
typeNode = resolver2.createTypeOfDeclaration(node, enclosingDeclaration, declarationEmitNodeBuilderFlags, declarationEmitInternalNodeBuilderFlags, symbolTracker);
|
|
177220
177224
|
} else if (isFunctionLike(node)) {
|
|
177221
|
-
typeNode =
|
|
177225
|
+
typeNode = resolver2.createReturnTypeOfSignatureDeclaration(node, enclosingDeclaration, declarationEmitNodeBuilderFlags, declarationEmitInternalNodeBuilderFlags, symbolTracker);
|
|
177222
177226
|
} else {
|
|
177223
177227
|
Debug.assertNever(node);
|
|
177224
177228
|
}
|
|
@@ -177240,7 +177244,7 @@ ${lanes.join("\n")}
|
|
|
177240
177244
|
case 264:
|
|
177241
177245
|
case 266:
|
|
177242
177246
|
case 267:
|
|
177243
|
-
return !
|
|
177247
|
+
return !resolver2.isDeclarationVisible(node);
|
|
177244
177248
|
// The following should be doing their own visibility checks based on filtering their members
|
|
177245
177249
|
case 261:
|
|
177246
177250
|
return !getBindingNameVisible(node);
|
|
@@ -177269,7 +177273,7 @@ ${lanes.join("\n")}
|
|
|
177269
177273
|
if (isBindingPattern(elem.name)) {
|
|
177270
177274
|
return some(elem.name.elements, getBindingNameVisible);
|
|
177271
177275
|
} else {
|
|
177272
|
-
return
|
|
177276
|
+
return resolver2.isDeclarationVisible(elem);
|
|
177273
177277
|
}
|
|
177274
177278
|
}
|
|
177275
177279
|
function updateParamsList(node, params, modifierMask) {
|
|
@@ -177326,7 +177330,7 @@ ${lanes.join("\n")}
|
|
|
177326
177330
|
return isSourceFile(node) || isTypeAliasDeclaration(node) || isModuleDeclaration(node) || isClassDeclaration(node) || isInterfaceDeclaration(node) || isFunctionLike(node) || isIndexSignatureDeclaration(node) || isMappedTypeNode(node);
|
|
177327
177331
|
}
|
|
177328
177332
|
function checkEntityNameVisibility(entityName, enclosingDeclaration2) {
|
|
177329
|
-
const visibilityResult =
|
|
177333
|
+
const visibilityResult = resolver2.isEntityNameVisible(entityName, enclosingDeclaration2);
|
|
177330
177334
|
handleSymbolAccessibilityError(visibilityResult);
|
|
177331
177335
|
}
|
|
177332
177336
|
function preserveJsDoc(updated, original) {
|
|
@@ -177340,7 +177344,7 @@ ${lanes.join("\n")}
|
|
|
177340
177344
|
resultHasExternalModuleIndicator = resultHasExternalModuleIndicator || parent2.kind !== 268 && parent2.kind !== 206;
|
|
177341
177345
|
if (isStringLiteralLike(input)) {
|
|
177342
177346
|
if (isBundledEmit) {
|
|
177343
|
-
const newName = getExternalModuleNameFromDeclaration(context.getEmitHost(),
|
|
177347
|
+
const newName = getExternalModuleNameFromDeclaration(context.getEmitHost(), resolver2, parent2);
|
|
177344
177348
|
if (newName) {
|
|
177345
177349
|
return factory2.createStringLiteral(newName);
|
|
177346
177350
|
}
|
|
@@ -177349,7 +177353,7 @@ ${lanes.join("\n")}
|
|
|
177349
177353
|
return input;
|
|
177350
177354
|
}
|
|
177351
177355
|
function transformImportEqualsDeclaration(decl) {
|
|
177352
|
-
if (!
|
|
177356
|
+
if (!resolver2.isDeclarationVisible(decl)) return;
|
|
177353
177357
|
if (decl.moduleReference.kind === 284) {
|
|
177354
177358
|
const specifier = getExternalModuleImportEqualsDeclarationExpression(decl);
|
|
177355
177359
|
return factory2.updateImportEqualsDeclaration(
|
|
@@ -177378,7 +177382,7 @@ ${lanes.join("\n")}
|
|
|
177378
177382
|
);
|
|
177379
177383
|
}
|
|
177380
177384
|
const phaseModifier = decl.importClause.phaseModifier === 166 ? void 0 : decl.importClause.phaseModifier;
|
|
177381
|
-
const visibleDefaultBinding = decl.importClause && decl.importClause.name &&
|
|
177385
|
+
const visibleDefaultBinding = decl.importClause && decl.importClause.name && resolver2.isDeclarationVisible(decl.importClause) ? decl.importClause.name : void 0;
|
|
177382
177386
|
if (!decl.importClause.namedBindings) {
|
|
177383
177387
|
return visibleDefaultBinding && factory2.updateImportDeclaration(
|
|
177384
177388
|
decl,
|
|
@@ -177395,7 +177399,7 @@ ${lanes.join("\n")}
|
|
|
177395
177399
|
);
|
|
177396
177400
|
}
|
|
177397
177401
|
if (decl.importClause.namedBindings.kind === 275) {
|
|
177398
|
-
const namedBindings =
|
|
177402
|
+
const namedBindings = resolver2.isDeclarationVisible(decl.importClause.namedBindings) ? decl.importClause.namedBindings : (
|
|
177399
177403
|
/*namedBindings*/
|
|
177400
177404
|
void 0
|
|
177401
177405
|
);
|
|
@@ -177412,7 +177416,7 @@ ${lanes.join("\n")}
|
|
|
177412
177416
|
tryGetResolutionModeOverride(decl.attributes)
|
|
177413
177417
|
) : void 0;
|
|
177414
177418
|
}
|
|
177415
|
-
const bindingList = mapDefined(decl.importClause.namedBindings.elements, (b) =>
|
|
177419
|
+
const bindingList = mapDefined(decl.importClause.namedBindings.elements, (b) => resolver2.isDeclarationVisible(b) ? b : void 0);
|
|
177416
177420
|
if (bindingList && bindingList.length || visibleDefaultBinding) {
|
|
177417
177421
|
return factory2.updateImportDeclaration(
|
|
177418
177422
|
decl,
|
|
@@ -177427,7 +177431,7 @@ ${lanes.join("\n")}
|
|
|
177427
177431
|
tryGetResolutionModeOverride(decl.attributes)
|
|
177428
177432
|
);
|
|
177429
177433
|
}
|
|
177430
|
-
if (
|
|
177434
|
+
if (resolver2.isImportRequiredByAugmentation(decl)) {
|
|
177431
177435
|
if (isolatedDeclarations) {
|
|
177432
177436
|
context.addDiagnostic(createDiagnosticForNode(decl, Diagnostics.Declaration_emit_for_this_file_requires_preserving_this_import_for_augmentations_This_is_not_supported_with_isolatedDeclarations));
|
|
177433
177437
|
}
|
|
@@ -177484,7 +177488,7 @@ ${lanes.join("\n")}
|
|
|
177484
177488
|
if (isDeclarationAndNotVisible(input)) return;
|
|
177485
177489
|
if (hasDynamicName(input)) {
|
|
177486
177490
|
if (isolatedDeclarations) {
|
|
177487
|
-
if (!
|
|
177491
|
+
if (!resolver2.isDefinitelyReferenceToGlobalSymbolObject(input.name.expression)) {
|
|
177488
177492
|
if (isClassDeclaration(input.parent) || isObjectLiteralExpression(input.parent)) {
|
|
177489
177493
|
context.addDiagnostic(createDiagnosticForNode(input, Diagnostics.Computed_property_names_on_class_or_object_literals_cannot_be_inferred_with_isolatedDeclarations));
|
|
177490
177494
|
return;
|
|
@@ -177496,12 +177500,12 @@ ${lanes.join("\n")}
|
|
|
177496
177500
|
return;
|
|
177497
177501
|
}
|
|
177498
177502
|
}
|
|
177499
|
-
} else if (!
|
|
177503
|
+
} else if (!resolver2.isLateBound(getParseTreeNode(input)) || !isEntityNameExpression(input.name.expression)) {
|
|
177500
177504
|
return;
|
|
177501
177505
|
}
|
|
177502
177506
|
}
|
|
177503
177507
|
}
|
|
177504
|
-
if (isFunctionLike(input) &&
|
|
177508
|
+
if (isFunctionLike(input) && resolver2.isImplementationOfOverload(input)) return;
|
|
177505
177509
|
if (isSemicolonClassElement(input)) return;
|
|
177506
177510
|
let previousEnclosingDeclaration;
|
|
177507
177511
|
if (isEnclosingDeclaration(input)) {
|
|
@@ -177922,7 +177926,7 @@ ${lanes.join("\n")}
|
|
|
177922
177926
|
}
|
|
177923
177927
|
if (isDeclaration(input) && isDeclarationAndNotVisible(input)) return;
|
|
177924
177928
|
if (isJSDocImportTag(input)) return;
|
|
177925
|
-
if (isFunctionLike(input) &&
|
|
177929
|
+
if (isFunctionLike(input) && resolver2.isImplementationOfOverload(input)) return;
|
|
177926
177930
|
let previousEnclosingDeclaration;
|
|
177927
177931
|
if (isEnclosingDeclaration(input)) {
|
|
177928
177932
|
previousEnclosingDeclaration = enclosingDeclaration;
|
|
@@ -177970,8 +177974,8 @@ ${lanes.join("\n")}
|
|
|
177970
177974
|
/*body*/
|
|
177971
177975
|
void 0
|
|
177972
177976
|
));
|
|
177973
|
-
if (clean22 &&
|
|
177974
|
-
const props =
|
|
177977
|
+
if (clean22 && resolver2.isExpandoFunctionDeclaration(input) && shouldEmitFunctionProperties(input)) {
|
|
177978
|
+
const props = resolver2.getPropertiesOfContainerFunction(input);
|
|
177975
177979
|
if (isolatedDeclarations) {
|
|
177976
177980
|
reportExpandoFunctionErrors(input);
|
|
177977
177981
|
}
|
|
@@ -178000,7 +178004,7 @@ ${lanes.join("\n")}
|
|
|
178000
178004
|
return void 0;
|
|
178001
178005
|
}
|
|
178002
178006
|
getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(p.valueDeclaration);
|
|
178003
|
-
const type2 =
|
|
178007
|
+
const type2 = resolver2.createTypeOfDeclaration(p.valueDeclaration, fakespace, declarationEmitNodeBuilderFlags, declarationEmitInternalNodeBuilderFlags | 2, symbolTracker);
|
|
178004
178008
|
getSymbolAccessibilityDiagnostic = oldDiag;
|
|
178005
178009
|
const isNonContextualKeywordName = isStringANonContextualKeyword(nameStr);
|
|
178006
178010
|
const name3 = isNonContextualKeywordName ? factory2.getGeneratedNameForNode(p.valueDeclaration) : factory2.createIdentifier(nameStr);
|
|
@@ -178208,7 +178212,7 @@ ${lanes.join("\n")}
|
|
|
178208
178212
|
void 0
|
|
178209
178213
|
)
|
|
178210
178214
|
] : void 0;
|
|
178211
|
-
const lateIndexes =
|
|
178215
|
+
const lateIndexes = resolver2.createLateBoundIndexSignatures(input, enclosingDeclaration, declarationEmitNodeBuilderFlags, declarationEmitInternalNodeBuilderFlags, symbolTracker);
|
|
178212
178216
|
const memberNodes = concatenate(concatenate(concatenate(privateIdentifier, lateIndexes), parameterProperties), visitNodes2(input.members, visitDeclarationSubtree, isClassElement));
|
|
178213
178217
|
const members = factory2.createNodeArray(memberNodes);
|
|
178214
178218
|
const extendsClause = getEffectiveBaseTypeNode(input);
|
|
@@ -178228,7 +178232,7 @@ ${lanes.join("\n")}
|
|
|
178228
178232
|
newId,
|
|
178229
178233
|
/*exclamationToken*/
|
|
178230
178234
|
void 0,
|
|
178231
|
-
|
|
178235
|
+
resolver2.createTypeOfExpression(extendsClause.expression, input, declarationEmitNodeBuilderFlags, declarationEmitInternalNodeBuilderFlags, symbolTracker),
|
|
178232
178236
|
/*initializer*/
|
|
178233
178237
|
void 0
|
|
178234
178238
|
);
|
|
@@ -178287,7 +178291,7 @@ ${lanes.join("\n")}
|
|
|
178287
178291
|
input.name,
|
|
178288
178292
|
factory2.createNodeArray(mapDefined(input.members, (m2) => {
|
|
178289
178293
|
if (shouldStripInternal(m2)) return;
|
|
178290
|
-
const enumValue =
|
|
178294
|
+
const enumValue = resolver2.getEnumMemberValue(m2);
|
|
178291
178295
|
const constValue = enumValue == null ? void 0 : enumValue.value;
|
|
178292
178296
|
if (isolatedDeclarations && m2.initializer && (enumValue == null ? void 0 : enumValue.hasExternalReferences) && // This will be its own compiler error instead, so don't report.
|
|
178293
178297
|
!isComputedPropertyName(m2.name)) {
|
|
@@ -178596,7 +178600,7 @@ ${lanes.join("\n")}
|
|
|
178596
178600
|
function noEmitNotification(hint, node, callback2) {
|
|
178597
178601
|
callback2(hint, node);
|
|
178598
178602
|
}
|
|
178599
|
-
function transformNodes(
|
|
178603
|
+
function transformNodes(resolver2, host, factory2, options, nodes, transformers, allowDtsFiles) {
|
|
178600
178604
|
var _a4, _b;
|
|
178601
178605
|
const enabledSyntaxKindFeatures = new Array(
|
|
178602
178606
|
359
|
|
@@ -178623,7 +178627,7 @@ ${lanes.join("\n")}
|
|
|
178623
178627
|
const context = {
|
|
178624
178628
|
factory: factory2,
|
|
178625
178629
|
getCompilerOptions: () => options,
|
|
178626
|
-
getEmitResolver: () =>
|
|
178630
|
+
getEmitResolver: () => resolver2,
|
|
178627
178631
|
// TODO: GH#18217
|
|
178628
178632
|
getEmitHost: () => host,
|
|
178629
178633
|
// TODO: GH#18217
|
|
@@ -179203,7 +179207,7 @@ ${lanes.join("\n")}
|
|
|
179203
179207
|
function emitResolverSkipsTypeChecking(emitOnly, forceDtsEmit) {
|
|
179204
179208
|
return !!forceDtsEmit && !!emitOnly;
|
|
179205
179209
|
}
|
|
179206
|
-
function emitFiles(
|
|
179210
|
+
function emitFiles(resolver2, host, targetSourceFile, { scriptTransformers, declarationTransformers }, emitOnly, onlyBuildInfo, forceDtsEmit, skipBuildInfo) {
|
|
179207
179211
|
var compilerOptions = host.getCompilerOptions();
|
|
179208
179212
|
var sourceMapDataList = compilerOptions.sourceMap || compilerOptions.inlineSourceMap || getAreDeclarationMapsEnabled(compilerOptions) ? [] : void 0;
|
|
179209
179213
|
var emittedFilesList = compilerOptions.listEmittedFiles ? [] : void 0;
|
|
@@ -179274,7 +179278,7 @@ ${lanes.join("\n")}
|
|
|
179274
179278
|
}
|
|
179275
179279
|
);
|
|
179276
179280
|
const transform22 = transformNodes(
|
|
179277
|
-
|
|
179281
|
+
resolver2,
|
|
179278
179282
|
host,
|
|
179279
179283
|
factory,
|
|
179280
179284
|
compilerOptions,
|
|
@@ -179297,7 +179301,7 @@ ${lanes.join("\n")}
|
|
|
179297
179301
|
};
|
|
179298
179302
|
const printer = createPrinter(printerOptions, {
|
|
179299
179303
|
// resolver hooks
|
|
179300
|
-
hasGlobalName:
|
|
179304
|
+
hasGlobalName: resolver2.hasGlobalName,
|
|
179301
179305
|
// transform hooks
|
|
179302
179306
|
onEmitNode: transform22.emitNodeWithNotification,
|
|
179303
179307
|
isEmitNotificationEnabled: transform22.isEmitNotificationEnabled,
|
|
@@ -179328,7 +179332,7 @@ ${lanes.join("\n")}
|
|
|
179328
179332
|
}
|
|
179329
179333
|
});
|
|
179330
179334
|
const declarationTransform = transformNodes(
|
|
179331
|
-
|
|
179335
|
+
resolver2,
|
|
179332
179336
|
host,
|
|
179333
179337
|
factory,
|
|
179334
179338
|
compilerOptions,
|
|
@@ -179361,7 +179365,7 @@ ${lanes.join("\n")}
|
|
|
179361
179365
|
};
|
|
179362
179366
|
const declarationPrinter = createPrinter(printerOptions, {
|
|
179363
179367
|
// resolver hooks
|
|
179364
|
-
hasGlobalName:
|
|
179368
|
+
hasGlobalName: resolver2.hasGlobalName,
|
|
179365
179369
|
// transform hooks
|
|
179366
179370
|
onEmitNode: declarationTransform.emitNodeWithNotification,
|
|
179367
179371
|
isEmitNotificationEnabled: declarationTransform.isEmitNotificationEnabled,
|
|
@@ -179392,7 +179396,7 @@ ${lanes.join("\n")}
|
|
|
179392
179396
|
function collectLinkedAliases(node) {
|
|
179393
179397
|
if (isExportAssignment(node)) {
|
|
179394
179398
|
if (node.expression.kind === 80) {
|
|
179395
|
-
|
|
179399
|
+
resolver2.collectLinkedAliases(
|
|
179396
179400
|
node.expression,
|
|
179397
179401
|
/*setVisibility*/
|
|
179398
179402
|
true
|
|
@@ -179400,7 +179404,7 @@ ${lanes.join("\n")}
|
|
|
179400
179404
|
}
|
|
179401
179405
|
return;
|
|
179402
179406
|
} else if (isExportSpecifier(node)) {
|
|
179403
|
-
|
|
179407
|
+
resolver2.collectLinkedAliases(
|
|
179404
179408
|
node.propertyName || node.name,
|
|
179405
179409
|
/*setVisibility*/
|
|
179406
179410
|
true
|
|
@@ -179414,7 +179418,7 @@ ${lanes.join("\n")}
|
|
|
179414
179418
|
forEachChildRecursively(file, (n) => {
|
|
179415
179419
|
if (isImportEqualsDeclaration(n) && !(getSyntacticModifierFlags(n) & 32)) return "skip";
|
|
179416
179420
|
if (isImportDeclaration(n)) return "skip";
|
|
179417
|
-
|
|
179421
|
+
resolver2.markLinkedReferences(n);
|
|
179418
179422
|
});
|
|
179419
179423
|
}
|
|
179420
179424
|
function printSourceFileOrBundle(jsFilePath, sourceMapFilePath, transform22, printer, mapOptions) {
|
|
@@ -187055,8 +187059,8 @@ ${lanes.join("\n")}
|
|
|
187055
187059
|
}
|
|
187056
187060
|
function getDeclarationDiagnosticsForFileNoCache(sourceFile, cancellationToken) {
|
|
187057
187061
|
return runWithCancellationToken(() => {
|
|
187058
|
-
const
|
|
187059
|
-
return getDeclarationDiagnostics(getEmitHost(noop4),
|
|
187062
|
+
const resolver2 = getTypeChecker().getEmitResolver(sourceFile, cancellationToken);
|
|
187063
|
+
return getDeclarationDiagnostics(getEmitHost(noop4), resolver2, sourceFile) || emptyArray;
|
|
187060
187064
|
});
|
|
187061
187065
|
}
|
|
187062
187066
|
function getDeclarationDiagnosticsForFile(sourceFile, cancellationToken) {
|
|
@@ -196533,7 +196537,7 @@ ${lanes.join("\n")}
|
|
|
196533
196537
|
/*reportFallback*/
|
|
196534
196538
|
true
|
|
196535
196539
|
);
|
|
196536
|
-
function createSyntacticTypeNodeBuilder(options,
|
|
196540
|
+
function createSyntacticTypeNodeBuilder(options, resolver2) {
|
|
196537
196541
|
const strictNullChecks = getStrictOptionValue(options, "strictNullChecks");
|
|
196538
196542
|
return {
|
|
196539
196543
|
serializeTypeOfDeclaration,
|
|
@@ -196541,17 +196545,17 @@ ${lanes.join("\n")}
|
|
|
196541
196545
|
serializeTypeOfExpression,
|
|
196542
196546
|
serializeTypeOfAccessor,
|
|
196543
196547
|
tryReuseExistingTypeNode(context, existing) {
|
|
196544
|
-
if (!
|
|
196548
|
+
if (!resolver2.canReuseTypeNode(context, existing)) {
|
|
196545
196549
|
return void 0;
|
|
196546
196550
|
}
|
|
196547
196551
|
return tryReuseExistingTypeNode(context, existing);
|
|
196548
196552
|
}
|
|
196549
196553
|
};
|
|
196550
196554
|
function reuseNode(context, node, range2 = node) {
|
|
196551
|
-
return node === void 0 ? void 0 :
|
|
196555
|
+
return node === void 0 ? void 0 : resolver2.markNodeReuse(context, node.flags & 16 ? node : factory.cloneNode(node), range2 ?? node);
|
|
196552
196556
|
}
|
|
196553
196557
|
function tryReuseExistingTypeNode(context, existing) {
|
|
196554
|
-
const { finalizeBoundary, startRecoveryScope, hadError, markError } =
|
|
196558
|
+
const { finalizeBoundary, startRecoveryScope, hadError, markError } = resolver2.createRecoveryBoundary(context);
|
|
196555
196559
|
const transformed = visitNode(existing, visitExistingNodeTreeSymbols, isTypeNode);
|
|
196556
196560
|
if (!finalizeBoundary()) {
|
|
196557
196561
|
return void 0;
|
|
@@ -196561,17 +196565,17 @@ ${lanes.join("\n")}
|
|
|
196561
196565
|
function visitExistingNodeTreeSymbols(node) {
|
|
196562
196566
|
if (hadError()) return node;
|
|
196563
196567
|
const recover = startRecoveryScope();
|
|
196564
|
-
const onExitNewScope = isNewScopeNode(node) ?
|
|
196568
|
+
const onExitNewScope = isNewScopeNode(node) ? resolver2.enterNewScope(context, node) : void 0;
|
|
196565
196569
|
const result = visitExistingNodeTreeSymbolsWorker(node);
|
|
196566
196570
|
onExitNewScope == null ? void 0 : onExitNewScope();
|
|
196567
196571
|
if (hadError()) {
|
|
196568
196572
|
if (isTypeNode(node) && !isTypePredicateNode(node)) {
|
|
196569
196573
|
recover();
|
|
196570
|
-
return
|
|
196574
|
+
return resolver2.serializeExistingTypeNode(context, node);
|
|
196571
196575
|
}
|
|
196572
196576
|
return node;
|
|
196573
196577
|
}
|
|
196574
|
-
return result ?
|
|
196578
|
+
return result ? resolver2.markNodeReuse(context, result, node) : void 0;
|
|
196575
196579
|
}
|
|
196576
196580
|
function tryVisitSimpleTypeNode(node) {
|
|
196577
196581
|
const innerNode = skipTypeParentheses(node);
|
|
@@ -196610,7 +196614,7 @@ ${lanes.join("\n")}
|
|
|
196610
196614
|
return factory.updateTypeOperatorNode(node, type2);
|
|
196611
196615
|
}
|
|
196612
196616
|
function tryVisitTypeQuery(node) {
|
|
196613
|
-
const { introducesError, node: exprName } =
|
|
196617
|
+
const { introducesError, node: exprName } = resolver2.trackExistingEntityName(context, node.exprName);
|
|
196614
196618
|
if (!introducesError) {
|
|
196615
196619
|
return factory.updateTypeQueryNode(
|
|
196616
196620
|
node,
|
|
@@ -196618,19 +196622,19 @@ ${lanes.join("\n")}
|
|
|
196618
196622
|
visitNodes2(node.typeArguments, visitExistingNodeTreeSymbols, isTypeNode)
|
|
196619
196623
|
);
|
|
196620
196624
|
}
|
|
196621
|
-
const serializedName =
|
|
196625
|
+
const serializedName = resolver2.serializeTypeName(
|
|
196622
196626
|
context,
|
|
196623
196627
|
node.exprName,
|
|
196624
196628
|
/*isTypeOf*/
|
|
196625
196629
|
true
|
|
196626
196630
|
);
|
|
196627
196631
|
if (serializedName) {
|
|
196628
|
-
return
|
|
196632
|
+
return resolver2.markNodeReuse(context, serializedName, node.exprName);
|
|
196629
196633
|
}
|
|
196630
196634
|
}
|
|
196631
196635
|
function tryVisitTypeReference(node) {
|
|
196632
|
-
if (
|
|
196633
|
-
const { introducesError, node: newName } =
|
|
196636
|
+
if (resolver2.canReuseTypeNode(context, node)) {
|
|
196637
|
+
const { introducesError, node: newName } = resolver2.trackExistingEntityName(context, node.typeName);
|
|
196634
196638
|
const typeArguments = visitNodes2(node.typeArguments, visitExistingNodeTreeSymbols, isTypeNode);
|
|
196635
196639
|
if (!introducesError) {
|
|
196636
196640
|
const updated = factory.updateTypeReferenceNode(
|
|
@@ -196638,9 +196642,9 @@ ${lanes.join("\n")}
|
|
|
196638
196642
|
newName,
|
|
196639
196643
|
typeArguments
|
|
196640
196644
|
);
|
|
196641
|
-
return
|
|
196645
|
+
return resolver2.markNodeReuse(context, updated, node);
|
|
196642
196646
|
} else {
|
|
196643
|
-
const serializedName =
|
|
196647
|
+
const serializedName = resolver2.serializeTypeName(
|
|
196644
196648
|
context,
|
|
196645
196649
|
node.typeName,
|
|
196646
196650
|
/*isTypeOf*/
|
|
@@ -196648,7 +196652,7 @@ ${lanes.join("\n")}
|
|
|
196648
196652
|
typeArguments
|
|
196649
196653
|
);
|
|
196650
196654
|
if (serializedName) {
|
|
196651
|
-
return
|
|
196655
|
+
return resolver2.markNodeReuse(context, serializedName, node.typeName);
|
|
196652
196656
|
}
|
|
196653
196657
|
}
|
|
196654
196658
|
}
|
|
@@ -196688,7 +196692,7 @@ ${lanes.join("\n")}
|
|
|
196688
196692
|
if (isJSDocTypeLiteral(node)) {
|
|
196689
196693
|
return factory.createTypeLiteralNode(map4(node.jsDocPropertyTags, (t) => {
|
|
196690
196694
|
const name3 = visitNode(isIdentifier(t.name) ? t.name : t.name.right, visitExistingNodeTreeSymbols, isIdentifier);
|
|
196691
|
-
const overrideTypeNode =
|
|
196695
|
+
const overrideTypeNode = resolver2.getJsDocPropertyOverride(context, node, t);
|
|
196692
196696
|
return factory.createPropertySignature(
|
|
196693
196697
|
/*modifiers*/
|
|
196694
196698
|
void 0,
|
|
@@ -196738,7 +196742,7 @@ ${lanes.join("\n")}
|
|
|
196738
196742
|
/*modifiers*/
|
|
196739
196743
|
void 0,
|
|
196740
196744
|
getEffectiveDotDotDotForParameter(p),
|
|
196741
|
-
|
|
196745
|
+
resolver2.markNodeReuse(context, factory.createIdentifier(getNameForJSDocFunctionParameter(p, i2)), p),
|
|
196742
196746
|
factory.cloneNode(p.questionToken),
|
|
196743
196747
|
visitNode(p.type, visitExistingNodeTreeSymbols, isTypeNode),
|
|
196744
196748
|
/*initializer*/
|
|
@@ -196756,7 +196760,7 @@ ${lanes.join("\n")}
|
|
|
196756
196760
|
/*modifiers*/
|
|
196757
196761
|
void 0,
|
|
196758
196762
|
getEffectiveDotDotDotForParameter(p),
|
|
196759
|
-
|
|
196763
|
+
resolver2.markNodeReuse(context, factory.createIdentifier(getNameForJSDocFunctionParameter(p, i2)), p),
|
|
196760
196764
|
factory.cloneNode(p.questionToken),
|
|
196761
196765
|
visitNode(p.type, visitExistingNodeTreeSymbols, isTypeNode),
|
|
196762
196766
|
/*initializer*/
|
|
@@ -196770,14 +196774,14 @@ ${lanes.join("\n")}
|
|
|
196770
196774
|
}
|
|
196771
196775
|
}
|
|
196772
196776
|
if (isThisTypeNode(node)) {
|
|
196773
|
-
if (
|
|
196777
|
+
if (resolver2.canReuseTypeNode(context, node)) {
|
|
196774
196778
|
return node;
|
|
196775
196779
|
}
|
|
196776
196780
|
markError();
|
|
196777
196781
|
return node;
|
|
196778
196782
|
}
|
|
196779
196783
|
if (isTypeParameterDeclaration(node)) {
|
|
196780
|
-
const { node: newName } =
|
|
196784
|
+
const { node: newName } = resolver2.trackExistingEntityName(context, node.name);
|
|
196781
196785
|
return factory.updateTypeParameterDeclaration(
|
|
196782
196786
|
node,
|
|
196783
196787
|
visitNodes2(node.modifiers, visitExistingNodeTreeSymbols, isModifier),
|
|
@@ -196808,8 +196812,8 @@ ${lanes.join("\n")}
|
|
|
196808
196812
|
markError();
|
|
196809
196813
|
return node;
|
|
196810
196814
|
}
|
|
196811
|
-
if (!
|
|
196812
|
-
return
|
|
196815
|
+
if (!resolver2.canReuseTypeNode(context, node)) {
|
|
196816
|
+
return resolver2.serializeExistingTypeNode(context, node);
|
|
196813
196817
|
}
|
|
196814
196818
|
const specifier = rewriteModuleSpecifier2(node, node.argument.literal);
|
|
196815
196819
|
const literal2 = specifier === node.argument.literal ? reuseNode(context, node.argument.literal) : specifier;
|
|
@@ -196822,18 +196826,18 @@ ${lanes.join("\n")}
|
|
|
196822
196826
|
node.isTypeOf
|
|
196823
196827
|
);
|
|
196824
196828
|
}
|
|
196825
|
-
if (isNamedDeclaration(node) && node.name.kind === 168 && !
|
|
196829
|
+
if (isNamedDeclaration(node) && node.name.kind === 168 && !resolver2.hasLateBindableName(node)) {
|
|
196826
196830
|
if (!hasDynamicName(node)) {
|
|
196827
196831
|
return visitEachChild2(node, visitExistingNodeTreeSymbols);
|
|
196828
196832
|
}
|
|
196829
|
-
if (
|
|
196833
|
+
if (resolver2.shouldRemoveDeclaration(context, node)) {
|
|
196830
196834
|
return void 0;
|
|
196831
196835
|
}
|
|
196832
196836
|
}
|
|
196833
196837
|
if (isFunctionLike(node) && !node.type || isPropertyDeclaration(node) && !node.type && !node.initializer || isPropertySignature(node) && !node.type && !node.initializer || isParameter(node) && !node.type && !node.initializer) {
|
|
196834
196838
|
let visited = visitEachChild2(node, visitExistingNodeTreeSymbols);
|
|
196835
196839
|
if (visited === node) {
|
|
196836
|
-
visited =
|
|
196840
|
+
visited = resolver2.markNodeReuse(context, factory.cloneNode(node), node);
|
|
196837
196841
|
}
|
|
196838
196842
|
visited.type = factory.createKeywordTypeNode(
|
|
196839
196843
|
133
|
|
@@ -196853,16 +196857,16 @@ ${lanes.join("\n")}
|
|
|
196853
196857
|
return result;
|
|
196854
196858
|
}
|
|
196855
196859
|
if (isComputedPropertyName(node) && isEntityNameExpression(node.expression)) {
|
|
196856
|
-
const { node: result, introducesError } =
|
|
196860
|
+
const { node: result, introducesError } = resolver2.trackExistingEntityName(context, node.expression);
|
|
196857
196861
|
if (!introducesError) {
|
|
196858
196862
|
return factory.updateComputedPropertyName(node, result);
|
|
196859
196863
|
} else {
|
|
196860
|
-
const computedPropertyNameType =
|
|
196864
|
+
const computedPropertyNameType = resolver2.serializeTypeOfExpression(context, node.expression);
|
|
196861
196865
|
let literal2;
|
|
196862
196866
|
if (isLiteralTypeNode(computedPropertyNameType)) {
|
|
196863
196867
|
literal2 = computedPropertyNameType.literal;
|
|
196864
196868
|
} else {
|
|
196865
|
-
const evaluated =
|
|
196869
|
+
const evaluated = resolver2.evaluateEntityNameExpression(node.expression);
|
|
196866
196870
|
const literalNode = typeof evaluated.value === "string" ? factory.createStringLiteral(
|
|
196867
196871
|
evaluated.value,
|
|
196868
196872
|
/*isSingleQuote*/
|
|
@@ -196874,7 +196878,7 @@ ${lanes.join("\n")}
|
|
|
196874
196878
|
) : void 0;
|
|
196875
196879
|
if (!literalNode) {
|
|
196876
196880
|
if (isImportTypeNode(computedPropertyNameType)) {
|
|
196877
|
-
|
|
196881
|
+
resolver2.trackComputedName(context, node.expression);
|
|
196878
196882
|
}
|
|
196879
196883
|
return node;
|
|
196880
196884
|
}
|
|
@@ -196892,7 +196896,7 @@ ${lanes.join("\n")}
|
|
|
196892
196896
|
if (isTypePredicateNode(node)) {
|
|
196893
196897
|
let parameterName;
|
|
196894
196898
|
if (isIdentifier(node.parameterName)) {
|
|
196895
|
-
const { node: result, introducesError } =
|
|
196899
|
+
const { node: result, introducesError } = resolver2.trackExistingEntityName(context, node.parameterName);
|
|
196896
196900
|
if (introducesError) markError();
|
|
196897
196901
|
parameterName = result;
|
|
196898
196902
|
} else {
|
|
@@ -196902,7 +196906,7 @@ ${lanes.join("\n")}
|
|
|
196902
196906
|
}
|
|
196903
196907
|
if (isTupleTypeNode(node) || isTypeLiteralNode(node) || isMappedTypeNode(node)) {
|
|
196904
196908
|
const visited = visitEachChild2(node, visitExistingNodeTreeSymbols);
|
|
196905
|
-
const clone22 =
|
|
196909
|
+
const clone22 = resolver2.markNodeReuse(context, visited === node ? factory.cloneNode(node) : visited, node);
|
|
196906
196910
|
const flags = getEmitFlags(clone22);
|
|
196907
196911
|
setEmitFlags(clone22, flags | (context.flags & 1024 && isTypeLiteralNode(node) ? 0 : 1));
|
|
196908
196912
|
return clone22;
|
|
@@ -196914,7 +196918,7 @@ ${lanes.join("\n")}
|
|
|
196914
196918
|
}
|
|
196915
196919
|
if (isConditionalTypeNode(node)) {
|
|
196916
196920
|
const checkType = visitNode(node.checkType, visitExistingNodeTreeSymbols, isTypeNode);
|
|
196917
|
-
const disposeScope =
|
|
196921
|
+
const disposeScope = resolver2.enterNewScope(context, node);
|
|
196918
196922
|
const extendType = visitNode(node.extendsType, visitExistingNodeTreeSymbols, isTypeNode);
|
|
196919
196923
|
const trueType = visitNode(node.trueType, visitExistingNodeTreeSymbols, isTypeNode);
|
|
196920
196924
|
disposeScope();
|
|
@@ -196929,7 +196933,7 @@ ${lanes.join("\n")}
|
|
|
196929
196933
|
}
|
|
196930
196934
|
if (isTypeOperatorNode(node)) {
|
|
196931
196935
|
if (node.operator === 158 && node.type.kind === 155) {
|
|
196932
|
-
if (!
|
|
196936
|
+
if (!resolver2.canReuseTypeNode(context, node)) {
|
|
196933
196937
|
markError();
|
|
196934
196938
|
return node;
|
|
196935
196939
|
}
|
|
@@ -196975,7 +196979,7 @@ ${lanes.join("\n")}
|
|
|
196975
196979
|
return p.name && isIdentifier(p.name) && p.name.escapedText === "this" ? "this" : getEffectiveDotDotDotForParameter(p) ? `args` : `arg${index2}`;
|
|
196976
196980
|
}
|
|
196977
196981
|
function rewriteModuleSpecifier2(parent2, lit) {
|
|
196978
|
-
const newName =
|
|
196982
|
+
const newName = resolver2.getModuleSpecifierOverride(context, parent2, lit);
|
|
196979
196983
|
return newName ? setOriginalNode(factory.createStringLiteral(newName), lit) : lit;
|
|
196980
196984
|
}
|
|
196981
196985
|
}
|
|
@@ -196983,7 +196987,7 @@ ${lanes.join("\n")}
|
|
|
196983
196987
|
function serializeExistingTypeNode(typeNode, context, addUndefined) {
|
|
196984
196988
|
if (!typeNode) return void 0;
|
|
196985
196989
|
let result;
|
|
196986
|
-
if ((!addUndefined || canAddUndefined(typeNode)) &&
|
|
196990
|
+
if ((!addUndefined || canAddUndefined(typeNode)) && resolver2.canReuseTypeNode(context, typeNode)) {
|
|
196987
196991
|
result = tryReuseExistingTypeNode(context, typeNode);
|
|
196988
196992
|
if (result !== void 0) {
|
|
196989
196993
|
result = addUndefinedIfNeeded(
|
|
@@ -196999,8 +197003,8 @@ ${lanes.join("\n")}
|
|
|
196999
197003
|
}
|
|
197000
197004
|
function serializeTypeAnnotationOfDeclaration(declaredType, context, node, symbol, requiresAddingUndefined, useFallback = requiresAddingUndefined !== void 0) {
|
|
197001
197005
|
if (!declaredType) return void 0;
|
|
197002
|
-
if (!
|
|
197003
|
-
if (!requiresAddingUndefined || !
|
|
197006
|
+
if (!resolver2.canReuseTypeNodeAnnotation(context, node, declaredType, symbol, requiresAddingUndefined)) {
|
|
197007
|
+
if (!requiresAddingUndefined || !resolver2.canReuseTypeNodeAnnotation(
|
|
197004
197008
|
context,
|
|
197005
197009
|
node,
|
|
197006
197010
|
declaredType,
|
|
@@ -197019,7 +197023,7 @@ ${lanes.join("\n")}
|
|
|
197019
197023
|
return result;
|
|
197020
197024
|
}
|
|
197021
197025
|
context.tracker.reportInferenceFallback(node);
|
|
197022
|
-
return
|
|
197026
|
+
return resolver2.serializeExistingTypeNode(context, declaredType, requiresAddingUndefined) ?? factory.createKeywordTypeNode(
|
|
197023
197027
|
133
|
|
197024
197028
|
/* AnyKeyword */
|
|
197025
197029
|
);
|
|
@@ -197031,13 +197035,13 @@ ${lanes.join("\n")}
|
|
|
197031
197035
|
return result;
|
|
197032
197036
|
}
|
|
197033
197037
|
context.tracker.reportInferenceFallback(targetNode ?? typeNode);
|
|
197034
|
-
return
|
|
197038
|
+
return resolver2.serializeExistingTypeNode(context, typeNode, addUndefined) ?? factory.createKeywordTypeNode(
|
|
197035
197039
|
133
|
|
197036
197040
|
/* AnyKeyword */
|
|
197037
197041
|
);
|
|
197038
197042
|
}
|
|
197039
197043
|
function serializeTypeOfAccessor(accessor, symbol, context) {
|
|
197040
|
-
return typeFromAccessor(accessor, symbol, context) ?? inferAccessorType(accessor,
|
|
197044
|
+
return typeFromAccessor(accessor, symbol, context) ?? inferAccessorType(accessor, resolver2.getAllAccessorDeclarations(accessor), context, symbol);
|
|
197041
197045
|
}
|
|
197042
197046
|
function serializeTypeOfExpression(expr, context, addUndefined, preserveLiterals) {
|
|
197043
197047
|
const result = typeFromExpression(
|
|
@@ -197086,13 +197090,13 @@ ${lanes.join("\n")}
|
|
|
197086
197090
|
function typeFromPropertyAssignment(node, symbol, context) {
|
|
197087
197091
|
const typeAnnotation = getEffectiveTypeAnnotationNode(node);
|
|
197088
197092
|
let result;
|
|
197089
|
-
if (typeAnnotation &&
|
|
197093
|
+
if (typeAnnotation && resolver2.canReuseTypeNodeAnnotation(context, node, typeAnnotation, symbol)) {
|
|
197090
197094
|
result = serializeExistingTypeNode(typeAnnotation, context);
|
|
197091
197095
|
}
|
|
197092
197096
|
if (!result && node.kind === 304) {
|
|
197093
197097
|
const initializer2 = node.initializer;
|
|
197094
197098
|
const assertionNode = isJSDocTypeAssertion(initializer2) ? getJSDocTypeAssertionType(initializer2) : initializer2.kind === 235 || initializer2.kind === 217 ? initializer2.type : void 0;
|
|
197095
|
-
if (assertionNode && !isConstTypeReference(assertionNode) &&
|
|
197099
|
+
if (assertionNode && !isConstTypeReference(assertionNode) && resolver2.canReuseTypeNodeAnnotation(context, node, assertionNode, symbol)) {
|
|
197096
197100
|
result = serializeExistingTypeNode(assertionNode, context);
|
|
197097
197101
|
}
|
|
197098
197102
|
}
|
|
@@ -197143,7 +197147,7 @@ ${lanes.join("\n")}
|
|
|
197143
197147
|
return accessorType;
|
|
197144
197148
|
}
|
|
197145
197149
|
function typeFromAccessor(node, symbol, context) {
|
|
197146
|
-
const accessorDeclarations =
|
|
197150
|
+
const accessorDeclarations = resolver2.getAllAccessorDeclarations(node);
|
|
197147
197151
|
const accessorType = getTypeAnnotationFromAllAccessorDeclarations(node, accessorDeclarations);
|
|
197148
197152
|
if (accessorType && !isTypePredicateNode(accessorType)) {
|
|
197149
197153
|
return withNewScope(context, node, () => serializeTypeAnnotationOfDeclaration(accessorType, context, node, symbol) ?? inferTypeOfDeclaration(node, symbol, context));
|
|
@@ -197160,7 +197164,7 @@ ${lanes.join("\n")}
|
|
|
197160
197164
|
if (declaredType) {
|
|
197161
197165
|
resultType = syntacticResult(serializeTypeAnnotationOfDeclaration(declaredType, context, node, symbol));
|
|
197162
197166
|
} else if (node.initializer && (((_a4 = symbol.declarations) == null ? void 0 : _a4.length) === 1 || countWhere(symbol.declarations, isVariableDeclaration) === 1)) {
|
|
197163
|
-
if (!
|
|
197167
|
+
if (!resolver2.isExpandoFunctionDeclaration(node) && !isContextuallyTyped(node)) {
|
|
197164
197168
|
resultType = typeFromExpression(
|
|
197165
197169
|
node.initializer,
|
|
197166
197170
|
context,
|
|
@@ -197185,7 +197189,7 @@ ${lanes.join("\n")}
|
|
|
197185
197189
|
);
|
|
197186
197190
|
}
|
|
197187
197191
|
const declaredType = getEffectiveTypeAnnotationNode(node);
|
|
197188
|
-
const addUndefined =
|
|
197192
|
+
const addUndefined = resolver2.requiresAddingImplicitUndefined(node, symbol, context.enclosingDeclaration);
|
|
197189
197193
|
let resultType = failed;
|
|
197190
197194
|
if (declaredType) {
|
|
197191
197195
|
resultType = syntacticResult(serializeTypeAnnotationOfDeclaration(declaredType, context, node, symbol, addUndefined));
|
|
@@ -197220,7 +197224,7 @@ ${lanes.join("\n")}
|
|
|
197220
197224
|
}
|
|
197221
197225
|
function typeFromProperty(node, symbol, context) {
|
|
197222
197226
|
const declaredType = getEffectiveTypeAnnotationNode(node);
|
|
197223
|
-
const requiresAddingUndefined =
|
|
197227
|
+
const requiresAddingUndefined = resolver2.requiresAddingImplicitUndefined(node, symbol, context.enclosingDeclaration);
|
|
197224
197228
|
let resultType = failed;
|
|
197225
197229
|
if (declaredType) {
|
|
197226
197230
|
resultType = syntacticResult(serializeTypeAnnotationOfDeclaration(declaredType, context, node, symbol, requiresAddingUndefined));
|
|
@@ -197250,7 +197254,7 @@ ${lanes.join("\n")}
|
|
|
197250
197254
|
/* AnyKeyword */
|
|
197251
197255
|
);
|
|
197252
197256
|
}
|
|
197253
|
-
return
|
|
197257
|
+
return resolver2.serializeTypeOfDeclaration(context, node, symbol);
|
|
197254
197258
|
}
|
|
197255
197259
|
function inferExpressionType(node, context, reportFallback = true, requiresAddingUndefined) {
|
|
197256
197260
|
Debug.assert(!requiresAddingUndefined);
|
|
@@ -197263,7 +197267,7 @@ ${lanes.join("\n")}
|
|
|
197263
197267
|
/* AnyKeyword */
|
|
197264
197268
|
);
|
|
197265
197269
|
}
|
|
197266
|
-
return
|
|
197270
|
+
return resolver2.serializeTypeOfExpression(context, node) ?? factory.createKeywordTypeNode(
|
|
197267
197271
|
133
|
|
197268
197272
|
/* AnyKeyword */
|
|
197269
197273
|
);
|
|
@@ -197278,7 +197282,7 @@ ${lanes.join("\n")}
|
|
|
197278
197282
|
/* AnyKeyword */
|
|
197279
197283
|
);
|
|
197280
197284
|
}
|
|
197281
|
-
return
|
|
197285
|
+
return resolver2.serializeReturnTypeForSignature(context, node, symbol) ?? factory.createKeywordTypeNode(
|
|
197282
197286
|
133
|
|
197283
197287
|
/* AnyKeyword */
|
|
197284
197288
|
);
|
|
@@ -197291,14 +197295,14 @@ ${lanes.join("\n")}
|
|
|
197291
197295
|
context.tracker.reportInferenceFallback(node);
|
|
197292
197296
|
}
|
|
197293
197297
|
const result = allAccessors.getAccessor && createReturnFromSignature(allAccessors.getAccessor, symbol, context, reportFallback);
|
|
197294
|
-
return result ??
|
|
197298
|
+
return result ?? resolver2.serializeTypeOfDeclaration(context, node, symbol) ?? factory.createKeywordTypeNode(
|
|
197295
197299
|
133
|
|
197296
197300
|
/* AnyKeyword */
|
|
197297
197301
|
);
|
|
197298
197302
|
}
|
|
197299
197303
|
}
|
|
197300
197304
|
function withNewScope(context, node, fn) {
|
|
197301
|
-
const cleanup =
|
|
197305
|
+
const cleanup = resolver2.enterNewScope(context, node);
|
|
197302
197306
|
const result = fn();
|
|
197303
197307
|
cleanup();
|
|
197304
197308
|
return result;
|
|
@@ -197323,7 +197327,7 @@ ${lanes.join("\n")}
|
|
|
197323
197327
|
}
|
|
197324
197328
|
return typeFromExpression(node.expression, context, isConstContext, requiresAddingUndefined);
|
|
197325
197329
|
case 80:
|
|
197326
|
-
if (
|
|
197330
|
+
if (resolver2.isUndefinedIdentifierExpression(node)) {
|
|
197327
197331
|
return syntacticResult(createUndefinedTypeNode());
|
|
197328
197332
|
}
|
|
197329
197333
|
break;
|
|
@@ -197491,7 +197495,7 @@ ${lanes.join("\n")}
|
|
|
197491
197495
|
expression,
|
|
197492
197496
|
/*includeBigInt*/
|
|
197493
197497
|
false
|
|
197494
|
-
) && !
|
|
197498
|
+
) && !resolver2.isDefinitelyReferenceToGlobalSymbolObject(expression)) {
|
|
197495
197499
|
context.tracker.reportInferenceFallback(prop.name);
|
|
197496
197500
|
result = false;
|
|
197497
197501
|
}
|
|
@@ -197577,8 +197581,8 @@ ${lanes.join("\n")}
|
|
|
197577
197581
|
/*modifiers*/
|
|
197578
197582
|
void 0,
|
|
197579
197583
|
reuseNode(context, p.dotDotDotToken),
|
|
197580
|
-
|
|
197581
|
-
|
|
197584
|
+
resolver2.serializeNameOfParameter(context, p),
|
|
197585
|
+
resolver2.isOptionalParameter(p) ? factory.createToken(
|
|
197582
197586
|
58
|
|
197583
197587
|
/* QuestionToken */
|
|
197584
197588
|
) : void 0,
|
|
@@ -197596,7 +197600,7 @@ ${lanes.join("\n")}
|
|
|
197596
197600
|
function reuseTypeParameters(typeParameters, context) {
|
|
197597
197601
|
return typeParameters == null ? void 0 : typeParameters.map((tp) => {
|
|
197598
197602
|
var _a4;
|
|
197599
|
-
const { node: tpName } =
|
|
197603
|
+
const { node: tpName } = resolver2.trackExistingEntityName(context, tp.name);
|
|
197600
197604
|
return factory.updateTypeParameterDeclaration(
|
|
197601
197605
|
tp,
|
|
197602
197606
|
(_a4 = tp.modifiers) == null ? void 0 : _a4.map((m2) => reuseNode(context, m2)),
|
|
@@ -197644,7 +197648,7 @@ ${lanes.join("\n")}
|
|
|
197644
197648
|
}
|
|
197645
197649
|
}
|
|
197646
197650
|
function typeFromObjectLiteralAccessor(accessor, name3, context) {
|
|
197647
|
-
const allAccessors =
|
|
197651
|
+
const allAccessors = resolver2.getAllAccessorDeclarations(accessor);
|
|
197648
197652
|
const getAccessorType = allAccessors.getAccessor && getTypeAnnotationFromAccessor(allAccessors.getAccessor);
|
|
197649
197653
|
const setAccessorType = allAccessors.setAccessor && getTypeAnnotationFromAccessor(allAccessors.setAccessor);
|
|
197650
197654
|
if (getAccessorType !== void 0 && setAccessorType !== void 0) {
|
|
@@ -226856,7 +226860,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
226856
226860
|
function originIsComputedPropertyName(origin) {
|
|
226857
226861
|
return !!(origin && origin.kind & 512);
|
|
226858
226862
|
}
|
|
226859
|
-
function resolvingModuleSpecifiers(logPrefix, host,
|
|
226863
|
+
function resolvingModuleSpecifiers(logPrefix, host, resolver2, program2, position3, preferences, isForImportStatementCompletion, isValidTypeOnlyUseSite, cb) {
|
|
226860
226864
|
var _a4, _b, _c, _d;
|
|
226861
226865
|
const start = timestamp2();
|
|
226862
226866
|
const needsFullResolution = isForImportStatementCompletion || getResolvePackageJsonExports(program2.getCompilerOptions()) || ((_a4 = preferences.autoImportSpecifierExcludeRegexes) == null ? void 0 : _a4.length);
|
|
@@ -226878,7 +226882,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
226878
226882
|
return result;
|
|
226879
226883
|
function tryResolve(exportInfo, isFromAmbientModule) {
|
|
226880
226884
|
if (isFromAmbientModule) {
|
|
226881
|
-
const result3 =
|
|
226885
|
+
const result3 = resolver2.getModuleSpecifierForBestExportInfo(exportInfo, position3, isValidTypeOnlyUseSite);
|
|
226882
226886
|
if (result3) {
|
|
226883
226887
|
ambientCount++;
|
|
226884
226888
|
}
|
|
@@ -226886,7 +226890,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
226886
226890
|
}
|
|
226887
226891
|
const shouldResolveModuleSpecifier = needsFullResolution || preferences.allowIncompleteCompletions && resolvedCount < moduleSpecifierResolutionLimit;
|
|
226888
226892
|
const shouldGetModuleSpecifierFromCache = !shouldResolveModuleSpecifier && preferences.allowIncompleteCompletions && cacheAttemptCount < moduleSpecifierResolutionCacheAttemptLimit;
|
|
226889
|
-
const result2 = shouldResolveModuleSpecifier || shouldGetModuleSpecifierFromCache ?
|
|
226893
|
+
const result2 = shouldResolveModuleSpecifier || shouldGetModuleSpecifierFromCache ? resolver2.getModuleSpecifierForBestExportInfo(exportInfo, position3, isValidTypeOnlyUseSite, shouldGetModuleSpecifierFromCache) : void 0;
|
|
226890
226894
|
if (!shouldResolveModuleSpecifier && !shouldGetModuleSpecifierFromCache || shouldGetModuleSpecifierFromCache && !result2) {
|
|
226891
226895
|
skippedAny = true;
|
|
226892
226896
|
}
|
|
@@ -283214,11 +283218,11 @@ function interpolate(target, source = {}, parse9 = (v2) => v2) {
|
|
|
283214
283218
|
}
|
|
283215
283219
|
var _normalize = (p) => p?.replace(/\\/g, "/");
|
|
283216
283220
|
var ASYNC_LOADERS = {
|
|
283217
|
-
".yaml": () => import("./yaml-
|
|
283218
|
-
".yml": () => import("./yaml-
|
|
283219
|
-
".jsonc": () => import("./jsonc-
|
|
283220
|
-
".json5": () => import("./json5-
|
|
283221
|
-
".toml": () => import("./toml-
|
|
283221
|
+
".yaml": () => import("./yaml-FGQHUFIW.js").then((r) => r.parseYAML),
|
|
283222
|
+
".yml": () => import("./yaml-FGQHUFIW.js").then((r) => r.parseYAML),
|
|
283223
|
+
".jsonc": () => import("./jsonc-LBXY5RKD.js").then((r) => r.parseJSONC),
|
|
283224
|
+
".json5": () => import("./json5-G2QRRXKH.js").then((r) => r.parseJSON5),
|
|
283225
|
+
".toml": () => import("./toml-7RFNJIC6.js").then((r) => r.parseTOML)
|
|
283222
283226
|
};
|
|
283223
283227
|
var SUPPORTED_EXTENSIONS = [
|
|
283224
283228
|
// with jiti
|
|
@@ -283418,8 +283422,8 @@ async function resolveConfig(source, options, sourceOptions = {}) {
|
|
|
283418
283422
|
}
|
|
283419
283423
|
const _merger = options.merger || defu;
|
|
283420
283424
|
if (options.giget !== false && GIGET_PREFIXES.some((prefix) => source.startsWith(prefix))) {
|
|
283421
|
-
const { downloadTemplate } = await import("./dist-
|
|
283422
|
-
const { digest } = await import("./dist-
|
|
283425
|
+
const { downloadTemplate } = await import("./dist-BLCVU4KN.js");
|
|
283426
|
+
const { digest } = await import("./dist-2S5JPQW5.js");
|
|
283423
283427
|
const cloneName = source.replace(/\W+/g, "_").split("_").splice(0, 3).join("_") + "_" + digest(source).slice(0, 10).replace(/[-_]/g, "");
|
|
283424
283428
|
let cloneDir;
|
|
283425
283429
|
const localNodeModules = resolve(options.cwd, "node_modules");
|
|
@@ -301341,8 +301345,8 @@ function createFileResolver(fs18, templateVariables = envToTemplateVars(process.
|
|
|
301341
301345
|
return loader3;
|
|
301342
301346
|
}
|
|
301343
301347
|
async function resolveFile(filename, relativeTo, fs18 = getFileSystem()) {
|
|
301344
|
-
const
|
|
301345
|
-
return
|
|
301348
|
+
const resolver2 = createFileResolver(fs18);
|
|
301349
|
+
return resolver2.resolveFile(filename, relativeTo);
|
|
301346
301350
|
}
|
|
301347
301351
|
|
|
301348
301352
|
// ../../node_modules/.pnpm/cspell-lib@8.19.4/node_modules/cspell-lib/dist/lib/Settings/DictionaryReferenceCollection.js
|
|
@@ -301567,11 +301571,11 @@ var StrongWeakMap = class {
|
|
|
301567
301571
|
/**
|
|
301568
301572
|
* Returns a specified element from the Map. If the element isn't found, the resolver function is called and the result is stored in the map and returned.
|
|
301569
301573
|
*/
|
|
301570
|
-
autoGet(key,
|
|
301574
|
+
autoGet(key, resolver2) {
|
|
301571
301575
|
const found = this.get(key);
|
|
301572
301576
|
if (found)
|
|
301573
301577
|
return found;
|
|
301574
|
-
const created =
|
|
301578
|
+
const created = resolver2(key);
|
|
301575
301579
|
this.set(key, created);
|
|
301576
301580
|
return created;
|
|
301577
301581
|
}
|
|
@@ -307481,9 +307485,9 @@ function localesToList(locales) {
|
|
|
307481
307485
|
function stringToList(sList) {
|
|
307482
307486
|
return sList.replaceAll(/[|;]/g, ",").split(",").map((s) => s.trim()).filter((s) => !!s);
|
|
307483
307487
|
}
|
|
307484
|
-
function memorizer(
|
|
307488
|
+
function memorizer(resolver2) {
|
|
307485
307489
|
const cache5 = createAutoResolveCache();
|
|
307486
|
-
return (k2) => cache5.get(k2,
|
|
307490
|
+
return (k2) => cache5.get(k2, resolver2);
|
|
307487
307491
|
}
|
|
307488
307492
|
var _normalizeLanguageId = memorizer(__normalizeLanguageId);
|
|
307489
307493
|
function __normalizeLanguageId(langId) {
|
|
@@ -340930,7 +340934,7 @@ async function upgradeDependency([name3, tag = "latest"]) {
|
|
|
340930
340934
|
var npmRequestLimit = (0, import_p_limit2.default)(40);
|
|
340931
340935
|
function getPackageInfo(pkgName) {
|
|
340932
340936
|
return npmRequestLimit(async () => {
|
|
340933
|
-
const getPackageJson = (await import("./package-json-
|
|
340937
|
+
const getPackageJson = (await import("./package-json-FUXIBCXB.js")).default;
|
|
340934
340938
|
return getPackageJson(pkgName, {
|
|
340935
340939
|
allVersions: true
|
|
340936
340940
|
});
|