@typescript-deploys/pr-build 4.9.0-pr-50856-4 → 4.9.0-pr-50776-2
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/lib/de/diagnosticMessages.generated.json +1 -2
- package/lib/es/diagnosticMessages.generated.json +1 -2
- package/lib/ja/diagnosticMessages.generated.json +1 -2
- package/lib/ko/diagnosticMessages.generated.json +1 -2
- package/lib/lib.dom.d.ts +199 -58
- package/lib/lib.webworker.d.ts +73 -24
- package/lib/pt-br/diagnosticMessages.generated.json +1 -2
- package/lib/ru/diagnosticMessages.generated.json +1 -2
- package/lib/tr/diagnosticMessages.generated.json +1 -2
- package/lib/tsc.js +150 -90
- package/lib/tsserver.js +324 -149
- package/lib/tsserverlibrary.d.ts +3 -0
- package/lib/tsserverlibrary.js +324 -149
- package/lib/typescript.d.ts +3 -0
- package/lib/typescript.js +324 -149
- package/lib/typescriptServices.d.ts +3 -0
- package/lib/typescriptServices.js +324 -149
- package/lib/typingsInstaller.js +154 -95
- package/lib/zh-tw/diagnosticMessages.generated.json +1 -2
- package/package.json +1 -1
package/lib/tsc.js
CHANGED
|
@@ -69,7 +69,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
69
69
|
var ts;
|
|
70
70
|
(function (ts) {
|
|
71
71
|
ts.versionMajorMinor = "4.9";
|
|
72
|
-
ts.version = "".concat(ts.versionMajorMinor, ".0-insiders.
|
|
72
|
+
ts.version = "".concat(ts.versionMajorMinor, ".0-insiders.20220922");
|
|
73
73
|
var NativeCollections;
|
|
74
74
|
(function (NativeCollections) {
|
|
75
75
|
var globals = typeof globalThis !== "undefined" ? globalThis :
|
|
@@ -2564,7 +2564,7 @@ var ts;
|
|
|
2564
2564
|
];
|
|
2565
2565
|
for (var _i = 0, nodeConstructors_1 = nodeConstructors; _i < nodeConstructors_1.length; _i++) {
|
|
2566
2566
|
var ctor = nodeConstructors_1[_i];
|
|
2567
|
-
if (!ts.hasProperty(ctor, "__debugKind")) {
|
|
2567
|
+
if (!ts.hasProperty(ctor.prototype, "__debugKind")) {
|
|
2568
2568
|
Object.defineProperties(ctor.prototype, {
|
|
2569
2569
|
__tsDebuggerDisplay: {
|
|
2570
2570
|
value: function () {
|
|
@@ -6282,6 +6282,7 @@ var ts;
|
|
|
6282
6282
|
_0_is_an_unused_renaming_of_1_Did_you_intend_to_use_it_as_a_type_annotation: diag(2842, ts.DiagnosticCategory.Error, "_0_is_an_unused_renaming_of_1_Did_you_intend_to_use_it_as_a_type_annotation_2842", "'{0}' is an unused renaming of '{1}'. Did you intend to use it as a type annotation?"),
|
|
6283
6283
|
We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here: diag(2843, ts.DiagnosticCategory.Error, "We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here_2843", "We can only write a type for '{0}' by adding a type for the entire parameter here."),
|
|
6284
6284
|
Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor: diag(2844, ts.DiagnosticCategory.Error, "Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor_2844", "Type of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor."),
|
|
6285
|
+
This_condition_will_always_return_0: diag(2845, ts.DiagnosticCategory.Error, "This_condition_will_always_return_0_2845", "This condition will always return '{0}'."),
|
|
6285
6286
|
Import_declaration_0_is_using_private_name_1: diag(4000, ts.DiagnosticCategory.Error, "Import_declaration_0_is_using_private_name_1_4000", "Import declaration '{0}' is using private name '{1}'."),
|
|
6286
6287
|
Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: diag(4002, ts.DiagnosticCategory.Error, "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", "Type parameter '{0}' of exported class has or is using private name '{1}'."),
|
|
6287
6288
|
Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: diag(4004, ts.DiagnosticCategory.Error, "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", "Type parameter '{0}' of exported interface has or is using private name '{1}'."),
|
|
@@ -7224,6 +7225,8 @@ var ts;
|
|
|
7224
7225
|
Delete_unused_param_tag_0: diag(95171, ts.DiagnosticCategory.Message, "Delete_unused_param_tag_0_95171", "Delete unused '@param' tag '{0}'"),
|
|
7225
7226
|
Delete_all_unused_param_tags: diag(95172, ts.DiagnosticCategory.Message, "Delete_all_unused_param_tags_95172", "Delete all unused '@param' tags"),
|
|
7226
7227
|
Rename_param_tag_name_0_to_1: diag(95173, ts.DiagnosticCategory.Message, "Rename_param_tag_name_0_to_1_95173", "Rename '@param' tag name '{0}' to '{1}'"),
|
|
7228
|
+
Use_0: diag(95174, ts.DiagnosticCategory.Message, "Use_0_95174", "Use `{0}`."),
|
|
7229
|
+
Use_Number_isNaN_in_all_conditions: diag(95175, ts.DiagnosticCategory.Message, "Use_Number_isNaN_in_all_conditions_95175", "Use `Number.isNaN` in all conditions."),
|
|
7227
7230
|
No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer: diag(18004, ts.DiagnosticCategory.Error, "No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer_18004", "No value exists in scope for the shorthand property '{0}'. Either declare one or provide an initializer."),
|
|
7228
7231
|
Classes_may_not_have_a_field_named_constructor: diag(18006, ts.DiagnosticCategory.Error, "Classes_may_not_have_a_field_named_constructor_18006", "Classes may not have a field named 'constructor'."),
|
|
7229
7232
|
JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array: diag(18007, ts.DiagnosticCategory.Error, "JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array_18007", "JSX expressions may not use the comma operator. Did you mean to write an array?"),
|
|
@@ -37081,6 +37084,7 @@ var ts;
|
|
|
37081
37084
|
}
|
|
37082
37085
|
}
|
|
37083
37086
|
function loadModuleFromSpecificNodeModulesDirectory(extensions, moduleName, nodeModulesDirectory, nodeModulesDirectoryExists, state, cache, redirectedReference) {
|
|
37087
|
+
var _a;
|
|
37084
37088
|
var candidate = ts.normalizePath(ts.combinePaths(nodeModulesDirectory, moduleName));
|
|
37085
37089
|
var packageInfo = getPackageJsonInfo(candidate, !nodeModulesDirectoryExists, state);
|
|
37086
37090
|
if (!(state.features & NodeResolutionFeatures.Exports)) {
|
|
@@ -37093,12 +37097,7 @@ var ts;
|
|
|
37093
37097
|
return withPackageId(packageInfo, fromDirectory);
|
|
37094
37098
|
}
|
|
37095
37099
|
}
|
|
37096
|
-
var _a = parsePackageName(moduleName), packageName = _a.packageName, rest = _a.rest;
|
|
37097
37100
|
var loader = function (extensions, candidate, onlyRecordFailures, state) {
|
|
37098
|
-
var _a;
|
|
37099
|
-
if (packageInfo && packageInfo.contents.packageJsonContent.exports && state.features & NodeResolutionFeatures.Exports) {
|
|
37100
|
-
return (_a = loadModuleFromExports(packageInfo, extensions, ts.combinePaths(".", rest), state, cache, redirectedReference)) === null || _a === void 0 ? void 0 : _a.value;
|
|
37101
|
-
}
|
|
37102
37101
|
var pathAndExtension = loadModuleFromFile(extensions, candidate, onlyRecordFailures, state) ||
|
|
37103
37102
|
loadNodeModuleFromDirectoryWorker(extensions, candidate, onlyRecordFailures, state, packageInfo && packageInfo.contents.packageJsonContent, packageInfo && packageInfo.contents.versionPaths);
|
|
37104
37103
|
if (!pathAndExtension && packageInfo
|
|
@@ -37108,18 +37107,22 @@ var ts;
|
|
|
37108
37107
|
}
|
|
37109
37108
|
return withPackageId(packageInfo, pathAndExtension);
|
|
37110
37109
|
};
|
|
37110
|
+
var _b = parsePackageName(moduleName), packageName = _b.packageName, rest = _b.rest;
|
|
37111
|
+
var packageDirectory = ts.combinePaths(nodeModulesDirectory, packageName);
|
|
37111
37112
|
if (rest !== "") {
|
|
37112
|
-
var packageDirectory = ts.combinePaths(nodeModulesDirectory, packageName);
|
|
37113
37113
|
packageInfo = getPackageJsonInfo(packageDirectory, !nodeModulesDirectoryExists, state);
|
|
37114
|
-
|
|
37115
|
-
|
|
37116
|
-
|
|
37117
|
-
|
|
37118
|
-
|
|
37119
|
-
|
|
37120
|
-
|
|
37121
|
-
|
|
37122
|
-
|
|
37114
|
+
}
|
|
37115
|
+
if (packageInfo && packageInfo.contents.packageJsonContent.exports && state.features & NodeResolutionFeatures.Exports) {
|
|
37116
|
+
return (_a = loadModuleFromExports(packageInfo, extensions, ts.combinePaths(".", rest), state, cache, redirectedReference)) === null || _a === void 0 ? void 0 : _a.value;
|
|
37117
|
+
}
|
|
37118
|
+
if (rest !== "" && packageInfo && packageInfo.contents.versionPaths) {
|
|
37119
|
+
if (state.traceEnabled) {
|
|
37120
|
+
trace(state.host, ts.Diagnostics.package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_match_module_name_2, packageInfo.contents.versionPaths.version, ts.version, rest);
|
|
37121
|
+
}
|
|
37122
|
+
var packageDirectoryExists = nodeModulesDirectoryExists && ts.directoryProbablyExists(packageDirectory, state.host);
|
|
37123
|
+
var fromPaths = tryLoadModuleUsingPaths(extensions, rest, packageDirectory, packageInfo.contents.versionPaths.paths, undefined, loader, !packageDirectoryExists, state);
|
|
37124
|
+
if (fromPaths) {
|
|
37125
|
+
return fromPaths.value;
|
|
37123
37126
|
}
|
|
37124
37127
|
}
|
|
37125
37128
|
return loader(extensions, candidate, !nodeModulesDirectoryExists, state);
|
|
@@ -40877,6 +40880,7 @@ var ts;
|
|
|
40877
40880
|
var deferredGlobalOmitSymbol;
|
|
40878
40881
|
var deferredGlobalAwaitedSymbol;
|
|
40879
40882
|
var deferredGlobalBigIntType;
|
|
40883
|
+
var deferredGlobalNaNSymbol;
|
|
40880
40884
|
var deferredGlobalRecordSymbol;
|
|
40881
40885
|
var allPotentiallyUnusedIdentifiers = new ts.Map();
|
|
40882
40886
|
var flowLoopStart = 0;
|
|
@@ -45894,6 +45898,7 @@ var ts;
|
|
|
45894
45898
|
&& symbol.escapedName !== "export="
|
|
45895
45899
|
&& !(symbol.flags & 4194304)
|
|
45896
45900
|
&& !(symbol.flags & 32)
|
|
45901
|
+
&& !(symbol.flags & 8192)
|
|
45897
45902
|
&& !isConstMergedWithNSPrintableAsSignatureMerge) {
|
|
45898
45903
|
if (propertyAsAlias) {
|
|
45899
45904
|
var createdExport = serializeMaybeAliasAssignment(symbol);
|
|
@@ -50035,7 +50040,11 @@ var ts;
|
|
|
50035
50040
|
}
|
|
50036
50041
|
}
|
|
50037
50042
|
}
|
|
50038
|
-
if (!singleProp ||
|
|
50043
|
+
if (!singleProp ||
|
|
50044
|
+
isUnion &&
|
|
50045
|
+
(propSet || checkFlags & 48) &&
|
|
50046
|
+
checkFlags & (1024 | 512) &&
|
|
50047
|
+
!(propSet && getCommonDeclarationsOfSymbols(ts.arrayFrom(propSet.values())))) {
|
|
50039
50048
|
return undefined;
|
|
50040
50049
|
}
|
|
50041
50050
|
if (!propSet && !(checkFlags & 16) && !indexTypes) {
|
|
@@ -50125,6 +50134,33 @@ var ts;
|
|
|
50125
50134
|
}
|
|
50126
50135
|
return property;
|
|
50127
50136
|
}
|
|
50137
|
+
function getCommonDeclarationsOfSymbols(symbols) {
|
|
50138
|
+
var commonDeclarations;
|
|
50139
|
+
var _loop_14 = function (symbol) {
|
|
50140
|
+
if (!symbol.declarations) {
|
|
50141
|
+
return { value: undefined };
|
|
50142
|
+
}
|
|
50143
|
+
if (!commonDeclarations) {
|
|
50144
|
+
commonDeclarations = new ts.Set(symbol.declarations);
|
|
50145
|
+
return "continue";
|
|
50146
|
+
}
|
|
50147
|
+
commonDeclarations.forEach(function (declaration) {
|
|
50148
|
+
if (!ts.contains(symbol.declarations, declaration)) {
|
|
50149
|
+
commonDeclarations.delete(declaration);
|
|
50150
|
+
}
|
|
50151
|
+
});
|
|
50152
|
+
if (commonDeclarations.size === 0) {
|
|
50153
|
+
return { value: undefined };
|
|
50154
|
+
}
|
|
50155
|
+
};
|
|
50156
|
+
for (var _i = 0, symbols_3 = symbols; _i < symbols_3.length; _i++) {
|
|
50157
|
+
var symbol = symbols_3[_i];
|
|
50158
|
+
var state_4 = _loop_14(symbol);
|
|
50159
|
+
if (typeof state_4 === "object")
|
|
50160
|
+
return state_4.value;
|
|
50161
|
+
}
|
|
50162
|
+
return commonDeclarations;
|
|
50163
|
+
}
|
|
50128
50164
|
function getPropertyOfUnionOrIntersectionType(type, name, skipObjectFunctionPropertyAugment) {
|
|
50129
50165
|
var property = getUnionOrIntersectionProperty(type, name, skipObjectFunctionPropertyAugment);
|
|
50130
50166
|
return property && !(ts.getCheckFlags(property) & 16) ? property : undefined;
|
|
@@ -50755,7 +50791,7 @@ var ts;
|
|
|
50755
50791
|
function getIndexInfosOfIndexSymbol(indexSymbol) {
|
|
50756
50792
|
if (indexSymbol.declarations) {
|
|
50757
50793
|
var indexInfos_4 = [];
|
|
50758
|
-
var
|
|
50794
|
+
var _loop_15 = function (declaration) {
|
|
50759
50795
|
if (declaration.parameters.length === 1) {
|
|
50760
50796
|
var parameter = declaration.parameters[0];
|
|
50761
50797
|
if (parameter.type) {
|
|
@@ -50769,7 +50805,7 @@ var ts;
|
|
|
50769
50805
|
};
|
|
50770
50806
|
for (var _i = 0, _a = indexSymbol.declarations; _i < _a.length; _i++) {
|
|
50771
50807
|
var declaration = _a[_i];
|
|
50772
|
-
|
|
50808
|
+
_loop_15(declaration);
|
|
50773
50809
|
}
|
|
50774
50810
|
return indexInfos_4;
|
|
50775
50811
|
}
|
|
@@ -50786,7 +50822,7 @@ var ts;
|
|
|
50786
50822
|
var _a;
|
|
50787
50823
|
var inferences;
|
|
50788
50824
|
if ((_a = typeParameter.symbol) === null || _a === void 0 ? void 0 : _a.declarations) {
|
|
50789
|
-
var
|
|
50825
|
+
var _loop_16 = function (declaration) {
|
|
50790
50826
|
if (declaration.parent.kind === 192) {
|
|
50791
50827
|
var _c = ts.walkUpParenthesizedTypesAndGetParentAndChild(declaration.parent.parent), _d = _c[0], childTypeParameter = _d === void 0 ? declaration.parent : _d, grandParent = _c[1];
|
|
50792
50828
|
if (grandParent.kind === 180 && !omitTypeReferences) {
|
|
@@ -50831,7 +50867,7 @@ var ts;
|
|
|
50831
50867
|
};
|
|
50832
50868
|
for (var _i = 0, _b = typeParameter.symbol.declarations; _i < _b.length; _i++) {
|
|
50833
50869
|
var declaration = _b[_i];
|
|
50834
|
-
|
|
50870
|
+
_loop_16(declaration);
|
|
50835
50871
|
}
|
|
50836
50872
|
}
|
|
50837
50873
|
return inferences && getIntersectionType(inferences);
|
|
@@ -51432,6 +51468,9 @@ var ts;
|
|
|
51432
51468
|
function getGlobalBigIntType() {
|
|
51433
51469
|
return (deferredGlobalBigIntType || (deferredGlobalBigIntType = getGlobalType("BigInt", 0, false))) || emptyObjectType;
|
|
51434
51470
|
}
|
|
51471
|
+
function getGlobalNaNSymbol() {
|
|
51472
|
+
return (deferredGlobalNaNSymbol || (deferredGlobalNaNSymbol = getGlobalValueSymbol("NaN", false)));
|
|
51473
|
+
}
|
|
51435
51474
|
function getGlobalRecordSymbol() {
|
|
51436
51475
|
deferredGlobalRecordSymbol || (deferredGlobalRecordSymbol = getGlobalTypeAliasSymbol("Record", 2, true) || unknownSymbol);
|
|
51437
51476
|
return deferredGlobalRecordSymbol === unknownSymbol ? undefined : deferredGlobalRecordSymbol;
|
|
@@ -51647,7 +51686,7 @@ var ts;
|
|
|
51647
51686
|
var lastRequiredIndex = -1;
|
|
51648
51687
|
var firstRestIndex = -1;
|
|
51649
51688
|
var lastOptionalOrRestIndex = -1;
|
|
51650
|
-
var
|
|
51689
|
+
var _loop_17 = function (i) {
|
|
51651
51690
|
var type = elementTypes[i];
|
|
51652
51691
|
var flags = target.elementFlags[i];
|
|
51653
51692
|
if (flags & 8) {
|
|
@@ -51673,9 +51712,9 @@ var ts;
|
|
|
51673
51712
|
}
|
|
51674
51713
|
};
|
|
51675
51714
|
for (var i = 0; i < elementTypes.length; i++) {
|
|
51676
|
-
var
|
|
51677
|
-
if (typeof
|
|
51678
|
-
return
|
|
51715
|
+
var state_5 = _loop_17(i);
|
|
51716
|
+
if (typeof state_5 === "object")
|
|
51717
|
+
return state_5.value;
|
|
51679
51718
|
}
|
|
51680
51719
|
for (var i = 0; i < lastRequiredIndex; i++) {
|
|
51681
51720
|
if (expandedFlags[i] & 2)
|
|
@@ -51701,7 +51740,7 @@ var ts;
|
|
|
51701
51740
|
if (flags & (2 | 4)) {
|
|
51702
51741
|
lastOptionalOrRestIndex = expandedFlags.length;
|
|
51703
51742
|
}
|
|
51704
|
-
expandedTypes.push(type);
|
|
51743
|
+
expandedTypes.push(flags & 2 ? addOptionality(type, true) : type);
|
|
51705
51744
|
expandedFlags.push(flags);
|
|
51706
51745
|
if (expandedDeclarations && declaration) {
|
|
51707
51746
|
expandedDeclarations.push(declaration);
|
|
@@ -51850,7 +51889,7 @@ var ts;
|
|
|
51850
51889
|
var templates = ts.filter(types, isPatternLiteralType);
|
|
51851
51890
|
if (templates.length) {
|
|
51852
51891
|
var i = types.length;
|
|
51853
|
-
var
|
|
51892
|
+
var _loop_18 = function () {
|
|
51854
51893
|
i--;
|
|
51855
51894
|
var t = types[i];
|
|
51856
51895
|
if (t.flags & 128 && ts.some(templates, function (template) { return isTypeMatchedByTemplateLiteralType(t, template); })) {
|
|
@@ -51858,7 +51897,7 @@ var ts;
|
|
|
51858
51897
|
}
|
|
51859
51898
|
};
|
|
51860
51899
|
while (i > 0) {
|
|
51861
|
-
|
|
51900
|
+
_loop_18();
|
|
51862
51901
|
}
|
|
51863
51902
|
}
|
|
51864
51903
|
}
|
|
@@ -51928,14 +51967,14 @@ var ts;
|
|
|
51928
51967
|
var namedUnions = [];
|
|
51929
51968
|
addNamedUnions(namedUnions, types);
|
|
51930
51969
|
var reducedTypes = [];
|
|
51931
|
-
var
|
|
51970
|
+
var _loop_19 = function (t) {
|
|
51932
51971
|
if (!ts.some(namedUnions, function (union) { return containsType(union.types, t); })) {
|
|
51933
51972
|
reducedTypes.push(t);
|
|
51934
51973
|
}
|
|
51935
51974
|
};
|
|
51936
51975
|
for (var _i = 0, typeSet_1 = typeSet; _i < typeSet_1.length; _i++) {
|
|
51937
51976
|
var t = typeSet_1[_i];
|
|
51938
|
-
|
|
51977
|
+
_loop_19(t);
|
|
51939
51978
|
}
|
|
51940
51979
|
if (!aliasSymbol && namedUnions.length === 1 && reducedTypes.length === 0) {
|
|
51941
51980
|
return namedUnions[0];
|
|
@@ -53017,7 +53056,7 @@ var ts;
|
|
|
53017
53056
|
var result;
|
|
53018
53057
|
var extraTypes;
|
|
53019
53058
|
var tailCount = 0;
|
|
53020
|
-
var
|
|
53059
|
+
var _loop_20 = function () {
|
|
53021
53060
|
if (tailCount === 1000) {
|
|
53022
53061
|
error(currentNode, ts.Diagnostics.Type_instantiation_is_excessively_deep_and_possibly_infinite);
|
|
53023
53062
|
result = errorType;
|
|
@@ -53091,10 +53130,10 @@ var ts;
|
|
|
53091
53130
|
return "break";
|
|
53092
53131
|
};
|
|
53093
53132
|
while (true) {
|
|
53094
|
-
var
|
|
53095
|
-
if (typeof
|
|
53096
|
-
return
|
|
53097
|
-
if (
|
|
53133
|
+
var state_6 = _loop_20();
|
|
53134
|
+
if (typeof state_6 === "object")
|
|
53135
|
+
return state_6.value;
|
|
53136
|
+
if (state_6 === "break")
|
|
53098
53137
|
break;
|
|
53099
53138
|
}
|
|
53100
53139
|
return extraTypes ? getUnionType(ts.append(extraTypes, result)) : result;
|
|
@@ -55453,7 +55492,7 @@ var ts;
|
|
|
55453
55492
|
reducedTarget = findMatchingDiscriminantType(source, target, isRelatedTo) || filterPrimitivesIfContainsNonPrimitive(target);
|
|
55454
55493
|
checkTypes = reducedTarget.flags & 1048576 ? reducedTarget.types : [reducedTarget];
|
|
55455
55494
|
}
|
|
55456
|
-
var
|
|
55495
|
+
var _loop_21 = function (prop) {
|
|
55457
55496
|
if (shouldCheckAsExcessProperty(prop, source.symbol) && !isIgnoredJsxProperty(source, prop)) {
|
|
55458
55497
|
if (!isKnownProperty(reducedTarget, prop.escapedName, isComparingJsxAttributes)) {
|
|
55459
55498
|
if (reportErrors) {
|
|
@@ -55506,9 +55545,9 @@ var ts;
|
|
|
55506
55545
|
};
|
|
55507
55546
|
for (var _i = 0, _b = getPropertiesOfType(source); _i < _b.length; _i++) {
|
|
55508
55547
|
var prop = _b[_i];
|
|
55509
|
-
var
|
|
55510
|
-
if (typeof
|
|
55511
|
-
return
|
|
55548
|
+
var state_7 = _loop_21(prop);
|
|
55549
|
+
if (typeof state_7 === "object")
|
|
55550
|
+
return state_7.value;
|
|
55512
55551
|
}
|
|
55513
55552
|
return false;
|
|
55514
55553
|
}
|
|
@@ -56285,11 +56324,11 @@ var ts;
|
|
|
56285
56324
|
}
|
|
56286
56325
|
var discriminantCombinations = ts.cartesianProduct(sourceDiscriminantTypes);
|
|
56287
56326
|
var matchingTypes = [];
|
|
56288
|
-
var
|
|
56327
|
+
var _loop_22 = function (combination) {
|
|
56289
56328
|
var hasMatch = false;
|
|
56290
56329
|
outer: for (var _c = 0, _d = target.types; _c < _d.length; _c++) {
|
|
56291
56330
|
var type = _d[_c];
|
|
56292
|
-
var
|
|
56331
|
+
var _loop_23 = function (i) {
|
|
56293
56332
|
var sourceProperty = sourcePropertiesFiltered[i];
|
|
56294
56333
|
var targetProperty = getPropertyOfType(type, sourceProperty.escapedName);
|
|
56295
56334
|
if (!targetProperty)
|
|
@@ -56302,8 +56341,8 @@ var ts;
|
|
|
56302
56341
|
}
|
|
56303
56342
|
};
|
|
56304
56343
|
for (var i = 0; i < sourcePropertiesFiltered.length; i++) {
|
|
56305
|
-
var
|
|
56306
|
-
switch (
|
|
56344
|
+
var state_9 = _loop_23(i);
|
|
56345
|
+
switch (state_9) {
|
|
56307
56346
|
case "continue-outer": continue outer;
|
|
56308
56347
|
}
|
|
56309
56348
|
}
|
|
@@ -56316,9 +56355,9 @@ var ts;
|
|
|
56316
56355
|
};
|
|
56317
56356
|
for (var _a = 0, discriminantCombinations_1 = discriminantCombinations; _a < discriminantCombinations_1.length; _a++) {
|
|
56318
56357
|
var combination = discriminantCombinations_1[_a];
|
|
56319
|
-
var
|
|
56320
|
-
if (typeof
|
|
56321
|
-
return
|
|
56358
|
+
var state_8 = _loop_22(combination);
|
|
56359
|
+
if (typeof state_8 === "object")
|
|
56360
|
+
return state_8.value;
|
|
56322
56361
|
}
|
|
56323
56362
|
var result = -1;
|
|
56324
56363
|
for (var _b = 0, matchingTypes_1 = matchingTypes; _b < matchingTypes_1.length; _b++) {
|
|
@@ -56960,7 +56999,7 @@ var ts;
|
|
|
56960
56999
|
ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.push("checkTypes", "getVariancesWorker", { arity: typeParameters.length, id: getTypeId(getDeclaredTypeOfSymbol(symbol)) });
|
|
56961
57000
|
links.variances = ts.emptyArray;
|
|
56962
57001
|
var variances = [];
|
|
56963
|
-
var
|
|
57002
|
+
var _loop_24 = function (tp) {
|
|
56964
57003
|
var modifiers = getVarianceModifiers(tp);
|
|
56965
57004
|
var variance = modifiers & 65536 ?
|
|
56966
57005
|
modifiers & 32768 ? 0 : 1 :
|
|
@@ -56991,7 +57030,7 @@ var ts;
|
|
|
56991
57030
|
};
|
|
56992
57031
|
for (var _i = 0, typeParameters_2 = typeParameters; _i < typeParameters_2.length; _i++) {
|
|
56993
57032
|
var tp = typeParameters_2[_i];
|
|
56994
|
-
|
|
57033
|
+
_loop_24(tp);
|
|
56995
57034
|
}
|
|
56996
57035
|
links.variances = variances;
|
|
56997
57036
|
ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.pop({ variances: variances.map(ts.Debug.formatVariance) });
|
|
@@ -57502,7 +57541,8 @@ var ts;
|
|
|
57502
57541
|
function getOptionalType(type, isProperty) {
|
|
57503
57542
|
if (isProperty === void 0) { isProperty = false; }
|
|
57504
57543
|
ts.Debug.assert(strictNullChecks);
|
|
57505
|
-
|
|
57544
|
+
var missingOrUndefined = isProperty ? missingType : undefinedType;
|
|
57545
|
+
return type.flags & 32768 || type.flags & 1048576 && type.types[0] === missingOrUndefined ? type : getUnionType([type, missingOrUndefined]);
|
|
57506
57546
|
}
|
|
57507
57547
|
function getGlobalNonNullableTypeInstantiation(type) {
|
|
57508
57548
|
if (!deferredGlobalNonNullableTypeAlias) {
|
|
@@ -58635,7 +58675,7 @@ var ts;
|
|
|
58635
58675
|
var matches = inferTypesFromTemplateLiteralType(source, target);
|
|
58636
58676
|
var types = target.types;
|
|
58637
58677
|
if (matches || ts.every(target.texts, function (s) { return s.length === 0; })) {
|
|
58638
|
-
var
|
|
58678
|
+
var _loop_25 = function (i) {
|
|
58639
58679
|
var source_1 = matches ? matches[i] : neverType;
|
|
58640
58680
|
var target_3 = types[i];
|
|
58641
58681
|
if (source_1.flags & 128 && target_3.flags & 8650752) {
|
|
@@ -58679,7 +58719,7 @@ var ts;
|
|
|
58679
58719
|
inferFromTypes(source_1, target_3);
|
|
58680
58720
|
};
|
|
58681
58721
|
for (var i = 0; i < types.length; i++) {
|
|
58682
|
-
|
|
58722
|
+
_loop_25(i);
|
|
58683
58723
|
}
|
|
58684
58724
|
}
|
|
58685
58725
|
}
|
|
@@ -59098,7 +59138,7 @@ var ts;
|
|
|
59098
59138
|
return name;
|
|
59099
59139
|
}
|
|
59100
59140
|
}
|
|
59101
|
-
if (ts.hasOnlyExpressionInitializer(declaration)) {
|
|
59141
|
+
if (ts.hasOnlyExpressionInitializer(declaration) && isBlockScopedNameDeclaredBeforeUse(declaration, node.argumentExpression)) {
|
|
59102
59142
|
var initializer = ts.getEffectiveInitializer(declaration);
|
|
59103
59143
|
return initializer && tryGetNameFromType(getTypeOfExpression(initializer));
|
|
59104
59144
|
}
|
|
@@ -59154,7 +59194,7 @@ var ts;
|
|
|
59154
59194
|
function mapTypesByKeyProperty(types, name) {
|
|
59155
59195
|
var map = new ts.Map();
|
|
59156
59196
|
var count = 0;
|
|
59157
|
-
var
|
|
59197
|
+
var _loop_26 = function (type) {
|
|
59158
59198
|
if (type.flags & (524288 | 2097152 | 58982400)) {
|
|
59159
59199
|
var discriminant = getTypeOfPropertyOfType(type, name);
|
|
59160
59200
|
if (discriminant) {
|
|
@@ -59180,9 +59220,9 @@ var ts;
|
|
|
59180
59220
|
};
|
|
59181
59221
|
for (var _i = 0, types_15 = types; _i < types_15.length; _i++) {
|
|
59182
59222
|
var type = types_15[_i];
|
|
59183
|
-
var
|
|
59184
|
-
if (typeof
|
|
59185
|
-
return
|
|
59223
|
+
var state_10 = _loop_26(type);
|
|
59224
|
+
if (typeof state_10 === "object")
|
|
59225
|
+
return state_10.value;
|
|
59186
59226
|
}
|
|
59187
59227
|
return count >= 10 && count * 2 >= types.length ? map : undefined;
|
|
59188
59228
|
}
|
|
@@ -64684,7 +64724,7 @@ var ts;
|
|
|
64684
64724
|
var spreadIndex = getSpreadArgumentIndex(args);
|
|
64685
64725
|
if (spreadIndex >= 0) {
|
|
64686
64726
|
var effectiveArgs_1 = args.slice(0, spreadIndex);
|
|
64687
|
-
var
|
|
64727
|
+
var _loop_27 = function (i) {
|
|
64688
64728
|
var arg = args[i];
|
|
64689
64729
|
var spreadType = arg.kind === 227 && (flowLoopCount ? checkExpression(arg.expression) : checkExpressionCached(arg.expression));
|
|
64690
64730
|
if (spreadType && isTupleType(spreadType)) {
|
|
@@ -64700,7 +64740,7 @@ var ts;
|
|
|
64700
64740
|
}
|
|
64701
64741
|
};
|
|
64702
64742
|
for (var i = spreadIndex; i < args.length; i++) {
|
|
64703
|
-
|
|
64743
|
+
_loop_27(i);
|
|
64704
64744
|
}
|
|
64705
64745
|
return effectiveArgs_1;
|
|
64706
64746
|
}
|
|
@@ -64950,7 +64990,7 @@ var ts;
|
|
|
64950
64990
|
var min_3 = Number.MAX_VALUE;
|
|
64951
64991
|
var minIndex = 0;
|
|
64952
64992
|
var i_1 = 0;
|
|
64953
|
-
var
|
|
64993
|
+
var _loop_28 = function (c) {
|
|
64954
64994
|
var chain_2 = function () { return ts.chainDiagnosticMessages(undefined, ts.Diagnostics.Overload_0_of_1_2_gave_the_following_error, i_1 + 1, candidates.length, signatureToString(c)); };
|
|
64955
64995
|
var diags_2 = getSignatureApplicabilityError(node, args, c, assignableRelation, 0, true, chain_2);
|
|
64956
64996
|
if (diags_2) {
|
|
@@ -64968,7 +65008,7 @@ var ts;
|
|
|
64968
65008
|
};
|
|
64969
65009
|
for (var _a = 0, candidatesForArgumentError_1 = candidatesForArgumentError; _a < candidatesForArgumentError_1.length; _a++) {
|
|
64970
65010
|
var c = candidatesForArgumentError_1[_a];
|
|
64971
|
-
|
|
65011
|
+
_loop_28(c);
|
|
64972
65012
|
}
|
|
64973
65013
|
var diags_3 = max > 1 ? allDiagnostics[minIndex] : ts.flatten(allDiagnostics);
|
|
64974
65014
|
ts.Debug.assert(diags_3.length > 0, "No errors reported for 3 or fewer overload signatures");
|
|
@@ -65111,7 +65151,7 @@ var ts;
|
|
|
65111
65151
|
}
|
|
65112
65152
|
var _a = ts.minAndMax(candidates, getNumNonRestParameters), minArgumentCount = _a.min, maxNonRestParam = _a.max;
|
|
65113
65153
|
var parameters = [];
|
|
65114
|
-
var
|
|
65154
|
+
var _loop_29 = function (i) {
|
|
65115
65155
|
var symbols = ts.mapDefined(candidates, function (s) { return signatureHasRestParameter(s) ?
|
|
65116
65156
|
i < s.parameters.length - 1 ? s.parameters[i] : ts.last(s.parameters) :
|
|
65117
65157
|
i < s.parameters.length ? s.parameters[i] : undefined; });
|
|
@@ -65119,7 +65159,7 @@ var ts;
|
|
|
65119
65159
|
parameters.push(createCombinedSymbolFromTypes(symbols, ts.mapDefined(candidates, function (candidate) { return tryGetTypeAtPosition(candidate, i); })));
|
|
65120
65160
|
};
|
|
65121
65161
|
for (var i = 0; i < maxNonRestParam; i++) {
|
|
65122
|
-
|
|
65162
|
+
_loop_29(i);
|
|
65123
65163
|
}
|
|
65124
65164
|
var restParameterSymbols = ts.mapDefined(candidates, function (c) { return signatureHasRestParameter(c) ? ts.last(c.parameters) : undefined; });
|
|
65125
65165
|
var flags = 0;
|
|
@@ -67601,6 +67641,7 @@ var ts;
|
|
|
67601
67641
|
var eqType = operator === 34 || operator === 36;
|
|
67602
67642
|
error(errorNode, ts.Diagnostics.This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value, eqType ? "false" : "true");
|
|
67603
67643
|
}
|
|
67644
|
+
checkNaNEquality(errorNode, operator, left, right);
|
|
67604
67645
|
reportOperatorErrorUnless(function (left, right) { return isTypeEqualityComparableTo(left, right) || isTypeEqualityComparableTo(right, left); });
|
|
67605
67646
|
return booleanType;
|
|
67606
67647
|
case 102:
|
|
@@ -67794,6 +67835,26 @@ var ts;
|
|
|
67794
67835
|
return undefined;
|
|
67795
67836
|
}
|
|
67796
67837
|
}
|
|
67838
|
+
function checkNaNEquality(errorNode, operator, left, right) {
|
|
67839
|
+
var isLeftNaN = isGlobalNaN(ts.skipParentheses(left));
|
|
67840
|
+
var isRightNaN = isGlobalNaN(ts.skipParentheses(right));
|
|
67841
|
+
if (isLeftNaN || isRightNaN) {
|
|
67842
|
+
var err = error(errorNode, ts.Diagnostics.This_condition_will_always_return_0, ts.tokenToString(operator === 36 || operator === 34 ? 95 : 110));
|
|
67843
|
+
if (isLeftNaN && isRightNaN)
|
|
67844
|
+
return;
|
|
67845
|
+
var operatorString = operator === 37 || operator === 35 ? ts.tokenToString(53) : "";
|
|
67846
|
+
var location = isLeftNaN ? right : left;
|
|
67847
|
+
var expression = ts.skipParentheses(location);
|
|
67848
|
+
ts.addRelatedInfo(err, ts.createDiagnosticForNode(location, ts.Diagnostics.Did_you_mean_0, "".concat(operatorString, "Number.isNaN(").concat(ts.isEntityNameExpression(expression) ? ts.entityNameToString(expression) : "...", ")")));
|
|
67849
|
+
}
|
|
67850
|
+
}
|
|
67851
|
+
function isGlobalNaN(expr) {
|
|
67852
|
+
if (ts.isIdentifier(expr) && expr.escapedText === "NaN") {
|
|
67853
|
+
var globalNaNSymbol = getGlobalNaNSymbol();
|
|
67854
|
+
return !!globalNaNSymbol && globalNaNSymbol === getResolvedSymbol(expr);
|
|
67855
|
+
}
|
|
67856
|
+
return false;
|
|
67857
|
+
}
|
|
67797
67858
|
}
|
|
67798
67859
|
function getBaseTypesIfUnrelated(leftType, rightType, isRelated) {
|
|
67799
67860
|
var effectiveLeft = leftType;
|
|
@@ -68715,7 +68776,7 @@ var ts;
|
|
|
68715
68776
|
var indexSymbol = getIndexSymbol(getSymbolOfNode(node));
|
|
68716
68777
|
if (indexSymbol === null || indexSymbol === void 0 ? void 0 : indexSymbol.declarations) {
|
|
68717
68778
|
var indexSignatureMap_1 = new ts.Map();
|
|
68718
|
-
var
|
|
68779
|
+
var _loop_30 = function (declaration) {
|
|
68719
68780
|
if (declaration.parameters.length === 1 && declaration.parameters[0].type) {
|
|
68720
68781
|
forEachType(getTypeFromTypeNode(declaration.parameters[0].type), function (type) {
|
|
68721
68782
|
var entry = indexSignatureMap_1.get(getTypeId(type));
|
|
@@ -68730,7 +68791,7 @@ var ts;
|
|
|
68730
68791
|
};
|
|
68731
68792
|
for (var _i = 0, _a = indexSymbol.declarations; _i < _a.length; _i++) {
|
|
68732
68793
|
var declaration = _a[_i];
|
|
68733
|
-
|
|
68794
|
+
_loop_30(declaration);
|
|
68734
68795
|
}
|
|
68735
68796
|
indexSignatureMap_1.forEach(function (entry) {
|
|
68736
68797
|
if (entry.declarations.length > 1) {
|
|
@@ -71670,7 +71731,7 @@ var ts;
|
|
|
71670
71731
|
var propDeclaration = declaration && declaration.kind === 223 ||
|
|
71671
71732
|
name && name.kind === 164 ? declaration : undefined;
|
|
71672
71733
|
var localPropDeclaration = getParentOfSymbol(prop) === type.symbol ? declaration : undefined;
|
|
71673
|
-
var
|
|
71734
|
+
var _loop_31 = function (info) {
|
|
71674
71735
|
var localIndexDeclaration = info.declaration && getParentOfSymbol(getSymbolOfNode(info.declaration)) === type.symbol ? info.declaration : undefined;
|
|
71675
71736
|
var errorNode = localPropDeclaration || localIndexDeclaration ||
|
|
71676
71737
|
(interfaceDeclaration && !ts.some(getBaseTypes(type), function (base) { return !!getPropertyOfObjectType(base, prop.escapedName) && !!getIndexTypeOfType(base, info.keyType); }) ? interfaceDeclaration : undefined);
|
|
@@ -71684,7 +71745,7 @@ var ts;
|
|
|
71684
71745
|
};
|
|
71685
71746
|
for (var _i = 0, indexInfos_9 = indexInfos; _i < indexInfos_9.length; _i++) {
|
|
71686
71747
|
var info = indexInfos_9[_i];
|
|
71687
|
-
|
|
71748
|
+
_loop_31(info);
|
|
71688
71749
|
}
|
|
71689
71750
|
}
|
|
71690
71751
|
function checkIndexConstraintForIndexSignature(type, checkInfo) {
|
|
@@ -71692,7 +71753,7 @@ var ts;
|
|
|
71692
71753
|
var indexInfos = getApplicableIndexInfos(type, checkInfo.keyType);
|
|
71693
71754
|
var interfaceDeclaration = ts.getObjectFlags(type) & 2 ? ts.getDeclarationOfKind(type.symbol, 261) : undefined;
|
|
71694
71755
|
var localCheckDeclaration = declaration && getParentOfSymbol(getSymbolOfNode(declaration)) === type.symbol ? declaration : undefined;
|
|
71695
|
-
var
|
|
71756
|
+
var _loop_32 = function (info) {
|
|
71696
71757
|
if (info === checkInfo)
|
|
71697
71758
|
return "continue";
|
|
71698
71759
|
var localIndexDeclaration = info.declaration && getParentOfSymbol(getSymbolOfNode(info.declaration)) === type.symbol ? info.declaration : undefined;
|
|
@@ -71704,7 +71765,7 @@ var ts;
|
|
|
71704
71765
|
};
|
|
71705
71766
|
for (var _i = 0, indexInfos_10 = indexInfos; _i < indexInfos_10.length; _i++) {
|
|
71706
71767
|
var info = indexInfos_10[_i];
|
|
71707
|
-
|
|
71768
|
+
_loop_32(info);
|
|
71708
71769
|
}
|
|
71709
71770
|
}
|
|
71710
71771
|
function checkTypeNameIsReserved(name, message) {
|
|
@@ -71999,7 +72060,7 @@ var ts;
|
|
|
71999
72060
|
var baseTypes = baseTypeNode && getBaseTypes(type);
|
|
72000
72061
|
var baseWithThis = (baseTypes === null || baseTypes === void 0 ? void 0 : baseTypes.length) ? getTypeWithThisArgument(ts.first(baseTypes), type.thisType) : undefined;
|
|
72001
72062
|
var baseStaticType = getBaseConstructorTypeOfClass(type);
|
|
72002
|
-
var
|
|
72063
|
+
var _loop_33 = function (member) {
|
|
72003
72064
|
if (ts.hasAmbientModifier(member)) {
|
|
72004
72065
|
return "continue";
|
|
72005
72066
|
}
|
|
@@ -72014,7 +72075,7 @@ var ts;
|
|
|
72014
72075
|
};
|
|
72015
72076
|
for (var _i = 0, _a = node.members; _i < _a.length; _i++) {
|
|
72016
72077
|
var member = _a[_i];
|
|
72017
|
-
|
|
72078
|
+
_loop_33(member);
|
|
72018
72079
|
}
|
|
72019
72080
|
}
|
|
72020
72081
|
function checkExistingMemberForOverrideModifier(node, staticType, baseStaticType, baseWithThis, type, typeWithThis, member, memberIsParameterProperty, reportErrors) {
|
|
@@ -72089,7 +72150,7 @@ var ts;
|
|
|
72089
72150
|
}
|
|
72090
72151
|
function issueMemberSpecificError(node, typeWithThis, baseWithThis, broadDiag) {
|
|
72091
72152
|
var issuedMemberError = false;
|
|
72092
|
-
var
|
|
72153
|
+
var _loop_34 = function (member) {
|
|
72093
72154
|
if (ts.isStatic(member)) {
|
|
72094
72155
|
return "continue";
|
|
72095
72156
|
}
|
|
@@ -72107,7 +72168,7 @@ var ts;
|
|
|
72107
72168
|
};
|
|
72108
72169
|
for (var _i = 0, _a = node.members; _i < _a.length; _i++) {
|
|
72109
72170
|
var member = _a[_i];
|
|
72110
|
-
|
|
72171
|
+
_loop_34(member);
|
|
72111
72172
|
}
|
|
72112
72173
|
if (!issuedMemberError) {
|
|
72113
72174
|
checkTypeAssignableTo(typeWithThis, baseWithThis, node.name || node, broadDiag);
|
|
@@ -72154,7 +72215,7 @@ var ts;
|
|
|
72154
72215
|
function checkKindsOfPropertyMemberOverrides(type, baseType) {
|
|
72155
72216
|
var _a, _b, _c, _d;
|
|
72156
72217
|
var baseProperties = getPropertiesOfType(baseType);
|
|
72157
|
-
var
|
|
72218
|
+
var _loop_35 = function (baseProperty) {
|
|
72158
72219
|
var base = getTargetSymbol(baseProperty);
|
|
72159
72220
|
if (base.flags & 4194304) {
|
|
72160
72221
|
return "continue";
|
|
@@ -72252,8 +72313,8 @@ var ts;
|
|
|
72252
72313
|
};
|
|
72253
72314
|
basePropertyCheck: for (var _i = 0, baseProperties_1 = baseProperties; _i < baseProperties_1.length; _i++) {
|
|
72254
72315
|
var baseProperty = baseProperties_1[_i];
|
|
72255
|
-
var
|
|
72256
|
-
switch (
|
|
72316
|
+
var state_11 = _loop_35(baseProperty);
|
|
72317
|
+
switch (state_11) {
|
|
72257
72318
|
case "continue-basePropertyCheck": continue basePropertyCheck;
|
|
72258
72319
|
}
|
|
72259
72320
|
}
|
|
@@ -95234,6 +95295,7 @@ var ts;
|
|
|
95234
95295
|
writeTrailingSemicolon();
|
|
95235
95296
|
}
|
|
95236
95297
|
function emitExportDeclaration(node) {
|
|
95298
|
+
emitModifiers(node, node.modifiers);
|
|
95237
95299
|
var nextPos = emitTokenWithComment(93, node.pos, writeKeyword, node);
|
|
95238
95300
|
writeSpace();
|
|
95239
95301
|
if (node.isTypeOnly) {
|
|
@@ -102647,15 +102709,12 @@ var ts;
|
|
|
102647
102709
|
var value = filesWithInvalidatedNonRelativeUnresolvedImports.get(path);
|
|
102648
102710
|
return !!value && !!value.length;
|
|
102649
102711
|
}
|
|
102650
|
-
function createHasInvalidatedResolution(
|
|
102712
|
+
function createHasInvalidatedResolution(userProvidedHasInvalidatedResolution) {
|
|
102651
102713
|
invalidateResolutionsOfFailedLookupLocations();
|
|
102652
|
-
if (forceAllFilesAsInvalidated) {
|
|
102653
|
-
filesWithInvalidatedResolutions = undefined;
|
|
102654
|
-
return ts.returnTrue;
|
|
102655
|
-
}
|
|
102656
102714
|
var collected = filesWithInvalidatedResolutions;
|
|
102657
102715
|
filesWithInvalidatedResolutions = undefined;
|
|
102658
|
-
return function (path) { return (
|
|
102716
|
+
return function (path) { return (userProvidedHasInvalidatedResolution === null || userProvidedHasInvalidatedResolution === void 0 ? void 0 : userProvidedHasInvalidatedResolution(path)) ||
|
|
102717
|
+
!!(collected === null || collected === void 0 ? void 0 : collected.has(path)) ||
|
|
102659
102718
|
isFileWithInvalidatedNonRelativeUnresolvedImports(path); };
|
|
102660
102719
|
}
|
|
102661
102720
|
function startCachingPerDirectoryResolution() {
|
|
@@ -103619,7 +103678,7 @@ var ts;
|
|
|
103619
103678
|
importedFileFromNodeModules = importedFileFromNodeModules || isInNodeModules;
|
|
103620
103679
|
});
|
|
103621
103680
|
var sortedPaths = [];
|
|
103622
|
-
var
|
|
103681
|
+
var _loop_36 = function (directory) {
|
|
103623
103682
|
var directoryStart = ts.ensureTrailingDirectorySeparator(directory);
|
|
103624
103683
|
var pathsInDirectory;
|
|
103625
103684
|
allFileNames.forEach(function (_a, fileName) {
|
|
@@ -103643,9 +103702,9 @@ var ts;
|
|
|
103643
103702
|
};
|
|
103644
103703
|
var out_directory_1;
|
|
103645
103704
|
for (var directory = ts.getDirectoryPath(importingFileName); allFileNames.size !== 0;) {
|
|
103646
|
-
var
|
|
103705
|
+
var state_12 = _loop_36(directory);
|
|
103647
103706
|
directory = out_directory_1;
|
|
103648
|
-
if (
|
|
103707
|
+
if (state_12 === "break")
|
|
103649
103708
|
break;
|
|
103650
103709
|
}
|
|
103651
103710
|
if (allFileNames.size) {
|
|
@@ -103704,7 +103763,7 @@ var ts;
|
|
|
103704
103763
|
}
|
|
103705
103764
|
function tryGetModuleNameFromPaths(relativeToBaseUrl, paths, allowedEndings, host, compilerOptions) {
|
|
103706
103765
|
for (var key in paths) {
|
|
103707
|
-
var
|
|
103766
|
+
var _loop_37 = function (patternText_1) {
|
|
103708
103767
|
var pattern = ts.normalizePath(patternText_1);
|
|
103709
103768
|
var indexOfStar = pattern.indexOf("*");
|
|
103710
103769
|
var candidates = allowedEndings.map(function (ending) { return ({
|
|
@@ -103735,9 +103794,9 @@ var ts;
|
|
|
103735
103794
|
};
|
|
103736
103795
|
for (var _i = 0, _a = paths[key]; _i < _a.length; _i++) {
|
|
103737
103796
|
var patternText_1 = _a[_i];
|
|
103738
|
-
var
|
|
103739
|
-
if (typeof
|
|
103740
|
-
return
|
|
103797
|
+
var state_13 = _loop_37(patternText_1);
|
|
103798
|
+
if (typeof state_13 === "object")
|
|
103799
|
+
return state_13.value;
|
|
103741
103800
|
}
|
|
103742
103801
|
}
|
|
103743
103802
|
function validateEnding(_a) {
|
|
@@ -104745,6 +104804,7 @@ var ts;
|
|
|
104745
104804
|
ts.maybeBind(host, host.getModuleResolutionCache) :
|
|
104746
104805
|
(function () { return resolutionCache.getModuleResolutionCache(); });
|
|
104747
104806
|
var userProvidedResolution = !!host.resolveModuleNames || !!host.resolveTypeReferenceDirectives;
|
|
104807
|
+
var userProvidedHasInvalidatedResolution = ts.maybeBind(host, host.hasInvalidatedResolution) || ts.returnTrue;
|
|
104748
104808
|
builderProgram = readBuilderProgram(compilerOptions, compilerHost);
|
|
104749
104809
|
synchronizeProgram();
|
|
104750
104810
|
watchConfigFileWildCardDirectories();
|
|
@@ -104808,7 +104868,7 @@ var ts;
|
|
|
104808
104868
|
resolutionCache.clear();
|
|
104809
104869
|
}
|
|
104810
104870
|
}
|
|
104811
|
-
var hasInvalidatedResolution = resolutionCache.createHasInvalidatedResolution(userProvidedResolution);
|
|
104871
|
+
var hasInvalidatedResolution = resolutionCache.createHasInvalidatedResolution(userProvidedResolution ? userProvidedHasInvalidatedResolution : undefined);
|
|
104812
104872
|
var _a = ts.changeCompilerHostLikeToUseCache(compilerHost, toPath), originalReadFile = _a.originalReadFile, originalFileExists = _a.originalFileExists, originalDirectoryExists = _a.originalDirectoryExists, originalCreateDirectory = _a.originalCreateDirectory, originalWriteFile = _a.originalWriteFile;
|
|
104813
104873
|
if (ts.isProgramUptoDate(getCurrentProgram(), rootFileNames, compilerOptions, getSourceVersion, function (fileName) { return compilerHost.fileExists(fileName); }, hasInvalidatedResolution, hasChangedAutomaticTypeDirectiveNames, getParsedCommandLine, projectReferences)) {
|
|
104814
104874
|
if (hasChangedConfigFileParsingErrors) {
|