@typescript-deploys/pr-build 4.9.0-pr-50306-2 → 4.9.0-pr-50366-2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintcache +1 -0
- package/lib/cs/diagnosticMessages.generated.json +1 -1
- package/lib/de/diagnosticMessages.generated.json +1 -1
- package/lib/es/diagnosticMessages.generated.json +1 -1
- package/lib/fr/diagnosticMessages.generated.json +1 -1
- package/lib/it/diagnosticMessages.generated.json +1 -1
- package/lib/ja/diagnosticMessages.generated.json +1 -1
- package/lib/ko/diagnosticMessages.generated.json +1 -1
- package/lib/lib.es2020.intl.d.ts +1 -1
- package/lib/lib.es5.d.ts +4 -6
- package/lib/pl/diagnosticMessages.generated.json +1 -1
- package/lib/pt-br/diagnosticMessages.generated.json +1 -1
- package/lib/ru/diagnosticMessages.generated.json +1 -1
- package/lib/tr/diagnosticMessages.generated.json +1 -1
- package/lib/tsc.js +472 -477
- package/lib/tsserver.js +569 -568
- package/lib/tsserverlibrary.js +569 -554
- package/lib/typescript.js +569 -554
- package/lib/typescriptServices.js +569 -554
- package/lib/typingsInstaller.js +497 -505
- package/lib/zh-cn/diagnosticMessages.generated.json +8 -8
- package/lib/zh-tw/diagnosticMessages.generated.json +1 -1
- package/package.json +2 -3
|
@@ -99,7 +99,7 @@ var ts;
|
|
|
99
99
|
// The following is baselined as a literal template type without intervention
|
|
100
100
|
/** The version of the TypeScript compiler release */
|
|
101
101
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
102
|
-
ts.version = ts.versionMajorMinor + ".0-insiders.
|
|
102
|
+
ts.version = ts.versionMajorMinor + ".0-insiders.20220819";
|
|
103
103
|
/* @internal */
|
|
104
104
|
var Comparison;
|
|
105
105
|
(function (Comparison) {
|
|
@@ -1153,6 +1153,13 @@ var ts;
|
|
|
1153
1153
|
: undefined;
|
|
1154
1154
|
}
|
|
1155
1155
|
ts.singleOrUndefined = singleOrUndefined;
|
|
1156
|
+
/**
|
|
1157
|
+
* Returns the only element of an array if it contains only one element; throws otherwise.
|
|
1158
|
+
*/
|
|
1159
|
+
function single(array) {
|
|
1160
|
+
return ts.Debug.checkDefined(singleOrUndefined(array));
|
|
1161
|
+
}
|
|
1162
|
+
ts.single = single;
|
|
1156
1163
|
function singleOrMany(array) {
|
|
1157
1164
|
return array && array.length === 1
|
|
1158
1165
|
? array[0]
|
|
@@ -6124,7 +6131,6 @@ var ts;
|
|
|
6124
6131
|
var pollingChunkSize = createPollingIntervalBasedLevels(defaultChunkLevels);
|
|
6125
6132
|
/* @internal */
|
|
6126
6133
|
ts.unchangedPollThresholds = createPollingIntervalBasedLevels(defaultChunkLevels);
|
|
6127
|
-
/* @internal */
|
|
6128
6134
|
function setCustomPollingValues(system) {
|
|
6129
6135
|
if (!system.getEnvironmentVariable) {
|
|
6130
6136
|
return;
|
|
@@ -6167,7 +6173,6 @@ var ts;
|
|
|
6167
6173
|
createPollingIntervalBasedLevels(customLevels ? __assign(__assign({}, defaultLevels), customLevels) : defaultLevels);
|
|
6168
6174
|
}
|
|
6169
6175
|
}
|
|
6170
|
-
ts.setCustomPollingValues = setCustomPollingValues;
|
|
6171
6176
|
function pollWatchedFileQueue(host, queue, pollIndex, chunkSize, callbackOnWatchFileStat) {
|
|
6172
6177
|
var definedValueCopyToIndex = pollIndex;
|
|
6173
6178
|
// Max visit would be all elements of the queue
|
|
@@ -6213,7 +6218,6 @@ var ts;
|
|
|
6213
6218
|
}
|
|
6214
6219
|
}
|
|
6215
6220
|
}
|
|
6216
|
-
/* @internal */
|
|
6217
6221
|
function createDynamicPriorityPollingWatchFile(host) {
|
|
6218
6222
|
var watchedFiles = [];
|
|
6219
6223
|
var changedFilesInLastPoll = [];
|
|
@@ -6322,7 +6326,6 @@ var ts;
|
|
|
6322
6326
|
pollingIntervalQueue(pollingInterval).pollScheduled = host.setTimeout(pollingInterval === PollingInterval.Low ? pollLowPollingIntervalQueue : pollPollingIntervalQueue, pollingInterval, pollingIntervalQueue(pollingInterval));
|
|
6323
6327
|
}
|
|
6324
6328
|
}
|
|
6325
|
-
ts.createDynamicPriorityPollingWatchFile = createDynamicPriorityPollingWatchFile;
|
|
6326
6329
|
function createUseFsEventsOnParentDirectoryWatchFile(fsWatch, useCaseSensitiveFileNames) {
|
|
6327
6330
|
// One file can have multiple watchers
|
|
6328
6331
|
var fileWatcherCallbacks = ts.createMultiMap();
|
|
@@ -6401,42 +6404,36 @@ var ts;
|
|
|
6401
6404
|
pollScheduled = host.setTimeout(pollQueue, PollingInterval.High);
|
|
6402
6405
|
}
|
|
6403
6406
|
}
|
|
6404
|
-
|
|
6405
|
-
function createSingleFileWatcherPerName(watchFile, useCaseSensitiveFileNames) {
|
|
6406
|
-
var cache = new ts.Map();
|
|
6407
|
-
var callbacksCache = ts.createMultiMap();
|
|
6407
|
+
function createSingleWatcherPerName(cache, useCaseSensitiveFileNames, name, callback, createWatcher) {
|
|
6408
6408
|
var toCanonicalFileName = ts.createGetCanonicalFileName(useCaseSensitiveFileNames);
|
|
6409
|
-
|
|
6410
|
-
|
|
6411
|
-
|
|
6412
|
-
|
|
6413
|
-
|
|
6414
|
-
|
|
6415
|
-
|
|
6416
|
-
|
|
6417
|
-
|
|
6418
|
-
|
|
6419
|
-
|
|
6409
|
+
var path = toCanonicalFileName(name);
|
|
6410
|
+
var existing = cache.get(path);
|
|
6411
|
+
if (existing) {
|
|
6412
|
+
existing.callbacks.push(callback);
|
|
6413
|
+
}
|
|
6414
|
+
else {
|
|
6415
|
+
cache.set(path, {
|
|
6416
|
+
watcher: createWatcher((
|
|
6417
|
+
// Cant infer types correctly so lets satisfy checker
|
|
6418
|
+
function (param1, param2, param3) { var _a; return (_a = cache.get(path)) === null || _a === void 0 ? void 0 : _a.callbacks.slice().forEach(function (cb) { return cb(param1, param2, param3); }); })),
|
|
6419
|
+
callbacks: [callback]
|
|
6420
|
+
});
|
|
6421
|
+
}
|
|
6422
|
+
return {
|
|
6423
|
+
close: function () {
|
|
6424
|
+
var watcher = cache.get(path);
|
|
6425
|
+
if (!watcher)
|
|
6426
|
+
return;
|
|
6427
|
+
if (!ts.orderedRemoveItem(watcher.callbacks, callback) || watcher.callbacks.length)
|
|
6428
|
+
return;
|
|
6429
|
+
cache.delete(path);
|
|
6430
|
+
ts.closeFileWatcherOf(watcher);
|
|
6420
6431
|
}
|
|
6421
|
-
callbacksCache.add(path, callback);
|
|
6422
|
-
return {
|
|
6423
|
-
close: function () {
|
|
6424
|
-
var watcher = ts.Debug.checkDefined(cache.get(path));
|
|
6425
|
-
callbacksCache.remove(path, callback);
|
|
6426
|
-
watcher.refCount--;
|
|
6427
|
-
if (watcher.refCount)
|
|
6428
|
-
return;
|
|
6429
|
-
cache.delete(path);
|
|
6430
|
-
ts.closeFileWatcherOf(watcher);
|
|
6431
|
-
}
|
|
6432
|
-
};
|
|
6433
6432
|
};
|
|
6434
6433
|
}
|
|
6435
|
-
ts.createSingleFileWatcherPerName = createSingleFileWatcherPerName;
|
|
6436
6434
|
/**
|
|
6437
6435
|
* Returns true if file status changed
|
|
6438
6436
|
*/
|
|
6439
|
-
/*@internal*/
|
|
6440
6437
|
function onWatchedFileStat(watchedFile, modifiedTime) {
|
|
6441
6438
|
var oldTime = watchedFile.mtime.getTime();
|
|
6442
6439
|
var newTime = modifiedTime.getTime();
|
|
@@ -6448,7 +6445,6 @@ var ts;
|
|
|
6448
6445
|
}
|
|
6449
6446
|
return false;
|
|
6450
6447
|
}
|
|
6451
|
-
ts.onWatchedFileStat = onWatchedFileStat;
|
|
6452
6448
|
/*@internal*/
|
|
6453
6449
|
function getFileWatcherEventKind(oldTime, newTime) {
|
|
6454
6450
|
return oldTime === 0
|
|
@@ -6476,7 +6472,6 @@ var ts;
|
|
|
6476
6472
|
* that means if this is recursive watcher, watch the children directories as well
|
|
6477
6473
|
* (eg on OS that dont support recursive watch using fs.watch use fs.watchFile)
|
|
6478
6474
|
*/
|
|
6479
|
-
/*@internal*/
|
|
6480
6475
|
function createDirectoryWatcherSupportingRecursive(_a) {
|
|
6481
6476
|
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;
|
|
6482
6477
|
var cache = new ts.Map();
|
|
@@ -6685,18 +6680,15 @@ var ts;
|
|
|
6685
6680
|
return ts.stringContains(toCanonicalFilePath(path), searchPath);
|
|
6686
6681
|
}
|
|
6687
6682
|
}
|
|
6688
|
-
ts.createDirectoryWatcherSupportingRecursive = createDirectoryWatcherSupportingRecursive;
|
|
6689
6683
|
/*@internal*/
|
|
6690
6684
|
var FileSystemEntryKind;
|
|
6691
6685
|
(function (FileSystemEntryKind) {
|
|
6692
6686
|
FileSystemEntryKind[FileSystemEntryKind["File"] = 0] = "File";
|
|
6693
6687
|
FileSystemEntryKind[FileSystemEntryKind["Directory"] = 1] = "Directory";
|
|
6694
6688
|
})(FileSystemEntryKind = ts.FileSystemEntryKind || (ts.FileSystemEntryKind = {}));
|
|
6695
|
-
/*@internal*/
|
|
6696
6689
|
function createFileWatcherCallback(callback) {
|
|
6697
6690
|
return function (_fileName, eventKind, modifiedTime) { return callback(eventKind === FileWatcherEventKind.Changed ? "change" : "rename", "", modifiedTime); };
|
|
6698
6691
|
}
|
|
6699
|
-
ts.createFileWatcherCallback = createFileWatcherCallback;
|
|
6700
6692
|
function createFsWatchCallbackForFileWatcherCallback(fileName, callback, getModifiedTime) {
|
|
6701
6693
|
return function (eventName, _relativeFileName, modifiedTime) {
|
|
6702
6694
|
if (eventName === "rename") {
|
|
@@ -6730,7 +6722,10 @@ var ts;
|
|
|
6730
6722
|
}
|
|
6731
6723
|
/*@internal*/
|
|
6732
6724
|
function createSystemWatchFunctions(_a) {
|
|
6733
|
-
var
|
|
6725
|
+
var pollingWatchFileWorker = _a.pollingWatchFileWorker, 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;
|
|
6726
|
+
var pollingWatches = new ts.Map();
|
|
6727
|
+
var fsWatches = new ts.Map();
|
|
6728
|
+
var fsWatchesRecursive = new ts.Map();
|
|
6734
6729
|
var dynamicPollingWatchFile;
|
|
6735
6730
|
var fixedChunkSizePollingWatchFile;
|
|
6736
6731
|
var nonPollingWatchFile;
|
|
@@ -6794,7 +6789,7 @@ var ts;
|
|
|
6794
6789
|
// Use notifications from FS to watch with falling back to fs.watchFile
|
|
6795
6790
|
generateWatchFileOptions(ts.WatchFileKind.UseFsEventsOnParentDirectory, ts.PollingWatchKind.PriorityInterval, options) :
|
|
6796
6791
|
// Default to do not use fixed polling interval
|
|
6797
|
-
{ watchFile: (defaultWatchFileKind === null || defaultWatchFileKind === void 0 ? void 0 : defaultWatchFileKind()) || ts.WatchFileKind.
|
|
6792
|
+
{ watchFile: (defaultWatchFileKind === null || defaultWatchFileKind === void 0 ? void 0 : defaultWatchFileKind()) || ts.WatchFileKind.UseFsEvents };
|
|
6798
6793
|
}
|
|
6799
6794
|
}
|
|
6800
6795
|
function generateWatchFileOptions(watchFile, fallbackPolling, options) {
|
|
@@ -6865,7 +6860,13 @@ var ts;
|
|
|
6865
6860
|
};
|
|
6866
6861
|
}
|
|
6867
6862
|
}
|
|
6863
|
+
function pollingWatchFile(fileName, callback, pollingInterval, options) {
|
|
6864
|
+
return createSingleWatcherPerName(pollingWatches, useCaseSensitiveFileNames, fileName, callback, function (cb) { return pollingWatchFileWorker(fileName, cb, pollingInterval, options); });
|
|
6865
|
+
}
|
|
6868
6866
|
function fsWatch(fileOrDirectory, entryKind, callback, recursive, fallbackPollingInterval, fallbackOptions) {
|
|
6867
|
+
return createSingleWatcherPerName(recursive ? fsWatchesRecursive : fsWatches, useCaseSensitiveFileNames, fileOrDirectory, callback, function (cb) { return fsWatchHandlingPresence(fileOrDirectory, entryKind, cb, recursive, fallbackPollingInterval, fallbackOptions); });
|
|
6868
|
+
}
|
|
6869
|
+
function fsWatchHandlingPresence(fileOrDirectory, entryKind, callback, recursive, fallbackPollingInterval, fallbackOptions) {
|
|
6869
6870
|
var lastDirectoryPartWithDirectorySeparator;
|
|
6870
6871
|
var lastDirectoryPart;
|
|
6871
6872
|
if (inodeWatching) {
|
|
@@ -7044,7 +7045,7 @@ var ts;
|
|
|
7044
7045
|
var fsSupportsRecursiveFsWatch = isNode4OrLater && (process.platform === "win32" || process.platform === "darwin");
|
|
7045
7046
|
var getCurrentDirectory = ts.memoize(function () { return process.cwd(); });
|
|
7046
7047
|
var _b = createSystemWatchFunctions({
|
|
7047
|
-
|
|
7048
|
+
pollingWatchFileWorker: fsWatchFileWorker,
|
|
7048
7049
|
getModifiedTime: getModifiedTime,
|
|
7049
7050
|
setTimeout: setTimeout,
|
|
7050
7051
|
clearTimeout: clearTimeout,
|
|
@@ -8891,7 +8892,7 @@ var ts;
|
|
|
8891
8892
|
Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode_and_then_add_node_to_the_types_field_in_your_tsconfig: diag(2591, ts.DiagnosticCategory.Error, "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashno_2591", "Cannot find name '{0}'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig."),
|
|
8892
8893
|
Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery_and_then_add_jquery_to_the_types_field_in_your_tsconfig: diag(2592, ts.DiagnosticCategory.Error, "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slash_2592", "Cannot find name '{0}'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery` and then add 'jquery' to the types field in your tsconfig."),
|
|
8893
8894
|
Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha_and_then_add_jest_or_mocha_to_the_types_field_in_your_tsconfig: diag(2593, ts.DiagnosticCategory.Error, "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_type_2593", "Cannot find name '{0}'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig."),
|
|
8894
|
-
|
|
8895
|
+
This_module_is_declared_with_export_and_can_only_be_used_with_a_default_import_when_using_the_0_flag: diag(2594, ts.DiagnosticCategory.Error, "This_module_is_declared_with_export_and_can_only_be_used_with_a_default_import_when_using_the_0_flag_2594", "This module is declared with 'export =', and can only be used with a default import when using the '{0}' flag."),
|
|
8895
8896
|
_0_can_only_be_imported_by_using_a_default_import: diag(2595, ts.DiagnosticCategory.Error, "_0_can_only_be_imported_by_using_a_default_import_2595", "'{0}' can only be imported by using a default import."),
|
|
8896
8897
|
_0_can_only_be_imported_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import: diag(2596, ts.DiagnosticCategory.Error, "_0_can_only_be_imported_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import_2596", "'{0}' can only be imported by turning on the 'esModuleInterop' flag and using a default import."),
|
|
8897
8898
|
_0_can_only_be_imported_by_using_a_require_call_or_by_using_a_default_import: diag(2597, ts.DiagnosticCategory.Error, "_0_can_only_be_imported_by_using_a_require_call_or_by_using_a_default_import_2597", "'{0}' can only be imported by using a 'require' call or by using a default import."),
|
|
@@ -18118,7 +18119,7 @@ var ts;
|
|
|
18118
18119
|
}
|
|
18119
18120
|
diagnostics = nonFileDiagnostics;
|
|
18120
18121
|
}
|
|
18121
|
-
ts.insertSorted(diagnostics, diagnostic,
|
|
18122
|
+
ts.insertSorted(diagnostics, diagnostic, compareDiagnosticsSkipRelatedInformation);
|
|
18122
18123
|
}
|
|
18123
18124
|
function getGlobalDiagnostics() {
|
|
18124
18125
|
hasReadNonFileDiagnostics = true;
|
|
@@ -43095,10 +43096,12 @@ var ts;
|
|
|
43095
43096
|
if (resolved) {
|
|
43096
43097
|
var fileName = resolved.fileName, packageId = resolved.packageId;
|
|
43097
43098
|
var resolvedFileName = options.preserveSymlinks ? fileName : realPath(fileName, host, traceEnabled);
|
|
43099
|
+
var pathsAreEqual = arePathsEqual(fileName, resolvedFileName, host);
|
|
43098
43100
|
resolvedTypeReferenceDirective = {
|
|
43099
43101
|
primary: primary,
|
|
43100
|
-
|
|
43101
|
-
|
|
43102
|
+
// If the fileName and realpath are differing only in casing prefer fileName so that we can issue correct errors for casing under forceConsistentCasingInFileNames
|
|
43103
|
+
resolvedFileName: pathsAreEqual ? fileName : resolvedFileName,
|
|
43104
|
+
originalPath: pathsAreEqual ? undefined : fileName,
|
|
43102
43105
|
packageId: packageId,
|
|
43103
43106
|
isExternalLibraryImport: pathContainsNodeModules(fileName),
|
|
43104
43107
|
};
|
|
@@ -43883,8 +43886,10 @@ var ts;
|
|
|
43883
43886
|
var resolvedValue = resolved_1.value;
|
|
43884
43887
|
if (!compilerOptions.preserveSymlinks && resolvedValue && !resolvedValue.originalPath) {
|
|
43885
43888
|
var path = realPath(resolvedValue.path, host, traceEnabled);
|
|
43886
|
-
var
|
|
43887
|
-
|
|
43889
|
+
var pathsAreEqual = arePathsEqual(path, resolvedValue.path, host);
|
|
43890
|
+
var originalPath = pathsAreEqual ? undefined : resolvedValue.path;
|
|
43891
|
+
// If the path and realpath are differing only in casing prefer path so that we can issue correct errors for casing under forceConsistentCasingInFileNames
|
|
43892
|
+
resolvedValue = __assign(__assign({}, resolvedValue), { path: pathsAreEqual ? resolvedValue.path : path, originalPath: originalPath });
|
|
43888
43893
|
}
|
|
43889
43894
|
// For node_modules lookups, get the real path so that multiple accesses to an `npm link`-ed module do not create duplicate files.
|
|
43890
43895
|
return { value: resolvedValue && { resolved: resolvedValue, isExternalLibraryImport: true } };
|
|
@@ -51045,7 +51050,7 @@ var ts;
|
|
|
51045
51050
|
var exportAssignment = exportEqualsSymbol.valueDeclaration;
|
|
51046
51051
|
var err = error(node.name, ts.Diagnostics.Module_0_can_only_be_default_imported_using_the_1_flag, symbolToString(moduleSymbol), compilerOptionName);
|
|
51047
51052
|
if (exportAssignment) {
|
|
51048
|
-
ts.addRelatedInfo(err, ts.createDiagnosticForNode(exportAssignment, ts.Diagnostics.
|
|
51053
|
+
ts.addRelatedInfo(err, ts.createDiagnosticForNode(exportAssignment, ts.Diagnostics.This_module_is_declared_with_export_and_can_only_be_used_with_a_default_import_when_using_the_0_flag, compilerOptionName));
|
|
51049
51054
|
}
|
|
51050
51055
|
}
|
|
51051
51056
|
else {
|
|
@@ -65718,7 +65723,8 @@ var ts;
|
|
|
65718
65723
|
return 0 /* False */;
|
|
65719
65724
|
}
|
|
65720
65725
|
}
|
|
65721
|
-
var isPerformingCommonPropertyChecks = relation !== comparableRelation
|
|
65726
|
+
var isPerformingCommonPropertyChecks = (relation !== comparableRelation || relation === comparableRelation && isLiteralType(source)) &&
|
|
65727
|
+
!(intersectionState & 2 /* Target */) &&
|
|
65722
65728
|
source.flags & (131068 /* Primitive */ | 524288 /* Object */ | 2097152 /* Intersection */) && source !== globalObjectType &&
|
|
65723
65729
|
target.flags & (524288 /* Object */ | 2097152 /* Intersection */) && isWeakType(target) &&
|
|
65724
65730
|
(getPropertiesOfType(source).length > 0 || typeHasCallOrConstructSignatures(source));
|
|
@@ -66495,7 +66501,7 @@ var ts;
|
|
|
66495
66501
|
// create a new chain for the constraint error
|
|
66496
66502
|
resetErrorInfo(saveErrorInfo);
|
|
66497
66503
|
}
|
|
66498
|
-
if (result = isRelatedTo(source, constraint, 2 /* Target */, reportErrors)) {
|
|
66504
|
+
if (result = isRelatedTo(source, constraint, 2 /* Target */, reportErrors, /* headMessage */ undefined, intersectionState)) {
|
|
66499
66505
|
return result;
|
|
66500
66506
|
}
|
|
66501
66507
|
// prefer the shorter chain of the constraint comparison chain, and the direct comparison chain
|
|
@@ -68201,7 +68207,7 @@ var ts;
|
|
|
68201
68207
|
if (!isLiteralOfContextualType(type, contextualType)) {
|
|
68202
68208
|
type = getWidenedUniqueESSymbolType(getWidenedLiteralType(type));
|
|
68203
68209
|
}
|
|
68204
|
-
return type;
|
|
68210
|
+
return getRegularTypeOfLiteralType(type);
|
|
68205
68211
|
}
|
|
68206
68212
|
function getWidenedLiteralLikeTypeForContextualReturnTypeIfNeeded(type, contextualSignatureReturnType, isAsync) {
|
|
68207
68213
|
if (type && isUnitType(type)) {
|
|
@@ -90398,6 +90404,7 @@ var ts;
|
|
|
90398
90404
|
})(ts || (ts = {}));
|
|
90399
90405
|
var ts;
|
|
90400
90406
|
(function (ts) {
|
|
90407
|
+
var _a;
|
|
90401
90408
|
function visitNode(node, visitor, test, lift) {
|
|
90402
90409
|
if (node === undefined || visitor === undefined) {
|
|
90403
90410
|
return node;
|
|
@@ -90612,12 +90619,10 @@ var ts;
|
|
|
90612
90619
|
return updated;
|
|
90613
90620
|
}
|
|
90614
90621
|
ts.visitFunctionBody = visitFunctionBody;
|
|
90615
|
-
|
|
90616
|
-
|
|
90617
|
-
*/
|
|
90618
|
-
function visitIterationBody(body, visitor, context) {
|
|
90622
|
+
function visitIterationBody(body, visitor, context, nodeVisitor) {
|
|
90623
|
+
if (nodeVisitor === void 0) { nodeVisitor = visitNode; }
|
|
90619
90624
|
context.startBlockScope();
|
|
90620
|
-
var updated =
|
|
90625
|
+
var updated = nodeVisitor(body, visitor, ts.isStatement, context.factory.liftToBlock);
|
|
90621
90626
|
var declarations = context.endBlockScope();
|
|
90622
90627
|
if (ts.some(declarations)) {
|
|
90623
90628
|
if (ts.isBlock(updated)) {
|
|
@@ -90636,456 +90641,443 @@ var ts;
|
|
|
90636
90641
|
if (node === undefined) {
|
|
90637
90642
|
return undefined;
|
|
90638
90643
|
}
|
|
90639
|
-
var
|
|
90640
|
-
|
|
90641
|
-
if ((kind > 0 /* FirstToken */ && kind <= 160 /* LastToken */) || kind === 192 /* ThisType */) {
|
|
90642
|
-
return node;
|
|
90643
|
-
}
|
|
90644
|
-
var factory = context.factory;
|
|
90645
|
-
switch (kind) {
|
|
90646
|
-
// Names
|
|
90647
|
-
case 79 /* Identifier */:
|
|
90648
|
-
ts.Debug.type(node);
|
|
90649
|
-
return factory.updateIdentifier(node, nodesVisitor(node.typeArguments, visitor, ts.isTypeNodeOrTypeParameterDeclaration));
|
|
90650
|
-
case 161 /* QualifiedName */:
|
|
90651
|
-
ts.Debug.type(node);
|
|
90652
|
-
return factory.updateQualifiedName(node, nodeVisitor(node.left, visitor, ts.isEntityName), nodeVisitor(node.right, visitor, ts.isIdentifier));
|
|
90653
|
-
case 162 /* ComputedPropertyName */:
|
|
90654
|
-
ts.Debug.type(node);
|
|
90655
|
-
return factory.updateComputedPropertyName(node, nodeVisitor(node.expression, visitor, ts.isExpression));
|
|
90656
|
-
// Signature elements
|
|
90657
|
-
case 163 /* TypeParameter */:
|
|
90658
|
-
ts.Debug.type(node);
|
|
90659
|
-
return factory.updateTypeParameterDeclaration(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodeVisitor(node.name, visitor, ts.isIdentifier), nodeVisitor(node.constraint, visitor, ts.isTypeNode), nodeVisitor(node.default, visitor, ts.isTypeNode));
|
|
90660
|
-
case 164 /* Parameter */:
|
|
90661
|
-
ts.Debug.type(node);
|
|
90662
|
-
return factory.updateParameterDeclaration(node, nodesVisitor(node.modifiers, visitor, ts.isModifierLike), nodeVisitor(node.dotDotDotToken, tokenVisitor, ts.isDotDotDotToken), nodeVisitor(node.name, visitor, ts.isBindingName), nodeVisitor(node.questionToken, tokenVisitor, ts.isQuestionToken), nodeVisitor(node.type, visitor, ts.isTypeNode), nodeVisitor(node.initializer, visitor, ts.isExpression));
|
|
90663
|
-
case 165 /* Decorator */:
|
|
90664
|
-
ts.Debug.type(node);
|
|
90665
|
-
return factory.updateDecorator(node, nodeVisitor(node.expression, visitor, ts.isExpression));
|
|
90666
|
-
// Type elements
|
|
90667
|
-
case 166 /* PropertySignature */:
|
|
90668
|
-
ts.Debug.type(node);
|
|
90669
|
-
return factory.updatePropertySignature(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodeVisitor(node.name, visitor, ts.isPropertyName), nodeVisitor(node.questionToken, tokenVisitor, ts.isToken), nodeVisitor(node.type, visitor, ts.isTypeNode));
|
|
90670
|
-
case 167 /* PropertyDeclaration */:
|
|
90671
|
-
ts.Debug.type(node);
|
|
90672
|
-
return factory.updatePropertyDeclaration(node, nodesVisitor(node.modifiers, visitor, ts.isModifierLike), nodeVisitor(node.name, visitor, ts.isPropertyName),
|
|
90673
|
-
// QuestionToken and ExclamationToken is uniqued in Property Declaration and the signature of 'updateProperty' is that too
|
|
90674
|
-
nodeVisitor(node.questionToken || node.exclamationToken, tokenVisitor, ts.isQuestionOrExclamationToken), nodeVisitor(node.type, visitor, ts.isTypeNode), nodeVisitor(node.initializer, visitor, ts.isExpression));
|
|
90675
|
-
case 168 /* MethodSignature */:
|
|
90676
|
-
ts.Debug.type(node);
|
|
90677
|
-
return factory.updateMethodSignature(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodeVisitor(node.name, visitor, ts.isPropertyName), nodeVisitor(node.questionToken, tokenVisitor, ts.isQuestionToken), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.parameters, visitor, ts.isParameterDeclaration), nodeVisitor(node.type, visitor, ts.isTypeNode));
|
|
90678
|
-
case 169 /* MethodDeclaration */:
|
|
90679
|
-
ts.Debug.type(node);
|
|
90680
|
-
return factory.updateMethodDeclaration(node, nodesVisitor(node.modifiers, visitor, ts.isModifierLike), nodeVisitor(node.asteriskToken, tokenVisitor, ts.isAsteriskToken), nodeVisitor(node.name, visitor, ts.isPropertyName), nodeVisitor(node.questionToken, tokenVisitor, ts.isQuestionToken), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), visitParameterList(node.parameters, visitor, context, nodesVisitor), nodeVisitor(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context, nodeVisitor));
|
|
90681
|
-
case 171 /* Constructor */:
|
|
90682
|
-
ts.Debug.type(node);
|
|
90683
|
-
return factory.updateConstructorDeclaration(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitFunctionBody(node.body, visitor, context, nodeVisitor));
|
|
90684
|
-
case 172 /* GetAccessor */:
|
|
90685
|
-
ts.Debug.type(node);
|
|
90686
|
-
return factory.updateGetAccessorDeclaration(node, nodesVisitor(node.modifiers, visitor, ts.isModifierLike), nodeVisitor(node.name, visitor, ts.isPropertyName), visitParameterList(node.parameters, visitor, context, nodesVisitor), nodeVisitor(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context, nodeVisitor));
|
|
90687
|
-
case 173 /* SetAccessor */:
|
|
90688
|
-
ts.Debug.type(node);
|
|
90689
|
-
return factory.updateSetAccessorDeclaration(node, nodesVisitor(node.modifiers, visitor, ts.isModifierLike), nodeVisitor(node.name, visitor, ts.isPropertyName), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitFunctionBody(node.body, visitor, context, nodeVisitor));
|
|
90690
|
-
case 170 /* ClassStaticBlockDeclaration */:
|
|
90691
|
-
ts.Debug.type(node);
|
|
90692
|
-
context.startLexicalEnvironment();
|
|
90693
|
-
context.suspendLexicalEnvironment();
|
|
90694
|
-
return factory.updateClassStaticBlockDeclaration(node, visitFunctionBody(node.body, visitor, context, nodeVisitor));
|
|
90695
|
-
case 174 /* CallSignature */:
|
|
90696
|
-
ts.Debug.type(node);
|
|
90697
|
-
return factory.updateCallSignature(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.parameters, visitor, ts.isParameterDeclaration), nodeVisitor(node.type, visitor, ts.isTypeNode));
|
|
90698
|
-
case 175 /* ConstructSignature */:
|
|
90699
|
-
ts.Debug.type(node);
|
|
90700
|
-
return factory.updateConstructSignature(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.parameters, visitor, ts.isParameterDeclaration), nodeVisitor(node.type, visitor, ts.isTypeNode));
|
|
90701
|
-
case 176 /* IndexSignature */:
|
|
90702
|
-
ts.Debug.type(node);
|
|
90703
|
-
return factory.updateIndexSignature(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodesVisitor(node.parameters, visitor, ts.isParameterDeclaration), nodeVisitor(node.type, visitor, ts.isTypeNode));
|
|
90704
|
-
// Types
|
|
90705
|
-
case 177 /* TypePredicate */:
|
|
90706
|
-
ts.Debug.type(node);
|
|
90707
|
-
return factory.updateTypePredicateNode(node, nodeVisitor(node.assertsModifier, visitor, ts.isAssertsKeyword), nodeVisitor(node.parameterName, visitor, ts.isIdentifierOrThisTypeNode), nodeVisitor(node.type, visitor, ts.isTypeNode));
|
|
90708
|
-
case 178 /* TypeReference */:
|
|
90709
|
-
ts.Debug.type(node);
|
|
90710
|
-
return factory.updateTypeReferenceNode(node, nodeVisitor(node.typeName, visitor, ts.isEntityName), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode));
|
|
90711
|
-
case 179 /* FunctionType */:
|
|
90712
|
-
ts.Debug.type(node);
|
|
90713
|
-
return factory.updateFunctionTypeNode(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.parameters, visitor, ts.isParameterDeclaration), nodeVisitor(node.type, visitor, ts.isTypeNode));
|
|
90714
|
-
case 180 /* ConstructorType */:
|
|
90715
|
-
ts.Debug.type(node);
|
|
90716
|
-
return factory.updateConstructorTypeNode(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.parameters, visitor, ts.isParameterDeclaration), nodeVisitor(node.type, visitor, ts.isTypeNode));
|
|
90717
|
-
case 181 /* TypeQuery */:
|
|
90718
|
-
ts.Debug.type(node);
|
|
90719
|
-
return factory.updateTypeQueryNode(node, nodeVisitor(node.exprName, visitor, ts.isEntityName), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode));
|
|
90720
|
-
case 182 /* TypeLiteral */:
|
|
90721
|
-
ts.Debug.type(node);
|
|
90722
|
-
return factory.updateTypeLiteralNode(node, nodesVisitor(node.members, visitor, ts.isTypeElement));
|
|
90723
|
-
case 183 /* ArrayType */:
|
|
90724
|
-
ts.Debug.type(node);
|
|
90725
|
-
return factory.updateArrayTypeNode(node, nodeVisitor(node.elementType, visitor, ts.isTypeNode));
|
|
90726
|
-
case 184 /* TupleType */:
|
|
90727
|
-
ts.Debug.type(node);
|
|
90728
|
-
return factory.updateTupleTypeNode(node, nodesVisitor(node.elements, visitor, ts.isTypeNode));
|
|
90729
|
-
case 185 /* OptionalType */:
|
|
90730
|
-
ts.Debug.type(node);
|
|
90731
|
-
return factory.updateOptionalTypeNode(node, nodeVisitor(node.type, visitor, ts.isTypeNode));
|
|
90732
|
-
case 186 /* RestType */:
|
|
90733
|
-
ts.Debug.type(node);
|
|
90734
|
-
return factory.updateRestTypeNode(node, nodeVisitor(node.type, visitor, ts.isTypeNode));
|
|
90735
|
-
case 187 /* UnionType */:
|
|
90736
|
-
ts.Debug.type(node);
|
|
90737
|
-
return factory.updateUnionTypeNode(node, nodesVisitor(node.types, visitor, ts.isTypeNode));
|
|
90738
|
-
case 188 /* IntersectionType */:
|
|
90739
|
-
ts.Debug.type(node);
|
|
90740
|
-
return factory.updateIntersectionTypeNode(node, nodesVisitor(node.types, visitor, ts.isTypeNode));
|
|
90741
|
-
case 189 /* ConditionalType */:
|
|
90742
|
-
ts.Debug.type(node);
|
|
90743
|
-
return factory.updateConditionalTypeNode(node, nodeVisitor(node.checkType, visitor, ts.isTypeNode), nodeVisitor(node.extendsType, visitor, ts.isTypeNode), nodeVisitor(node.trueType, visitor, ts.isTypeNode), nodeVisitor(node.falseType, visitor, ts.isTypeNode));
|
|
90744
|
-
case 190 /* InferType */:
|
|
90745
|
-
ts.Debug.type(node);
|
|
90746
|
-
return factory.updateInferTypeNode(node, nodeVisitor(node.typeParameter, visitor, ts.isTypeParameterDeclaration));
|
|
90747
|
-
case 200 /* ImportType */:
|
|
90748
|
-
ts.Debug.type(node);
|
|
90749
|
-
return factory.updateImportTypeNode(node, nodeVisitor(node.argument, visitor, ts.isTypeNode), nodeVisitor(node.assertions, visitor, ts.isNode), nodeVisitor(node.qualifier, visitor, ts.isEntityName), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode), node.isTypeOf);
|
|
90750
|
-
case 295 /* ImportTypeAssertionContainer */:
|
|
90751
|
-
ts.Debug.type(node);
|
|
90752
|
-
return factory.updateImportTypeAssertionContainer(node, nodeVisitor(node.assertClause, visitor, ts.isNode), node.multiLine);
|
|
90753
|
-
case 197 /* NamedTupleMember */:
|
|
90754
|
-
ts.Debug.type(node);
|
|
90755
|
-
return factory.updateNamedTupleMember(node, nodeVisitor(node.dotDotDotToken, tokenVisitor, ts.isDotDotDotToken), nodeVisitor(node.name, visitor, ts.isIdentifier), nodeVisitor(node.questionToken, tokenVisitor, ts.isQuestionToken), nodeVisitor(node.type, visitor, ts.isTypeNode));
|
|
90756
|
-
case 191 /* ParenthesizedType */:
|
|
90757
|
-
ts.Debug.type(node);
|
|
90758
|
-
return factory.updateParenthesizedType(node, nodeVisitor(node.type, visitor, ts.isTypeNode));
|
|
90759
|
-
case 193 /* TypeOperator */:
|
|
90760
|
-
ts.Debug.type(node);
|
|
90761
|
-
return factory.updateTypeOperatorNode(node, nodeVisitor(node.type, visitor, ts.isTypeNode));
|
|
90762
|
-
case 194 /* IndexedAccessType */:
|
|
90763
|
-
ts.Debug.type(node);
|
|
90764
|
-
return factory.updateIndexedAccessTypeNode(node, nodeVisitor(node.objectType, visitor, ts.isTypeNode), nodeVisitor(node.indexType, visitor, ts.isTypeNode));
|
|
90765
|
-
case 195 /* MappedType */:
|
|
90766
|
-
ts.Debug.type(node);
|
|
90767
|
-
return factory.updateMappedTypeNode(node, nodeVisitor(node.readonlyToken, tokenVisitor, ts.isReadonlyKeywordOrPlusOrMinusToken), nodeVisitor(node.typeParameter, visitor, ts.isTypeParameterDeclaration), nodeVisitor(node.nameType, visitor, ts.isTypeNode), nodeVisitor(node.questionToken, tokenVisitor, ts.isQuestionOrPlusOrMinusToken), nodeVisitor(node.type, visitor, ts.isTypeNode), nodesVisitor(node.members, visitor, ts.isTypeElement));
|
|
90768
|
-
case 196 /* LiteralType */:
|
|
90769
|
-
ts.Debug.type(node);
|
|
90770
|
-
return factory.updateLiteralTypeNode(node, nodeVisitor(node.literal, visitor, ts.isExpression));
|
|
90771
|
-
case 198 /* TemplateLiteralType */:
|
|
90772
|
-
ts.Debug.type(node);
|
|
90773
|
-
return factory.updateTemplateLiteralType(node, nodeVisitor(node.head, visitor, ts.isTemplateHead), nodesVisitor(node.templateSpans, visitor, ts.isTemplateLiteralTypeSpan));
|
|
90774
|
-
case 199 /* TemplateLiteralTypeSpan */:
|
|
90775
|
-
ts.Debug.type(node);
|
|
90776
|
-
return factory.updateTemplateLiteralTypeSpan(node, nodeVisitor(node.type, visitor, ts.isTypeNode), nodeVisitor(node.literal, visitor, ts.isTemplateMiddleOrTemplateTail));
|
|
90777
|
-
// Binding patterns
|
|
90778
|
-
case 201 /* ObjectBindingPattern */:
|
|
90779
|
-
ts.Debug.type(node);
|
|
90780
|
-
return factory.updateObjectBindingPattern(node, nodesVisitor(node.elements, visitor, ts.isBindingElement));
|
|
90781
|
-
case 202 /* ArrayBindingPattern */:
|
|
90782
|
-
ts.Debug.type(node);
|
|
90783
|
-
return factory.updateArrayBindingPattern(node, nodesVisitor(node.elements, visitor, ts.isArrayBindingElement));
|
|
90784
|
-
case 203 /* BindingElement */:
|
|
90785
|
-
ts.Debug.type(node);
|
|
90786
|
-
return factory.updateBindingElement(node, nodeVisitor(node.dotDotDotToken, tokenVisitor, ts.isDotDotDotToken), nodeVisitor(node.propertyName, visitor, ts.isPropertyName), nodeVisitor(node.name, visitor, ts.isBindingName), nodeVisitor(node.initializer, visitor, ts.isExpression));
|
|
90787
|
-
// Expression
|
|
90788
|
-
case 204 /* ArrayLiteralExpression */:
|
|
90789
|
-
ts.Debug.type(node);
|
|
90790
|
-
return factory.updateArrayLiteralExpression(node, nodesVisitor(node.elements, visitor, ts.isExpression));
|
|
90791
|
-
case 205 /* ObjectLiteralExpression */:
|
|
90792
|
-
ts.Debug.type(node);
|
|
90793
|
-
return factory.updateObjectLiteralExpression(node, nodesVisitor(node.properties, visitor, ts.isObjectLiteralElementLike));
|
|
90794
|
-
case 206 /* PropertyAccessExpression */:
|
|
90795
|
-
if (node.flags & 32 /* OptionalChain */) {
|
|
90796
|
-
ts.Debug.type(node);
|
|
90797
|
-
return factory.updatePropertyAccessChain(node, nodeVisitor(node.expression, visitor, ts.isExpression), nodeVisitor(node.questionDotToken, tokenVisitor, ts.isQuestionDotToken), nodeVisitor(node.name, visitor, ts.isMemberName));
|
|
90798
|
-
}
|
|
90799
|
-
ts.Debug.type(node);
|
|
90800
|
-
return factory.updatePropertyAccessExpression(node, nodeVisitor(node.expression, visitor, ts.isExpression), nodeVisitor(node.name, visitor, ts.isMemberName));
|
|
90801
|
-
case 207 /* ElementAccessExpression */:
|
|
90802
|
-
if (node.flags & 32 /* OptionalChain */) {
|
|
90803
|
-
ts.Debug.type(node);
|
|
90804
|
-
return factory.updateElementAccessChain(node, nodeVisitor(node.expression, visitor, ts.isExpression), nodeVisitor(node.questionDotToken, tokenVisitor, ts.isQuestionDotToken), nodeVisitor(node.argumentExpression, visitor, ts.isExpression));
|
|
90805
|
-
}
|
|
90806
|
-
ts.Debug.type(node);
|
|
90807
|
-
return factory.updateElementAccessExpression(node, nodeVisitor(node.expression, visitor, ts.isExpression), nodeVisitor(node.argumentExpression, visitor, ts.isExpression));
|
|
90808
|
-
case 208 /* CallExpression */:
|
|
90809
|
-
if (node.flags & 32 /* OptionalChain */) {
|
|
90810
|
-
ts.Debug.type(node);
|
|
90811
|
-
return factory.updateCallChain(node, nodeVisitor(node.expression, visitor, ts.isExpression), nodeVisitor(node.questionDotToken, tokenVisitor, ts.isQuestionDotToken), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode), nodesVisitor(node.arguments, visitor, ts.isExpression));
|
|
90812
|
-
}
|
|
90813
|
-
ts.Debug.type(node);
|
|
90814
|
-
return factory.updateCallExpression(node, nodeVisitor(node.expression, visitor, ts.isExpression), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode), nodesVisitor(node.arguments, visitor, ts.isExpression));
|
|
90815
|
-
case 209 /* NewExpression */:
|
|
90816
|
-
ts.Debug.type(node);
|
|
90817
|
-
return factory.updateNewExpression(node, nodeVisitor(node.expression, visitor, ts.isExpression), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode), nodesVisitor(node.arguments, visitor, ts.isExpression));
|
|
90818
|
-
case 210 /* TaggedTemplateExpression */:
|
|
90819
|
-
ts.Debug.type(node);
|
|
90820
|
-
return factory.updateTaggedTemplateExpression(node, nodeVisitor(node.tag, visitor, ts.isExpression), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode), nodeVisitor(node.template, visitor, ts.isTemplateLiteral));
|
|
90821
|
-
case 211 /* TypeAssertionExpression */:
|
|
90822
|
-
ts.Debug.type(node);
|
|
90823
|
-
return factory.updateTypeAssertion(node, nodeVisitor(node.type, visitor, ts.isTypeNode), nodeVisitor(node.expression, visitor, ts.isExpression));
|
|
90824
|
-
case 212 /* ParenthesizedExpression */:
|
|
90825
|
-
ts.Debug.type(node);
|
|
90826
|
-
return factory.updateParenthesizedExpression(node, nodeVisitor(node.expression, visitor, ts.isExpression));
|
|
90827
|
-
case 213 /* FunctionExpression */:
|
|
90828
|
-
ts.Debug.type(node);
|
|
90829
|
-
return factory.updateFunctionExpression(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodeVisitor(node.asteriskToken, tokenVisitor, ts.isAsteriskToken), nodeVisitor(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), visitParameterList(node.parameters, visitor, context, nodesVisitor), nodeVisitor(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context, nodeVisitor));
|
|
90830
|
-
case 214 /* ArrowFunction */:
|
|
90831
|
-
ts.Debug.type(node);
|
|
90832
|
-
return factory.updateArrowFunction(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), visitParameterList(node.parameters, visitor, context, nodesVisitor), nodeVisitor(node.type, visitor, ts.isTypeNode), nodeVisitor(node.equalsGreaterThanToken, tokenVisitor, ts.isEqualsGreaterThanToken), visitFunctionBody(node.body, visitor, context, nodeVisitor));
|
|
90833
|
-
case 215 /* DeleteExpression */:
|
|
90834
|
-
ts.Debug.type(node);
|
|
90835
|
-
return factory.updateDeleteExpression(node, nodeVisitor(node.expression, visitor, ts.isExpression));
|
|
90836
|
-
case 216 /* TypeOfExpression */:
|
|
90837
|
-
ts.Debug.type(node);
|
|
90838
|
-
return factory.updateTypeOfExpression(node, nodeVisitor(node.expression, visitor, ts.isExpression));
|
|
90839
|
-
case 217 /* VoidExpression */:
|
|
90840
|
-
ts.Debug.type(node);
|
|
90841
|
-
return factory.updateVoidExpression(node, nodeVisitor(node.expression, visitor, ts.isExpression));
|
|
90842
|
-
case 218 /* AwaitExpression */:
|
|
90843
|
-
ts.Debug.type(node);
|
|
90844
|
-
return factory.updateAwaitExpression(node, nodeVisitor(node.expression, visitor, ts.isExpression));
|
|
90845
|
-
case 219 /* PrefixUnaryExpression */:
|
|
90846
|
-
ts.Debug.type(node);
|
|
90847
|
-
return factory.updatePrefixUnaryExpression(node, nodeVisitor(node.operand, visitor, ts.isExpression));
|
|
90848
|
-
case 220 /* PostfixUnaryExpression */:
|
|
90849
|
-
ts.Debug.type(node);
|
|
90850
|
-
return factory.updatePostfixUnaryExpression(node, nodeVisitor(node.operand, visitor, ts.isExpression));
|
|
90851
|
-
case 221 /* BinaryExpression */:
|
|
90852
|
-
ts.Debug.type(node);
|
|
90853
|
-
return factory.updateBinaryExpression(node, nodeVisitor(node.left, visitor, ts.isExpression), nodeVisitor(node.operatorToken, tokenVisitor, ts.isBinaryOperatorToken), nodeVisitor(node.right, visitor, ts.isExpression));
|
|
90854
|
-
case 222 /* ConditionalExpression */:
|
|
90855
|
-
ts.Debug.type(node);
|
|
90856
|
-
return factory.updateConditionalExpression(node, nodeVisitor(node.condition, visitor, ts.isExpression), nodeVisitor(node.questionToken, tokenVisitor, ts.isQuestionToken), nodeVisitor(node.whenTrue, visitor, ts.isExpression), nodeVisitor(node.colonToken, tokenVisitor, ts.isColonToken), nodeVisitor(node.whenFalse, visitor, ts.isExpression));
|
|
90857
|
-
case 223 /* TemplateExpression */:
|
|
90858
|
-
ts.Debug.type(node);
|
|
90859
|
-
return factory.updateTemplateExpression(node, nodeVisitor(node.head, visitor, ts.isTemplateHead), nodesVisitor(node.templateSpans, visitor, ts.isTemplateSpan));
|
|
90860
|
-
case 224 /* YieldExpression */:
|
|
90861
|
-
ts.Debug.type(node);
|
|
90862
|
-
return factory.updateYieldExpression(node, nodeVisitor(node.asteriskToken, tokenVisitor, ts.isAsteriskToken), nodeVisitor(node.expression, visitor, ts.isExpression));
|
|
90863
|
-
case 225 /* SpreadElement */:
|
|
90864
|
-
ts.Debug.type(node);
|
|
90865
|
-
return factory.updateSpreadElement(node, nodeVisitor(node.expression, visitor, ts.isExpression));
|
|
90866
|
-
case 226 /* ClassExpression */:
|
|
90867
|
-
ts.Debug.type(node);
|
|
90868
|
-
return factory.updateClassExpression(node, nodesVisitor(node.modifiers, visitor, ts.isModifierLike), nodeVisitor(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.heritageClauses, visitor, ts.isHeritageClause), nodesVisitor(node.members, visitor, ts.isClassElement));
|
|
90869
|
-
case 228 /* ExpressionWithTypeArguments */:
|
|
90870
|
-
ts.Debug.type(node);
|
|
90871
|
-
return factory.updateExpressionWithTypeArguments(node, nodeVisitor(node.expression, visitor, ts.isExpression), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode));
|
|
90872
|
-
case 229 /* AsExpression */:
|
|
90873
|
-
ts.Debug.type(node);
|
|
90874
|
-
return factory.updateAsExpression(node, nodeVisitor(node.expression, visitor, ts.isExpression), nodeVisitor(node.type, visitor, ts.isTypeNode));
|
|
90875
|
-
case 230 /* NonNullExpression */:
|
|
90876
|
-
if (node.flags & 32 /* OptionalChain */) {
|
|
90877
|
-
ts.Debug.type(node);
|
|
90878
|
-
return factory.updateNonNullChain(node, nodeVisitor(node.expression, visitor, ts.isExpression));
|
|
90879
|
-
}
|
|
90880
|
-
ts.Debug.type(node);
|
|
90881
|
-
return factory.updateNonNullExpression(node, nodeVisitor(node.expression, visitor, ts.isExpression));
|
|
90882
|
-
case 231 /* MetaProperty */:
|
|
90883
|
-
ts.Debug.type(node);
|
|
90884
|
-
return factory.updateMetaProperty(node, nodeVisitor(node.name, visitor, ts.isIdentifier));
|
|
90885
|
-
// Misc
|
|
90886
|
-
case 233 /* TemplateSpan */:
|
|
90887
|
-
ts.Debug.type(node);
|
|
90888
|
-
return factory.updateTemplateSpan(node, nodeVisitor(node.expression, visitor, ts.isExpression), nodeVisitor(node.literal, visitor, ts.isTemplateMiddleOrTemplateTail));
|
|
90889
|
-
// Element
|
|
90890
|
-
case 235 /* Block */:
|
|
90891
|
-
ts.Debug.type(node);
|
|
90892
|
-
return factory.updateBlock(node, nodesVisitor(node.statements, visitor, ts.isStatement));
|
|
90893
|
-
case 237 /* VariableStatement */:
|
|
90894
|
-
ts.Debug.type(node);
|
|
90895
|
-
return factory.updateVariableStatement(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodeVisitor(node.declarationList, visitor, ts.isVariableDeclarationList));
|
|
90896
|
-
case 238 /* ExpressionStatement */:
|
|
90897
|
-
ts.Debug.type(node);
|
|
90898
|
-
return factory.updateExpressionStatement(node, nodeVisitor(node.expression, visitor, ts.isExpression));
|
|
90899
|
-
case 239 /* IfStatement */:
|
|
90900
|
-
ts.Debug.type(node);
|
|
90901
|
-
return factory.updateIfStatement(node, nodeVisitor(node.expression, visitor, ts.isExpression), nodeVisitor(node.thenStatement, visitor, ts.isStatement, factory.liftToBlock), nodeVisitor(node.elseStatement, visitor, ts.isStatement, factory.liftToBlock));
|
|
90902
|
-
case 240 /* DoStatement */:
|
|
90903
|
-
ts.Debug.type(node);
|
|
90904
|
-
return factory.updateDoStatement(node, visitIterationBody(node.statement, visitor, context), nodeVisitor(node.expression, visitor, ts.isExpression));
|
|
90905
|
-
case 241 /* WhileStatement */:
|
|
90906
|
-
ts.Debug.type(node);
|
|
90907
|
-
return factory.updateWhileStatement(node, nodeVisitor(node.expression, visitor, ts.isExpression), visitIterationBody(node.statement, visitor, context));
|
|
90908
|
-
case 242 /* ForStatement */:
|
|
90909
|
-
ts.Debug.type(node);
|
|
90910
|
-
return factory.updateForStatement(node, nodeVisitor(node.initializer, visitor, ts.isForInitializer), nodeVisitor(node.condition, visitor, ts.isExpression), nodeVisitor(node.incrementor, visitor, ts.isExpression), visitIterationBody(node.statement, visitor, context));
|
|
90911
|
-
case 243 /* ForInStatement */:
|
|
90912
|
-
ts.Debug.type(node);
|
|
90913
|
-
return factory.updateForInStatement(node, nodeVisitor(node.initializer, visitor, ts.isForInitializer), nodeVisitor(node.expression, visitor, ts.isExpression), visitIterationBody(node.statement, visitor, context));
|
|
90914
|
-
case 244 /* ForOfStatement */:
|
|
90915
|
-
ts.Debug.type(node);
|
|
90916
|
-
return factory.updateForOfStatement(node, nodeVisitor(node.awaitModifier, tokenVisitor, ts.isAwaitKeyword), nodeVisitor(node.initializer, visitor, ts.isForInitializer), nodeVisitor(node.expression, visitor, ts.isExpression), visitIterationBody(node.statement, visitor, context));
|
|
90917
|
-
case 245 /* ContinueStatement */:
|
|
90918
|
-
ts.Debug.type(node);
|
|
90919
|
-
return factory.updateContinueStatement(node, nodeVisitor(node.label, visitor, ts.isIdentifier));
|
|
90920
|
-
case 246 /* BreakStatement */:
|
|
90921
|
-
ts.Debug.type(node);
|
|
90922
|
-
return factory.updateBreakStatement(node, nodeVisitor(node.label, visitor, ts.isIdentifier));
|
|
90923
|
-
case 247 /* ReturnStatement */:
|
|
90924
|
-
ts.Debug.type(node);
|
|
90925
|
-
return factory.updateReturnStatement(node, nodeVisitor(node.expression, visitor, ts.isExpression));
|
|
90926
|
-
case 248 /* WithStatement */:
|
|
90927
|
-
ts.Debug.type(node);
|
|
90928
|
-
return factory.updateWithStatement(node, nodeVisitor(node.expression, visitor, ts.isExpression), nodeVisitor(node.statement, visitor, ts.isStatement, factory.liftToBlock));
|
|
90929
|
-
case 249 /* SwitchStatement */:
|
|
90930
|
-
ts.Debug.type(node);
|
|
90931
|
-
return factory.updateSwitchStatement(node, nodeVisitor(node.expression, visitor, ts.isExpression), nodeVisitor(node.caseBlock, visitor, ts.isCaseBlock));
|
|
90932
|
-
case 250 /* LabeledStatement */:
|
|
90933
|
-
ts.Debug.type(node);
|
|
90934
|
-
return factory.updateLabeledStatement(node, nodeVisitor(node.label, visitor, ts.isIdentifier), nodeVisitor(node.statement, visitor, ts.isStatement, factory.liftToBlock));
|
|
90935
|
-
case 251 /* ThrowStatement */:
|
|
90936
|
-
ts.Debug.type(node);
|
|
90937
|
-
return factory.updateThrowStatement(node, nodeVisitor(node.expression, visitor, ts.isExpression));
|
|
90938
|
-
case 252 /* TryStatement */:
|
|
90939
|
-
ts.Debug.type(node);
|
|
90940
|
-
return factory.updateTryStatement(node, nodeVisitor(node.tryBlock, visitor, ts.isBlock), nodeVisitor(node.catchClause, visitor, ts.isCatchClause), nodeVisitor(node.finallyBlock, visitor, ts.isBlock));
|
|
90941
|
-
case 254 /* VariableDeclaration */:
|
|
90942
|
-
ts.Debug.type(node);
|
|
90943
|
-
return factory.updateVariableDeclaration(node, nodeVisitor(node.name, visitor, ts.isBindingName), nodeVisitor(node.exclamationToken, tokenVisitor, ts.isExclamationToken), nodeVisitor(node.type, visitor, ts.isTypeNode), nodeVisitor(node.initializer, visitor, ts.isExpression));
|
|
90944
|
-
case 255 /* VariableDeclarationList */:
|
|
90945
|
-
ts.Debug.type(node);
|
|
90946
|
-
return factory.updateVariableDeclarationList(node, nodesVisitor(node.declarations, visitor, ts.isVariableDeclaration));
|
|
90947
|
-
case 256 /* FunctionDeclaration */:
|
|
90948
|
-
ts.Debug.type(node);
|
|
90949
|
-
return factory.updateFunctionDeclaration(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodeVisitor(node.asteriskToken, tokenVisitor, ts.isAsteriskToken), nodeVisitor(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), visitParameterList(node.parameters, visitor, context, nodesVisitor), nodeVisitor(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context, nodeVisitor));
|
|
90950
|
-
case 257 /* ClassDeclaration */:
|
|
90951
|
-
ts.Debug.type(node);
|
|
90952
|
-
return factory.updateClassDeclaration(node, nodesVisitor(node.modifiers, visitor, ts.isModifierLike), nodeVisitor(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.heritageClauses, visitor, ts.isHeritageClause), nodesVisitor(node.members, visitor, ts.isClassElement));
|
|
90953
|
-
case 258 /* InterfaceDeclaration */:
|
|
90954
|
-
ts.Debug.type(node);
|
|
90955
|
-
return factory.updateInterfaceDeclaration(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodeVisitor(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.heritageClauses, visitor, ts.isHeritageClause), nodesVisitor(node.members, visitor, ts.isTypeElement));
|
|
90956
|
-
case 259 /* TypeAliasDeclaration */:
|
|
90957
|
-
ts.Debug.type(node);
|
|
90958
|
-
return factory.updateTypeAliasDeclaration(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodeVisitor(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodeVisitor(node.type, visitor, ts.isTypeNode));
|
|
90959
|
-
case 260 /* EnumDeclaration */:
|
|
90960
|
-
ts.Debug.type(node);
|
|
90961
|
-
return factory.updateEnumDeclaration(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodeVisitor(node.name, visitor, ts.isIdentifier), nodesVisitor(node.members, visitor, ts.isEnumMember));
|
|
90962
|
-
case 261 /* ModuleDeclaration */:
|
|
90963
|
-
ts.Debug.type(node);
|
|
90964
|
-
return factory.updateModuleDeclaration(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodeVisitor(node.name, visitor, ts.isModuleName), nodeVisitor(node.body, visitor, ts.isModuleBody));
|
|
90965
|
-
case 262 /* ModuleBlock */:
|
|
90966
|
-
ts.Debug.type(node);
|
|
90967
|
-
return factory.updateModuleBlock(node, nodesVisitor(node.statements, visitor, ts.isStatement));
|
|
90968
|
-
case 263 /* CaseBlock */:
|
|
90969
|
-
ts.Debug.type(node);
|
|
90970
|
-
return factory.updateCaseBlock(node, nodesVisitor(node.clauses, visitor, ts.isCaseOrDefaultClause));
|
|
90971
|
-
case 264 /* NamespaceExportDeclaration */:
|
|
90972
|
-
ts.Debug.type(node);
|
|
90973
|
-
return factory.updateNamespaceExportDeclaration(node, nodeVisitor(node.name, visitor, ts.isIdentifier));
|
|
90974
|
-
case 265 /* ImportEqualsDeclaration */:
|
|
90975
|
-
ts.Debug.type(node);
|
|
90976
|
-
return factory.updateImportEqualsDeclaration(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), node.isTypeOnly, nodeVisitor(node.name, visitor, ts.isIdentifier), nodeVisitor(node.moduleReference, visitor, ts.isModuleReference));
|
|
90977
|
-
case 266 /* ImportDeclaration */:
|
|
90978
|
-
ts.Debug.type(node);
|
|
90979
|
-
return factory.updateImportDeclaration(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodeVisitor(node.importClause, visitor, ts.isImportClause), nodeVisitor(node.moduleSpecifier, visitor, ts.isExpression), nodeVisitor(node.assertClause, visitor, ts.isAssertClause));
|
|
90980
|
-
case 293 /* AssertClause */:
|
|
90981
|
-
ts.Debug.type(node);
|
|
90982
|
-
return factory.updateAssertClause(node, nodesVisitor(node.elements, visitor, ts.isAssertEntry), node.multiLine);
|
|
90983
|
-
case 294 /* AssertEntry */:
|
|
90984
|
-
ts.Debug.type(node);
|
|
90985
|
-
return factory.updateAssertEntry(node, nodeVisitor(node.name, visitor, ts.isAssertionKey), nodeVisitor(node.value, visitor, ts.isExpressionNode));
|
|
90986
|
-
case 267 /* ImportClause */:
|
|
90987
|
-
ts.Debug.type(node);
|
|
90988
|
-
return factory.updateImportClause(node, node.isTypeOnly, nodeVisitor(node.name, visitor, ts.isIdentifier), nodeVisitor(node.namedBindings, visitor, ts.isNamedImportBindings));
|
|
90989
|
-
case 268 /* NamespaceImport */:
|
|
90990
|
-
ts.Debug.type(node);
|
|
90991
|
-
return factory.updateNamespaceImport(node, nodeVisitor(node.name, visitor, ts.isIdentifier));
|
|
90992
|
-
case 274 /* NamespaceExport */:
|
|
90993
|
-
ts.Debug.type(node);
|
|
90994
|
-
return factory.updateNamespaceExport(node, nodeVisitor(node.name, visitor, ts.isIdentifier));
|
|
90995
|
-
case 269 /* NamedImports */:
|
|
90996
|
-
ts.Debug.type(node);
|
|
90997
|
-
return factory.updateNamedImports(node, nodesVisitor(node.elements, visitor, ts.isImportSpecifier));
|
|
90998
|
-
case 270 /* ImportSpecifier */:
|
|
90999
|
-
ts.Debug.type(node);
|
|
91000
|
-
return factory.updateImportSpecifier(node, node.isTypeOnly, nodeVisitor(node.propertyName, visitor, ts.isIdentifier), nodeVisitor(node.name, visitor, ts.isIdentifier));
|
|
91001
|
-
case 271 /* ExportAssignment */:
|
|
91002
|
-
ts.Debug.type(node);
|
|
91003
|
-
return factory.updateExportAssignment(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodeVisitor(node.expression, visitor, ts.isExpression));
|
|
91004
|
-
case 272 /* ExportDeclaration */:
|
|
91005
|
-
ts.Debug.type(node);
|
|
91006
|
-
return factory.updateExportDeclaration(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), node.isTypeOnly, nodeVisitor(node.exportClause, visitor, ts.isNamedExportBindings), nodeVisitor(node.moduleSpecifier, visitor, ts.isExpression), nodeVisitor(node.assertClause, visitor, ts.isAssertClause));
|
|
91007
|
-
case 273 /* NamedExports */:
|
|
91008
|
-
ts.Debug.type(node);
|
|
91009
|
-
return factory.updateNamedExports(node, nodesVisitor(node.elements, visitor, ts.isExportSpecifier));
|
|
91010
|
-
case 275 /* ExportSpecifier */:
|
|
91011
|
-
ts.Debug.type(node);
|
|
91012
|
-
return factory.updateExportSpecifier(node, node.isTypeOnly, nodeVisitor(node.propertyName, visitor, ts.isIdentifier), nodeVisitor(node.name, visitor, ts.isIdentifier));
|
|
91013
|
-
// Module references
|
|
91014
|
-
case 277 /* ExternalModuleReference */:
|
|
91015
|
-
ts.Debug.type(node);
|
|
91016
|
-
return factory.updateExternalModuleReference(node, nodeVisitor(node.expression, visitor, ts.isExpression));
|
|
91017
|
-
// JSX
|
|
91018
|
-
case 278 /* JsxElement */:
|
|
91019
|
-
ts.Debug.type(node);
|
|
91020
|
-
return factory.updateJsxElement(node, nodeVisitor(node.openingElement, visitor, ts.isJsxOpeningElement), nodesVisitor(node.children, visitor, ts.isJsxChild), nodeVisitor(node.closingElement, visitor, ts.isJsxClosingElement));
|
|
91021
|
-
case 279 /* JsxSelfClosingElement */:
|
|
91022
|
-
ts.Debug.type(node);
|
|
91023
|
-
return factory.updateJsxSelfClosingElement(node, nodeVisitor(node.tagName, visitor, ts.isJsxTagNameExpression), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode), nodeVisitor(node.attributes, visitor, ts.isJsxAttributes));
|
|
91024
|
-
case 280 /* JsxOpeningElement */:
|
|
91025
|
-
ts.Debug.type(node);
|
|
91026
|
-
return factory.updateJsxOpeningElement(node, nodeVisitor(node.tagName, visitor, ts.isJsxTagNameExpression), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode), nodeVisitor(node.attributes, visitor, ts.isJsxAttributes));
|
|
91027
|
-
case 281 /* JsxClosingElement */:
|
|
91028
|
-
ts.Debug.type(node);
|
|
91029
|
-
return factory.updateJsxClosingElement(node, nodeVisitor(node.tagName, visitor, ts.isJsxTagNameExpression));
|
|
91030
|
-
case 282 /* JsxFragment */:
|
|
91031
|
-
ts.Debug.type(node);
|
|
91032
|
-
return factory.updateJsxFragment(node, nodeVisitor(node.openingFragment, visitor, ts.isJsxOpeningFragment), nodesVisitor(node.children, visitor, ts.isJsxChild), nodeVisitor(node.closingFragment, visitor, ts.isJsxClosingFragment));
|
|
91033
|
-
case 285 /* JsxAttribute */:
|
|
91034
|
-
ts.Debug.type(node);
|
|
91035
|
-
return factory.updateJsxAttribute(node, nodeVisitor(node.name, visitor, ts.isIdentifier), nodeVisitor(node.initializer, visitor, ts.isStringLiteralOrJsxExpression));
|
|
91036
|
-
case 286 /* JsxAttributes */:
|
|
91037
|
-
ts.Debug.type(node);
|
|
91038
|
-
return factory.updateJsxAttributes(node, nodesVisitor(node.properties, visitor, ts.isJsxAttributeLike));
|
|
91039
|
-
case 287 /* JsxSpreadAttribute */:
|
|
91040
|
-
ts.Debug.type(node);
|
|
91041
|
-
return factory.updateJsxSpreadAttribute(node, nodeVisitor(node.expression, visitor, ts.isExpression));
|
|
91042
|
-
case 288 /* JsxExpression */:
|
|
91043
|
-
ts.Debug.type(node);
|
|
91044
|
-
return factory.updateJsxExpression(node, nodeVisitor(node.expression, visitor, ts.isExpression));
|
|
91045
|
-
// Clauses
|
|
91046
|
-
case 289 /* CaseClause */:
|
|
91047
|
-
ts.Debug.type(node);
|
|
91048
|
-
return factory.updateCaseClause(node, nodeVisitor(node.expression, visitor, ts.isExpression), nodesVisitor(node.statements, visitor, ts.isStatement));
|
|
91049
|
-
case 290 /* DefaultClause */:
|
|
91050
|
-
ts.Debug.type(node);
|
|
91051
|
-
return factory.updateDefaultClause(node, nodesVisitor(node.statements, visitor, ts.isStatement));
|
|
91052
|
-
case 291 /* HeritageClause */:
|
|
91053
|
-
ts.Debug.type(node);
|
|
91054
|
-
return factory.updateHeritageClause(node, nodesVisitor(node.types, visitor, ts.isExpressionWithTypeArguments));
|
|
91055
|
-
case 292 /* CatchClause */:
|
|
91056
|
-
ts.Debug.type(node);
|
|
91057
|
-
return factory.updateCatchClause(node, nodeVisitor(node.variableDeclaration, visitor, ts.isVariableDeclaration), nodeVisitor(node.block, visitor, ts.isBlock));
|
|
91058
|
-
// Property assignments
|
|
91059
|
-
case 296 /* PropertyAssignment */:
|
|
91060
|
-
ts.Debug.type(node);
|
|
91061
|
-
return factory.updatePropertyAssignment(node, nodeVisitor(node.name, visitor, ts.isPropertyName), nodeVisitor(node.initializer, visitor, ts.isExpression));
|
|
91062
|
-
case 297 /* ShorthandPropertyAssignment */:
|
|
91063
|
-
ts.Debug.type(node);
|
|
91064
|
-
return factory.updateShorthandPropertyAssignment(node, nodeVisitor(node.name, visitor, ts.isIdentifier), nodeVisitor(node.objectAssignmentInitializer, visitor, ts.isExpression));
|
|
91065
|
-
case 298 /* SpreadAssignment */:
|
|
91066
|
-
ts.Debug.type(node);
|
|
91067
|
-
return factory.updateSpreadAssignment(node, nodeVisitor(node.expression, visitor, ts.isExpression));
|
|
91068
|
-
// Enum
|
|
91069
|
-
case 299 /* EnumMember */:
|
|
91070
|
-
ts.Debug.type(node);
|
|
91071
|
-
return factory.updateEnumMember(node, nodeVisitor(node.name, visitor, ts.isPropertyName), nodeVisitor(node.initializer, visitor, ts.isExpression));
|
|
91072
|
-
// Top-level nodes
|
|
91073
|
-
case 305 /* SourceFile */:
|
|
91074
|
-
ts.Debug.type(node);
|
|
91075
|
-
return factory.updateSourceFile(node, visitLexicalEnvironment(node.statements, visitor, context));
|
|
91076
|
-
// Transformation nodes
|
|
91077
|
-
case 350 /* PartiallyEmittedExpression */:
|
|
91078
|
-
ts.Debug.type(node);
|
|
91079
|
-
return factory.updatePartiallyEmittedExpression(node, nodeVisitor(node.expression, visitor, ts.isExpression));
|
|
91080
|
-
case 351 /* CommaListExpression */:
|
|
91081
|
-
ts.Debug.type(node);
|
|
91082
|
-
return factory.updateCommaListExpression(node, nodesVisitor(node.elements, visitor, ts.isExpression));
|
|
91083
|
-
default:
|
|
91084
|
-
// No need to visit nodes with no children.
|
|
91085
|
-
return node;
|
|
91086
|
-
}
|
|
90644
|
+
var fn = visitEachChildTable[node.kind];
|
|
90645
|
+
return fn === undefined ? node : fn(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor);
|
|
91087
90646
|
}
|
|
91088
90647
|
ts.visitEachChild = visitEachChild;
|
|
90648
|
+
// NOTE: Before you can add a new method to `visitEachChildTable`, you must first ensure the `Node` subtype you
|
|
90649
|
+
// wish to add is defined in the `HasChildren` union in types.ts.
|
|
90650
|
+
var visitEachChildTable = (_a = {},
|
|
90651
|
+
_a[79 /* Identifier */] = function visitEachChildOfIdentifier(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
|
|
90652
|
+
return context.factory.updateIdentifier(node, nodesVisitor(node.typeArguments, visitor, ts.isTypeNodeOrTypeParameterDeclaration));
|
|
90653
|
+
},
|
|
90654
|
+
_a[161 /* QualifiedName */] = function visitEachChildOfQualifiedName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
90655
|
+
return context.factory.updateQualifiedName(node, nodeVisitor(node.left, visitor, ts.isEntityName), nodeVisitor(node.right, visitor, ts.isIdentifier));
|
|
90656
|
+
},
|
|
90657
|
+
_a[162 /* ComputedPropertyName */] = function visitEachChildOfComputedPropertyName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
90658
|
+
return context.factory.updateComputedPropertyName(node, nodeVisitor(node.expression, visitor, ts.isExpression));
|
|
90659
|
+
},
|
|
90660
|
+
// Signature elements
|
|
90661
|
+
_a[163 /* TypeParameter */] = function visitEachChildOfTypeParameterDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
90662
|
+
return context.factory.updateTypeParameterDeclaration(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodeVisitor(node.name, visitor, ts.isIdentifier), nodeVisitor(node.constraint, visitor, ts.isTypeNode), nodeVisitor(node.default, visitor, ts.isTypeNode));
|
|
90663
|
+
},
|
|
90664
|
+
_a[164 /* Parameter */] = function visitEachChildOfParameterDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
90665
|
+
return context.factory.updateParameterDeclaration(node, nodesVisitor(node.modifiers, visitor, ts.isModifierLike), nodeVisitor(node.dotDotDotToken, tokenVisitor, ts.isDotDotDotToken), nodeVisitor(node.name, visitor, ts.isBindingName), nodeVisitor(node.questionToken, tokenVisitor, ts.isQuestionToken), nodeVisitor(node.type, visitor, ts.isTypeNode), nodeVisitor(node.initializer, visitor, ts.isExpression));
|
|
90666
|
+
},
|
|
90667
|
+
_a[165 /* Decorator */] = function visitEachChildOfDecorator(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
90668
|
+
return context.factory.updateDecorator(node, nodeVisitor(node.expression, visitor, ts.isExpression));
|
|
90669
|
+
},
|
|
90670
|
+
// Type elements
|
|
90671
|
+
_a[166 /* PropertySignature */] = function visitEachChildOfPropertySignature(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
90672
|
+
return context.factory.updatePropertySignature(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodeVisitor(node.name, visitor, ts.isPropertyName), nodeVisitor(node.questionToken, tokenVisitor, ts.isToken), nodeVisitor(node.type, visitor, ts.isTypeNode));
|
|
90673
|
+
},
|
|
90674
|
+
_a[167 /* PropertyDeclaration */] = function visitEachChildOfPropertyDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
90675
|
+
var _a;
|
|
90676
|
+
return context.factory.updatePropertyDeclaration(node, nodesVisitor(node.modifiers, visitor, ts.isModifierLike), nodeVisitor(node.name, visitor, ts.isPropertyName),
|
|
90677
|
+
// QuestionToken and ExclamationToken are mutually exclusive in PropertyDeclaration
|
|
90678
|
+
nodeVisitor((_a = node.questionToken) !== null && _a !== void 0 ? _a : node.exclamationToken, tokenVisitor, ts.isQuestionOrExclamationToken), nodeVisitor(node.type, visitor, ts.isTypeNode), nodeVisitor(node.initializer, visitor, ts.isExpression));
|
|
90679
|
+
},
|
|
90680
|
+
_a[168 /* MethodSignature */] = function visitEachChildOfMethodSignature(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
90681
|
+
return context.factory.updateMethodSignature(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodeVisitor(node.name, visitor, ts.isPropertyName), nodeVisitor(node.questionToken, tokenVisitor, ts.isQuestionToken), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.parameters, visitor, ts.isParameterDeclaration), nodeVisitor(node.type, visitor, ts.isTypeNode));
|
|
90682
|
+
},
|
|
90683
|
+
_a[169 /* MethodDeclaration */] = function visitEachChildOfMethodDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
90684
|
+
return context.factory.updateMethodDeclaration(node, nodesVisitor(node.modifiers, visitor, ts.isModifierLike), nodeVisitor(node.asteriskToken, tokenVisitor, ts.isAsteriskToken), nodeVisitor(node.name, visitor, ts.isPropertyName), nodeVisitor(node.questionToken, tokenVisitor, ts.isQuestionToken), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), visitParameterList(node.parameters, visitor, context, nodesVisitor), nodeVisitor(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context, nodeVisitor));
|
|
90685
|
+
},
|
|
90686
|
+
_a[171 /* Constructor */] = function visitEachChildOfConstructorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
90687
|
+
return context.factory.updateConstructorDeclaration(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitFunctionBody(node.body, visitor, context, nodeVisitor));
|
|
90688
|
+
},
|
|
90689
|
+
_a[172 /* GetAccessor */] = function visitEachChildOfGetAccessorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
90690
|
+
return context.factory.updateGetAccessorDeclaration(node, nodesVisitor(node.modifiers, visitor, ts.isModifierLike), nodeVisitor(node.name, visitor, ts.isPropertyName), visitParameterList(node.parameters, visitor, context, nodesVisitor), nodeVisitor(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context, nodeVisitor));
|
|
90691
|
+
},
|
|
90692
|
+
_a[173 /* SetAccessor */] = function visitEachChildOfSetAccessorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
90693
|
+
return context.factory.updateSetAccessorDeclaration(node, nodesVisitor(node.modifiers, visitor, ts.isModifierLike), nodeVisitor(node.name, visitor, ts.isPropertyName), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitFunctionBody(node.body, visitor, context, nodeVisitor));
|
|
90694
|
+
},
|
|
90695
|
+
_a[170 /* ClassStaticBlockDeclaration */] = function visitEachChildOfClassStaticBlockDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
90696
|
+
context.startLexicalEnvironment();
|
|
90697
|
+
context.suspendLexicalEnvironment();
|
|
90698
|
+
return context.factory.updateClassStaticBlockDeclaration(node, visitFunctionBody(node.body, visitor, context, nodeVisitor));
|
|
90699
|
+
},
|
|
90700
|
+
_a[174 /* CallSignature */] = function visitEachChildOfCallSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
90701
|
+
return context.factory.updateCallSignature(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.parameters, visitor, ts.isParameterDeclaration), nodeVisitor(node.type, visitor, ts.isTypeNode));
|
|
90702
|
+
},
|
|
90703
|
+
_a[175 /* ConstructSignature */] = function visitEachChildOfConstructSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
90704
|
+
return context.factory.updateConstructSignature(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.parameters, visitor, ts.isParameterDeclaration), nodeVisitor(node.type, visitor, ts.isTypeNode));
|
|
90705
|
+
},
|
|
90706
|
+
_a[176 /* IndexSignature */] = function visitEachChildOfIndexSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
90707
|
+
return context.factory.updateIndexSignature(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodesVisitor(node.parameters, visitor, ts.isParameterDeclaration), nodeVisitor(node.type, visitor, ts.isTypeNode));
|
|
90708
|
+
},
|
|
90709
|
+
// Types
|
|
90710
|
+
_a[177 /* TypePredicate */] = function visitEachChildOfTypePredicateNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
90711
|
+
return context.factory.updateTypePredicateNode(node, nodeVisitor(node.assertsModifier, visitor, ts.isAssertsKeyword), nodeVisitor(node.parameterName, visitor, ts.isIdentifierOrThisTypeNode), nodeVisitor(node.type, visitor, ts.isTypeNode));
|
|
90712
|
+
},
|
|
90713
|
+
_a[178 /* TypeReference */] = function visitEachChildOfTypeReferenceNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
90714
|
+
return context.factory.updateTypeReferenceNode(node, nodeVisitor(node.typeName, visitor, ts.isEntityName), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode));
|
|
90715
|
+
},
|
|
90716
|
+
_a[179 /* FunctionType */] = function visitEachChildOfFunctionTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
90717
|
+
return context.factory.updateFunctionTypeNode(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.parameters, visitor, ts.isParameterDeclaration), nodeVisitor(node.type, visitor, ts.isTypeNode));
|
|
90718
|
+
},
|
|
90719
|
+
_a[180 /* ConstructorType */] = function visitEachChildOfConstructorTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
90720
|
+
return context.factory.updateConstructorTypeNode(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.parameters, visitor, ts.isParameterDeclaration), nodeVisitor(node.type, visitor, ts.isTypeNode));
|
|
90721
|
+
},
|
|
90722
|
+
_a[181 /* TypeQuery */] = function visitEachChildOfTypeQueryNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
90723
|
+
return context.factory.updateTypeQueryNode(node, nodeVisitor(node.exprName, visitor, ts.isEntityName), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode));
|
|
90724
|
+
},
|
|
90725
|
+
_a[182 /* TypeLiteral */] = function visitEachChildOfTypeLiteralNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
|
|
90726
|
+
return context.factory.updateTypeLiteralNode(node, nodesVisitor(node.members, visitor, ts.isTypeElement));
|
|
90727
|
+
},
|
|
90728
|
+
_a[183 /* ArrayType */] = function visitEachChildOfArrayTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
90729
|
+
return context.factory.updateArrayTypeNode(node, nodeVisitor(node.elementType, visitor, ts.isTypeNode));
|
|
90730
|
+
},
|
|
90731
|
+
_a[184 /* TupleType */] = function visitEachChildOfTupleTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
|
|
90732
|
+
return context.factory.updateTupleTypeNode(node, nodesVisitor(node.elements, visitor, ts.isTypeNode));
|
|
90733
|
+
},
|
|
90734
|
+
_a[185 /* OptionalType */] = function visitEachChildOfOptionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
90735
|
+
return context.factory.updateOptionalTypeNode(node, nodeVisitor(node.type, visitor, ts.isTypeNode));
|
|
90736
|
+
},
|
|
90737
|
+
_a[186 /* RestType */] = function visitEachChildOfRestTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
90738
|
+
return context.factory.updateRestTypeNode(node, nodeVisitor(node.type, visitor, ts.isTypeNode));
|
|
90739
|
+
},
|
|
90740
|
+
_a[187 /* UnionType */] = function visitEachChildOfUnionTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
|
|
90741
|
+
return context.factory.updateUnionTypeNode(node, nodesVisitor(node.types, visitor, ts.isTypeNode));
|
|
90742
|
+
},
|
|
90743
|
+
_a[188 /* IntersectionType */] = function visitEachChildOfIntersectionTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
|
|
90744
|
+
return context.factory.updateIntersectionTypeNode(node, nodesVisitor(node.types, visitor, ts.isTypeNode));
|
|
90745
|
+
},
|
|
90746
|
+
_a[189 /* ConditionalType */] = function visitEachChildOfConditionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
90747
|
+
return context.factory.updateConditionalTypeNode(node, nodeVisitor(node.checkType, visitor, ts.isTypeNode), nodeVisitor(node.extendsType, visitor, ts.isTypeNode), nodeVisitor(node.trueType, visitor, ts.isTypeNode), nodeVisitor(node.falseType, visitor, ts.isTypeNode));
|
|
90748
|
+
},
|
|
90749
|
+
_a[190 /* InferType */] = function visitEachChildOfInferTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
90750
|
+
return context.factory.updateInferTypeNode(node, nodeVisitor(node.typeParameter, visitor, ts.isTypeParameterDeclaration));
|
|
90751
|
+
},
|
|
90752
|
+
_a[200 /* ImportType */] = function visitEachChildOfImportTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
90753
|
+
return context.factory.updateImportTypeNode(node, nodeVisitor(node.argument, visitor, ts.isTypeNode), nodeVisitor(node.assertions, visitor, ts.isImportTypeAssertionContainer), nodeVisitor(node.qualifier, visitor, ts.isEntityName), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode), node.isTypeOf);
|
|
90754
|
+
},
|
|
90755
|
+
_a[295 /* ImportTypeAssertionContainer */] = function visitEachChildOfImportTypeAssertionContainer(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
90756
|
+
return context.factory.updateImportTypeAssertionContainer(node, nodeVisitor(node.assertClause, visitor, ts.isAssertClause), node.multiLine);
|
|
90757
|
+
},
|
|
90758
|
+
_a[197 /* NamedTupleMember */] = function visitEachChildOfNamedTupleMember(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
90759
|
+
return context.factory.updateNamedTupleMember(node, nodeVisitor(node.dotDotDotToken, tokenVisitor, ts.isDotDotDotToken), nodeVisitor(node.name, visitor, ts.isIdentifier), nodeVisitor(node.questionToken, tokenVisitor, ts.isQuestionToken), nodeVisitor(node.type, visitor, ts.isTypeNode));
|
|
90760
|
+
},
|
|
90761
|
+
_a[191 /* ParenthesizedType */] = function visitEachChildOfParenthesizedType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
90762
|
+
return context.factory.updateParenthesizedType(node, nodeVisitor(node.type, visitor, ts.isTypeNode));
|
|
90763
|
+
},
|
|
90764
|
+
_a[193 /* TypeOperator */] = function visitEachChildOfTypeOperatorNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
90765
|
+
return context.factory.updateTypeOperatorNode(node, nodeVisitor(node.type, visitor, ts.isTypeNode));
|
|
90766
|
+
},
|
|
90767
|
+
_a[194 /* IndexedAccessType */] = function visitEachChildOfIndexedAccessType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
90768
|
+
return context.factory.updateIndexedAccessTypeNode(node, nodeVisitor(node.objectType, visitor, ts.isTypeNode), nodeVisitor(node.indexType, visitor, ts.isTypeNode));
|
|
90769
|
+
},
|
|
90770
|
+
_a[195 /* MappedType */] = function visitEachChildOfMappedType(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
90771
|
+
return context.factory.updateMappedTypeNode(node, nodeVisitor(node.readonlyToken, tokenVisitor, ts.isReadonlyKeywordOrPlusOrMinusToken), nodeVisitor(node.typeParameter, visitor, ts.isTypeParameterDeclaration), nodeVisitor(node.nameType, visitor, ts.isTypeNode), nodeVisitor(node.questionToken, tokenVisitor, ts.isQuestionOrPlusOrMinusToken), nodeVisitor(node.type, visitor, ts.isTypeNode), nodesVisitor(node.members, visitor, ts.isTypeElement));
|
|
90772
|
+
},
|
|
90773
|
+
_a[196 /* LiteralType */] = function visitEachChildOfLiteralTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
90774
|
+
return context.factory.updateLiteralTypeNode(node, nodeVisitor(node.literal, visitor, ts.isExpression));
|
|
90775
|
+
},
|
|
90776
|
+
_a[198 /* TemplateLiteralType */] = function visitEachChildOfTemplateLiteralType(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
90777
|
+
return context.factory.updateTemplateLiteralType(node, nodeVisitor(node.head, visitor, ts.isTemplateHead), nodesVisitor(node.templateSpans, visitor, ts.isTemplateLiteralTypeSpan));
|
|
90778
|
+
},
|
|
90779
|
+
_a[199 /* TemplateLiteralTypeSpan */] = function visitEachChildOfTemplateLiteralTypeSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
90780
|
+
return context.factory.updateTemplateLiteralTypeSpan(node, nodeVisitor(node.type, visitor, ts.isTypeNode), nodeVisitor(node.literal, visitor, ts.isTemplateMiddleOrTemplateTail));
|
|
90781
|
+
},
|
|
90782
|
+
// Binding patterns
|
|
90783
|
+
_a[201 /* ObjectBindingPattern */] = function visitEachChildOfObjectBindingPattern(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
|
|
90784
|
+
return context.factory.updateObjectBindingPattern(node, nodesVisitor(node.elements, visitor, ts.isBindingElement));
|
|
90785
|
+
},
|
|
90786
|
+
_a[202 /* ArrayBindingPattern */] = function visitEachChildOfArrayBindingPattern(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
|
|
90787
|
+
return context.factory.updateArrayBindingPattern(node, nodesVisitor(node.elements, visitor, ts.isArrayBindingElement));
|
|
90788
|
+
},
|
|
90789
|
+
_a[203 /* BindingElement */] = function visitEachChildOfBindingElement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
90790
|
+
return context.factory.updateBindingElement(node, nodeVisitor(node.dotDotDotToken, tokenVisitor, ts.isDotDotDotToken), nodeVisitor(node.propertyName, visitor, ts.isPropertyName), nodeVisitor(node.name, visitor, ts.isBindingName), nodeVisitor(node.initializer, visitor, ts.isExpression));
|
|
90791
|
+
},
|
|
90792
|
+
// Expression
|
|
90793
|
+
_a[204 /* ArrayLiteralExpression */] = function visitEachChildOfArrayLiteralExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
|
|
90794
|
+
return context.factory.updateArrayLiteralExpression(node, nodesVisitor(node.elements, visitor, ts.isExpression));
|
|
90795
|
+
},
|
|
90796
|
+
_a[205 /* ObjectLiteralExpression */] = function visitEachChildOfObjectLiteralExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
|
|
90797
|
+
return context.factory.updateObjectLiteralExpression(node, nodesVisitor(node.properties, visitor, ts.isObjectLiteralElementLike));
|
|
90798
|
+
},
|
|
90799
|
+
_a[206 /* PropertyAccessExpression */] = function visitEachChildOfPropertyAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
90800
|
+
return ts.isPropertyAccessChain(node) ?
|
|
90801
|
+
context.factory.updatePropertyAccessChain(node, nodeVisitor(node.expression, visitor, ts.isExpression), nodeVisitor(node.questionDotToken, tokenVisitor, ts.isQuestionDotToken), nodeVisitor(node.name, visitor, ts.isMemberName)) :
|
|
90802
|
+
context.factory.updatePropertyAccessExpression(node, nodeVisitor(node.expression, visitor, ts.isExpression), nodeVisitor(node.name, visitor, ts.isMemberName));
|
|
90803
|
+
},
|
|
90804
|
+
_a[207 /* ElementAccessExpression */] = function visitEachChildOfElementAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
90805
|
+
return ts.isElementAccessChain(node) ?
|
|
90806
|
+
context.factory.updateElementAccessChain(node, nodeVisitor(node.expression, visitor, ts.isExpression), nodeVisitor(node.questionDotToken, tokenVisitor, ts.isQuestionDotToken), nodeVisitor(node.argumentExpression, visitor, ts.isExpression)) :
|
|
90807
|
+
context.factory.updateElementAccessExpression(node, nodeVisitor(node.expression, visitor, ts.isExpression), nodeVisitor(node.argumentExpression, visitor, ts.isExpression));
|
|
90808
|
+
},
|
|
90809
|
+
_a[208 /* CallExpression */] = function visitEachChildOfCallExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
90810
|
+
return ts.isCallChain(node) ?
|
|
90811
|
+
context.factory.updateCallChain(node, nodeVisitor(node.expression, visitor, ts.isExpression), nodeVisitor(node.questionDotToken, tokenVisitor, ts.isQuestionDotToken), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode), nodesVisitor(node.arguments, visitor, ts.isExpression)) :
|
|
90812
|
+
context.factory.updateCallExpression(node, nodeVisitor(node.expression, visitor, ts.isExpression), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode), nodesVisitor(node.arguments, visitor, ts.isExpression));
|
|
90813
|
+
},
|
|
90814
|
+
_a[209 /* NewExpression */] = function visitEachChildOfNewExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
90815
|
+
return context.factory.updateNewExpression(node, nodeVisitor(node.expression, visitor, ts.isExpression), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode), nodesVisitor(node.arguments, visitor, ts.isExpression));
|
|
90816
|
+
},
|
|
90817
|
+
_a[210 /* TaggedTemplateExpression */] = function visitEachChildOfTaggedTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
90818
|
+
return context.factory.updateTaggedTemplateExpression(node, nodeVisitor(node.tag, visitor, ts.isExpression), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode), nodeVisitor(node.template, visitor, ts.isTemplateLiteral));
|
|
90819
|
+
},
|
|
90820
|
+
_a[211 /* TypeAssertionExpression */] = function visitEachChildOfTypeAssertionExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
90821
|
+
return context.factory.updateTypeAssertion(node, nodeVisitor(node.type, visitor, ts.isTypeNode), nodeVisitor(node.expression, visitor, ts.isExpression));
|
|
90822
|
+
},
|
|
90823
|
+
_a[212 /* ParenthesizedExpression */] = function visitEachChildOfParenthesizedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
90824
|
+
return context.factory.updateParenthesizedExpression(node, nodeVisitor(node.expression, visitor, ts.isExpression));
|
|
90825
|
+
},
|
|
90826
|
+
_a[213 /* FunctionExpression */] = function visitEachChildOfFunctionExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
90827
|
+
return context.factory.updateFunctionExpression(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodeVisitor(node.asteriskToken, tokenVisitor, ts.isAsteriskToken), nodeVisitor(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), visitParameterList(node.parameters, visitor, context, nodesVisitor), nodeVisitor(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context, nodeVisitor));
|
|
90828
|
+
},
|
|
90829
|
+
_a[214 /* ArrowFunction */] = function visitEachChildOfArrowFunction(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
90830
|
+
return context.factory.updateArrowFunction(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), visitParameterList(node.parameters, visitor, context, nodesVisitor), nodeVisitor(node.type, visitor, ts.isTypeNode), nodeVisitor(node.equalsGreaterThanToken, tokenVisitor, ts.isEqualsGreaterThanToken), visitFunctionBody(node.body, visitor, context, nodeVisitor));
|
|
90831
|
+
},
|
|
90832
|
+
_a[215 /* DeleteExpression */] = function visitEachChildOfDeleteExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
90833
|
+
return context.factory.updateDeleteExpression(node, nodeVisitor(node.expression, visitor, ts.isExpression));
|
|
90834
|
+
},
|
|
90835
|
+
_a[216 /* TypeOfExpression */] = function visitEachChildOfTypeOfExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
90836
|
+
return context.factory.updateTypeOfExpression(node, nodeVisitor(node.expression, visitor, ts.isExpression));
|
|
90837
|
+
},
|
|
90838
|
+
_a[217 /* VoidExpression */] = function visitEachChildOfVoidExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
90839
|
+
return context.factory.updateVoidExpression(node, nodeVisitor(node.expression, visitor, ts.isExpression));
|
|
90840
|
+
},
|
|
90841
|
+
_a[218 /* AwaitExpression */] = function visitEachChildOfAwaitExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
90842
|
+
return context.factory.updateAwaitExpression(node, nodeVisitor(node.expression, visitor, ts.isExpression));
|
|
90843
|
+
},
|
|
90844
|
+
_a[219 /* PrefixUnaryExpression */] = function visitEachChildOfPrefixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
90845
|
+
return context.factory.updatePrefixUnaryExpression(node, nodeVisitor(node.operand, visitor, ts.isExpression));
|
|
90846
|
+
},
|
|
90847
|
+
_a[220 /* PostfixUnaryExpression */] = function visitEachChildOfPostfixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
90848
|
+
return context.factory.updatePostfixUnaryExpression(node, nodeVisitor(node.operand, visitor, ts.isExpression));
|
|
90849
|
+
},
|
|
90850
|
+
_a[221 /* BinaryExpression */] = function visitEachChildOfBinaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
90851
|
+
return context.factory.updateBinaryExpression(node, nodeVisitor(node.left, visitor, ts.isExpression), nodeVisitor(node.operatorToken, tokenVisitor, ts.isBinaryOperatorToken), nodeVisitor(node.right, visitor, ts.isExpression));
|
|
90852
|
+
},
|
|
90853
|
+
_a[222 /* ConditionalExpression */] = function visitEachChildOfConditionalExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
90854
|
+
return context.factory.updateConditionalExpression(node, nodeVisitor(node.condition, visitor, ts.isExpression), nodeVisitor(node.questionToken, tokenVisitor, ts.isQuestionToken), nodeVisitor(node.whenTrue, visitor, ts.isExpression), nodeVisitor(node.colonToken, tokenVisitor, ts.isColonToken), nodeVisitor(node.whenFalse, visitor, ts.isExpression));
|
|
90855
|
+
},
|
|
90856
|
+
_a[223 /* TemplateExpression */] = function visitEachChildOfTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
90857
|
+
return context.factory.updateTemplateExpression(node, nodeVisitor(node.head, visitor, ts.isTemplateHead), nodesVisitor(node.templateSpans, visitor, ts.isTemplateSpan));
|
|
90858
|
+
},
|
|
90859
|
+
_a[224 /* YieldExpression */] = function visitEachChildOfYieldExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
90860
|
+
return context.factory.updateYieldExpression(node, nodeVisitor(node.asteriskToken, tokenVisitor, ts.isAsteriskToken), nodeVisitor(node.expression, visitor, ts.isExpression));
|
|
90861
|
+
},
|
|
90862
|
+
_a[225 /* SpreadElement */] = function visitEachChildOfSpreadElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
90863
|
+
return context.factory.updateSpreadElement(node, nodeVisitor(node.expression, visitor, ts.isExpression));
|
|
90864
|
+
},
|
|
90865
|
+
_a[226 /* ClassExpression */] = function visitEachChildOfClassExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
90866
|
+
return context.factory.updateClassExpression(node, nodesVisitor(node.modifiers, visitor, ts.isModifierLike), nodeVisitor(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.heritageClauses, visitor, ts.isHeritageClause), nodesVisitor(node.members, visitor, ts.isClassElement));
|
|
90867
|
+
},
|
|
90868
|
+
_a[228 /* ExpressionWithTypeArguments */] = function visitEachChildOfExpressionWithTypeArguments(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
90869
|
+
return context.factory.updateExpressionWithTypeArguments(node, nodeVisitor(node.expression, visitor, ts.isExpression), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode));
|
|
90870
|
+
},
|
|
90871
|
+
_a[229 /* AsExpression */] = function visitEachChildOfAsExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
90872
|
+
return context.factory.updateAsExpression(node, nodeVisitor(node.expression, visitor, ts.isExpression), nodeVisitor(node.type, visitor, ts.isTypeNode));
|
|
90873
|
+
},
|
|
90874
|
+
_a[230 /* NonNullExpression */] = function visitEachChildOfNonNullExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
90875
|
+
return ts.isOptionalChain(node) ?
|
|
90876
|
+
context.factory.updateNonNullChain(node, nodeVisitor(node.expression, visitor, ts.isExpression)) :
|
|
90877
|
+
context.factory.updateNonNullExpression(node, nodeVisitor(node.expression, visitor, ts.isExpression));
|
|
90878
|
+
},
|
|
90879
|
+
_a[231 /* MetaProperty */] = function visitEachChildOfMetaProperty(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
90880
|
+
return context.factory.updateMetaProperty(node, nodeVisitor(node.name, visitor, ts.isIdentifier));
|
|
90881
|
+
},
|
|
90882
|
+
// Misc
|
|
90883
|
+
_a[233 /* TemplateSpan */] = function visitEachChildOfTemplateSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
90884
|
+
return context.factory.updateTemplateSpan(node, nodeVisitor(node.expression, visitor, ts.isExpression), nodeVisitor(node.literal, visitor, ts.isTemplateMiddleOrTemplateTail));
|
|
90885
|
+
},
|
|
90886
|
+
// Element
|
|
90887
|
+
_a[235 /* Block */] = function visitEachChildOfBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
|
|
90888
|
+
return context.factory.updateBlock(node, nodesVisitor(node.statements, visitor, ts.isStatement));
|
|
90889
|
+
},
|
|
90890
|
+
_a[237 /* VariableStatement */] = function visitEachChildOfVariableStatement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
90891
|
+
return context.factory.updateVariableStatement(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodeVisitor(node.declarationList, visitor, ts.isVariableDeclarationList));
|
|
90892
|
+
},
|
|
90893
|
+
_a[238 /* ExpressionStatement */] = function visitEachChildOfExpressionStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
90894
|
+
return context.factory.updateExpressionStatement(node, nodeVisitor(node.expression, visitor, ts.isExpression));
|
|
90895
|
+
},
|
|
90896
|
+
_a[239 /* IfStatement */] = function visitEachChildOfIfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
90897
|
+
return context.factory.updateIfStatement(node, nodeVisitor(node.expression, visitor, ts.isExpression), nodeVisitor(node.thenStatement, visitor, ts.isStatement, context.factory.liftToBlock), nodeVisitor(node.elseStatement, visitor, ts.isStatement, context.factory.liftToBlock));
|
|
90898
|
+
},
|
|
90899
|
+
_a[240 /* DoStatement */] = function visitEachChildOfDoStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
90900
|
+
return context.factory.updateDoStatement(node, visitIterationBody(node.statement, visitor, context, nodeVisitor), nodeVisitor(node.expression, visitor, ts.isExpression));
|
|
90901
|
+
},
|
|
90902
|
+
_a[241 /* WhileStatement */] = function visitEachChildOfWhileStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
90903
|
+
return context.factory.updateWhileStatement(node, nodeVisitor(node.expression, visitor, ts.isExpression), visitIterationBody(node.statement, visitor, context, nodeVisitor));
|
|
90904
|
+
},
|
|
90905
|
+
_a[242 /* ForStatement */] = function visitEachChildOfForStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
90906
|
+
return context.factory.updateForStatement(node, nodeVisitor(node.initializer, visitor, ts.isForInitializer), nodeVisitor(node.condition, visitor, ts.isExpression), nodeVisitor(node.incrementor, visitor, ts.isExpression), visitIterationBody(node.statement, visitor, context, nodeVisitor));
|
|
90907
|
+
},
|
|
90908
|
+
_a[243 /* ForInStatement */] = function visitEachChildOfForInStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
90909
|
+
return context.factory.updateForInStatement(node, nodeVisitor(node.initializer, visitor, ts.isForInitializer), nodeVisitor(node.expression, visitor, ts.isExpression), visitIterationBody(node.statement, visitor, context, nodeVisitor));
|
|
90910
|
+
},
|
|
90911
|
+
_a[244 /* ForOfStatement */] = function visitEachChildOfForOfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
90912
|
+
return context.factory.updateForOfStatement(node, nodeVisitor(node.awaitModifier, tokenVisitor, ts.isAwaitKeyword), nodeVisitor(node.initializer, visitor, ts.isForInitializer), nodeVisitor(node.expression, visitor, ts.isExpression), visitIterationBody(node.statement, visitor, context, nodeVisitor));
|
|
90913
|
+
},
|
|
90914
|
+
_a[245 /* ContinueStatement */] = function visitEachChildOfContinueStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
90915
|
+
return context.factory.updateContinueStatement(node, nodeVisitor(node.label, visitor, ts.isIdentifier));
|
|
90916
|
+
},
|
|
90917
|
+
_a[246 /* BreakStatement */] = function visitEachChildOfBreakStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
90918
|
+
return context.factory.updateBreakStatement(node, nodeVisitor(node.label, visitor, ts.isIdentifier));
|
|
90919
|
+
},
|
|
90920
|
+
_a[247 /* ReturnStatement */] = function visitEachChildOfReturnStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
90921
|
+
return context.factory.updateReturnStatement(node, nodeVisitor(node.expression, visitor, ts.isExpression));
|
|
90922
|
+
},
|
|
90923
|
+
_a[248 /* WithStatement */] = function visitEachChildOfWithStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
90924
|
+
return context.factory.updateWithStatement(node, nodeVisitor(node.expression, visitor, ts.isExpression), nodeVisitor(node.statement, visitor, ts.isStatement, context.factory.liftToBlock));
|
|
90925
|
+
},
|
|
90926
|
+
_a[249 /* SwitchStatement */] = function visitEachChildOfSwitchStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
90927
|
+
return context.factory.updateSwitchStatement(node, nodeVisitor(node.expression, visitor, ts.isExpression), nodeVisitor(node.caseBlock, visitor, ts.isCaseBlock));
|
|
90928
|
+
},
|
|
90929
|
+
_a[250 /* LabeledStatement */] = function visitEachChildOfLabeledStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
90930
|
+
return context.factory.updateLabeledStatement(node, nodeVisitor(node.label, visitor, ts.isIdentifier), nodeVisitor(node.statement, visitor, ts.isStatement, context.factory.liftToBlock));
|
|
90931
|
+
},
|
|
90932
|
+
_a[251 /* ThrowStatement */] = function visitEachChildOfThrowStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
90933
|
+
return context.factory.updateThrowStatement(node, nodeVisitor(node.expression, visitor, ts.isExpression));
|
|
90934
|
+
},
|
|
90935
|
+
_a[252 /* TryStatement */] = function visitEachChildOfTryStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
90936
|
+
return context.factory.updateTryStatement(node, nodeVisitor(node.tryBlock, visitor, ts.isBlock), nodeVisitor(node.catchClause, visitor, ts.isCatchClause), nodeVisitor(node.finallyBlock, visitor, ts.isBlock));
|
|
90937
|
+
},
|
|
90938
|
+
_a[254 /* VariableDeclaration */] = function visitEachChildOfVariableDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
90939
|
+
return context.factory.updateVariableDeclaration(node, nodeVisitor(node.name, visitor, ts.isBindingName), nodeVisitor(node.exclamationToken, tokenVisitor, ts.isExclamationToken), nodeVisitor(node.type, visitor, ts.isTypeNode), nodeVisitor(node.initializer, visitor, ts.isExpression));
|
|
90940
|
+
},
|
|
90941
|
+
_a[255 /* VariableDeclarationList */] = function visitEachChildOfVariableDeclarationList(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
|
|
90942
|
+
return context.factory.updateVariableDeclarationList(node, nodesVisitor(node.declarations, visitor, ts.isVariableDeclaration));
|
|
90943
|
+
},
|
|
90944
|
+
_a[256 /* FunctionDeclaration */] = function visitEachChildOfFunctionDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
90945
|
+
return context.factory.updateFunctionDeclaration(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodeVisitor(node.asteriskToken, tokenVisitor, ts.isAsteriskToken), nodeVisitor(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), visitParameterList(node.parameters, visitor, context, nodesVisitor), nodeVisitor(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context, nodeVisitor));
|
|
90946
|
+
},
|
|
90947
|
+
_a[257 /* ClassDeclaration */] = function visitEachChildOfClassDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
90948
|
+
return context.factory.updateClassDeclaration(node, nodesVisitor(node.modifiers, visitor, ts.isModifierLike), nodeVisitor(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.heritageClauses, visitor, ts.isHeritageClause), nodesVisitor(node.members, visitor, ts.isClassElement));
|
|
90949
|
+
},
|
|
90950
|
+
_a[258 /* InterfaceDeclaration */] = function visitEachChildOfInterfaceDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
90951
|
+
return context.factory.updateInterfaceDeclaration(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodeVisitor(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.heritageClauses, visitor, ts.isHeritageClause), nodesVisitor(node.members, visitor, ts.isTypeElement));
|
|
90952
|
+
},
|
|
90953
|
+
_a[259 /* TypeAliasDeclaration */] = function visitEachChildOfTypeAliasDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
90954
|
+
return context.factory.updateTypeAliasDeclaration(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodeVisitor(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodeVisitor(node.type, visitor, ts.isTypeNode));
|
|
90955
|
+
},
|
|
90956
|
+
_a[260 /* EnumDeclaration */] = function visitEachChildOfEnumDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
90957
|
+
return context.factory.updateEnumDeclaration(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodeVisitor(node.name, visitor, ts.isIdentifier), nodesVisitor(node.members, visitor, ts.isEnumMember));
|
|
90958
|
+
},
|
|
90959
|
+
_a[261 /* ModuleDeclaration */] = function visitEachChildOfModuleDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
90960
|
+
return context.factory.updateModuleDeclaration(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodeVisitor(node.name, visitor, ts.isModuleName), nodeVisitor(node.body, visitor, ts.isModuleBody));
|
|
90961
|
+
},
|
|
90962
|
+
_a[262 /* ModuleBlock */] = function visitEachChildOfModuleBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
|
|
90963
|
+
return context.factory.updateModuleBlock(node, nodesVisitor(node.statements, visitor, ts.isStatement));
|
|
90964
|
+
},
|
|
90965
|
+
_a[263 /* CaseBlock */] = function visitEachChildOfCaseBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
|
|
90966
|
+
return context.factory.updateCaseBlock(node, nodesVisitor(node.clauses, visitor, ts.isCaseOrDefaultClause));
|
|
90967
|
+
},
|
|
90968
|
+
_a[264 /* NamespaceExportDeclaration */] = function visitEachChildOfNamespaceExportDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
90969
|
+
return context.factory.updateNamespaceExportDeclaration(node, nodeVisitor(node.name, visitor, ts.isIdentifier));
|
|
90970
|
+
},
|
|
90971
|
+
_a[265 /* ImportEqualsDeclaration */] = function visitEachChildOfImportEqualsDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
90972
|
+
return context.factory.updateImportEqualsDeclaration(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), node.isTypeOnly, nodeVisitor(node.name, visitor, ts.isIdentifier), nodeVisitor(node.moduleReference, visitor, ts.isModuleReference));
|
|
90973
|
+
},
|
|
90974
|
+
_a[266 /* ImportDeclaration */] = function visitEachChildOfImportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
90975
|
+
return context.factory.updateImportDeclaration(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodeVisitor(node.importClause, visitor, ts.isImportClause), nodeVisitor(node.moduleSpecifier, visitor, ts.isExpression), nodeVisitor(node.assertClause, visitor, ts.isAssertClause));
|
|
90976
|
+
},
|
|
90977
|
+
_a[293 /* AssertClause */] = function visitEachChildOfAssertClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
|
|
90978
|
+
return context.factory.updateAssertClause(node, nodesVisitor(node.elements, visitor, ts.isAssertEntry), node.multiLine);
|
|
90979
|
+
},
|
|
90980
|
+
_a[294 /* AssertEntry */] = function visitEachChildOfAssertEntry(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
90981
|
+
return context.factory.updateAssertEntry(node, nodeVisitor(node.name, visitor, ts.isAssertionKey), nodeVisitor(node.value, visitor, ts.isExpression));
|
|
90982
|
+
},
|
|
90983
|
+
_a[267 /* ImportClause */] = function visitEachChildOfImportClause(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
90984
|
+
return context.factory.updateImportClause(node, node.isTypeOnly, nodeVisitor(node.name, visitor, ts.isIdentifier), nodeVisitor(node.namedBindings, visitor, ts.isNamedImportBindings));
|
|
90985
|
+
},
|
|
90986
|
+
_a[268 /* NamespaceImport */] = function visitEachChildOfNamespaceImport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
90987
|
+
return context.factory.updateNamespaceImport(node, nodeVisitor(node.name, visitor, ts.isIdentifier));
|
|
90988
|
+
},
|
|
90989
|
+
_a[274 /* NamespaceExport */] = function visitEachChildOfNamespaceExport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
90990
|
+
return context.factory.updateNamespaceExport(node, nodeVisitor(node.name, visitor, ts.isIdentifier));
|
|
90991
|
+
},
|
|
90992
|
+
_a[269 /* NamedImports */] = function visitEachChildOfNamedImports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
|
|
90993
|
+
return context.factory.updateNamedImports(node, nodesVisitor(node.elements, visitor, ts.isImportSpecifier));
|
|
90994
|
+
},
|
|
90995
|
+
_a[270 /* ImportSpecifier */] = function visitEachChildOfImportSpecifier(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
90996
|
+
return context.factory.updateImportSpecifier(node, node.isTypeOnly, nodeVisitor(node.propertyName, visitor, ts.isIdentifier), nodeVisitor(node.name, visitor, ts.isIdentifier));
|
|
90997
|
+
},
|
|
90998
|
+
_a[271 /* ExportAssignment */] = function visitEachChildOfExportAssignment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
90999
|
+
return context.factory.updateExportAssignment(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodeVisitor(node.expression, visitor, ts.isExpression));
|
|
91000
|
+
},
|
|
91001
|
+
_a[272 /* ExportDeclaration */] = function visitEachChildOfExportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
91002
|
+
return context.factory.updateExportDeclaration(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), node.isTypeOnly, nodeVisitor(node.exportClause, visitor, ts.isNamedExportBindings), nodeVisitor(node.moduleSpecifier, visitor, ts.isExpression), nodeVisitor(node.assertClause, visitor, ts.isAssertClause));
|
|
91003
|
+
},
|
|
91004
|
+
_a[273 /* NamedExports */] = function visitEachChildOfNamedExports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
|
|
91005
|
+
return context.factory.updateNamedExports(node, nodesVisitor(node.elements, visitor, ts.isExportSpecifier));
|
|
91006
|
+
},
|
|
91007
|
+
_a[275 /* ExportSpecifier */] = function visitEachChildOfExportSpecifier(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
91008
|
+
return context.factory.updateExportSpecifier(node, node.isTypeOnly, nodeVisitor(node.propertyName, visitor, ts.isIdentifier), nodeVisitor(node.name, visitor, ts.isIdentifier));
|
|
91009
|
+
},
|
|
91010
|
+
// Module references
|
|
91011
|
+
_a[277 /* ExternalModuleReference */] = function visitEachChildOfExternalModuleReference(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
91012
|
+
return context.factory.updateExternalModuleReference(node, nodeVisitor(node.expression, visitor, ts.isExpression));
|
|
91013
|
+
},
|
|
91014
|
+
// JSX
|
|
91015
|
+
_a[278 /* JsxElement */] = function visitEachChildOfJsxElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
91016
|
+
return context.factory.updateJsxElement(node, nodeVisitor(node.openingElement, visitor, ts.isJsxOpeningElement), nodesVisitor(node.children, visitor, ts.isJsxChild), nodeVisitor(node.closingElement, visitor, ts.isJsxClosingElement));
|
|
91017
|
+
},
|
|
91018
|
+
_a[279 /* JsxSelfClosingElement */] = function visitEachChildOfJsxSelfClosingElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
91019
|
+
return context.factory.updateJsxSelfClosingElement(node, nodeVisitor(node.tagName, visitor, ts.isJsxTagNameExpression), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode), nodeVisitor(node.attributes, visitor, ts.isJsxAttributes));
|
|
91020
|
+
},
|
|
91021
|
+
_a[280 /* JsxOpeningElement */] = function visitEachChildOfJsxOpeningElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
91022
|
+
return context.factory.updateJsxOpeningElement(node, nodeVisitor(node.tagName, visitor, ts.isJsxTagNameExpression), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode), nodeVisitor(node.attributes, visitor, ts.isJsxAttributes));
|
|
91023
|
+
},
|
|
91024
|
+
_a[281 /* JsxClosingElement */] = function visitEachChildOfJsxClosingElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
91025
|
+
return context.factory.updateJsxClosingElement(node, nodeVisitor(node.tagName, visitor, ts.isJsxTagNameExpression));
|
|
91026
|
+
},
|
|
91027
|
+
_a[282 /* JsxFragment */] = function visitEachChildOfJsxFragment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
91028
|
+
return context.factory.updateJsxFragment(node, nodeVisitor(node.openingFragment, visitor, ts.isJsxOpeningFragment), nodesVisitor(node.children, visitor, ts.isJsxChild), nodeVisitor(node.closingFragment, visitor, ts.isJsxClosingFragment));
|
|
91029
|
+
},
|
|
91030
|
+
_a[285 /* JsxAttribute */] = function visitEachChildOfJsxAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
91031
|
+
return context.factory.updateJsxAttribute(node, nodeVisitor(node.name, visitor, ts.isIdentifier), nodeVisitor(node.initializer, visitor, ts.isStringLiteralOrJsxExpression));
|
|
91032
|
+
},
|
|
91033
|
+
_a[286 /* JsxAttributes */] = function visitEachChildOfJsxAttributes(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
|
|
91034
|
+
return context.factory.updateJsxAttributes(node, nodesVisitor(node.properties, visitor, ts.isJsxAttributeLike));
|
|
91035
|
+
},
|
|
91036
|
+
_a[287 /* JsxSpreadAttribute */] = function visitEachChildOfJsxSpreadAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
91037
|
+
return context.factory.updateJsxSpreadAttribute(node, nodeVisitor(node.expression, visitor, ts.isExpression));
|
|
91038
|
+
},
|
|
91039
|
+
_a[288 /* JsxExpression */] = function visitEachChildOfJsxExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
91040
|
+
return context.factory.updateJsxExpression(node, nodeVisitor(node.expression, visitor, ts.isExpression));
|
|
91041
|
+
},
|
|
91042
|
+
// Clauses
|
|
91043
|
+
_a[289 /* CaseClause */] = function visitEachChildOfCaseClause(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
91044
|
+
return context.factory.updateCaseClause(node, nodeVisitor(node.expression, visitor, ts.isExpression), nodesVisitor(node.statements, visitor, ts.isStatement));
|
|
91045
|
+
},
|
|
91046
|
+
_a[290 /* DefaultClause */] = function visitEachChildOfDefaultClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
|
|
91047
|
+
return context.factory.updateDefaultClause(node, nodesVisitor(node.statements, visitor, ts.isStatement));
|
|
91048
|
+
},
|
|
91049
|
+
_a[291 /* HeritageClause */] = function visitEachChildOfHeritageClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
|
|
91050
|
+
return context.factory.updateHeritageClause(node, nodesVisitor(node.types, visitor, ts.isExpressionWithTypeArguments));
|
|
91051
|
+
},
|
|
91052
|
+
_a[292 /* CatchClause */] = function visitEachChildOfCatchClause(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
91053
|
+
return context.factory.updateCatchClause(node, nodeVisitor(node.variableDeclaration, visitor, ts.isVariableDeclaration), nodeVisitor(node.block, visitor, ts.isBlock));
|
|
91054
|
+
},
|
|
91055
|
+
// Property assignments
|
|
91056
|
+
_a[296 /* PropertyAssignment */] = function visitEachChildOfPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
91057
|
+
return context.factory.updatePropertyAssignment(node, nodeVisitor(node.name, visitor, ts.isPropertyName), nodeVisitor(node.initializer, visitor, ts.isExpression));
|
|
91058
|
+
},
|
|
91059
|
+
_a[297 /* ShorthandPropertyAssignment */] = function visitEachChildOfShorthandPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
91060
|
+
return context.factory.updateShorthandPropertyAssignment(node, nodeVisitor(node.name, visitor, ts.isIdentifier), nodeVisitor(node.objectAssignmentInitializer, visitor, ts.isExpression));
|
|
91061
|
+
},
|
|
91062
|
+
_a[298 /* SpreadAssignment */] = function visitEachChildOfSpreadAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
91063
|
+
return context.factory.updateSpreadAssignment(node, nodeVisitor(node.expression, visitor, ts.isExpression));
|
|
91064
|
+
},
|
|
91065
|
+
// Enum
|
|
91066
|
+
_a[299 /* EnumMember */] = function visitEachChildOfEnumMember(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
91067
|
+
return context.factory.updateEnumMember(node, nodeVisitor(node.name, visitor, ts.isPropertyName), nodeVisitor(node.initializer, visitor, ts.isExpression));
|
|
91068
|
+
},
|
|
91069
|
+
// Top-level nodes
|
|
91070
|
+
_a[305 /* SourceFile */] = function visitEachChildOfSourceFile(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
|
|
91071
|
+
return context.factory.updateSourceFile(node, visitLexicalEnvironment(node.statements, visitor, context, /*start*/ undefined, /*ensureUseStrict*/ undefined, nodesVisitor));
|
|
91072
|
+
},
|
|
91073
|
+
// Transformation nodes
|
|
91074
|
+
_a[350 /* PartiallyEmittedExpression */] = function visitEachChildOfPartiallyEmittedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
91075
|
+
return context.factory.updatePartiallyEmittedExpression(node, nodeVisitor(node.expression, visitor, ts.isExpression));
|
|
91076
|
+
},
|
|
91077
|
+
_a[351 /* CommaListExpression */] = function visitEachChildOfCommaListExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
|
|
91078
|
+
return context.factory.updateCommaListExpression(node, nodesVisitor(node.elements, visitor, ts.isExpression));
|
|
91079
|
+
},
|
|
91080
|
+
_a);
|
|
91089
91081
|
/**
|
|
91090
91082
|
* Extracts the single node from a NodeArray.
|
|
91091
91083
|
*
|
|
@@ -138904,6 +138896,8 @@ var ts;
|
|
|
138904
138896
|
// Similarly, skip past the symbol for 'export ='
|
|
138905
138897
|
if (importedSymbol.escapedName === "export=") {
|
|
138906
138898
|
importedSymbol = getExportEqualsLocalSymbol(importedSymbol, checker);
|
|
138899
|
+
if (importedSymbol === undefined)
|
|
138900
|
+
return undefined;
|
|
138907
138901
|
}
|
|
138908
138902
|
// If the import has a different name than the export, do not continue searching.
|
|
138909
138903
|
// If `importedName` is undefined, do continue searching as the export is anonymous.
|
|
@@ -138925,19 +138919,19 @@ var ts;
|
|
|
138925
138919
|
FindAllReferences.getImportOrExportSymbol = getImportOrExportSymbol;
|
|
138926
138920
|
function getExportEqualsLocalSymbol(importedSymbol, checker) {
|
|
138927
138921
|
if (importedSymbol.flags & 2097152 /* Alias */) {
|
|
138928
|
-
return
|
|
138922
|
+
return checker.getImmediateAliasedSymbol(importedSymbol);
|
|
138929
138923
|
}
|
|
138930
138924
|
var decl = ts.Debug.checkDefined(importedSymbol.valueDeclaration);
|
|
138931
138925
|
if (ts.isExportAssignment(decl)) { // `export = class {}`
|
|
138932
|
-
return
|
|
138926
|
+
return decl.expression.symbol;
|
|
138933
138927
|
}
|
|
138934
138928
|
else if (ts.isBinaryExpression(decl)) { // `module.exports = class {}`
|
|
138935
|
-
return
|
|
138929
|
+
return decl.right.symbol;
|
|
138936
138930
|
}
|
|
138937
138931
|
else if (ts.isSourceFile(decl)) { // json module
|
|
138938
|
-
return
|
|
138932
|
+
return decl.symbol;
|
|
138939
138933
|
}
|
|
138940
|
-
return
|
|
138934
|
+
return undefined;
|
|
138941
138935
|
}
|
|
138942
138936
|
// If a reference is a class expression, the exported node would be its parent.
|
|
138943
138937
|
// If a reference is a variable declaration, the exported node would be the variable statement.
|
|
@@ -155214,13 +155208,15 @@ var ts;
|
|
|
155214
155208
|
errorCodes: errorCodes,
|
|
155215
155209
|
getCodeActions: function (context) {
|
|
155216
155210
|
var errorCode = context.errorCode, preferences = context.preferences, sourceFile = context.sourceFile, span = context.span, program = context.program;
|
|
155217
|
-
var info =
|
|
155211
|
+
var info = getFixInfos(context, errorCode, span.start, /*useAutoImportProvider*/ true);
|
|
155218
155212
|
if (!info)
|
|
155219
155213
|
return undefined;
|
|
155220
|
-
var fixes = info.fixes, symbolName = info.symbolName, errorIdentifierText = info.errorIdentifierText;
|
|
155221
155214
|
var quotePreference = ts.getQuotePreference(sourceFile, preferences);
|
|
155222
|
-
return
|
|
155223
|
-
|
|
155215
|
+
return info.map(function (_a) {
|
|
155216
|
+
var fix = _a.fix, symbolName = _a.symbolName, errorIdentifierText = _a.errorIdentifierText;
|
|
155217
|
+
return codeActionForFix(context, sourceFile, symbolName, fix,
|
|
155218
|
+
/*includeSymbolNameInDescription*/ symbolName !== errorIdentifierText, quotePreference, program.getCompilerOptions());
|
|
155219
|
+
});
|
|
155224
155220
|
},
|
|
155225
155221
|
fixIds: [importFixId],
|
|
155226
155222
|
getAllCodeActions: function (context) {
|
|
@@ -155245,10 +155241,10 @@ var ts;
|
|
|
155245
155241
|
var newImports = new ts.Map();
|
|
155246
155242
|
return { addImportFromDiagnostic: addImportFromDiagnostic, addImportFromExportedSymbol: addImportFromExportedSymbol, writeFixes: writeFixes, hasFixes: hasFixes };
|
|
155247
155243
|
function addImportFromDiagnostic(diagnostic, context) {
|
|
155248
|
-
var info =
|
|
155249
|
-
if (!info || !info.
|
|
155244
|
+
var info = getFixInfos(context, diagnostic.code, diagnostic.start, useAutoImportProvider);
|
|
155245
|
+
if (!info || !info.length)
|
|
155250
155246
|
return;
|
|
155251
|
-
addImport(info);
|
|
155247
|
+
addImport(ts.first(info));
|
|
155252
155248
|
}
|
|
155253
155249
|
function addImportFromExportedSymbol(exportedSymbol, isValidTypeOnlyUseSite) {
|
|
155254
155250
|
var moduleSymbol = ts.Debug.checkDefined(exportedSymbol.parent);
|
|
@@ -155259,13 +155255,12 @@ var ts;
|
|
|
155259
155255
|
var useRequire = shouldUseRequire(sourceFile, program);
|
|
155260
155256
|
var fix = getImportFixForSymbol(sourceFile, exportInfo, moduleSymbol, program, /*useNamespaceInfo*/ undefined, !!isValidTypeOnlyUseSite, useRequire, host, preferences);
|
|
155261
155257
|
if (fix) {
|
|
155262
|
-
addImport({
|
|
155258
|
+
addImport({ fix: fix, symbolName: symbolName, errorIdentifierText: undefined });
|
|
155263
155259
|
}
|
|
155264
155260
|
}
|
|
155265
155261
|
function addImport(info) {
|
|
155266
155262
|
var _a, _b;
|
|
155267
|
-
var
|
|
155268
|
-
var fix = ts.first(fixes);
|
|
155263
|
+
var fix = info.fix, symbolName = info.symbolName;
|
|
155269
155264
|
switch (fix.kind) {
|
|
155270
155265
|
case 0 /* UseNamespace */:
|
|
155271
155266
|
addToNamespace.push(fix);
|
|
@@ -155449,7 +155444,7 @@ var ts;
|
|
|
155449
155444
|
codefix.getImportCompletionAction = getImportCompletionAction;
|
|
155450
155445
|
function getPromoteTypeOnlyCompletionAction(sourceFile, symbolToken, program, host, formatContext, preferences) {
|
|
155451
155446
|
var compilerOptions = program.getCompilerOptions();
|
|
155452
|
-
var symbolName =
|
|
155447
|
+
var symbolName = ts.single(getSymbolNamesToImport(sourceFile, program.getTypeChecker(), symbolToken, compilerOptions));
|
|
155453
155448
|
var fix = getTypeOnlyPromotionFix(sourceFile, symbolToken, symbolName, program);
|
|
155454
155449
|
var includeSymbolNameInDescription = symbolName !== symbolToken.text;
|
|
155455
155450
|
return fix && codeFixActionToCodeAction(codeActionForFix({ host: host, formatContext: formatContext, preferences: preferences }, sourceFile, symbolName, fix, includeSymbolNameInDescription, 1 /* Double */, compilerOptions));
|
|
@@ -155754,7 +155749,7 @@ var ts;
|
|
|
155754
155749
|
return { kind: 3 /* AddNew */, moduleSpecifier: moduleSpecifier, importKind: importKind, addAsTypeOnly: addAsTypeOnly, useRequire: useRequire };
|
|
155755
155750
|
}
|
|
155756
155751
|
}
|
|
155757
|
-
function
|
|
155752
|
+
function getFixInfos(context, errorCode, pos, useAutoImportProvider) {
|
|
155758
155753
|
var symbolToken = ts.getTokenAtPosition(context.sourceFile, pos);
|
|
155759
155754
|
var info;
|
|
155760
155755
|
if (errorCode === ts.Diagnostics._0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead.code) {
|
|
@@ -155764,19 +155759,23 @@ var ts;
|
|
|
155764
155759
|
return undefined;
|
|
155765
155760
|
}
|
|
155766
155761
|
else if (errorCode === ts.Diagnostics._0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type.code) {
|
|
155767
|
-
var symbolName_1 =
|
|
155762
|
+
var symbolName_1 = ts.single(getSymbolNamesToImport(context.sourceFile, context.program.getTypeChecker(), symbolToken, context.program.getCompilerOptions()));
|
|
155768
155763
|
var fix = getTypeOnlyPromotionFix(context.sourceFile, symbolToken, symbolName_1, context.program);
|
|
155769
|
-
return fix && {
|
|
155764
|
+
return fix && [{ fix: fix, symbolName: symbolName_1, errorIdentifierText: symbolToken.text }];
|
|
155770
155765
|
}
|
|
155771
155766
|
else {
|
|
155772
155767
|
info = getFixesInfoForNonUMDImport(context, symbolToken, useAutoImportProvider);
|
|
155773
155768
|
}
|
|
155774
155769
|
var packageJsonImportFilter = ts.createPackageJsonImportFilter(context.sourceFile, context.preferences, context.host);
|
|
155775
|
-
return info &&
|
|
155770
|
+
return info && sortFixInfo(info, context.sourceFile, context.program, packageJsonImportFilter, context.host);
|
|
155776
155771
|
}
|
|
155777
|
-
function
|
|
155772
|
+
function sortFixInfo(fixes, sourceFile, program, packageJsonImportFilter, host) {
|
|
155778
155773
|
var _toPath = function (fileName) { return ts.toPath(fileName, host.getCurrentDirectory(), ts.hostGetCanonicalFileName(host)); };
|
|
155779
|
-
return ts.sort(fixes, function (a, b) {
|
|
155774
|
+
return ts.sort(fixes, function (a, b) {
|
|
155775
|
+
return ts.compareBooleans(!!a.isJsxNamespaceFix, !!b.isJsxNamespaceFix) ||
|
|
155776
|
+
ts.compareValues(a.fix.kind, b.fix.kind) ||
|
|
155777
|
+
compareModuleSpecifiers(a.fix, b.fix, sourceFile, program, packageJsonImportFilter.allowsImportingSpecifier, _toPath);
|
|
155778
|
+
});
|
|
155780
155779
|
}
|
|
155781
155780
|
function getBestFix(fixes, sourceFile, program, packageJsonImportFilter, host) {
|
|
155782
155781
|
if (!ts.some(fixes))
|
|
@@ -155827,7 +155826,6 @@ var ts;
|
|
|
155827
155826
|
return 0 /* EqualTo */;
|
|
155828
155827
|
}
|
|
155829
155828
|
function getFixesInfoForUMDImport(_a, token) {
|
|
155830
|
-
var _b;
|
|
155831
155829
|
var sourceFile = _a.sourceFile, program = _a.program, host = _a.host, preferences = _a.preferences;
|
|
155832
155830
|
var checker = program.getTypeChecker();
|
|
155833
155831
|
var umdSymbol = getUmdSymbol(token, checker);
|
|
@@ -155839,7 +155837,7 @@ var ts;
|
|
|
155839
155837
|
var useRequire = shouldUseRequire(sourceFile, program);
|
|
155840
155838
|
var position = ts.isIdentifier(token) ? token.getStart(sourceFile) : undefined;
|
|
155841
155839
|
var fixes = getImportFixes(exportInfo, position ? { position: position, symbolName: symbolName } : undefined, /*isValidTypeOnlyUseSite*/ false, useRequire, program, sourceFile, host, preferences).fixes;
|
|
155842
|
-
return {
|
|
155840
|
+
return fixes.map(function (fix) { var _a; return ({ fix: fix, symbolName: symbolName, errorIdentifierText: (_a = ts.tryCast(token, ts.isIdentifier)) === null || _a === void 0 ? void 0 : _a.text }); });
|
|
155843
155841
|
}
|
|
155844
155842
|
function getUmdSymbol(token, checker) {
|
|
155845
155843
|
// try the identifier to see if it is the umd symbol
|
|
@@ -155900,19 +155898,20 @@ var ts;
|
|
|
155900
155898
|
var sourceFile = _a.sourceFile, program = _a.program, cancellationToken = _a.cancellationToken, host = _a.host, preferences = _a.preferences;
|
|
155901
155899
|
var checker = program.getTypeChecker();
|
|
155902
155900
|
var compilerOptions = program.getCompilerOptions();
|
|
155903
|
-
|
|
155904
|
-
|
|
155905
|
-
|
|
155906
|
-
|
|
155907
|
-
|
|
155908
|
-
|
|
155909
|
-
|
|
155910
|
-
|
|
155911
|
-
|
|
155912
|
-
|
|
155913
|
-
|
|
155914
|
-
|
|
155915
|
-
|
|
155901
|
+
return ts.flatMap(getSymbolNamesToImport(sourceFile, checker, symbolToken, compilerOptions), function (symbolName) {
|
|
155902
|
+
// "default" is a keyword and not a legal identifier for the import, but appears as an identifier.
|
|
155903
|
+
if (symbolName === "default" /* Default */) {
|
|
155904
|
+
return undefined;
|
|
155905
|
+
}
|
|
155906
|
+
var isValidTypeOnlyUseSite = ts.isValidTypeOnlyAliasUseSite(symbolToken);
|
|
155907
|
+
var useRequire = shouldUseRequire(sourceFile, program);
|
|
155908
|
+
var exportInfo = getExportInfos(symbolName, ts.isJSXTagName(symbolToken), ts.getMeaningFromLocation(symbolToken), cancellationToken, sourceFile, program, useAutoImportProvider, host, preferences);
|
|
155909
|
+
var fixes = ts.arrayFrom(ts.flatMapIterator(exportInfo.entries(), function (_a) {
|
|
155910
|
+
var _ = _a[0], exportInfos = _a[1];
|
|
155911
|
+
return getImportFixes(exportInfos, { symbolName: symbolName, position: symbolToken.getStart(sourceFile) }, isValidTypeOnlyUseSite, useRequire, program, sourceFile, host, preferences).fixes;
|
|
155912
|
+
}));
|
|
155913
|
+
return fixes.map(function (fix) { return ({ fix: fix, symbolName: symbolName, errorIdentifierText: symbolToken.text, isJsxNamespaceFix: symbolName !== symbolToken.text }); });
|
|
155914
|
+
});
|
|
155916
155915
|
}
|
|
155917
155916
|
function getTypeOnlyPromotionFix(sourceFile, symbolToken, symbolName, program) {
|
|
155918
155917
|
var checker = program.getTypeChecker();
|
|
@@ -155924,15 +155923,16 @@ var ts;
|
|
|
155924
155923
|
return undefined;
|
|
155925
155924
|
return { kind: 4 /* PromoteTypeOnly */, typeOnlyAliasDeclaration: typeOnlyAliasDeclaration };
|
|
155926
155925
|
}
|
|
155927
|
-
function
|
|
155926
|
+
function getSymbolNamesToImport(sourceFile, checker, symbolToken, compilerOptions) {
|
|
155928
155927
|
var parent = symbolToken.parent;
|
|
155929
155928
|
if ((ts.isJsxOpeningLikeElement(parent) || ts.isJsxClosingElement(parent)) && parent.tagName === symbolToken && ts.jsxModeNeedsExplicitImport(compilerOptions.jsx)) {
|
|
155930
155929
|
var jsxNamespace = checker.getJsxNamespace(sourceFile);
|
|
155931
155930
|
if (needsJsxNamespaceFix(jsxNamespace, symbolToken, checker)) {
|
|
155932
|
-
|
|
155931
|
+
var needsComponentNameFix = !ts.isIntrinsicJsxName(symbolToken.text) && !checker.resolveName(symbolToken.text, symbolToken, 111551 /* Value */, /*excludeGlobals*/ false);
|
|
155932
|
+
return needsComponentNameFix ? [symbolToken.text, jsxNamespace] : [jsxNamespace];
|
|
155933
155933
|
}
|
|
155934
155934
|
}
|
|
155935
|
-
return symbolToken.text;
|
|
155935
|
+
return [symbolToken.text];
|
|
155936
155936
|
}
|
|
155937
155937
|
function needsJsxNamespaceFix(jsxNamespace, symbolToken, checker) {
|
|
155938
155938
|
if (ts.isIntrinsicJsxName(symbolToken.text))
|
|
@@ -160141,23 +160141,36 @@ var ts;
|
|
|
160141
160141
|
* @param body If defined, this will be the body of the member node passed to `addClassElement`. Otherwise, the body will default to a stub.
|
|
160142
160142
|
*/
|
|
160143
160143
|
function addNewNodeForMemberSymbol(symbol, enclosingDeclaration, sourceFile, context, preferences, importAdder, addClassElement, body, preserveOptional, isAmbient) {
|
|
160144
|
+
var _a;
|
|
160144
160145
|
if (preserveOptional === void 0) { preserveOptional = 3 /* All */; }
|
|
160145
160146
|
if (isAmbient === void 0) { isAmbient = false; }
|
|
160146
160147
|
var declarations = symbol.getDeclarations();
|
|
160147
|
-
|
|
160148
|
-
return undefined;
|
|
160149
|
-
}
|
|
160148
|
+
var declaration = declarations === null || declarations === void 0 ? void 0 : declarations[0];
|
|
160150
160149
|
var checker = context.program.getTypeChecker();
|
|
160151
160150
|
var scriptTarget = ts.getEmitScriptTarget(context.program.getCompilerOptions());
|
|
160152
|
-
|
|
160151
|
+
/**
|
|
160152
|
+
* (#49811)
|
|
160153
|
+
* Note that there are cases in which the symbol declaration is not present. For example, in the code below both
|
|
160154
|
+
* `MappedIndirect.ax` and `MappedIndirect.ay` have no declaration node attached (due to their mapped-type
|
|
160155
|
+
* parent):
|
|
160156
|
+
*
|
|
160157
|
+
* >>> ```ts
|
|
160158
|
+
* >>> type Base = { ax: number; ay: string };
|
|
160159
|
+
* >>> type BaseKeys = keyof Base;
|
|
160160
|
+
* >>> type MappedIndirect = { [K in BaseKeys]: boolean };
|
|
160161
|
+
* >>> ```
|
|
160162
|
+
*
|
|
160163
|
+
* In such cases, we assume the declaration to be a `PropertySignature`.
|
|
160164
|
+
*/
|
|
160165
|
+
var kind = (_a = declaration === null || declaration === void 0 ? void 0 : declaration.kind) !== null && _a !== void 0 ? _a : 166 /* PropertySignature */;
|
|
160153
160166
|
var name = ts.getSynthesizedDeepClone(ts.getNameOfDeclaration(declaration), /*includeTrivia*/ false);
|
|
160154
|
-
var visibilityModifier = createVisibilityModifier(ts.getEffectiveModifierFlags(declaration));
|
|
160167
|
+
var visibilityModifier = createVisibilityModifier(declaration ? ts.getEffectiveModifierFlags(declaration) : 0 /* None */);
|
|
160155
160168
|
var modifiers = visibilityModifier ? ts.factory.createNodeArray([visibilityModifier]) : undefined;
|
|
160156
160169
|
var type = checker.getWidenedType(checker.getTypeOfSymbolAtLocation(symbol, enclosingDeclaration));
|
|
160157
160170
|
var optional = !!(symbol.flags & 16777216 /* Optional */);
|
|
160158
160171
|
var ambient = !!(enclosingDeclaration.flags & 16777216 /* Ambient */) || isAmbient;
|
|
160159
160172
|
var quotePreference = ts.getQuotePreference(sourceFile, preferences);
|
|
160160
|
-
switch (
|
|
160173
|
+
switch (kind) {
|
|
160161
160174
|
case 166 /* PropertySignature */:
|
|
160162
160175
|
case 167 /* PropertyDeclaration */:
|
|
160163
160176
|
var flags = quotePreference === 0 /* Single */ ? 268435456 /* UseSingleQuotesForStringLiteralType */ : undefined;
|
|
@@ -160169,11 +160182,12 @@ var ts;
|
|
|
160169
160182
|
importSymbols(importAdder, importableReference.symbols);
|
|
160170
160183
|
}
|
|
160171
160184
|
}
|
|
160172
|
-
addClassElement(ts.factory.createPropertyDeclaration(modifiers, name, optional && (preserveOptional & 2 /* Property */) ? ts.factory.createToken(57 /* QuestionToken */) : undefined, typeNode,
|
|
160185
|
+
addClassElement(ts.factory.createPropertyDeclaration(modifiers, declaration ? name : symbol.getName(), optional && (preserveOptional & 2 /* Property */) ? ts.factory.createToken(57 /* QuestionToken */) : undefined, typeNode,
|
|
160173
160186
|
/*initializer*/ undefined));
|
|
160174
160187
|
break;
|
|
160175
160188
|
case 172 /* GetAccessor */:
|
|
160176
160189
|
case 173 /* SetAccessor */: {
|
|
160190
|
+
ts.Debug.assertIsDefined(declarations);
|
|
160177
160191
|
var typeNode_1 = checker.typeToTypeNode(type, enclosingDeclaration, /*flags*/ undefined, getNoopSymbolTrackerWithResolver(context));
|
|
160178
160192
|
var allAccessors = ts.getAllAccessorDeclarations(declarations, declaration);
|
|
160179
160193
|
var orderedAccessors = allAccessors.secondAccessor
|
|
@@ -160209,6 +160223,7 @@ var ts;
|
|
|
160209
160223
|
// If there is more than one overload but no implementation signature
|
|
160210
160224
|
// (eg: an abstract method or interface declaration), there is a 1-1
|
|
160211
160225
|
// correspondence of declarations and signatures.
|
|
160226
|
+
ts.Debug.assertIsDefined(declarations);
|
|
160212
160227
|
var signatures = type.isUnion() ? ts.flatMap(type.types, function (t) { return t.getCallSignatures(); }) : type.getCallSignatures();
|
|
160213
160228
|
if (!ts.some(signatures)) {
|
|
160214
160229
|
break;
|
|
@@ -160219,8 +160234,8 @@ var ts;
|
|
|
160219
160234
|
outputMethod(quotePreference, signature, modifiers, name, ambient ? undefined : body || createStubbedMethodBody(quotePreference));
|
|
160220
160235
|
break;
|
|
160221
160236
|
}
|
|
160222
|
-
for (var
|
|
160223
|
-
var signature = signatures_1[
|
|
160237
|
+
for (var _b = 0, signatures_1 = signatures; _b < signatures_1.length; _b++) {
|
|
160238
|
+
var signature = signatures_1[_b];
|
|
160224
160239
|
// Ensure nodes are fresh so they can have different positions when going through formatting.
|
|
160225
160240
|
outputMethod(quotePreference, signature, ts.getSynthesizedDeepClones(modifiers, /*includeTrivia*/ false), ts.getSynthesizedDeepClone(name, /*includeTrivia*/ false));
|
|
160226
160241
|
}
|