typescript 4.9.0-dev.20220920 → 4.9.0-dev.20220922
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 +168 -87
- package/lib/tsserver.js +347 -145
- package/lib/tsserverlibrary.js +347 -145
- package/lib/typescript.js +347 -145
- package/lib/typescriptServices.js +347 -145
- package/lib/typingsInstaller.js +177 -91
- 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-dev.
|
|
92
|
+
ts.version = "".concat(ts.versionMajorMinor, ".0-dev.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?"),
|
|
@@ -11877,12 +11880,36 @@ var ts;
|
|
|
11877
11880
|
pos++;
|
|
11878
11881
|
return token = 0 /* SyntaxKind.Unknown */;
|
|
11879
11882
|
}
|
|
11880
|
-
|
|
11883
|
+
var charAfterHash = codePointAt(text, pos + 1);
|
|
11884
|
+
if (charAfterHash === 92 /* CharacterCodes.backslash */) {
|
|
11881
11885
|
pos++;
|
|
11882
|
-
|
|
11886
|
+
var extendedCookedChar_1 = peekExtendedUnicodeEscape();
|
|
11887
|
+
if (extendedCookedChar_1 >= 0 && isIdentifierStart(extendedCookedChar_1, languageVersion)) {
|
|
11888
|
+
pos += 3;
|
|
11889
|
+
tokenFlags |= 8 /* TokenFlags.ExtendedUnicodeEscape */;
|
|
11890
|
+
tokenValue = "#" + scanExtendedUnicodeEscape() + scanIdentifierParts();
|
|
11891
|
+
return token = 80 /* SyntaxKind.PrivateIdentifier */;
|
|
11892
|
+
}
|
|
11893
|
+
var cookedChar_1 = peekUnicodeEscape();
|
|
11894
|
+
if (cookedChar_1 >= 0 && isIdentifierStart(cookedChar_1, languageVersion)) {
|
|
11895
|
+
pos += 6;
|
|
11896
|
+
tokenFlags |= 1024 /* TokenFlags.UnicodeEscape */;
|
|
11897
|
+
tokenValue = "#" + String.fromCharCode(cookedChar_1) + scanIdentifierParts();
|
|
11898
|
+
return token = 80 /* SyntaxKind.PrivateIdentifier */;
|
|
11899
|
+
}
|
|
11900
|
+
pos--;
|
|
11901
|
+
}
|
|
11902
|
+
if (isIdentifierStart(charAfterHash, languageVersion)) {
|
|
11903
|
+
pos++;
|
|
11904
|
+
// We're relying on scanIdentifier's behavior and adjusting the token kind after the fact.
|
|
11905
|
+
// Notably absent from this block is the fact that calling a function named "scanIdentifier",
|
|
11906
|
+
// but identifiers don't include '#', and that function doesn't deal with it at all.
|
|
11907
|
+
// This works because 'scanIdentifier' tries to reuse source characters and builds up substrings;
|
|
11908
|
+
// however, it starts at the 'tokenPos' which includes the '#', and will "accidentally" prepend the '#' for us.
|
|
11909
|
+
scanIdentifier(charAfterHash, languageVersion);
|
|
11883
11910
|
}
|
|
11884
11911
|
else {
|
|
11885
|
-
tokenValue =
|
|
11912
|
+
tokenValue = "#";
|
|
11886
11913
|
error(ts.Diagnostics.Invalid_character, pos++, charSize(ch));
|
|
11887
11914
|
}
|
|
11888
11915
|
return token = 80 /* SyntaxKind.PrivateIdentifier */;
|
|
@@ -33120,7 +33147,7 @@ var ts;
|
|
|
33120
33147
|
}
|
|
33121
33148
|
function parsePrivateIdentifier() {
|
|
33122
33149
|
var pos = getNodePos();
|
|
33123
|
-
var node = factory.createPrivateIdentifier(internPrivateIdentifier(scanner.
|
|
33150
|
+
var node = factory.createPrivateIdentifier(internPrivateIdentifier(scanner.getTokenValue()));
|
|
33124
33151
|
nextToken();
|
|
33125
33152
|
return finishNode(node, pos);
|
|
33126
33153
|
}
|
|
@@ -45206,6 +45233,7 @@ var ts;
|
|
|
45206
45233
|
}
|
|
45207
45234
|
}
|
|
45208
45235
|
function loadModuleFromSpecificNodeModulesDirectory(extensions, moduleName, nodeModulesDirectory, nodeModulesDirectoryExists, state, cache, redirectedReference) {
|
|
45236
|
+
var _a;
|
|
45209
45237
|
var candidate = ts.normalizePath(ts.combinePaths(nodeModulesDirectory, moduleName));
|
|
45210
45238
|
// First look for a nested package.json, as in `node_modules/foo/bar/package.json`.
|
|
45211
45239
|
var packageInfo = getPackageJsonInfo(candidate, !nodeModulesDirectoryExists, state);
|
|
@@ -45220,13 +45248,7 @@ var ts;
|
|
|
45220
45248
|
return withPackageId(packageInfo, fromDirectory);
|
|
45221
45249
|
}
|
|
45222
45250
|
}
|
|
45223
|
-
var _a = parsePackageName(moduleName), packageName = _a.packageName, rest = _a.rest;
|
|
45224
45251
|
var loader = function (extensions, candidate, onlyRecordFailures, state) {
|
|
45225
|
-
var _a;
|
|
45226
|
-
// package exports are higher priority than file/directory lookups (and, if there's exports present, blocks them)
|
|
45227
|
-
if (packageInfo && packageInfo.contents.packageJsonContent.exports && state.features & NodeResolutionFeatures.Exports) {
|
|
45228
|
-
return (_a = loadModuleFromExports(packageInfo, extensions, ts.combinePaths(".", rest), state, cache, redirectedReference)) === null || _a === void 0 ? void 0 : _a.value;
|
|
45229
|
-
}
|
|
45230
45252
|
var pathAndExtension = loadModuleFromFile(extensions, candidate, onlyRecordFailures, state) ||
|
|
45231
45253
|
loadNodeModuleFromDirectoryWorker(extensions, candidate, onlyRecordFailures, state, packageInfo && packageInfo.contents.packageJsonContent, packageInfo && packageInfo.contents.versionPaths);
|
|
45232
45254
|
if (!pathAndExtension && packageInfo
|
|
@@ -45239,19 +45261,24 @@ var ts;
|
|
|
45239
45261
|
}
|
|
45240
45262
|
return withPackageId(packageInfo, pathAndExtension);
|
|
45241
45263
|
};
|
|
45242
|
-
|
|
45243
|
-
|
|
45244
|
-
|
|
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.
|
|
45245
45268
|
packageInfo = getPackageJsonInfo(packageDirectory, !nodeModulesDirectoryExists, state);
|
|
45246
|
-
|
|
45247
|
-
|
|
45248
|
-
|
|
45249
|
-
|
|
45250
|
-
|
|
45251
|
-
|
|
45252
|
-
|
|
45253
|
-
|
|
45254
|
-
|
|
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;
|
|
45255
45282
|
}
|
|
45256
45283
|
}
|
|
45257
45284
|
return loader(extensions, candidate, !nodeModulesDirectoryExists, state);
|
|
@@ -49753,6 +49780,7 @@ var ts;
|
|
|
49753
49780
|
var deferredGlobalOmitSymbol;
|
|
49754
49781
|
var deferredGlobalAwaitedSymbol;
|
|
49755
49782
|
var deferredGlobalBigIntType;
|
|
49783
|
+
var deferredGlobalNaNSymbol;
|
|
49756
49784
|
var deferredGlobalRecordSymbol;
|
|
49757
49785
|
var allPotentiallyUnusedIdentifiers = new ts.Map(); // key is file name
|
|
49758
49786
|
var flowLoopStart = 0;
|
|
@@ -55431,6 +55459,7 @@ var ts;
|
|
|
55431
55459
|
&& symbol.escapedName !== "export=" /* InternalSymbolName.ExportEquals */
|
|
55432
55460
|
&& !(symbol.flags & 4194304 /* SymbolFlags.Prototype */)
|
|
55433
55461
|
&& !(symbol.flags & 32 /* SymbolFlags.Class */)
|
|
55462
|
+
&& !(symbol.flags & 8192 /* SymbolFlags.Method */)
|
|
55434
55463
|
&& !isConstMergedWithNSPrintableAsSignatureMerge) {
|
|
55435
55464
|
if (propertyAsAlias) {
|
|
55436
55465
|
var createdExport = serializeMaybeAliasAssignment(symbol);
|
|
@@ -60241,7 +60270,7 @@ var ts;
|
|
|
60241
60270
|
var isInstantiation = (getTargetSymbol(prop) || prop) === (getTargetSymbol(singleProp) || singleProp);
|
|
60242
60271
|
// If the symbols are instances of one another with identical types - consider the symbols
|
|
60243
60272
|
// equivalent and just use the first one, which thus allows us to avoid eliding private
|
|
60244
|
-
// 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
|
|
60245
60274
|
if (isInstantiation && compareProperties(singleProp, prop, function (a, b) { return a === b ? -1 /* Ternary.True */ : 0 /* Ternary.False */; }) === -1 /* Ternary.True */) {
|
|
60246
60275
|
// If we merged instantiations of a generic type, we replicate the symbol parent resetting behavior we used
|
|
60247
60276
|
// to do when we recorded multiple distinct symbols so that we still get, eg, `Array<T>.length` printed
|
|
@@ -60289,7 +60318,11 @@ var ts;
|
|
|
60289
60318
|
}
|
|
60290
60319
|
}
|
|
60291
60320
|
}
|
|
60292
|
-
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())))) {
|
|
60293
60326
|
// No property was found, or, in a union, a property has a private or protected declaration in one
|
|
60294
60327
|
// constituent, but is missing or has a different declaration in another constituent.
|
|
60295
60328
|
return undefined;
|
|
@@ -60391,6 +60424,33 @@ var ts;
|
|
|
60391
60424
|
}
|
|
60392
60425
|
return property;
|
|
60393
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
|
+
}
|
|
60394
60454
|
function getPropertyOfUnionOrIntersectionType(type, name, skipObjectFunctionPropertyAugment) {
|
|
60395
60455
|
var property = getUnionOrIntersectionProperty(type, name, skipObjectFunctionPropertyAugment);
|
|
60396
60456
|
// We need to filter out partial properties in union types
|
|
@@ -61105,7 +61165,7 @@ var ts;
|
|
|
61105
61165
|
function getIndexInfosOfIndexSymbol(indexSymbol) {
|
|
61106
61166
|
if (indexSymbol.declarations) {
|
|
61107
61167
|
var indexInfos_4 = [];
|
|
61108
|
-
var
|
|
61168
|
+
var _loop_15 = function (declaration) {
|
|
61109
61169
|
if (declaration.parameters.length === 1) {
|
|
61110
61170
|
var parameter = declaration.parameters[0];
|
|
61111
61171
|
if (parameter.type) {
|
|
@@ -61119,7 +61179,7 @@ var ts;
|
|
|
61119
61179
|
};
|
|
61120
61180
|
for (var _i = 0, _a = indexSymbol.declarations; _i < _a.length; _i++) {
|
|
61121
61181
|
var declaration = _a[_i];
|
|
61122
|
-
|
|
61182
|
+
_loop_15(declaration);
|
|
61123
61183
|
}
|
|
61124
61184
|
return indexInfos_4;
|
|
61125
61185
|
}
|
|
@@ -61136,7 +61196,7 @@ var ts;
|
|
|
61136
61196
|
var _a;
|
|
61137
61197
|
var inferences;
|
|
61138
61198
|
if ((_a = typeParameter.symbol) === null || _a === void 0 ? void 0 : _a.declarations) {
|
|
61139
|
-
var
|
|
61199
|
+
var _loop_16 = function (declaration) {
|
|
61140
61200
|
if (declaration.parent.kind === 192 /* SyntaxKind.InferType */) {
|
|
61141
61201
|
// When an 'infer T' declaration is immediately contained in a type reference node
|
|
61142
61202
|
// (such as 'Foo<infer T>'), T's constraint is inferred from the constraint of the
|
|
@@ -61200,7 +61260,7 @@ var ts;
|
|
|
61200
61260
|
};
|
|
61201
61261
|
for (var _i = 0, _b = typeParameter.symbol.declarations; _i < _b.length; _i++) {
|
|
61202
61262
|
var declaration = _b[_i];
|
|
61203
|
-
|
|
61263
|
+
_loop_16(declaration);
|
|
61204
61264
|
}
|
|
61205
61265
|
}
|
|
61206
61266
|
return inferences && getIntersectionType(inferences);
|
|
@@ -61857,6 +61917,9 @@ var ts;
|
|
|
61857
61917
|
function getGlobalBigIntType() {
|
|
61858
61918
|
return (deferredGlobalBigIntType || (deferredGlobalBigIntType = getGlobalType("BigInt", /*arity*/ 0, /*reportErrors*/ false))) || emptyObjectType;
|
|
61859
61919
|
}
|
|
61920
|
+
function getGlobalNaNSymbol() {
|
|
61921
|
+
return (deferredGlobalNaNSymbol || (deferredGlobalNaNSymbol = getGlobalValueSymbol("NaN", /*reportErrors*/ false)));
|
|
61922
|
+
}
|
|
61860
61923
|
function getGlobalRecordSymbol() {
|
|
61861
61924
|
deferredGlobalRecordSymbol || (deferredGlobalRecordSymbol = getGlobalTypeAliasSymbol("Record", /*arity*/ 2, /*reportErrors*/ true) || unknownSymbol);
|
|
61862
61925
|
return deferredGlobalRecordSymbol === unknownSymbol ? undefined : deferredGlobalRecordSymbol;
|
|
@@ -62097,7 +62160,7 @@ var ts;
|
|
|
62097
62160
|
var lastRequiredIndex = -1;
|
|
62098
62161
|
var firstRestIndex = -1;
|
|
62099
62162
|
var lastOptionalOrRestIndex = -1;
|
|
62100
|
-
var
|
|
62163
|
+
var _loop_17 = function (i) {
|
|
62101
62164
|
var type = elementTypes[i];
|
|
62102
62165
|
var flags = target.elementFlags[i];
|
|
62103
62166
|
if (flags & 8 /* ElementFlags.Variadic */) {
|
|
@@ -62127,9 +62190,9 @@ var ts;
|
|
|
62127
62190
|
}
|
|
62128
62191
|
};
|
|
62129
62192
|
for (var i = 0; i < elementTypes.length; i++) {
|
|
62130
|
-
var
|
|
62131
|
-
if (typeof
|
|
62132
|
-
return
|
|
62193
|
+
var state_5 = _loop_17(i);
|
|
62194
|
+
if (typeof state_5 === "object")
|
|
62195
|
+
return state_5.value;
|
|
62133
62196
|
}
|
|
62134
62197
|
// Turn optional elements preceding the last required element into required elements
|
|
62135
62198
|
for (var i = 0; i < lastRequiredIndex; i++) {
|
|
@@ -62157,7 +62220,7 @@ var ts;
|
|
|
62157
62220
|
if (flags & (2 /* ElementFlags.Optional */ | 4 /* ElementFlags.Rest */)) {
|
|
62158
62221
|
lastOptionalOrRestIndex = expandedFlags.length;
|
|
62159
62222
|
}
|
|
62160
|
-
expandedTypes.push(type);
|
|
62223
|
+
expandedTypes.push(flags & 2 /* ElementFlags.Optional */ ? addOptionality(type, /*isProperty*/ true) : type);
|
|
62161
62224
|
expandedFlags.push(flags);
|
|
62162
62225
|
if (expandedDeclarations && declaration) {
|
|
62163
62226
|
expandedDeclarations.push(declaration);
|
|
@@ -62323,7 +62386,7 @@ var ts;
|
|
|
62323
62386
|
var templates = ts.filter(types, isPatternLiteralType);
|
|
62324
62387
|
if (templates.length) {
|
|
62325
62388
|
var i = types.length;
|
|
62326
|
-
var
|
|
62389
|
+
var _loop_18 = function () {
|
|
62327
62390
|
i--;
|
|
62328
62391
|
var t = types[i];
|
|
62329
62392
|
if (t.flags & 128 /* TypeFlags.StringLiteral */ && ts.some(templates, function (template) { return isTypeMatchedByTemplateLiteralType(t, template); })) {
|
|
@@ -62331,7 +62394,7 @@ var ts;
|
|
|
62331
62394
|
}
|
|
62332
62395
|
};
|
|
62333
62396
|
while (i > 0) {
|
|
62334
|
-
|
|
62397
|
+
_loop_18();
|
|
62335
62398
|
}
|
|
62336
62399
|
}
|
|
62337
62400
|
}
|
|
@@ -62408,14 +62471,14 @@ var ts;
|
|
|
62408
62471
|
var namedUnions = [];
|
|
62409
62472
|
addNamedUnions(namedUnions, types);
|
|
62410
62473
|
var reducedTypes = [];
|
|
62411
|
-
var
|
|
62474
|
+
var _loop_19 = function (t) {
|
|
62412
62475
|
if (!ts.some(namedUnions, function (union) { return containsType(union.types, t); })) {
|
|
62413
62476
|
reducedTypes.push(t);
|
|
62414
62477
|
}
|
|
62415
62478
|
};
|
|
62416
62479
|
for (var _i = 0, typeSet_1 = typeSet; _i < typeSet_1.length; _i++) {
|
|
62417
62480
|
var t = typeSet_1[_i];
|
|
62418
|
-
|
|
62481
|
+
_loop_19(t);
|
|
62419
62482
|
}
|
|
62420
62483
|
if (!aliasSymbol && namedUnions.length === 1 && reducedTypes.length === 0) {
|
|
62421
62484
|
return namedUnions[0];
|
|
@@ -63645,7 +63708,7 @@ var ts;
|
|
|
63645
63708
|
var result;
|
|
63646
63709
|
var extraTypes;
|
|
63647
63710
|
var tailCount = 0;
|
|
63648
|
-
var
|
|
63711
|
+
var _loop_20 = function () {
|
|
63649
63712
|
if (tailCount === 1000) {
|
|
63650
63713
|
error(currentNode, ts.Diagnostics.Type_instantiation_is_excessively_deep_and_possibly_infinite);
|
|
63651
63714
|
result = errorType;
|
|
@@ -63766,10 +63829,10 @@ var ts;
|
|
|
63766
63829
|
// another (or, through recursion, possibly the same) conditional type. In the potentially tail-recursive
|
|
63767
63830
|
// cases we increment the tail recursion counter and stop after 1000 iterations.
|
|
63768
63831
|
while (true) {
|
|
63769
|
-
var
|
|
63770
|
-
if (typeof
|
|
63771
|
-
return
|
|
63772
|
-
if (
|
|
63832
|
+
var state_6 = _loop_20();
|
|
63833
|
+
if (typeof state_6 === "object")
|
|
63834
|
+
return state_6.value;
|
|
63835
|
+
if (state_6 === "break")
|
|
63773
63836
|
break;
|
|
63774
63837
|
}
|
|
63775
63838
|
return extraTypes ? getUnionType(ts.append(extraTypes, result)) : result;
|
|
@@ -66384,7 +66447,7 @@ var ts;
|
|
|
66384
66447
|
reducedTarget = findMatchingDiscriminantType(source, target, isRelatedTo) || filterPrimitivesIfContainsNonPrimitive(target);
|
|
66385
66448
|
checkTypes = reducedTarget.flags & 1048576 /* TypeFlags.Union */ ? reducedTarget.types : [reducedTarget];
|
|
66386
66449
|
}
|
|
66387
|
-
var
|
|
66450
|
+
var _loop_21 = function (prop) {
|
|
66388
66451
|
if (shouldCheckAsExcessProperty(prop, source.symbol) && !isIgnoredJsxProperty(source, prop)) {
|
|
66389
66452
|
if (!isKnownProperty(reducedTarget, prop.escapedName, isComparingJsxAttributes)) {
|
|
66390
66453
|
if (reportErrors) {
|
|
@@ -66447,9 +66510,9 @@ var ts;
|
|
|
66447
66510
|
};
|
|
66448
66511
|
for (var _i = 0, _b = getPropertiesOfType(source); _i < _b.length; _i++) {
|
|
66449
66512
|
var prop = _b[_i];
|
|
66450
|
-
var
|
|
66451
|
-
if (typeof
|
|
66452
|
-
return
|
|
66513
|
+
var state_7 = _loop_21(prop);
|
|
66514
|
+
if (typeof state_7 === "object")
|
|
66515
|
+
return state_7.value;
|
|
66453
66516
|
}
|
|
66454
66517
|
return false;
|
|
66455
66518
|
}
|
|
@@ -67440,11 +67503,11 @@ var ts;
|
|
|
67440
67503
|
// constituents of 'target'. If any combination does not have a match then 'source' is not relatable.
|
|
67441
67504
|
var discriminantCombinations = ts.cartesianProduct(sourceDiscriminantTypes);
|
|
67442
67505
|
var matchingTypes = [];
|
|
67443
|
-
var
|
|
67506
|
+
var _loop_22 = function (combination) {
|
|
67444
67507
|
var hasMatch = false;
|
|
67445
67508
|
outer: for (var _c = 0, _d = target.types; _c < _d.length; _c++) {
|
|
67446
67509
|
var type = _d[_c];
|
|
67447
|
-
var
|
|
67510
|
+
var _loop_23 = function (i) {
|
|
67448
67511
|
var sourceProperty = sourcePropertiesFiltered[i];
|
|
67449
67512
|
var targetProperty = getPropertyOfType(type, sourceProperty.escapedName);
|
|
67450
67513
|
if (!targetProperty)
|
|
@@ -67460,8 +67523,8 @@ var ts;
|
|
|
67460
67523
|
}
|
|
67461
67524
|
};
|
|
67462
67525
|
for (var i = 0; i < sourcePropertiesFiltered.length; i++) {
|
|
67463
|
-
var
|
|
67464
|
-
switch (
|
|
67526
|
+
var state_9 = _loop_23(i);
|
|
67527
|
+
switch (state_9) {
|
|
67465
67528
|
case "continue-outer": continue outer;
|
|
67466
67529
|
}
|
|
67467
67530
|
}
|
|
@@ -67474,9 +67537,9 @@ var ts;
|
|
|
67474
67537
|
};
|
|
67475
67538
|
for (var _a = 0, discriminantCombinations_1 = discriminantCombinations; _a < discriminantCombinations_1.length; _a++) {
|
|
67476
67539
|
var combination = discriminantCombinations_1[_a];
|
|
67477
|
-
var
|
|
67478
|
-
if (typeof
|
|
67479
|
-
return
|
|
67540
|
+
var state_8 = _loop_22(combination);
|
|
67541
|
+
if (typeof state_8 === "object")
|
|
67542
|
+
return state_8.value;
|
|
67480
67543
|
}
|
|
67481
67544
|
// Compare the remaining non-discriminant properties of each match.
|
|
67482
67545
|
var result = -1 /* Ternary.True */;
|
|
@@ -68181,7 +68244,7 @@ var ts;
|
|
|
68181
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)) });
|
|
68182
68245
|
links.variances = ts.emptyArray;
|
|
68183
68246
|
var variances = [];
|
|
68184
|
-
var
|
|
68247
|
+
var _loop_24 = function (tp) {
|
|
68185
68248
|
var modifiers = getVarianceModifiers(tp);
|
|
68186
68249
|
var variance = modifiers & 65536 /* ModifierFlags.Out */ ?
|
|
68187
68250
|
modifiers & 32768 /* ModifierFlags.In */ ? 0 /* VarianceFlags.Invariant */ : 1 /* VarianceFlags.Covariant */ :
|
|
@@ -68219,7 +68282,7 @@ var ts;
|
|
|
68219
68282
|
};
|
|
68220
68283
|
for (var _i = 0, typeParameters_2 = typeParameters; _i < typeParameters_2.length; _i++) {
|
|
68221
68284
|
var tp = typeParameters_2[_i];
|
|
68222
|
-
|
|
68285
|
+
_loop_24(tp);
|
|
68223
68286
|
}
|
|
68224
68287
|
links.variances = variances;
|
|
68225
68288
|
ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.pop({ variances: variances.map(ts.Debug.formatVariance) });
|
|
@@ -68811,7 +68874,8 @@ var ts;
|
|
|
68811
68874
|
function getOptionalType(type, isProperty) {
|
|
68812
68875
|
if (isProperty === void 0) { isProperty = false; }
|
|
68813
68876
|
ts.Debug.assert(strictNullChecks);
|
|
68814
|
-
|
|
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]);
|
|
68815
68879
|
}
|
|
68816
68880
|
function getGlobalNonNullableTypeInstantiation(type) {
|
|
68817
68881
|
if (!deferredGlobalNonNullableTypeAlias) {
|
|
@@ -70176,7 +70240,7 @@ var ts;
|
|
|
70176
70240
|
// upon instantiation, would collapse all the placeholders to just 'string', and an assignment check might
|
|
70177
70241
|
// succeed. That would be a pointless and confusing outcome.
|
|
70178
70242
|
if (matches || ts.every(target.texts, function (s) { return s.length === 0; })) {
|
|
70179
|
-
var
|
|
70243
|
+
var _loop_25 = function (i) {
|
|
70180
70244
|
var source_1 = matches ? matches[i] : neverType;
|
|
70181
70245
|
var target_3 = types[i];
|
|
70182
70246
|
// If we are inferring from a string literal type to a type variable whose constraint includes one of the
|
|
@@ -70226,7 +70290,7 @@ var ts;
|
|
|
70226
70290
|
inferFromTypes(source_1, target_3);
|
|
70227
70291
|
};
|
|
70228
70292
|
for (var i = 0; i < types.length; i++) {
|
|
70229
|
-
|
|
70293
|
+
_loop_25(i);
|
|
70230
70294
|
}
|
|
70231
70295
|
}
|
|
70232
70296
|
}
|
|
@@ -70690,7 +70754,7 @@ var ts;
|
|
|
70690
70754
|
return name;
|
|
70691
70755
|
}
|
|
70692
70756
|
}
|
|
70693
|
-
if (ts.hasOnlyExpressionInitializer(declaration)) {
|
|
70757
|
+
if (ts.hasOnlyExpressionInitializer(declaration) && isBlockScopedNameDeclaredBeforeUse(declaration, node.argumentExpression)) {
|
|
70694
70758
|
var initializer = ts.getEffectiveInitializer(declaration);
|
|
70695
70759
|
return initializer && tryGetNameFromType(getTypeOfExpression(initializer));
|
|
70696
70760
|
}
|
|
@@ -70750,7 +70814,7 @@ var ts;
|
|
|
70750
70814
|
function mapTypesByKeyProperty(types, name) {
|
|
70751
70815
|
var map = new ts.Map();
|
|
70752
70816
|
var count = 0;
|
|
70753
|
-
var
|
|
70817
|
+
var _loop_26 = function (type) {
|
|
70754
70818
|
if (type.flags & (524288 /* TypeFlags.Object */ | 2097152 /* TypeFlags.Intersection */ | 58982400 /* TypeFlags.InstantiableNonPrimitive */)) {
|
|
70755
70819
|
var discriminant = getTypeOfPropertyOfType(type, name);
|
|
70756
70820
|
if (discriminant) {
|
|
@@ -70776,9 +70840,9 @@ var ts;
|
|
|
70776
70840
|
};
|
|
70777
70841
|
for (var _i = 0, types_15 = types; _i < types_15.length; _i++) {
|
|
70778
70842
|
var type = types_15[_i];
|
|
70779
|
-
var
|
|
70780
|
-
if (typeof
|
|
70781
|
-
return
|
|
70843
|
+
var state_10 = _loop_26(type);
|
|
70844
|
+
if (typeof state_10 === "object")
|
|
70845
|
+
return state_10.value;
|
|
70782
70846
|
}
|
|
70783
70847
|
return count >= 10 && count * 2 >= types.length ? map : undefined;
|
|
70784
70848
|
}
|
|
@@ -77233,7 +77297,7 @@ var ts;
|
|
|
77233
77297
|
if (spreadIndex >= 0) {
|
|
77234
77298
|
// Create synthetic arguments from spreads of tuple types.
|
|
77235
77299
|
var effectiveArgs_1 = args.slice(0, spreadIndex);
|
|
77236
|
-
var
|
|
77300
|
+
var _loop_27 = function (i) {
|
|
77237
77301
|
var arg = args[i];
|
|
77238
77302
|
// We can call checkExpressionCached because spread expressions never have a contextual type.
|
|
77239
77303
|
var spreadType = arg.kind === 227 /* SyntaxKind.SpreadElement */ && (flowLoopCount ? checkExpression(arg.expression) : checkExpressionCached(arg.expression));
|
|
@@ -77250,7 +77314,7 @@ var ts;
|
|
|
77250
77314
|
}
|
|
77251
77315
|
};
|
|
77252
77316
|
for (var i = spreadIndex; i < args.length; i++) {
|
|
77253
|
-
|
|
77317
|
+
_loop_27(i);
|
|
77254
77318
|
}
|
|
77255
77319
|
return effectiveArgs_1;
|
|
77256
77320
|
}
|
|
@@ -77579,7 +77643,7 @@ var ts;
|
|
|
77579
77643
|
var min_3 = Number.MAX_VALUE;
|
|
77580
77644
|
var minIndex = 0;
|
|
77581
77645
|
var i_1 = 0;
|
|
77582
|
-
var
|
|
77646
|
+
var _loop_28 = function (c) {
|
|
77583
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)); };
|
|
77584
77648
|
var diags_2 = getSignatureApplicabilityError(node, args, c, assignableRelation, 0 /* CheckMode.Normal */, /*reportErrors*/ true, chain_2);
|
|
77585
77649
|
if (diags_2) {
|
|
@@ -77597,7 +77661,7 @@ var ts;
|
|
|
77597
77661
|
};
|
|
77598
77662
|
for (var _a = 0, candidatesForArgumentError_1 = candidatesForArgumentError; _a < candidatesForArgumentError_1.length; _a++) {
|
|
77599
77663
|
var c = candidatesForArgumentError_1[_a];
|
|
77600
|
-
|
|
77664
|
+
_loop_28(c);
|
|
77601
77665
|
}
|
|
77602
77666
|
var diags_3 = max > 1 ? allDiagnostics[minIndex] : ts.flatten(allDiagnostics);
|
|
77603
77667
|
ts.Debug.assert(diags_3.length > 0, "No errors reported for 3 or fewer overload signatures");
|
|
@@ -77755,7 +77819,7 @@ var ts;
|
|
|
77755
77819
|
}
|
|
77756
77820
|
var _a = ts.minAndMax(candidates, getNumNonRestParameters), minArgumentCount = _a.min, maxNonRestParam = _a.max;
|
|
77757
77821
|
var parameters = [];
|
|
77758
|
-
var
|
|
77822
|
+
var _loop_29 = function (i) {
|
|
77759
77823
|
var symbols = ts.mapDefined(candidates, function (s) { return signatureHasRestParameter(s) ?
|
|
77760
77824
|
i < s.parameters.length - 1 ? s.parameters[i] : ts.last(s.parameters) :
|
|
77761
77825
|
i < s.parameters.length ? s.parameters[i] : undefined; });
|
|
@@ -77763,7 +77827,7 @@ var ts;
|
|
|
77763
77827
|
parameters.push(createCombinedSymbolFromTypes(symbols, ts.mapDefined(candidates, function (candidate) { return tryGetTypeAtPosition(candidate, i); })));
|
|
77764
77828
|
};
|
|
77765
77829
|
for (var i = 0; i < maxNonRestParam; i++) {
|
|
77766
|
-
|
|
77830
|
+
_loop_29(i);
|
|
77767
77831
|
}
|
|
77768
77832
|
var restParameterSymbols = ts.mapDefined(candidates, function (c) { return signatureHasRestParameter(c) ? ts.last(c.parameters) : undefined; });
|
|
77769
77833
|
var flags = 0 /* SignatureFlags.None */;
|
|
@@ -80545,6 +80609,7 @@ var ts;
|
|
|
80545
80609
|
var eqType = operator === 34 /* SyntaxKind.EqualsEqualsToken */ || operator === 36 /* SyntaxKind.EqualsEqualsEqualsToken */;
|
|
80546
80610
|
error(errorNode, ts.Diagnostics.This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value, eqType ? "false" : "true");
|
|
80547
80611
|
}
|
|
80612
|
+
checkNaNEquality(errorNode, operator, left, right);
|
|
80548
80613
|
reportOperatorErrorUnless(function (left, right) { return isTypeEqualityComparableTo(left, right) || isTypeEqualityComparableTo(right, left); });
|
|
80549
80614
|
return booleanType;
|
|
80550
80615
|
case 102 /* SyntaxKind.InstanceOfKeyword */:
|
|
@@ -80750,6 +80815,26 @@ var ts;
|
|
|
80750
80815
|
return undefined;
|
|
80751
80816
|
}
|
|
80752
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
|
+
}
|
|
80753
80838
|
}
|
|
80754
80839
|
function getBaseTypesIfUnrelated(leftType, rightType, isRelated) {
|
|
80755
80840
|
var effectiveLeft = leftType;
|
|
@@ -81787,7 +81872,7 @@ var ts;
|
|
|
81787
81872
|
var indexSymbol = getIndexSymbol(getSymbolOfNode(node));
|
|
81788
81873
|
if (indexSymbol === null || indexSymbol === void 0 ? void 0 : indexSymbol.declarations) {
|
|
81789
81874
|
var indexSignatureMap_1 = new ts.Map();
|
|
81790
|
-
var
|
|
81875
|
+
var _loop_30 = function (declaration) {
|
|
81791
81876
|
if (declaration.parameters.length === 1 && declaration.parameters[0].type) {
|
|
81792
81877
|
forEachType(getTypeFromTypeNode(declaration.parameters[0].type), function (type) {
|
|
81793
81878
|
var entry = indexSignatureMap_1.get(getTypeId(type));
|
|
@@ -81802,7 +81887,7 @@ var ts;
|
|
|
81802
81887
|
};
|
|
81803
81888
|
for (var _i = 0, _a = indexSymbol.declarations; _i < _a.length; _i++) {
|
|
81804
81889
|
var declaration = _a[_i];
|
|
81805
|
-
|
|
81890
|
+
_loop_30(declaration);
|
|
81806
81891
|
}
|
|
81807
81892
|
indexSignatureMap_1.forEach(function (entry) {
|
|
81808
81893
|
if (entry.declarations.length > 1) {
|
|
@@ -85402,7 +85487,7 @@ var ts;
|
|
|
85402
85487
|
var propDeclaration = declaration && declaration.kind === 223 /* SyntaxKind.BinaryExpression */ ||
|
|
85403
85488
|
name && name.kind === 164 /* SyntaxKind.ComputedPropertyName */ ? declaration : undefined;
|
|
85404
85489
|
var localPropDeclaration = getParentOfSymbol(prop) === type.symbol ? declaration : undefined;
|
|
85405
|
-
var
|
|
85490
|
+
var _loop_31 = function (info) {
|
|
85406
85491
|
var localIndexDeclaration = info.declaration && getParentOfSymbol(getSymbolOfNode(info.declaration)) === type.symbol ? info.declaration : undefined;
|
|
85407
85492
|
// We check only when (a) the property is declared in the containing type, or (b) the applicable index signature is declared
|
|
85408
85493
|
// in the containing type, or (c) the containing type is an interface and no base interface contains both the property and
|
|
@@ -85419,7 +85504,7 @@ var ts;
|
|
|
85419
85504
|
};
|
|
85420
85505
|
for (var _i = 0, indexInfos_9 = indexInfos; _i < indexInfos_9.length; _i++) {
|
|
85421
85506
|
var info = indexInfos_9[_i];
|
|
85422
|
-
|
|
85507
|
+
_loop_31(info);
|
|
85423
85508
|
}
|
|
85424
85509
|
}
|
|
85425
85510
|
function checkIndexConstraintForIndexSignature(type, checkInfo) {
|
|
@@ -85427,7 +85512,7 @@ var ts;
|
|
|
85427
85512
|
var indexInfos = getApplicableIndexInfos(type, checkInfo.keyType);
|
|
85428
85513
|
var interfaceDeclaration = ts.getObjectFlags(type) & 2 /* ObjectFlags.Interface */ ? ts.getDeclarationOfKind(type.symbol, 261 /* SyntaxKind.InterfaceDeclaration */) : undefined;
|
|
85429
85514
|
var localCheckDeclaration = declaration && getParentOfSymbol(getSymbolOfNode(declaration)) === type.symbol ? declaration : undefined;
|
|
85430
|
-
var
|
|
85515
|
+
var _loop_32 = function (info) {
|
|
85431
85516
|
if (info === checkInfo)
|
|
85432
85517
|
return "continue";
|
|
85433
85518
|
var localIndexDeclaration = info.declaration && getParentOfSymbol(getSymbolOfNode(info.declaration)) === type.symbol ? info.declaration : undefined;
|
|
@@ -85442,7 +85527,7 @@ var ts;
|
|
|
85442
85527
|
};
|
|
85443
85528
|
for (var _i = 0, indexInfos_10 = indexInfos; _i < indexInfos_10.length; _i++) {
|
|
85444
85529
|
var info = indexInfos_10[_i];
|
|
85445
|
-
|
|
85530
|
+
_loop_32(info);
|
|
85446
85531
|
}
|
|
85447
85532
|
}
|
|
85448
85533
|
function checkTypeNameIsReserved(name, message) {
|
|
@@ -85762,7 +85847,7 @@ var ts;
|
|
|
85762
85847
|
var baseTypes = baseTypeNode && getBaseTypes(type);
|
|
85763
85848
|
var baseWithThis = (baseTypes === null || baseTypes === void 0 ? void 0 : baseTypes.length) ? getTypeWithThisArgument(ts.first(baseTypes), type.thisType) : undefined;
|
|
85764
85849
|
var baseStaticType = getBaseConstructorTypeOfClass(type);
|
|
85765
|
-
var
|
|
85850
|
+
var _loop_33 = function (member) {
|
|
85766
85851
|
if (ts.hasAmbientModifier(member)) {
|
|
85767
85852
|
return "continue";
|
|
85768
85853
|
}
|
|
@@ -85779,7 +85864,7 @@ var ts;
|
|
|
85779
85864
|
};
|
|
85780
85865
|
for (var _i = 0, _a = node.members; _i < _a.length; _i++) {
|
|
85781
85866
|
var member = _a[_i];
|
|
85782
|
-
|
|
85867
|
+
_loop_33(member);
|
|
85783
85868
|
}
|
|
85784
85869
|
}
|
|
85785
85870
|
/**
|
|
@@ -85867,7 +85952,7 @@ var ts;
|
|
|
85867
85952
|
function issueMemberSpecificError(node, typeWithThis, baseWithThis, broadDiag) {
|
|
85868
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
|
|
85869
85954
|
var issuedMemberError = false;
|
|
85870
|
-
var
|
|
85955
|
+
var _loop_34 = function (member) {
|
|
85871
85956
|
if (ts.isStatic(member)) {
|
|
85872
85957
|
return "continue";
|
|
85873
85958
|
}
|
|
@@ -85886,7 +85971,7 @@ var ts;
|
|
|
85886
85971
|
};
|
|
85887
85972
|
for (var _i = 0, _a = node.members; _i < _a.length; _i++) {
|
|
85888
85973
|
var member = _a[_i];
|
|
85889
|
-
|
|
85974
|
+
_loop_34(member);
|
|
85890
85975
|
}
|
|
85891
85976
|
if (!issuedMemberError) {
|
|
85892
85977
|
// check again with diagnostics to generate a less-specific error
|
|
@@ -85957,7 +86042,7 @@ var ts;
|
|
|
85957
86042
|
var _a, _b, _c, _d;
|
|
85958
86043
|
// NOTE: assignability is checked in checkClassDeclaration
|
|
85959
86044
|
var baseProperties = getPropertiesOfType(baseType);
|
|
85960
|
-
var
|
|
86045
|
+
var _loop_35 = function (baseProperty) {
|
|
85961
86046
|
var base = getTargetSymbol(baseProperty);
|
|
85962
86047
|
if (base.flags & 4194304 /* SymbolFlags.Prototype */) {
|
|
85963
86048
|
return "continue";
|
|
@@ -86067,8 +86152,8 @@ var ts;
|
|
|
86067
86152
|
};
|
|
86068
86153
|
basePropertyCheck: for (var _i = 0, baseProperties_1 = baseProperties; _i < baseProperties_1.length; _i++) {
|
|
86069
86154
|
var baseProperty = baseProperties_1[_i];
|
|
86070
|
-
var
|
|
86071
|
-
switch (
|
|
86155
|
+
var state_11 = _loop_35(baseProperty);
|
|
86156
|
+
switch (state_11) {
|
|
86072
86157
|
case "continue-basePropertyCheck": continue basePropertyCheck;
|
|
86073
86158
|
}
|
|
86074
86159
|
}
|
|
@@ -115309,6 +115394,7 @@ var ts;
|
|
|
115309
115394
|
writeTrailingSemicolon();
|
|
115310
115395
|
}
|
|
115311
115396
|
function emitExportDeclaration(node) {
|
|
115397
|
+
emitModifiers(node, node.modifiers);
|
|
115312
115398
|
var nextPos = emitTokenWithComment(93 /* SyntaxKind.ExportKeyword */, node.pos, writeKeyword, node);
|
|
115313
115399
|
writeSpace();
|
|
115314
115400
|
if (node.isTypeOnly) {
|
|
@@ -124911,7 +124997,7 @@ var ts;
|
|
|
124911
124997
|
});
|
|
124912
124998
|
// Sort by paths closest to importing file Name directory
|
|
124913
124999
|
var sortedPaths = [];
|
|
124914
|
-
var
|
|
125000
|
+
var _loop_36 = function (directory) {
|
|
124915
125001
|
var directoryStart = ts.ensureTrailingDirectorySeparator(directory);
|
|
124916
125002
|
var pathsInDirectory;
|
|
124917
125003
|
allFileNames.forEach(function (_a, fileName) {
|
|
@@ -124935,9 +125021,9 @@ var ts;
|
|
|
124935
125021
|
};
|
|
124936
125022
|
var out_directory_1;
|
|
124937
125023
|
for (var directory = ts.getDirectoryPath(importingFileName); allFileNames.size !== 0;) {
|
|
124938
|
-
var
|
|
125024
|
+
var state_12 = _loop_36(directory);
|
|
124939
125025
|
directory = out_directory_1;
|
|
124940
|
-
if (
|
|
125026
|
+
if (state_12 === "break")
|
|
124941
125027
|
break;
|
|
124942
125028
|
}
|
|
124943
125029
|
if (allFileNames.size) {
|
|
@@ -125006,7 +125092,7 @@ var ts;
|
|
|
125006
125092
|
}
|
|
125007
125093
|
function tryGetModuleNameFromPaths(relativeToBaseUrl, paths, allowedEndings, host, compilerOptions) {
|
|
125008
125094
|
for (var key in paths) {
|
|
125009
|
-
var
|
|
125095
|
+
var _loop_37 = function (patternText_1) {
|
|
125010
125096
|
var pattern = ts.normalizePath(patternText_1);
|
|
125011
125097
|
var indexOfStar = pattern.indexOf("*");
|
|
125012
125098
|
// In module resolution, if `pattern` itself has an extension, a file with that extension is looked up directly,
|
|
@@ -125073,9 +125159,9 @@ var ts;
|
|
|
125073
125159
|
};
|
|
125074
125160
|
for (var _i = 0, _a = paths[key]; _i < _a.length; _i++) {
|
|
125075
125161
|
var patternText_1 = _a[_i];
|
|
125076
|
-
var
|
|
125077
|
-
if (typeof
|
|
125078
|
-
return
|
|
125162
|
+
var state_13 = _loop_37(patternText_1);
|
|
125163
|
+
if (typeof state_13 === "object")
|
|
125164
|
+
return state_13.value;
|
|
125079
125165
|
}
|
|
125080
125166
|
}
|
|
125081
125167
|
function validateEnding(_a) {
|