@typescript-deploys/pr-build 4.8.0-pr-48997-18 → 4.8.0-pr-49245-7

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/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.8";
72
- ts.version = ts.versionMajorMinor + ".0-insiders.20220523";
72
+ ts.version = ts.versionMajorMinor + ".0-insiders.20220525";
73
73
  var NativeCollections;
74
74
  (function (NativeCollections) {
75
75
  var globals = typeof globalThis !== "undefined" ? globalThis :
@@ -3855,7 +3855,7 @@ var ts;
3855
3855
  }
3856
3856
  ts.setSysLog = setSysLog;
3857
3857
  function createDirectoryWatcherSupportingRecursive(_a) {
3858
- var watchDirectory = _a.watchDirectory, useCaseSensitiveFileNames = _a.useCaseSensitiveFileNames, getCurrentDirectory = _a.getCurrentDirectory, getAccessibleSortedChildDirectories = _a.getAccessibleSortedChildDirectories, fileSystemEntryExists = _a.fileSystemEntryExists, realpath = _a.realpath, setTimeout = _a.setTimeout, clearTimeout = _a.clearTimeout;
3858
+ var watchDirectory = _a.watchDirectory, useCaseSensitiveFileNames = _a.useCaseSensitiveFileNames, getCurrentDirectory = _a.getCurrentDirectory, getAccessibleSortedChildDirectories = _a.getAccessibleSortedChildDirectories, directoryExists = _a.directoryExists, realpath = _a.realpath, setTimeout = _a.setTimeout, clearTimeout = _a.clearTimeout;
3859
3859
  var cache = new ts.Map();
3860
3860
  var callbackCache = ts.createMultiMap();
3861
3861
  var cacheToUpdateChildWatches = new ts.Map();
@@ -3948,7 +3948,7 @@ var ts;
3948
3948
  }
3949
3949
  function nonSyncUpdateChildWatches(dirName, dirPath, fileName, options) {
3950
3950
  var parentWatcher = cache.get(dirPath);
3951
- if (parentWatcher && fileSystemEntryExists(dirName, 1)) {
3951
+ if (parentWatcher && directoryExists(dirName)) {
3952
3952
  scheduleUpdateChildWatches(dirName, dirPath, fileName, options);
3953
3953
  return;
3954
3954
  }
@@ -4016,7 +4016,7 @@ var ts;
4016
4016
  if (!parentWatcher)
4017
4017
  return false;
4018
4018
  var newChildWatches;
4019
- var hasChanges = ts.enumerateInsertsAndDeletes(fileSystemEntryExists(parentDir, 1) ? ts.mapDefined(getAccessibleSortedChildDirectories(parentDir), function (child) {
4019
+ var hasChanges = ts.enumerateInsertsAndDeletes(directoryExists(parentDir) ? ts.mapDefined(getAccessibleSortedChildDirectories(parentDir), function (child) {
4020
4020
  var childFullName = ts.getNormalizedAbsolutePath(child, parentDir);
4021
4021
  return !isIgnoredPath(childFullName, options) && filePathComparer(childFullName, ts.normalizePath(realpath(childFullName))) === 0 ? childFullName : undefined;
4022
4022
  }) : ts.emptyArray, parentWatcher.childWatches, function (child, childWatcher) { return filePathComparer(child, childWatcher.dirName); }, createAndAddChildDirectoryWatcher, ts.closeFileWatcher, addChildDirectoryWatcher);
@@ -4047,10 +4047,10 @@ var ts;
4047
4047
  return function (_fileName, eventKind) { return callback(eventKind === FileWatcherEventKind.Changed ? "change" : "rename", ""); };
4048
4048
  }
4049
4049
  ts.createFileWatcherCallback = createFileWatcherCallback;
4050
- function createFsWatchCallbackForFileWatcherCallback(fileName, callback, fileSystemEntryExists) {
4050
+ function createFsWatchCallbackForFileWatcherCallback(fileName, callback, fileExists) {
4051
4051
  return function (eventName) {
4052
4052
  if (eventName === "rename") {
4053
- callback(fileName, fileSystemEntryExists(fileName, 0) ? FileWatcherEventKind.Created : FileWatcherEventKind.Deleted);
4053
+ callback(fileName, fileExists(fileName) ? FileWatcherEventKind.Created : FileWatcherEventKind.Deleted);
4054
4054
  }
4055
4055
  else {
4056
4056
  callback(fileName, FileWatcherEventKind.Changed);
@@ -4072,12 +4072,11 @@ var ts;
4072
4072
  };
4073
4073
  }
4074
4074
  function createSystemWatchFunctions(_a) {
4075
- var pollingWatchFile = _a.pollingWatchFile, getModifiedTime = _a.getModifiedTime, setTimeout = _a.setTimeout, clearTimeout = _a.clearTimeout, fsWatchWorker = _a.fsWatchWorker, fileSystemEntryExists = _a.fileSystemEntryExists, useCaseSensitiveFileNames = _a.useCaseSensitiveFileNames, getCurrentDirectory = _a.getCurrentDirectory, fsSupportsRecursiveFsWatch = _a.fsSupportsRecursiveFsWatch, getAccessibleSortedChildDirectories = _a.getAccessibleSortedChildDirectories, realpath = _a.realpath, tscWatchFile = _a.tscWatchFile, useNonPollingWatchers = _a.useNonPollingWatchers, tscWatchDirectory = _a.tscWatchDirectory, defaultWatchFileKind = _a.defaultWatchFileKind, inodeWatching = _a.inodeWatching, sysLog = _a.sysLog;
4075
+ var pollingWatchFile = _a.pollingWatchFile, getModifiedTime = _a.getModifiedTime, setTimeout = _a.setTimeout, clearTimeout = _a.clearTimeout, fsWatch = _a.fsWatch, fileExists = _a.fileExists, useCaseSensitiveFileNames = _a.useCaseSensitiveFileNames, getCurrentDirectory = _a.getCurrentDirectory, fsSupportsRecursiveFsWatch = _a.fsSupportsRecursiveFsWatch, directoryExists = _a.directoryExists, getAccessibleSortedChildDirectories = _a.getAccessibleSortedChildDirectories, realpath = _a.realpath, tscWatchFile = _a.tscWatchFile, useNonPollingWatchers = _a.useNonPollingWatchers, tscWatchDirectory = _a.tscWatchDirectory, defaultWatchFileKind = _a.defaultWatchFileKind;
4076
4076
  var dynamicPollingWatchFile;
4077
4077
  var fixedChunkSizePollingWatchFile;
4078
4078
  var nonPollingWatchFile;
4079
4079
  var hostRecursiveDirectoryWatcher;
4080
- var hitSystemWatcherLimit = false;
4081
4080
  return {
4082
4081
  watchFile: watchFile,
4083
4082
  watchDirectory: watchDirectory
@@ -4095,7 +4094,7 @@ var ts;
4095
4094
  case ts.WatchFileKind.FixedChunkSizePolling:
4096
4095
  return ensureFixedChunkSizePollingWatchFile()(fileName, callback, undefined, undefined);
4097
4096
  case ts.WatchFileKind.UseFsEvents:
4098
- return fsWatch(fileName, 0, createFsWatchCallbackForFileWatcherCallback(fileName, callback, fileSystemEntryExists), false, pollingInterval, ts.getFallbackOptions(options));
4097
+ return fsWatch(fileName, 0, createFsWatchCallbackForFileWatcherCallback(fileName, callback, fileExists), false, pollingInterval, ts.getFallbackOptions(options));
4099
4098
  case ts.WatchFileKind.UseFsEventsOnParentDirectory:
4100
4099
  if (!nonPollingWatchFile) {
4101
4100
  nonPollingWatchFile = createUseFsEventsOnParentDirectoryWatchFile(fsWatch, useCaseSensitiveFileNames);
@@ -4148,7 +4147,7 @@ var ts;
4148
4147
  hostRecursiveDirectoryWatcher = createDirectoryWatcherSupportingRecursive({
4149
4148
  useCaseSensitiveFileNames: useCaseSensitiveFileNames,
4150
4149
  getCurrentDirectory: getCurrentDirectory,
4151
- fileSystemEntryExists: fileSystemEntryExists,
4150
+ directoryExists: directoryExists,
4152
4151
  getAccessibleSortedChildDirectories: getAccessibleSortedChildDirectories,
4153
4152
  watchDirectory: nonRecursiveWatchDirectory,
4154
4153
  realpath: realpath,
@@ -4193,86 +4192,6 @@ var ts;
4193
4192
  };
4194
4193
  }
4195
4194
  }
4196
- function fsWatch(fileOrDirectory, entryKind, callback, recursive, fallbackPollingInterval, fallbackOptions) {
4197
- var lastDirectoryPartWithDirectorySeparator;
4198
- var lastDirectoryPart;
4199
- if (inodeWatching) {
4200
- lastDirectoryPartWithDirectorySeparator = fileOrDirectory.substr(fileOrDirectory.lastIndexOf(ts.directorySeparator));
4201
- lastDirectoryPart = lastDirectoryPartWithDirectorySeparator.slice(ts.directorySeparator.length);
4202
- }
4203
- var watcher = !fileSystemEntryExists(fileOrDirectory, entryKind) ?
4204
- watchMissingFileSystemEntry() :
4205
- watchPresentFileSystemEntry();
4206
- return {
4207
- close: function () {
4208
- watcher.close();
4209
- watcher = undefined;
4210
- }
4211
- };
4212
- function updateWatcher(createWatcher) {
4213
- if (watcher) {
4214
- sysLog("sysLog:: " + fileOrDirectory + ":: Changing watcher to " + (createWatcher === watchPresentFileSystemEntry ? "Present" : "Missing") + "FileSystemEntryWatcher");
4215
- watcher.close();
4216
- watcher = createWatcher();
4217
- }
4218
- }
4219
- function watchPresentFileSystemEntry() {
4220
- if (hitSystemWatcherLimit) {
4221
- sysLog("sysLog:: " + fileOrDirectory + ":: Defaulting to watchFile");
4222
- return watchPresentFileSystemEntryWithFsWatchFile();
4223
- }
4224
- try {
4225
- var presentWatcher = fsWatchWorker(fileOrDirectory, recursive, inodeWatching ?
4226
- callbackChangingToMissingFileSystemEntry :
4227
- function (eventName, relativeFileName) {
4228
- sysLog("sysLog:: watchPresentFileSystemEntry:: " + fileOrDirectory + " " + entryKind + " " + eventName + ":: " + relativeFileName);
4229
- callback(eventName, relativeFileName);
4230
- });
4231
- presentWatcher.on("error", function () {
4232
- sysLog("sysLog:: watchPresentFileSystemEntry:: on Error " + fileOrDirectory + " " + entryKind + " rename, \"\"");
4233
- callback("rename", "");
4234
- updateWatcher(watchMissingFileSystemEntry);
4235
- });
4236
- return presentWatcher;
4237
- }
4238
- catch (e) {
4239
- hitSystemWatcherLimit || (hitSystemWatcherLimit = e.code === "ENOSPC");
4240
- sysLog("sysLog:: " + fileOrDirectory + ":: Changing to watchFile");
4241
- return watchPresentFileSystemEntryWithFsWatchFile();
4242
- }
4243
- }
4244
- function callbackChangingToMissingFileSystemEntry(event, relativeName) {
4245
- sysLog("sysLog:: callbackChangingToMissingFileSystemEntry:: " + fileOrDirectory + " " + entryKind + " " + event + ":: " + relativeName + " " + inodeWatching + " " + lastDirectoryPart + " " + lastDirectoryPartWithDirectorySeparator);
4246
- callback(event, relativeName);
4247
- if (event === "rename" &&
4248
- (!relativeName ||
4249
- relativeName === lastDirectoryPart ||
4250
- (relativeName.lastIndexOf(lastDirectoryPartWithDirectorySeparator) !== -1 && relativeName.lastIndexOf(lastDirectoryPartWithDirectorySeparator) === relativeName.length - lastDirectoryPartWithDirectorySeparator.length))) {
4251
- if (inodeWatching) {
4252
- updateWatcher(!fileSystemEntryExists(fileOrDirectory, entryKind) ? watchMissingFileSystemEntry : watchPresentFileSystemEntry);
4253
- }
4254
- else if (!fileSystemEntryExists(fileOrDirectory, entryKind)) {
4255
- updateWatcher(watchMissingFileSystemEntry);
4256
- }
4257
- }
4258
- }
4259
- function watchPresentFileSystemEntryWithFsWatchFile() {
4260
- return watchFile(fileOrDirectory, createFileWatcherCallback(function (eventName, relativeFileName) {
4261
- sysLog("sysLog:: watchPresentFileSystemEntryWithFsWatchFile:: " + fileOrDirectory + " " + entryKind + " " + eventName + ":: " + relativeFileName);
4262
- callback(eventName, relativeFileName);
4263
- }), fallbackPollingInterval, fallbackOptions);
4264
- }
4265
- function watchMissingFileSystemEntry() {
4266
- return watchFile(fileOrDirectory, function (_fileName, eventKind) {
4267
- sysLog("sysLog:: watchMissingFileSystemEntry:: " + fileOrDirectory + " " + entryKind + " " + _fileName + ":: " + eventKind);
4268
- if (eventKind === FileWatcherEventKind.Created && fileSystemEntryExists(fileOrDirectory, entryKind)) {
4269
- sysLog("sysLog:: watchMissingFileSystemEntry:: Callback :: rename, \"\" and will update the watcher");
4270
- callback("rename", "");
4271
- updateWatcher(watchPresentFileSystemEntry);
4272
- }
4273
- }, fallbackPollingInterval, fallbackOptions);
4274
- }
4275
- }
4276
4195
  }
4277
4196
  ts.createSystemWatchFunctions = createSystemWatchFunctions;
4278
4197
  function patchWriteFileEnsuringDirectory(sys) {
@@ -4314,6 +4233,7 @@ var ts;
4314
4233
  }
4315
4234
  var activeSession;
4316
4235
  var profilePath = "./profile.cpuprofile";
4236
+ var hitSystemWatcherLimit = false;
4317
4237
  var Buffer = require("buffer").Buffer;
4318
4238
  var nodeVersion = getNodeMajorVersion();
4319
4239
  var isNode4OrLater = nodeVersion >= 4;
@@ -4328,19 +4248,18 @@ var ts;
4328
4248
  getModifiedTime: getModifiedTime,
4329
4249
  setTimeout: setTimeout,
4330
4250
  clearTimeout: clearTimeout,
4331
- fsWatchWorker: fsWatchWorker,
4251
+ fsWatch: fsWatch,
4332
4252
  useCaseSensitiveFileNames: useCaseSensitiveFileNames,
4333
4253
  getCurrentDirectory: getCurrentDirectory,
4334
- fileSystemEntryExists: fileSystemEntryExists,
4254
+ fileExists: fileExists,
4335
4255
  fsSupportsRecursiveFsWatch: fsSupportsRecursiveFsWatch,
4256
+ directoryExists: directoryExists,
4336
4257
  getAccessibleSortedChildDirectories: function (path) { return getAccessibleFileSystemEntries(path).directories; },
4337
4258
  realpath: realpath,
4338
4259
  tscWatchFile: process.env.TSC_WATCHFILE,
4339
4260
  useNonPollingWatchers: process.env.TSC_NONPOLLING_WATCHER,
4340
4261
  tscWatchDirectory: process.env.TSC_WATCHDIRECTORY,
4341
4262
  defaultWatchFileKind: function () { var _a, _b; return (_b = (_a = sys).defaultWatchFileKind) === null || _b === void 0 ? void 0 : _b.call(_a); },
4342
- inodeWatching: isLinuxOrMacOs,
4343
- sysLog: sysLog,
4344
4263
  }), watchFile = _c.watchFile, watchDirectory = _c.watchDirectory;
4345
4264
  var nodeSystem = {
4346
4265
  args: process.argv.slice(2),
@@ -4563,9 +4482,76 @@ var ts;
4563
4482
  callback(fileName, eventKind);
4564
4483
  }
4565
4484
  }
4566
- function fsWatchWorker(fileOrDirectory, recursive, callback) {
4567
- return _fs.watch(fileOrDirectory, fsSupportsRecursiveFsWatch ?
4568
- { persistent: true, recursive: !!recursive } : { persistent: true }, callback);
4485
+ function fsWatch(fileOrDirectory, entryKind, callback, recursive, fallbackPollingInterval, fallbackOptions) {
4486
+ var options;
4487
+ var lastDirectoryPartWithDirectorySeparator;
4488
+ var lastDirectoryPart;
4489
+ if (isLinuxOrMacOs) {
4490
+ lastDirectoryPartWithDirectorySeparator = fileOrDirectory.substr(fileOrDirectory.lastIndexOf(ts.directorySeparator));
4491
+ lastDirectoryPart = lastDirectoryPartWithDirectorySeparator.slice(ts.directorySeparator.length);
4492
+ }
4493
+ var watcher = !fileSystemEntryExists(fileOrDirectory, entryKind) ?
4494
+ watchMissingFileSystemEntry() :
4495
+ watchPresentFileSystemEntry();
4496
+ return {
4497
+ close: function () {
4498
+ watcher.close();
4499
+ watcher = undefined;
4500
+ }
4501
+ };
4502
+ function invokeCallbackAndUpdateWatcher(createWatcher) {
4503
+ sysLog("sysLog:: " + fileOrDirectory + ":: Changing watcher to " + (createWatcher === watchPresentFileSystemEntry ? "Present" : "Missing") + "FileSystemEntryWatcher");
4504
+ callback("rename", "");
4505
+ if (watcher) {
4506
+ watcher.close();
4507
+ watcher = createWatcher();
4508
+ }
4509
+ }
4510
+ function watchPresentFileSystemEntry() {
4511
+ if (options === undefined) {
4512
+ if (fsSupportsRecursiveFsWatch) {
4513
+ options = { persistent: true, recursive: !!recursive };
4514
+ }
4515
+ else {
4516
+ options = { persistent: true };
4517
+ }
4518
+ }
4519
+ if (hitSystemWatcherLimit) {
4520
+ sysLog("sysLog:: " + fileOrDirectory + ":: Defaulting to fsWatchFile");
4521
+ return watchPresentFileSystemEntryWithFsWatchFile();
4522
+ }
4523
+ try {
4524
+ var presentWatcher = _fs.watch(fileOrDirectory, options, isLinuxOrMacOs ?
4525
+ callbackChangingToMissingFileSystemEntry :
4526
+ callback);
4527
+ presentWatcher.on("error", function () { return invokeCallbackAndUpdateWatcher(watchMissingFileSystemEntry); });
4528
+ return presentWatcher;
4529
+ }
4530
+ catch (e) {
4531
+ hitSystemWatcherLimit || (hitSystemWatcherLimit = e.code === "ENOSPC");
4532
+ sysLog("sysLog:: " + fileOrDirectory + ":: Changing to fsWatchFile");
4533
+ return watchPresentFileSystemEntryWithFsWatchFile();
4534
+ }
4535
+ }
4536
+ function callbackChangingToMissingFileSystemEntry(event, relativeName) {
4537
+ return event === "rename" &&
4538
+ (!relativeName ||
4539
+ relativeName === lastDirectoryPart ||
4540
+ (relativeName.lastIndexOf(lastDirectoryPartWithDirectorySeparator) !== -1 && relativeName.lastIndexOf(lastDirectoryPartWithDirectorySeparator) === relativeName.length - lastDirectoryPartWithDirectorySeparator.length)) &&
4541
+ !fileSystemEntryExists(fileOrDirectory, entryKind) ?
4542
+ invokeCallbackAndUpdateWatcher(watchMissingFileSystemEntry) :
4543
+ callback(event, relativeName);
4544
+ }
4545
+ function watchPresentFileSystemEntryWithFsWatchFile() {
4546
+ return watchFile(fileOrDirectory, createFileWatcherCallback(callback), fallbackPollingInterval, fallbackOptions);
4547
+ }
4548
+ function watchMissingFileSystemEntry() {
4549
+ return watchFile(fileOrDirectory, function (_fileName, eventKind) {
4550
+ if (eventKind === FileWatcherEventKind.Created && fileSystemEntryExists(fileOrDirectory, entryKind)) {
4551
+ invokeCallbackAndUpdateWatcher(watchPresentFileSystemEntry);
4552
+ }
4553
+ }, fallbackPollingInterval, fallbackOptions);
4554
+ }
4569
4555
  }
4570
4556
  function readFileWorker(fileName, _encoding) {
4571
4557
  var buffer;
@@ -60334,7 +60320,7 @@ var ts;
60334
60320
  if (result) {
60335
60321
  return result;
60336
60322
  }
60337
- if (!(contextFlags & 8) && ts.isBindingPattern(declaration.name)) {
60323
+ if (!(contextFlags & 8) && ts.isBindingPattern(declaration.name) && declaration.name.elements.length > 0) {
60338
60324
  return getTypeFromBindingPattern(declaration.name, true, false);
60339
60325
  }
60340
60326
  }
@@ -60751,16 +60737,14 @@ var ts;
60751
60737
  function instantiateContextualType(contextualType, node, contextFlags) {
60752
60738
  if (contextualType && maybeTypeOfKind(contextualType, 465829888)) {
60753
60739
  var inferenceContext = getInferenceContext(node);
60754
- if (inferenceContext && ts.some(inferenceContext.inferences, hasInferenceCandidates)) {
60755
- if (contextFlags && contextFlags & 1) {
60756
- return instantiateInstantiableTypes(contextualType, inferenceContext.nonFixingMapper);
60757
- }
60758
- if (inferenceContext.returnMapper) {
60759
- var type = instantiateInstantiableTypes(contextualType, inferenceContext.returnMapper);
60760
- return type.flags & 1048576 && containsType(type.types, regularFalseType) && containsType(type.types, regularTrueType) ?
60761
- filterType(type, function (t) { return t !== regularFalseType && t !== regularTrueType; }) :
60762
- type;
60763
- }
60740
+ if (inferenceContext && contextFlags & 1 && ts.some(inferenceContext.inferences, hasInferenceCandidates)) {
60741
+ return instantiateInstantiableTypes(contextualType, inferenceContext.nonFixingMapper);
60742
+ }
60743
+ if (inferenceContext === null || inferenceContext === void 0 ? void 0 : inferenceContext.returnMapper) {
60744
+ var type = instantiateInstantiableTypes(contextualType, inferenceContext.returnMapper);
60745
+ return type.flags & 1048576 && containsType(type.types, regularFalseType) && containsType(type.types, regularTrueType) ?
60746
+ filterType(type, function (t) { return t !== regularFalseType && t !== regularTrueType; }) :
60747
+ type;
60764
60748
  }
60765
60749
  }
60766
60750
  return contextualType;
@@ -62914,18 +62898,22 @@ var ts;
62914
62898
  return inferJsxTypeArguments(node, signature, checkMode, context);
62915
62899
  }
62916
62900
  if (node.kind !== 165) {
62917
- var contextualType = getContextualType(node, ts.every(signature.typeParameters, function (p) { return !!getDefaultFromTypeParameter(p); }) ? 8 : 0);
62901
+ var skipBindingPatterns = ts.every(signature.typeParameters, function (p) { return !!getDefaultFromTypeParameter(p); });
62902
+ var contextualType = getContextualType(node, skipBindingPatterns ? 8 : 0);
62918
62903
  if (contextualType) {
62919
62904
  var inferenceTargetType = getReturnTypeOfSignature(signature);
62920
62905
  if (couldContainTypeVariables(inferenceTargetType)) {
62921
62906
  var outerContext = getInferenceContext(node);
62922
- var outerMapper = getMapperFromContext(cloneInferenceContext(outerContext, 1));
62923
- var instantiatedType = instantiateType(contextualType, outerMapper);
62924
- var contextualSignature = getSingleCallSignature(instantiatedType);
62925
- var inferenceSourceType = contextualSignature && contextualSignature.typeParameters ?
62926
- getOrCreateTypeFromSignature(getSignatureInstantiationWithoutFillingInTypeArguments(contextualSignature, contextualSignature.typeParameters)) :
62927
- instantiatedType;
62928
- inferTypes(context.inferences, inferenceSourceType, inferenceTargetType, 128);
62907
+ var isFromBindingPattern = !skipBindingPatterns && getContextualType(node, 8) !== contextualType;
62908
+ if (!isFromBindingPattern) {
62909
+ var outerMapper = getMapperFromContext(cloneInferenceContext(outerContext, 1));
62910
+ var instantiatedType = instantiateType(contextualType, outerMapper);
62911
+ var contextualSignature = getSingleCallSignature(instantiatedType);
62912
+ var inferenceSourceType = contextualSignature && contextualSignature.typeParameters ?
62913
+ getOrCreateTypeFromSignature(getSignatureInstantiationWithoutFillingInTypeArguments(contextualSignature, contextualSignature.typeParameters)) :
62914
+ instantiatedType;
62915
+ inferTypes(context.inferences, inferenceSourceType, inferenceTargetType, 128);
62916
+ }
62929
62917
  var returnContext = createInferenceContext(signature.typeParameters, signature, context.flags);
62930
62918
  var returnSourceType = instantiateType(contextualType, outerContext && outerContext.returnMapper);
62931
62919
  inferTypes(returnContext.inferences, returnSourceType, inferenceTargetType);
@@ -65628,6 +65616,11 @@ var ts;
65628
65616
  ts.every(source.types, function (subType) { return allTypesAssignableToKind(subType, kind, strict); }) :
65629
65617
  isTypeAssignableToKind(source, kind, strict);
65630
65618
  }
65619
+ function anyTypesAssignableToKind(source, kind, strict) {
65620
+ return source.flags & 1048576 ?
65621
+ ts.some(source.types, function (subType) { return allTypesAssignableToKind(subType, kind, strict); }) :
65622
+ isTypeAssignableToKind(source, kind, strict);
65623
+ }
65631
65624
  function isConstEnumObjectType(type) {
65632
65625
  return !!(ts.getObjectFlags(type) & 16) && !!type.symbol && isConstEnumSymbol(type.symbol);
65633
65626
  }
@@ -69390,7 +69383,7 @@ var ts;
69390
69383
  checkReferenceExpression(varExpr, ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access, ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_may_not_be_an_optional_property_access);
69391
69384
  }
69392
69385
  }
69393
- if (rightType === neverType || !isTypeAssignableToKind(rightType, 67108864 | 58982400)) {
69386
+ if (!isTypeAny(rightType) && !(rightType.flags & 98304) && anyTypesAssignableToKind(getBaseConstraintOrType(rightType), (131068 | 131072) & ~98304)) {
69394
69387
  error(node.expression, ts.Diagnostics.The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_here_has_type_0, typeToString(rightType));
69395
69388
  }
69396
69389
  checkSourceElement(node.statement);
@@ -87849,7 +87842,7 @@ var ts;
87849
87842
  function visitor(node) {
87850
87843
  switch (node.kind) {
87851
87844
  case 265:
87852
- return ts.getEmitScriptTarget(compilerOptions) >= ts.ModuleKind.ES2020 ? visitImportEqualsDeclaration(node) : undefined;
87845
+ return ts.getEmitModuleKind(compilerOptions) >= ts.ModuleKind.Node16 ? visitImportEqualsDeclaration(node) : undefined;
87853
87846
  case 271:
87854
87847
  return visitExportAssignment(node);
87855
87848
  case 272: