@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/typingsInstaller.js
CHANGED
|
@@ -89,7 +89,7 @@ var ts;
|
|
|
89
89
|
// The following is baselined as a literal template type without intervention
|
|
90
90
|
/** The version of the TypeScript compiler release */
|
|
91
91
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
92
|
-
ts.version = "".concat(ts.versionMajorMinor, ".0-insiders.
|
|
92
|
+
ts.version = "".concat(ts.versionMajorMinor, ".0-insiders.20220922");
|
|
93
93
|
/* @internal */
|
|
94
94
|
var Comparison;
|
|
95
95
|
(function (Comparison) {
|
|
@@ -2998,7 +2998,7 @@ var ts;
|
|
|
2998
2998
|
];
|
|
2999
2999
|
for (var _i = 0, nodeConstructors_1 = nodeConstructors; _i < nodeConstructors_1.length; _i++) {
|
|
3000
3000
|
var ctor = nodeConstructors_1[_i];
|
|
3001
|
-
if (!ts.hasProperty(ctor, "__debugKind")) {
|
|
3001
|
+
if (!ts.hasProperty(ctor.prototype, "__debugKind")) {
|
|
3002
3002
|
Object.defineProperties(ctor.prototype, {
|
|
3003
3003
|
// for use with vscode-js-debug's new customDescriptionGenerator in launch.json
|
|
3004
3004
|
__tsDebuggerDisplay: {
|
|
@@ -9113,6 +9113,7 @@ var ts;
|
|
|
9113
9113
|
_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?"),
|
|
9114
9114
|
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."),
|
|
9115
9115
|
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."),
|
|
9116
|
+
This_condition_will_always_return_0: diag(2845, ts.DiagnosticCategory.Error, "This_condition_will_always_return_0_2845", "This condition will always return '{0}'."),
|
|
9116
9117
|
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}'."),
|
|
9117
9118
|
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}'."),
|
|
9118
9119
|
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}'."),
|
|
@@ -10055,6 +10056,8 @@ var ts;
|
|
|
10055
10056
|
Delete_unused_param_tag_0: diag(95171, ts.DiagnosticCategory.Message, "Delete_unused_param_tag_0_95171", "Delete unused '@param' tag '{0}'"),
|
|
10056
10057
|
Delete_all_unused_param_tags: diag(95172, ts.DiagnosticCategory.Message, "Delete_all_unused_param_tags_95172", "Delete all unused '@param' tags"),
|
|
10057
10058
|
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}'"),
|
|
10059
|
+
Use_0: diag(95174, ts.DiagnosticCategory.Message, "Use_0_95174", "Use `{0}`."),
|
|
10060
|
+
Use_Number_isNaN_in_all_conditions: diag(95175, ts.DiagnosticCategory.Message, "Use_Number_isNaN_in_all_conditions_95175", "Use `Number.isNaN` in all conditions."),
|
|
10058
10061
|
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."),
|
|
10059
10062
|
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'."),
|
|
10060
10063
|
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?"),
|
|
@@ -45230,6 +45233,7 @@ var ts;
|
|
|
45230
45233
|
}
|
|
45231
45234
|
}
|
|
45232
45235
|
function loadModuleFromSpecificNodeModulesDirectory(extensions, moduleName, nodeModulesDirectory, nodeModulesDirectoryExists, state, cache, redirectedReference) {
|
|
45236
|
+
var _a;
|
|
45233
45237
|
var candidate = ts.normalizePath(ts.combinePaths(nodeModulesDirectory, moduleName));
|
|
45234
45238
|
// First look for a nested package.json, as in `node_modules/foo/bar/package.json`.
|
|
45235
45239
|
var packageInfo = getPackageJsonInfo(candidate, !nodeModulesDirectoryExists, state);
|
|
@@ -45244,13 +45248,7 @@ var ts;
|
|
|
45244
45248
|
return withPackageId(packageInfo, fromDirectory);
|
|
45245
45249
|
}
|
|
45246
45250
|
}
|
|
45247
|
-
var _a = parsePackageName(moduleName), packageName = _a.packageName, rest = _a.rest;
|
|
45248
45251
|
var loader = function (extensions, candidate, onlyRecordFailures, state) {
|
|
45249
|
-
var _a;
|
|
45250
|
-
// package exports are higher priority than file/directory lookups (and, if there's exports present, blocks them)
|
|
45251
|
-
if (packageInfo && packageInfo.contents.packageJsonContent.exports && state.features & NodeResolutionFeatures.Exports) {
|
|
45252
|
-
return (_a = loadModuleFromExports(packageInfo, extensions, ts.combinePaths(".", rest), state, cache, redirectedReference)) === null || _a === void 0 ? void 0 : _a.value;
|
|
45253
|
-
}
|
|
45254
45252
|
var pathAndExtension = loadModuleFromFile(extensions, candidate, onlyRecordFailures, state) ||
|
|
45255
45253
|
loadNodeModuleFromDirectoryWorker(extensions, candidate, onlyRecordFailures, state, packageInfo && packageInfo.contents.packageJsonContent, packageInfo && packageInfo.contents.versionPaths);
|
|
45256
45254
|
if (!pathAndExtension && packageInfo
|
|
@@ -45263,19 +45261,24 @@ var ts;
|
|
|
45263
45261
|
}
|
|
45264
45262
|
return withPackageId(packageInfo, pathAndExtension);
|
|
45265
45263
|
};
|
|
45266
|
-
|
|
45267
|
-
|
|
45268
|
-
|
|
45264
|
+
var _b = parsePackageName(moduleName), packageName = _b.packageName, rest = _b.rest;
|
|
45265
|
+
var packageDirectory = ts.combinePaths(nodeModulesDirectory, packageName);
|
|
45266
|
+
if (rest !== "") {
|
|
45267
|
+
// Previous `packageInfo` may have been from a nested package.json; ensure we have the one from the package root now.
|
|
45269
45268
|
packageInfo = getPackageJsonInfo(packageDirectory, !nodeModulesDirectoryExists, state);
|
|
45270
|
-
|
|
45271
|
-
|
|
45272
|
-
|
|
45273
|
-
|
|
45274
|
-
|
|
45275
|
-
|
|
45276
|
-
|
|
45277
|
-
|
|
45278
|
-
|
|
45269
|
+
}
|
|
45270
|
+
// package exports are higher priority than file/directory/typesVersions lookups and (and, if there's exports present, blocks them)
|
|
45271
|
+
if (packageInfo && packageInfo.contents.packageJsonContent.exports && state.features & NodeResolutionFeatures.Exports) {
|
|
45272
|
+
return (_a = loadModuleFromExports(packageInfo, extensions, ts.combinePaths(".", rest), state, cache, redirectedReference)) === null || _a === void 0 ? void 0 : _a.value;
|
|
45273
|
+
}
|
|
45274
|
+
if (rest !== "" && packageInfo && packageInfo.contents.versionPaths) {
|
|
45275
|
+
if (state.traceEnabled) {
|
|
45276
|
+
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);
|
|
45277
|
+
}
|
|
45278
|
+
var packageDirectoryExists = nodeModulesDirectoryExists && ts.directoryProbablyExists(packageDirectory, state.host);
|
|
45279
|
+
var fromPaths = tryLoadModuleUsingPaths(extensions, rest, packageDirectory, packageInfo.contents.versionPaths.paths, /*pathPatterns*/ undefined, loader, !packageDirectoryExists, state);
|
|
45280
|
+
if (fromPaths) {
|
|
45281
|
+
return fromPaths.value;
|
|
45279
45282
|
}
|
|
45280
45283
|
}
|
|
45281
45284
|
return loader(extensions, candidate, !nodeModulesDirectoryExists, state);
|
|
@@ -49777,6 +49780,7 @@ var ts;
|
|
|
49777
49780
|
var deferredGlobalOmitSymbol;
|
|
49778
49781
|
var deferredGlobalAwaitedSymbol;
|
|
49779
49782
|
var deferredGlobalBigIntType;
|
|
49783
|
+
var deferredGlobalNaNSymbol;
|
|
49780
49784
|
var deferredGlobalRecordSymbol;
|
|
49781
49785
|
var allPotentiallyUnusedIdentifiers = new ts.Map(); // key is file name
|
|
49782
49786
|
var flowLoopStart = 0;
|
|
@@ -55455,6 +55459,7 @@ var ts;
|
|
|
55455
55459
|
&& symbol.escapedName !== "export=" /* InternalSymbolName.ExportEquals */
|
|
55456
55460
|
&& !(symbol.flags & 4194304 /* SymbolFlags.Prototype */)
|
|
55457
55461
|
&& !(symbol.flags & 32 /* SymbolFlags.Class */)
|
|
55462
|
+
&& !(symbol.flags & 8192 /* SymbolFlags.Method */)
|
|
55458
55463
|
&& !isConstMergedWithNSPrintableAsSignatureMerge) {
|
|
55459
55464
|
if (propertyAsAlias) {
|
|
55460
55465
|
var createdExport = serializeMaybeAliasAssignment(symbol);
|
|
@@ -60265,7 +60270,7 @@ var ts;
|
|
|
60265
60270
|
var isInstantiation = (getTargetSymbol(prop) || prop) === (getTargetSymbol(singleProp) || singleProp);
|
|
60266
60271
|
// If the symbols are instances of one another with identical types - consider the symbols
|
|
60267
60272
|
// equivalent and just use the first one, which thus allows us to avoid eliding private
|
|
60268
|
-
// members when intersecting a (this-)instantiations of a class with
|
|
60273
|
+
// members when intersecting a (this-)instantiations of a class with its raw base or another instance
|
|
60269
60274
|
if (isInstantiation && compareProperties(singleProp, prop, function (a, b) { return a === b ? -1 /* Ternary.True */ : 0 /* Ternary.False */; }) === -1 /* Ternary.True */) {
|
|
60270
60275
|
// If we merged instantiations of a generic type, we replicate the symbol parent resetting behavior we used
|
|
60271
60276
|
// to do when we recorded multiple distinct symbols so that we still get, eg, `Array<T>.length` printed
|
|
@@ -60313,7 +60318,11 @@ var ts;
|
|
|
60313
60318
|
}
|
|
60314
60319
|
}
|
|
60315
60320
|
}
|
|
60316
|
-
if (!singleProp ||
|
|
60321
|
+
if (!singleProp ||
|
|
60322
|
+
isUnion &&
|
|
60323
|
+
(propSet || checkFlags & 48 /* CheckFlags.Partial */) &&
|
|
60324
|
+
checkFlags & (1024 /* CheckFlags.ContainsPrivate */ | 512 /* CheckFlags.ContainsProtected */) &&
|
|
60325
|
+
!(propSet && getCommonDeclarationsOfSymbols(ts.arrayFrom(propSet.values())))) {
|
|
60317
60326
|
// No property was found, or, in a union, a property has a private or protected declaration in one
|
|
60318
60327
|
// constituent, but is missing or has a different declaration in another constituent.
|
|
60319
60328
|
return undefined;
|
|
@@ -60415,6 +60424,33 @@ var ts;
|
|
|
60415
60424
|
}
|
|
60416
60425
|
return property;
|
|
60417
60426
|
}
|
|
60427
|
+
function getCommonDeclarationsOfSymbols(symbols) {
|
|
60428
|
+
var commonDeclarations;
|
|
60429
|
+
var _loop_14 = function (symbol) {
|
|
60430
|
+
if (!symbol.declarations) {
|
|
60431
|
+
return { value: undefined };
|
|
60432
|
+
}
|
|
60433
|
+
if (!commonDeclarations) {
|
|
60434
|
+
commonDeclarations = new ts.Set(symbol.declarations);
|
|
60435
|
+
return "continue";
|
|
60436
|
+
}
|
|
60437
|
+
commonDeclarations.forEach(function (declaration) {
|
|
60438
|
+
if (!ts.contains(symbol.declarations, declaration)) {
|
|
60439
|
+
commonDeclarations.delete(declaration);
|
|
60440
|
+
}
|
|
60441
|
+
});
|
|
60442
|
+
if (commonDeclarations.size === 0) {
|
|
60443
|
+
return { value: undefined };
|
|
60444
|
+
}
|
|
60445
|
+
};
|
|
60446
|
+
for (var _i = 0, symbols_3 = symbols; _i < symbols_3.length; _i++) {
|
|
60447
|
+
var symbol = symbols_3[_i];
|
|
60448
|
+
var state_4 = _loop_14(symbol);
|
|
60449
|
+
if (typeof state_4 === "object")
|
|
60450
|
+
return state_4.value;
|
|
60451
|
+
}
|
|
60452
|
+
return commonDeclarations;
|
|
60453
|
+
}
|
|
60418
60454
|
function getPropertyOfUnionOrIntersectionType(type, name, skipObjectFunctionPropertyAugment) {
|
|
60419
60455
|
var property = getUnionOrIntersectionProperty(type, name, skipObjectFunctionPropertyAugment);
|
|
60420
60456
|
// We need to filter out partial properties in union types
|
|
@@ -61129,7 +61165,7 @@ var ts;
|
|
|
61129
61165
|
function getIndexInfosOfIndexSymbol(indexSymbol) {
|
|
61130
61166
|
if (indexSymbol.declarations) {
|
|
61131
61167
|
var indexInfos_4 = [];
|
|
61132
|
-
var
|
|
61168
|
+
var _loop_15 = function (declaration) {
|
|
61133
61169
|
if (declaration.parameters.length === 1) {
|
|
61134
61170
|
var parameter = declaration.parameters[0];
|
|
61135
61171
|
if (parameter.type) {
|
|
@@ -61143,7 +61179,7 @@ var ts;
|
|
|
61143
61179
|
};
|
|
61144
61180
|
for (var _i = 0, _a = indexSymbol.declarations; _i < _a.length; _i++) {
|
|
61145
61181
|
var declaration = _a[_i];
|
|
61146
|
-
|
|
61182
|
+
_loop_15(declaration);
|
|
61147
61183
|
}
|
|
61148
61184
|
return indexInfos_4;
|
|
61149
61185
|
}
|
|
@@ -61160,7 +61196,7 @@ var ts;
|
|
|
61160
61196
|
var _a;
|
|
61161
61197
|
var inferences;
|
|
61162
61198
|
if ((_a = typeParameter.symbol) === null || _a === void 0 ? void 0 : _a.declarations) {
|
|
61163
|
-
var
|
|
61199
|
+
var _loop_16 = function (declaration) {
|
|
61164
61200
|
if (declaration.parent.kind === 192 /* SyntaxKind.InferType */) {
|
|
61165
61201
|
// When an 'infer T' declaration is immediately contained in a type reference node
|
|
61166
61202
|
// (such as 'Foo<infer T>'), T's constraint is inferred from the constraint of the
|
|
@@ -61224,7 +61260,7 @@ var ts;
|
|
|
61224
61260
|
};
|
|
61225
61261
|
for (var _i = 0, _b = typeParameter.symbol.declarations; _i < _b.length; _i++) {
|
|
61226
61262
|
var declaration = _b[_i];
|
|
61227
|
-
|
|
61263
|
+
_loop_16(declaration);
|
|
61228
61264
|
}
|
|
61229
61265
|
}
|
|
61230
61266
|
return inferences && getIntersectionType(inferences);
|
|
@@ -61881,6 +61917,9 @@ var ts;
|
|
|
61881
61917
|
function getGlobalBigIntType() {
|
|
61882
61918
|
return (deferredGlobalBigIntType || (deferredGlobalBigIntType = getGlobalType("BigInt", /*arity*/ 0, /*reportErrors*/ false))) || emptyObjectType;
|
|
61883
61919
|
}
|
|
61920
|
+
function getGlobalNaNSymbol() {
|
|
61921
|
+
return (deferredGlobalNaNSymbol || (deferredGlobalNaNSymbol = getGlobalValueSymbol("NaN", /*reportErrors*/ false)));
|
|
61922
|
+
}
|
|
61884
61923
|
function getGlobalRecordSymbol() {
|
|
61885
61924
|
deferredGlobalRecordSymbol || (deferredGlobalRecordSymbol = getGlobalTypeAliasSymbol("Record", /*arity*/ 2, /*reportErrors*/ true) || unknownSymbol);
|
|
61886
61925
|
return deferredGlobalRecordSymbol === unknownSymbol ? undefined : deferredGlobalRecordSymbol;
|
|
@@ -62121,7 +62160,7 @@ var ts;
|
|
|
62121
62160
|
var lastRequiredIndex = -1;
|
|
62122
62161
|
var firstRestIndex = -1;
|
|
62123
62162
|
var lastOptionalOrRestIndex = -1;
|
|
62124
|
-
var
|
|
62163
|
+
var _loop_17 = function (i) {
|
|
62125
62164
|
var type = elementTypes[i];
|
|
62126
62165
|
var flags = target.elementFlags[i];
|
|
62127
62166
|
if (flags & 8 /* ElementFlags.Variadic */) {
|
|
@@ -62151,9 +62190,9 @@ var ts;
|
|
|
62151
62190
|
}
|
|
62152
62191
|
};
|
|
62153
62192
|
for (var i = 0; i < elementTypes.length; i++) {
|
|
62154
|
-
var
|
|
62155
|
-
if (typeof
|
|
62156
|
-
return
|
|
62193
|
+
var state_5 = _loop_17(i);
|
|
62194
|
+
if (typeof state_5 === "object")
|
|
62195
|
+
return state_5.value;
|
|
62157
62196
|
}
|
|
62158
62197
|
// Turn optional elements preceding the last required element into required elements
|
|
62159
62198
|
for (var i = 0; i < lastRequiredIndex; i++) {
|
|
@@ -62181,7 +62220,7 @@ var ts;
|
|
|
62181
62220
|
if (flags & (2 /* ElementFlags.Optional */ | 4 /* ElementFlags.Rest */)) {
|
|
62182
62221
|
lastOptionalOrRestIndex = expandedFlags.length;
|
|
62183
62222
|
}
|
|
62184
|
-
expandedTypes.push(type);
|
|
62223
|
+
expandedTypes.push(flags & 2 /* ElementFlags.Optional */ ? addOptionality(type, /*isProperty*/ true) : type);
|
|
62185
62224
|
expandedFlags.push(flags);
|
|
62186
62225
|
if (expandedDeclarations && declaration) {
|
|
62187
62226
|
expandedDeclarations.push(declaration);
|
|
@@ -62347,7 +62386,7 @@ var ts;
|
|
|
62347
62386
|
var templates = ts.filter(types, isPatternLiteralType);
|
|
62348
62387
|
if (templates.length) {
|
|
62349
62388
|
var i = types.length;
|
|
62350
|
-
var
|
|
62389
|
+
var _loop_18 = function () {
|
|
62351
62390
|
i--;
|
|
62352
62391
|
var t = types[i];
|
|
62353
62392
|
if (t.flags & 128 /* TypeFlags.StringLiteral */ && ts.some(templates, function (template) { return isTypeMatchedByTemplateLiteralType(t, template); })) {
|
|
@@ -62355,7 +62394,7 @@ var ts;
|
|
|
62355
62394
|
}
|
|
62356
62395
|
};
|
|
62357
62396
|
while (i > 0) {
|
|
62358
|
-
|
|
62397
|
+
_loop_18();
|
|
62359
62398
|
}
|
|
62360
62399
|
}
|
|
62361
62400
|
}
|
|
@@ -62432,14 +62471,14 @@ var ts;
|
|
|
62432
62471
|
var namedUnions = [];
|
|
62433
62472
|
addNamedUnions(namedUnions, types);
|
|
62434
62473
|
var reducedTypes = [];
|
|
62435
|
-
var
|
|
62474
|
+
var _loop_19 = function (t) {
|
|
62436
62475
|
if (!ts.some(namedUnions, function (union) { return containsType(union.types, t); })) {
|
|
62437
62476
|
reducedTypes.push(t);
|
|
62438
62477
|
}
|
|
62439
62478
|
};
|
|
62440
62479
|
for (var _i = 0, typeSet_1 = typeSet; _i < typeSet_1.length; _i++) {
|
|
62441
62480
|
var t = typeSet_1[_i];
|
|
62442
|
-
|
|
62481
|
+
_loop_19(t);
|
|
62443
62482
|
}
|
|
62444
62483
|
if (!aliasSymbol && namedUnions.length === 1 && reducedTypes.length === 0) {
|
|
62445
62484
|
return namedUnions[0];
|
|
@@ -63669,7 +63708,7 @@ var ts;
|
|
|
63669
63708
|
var result;
|
|
63670
63709
|
var extraTypes;
|
|
63671
63710
|
var tailCount = 0;
|
|
63672
|
-
var
|
|
63711
|
+
var _loop_20 = function () {
|
|
63673
63712
|
if (tailCount === 1000) {
|
|
63674
63713
|
error(currentNode, ts.Diagnostics.Type_instantiation_is_excessively_deep_and_possibly_infinite);
|
|
63675
63714
|
result = errorType;
|
|
@@ -63790,10 +63829,10 @@ var ts;
|
|
|
63790
63829
|
// another (or, through recursion, possibly the same) conditional type. In the potentially tail-recursive
|
|
63791
63830
|
// cases we increment the tail recursion counter and stop after 1000 iterations.
|
|
63792
63831
|
while (true) {
|
|
63793
|
-
var
|
|
63794
|
-
if (typeof
|
|
63795
|
-
return
|
|
63796
|
-
if (
|
|
63832
|
+
var state_6 = _loop_20();
|
|
63833
|
+
if (typeof state_6 === "object")
|
|
63834
|
+
return state_6.value;
|
|
63835
|
+
if (state_6 === "break")
|
|
63797
63836
|
break;
|
|
63798
63837
|
}
|
|
63799
63838
|
return extraTypes ? getUnionType(ts.append(extraTypes, result)) : result;
|
|
@@ -66408,7 +66447,7 @@ var ts;
|
|
|
66408
66447
|
reducedTarget = findMatchingDiscriminantType(source, target, isRelatedTo) || filterPrimitivesIfContainsNonPrimitive(target);
|
|
66409
66448
|
checkTypes = reducedTarget.flags & 1048576 /* TypeFlags.Union */ ? reducedTarget.types : [reducedTarget];
|
|
66410
66449
|
}
|
|
66411
|
-
var
|
|
66450
|
+
var _loop_21 = function (prop) {
|
|
66412
66451
|
if (shouldCheckAsExcessProperty(prop, source.symbol) && !isIgnoredJsxProperty(source, prop)) {
|
|
66413
66452
|
if (!isKnownProperty(reducedTarget, prop.escapedName, isComparingJsxAttributes)) {
|
|
66414
66453
|
if (reportErrors) {
|
|
@@ -66471,9 +66510,9 @@ var ts;
|
|
|
66471
66510
|
};
|
|
66472
66511
|
for (var _i = 0, _b = getPropertiesOfType(source); _i < _b.length; _i++) {
|
|
66473
66512
|
var prop = _b[_i];
|
|
66474
|
-
var
|
|
66475
|
-
if (typeof
|
|
66476
|
-
return
|
|
66513
|
+
var state_7 = _loop_21(prop);
|
|
66514
|
+
if (typeof state_7 === "object")
|
|
66515
|
+
return state_7.value;
|
|
66477
66516
|
}
|
|
66478
66517
|
return false;
|
|
66479
66518
|
}
|
|
@@ -67464,11 +67503,11 @@ var ts;
|
|
|
67464
67503
|
// constituents of 'target'. If any combination does not have a match then 'source' is not relatable.
|
|
67465
67504
|
var discriminantCombinations = ts.cartesianProduct(sourceDiscriminantTypes);
|
|
67466
67505
|
var matchingTypes = [];
|
|
67467
|
-
var
|
|
67506
|
+
var _loop_22 = function (combination) {
|
|
67468
67507
|
var hasMatch = false;
|
|
67469
67508
|
outer: for (var _c = 0, _d = target.types; _c < _d.length; _c++) {
|
|
67470
67509
|
var type = _d[_c];
|
|
67471
|
-
var
|
|
67510
|
+
var _loop_23 = function (i) {
|
|
67472
67511
|
var sourceProperty = sourcePropertiesFiltered[i];
|
|
67473
67512
|
var targetProperty = getPropertyOfType(type, sourceProperty.escapedName);
|
|
67474
67513
|
if (!targetProperty)
|
|
@@ -67484,8 +67523,8 @@ var ts;
|
|
|
67484
67523
|
}
|
|
67485
67524
|
};
|
|
67486
67525
|
for (var i = 0; i < sourcePropertiesFiltered.length; i++) {
|
|
67487
|
-
var
|
|
67488
|
-
switch (
|
|
67526
|
+
var state_9 = _loop_23(i);
|
|
67527
|
+
switch (state_9) {
|
|
67489
67528
|
case "continue-outer": continue outer;
|
|
67490
67529
|
}
|
|
67491
67530
|
}
|
|
@@ -67498,9 +67537,9 @@ var ts;
|
|
|
67498
67537
|
};
|
|
67499
67538
|
for (var _a = 0, discriminantCombinations_1 = discriminantCombinations; _a < discriminantCombinations_1.length; _a++) {
|
|
67500
67539
|
var combination = discriminantCombinations_1[_a];
|
|
67501
|
-
var
|
|
67502
|
-
if (typeof
|
|
67503
|
-
return
|
|
67540
|
+
var state_8 = _loop_22(combination);
|
|
67541
|
+
if (typeof state_8 === "object")
|
|
67542
|
+
return state_8.value;
|
|
67504
67543
|
}
|
|
67505
67544
|
// Compare the remaining non-discriminant properties of each match.
|
|
67506
67545
|
var result = -1 /* Ternary.True */;
|
|
@@ -68205,7 +68244,7 @@ var ts;
|
|
|
68205
68244
|
ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.push("checkTypes" /* tracing.Phase.CheckTypes */, "getVariancesWorker", { arity: typeParameters.length, id: getTypeId(getDeclaredTypeOfSymbol(symbol)) });
|
|
68206
68245
|
links.variances = ts.emptyArray;
|
|
68207
68246
|
var variances = [];
|
|
68208
|
-
var
|
|
68247
|
+
var _loop_24 = function (tp) {
|
|
68209
68248
|
var modifiers = getVarianceModifiers(tp);
|
|
68210
68249
|
var variance = modifiers & 65536 /* ModifierFlags.Out */ ?
|
|
68211
68250
|
modifiers & 32768 /* ModifierFlags.In */ ? 0 /* VarianceFlags.Invariant */ : 1 /* VarianceFlags.Covariant */ :
|
|
@@ -68243,7 +68282,7 @@ var ts;
|
|
|
68243
68282
|
};
|
|
68244
68283
|
for (var _i = 0, typeParameters_2 = typeParameters; _i < typeParameters_2.length; _i++) {
|
|
68245
68284
|
var tp = typeParameters_2[_i];
|
|
68246
|
-
|
|
68285
|
+
_loop_24(tp);
|
|
68247
68286
|
}
|
|
68248
68287
|
links.variances = variances;
|
|
68249
68288
|
ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.pop({ variances: variances.map(ts.Debug.formatVariance) });
|
|
@@ -68835,7 +68874,8 @@ var ts;
|
|
|
68835
68874
|
function getOptionalType(type, isProperty) {
|
|
68836
68875
|
if (isProperty === void 0) { isProperty = false; }
|
|
68837
68876
|
ts.Debug.assert(strictNullChecks);
|
|
68838
|
-
|
|
68877
|
+
var missingOrUndefined = isProperty ? missingType : undefinedType;
|
|
68878
|
+
return type.flags & 32768 /* TypeFlags.Undefined */ || type.flags & 1048576 /* TypeFlags.Union */ && type.types[0] === missingOrUndefined ? type : getUnionType([type, missingOrUndefined]);
|
|
68839
68879
|
}
|
|
68840
68880
|
function getGlobalNonNullableTypeInstantiation(type) {
|
|
68841
68881
|
if (!deferredGlobalNonNullableTypeAlias) {
|
|
@@ -70200,7 +70240,7 @@ var ts;
|
|
|
70200
70240
|
// upon instantiation, would collapse all the placeholders to just 'string', and an assignment check might
|
|
70201
70241
|
// succeed. That would be a pointless and confusing outcome.
|
|
70202
70242
|
if (matches || ts.every(target.texts, function (s) { return s.length === 0; })) {
|
|
70203
|
-
var
|
|
70243
|
+
var _loop_25 = function (i) {
|
|
70204
70244
|
var source_1 = matches ? matches[i] : neverType;
|
|
70205
70245
|
var target_3 = types[i];
|
|
70206
70246
|
// If we are inferring from a string literal type to a type variable whose constraint includes one of the
|
|
@@ -70250,7 +70290,7 @@ var ts;
|
|
|
70250
70290
|
inferFromTypes(source_1, target_3);
|
|
70251
70291
|
};
|
|
70252
70292
|
for (var i = 0; i < types.length; i++) {
|
|
70253
|
-
|
|
70293
|
+
_loop_25(i);
|
|
70254
70294
|
}
|
|
70255
70295
|
}
|
|
70256
70296
|
}
|
|
@@ -70714,7 +70754,7 @@ var ts;
|
|
|
70714
70754
|
return name;
|
|
70715
70755
|
}
|
|
70716
70756
|
}
|
|
70717
|
-
if (ts.hasOnlyExpressionInitializer(declaration)) {
|
|
70757
|
+
if (ts.hasOnlyExpressionInitializer(declaration) && isBlockScopedNameDeclaredBeforeUse(declaration, node.argumentExpression)) {
|
|
70718
70758
|
var initializer = ts.getEffectiveInitializer(declaration);
|
|
70719
70759
|
return initializer && tryGetNameFromType(getTypeOfExpression(initializer));
|
|
70720
70760
|
}
|
|
@@ -70774,7 +70814,7 @@ var ts;
|
|
|
70774
70814
|
function mapTypesByKeyProperty(types, name) {
|
|
70775
70815
|
var map = new ts.Map();
|
|
70776
70816
|
var count = 0;
|
|
70777
|
-
var
|
|
70817
|
+
var _loop_26 = function (type) {
|
|
70778
70818
|
if (type.flags & (524288 /* TypeFlags.Object */ | 2097152 /* TypeFlags.Intersection */ | 58982400 /* TypeFlags.InstantiableNonPrimitive */)) {
|
|
70779
70819
|
var discriminant = getTypeOfPropertyOfType(type, name);
|
|
70780
70820
|
if (discriminant) {
|
|
@@ -70800,9 +70840,9 @@ var ts;
|
|
|
70800
70840
|
};
|
|
70801
70841
|
for (var _i = 0, types_15 = types; _i < types_15.length; _i++) {
|
|
70802
70842
|
var type = types_15[_i];
|
|
70803
|
-
var
|
|
70804
|
-
if (typeof
|
|
70805
|
-
return
|
|
70843
|
+
var state_10 = _loop_26(type);
|
|
70844
|
+
if (typeof state_10 === "object")
|
|
70845
|
+
return state_10.value;
|
|
70806
70846
|
}
|
|
70807
70847
|
return count >= 10 && count * 2 >= types.length ? map : undefined;
|
|
70808
70848
|
}
|
|
@@ -77257,7 +77297,7 @@ var ts;
|
|
|
77257
77297
|
if (spreadIndex >= 0) {
|
|
77258
77298
|
// Create synthetic arguments from spreads of tuple types.
|
|
77259
77299
|
var effectiveArgs_1 = args.slice(0, spreadIndex);
|
|
77260
|
-
var
|
|
77300
|
+
var _loop_27 = function (i) {
|
|
77261
77301
|
var arg = args[i];
|
|
77262
77302
|
// We can call checkExpressionCached because spread expressions never have a contextual type.
|
|
77263
77303
|
var spreadType = arg.kind === 227 /* SyntaxKind.SpreadElement */ && (flowLoopCount ? checkExpression(arg.expression) : checkExpressionCached(arg.expression));
|
|
@@ -77274,7 +77314,7 @@ var ts;
|
|
|
77274
77314
|
}
|
|
77275
77315
|
};
|
|
77276
77316
|
for (var i = spreadIndex; i < args.length; i++) {
|
|
77277
|
-
|
|
77317
|
+
_loop_27(i);
|
|
77278
77318
|
}
|
|
77279
77319
|
return effectiveArgs_1;
|
|
77280
77320
|
}
|
|
@@ -77603,7 +77643,7 @@ var ts;
|
|
|
77603
77643
|
var min_3 = Number.MAX_VALUE;
|
|
77604
77644
|
var minIndex = 0;
|
|
77605
77645
|
var i_1 = 0;
|
|
77606
|
-
var
|
|
77646
|
+
var _loop_28 = function (c) {
|
|
77607
77647
|
var chain_2 = function () { return ts.chainDiagnosticMessages(/*details*/ undefined, ts.Diagnostics.Overload_0_of_1_2_gave_the_following_error, i_1 + 1, candidates.length, signatureToString(c)); };
|
|
77608
77648
|
var diags_2 = getSignatureApplicabilityError(node, args, c, assignableRelation, 0 /* CheckMode.Normal */, /*reportErrors*/ true, chain_2);
|
|
77609
77649
|
if (diags_2) {
|
|
@@ -77621,7 +77661,7 @@ var ts;
|
|
|
77621
77661
|
};
|
|
77622
77662
|
for (var _a = 0, candidatesForArgumentError_1 = candidatesForArgumentError; _a < candidatesForArgumentError_1.length; _a++) {
|
|
77623
77663
|
var c = candidatesForArgumentError_1[_a];
|
|
77624
|
-
|
|
77664
|
+
_loop_28(c);
|
|
77625
77665
|
}
|
|
77626
77666
|
var diags_3 = max > 1 ? allDiagnostics[minIndex] : ts.flatten(allDiagnostics);
|
|
77627
77667
|
ts.Debug.assert(diags_3.length > 0, "No errors reported for 3 or fewer overload signatures");
|
|
@@ -77779,7 +77819,7 @@ var ts;
|
|
|
77779
77819
|
}
|
|
77780
77820
|
var _a = ts.minAndMax(candidates, getNumNonRestParameters), minArgumentCount = _a.min, maxNonRestParam = _a.max;
|
|
77781
77821
|
var parameters = [];
|
|
77782
|
-
var
|
|
77822
|
+
var _loop_29 = function (i) {
|
|
77783
77823
|
var symbols = ts.mapDefined(candidates, function (s) { return signatureHasRestParameter(s) ?
|
|
77784
77824
|
i < s.parameters.length - 1 ? s.parameters[i] : ts.last(s.parameters) :
|
|
77785
77825
|
i < s.parameters.length ? s.parameters[i] : undefined; });
|
|
@@ -77787,7 +77827,7 @@ var ts;
|
|
|
77787
77827
|
parameters.push(createCombinedSymbolFromTypes(symbols, ts.mapDefined(candidates, function (candidate) { return tryGetTypeAtPosition(candidate, i); })));
|
|
77788
77828
|
};
|
|
77789
77829
|
for (var i = 0; i < maxNonRestParam; i++) {
|
|
77790
|
-
|
|
77830
|
+
_loop_29(i);
|
|
77791
77831
|
}
|
|
77792
77832
|
var restParameterSymbols = ts.mapDefined(candidates, function (c) { return signatureHasRestParameter(c) ? ts.last(c.parameters) : undefined; });
|
|
77793
77833
|
var flags = 0 /* SignatureFlags.None */;
|
|
@@ -80569,6 +80609,7 @@ var ts;
|
|
|
80569
80609
|
var eqType = operator === 34 /* SyntaxKind.EqualsEqualsToken */ || operator === 36 /* SyntaxKind.EqualsEqualsEqualsToken */;
|
|
80570
80610
|
error(errorNode, ts.Diagnostics.This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value, eqType ? "false" : "true");
|
|
80571
80611
|
}
|
|
80612
|
+
checkNaNEquality(errorNode, operator, left, right);
|
|
80572
80613
|
reportOperatorErrorUnless(function (left, right) { return isTypeEqualityComparableTo(left, right) || isTypeEqualityComparableTo(right, left); });
|
|
80573
80614
|
return booleanType;
|
|
80574
80615
|
case 102 /* SyntaxKind.InstanceOfKeyword */:
|
|
@@ -80774,6 +80815,26 @@ var ts;
|
|
|
80774
80815
|
return undefined;
|
|
80775
80816
|
}
|
|
80776
80817
|
}
|
|
80818
|
+
function checkNaNEquality(errorNode, operator, left, right) {
|
|
80819
|
+
var isLeftNaN = isGlobalNaN(ts.skipParentheses(left));
|
|
80820
|
+
var isRightNaN = isGlobalNaN(ts.skipParentheses(right));
|
|
80821
|
+
if (isLeftNaN || isRightNaN) {
|
|
80822
|
+
var err = error(errorNode, ts.Diagnostics.This_condition_will_always_return_0, ts.tokenToString(operator === 36 /* SyntaxKind.EqualsEqualsEqualsToken */ || operator === 34 /* SyntaxKind.EqualsEqualsToken */ ? 95 /* SyntaxKind.FalseKeyword */ : 110 /* SyntaxKind.TrueKeyword */));
|
|
80823
|
+
if (isLeftNaN && isRightNaN)
|
|
80824
|
+
return;
|
|
80825
|
+
var operatorString = operator === 37 /* SyntaxKind.ExclamationEqualsEqualsToken */ || operator === 35 /* SyntaxKind.ExclamationEqualsToken */ ? ts.tokenToString(53 /* SyntaxKind.ExclamationToken */) : "";
|
|
80826
|
+
var location = isLeftNaN ? right : left;
|
|
80827
|
+
var expression = ts.skipParentheses(location);
|
|
80828
|
+
ts.addRelatedInfo(err, ts.createDiagnosticForNode(location, ts.Diagnostics.Did_you_mean_0, "".concat(operatorString, "Number.isNaN(").concat(ts.isEntityNameExpression(expression) ? ts.entityNameToString(expression) : "...", ")")));
|
|
80829
|
+
}
|
|
80830
|
+
}
|
|
80831
|
+
function isGlobalNaN(expr) {
|
|
80832
|
+
if (ts.isIdentifier(expr) && expr.escapedText === "NaN") {
|
|
80833
|
+
var globalNaNSymbol = getGlobalNaNSymbol();
|
|
80834
|
+
return !!globalNaNSymbol && globalNaNSymbol === getResolvedSymbol(expr);
|
|
80835
|
+
}
|
|
80836
|
+
return false;
|
|
80837
|
+
}
|
|
80777
80838
|
}
|
|
80778
80839
|
function getBaseTypesIfUnrelated(leftType, rightType, isRelated) {
|
|
80779
80840
|
var effectiveLeft = leftType;
|
|
@@ -81811,7 +81872,7 @@ var ts;
|
|
|
81811
81872
|
var indexSymbol = getIndexSymbol(getSymbolOfNode(node));
|
|
81812
81873
|
if (indexSymbol === null || indexSymbol === void 0 ? void 0 : indexSymbol.declarations) {
|
|
81813
81874
|
var indexSignatureMap_1 = new ts.Map();
|
|
81814
|
-
var
|
|
81875
|
+
var _loop_30 = function (declaration) {
|
|
81815
81876
|
if (declaration.parameters.length === 1 && declaration.parameters[0].type) {
|
|
81816
81877
|
forEachType(getTypeFromTypeNode(declaration.parameters[0].type), function (type) {
|
|
81817
81878
|
var entry = indexSignatureMap_1.get(getTypeId(type));
|
|
@@ -81826,7 +81887,7 @@ var ts;
|
|
|
81826
81887
|
};
|
|
81827
81888
|
for (var _i = 0, _a = indexSymbol.declarations; _i < _a.length; _i++) {
|
|
81828
81889
|
var declaration = _a[_i];
|
|
81829
|
-
|
|
81890
|
+
_loop_30(declaration);
|
|
81830
81891
|
}
|
|
81831
81892
|
indexSignatureMap_1.forEach(function (entry) {
|
|
81832
81893
|
if (entry.declarations.length > 1) {
|
|
@@ -85426,7 +85487,7 @@ var ts;
|
|
|
85426
85487
|
var propDeclaration = declaration && declaration.kind === 223 /* SyntaxKind.BinaryExpression */ ||
|
|
85427
85488
|
name && name.kind === 164 /* SyntaxKind.ComputedPropertyName */ ? declaration : undefined;
|
|
85428
85489
|
var localPropDeclaration = getParentOfSymbol(prop) === type.symbol ? declaration : undefined;
|
|
85429
|
-
var
|
|
85490
|
+
var _loop_31 = function (info) {
|
|
85430
85491
|
var localIndexDeclaration = info.declaration && getParentOfSymbol(getSymbolOfNode(info.declaration)) === type.symbol ? info.declaration : undefined;
|
|
85431
85492
|
// We check only when (a) the property is declared in the containing type, or (b) the applicable index signature is declared
|
|
85432
85493
|
// in the containing type, or (c) the containing type is an interface and no base interface contains both the property and
|
|
@@ -85443,7 +85504,7 @@ var ts;
|
|
|
85443
85504
|
};
|
|
85444
85505
|
for (var _i = 0, indexInfos_9 = indexInfos; _i < indexInfos_9.length; _i++) {
|
|
85445
85506
|
var info = indexInfos_9[_i];
|
|
85446
|
-
|
|
85507
|
+
_loop_31(info);
|
|
85447
85508
|
}
|
|
85448
85509
|
}
|
|
85449
85510
|
function checkIndexConstraintForIndexSignature(type, checkInfo) {
|
|
@@ -85451,7 +85512,7 @@ var ts;
|
|
|
85451
85512
|
var indexInfos = getApplicableIndexInfos(type, checkInfo.keyType);
|
|
85452
85513
|
var interfaceDeclaration = ts.getObjectFlags(type) & 2 /* ObjectFlags.Interface */ ? ts.getDeclarationOfKind(type.symbol, 261 /* SyntaxKind.InterfaceDeclaration */) : undefined;
|
|
85453
85514
|
var localCheckDeclaration = declaration && getParentOfSymbol(getSymbolOfNode(declaration)) === type.symbol ? declaration : undefined;
|
|
85454
|
-
var
|
|
85515
|
+
var _loop_32 = function (info) {
|
|
85455
85516
|
if (info === checkInfo)
|
|
85456
85517
|
return "continue";
|
|
85457
85518
|
var localIndexDeclaration = info.declaration && getParentOfSymbol(getSymbolOfNode(info.declaration)) === type.symbol ? info.declaration : undefined;
|
|
@@ -85466,7 +85527,7 @@ var ts;
|
|
|
85466
85527
|
};
|
|
85467
85528
|
for (var _i = 0, indexInfos_10 = indexInfos; _i < indexInfos_10.length; _i++) {
|
|
85468
85529
|
var info = indexInfos_10[_i];
|
|
85469
|
-
|
|
85530
|
+
_loop_32(info);
|
|
85470
85531
|
}
|
|
85471
85532
|
}
|
|
85472
85533
|
function checkTypeNameIsReserved(name, message) {
|
|
@@ -85786,7 +85847,7 @@ var ts;
|
|
|
85786
85847
|
var baseTypes = baseTypeNode && getBaseTypes(type);
|
|
85787
85848
|
var baseWithThis = (baseTypes === null || baseTypes === void 0 ? void 0 : baseTypes.length) ? getTypeWithThisArgument(ts.first(baseTypes), type.thisType) : undefined;
|
|
85788
85849
|
var baseStaticType = getBaseConstructorTypeOfClass(type);
|
|
85789
|
-
var
|
|
85850
|
+
var _loop_33 = function (member) {
|
|
85790
85851
|
if (ts.hasAmbientModifier(member)) {
|
|
85791
85852
|
return "continue";
|
|
85792
85853
|
}
|
|
@@ -85803,7 +85864,7 @@ var ts;
|
|
|
85803
85864
|
};
|
|
85804
85865
|
for (var _i = 0, _a = node.members; _i < _a.length; _i++) {
|
|
85805
85866
|
var member = _a[_i];
|
|
85806
|
-
|
|
85867
|
+
_loop_33(member);
|
|
85807
85868
|
}
|
|
85808
85869
|
}
|
|
85809
85870
|
/**
|
|
@@ -85891,7 +85952,7 @@ var ts;
|
|
|
85891
85952
|
function issueMemberSpecificError(node, typeWithThis, baseWithThis, broadDiag) {
|
|
85892
85953
|
// iterate over all implemented properties and issue errors on each one which isn't compatible, rather than the class as a whole, if possible
|
|
85893
85954
|
var issuedMemberError = false;
|
|
85894
|
-
var
|
|
85955
|
+
var _loop_34 = function (member) {
|
|
85895
85956
|
if (ts.isStatic(member)) {
|
|
85896
85957
|
return "continue";
|
|
85897
85958
|
}
|
|
@@ -85910,7 +85971,7 @@ var ts;
|
|
|
85910
85971
|
};
|
|
85911
85972
|
for (var _i = 0, _a = node.members; _i < _a.length; _i++) {
|
|
85912
85973
|
var member = _a[_i];
|
|
85913
|
-
|
|
85974
|
+
_loop_34(member);
|
|
85914
85975
|
}
|
|
85915
85976
|
if (!issuedMemberError) {
|
|
85916
85977
|
// check again with diagnostics to generate a less-specific error
|
|
@@ -85981,7 +86042,7 @@ var ts;
|
|
|
85981
86042
|
var _a, _b, _c, _d;
|
|
85982
86043
|
// NOTE: assignability is checked in checkClassDeclaration
|
|
85983
86044
|
var baseProperties = getPropertiesOfType(baseType);
|
|
85984
|
-
var
|
|
86045
|
+
var _loop_35 = function (baseProperty) {
|
|
85985
86046
|
var base = getTargetSymbol(baseProperty);
|
|
85986
86047
|
if (base.flags & 4194304 /* SymbolFlags.Prototype */) {
|
|
85987
86048
|
return "continue";
|
|
@@ -86091,8 +86152,8 @@ var ts;
|
|
|
86091
86152
|
};
|
|
86092
86153
|
basePropertyCheck: for (var _i = 0, baseProperties_1 = baseProperties; _i < baseProperties_1.length; _i++) {
|
|
86093
86154
|
var baseProperty = baseProperties_1[_i];
|
|
86094
|
-
var
|
|
86095
|
-
switch (
|
|
86155
|
+
var state_11 = _loop_35(baseProperty);
|
|
86156
|
+
switch (state_11) {
|
|
86096
86157
|
case "continue-basePropertyCheck": continue basePropertyCheck;
|
|
86097
86158
|
}
|
|
86098
86159
|
}
|
|
@@ -115333,6 +115394,7 @@ var ts;
|
|
|
115333
115394
|
writeTrailingSemicolon();
|
|
115334
115395
|
}
|
|
115335
115396
|
function emitExportDeclaration(node) {
|
|
115397
|
+
emitModifiers(node, node.modifiers);
|
|
115336
115398
|
var nextPos = emitTokenWithComment(93 /* SyntaxKind.ExportKeyword */, node.pos, writeKeyword, node);
|
|
115337
115399
|
writeSpace();
|
|
115338
115400
|
if (node.isTypeOnly) {
|
|
@@ -123816,17 +123878,13 @@ var ts;
|
|
|
123816
123878
|
var value = filesWithInvalidatedNonRelativeUnresolvedImports.get(path);
|
|
123817
123879
|
return !!value && !!value.length;
|
|
123818
123880
|
}
|
|
123819
|
-
function createHasInvalidatedResolution(
|
|
123881
|
+
function createHasInvalidatedResolution(userProvidedHasInvalidatedResolution) {
|
|
123820
123882
|
// Ensure pending resolutions are applied
|
|
123821
123883
|
invalidateResolutionsOfFailedLookupLocations();
|
|
123822
|
-
if (forceAllFilesAsInvalidated) {
|
|
123823
|
-
// Any file asked would have invalidated resolution
|
|
123824
|
-
filesWithInvalidatedResolutions = undefined;
|
|
123825
|
-
return ts.returnTrue;
|
|
123826
|
-
}
|
|
123827
123884
|
var collected = filesWithInvalidatedResolutions;
|
|
123828
123885
|
filesWithInvalidatedResolutions = undefined;
|
|
123829
|
-
return function (path) { return (
|
|
123886
|
+
return function (path) { return (userProvidedHasInvalidatedResolution === null || userProvidedHasInvalidatedResolution === void 0 ? void 0 : userProvidedHasInvalidatedResolution(path)) ||
|
|
123887
|
+
!!(collected === null || collected === void 0 ? void 0 : collected.has(path)) ||
|
|
123830
123888
|
isFileWithInvalidatedNonRelativeUnresolvedImports(path); };
|
|
123831
123889
|
}
|
|
123832
123890
|
function startCachingPerDirectoryResolution() {
|
|
@@ -124935,7 +124993,7 @@ var ts;
|
|
|
124935
124993
|
});
|
|
124936
124994
|
// Sort by paths closest to importing file Name directory
|
|
124937
124995
|
var sortedPaths = [];
|
|
124938
|
-
var
|
|
124996
|
+
var _loop_36 = function (directory) {
|
|
124939
124997
|
var directoryStart = ts.ensureTrailingDirectorySeparator(directory);
|
|
124940
124998
|
var pathsInDirectory;
|
|
124941
124999
|
allFileNames.forEach(function (_a, fileName) {
|
|
@@ -124959,9 +125017,9 @@ var ts;
|
|
|
124959
125017
|
};
|
|
124960
125018
|
var out_directory_1;
|
|
124961
125019
|
for (var directory = ts.getDirectoryPath(importingFileName); allFileNames.size !== 0;) {
|
|
124962
|
-
var
|
|
125020
|
+
var state_12 = _loop_36(directory);
|
|
124963
125021
|
directory = out_directory_1;
|
|
124964
|
-
if (
|
|
125022
|
+
if (state_12 === "break")
|
|
124965
125023
|
break;
|
|
124966
125024
|
}
|
|
124967
125025
|
if (allFileNames.size) {
|
|
@@ -125030,7 +125088,7 @@ var ts;
|
|
|
125030
125088
|
}
|
|
125031
125089
|
function tryGetModuleNameFromPaths(relativeToBaseUrl, paths, allowedEndings, host, compilerOptions) {
|
|
125032
125090
|
for (var key in paths) {
|
|
125033
|
-
var
|
|
125091
|
+
var _loop_37 = function (patternText_1) {
|
|
125034
125092
|
var pattern = ts.normalizePath(patternText_1);
|
|
125035
125093
|
var indexOfStar = pattern.indexOf("*");
|
|
125036
125094
|
// In module resolution, if `pattern` itself has an extension, a file with that extension is looked up directly,
|
|
@@ -125097,9 +125155,9 @@ var ts;
|
|
|
125097
125155
|
};
|
|
125098
125156
|
for (var _i = 0, _a = paths[key]; _i < _a.length; _i++) {
|
|
125099
125157
|
var patternText_1 = _a[_i];
|
|
125100
|
-
var
|
|
125101
|
-
if (typeof
|
|
125102
|
-
return
|
|
125158
|
+
var state_13 = _loop_37(patternText_1);
|
|
125159
|
+
if (typeof state_13 === "object")
|
|
125160
|
+
return state_13.value;
|
|
125103
125161
|
}
|
|
125104
125162
|
}
|
|
125105
125163
|
function validateEnding(_a) {
|
|
@@ -126206,6 +126264,7 @@ var ts;
|
|
|
126206
126264
|
ts.maybeBind(host, host.getModuleResolutionCache) :
|
|
126207
126265
|
(function () { return resolutionCache.getModuleResolutionCache(); });
|
|
126208
126266
|
var userProvidedResolution = !!host.resolveModuleNames || !!host.resolveTypeReferenceDirectives;
|
|
126267
|
+
var userProvidedHasInvalidatedResolution = ts.maybeBind(host, host.hasInvalidatedResolution) || ts.returnTrue;
|
|
126209
126268
|
builderProgram = readBuilderProgram(compilerOptions, compilerHost);
|
|
126210
126269
|
synchronizeProgram();
|
|
126211
126270
|
// Update the wild card directory watch
|
|
@@ -126272,7 +126331,7 @@ var ts;
|
|
|
126272
126331
|
}
|
|
126273
126332
|
}
|
|
126274
126333
|
// All resolutions are invalid if user provided resolutions
|
|
126275
|
-
var hasInvalidatedResolution = resolutionCache.createHasInvalidatedResolution(userProvidedResolution);
|
|
126334
|
+
var hasInvalidatedResolution = resolutionCache.createHasInvalidatedResolution(userProvidedResolution ? userProvidedHasInvalidatedResolution : undefined);
|
|
126276
126335
|
var _a = ts.changeCompilerHostLikeToUseCache(compilerHost, toPath), originalReadFile = _a.originalReadFile, originalFileExists = _a.originalFileExists, originalDirectoryExists = _a.originalDirectoryExists, originalCreateDirectory = _a.originalCreateDirectory, originalWriteFile = _a.originalWriteFile;
|
|
126277
126336
|
if (ts.isProgramUptoDate(getCurrentProgram(), rootFileNames, compilerOptions, getSourceVersion, function (fileName) { return compilerHost.fileExists(fileName); }, hasInvalidatedResolution, hasChangedAutomaticTypeDirectiveNames, getParsedCommandLine, projectReferences)) {
|
|
126278
126337
|
if (hasChangedConfigFileParsingErrors) {
|