@typescript-deploys/pr-build 4.8.0-pr-49119-45 → 4.8.0-pr-48997-21
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/lib.es5.d.ts +1 -1
- package/lib/protocol.d.ts +1 -0
- package/lib/tsc.js +154 -193
- package/lib/tsserver.js +192 -235
- package/lib/tsserverlibrary.d.ts +2 -0
- package/lib/tsserverlibrary.js +192 -235
- package/lib/typescript.d.ts +1 -0
- package/lib/typescript.js +192 -235
- package/lib/typescriptServices.d.ts +1 -0
- package/lib/typescriptServices.js +192 -235
- package/lib/typingsInstaller.js +188 -235
- package/package.json +1 -1
package/lib/tsc.js
CHANGED
|
@@ -69,7 +69,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
69
69
|
var ts;
|
|
70
70
|
(function (ts) {
|
|
71
71
|
ts.versionMajorMinor = "4.8";
|
|
72
|
-
ts.version = ts.versionMajorMinor + ".0-insiders.
|
|
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,
|
|
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;
|
|
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 &&
|
|
3951
|
+
if (parentWatcher && fileSystemEntryExists(dirName, 1)) {
|
|
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(
|
|
4019
|
+
var hasChanges = ts.enumerateInsertsAndDeletes(fileSystemEntryExists(parentDir, 1) ? 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,
|
|
4050
|
+
function createFsWatchCallbackForFileWatcherCallback(fileName, callback, fileSystemEntryExists) {
|
|
4051
4051
|
return function (eventName) {
|
|
4052
4052
|
if (eventName === "rename") {
|
|
4053
|
-
callback(fileName,
|
|
4053
|
+
callback(fileName, fileSystemEntryExists(fileName, 0) ? FileWatcherEventKind.Created : FileWatcherEventKind.Deleted);
|
|
4054
4054
|
}
|
|
4055
4055
|
else {
|
|
4056
4056
|
callback(fileName, FileWatcherEventKind.Changed);
|
|
@@ -4072,11 +4072,12 @@ 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,
|
|
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;
|
|
4076
4076
|
var dynamicPollingWatchFile;
|
|
4077
4077
|
var fixedChunkSizePollingWatchFile;
|
|
4078
4078
|
var nonPollingWatchFile;
|
|
4079
4079
|
var hostRecursiveDirectoryWatcher;
|
|
4080
|
+
var hitSystemWatcherLimit = false;
|
|
4080
4081
|
return {
|
|
4081
4082
|
watchFile: watchFile,
|
|
4082
4083
|
watchDirectory: watchDirectory
|
|
@@ -4094,7 +4095,7 @@ var ts;
|
|
|
4094
4095
|
case ts.WatchFileKind.FixedChunkSizePolling:
|
|
4095
4096
|
return ensureFixedChunkSizePollingWatchFile()(fileName, callback, undefined, undefined);
|
|
4096
4097
|
case ts.WatchFileKind.UseFsEvents:
|
|
4097
|
-
return fsWatch(fileName, 0, createFsWatchCallbackForFileWatcherCallback(fileName, callback,
|
|
4098
|
+
return fsWatch(fileName, 0, createFsWatchCallbackForFileWatcherCallback(fileName, callback, fileSystemEntryExists), false, pollingInterval, ts.getFallbackOptions(options));
|
|
4098
4099
|
case ts.WatchFileKind.UseFsEventsOnParentDirectory:
|
|
4099
4100
|
if (!nonPollingWatchFile) {
|
|
4100
4101
|
nonPollingWatchFile = createUseFsEventsOnParentDirectoryWatchFile(fsWatch, useCaseSensitiveFileNames);
|
|
@@ -4147,7 +4148,7 @@ var ts;
|
|
|
4147
4148
|
hostRecursiveDirectoryWatcher = createDirectoryWatcherSupportingRecursive({
|
|
4148
4149
|
useCaseSensitiveFileNames: useCaseSensitiveFileNames,
|
|
4149
4150
|
getCurrentDirectory: getCurrentDirectory,
|
|
4150
|
-
|
|
4151
|
+
fileSystemEntryExists: fileSystemEntryExists,
|
|
4151
4152
|
getAccessibleSortedChildDirectories: getAccessibleSortedChildDirectories,
|
|
4152
4153
|
watchDirectory: nonRecursiveWatchDirectory,
|
|
4153
4154
|
realpath: realpath,
|
|
@@ -4192,6 +4193,90 @@ var ts;
|
|
|
4192
4193
|
};
|
|
4193
4194
|
}
|
|
4194
4195
|
}
|
|
4196
|
+
function fsWatch(fileOrDirectory, entryKind, callback, recursive, fallbackPollingInterval, fallbackOptions) {
|
|
4197
|
+
var lastDirectoryPartWithDirectorySeparator;
|
|
4198
|
+
var lastDirectoryPart;
|
|
4199
|
+
if (inodeWatching) {
|
|
4200
|
+
lastDirectoryPartWithDirectorySeparator = fileOrDirectory.substring(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
|
+
if (relativeName && ts.endsWith(relativeName, "~")) {
|
|
4247
|
+
relativeName = relativeName.slice(0, relativeName.length - 1);
|
|
4248
|
+
sysLog("sysLog:: callbackChangingToMissingFileSystemEntry:: changed the relative name to " + relativeName);
|
|
4249
|
+
}
|
|
4250
|
+
callback(event, relativeName);
|
|
4251
|
+
if (event === "rename" &&
|
|
4252
|
+
(!relativeName ||
|
|
4253
|
+
relativeName === lastDirectoryPart ||
|
|
4254
|
+
ts.endsWith(relativeName, lastDirectoryPartWithDirectorySeparator))) {
|
|
4255
|
+
if (inodeWatching) {
|
|
4256
|
+
updateWatcher(!fileSystemEntryExists(fileOrDirectory, entryKind) ? watchMissingFileSystemEntry : watchPresentFileSystemEntry);
|
|
4257
|
+
}
|
|
4258
|
+
else if (!fileSystemEntryExists(fileOrDirectory, entryKind)) {
|
|
4259
|
+
updateWatcher(watchMissingFileSystemEntry);
|
|
4260
|
+
}
|
|
4261
|
+
}
|
|
4262
|
+
}
|
|
4263
|
+
function watchPresentFileSystemEntryWithFsWatchFile() {
|
|
4264
|
+
return watchFile(fileOrDirectory, createFileWatcherCallback(function (eventName, relativeFileName) {
|
|
4265
|
+
sysLog("sysLog:: watchPresentFileSystemEntryWithFsWatchFile:: " + fileOrDirectory + " " + entryKind + " " + eventName + ":: " + relativeFileName);
|
|
4266
|
+
callback(eventName, relativeFileName);
|
|
4267
|
+
}), fallbackPollingInterval, fallbackOptions);
|
|
4268
|
+
}
|
|
4269
|
+
function watchMissingFileSystemEntry() {
|
|
4270
|
+
return watchFile(fileOrDirectory, function (_fileName, eventKind) {
|
|
4271
|
+
sysLog("sysLog:: watchMissingFileSystemEntry:: " + fileOrDirectory + " " + entryKind + " " + _fileName + ":: " + eventKind);
|
|
4272
|
+
if (eventKind === FileWatcherEventKind.Created && fileSystemEntryExists(fileOrDirectory, entryKind)) {
|
|
4273
|
+
sysLog("sysLog:: watchMissingFileSystemEntry:: Callback :: rename, \"\" and will update the watcher");
|
|
4274
|
+
callback("rename", "");
|
|
4275
|
+
updateWatcher(watchPresentFileSystemEntry);
|
|
4276
|
+
}
|
|
4277
|
+
}, fallbackPollingInterval, fallbackOptions);
|
|
4278
|
+
}
|
|
4279
|
+
}
|
|
4195
4280
|
}
|
|
4196
4281
|
ts.createSystemWatchFunctions = createSystemWatchFunctions;
|
|
4197
4282
|
function patchWriteFileEnsuringDirectory(sys) {
|
|
@@ -4233,7 +4318,6 @@ var ts;
|
|
|
4233
4318
|
}
|
|
4234
4319
|
var activeSession;
|
|
4235
4320
|
var profilePath = "./profile.cpuprofile";
|
|
4236
|
-
var hitSystemWatcherLimit = false;
|
|
4237
4321
|
var Buffer = require("buffer").Buffer;
|
|
4238
4322
|
var nodeVersion = getNodeMajorVersion();
|
|
4239
4323
|
var isNode4OrLater = nodeVersion >= 4;
|
|
@@ -4248,18 +4332,19 @@ var ts;
|
|
|
4248
4332
|
getModifiedTime: getModifiedTime,
|
|
4249
4333
|
setTimeout: setTimeout,
|
|
4250
4334
|
clearTimeout: clearTimeout,
|
|
4251
|
-
|
|
4335
|
+
fsWatchWorker: fsWatchWorker,
|
|
4252
4336
|
useCaseSensitiveFileNames: useCaseSensitiveFileNames,
|
|
4253
4337
|
getCurrentDirectory: getCurrentDirectory,
|
|
4254
|
-
|
|
4338
|
+
fileSystemEntryExists: fileSystemEntryExists,
|
|
4255
4339
|
fsSupportsRecursiveFsWatch: fsSupportsRecursiveFsWatch,
|
|
4256
|
-
directoryExists: directoryExists,
|
|
4257
4340
|
getAccessibleSortedChildDirectories: function (path) { return getAccessibleFileSystemEntries(path).directories; },
|
|
4258
4341
|
realpath: realpath,
|
|
4259
4342
|
tscWatchFile: process.env.TSC_WATCHFILE,
|
|
4260
4343
|
useNonPollingWatchers: process.env.TSC_NONPOLLING_WATCHER,
|
|
4261
4344
|
tscWatchDirectory: process.env.TSC_WATCHDIRECTORY,
|
|
4262
4345
|
defaultWatchFileKind: function () { var _a, _b; return (_b = (_a = sys).defaultWatchFileKind) === null || _b === void 0 ? void 0 : _b.call(_a); },
|
|
4346
|
+
inodeWatching: isLinuxOrMacOs,
|
|
4347
|
+
sysLog: sysLog,
|
|
4263
4348
|
}), watchFile = _c.watchFile, watchDirectory = _c.watchDirectory;
|
|
4264
4349
|
var nodeSystem = {
|
|
4265
4350
|
args: process.argv.slice(2),
|
|
@@ -4482,76 +4567,9 @@ var ts;
|
|
|
4482
4567
|
callback(fileName, eventKind);
|
|
4483
4568
|
}
|
|
4484
4569
|
}
|
|
4485
|
-
function
|
|
4486
|
-
|
|
4487
|
-
|
|
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
|
-
}
|
|
4570
|
+
function fsWatchWorker(fileOrDirectory, recursive, callback) {
|
|
4571
|
+
return _fs.watch(fileOrDirectory, fsSupportsRecursiveFsWatch ?
|
|
4572
|
+
{ persistent: true, recursive: !!recursive } : { persistent: true }, callback);
|
|
4555
4573
|
}
|
|
4556
4574
|
function readFileWorker(fileName, _encoding) {
|
|
4557
4575
|
var buffer;
|
|
@@ -34266,7 +34284,7 @@ var ts;
|
|
|
34266
34284
|
}
|
|
34267
34285
|
if (ts.isImplicitGlob(spec.substring(spec.lastIndexOf(ts.directorySeparator) + 1))) {
|
|
34268
34286
|
return {
|
|
34269
|
-
key: useCaseSensitiveFileNames ? spec : ts.toFileNameLowerCase(spec),
|
|
34287
|
+
key: ts.removeTrailingDirectorySeparator(useCaseSensitiveFileNames ? spec : ts.toFileNameLowerCase(spec)),
|
|
34270
34288
|
flags: 1
|
|
34271
34289
|
};
|
|
34272
34290
|
}
|
|
@@ -39743,7 +39761,6 @@ var ts;
|
|
|
39743
39761
|
var emptyTypeLiteralSymbol = createSymbol(2048, "__type");
|
|
39744
39762
|
emptyTypeLiteralSymbol.members = ts.createSymbolTable();
|
|
39745
39763
|
var emptyTypeLiteralType = createAnonymousType(emptyTypeLiteralSymbol, emptySymbols, ts.emptyArray, ts.emptyArray, ts.emptyArray);
|
|
39746
|
-
var unknownUnionType = strictNullChecks ? getUnionType([undefinedType, nullType, createAnonymousType(undefined, emptySymbols, ts.emptyArray, ts.emptyArray, ts.emptyArray)]) : unknownType;
|
|
39747
39764
|
var emptyGenericType = createAnonymousType(undefined, emptySymbols, ts.emptyArray, ts.emptyArray, ts.emptyArray);
|
|
39748
39765
|
emptyGenericType.instantiations = new ts.Map();
|
|
39749
39766
|
var anyFunctionType = createAnonymousType(undefined, emptySymbols, ts.emptyArray, ts.emptyArray, ts.emptyArray);
|
|
@@ -48552,7 +48569,7 @@ var ts;
|
|
|
48552
48569
|
}
|
|
48553
48570
|
}
|
|
48554
48571
|
}
|
|
48555
|
-
else if (t.flags & 469892092
|
|
48572
|
+
else if (t.flags & 469892092) {
|
|
48556
48573
|
hasDisjointDomainType = true;
|
|
48557
48574
|
}
|
|
48558
48575
|
}
|
|
@@ -48560,7 +48577,7 @@ var ts;
|
|
|
48560
48577
|
if (hasDisjointDomainType) {
|
|
48561
48578
|
for (var _a = 0, types_6 = types; _a < types_6.length; _a++) {
|
|
48562
48579
|
var t = types_6[_a];
|
|
48563
|
-
if (t.flags & 469892092
|
|
48580
|
+
if (t.flags & 469892092) {
|
|
48564
48581
|
constraints = ts.append(constraints, t);
|
|
48565
48582
|
}
|
|
48566
48583
|
}
|
|
@@ -50830,7 +50847,7 @@ var ts;
|
|
|
50830
50847
|
}
|
|
50831
50848
|
return includes;
|
|
50832
50849
|
}
|
|
50833
|
-
function
|
|
50850
|
+
function removeRedundantPrimitiveTypes(types, includes) {
|
|
50834
50851
|
var i = types.length;
|
|
50835
50852
|
while (i > 0) {
|
|
50836
50853
|
i--;
|
|
@@ -50838,9 +50855,7 @@ var ts;
|
|
|
50838
50855
|
var remove = t.flags & 4 && includes & (128 | 134217728 | 268435456) ||
|
|
50839
50856
|
t.flags & 8 && includes & 256 ||
|
|
50840
50857
|
t.flags & 64 && includes & 2048 ||
|
|
50841
|
-
t.flags & 4096 && includes & 8192
|
|
50842
|
-
t.flags & 16384 && includes & 32768 ||
|
|
50843
|
-
isEmptyAnonymousObjectType(t) && includes & 470302716;
|
|
50858
|
+
t.flags & 4096 && includes & 8192;
|
|
50844
50859
|
if (remove) {
|
|
50845
50860
|
ts.orderedRemoveItemAt(types, i);
|
|
50846
50861
|
}
|
|
@@ -50935,7 +50950,7 @@ var ts;
|
|
|
50935
50950
|
result.aliasTypeArguments = aliasTypeArguments;
|
|
50936
50951
|
return result;
|
|
50937
50952
|
}
|
|
50938
|
-
function getIntersectionType(types, aliasSymbol, aliasTypeArguments
|
|
50953
|
+
function getIntersectionType(types, aliasSymbol, aliasTypeArguments) {
|
|
50939
50954
|
var typeMembershipMap = new ts.Map();
|
|
50940
50955
|
var includes = addTypesToIntersection(typeMembershipMap, 0, types);
|
|
50941
50956
|
var typeSet = ts.arrayFrom(typeMembershipMap.values());
|
|
@@ -50963,11 +50978,11 @@ var ts;
|
|
|
50963
50978
|
if (includes & 4 && includes & (128 | 134217728 | 268435456) ||
|
|
50964
50979
|
includes & 8 && includes & 256 ||
|
|
50965
50980
|
includes & 64 && includes & 2048 ||
|
|
50966
|
-
includes & 4096 && includes & 8192
|
|
50967
|
-
|
|
50968
|
-
|
|
50969
|
-
|
|
50970
|
-
|
|
50981
|
+
includes & 4096 && includes & 8192) {
|
|
50982
|
+
removeRedundantPrimitiveTypes(typeSet, includes);
|
|
50983
|
+
}
|
|
50984
|
+
if (includes & 16777216 && includes & 524288) {
|
|
50985
|
+
ts.orderedRemoveItemAt(typeSet, ts.findIndex(typeSet, isEmptyAnonymousObjectType));
|
|
50971
50986
|
}
|
|
50972
50987
|
if (includes & 262144) {
|
|
50973
50988
|
typeSet[typeSet.indexOf(undefinedType)] = missingType;
|
|
@@ -50999,7 +51014,7 @@ var ts;
|
|
|
50999
51014
|
return errorType;
|
|
51000
51015
|
}
|
|
51001
51016
|
var constituents = getCrossProductIntersections(typeSet);
|
|
51002
|
-
var origin = ts.some(constituents, function (t) { return !!(t.flags & 2097152); })
|
|
51017
|
+
var origin = ts.some(constituents, function (t) { return !!(t.flags & 2097152); }) ? createOriginUnionOrIntersectionType(2097152, typeSet) : undefined;
|
|
51003
51018
|
result = getUnionType(constituents, 1, aliasSymbol, aliasTypeArguments, origin);
|
|
51004
51019
|
}
|
|
51005
51020
|
}
|
|
@@ -51042,21 +51057,11 @@ var ts;
|
|
|
51042
51057
|
}
|
|
51043
51058
|
return intersections;
|
|
51044
51059
|
}
|
|
51045
|
-
function getConstituentCount(type) {
|
|
51046
|
-
return !(type.flags & 3145728) || type.aliasSymbol ? 1 :
|
|
51047
|
-
type.flags & 1048576 && type.origin ? getConstituentCount(type.origin) :
|
|
51048
|
-
getConstituentCountOfTypes(type.types);
|
|
51049
|
-
}
|
|
51050
|
-
function getConstituentCountOfTypes(types) {
|
|
51051
|
-
return ts.reduceLeft(types, function (n, t) { return n + getConstituentCount(t); }, 0);
|
|
51052
|
-
}
|
|
51053
51060
|
function getTypeFromIntersectionTypeNode(node) {
|
|
51054
51061
|
var links = getNodeLinks(node);
|
|
51055
51062
|
if (!links.resolvedType) {
|
|
51056
51063
|
var aliasSymbol = getAliasSymbolForTypeNode(node);
|
|
51057
|
-
|
|
51058
|
-
var noSupertypeReduction = types.length === 2 && !!(types[0].flags & (4 | 8 | 64)) && types[1] === emptyTypeLiteralType;
|
|
51059
|
-
links.resolvedType = getIntersectionType(types, aliasSymbol, getTypeArgumentsForAliasSymbol(aliasSymbol), noSupertypeReduction);
|
|
51064
|
+
links.resolvedType = getIntersectionType(ts.map(node.types, getTypeFromTypeNode), aliasSymbol, getTypeArgumentsForAliasSymbol(aliasSymbol));
|
|
51060
51065
|
}
|
|
51061
51066
|
return links.resolvedType;
|
|
51062
51067
|
}
|
|
@@ -53535,17 +53540,6 @@ var ts;
|
|
|
53535
53540
|
return !!(ts.getObjectFlags(type) & 16 && (type.members && isEmptyResolvedType(type) ||
|
|
53536
53541
|
type.symbol && type.symbol.flags & 2048 && getMembersOfSymbol(type.symbol).size === 0));
|
|
53537
53542
|
}
|
|
53538
|
-
function isUnknownLikeUnionType(type) {
|
|
53539
|
-
if (strictNullChecks && type.flags & 1048576) {
|
|
53540
|
-
if (!(type.objectFlags & 33554432)) {
|
|
53541
|
-
var types = type.types;
|
|
53542
|
-
type.objectFlags |= 33554432 | (types.length >= 3 && types[0].flags & 32768 &&
|
|
53543
|
-
types[1].flags & 65536 && ts.some(types, isEmptyAnonymousObjectType) ? 67108864 : 0);
|
|
53544
|
-
}
|
|
53545
|
-
return !!(type.objectFlags & 67108864);
|
|
53546
|
-
}
|
|
53547
|
-
return false;
|
|
53548
|
-
}
|
|
53549
53543
|
function isStringIndexSignatureOnlyType(type) {
|
|
53550
53544
|
return type.flags & 524288 && !isGenericMappedType(type) && getPropertiesOfType(type).length === 0 && getIndexInfosOfType(type).length === 1 && !!getIndexInfoOfType(type, stringType) ||
|
|
53551
53545
|
type.flags & 3145728 && ts.every(type.types, isStringIndexSignatureOnlyType) ||
|
|
@@ -53623,15 +53617,13 @@ var ts;
|
|
|
53623
53617
|
return true;
|
|
53624
53618
|
if (s & 65536 && (!strictNullChecks && !(t & 3145728) || t & 65536))
|
|
53625
53619
|
return true;
|
|
53626
|
-
if (s & 524288 && t & 67108864
|
|
53620
|
+
if (s & 524288 && t & 67108864)
|
|
53627
53621
|
return true;
|
|
53628
53622
|
if (relation === assignableRelation || relation === comparableRelation) {
|
|
53629
53623
|
if (s & 1)
|
|
53630
53624
|
return true;
|
|
53631
53625
|
if (s & (8 | 256) && !(s & 1024) && (t & 32 || relation === assignableRelation && t & 256 && t & 1024))
|
|
53632
53626
|
return true;
|
|
53633
|
-
if (isUnknownLikeUnionType(target))
|
|
53634
|
-
return true;
|
|
53635
53627
|
}
|
|
53636
53628
|
return false;
|
|
53637
53629
|
}
|
|
@@ -53673,27 +53665,16 @@ var ts;
|
|
|
53673
53665
|
function getNormalizedType(type, writing) {
|
|
53674
53666
|
while (true) {
|
|
53675
53667
|
var t = isFreshLiteralType(type) ? type.regularType :
|
|
53676
|
-
ts.getObjectFlags(type) & 4
|
|
53677
|
-
type.flags & 3145728 ?
|
|
53668
|
+
ts.getObjectFlags(type) & 4 && type.node ? createTypeReference(type.target, getTypeArguments(type)) :
|
|
53669
|
+
type.flags & 3145728 ? getReducedType(type) :
|
|
53678
53670
|
type.flags & 33554432 ? writing ? type.baseType : type.substitute :
|
|
53679
53671
|
type.flags & 25165824 ? getSimplifiedType(type, writing) :
|
|
53680
53672
|
type;
|
|
53673
|
+
t = getSingleBaseForNonAugmentingSubtype(t) || t;
|
|
53681
53674
|
if (t === type)
|
|
53682
|
-
|
|
53675
|
+
break;
|
|
53683
53676
|
type = t;
|
|
53684
53677
|
}
|
|
53685
|
-
}
|
|
53686
|
-
function getNormalizedUnionOrIntersectionType(type, writing) {
|
|
53687
|
-
var reduced = getReducedType(type);
|
|
53688
|
-
if (reduced !== type) {
|
|
53689
|
-
return reduced;
|
|
53690
|
-
}
|
|
53691
|
-
if (type.flags & 2097152) {
|
|
53692
|
-
var normalizedTypes = ts.sameMap(type.types, function (t) { return getNormalizedType(t, writing); });
|
|
53693
|
-
if (normalizedTypes !== type.types) {
|
|
53694
|
-
return getIntersectionType(normalizedTypes);
|
|
53695
|
-
}
|
|
53696
|
-
}
|
|
53697
53678
|
return type;
|
|
53698
53679
|
}
|
|
53699
53680
|
function checkTypeRelatedTo(source, target, relation, errorNode, headMessage, containingMessageChain, errorOutputContainer) {
|
|
@@ -56237,19 +56218,16 @@ var ts;
|
|
|
56237
56218
|
return type.flags & 32768 ? type : getUnionType([type, isProperty ? missingType : undefinedType]);
|
|
56238
56219
|
}
|
|
56239
56220
|
function getGlobalNonNullableTypeInstantiation(type) {
|
|
56221
|
+
var reducedType = getTypeWithFacts(type, 2097152);
|
|
56240
56222
|
if (!deferredGlobalNonNullableTypeAlias) {
|
|
56241
56223
|
deferredGlobalNonNullableTypeAlias = getGlobalSymbol("NonNullable", 524288, undefined) || unknownSymbol;
|
|
56242
56224
|
}
|
|
56243
56225
|
return deferredGlobalNonNullableTypeAlias !== unknownSymbol ?
|
|
56244
|
-
getTypeAliasInstantiation(deferredGlobalNonNullableTypeAlias, [
|
|
56245
|
-
|
|
56226
|
+
getTypeAliasInstantiation(deferredGlobalNonNullableTypeAlias, [reducedType]) :
|
|
56227
|
+
reducedType;
|
|
56246
56228
|
}
|
|
56247
56229
|
function getNonNullableType(type) {
|
|
56248
|
-
|
|
56249
|
-
var reducedType = getTypeWithFacts(type, 2097152);
|
|
56250
|
-
return maybeTypeOfKind(reducedType, 465829888) ? getGlobalNonNullableTypeInstantiation(reducedType) : reducedType;
|
|
56251
|
-
}
|
|
56252
|
-
return type;
|
|
56230
|
+
return strictNullChecks ? getGlobalNonNullableTypeInstantiation(type) : type;
|
|
56253
56231
|
}
|
|
56254
56232
|
function addOptionalTypeMarker(type) {
|
|
56255
56233
|
return strictNullChecks ? getUnionType([type, optionalType]) : type;
|
|
@@ -58012,24 +57990,6 @@ var ts;
|
|
|
58012
57990
|
function getTypeWithFacts(type, include) {
|
|
58013
57991
|
return filterType(type, function (t) { return (getTypeFacts(t) & include) !== 0; });
|
|
58014
57992
|
}
|
|
58015
|
-
function getIntersectionWithFacts(type, facts) {
|
|
58016
|
-
var reduced = recombineUnknownType(getTypeWithFacts(strictNullChecks && type.flags & 2 ? unknownUnionType : type, facts));
|
|
58017
|
-
if (strictNullChecks) {
|
|
58018
|
-
switch (facts) {
|
|
58019
|
-
case 524288:
|
|
58020
|
-
return mapType(reduced, function (t) { return getTypeFacts(t) & 65536 ? getIntersectionType([t, getTypeFacts(t) & 131072 && !maybeTypeOfKind(reduced, 65536) ? getUnionType([emptyObjectType, nullType]) : emptyObjectType]) : t; });
|
|
58021
|
-
case 1048576:
|
|
58022
|
-
return mapType(reduced, function (t) { return getTypeFacts(t) & 131072 ? getIntersectionType([t, getTypeFacts(t) & 65536 && !maybeTypeOfKind(reduced, 32768) ? getUnionType([emptyObjectType, undefinedType]) : emptyObjectType]) : t; });
|
|
58023
|
-
case 2097152:
|
|
58024
|
-
case 4194304:
|
|
58025
|
-
return mapType(reduced, function (t) { return getTypeFacts(t) & 262144 ? getGlobalNonNullableTypeInstantiation(t) : t; });
|
|
58026
|
-
}
|
|
58027
|
-
}
|
|
58028
|
-
return reduced;
|
|
58029
|
-
}
|
|
58030
|
-
function recombineUnknownType(type) {
|
|
58031
|
-
return type === unknownUnionType ? unknownType : type;
|
|
58032
|
-
}
|
|
58033
57993
|
function getTypeWithDefault(type, defaultExpression) {
|
|
58034
57994
|
return defaultExpression ?
|
|
58035
57995
|
getUnionType([getNonUndefinedType(type), getTypeOfExpression(defaultExpression)]) :
|
|
@@ -58970,7 +58930,7 @@ var ts;
|
|
|
58970
58930
|
if (isEvolvingArrayTypeList(types)) {
|
|
58971
58931
|
return getEvolvingArrayType(getUnionType(ts.map(types, getElementTypeOfEvolvingArrayType)));
|
|
58972
58932
|
}
|
|
58973
|
-
var result =
|
|
58933
|
+
var result = getUnionType(ts.sameMap(types, finalizeEvolvingArrayType), subtypeReduction);
|
|
58974
58934
|
if (result !== declaredType && result.flags & declaredType.flags & 1048576 && ts.arraysEqual(result.types, declaredType.types)) {
|
|
58975
58935
|
return declaredType;
|
|
58976
58936
|
}
|
|
@@ -59066,7 +59026,8 @@ var ts;
|
|
|
59066
59026
|
}
|
|
59067
59027
|
function narrowTypeByTruthiness(type, expr, assumeTrue) {
|
|
59068
59028
|
if (isMatchingReference(reference, expr)) {
|
|
59069
|
-
return
|
|
59029
|
+
return type.flags & 2 && assumeTrue ? nonNullUnknownType :
|
|
59030
|
+
getTypeWithFacts(type, assumeTrue ? 4194304 : 8388608);
|
|
59070
59031
|
}
|
|
59071
59032
|
if (strictNullChecks && assumeTrue && optionalChainContainsReference(expr, reference)) {
|
|
59072
59033
|
type = getTypeWithFacts(type, 2097152);
|
|
@@ -59206,6 +59167,9 @@ var ts;
|
|
|
59206
59167
|
assumeTrue = !assumeTrue;
|
|
59207
59168
|
}
|
|
59208
59169
|
var valueType = getTypeOfExpression(value);
|
|
59170
|
+
if (assumeTrue && (type.flags & 2) && (operator === 34 || operator === 35) && (valueType.flags & 65536)) {
|
|
59171
|
+
return getUnionType([nullType, undefinedType]);
|
|
59172
|
+
}
|
|
59209
59173
|
if ((type.flags & 2) && assumeTrue && (operator === 36 || operator === 37)) {
|
|
59210
59174
|
if (valueType.flags & (131068 | 67108864)) {
|
|
59211
59175
|
return valueType;
|
|
@@ -59225,7 +59189,7 @@ var ts;
|
|
|
59225
59189
|
valueType.flags & 65536 ?
|
|
59226
59190
|
assumeTrue ? 131072 : 1048576 :
|
|
59227
59191
|
assumeTrue ? 65536 : 524288;
|
|
59228
|
-
return
|
|
59192
|
+
return type.flags & 2 && facts & (1048576 | 2097152) ? nonNullUnknownType : getTypeWithFacts(type, facts);
|
|
59229
59193
|
}
|
|
59230
59194
|
if (assumeTrue) {
|
|
59231
59195
|
var filterFn = operator === 34 ?
|
|
@@ -59252,11 +59216,14 @@ var ts;
|
|
|
59252
59216
|
if (type.flags & 1 && literal.text === "function") {
|
|
59253
59217
|
return type;
|
|
59254
59218
|
}
|
|
59219
|
+
if (assumeTrue && type.flags & 2 && literal.text === "object") {
|
|
59220
|
+
return type === nonNullUnknownType ? nonPrimitiveType : getUnionType([nonPrimitiveType, nullType]);
|
|
59221
|
+
}
|
|
59255
59222
|
var facts = assumeTrue ?
|
|
59256
59223
|
typeofEQFacts.get(literal.text) || 128 :
|
|
59257
59224
|
typeofNEFacts.get(literal.text) || 32768;
|
|
59258
59225
|
var impliedType = getImpliedTypeFromTypeofGuard(type, literal.text);
|
|
59259
|
-
return getTypeWithFacts(assumeTrue && impliedType ?
|
|
59226
|
+
return getTypeWithFacts(assumeTrue && impliedType ? mapType(type, narrowUnionMemberByTypeof(impliedType)) : type, facts);
|
|
59260
59227
|
}
|
|
59261
59228
|
function narrowTypeBySwitchOptionalChainContainment(type, switchStatement, clauseStart, clauseEnd, clauseCheck) {
|
|
59262
59229
|
var everyClauseChecks = clauseStart !== clauseEnd && ts.every(getSwitchClauseTypes(switchStatement).slice(clauseStart, clauseEnd), clauseCheck);
|
|
@@ -59301,35 +59268,30 @@ var ts;
|
|
|
59301
59268
|
}
|
|
59302
59269
|
function getImpliedTypeFromTypeofGuard(type, text) {
|
|
59303
59270
|
switch (text) {
|
|
59304
|
-
case "object":
|
|
59305
|
-
return type.flags & 1 ? type : getUnionType([nullType, nonPrimitiveType]);
|
|
59306
59271
|
case "function":
|
|
59307
59272
|
return type.flags & 1 ? type : globalFunctionType;
|
|
59273
|
+
case "object":
|
|
59274
|
+
return type.flags & 2 ? getUnionType([nonPrimitiveType, nullType]) : type;
|
|
59308
59275
|
default:
|
|
59309
59276
|
return typeofTypesByName.get(text);
|
|
59310
59277
|
}
|
|
59311
59278
|
}
|
|
59312
|
-
function
|
|
59313
|
-
|
|
59314
|
-
|
|
59315
|
-
|
|
59316
|
-
return mapType(type, function (t) {
|
|
59317
|
-
if (isTypeRelatedTo(t, candidate, strictSubtypeRelation)) {
|
|
59318
|
-
return t;
|
|
59279
|
+
function narrowUnionMemberByTypeof(candidate) {
|
|
59280
|
+
return function (type) {
|
|
59281
|
+
if (isTypeSubtypeOf(type, candidate)) {
|
|
59282
|
+
return type;
|
|
59319
59283
|
}
|
|
59320
|
-
|
|
59321
|
-
|
|
59322
|
-
|
|
59323
|
-
|
|
59324
|
-
|
|
59325
|
-
|
|
59326
|
-
|
|
59327
|
-
if (c === globalFunctionType && isTypeSubtypeOf(c, t)) {
|
|
59328
|
-
return c;
|
|
59284
|
+
if (isTypeSubtypeOf(candidate, type)) {
|
|
59285
|
+
return candidate;
|
|
59286
|
+
}
|
|
59287
|
+
if (type.flags & 465829888) {
|
|
59288
|
+
var constraint = getBaseConstraintOfType(type) || anyType;
|
|
59289
|
+
if (isTypeSubtypeOf(candidate, constraint)) {
|
|
59290
|
+
return getIntersectionType([type, candidate]);
|
|
59329
59291
|
}
|
|
59330
|
-
|
|
59331
|
-
|
|
59332
|
-
}
|
|
59292
|
+
}
|
|
59293
|
+
return type;
|
|
59294
|
+
};
|
|
59333
59295
|
}
|
|
59334
59296
|
function narrowBySwitchOnTypeOf(type, switchStatement, clauseStart, clauseEnd) {
|
|
59335
59297
|
var switchWitnesses = getSwitchClauseTypeOfWitnesses(switchStatement, true);
|
|
@@ -59355,7 +59317,7 @@ var ts;
|
|
|
59355
59317
|
return filterType(type, function (t) { return (getTypeFacts(t) & switchFacts) === switchFacts; });
|
|
59356
59318
|
}
|
|
59357
59319
|
var impliedType = getTypeWithFacts(getUnionType(clauseWitnesses.map(function (text) { return getImpliedTypeFromTypeofGuard(type, text) || type; })), switchFacts);
|
|
59358
|
-
return getTypeWithFacts(
|
|
59320
|
+
return getTypeWithFacts(mapType(type, narrowUnionMemberByTypeof(impliedType)), switchFacts);
|
|
59359
59321
|
}
|
|
59360
59322
|
function isMatchingConstructorReference(expr) {
|
|
59361
59323
|
return (ts.isPropertyAccessExpression(expr) && ts.idText(expr.name) === "constructor" ||
|
|
@@ -59616,9 +59578,7 @@ var ts;
|
|
|
59616
59578
|
!(someType(type, isGenericTypeWithoutNullableConstraint) && isGenericIndexType(getTypeOfExpression(parent.argumentExpression)));
|
|
59617
59579
|
}
|
|
59618
59580
|
function isGenericTypeWithUnionConstraint(type) {
|
|
59619
|
-
return type.flags &
|
|
59620
|
-
ts.some(type.types, isGenericTypeWithUnionConstraint) :
|
|
59621
|
-
!!(type.flags & 465829888 && getBaseConstraintOrType(type).flags & (98304 | 1048576));
|
|
59581
|
+
return !!(type.flags & 465829888 && getBaseConstraintOrType(type).flags & (98304 | 1048576));
|
|
59622
59582
|
}
|
|
59623
59583
|
function isGenericTypeWithoutNullableConstraint(type) {
|
|
59624
59584
|
return !!(type.flags & 465829888 && !maybeTypeOfKind(getBaseConstraintOrType(type), 98304));
|
|
@@ -59635,7 +59595,7 @@ var ts;
|
|
|
59635
59595
|
var substituteConstraints = !(checkMode && checkMode & 2) &&
|
|
59636
59596
|
someType(type, isGenericTypeWithUnionConstraint) &&
|
|
59637
59597
|
(isConstraintPosition(type, reference) || hasContextualTypeWithNoGenericTypes(reference, checkMode));
|
|
59638
|
-
return substituteConstraints ? mapType(type, getBaseConstraintOrType) : type;
|
|
59598
|
+
return substituteConstraints ? mapType(type, function (t) { return t.flags & 465829888 ? getBaseConstraintOrType(t) : t; }) : type;
|
|
59639
59599
|
}
|
|
59640
59600
|
function isExportOrExportExpression(location) {
|
|
59641
59601
|
return !!ts.findAncestor(location, function (n) {
|
|
@@ -102403,6 +102363,7 @@ var ts;
|
|
|
102403
102363
|
}
|
|
102404
102364
|
function reloadFileNamesFromConfigFile() {
|
|
102405
102365
|
writeLog("Reloading new file names and options");
|
|
102366
|
+
reloadLevel = ts.ConfigFileProgramReloadLevel.None;
|
|
102406
102367
|
rootFileNames = ts.getFileNamesFromConfigSpecs(compilerOptions.configFile.configFileSpecs, ts.getNormalizedAbsolutePath(ts.getDirectoryPath(configFileName), currentDirectory), compilerOptions, parseConfigFileHost, extraFileExtensions);
|
|
102407
102368
|
if (ts.updateErrorForNoInputFiles(rootFileNames, ts.getNormalizedAbsolutePath(configFileName, currentDirectory), compilerOptions.configFile.configFileSpecs, configFileParsingDiagnostics, canConfigFileJsonReportNoInputFiles)) {
|
|
102408
102369
|
hasChangedConfigFileParsingErrors = true;
|