@typescript-deploys/pr-build 4.7.0-pr-48784-10 → 4.8.0-pr-49091-7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AUTHORS.md +1 -0
- package/lib/cs/diagnosticMessages.generated.json +16 -13
- package/lib/de/diagnosticMessages.generated.json +16 -13
- package/lib/es/diagnosticMessages.generated.json +16 -13
- package/lib/fr/diagnosticMessages.generated.json +16 -13
- package/lib/it/diagnosticMessages.generated.json +16 -13
- package/lib/ja/diagnosticMessages.generated.json +16 -13
- package/lib/ko/diagnosticMessages.generated.json +16 -13
- package/lib/lib.es2020.bigint.d.ts +4 -4
- package/lib/lib.es2020.intl.d.ts +29 -5
- package/lib/lib.es2021.intl.d.ts +7 -3
- package/lib/lib.es2022.d.ts +1 -0
- package/lib/lib.es2022.intl.d.ts +111 -0
- package/lib/lib.es5.d.ts +14 -14
- package/lib/lib.esnext.intl.d.ts +5 -1
- package/lib/pl/diagnosticMessages.generated.json +16 -13
- package/lib/pt-br/diagnosticMessages.generated.json +16 -13
- package/lib/ru/diagnosticMessages.generated.json +16 -13
- package/lib/tr/diagnosticMessages.generated.json +16 -13
- package/lib/tsc.js +1050 -1110
- package/lib/tsserver.js +1275 -1244
- package/lib/tsserverlibrary.d.ts +17 -14
- package/lib/tsserverlibrary.js +1275 -1244
- package/lib/typescript.d.ts +17 -14
- package/lib/typescript.js +1260 -1232
- package/lib/typescriptServices.d.ts +17 -14
- package/lib/typescriptServices.js +1260 -1232
- package/lib/typingsInstaller.js +1183 -1183
- package/lib/zh-cn/diagnosticMessages.generated.json +15 -13
- package/lib/zh-tw/diagnosticMessages.generated.json +16 -13
- package/package.json +1 -1
package/lib/tsc.js
CHANGED
|
@@ -68,8 +68,8 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
68
68
|
};
|
|
69
69
|
var ts;
|
|
70
70
|
(function (ts) {
|
|
71
|
-
ts.versionMajorMinor = "4.
|
|
72
|
-
ts.version = ts.versionMajorMinor + ".0-insiders.
|
|
71
|
+
ts.versionMajorMinor = "4.8";
|
|
72
|
+
ts.version = ts.versionMajorMinor + ".0-insiders.20220512";
|
|
73
73
|
var NativeCollections;
|
|
74
74
|
(function (NativeCollections) {
|
|
75
75
|
var globals = typeof globalThis !== "undefined" ? globalThis :
|
|
@@ -3405,7 +3405,7 @@ var ts;
|
|
|
3405
3405
|
(function (ModuleResolutionKind) {
|
|
3406
3406
|
ModuleResolutionKind[ModuleResolutionKind["Classic"] = 1] = "Classic";
|
|
3407
3407
|
ModuleResolutionKind[ModuleResolutionKind["NodeJs"] = 2] = "NodeJs";
|
|
3408
|
-
ModuleResolutionKind[ModuleResolutionKind["
|
|
3408
|
+
ModuleResolutionKind[ModuleResolutionKind["Node16"] = 3] = "Node16";
|
|
3409
3409
|
ModuleResolutionKind[ModuleResolutionKind["NodeNext"] = 99] = "NodeNext";
|
|
3410
3410
|
})(ModuleResolutionKind = ts.ModuleResolutionKind || (ts.ModuleResolutionKind = {}));
|
|
3411
3411
|
var ModuleDetectionKind;
|
|
@@ -3448,7 +3448,7 @@ var ts;
|
|
|
3448
3448
|
ModuleKind[ModuleKind["ES2020"] = 6] = "ES2020";
|
|
3449
3449
|
ModuleKind[ModuleKind["ES2022"] = 7] = "ES2022";
|
|
3450
3450
|
ModuleKind[ModuleKind["ESNext"] = 99] = "ESNext";
|
|
3451
|
-
ModuleKind[ModuleKind["
|
|
3451
|
+
ModuleKind[ModuleKind["Node16"] = 100] = "Node16";
|
|
3452
3452
|
ModuleKind[ModuleKind["NodeNext"] = 199] = "NodeNext";
|
|
3453
3453
|
})(ModuleKind = ts.ModuleKind || (ts.ModuleKind = {}));
|
|
3454
3454
|
ts.commentPragmas = {
|
|
@@ -3745,7 +3745,7 @@ var ts;
|
|
|
3745
3745
|
};
|
|
3746
3746
|
}
|
|
3747
3747
|
function createDirectoryWatcher(dirName, dirPath, fallbackOptions) {
|
|
3748
|
-
var watcher = fsWatch(dirName, 1, function (_eventName, relativeFileName
|
|
3748
|
+
var watcher = fsWatch(dirName, 1, function (_eventName, relativeFileName) {
|
|
3749
3749
|
if (!ts.isString(relativeFileName))
|
|
3750
3750
|
return;
|
|
3751
3751
|
var fileName = ts.getNormalizedAbsolutePath(relativeFileName, dirName);
|
|
@@ -3753,7 +3753,7 @@ var ts;
|
|
|
3753
3753
|
if (callbacks) {
|
|
3754
3754
|
for (var _i = 0, callbacks_1 = callbacks; _i < callbacks_1.length; _i++) {
|
|
3755
3755
|
var fileCallback = callbacks_1[_i];
|
|
3756
|
-
fileCallback(fileName, FileWatcherEventKind.Changed
|
|
3756
|
+
fileCallback(fileName, FileWatcherEventKind.Changed);
|
|
3757
3757
|
}
|
|
3758
3758
|
}
|
|
3759
3759
|
}, false, PollingInterval.Medium, fallbackOptions);
|
|
@@ -3805,7 +3805,7 @@ var ts;
|
|
|
3805
3805
|
}
|
|
3806
3806
|
else {
|
|
3807
3807
|
cache.set(path, {
|
|
3808
|
-
watcher: watchFile(fileName, function (fileName, eventKind
|
|
3808
|
+
watcher: watchFile(fileName, function (fileName, eventKind) { return ts.forEach(callbacksCache.get(path), function (cb) { return cb(fileName, eventKind); }); }, pollingInterval, options),
|
|
3809
3809
|
refCount: 1
|
|
3810
3810
|
});
|
|
3811
3811
|
}
|
|
@@ -3829,7 +3829,7 @@ var ts;
|
|
|
3829
3829
|
var newTime = modifiedTime.getTime();
|
|
3830
3830
|
if (oldTime !== newTime) {
|
|
3831
3831
|
watchedFile.mtime = modifiedTime;
|
|
3832
|
-
watchedFile.callback(watchedFile.fileName, getFileWatcherEventKind(oldTime, newTime)
|
|
3832
|
+
watchedFile.callback(watchedFile.fileName, getFileWatcherEventKind(oldTime, newTime));
|
|
3833
3833
|
return true;
|
|
3834
3834
|
}
|
|
3835
3835
|
return false;
|
|
@@ -4043,17 +4043,16 @@ var ts;
|
|
|
4043
4043
|
}
|
|
4044
4044
|
ts.createDirectoryWatcherSupportingRecursive = createDirectoryWatcherSupportingRecursive;
|
|
4045
4045
|
function createFileWatcherCallback(callback) {
|
|
4046
|
-
return function (_fileName, eventKind
|
|
4046
|
+
return function (_fileName, eventKind) { return callback(eventKind === FileWatcherEventKind.Changed ? "change" : "rename", ""); };
|
|
4047
4047
|
}
|
|
4048
4048
|
ts.createFileWatcherCallback = createFileWatcherCallback;
|
|
4049
|
-
function createFsWatchCallbackForFileWatcherCallback(fileName, callback,
|
|
4050
|
-
return function (eventName
|
|
4049
|
+
function createFsWatchCallbackForFileWatcherCallback(fileName, callback, fileExists) {
|
|
4050
|
+
return function (eventName) {
|
|
4051
4051
|
if (eventName === "rename") {
|
|
4052
|
-
|
|
4053
|
-
callback(fileName, modifiedTime !== ts.missingFileModifiedTime ? FileWatcherEventKind.Created : FileWatcherEventKind.Deleted, modifiedTime);
|
|
4052
|
+
callback(fileName, fileExists(fileName) ? FileWatcherEventKind.Created : FileWatcherEventKind.Deleted);
|
|
4054
4053
|
}
|
|
4055
4054
|
else {
|
|
4056
|
-
callback(fileName, FileWatcherEventKind.Changed
|
|
4055
|
+
callback(fileName, FileWatcherEventKind.Changed);
|
|
4057
4056
|
}
|
|
4058
4057
|
};
|
|
4059
4058
|
}
|
|
@@ -4072,7 +4071,7 @@ var ts;
|
|
|
4072
4071
|
};
|
|
4073
4072
|
}
|
|
4074
4073
|
function createSystemWatchFunctions(_a) {
|
|
4075
|
-
var pollingWatchFile = _a.pollingWatchFile, getModifiedTime = _a.getModifiedTime, setTimeout = _a.setTimeout, clearTimeout = _a.clearTimeout, fsWatch = _a.fsWatch, useCaseSensitiveFileNames = _a.useCaseSensitiveFileNames, getCurrentDirectory = _a.getCurrentDirectory, fsSupportsRecursiveFsWatch = _a.fsSupportsRecursiveFsWatch, directoryExists = _a.directoryExists, getAccessibleSortedChildDirectories = _a.getAccessibleSortedChildDirectories, realpath = _a.realpath, tscWatchFile = _a.tscWatchFile, useNonPollingWatchers = _a.useNonPollingWatchers, tscWatchDirectory = _a.tscWatchDirectory, defaultWatchFileKind = _a.defaultWatchFileKind;
|
|
4074
|
+
var pollingWatchFile = _a.pollingWatchFile, getModifiedTime = _a.getModifiedTime, setTimeout = _a.setTimeout, clearTimeout = _a.clearTimeout, fsWatch = _a.fsWatch, fileExists = _a.fileExists, useCaseSensitiveFileNames = _a.useCaseSensitiveFileNames, getCurrentDirectory = _a.getCurrentDirectory, fsSupportsRecursiveFsWatch = _a.fsSupportsRecursiveFsWatch, directoryExists = _a.directoryExists, getAccessibleSortedChildDirectories = _a.getAccessibleSortedChildDirectories, realpath = _a.realpath, tscWatchFile = _a.tscWatchFile, useNonPollingWatchers = _a.useNonPollingWatchers, tscWatchDirectory = _a.tscWatchDirectory, defaultWatchFileKind = _a.defaultWatchFileKind;
|
|
4076
4075
|
var dynamicPollingWatchFile;
|
|
4077
4076
|
var fixedChunkSizePollingWatchFile;
|
|
4078
4077
|
var nonPollingWatchFile;
|
|
@@ -4094,7 +4093,7 @@ var ts;
|
|
|
4094
4093
|
case ts.WatchFileKind.FixedChunkSizePolling:
|
|
4095
4094
|
return ensureFixedChunkSizePollingWatchFile()(fileName, callback, undefined, undefined);
|
|
4096
4095
|
case ts.WatchFileKind.UseFsEvents:
|
|
4097
|
-
return fsWatch(fileName, 0, createFsWatchCallbackForFileWatcherCallback(fileName, callback,
|
|
4096
|
+
return fsWatch(fileName, 0, createFsWatchCallbackForFileWatcherCallback(fileName, callback, fileExists), false, pollingInterval, ts.getFallbackOptions(options));
|
|
4098
4097
|
case ts.WatchFileKind.UseFsEventsOnParentDirectory:
|
|
4099
4098
|
if (!nonPollingWatchFile) {
|
|
4100
4099
|
nonPollingWatchFile = createUseFsEventsOnParentDirectoryWatchFile(fsWatch, useCaseSensitiveFileNames);
|
|
@@ -4251,6 +4250,7 @@ var ts;
|
|
|
4251
4250
|
fsWatch: fsWatch,
|
|
4252
4251
|
useCaseSensitiveFileNames: useCaseSensitiveFileNames,
|
|
4253
4252
|
getCurrentDirectory: getCurrentDirectory,
|
|
4253
|
+
fileExists: fileExists,
|
|
4254
4254
|
fsSupportsRecursiveFsWatch: fsSupportsRecursiveFsWatch,
|
|
4255
4255
|
directoryExists: directoryExists,
|
|
4256
4256
|
getAccessibleSortedChildDirectories: function (path) { return getAccessibleFileSystemEntries(path).directories; },
|
|
@@ -4478,7 +4478,7 @@ var ts;
|
|
|
4478
4478
|
else {
|
|
4479
4479
|
eventKind = FileWatcherEventKind.Changed;
|
|
4480
4480
|
}
|
|
4481
|
-
callback(fileName, eventKind
|
|
4481
|
+
callback(fileName, eventKind);
|
|
4482
4482
|
}
|
|
4483
4483
|
}
|
|
4484
4484
|
function fsWatch(fileOrDirectory, entryKind, callback, recursive, fallbackPollingInterval, fallbackOptions) {
|
|
@@ -4498,9 +4498,9 @@ var ts;
|
|
|
4498
4498
|
watcher = undefined;
|
|
4499
4499
|
}
|
|
4500
4500
|
};
|
|
4501
|
-
function invokeCallbackAndUpdateWatcher(createWatcher
|
|
4501
|
+
function invokeCallbackAndUpdateWatcher(createWatcher) {
|
|
4502
4502
|
sysLog("sysLog:: " + fileOrDirectory + ":: Changing watcher to " + (createWatcher === watchPresentFileSystemEntry ? "Present" : "Missing") + "FileSystemEntryWatcher");
|
|
4503
|
-
callback("rename", ""
|
|
4503
|
+
callback("rename", "");
|
|
4504
4504
|
if (watcher) {
|
|
4505
4505
|
watcher.close();
|
|
4506
4506
|
watcher = createWatcher();
|
|
@@ -4533,25 +4533,21 @@ var ts;
|
|
|
4533
4533
|
}
|
|
4534
4534
|
}
|
|
4535
4535
|
function callbackChangingToMissingFileSystemEntry(event, relativeName) {
|
|
4536
|
-
var modifiedTime = getModifiedTime(fileOrDirectory) || ts.missingFileModifiedTime;
|
|
4537
4536
|
return event === "rename" &&
|
|
4538
4537
|
(!relativeName ||
|
|
4539
4538
|
relativeName === lastDirectoryPart ||
|
|
4540
4539
|
(relativeName.lastIndexOf(lastDirectoryPartWithDirectorySeparator) !== -1 && relativeName.lastIndexOf(lastDirectoryPartWithDirectorySeparator) === relativeName.length - lastDirectoryPartWithDirectorySeparator.length)) &&
|
|
4541
|
-
|
|
4542
|
-
invokeCallbackAndUpdateWatcher(watchMissingFileSystemEntry
|
|
4543
|
-
callback(event, relativeName
|
|
4540
|
+
!fileSystemEntryExists(fileOrDirectory, entryKind) ?
|
|
4541
|
+
invokeCallbackAndUpdateWatcher(watchMissingFileSystemEntry) :
|
|
4542
|
+
callback(event, relativeName);
|
|
4544
4543
|
}
|
|
4545
4544
|
function watchPresentFileSystemEntryWithFsWatchFile() {
|
|
4546
4545
|
return watchFile(fileOrDirectory, createFileWatcherCallback(callback), fallbackPollingInterval, fallbackOptions);
|
|
4547
4546
|
}
|
|
4548
4547
|
function watchMissingFileSystemEntry() {
|
|
4549
|
-
return watchFile(fileOrDirectory, function (_fileName, eventKind
|
|
4550
|
-
if (eventKind === FileWatcherEventKind.Created) {
|
|
4551
|
-
|
|
4552
|
-
if (modifiedTime !== ts.missingFileModifiedTime) {
|
|
4553
|
-
invokeCallbackAndUpdateWatcher(watchPresentFileSystemEntry, modifiedTime);
|
|
4554
|
-
}
|
|
4548
|
+
return watchFile(fileOrDirectory, function (_fileName, eventKind) {
|
|
4549
|
+
if (eventKind === FileWatcherEventKind.Created && fileSystemEntryExists(fileOrDirectory, entryKind)) {
|
|
4550
|
+
invokeCallbackAndUpdateWatcher(watchPresentFileSystemEntry);
|
|
4555
4551
|
}
|
|
4556
4552
|
}, fallbackPollingInterval, fallbackOptions);
|
|
4557
4553
|
}
|
|
@@ -4690,17 +4686,12 @@ var ts;
|
|
|
4690
4686
|
}
|
|
4691
4687
|
function getModifiedTime(path) {
|
|
4692
4688
|
var _a;
|
|
4693
|
-
var originalStackTraceLimit = Error.stackTraceLimit;
|
|
4694
|
-
Error.stackTraceLimit = 0;
|
|
4695
4689
|
try {
|
|
4696
4690
|
return (_a = statSync(path)) === null || _a === void 0 ? void 0 : _a.mtime;
|
|
4697
4691
|
}
|
|
4698
4692
|
catch (e) {
|
|
4699
4693
|
return undefined;
|
|
4700
4694
|
}
|
|
4701
|
-
finally {
|
|
4702
|
-
Error.stackTraceLimit = originalStackTraceLimit;
|
|
4703
|
-
}
|
|
4704
4695
|
}
|
|
4705
4696
|
function setModifiedTime(path, time) {
|
|
4706
4697
|
try {
|
|
@@ -5335,6 +5326,7 @@ var ts;
|
|
|
5335
5326
|
String_literal_expected: diag(1141, ts.DiagnosticCategory.Error, "String_literal_expected_1141", "String literal expected."),
|
|
5336
5327
|
Line_break_not_permitted_here: diag(1142, ts.DiagnosticCategory.Error, "Line_break_not_permitted_here_1142", "Line break not permitted here."),
|
|
5337
5328
|
or_expected: diag(1144, ts.DiagnosticCategory.Error, "or_expected_1144", "'{' or ';' expected."),
|
|
5329
|
+
or_JSX_element_expected: diag(1145, ts.DiagnosticCategory.Error, "or_JSX_element_expected_1145", "'{' or JSX element expected."),
|
|
5338
5330
|
Declaration_expected: diag(1146, ts.DiagnosticCategory.Error, "Declaration_expected_1146", "Declaration expected."),
|
|
5339
5331
|
Import_declarations_in_a_namespace_cannot_reference_a_module: diag(1147, ts.DiagnosticCategory.Error, "Import_declarations_in_a_namespace_cannot_reference_a_module_1147", "Import declarations in a namespace cannot reference a module."),
|
|
5340
5332
|
Cannot_use_imports_exports_or_module_augmentations_when_module_is_none: diag(1148, ts.DiagnosticCategory.Error, "Cannot_use_imports_exports_or_module_augmentations_when_module_is_none_1148", "Cannot use imports, exports, or module augmentations when '--module' is 'none'."),
|
|
@@ -5451,6 +5443,7 @@ var ts;
|
|
|
5451
5443
|
_0_modifier_can_only_appear_on_a_type_parameter_of_a_class_interface_or_type_alias: diag(1274, ts.DiagnosticCategory.Error, "_0_modifier_can_only_appear_on_a_type_parameter_of_a_class_interface_or_type_alias_1274", "'{0}' modifier can only appear on a type parameter of a class, interface or type alias"),
|
|
5452
5444
|
with_statements_are_not_allowed_in_an_async_function_block: diag(1300, ts.DiagnosticCategory.Error, "with_statements_are_not_allowed_in_an_async_function_block_1300", "'with' statements are not allowed in an async function block."),
|
|
5453
5445
|
await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules: diag(1308, ts.DiagnosticCategory.Error, "await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_1308", "'await' expressions are only allowed within async functions and at the top levels of modules."),
|
|
5446
|
+
The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level: diag(1309, ts.DiagnosticCategory.Error, "The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level_1309", "The current file is a CommonJS module and cannot use 'await' at the top level."),
|
|
5454
5447
|
Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_part_of_a_destructuring_pattern: diag(1312, ts.DiagnosticCategory.Error, "Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_1312", "Did you mean to use a ':'? An '=' can only follow a property name when the containing object literal is part of a destructuring pattern."),
|
|
5455
5448
|
The_body_of_an_if_statement_cannot_be_the_empty_statement: diag(1313, ts.DiagnosticCategory.Error, "The_body_of_an_if_statement_cannot_be_the_empty_statement_1313", "The body of an 'if' statement cannot be the empty statement."),
|
|
5456
5449
|
Global_module_exports_may_only_appear_in_module_files: diag(1314, ts.DiagnosticCategory.Error, "Global_module_exports_may_only_appear_in_module_files_1314", "Global module exports may only appear in module files."),
|
|
@@ -5462,8 +5455,8 @@ var ts;
|
|
|
5462
5455
|
Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: diag(1320, ts.DiagnosticCategory.Error, "Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member_1320", "Type of 'await' operand must either be a valid promise or must not contain a callable 'then' member."),
|
|
5463
5456
|
Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: diag(1321, ts.DiagnosticCategory.Error, "Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_cal_1321", "Type of 'yield' operand in an async generator must either be a valid promise or must not contain a callable 'then' member."),
|
|
5464
5457
|
Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: diag(1322, ts.DiagnosticCategory.Error, "Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_con_1322", "Type of iterated elements of a 'yield*' operand must either be a valid promise or must not contain a callable 'then' member."),
|
|
5465
|
-
|
|
5466
|
-
|
|
5458
|
+
Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd_system_umd_node16_or_nodenext: diag(1323, ts.DiagnosticCategory.Error, "Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd__1323", "Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', or 'nodenext'."),
|
|
5459
|
+
Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_or_nodenext: diag(1324, ts.DiagnosticCategory.Error, "Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_or_nod_1324", "Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', or 'nodenext'."),
|
|
5467
5460
|
Argument_of_dynamic_import_cannot_be_spread_element: diag(1325, ts.DiagnosticCategory.Error, "Argument_of_dynamic_import_cannot_be_spread_element_1325", "Argument of dynamic import cannot be spread element."),
|
|
5468
5461
|
This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot_have_type_arguments: diag(1326, ts.DiagnosticCategory.Error, "This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot__1326", "This use of 'import' is invalid. 'import()' calls can be written, but they must have parentheses and cannot have type arguments."),
|
|
5469
5462
|
String_literal_with_double_quotes_expected: diag(1327, ts.DiagnosticCategory.Error, "String_literal_with_double_quotes_expected_1327", "String literal with double quotes expected."),
|
|
@@ -5480,7 +5473,7 @@ var ts;
|
|
|
5480
5473
|
Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here: diag(1339, ts.DiagnosticCategory.Error, "Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here_1339", "Module '{0}' does not refer to a value, but is used as a value here."),
|
|
5481
5474
|
Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0: diag(1340, ts.DiagnosticCategory.Error, "Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0_1340", "Module '{0}' does not refer to a type, but is used as a type here. Did you mean 'typeof import('{0}')'?"),
|
|
5482
5475
|
Type_arguments_cannot_be_used_here: diag(1342, ts.DiagnosticCategory.Error, "Type_arguments_cannot_be_used_here_1342", "Type arguments cannot be used here."),
|
|
5483
|
-
|
|
5476
|
+
The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system_node16_or_nodenext: diag(1343, ts.DiagnosticCategory.Error, "The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system__1343", "The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'."),
|
|
5484
5477
|
A_label_is_not_allowed_here: diag(1344, ts.DiagnosticCategory.Error, "A_label_is_not_allowed_here_1344", "'A label is not allowed here."),
|
|
5485
5478
|
An_expression_of_type_void_cannot_be_tested_for_truthiness: diag(1345, ts.DiagnosticCategory.Error, "An_expression_of_type_void_cannot_be_tested_for_truthiness_1345", "An expression of type 'void' cannot be tested for truthiness."),
|
|
5486
5479
|
This_parameter_is_not_allowed_with_use_strict_directive: diag(1346, ts.DiagnosticCategory.Error, "This_parameter_is_not_allowed_with_use_strict_directive_1346", "This parameter is not allowed with 'use strict' directive."),
|
|
@@ -5511,7 +5504,7 @@ var ts;
|
|
|
5511
5504
|
await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module: diag(1375, ts.DiagnosticCategory.Error, "await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_fi_1375", "'await' expressions are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module."),
|
|
5512
5505
|
_0_was_imported_here: diag(1376, ts.DiagnosticCategory.Message, "_0_was_imported_here_1376", "'{0}' was imported here."),
|
|
5513
5506
|
_0_was_exported_here: diag(1377, ts.DiagnosticCategory.Message, "_0_was_exported_here_1377", "'{0}' was exported here."),
|
|
5514
|
-
|
|
5507
|
+
Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher: diag(1378, ts.DiagnosticCategory.Error, "Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_n_1378", "Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher."),
|
|
5515
5508
|
An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type: diag(1379, ts.DiagnosticCategory.Error, "An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type_1379", "An import alias cannot reference a declaration that was exported using 'export type'."),
|
|
5516
5509
|
An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type: diag(1380, ts.DiagnosticCategory.Error, "An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type_1380", "An import alias cannot reference a declaration that was imported using 'import type'."),
|
|
5517
5510
|
Unexpected_token_Did_you_mean_or_rbrace: diag(1381, ts.DiagnosticCategory.Error, "Unexpected_token_Did_you_mean_or_rbrace_1381", "Unexpected token. Did you mean `{'}'}` or `}`?"),
|
|
@@ -5563,7 +5556,7 @@ var ts;
|
|
|
5563
5556
|
File_redirects_to_file_0: diag(1429, ts.DiagnosticCategory.Message, "File_redirects_to_file_0_1429", "File redirects to file '{0}'"),
|
|
5564
5557
|
The_file_is_in_the_program_because_Colon: diag(1430, ts.DiagnosticCategory.Message, "The_file_is_in_the_program_because_Colon_1430", "The file is in the program because:"),
|
|
5565
5558
|
for_await_loops_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module: diag(1431, ts.DiagnosticCategory.Error, "for_await_loops_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_1431", "'for await' loops are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module."),
|
|
5566
|
-
|
|
5559
|
+
Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher: diag(1432, ts.DiagnosticCategory.Error, "Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_nod_1432", "Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher."),
|
|
5567
5560
|
Decorators_may_not_be_applied_to_this_parameters: diag(1433, ts.DiagnosticCategory.Error, "Decorators_may_not_be_applied_to_this_parameters_1433", "Decorators may not be applied to 'this' parameters."),
|
|
5568
5561
|
Unexpected_keyword_or_identifier: diag(1434, ts.DiagnosticCategory.Error, "Unexpected_keyword_or_identifier_1434", "Unexpected keyword or identifier."),
|
|
5569
5562
|
Unknown_keyword_or_identifier_Did_you_mean_0: diag(1435, ts.DiagnosticCategory.Error, "Unknown_keyword_or_identifier_Did_you_mean_0_1435", "Unknown keyword or identifier. Did you mean '{0}'?"),
|
|
@@ -5581,18 +5574,19 @@ var ts;
|
|
|
5581
5574
|
Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed: diag(1449, ts.DiagnosticCategory.Message, "Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed_1449", "Preserve unused imported values in the JavaScript output that would otherwise be removed."),
|
|
5582
5575
|
Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_assertion_as_arguments: diag(1450, ts.DiagnosticCategory.Message, "Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_assertion_as_arguments_1450", "Dynamic imports can only accept a module specifier and an optional assertion as arguments"),
|
|
5583
5576
|
Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member_declaration_property_access_or_on_the_left_hand_side_of_an_in_expression: diag(1451, ts.DiagnosticCategory.Error, "Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member__1451", "Private identifiers are only allowed in class bodies and may only be used as part of a class member declaration, property access, or on the left-hand-side of an 'in' expression"),
|
|
5584
|
-
|
|
5577
|
+
Resolution_modes_are_only_supported_when_moduleResolution_is_node16_or_nodenext: diag(1452, ts.DiagnosticCategory.Error, "Resolution_modes_are_only_supported_when_moduleResolution_is_node16_or_nodenext_1452", "Resolution modes are only supported when `moduleResolution` is `node16` or `nodenext`."),
|
|
5585
5578
|
resolution_mode_should_be_either_require_or_import: diag(1453, ts.DiagnosticCategory.Error, "resolution_mode_should_be_either_require_or_import_1453", "`resolution-mode` should be either `require` or `import`."),
|
|
5586
5579
|
resolution_mode_can_only_be_set_for_type_only_imports: diag(1454, ts.DiagnosticCategory.Error, "resolution_mode_can_only_be_set_for_type_only_imports_1454", "`resolution-mode` can only be set for type-only imports."),
|
|
5587
5580
|
resolution_mode_is_the_only_valid_key_for_type_import_assertions: diag(1455, ts.DiagnosticCategory.Error, "resolution_mode_is_the_only_valid_key_for_type_import_assertions_1455", "`resolution-mode` is the only valid key for type import assertions."),
|
|
5588
5581
|
Type_import_assertions_should_have_exactly_one_key_resolution_mode_with_value_import_or_require: diag(1456, ts.DiagnosticCategory.Error, "Type_import_assertions_should_have_exactly_one_key_resolution_mode_with_value_import_or_require_1456", "Type import assertions should have exactly one key - `resolution-mode` - with value `import` or `require`."),
|
|
5582
|
+
Matched_by_default_include_pattern_Asterisk_Asterisk_Slash_Asterisk: diag(1457, ts.DiagnosticCategory.Message, "Matched_by_default_include_pattern_Asterisk_Asterisk_Slash_Asterisk_1457", "Matched by default include pattern '**/*'"),
|
|
5589
5583
|
The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output: diag(1470, ts.DiagnosticCategory.Error, "The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output_1470", "The 'import.meta' meta-property is not allowed in files which will build into CommonJS output."),
|
|
5590
5584
|
Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_cannot_be_imported_synchronously_Use_dynamic_import_instead: diag(1471, ts.DiagnosticCategory.Error, "Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_c_1471", "Module '{0}' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead."),
|
|
5591
5585
|
catch_or_finally_expected: diag(1472, ts.DiagnosticCategory.Error, "catch_or_finally_expected_1472", "'catch' or 'finally' expected."),
|
|
5592
5586
|
An_import_declaration_can_only_be_used_at_the_top_level_of_a_module: diag(1473, ts.DiagnosticCategory.Error, "An_import_declaration_can_only_be_used_at_the_top_level_of_a_module_1473", "An import declaration can only be used at the top level of a module."),
|
|
5593
5587
|
An_export_declaration_can_only_be_used_at_the_top_level_of_a_module: diag(1474, ts.DiagnosticCategory.Error, "An_export_declaration_can_only_be_used_at_the_top_level_of_a_module_1474", "An export declaration can only be used at the top level of a module."),
|
|
5594
5588
|
Control_what_method_is_used_to_detect_module_format_JS_files: diag(1475, ts.DiagnosticCategory.Message, "Control_what_method_is_used_to_detect_module_format_JS_files_1475", "Control what method is used to detect module-format JS files."),
|
|
5595
|
-
|
|
5589
|
+
auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_with_module_Colon_node16_as_modules: diag(1476, ts.DiagnosticCategory.Message, "auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_w_1476", "\"auto\": Treat files with imports, exports, import.meta, jsx (with jsx: react-jsx), or esm format (with module: node16+) as modules."),
|
|
5596
5590
|
The_types_of_0_are_incompatible_between_these_types: diag(2200, ts.DiagnosticCategory.Error, "The_types_of_0_are_incompatible_between_these_types_2200", "The types of '{0}' are incompatible between these types."),
|
|
5597
5591
|
The_types_returned_by_0_are_incompatible_between_these_types: diag(2201, ts.DiagnosticCategory.Error, "The_types_returned_by_0_are_incompatible_between_these_types_2201", "The types returned by '{0}' are incompatible between these types."),
|
|
5598
5592
|
Call_signature_return_types_0_and_1_are_incompatible: diag(2202, ts.DiagnosticCategory.Error, "Call_signature_return_types_0_and_1_are_incompatible_2202", "Call signature return types '{0}' and '{1}' are incompatible.", undefined, true),
|
|
@@ -5601,7 +5595,8 @@ var ts;
|
|
|
5601
5595
|
Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1: diag(2205, ts.DiagnosticCategory.Error, "Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1_2205", "Construct signatures with no arguments have incompatible return types '{0}' and '{1}'.", undefined, true),
|
|
5602
5596
|
The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement: diag(2206, ts.DiagnosticCategory.Error, "The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement_2206", "The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement."),
|
|
5603
5597
|
The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement: diag(2207, ts.DiagnosticCategory.Error, "The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement_2207", "The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement."),
|
|
5604
|
-
|
|
5598
|
+
The_project_root_is_ambiguous_but_is_required_to_resolve_export_map_entry_0_in_file_1_Supply_the_rootDir_compiler_option_to_disambiguate: diag(2209, ts.DiagnosticCategory.Error, "The_project_root_is_ambiguous_but_is_required_to_resolve_export_map_entry_0_in_file_1_Supply_the_roo_2209", "The project root is ambiguous, but is required to resolve export map entry '{0}' in file '{1}'. Supply the `rootDir` compiler option to disambiguate."),
|
|
5599
|
+
The_project_root_is_ambiguous_but_is_required_to_resolve_import_map_entry_0_in_file_1_Supply_the_rootDir_compiler_option_to_disambiguate: diag(2210, ts.DiagnosticCategory.Error, "The_project_root_is_ambiguous_but_is_required_to_resolve_import_map_entry_0_in_file_1_Supply_the_roo_2210", "The project root is ambiguous, but is required to resolve import map entry '{0}' in file '{1}'. Supply the `rootDir` compiler option to disambiguate."),
|
|
5605
5600
|
Duplicate_identifier_0: diag(2300, ts.DiagnosticCategory.Error, "Duplicate_identifier_0_2300", "Duplicate identifier '{0}'."),
|
|
5606
5601
|
Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor: diag(2301, ts.DiagnosticCategory.Error, "Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor_2301", "Initializer of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor."),
|
|
5607
5602
|
Static_members_cannot_reference_class_type_parameters: diag(2302, ts.DiagnosticCategory.Error, "Static_members_cannot_reference_class_type_parameters_2302", "Static members cannot reference class type parameters."),
|
|
@@ -6079,8 +6074,8 @@ var ts;
|
|
|
6079
6074
|
Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext: diag(2821, ts.DiagnosticCategory.Error, "Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext_2821", "Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'."),
|
|
6080
6075
|
Import_assertions_cannot_be_used_with_type_only_imports_or_exports: diag(2822, ts.DiagnosticCategory.Error, "Import_assertions_cannot_be_used_with_type_only_imports_or_exports_2822", "Import assertions cannot be used with type-only imports or exports."),
|
|
6081
6076
|
Cannot_find_namespace_0_Did_you_mean_1: diag(2833, ts.DiagnosticCategory.Error, "Cannot_find_namespace_0_Did_you_mean_1_2833", "Cannot find namespace '{0}'. Did you mean '{1}'?"),
|
|
6082
|
-
|
|
6083
|
-
|
|
6077
|
+
Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_node16_or_nodenext_Consider_adding_an_extension_to_the_import_path: diag(2834, ts.DiagnosticCategory.Error, "Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2834", "Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path."),
|
|
6078
|
+
Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_node16_or_nodenext_Did_you_mean_0: diag(2835, ts.DiagnosticCategory.Error, "Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2835", "Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean '{0}'?"),
|
|
6084
6079
|
Import_assertions_are_not_allowed_on_statements_that_transpile_to_commonjs_require_calls: diag(2836, ts.DiagnosticCategory.Error, "Import_assertions_are_not_allowed_on_statements_that_transpile_to_commonjs_require_calls_2836", "Import assertions are not allowed on statements that transpile to commonjs 'require' calls."),
|
|
6085
6080
|
Import_assertion_values_must_be_string_literal_expressions: diag(2837, ts.DiagnosticCategory.Error, "Import_assertion_values_must_be_string_literal_expressions_2837", "Import assertion values must be string literal expressions."),
|
|
6086
6081
|
All_declarations_of_0_must_have_identical_constraints: diag(2838, ts.DiagnosticCategory.Error, "All_declarations_of_0_must_have_identical_constraints_2838", "All declarations of '{0}' must have identical constraints."),
|
|
@@ -6191,6 +6186,7 @@ var ts;
|
|
|
6191
6186
|
This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0: diag(4122, ts.DiagnosticCategory.Error, "This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4122", "This member cannot have a JSDoc comment with an '@override' tag because it is not declared in the base class '{0}'."),
|
|
6192
6187
|
This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1: diag(4123, ts.DiagnosticCategory.Error, "This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4123", "This member cannot have a JSDoc comment with an 'override' tag because it is not declared in the base class '{0}'. Did you mean '{1}'?"),
|
|
6193
6188
|
Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next: diag(4124, ts.DiagnosticCategory.Error, "Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_w_4124", "Compiler option '{0}' of value '{1}' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'."),
|
|
6189
|
+
Resolution_mode_assertions_are_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next: diag(4125, ts.DiagnosticCategory.Error, "Resolution_mode_assertions_are_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_wi_4125", "Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'."),
|
|
6194
6190
|
The_current_host_does_not_support_the_0_option: diag(5001, ts.DiagnosticCategory.Error, "The_current_host_does_not_support_the_0_option_5001", "The current host does not support the '{0}' option."),
|
|
6195
6191
|
Cannot_find_the_common_subdirectory_path_for_the_input_files: diag(5009, ts.DiagnosticCategory.Error, "Cannot_find_the_common_subdirectory_path_for_the_input_files_5009", "Cannot find the common subdirectory path for the input files."),
|
|
6196
6192
|
File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0: diag(5010, ts.DiagnosticCategory.Error, "File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0_5010", "File specification cannot end in a recursive directory wildcard ('**'): '{0}'."),
|
|
@@ -6493,8 +6489,8 @@ var ts;
|
|
|
6493
6489
|
Cannot_prepend_project_0_because_it_does_not_have_outFile_set: diag(6308, ts.DiagnosticCategory.Error, "Cannot_prepend_project_0_because_it_does_not_have_outFile_set_6308", "Cannot prepend project '{0}' because it does not have 'outFile' set"),
|
|
6494
6490
|
Output_file_0_from_project_1_does_not_exist: diag(6309, ts.DiagnosticCategory.Error, "Output_file_0_from_project_1_does_not_exist_6309", "Output file '{0}' from project '{1}' does not exist"),
|
|
6495
6491
|
Referenced_project_0_may_not_disable_emit: diag(6310, ts.DiagnosticCategory.Error, "Referenced_project_0_may_not_disable_emit_6310", "Referenced project '{0}' may not disable emit."),
|
|
6496
|
-
|
|
6497
|
-
|
|
6492
|
+
Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2: diag(6350, ts.DiagnosticCategory.Message, "Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2_6350", "Project '{0}' is out of date because oldest output '{1}' is older than newest input '{2}'"),
|
|
6493
|
+
Project_0_is_up_to_date_because_newest_input_1_is_older_than_oldest_output_2: diag(6351, ts.DiagnosticCategory.Message, "Project_0_is_up_to_date_because_newest_input_1_is_older_than_oldest_output_2_6351", "Project '{0}' is up to date because newest input '{1}' is older than oldest output '{2}'"),
|
|
6498
6494
|
Project_0_is_out_of_date_because_output_file_1_does_not_exist: diag(6352, ts.DiagnosticCategory.Message, "Project_0_is_out_of_date_because_output_file_1_does_not_exist_6352", "Project '{0}' is out of date because output file '{1}' does not exist"),
|
|
6499
6495
|
Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date: diag(6353, ts.DiagnosticCategory.Message, "Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date_6353", "Project '{0}' is out of date because its dependency '{1}' is out of date"),
|
|
6500
6496
|
Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies: diag(6354, ts.DiagnosticCategory.Message, "Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies_6354", "Project '{0}' is up to date with .d.ts files from its dependencies"),
|
|
@@ -6538,8 +6534,6 @@ var ts;
|
|
|
6538
6534
|
Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3: diag(6396, ts.DiagnosticCategory.Message, "Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_succes_6396", "Reusing resolution of type reference directive '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}'."),
|
|
6539
6535
|
Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3_with_Package_ID_4: diag(6397, ts.DiagnosticCategory.Message, "Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_succes_6397", "Reusing resolution of type reference directive '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}' with Package ID '{4}'."),
|
|
6540
6536
|
Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_not_resolved: diag(6398, ts.DiagnosticCategory.Message, "Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_not_re_6398", "Reusing resolution of type reference directive '{0}' from '{1}' found in cache from location '{2}', it was not resolved."),
|
|
6541
|
-
Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_some_of_the_changes_are_not_emitted: diag(6399, ts.DiagnosticCategory.Message, "Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_some_of_the_changes_are_not_emitted_6399", "Project '{0}' is out of date because buildinfo file '{1}' indicates that some of the changes are not emitted"),
|
|
6542
|
-
Project_0_is_up_to_date_but_needs_update_to_timestamps_of_output_files_that_are_older_than_input_files: diag(6400, ts.DiagnosticCategory.Message, "Project_0_is_up_to_date_but_needs_update_to_timestamps_of_output_files_that_are_older_than_input_fil_6400", "Project '{0}' is up to date but needs update to timestamps of output files that are older than input files"),
|
|
6543
6537
|
The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1: diag(6500, ts.DiagnosticCategory.Message, "The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1_6500", "The expected type comes from property '{0}' which is declared here on type '{1}'"),
|
|
6544
6538
|
The_expected_type_comes_from_this_index_signature: diag(6501, ts.DiagnosticCategory.Message, "The_expected_type_comes_from_this_index_signature_6501", "The expected type comes from this index signature."),
|
|
6545
6539
|
The_expected_type_comes_from_the_return_type_of_this_signature: diag(6502, ts.DiagnosticCategory.Message, "The_expected_type_comes_from_the_return_type_of_this_signature_6502", "The expected type comes from the return type of this signature."),
|
|
@@ -6748,7 +6742,6 @@ var ts;
|
|
|
6748
6742
|
This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead: diag(7059, ts.DiagnosticCategory.Error, "This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead_7059", "This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead."),
|
|
6749
6743
|
This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Add_a_trailing_comma_or_explicit_constraint: diag(7060, ts.DiagnosticCategory.Error, "This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Add_a_trailing_comma_or_explicit_cons_7060", "This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma or explicit constraint."),
|
|
6750
6744
|
A_mapped_type_may_not_declare_properties_or_methods: diag(7061, ts.DiagnosticCategory.Error, "A_mapped_type_may_not_declare_properties_or_methods_7061", "A mapped type may not declare properties or methods."),
|
|
6751
|
-
JSON_imports_are_experimental_in_ES_module_mode_imports: diag(7062, ts.DiagnosticCategory.Error, "JSON_imports_are_experimental_in_ES_module_mode_imports_7062", "JSON imports are experimental in ES module mode imports."),
|
|
6752
6745
|
You_cannot_rename_this_element: diag(8000, ts.DiagnosticCategory.Error, "You_cannot_rename_this_element_8000", "You cannot rename this element."),
|
|
6753
6746
|
You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library: diag(8001, ts.DiagnosticCategory.Error, "You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library_8001", "You cannot rename elements that are defined in the standard TypeScript library."),
|
|
6754
6747
|
import_can_only_be_used_in_TypeScript_files: diag(8002, ts.DiagnosticCategory.Error, "import_can_only_be_used_in_TypeScript_files_8002", "'import ... =' can only be used in TypeScript files."),
|
|
@@ -10673,6 +10666,16 @@ var ts;
|
|
|
10673
10666
|
return node.kind === 324 || node.kind === 325 || node.kind === 326;
|
|
10674
10667
|
}
|
|
10675
10668
|
ts.isJSDocLinkLike = isJSDocLinkLike;
|
|
10669
|
+
function hasRestParameter(s) {
|
|
10670
|
+
var last = ts.lastOrUndefined(s.parameters);
|
|
10671
|
+
return !!last && isRestParameter(last);
|
|
10672
|
+
}
|
|
10673
|
+
ts.hasRestParameter = hasRestParameter;
|
|
10674
|
+
function isRestParameter(node) {
|
|
10675
|
+
var type = ts.isJSDocParameterTag(node) ? (node.typeExpression && node.typeExpression.type) : node.type;
|
|
10676
|
+
return node.dotDotDotToken !== undefined || !!type && type.kind === 318;
|
|
10677
|
+
}
|
|
10678
|
+
ts.isRestParameter = isRestParameter;
|
|
10676
10679
|
})(ts || (ts = {}));
|
|
10677
10680
|
var ts;
|
|
10678
10681
|
(function (ts) {
|
|
@@ -11346,7 +11349,7 @@ var ts;
|
|
|
11346
11349
|
}
|
|
11347
11350
|
ts.getNonAugmentationDeclaration = getNonAugmentationDeclaration;
|
|
11348
11351
|
function isCommonJSContainingModuleKind(kind) {
|
|
11349
|
-
return kind === ts.ModuleKind.CommonJS || kind === ts.ModuleKind.
|
|
11352
|
+
return kind === ts.ModuleKind.CommonJS || kind === ts.ModuleKind.Node16 || kind === ts.ModuleKind.NodeNext;
|
|
11350
11353
|
}
|
|
11351
11354
|
function isEffectiveExternalModule(node, compilerOptions) {
|
|
11352
11355
|
return ts.isExternalModule(node) || compilerOptions.isolatedModules || (isCommonJSContainingModuleKind(getEmitModuleKind(compilerOptions)) && !!node.commonJsModuleIndicator);
|
|
@@ -13167,16 +13170,6 @@ var ts;
|
|
|
13167
13170
|
return typeParameters && ts.find(typeParameters, function (p) { return p.name.escapedText === name; });
|
|
13168
13171
|
}
|
|
13169
13172
|
ts.getTypeParameterFromJsDoc = getTypeParameterFromJsDoc;
|
|
13170
|
-
function hasRestParameter(s) {
|
|
13171
|
-
var last = ts.lastOrUndefined(s.parameters);
|
|
13172
|
-
return !!last && isRestParameter(last);
|
|
13173
|
-
}
|
|
13174
|
-
ts.hasRestParameter = hasRestParameter;
|
|
13175
|
-
function isRestParameter(node) {
|
|
13176
|
-
var type = ts.isJSDocParameterTag(node) ? (node.typeExpression && node.typeExpression.type) : node.type;
|
|
13177
|
-
return node.dotDotDotToken !== undefined || !!type && type.kind === 318;
|
|
13178
|
-
}
|
|
13179
|
-
ts.isRestParameter = isRestParameter;
|
|
13180
13173
|
function hasTypeArguments(node) {
|
|
13181
13174
|
return !!node.typeArguments;
|
|
13182
13175
|
}
|
|
@@ -14062,6 +14055,10 @@ var ts;
|
|
|
14062
14055
|
return indentStrings[1].length;
|
|
14063
14056
|
}
|
|
14064
14057
|
ts.getIndentSize = getIndentSize;
|
|
14058
|
+
function isNightly() {
|
|
14059
|
+
return ts.stringContains(ts.version, "-dev") || ts.stringContains(ts.version, "-insiders");
|
|
14060
|
+
}
|
|
14061
|
+
ts.isNightly = isNightly;
|
|
14065
14062
|
function createTextWriter(newLine) {
|
|
14066
14063
|
var output;
|
|
14067
14064
|
var indent;
|
|
@@ -14288,6 +14285,13 @@ var ts;
|
|
|
14288
14285
|
".d.ts";
|
|
14289
14286
|
}
|
|
14290
14287
|
ts.getDeclarationEmitExtensionForPath = getDeclarationEmitExtensionForPath;
|
|
14288
|
+
function getPossibleOriginalInputExtensionForExtension(path) {
|
|
14289
|
+
return ts.fileExtensionIsOneOf(path, [".d.mts", ".mjs", ".mts"]) ? [".mts", ".mjs"] :
|
|
14290
|
+
ts.fileExtensionIsOneOf(path, [".d.cts", ".cjs", ".cts"]) ? [".cts", ".cjs"] :
|
|
14291
|
+
ts.fileExtensionIsOneOf(path, [".json.d.ts"]) ? [".json"] :
|
|
14292
|
+
[".tsx", ".ts", ".jsx", ".js"];
|
|
14293
|
+
}
|
|
14294
|
+
ts.getPossibleOriginalInputExtensionForExtension = getPossibleOriginalInputExtensionForExtension;
|
|
14291
14295
|
function outFile(options) {
|
|
14292
14296
|
return options.outFile || options.out;
|
|
14293
14297
|
}
|
|
@@ -15859,7 +15863,7 @@ var ts;
|
|
|
15859
15863
|
checks.push(isFileModuleFromUsingJSXTag);
|
|
15860
15864
|
}
|
|
15861
15865
|
var moduleKind = getEmitModuleKind(options);
|
|
15862
|
-
if (moduleKind === ts.ModuleKind.
|
|
15866
|
+
if (moduleKind === ts.ModuleKind.Node16 || moduleKind === ts.ModuleKind.NodeNext) {
|
|
15863
15867
|
checks.push(isFileForcedToBeModuleByFormat);
|
|
15864
15868
|
}
|
|
15865
15869
|
var combined_1 = ts.or.apply(void 0, checks);
|
|
@@ -15870,7 +15874,7 @@ var ts;
|
|
|
15870
15874
|
ts.getSetExternalModuleIndicator = getSetExternalModuleIndicator;
|
|
15871
15875
|
function getEmitScriptTarget(compilerOptions) {
|
|
15872
15876
|
return compilerOptions.target ||
|
|
15873
|
-
(compilerOptions.module === ts.ModuleKind.
|
|
15877
|
+
(compilerOptions.module === ts.ModuleKind.Node16 && 9) ||
|
|
15874
15878
|
(compilerOptions.module === ts.ModuleKind.NodeNext && 99) ||
|
|
15875
15879
|
0;
|
|
15876
15880
|
}
|
|
@@ -15888,8 +15892,8 @@ var ts;
|
|
|
15888
15892
|
case ts.ModuleKind.CommonJS:
|
|
15889
15893
|
moduleResolution = ts.ModuleResolutionKind.NodeJs;
|
|
15890
15894
|
break;
|
|
15891
|
-
case ts.ModuleKind.
|
|
15892
|
-
moduleResolution = ts.ModuleResolutionKind.
|
|
15895
|
+
case ts.ModuleKind.Node16:
|
|
15896
|
+
moduleResolution = ts.ModuleResolutionKind.Node16;
|
|
15893
15897
|
break;
|
|
15894
15898
|
case ts.ModuleKind.NodeNext:
|
|
15895
15899
|
moduleResolution = ts.ModuleResolutionKind.NodeNext;
|
|
@@ -15914,7 +15918,7 @@ var ts;
|
|
|
15914
15918
|
case ts.ModuleKind.ES2020:
|
|
15915
15919
|
case ts.ModuleKind.ES2022:
|
|
15916
15920
|
case ts.ModuleKind.ESNext:
|
|
15917
|
-
case ts.ModuleKind.
|
|
15921
|
+
case ts.ModuleKind.Node16:
|
|
15918
15922
|
case ts.ModuleKind.NodeNext:
|
|
15919
15923
|
return true;
|
|
15920
15924
|
default:
|
|
@@ -15939,7 +15943,7 @@ var ts;
|
|
|
15939
15943
|
return compilerOptions.esModuleInterop;
|
|
15940
15944
|
}
|
|
15941
15945
|
switch (getEmitModuleKind(compilerOptions)) {
|
|
15942
|
-
case ts.ModuleKind.
|
|
15946
|
+
case ts.ModuleKind.Node16:
|
|
15943
15947
|
case ts.ModuleKind.NodeNext:
|
|
15944
15948
|
return true;
|
|
15945
15949
|
}
|
|
@@ -15986,10 +15990,6 @@ var ts;
|
|
|
15986
15990
|
return optionsHaveChanges(oldOptions, newOptions, ts.affectsEmitOptionDeclarations);
|
|
15987
15991
|
}
|
|
15988
15992
|
ts.compilerOptionsAffectEmit = compilerOptionsAffectEmit;
|
|
15989
|
-
function compilerOptionsAffectDeclarationPath(newOptions, oldOptions) {
|
|
15990
|
-
return optionsHaveChanges(oldOptions, newOptions, ts.affectsDeclarationPathOptionDeclarations);
|
|
15991
|
-
}
|
|
15992
|
-
ts.compilerOptionsAffectDeclarationPath = compilerOptionsAffectDeclarationPath;
|
|
15993
15993
|
function getCompilerOptionValue(options, option) {
|
|
15994
15994
|
return option.strictFlag ? getStrictOptionValue(options, option.name) : options[option.name];
|
|
15995
15995
|
}
|
|
@@ -21078,7 +21078,7 @@ var ts;
|
|
|
21078
21078
|
return node;
|
|
21079
21079
|
}
|
|
21080
21080
|
function cloneSourceFileWithChanges(source, statements, isDeclarationFile, referencedFiles, typeReferences, hasNoDefaultLib, libReferences) {
|
|
21081
|
-
var node = baseFactory.createBaseSourceFileNode(305);
|
|
21081
|
+
var node = (source.redirectInfo ? Object.create(source.redirectInfo.redirectTarget) : baseFactory.createBaseSourceFileNode(305));
|
|
21082
21082
|
for (var p in source) {
|
|
21083
21083
|
if (p === "emitNode" || ts.hasProperty(node, p) || !ts.hasProperty(source, p))
|
|
21084
21084
|
continue;
|
|
@@ -25190,7 +25190,7 @@ var ts;
|
|
|
25190
25190
|
function parseIsolatedEntityName(content, languageVersion) {
|
|
25191
25191
|
initializeState("", content, languageVersion, undefined, 1);
|
|
25192
25192
|
nextToken();
|
|
25193
|
-
var entityName = parseEntityName(true
|
|
25193
|
+
var entityName = parseEntityName(true);
|
|
25194
25194
|
var isInvalid = token() === 1 && !parseDiagnostics.length;
|
|
25195
25195
|
clearState();
|
|
25196
25196
|
return isInvalid ? entityName : undefined;
|
|
@@ -26471,6 +26471,7 @@ var ts;
|
|
|
26471
26471
|
var startPos = scanner.getStartPos();
|
|
26472
26472
|
var result = parseListElement(kind, parseElement);
|
|
26473
26473
|
if (!result) {
|
|
26474
|
+
parsingContext = saveParsingContext;
|
|
26474
26475
|
return undefined;
|
|
26475
26476
|
}
|
|
26476
26477
|
list.push(result);
|
|
@@ -26520,7 +26521,7 @@ var ts;
|
|
|
26520
26521
|
}
|
|
26521
26522
|
return createMissingList();
|
|
26522
26523
|
}
|
|
26523
|
-
function parseEntityName(allowReservedWords,
|
|
26524
|
+
function parseEntityName(allowReservedWords, diagnosticMessage) {
|
|
26524
26525
|
var pos = getNodePos();
|
|
26525
26526
|
var entity = allowReservedWords ? parseIdentifierName(diagnosticMessage) : parseIdentifier(diagnosticMessage);
|
|
26526
26527
|
var dotPos = getNodePos();
|
|
@@ -26530,7 +26531,7 @@ var ts;
|
|
|
26530
26531
|
break;
|
|
26531
26532
|
}
|
|
26532
26533
|
dotPos = getNodePos();
|
|
26533
|
-
entity = finishNode(factory.createQualifiedName(entity, parseRightSideOfDot(allowReservedWords,
|
|
26534
|
+
entity = finishNode(factory.createQualifiedName(entity, parseRightSideOfDot(allowReservedWords, false)), pos);
|
|
26534
26535
|
}
|
|
26535
26536
|
return entity;
|
|
26536
26537
|
}
|
|
@@ -26633,7 +26634,7 @@ var ts;
|
|
|
26633
26634
|
return finishNode(node, pos);
|
|
26634
26635
|
}
|
|
26635
26636
|
function parseEntityNameOfTypeReference() {
|
|
26636
|
-
return parseEntityName(true,
|
|
26637
|
+
return parseEntityName(true, ts.Diagnostics.Type_expected);
|
|
26637
26638
|
}
|
|
26638
26639
|
function parseTypeArgumentsOfTypeReference() {
|
|
26639
26640
|
if (!scanner.hasPrecedingLineBreak() && reScanLessThanToken() === 29) {
|
|
@@ -26747,7 +26748,7 @@ var ts;
|
|
|
26747
26748
|
function parseTypeQuery() {
|
|
26748
26749
|
var pos = getNodePos();
|
|
26749
26750
|
parseExpected(112);
|
|
26750
|
-
var entityName = parseEntityName(true
|
|
26751
|
+
var entityName = parseEntityName(true);
|
|
26751
26752
|
var typeArguments = !scanner.hasPrecedingLineBreak() ? tryParseTypeArguments() : undefined;
|
|
26752
26753
|
return finishNode(factory.createTypeQueryNode(entityName, typeArguments), pos);
|
|
26753
26754
|
}
|
|
@@ -27582,10 +27583,10 @@ var ts;
|
|
|
27582
27583
|
setDecoratorContext(false);
|
|
27583
27584
|
}
|
|
27584
27585
|
var pos = getNodePos();
|
|
27585
|
-
var expr = parseAssignmentExpressionOrHigher(
|
|
27586
|
+
var expr = parseAssignmentExpressionOrHigher();
|
|
27586
27587
|
var operatorToken;
|
|
27587
27588
|
while ((operatorToken = parseOptionalToken(27))) {
|
|
27588
|
-
expr = makeBinaryExpression(expr, operatorToken, parseAssignmentExpressionOrHigher(
|
|
27589
|
+
expr = makeBinaryExpression(expr, operatorToken, parseAssignmentExpressionOrHigher(), pos);
|
|
27589
27590
|
}
|
|
27590
27591
|
if (saveDecoratorContext) {
|
|
27591
27592
|
setDecoratorContext(true);
|
|
@@ -27593,23 +27594,23 @@ var ts;
|
|
|
27593
27594
|
return expr;
|
|
27594
27595
|
}
|
|
27595
27596
|
function parseInitializer() {
|
|
27596
|
-
return parseOptional(63) ? parseAssignmentExpressionOrHigher(
|
|
27597
|
+
return parseOptional(63) ? parseAssignmentExpressionOrHigher() : undefined;
|
|
27597
27598
|
}
|
|
27598
|
-
function parseAssignmentExpressionOrHigher(
|
|
27599
|
+
function parseAssignmentExpressionOrHigher() {
|
|
27599
27600
|
if (isYieldExpression()) {
|
|
27600
27601
|
return parseYieldExpression();
|
|
27601
27602
|
}
|
|
27602
|
-
var arrowExpression = tryParseParenthesizedArrowFunctionExpression(
|
|
27603
|
+
var arrowExpression = tryParseParenthesizedArrowFunctionExpression() || tryParseAsyncSimpleArrowFunctionExpression();
|
|
27603
27604
|
if (arrowExpression) {
|
|
27604
27605
|
return arrowExpression;
|
|
27605
27606
|
}
|
|
27606
27607
|
var pos = getNodePos();
|
|
27607
27608
|
var expr = parseBinaryExpressionOrHigher(0);
|
|
27608
27609
|
if (expr.kind === 79 && token() === 38) {
|
|
27609
|
-
return parseSimpleArrowFunctionExpression(pos, expr,
|
|
27610
|
+
return parseSimpleArrowFunctionExpression(pos, expr, undefined);
|
|
27610
27611
|
}
|
|
27611
27612
|
if (ts.isLeftHandSideExpression(expr) && ts.isAssignmentOperator(reScanGreaterToken())) {
|
|
27612
|
-
return makeBinaryExpression(expr, parseTokenNode(), parseAssignmentExpressionOrHigher(
|
|
27613
|
+
return makeBinaryExpression(expr, parseTokenNode(), parseAssignmentExpressionOrHigher(), pos);
|
|
27613
27614
|
}
|
|
27614
27615
|
return parseConditionalExpressionRest(expr, pos);
|
|
27615
27616
|
}
|
|
@@ -27631,30 +27632,30 @@ var ts;
|
|
|
27631
27632
|
nextToken();
|
|
27632
27633
|
if (!scanner.hasPrecedingLineBreak() &&
|
|
27633
27634
|
(token() === 41 || isStartOfExpression())) {
|
|
27634
|
-
return finishNode(factory.createYieldExpression(parseOptionalToken(41), parseAssignmentExpressionOrHigher(
|
|
27635
|
+
return finishNode(factory.createYieldExpression(parseOptionalToken(41), parseAssignmentExpressionOrHigher()), pos);
|
|
27635
27636
|
}
|
|
27636
27637
|
else {
|
|
27637
27638
|
return finishNode(factory.createYieldExpression(undefined, undefined), pos);
|
|
27638
27639
|
}
|
|
27639
27640
|
}
|
|
27640
|
-
function parseSimpleArrowFunctionExpression(pos, identifier,
|
|
27641
|
+
function parseSimpleArrowFunctionExpression(pos, identifier, asyncModifier) {
|
|
27641
27642
|
ts.Debug.assert(token() === 38, "parseSimpleArrowFunctionExpression should only have been called if we had a =>");
|
|
27642
27643
|
var parameter = factory.createParameterDeclaration(undefined, undefined, undefined, identifier, undefined, undefined, undefined);
|
|
27643
27644
|
finishNode(parameter, identifier.pos);
|
|
27644
27645
|
var parameters = createNodeArray([parameter], parameter.pos, parameter.end);
|
|
27645
27646
|
var equalsGreaterThanToken = parseExpectedToken(38);
|
|
27646
|
-
var body = parseArrowFunctionExpressionBody(!!asyncModifier
|
|
27647
|
+
var body = parseArrowFunctionExpressionBody(!!asyncModifier);
|
|
27647
27648
|
var node = factory.createArrowFunction(asyncModifier, undefined, parameters, undefined, equalsGreaterThanToken, body);
|
|
27648
27649
|
return addJSDocComment(finishNode(node, pos));
|
|
27649
27650
|
}
|
|
27650
|
-
function tryParseParenthesizedArrowFunctionExpression(
|
|
27651
|
+
function tryParseParenthesizedArrowFunctionExpression() {
|
|
27651
27652
|
var triState = isParenthesizedArrowFunctionExpression();
|
|
27652
27653
|
if (triState === 0) {
|
|
27653
27654
|
return undefined;
|
|
27654
27655
|
}
|
|
27655
27656
|
return triState === 1 ?
|
|
27656
|
-
parseParenthesizedArrowFunctionExpression(true
|
|
27657
|
-
tryParse(
|
|
27657
|
+
parseParenthesizedArrowFunctionExpression(true) :
|
|
27658
|
+
tryParse(parsePossibleParenthesizedArrowFunctionExpression);
|
|
27658
27659
|
}
|
|
27659
27660
|
function isParenthesizedArrowFunctionExpression() {
|
|
27660
27661
|
if (token() === 20 || token() === 29 || token() === 131) {
|
|
@@ -27696,6 +27697,9 @@ var ts;
|
|
|
27696
27697
|
return 1;
|
|
27697
27698
|
}
|
|
27698
27699
|
if (ts.isModifierKind(second) && second !== 131 && lookAhead(nextTokenIsIdentifier)) {
|
|
27700
|
+
if (nextToken() === 127) {
|
|
27701
|
+
return 0;
|
|
27702
|
+
}
|
|
27699
27703
|
return 1;
|
|
27700
27704
|
}
|
|
27701
27705
|
if (!isIdentifier() && second !== 108) {
|
|
@@ -27748,24 +27752,24 @@ var ts;
|
|
|
27748
27752
|
return 2;
|
|
27749
27753
|
}
|
|
27750
27754
|
}
|
|
27751
|
-
function parsePossibleParenthesizedArrowFunctionExpression(
|
|
27755
|
+
function parsePossibleParenthesizedArrowFunctionExpression() {
|
|
27752
27756
|
var tokenPos = scanner.getTokenPos();
|
|
27753
27757
|
if (notParenthesizedArrow === null || notParenthesizedArrow === void 0 ? void 0 : notParenthesizedArrow.has(tokenPos)) {
|
|
27754
27758
|
return undefined;
|
|
27755
27759
|
}
|
|
27756
|
-
var result = parseParenthesizedArrowFunctionExpression(false
|
|
27760
|
+
var result = parseParenthesizedArrowFunctionExpression(false);
|
|
27757
27761
|
if (!result) {
|
|
27758
27762
|
(notParenthesizedArrow || (notParenthesizedArrow = new ts.Set())).add(tokenPos);
|
|
27759
27763
|
}
|
|
27760
27764
|
return result;
|
|
27761
27765
|
}
|
|
27762
|
-
function tryParseAsyncSimpleArrowFunctionExpression(
|
|
27766
|
+
function tryParseAsyncSimpleArrowFunctionExpression() {
|
|
27763
27767
|
if (token() === 131) {
|
|
27764
27768
|
if (lookAhead(isUnParenthesizedAsyncArrowFunctionWorker) === 1) {
|
|
27765
27769
|
var pos = getNodePos();
|
|
27766
27770
|
var asyncModifier = parseModifiersForArrowFunction();
|
|
27767
27771
|
var expr = parseBinaryExpressionOrHigher(0);
|
|
27768
|
-
return parseSimpleArrowFunctionExpression(pos, expr,
|
|
27772
|
+
return parseSimpleArrowFunctionExpression(pos, expr, asyncModifier);
|
|
27769
27773
|
}
|
|
27770
27774
|
}
|
|
27771
27775
|
return undefined;
|
|
@@ -27783,7 +27787,7 @@ var ts;
|
|
|
27783
27787
|
}
|
|
27784
27788
|
return 0;
|
|
27785
27789
|
}
|
|
27786
|
-
function parseParenthesizedArrowFunctionExpression(allowAmbiguity
|
|
27790
|
+
function parseParenthesizedArrowFunctionExpression(allowAmbiguity) {
|
|
27787
27791
|
var pos = getNodePos();
|
|
27788
27792
|
var hasJSDoc = hasPrecedingJSDocComment();
|
|
27789
27793
|
var modifiers = parseModifiersForArrowFunction();
|
|
@@ -27811,9 +27815,6 @@ var ts;
|
|
|
27811
27815
|
return undefined;
|
|
27812
27816
|
}
|
|
27813
27817
|
}
|
|
27814
|
-
if (disallowReturnTypeInArrowFunction && token() === 58) {
|
|
27815
|
-
return undefined;
|
|
27816
|
-
}
|
|
27817
27818
|
var type = parseReturnType(58, false);
|
|
27818
27819
|
if (type && !allowAmbiguity && typeHasArrowFunctionBlockingParseError(type)) {
|
|
27819
27820
|
return undefined;
|
|
@@ -27829,12 +27830,12 @@ var ts;
|
|
|
27829
27830
|
var lastToken = token();
|
|
27830
27831
|
var equalsGreaterThanToken = parseExpectedToken(38);
|
|
27831
27832
|
var body = (lastToken === 38 || lastToken === 18)
|
|
27832
|
-
? parseArrowFunctionExpressionBody(ts.some(modifiers, ts.isAsyncModifier)
|
|
27833
|
+
? parseArrowFunctionExpressionBody(ts.some(modifiers, ts.isAsyncModifier))
|
|
27833
27834
|
: parseIdentifier();
|
|
27834
27835
|
var node = factory.createArrowFunction(modifiers, typeParameters, parameters, type, equalsGreaterThanToken, body);
|
|
27835
27836
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
27836
27837
|
}
|
|
27837
|
-
function parseArrowFunctionExpressionBody(isAsync
|
|
27838
|
+
function parseArrowFunctionExpressionBody(isAsync) {
|
|
27838
27839
|
if (token() === 18) {
|
|
27839
27840
|
return parseFunctionBlock(isAsync ? 2 : 0);
|
|
27840
27841
|
}
|
|
@@ -27848,8 +27849,8 @@ var ts;
|
|
|
27848
27849
|
var savedTopLevel = topLevel;
|
|
27849
27850
|
topLevel = false;
|
|
27850
27851
|
var node = isAsync
|
|
27851
|
-
? doInAwaitContext(
|
|
27852
|
-
: doOutsideOfAwaitContext(
|
|
27852
|
+
? doInAwaitContext(parseAssignmentExpressionOrHigher)
|
|
27853
|
+
: doOutsideOfAwaitContext(parseAssignmentExpressionOrHigher);
|
|
27853
27854
|
topLevel = savedTopLevel;
|
|
27854
27855
|
return node;
|
|
27855
27856
|
}
|
|
@@ -27859,8 +27860,8 @@ var ts;
|
|
|
27859
27860
|
return leftOperand;
|
|
27860
27861
|
}
|
|
27861
27862
|
var colonToken;
|
|
27862
|
-
return finishNode(factory.createConditionalExpression(leftOperand, questionToken, doOutsideOfContext(disallowInAndDecoratorContext,
|
|
27863
|
-
? parseAssignmentExpressionOrHigher(
|
|
27863
|
+
return finishNode(factory.createConditionalExpression(leftOperand, questionToken, doOutsideOfContext(disallowInAndDecoratorContext, parseAssignmentExpressionOrHigher), colonToken = parseExpectedToken(58), ts.nodeIsPresent(colonToken)
|
|
27864
|
+
? parseAssignmentExpressionOrHigher()
|
|
27864
27865
|
: createMissingNode(79, false, ts.Diagnostics._0_expected, ts.tokenToString(58))), pos);
|
|
27865
27866
|
}
|
|
27866
27867
|
function parseBinaryExpressionOrHigher(precedence) {
|
|
@@ -28235,9 +28236,22 @@ var ts;
|
|
|
28235
28236
|
}
|
|
28236
28237
|
scanJsxIdentifier();
|
|
28237
28238
|
var pos = getNodePos();
|
|
28238
|
-
return finishNode(factory.createJsxAttribute(parseIdentifierName(),
|
|
28239
|
-
|
|
28240
|
-
|
|
28239
|
+
return finishNode(factory.createJsxAttribute(parseIdentifierName(), parseJsxAttributeValue()), pos);
|
|
28240
|
+
}
|
|
28241
|
+
function parseJsxAttributeValue() {
|
|
28242
|
+
if (token() === 63) {
|
|
28243
|
+
if (scanJsxAttributeValue() === 10) {
|
|
28244
|
+
return parseLiteralNode();
|
|
28245
|
+
}
|
|
28246
|
+
if (token() === 18) {
|
|
28247
|
+
return parseJsxExpression(true);
|
|
28248
|
+
}
|
|
28249
|
+
if (token() === 29) {
|
|
28250
|
+
return parseJsxElementOrSelfClosingElementOrFragment(true);
|
|
28251
|
+
}
|
|
28252
|
+
parseErrorAtCurrentToken(ts.Diagnostics.or_JSX_element_expected);
|
|
28253
|
+
}
|
|
28254
|
+
return undefined;
|
|
28241
28255
|
}
|
|
28242
28256
|
function parseJsxSpreadAttribute() {
|
|
28243
28257
|
var pos = getNodePos();
|
|
@@ -28511,13 +28525,13 @@ var ts;
|
|
|
28511
28525
|
function parseSpreadElement() {
|
|
28512
28526
|
var pos = getNodePos();
|
|
28513
28527
|
parseExpected(25);
|
|
28514
|
-
var expression = parseAssignmentExpressionOrHigher(
|
|
28528
|
+
var expression = parseAssignmentExpressionOrHigher();
|
|
28515
28529
|
return finishNode(factory.createSpreadElement(expression), pos);
|
|
28516
28530
|
}
|
|
28517
28531
|
function parseArgumentOrArrayLiteralElement() {
|
|
28518
28532
|
return token() === 25 ? parseSpreadElement() :
|
|
28519
28533
|
token() === 27 ? finishNode(factory.createOmittedExpression(), getNodePos()) :
|
|
28520
|
-
parseAssignmentExpressionOrHigher(
|
|
28534
|
+
parseAssignmentExpressionOrHigher();
|
|
28521
28535
|
}
|
|
28522
28536
|
function parseArgumentExpression() {
|
|
28523
28537
|
return doOutsideOfContext(disallowInAndDecoratorContext, parseArgumentOrArrayLiteralElement);
|
|
@@ -28535,7 +28549,7 @@ var ts;
|
|
|
28535
28549
|
var pos = getNodePos();
|
|
28536
28550
|
var hasJSDoc = hasPrecedingJSDocComment();
|
|
28537
28551
|
if (parseOptionalToken(25)) {
|
|
28538
|
-
var expression = parseAssignmentExpressionOrHigher(
|
|
28552
|
+
var expression = parseAssignmentExpressionOrHigher();
|
|
28539
28553
|
return withJSDoc(finishNode(factory.createSpreadAssignment(expression), pos), hasJSDoc);
|
|
28540
28554
|
}
|
|
28541
28555
|
var decorators = parseDecorators();
|
|
@@ -28558,13 +28572,13 @@ var ts;
|
|
|
28558
28572
|
var isShorthandPropertyAssignment = tokenIsIdentifier && (token() !== 58);
|
|
28559
28573
|
if (isShorthandPropertyAssignment) {
|
|
28560
28574
|
var equalsToken = parseOptionalToken(63);
|
|
28561
|
-
var objectAssignmentInitializer = equalsToken ? allowInAnd(
|
|
28575
|
+
var objectAssignmentInitializer = equalsToken ? allowInAnd(parseAssignmentExpressionOrHigher) : undefined;
|
|
28562
28576
|
node = factory.createShorthandPropertyAssignment(name, objectAssignmentInitializer);
|
|
28563
28577
|
node.equalsToken = equalsToken;
|
|
28564
28578
|
}
|
|
28565
28579
|
else {
|
|
28566
28580
|
parseExpected(58);
|
|
28567
|
-
var initializer = allowInAnd(
|
|
28581
|
+
var initializer = allowInAnd(parseAssignmentExpressionOrHigher);
|
|
28568
28582
|
node = factory.createPropertyAssignment(name, initializer);
|
|
28569
28583
|
}
|
|
28570
28584
|
node.decorators = decorators;
|
|
@@ -28724,7 +28738,7 @@ var ts;
|
|
|
28724
28738
|
}
|
|
28725
28739
|
var node;
|
|
28726
28740
|
if (awaitToken ? parseExpected(160) : parseOptional(160)) {
|
|
28727
|
-
var expression = allowInAnd(
|
|
28741
|
+
var expression = allowInAnd(parseAssignmentExpressionOrHigher);
|
|
28728
28742
|
parseExpected(21);
|
|
28729
28743
|
node = factory.createForOfStatement(awaitToken, initializer, expression, parseStatement());
|
|
28730
28744
|
}
|
|
@@ -29762,7 +29776,7 @@ var ts;
|
|
|
29762
29776
|
var pos = getNodePos();
|
|
29763
29777
|
var name = ts.tokenIsIdentifierOrKeyword(token()) ? parseIdentifierName() : parseLiteralLikeNode(10);
|
|
29764
29778
|
parseExpected(58);
|
|
29765
|
-
var value = parseAssignmentExpressionOrHigher(
|
|
29779
|
+
var value = parseAssignmentExpressionOrHigher();
|
|
29766
29780
|
return finishNode(factory.createAssertEntry(name, value), pos);
|
|
29767
29781
|
}
|
|
29768
29782
|
function parseAssertClause(skipAssertKeyword) {
|
|
@@ -29812,7 +29826,7 @@ var ts;
|
|
|
29812
29826
|
function parseModuleReference() {
|
|
29813
29827
|
return isExternalModuleReference()
|
|
29814
29828
|
? parseExternalModuleReference()
|
|
29815
|
-
: parseEntityName(false
|
|
29829
|
+
: parseEntityName(false);
|
|
29816
29830
|
}
|
|
29817
29831
|
function parseExternalModuleReference() {
|
|
29818
29832
|
var pos = getNodePos();
|
|
@@ -29956,7 +29970,7 @@ var ts;
|
|
|
29956
29970
|
else {
|
|
29957
29971
|
parseExpected(88);
|
|
29958
29972
|
}
|
|
29959
|
-
var expression = parseAssignmentExpressionOrHigher(
|
|
29973
|
+
var expression = parseAssignmentExpressionOrHigher();
|
|
29960
29974
|
parseSemicolon();
|
|
29961
29975
|
setAwaitContext(savedAwaitContext);
|
|
29962
29976
|
var node = factory.createExportAssignment(decorators, modifiers, isExportEquals, expression);
|
|
@@ -29994,7 +30008,7 @@ var ts;
|
|
|
29994
30008
|
var pos = getNodePos();
|
|
29995
30009
|
var hasBrace = parseOptional(18);
|
|
29996
30010
|
var p2 = getNodePos();
|
|
29997
|
-
var entityName = parseEntityName(false
|
|
30011
|
+
var entityName = parseEntityName(false);
|
|
29998
30012
|
while (token() === 80) {
|
|
29999
30013
|
reScanHashToken();
|
|
30000
30014
|
nextTokenJSDoc();
|
|
@@ -30396,7 +30410,7 @@ var ts;
|
|
|
30396
30410
|
skipWhitespace();
|
|
30397
30411
|
var p2 = getNodePos();
|
|
30398
30412
|
var name = ts.tokenIsIdentifierOrKeyword(token())
|
|
30399
|
-
? parseEntityName(true
|
|
30413
|
+
? parseEntityName(true)
|
|
30400
30414
|
: undefined;
|
|
30401
30415
|
if (name) {
|
|
30402
30416
|
while (token() === 80) {
|
|
@@ -31484,6 +31498,7 @@ var ts;
|
|
|
31484
31498
|
["es2021.intl", "lib.es2021.intl.d.ts"],
|
|
31485
31499
|
["es2022.array", "lib.es2022.array.d.ts"],
|
|
31486
31500
|
["es2022.error", "lib.es2022.error.d.ts"],
|
|
31501
|
+
["es2022.intl", "lib.es2022.intl.d.ts"],
|
|
31487
31502
|
["es2022.object", "lib.es2022.object.d.ts"],
|
|
31488
31503
|
["es2022.string", "lib.es2022.string.d.ts"],
|
|
31489
31504
|
["esnext.array", "lib.es2022.array.d.ts"],
|
|
@@ -31684,7 +31699,6 @@ var ts;
|
|
|
31684
31699
|
type: "boolean",
|
|
31685
31700
|
affectsSemanticDiagnostics: true,
|
|
31686
31701
|
affectsEmit: true,
|
|
31687
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
31688
31702
|
category: ts.Diagnostics.Watch_and_Build_Modes,
|
|
31689
31703
|
description: ts.Diagnostics.Have_recompiles_in_projects_that_use_incremental_and_watch_mode_assume_that_changes_within_a_file_will_only_affect_files_directly_depending_on_it,
|
|
31690
31704
|
defaultValueDescription: false,
|
|
@@ -31718,39 +31732,12 @@ var ts;
|
|
|
31718
31732
|
affectsSourceFile: true,
|
|
31719
31733
|
affectsModuleResolution: true,
|
|
31720
31734
|
affectsEmit: true,
|
|
31721
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
31722
31735
|
paramType: ts.Diagnostics.VERSION,
|
|
31723
31736
|
showInSimplifiedHelpView: true,
|
|
31724
31737
|
category: ts.Diagnostics.Language_and_Environment,
|
|
31725
31738
|
description: ts.Diagnostics.Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declarations,
|
|
31726
31739
|
defaultValueDescription: 0,
|
|
31727
31740
|
};
|
|
31728
|
-
ts.moduleOptionDeclaration = {
|
|
31729
|
-
name: "module",
|
|
31730
|
-
shortName: "m",
|
|
31731
|
-
type: new ts.Map(ts.getEntries({
|
|
31732
|
-
none: ts.ModuleKind.None,
|
|
31733
|
-
commonjs: ts.ModuleKind.CommonJS,
|
|
31734
|
-
amd: ts.ModuleKind.AMD,
|
|
31735
|
-
system: ts.ModuleKind.System,
|
|
31736
|
-
umd: ts.ModuleKind.UMD,
|
|
31737
|
-
es6: ts.ModuleKind.ES2015,
|
|
31738
|
-
es2015: ts.ModuleKind.ES2015,
|
|
31739
|
-
es2020: ts.ModuleKind.ES2020,
|
|
31740
|
-
es2022: ts.ModuleKind.ES2022,
|
|
31741
|
-
esnext: ts.ModuleKind.ESNext,
|
|
31742
|
-
node12: ts.ModuleKind.Node12,
|
|
31743
|
-
nodenext: ts.ModuleKind.NodeNext,
|
|
31744
|
-
})),
|
|
31745
|
-
affectsModuleResolution: true,
|
|
31746
|
-
affectsEmit: true,
|
|
31747
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
31748
|
-
paramType: ts.Diagnostics.KIND,
|
|
31749
|
-
showInSimplifiedHelpView: true,
|
|
31750
|
-
category: ts.Diagnostics.Modules,
|
|
31751
|
-
description: ts.Diagnostics.Specify_what_module_code_is_generated,
|
|
31752
|
-
defaultValueDescription: undefined,
|
|
31753
|
-
};
|
|
31754
31741
|
var commandOptionsWithoutBuild = [
|
|
31755
31742
|
{
|
|
31756
31743
|
name: "all",
|
|
@@ -31811,13 +31798,36 @@ var ts;
|
|
|
31811
31798
|
category: ts.Diagnostics.Command_line_Options,
|
|
31812
31799
|
affectsSemanticDiagnostics: true,
|
|
31813
31800
|
affectsEmit: true,
|
|
31814
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
31815
31801
|
isCommandLineOnly: true,
|
|
31816
31802
|
description: ts.Diagnostics.Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing,
|
|
31817
31803
|
defaultValueDescription: false,
|
|
31818
31804
|
},
|
|
31819
31805
|
ts.targetOptionDeclaration,
|
|
31820
|
-
|
|
31806
|
+
{
|
|
31807
|
+
name: "module",
|
|
31808
|
+
shortName: "m",
|
|
31809
|
+
type: new ts.Map(ts.getEntries({
|
|
31810
|
+
none: ts.ModuleKind.None,
|
|
31811
|
+
commonjs: ts.ModuleKind.CommonJS,
|
|
31812
|
+
amd: ts.ModuleKind.AMD,
|
|
31813
|
+
system: ts.ModuleKind.System,
|
|
31814
|
+
umd: ts.ModuleKind.UMD,
|
|
31815
|
+
es6: ts.ModuleKind.ES2015,
|
|
31816
|
+
es2015: ts.ModuleKind.ES2015,
|
|
31817
|
+
es2020: ts.ModuleKind.ES2020,
|
|
31818
|
+
es2022: ts.ModuleKind.ES2022,
|
|
31819
|
+
esnext: ts.ModuleKind.ESNext,
|
|
31820
|
+
node16: ts.ModuleKind.Node16,
|
|
31821
|
+
nodenext: ts.ModuleKind.NodeNext,
|
|
31822
|
+
})),
|
|
31823
|
+
affectsModuleResolution: true,
|
|
31824
|
+
affectsEmit: true,
|
|
31825
|
+
paramType: ts.Diagnostics.KIND,
|
|
31826
|
+
showInSimplifiedHelpView: true,
|
|
31827
|
+
category: ts.Diagnostics.Modules,
|
|
31828
|
+
description: ts.Diagnostics.Specify_what_module_code_is_generated,
|
|
31829
|
+
defaultValueDescription: undefined,
|
|
31830
|
+
},
|
|
31821
31831
|
{
|
|
31822
31832
|
name: "lib",
|
|
31823
31833
|
type: "list",
|
|
@@ -31854,7 +31864,6 @@ var ts;
|
|
|
31854
31864
|
type: jsxOptionMap,
|
|
31855
31865
|
affectsSourceFile: true,
|
|
31856
31866
|
affectsEmit: true,
|
|
31857
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
31858
31867
|
affectsModuleResolution: true,
|
|
31859
31868
|
paramType: ts.Diagnostics.KIND,
|
|
31860
31869
|
showInSimplifiedHelpView: true,
|
|
@@ -31867,7 +31876,6 @@ var ts;
|
|
|
31867
31876
|
shortName: "d",
|
|
31868
31877
|
type: "boolean",
|
|
31869
31878
|
affectsEmit: true,
|
|
31870
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
31871
31879
|
showInSimplifiedHelpView: true,
|
|
31872
31880
|
category: ts.Diagnostics.Emit,
|
|
31873
31881
|
transpileOptionValue: undefined,
|
|
@@ -31878,7 +31886,6 @@ var ts;
|
|
|
31878
31886
|
name: "declarationMap",
|
|
31879
31887
|
type: "boolean",
|
|
31880
31888
|
affectsEmit: true,
|
|
31881
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
31882
31889
|
showInSimplifiedHelpView: true,
|
|
31883
31890
|
category: ts.Diagnostics.Emit,
|
|
31884
31891
|
transpileOptionValue: undefined,
|
|
@@ -31889,7 +31896,6 @@ var ts;
|
|
|
31889
31896
|
name: "emitDeclarationOnly",
|
|
31890
31897
|
type: "boolean",
|
|
31891
31898
|
affectsEmit: true,
|
|
31892
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
31893
31899
|
showInSimplifiedHelpView: true,
|
|
31894
31900
|
category: ts.Diagnostics.Emit,
|
|
31895
31901
|
description: ts.Diagnostics.Only_output_d_ts_files_and_not_JavaScript_files,
|
|
@@ -31900,7 +31906,6 @@ var ts;
|
|
|
31900
31906
|
name: "sourceMap",
|
|
31901
31907
|
type: "boolean",
|
|
31902
31908
|
affectsEmit: true,
|
|
31903
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
31904
31909
|
showInSimplifiedHelpView: true,
|
|
31905
31910
|
category: ts.Diagnostics.Emit,
|
|
31906
31911
|
defaultValueDescription: false,
|
|
@@ -31910,9 +31915,6 @@ var ts;
|
|
|
31910
31915
|
name: "outFile",
|
|
31911
31916
|
type: "string",
|
|
31912
31917
|
affectsEmit: true,
|
|
31913
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
31914
|
-
affectsDeclarationPath: true,
|
|
31915
|
-
affectsBundleEmitBuildInfo: true,
|
|
31916
31918
|
isFilePath: true,
|
|
31917
31919
|
paramType: ts.Diagnostics.FILE,
|
|
31918
31920
|
showInSimplifiedHelpView: true,
|
|
@@ -31924,8 +31926,6 @@ var ts;
|
|
|
31924
31926
|
name: "outDir",
|
|
31925
31927
|
type: "string",
|
|
31926
31928
|
affectsEmit: true,
|
|
31927
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
31928
|
-
affectsDeclarationPath: true,
|
|
31929
31929
|
isFilePath: true,
|
|
31930
31930
|
paramType: ts.Diagnostics.DIRECTORY,
|
|
31931
31931
|
showInSimplifiedHelpView: true,
|
|
@@ -31936,8 +31936,6 @@ var ts;
|
|
|
31936
31936
|
name: "rootDir",
|
|
31937
31937
|
type: "string",
|
|
31938
31938
|
affectsEmit: true,
|
|
31939
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
31940
|
-
affectsDeclarationPath: true,
|
|
31941
31939
|
isFilePath: true,
|
|
31942
31940
|
paramType: ts.Diagnostics.LOCATION,
|
|
31943
31941
|
category: ts.Diagnostics.Modules,
|
|
@@ -31948,8 +31946,6 @@ var ts;
|
|
|
31948
31946
|
name: "composite",
|
|
31949
31947
|
type: "boolean",
|
|
31950
31948
|
affectsEmit: true,
|
|
31951
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
31952
|
-
affectsBundleEmitBuildInfo: true,
|
|
31953
31949
|
isTSConfigOnly: true,
|
|
31954
31950
|
category: ts.Diagnostics.Projects,
|
|
31955
31951
|
transpileOptionValue: undefined,
|
|
@@ -31960,8 +31956,6 @@ var ts;
|
|
|
31960
31956
|
name: "tsBuildInfoFile",
|
|
31961
31957
|
type: "string",
|
|
31962
31958
|
affectsEmit: true,
|
|
31963
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
31964
|
-
affectsBundleEmitBuildInfo: true,
|
|
31965
31959
|
isFilePath: true,
|
|
31966
31960
|
paramType: ts.Diagnostics.FILE,
|
|
31967
31961
|
category: ts.Diagnostics.Projects,
|
|
@@ -31973,7 +31967,6 @@ var ts;
|
|
|
31973
31967
|
name: "removeComments",
|
|
31974
31968
|
type: "boolean",
|
|
31975
31969
|
affectsEmit: true,
|
|
31976
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
31977
31970
|
showInSimplifiedHelpView: true,
|
|
31978
31971
|
category: ts.Diagnostics.Emit,
|
|
31979
31972
|
defaultValueDescription: false,
|
|
@@ -31992,7 +31985,6 @@ var ts;
|
|
|
31992
31985
|
name: "importHelpers",
|
|
31993
31986
|
type: "boolean",
|
|
31994
31987
|
affectsEmit: true,
|
|
31995
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
31996
31988
|
category: ts.Diagnostics.Emit,
|
|
31997
31989
|
description: ts.Diagnostics.Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file,
|
|
31998
31990
|
defaultValueDescription: false,
|
|
@@ -32006,7 +31998,6 @@ var ts;
|
|
|
32006
31998
|
})),
|
|
32007
31999
|
affectsEmit: true,
|
|
32008
32000
|
affectsSemanticDiagnostics: true,
|
|
32009
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32010
32001
|
category: ts.Diagnostics.Emit,
|
|
32011
32002
|
description: ts.Diagnostics.Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types,
|
|
32012
32003
|
defaultValueDescription: 0,
|
|
@@ -32015,7 +32006,6 @@ var ts;
|
|
|
32015
32006
|
name: "downlevelIteration",
|
|
32016
32007
|
type: "boolean",
|
|
32017
32008
|
affectsEmit: true,
|
|
32018
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32019
32009
|
category: ts.Diagnostics.Emit,
|
|
32020
32010
|
description: ts.Diagnostics.Emit_more_compliant_but_verbose_and_less_performant_JavaScript_for_iteration,
|
|
32021
32011
|
defaultValueDescription: false,
|
|
@@ -32031,7 +32021,6 @@ var ts;
|
|
|
32031
32021
|
{
|
|
32032
32022
|
name: "strict",
|
|
32033
32023
|
type: "boolean",
|
|
32034
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32035
32024
|
showInSimplifiedHelpView: true,
|
|
32036
32025
|
category: ts.Diagnostics.Type_Checking,
|
|
32037
32026
|
description: ts.Diagnostics.Enable_all_strict_type_checking_options,
|
|
@@ -32041,7 +32030,6 @@ var ts;
|
|
|
32041
32030
|
name: "noImplicitAny",
|
|
32042
32031
|
type: "boolean",
|
|
32043
32032
|
affectsSemanticDiagnostics: true,
|
|
32044
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32045
32033
|
strictFlag: true,
|
|
32046
32034
|
category: ts.Diagnostics.Type_Checking,
|
|
32047
32035
|
description: ts.Diagnostics.Enable_error_reporting_for_expressions_and_declarations_with_an_implied_any_type,
|
|
@@ -32051,7 +32039,6 @@ var ts;
|
|
|
32051
32039
|
name: "strictNullChecks",
|
|
32052
32040
|
type: "boolean",
|
|
32053
32041
|
affectsSemanticDiagnostics: true,
|
|
32054
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32055
32042
|
strictFlag: true,
|
|
32056
32043
|
category: ts.Diagnostics.Type_Checking,
|
|
32057
32044
|
description: ts.Diagnostics.When_type_checking_take_into_account_null_and_undefined,
|
|
@@ -32060,8 +32047,6 @@ var ts;
|
|
|
32060
32047
|
{
|
|
32061
32048
|
name: "strictFunctionTypes",
|
|
32062
32049
|
type: "boolean",
|
|
32063
|
-
affectsSemanticDiagnostics: true,
|
|
32064
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32065
32050
|
strictFlag: true,
|
|
32066
32051
|
category: ts.Diagnostics.Type_Checking,
|
|
32067
32052
|
description: ts.Diagnostics.When_assigning_functions_check_to_ensure_parameters_and_the_return_values_are_subtype_compatible,
|
|
@@ -32070,8 +32055,6 @@ var ts;
|
|
|
32070
32055
|
{
|
|
32071
32056
|
name: "strictBindCallApply",
|
|
32072
32057
|
type: "boolean",
|
|
32073
|
-
affectsSemanticDiagnostics: true,
|
|
32074
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32075
32058
|
strictFlag: true,
|
|
32076
32059
|
category: ts.Diagnostics.Type_Checking,
|
|
32077
32060
|
description: ts.Diagnostics.Check_that_the_arguments_for_bind_call_and_apply_methods_match_the_original_function,
|
|
@@ -32081,7 +32064,6 @@ var ts;
|
|
|
32081
32064
|
name: "strictPropertyInitialization",
|
|
32082
32065
|
type: "boolean",
|
|
32083
32066
|
affectsSemanticDiagnostics: true,
|
|
32084
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32085
32067
|
strictFlag: true,
|
|
32086
32068
|
category: ts.Diagnostics.Type_Checking,
|
|
32087
32069
|
description: ts.Diagnostics.Check_for_class_properties_that_are_declared_but_not_set_in_the_constructor,
|
|
@@ -32091,7 +32073,6 @@ var ts;
|
|
|
32091
32073
|
name: "noImplicitThis",
|
|
32092
32074
|
type: "boolean",
|
|
32093
32075
|
affectsSemanticDiagnostics: true,
|
|
32094
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32095
32076
|
strictFlag: true,
|
|
32096
32077
|
category: ts.Diagnostics.Type_Checking,
|
|
32097
32078
|
description: ts.Diagnostics.Enable_error_reporting_when_this_is_given_the_type_any,
|
|
@@ -32101,7 +32082,6 @@ var ts;
|
|
|
32101
32082
|
name: "useUnknownInCatchVariables",
|
|
32102
32083
|
type: "boolean",
|
|
32103
32084
|
affectsSemanticDiagnostics: true,
|
|
32104
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32105
32085
|
strictFlag: true,
|
|
32106
32086
|
category: ts.Diagnostics.Type_Checking,
|
|
32107
32087
|
description: ts.Diagnostics.Default_catch_clause_variables_as_unknown_instead_of_any,
|
|
@@ -32111,8 +32091,6 @@ var ts;
|
|
|
32111
32091
|
name: "alwaysStrict",
|
|
32112
32092
|
type: "boolean",
|
|
32113
32093
|
affectsSourceFile: true,
|
|
32114
|
-
affectsEmit: true,
|
|
32115
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32116
32094
|
strictFlag: true,
|
|
32117
32095
|
category: ts.Diagnostics.Type_Checking,
|
|
32118
32096
|
description: ts.Diagnostics.Ensure_use_strict_is_always_emitted,
|
|
@@ -32122,7 +32100,6 @@ var ts;
|
|
|
32122
32100
|
name: "noUnusedLocals",
|
|
32123
32101
|
type: "boolean",
|
|
32124
32102
|
affectsSemanticDiagnostics: true,
|
|
32125
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32126
32103
|
category: ts.Diagnostics.Type_Checking,
|
|
32127
32104
|
description: ts.Diagnostics.Enable_error_reporting_when_local_variables_aren_t_read,
|
|
32128
32105
|
defaultValueDescription: false,
|
|
@@ -32131,7 +32108,6 @@ var ts;
|
|
|
32131
32108
|
name: "noUnusedParameters",
|
|
32132
32109
|
type: "boolean",
|
|
32133
32110
|
affectsSemanticDiagnostics: true,
|
|
32134
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32135
32111
|
category: ts.Diagnostics.Type_Checking,
|
|
32136
32112
|
description: ts.Diagnostics.Raise_an_error_when_a_function_parameter_isn_t_read,
|
|
32137
32113
|
defaultValueDescription: false,
|
|
@@ -32140,7 +32116,6 @@ var ts;
|
|
|
32140
32116
|
name: "exactOptionalPropertyTypes",
|
|
32141
32117
|
type: "boolean",
|
|
32142
32118
|
affectsSemanticDiagnostics: true,
|
|
32143
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32144
32119
|
category: ts.Diagnostics.Type_Checking,
|
|
32145
32120
|
description: ts.Diagnostics.Interpret_optional_property_types_as_written_rather_than_adding_undefined,
|
|
32146
32121
|
defaultValueDescription: false,
|
|
@@ -32149,7 +32124,6 @@ var ts;
|
|
|
32149
32124
|
name: "noImplicitReturns",
|
|
32150
32125
|
type: "boolean",
|
|
32151
32126
|
affectsSemanticDiagnostics: true,
|
|
32152
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32153
32127
|
category: ts.Diagnostics.Type_Checking,
|
|
32154
32128
|
description: ts.Diagnostics.Enable_error_reporting_for_codepaths_that_do_not_explicitly_return_in_a_function,
|
|
32155
32129
|
defaultValueDescription: false,
|
|
@@ -32159,7 +32133,6 @@ var ts;
|
|
|
32159
32133
|
type: "boolean",
|
|
32160
32134
|
affectsBindDiagnostics: true,
|
|
32161
32135
|
affectsSemanticDiagnostics: true,
|
|
32162
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32163
32136
|
category: ts.Diagnostics.Type_Checking,
|
|
32164
32137
|
description: ts.Diagnostics.Enable_error_reporting_for_fallthrough_cases_in_switch_statements,
|
|
32165
32138
|
defaultValueDescription: false,
|
|
@@ -32168,7 +32141,6 @@ var ts;
|
|
|
32168
32141
|
name: "noUncheckedIndexedAccess",
|
|
32169
32142
|
type: "boolean",
|
|
32170
32143
|
affectsSemanticDiagnostics: true,
|
|
32171
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32172
32144
|
category: ts.Diagnostics.Type_Checking,
|
|
32173
32145
|
description: ts.Diagnostics.Add_undefined_to_a_type_when_accessed_using_an_index,
|
|
32174
32146
|
defaultValueDescription: false,
|
|
@@ -32177,7 +32149,6 @@ var ts;
|
|
|
32177
32149
|
name: "noImplicitOverride",
|
|
32178
32150
|
type: "boolean",
|
|
32179
32151
|
affectsSemanticDiagnostics: true,
|
|
32180
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32181
32152
|
category: ts.Diagnostics.Type_Checking,
|
|
32182
32153
|
description: ts.Diagnostics.Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier,
|
|
32183
32154
|
defaultValueDescription: false,
|
|
@@ -32185,8 +32156,6 @@ var ts;
|
|
|
32185
32156
|
{
|
|
32186
32157
|
name: "noPropertyAccessFromIndexSignature",
|
|
32187
32158
|
type: "boolean",
|
|
32188
|
-
affectsSemanticDiagnostics: true,
|
|
32189
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32190
32159
|
showInSimplifiedHelpView: false,
|
|
32191
32160
|
category: ts.Diagnostics.Type_Checking,
|
|
32192
32161
|
description: ts.Diagnostics.Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type,
|
|
@@ -32197,7 +32166,7 @@ var ts;
|
|
|
32197
32166
|
type: new ts.Map(ts.getEntries({
|
|
32198
32167
|
node: ts.ModuleResolutionKind.NodeJs,
|
|
32199
32168
|
classic: ts.ModuleResolutionKind.Classic,
|
|
32200
|
-
|
|
32169
|
+
node16: ts.ModuleResolutionKind.Node16,
|
|
32201
32170
|
nodenext: ts.ModuleResolutionKind.NodeNext,
|
|
32202
32171
|
})),
|
|
32203
32172
|
affectsModuleResolution: true,
|
|
@@ -32267,7 +32236,6 @@ var ts;
|
|
|
32267
32236
|
name: "allowSyntheticDefaultImports",
|
|
32268
32237
|
type: "boolean",
|
|
32269
32238
|
affectsSemanticDiagnostics: true,
|
|
32270
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32271
32239
|
category: ts.Diagnostics.Interop_Constraints,
|
|
32272
32240
|
description: ts.Diagnostics.Allow_import_x_from_y_when_a_module_doesn_t_have_a_default_export,
|
|
32273
32241
|
defaultValueDescription: ts.Diagnostics.module_system_or_esModuleInterop
|
|
@@ -32277,7 +32245,6 @@ var ts;
|
|
|
32277
32245
|
type: "boolean",
|
|
32278
32246
|
affectsSemanticDiagnostics: true,
|
|
32279
32247
|
affectsEmit: true,
|
|
32280
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32281
32248
|
showInSimplifiedHelpView: true,
|
|
32282
32249
|
category: ts.Diagnostics.Interop_Constraints,
|
|
32283
32250
|
description: ts.Diagnostics.Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheticDefaultImports_for_type_compatibility,
|
|
@@ -32294,7 +32261,6 @@ var ts;
|
|
|
32294
32261
|
name: "allowUmdGlobalAccess",
|
|
32295
32262
|
type: "boolean",
|
|
32296
32263
|
affectsSemanticDiagnostics: true,
|
|
32297
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32298
32264
|
category: ts.Diagnostics.Modules,
|
|
32299
32265
|
description: ts.Diagnostics.Allow_accessing_UMD_globals_from_modules,
|
|
32300
32266
|
defaultValueDescription: false,
|
|
@@ -32315,7 +32281,6 @@ var ts;
|
|
|
32315
32281
|
name: "sourceRoot",
|
|
32316
32282
|
type: "string",
|
|
32317
32283
|
affectsEmit: true,
|
|
32318
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32319
32284
|
paramType: ts.Diagnostics.LOCATION,
|
|
32320
32285
|
category: ts.Diagnostics.Emit,
|
|
32321
32286
|
description: ts.Diagnostics.Specify_the_root_path_for_debuggers_to_find_the_reference_source_code,
|
|
@@ -32324,7 +32289,6 @@ var ts;
|
|
|
32324
32289
|
name: "mapRoot",
|
|
32325
32290
|
type: "string",
|
|
32326
32291
|
affectsEmit: true,
|
|
32327
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32328
32292
|
paramType: ts.Diagnostics.LOCATION,
|
|
32329
32293
|
category: ts.Diagnostics.Emit,
|
|
32330
32294
|
description: ts.Diagnostics.Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations,
|
|
@@ -32333,7 +32297,6 @@ var ts;
|
|
|
32333
32297
|
name: "inlineSourceMap",
|
|
32334
32298
|
type: "boolean",
|
|
32335
32299
|
affectsEmit: true,
|
|
32336
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32337
32300
|
category: ts.Diagnostics.Emit,
|
|
32338
32301
|
description: ts.Diagnostics.Include_sourcemap_files_inside_the_emitted_JavaScript,
|
|
32339
32302
|
defaultValueDescription: false,
|
|
@@ -32342,7 +32305,6 @@ var ts;
|
|
|
32342
32305
|
name: "inlineSources",
|
|
32343
32306
|
type: "boolean",
|
|
32344
32307
|
affectsEmit: true,
|
|
32345
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32346
32308
|
category: ts.Diagnostics.Emit,
|
|
32347
32309
|
description: ts.Diagnostics.Include_source_code_in_the_sourcemaps_inside_the_emitted_JavaScript,
|
|
32348
32310
|
defaultValueDescription: false,
|
|
@@ -32351,7 +32313,6 @@ var ts;
|
|
|
32351
32313
|
name: "experimentalDecorators",
|
|
32352
32314
|
type: "boolean",
|
|
32353
32315
|
affectsSemanticDiagnostics: true,
|
|
32354
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32355
32316
|
category: ts.Diagnostics.Language_and_Environment,
|
|
32356
32317
|
description: ts.Diagnostics.Enable_experimental_support_for_TC39_stage_2_draft_decorators,
|
|
32357
32318
|
defaultValueDescription: false,
|
|
@@ -32361,7 +32322,6 @@ var ts;
|
|
|
32361
32322
|
type: "boolean",
|
|
32362
32323
|
affectsSemanticDiagnostics: true,
|
|
32363
32324
|
affectsEmit: true,
|
|
32364
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32365
32325
|
category: ts.Diagnostics.Language_and_Environment,
|
|
32366
32326
|
description: ts.Diagnostics.Emit_design_type_metadata_for_decorated_declarations_in_source_files,
|
|
32367
32327
|
defaultValueDescription: false,
|
|
@@ -32385,7 +32345,6 @@ var ts;
|
|
|
32385
32345
|
type: "string",
|
|
32386
32346
|
affectsSemanticDiagnostics: true,
|
|
32387
32347
|
affectsEmit: true,
|
|
32388
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32389
32348
|
affectsModuleResolution: true,
|
|
32390
32349
|
category: ts.Diagnostics.Language_and_Environment,
|
|
32391
32350
|
description: ts.Diagnostics.Specify_module_specifier_used_to_import_the_JSX_factory_functions_when_using_jsx_Colon_react_jsx_Asterisk,
|
|
@@ -32403,9 +32362,6 @@ var ts;
|
|
|
32403
32362
|
name: "out",
|
|
32404
32363
|
type: "string",
|
|
32405
32364
|
affectsEmit: true,
|
|
32406
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32407
|
-
affectsDeclarationPath: true,
|
|
32408
|
-
affectsBundleEmitBuildInfo: true,
|
|
32409
32365
|
isFilePath: false,
|
|
32410
32366
|
category: ts.Diagnostics.Backwards_Compatibility,
|
|
32411
32367
|
paramType: ts.Diagnostics.FILE,
|
|
@@ -32416,7 +32372,6 @@ var ts;
|
|
|
32416
32372
|
name: "reactNamespace",
|
|
32417
32373
|
type: "string",
|
|
32418
32374
|
affectsEmit: true,
|
|
32419
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32420
32375
|
category: ts.Diagnostics.Language_and_Environment,
|
|
32421
32376
|
description: ts.Diagnostics.Specify_the_object_invoked_for_createElement_This_only_applies_when_targeting_react_JSX_emit,
|
|
32422
32377
|
defaultValueDescription: "`React`",
|
|
@@ -32424,7 +32379,6 @@ var ts;
|
|
|
32424
32379
|
{
|
|
32425
32380
|
name: "skipDefaultLibCheck",
|
|
32426
32381
|
type: "boolean",
|
|
32427
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32428
32382
|
category: ts.Diagnostics.Completeness,
|
|
32429
32383
|
description: ts.Diagnostics.Skip_type_checking_d_ts_files_that_are_included_with_TypeScript,
|
|
32430
32384
|
defaultValueDescription: false,
|
|
@@ -32440,7 +32394,6 @@ var ts;
|
|
|
32440
32394
|
name: "emitBOM",
|
|
32441
32395
|
type: "boolean",
|
|
32442
32396
|
affectsEmit: true,
|
|
32443
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32444
32397
|
category: ts.Diagnostics.Emit,
|
|
32445
32398
|
description: ts.Diagnostics.Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files,
|
|
32446
32399
|
defaultValueDescription: false,
|
|
@@ -32452,7 +32405,6 @@ var ts;
|
|
|
32452
32405
|
lf: 1
|
|
32453
32406
|
})),
|
|
32454
32407
|
affectsEmit: true,
|
|
32455
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32456
32408
|
paramType: ts.Diagnostics.NEWLINE,
|
|
32457
32409
|
category: ts.Diagnostics.Emit,
|
|
32458
32410
|
description: ts.Diagnostics.Set_the_newline_character_for_emitting_files,
|
|
@@ -32462,7 +32414,6 @@ var ts;
|
|
|
32462
32414
|
name: "noErrorTruncation",
|
|
32463
32415
|
type: "boolean",
|
|
32464
32416
|
affectsSemanticDiagnostics: true,
|
|
32465
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32466
32417
|
category: ts.Diagnostics.Output_Formatting,
|
|
32467
32418
|
description: ts.Diagnostics.Disable_truncating_types_in_error_messages,
|
|
32468
32419
|
defaultValueDescription: false,
|
|
@@ -32489,7 +32440,6 @@ var ts;
|
|
|
32489
32440
|
name: "stripInternal",
|
|
32490
32441
|
type: "boolean",
|
|
32491
32442
|
affectsEmit: true,
|
|
32492
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32493
32443
|
category: ts.Diagnostics.Emit,
|
|
32494
32444
|
description: ts.Diagnostics.Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments,
|
|
32495
32445
|
defaultValueDescription: false,
|
|
@@ -32530,7 +32480,6 @@ var ts;
|
|
|
32530
32480
|
name: "noImplicitUseStrict",
|
|
32531
32481
|
type: "boolean",
|
|
32532
32482
|
affectsSemanticDiagnostics: true,
|
|
32533
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32534
32483
|
category: ts.Diagnostics.Backwards_Compatibility,
|
|
32535
32484
|
description: ts.Diagnostics.Disable_adding_use_strict_directives_in_emitted_JavaScript_files,
|
|
32536
32485
|
defaultValueDescription: false,
|
|
@@ -32539,7 +32488,6 @@ var ts;
|
|
|
32539
32488
|
name: "noEmitHelpers",
|
|
32540
32489
|
type: "boolean",
|
|
32541
32490
|
affectsEmit: true,
|
|
32542
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32543
32491
|
category: ts.Diagnostics.Emit,
|
|
32544
32492
|
description: ts.Diagnostics.Disable_generating_custom_helper_functions_like_extends_in_compiled_output,
|
|
32545
32493
|
defaultValueDescription: false,
|
|
@@ -32548,7 +32496,6 @@ var ts;
|
|
|
32548
32496
|
name: "noEmitOnError",
|
|
32549
32497
|
type: "boolean",
|
|
32550
32498
|
affectsEmit: true,
|
|
32551
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32552
32499
|
category: ts.Diagnostics.Emit,
|
|
32553
32500
|
transpileOptionValue: undefined,
|
|
32554
32501
|
description: ts.Diagnostics.Disable_emitting_files_if_any_type_checking_errors_are_reported,
|
|
@@ -32558,7 +32505,6 @@ var ts;
|
|
|
32558
32505
|
name: "preserveConstEnums",
|
|
32559
32506
|
type: "boolean",
|
|
32560
32507
|
affectsEmit: true,
|
|
32561
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32562
32508
|
category: ts.Diagnostics.Emit,
|
|
32563
32509
|
description: ts.Diagnostics.Disable_erasing_const_enum_declarations_in_generated_code,
|
|
32564
32510
|
defaultValueDescription: false,
|
|
@@ -32567,8 +32513,6 @@ var ts;
|
|
|
32567
32513
|
name: "declarationDir",
|
|
32568
32514
|
type: "string",
|
|
32569
32515
|
affectsEmit: true,
|
|
32570
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32571
|
-
affectsDeclarationPath: true,
|
|
32572
32516
|
isFilePath: true,
|
|
32573
32517
|
paramType: ts.Diagnostics.DIRECTORY,
|
|
32574
32518
|
category: ts.Diagnostics.Emit,
|
|
@@ -32578,7 +32522,6 @@ var ts;
|
|
|
32578
32522
|
{
|
|
32579
32523
|
name: "skipLibCheck",
|
|
32580
32524
|
type: "boolean",
|
|
32581
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32582
32525
|
category: ts.Diagnostics.Completeness,
|
|
32583
32526
|
description: ts.Diagnostics.Skip_type_checking_all_d_ts_files,
|
|
32584
32527
|
defaultValueDescription: false,
|
|
@@ -32588,7 +32531,6 @@ var ts;
|
|
|
32588
32531
|
type: "boolean",
|
|
32589
32532
|
affectsBindDiagnostics: true,
|
|
32590
32533
|
affectsSemanticDiagnostics: true,
|
|
32591
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32592
32534
|
category: ts.Diagnostics.Type_Checking,
|
|
32593
32535
|
description: ts.Diagnostics.Disable_error_reporting_for_unused_labels,
|
|
32594
32536
|
defaultValueDescription: undefined,
|
|
@@ -32598,7 +32540,6 @@ var ts;
|
|
|
32598
32540
|
type: "boolean",
|
|
32599
32541
|
affectsBindDiagnostics: true,
|
|
32600
32542
|
affectsSemanticDiagnostics: true,
|
|
32601
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32602
32543
|
category: ts.Diagnostics.Type_Checking,
|
|
32603
32544
|
description: ts.Diagnostics.Disable_error_reporting_for_unreachable_code,
|
|
32604
32545
|
defaultValueDescription: undefined,
|
|
@@ -32607,7 +32548,6 @@ var ts;
|
|
|
32607
32548
|
name: "suppressExcessPropertyErrors",
|
|
32608
32549
|
type: "boolean",
|
|
32609
32550
|
affectsSemanticDiagnostics: true,
|
|
32610
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32611
32551
|
category: ts.Diagnostics.Backwards_Compatibility,
|
|
32612
32552
|
description: ts.Diagnostics.Disable_reporting_of_excess_property_errors_during_the_creation_of_object_literals,
|
|
32613
32553
|
defaultValueDescription: false,
|
|
@@ -32616,7 +32556,6 @@ var ts;
|
|
|
32616
32556
|
name: "suppressImplicitAnyIndexErrors",
|
|
32617
32557
|
type: "boolean",
|
|
32618
32558
|
affectsSemanticDiagnostics: true,
|
|
32619
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32620
32559
|
category: ts.Diagnostics.Backwards_Compatibility,
|
|
32621
32560
|
description: ts.Diagnostics.Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures,
|
|
32622
32561
|
defaultValueDescription: false,
|
|
@@ -32641,7 +32580,6 @@ var ts;
|
|
|
32641
32580
|
name: "noStrictGenericChecks",
|
|
32642
32581
|
type: "boolean",
|
|
32643
32582
|
affectsSemanticDiagnostics: true,
|
|
32644
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32645
32583
|
category: ts.Diagnostics.Backwards_Compatibility,
|
|
32646
32584
|
description: ts.Diagnostics.Disable_strict_checking_of_generic_signatures_in_function_types,
|
|
32647
32585
|
defaultValueDescription: false,
|
|
@@ -32651,7 +32589,6 @@ var ts;
|
|
|
32651
32589
|
type: "boolean",
|
|
32652
32590
|
affectsSemanticDiagnostics: true,
|
|
32653
32591
|
affectsEmit: true,
|
|
32654
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32655
32592
|
category: ts.Diagnostics.Language_and_Environment,
|
|
32656
32593
|
description: ts.Diagnostics.Emit_ECMAScript_standard_compliant_class_fields,
|
|
32657
32594
|
defaultValueDescription: ts.Diagnostics.true_for_ES2022_and_above_including_ESNext
|
|
@@ -32660,7 +32597,6 @@ var ts;
|
|
|
32660
32597
|
name: "preserveValueImports",
|
|
32661
32598
|
type: "boolean",
|
|
32662
32599
|
affectsEmit: true,
|
|
32663
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32664
32600
|
category: ts.Diagnostics.Emit,
|
|
32665
32601
|
description: ts.Diagnostics.Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed,
|
|
32666
32602
|
defaultValueDescription: false,
|
|
@@ -32693,13 +32629,12 @@ var ts;
|
|
|
32693
32629
|
affectsModuleResolution: true,
|
|
32694
32630
|
description: ts.Diagnostics.Control_what_method_is_used_to_detect_module_format_JS_files,
|
|
32695
32631
|
category: ts.Diagnostics.Language_and_Environment,
|
|
32696
|
-
defaultValueDescription: ts.Diagnostics.
|
|
32632
|
+
defaultValueDescription: ts.Diagnostics.auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_with_module_Colon_node16_as_modules,
|
|
32697
32633
|
}
|
|
32698
32634
|
];
|
|
32699
32635
|
ts.optionDeclarations = __spreadArray(__spreadArray([], ts.commonOptionsWithBuild, true), commandOptionsWithoutBuild, true);
|
|
32700
32636
|
ts.semanticDiagnosticsOptionDeclarations = ts.optionDeclarations.filter(function (option) { return !!option.affectsSemanticDiagnostics; });
|
|
32701
32637
|
ts.affectsEmitOptionDeclarations = ts.optionDeclarations.filter(function (option) { return !!option.affectsEmit; });
|
|
32702
|
-
ts.affectsDeclarationPathOptionDeclarations = ts.optionDeclarations.filter(function (option) { return !!option.affectsDeclarationPath; });
|
|
32703
32638
|
ts.moduleResolutionOptionDeclarations = ts.optionDeclarations.filter(function (option) { return !!option.affectsModuleResolution; });
|
|
32704
32639
|
ts.sourceFileAffectingCompilerOptions = ts.optionDeclarations.filter(function (option) {
|
|
32705
32640
|
return !!option.affectsSourceFile || !!option.affectsModuleResolution || !!option.affectsBindDiagnostics;
|
|
@@ -33440,7 +33375,7 @@ var ts;
|
|
|
33440
33375
|
return undefined;
|
|
33441
33376
|
if (ts.length(specs) !== 1)
|
|
33442
33377
|
return specs;
|
|
33443
|
-
if (specs[0] ===
|
|
33378
|
+
if (specs[0] === ts.defaultIncludeSpec)
|
|
33444
33379
|
return undefined;
|
|
33445
33380
|
return specs;
|
|
33446
33381
|
}
|
|
@@ -33479,7 +33414,6 @@ var ts;
|
|
|
33479
33414
|
}
|
|
33480
33415
|
});
|
|
33481
33416
|
}
|
|
33482
|
-
ts.getNameOfCompilerOptionValue = getNameOfCompilerOptionValue;
|
|
33483
33417
|
function serializeCompilerOptions(options, pathOptions) {
|
|
33484
33418
|
return serializeOptionBaseObject(options, getOptionsNameMap(), pathOptions);
|
|
33485
33419
|
}
|
|
@@ -33675,6 +33609,7 @@ var ts;
|
|
|
33675
33609
|
function directoryOfCombinedPath(fileName, basePath) {
|
|
33676
33610
|
return ts.getDirectoryPath(ts.getNormalizedAbsolutePath(fileName, basePath));
|
|
33677
33611
|
}
|
|
33612
|
+
ts.defaultIncludeSpec = "**/*";
|
|
33678
33613
|
function parseJsonConfigFileContentWorker(json, sourceFile, host, basePath, existingOptions, existingWatchOptions, configFileName, resolutionStack, extraFileExtensions, extendedConfigCache) {
|
|
33679
33614
|
if (existingOptions === void 0) { existingOptions = {}; }
|
|
33680
33615
|
if (resolutionStack === void 0) { resolutionStack = []; }
|
|
@@ -33727,6 +33662,7 @@ var ts;
|
|
|
33727
33662
|
}
|
|
33728
33663
|
var includeSpecs = toPropValue(getSpecsFromRaw("include"));
|
|
33729
33664
|
var excludeOfRaw = getSpecsFromRaw("exclude");
|
|
33665
|
+
var isDefaultIncludeSpec = false;
|
|
33730
33666
|
var excludeSpecs = toPropValue(excludeOfRaw);
|
|
33731
33667
|
if (excludeOfRaw === "no-prop" && raw.compilerOptions) {
|
|
33732
33668
|
var outDir = raw.compilerOptions.outDir;
|
|
@@ -33736,7 +33672,8 @@ var ts;
|
|
|
33736
33672
|
}
|
|
33737
33673
|
}
|
|
33738
33674
|
if (filesSpecs === undefined && includeSpecs === undefined) {
|
|
33739
|
-
includeSpecs = [
|
|
33675
|
+
includeSpecs = [ts.defaultIncludeSpec];
|
|
33676
|
+
isDefaultIncludeSpec = true;
|
|
33740
33677
|
}
|
|
33741
33678
|
var validatedIncludeSpecs, validatedExcludeSpecs;
|
|
33742
33679
|
if (includeSpecs) {
|
|
@@ -33753,6 +33690,7 @@ var ts;
|
|
|
33753
33690
|
validatedIncludeSpecs: validatedIncludeSpecs,
|
|
33754
33691
|
validatedExcludeSpecs: validatedExcludeSpecs,
|
|
33755
33692
|
pathPatterns: undefined,
|
|
33693
|
+
isDefaultIncludeSpec: isDefaultIncludeSpec,
|
|
33756
33694
|
};
|
|
33757
33695
|
}
|
|
33758
33696
|
function getFileNames(basePath) {
|
|
@@ -34456,7 +34394,7 @@ var ts;
|
|
|
34456
34394
|
ts.Debug.assert(ts.extensionIsTS(resolved.extension));
|
|
34457
34395
|
return { fileName: resolved.path, packageId: resolved.packageId };
|
|
34458
34396
|
}
|
|
34459
|
-
function createResolvedModuleWithFailedLookupLocations(resolved, isExternalLibraryImport, failedLookupLocations, resultFromCache) {
|
|
34397
|
+
function createResolvedModuleWithFailedLookupLocations(resolved, isExternalLibraryImport, failedLookupLocations, diagnostics, resultFromCache) {
|
|
34460
34398
|
var _a;
|
|
34461
34399
|
if (resultFromCache) {
|
|
34462
34400
|
(_a = resultFromCache.failedLookupLocations).push.apply(_a, failedLookupLocations);
|
|
@@ -34464,7 +34402,8 @@ var ts;
|
|
|
34464
34402
|
}
|
|
34465
34403
|
return {
|
|
34466
34404
|
resolvedModule: resolved && { resolvedFileName: resolved.path, originalPath: resolved.originalPath === true ? undefined : resolved.originalPath, extension: resolved.extension, isExternalLibraryImport: isExternalLibraryImport, packageId: resolved.packageId },
|
|
34467
|
-
failedLookupLocations: failedLookupLocations
|
|
34405
|
+
failedLookupLocations: failedLookupLocations,
|
|
34406
|
+
resolutionDiagnostics: diagnostics
|
|
34468
34407
|
};
|
|
34469
34408
|
}
|
|
34470
34409
|
function readPackageJsonField(jsonContent, fieldName, typeOfTag, state) {
|
|
@@ -34641,11 +34580,22 @@ var ts;
|
|
|
34641
34580
|
}
|
|
34642
34581
|
var failedLookupLocations = [];
|
|
34643
34582
|
var features = getDefaultNodeResolutionFeatures(options);
|
|
34644
|
-
if (resolutionMode === ts.ModuleKind.ESNext && (ts.getEmitModuleResolutionKind(options) === ts.ModuleResolutionKind.
|
|
34583
|
+
if (resolutionMode === ts.ModuleKind.ESNext && (ts.getEmitModuleResolutionKind(options) === ts.ModuleResolutionKind.Node16 || ts.getEmitModuleResolutionKind(options) === ts.ModuleResolutionKind.NodeNext)) {
|
|
34645
34584
|
features |= NodeResolutionFeatures.EsmMode;
|
|
34646
34585
|
}
|
|
34647
34586
|
var conditions = features & NodeResolutionFeatures.Exports ? features & NodeResolutionFeatures.EsmMode ? ["node", "import", "types"] : ["node", "require", "types"] : [];
|
|
34648
|
-
var
|
|
34587
|
+
var diagnostics = [];
|
|
34588
|
+
var moduleResolutionState = {
|
|
34589
|
+
compilerOptions: options,
|
|
34590
|
+
host: host,
|
|
34591
|
+
traceEnabled: traceEnabled,
|
|
34592
|
+
failedLookupLocations: failedLookupLocations,
|
|
34593
|
+
packageJsonInfoCache: cache,
|
|
34594
|
+
features: features,
|
|
34595
|
+
conditions: conditions,
|
|
34596
|
+
requestContainingDirectory: containingDirectory,
|
|
34597
|
+
reportDiagnostic: function (diag) { return void diagnostics.push(diag); },
|
|
34598
|
+
};
|
|
34649
34599
|
var resolved = primaryLookup();
|
|
34650
34600
|
var primary = true;
|
|
34651
34601
|
if (!resolved) {
|
|
@@ -34664,7 +34614,7 @@ var ts;
|
|
|
34664
34614
|
isExternalLibraryImport: pathContainsNodeModules(fileName),
|
|
34665
34615
|
};
|
|
34666
34616
|
}
|
|
34667
|
-
result = { resolvedTypeReferenceDirective: resolvedTypeReferenceDirective, failedLookupLocations: failedLookupLocations };
|
|
34617
|
+
result = { resolvedTypeReferenceDirective: resolvedTypeReferenceDirective, failedLookupLocations: failedLookupLocations, resolutionDiagnostics: diagnostics };
|
|
34668
34618
|
perFolderCache === null || perFolderCache === void 0 ? void 0 : perFolderCache.set(typeReferenceDirectiveName, resolutionMode, result);
|
|
34669
34619
|
if (traceEnabled)
|
|
34670
34620
|
traceResult(result);
|
|
@@ -34728,7 +34678,7 @@ var ts;
|
|
|
34728
34678
|
}
|
|
34729
34679
|
ts.resolveTypeReferenceDirective = resolveTypeReferenceDirective;
|
|
34730
34680
|
function getDefaultNodeResolutionFeatures(options) {
|
|
34731
|
-
return ts.getEmitModuleResolutionKind(options) === ts.ModuleResolutionKind.
|
|
34681
|
+
return ts.getEmitModuleResolutionKind(options) === ts.ModuleResolutionKind.Node16 ? NodeResolutionFeatures.Node16Default :
|
|
34732
34682
|
ts.getEmitModuleResolutionKind(options) === ts.ModuleResolutionKind.NodeNext ? NodeResolutionFeatures.NodeNextDefault :
|
|
34733
34683
|
NodeResolutionFeatures.None;
|
|
34734
34684
|
}
|
|
@@ -34741,6 +34691,8 @@ var ts;
|
|
|
34741
34691
|
packageJsonInfoCache: cache === null || cache === void 0 ? void 0 : cache.getPackageJsonInfoCache(),
|
|
34742
34692
|
conditions: ts.emptyArray,
|
|
34743
34693
|
features: NodeResolutionFeatures.None,
|
|
34694
|
+
requestContainingDirectory: containingDirectory,
|
|
34695
|
+
reportDiagnostic: ts.noop
|
|
34744
34696
|
};
|
|
34745
34697
|
return ts.forEachAncestorDirectory(containingDirectory, function (ancestorDirectory) {
|
|
34746
34698
|
if (ts.getBaseFileName(ancestorDirectory) !== "node_modules") {
|
|
@@ -35041,8 +34993,8 @@ var ts;
|
|
|
35041
34993
|
case ts.ModuleKind.CommonJS:
|
|
35042
34994
|
moduleResolution = ts.ModuleResolutionKind.NodeJs;
|
|
35043
34995
|
break;
|
|
35044
|
-
case ts.ModuleKind.
|
|
35045
|
-
moduleResolution = ts.ModuleResolutionKind.
|
|
34996
|
+
case ts.ModuleKind.Node16:
|
|
34997
|
+
moduleResolution = ts.ModuleResolutionKind.Node16;
|
|
35046
34998
|
break;
|
|
35047
34999
|
case ts.ModuleKind.NodeNext:
|
|
35048
35000
|
moduleResolution = ts.ModuleResolutionKind.NodeNext;
|
|
@@ -35062,8 +35014,8 @@ var ts;
|
|
|
35062
35014
|
}
|
|
35063
35015
|
ts.perfLogger.logStartResolveModule(moduleName);
|
|
35064
35016
|
switch (moduleResolution) {
|
|
35065
|
-
case ts.ModuleResolutionKind.
|
|
35066
|
-
result =
|
|
35017
|
+
case ts.ModuleResolutionKind.Node16:
|
|
35018
|
+
result = node16ModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode);
|
|
35067
35019
|
break;
|
|
35068
35020
|
case ts.ModuleResolutionKind.NodeNext:
|
|
35069
35021
|
result = nodeNextModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode);
|
|
@@ -35221,12 +35173,12 @@ var ts;
|
|
|
35221
35173
|
NodeResolutionFeatures[NodeResolutionFeatures["Exports"] = 8] = "Exports";
|
|
35222
35174
|
NodeResolutionFeatures[NodeResolutionFeatures["ExportsPatternTrailers"] = 16] = "ExportsPatternTrailers";
|
|
35223
35175
|
NodeResolutionFeatures[NodeResolutionFeatures["AllFeatures"] = 30] = "AllFeatures";
|
|
35224
|
-
NodeResolutionFeatures[NodeResolutionFeatures["
|
|
35176
|
+
NodeResolutionFeatures[NodeResolutionFeatures["Node16Default"] = 30] = "Node16Default";
|
|
35225
35177
|
NodeResolutionFeatures[NodeResolutionFeatures["NodeNextDefault"] = 30] = "NodeNextDefault";
|
|
35226
35178
|
NodeResolutionFeatures[NodeResolutionFeatures["EsmMode"] = 32] = "EsmMode";
|
|
35227
35179
|
})(NodeResolutionFeatures || (NodeResolutionFeatures = {}));
|
|
35228
|
-
function
|
|
35229
|
-
return nodeNextModuleNameResolverWorker(NodeResolutionFeatures.
|
|
35180
|
+
function node16ModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {
|
|
35181
|
+
return nodeNextModuleNameResolverWorker(NodeResolutionFeatures.Node16Default, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode);
|
|
35230
35182
|
}
|
|
35231
35183
|
function nodeNextModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {
|
|
35232
35184
|
return nodeNextModuleNameResolverWorker(NodeResolutionFeatures.NodeNextDefault, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode);
|
|
@@ -35269,6 +35221,7 @@ var ts;
|
|
|
35269
35221
|
if (compilerOptions.noDtsResolution) {
|
|
35270
35222
|
conditions.pop();
|
|
35271
35223
|
}
|
|
35224
|
+
var diagnostics = [];
|
|
35272
35225
|
var state = {
|
|
35273
35226
|
compilerOptions: compilerOptions,
|
|
35274
35227
|
host: host,
|
|
@@ -35277,9 +35230,11 @@ var ts;
|
|
|
35277
35230
|
packageJsonInfoCache: cache,
|
|
35278
35231
|
features: features,
|
|
35279
35232
|
conditions: conditions,
|
|
35233
|
+
requestContainingDirectory: containingDirectory,
|
|
35234
|
+
reportDiagnostic: function (diag) { return void diagnostics.push(diag); },
|
|
35280
35235
|
};
|
|
35281
35236
|
var result = ts.forEach(extensions, function (ext) { return tryResolve(ext); });
|
|
35282
|
-
return createResolvedModuleWithFailedLookupLocations((_a = result === null || result === void 0 ? void 0 : result.value) === null || _a === void 0 ? void 0 : _a.resolved, (_b = result === null || result === void 0 ? void 0 : result.value) === null || _b === void 0 ? void 0 : _b.isExternalLibraryImport, failedLookupLocations, state.resultFromCache);
|
|
35237
|
+
return createResolvedModuleWithFailedLookupLocations((_a = result === null || result === void 0 ? void 0 : result.value) === null || _a === void 0 ? void 0 : _a.resolved, (_b = result === null || result === void 0 ? void 0 : result.value) === null || _b === void 0 ? void 0 : _b.isExternalLibraryImport, failedLookupLocations, diagnostics, state.resultFromCache);
|
|
35283
35238
|
function tryResolve(extensions) {
|
|
35284
35239
|
var loader = function (extensions, candidate, onlyRecordFailures, state) { return nodeLoadModuleByRelativeName(extensions, candidate, onlyRecordFailures, state, true); };
|
|
35285
35240
|
var resolved = tryLoadModuleUsingOptionalResolutionSettings(extensions, moduleName, containingDirectory, loader, state);
|
|
@@ -35421,9 +35376,9 @@ var ts;
|
|
|
35421
35376
|
}
|
|
35422
35377
|
}
|
|
35423
35378
|
function loadJSOrExactTSFileName(extensions, candidate, onlyRecordFailures, state) {
|
|
35424
|
-
if ((extensions === Extensions.TypeScript || extensions === Extensions.DtsOnly) && ts.
|
|
35379
|
+
if ((extensions === Extensions.TypeScript || extensions === Extensions.DtsOnly) && ts.fileExtensionIsOneOf(candidate, ts.supportedTSExtensionsFlat)) {
|
|
35425
35380
|
var result = tryFile(candidate, onlyRecordFailures, state);
|
|
35426
|
-
return result !== undefined ? { path: candidate, ext: ts.
|
|
35381
|
+
return result !== undefined ? { path: candidate, ext: ts.tryExtractTSExtension(candidate) } : undefined;
|
|
35427
35382
|
}
|
|
35428
35383
|
return loadModuleFromFileNoImplicitExtensions(extensions, candidate, onlyRecordFailures, state);
|
|
35429
35384
|
}
|
|
@@ -35540,6 +35495,8 @@ var ts;
|
|
|
35540
35495
|
packageJsonInfoCache: cache === null || cache === void 0 ? void 0 : cache.getPackageJsonInfoCache(),
|
|
35541
35496
|
conditions: ["node", "require", "types"],
|
|
35542
35497
|
features: features,
|
|
35498
|
+
requestContainingDirectory: packageJsonInfo.packageDirectory,
|
|
35499
|
+
reportDiagnostic: ts.noop
|
|
35543
35500
|
};
|
|
35544
35501
|
var requireResolution = loadNodeModuleFromDirectoryWorker(extensions, packageJsonInfo.packageDirectory, false, requireState, packageJsonInfo.packageJsonContent, packageJsonInfo.versionPaths);
|
|
35545
35502
|
entrypoints = ts.append(entrypoints, requireResolution === null || requireResolution === void 0 ? void 0 : requireResolution.path);
|
|
@@ -35619,6 +35576,8 @@ var ts;
|
|
|
35619
35576
|
packageJsonInfoCache: packageJsonInfoCache,
|
|
35620
35577
|
features: 0,
|
|
35621
35578
|
conditions: [],
|
|
35579
|
+
requestContainingDirectory: undefined,
|
|
35580
|
+
reportDiagnostic: ts.noop
|
|
35622
35581
|
};
|
|
35623
35582
|
var parts = ts.getPathComponents(fileName);
|
|
35624
35583
|
parts.pop();
|
|
@@ -35893,7 +35852,6 @@ var ts;
|
|
|
35893
35852
|
function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirectedReference, moduleName, scope, isImports) {
|
|
35894
35853
|
return loadModuleFromTargetImportOrExport;
|
|
35895
35854
|
function loadModuleFromTargetImportOrExport(target, subpath, pattern) {
|
|
35896
|
-
var _a, _b;
|
|
35897
35855
|
if (typeof target === "string") {
|
|
35898
35856
|
if (!pattern && subpath.length > 0 && !ts.endsWith(target, "/")) {
|
|
35899
35857
|
if (state.traceEnabled) {
|
|
@@ -35928,13 +35886,16 @@ var ts;
|
|
|
35928
35886
|
}
|
|
35929
35887
|
return toSearchResult(undefined);
|
|
35930
35888
|
}
|
|
35931
|
-
var finalPath =
|
|
35889
|
+
var finalPath = toAbsolutePath(pattern ? resolvedTarget.replace(/\*/g, subpath) : resolvedTarget + subpath);
|
|
35890
|
+
var inputLink = tryLoadInputFileForPath(finalPath, subpath, ts.combinePaths(scope.packageDirectory, "package.json"), isImports);
|
|
35891
|
+
if (inputLink)
|
|
35892
|
+
return inputLink;
|
|
35932
35893
|
return toSearchResult(withPackageId(scope, loadJSOrExactTSFileName(extensions, finalPath, false, state)));
|
|
35933
35894
|
}
|
|
35934
35895
|
else if (typeof target === "object" && target !== null) {
|
|
35935
35896
|
if (!Array.isArray(target)) {
|
|
35936
|
-
for (var _i = 0,
|
|
35937
|
-
var key =
|
|
35897
|
+
for (var _i = 0, _a = ts.getOwnKeys(target); _i < _a.length; _i++) {
|
|
35898
|
+
var key = _a[_i];
|
|
35938
35899
|
if (key === "default" || state.conditions.indexOf(key) >= 0 || isApplicableVersionedTypesKey(state.conditions, key)) {
|
|
35939
35900
|
var subTarget = target[key];
|
|
35940
35901
|
var result = loadModuleFromTargetImportOrExport(subTarget, subpath, pattern);
|
|
@@ -35952,8 +35913,8 @@ var ts;
|
|
|
35952
35913
|
}
|
|
35953
35914
|
return toSearchResult(undefined);
|
|
35954
35915
|
}
|
|
35955
|
-
for (var
|
|
35956
|
-
var elem = target_2[
|
|
35916
|
+
for (var _b = 0, target_2 = target; _b < target_2.length; _b++) {
|
|
35917
|
+
var elem = target_2[_b];
|
|
35957
35918
|
var result = loadModuleFromTargetImportOrExport(elem, subpath, pattern);
|
|
35958
35919
|
if (result) {
|
|
35959
35920
|
return result;
|
|
@@ -35971,6 +35932,94 @@ var ts;
|
|
|
35971
35932
|
trace(state.host, ts.Diagnostics.package_json_scope_0_has_invalid_type_for_target_of_specifier_1, scope.packageDirectory, moduleName);
|
|
35972
35933
|
}
|
|
35973
35934
|
return toSearchResult(undefined);
|
|
35935
|
+
function toAbsolutePath(path) {
|
|
35936
|
+
var _a, _b;
|
|
35937
|
+
if (path === undefined)
|
|
35938
|
+
return path;
|
|
35939
|
+
return ts.hostGetCanonicalFileName({ useCaseSensitiveFileNames: useCaseSensitiveFileNames })(ts.getNormalizedAbsolutePath(path, (_b = (_a = state.host).getCurrentDirectory) === null || _b === void 0 ? void 0 : _b.call(_a)));
|
|
35940
|
+
}
|
|
35941
|
+
function combineDirectoryPath(root, dir) {
|
|
35942
|
+
return ts.ensureTrailingDirectorySeparator(ts.combinePaths(root, dir));
|
|
35943
|
+
}
|
|
35944
|
+
function useCaseSensitiveFileNames() {
|
|
35945
|
+
return !state.host.useCaseSensitiveFileNames ? true :
|
|
35946
|
+
typeof state.host.useCaseSensitiveFileNames === "boolean" ? state.host.useCaseSensitiveFileNames :
|
|
35947
|
+
state.host.useCaseSensitiveFileNames();
|
|
35948
|
+
}
|
|
35949
|
+
function tryLoadInputFileForPath(finalPath, entry, packagePath, isImports) {
|
|
35950
|
+
var _a, _b, _c, _d;
|
|
35951
|
+
if ((extensions === Extensions.TypeScript || extensions === Extensions.JavaScript || extensions === Extensions.Json)
|
|
35952
|
+
&& (state.compilerOptions.declarationDir || state.compilerOptions.outDir)
|
|
35953
|
+
&& finalPath.indexOf("/node_modules/") === -1
|
|
35954
|
+
&& (state.compilerOptions.configFile ? ts.startsWith(toAbsolutePath(state.compilerOptions.configFile.fileName), scope.packageDirectory) : true)) {
|
|
35955
|
+
var getCanonicalFileName = ts.hostGetCanonicalFileName({ useCaseSensitiveFileNames: useCaseSensitiveFileNames });
|
|
35956
|
+
var commonSourceDirGuesses = [];
|
|
35957
|
+
if (state.compilerOptions.rootDir || (state.compilerOptions.composite && state.compilerOptions.configFilePath)) {
|
|
35958
|
+
var commonDir = toAbsolutePath(ts.getCommonSourceDirectory(state.compilerOptions, function () { return []; }, ((_b = (_a = state.host).getCurrentDirectory) === null || _b === void 0 ? void 0 : _b.call(_a)) || "", getCanonicalFileName));
|
|
35959
|
+
commonSourceDirGuesses.push(commonDir);
|
|
35960
|
+
}
|
|
35961
|
+
else if (state.requestContainingDirectory) {
|
|
35962
|
+
var requestingFile_1 = toAbsolutePath(ts.combinePaths(state.requestContainingDirectory, "index.ts"));
|
|
35963
|
+
var commonDir = toAbsolutePath(ts.getCommonSourceDirectory(state.compilerOptions, function () { return [requestingFile_1, toAbsolutePath(packagePath)]; }, ((_d = (_c = state.host).getCurrentDirectory) === null || _d === void 0 ? void 0 : _d.call(_c)) || "", getCanonicalFileName));
|
|
35964
|
+
commonSourceDirGuesses.push(commonDir);
|
|
35965
|
+
var fragment = ts.ensureTrailingDirectorySeparator(commonDir);
|
|
35966
|
+
while (fragment && fragment.length > 1) {
|
|
35967
|
+
var parts = ts.getPathComponents(fragment);
|
|
35968
|
+
parts.pop();
|
|
35969
|
+
var commonDir_1 = ts.getPathFromPathComponents(parts);
|
|
35970
|
+
commonSourceDirGuesses.unshift(commonDir_1);
|
|
35971
|
+
fragment = ts.ensureTrailingDirectorySeparator(commonDir_1);
|
|
35972
|
+
}
|
|
35973
|
+
}
|
|
35974
|
+
if (commonSourceDirGuesses.length > 1) {
|
|
35975
|
+
state.reportDiagnostic(ts.createCompilerDiagnostic(isImports
|
|
35976
|
+
? ts.Diagnostics.The_project_root_is_ambiguous_but_is_required_to_resolve_import_map_entry_0_in_file_1_Supply_the_rootDir_compiler_option_to_disambiguate
|
|
35977
|
+
: ts.Diagnostics.The_project_root_is_ambiguous_but_is_required_to_resolve_export_map_entry_0_in_file_1_Supply_the_rootDir_compiler_option_to_disambiguate, entry === "" ? "." : entry, packagePath));
|
|
35978
|
+
}
|
|
35979
|
+
for (var _i = 0, commonSourceDirGuesses_1 = commonSourceDirGuesses; _i < commonSourceDirGuesses_1.length; _i++) {
|
|
35980
|
+
var commonSourceDirGuess = commonSourceDirGuesses_1[_i];
|
|
35981
|
+
var candidateDirectories = getOutputDirectoriesForBaseDirectory(commonSourceDirGuess);
|
|
35982
|
+
for (var _e = 0, candidateDirectories_1 = candidateDirectories; _e < candidateDirectories_1.length; _e++) {
|
|
35983
|
+
var candidateDir = candidateDirectories_1[_e];
|
|
35984
|
+
if (ts.startsWith(finalPath, candidateDir)) {
|
|
35985
|
+
var pathFragment = finalPath.slice(candidateDir.length + 1);
|
|
35986
|
+
var possibleInputBase = ts.combinePaths(commonSourceDirGuess, pathFragment);
|
|
35987
|
+
var jsAndDtsExtensions = [".mjs", ".cjs", ".js", ".json", ".d.mts", ".d.cts", ".d.ts"];
|
|
35988
|
+
for (var _f = 0, jsAndDtsExtensions_1 = jsAndDtsExtensions; _f < jsAndDtsExtensions_1.length; _f++) {
|
|
35989
|
+
var ext = jsAndDtsExtensions_1[_f];
|
|
35990
|
+
if (ts.fileExtensionIs(possibleInputBase, ext)) {
|
|
35991
|
+
var inputExts = ts.getPossibleOriginalInputExtensionForExtension(possibleInputBase);
|
|
35992
|
+
for (var _g = 0, inputExts_1 = inputExts; _g < inputExts_1.length; _g++) {
|
|
35993
|
+
var possibleExt = inputExts_1[_g];
|
|
35994
|
+
var possibleInputWithInputExtension = ts.changeAnyExtension(possibleInputBase, possibleExt, ext, !useCaseSensitiveFileNames());
|
|
35995
|
+
if ((extensions === Extensions.TypeScript && ts.hasJSFileExtension(possibleInputWithInputExtension)) ||
|
|
35996
|
+
(extensions === Extensions.JavaScript && ts.hasTSFileExtension(possibleInputWithInputExtension))) {
|
|
35997
|
+
continue;
|
|
35998
|
+
}
|
|
35999
|
+
if (state.host.fileExists(possibleInputWithInputExtension)) {
|
|
36000
|
+
return toSearchResult(withPackageId(scope, loadJSOrExactTSFileName(extensions, possibleInputWithInputExtension, false, state)));
|
|
36001
|
+
}
|
|
36002
|
+
}
|
|
36003
|
+
}
|
|
36004
|
+
}
|
|
36005
|
+
}
|
|
36006
|
+
}
|
|
36007
|
+
}
|
|
36008
|
+
}
|
|
36009
|
+
return undefined;
|
|
36010
|
+
function getOutputDirectoriesForBaseDirectory(commonSourceDirGuess) {
|
|
36011
|
+
var _a, _b;
|
|
36012
|
+
var currentDir = state.compilerOptions.configFile ? ((_b = (_a = state.host).getCurrentDirectory) === null || _b === void 0 ? void 0 : _b.call(_a)) || "" : commonSourceDirGuess;
|
|
36013
|
+
var candidateDirectories = [];
|
|
36014
|
+
if (state.compilerOptions.declarationDir) {
|
|
36015
|
+
candidateDirectories.push(toAbsolutePath(combineDirectoryPath(currentDir, state.compilerOptions.declarationDir)));
|
|
36016
|
+
}
|
|
36017
|
+
if (state.compilerOptions.outDir && state.compilerOptions.outDir !== state.compilerOptions.declarationDir) {
|
|
36018
|
+
candidateDirectories.push(toAbsolutePath(combineDirectoryPath(currentDir, state.compilerOptions.outDir)));
|
|
36019
|
+
}
|
|
36020
|
+
return candidateDirectories;
|
|
36021
|
+
}
|
|
36022
|
+
}
|
|
35974
36023
|
}
|
|
35975
36024
|
}
|
|
35976
36025
|
function isApplicableVersionedTypesKey(conditions, key) {
|
|
@@ -36145,10 +36194,11 @@ var ts;
|
|
|
36145
36194
|
function classicNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference) {
|
|
36146
36195
|
var traceEnabled = isTraceEnabled(compilerOptions, host);
|
|
36147
36196
|
var failedLookupLocations = [];
|
|
36148
|
-
var state = { compilerOptions: compilerOptions, host: host, traceEnabled: traceEnabled, failedLookupLocations: failedLookupLocations, packageJsonInfoCache: cache, features: NodeResolutionFeatures.None, conditions: [] };
|
|
36149
36197
|
var containingDirectory = ts.getDirectoryPath(containingFile);
|
|
36198
|
+
var diagnostics = [];
|
|
36199
|
+
var state = { compilerOptions: compilerOptions, host: host, traceEnabled: traceEnabled, failedLookupLocations: failedLookupLocations, packageJsonInfoCache: cache, features: NodeResolutionFeatures.None, conditions: [], requestContainingDirectory: containingDirectory, reportDiagnostic: function (diag) { return void diagnostics.push(diag); } };
|
|
36150
36200
|
var resolved = tryResolve(Extensions.TypeScript) || tryResolve(Extensions.JavaScript);
|
|
36151
|
-
return createResolvedModuleWithFailedLookupLocations(resolved && resolved.value, false, failedLookupLocations, state.resultFromCache);
|
|
36201
|
+
return createResolvedModuleWithFailedLookupLocations(resolved && resolved.value, false, failedLookupLocations, diagnostics, state.resultFromCache);
|
|
36152
36202
|
function tryResolve(extensions) {
|
|
36153
36203
|
var resolvedUsingSettings = tryLoadModuleUsingOptionalResolutionSettings(extensions, moduleName, containingDirectory, loadModuleFromFileNoPackageId, state);
|
|
36154
36204
|
if (resolvedUsingSettings) {
|
|
@@ -36184,9 +36234,10 @@ var ts;
|
|
|
36184
36234
|
trace(host, ts.Diagnostics.Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using_cache_location_2, projectName, moduleName, globalCache);
|
|
36185
36235
|
}
|
|
36186
36236
|
var failedLookupLocations = [];
|
|
36187
|
-
var
|
|
36237
|
+
var diagnostics = [];
|
|
36238
|
+
var state = { compilerOptions: compilerOptions, host: host, traceEnabled: traceEnabled, failedLookupLocations: failedLookupLocations, packageJsonInfoCache: packageJsonInfoCache, features: NodeResolutionFeatures.None, conditions: [], requestContainingDirectory: undefined, reportDiagnostic: function (diag) { return void diagnostics.push(diag); } };
|
|
36188
36239
|
var resolved = loadModuleFromImmediateNodeModulesDirectory(Extensions.DtsOnly, moduleName, globalCache, state, false, undefined, undefined);
|
|
36189
|
-
return createResolvedModuleWithFailedLookupLocations(resolved, true, failedLookupLocations, state.resultFromCache);
|
|
36240
|
+
return createResolvedModuleWithFailedLookupLocations(resolved, true, failedLookupLocations, diagnostics, state.resultFromCache);
|
|
36190
36241
|
}
|
|
36191
36242
|
ts.loadModuleFromGlobalCache = loadModuleFromGlobalCache;
|
|
36192
36243
|
function toSearchResult(value) {
|
|
@@ -41797,16 +41848,13 @@ var ts;
|
|
|
41797
41848
|
if (resolvedModule.isExternalLibraryImport && !ts.resolutionExtensionIsTSOrJson(resolvedModule.extension)) {
|
|
41798
41849
|
errorOnImplicitAnyModule(false, errorNode, resolvedModule, moduleReference);
|
|
41799
41850
|
}
|
|
41800
|
-
if (ts.getEmitModuleResolutionKind(compilerOptions) === ts.ModuleResolutionKind.
|
|
41851
|
+
if (ts.getEmitModuleResolutionKind(compilerOptions) === ts.ModuleResolutionKind.Node16 || ts.getEmitModuleResolutionKind(compilerOptions) === ts.ModuleResolutionKind.NodeNext) {
|
|
41801
41852
|
var isSyncImport = (currentSourceFile.impliedNodeFormat === ts.ModuleKind.CommonJS && !ts.findAncestor(location, ts.isImportCall)) || !!ts.findAncestor(location, ts.isImportEqualsDeclaration);
|
|
41802
41853
|
var overrideClauseHost = ts.findAncestor(location, function (l) { return ts.isImportTypeNode(l) || ts.isExportDeclaration(l) || ts.isImportDeclaration(l); });
|
|
41803
41854
|
var overrideClause = overrideClauseHost && ts.isImportTypeNode(overrideClauseHost) ? (_g = overrideClauseHost.assertions) === null || _g === void 0 ? void 0 : _g.assertClause : overrideClauseHost === null || overrideClauseHost === void 0 ? void 0 : overrideClauseHost.assertClause;
|
|
41804
41855
|
if (isSyncImport && sourceFile.impliedNodeFormat === ts.ModuleKind.ESNext && !ts.getResolutionModeOverrideForClause(overrideClause)) {
|
|
41805
41856
|
error(errorNode, ts.Diagnostics.Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_cannot_be_imported_synchronously_Use_dynamic_import_instead, moduleReference);
|
|
41806
41857
|
}
|
|
41807
|
-
if (mode === ts.ModuleKind.ESNext && compilerOptions.resolveJsonModule && resolvedModule.extension === ".json") {
|
|
41808
|
-
error(errorNode, ts.Diagnostics.JSON_imports_are_experimental_in_ES_module_mode_imports);
|
|
41809
|
-
}
|
|
41810
41858
|
}
|
|
41811
41859
|
return getMergedSymbol(sourceFile.symbol);
|
|
41812
41860
|
}
|
|
@@ -41850,7 +41898,7 @@ var ts;
|
|
|
41850
41898
|
var tsExtension = ts.tryExtractTSExtension(moduleReference);
|
|
41851
41899
|
var isExtensionlessRelativePathImport = ts.pathIsRelative(moduleReference) && !ts.hasExtension(moduleReference);
|
|
41852
41900
|
var moduleResolutionKind = ts.getEmitModuleResolutionKind(compilerOptions);
|
|
41853
|
-
var
|
|
41901
|
+
var resolutionIsNode16OrNext = moduleResolutionKind === ts.ModuleResolutionKind.Node16 ||
|
|
41854
41902
|
moduleResolutionKind === ts.ModuleResolutionKind.NodeNext;
|
|
41855
41903
|
if (tsExtension) {
|
|
41856
41904
|
var diag = ts.Diagnostics.An_import_path_cannot_end_with_a_0_extension_Consider_importing_1_instead;
|
|
@@ -41867,17 +41915,17 @@ var ts;
|
|
|
41867
41915
|
ts.hasJsonModuleEmitEnabled(compilerOptions)) {
|
|
41868
41916
|
error(errorNode, ts.Diagnostics.Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension, moduleReference);
|
|
41869
41917
|
}
|
|
41870
|
-
else if (mode === ts.ModuleKind.ESNext &&
|
|
41918
|
+
else if (mode === ts.ModuleKind.ESNext && resolutionIsNode16OrNext && isExtensionlessRelativePathImport) {
|
|
41871
41919
|
var absoluteRef_1 = ts.getNormalizedAbsolutePath(moduleReference, ts.getDirectoryPath(currentSourceFile.path));
|
|
41872
41920
|
var suggestedExt = (_h = suggestedExtensions.find(function (_a) {
|
|
41873
41921
|
var actualExt = _a[0], _importExt = _a[1];
|
|
41874
41922
|
return host.fileExists(absoluteRef_1 + actualExt);
|
|
41875
41923
|
})) === null || _h === void 0 ? void 0 : _h[1];
|
|
41876
41924
|
if (suggestedExt) {
|
|
41877
|
-
error(errorNode, ts.Diagnostics.
|
|
41925
|
+
error(errorNode, ts.Diagnostics.Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_node16_or_nodenext_Did_you_mean_0, moduleReference + suggestedExt);
|
|
41878
41926
|
}
|
|
41879
41927
|
else {
|
|
41880
|
-
error(errorNode, ts.Diagnostics.
|
|
41928
|
+
error(errorNode, ts.Diagnostics.Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_node16_or_nodenext_Consider_adding_an_extension_to_the_import_path);
|
|
41881
41929
|
}
|
|
41882
41930
|
}
|
|
41883
41931
|
else {
|
|
@@ -42262,8 +42310,9 @@ var ts;
|
|
|
42262
42310
|
function getExportSymbolOfValueSymbolIfExported(symbol) {
|
|
42263
42311
|
return getMergedSymbol(symbol && (symbol.flags & 1048576) !== 0 && symbol.exportSymbol || symbol);
|
|
42264
42312
|
}
|
|
42265
|
-
function symbolIsValue(symbol) {
|
|
42266
|
-
return !!(symbol.flags & 111551 ||
|
|
42313
|
+
function symbolIsValue(symbol, includeTypeOnlyMembers) {
|
|
42314
|
+
return !!(symbol.flags & 111551 ||
|
|
42315
|
+
symbol.flags & 2097152 && resolveAlias(symbol).flags & 111551 && (includeTypeOnlyMembers || !getTypeOnlyAliasDeclaration(symbol)));
|
|
42267
42316
|
}
|
|
42268
42317
|
function findConstructorDeclaration(node) {
|
|
42269
42318
|
var members = node.members;
|
|
@@ -43974,7 +44023,7 @@ var ts;
|
|
|
43974
44023
|
var targetFile = ts.getSourceFileOfModule(chain[0]);
|
|
43975
44024
|
var specifier = void 0;
|
|
43976
44025
|
var assertion = void 0;
|
|
43977
|
-
if (ts.getEmitModuleResolutionKind(compilerOptions) === ts.ModuleResolutionKind.
|
|
44026
|
+
if (ts.getEmitModuleResolutionKind(compilerOptions) === ts.ModuleResolutionKind.Node16 || ts.getEmitModuleResolutionKind(compilerOptions) === ts.ModuleResolutionKind.NodeNext) {
|
|
43978
44027
|
if ((targetFile === null || targetFile === void 0 ? void 0 : targetFile.impliedNodeFormat) === ts.ModuleKind.ESNext && targetFile.impliedNodeFormat !== (contextFile === null || contextFile === void 0 ? void 0 : contextFile.impliedNodeFormat)) {
|
|
43979
44028
|
specifier = getSpecifierForModuleSymbol(chain[0], context, ts.ModuleKind.ESNext);
|
|
43980
44029
|
assertion = ts.factory.createImportTypeAssertionContainer(ts.factory.createAssertClause(ts.factory.createNodeArray([
|
|
@@ -43987,7 +44036,7 @@ var ts;
|
|
|
43987
44036
|
}
|
|
43988
44037
|
if (!(context.flags & 67108864) && ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.Classic && specifier.indexOf("/node_modules/") >= 0) {
|
|
43989
44038
|
var oldSpecifier = specifier;
|
|
43990
|
-
if (ts.getEmitModuleResolutionKind(compilerOptions) === ts.ModuleResolutionKind.
|
|
44039
|
+
if (ts.getEmitModuleResolutionKind(compilerOptions) === ts.ModuleResolutionKind.Node16 || ts.getEmitModuleResolutionKind(compilerOptions) === ts.ModuleResolutionKind.NodeNext) {
|
|
43991
44040
|
var swappedMode = (contextFile === null || contextFile === void 0 ? void 0 : contextFile.impliedNodeFormat) === ts.ModuleKind.ESNext ? ts.ModuleKind.CommonJS : ts.ModuleKind.ESNext;
|
|
43992
44041
|
specifier = getSpecifierForModuleSymbol(chain[0], context, swappedMode);
|
|
43993
44042
|
if (specifier.indexOf("/node_modules/") >= 0) {
|
|
@@ -48031,7 +48080,8 @@ var ts;
|
|
|
48031
48080
|
if (symbol === globalThisSymbol) {
|
|
48032
48081
|
var varsOnly_1 = new ts.Map();
|
|
48033
48082
|
members.forEach(function (p) {
|
|
48034
|
-
|
|
48083
|
+
var _a;
|
|
48084
|
+
if (!(p.flags & 418) && !(p.flags & 512 && ((_a = p.declarations) === null || _a === void 0 ? void 0 : _a.length) && ts.every(p.declarations, ts.isAmbientModule))) {
|
|
48035
48085
|
varsOnly_1.set(p.escapedName, p);
|
|
48036
48086
|
}
|
|
48037
48087
|
});
|
|
@@ -48898,12 +48948,12 @@ var ts;
|
|
|
48898
48948
|
}
|
|
48899
48949
|
return errorInfo;
|
|
48900
48950
|
}
|
|
48901
|
-
function getPropertyOfType(type, name, skipObjectFunctionPropertyAugment) {
|
|
48951
|
+
function getPropertyOfType(type, name, skipObjectFunctionPropertyAugment, includeTypeOnlyMembers) {
|
|
48902
48952
|
type = getReducedApparentType(type);
|
|
48903
48953
|
if (type.flags & 524288) {
|
|
48904
48954
|
var resolved = resolveStructuredTypeMembers(type);
|
|
48905
48955
|
var symbol = resolved.members.get(name);
|
|
48906
|
-
if (symbol && symbolIsValue(symbol)) {
|
|
48956
|
+
if (symbol && symbolIsValue(symbol, includeTypeOnlyMembers)) {
|
|
48907
48957
|
return symbol;
|
|
48908
48958
|
}
|
|
48909
48959
|
if (skipObjectFunctionPropertyAugment)
|
|
@@ -51888,7 +51938,7 @@ var ts;
|
|
|
51888
51938
|
var meaning = nameStack.length ? 1920 : targetMeaning;
|
|
51889
51939
|
var mergedResolvedSymbol = getMergedSymbol(resolveSymbol(currentNamespace));
|
|
51890
51940
|
var next = node.isTypeOf
|
|
51891
|
-
? getPropertyOfType(getTypeOfSymbol(mergedResolvedSymbol), current.escapedText)
|
|
51941
|
+
? getPropertyOfType(getTypeOfSymbol(mergedResolvedSymbol), current.escapedText, false, true)
|
|
51892
51942
|
: getSymbol(getExportsOfSymbol(mergedResolvedSymbol), current.escapedText, meaning);
|
|
51893
51943
|
if (!next) {
|
|
51894
51944
|
error(current, ts.Diagnostics.Namespace_0_has_no_exported_member_1, getFullyQualifiedName(currentNamespace), ts.declarationNameToString(current));
|
|
@@ -53965,7 +54015,6 @@ var ts;
|
|
|
53965
54015
|
return 0;
|
|
53966
54016
|
}
|
|
53967
54017
|
function reportErrorResults(originalSource, originalTarget, source, target, headMessage) {
|
|
53968
|
-
var _a, _b;
|
|
53969
54018
|
var sourceHasBase = !!getSingleBaseForNonAugmentingSubtype(originalSource);
|
|
53970
54019
|
var targetHasBase = !!getSingleBaseForNonAugmentingSubtype(originalTarget);
|
|
53971
54020
|
source = (originalSource.aliasSymbol || sourceHasBase) ? originalSource : source;
|
|
@@ -54004,9 +54053,6 @@ var ts;
|
|
|
54004
54053
|
return;
|
|
54005
54054
|
}
|
|
54006
54055
|
reportRelationError(headMessage, source, target);
|
|
54007
|
-
if (strictNullChecks && source.flags & 8650752 && ((_b = (_a = source.symbol) === null || _a === void 0 ? void 0 : _a.declarations) === null || _b === void 0 ? void 0 : _b[0]) && !getConstraintOfType(source) && isRelatedTo(emptyObjectType, extractTypesOfKind(target, ~67108864))) {
|
|
54008
|
-
associateRelatedInfo(ts.createDiagnosticForNode(source.symbol.declarations[0], ts.Diagnostics.This_type_parameter_probably_needs_an_extends_object_constraint));
|
|
54009
|
-
}
|
|
54010
54056
|
}
|
|
54011
54057
|
function traceUnionsOrIntersectionsTooLarge(source, target) {
|
|
54012
54058
|
if (!ts.tracing) {
|
|
@@ -54393,6 +54439,18 @@ var ts;
|
|
|
54393
54439
|
}
|
|
54394
54440
|
return result;
|
|
54395
54441
|
}
|
|
54442
|
+
function removeIntersectionMembersWithoutKeys(type) {
|
|
54443
|
+
if (!(type.flags & 2097152)) {
|
|
54444
|
+
return type;
|
|
54445
|
+
}
|
|
54446
|
+
return getIntersectionType(ts.filter(type.types, function (t) { return !isKeylessType(t); }));
|
|
54447
|
+
}
|
|
54448
|
+
function isKeylessType(type) {
|
|
54449
|
+
return !!(getIndexType(type).flags & 131072);
|
|
54450
|
+
}
|
|
54451
|
+
function isConditionalFilteringKeylessTypes(type) {
|
|
54452
|
+
return !!(type.flags & 16777216) && type.root.isDistributive && everyType(type.extendsType, isKeylessType);
|
|
54453
|
+
}
|
|
54396
54454
|
function structuredTypeRelatedTo(source, target, reportErrors, intersectionState) {
|
|
54397
54455
|
if (intersectionState & 4) {
|
|
54398
54456
|
return propertiesRelatedTo(source, target, reportErrors, undefined, 0);
|
|
@@ -54485,13 +54543,44 @@ var ts;
|
|
|
54485
54543
|
}
|
|
54486
54544
|
}
|
|
54487
54545
|
}
|
|
54546
|
+
if (relation === comparableRelation && sourceFlags & 262144) {
|
|
54547
|
+
var constraint = getConstraintOfTypeParameter(source);
|
|
54548
|
+
if (constraint && hasNonCircularBaseConstraint(source)) {
|
|
54549
|
+
while (constraint && constraint.flags & 262144) {
|
|
54550
|
+
if (result = isRelatedTo(constraint, target, 1, false)) {
|
|
54551
|
+
return result;
|
|
54552
|
+
}
|
|
54553
|
+
constraint = getConstraintOfTypeParameter(constraint);
|
|
54554
|
+
}
|
|
54555
|
+
}
|
|
54556
|
+
return 0;
|
|
54557
|
+
}
|
|
54488
54558
|
}
|
|
54489
54559
|
else if (targetFlags & 4194304) {
|
|
54490
54560
|
var targetType_1 = target.type;
|
|
54491
54561
|
if (sourceFlags & 4194304) {
|
|
54492
|
-
|
|
54562
|
+
var sourceType = source.type;
|
|
54563
|
+
if (result = isRelatedTo(targetType_1, sourceType, 3, false)) {
|
|
54493
54564
|
return result;
|
|
54494
54565
|
}
|
|
54566
|
+
while (isConditionalFilteringKeylessTypes(sourceType)) {
|
|
54567
|
+
var lastSource = sourceType;
|
|
54568
|
+
sourceType = getDefaultConstraintOfConditionalType(sourceType);
|
|
54569
|
+
if (sourceType === lastSource) {
|
|
54570
|
+
break;
|
|
54571
|
+
}
|
|
54572
|
+
if (result = isRelatedTo(targetType_1, sourceType, 3, false)) {
|
|
54573
|
+
return result;
|
|
54574
|
+
}
|
|
54575
|
+
var simplifiedSource = sourceType;
|
|
54576
|
+
sourceType = removeIntersectionMembersWithoutKeys(sourceType);
|
|
54577
|
+
if (sourceType === simplifiedSource) {
|
|
54578
|
+
continue;
|
|
54579
|
+
}
|
|
54580
|
+
if (result = isRelatedTo(targetType_1, sourceType, 3, false)) {
|
|
54581
|
+
return result;
|
|
54582
|
+
}
|
|
54583
|
+
}
|
|
54495
54584
|
}
|
|
54496
54585
|
if (isTupleType(targetType_1)) {
|
|
54497
54586
|
if (result = isRelatedTo(source, getKnownKeysOfTupleType(targetType_1), 2, reportErrors)) {
|
|
@@ -54635,18 +54724,18 @@ var ts;
|
|
|
54635
54724
|
}
|
|
54636
54725
|
if (sourceFlags & 8650752) {
|
|
54637
54726
|
if (!(sourceFlags & 8388608 && targetFlags & 8388608)) {
|
|
54638
|
-
var constraint = getConstraintOfType(source);
|
|
54639
|
-
if (!
|
|
54727
|
+
var constraint = getConstraintOfType(source) || unknownType;
|
|
54728
|
+
if (!getConstraintOfType(source) || (sourceFlags & 262144 && constraint.flags & 1)) {
|
|
54640
54729
|
if (result = isRelatedTo(emptyObjectType, extractTypesOfKind(target, ~67108864), 3)) {
|
|
54641
54730
|
resetErrorInfo(saveErrorInfo);
|
|
54642
54731
|
return result;
|
|
54643
54732
|
}
|
|
54644
54733
|
}
|
|
54645
|
-
|
|
54734
|
+
if (result = isRelatedTo(constraint, target, 1, false, undefined, intersectionState)) {
|
|
54646
54735
|
resetErrorInfo(saveErrorInfo);
|
|
54647
54736
|
return result;
|
|
54648
54737
|
}
|
|
54649
|
-
else if (
|
|
54738
|
+
else if (result = isRelatedTo(getTypeWithThisArgument(constraint, source), target, 1, reportErrors && constraint !== unknownType && !(targetFlags & sourceFlags & 262144), undefined, intersectionState)) {
|
|
54650
54739
|
resetErrorInfo(saveErrorInfo);
|
|
54651
54740
|
return result;
|
|
54652
54741
|
}
|
|
@@ -56085,13 +56174,21 @@ var ts;
|
|
|
56085
56174
|
}
|
|
56086
56175
|
return result;
|
|
56087
56176
|
}
|
|
56177
|
+
function getApparentIntersectionTypes(type) {
|
|
56178
|
+
var apparent = getApparentType(type);
|
|
56179
|
+
if (apparent.flags & 2097152) {
|
|
56180
|
+
return apparent.types;
|
|
56181
|
+
}
|
|
56182
|
+
return [apparent];
|
|
56183
|
+
}
|
|
56088
56184
|
function getFalsyFlags(type) {
|
|
56089
56185
|
return type.flags & 1048576 ? getFalsyFlagsOfTypes(type.types) :
|
|
56090
|
-
type.flags &
|
|
56091
|
-
type.flags &
|
|
56092
|
-
type.flags &
|
|
56093
|
-
type.flags &
|
|
56094
|
-
type.flags &
|
|
56186
|
+
type.flags & 2097152 ? ts.reduceLeft(getApparentIntersectionTypes(type), function (memo, type) { return memo | getFalsyFlags(type); }, 0) :
|
|
56187
|
+
type.flags & 128 ? type.value === "" ? 128 : 0 :
|
|
56188
|
+
type.flags & 256 ? type.value === 0 ? 256 : 0 :
|
|
56189
|
+
type.flags & 2048 ? isZeroBigInt(type) ? 2048 : 0 :
|
|
56190
|
+
type.flags & 512 ? (type === falseType || type === regularFalseType) ? 512 : 0 :
|
|
56191
|
+
type.flags & 117724;
|
|
56095
56192
|
}
|
|
56096
56193
|
function removeDefinitelyFalsyTypes(type) {
|
|
56097
56194
|
return getFalsyFlags(type) & 117632 ?
|
|
@@ -59179,7 +59276,9 @@ var ts;
|
|
|
59179
59276
|
case "function":
|
|
59180
59277
|
return type.flags & 1 ? type : globalFunctionType;
|
|
59181
59278
|
case "object":
|
|
59182
|
-
|
|
59279
|
+
var isUnknownish = type.flags & 2 ||
|
|
59280
|
+
(type.flags & 58982400 && (getBaseConstraintOfType(type) || unknownType).flags & 2);
|
|
59281
|
+
return isUnknownish ? getUnionType([nonPrimitiveType, nullType]) : type;
|
|
59183
59282
|
default:
|
|
59184
59283
|
return typeofTypesByName.get(text);
|
|
59185
59284
|
}
|
|
@@ -59541,7 +59640,7 @@ var ts;
|
|
|
59541
59640
|
if (ts.isBindingElement(declaration) && !declaration.initializer && !declaration.dotDotDotToken && declaration.parent.elements.length >= 2) {
|
|
59542
59641
|
var parent = declaration.parent.parent;
|
|
59543
59642
|
if (parent.kind === 254 && ts.getCombinedNodeFlags(declaration) & 2 || parent.kind === 164) {
|
|
59544
|
-
var links = getNodeLinks(
|
|
59643
|
+
var links = getNodeLinks(parent);
|
|
59545
59644
|
if (!(links.flags & 268435456)) {
|
|
59546
59645
|
links.flags |= 268435456;
|
|
59547
59646
|
var parentType = getTypeForBindingElementParent(parent, 0);
|
|
@@ -60500,7 +60599,25 @@ var ts;
|
|
|
60500
60599
|
}
|
|
60501
60600
|
function getTypeOfPropertyOfContextualType(type, name, nameType) {
|
|
60502
60601
|
return mapType(type, function (t) {
|
|
60503
|
-
|
|
60602
|
+
if (t.flags & 2097152) {
|
|
60603
|
+
var intersection = t;
|
|
60604
|
+
var newTypes = ts.mapDefined(intersection.types, getTypeOfConcretePropertyOfContextualType);
|
|
60605
|
+
if (newTypes.length > 0) {
|
|
60606
|
+
return getIntersectionType(newTypes);
|
|
60607
|
+
}
|
|
60608
|
+
newTypes = ts.mapDefined(intersection.types, getTypeOfApplicableIndexInfoOfContextualType);
|
|
60609
|
+
if (newTypes.length > 0) {
|
|
60610
|
+
return getIntersectionType(newTypes);
|
|
60611
|
+
}
|
|
60612
|
+
return undefined;
|
|
60613
|
+
}
|
|
60614
|
+
var concretePropertyType = getTypeOfConcretePropertyOfContextualType(t);
|
|
60615
|
+
if (concretePropertyType) {
|
|
60616
|
+
return concretePropertyType;
|
|
60617
|
+
}
|
|
60618
|
+
return getTypeOfApplicableIndexInfoOfContextualType(t);
|
|
60619
|
+
}, true);
|
|
60620
|
+
function getTypeOfConcretePropertyOfContextualType(t) {
|
|
60504
60621
|
if (isGenericMappedType(t) && !t.declaration.nameType) {
|
|
60505
60622
|
var constraint = getConstraintTypeFromMappedType(t);
|
|
60506
60623
|
var constraintOfConstraint = getBaseConstraintOfType(constraint) || constraint;
|
|
@@ -60508,8 +60625,9 @@ var ts;
|
|
|
60508
60625
|
if (isTypeAssignableTo(propertyNameType, constraintOfConstraint)) {
|
|
60509
60626
|
return substituteIndexedMappedType(t, propertyNameType);
|
|
60510
60627
|
}
|
|
60628
|
+
return undefined;
|
|
60511
60629
|
}
|
|
60512
|
-
|
|
60630
|
+
if (t.flags & 3670016) {
|
|
60513
60631
|
var prop = getPropertyOfType(t, name);
|
|
60514
60632
|
if (prop) {
|
|
60515
60633
|
return isCircularMappedProperty(prop) ? undefined : getTypeOfSymbol(prop);
|
|
@@ -60520,10 +60638,16 @@ var ts;
|
|
|
60520
60638
|
return restType;
|
|
60521
60639
|
}
|
|
60522
60640
|
}
|
|
60523
|
-
return (_a = findApplicableIndexInfo(getIndexInfosOfStructuredType(t), nameType || getStringLiteralType(ts.unescapeLeadingUnderscores(name)))) === null || _a === void 0 ? void 0 : _a.type;
|
|
60524
60641
|
}
|
|
60525
60642
|
return undefined;
|
|
60526
|
-
}
|
|
60643
|
+
}
|
|
60644
|
+
function getTypeOfApplicableIndexInfoOfContextualType(t) {
|
|
60645
|
+
var _a;
|
|
60646
|
+
if (!(t.flags & 3670016)) {
|
|
60647
|
+
return undefined;
|
|
60648
|
+
}
|
|
60649
|
+
return (_a = findApplicableIndexInfo(getIndexInfosOfStructuredType(t), nameType || getStringLiteralType(ts.unescapeLeadingUnderscores(name)))) === null || _a === void 0 ? void 0 : _a.type;
|
|
60650
|
+
}
|
|
60527
60651
|
}
|
|
60528
60652
|
function getContextualTypeForObjectLiteralMethod(node, contextFlags) {
|
|
60529
60653
|
ts.Debug.assert(ts.isObjectLiteralMethod(node));
|
|
@@ -62110,9 +62234,8 @@ var ts;
|
|
|
62110
62234
|
markAliasReferenced(parentSymbol, node);
|
|
62111
62235
|
}
|
|
62112
62236
|
return isErrorType(apparentType) ? errorType : apparentType;
|
|
62113
|
-
;
|
|
62114
62237
|
}
|
|
62115
|
-
prop = getPropertyOfType(apparentType, right.escapedText);
|
|
62238
|
+
prop = getPropertyOfType(apparentType, right.escapedText, false, node.kind === 161);
|
|
62116
62239
|
}
|
|
62117
62240
|
if (ts.isIdentifier(left) && parentSymbol && (compilerOptions.isolatedModules ||
|
|
62118
62241
|
!(prop && (isConstEnumOrConstEnumOnlyModule(prop) || prop.flags & 8 && node.parent.kind === 299)) ||
|
|
@@ -64510,13 +64633,13 @@ var ts;
|
|
|
64510
64633
|
}
|
|
64511
64634
|
}
|
|
64512
64635
|
function checkImportMetaProperty(node) {
|
|
64513
|
-
if (moduleKind === ts.ModuleKind.
|
|
64636
|
+
if (moduleKind === ts.ModuleKind.Node16 || moduleKind === ts.ModuleKind.NodeNext) {
|
|
64514
64637
|
if (ts.getSourceFileOfNode(node).impliedNodeFormat !== ts.ModuleKind.ESNext) {
|
|
64515
64638
|
error(node, ts.Diagnostics.The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output);
|
|
64516
64639
|
}
|
|
64517
64640
|
}
|
|
64518
64641
|
else if (moduleKind < ts.ModuleKind.ES2020 && moduleKind !== ts.ModuleKind.System) {
|
|
64519
|
-
error(node, ts.Diagnostics.
|
|
64642
|
+
error(node, ts.Diagnostics.The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system_node16_or_nodenext);
|
|
64520
64643
|
}
|
|
64521
64644
|
var file = ts.getSourceFileOfNode(node);
|
|
64522
64645
|
ts.Debug.assert(!!(file.flags & 4194304), "Containing file is missing import meta node flag.");
|
|
@@ -65348,15 +65471,28 @@ var ts;
|
|
|
65348
65471
|
if (!hasParseDiagnostics(sourceFile)) {
|
|
65349
65472
|
var span = void 0;
|
|
65350
65473
|
if (!ts.isEffectiveExternalModule(sourceFile, compilerOptions)) {
|
|
65351
|
-
|
|
65352
|
-
span = ts.getSpanOfTokenAtPosition(sourceFile, node.pos);
|
|
65474
|
+
span !== null && span !== void 0 ? span : (span = ts.getSpanOfTokenAtPosition(sourceFile, node.pos));
|
|
65353
65475
|
var diagnostic = ts.createFileDiagnostic(sourceFile, span.start, span.length, ts.Diagnostics.await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module);
|
|
65354
65476
|
diagnostics.add(diagnostic);
|
|
65355
65477
|
}
|
|
65356
|
-
|
|
65357
|
-
|
|
65358
|
-
|
|
65359
|
-
|
|
65478
|
+
switch (moduleKind) {
|
|
65479
|
+
case ts.ModuleKind.Node16:
|
|
65480
|
+
case ts.ModuleKind.NodeNext:
|
|
65481
|
+
if (sourceFile.impliedNodeFormat === ts.ModuleKind.CommonJS) {
|
|
65482
|
+
span !== null && span !== void 0 ? span : (span = ts.getSpanOfTokenAtPosition(sourceFile, node.pos));
|
|
65483
|
+
diagnostics.add(ts.createFileDiagnostic(sourceFile, span.start, span.length, ts.Diagnostics.The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level));
|
|
65484
|
+
break;
|
|
65485
|
+
}
|
|
65486
|
+
case ts.ModuleKind.ES2022:
|
|
65487
|
+
case ts.ModuleKind.ESNext:
|
|
65488
|
+
case ts.ModuleKind.System:
|
|
65489
|
+
if (languageVersion >= 4) {
|
|
65490
|
+
break;
|
|
65491
|
+
}
|
|
65492
|
+
default:
|
|
65493
|
+
span !== null && span !== void 0 ? span : (span = ts.getSpanOfTokenAtPosition(sourceFile, node.pos));
|
|
65494
|
+
diagnostics.add(ts.createFileDiagnostic(sourceFile, span.start, span.length, ts.Diagnostics.Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher));
|
|
65495
|
+
break;
|
|
65360
65496
|
}
|
|
65361
65497
|
}
|
|
65362
65498
|
}
|
|
@@ -67557,8 +67693,8 @@ var ts;
|
|
|
67557
67693
|
if (node.assertions) {
|
|
67558
67694
|
var override = ts.getResolutionModeOverrideForClause(node.assertions.assertClause, grammarErrorOnNode);
|
|
67559
67695
|
if (override) {
|
|
67560
|
-
if (ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.
|
|
67561
|
-
grammarErrorOnNode(node.assertions.assertClause, ts.Diagnostics.
|
|
67696
|
+
if (ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.Node16 && ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.NodeNext) {
|
|
67697
|
+
grammarErrorOnNode(node.assertions.assertClause, ts.Diagnostics.Resolution_modes_are_only_supported_when_moduleResolution_is_node16_or_nodenext);
|
|
67562
67698
|
}
|
|
67563
67699
|
}
|
|
67564
67700
|
}
|
|
@@ -67888,7 +68024,7 @@ var ts;
|
|
|
67888
68024
|
var promisedType = getPromisedTypeOfPromise(type, errorNode);
|
|
67889
68025
|
return promisedType && getAwaitedType(promisedType, errorNode, diagnosticMessage, arg0);
|
|
67890
68026
|
}
|
|
67891
|
-
function getPromisedTypeOfPromise(type, errorNode) {
|
|
68027
|
+
function getPromisedTypeOfPromise(type, errorNode, thisTypeForErrorOut) {
|
|
67892
68028
|
if (isTypeAny(type)) {
|
|
67893
68029
|
return undefined;
|
|
67894
68030
|
}
|
|
@@ -67913,7 +68049,29 @@ var ts;
|
|
|
67913
68049
|
}
|
|
67914
68050
|
return undefined;
|
|
67915
68051
|
}
|
|
67916
|
-
var
|
|
68052
|
+
var thisTypeForError;
|
|
68053
|
+
var candidates;
|
|
68054
|
+
for (var _i = 0, thenSignatures_1 = thenSignatures; _i < thenSignatures_1.length; _i++) {
|
|
68055
|
+
var thenSignature = thenSignatures_1[_i];
|
|
68056
|
+
var thisType = getThisTypeOfSignature(thenSignature);
|
|
68057
|
+
if (thisType && thisType !== voidType && !isTypeRelatedTo(type, thisType, subtypeRelation)) {
|
|
68058
|
+
thisTypeForError = thisType;
|
|
68059
|
+
}
|
|
68060
|
+
else {
|
|
68061
|
+
candidates = ts.append(candidates, thenSignature);
|
|
68062
|
+
}
|
|
68063
|
+
}
|
|
68064
|
+
if (!candidates) {
|
|
68065
|
+
ts.Debug.assertIsDefined(thisTypeForError);
|
|
68066
|
+
if (thisTypeForErrorOut) {
|
|
68067
|
+
thisTypeForErrorOut.value = thisTypeForError;
|
|
68068
|
+
}
|
|
68069
|
+
if (errorNode) {
|
|
68070
|
+
error(errorNode, ts.Diagnostics.The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1, typeToString(type), typeToString(thisTypeForError));
|
|
68071
|
+
}
|
|
68072
|
+
return undefined;
|
|
68073
|
+
}
|
|
68074
|
+
var onfulfilledParameterType = getTypeWithFacts(getUnionType(ts.map(candidates, getTypeOfFirstParameterOfSignature)), 2097152);
|
|
67917
68075
|
if (isTypeAny(onfulfilledParameterType)) {
|
|
67918
68076
|
return undefined;
|
|
67919
68077
|
}
|
|
@@ -67990,7 +68148,8 @@ var ts;
|
|
|
67990
68148
|
var mapper = errorNode ? function (constituentType) { return getAwaitedTypeNoAlias(constituentType, errorNode, diagnosticMessage, arg0); } : getAwaitedTypeNoAlias;
|
|
67991
68149
|
return typeAsAwaitable.awaitedTypeOfType = mapType(type, mapper);
|
|
67992
68150
|
}
|
|
67993
|
-
var
|
|
68151
|
+
var thisTypeForErrorOut = { value: undefined };
|
|
68152
|
+
var promisedType = getPromisedTypeOfPromise(type, undefined, thisTypeForErrorOut);
|
|
67994
68153
|
if (promisedType) {
|
|
67995
68154
|
if (type.id === promisedType.id || awaitedTypeStack.lastIndexOf(promisedType.id) >= 0) {
|
|
67996
68155
|
if (errorNode) {
|
|
@@ -68009,7 +68168,12 @@ var ts;
|
|
|
68009
68168
|
if (isThenableType(type)) {
|
|
68010
68169
|
if (errorNode) {
|
|
68011
68170
|
ts.Debug.assertIsDefined(diagnosticMessage);
|
|
68012
|
-
|
|
68171
|
+
var chain = void 0;
|
|
68172
|
+
if (thisTypeForErrorOut.value) {
|
|
68173
|
+
chain = ts.chainDiagnosticMessages(chain, ts.Diagnostics.The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1, typeToString(type), typeToString(thisTypeForErrorOut.value));
|
|
68174
|
+
}
|
|
68175
|
+
chain = ts.chainDiagnosticMessages(chain, diagnosticMessage, arg0);
|
|
68176
|
+
diagnostics.add(ts.createDiagnosticForNodeFromMessageChain(errorNode, chain));
|
|
68013
68177
|
}
|
|
68014
68178
|
return undefined;
|
|
68015
68179
|
}
|
|
@@ -68727,7 +68891,7 @@ var ts;
|
|
|
68727
68891
|
});
|
|
68728
68892
|
}
|
|
68729
68893
|
function checkCollisionWithRequireExportsInGeneratedCode(node, name) {
|
|
68730
|
-
if (moduleKind >= ts.ModuleKind.ES2015 && !(moduleKind >= ts.ModuleKind.
|
|
68894
|
+
if (moduleKind >= ts.ModuleKind.ES2015 && !(moduleKind >= ts.ModuleKind.Node16 && ts.getSourceFileOfNode(node).impliedNodeFormat === ts.ModuleKind.CommonJS)) {
|
|
68731
68895
|
return;
|
|
68732
68896
|
}
|
|
68733
68897
|
if (!name || !needCollisionCheckForIdentifier(node, name, "require") && !needCollisionCheckForIdentifier(node, name, "exports")) {
|
|
@@ -71177,8 +71341,11 @@ var ts;
|
|
|
71177
71341
|
var validForTypeAssertions = ts.isExclusivelyTypeOnlyImportOrExport(declaration);
|
|
71178
71342
|
var override = ts.getResolutionModeOverrideForClause(declaration.assertClause, validForTypeAssertions ? grammarErrorOnNode : undefined);
|
|
71179
71343
|
if (validForTypeAssertions && override) {
|
|
71180
|
-
if (ts.
|
|
71181
|
-
|
|
71344
|
+
if (!ts.isNightly()) {
|
|
71345
|
+
grammarErrorOnNode(declaration.assertClause, ts.Diagnostics.Resolution_mode_assertions_are_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next);
|
|
71346
|
+
}
|
|
71347
|
+
if (ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.Node16 && ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.NodeNext) {
|
|
71348
|
+
return grammarErrorOnNode(declaration.assertClause, ts.Diagnostics.Resolution_modes_are_only_supported_when_moduleResolution_is_node16_or_nodenext);
|
|
71182
71349
|
}
|
|
71183
71350
|
return;
|
|
71184
71351
|
}
|
|
@@ -72383,7 +72550,7 @@ var ts;
|
|
|
72383
72550
|
}
|
|
72384
72551
|
if (ts.isDeclaration(node)) {
|
|
72385
72552
|
var symbol = getSymbolOfNode(node);
|
|
72386
|
-
return getTypeOfSymbol(symbol);
|
|
72553
|
+
return symbol ? getTypeOfSymbol(symbol) : errorType;
|
|
72387
72554
|
}
|
|
72388
72555
|
if (isDeclarationNameOrImportPropertyName(node)) {
|
|
72389
72556
|
var symbol = getSymbolAtLocation(node);
|
|
@@ -74070,8 +74237,22 @@ var ts;
|
|
|
74070
74237
|
if (!ts.isEffectiveExternalModule(sourceFile, compilerOptions)) {
|
|
74071
74238
|
diagnostics.add(ts.createDiagnosticForNode(forInOrOfStatement.awaitModifier, ts.Diagnostics.for_await_loops_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module));
|
|
74072
74239
|
}
|
|
74073
|
-
|
|
74074
|
-
|
|
74240
|
+
switch (moduleKind) {
|
|
74241
|
+
case ts.ModuleKind.Node16:
|
|
74242
|
+
case ts.ModuleKind.NodeNext:
|
|
74243
|
+
if (sourceFile.impliedNodeFormat === ts.ModuleKind.CommonJS) {
|
|
74244
|
+
diagnostics.add(ts.createDiagnosticForNode(forInOrOfStatement.awaitModifier, ts.Diagnostics.The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level));
|
|
74245
|
+
break;
|
|
74246
|
+
}
|
|
74247
|
+
case ts.ModuleKind.ES2022:
|
|
74248
|
+
case ts.ModuleKind.ESNext:
|
|
74249
|
+
case ts.ModuleKind.System:
|
|
74250
|
+
if (languageVersion >= 4) {
|
|
74251
|
+
break;
|
|
74252
|
+
}
|
|
74253
|
+
default:
|
|
74254
|
+
diagnostics.add(ts.createDiagnosticForNode(forInOrOfStatement.awaitModifier, ts.Diagnostics.Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher));
|
|
74255
|
+
break;
|
|
74075
74256
|
}
|
|
74076
74257
|
}
|
|
74077
74258
|
}
|
|
@@ -74703,7 +74884,7 @@ var ts;
|
|
|
74703
74884
|
}
|
|
74704
74885
|
function checkGrammarImportCallExpression(node) {
|
|
74705
74886
|
if (moduleKind === ts.ModuleKind.ES2015) {
|
|
74706
|
-
return grammarErrorOnNode(node, ts.Diagnostics.
|
|
74887
|
+
return grammarErrorOnNode(node, ts.Diagnostics.Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd_system_umd_node16_or_nodenext);
|
|
74707
74888
|
}
|
|
74708
74889
|
if (node.typeArguments) {
|
|
74709
74890
|
return grammarErrorOnNode(node, ts.Diagnostics.This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot_have_type_arguments);
|
|
@@ -74713,7 +74894,7 @@ var ts;
|
|
|
74713
74894
|
checkGrammarForDisallowedTrailingComma(nodeArguments);
|
|
74714
74895
|
if (nodeArguments.length > 1) {
|
|
74715
74896
|
var assertionArgument = nodeArguments[1];
|
|
74716
|
-
return grammarErrorOnNode(assertionArgument, ts.Diagnostics.
|
|
74897
|
+
return grammarErrorOnNode(assertionArgument, ts.Diagnostics.Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_or_nodenext);
|
|
74717
74898
|
}
|
|
74718
74899
|
}
|
|
74719
74900
|
if (nodeArguments.length === 0 || nodeArguments.length > 2) {
|
|
@@ -81583,20 +81764,27 @@ var ts;
|
|
|
81583
81764
|
if (node === undefined) {
|
|
81584
81765
|
return factory.createTrue();
|
|
81585
81766
|
}
|
|
81586
|
-
|
|
81767
|
+
if (node.kind === 10) {
|
|
81587
81768
|
var singleQuote = node.singleQuote !== undefined ? node.singleQuote : !ts.isStringDoubleQuoted(node, currentSourceFile);
|
|
81588
81769
|
var literal = factory.createStringLiteral(tryDecodeEntities(node.text) || node.text, singleQuote);
|
|
81589
81770
|
return ts.setTextRange(literal, node);
|
|
81590
81771
|
}
|
|
81591
|
-
|
|
81772
|
+
if (node.kind === 288) {
|
|
81592
81773
|
if (node.expression === undefined) {
|
|
81593
81774
|
return factory.createTrue();
|
|
81594
81775
|
}
|
|
81595
81776
|
return ts.visitNode(node.expression, visitor, ts.isExpression);
|
|
81596
81777
|
}
|
|
81597
|
-
|
|
81598
|
-
return
|
|
81778
|
+
if (ts.isJsxElement(node)) {
|
|
81779
|
+
return visitJsxElement(node, false);
|
|
81780
|
+
}
|
|
81781
|
+
if (ts.isJsxSelfClosingElement(node)) {
|
|
81782
|
+
return visitJsxSelfClosingElement(node, false);
|
|
81783
|
+
}
|
|
81784
|
+
if (ts.isJsxFragment(node)) {
|
|
81785
|
+
return visitJsxFragment(node, false);
|
|
81599
81786
|
}
|
|
81787
|
+
return ts.Debug.failBadSyntaxKind(node);
|
|
81600
81788
|
}
|
|
81601
81789
|
function visitJsxText(node) {
|
|
81602
81790
|
var fixed = fixupWhitespaceAndDecodeEntities(node.text);
|
|
@@ -88812,24 +89000,34 @@ var ts;
|
|
|
88812
89000
|
}
|
|
88813
89001
|
function transformImportDeclaration(decl) {
|
|
88814
89002
|
if (!decl.importClause) {
|
|
88815
|
-
return factory.updateImportDeclaration(decl, undefined, decl.modifiers, decl.importClause, rewriteModuleSpecifier(decl, decl.moduleSpecifier),
|
|
89003
|
+
return factory.updateImportDeclaration(decl, undefined, decl.modifiers, decl.importClause, rewriteModuleSpecifier(decl, decl.moduleSpecifier), getResolutionModeOverrideForClauseInNightly(decl.assertClause));
|
|
88816
89004
|
}
|
|
88817
89005
|
var visibleDefaultBinding = decl.importClause && decl.importClause.name && resolver.isDeclarationVisible(decl.importClause) ? decl.importClause.name : undefined;
|
|
88818
89006
|
if (!decl.importClause.namedBindings) {
|
|
88819
|
-
return visibleDefaultBinding && factory.updateImportDeclaration(decl, undefined, decl.modifiers, factory.updateImportClause(decl.importClause, decl.importClause.isTypeOnly, visibleDefaultBinding, undefined), rewriteModuleSpecifier(decl, decl.moduleSpecifier),
|
|
89007
|
+
return visibleDefaultBinding && factory.updateImportDeclaration(decl, undefined, decl.modifiers, factory.updateImportClause(decl.importClause, decl.importClause.isTypeOnly, visibleDefaultBinding, undefined), rewriteModuleSpecifier(decl, decl.moduleSpecifier), getResolutionModeOverrideForClauseInNightly(decl.assertClause));
|
|
88820
89008
|
}
|
|
88821
89009
|
if (decl.importClause.namedBindings.kind === 268) {
|
|
88822
89010
|
var namedBindings = resolver.isDeclarationVisible(decl.importClause.namedBindings) ? decl.importClause.namedBindings : undefined;
|
|
88823
|
-
return visibleDefaultBinding || namedBindings ? factory.updateImportDeclaration(decl, undefined, decl.modifiers, factory.updateImportClause(decl.importClause, decl.importClause.isTypeOnly, visibleDefaultBinding, namedBindings), rewriteModuleSpecifier(decl, decl.moduleSpecifier),
|
|
89011
|
+
return visibleDefaultBinding || namedBindings ? factory.updateImportDeclaration(decl, undefined, decl.modifiers, factory.updateImportClause(decl.importClause, decl.importClause.isTypeOnly, visibleDefaultBinding, namedBindings), rewriteModuleSpecifier(decl, decl.moduleSpecifier), getResolutionModeOverrideForClauseInNightly(decl.assertClause)) : undefined;
|
|
88824
89012
|
}
|
|
88825
89013
|
var bindingList = ts.mapDefined(decl.importClause.namedBindings.elements, function (b) { return resolver.isDeclarationVisible(b) ? b : undefined; });
|
|
88826
89014
|
if ((bindingList && bindingList.length) || visibleDefaultBinding) {
|
|
88827
|
-
return factory.updateImportDeclaration(decl, undefined, decl.modifiers, factory.updateImportClause(decl.importClause, decl.importClause.isTypeOnly, visibleDefaultBinding, bindingList && bindingList.length ? factory.updateNamedImports(decl.importClause.namedBindings, bindingList) : undefined), rewriteModuleSpecifier(decl, decl.moduleSpecifier),
|
|
89015
|
+
return factory.updateImportDeclaration(decl, undefined, decl.modifiers, factory.updateImportClause(decl.importClause, decl.importClause.isTypeOnly, visibleDefaultBinding, bindingList && bindingList.length ? factory.updateNamedImports(decl.importClause.namedBindings, bindingList) : undefined), rewriteModuleSpecifier(decl, decl.moduleSpecifier), getResolutionModeOverrideForClauseInNightly(decl.assertClause));
|
|
88828
89016
|
}
|
|
88829
89017
|
if (resolver.isImportRequiredByAugmentation(decl)) {
|
|
88830
|
-
return factory.updateImportDeclaration(decl, undefined, decl.modifiers, undefined, rewriteModuleSpecifier(decl, decl.moduleSpecifier),
|
|
89018
|
+
return factory.updateImportDeclaration(decl, undefined, decl.modifiers, undefined, rewriteModuleSpecifier(decl, decl.moduleSpecifier), getResolutionModeOverrideForClauseInNightly(decl.assertClause));
|
|
88831
89019
|
}
|
|
88832
89020
|
}
|
|
89021
|
+
function getResolutionModeOverrideForClauseInNightly(assertClause) {
|
|
89022
|
+
var mode = ts.getResolutionModeOverrideForClause(assertClause);
|
|
89023
|
+
if (mode !== undefined) {
|
|
89024
|
+
if (!ts.isNightly()) {
|
|
89025
|
+
context.addDiagnostic(ts.createDiagnosticForNode(assertClause, ts.Diagnostics.Resolution_mode_assertions_are_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next));
|
|
89026
|
+
}
|
|
89027
|
+
return assertClause;
|
|
89028
|
+
}
|
|
89029
|
+
return undefined;
|
|
89030
|
+
}
|
|
88833
89031
|
function transformAndReplaceLatePaintedStatements(statements) {
|
|
88834
89032
|
while (ts.length(lateMarkedStatements)) {
|
|
88835
89033
|
var i = lateMarkedStatements.shift();
|
|
@@ -89487,7 +89685,7 @@ var ts;
|
|
|
89487
89685
|
return ts.transformECMAScriptModule;
|
|
89488
89686
|
case ts.ModuleKind.System:
|
|
89489
89687
|
return ts.transformSystemModule;
|
|
89490
|
-
case ts.ModuleKind.
|
|
89688
|
+
case ts.ModuleKind.Node16:
|
|
89491
89689
|
case ts.ModuleKind.NodeNext:
|
|
89492
89690
|
return ts.transformNodeModule;
|
|
89493
89691
|
default:
|
|
@@ -90216,8 +90414,7 @@ var ts;
|
|
|
90216
90414
|
return;
|
|
90217
90415
|
}
|
|
90218
90416
|
var version = ts.version;
|
|
90219
|
-
|
|
90220
|
-
ts.writeFile(host, emitterDiagnostics, buildInfoPath, getBuildInfoText(buildInfo), false, undefined, { buildInfo: buildInfo });
|
|
90417
|
+
ts.writeFile(host, emitterDiagnostics, buildInfoPath, getBuildInfoText({ bundle: bundle, program: program, version: version }), false);
|
|
90221
90418
|
}
|
|
90222
90419
|
function emitJsFileOrBundle(sourceFileOrBundle, jsFilePath, sourceMapFilePath, relativeToBuildInfo) {
|
|
90223
90420
|
if (!sourceFileOrBundle || emitOnlyDtsFiles || !jsFilePath) {
|
|
@@ -90358,17 +90555,12 @@ var ts;
|
|
|
90358
90555
|
if (sourceMapFilePath) {
|
|
90359
90556
|
var sourceMap = sourceMapGenerator.toString();
|
|
90360
90557
|
ts.writeFile(host, emitterDiagnostics, sourceMapFilePath, sourceMap, false, sourceFiles);
|
|
90361
|
-
if (printer.bundleFileInfo)
|
|
90362
|
-
printer.bundleFileInfo.mapHash = ts.BuilderState.computeSignature(sourceMap, ts.maybeBind(host, host.createHash));
|
|
90363
90558
|
}
|
|
90364
90559
|
}
|
|
90365
90560
|
else {
|
|
90366
90561
|
writer.writeLine();
|
|
90367
90562
|
}
|
|
90368
|
-
|
|
90369
|
-
ts.writeFile(host, emitterDiagnostics, jsFilePath, text, !!compilerOptions.emitBOM, sourceFiles, { sourceMapUrlPos: sourceMapUrlPos });
|
|
90370
|
-
if (printer.bundleFileInfo)
|
|
90371
|
-
printer.bundleFileInfo.hash = ts.BuilderState.computeSignature(text, ts.maybeBind(host, host.createHash));
|
|
90563
|
+
ts.writeFile(host, emitterDiagnostics, jsFilePath, writer.getText(), !!compilerOptions.emitBOM, sourceFiles, { sourceMapUrlPos: sourceMapUrlPos });
|
|
90372
90564
|
writer.clear();
|
|
90373
90565
|
}
|
|
90374
90566
|
function shouldEmitSourceMaps(mapOptions, sourceFileOrBundle) {
|
|
@@ -90493,50 +90685,30 @@ var ts;
|
|
|
90493
90685
|
});
|
|
90494
90686
|
}
|
|
90495
90687
|
function emitUsingBuildInfo(config, host, getCommandLine, customTransformers) {
|
|
90496
|
-
var createHash = ts.maybeBind(host, host.createHash);
|
|
90497
90688
|
var _a = getOutputPathsForBundle(config.options, false), buildInfoPath = _a.buildInfoPath, jsFilePath = _a.jsFilePath, sourceMapFilePath = _a.sourceMapFilePath, declarationFilePath = _a.declarationFilePath, declarationMapPath = _a.declarationMapPath;
|
|
90498
|
-
var
|
|
90499
|
-
if (
|
|
90500
|
-
var hostBuildInfo = host.getBuildInfo(buildInfoPath, config.options.configFilePath);
|
|
90501
|
-
if (!hostBuildInfo)
|
|
90502
|
-
return buildInfoPath;
|
|
90503
|
-
buildInfo = hostBuildInfo;
|
|
90504
|
-
}
|
|
90505
|
-
else {
|
|
90506
|
-
var buildInfoText = host.readFile(buildInfoPath);
|
|
90507
|
-
if (!buildInfoText)
|
|
90508
|
-
return buildInfoPath;
|
|
90509
|
-
buildInfo = getBuildInfo(buildInfoText);
|
|
90510
|
-
}
|
|
90511
|
-
if (!buildInfo.bundle || !buildInfo.bundle.js || (declarationFilePath && !buildInfo.bundle.dts))
|
|
90689
|
+
var buildInfoText = host.readFile(ts.Debug.checkDefined(buildInfoPath));
|
|
90690
|
+
if (!buildInfoText)
|
|
90512
90691
|
return buildInfoPath;
|
|
90513
90692
|
var jsFileText = host.readFile(ts.Debug.checkDefined(jsFilePath));
|
|
90514
90693
|
if (!jsFileText)
|
|
90515
90694
|
return jsFilePath;
|
|
90516
|
-
if (ts.BuilderState.computeSignature(jsFileText, createHash) !== buildInfo.bundle.js.hash)
|
|
90517
|
-
return jsFilePath;
|
|
90518
90695
|
var sourceMapText = sourceMapFilePath && host.readFile(sourceMapFilePath);
|
|
90519
90696
|
if ((sourceMapFilePath && !sourceMapText) || config.options.inlineSourceMap)
|
|
90520
90697
|
return sourceMapFilePath || "inline sourcemap decoding";
|
|
90521
|
-
if (sourceMapFilePath && ts.BuilderState.computeSignature(sourceMapText, createHash) !== buildInfo.bundle.js.mapHash)
|
|
90522
|
-
return sourceMapFilePath;
|
|
90523
90698
|
var declarationText = declarationFilePath && host.readFile(declarationFilePath);
|
|
90524
90699
|
if (declarationFilePath && !declarationText)
|
|
90525
90700
|
return declarationFilePath;
|
|
90526
|
-
if (declarationFilePath && ts.BuilderState.computeSignature(declarationText, createHash) !== buildInfo.bundle.dts.hash)
|
|
90527
|
-
return declarationFilePath;
|
|
90528
90701
|
var declarationMapText = declarationMapPath && host.readFile(declarationMapPath);
|
|
90529
90702
|
if ((declarationMapPath && !declarationMapText) || config.options.inlineSourceMap)
|
|
90530
90703
|
return declarationMapPath || "inline sourcemap decoding";
|
|
90531
|
-
|
|
90532
|
-
|
|
90704
|
+
var buildInfo = getBuildInfo(buildInfoText);
|
|
90705
|
+
if (!buildInfo.bundle || !buildInfo.bundle.js || (declarationText && !buildInfo.bundle.dts))
|
|
90706
|
+
return buildInfoPath;
|
|
90533
90707
|
var buildInfoDirectory = ts.getDirectoryPath(ts.getNormalizedAbsolutePath(buildInfoPath, host.getCurrentDirectory()));
|
|
90534
90708
|
var ownPrependInput = ts.createInputFiles(jsFileText, declarationText, sourceMapFilePath, sourceMapText, declarationMapPath, declarationMapText, jsFilePath, declarationFilePath, buildInfoPath, buildInfo, true);
|
|
90535
90709
|
var outputFiles = [];
|
|
90536
90710
|
var prependNodes = ts.createPrependNodes(config.projectReferences, getCommandLine, function (f) { return host.readFile(f); });
|
|
90537
90711
|
var sourceFilesForJsEmit = createSourceFilesFromBundleBuildInfo(buildInfo.bundle, buildInfoDirectory, host);
|
|
90538
|
-
var changedDtsText;
|
|
90539
|
-
var changedDtsData;
|
|
90540
90712
|
var emitHost = {
|
|
90541
90713
|
getPrependNodes: ts.memoize(function () { return __spreadArray(__spreadArray([], prependNodes, true), [ownPrependInput], false); }),
|
|
90542
90714
|
getCanonicalFileName: host.getCanonicalFileName,
|
|
@@ -90552,7 +90724,7 @@ var ts;
|
|
|
90552
90724
|
getResolvedProjectReferenceToRedirect: ts.returnUndefined,
|
|
90553
90725
|
getProjectReferenceRedirect: ts.returnUndefined,
|
|
90554
90726
|
isSourceOfProjectReferenceRedirect: ts.returnFalse,
|
|
90555
|
-
writeFile: function (name, text, writeByteOrderMark
|
|
90727
|
+
writeFile: function (name, text, writeByteOrderMark) {
|
|
90556
90728
|
switch (name) {
|
|
90557
90729
|
case jsFilePath:
|
|
90558
90730
|
if (jsFileText === text)
|
|
@@ -90563,25 +90735,19 @@ var ts;
|
|
|
90563
90735
|
return;
|
|
90564
90736
|
break;
|
|
90565
90737
|
case buildInfoPath:
|
|
90566
|
-
var newBuildInfo =
|
|
90738
|
+
var newBuildInfo = getBuildInfo(text);
|
|
90567
90739
|
newBuildInfo.program = buildInfo.program;
|
|
90568
|
-
if (newBuildInfo.program && changedDtsText !== undefined && config.options.composite) {
|
|
90569
|
-
newBuildInfo.program.outSignature = ts.computeSignature(changedDtsText, changedDtsData, createHash);
|
|
90570
|
-
newBuildInfo.program.dtsChangeTime = ts.getCurrentTime(host).getTime();
|
|
90571
|
-
}
|
|
90572
90740
|
var _a = buildInfo.bundle, js = _a.js, dts = _a.dts, sourceFiles = _a.sourceFiles;
|
|
90573
90741
|
newBuildInfo.bundle.js.sources = js.sources;
|
|
90574
90742
|
if (dts) {
|
|
90575
90743
|
newBuildInfo.bundle.dts.sources = dts.sources;
|
|
90576
90744
|
}
|
|
90577
90745
|
newBuildInfo.bundle.sourceFiles = sourceFiles;
|
|
90578
|
-
outputFiles.push({ name: name, text: getBuildInfoText(newBuildInfo), writeByteOrderMark: writeByteOrderMark
|
|
90746
|
+
outputFiles.push({ name: name, text: getBuildInfoText(newBuildInfo), writeByteOrderMark: writeByteOrderMark });
|
|
90579
90747
|
return;
|
|
90580
90748
|
case declarationFilePath:
|
|
90581
90749
|
if (declarationText === text)
|
|
90582
90750
|
return;
|
|
90583
|
-
changedDtsText = text;
|
|
90584
|
-
changedDtsData = data;
|
|
90585
90751
|
break;
|
|
90586
90752
|
case declarationMapPath:
|
|
90587
90753
|
if (declarationMapText === text)
|
|
@@ -90600,7 +90766,6 @@ var ts;
|
|
|
90600
90766
|
getSourceFileFromReference: ts.returnUndefined,
|
|
90601
90767
|
redirectTargetsMap: ts.createMultiMap(),
|
|
90602
90768
|
getFileIncludeReasons: ts.notImplemented,
|
|
90603
|
-
createHash: createHash,
|
|
90604
90769
|
};
|
|
90605
90770
|
emitFiles(ts.notImplementedResolver, emitHost, undefined, ts.getTransformers(config.options, customTransformers));
|
|
90606
90771
|
return outputFiles;
|
|
@@ -95225,6 +95390,7 @@ var ts;
|
|
|
95225
95390
|
if (system === void 0) { system = ts.sys; }
|
|
95226
95391
|
var existingDirectories = new ts.Map();
|
|
95227
95392
|
var getCanonicalFileName = ts.createGetCanonicalFileName(system.useCaseSensitiveFileNames);
|
|
95393
|
+
var computeHash = ts.maybeBind(system, system.createHash) || ts.generateDjb2Hash;
|
|
95228
95394
|
function getSourceFile(fileName, languageVersionOrOptions, onError) {
|
|
95229
95395
|
var text;
|
|
95230
95396
|
try {
|
|
@@ -95254,7 +95420,7 @@ var ts;
|
|
|
95254
95420
|
function writeFile(fileName, data, writeByteOrderMark, onError) {
|
|
95255
95421
|
try {
|
|
95256
95422
|
ts.performance.mark("beforeIOWrite");
|
|
95257
|
-
ts.writeFileEnsuringDirectories(fileName, data, writeByteOrderMark, function (path, data, writeByteOrderMark) { return
|
|
95423
|
+
ts.writeFileEnsuringDirectories(fileName, data, writeByteOrderMark, function (path, data, writeByteOrderMark) { return writeFileWorker(path, data, writeByteOrderMark); }, function (path) { return (compilerHost.createDirectory || system.createDirectory)(path); }, function (path) { return directoryExists(path); });
|
|
95258
95424
|
ts.performance.mark("afterIOWrite");
|
|
95259
95425
|
ts.performance.measure("I/O Write", "beforeIOWrite", "afterIOWrite");
|
|
95260
95426
|
}
|
|
@@ -95264,6 +95430,34 @@ var ts;
|
|
|
95264
95430
|
}
|
|
95265
95431
|
}
|
|
95266
95432
|
}
|
|
95433
|
+
var outputFingerprints;
|
|
95434
|
+
function writeFileWorker(fileName, data, writeByteOrderMark) {
|
|
95435
|
+
if (!ts.isWatchSet(options) || !system.getModifiedTime) {
|
|
95436
|
+
system.writeFile(fileName, data, writeByteOrderMark);
|
|
95437
|
+
return;
|
|
95438
|
+
}
|
|
95439
|
+
if (!outputFingerprints) {
|
|
95440
|
+
outputFingerprints = new ts.Map();
|
|
95441
|
+
}
|
|
95442
|
+
var hash = computeHash(data);
|
|
95443
|
+
var mtimeBefore = system.getModifiedTime(fileName);
|
|
95444
|
+
if (mtimeBefore) {
|
|
95445
|
+
var fingerprint = outputFingerprints.get(fileName);
|
|
95446
|
+
if (fingerprint &&
|
|
95447
|
+
fingerprint.byteOrderMark === writeByteOrderMark &&
|
|
95448
|
+
fingerprint.hash === hash &&
|
|
95449
|
+
fingerprint.mtime.getTime() === mtimeBefore.getTime()) {
|
|
95450
|
+
return;
|
|
95451
|
+
}
|
|
95452
|
+
}
|
|
95453
|
+
system.writeFile(fileName, data, writeByteOrderMark);
|
|
95454
|
+
var mtimeAfter = system.getModifiedTime(fileName) || ts.missingFileModifiedTime;
|
|
95455
|
+
outputFingerprints.set(fileName, {
|
|
95456
|
+
hash: hash,
|
|
95457
|
+
byteOrderMark: writeByteOrderMark,
|
|
95458
|
+
mtime: mtimeAfter
|
|
95459
|
+
});
|
|
95460
|
+
}
|
|
95267
95461
|
function getDefaultLibLocation() {
|
|
95268
95462
|
return ts.getDirectoryPath(ts.normalizePath(system.getExecutingFilePath()));
|
|
95269
95463
|
}
|
|
@@ -95814,7 +96008,7 @@ var ts;
|
|
|
95814
96008
|
ts.getConfigFileParsingDiagnostics = getConfigFileParsingDiagnostics;
|
|
95815
96009
|
function getImpliedNodeFormatForFile(fileName, packageJsonInfoCache, host, options) {
|
|
95816
96010
|
switch (ts.getEmitModuleResolutionKind(options)) {
|
|
95817
|
-
case ts.ModuleResolutionKind.
|
|
96011
|
+
case ts.ModuleResolutionKind.Node16:
|
|
95818
96012
|
case ts.ModuleResolutionKind.NodeNext:
|
|
95819
96013
|
return ts.fileExtensionIsOneOf(fileName, [".d.mts", ".mts", ".mjs"]) ? ts.ModuleKind.ESNext :
|
|
95820
96014
|
ts.fileExtensionIsOneOf(fileName, [".d.cts", ".cts", ".cjs"]) ? ts.ModuleKind.CommonJS :
|
|
@@ -95865,7 +96059,6 @@ var ts;
|
|
|
95865
96059
|
ts.Diagnostics.A_rest_parameter_cannot_have_an_initializer.code,
|
|
95866
96060
|
ts.Diagnostics.A_rest_parameter_must_be_last_in_a_parameter_list.code,
|
|
95867
96061
|
ts.Diagnostics.A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma.code,
|
|
95868
|
-
ts.Diagnostics.A_return_statement_can_only_be_used_within_a_function_body.code,
|
|
95869
96062
|
ts.Diagnostics.A_return_statement_cannot_be_used_inside_a_class_static_block.code,
|
|
95870
96063
|
ts.Diagnostics.A_set_accessor_cannot_have_rest_parameter.code,
|
|
95871
96064
|
ts.Diagnostics.A_set_accessor_must_have_exactly_one_parameter.code,
|
|
@@ -96204,6 +96397,34 @@ var ts;
|
|
|
96204
96397
|
ts.performance.measure("Program", "beforeProgram", "afterProgram");
|
|
96205
96398
|
ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.pop();
|
|
96206
96399
|
return program;
|
|
96400
|
+
function addResolutionDiagnostics(list) {
|
|
96401
|
+
if (!list)
|
|
96402
|
+
return;
|
|
96403
|
+
for (var _i = 0, list_3 = list; _i < list_3.length; _i++) {
|
|
96404
|
+
var elem = list_3[_i];
|
|
96405
|
+
programDiagnostics.add(elem);
|
|
96406
|
+
}
|
|
96407
|
+
}
|
|
96408
|
+
function pullDiagnosticsFromCache(names, containingFile) {
|
|
96409
|
+
var _a;
|
|
96410
|
+
if (!moduleResolutionCache)
|
|
96411
|
+
return;
|
|
96412
|
+
var containingFileName = ts.getNormalizedAbsolutePath(containingFile.originalFileName, currentDirectory);
|
|
96413
|
+
var containingFileMode = !ts.isString(containingFile) ? containingFile.impliedNodeFormat : undefined;
|
|
96414
|
+
var containingDir = ts.getDirectoryPath(containingFileName);
|
|
96415
|
+
var redirectedReference = getRedirectReferenceForResolution(containingFile);
|
|
96416
|
+
var i = 0;
|
|
96417
|
+
for (var _i = 0, names_4 = names; _i < names_4.length; _i++) {
|
|
96418
|
+
var n = names_4[_i];
|
|
96419
|
+
var mode = typeof n === "string" ? getModeForResolutionAtIndex(containingFile, i) : getModeForFileReference(n, containingFileMode);
|
|
96420
|
+
var name = typeof n === "string" ? n : n.fileName;
|
|
96421
|
+
i++;
|
|
96422
|
+
if (ts.isExternalModuleNameRelative(name))
|
|
96423
|
+
continue;
|
|
96424
|
+
var diags = (_a = moduleResolutionCache.getOrCreateCacheForModuleName(name, mode, redirectedReference).get(containingDir)) === null || _a === void 0 ? void 0 : _a.resolutionDiagnostics;
|
|
96425
|
+
addResolutionDiagnostics(diags);
|
|
96426
|
+
}
|
|
96427
|
+
}
|
|
96207
96428
|
function resolveModuleNamesWorker(moduleNames, containingFile, reusedNames) {
|
|
96208
96429
|
if (!moduleNames.length)
|
|
96209
96430
|
return ts.emptyArray;
|
|
@@ -96215,6 +96436,7 @@ var ts;
|
|
|
96215
96436
|
ts.performance.mark("afterResolveModule");
|
|
96216
96437
|
ts.performance.measure("ResolveModule", "beforeResolveModule", "afterResolveModule");
|
|
96217
96438
|
ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.pop();
|
|
96439
|
+
pullDiagnosticsFromCache(moduleNames, containingFile);
|
|
96218
96440
|
return result;
|
|
96219
96441
|
}
|
|
96220
96442
|
function resolveTypeReferenceDirectiveNamesWorker(typeDirectiveNames, containingFile) {
|
|
@@ -96605,7 +96827,6 @@ var ts;
|
|
|
96605
96827
|
getSourceFileFromReference: function (file, ref) { return program.getSourceFileFromReference(file, ref); },
|
|
96606
96828
|
redirectTargetsMap: redirectTargetsMap,
|
|
96607
96829
|
getFileIncludeReasons: program.getFileIncludeReasons,
|
|
96608
|
-
createHash: ts.maybeBind(host, host.createHash),
|
|
96609
96830
|
};
|
|
96610
96831
|
}
|
|
96611
96832
|
function writeFile(fileName, text, writeByteOrderMark, onError, sourceFiles, data) {
|
|
@@ -97504,8 +97725,8 @@ var ts;
|
|
|
97504
97725
|
var fileName = ts.toFileNameLowerCase(ref.fileName);
|
|
97505
97726
|
ts.setResolvedTypeReferenceDirective(file, fileName, resolvedTypeReferenceDirective);
|
|
97506
97727
|
var mode = ref.resolutionMode || file.impliedNodeFormat;
|
|
97507
|
-
if (mode && ts.getEmitModuleResolutionKind(options) !== ts.ModuleResolutionKind.
|
|
97508
|
-
programDiagnostics.add(ts.createDiagnosticForRange(file, ref, ts.Diagnostics.
|
|
97728
|
+
if (mode && ts.getEmitModuleResolutionKind(options) !== ts.ModuleResolutionKind.Node16 && ts.getEmitModuleResolutionKind(options) !== ts.ModuleResolutionKind.NodeNext) {
|
|
97729
|
+
programDiagnostics.add(ts.createDiagnosticForRange(file, ref, ts.Diagnostics.Resolution_modes_are_only_supported_when_moduleResolution_is_node16_or_nodenext));
|
|
97509
97730
|
}
|
|
97510
97731
|
processTypeReferenceDirective(fileName, mode, resolvedTypeReferenceDirective, { kind: ts.FileIncludeKind.TypeReferenceDirective, file: file.path, index: index, });
|
|
97511
97732
|
}
|
|
@@ -97838,7 +98059,7 @@ var ts;
|
|
|
97838
98059
|
}
|
|
97839
98060
|
if (options.resolveJsonModule) {
|
|
97840
98061
|
if (ts.getEmitModuleResolutionKind(options) !== ts.ModuleResolutionKind.NodeJs &&
|
|
97841
|
-
ts.getEmitModuleResolutionKind(options) !== ts.ModuleResolutionKind.
|
|
98062
|
+
ts.getEmitModuleResolutionKind(options) !== ts.ModuleResolutionKind.Node16 &&
|
|
97842
98063
|
ts.getEmitModuleResolutionKind(options) !== ts.ModuleResolutionKind.NodeNext) {
|
|
97843
98064
|
createDiagnosticForOptionName(ts.Diagnostics.Option_resolveJsonModule_cannot_be_specified_without_node_module_resolution_strategy, "resolveJsonModule");
|
|
97844
98065
|
}
|
|
@@ -98022,7 +98243,7 @@ var ts;
|
|
|
98022
98243
|
break;
|
|
98023
98244
|
}
|
|
98024
98245
|
var matchedByInclude = ts.getMatchedIncludeSpec(program, fileName);
|
|
98025
|
-
if (!matchedByInclude)
|
|
98246
|
+
if (!matchedByInclude || !ts.isString(matchedByInclude))
|
|
98026
98247
|
return undefined;
|
|
98027
98248
|
configFileNode = ts.getTsConfigPropArrayElementValue(options.configFile, "include", matchedByInclude);
|
|
98028
98249
|
message = ts.Diagnostics.File_is_matched_by_include_pattern_specified_here;
|
|
@@ -98512,9 +98733,13 @@ var ts;
|
|
|
98512
98733
|
function createManyToManyPathMap() {
|
|
98513
98734
|
function create(forward, reverse, deleted) {
|
|
98514
98735
|
var map = {
|
|
98736
|
+
clone: function () { return create(new ts.Map(forward), new ts.Map(reverse), deleted && new ts.Set(deleted)); },
|
|
98737
|
+
forEach: function (fn) { return forward.forEach(fn); },
|
|
98515
98738
|
getKeys: function (v) { return reverse.get(v); },
|
|
98516
98739
|
getValues: function (k) { return forward.get(k); },
|
|
98740
|
+
hasKey: function (k) { return forward.has(k); },
|
|
98517
98741
|
keys: function () { return forward.keys(); },
|
|
98742
|
+
deletedKeys: function () { return deleted; },
|
|
98518
98743
|
deleteKey: function (k) {
|
|
98519
98744
|
(deleted || (deleted = new ts.Set())).add(k);
|
|
98520
98745
|
var set = forward.get(k);
|
|
@@ -98541,6 +98766,11 @@ var ts;
|
|
|
98541
98766
|
});
|
|
98542
98767
|
return map;
|
|
98543
98768
|
},
|
|
98769
|
+
clear: function () {
|
|
98770
|
+
forward.clear();
|
|
98771
|
+
reverse.clear();
|
|
98772
|
+
deleted === null || deleted === void 0 ? void 0 : deleted.clear();
|
|
98773
|
+
}
|
|
98544
98774
|
};
|
|
98545
98775
|
return map;
|
|
98546
98776
|
}
|
|
@@ -98644,45 +98874,35 @@ var ts;
|
|
|
98644
98874
|
}
|
|
98645
98875
|
BuilderState.canReuseOldState = canReuseOldState;
|
|
98646
98876
|
function create(newProgram, getCanonicalFileName, oldState, disableUseFileVersionAsSignature) {
|
|
98647
|
-
var _a, _b, _c;
|
|
98648
98877
|
var fileInfos = new ts.Map();
|
|
98649
98878
|
var referencedMap = newProgram.getCompilerOptions().module !== ts.ModuleKind.None ? createManyToManyPathMap() : undefined;
|
|
98650
98879
|
var exportedModulesMap = referencedMap ? createManyToManyPathMap() : undefined;
|
|
98880
|
+
var hasCalledUpdateShapeSignature = new ts.Set();
|
|
98651
98881
|
var useOldState = canReuseOldState(referencedMap, oldState);
|
|
98652
98882
|
newProgram.getTypeChecker();
|
|
98653
|
-
for (var _i = 0,
|
|
98654
|
-
var sourceFile =
|
|
98883
|
+
for (var _i = 0, _a = newProgram.getSourceFiles(); _i < _a.length; _i++) {
|
|
98884
|
+
var sourceFile = _a[_i];
|
|
98655
98885
|
var version_2 = ts.Debug.checkDefined(sourceFile.version, "Program intended to be used with Builder should have source files with versions set");
|
|
98656
|
-
var
|
|
98657
|
-
var signature = oldUncommitedSignature === undefined ?
|
|
98658
|
-
useOldState ? (_b = oldState.fileInfos.get(sourceFile.resolvedPath)) === null || _b === void 0 ? void 0 : _b.signature : undefined :
|
|
98659
|
-
oldUncommitedSignature || undefined;
|
|
98886
|
+
var oldInfo = useOldState ? oldState.fileInfos.get(sourceFile.resolvedPath) : undefined;
|
|
98660
98887
|
if (referencedMap) {
|
|
98661
98888
|
var newReferences = getReferencedFiles(newProgram, sourceFile, getCanonicalFileName);
|
|
98662
98889
|
if (newReferences) {
|
|
98663
98890
|
referencedMap.set(sourceFile.resolvedPath, newReferences);
|
|
98664
98891
|
}
|
|
98665
98892
|
if (useOldState) {
|
|
98666
|
-
var
|
|
98667
|
-
var exportedModules = oldUncommitedExportedModules === undefined ?
|
|
98668
|
-
oldState.exportedModulesMap.getValues(sourceFile.resolvedPath) :
|
|
98669
|
-
oldUncommitedExportedModules || undefined;
|
|
98893
|
+
var exportedModules = oldState.exportedModulesMap.getValues(sourceFile.resolvedPath);
|
|
98670
98894
|
if (exportedModules) {
|
|
98671
98895
|
exportedModulesMap.set(sourceFile.resolvedPath, exportedModules);
|
|
98672
98896
|
}
|
|
98673
98897
|
}
|
|
98674
98898
|
}
|
|
98675
|
-
fileInfos.set(sourceFile.resolvedPath, {
|
|
98676
|
-
version: version_2,
|
|
98677
|
-
signature: signature,
|
|
98678
|
-
affectsGlobalScope: isFileAffectingGlobalScope(sourceFile) || undefined,
|
|
98679
|
-
impliedFormat: sourceFile.impliedNodeFormat
|
|
98680
|
-
});
|
|
98899
|
+
fileInfos.set(sourceFile.resolvedPath, { version: version_2, signature: oldInfo && oldInfo.signature, affectsGlobalScope: isFileAffectingGlobalScope(sourceFile) || undefined, impliedFormat: sourceFile.impliedNodeFormat });
|
|
98681
98900
|
}
|
|
98682
98901
|
return {
|
|
98683
98902
|
fileInfos: fileInfos,
|
|
98684
98903
|
referencedMap: referencedMap,
|
|
98685
98904
|
exportedModulesMap: exportedModulesMap,
|
|
98905
|
+
hasCalledUpdateShapeSignature: hasCalledUpdateShapeSignature,
|
|
98686
98906
|
useFileVersionAsSignature: !disableUseFileVersionAsSignature && !useOldState
|
|
98687
98907
|
};
|
|
98688
98908
|
}
|
|
@@ -98692,36 +98912,52 @@ var ts;
|
|
|
98692
98912
|
state.allFileNames = undefined;
|
|
98693
98913
|
}
|
|
98694
98914
|
BuilderState.releaseCache = releaseCache;
|
|
98695
|
-
function
|
|
98915
|
+
function clone(state) {
|
|
98696
98916
|
var _a, _b;
|
|
98697
|
-
|
|
98698
|
-
|
|
98699
|
-
|
|
98700
|
-
|
|
98917
|
+
return {
|
|
98918
|
+
fileInfos: new ts.Map(state.fileInfos),
|
|
98919
|
+
referencedMap: (_a = state.referencedMap) === null || _a === void 0 ? void 0 : _a.clone(),
|
|
98920
|
+
exportedModulesMap: (_b = state.exportedModulesMap) === null || _b === void 0 ? void 0 : _b.clone(),
|
|
98921
|
+
hasCalledUpdateShapeSignature: new ts.Set(state.hasCalledUpdateShapeSignature),
|
|
98922
|
+
useFileVersionAsSignature: state.useFileVersionAsSignature,
|
|
98923
|
+
};
|
|
98701
98924
|
}
|
|
98702
|
-
BuilderState.
|
|
98703
|
-
function
|
|
98925
|
+
BuilderState.clone = clone;
|
|
98926
|
+
function getFilesAffectedBy(state, programOfThisState, path, cancellationToken, computeHash, cacheToUpdateSignature, exportedModulesMapCache) {
|
|
98927
|
+
var signatureCache = cacheToUpdateSignature || new ts.Map();
|
|
98704
98928
|
var sourceFile = programOfThisState.getSourceFileByPath(path);
|
|
98705
98929
|
if (!sourceFile) {
|
|
98706
98930
|
return ts.emptyArray;
|
|
98707
98931
|
}
|
|
98708
|
-
if (!updateShapeSignature(state, programOfThisState, sourceFile, cancellationToken, computeHash)) {
|
|
98932
|
+
if (!updateShapeSignature(state, programOfThisState, sourceFile, signatureCache, cancellationToken, computeHash, exportedModulesMapCache)) {
|
|
98709
98933
|
return [sourceFile];
|
|
98710
98934
|
}
|
|
98711
|
-
|
|
98935
|
+
var result = (state.referencedMap ? getFilesAffectedByUpdatedShapeWhenModuleEmit : getFilesAffectedByUpdatedShapeWhenNonModuleEmit)(state, programOfThisState, sourceFile, signatureCache, cancellationToken, computeHash, exportedModulesMapCache);
|
|
98936
|
+
if (!cacheToUpdateSignature) {
|
|
98937
|
+
updateSignaturesFromCache(state, signatureCache);
|
|
98938
|
+
}
|
|
98939
|
+
return result;
|
|
98940
|
+
}
|
|
98941
|
+
BuilderState.getFilesAffectedBy = getFilesAffectedBy;
|
|
98942
|
+
function updateSignaturesFromCache(state, signatureCache) {
|
|
98943
|
+
signatureCache.forEach(function (signature, path) { return updateSignatureOfFile(state, signature, path); });
|
|
98712
98944
|
}
|
|
98713
|
-
BuilderState.
|
|
98945
|
+
BuilderState.updateSignaturesFromCache = updateSignaturesFromCache;
|
|
98714
98946
|
function updateSignatureOfFile(state, signature, path) {
|
|
98715
98947
|
state.fileInfos.get(path).signature = signature;
|
|
98716
|
-
|
|
98948
|
+
state.hasCalledUpdateShapeSignature.add(path);
|
|
98717
98949
|
}
|
|
98718
98950
|
BuilderState.updateSignatureOfFile = updateSignatureOfFile;
|
|
98719
|
-
function updateShapeSignature(state, programOfThisState, sourceFile, cancellationToken, computeHash, useFileVersionAsSignature) {
|
|
98720
|
-
var _a;
|
|
98951
|
+
function updateShapeSignature(state, programOfThisState, sourceFile, cacheToUpdateSignature, cancellationToken, computeHash, exportedModulesMapCache, useFileVersionAsSignature) {
|
|
98721
98952
|
if (useFileVersionAsSignature === void 0) { useFileVersionAsSignature = state.useFileVersionAsSignature; }
|
|
98722
|
-
|
|
98953
|
+
ts.Debug.assert(!!sourceFile);
|
|
98954
|
+
ts.Debug.assert(!exportedModulesMapCache || !!state.exportedModulesMap, "Compute visible to outside map only if visibleToOutsideReferencedMap present in the state");
|
|
98955
|
+
if (state.hasCalledUpdateShapeSignature.has(sourceFile.resolvedPath) || cacheToUpdateSignature.has(sourceFile.resolvedPath)) {
|
|
98723
98956
|
return false;
|
|
98957
|
+
}
|
|
98724
98958
|
var info = state.fileInfos.get(sourceFile.resolvedPath);
|
|
98959
|
+
if (!info)
|
|
98960
|
+
return ts.Debug.fail();
|
|
98725
98961
|
var prevSignature = info.signature;
|
|
98726
98962
|
var latestSignature;
|
|
98727
98963
|
if (!sourceFile.isDeclarationFile && !useFileVersionAsSignature) {
|
|
@@ -98729,50 +98965,40 @@ var ts;
|
|
|
98729
98965
|
var firstDts_1 = ts.firstOrUndefined(emitOutput_1.outputFiles);
|
|
98730
98966
|
if (firstDts_1) {
|
|
98731
98967
|
ts.Debug.assert(ts.isDeclarationFileName(firstDts_1.name), "File extension for signature expected to be dts", function () { return "Found: " + ts.getAnyExtensionFromPath(firstDts_1.name) + " for " + firstDts_1.name + ":: All output files: " + JSON.stringify(emitOutput_1.outputFiles.map(function (f) { return f.name; })); });
|
|
98732
|
-
latestSignature =
|
|
98733
|
-
if (latestSignature !== prevSignature) {
|
|
98734
|
-
updateExportedModules(
|
|
98968
|
+
latestSignature = (computeHash || ts.generateDjb2Hash)(firstDts_1.text);
|
|
98969
|
+
if (exportedModulesMapCache && latestSignature !== prevSignature) {
|
|
98970
|
+
updateExportedModules(sourceFile, emitOutput_1.exportedModulesFromDeclarationEmit, exportedModulesMapCache);
|
|
98735
98971
|
}
|
|
98736
98972
|
}
|
|
98737
98973
|
}
|
|
98738
98974
|
if (latestSignature === undefined) {
|
|
98739
98975
|
latestSignature = sourceFile.version;
|
|
98740
|
-
if (
|
|
98741
|
-
(state.oldExportedModulesMap || (state.oldExportedModulesMap = new ts.Map())).set(sourceFile.resolvedPath, state.exportedModulesMap.getValues(sourceFile.resolvedPath) || false);
|
|
98976
|
+
if (exportedModulesMapCache && latestSignature !== prevSignature) {
|
|
98742
98977
|
var references = state.referencedMap ? state.referencedMap.getValues(sourceFile.resolvedPath) : undefined;
|
|
98743
98978
|
if (references) {
|
|
98744
|
-
|
|
98979
|
+
exportedModulesMapCache.set(sourceFile.resolvedPath, references);
|
|
98745
98980
|
}
|
|
98746
98981
|
else {
|
|
98747
|
-
|
|
98982
|
+
exportedModulesMapCache.deleteKey(sourceFile.resolvedPath);
|
|
98748
98983
|
}
|
|
98749
98984
|
}
|
|
98750
98985
|
}
|
|
98751
|
-
|
|
98752
|
-
(state.hasCalledUpdateShapeSignature || (state.hasCalledUpdateShapeSignature = new ts.Set())).add(sourceFile.resolvedPath);
|
|
98753
|
-
info.signature = latestSignature;
|
|
98986
|
+
cacheToUpdateSignature.set(sourceFile.resolvedPath, latestSignature);
|
|
98754
98987
|
return latestSignature !== prevSignature;
|
|
98755
98988
|
}
|
|
98756
98989
|
BuilderState.updateShapeSignature = updateShapeSignature;
|
|
98757
|
-
function
|
|
98758
|
-
return (computeHash || ts.generateDjb2Hash)(text);
|
|
98759
|
-
}
|
|
98760
|
-
BuilderState.computeSignature = computeSignature;
|
|
98761
|
-
function updateExportedModules(state, sourceFile, exportedModulesFromDeclarationEmit) {
|
|
98762
|
-
if (!state.exportedModulesMap)
|
|
98763
|
-
return;
|
|
98764
|
-
(state.oldExportedModulesMap || (state.oldExportedModulesMap = new ts.Map())).set(sourceFile.resolvedPath, state.exportedModulesMap.getValues(sourceFile.resolvedPath) || false);
|
|
98990
|
+
function updateExportedModules(sourceFile, exportedModulesFromDeclarationEmit, exportedModulesMapCache) {
|
|
98765
98991
|
if (!exportedModulesFromDeclarationEmit) {
|
|
98766
|
-
|
|
98992
|
+
exportedModulesMapCache.deleteKey(sourceFile.resolvedPath);
|
|
98767
98993
|
return;
|
|
98768
98994
|
}
|
|
98769
98995
|
var exportedModules;
|
|
98770
98996
|
exportedModulesFromDeclarationEmit.forEach(function (symbol) { return addExportedModule(getReferencedFilesFromImportedModuleSymbol(symbol)); });
|
|
98771
98997
|
if (exportedModules) {
|
|
98772
|
-
|
|
98998
|
+
exportedModulesMapCache.set(sourceFile.resolvedPath, exportedModules);
|
|
98773
98999
|
}
|
|
98774
99000
|
else {
|
|
98775
|
-
|
|
99001
|
+
exportedModulesMapCache.deleteKey(sourceFile.resolvedPath);
|
|
98776
99002
|
}
|
|
98777
99003
|
function addExportedModule(exportedModulePaths) {
|
|
98778
99004
|
if (exportedModulePaths === null || exportedModulePaths === void 0 ? void 0 : exportedModulePaths.length) {
|
|
@@ -98784,6 +99010,15 @@ var ts;
|
|
|
98784
99010
|
}
|
|
98785
99011
|
}
|
|
98786
99012
|
BuilderState.updateExportedModules = updateExportedModules;
|
|
99013
|
+
function updateExportedFilesMapFromCache(state, exportedModulesMapCache) {
|
|
99014
|
+
var _a;
|
|
99015
|
+
if (exportedModulesMapCache) {
|
|
99016
|
+
ts.Debug.assert(!!state.exportedModulesMap);
|
|
99017
|
+
(_a = exportedModulesMapCache.deletedKeys()) === null || _a === void 0 ? void 0 : _a.forEach(function (path) { return state.exportedModulesMap.deleteKey(path); });
|
|
99018
|
+
exportedModulesMapCache.forEach(function (exportedModules, path) { return state.exportedModulesMap.set(path, exportedModules); });
|
|
99019
|
+
}
|
|
99020
|
+
}
|
|
99021
|
+
BuilderState.updateExportedFilesMapFromCache = updateExportedFilesMapFromCache;
|
|
98787
99022
|
function getAllDependencies(state, programOfThisState, sourceFile) {
|
|
98788
99023
|
var compilerOptions = programOfThisState.getCompilerOptions();
|
|
98789
99024
|
if (ts.outFile(compilerOptions)) {
|
|
@@ -98867,7 +99102,7 @@ var ts;
|
|
|
98867
99102
|
}
|
|
98868
99103
|
return getAllFilesExcludingDefaultLibraryFile(state, programOfThisState, sourceFileWithUpdatedShape);
|
|
98869
99104
|
}
|
|
98870
|
-
function getFilesAffectedByUpdatedShapeWhenModuleEmit(state, programOfThisState, sourceFileWithUpdatedShape, cancellationToken, computeHash) {
|
|
99105
|
+
function getFilesAffectedByUpdatedShapeWhenModuleEmit(state, programOfThisState, sourceFileWithUpdatedShape, cacheToUpdateSignature, cancellationToken, computeHash, exportedModulesMapCache) {
|
|
98871
99106
|
if (isFileAffectingGlobalScope(sourceFileWithUpdatedShape)) {
|
|
98872
99107
|
return getAllFilesExcludingDefaultLibraryFile(state, programOfThisState, sourceFileWithUpdatedShape);
|
|
98873
99108
|
}
|
|
@@ -98883,7 +99118,7 @@ var ts;
|
|
|
98883
99118
|
if (!seenFileNamesMap.has(currentPath)) {
|
|
98884
99119
|
var currentSourceFile = programOfThisState.getSourceFileByPath(currentPath);
|
|
98885
99120
|
seenFileNamesMap.set(currentPath, currentSourceFile);
|
|
98886
|
-
if (currentSourceFile && updateShapeSignature(state, programOfThisState, currentSourceFile, cancellationToken, computeHash)) {
|
|
99121
|
+
if (currentSourceFile && updateShapeSignature(state, programOfThisState, currentSourceFile, cacheToUpdateSignature, cancellationToken, computeHash, exportedModulesMapCache)) {
|
|
98887
99122
|
queue.push.apply(queue, getReferencedByPaths(state, currentSourceFile.resolvedPath));
|
|
98888
99123
|
}
|
|
98889
99124
|
}
|
|
@@ -98898,31 +99133,29 @@ var ts;
|
|
|
98898
99133
|
return map1 === map2 || map1 !== undefined && map2 !== undefined && map1.size === map2.size && !ts.forEachKey(map1, function (key) { return !map2.has(key); });
|
|
98899
99134
|
}
|
|
98900
99135
|
function createBuilderProgramState(newProgram, getCanonicalFileName, oldState, disableUseFileVersionAsSignature) {
|
|
98901
|
-
var _a, _b;
|
|
98902
99136
|
var state = ts.BuilderState.create(newProgram, getCanonicalFileName, oldState, disableUseFileVersionAsSignature);
|
|
98903
99137
|
state.program = newProgram;
|
|
98904
99138
|
var compilerOptions = newProgram.getCompilerOptions();
|
|
98905
99139
|
state.compilerOptions = compilerOptions;
|
|
98906
|
-
|
|
98907
|
-
if (!outFilePath) {
|
|
99140
|
+
if (!ts.outFile(compilerOptions)) {
|
|
98908
99141
|
state.semanticDiagnosticsPerFile = new ts.Map();
|
|
98909
99142
|
}
|
|
98910
|
-
else if (compilerOptions.composite && (oldState === null || oldState === void 0 ? void 0 : oldState.outSignature) && outFilePath === ts.outFile(oldState === null || oldState === void 0 ? void 0 : oldState.compilerOptions)) {
|
|
98911
|
-
state.outSignature = oldState === null || oldState === void 0 ? void 0 : oldState.outSignature;
|
|
98912
|
-
}
|
|
98913
99143
|
state.changedFilesSet = new ts.Set();
|
|
98914
|
-
state.dtsChangeTime = compilerOptions.composite ? oldState === null || oldState === void 0 ? void 0 : oldState.dtsChangeTime : undefined;
|
|
98915
99144
|
var useOldState = ts.BuilderState.canReuseOldState(state.referencedMap, oldState);
|
|
98916
99145
|
var oldCompilerOptions = useOldState ? oldState.compilerOptions : undefined;
|
|
98917
99146
|
var canCopySemanticDiagnostics = useOldState && oldState.semanticDiagnosticsPerFile && !!state.semanticDiagnosticsPerFile &&
|
|
98918
99147
|
!ts.compilerOptionsAffectSemanticDiagnostics(compilerOptions, oldCompilerOptions);
|
|
98919
|
-
var canCopyEmitSignatures = compilerOptions.composite &&
|
|
98920
|
-
(oldState === null || oldState === void 0 ? void 0 : oldState.emitSignatures) &&
|
|
98921
|
-
!outFilePath &&
|
|
98922
|
-
!ts.compilerOptionsAffectDeclarationPath(compilerOptions, oldCompilerOptions);
|
|
98923
99148
|
if (useOldState) {
|
|
98924
|
-
(
|
|
98925
|
-
|
|
99149
|
+
if (!oldState.currentChangedFilePath) {
|
|
99150
|
+
var affectedSignatures = oldState.currentAffectedFilesSignatures;
|
|
99151
|
+
ts.Debug.assert(!oldState.affectedFiles && (!affectedSignatures || !affectedSignatures.size), "Cannot reuse if only few affected files of currentChangedFile were iterated");
|
|
99152
|
+
}
|
|
99153
|
+
var changedFilesSet = oldState.changedFilesSet;
|
|
99154
|
+
if (canCopySemanticDiagnostics) {
|
|
99155
|
+
ts.Debug.assert(!changedFilesSet || !ts.forEachKey(changedFilesSet, function (path) { return oldState.semanticDiagnosticsPerFile.has(path); }), "Semantic diagnostics shouldnt be available for changed files");
|
|
99156
|
+
}
|
|
99157
|
+
changedFilesSet === null || changedFilesSet === void 0 ? void 0 : changedFilesSet.forEach(function (value) { return state.changedFilesSet.add(value); });
|
|
99158
|
+
if (!ts.outFile(compilerOptions) && oldState.affectedFilesPendingEmit) {
|
|
98926
99159
|
state.affectedFilesPendingEmit = oldState.affectedFilesPendingEmit.slice();
|
|
98927
99160
|
state.affectedFilesPendingEmitKind = oldState.affectedFilesPendingEmitKind && new ts.Map(oldState.affectedFilesPendingEmitKind);
|
|
98928
99161
|
state.affectedFilesPendingEmitIndex = oldState.affectedFilesPendingEmitIndex;
|
|
@@ -98939,7 +99172,6 @@ var ts;
|
|
|
98939
99172
|
if (!useOldState ||
|
|
98940
99173
|
!(oldInfo = oldState.fileInfos.get(sourceFilePath)) ||
|
|
98941
99174
|
oldInfo.version !== info.version ||
|
|
98942
|
-
oldInfo.impliedFormat !== info.impliedFormat ||
|
|
98943
99175
|
!hasSameKeys(newReferences = referencedMap && referencedMap.getValues(sourceFilePath), oldReferencedMap && oldReferencedMap.getValues(sourceFilePath)) ||
|
|
98944
99176
|
newReferences && ts.forEachKey(newReferences, function (path) { return !state.fileInfos.has(path) && oldState.fileInfos.has(path); })) {
|
|
98945
99177
|
state.changedFilesSet.add(sourceFilePath);
|
|
@@ -98959,22 +99191,24 @@ var ts;
|
|
|
98959
99191
|
state.semanticDiagnosticsFromOldState.add(sourceFilePath);
|
|
98960
99192
|
}
|
|
98961
99193
|
}
|
|
98962
|
-
if (canCopyEmitSignatures) {
|
|
98963
|
-
var oldEmitSignature = oldState.emitSignatures.get(sourceFilePath);
|
|
98964
|
-
if (oldEmitSignature)
|
|
98965
|
-
(state.emitSignatures || (state.emitSignatures = new ts.Map())).set(sourceFilePath, oldEmitSignature);
|
|
98966
|
-
}
|
|
98967
99194
|
});
|
|
98968
99195
|
if (useOldState && ts.forEachEntry(oldState.fileInfos, function (info, sourceFilePath) { return info.affectsGlobalScope && !state.fileInfos.has(sourceFilePath); })) {
|
|
98969
99196
|
ts.BuilderState.getAllFilesExcludingDefaultLibraryFile(state, newProgram, undefined)
|
|
98970
99197
|
.forEach(function (file) { return state.changedFilesSet.add(file.resolvedPath); });
|
|
98971
99198
|
}
|
|
98972
|
-
else if (oldCompilerOptions && !
|
|
99199
|
+
else if (oldCompilerOptions && !ts.outFile(compilerOptions) && ts.compilerOptionsAffectEmit(compilerOptions, oldCompilerOptions)) {
|
|
98973
99200
|
newProgram.getSourceFiles().forEach(function (f) { return addToAffectedFilesPendingEmit(state, f.resolvedPath, 1); });
|
|
98974
99201
|
ts.Debug.assert(!state.seenAffectedFiles || !state.seenAffectedFiles.size);
|
|
98975
99202
|
state.seenAffectedFiles = state.seenAffectedFiles || new ts.Set();
|
|
98976
99203
|
}
|
|
98977
|
-
|
|
99204
|
+
if (useOldState) {
|
|
99205
|
+
ts.forEachEntry(oldState.fileInfos, function (info, sourceFilePath) {
|
|
99206
|
+
if (state.fileInfos.has(sourceFilePath) && state.fileInfos.get(sourceFilePath).impliedFormat !== info.impliedFormat) {
|
|
99207
|
+
state.changedFilesSet.add(sourceFilePath);
|
|
99208
|
+
}
|
|
99209
|
+
});
|
|
99210
|
+
}
|
|
99211
|
+
state.buildInfoEmitPending = !!state.changedFilesSet.size;
|
|
98978
99212
|
return state;
|
|
98979
99213
|
}
|
|
98980
99214
|
function convertToDiagnostics(diagnostics, newProgram, getCanonicalFileName) {
|
|
@@ -99007,40 +99241,33 @@ var ts;
|
|
|
99007
99241
|
ts.BuilderState.releaseCache(state);
|
|
99008
99242
|
state.program = undefined;
|
|
99009
99243
|
}
|
|
99010
|
-
function
|
|
99011
|
-
var
|
|
99012
|
-
ts.
|
|
99013
|
-
|
|
99014
|
-
|
|
99015
|
-
|
|
99016
|
-
|
|
99017
|
-
|
|
99018
|
-
|
|
99019
|
-
|
|
99020
|
-
|
|
99021
|
-
|
|
99022
|
-
|
|
99023
|
-
|
|
99024
|
-
|
|
99025
|
-
|
|
99026
|
-
|
|
99027
|
-
|
|
99028
|
-
|
|
99029
|
-
|
|
99030
|
-
|
|
99031
|
-
state.programEmitComplete = backupEmitState.programEmitComplete;
|
|
99032
|
-
state.emitSignatures = backupEmitState.emitSignatures;
|
|
99033
|
-
state.outSignature = backupEmitState.outSignature;
|
|
99034
|
-
state.dtsChangeTime = backupEmitState.dtsChangeTime;
|
|
99035
|
-
state.hasChangedEmitSignature = backupEmitState.hasChangedEmitSignature;
|
|
99036
|
-
if (backupEmitState.changedFilesSet)
|
|
99037
|
-
state.changedFilesSet = backupEmitState.changedFilesSet;
|
|
99244
|
+
function cloneBuilderProgramState(state) {
|
|
99245
|
+
var _a;
|
|
99246
|
+
var newState = ts.BuilderState.clone(state);
|
|
99247
|
+
newState.semanticDiagnosticsPerFile = state.semanticDiagnosticsPerFile && new ts.Map(state.semanticDiagnosticsPerFile);
|
|
99248
|
+
newState.changedFilesSet = new ts.Set(state.changedFilesSet);
|
|
99249
|
+
newState.affectedFiles = state.affectedFiles;
|
|
99250
|
+
newState.affectedFilesIndex = state.affectedFilesIndex;
|
|
99251
|
+
newState.currentChangedFilePath = state.currentChangedFilePath;
|
|
99252
|
+
newState.currentAffectedFilesSignatures = state.currentAffectedFilesSignatures && new ts.Map(state.currentAffectedFilesSignatures);
|
|
99253
|
+
newState.currentAffectedFilesExportedModulesMap = (_a = state.currentAffectedFilesExportedModulesMap) === null || _a === void 0 ? void 0 : _a.clone();
|
|
99254
|
+
newState.seenAffectedFiles = state.seenAffectedFiles && new ts.Set(state.seenAffectedFiles);
|
|
99255
|
+
newState.cleanedDiagnosticsOfLibFiles = state.cleanedDiagnosticsOfLibFiles;
|
|
99256
|
+
newState.semanticDiagnosticsFromOldState = state.semanticDiagnosticsFromOldState && new ts.Set(state.semanticDiagnosticsFromOldState);
|
|
99257
|
+
newState.program = state.program;
|
|
99258
|
+
newState.compilerOptions = state.compilerOptions;
|
|
99259
|
+
newState.affectedFilesPendingEmit = state.affectedFilesPendingEmit && state.affectedFilesPendingEmit.slice();
|
|
99260
|
+
newState.affectedFilesPendingEmitKind = state.affectedFilesPendingEmitKind && new ts.Map(state.affectedFilesPendingEmitKind);
|
|
99261
|
+
newState.affectedFilesPendingEmitIndex = state.affectedFilesPendingEmitIndex;
|
|
99262
|
+
newState.seenEmittedFiles = state.seenEmittedFiles && new ts.Map(state.seenEmittedFiles);
|
|
99263
|
+
newState.programEmitComplete = state.programEmitComplete;
|
|
99264
|
+
return newState;
|
|
99038
99265
|
}
|
|
99039
99266
|
function assertSourceFileOkWithoutNextAffectedCall(state, sourceFile) {
|
|
99040
99267
|
ts.Debug.assert(!sourceFile || !state.affectedFiles || state.affectedFiles[state.affectedFilesIndex - 1] !== sourceFile || !state.semanticDiagnosticsPerFile.has(sourceFile.resolvedPath));
|
|
99041
99268
|
}
|
|
99042
99269
|
function getNextAffectedFile(state, cancellationToken, computeHash, host) {
|
|
99043
|
-
var _a
|
|
99270
|
+
var _a;
|
|
99044
99271
|
while (true) {
|
|
99045
99272
|
var affectedFiles = state.affectedFiles;
|
|
99046
99273
|
if (affectedFiles) {
|
|
@@ -99057,8 +99284,10 @@ var ts;
|
|
|
99057
99284
|
}
|
|
99058
99285
|
state.changedFilesSet.delete(state.currentChangedFilePath);
|
|
99059
99286
|
state.currentChangedFilePath = undefined;
|
|
99060
|
-
(
|
|
99061
|
-
|
|
99287
|
+
ts.BuilderState.updateSignaturesFromCache(state, state.currentAffectedFilesSignatures);
|
|
99288
|
+
state.currentAffectedFilesSignatures.clear();
|
|
99289
|
+
ts.BuilderState.updateExportedFilesMapFromCache(state, state.currentAffectedFilesExportedModulesMap);
|
|
99290
|
+
(_a = state.currentAffectedFilesExportedModulesMap) === null || _a === void 0 ? void 0 : _a.clear();
|
|
99062
99291
|
state.affectedFiles = undefined;
|
|
99063
99292
|
}
|
|
99064
99293
|
var nextKey = state.changedFilesSet.keys().next();
|
|
@@ -99071,7 +99300,12 @@ var ts;
|
|
|
99071
99300
|
ts.Debug.assert(!state.semanticDiagnosticsPerFile);
|
|
99072
99301
|
return program;
|
|
99073
99302
|
}
|
|
99074
|
-
|
|
99303
|
+
if (!state.currentAffectedFilesSignatures)
|
|
99304
|
+
state.currentAffectedFilesSignatures = new ts.Map();
|
|
99305
|
+
if (state.exportedModulesMap) {
|
|
99306
|
+
state.currentAffectedFilesExportedModulesMap || (state.currentAffectedFilesExportedModulesMap = ts.BuilderState.createManyToManyPathMap());
|
|
99307
|
+
}
|
|
99308
|
+
state.affectedFiles = ts.BuilderState.getFilesAffectedBy(state, program, nextKey.value, cancellationToken, computeHash, state.currentAffectedFilesSignatures, state.currentAffectedFilesExportedModulesMap);
|
|
99075
99309
|
state.currentChangedFilePath = nextKey.value;
|
|
99076
99310
|
state.affectedFilesIndex = 0;
|
|
99077
99311
|
if (!state.seenAffectedFiles)
|
|
@@ -99115,12 +99349,14 @@ var ts;
|
|
|
99115
99349
|
}
|
|
99116
99350
|
}
|
|
99117
99351
|
function handleDtsMayChangeOfAffectedFile(state, affectedFile, cancellationToken, computeHash, host) {
|
|
99352
|
+
var _a;
|
|
99118
99353
|
removeSemanticDiagnosticsOf(state, affectedFile.resolvedPath);
|
|
99119
99354
|
if (state.allFilesExcludingDefaultLibraryFile === state.affectedFiles) {
|
|
99120
99355
|
removeDiagnosticsOfLibraryFiles(state);
|
|
99121
|
-
ts.BuilderState.updateShapeSignature(state, ts.Debug.checkDefined(state.program), affectedFile, cancellationToken, computeHash);
|
|
99356
|
+
ts.BuilderState.updateShapeSignature(state, ts.Debug.checkDefined(state.program), affectedFile, ts.Debug.checkDefined(state.currentAffectedFilesSignatures), cancellationToken, computeHash, state.currentAffectedFilesExportedModulesMap);
|
|
99122
99357
|
return;
|
|
99123
99358
|
}
|
|
99359
|
+
ts.Debug.assert(state.hasCalledUpdateShapeSignature.has(affectedFile.resolvedPath) || ((_a = state.currentAffectedFilesSignatures) === null || _a === void 0 ? void 0 : _a.has(affectedFile.resolvedPath)), "Signature not updated for affected file: " + affectedFile.fileName);
|
|
99124
99360
|
if (state.compilerOptions.assumeChangesOnlyAffectDirectDependencies)
|
|
99125
99361
|
return;
|
|
99126
99362
|
handleDtsMayChangeOfReferencingExportOfAffectedFile(state, affectedFile, cancellationToken, computeHash, host);
|
|
@@ -99131,7 +99367,7 @@ var ts;
|
|
|
99131
99367
|
var program = ts.Debug.checkDefined(state.program);
|
|
99132
99368
|
var sourceFile = program.getSourceFileByPath(path);
|
|
99133
99369
|
if (sourceFile) {
|
|
99134
|
-
ts.BuilderState.updateShapeSignature(state, program, sourceFile, cancellationToken, computeHash, !host.disableUseFileVersionAsSignature);
|
|
99370
|
+
ts.BuilderState.updateShapeSignature(state, program, sourceFile, ts.Debug.checkDefined(state.currentAffectedFilesSignatures), cancellationToken, computeHash, state.currentAffectedFilesExportedModulesMap, !host.disableUseFileVersionAsSignature);
|
|
99135
99371
|
if (ts.getEmitDeclarations(state.compilerOptions)) {
|
|
99136
99372
|
addToAffectedFilesPendingEmit(state, path, 0);
|
|
99137
99373
|
}
|
|
@@ -99147,10 +99383,24 @@ var ts;
|
|
|
99147
99383
|
return !state.semanticDiagnosticsFromOldState.size;
|
|
99148
99384
|
}
|
|
99149
99385
|
function isChangedSignature(state, path) {
|
|
99150
|
-
var
|
|
99151
|
-
var
|
|
99386
|
+
var newSignature = ts.Debug.checkDefined(state.currentAffectedFilesSignatures).get(path);
|
|
99387
|
+
var oldSignature = ts.Debug.checkDefined(state.fileInfos.get(path)).signature;
|
|
99152
99388
|
return newSignature !== oldSignature;
|
|
99153
99389
|
}
|
|
99390
|
+
function forEachKeyOfExportedModulesMap(state, filePath, fn) {
|
|
99391
|
+
var keys = state.currentAffectedFilesExportedModulesMap.getKeys(filePath);
|
|
99392
|
+
var result = keys && ts.forEachKey(keys, fn);
|
|
99393
|
+
if (result)
|
|
99394
|
+
return result;
|
|
99395
|
+
keys = state.exportedModulesMap.getKeys(filePath);
|
|
99396
|
+
return keys && ts.forEachKey(keys, function (exportedFromPath) {
|
|
99397
|
+
var _a;
|
|
99398
|
+
return !state.currentAffectedFilesExportedModulesMap.hasKey(exportedFromPath) &&
|
|
99399
|
+
!((_a = state.currentAffectedFilesExportedModulesMap.deletedKeys()) === null || _a === void 0 ? void 0 : _a.has(exportedFromPath)) ?
|
|
99400
|
+
fn(exportedFromPath) :
|
|
99401
|
+
undefined;
|
|
99402
|
+
});
|
|
99403
|
+
}
|
|
99154
99404
|
function handleDtsMayChangeOfGlobalScope(state, filePath, cancellationToken, computeHash, host) {
|
|
99155
99405
|
var _a;
|
|
99156
99406
|
if (!((_a = state.fileInfos.get(filePath)) === null || _a === void 0 ? void 0 : _a.affectsGlobalScope))
|
|
@@ -99161,7 +99411,6 @@ var ts;
|
|
|
99161
99411
|
return true;
|
|
99162
99412
|
}
|
|
99163
99413
|
function handleDtsMayChangeOfReferencingExportOfAffectedFile(state, affectedFile, cancellationToken, computeHash, host) {
|
|
99164
|
-
var _a;
|
|
99165
99414
|
if (!state.exportedModulesMap || !state.changedFilesSet.has(affectedFile.resolvedPath))
|
|
99166
99415
|
return;
|
|
99167
99416
|
if (!isChangedSignature(state, affectedFile.resolvedPath))
|
|
@@ -99184,8 +99433,9 @@ var ts;
|
|
|
99184
99433
|
}
|
|
99185
99434
|
}
|
|
99186
99435
|
}
|
|
99436
|
+
ts.Debug.assert(!!state.currentAffectedFilesExportedModulesMap);
|
|
99187
99437
|
var seenFileAndExportsOfFile = new ts.Set();
|
|
99188
|
-
(
|
|
99438
|
+
forEachKeyOfExportedModulesMap(state, affectedFile.resolvedPath, function (exportedFromPath) {
|
|
99189
99439
|
if (handleDtsMayChangeOfGlobalScope(state, exportedFromPath, cancellationToken, computeHash, host))
|
|
99190
99440
|
return true;
|
|
99191
99441
|
var references = state.referencedMap.getKeys(exportedFromPath);
|
|
@@ -99195,16 +99445,17 @@ var ts;
|
|
|
99195
99445
|
});
|
|
99196
99446
|
}
|
|
99197
99447
|
function handleDtsMayChangeOfFileAndExportsOfFile(state, filePath, seenFileAndExportsOfFile, cancellationToken, computeHash, host) {
|
|
99198
|
-
var _a
|
|
99448
|
+
var _a;
|
|
99199
99449
|
if (!ts.tryAddToSet(seenFileAndExportsOfFile, filePath))
|
|
99200
99450
|
return undefined;
|
|
99201
99451
|
if (handleDtsMayChangeOfGlobalScope(state, filePath, cancellationToken, computeHash, host))
|
|
99202
99452
|
return true;
|
|
99203
99453
|
handleDtsMayChangeOf(state, filePath, cancellationToken, computeHash, host);
|
|
99204
|
-
|
|
99454
|
+
ts.Debug.assert(!!state.currentAffectedFilesExportedModulesMap);
|
|
99455
|
+
forEachKeyOfExportedModulesMap(state, filePath, function (exportedFromPath) {
|
|
99205
99456
|
return handleDtsMayChangeOfFileAndExportsOfFile(state, exportedFromPath, seenFileAndExportsOfFile, cancellationToken, computeHash, host);
|
|
99206
99457
|
});
|
|
99207
|
-
(
|
|
99458
|
+
(_a = state.referencedMap.getKeys(filePath)) === null || _a === void 0 ? void 0 : _a.forEach(function (referencingFilePath) {
|
|
99208
99459
|
return !seenFileAndExportsOfFile.has(referencingFilePath) &&
|
|
99209
99460
|
handleDtsMayChangeOf(state, referencingFilePath, cancellationToken, computeHash, host);
|
|
99210
99461
|
});
|
|
@@ -99220,12 +99471,12 @@ var ts;
|
|
|
99220
99471
|
}
|
|
99221
99472
|
else {
|
|
99222
99473
|
state.seenAffectedFiles.add(affected.resolvedPath);
|
|
99223
|
-
state.buildInfoEmitPending = true;
|
|
99224
99474
|
if (emitKind !== undefined) {
|
|
99225
99475
|
(state.seenEmittedFiles || (state.seenEmittedFiles = new ts.Map())).set(affected.resolvedPath, emitKind);
|
|
99226
99476
|
}
|
|
99227
99477
|
if (isPendingEmit) {
|
|
99228
99478
|
state.affectedFilesPendingEmitIndex++;
|
|
99479
|
+
state.buildInfoEmitPending = true;
|
|
99229
99480
|
}
|
|
99230
99481
|
else {
|
|
99231
99482
|
state.affectedFilesIndex++;
|
|
@@ -99257,65 +99508,29 @@ var ts;
|
|
|
99257
99508
|
}
|
|
99258
99509
|
return ts.filterSemanticDiagnostics(diagnostics, state.compilerOptions);
|
|
99259
99510
|
}
|
|
99260
|
-
function
|
|
99261
|
-
|
|
99262
|
-
|
|
99263
|
-
ts.isProgramBundleEmitBuildInfo = isProgramBundleEmitBuildInfo;
|
|
99264
|
-
function getProgramBuildInfo(state, getCanonicalFileName, host) {
|
|
99265
|
-
var outFilePath = ts.outFile(state.compilerOptions);
|
|
99266
|
-
if (outFilePath && !state.compilerOptions.composite)
|
|
99267
|
-
return;
|
|
99511
|
+
function getProgramBuildInfo(state, getCanonicalFileName) {
|
|
99512
|
+
if (ts.outFile(state.compilerOptions))
|
|
99513
|
+
return undefined;
|
|
99268
99514
|
var currentDirectory = ts.Debug.checkDefined(state.program).getCurrentDirectory();
|
|
99269
99515
|
var buildInfoDirectory = ts.getDirectoryPath(ts.getNormalizedAbsolutePath(ts.getTsBuildInfoEmitOutputFilePath(state.compilerOptions), currentDirectory));
|
|
99270
|
-
state.dtsChangeTime = state.hasChangedEmitSignature ? ts.getCurrentTime(host).getTime() : state.dtsChangeTime;
|
|
99271
|
-
if (outFilePath) {
|
|
99272
|
-
var fileNames_1 = [];
|
|
99273
|
-
var fileInfos_1 = [];
|
|
99274
|
-
state.program.getRootFileNames().forEach(function (f) {
|
|
99275
|
-
var sourceFile = state.program.getSourceFile(f);
|
|
99276
|
-
if (!sourceFile)
|
|
99277
|
-
return;
|
|
99278
|
-
fileNames_1.push(relativeToBuildInfo(sourceFile.resolvedPath));
|
|
99279
|
-
fileInfos_1.push(sourceFile.version);
|
|
99280
|
-
});
|
|
99281
|
-
var result_15 = {
|
|
99282
|
-
fileNames: fileNames_1,
|
|
99283
|
-
fileInfos: fileInfos_1,
|
|
99284
|
-
options: convertToProgramBuildInfoCompilerOptions(state.compilerOptions, "affectsBundleEmitBuildInfo"),
|
|
99285
|
-
outSignature: state.outSignature,
|
|
99286
|
-
dtsChangeTime: state.dtsChangeTime,
|
|
99287
|
-
};
|
|
99288
|
-
return result_15;
|
|
99289
|
-
}
|
|
99290
99516
|
var fileNames = [];
|
|
99291
99517
|
var fileNameToFileId = new ts.Map();
|
|
99292
99518
|
var fileIdsList;
|
|
99293
99519
|
var fileNamesToFileIdListId;
|
|
99294
|
-
var emitSignatures;
|
|
99295
99520
|
var fileInfos = ts.arrayFrom(state.fileInfos.entries(), function (_a) {
|
|
99296
|
-
var _b, _c;
|
|
99297
99521
|
var key = _a[0], value = _a[1];
|
|
99298
99522
|
var fileId = toFileId(key);
|
|
99299
99523
|
ts.Debug.assert(fileNames[fileId - 1] === relativeToBuildInfo(key));
|
|
99300
|
-
var
|
|
99301
|
-
var actualSignature =
|
|
99302
|
-
if (state.compilerOptions.composite) {
|
|
99303
|
-
var file = state.program.getSourceFileByPath(key);
|
|
99304
|
-
if (!ts.isJsonSourceFile(file) && ts.sourceFileMayBeEmitted(file, state.program)) {
|
|
99305
|
-
var emitSignature = (_c = state.emitSignatures) === null || _c === void 0 ? void 0 : _c.get(key);
|
|
99306
|
-
if (emitSignature !== actualSignature) {
|
|
99307
|
-
(emitSignatures || (emitSignatures = [])).push(emitSignature === undefined ? fileId : [fileId, emitSignature]);
|
|
99308
|
-
}
|
|
99309
|
-
}
|
|
99310
|
-
}
|
|
99524
|
+
var signature = state.currentAffectedFilesSignatures && state.currentAffectedFilesSignatures.get(key);
|
|
99525
|
+
var actualSignature = signature !== null && signature !== void 0 ? signature : value.signature;
|
|
99311
99526
|
return value.version === actualSignature ?
|
|
99312
99527
|
value.affectsGlobalScope || value.impliedFormat ?
|
|
99313
99528
|
{ version: value.version, signature: undefined, affectsGlobalScope: value.affectsGlobalScope, impliedFormat: value.impliedFormat } :
|
|
99314
99529
|
value.version :
|
|
99315
99530
|
actualSignature !== undefined ?
|
|
99316
|
-
|
|
99531
|
+
signature === undefined ?
|
|
99317
99532
|
value :
|
|
99318
|
-
{ version: value.version, signature:
|
|
99533
|
+
{ version: value.version, signature: signature, affectsGlobalScope: value.affectsGlobalScope, impliedFormat: value.impliedFormat } :
|
|
99319
99534
|
{ version: value.version, signature: false, affectsGlobalScope: value.affectsGlobalScope, impliedFormat: value.impliedFormat };
|
|
99320
99535
|
});
|
|
99321
99536
|
var referencedMap;
|
|
@@ -99329,12 +99544,16 @@ var ts;
|
|
|
99329
99544
|
if (state.exportedModulesMap) {
|
|
99330
99545
|
exportedModulesMap = ts.mapDefined(ts.arrayFrom(state.exportedModulesMap.keys()).sort(ts.compareStringsCaseSensitive), function (key) {
|
|
99331
99546
|
var _a;
|
|
99332
|
-
|
|
99333
|
-
|
|
99334
|
-
|
|
99335
|
-
|
|
99336
|
-
|
|
99337
|
-
|
|
99547
|
+
if (state.currentAffectedFilesExportedModulesMap) {
|
|
99548
|
+
if ((_a = state.currentAffectedFilesExportedModulesMap.deletedKeys()) === null || _a === void 0 ? void 0 : _a.has(key)) {
|
|
99549
|
+
return undefined;
|
|
99550
|
+
}
|
|
99551
|
+
var newValue = state.currentAffectedFilesExportedModulesMap.getValues(key);
|
|
99552
|
+
if (newValue) {
|
|
99553
|
+
return [toFileId(key), toFileIdListId(newValue)];
|
|
99554
|
+
}
|
|
99555
|
+
}
|
|
99556
|
+
return [toFileId(key), toFileIdListId(state.exportedModulesMap.getValues(key))];
|
|
99338
99557
|
});
|
|
99339
99558
|
}
|
|
99340
99559
|
var semanticDiagnosticsPerFile;
|
|
@@ -99345,7 +99564,9 @@ var ts;
|
|
|
99345
99564
|
(semanticDiagnosticsPerFile || (semanticDiagnosticsPerFile = [])).push(value.length ?
|
|
99346
99565
|
[
|
|
99347
99566
|
toFileId(key),
|
|
99348
|
-
|
|
99567
|
+
state.hasReusableDiagnostic ?
|
|
99568
|
+
value :
|
|
99569
|
+
convertToReusableDiagnostics(value, relativeToBuildInfo)
|
|
99349
99570
|
] :
|
|
99350
99571
|
toFileId(key));
|
|
99351
99572
|
}
|
|
@@ -99360,27 +99581,16 @@ var ts;
|
|
|
99360
99581
|
}
|
|
99361
99582
|
}
|
|
99362
99583
|
}
|
|
99363
|
-
|
|
99364
|
-
if (state.changedFilesSet.size) {
|
|
99365
|
-
for (var _d = 0, _e = ts.arrayFrom(state.changedFilesSet.keys()).sort(ts.compareStringsCaseSensitive); _d < _e.length; _d++) {
|
|
99366
|
-
var path = _e[_d];
|
|
99367
|
-
(changeFileSet || (changeFileSet = [])).push(toFileId(path));
|
|
99368
|
-
}
|
|
99369
|
-
}
|
|
99370
|
-
var result = {
|
|
99584
|
+
return {
|
|
99371
99585
|
fileNames: fileNames,
|
|
99372
99586
|
fileInfos: fileInfos,
|
|
99373
|
-
options: convertToProgramBuildInfoCompilerOptions(state.compilerOptions,
|
|
99587
|
+
options: convertToProgramBuildInfoCompilerOptions(state.compilerOptions, relativeToBuildInfoEnsuringAbsolutePath),
|
|
99374
99588
|
fileIdsList: fileIdsList,
|
|
99375
99589
|
referencedMap: referencedMap,
|
|
99376
99590
|
exportedModulesMap: exportedModulesMap,
|
|
99377
99591
|
semanticDiagnosticsPerFile: semanticDiagnosticsPerFile,
|
|
99378
99592
|
affectedFilesPendingEmit: affectedFilesPendingEmit,
|
|
99379
|
-
changeFileSet: changeFileSet,
|
|
99380
|
-
emitSignatures: emitSignatures,
|
|
99381
|
-
dtsChangeTime: state.dtsChangeTime,
|
|
99382
99593
|
};
|
|
99383
|
-
return result;
|
|
99384
99594
|
function relativeToBuildInfoEnsuringAbsolutePath(path) {
|
|
99385
99595
|
return relativeToBuildInfo(ts.getNormalizedAbsolutePath(path, currentDirectory));
|
|
99386
99596
|
}
|
|
@@ -99405,18 +99615,21 @@ var ts;
|
|
|
99405
99615
|
}
|
|
99406
99616
|
return fileIdListId;
|
|
99407
99617
|
}
|
|
99408
|
-
|
|
99409
|
-
|
|
99410
|
-
|
|
99411
|
-
|
|
99412
|
-
|
|
99413
|
-
|
|
99414
|
-
|
|
99415
|
-
|
|
99416
|
-
|
|
99618
|
+
}
|
|
99619
|
+
function convertToProgramBuildInfoCompilerOptions(options, relativeToBuildInfo) {
|
|
99620
|
+
var result;
|
|
99621
|
+
var optionsNameMap = ts.getOptionsNameMap().optionsNameMap;
|
|
99622
|
+
for (var _i = 0, _a = ts.getOwnKeys(options).sort(ts.compareStringsCaseSensitive); _i < _a.length; _i++) {
|
|
99623
|
+
var name = _a[_i];
|
|
99624
|
+
var optionKey = name.toLowerCase();
|
|
99625
|
+
var optionInfo = optionsNameMap.get(optionKey);
|
|
99626
|
+
if ((optionInfo === null || optionInfo === void 0 ? void 0 : optionInfo.affectsEmit) || (optionInfo === null || optionInfo === void 0 ? void 0 : optionInfo.affectsSemanticDiagnostics) ||
|
|
99627
|
+
optionKey === "strict" ||
|
|
99628
|
+
optionKey === "skiplibcheck" || optionKey === "skipdefaultlibcheck") {
|
|
99629
|
+
(result || (result = {}))[name] = convertToReusableCompilerOptionValue(optionInfo, options[name], relativeToBuildInfo);
|
|
99417
99630
|
}
|
|
99418
|
-
return result;
|
|
99419
99631
|
}
|
|
99632
|
+
return result;
|
|
99420
99633
|
}
|
|
99421
99634
|
function convertToReusableCompilerOptionValue(option, value, relativeToBuildInfo) {
|
|
99422
99635
|
if (option) {
|
|
@@ -99490,10 +99703,6 @@ var ts;
|
|
|
99490
99703
|
return { host: host, newProgram: newProgram, oldProgram: oldProgram, configFileParsingDiagnostics: configFileParsingDiagnostics || ts.emptyArray };
|
|
99491
99704
|
}
|
|
99492
99705
|
ts.getBuilderCreationParameters = getBuilderCreationParameters;
|
|
99493
|
-
function computeSignature(text, data, computeHash) {
|
|
99494
|
-
return ts.BuilderState.computeSignature((data === null || data === void 0 ? void 0 : data.sourceMapUrlPos) !== undefined ? text.substring(0, data.sourceMapUrlPos) : text, computeHash);
|
|
99495
|
-
}
|
|
99496
|
-
ts.computeSignature = computeSignature;
|
|
99497
99706
|
function createBuilderProgram(kind, _a) {
|
|
99498
99707
|
var newProgram = _a.newProgram, host = _a.host, oldProgram = _a.oldProgram, configFileParsingDiagnostics = _a.configFileParsingDiagnostics;
|
|
99499
99708
|
var oldState = oldProgram && oldProgram.getState();
|
|
@@ -99505,28 +99714,28 @@ var ts;
|
|
|
99505
99714
|
var getCanonicalFileName = ts.createGetCanonicalFileName(host.useCaseSensitiveFileNames());
|
|
99506
99715
|
var computeHash = ts.maybeBind(host, host.createHash);
|
|
99507
99716
|
var state = createBuilderProgramState(newProgram, getCanonicalFileName, oldState, host.disableUseFileVersionAsSignature);
|
|
99508
|
-
var
|
|
99509
|
-
newProgram.getProgramBuildInfo = function () { return getProgramBuildInfo(state, getCanonicalFileName
|
|
99717
|
+
var backupState;
|
|
99718
|
+
newProgram.getProgramBuildInfo = function () { return getProgramBuildInfo(state, getCanonicalFileName); };
|
|
99510
99719
|
newProgram = undefined;
|
|
99511
99720
|
oldProgram = undefined;
|
|
99512
99721
|
oldState = undefined;
|
|
99513
99722
|
var getState = function () { return state; };
|
|
99514
99723
|
var builderProgram = createRedirectedBuilderProgram(getState, configFileParsingDiagnostics);
|
|
99515
99724
|
builderProgram.getState = getState;
|
|
99516
|
-
builderProgram.
|
|
99517
|
-
ts.Debug.assert(
|
|
99518
|
-
|
|
99725
|
+
builderProgram.backupState = function () {
|
|
99726
|
+
ts.Debug.assert(backupState === undefined);
|
|
99727
|
+
backupState = cloneBuilderProgramState(state);
|
|
99519
99728
|
};
|
|
99520
|
-
builderProgram.
|
|
99521
|
-
|
|
99522
|
-
|
|
99729
|
+
builderProgram.restoreState = function () {
|
|
99730
|
+
state = ts.Debug.checkDefined(backupState);
|
|
99731
|
+
backupState = undefined;
|
|
99523
99732
|
};
|
|
99524
99733
|
builderProgram.getAllDependencies = function (sourceFile) { return ts.BuilderState.getAllDependencies(state, ts.Debug.checkDefined(state.program), sourceFile); };
|
|
99525
99734
|
builderProgram.getSemanticDiagnostics = getSemanticDiagnostics;
|
|
99526
99735
|
builderProgram.emit = emit;
|
|
99527
99736
|
builderProgram.releaseProgram = function () {
|
|
99528
99737
|
releaseCache(state);
|
|
99529
|
-
|
|
99738
|
+
backupState = undefined;
|
|
99530
99739
|
};
|
|
99531
99740
|
if (kind === BuilderProgramKind.SemanticDiagnosticsBuilderProgram) {
|
|
99532
99741
|
builderProgram.getSemanticDiagnosticsOfNextAffectedFile = getSemanticDiagnosticsOfNextAffectedFile;
|
|
@@ -99572,57 +99781,35 @@ var ts;
|
|
|
99572
99781
|
affected = program;
|
|
99573
99782
|
}
|
|
99574
99783
|
}
|
|
99575
|
-
return toAffectedFileEmitResult(state, ts.Debug.checkDefined(state.program).emit(affected === state.program ? undefined : affected, ts.getEmitDeclarations(state.compilerOptions) ?
|
|
99576
|
-
|
|
99784
|
+
return toAffectedFileEmitResult(state, ts.Debug.checkDefined(state.program).emit(affected === state.program ? undefined : affected, affected !== state.program && ts.getEmitDeclarations(state.compilerOptions) && !customTransformers ?
|
|
99785
|
+
getWriteFileUpdatingSignatureCallback(writeFile) :
|
|
99577
99786
|
writeFile || ts.maybeBind(host, host.writeFile), cancellationToken, emitOnlyDtsFiles || emitKind === 0, customTransformers), affected, emitKind, isPendingEmitFile);
|
|
99578
99787
|
}
|
|
99579
|
-
function
|
|
99788
|
+
function getWriteFileUpdatingSignatureCallback(writeFile) {
|
|
99580
99789
|
return function (fileName, text, writeByteOrderMark, onError, sourceFiles, data) {
|
|
99581
|
-
var _a
|
|
99790
|
+
var _a;
|
|
99582
99791
|
if (ts.isDeclarationFileName(fileName)) {
|
|
99583
|
-
|
|
99584
|
-
|
|
99585
|
-
|
|
99586
|
-
|
|
99587
|
-
|
|
99588
|
-
|
|
99589
|
-
|
|
99590
|
-
|
|
99591
|
-
|
|
99592
|
-
|
|
99593
|
-
|
|
99594
|
-
|
|
99595
|
-
|
|
99596
|
-
if (state.affectedFiles) {
|
|
99597
|
-
var existing = (_a = state.oldSignatures) === null || _a === void 0 ? void 0 : _a.get(file.resolvedPath);
|
|
99598
|
-
if (existing === undefined)
|
|
99599
|
-
(state.oldSignatures || (state.oldSignatures = new ts.Map())).set(file.resolvedPath, info.signature || false);
|
|
99600
|
-
info.signature = newSignature;
|
|
99601
|
-
}
|
|
99602
|
-
else {
|
|
99603
|
-
info.signature = newSignature;
|
|
99604
|
-
(_b = state.oldExportedModulesMap) === null || _b === void 0 ? void 0 : _b.clear();
|
|
99605
|
-
}
|
|
99606
|
-
}
|
|
99792
|
+
ts.Debug.assert((sourceFiles === null || sourceFiles === void 0 ? void 0 : sourceFiles.length) === 1);
|
|
99793
|
+
var file = sourceFiles[0];
|
|
99794
|
+
var info = state.fileInfos.get(file.resolvedPath);
|
|
99795
|
+
var signature = ((_a = state.currentAffectedFilesSignatures) === null || _a === void 0 ? void 0 : _a.get(file.resolvedPath)) || info.signature;
|
|
99796
|
+
if (signature === file.version) {
|
|
99797
|
+
var newSignature = (computeHash || ts.generateDjb2Hash)((data === null || data === void 0 ? void 0 : data.sourceMapUrlPos) !== undefined ? text.substring(0, data.sourceMapUrlPos) : text);
|
|
99798
|
+
if (newSignature !== file.version) {
|
|
99799
|
+
if (host.storeFilesChangingSignatureDuringEmit)
|
|
99800
|
+
(state.filesChangingSignature || (state.filesChangingSignature = new ts.Set())).add(file.resolvedPath);
|
|
99801
|
+
if (state.exportedModulesMap)
|
|
99802
|
+
ts.BuilderState.updateExportedModules(file, file.exportedModulesFromDeclarationEmit, state.currentAffectedFilesExportedModulesMap || (state.currentAffectedFilesExportedModulesMap = ts.BuilderState.createManyToManyPathMap()));
|
|
99803
|
+
if (state.affectedFiles && state.affectedFilesIndex < state.affectedFiles.length) {
|
|
99804
|
+
state.currentAffectedFilesSignatures.set(file.resolvedPath, newSignature);
|
|
99607
99805
|
}
|
|
99608
|
-
|
|
99609
|
-
|
|
99610
|
-
|
|
99611
|
-
|
|
99612
|
-
newSignature || (newSignature = computeSignature(text, data, computeHash));
|
|
99613
|
-
if (newSignature !== oldSignature) {
|
|
99614
|
-
(state.emitSignatures || (state.emitSignatures = new ts.Map())).set(filePath, newSignature);
|
|
99615
|
-
state.hasChangedEmitSignature = true;
|
|
99806
|
+
else {
|
|
99807
|
+
info.signature = newSignature;
|
|
99808
|
+
if (state.exportedModulesMap)
|
|
99809
|
+
ts.BuilderState.updateExportedFilesMapFromCache(state, state.currentAffectedFilesExportedModulesMap);
|
|
99616
99810
|
}
|
|
99617
99811
|
}
|
|
99618
99812
|
}
|
|
99619
|
-
else if (state.compilerOptions.composite) {
|
|
99620
|
-
var newSignature = computeSignature(text, data, computeHash);
|
|
99621
|
-
if (newSignature !== state.outSignature) {
|
|
99622
|
-
state.outSignature = newSignature;
|
|
99623
|
-
state.hasChangedEmitSignature = true;
|
|
99624
|
-
}
|
|
99625
|
-
}
|
|
99626
99813
|
}
|
|
99627
99814
|
if (writeFile)
|
|
99628
99815
|
writeFile(fileName, text, writeByteOrderMark, onError, sourceFiles, data);
|
|
@@ -99671,8 +99858,8 @@ var ts;
|
|
|
99671
99858
|
}
|
|
99672
99859
|
}
|
|
99673
99860
|
}
|
|
99674
|
-
return ts.Debug.checkDefined(state.program).emit(targetSourceFile, ts.getEmitDeclarations(state.compilerOptions) ?
|
|
99675
|
-
|
|
99861
|
+
return ts.Debug.checkDefined(state.program).emit(targetSourceFile, !ts.outFile(state.compilerOptions) && ts.getEmitDeclarations(state.compilerOptions) && !customTransformers ?
|
|
99862
|
+
getWriteFileUpdatingSignatureCallback(writeFile) :
|
|
99676
99863
|
writeFile || ts.maybeBind(host, host.writeFile), cancellationToken, emitOnlyDtsFiles, customTransformers);
|
|
99677
99864
|
}
|
|
99678
99865
|
function getSemanticDiagnosticsOfNextAffectedFile(cancellationToken, ignoreSourceFile) {
|
|
@@ -99735,58 +99922,29 @@ var ts;
|
|
|
99735
99922
|
{ version: fileInfo.version, signature: fileInfo.signature === false ? undefined : fileInfo.version, affectsGlobalScope: fileInfo.affectsGlobalScope, impliedFormat: fileInfo.impliedFormat };
|
|
99736
99923
|
}
|
|
99737
99924
|
ts.toBuilderStateFileInfo = toBuilderStateFileInfo;
|
|
99738
|
-
function
|
|
99739
|
-
var _a
|
|
99925
|
+
function createBuildProgramUsingProgramBuildInfo(program, buildInfoPath, host) {
|
|
99926
|
+
var _a;
|
|
99740
99927
|
var buildInfoDirectory = ts.getDirectoryPath(ts.getNormalizedAbsolutePath(buildInfoPath, host.getCurrentDirectory()));
|
|
99741
99928
|
var getCanonicalFileName = ts.createGetCanonicalFileName(host.useCaseSensitiveFileNames());
|
|
99742
|
-
var
|
|
99743
|
-
var
|
|
99744
|
-
var
|
|
99745
|
-
|
|
99746
|
-
|
|
99747
|
-
|
|
99748
|
-
|
|
99749
|
-
|
|
99750
|
-
|
|
99751
|
-
};
|
|
99752
|
-
|
|
99753
|
-
|
|
99754
|
-
|
|
99755
|
-
|
|
99756
|
-
|
|
99757
|
-
var emitSignatures_1 = ((_c = program.options) === null || _c === void 0 ? void 0 : _c.composite) && !ts.outFile(program.options) ? new ts.Map() : undefined;
|
|
99758
|
-
program.fileInfos.forEach(function (fileInfo, index) {
|
|
99759
|
-
var path = toFilePath(index + 1);
|
|
99760
|
-
var stateFileInfo = toBuilderStateFileInfo(fileInfo);
|
|
99761
|
-
fileInfos_2.set(path, stateFileInfo);
|
|
99762
|
-
if (emitSignatures_1 && stateFileInfo.signature)
|
|
99763
|
-
emitSignatures_1.set(path, stateFileInfo.signature);
|
|
99764
|
-
});
|
|
99765
|
-
(_d = program.emitSignatures) === null || _d === void 0 ? void 0 : _d.forEach(function (value) {
|
|
99766
|
-
if (ts.isNumber(value))
|
|
99767
|
-
emitSignatures_1.delete(toFilePath(value));
|
|
99768
|
-
else
|
|
99769
|
-
emitSignatures_1.set(toFilePath(value[0]), value[1]);
|
|
99770
|
-
});
|
|
99771
|
-
state = {
|
|
99772
|
-
fileInfos: fileInfos_2,
|
|
99773
|
-
compilerOptions: program.options ? ts.convertToOptionsWithAbsolutePaths(program.options, toAbsolutePath) : {},
|
|
99774
|
-
referencedMap: toManyToManyPathMap(program.referencedMap),
|
|
99775
|
-
exportedModulesMap: toManyToManyPathMap(program.exportedModulesMap),
|
|
99776
|
-
semanticDiagnosticsPerFile: program.semanticDiagnosticsPerFile && ts.arrayToMap(program.semanticDiagnosticsPerFile, function (value) { return toFilePath(ts.isNumber(value) ? value : value[0]); }, function (value) { return ts.isNumber(value) ? ts.emptyArray : value[1]; }),
|
|
99777
|
-
hasReusableDiagnostic: true,
|
|
99778
|
-
affectedFilesPendingEmit: ts.map(program.affectedFilesPendingEmit, function (value) { return toFilePath(value[0]); }),
|
|
99779
|
-
affectedFilesPendingEmitKind: program.affectedFilesPendingEmit && ts.arrayToMap(program.affectedFilesPendingEmit, function (value) { return toFilePath(value[0]); }, function (value) { return value[1]; }),
|
|
99780
|
-
affectedFilesPendingEmitIndex: program.affectedFilesPendingEmit && 0,
|
|
99781
|
-
changedFilesSet: new ts.Set(ts.map(program.changeFileSet, toFilePath)),
|
|
99782
|
-
dtsChangeTime: program.dtsChangeTime,
|
|
99783
|
-
emitSignatures: (emitSignatures_1 === null || emitSignatures_1 === void 0 ? void 0 : emitSignatures_1.size) ? emitSignatures_1 : undefined,
|
|
99784
|
-
};
|
|
99785
|
-
}
|
|
99929
|
+
var filePaths = program.fileNames.map(toPath);
|
|
99930
|
+
var filePathsSetList = (_a = program.fileIdsList) === null || _a === void 0 ? void 0 : _a.map(function (fileIds) { return new ts.Set(fileIds.map(toFilePath)); });
|
|
99931
|
+
var fileInfos = new ts.Map();
|
|
99932
|
+
program.fileInfos.forEach(function (fileInfo, index) { return fileInfos.set(toFilePath(index + 1), toBuilderStateFileInfo(fileInfo)); });
|
|
99933
|
+
var state = {
|
|
99934
|
+
fileInfos: fileInfos,
|
|
99935
|
+
compilerOptions: program.options ? ts.convertToOptionsWithAbsolutePaths(program.options, toAbsolutePath) : {},
|
|
99936
|
+
referencedMap: toManyToManyPathMap(program.referencedMap),
|
|
99937
|
+
exportedModulesMap: toManyToManyPathMap(program.exportedModulesMap),
|
|
99938
|
+
semanticDiagnosticsPerFile: program.semanticDiagnosticsPerFile && ts.arrayToMap(program.semanticDiagnosticsPerFile, function (value) { return toFilePath(ts.isNumber(value) ? value : value[0]); }, function (value) { return ts.isNumber(value) ? ts.emptyArray : value[1]; }),
|
|
99939
|
+
hasReusableDiagnostic: true,
|
|
99940
|
+
affectedFilesPendingEmit: ts.map(program.affectedFilesPendingEmit, function (value) { return toFilePath(value[0]); }),
|
|
99941
|
+
affectedFilesPendingEmitKind: program.affectedFilesPendingEmit && ts.arrayToMap(program.affectedFilesPendingEmit, function (value) { return toFilePath(value[0]); }, function (value) { return value[1]; }),
|
|
99942
|
+
affectedFilesPendingEmitIndex: program.affectedFilesPendingEmit && 0,
|
|
99943
|
+
};
|
|
99786
99944
|
return {
|
|
99787
99945
|
getState: function () { return state; },
|
|
99788
|
-
|
|
99789
|
-
|
|
99946
|
+
backupState: ts.noop,
|
|
99947
|
+
restoreState: ts.noop,
|
|
99790
99948
|
getProgram: ts.notImplemented,
|
|
99791
99949
|
getProgramOrUndefined: ts.returnUndefined,
|
|
99792
99950
|
releaseProgram: ts.noop,
|
|
@@ -99831,24 +99989,12 @@ var ts;
|
|
|
99831
99989
|
return map;
|
|
99832
99990
|
}
|
|
99833
99991
|
}
|
|
99834
|
-
ts.
|
|
99835
|
-
function getBuildInfoFileVersionMap(program, buildInfoPath, host) {
|
|
99836
|
-
var buildInfoDirectory = ts.getDirectoryPath(ts.getNormalizedAbsolutePath(buildInfoPath, host.getCurrentDirectory()));
|
|
99837
|
-
var getCanonicalFileName = ts.createGetCanonicalFileName(host.useCaseSensitiveFileNames());
|
|
99838
|
-
var fileInfos = new ts.Map();
|
|
99839
|
-
program.fileInfos.forEach(function (fileInfo, index) {
|
|
99840
|
-
var path = ts.toPath(program.fileNames[index], buildInfoDirectory, getCanonicalFileName);
|
|
99841
|
-
var version = ts.isString(fileInfo) ? fileInfo : fileInfo.version;
|
|
99842
|
-
fileInfos.set(path, version);
|
|
99843
|
-
});
|
|
99844
|
-
return fileInfos;
|
|
99845
|
-
}
|
|
99846
|
-
ts.getBuildInfoFileVersionMap = getBuildInfoFileVersionMap;
|
|
99992
|
+
ts.createBuildProgramUsingProgramBuildInfo = createBuildProgramUsingProgramBuildInfo;
|
|
99847
99993
|
function createRedirectedBuilderProgram(getState, configFileParsingDiagnostics) {
|
|
99848
99994
|
return {
|
|
99849
99995
|
getState: ts.notImplemented,
|
|
99850
|
-
|
|
99851
|
-
|
|
99996
|
+
backupState: ts.noop,
|
|
99997
|
+
restoreState: ts.noop,
|
|
99852
99998
|
getProgram: getProgram,
|
|
99853
99999
|
getProgramOrUndefined: function () { return getState().program; },
|
|
99854
100000
|
releaseProgram: function () { return getState().program = undefined; },
|
|
@@ -100093,8 +100239,8 @@ var ts;
|
|
|
100093
100239
|
!!redirectedReference;
|
|
100094
100240
|
var seenNamesInFile = ts.createModeAwareCache();
|
|
100095
100241
|
var i = 0;
|
|
100096
|
-
for (var _i = 0,
|
|
100097
|
-
var entry =
|
|
100242
|
+
for (var _i = 0, names_5 = names; _i < names_5.length; _i++) {
|
|
100243
|
+
var entry = names_5[_i];
|
|
100098
100244
|
var name = ts.isString(entry) ? entry : entry.fileName.toLowerCase();
|
|
100099
100245
|
var mode = !ts.isString(entry) ? ts.getModeForFileReference(entry, containingSourceFileMode) :
|
|
100100
100246
|
containingSourceFile ? ts.getModeForResolutionAtIndex(containingSourceFile, i) : undefined;
|
|
@@ -100586,7 +100732,7 @@ var ts;
|
|
|
100586
100732
|
}
|
|
100587
100733
|
function isFormatRequiringExtensions(compilerOptions, importingSourceFileName, host) {
|
|
100588
100734
|
var _a;
|
|
100589
|
-
if (ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.
|
|
100735
|
+
if (ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.Node16
|
|
100590
100736
|
&& ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.NodeNext) {
|
|
100591
100737
|
return false;
|
|
100592
100738
|
}
|
|
@@ -100620,14 +100766,14 @@ var ts;
|
|
|
100620
100766
|
if (options === void 0) { options = {}; }
|
|
100621
100767
|
var info = getInfo(importingSourceFile.path, host);
|
|
100622
100768
|
var modulePaths = getAllModulePaths(importingSourceFile.path, nodeModulesFileName, host, preferences, options);
|
|
100623
|
-
return ts.firstDefined(modulePaths, function (modulePath) { return tryGetModuleNameAsNodeModule(modulePath, info, importingSourceFile, host, compilerOptions, true, options.overrideImportMode); });
|
|
100769
|
+
return ts.firstDefined(modulePaths, function (modulePath) { return tryGetModuleNameAsNodeModule(modulePath, info, importingSourceFile, host, compilerOptions, preferences, true, options.overrideImportMode); });
|
|
100624
100770
|
}
|
|
100625
100771
|
moduleSpecifiers_1.getNodeModulesPackageName = getNodeModulesPackageName;
|
|
100626
100772
|
function getModuleSpecifierWorker(compilerOptions, importingSourceFile, importingSourceFileName, toFileName, host, preferences, userPreferences, options) {
|
|
100627
100773
|
if (options === void 0) { options = {}; }
|
|
100628
100774
|
var info = getInfo(importingSourceFileName, host);
|
|
100629
100775
|
var modulePaths = getAllModulePaths(importingSourceFileName, toFileName, host, userPreferences, options);
|
|
100630
|
-
return ts.firstDefined(modulePaths, function (modulePath) { return tryGetModuleNameAsNodeModule(modulePath, info, importingSourceFile, host, compilerOptions, undefined, options.overrideImportMode); }) ||
|
|
100776
|
+
return ts.firstDefined(modulePaths, function (modulePath) { return tryGetModuleNameAsNodeModule(modulePath, info, importingSourceFile, host, compilerOptions, userPreferences, undefined, options.overrideImportMode); }) ||
|
|
100631
100777
|
getLocalModuleSpecifier(toFileName, info, compilerOptions, host, preferences);
|
|
100632
100778
|
}
|
|
100633
100779
|
function tryGetModuleSpecifiersFromCache(moduleSymbol, importingSourceFile, host, userPreferences, options) {
|
|
@@ -100693,7 +100839,7 @@ var ts;
|
|
|
100693
100839
|
var relativeSpecifiers;
|
|
100694
100840
|
for (var _i = 0, modulePaths_1 = modulePaths; _i < modulePaths_1.length; _i++) {
|
|
100695
100841
|
var modulePath = modulePaths_1[_i];
|
|
100696
|
-
var specifier = tryGetModuleNameAsNodeModule(modulePath, info, importingSourceFile, host, compilerOptions, undefined, options.overrideImportMode);
|
|
100842
|
+
var specifier = tryGetModuleNameAsNodeModule(modulePath, info, importingSourceFile, host, compilerOptions, userPreferences, undefined, options.overrideImportMode);
|
|
100697
100843
|
nodeModulesSpecifiers = ts.append(nodeModulesSpecifiers, specifier);
|
|
100698
100844
|
if (specifier && modulePath.isRedirect) {
|
|
100699
100845
|
return nodeModulesSpecifiers;
|
|
@@ -100799,9 +100945,9 @@ var ts;
|
|
|
100799
100945
|
var targets = importedFileNames.map(function (f) { return ts.getNormalizedAbsolutePath(f, cwd); });
|
|
100800
100946
|
var shouldFilterIgnoredPaths = !ts.every(targets, ts.containsIgnoredPath);
|
|
100801
100947
|
if (!preferSymlinks) {
|
|
100802
|
-
var
|
|
100803
|
-
if (
|
|
100804
|
-
return
|
|
100948
|
+
var result_15 = ts.forEach(targets, function (p) { return !(shouldFilterIgnoredPaths && ts.containsIgnoredPath(p)) && cb(p, referenceRedirect === p); });
|
|
100949
|
+
if (result_15)
|
|
100950
|
+
return result_15;
|
|
100805
100951
|
}
|
|
100806
100952
|
var symlinkedDirectories = (_a = host.getSymlinkCache) === null || _a === void 0 ? void 0 : _a.call(host).getSymlinkedDirectoriesByRealpath();
|
|
100807
100953
|
var fullImportedFileName = ts.getNormalizedAbsolutePath(importedFileName, cwd);
|
|
@@ -100820,10 +100966,10 @@ var ts;
|
|
|
100820
100966
|
for (var _i = 0, symlinkDirectories_1 = symlinkDirectories; _i < symlinkDirectories_1.length; _i++) {
|
|
100821
100967
|
var symlinkDirectory = symlinkDirectories_1[_i];
|
|
100822
100968
|
var option = ts.resolvePath(symlinkDirectory, relative);
|
|
100823
|
-
var
|
|
100969
|
+
var result_16 = cb(option, target === referenceRedirect);
|
|
100824
100970
|
shouldFilterIgnoredPaths = true;
|
|
100825
|
-
if (
|
|
100826
|
-
return
|
|
100971
|
+
if (result_16)
|
|
100972
|
+
return result_16;
|
|
100827
100973
|
}
|
|
100828
100974
|
});
|
|
100829
100975
|
});
|
|
@@ -101024,7 +101170,7 @@ var ts;
|
|
|
101024
101170
|
? removeExtensionAndIndexPostFix(relativePath, ending, compilerOptions)
|
|
101025
101171
|
: ts.removeFileExtension(relativePath);
|
|
101026
101172
|
}
|
|
101027
|
-
function tryGetModuleNameAsNodeModule(_a, _b, importingSourceFile, host, options, packageNameOnly, overrideMode) {
|
|
101173
|
+
function tryGetModuleNameAsNodeModule(_a, _b, importingSourceFile, host, options, userPreferences, packageNameOnly, overrideMode) {
|
|
101028
101174
|
var path = _a.path, isRedirect = _a.isRedirect;
|
|
101029
101175
|
var getCanonicalFileName = _b.getCanonicalFileName, sourceDirectory = _b.sourceDirectory;
|
|
101030
101176
|
if (!host.fileExists || !host.readFile) {
|
|
@@ -101037,8 +101183,9 @@ var ts;
|
|
|
101037
101183
|
var moduleSpecifier = path;
|
|
101038
101184
|
var isPackageRootPath = false;
|
|
101039
101185
|
if (!packageNameOnly) {
|
|
101186
|
+
var preferences = getPreferences(host, userPreferences, options, importingSourceFile);
|
|
101040
101187
|
var packageRootIndex = parts.packageRootIndex;
|
|
101041
|
-
var
|
|
101188
|
+
var moduleFileName = void 0;
|
|
101042
101189
|
while (true) {
|
|
101043
101190
|
var _c = tryDirectoryWithPackageJson(packageRootIndex), moduleFileToTry = _c.moduleFileToTry, packageRootPath = _c.packageRootPath, blockedByExports = _c.blockedByExports, verbatimFromExports = _c.verbatimFromExports;
|
|
101044
101191
|
if (ts.getEmitModuleResolutionKind(options) !== ts.ModuleResolutionKind.Classic) {
|
|
@@ -101054,11 +101201,11 @@ var ts;
|
|
|
101054
101201
|
isPackageRootPath = true;
|
|
101055
101202
|
break;
|
|
101056
101203
|
}
|
|
101057
|
-
if (!
|
|
101058
|
-
|
|
101204
|
+
if (!moduleFileName)
|
|
101205
|
+
moduleFileName = moduleFileToTry;
|
|
101059
101206
|
packageRootIndex = path.indexOf(ts.directorySeparator, packageRootIndex + 1);
|
|
101060
101207
|
if (packageRootIndex === -1) {
|
|
101061
|
-
moduleSpecifier =
|
|
101208
|
+
moduleSpecifier = removeExtensionAndIndexPostFix(moduleFileName, preferences.ending, options, host);
|
|
101062
101209
|
break;
|
|
101063
101210
|
}
|
|
101064
101211
|
}
|
|
@@ -101082,7 +101229,7 @@ var ts;
|
|
|
101082
101229
|
var cachedPackageJson = (_b = (_a = host.getPackageJsonInfoCache) === null || _a === void 0 ? void 0 : _a.call(host)) === null || _b === void 0 ? void 0 : _b.getPackageJsonInfo(packageJsonPath);
|
|
101083
101230
|
if (typeof cachedPackageJson === "object" || cachedPackageJson === undefined && host.fileExists(packageJsonPath)) {
|
|
101084
101231
|
var packageJsonContent = (cachedPackageJson === null || cachedPackageJson === void 0 ? void 0 : cachedPackageJson.packageJsonContent) || JSON.parse(host.readFile(packageJsonPath));
|
|
101085
|
-
if (ts.getEmitModuleResolutionKind(options) === ts.ModuleResolutionKind.
|
|
101232
|
+
if (ts.getEmitModuleResolutionKind(options) === ts.ModuleResolutionKind.Node16 || ts.getEmitModuleResolutionKind(options) === ts.ModuleResolutionKind.NodeNext) {
|
|
101086
101233
|
var conditions = ["node", overrideMode || importingSourceFile.impliedNodeFormat === ts.ModuleKind.ESNext ? "import" : "require", "types"];
|
|
101087
101234
|
var fromExports = packageJsonContent.exports && typeof packageJsonContent.name === "string"
|
|
101088
101235
|
? tryGetModuleNameFromExports(options, path, packageRootPath, ts.getPackageNameFromTypesPackageName(packageJsonContent.name), packageJsonContent.exports, conditions)
|
|
@@ -101107,7 +101254,7 @@ var ts;
|
|
|
101107
101254
|
moduleFileToTry = ts.combinePaths(packageRootPath, fromPaths);
|
|
101108
101255
|
}
|
|
101109
101256
|
}
|
|
101110
|
-
var mainFileRelative = packageJsonContent.typings || packageJsonContent.types || packageJsonContent.main;
|
|
101257
|
+
var mainFileRelative = packageJsonContent.typings || packageJsonContent.types || packageJsonContent.main || "index.js";
|
|
101111
101258
|
if (ts.isString(mainFileRelative)) {
|
|
101112
101259
|
var mainExportFile = ts.toPath(mainFileRelative, packageRootPath, getCanonicalFileName);
|
|
101113
101260
|
if (ts.removeFileExtension(mainExportFile) === ts.removeFileExtension(getCanonicalFileName(moduleFileToTry))) {
|
|
@@ -101115,14 +101262,13 @@ var ts;
|
|
|
101115
101262
|
}
|
|
101116
101263
|
}
|
|
101117
101264
|
}
|
|
101118
|
-
|
|
101119
|
-
|
|
101120
|
-
|
|
101121
|
-
|
|
101122
|
-
|
|
101123
|
-
return fullModulePathWithoutExtension.substring(0, parts.fileNameIndex);
|
|
101265
|
+
else {
|
|
101266
|
+
var fileName = getCanonicalFileName(moduleFileToTry.substring(parts.packageRootIndex + 1));
|
|
101267
|
+
if (fileName === "index.d.ts" || fileName === "index.js" || fileName === "index.ts" || fileName === "index.tsx") {
|
|
101268
|
+
return { moduleFileToTry: moduleFileToTry, packageRootPath: packageRootPath };
|
|
101269
|
+
}
|
|
101124
101270
|
}
|
|
101125
|
-
return
|
|
101271
|
+
return { moduleFileToTry: moduleFileToTry };
|
|
101126
101272
|
}
|
|
101127
101273
|
}
|
|
101128
101274
|
function tryGetAnyFileFromPath(host, path) {
|
|
@@ -101143,15 +101289,21 @@ var ts;
|
|
|
101143
101289
|
return relativePath !== undefined && isPathRelativeToParent(relativePath) ? undefined : relativePath;
|
|
101144
101290
|
});
|
|
101145
101291
|
}
|
|
101146
|
-
function removeExtensionAndIndexPostFix(fileName, ending, options) {
|
|
101292
|
+
function removeExtensionAndIndexPostFix(fileName, ending, options, host) {
|
|
101147
101293
|
if (ts.fileExtensionIsOneOf(fileName, [".json", ".mjs", ".cjs"]))
|
|
101148
101294
|
return fileName;
|
|
101149
101295
|
var noExtension = ts.removeFileExtension(fileName);
|
|
101296
|
+
if (fileName === noExtension)
|
|
101297
|
+
return fileName;
|
|
101150
101298
|
if (ts.fileExtensionIsOneOf(fileName, [".d.mts", ".mts", ".d.cts", ".cts"]))
|
|
101151
101299
|
return noExtension + getJSExtensionForFile(fileName, options);
|
|
101152
101300
|
switch (ending) {
|
|
101153
101301
|
case 0:
|
|
101154
|
-
|
|
101302
|
+
var withoutIndex = ts.removeSuffix(noExtension, "/index");
|
|
101303
|
+
if (host && withoutIndex !== noExtension && tryGetAnyFileFromPath(host, withoutIndex)) {
|
|
101304
|
+
return noExtension;
|
|
101305
|
+
}
|
|
101306
|
+
return withoutIndex;
|
|
101155
101307
|
case 1:
|
|
101156
101308
|
return noExtension;
|
|
101157
101309
|
case 2:
|
|
@@ -101413,6 +101565,8 @@ var ts;
|
|
|
101413
101565
|
var configFile = program.getCompilerOptions().configFile;
|
|
101414
101566
|
if (!((_a = configFile === null || configFile === void 0 ? void 0 : configFile.configFileSpecs) === null || _a === void 0 ? void 0 : _a.validatedIncludeSpecs))
|
|
101415
101567
|
return undefined;
|
|
101568
|
+
if (configFile.configFileSpecs.isDefaultIncludeSpec)
|
|
101569
|
+
return true;
|
|
101416
101570
|
var isJsonFile = ts.fileExtensionIs(fileName, ".json");
|
|
101417
101571
|
var basePath = ts.getDirectoryPath(ts.getNormalizedAbsolutePath(configFile.fileName, program.getCurrentDirectory()));
|
|
101418
101572
|
var useCaseSensitiveFileNames = program.useCaseSensitiveFileNames();
|
|
@@ -101477,9 +101631,11 @@ var ts;
|
|
|
101477
101631
|
if (matchedByFiles)
|
|
101478
101632
|
return ts.chainDiagnosticMessages(undefined, ts.Diagnostics.Part_of_files_list_in_tsconfig_json);
|
|
101479
101633
|
var matchedByInclude = getMatchedIncludeSpec(program, fileName);
|
|
101480
|
-
return matchedByInclude ?
|
|
101634
|
+
return ts.isString(matchedByInclude) ?
|
|
101481
101635
|
ts.chainDiagnosticMessages(undefined, ts.Diagnostics.Matched_by_include_pattern_0_in_1, matchedByInclude, toFileName(options.configFile, fileNameConvertor)) :
|
|
101482
|
-
ts.chainDiagnosticMessages(undefined,
|
|
101636
|
+
ts.chainDiagnosticMessages(undefined, matchedByInclude ?
|
|
101637
|
+
ts.Diagnostics.Matched_by_default_include_pattern_Asterisk_Asterisk_Slash_Asterisk :
|
|
101638
|
+
ts.Diagnostics.Root_file_specified_for_compilation);
|
|
101483
101639
|
case ts.FileIncludeKind.SourceFromProjectReference:
|
|
101484
101640
|
case ts.FileIncludeKind.OutputFromProjectReference:
|
|
101485
101641
|
var isOutput = reason.kind === ts.FileIncludeKind.OutputFromProjectReference;
|
|
@@ -101638,7 +101794,6 @@ var ts;
|
|
|
101638
101794
|
readDirectory: ts.maybeBind(host, host.readDirectory),
|
|
101639
101795
|
disableUseFileVersionAsSignature: host.disableUseFileVersionAsSignature,
|
|
101640
101796
|
storeFilesChangingSignatureDuringEmit: host.storeFilesChangingSignatureDuringEmit,
|
|
101641
|
-
now: ts.maybeBind(host, host.now),
|
|
101642
101797
|
};
|
|
101643
101798
|
function writeFile(fileName, text, writeByteOrderMark, onError) {
|
|
101644
101799
|
try {
|
|
@@ -101693,7 +101848,6 @@ var ts;
|
|
|
101693
101848
|
createProgram: createProgram || ts.createEmitAndSemanticDiagnosticsBuilderProgram,
|
|
101694
101849
|
disableUseFileVersionAsSignature: system.disableUseFileVersionAsSignature,
|
|
101695
101850
|
storeFilesChangingSignatureDuringEmit: system.storeFilesChangingSignatureDuringEmit,
|
|
101696
|
-
now: ts.maybeBind(system, system.now),
|
|
101697
101851
|
};
|
|
101698
101852
|
}
|
|
101699
101853
|
ts.createProgramHost = createProgramHost;
|
|
@@ -101749,26 +101903,20 @@ var ts;
|
|
|
101749
101903
|
var ts;
|
|
101750
101904
|
(function (ts) {
|
|
101751
101905
|
function readBuilderProgram(compilerOptions, host) {
|
|
101906
|
+
if (ts.outFile(compilerOptions))
|
|
101907
|
+
return undefined;
|
|
101752
101908
|
var buildInfoPath = ts.getTsBuildInfoEmitOutputFilePath(compilerOptions);
|
|
101753
101909
|
if (!buildInfoPath)
|
|
101754
101910
|
return undefined;
|
|
101755
|
-
var
|
|
101756
|
-
if (
|
|
101757
|
-
|
|
101758
|
-
|
|
101759
|
-
return undefined;
|
|
101760
|
-
}
|
|
101761
|
-
else {
|
|
101762
|
-
var content = host.readFile(buildInfoPath);
|
|
101763
|
-
if (!content)
|
|
101764
|
-
return undefined;
|
|
101765
|
-
buildInfo = ts.getBuildInfo(content);
|
|
101766
|
-
}
|
|
101911
|
+
var content = host.readFile(buildInfoPath);
|
|
101912
|
+
if (!content)
|
|
101913
|
+
return undefined;
|
|
101914
|
+
var buildInfo = ts.getBuildInfo(content);
|
|
101767
101915
|
if (buildInfo.version !== ts.version)
|
|
101768
101916
|
return undefined;
|
|
101769
101917
|
if (!buildInfo.program)
|
|
101770
101918
|
return undefined;
|
|
101771
|
-
return ts.
|
|
101919
|
+
return ts.createBuildProgramUsingProgramBuildInfo(buildInfo.program, buildInfoPath, host);
|
|
101772
101920
|
}
|
|
101773
101921
|
ts.readBuilderProgram = readBuilderProgram;
|
|
101774
101922
|
function createIncrementalCompilerHost(options, system) {
|
|
@@ -101777,7 +101925,6 @@ var ts;
|
|
|
101777
101925
|
host.createHash = ts.maybeBind(system, system.createHash);
|
|
101778
101926
|
host.disableUseFileVersionAsSignature = system.disableUseFileVersionAsSignature;
|
|
101779
101927
|
host.storeFilesChangingSignatureDuringEmit = system.storeFilesChangingSignatureDuringEmit;
|
|
101780
|
-
host.now = ts.maybeBind(system, system.now);
|
|
101781
101928
|
ts.setGetSourceFileAsHashVersioned(host, system);
|
|
101782
101929
|
ts.changeCompilerHostLikeToUseCache(host, function (fileName) { return ts.toPath(fileName, host.getCurrentDirectory(), host.getCanonicalFileName); });
|
|
101783
101930
|
return host;
|
|
@@ -102440,14 +102587,11 @@ var ts;
|
|
|
102440
102587
|
UpToDateStatusType[UpToDateStatusType["OutputMissing"] = 4] = "OutputMissing";
|
|
102441
102588
|
UpToDateStatusType[UpToDateStatusType["OutOfDateWithSelf"] = 5] = "OutOfDateWithSelf";
|
|
102442
102589
|
UpToDateStatusType[UpToDateStatusType["OutOfDateWithUpstream"] = 6] = "OutOfDateWithUpstream";
|
|
102443
|
-
UpToDateStatusType[UpToDateStatusType["
|
|
102444
|
-
UpToDateStatusType[UpToDateStatusType["
|
|
102445
|
-
UpToDateStatusType[UpToDateStatusType["
|
|
102446
|
-
UpToDateStatusType[UpToDateStatusType["
|
|
102447
|
-
UpToDateStatusType[UpToDateStatusType["
|
|
102448
|
-
UpToDateStatusType[UpToDateStatusType["UpToDateWithInputFileText"] = 12] = "UpToDateWithInputFileText";
|
|
102449
|
-
UpToDateStatusType[UpToDateStatusType["ContainerOnly"] = 13] = "ContainerOnly";
|
|
102450
|
-
UpToDateStatusType[UpToDateStatusType["ForceBuild"] = 14] = "ForceBuild";
|
|
102590
|
+
UpToDateStatusType[UpToDateStatusType["UpstreamOutOfDate"] = 7] = "UpstreamOutOfDate";
|
|
102591
|
+
UpToDateStatusType[UpToDateStatusType["UpstreamBlocked"] = 8] = "UpstreamBlocked";
|
|
102592
|
+
UpToDateStatusType[UpToDateStatusType["ComputingUpstream"] = 9] = "ComputingUpstream";
|
|
102593
|
+
UpToDateStatusType[UpToDateStatusType["TsVersionOutputOfDate"] = 10] = "TsVersionOutputOfDate";
|
|
102594
|
+
UpToDateStatusType[UpToDateStatusType["ContainerOnly"] = 11] = "ContainerOnly";
|
|
102451
102595
|
})(UpToDateStatusType = ts.UpToDateStatusType || (ts.UpToDateStatusType = {}));
|
|
102452
102596
|
function resolveConfigFileProjectName(project) {
|
|
102453
102597
|
if (ts.fileExtensionIs(project, ".json")) {
|
|
@@ -102485,10 +102629,9 @@ var ts;
|
|
|
102485
102629
|
function getOrCreateValueMapFromConfigFileMap(configFileMap, resolved) {
|
|
102486
102630
|
return getOrCreateValueFromConfigFileMap(configFileMap, resolved, function () { return new ts.Map(); });
|
|
102487
102631
|
}
|
|
102488
|
-
function
|
|
102489
|
-
return
|
|
102632
|
+
function newer(date1, date2) {
|
|
102633
|
+
return date2 > date1 ? date2 : date1;
|
|
102490
102634
|
}
|
|
102491
|
-
ts.getCurrentTime = getCurrentTime;
|
|
102492
102635
|
function isCircularBuildOrder(buildOrder) {
|
|
102493
102636
|
return !!buildOrder && !!buildOrder.buildOrder;
|
|
102494
102637
|
}
|
|
@@ -102572,7 +102715,6 @@ var ts;
|
|
|
102572
102715
|
return ts.loadWithTypeDirectiveCache(ts.Debug.checkEachDefined(typeReferenceDirectiveNames), containingFile, redirectedReference, containingFileMode, loader_4);
|
|
102573
102716
|
};
|
|
102574
102717
|
}
|
|
102575
|
-
compilerHost.getBuildInfo = function (fileName, configFilePath) { return getBuildInfo(state, fileName, toResolvedConfigFilePath(state, configFilePath), undefined); };
|
|
102576
102718
|
var _a = ts.createWatchFactory(hostWithWatch, options), watchFile = _a.watchFile, watchDirectory = _a.watchDirectory, writeLog = _a.writeLog;
|
|
102577
102719
|
var state = {
|
|
102578
102720
|
host: host,
|
|
@@ -102588,9 +102730,8 @@ var ts;
|
|
|
102588
102730
|
resolvedConfigFilePaths: new ts.Map(),
|
|
102589
102731
|
configFileCache: new ts.Map(),
|
|
102590
102732
|
projectStatus: new ts.Map(),
|
|
102733
|
+
buildInfoChecked: new ts.Map(),
|
|
102591
102734
|
extendedConfigCache: new ts.Map(),
|
|
102592
|
-
buildInfoCache: new ts.Map(),
|
|
102593
|
-
outputTimeStamps: new ts.Map(),
|
|
102594
102735
|
builderPrograms: new ts.Map(),
|
|
102595
102736
|
diagnostics: new ts.Map(),
|
|
102596
102737
|
projectPendingBuild: new ts.Map(),
|
|
@@ -102612,7 +102753,6 @@ var ts;
|
|
|
102612
102753
|
allWatchedConfigFiles: new ts.Map(),
|
|
102613
102754
|
allWatchedExtendedConfigFiles: new ts.Map(),
|
|
102614
102755
|
allWatchedPackageJsonFiles: new ts.Map(),
|
|
102615
|
-
filesWatched: new ts.Map(),
|
|
102616
102756
|
lastCachedPackageJsonLookups: new ts.Map(),
|
|
102617
102757
|
timerToBuildInvalidatedProject: undefined,
|
|
102618
102758
|
reportFileChangeDetected: false,
|
|
@@ -102714,12 +102854,11 @@ var ts;
|
|
|
102714
102854
|
var noopOnDelete = { onDeleteValue: ts.noop };
|
|
102715
102855
|
ts.mutateMapSkippingNewValues(state.configFileCache, currentProjects, noopOnDelete);
|
|
102716
102856
|
ts.mutateMapSkippingNewValues(state.projectStatus, currentProjects, noopOnDelete);
|
|
102857
|
+
ts.mutateMapSkippingNewValues(state.buildInfoChecked, currentProjects, noopOnDelete);
|
|
102717
102858
|
ts.mutateMapSkippingNewValues(state.builderPrograms, currentProjects, noopOnDelete);
|
|
102718
102859
|
ts.mutateMapSkippingNewValues(state.diagnostics, currentProjects, noopOnDelete);
|
|
102719
102860
|
ts.mutateMapSkippingNewValues(state.projectPendingBuild, currentProjects, noopOnDelete);
|
|
102720
102861
|
ts.mutateMapSkippingNewValues(state.projectErrorsReported, currentProjects, noopOnDelete);
|
|
102721
|
-
ts.mutateMapSkippingNewValues(state.buildInfoCache, currentProjects, noopOnDelete);
|
|
102722
|
-
ts.mutateMapSkippingNewValues(state.outputTimeStamps, currentProjects, noopOnDelete);
|
|
102723
102862
|
if (state.watch) {
|
|
102724
102863
|
ts.mutateMapSkippingNewValues(state.allWatchedConfigFiles, currentProjects, { onDeleteValue: ts.closeFileWatcher });
|
|
102725
102864
|
state.allWatchedExtendedConfigFiles.forEach(function (watcher) {
|
|
@@ -103005,16 +103144,16 @@ var ts;
|
|
|
103005
103144
|
}
|
|
103006
103145
|
function emit(writeFileCallback, cancellationToken, customTransformers) {
|
|
103007
103146
|
var _a;
|
|
103008
|
-
var _b, _c
|
|
103147
|
+
var _b, _c;
|
|
103009
103148
|
ts.Debug.assertIsDefined(program);
|
|
103010
103149
|
ts.Debug.assert(step === BuildStep.Emit);
|
|
103011
|
-
program.
|
|
103150
|
+
program.backupState();
|
|
103012
103151
|
var declDiagnostics;
|
|
103013
103152
|
var reportDeclarationDiagnostics = function (d) { return (declDiagnostics || (declDiagnostics = [])).push(d); };
|
|
103014
103153
|
var outputFiles = [];
|
|
103015
|
-
var emitResult = ts.emitFilesAndReportErrors(program, reportDeclarationDiagnostics, undefined, undefined, function (name, text, writeByteOrderMark
|
|
103154
|
+
var emitResult = ts.emitFilesAndReportErrors(program, reportDeclarationDiagnostics, undefined, undefined, function (name, text, writeByteOrderMark) { return outputFiles.push({ name: name, text: text, writeByteOrderMark: writeByteOrderMark }); }, cancellationToken, false, customTransformers || ((_c = (_b = state.host).getCustomTransformers) === null || _c === void 0 ? void 0 : _c.call(_b, project))).emitResult;
|
|
103016
103155
|
if (declDiagnostics) {
|
|
103017
|
-
program.
|
|
103156
|
+
program.restoreState();
|
|
103018
103157
|
(_a = buildErrors(state, projectPath, program, config, declDiagnostics, BuildResultFlags.DeclarationEmitErrors, "Declaration file"), buildResult = _a.buildResult, step = _a.step);
|
|
103019
103158
|
return {
|
|
103020
103159
|
emitSkipped: true,
|
|
@@ -103023,43 +103162,35 @@ var ts;
|
|
|
103023
103162
|
}
|
|
103024
103163
|
var host = state.host, compilerHost = state.compilerHost;
|
|
103025
103164
|
var resultFlags = BuildResultFlags.DeclarationOutputUnchanged;
|
|
103026
|
-
var
|
|
103165
|
+
var newestDeclarationFileContentChangedTime = minimumDate;
|
|
103166
|
+
var anyDtsChanged = false;
|
|
103027
103167
|
var emitterDiagnostics = ts.createDiagnosticCollection();
|
|
103028
103168
|
var emittedOutputs = new ts.Map();
|
|
103029
|
-
var options = program.getCompilerOptions();
|
|
103030
|
-
var isIncremental = ts.isIncrementalCompilation(options);
|
|
103031
|
-
var outputTimeStampMap;
|
|
103032
|
-
var now;
|
|
103033
103169
|
outputFiles.forEach(function (_a) {
|
|
103034
|
-
var
|
|
103035
|
-
var
|
|
103036
|
-
|
|
103037
|
-
|
|
103038
|
-
|
|
103039
|
-
|
|
103040
|
-
|
|
103170
|
+
var name = _a.name, text = _a.text, writeByteOrderMark = _a.writeByteOrderMark;
|
|
103171
|
+
var priorChangeTime;
|
|
103172
|
+
if (!anyDtsChanged && ts.isDeclarationFileName(name)) {
|
|
103173
|
+
if (host.fileExists(name) && state.readFileWithCache(name) === text) {
|
|
103174
|
+
priorChangeTime = host.getModifiedTime(name);
|
|
103175
|
+
}
|
|
103176
|
+
else {
|
|
103041
103177
|
resultFlags &= ~BuildResultFlags.DeclarationOutputUnchanged;
|
|
103178
|
+
anyDtsChanged = true;
|
|
103042
103179
|
}
|
|
103043
103180
|
}
|
|
103181
|
+
emittedOutputs.set(toPath(state, name), name);
|
|
103044
103182
|
ts.writeFile(writeFileCallback ? { writeFile: writeFileCallback } : compilerHost, emitterDiagnostics, name, text, writeByteOrderMark);
|
|
103045
|
-
if (
|
|
103046
|
-
|
|
103183
|
+
if (priorChangeTime !== undefined) {
|
|
103184
|
+
newestDeclarationFileContentChangedTime = newer(priorChangeTime, newestDeclarationFileContentChangedTime);
|
|
103047
103185
|
}
|
|
103048
103186
|
});
|
|
103049
|
-
finishEmit(emitterDiagnostics, emittedOutputs, outputFiles.length ? outputFiles[0].name : ts.getFirstProjectOutput(config, !host.useCaseSensitiveFileNames()), resultFlags);
|
|
103187
|
+
finishEmit(emitterDiagnostics, emittedOutputs, newestDeclarationFileContentChangedTime, anyDtsChanged, outputFiles.length ? outputFiles[0].name : ts.getFirstProjectOutput(config, !host.useCaseSensitiveFileNames()), resultFlags);
|
|
103050
103188
|
return emitResult;
|
|
103051
103189
|
}
|
|
103052
103190
|
function emitBuildInfo(writeFileCallback, cancellationToken) {
|
|
103053
103191
|
ts.Debug.assertIsDefined(program);
|
|
103054
103192
|
ts.Debug.assert(step === BuildStep.EmitBuildInfo);
|
|
103055
|
-
var emitResult = program.emitBuildInfo(
|
|
103056
|
-
if (data === null || data === void 0 ? void 0 : data.buildInfo)
|
|
103057
|
-
setBuildInfo(state, data.buildInfo, projectPath, program.getCompilerOptions());
|
|
103058
|
-
if (writeFileCallback)
|
|
103059
|
-
writeFileCallback(name, text, writeByteOrderMark, onError, sourceFiles, data);
|
|
103060
|
-
else
|
|
103061
|
-
state.compilerHost.writeFile(name, text, writeByteOrderMark, onError, sourceFiles, data);
|
|
103062
|
-
}, cancellationToken);
|
|
103193
|
+
var emitResult = program.emitBuildInfo(writeFileCallback, cancellationToken);
|
|
103063
103194
|
if (emitResult.diagnostics.length) {
|
|
103064
103195
|
reportErrors(state, emitResult.diagnostics);
|
|
103065
103196
|
state.diagnostics.set(projectPath, __spreadArray(__spreadArray([], state.diagnostics.get(projectPath), true), emitResult.diagnostics, true));
|
|
@@ -103072,7 +103203,7 @@ var ts;
|
|
|
103072
103203
|
step = BuildStep.QueueReferencingProjects;
|
|
103073
103204
|
return emitResult;
|
|
103074
103205
|
}
|
|
103075
|
-
function finishEmit(emitterDiagnostics, emittedOutputs, oldestOutputFileName, resultFlags) {
|
|
103206
|
+
function finishEmit(emitterDiagnostics, emittedOutputs, priorNewestUpdateTime, newestDeclarationFileContentChangedTimeIsMaximumDate, oldestOutputFileName, resultFlags) {
|
|
103076
103207
|
var _a;
|
|
103077
103208
|
var emitDiagnostics = emitterDiagnostics.getDiagnostics();
|
|
103078
103209
|
if (emitDiagnostics.length) {
|
|
@@ -103082,11 +103213,13 @@ var ts;
|
|
|
103082
103213
|
if (state.write) {
|
|
103083
103214
|
emittedOutputs.forEach(function (name) { return listEmittedFile(state, config, name); });
|
|
103084
103215
|
}
|
|
103085
|
-
updateOutputTimestampsWorker(state, config,
|
|
103216
|
+
var newestDeclarationFileContentChangedTime = updateOutputTimestampsWorker(state, config, priorNewestUpdateTime, ts.Diagnostics.Updating_unchanged_output_timestamps_of_project_0, emittedOutputs);
|
|
103086
103217
|
state.diagnostics.delete(projectPath);
|
|
103087
103218
|
state.projectStatus.set(projectPath, {
|
|
103088
103219
|
type: ts.UpToDateStatusType.UpToDate,
|
|
103089
|
-
newestDeclarationFileContentChangedTime:
|
|
103220
|
+
newestDeclarationFileContentChangedTime: newestDeclarationFileContentChangedTimeIsMaximumDate ?
|
|
103221
|
+
maximumDate :
|
|
103222
|
+
newestDeclarationFileContentChangedTime,
|
|
103090
103223
|
oldestOutputFileName: oldestOutputFileName
|
|
103091
103224
|
});
|
|
103092
103225
|
afterProgramDone(state, program, config);
|
|
@@ -103119,21 +103252,12 @@ var ts;
|
|
|
103119
103252
|
ts.Debug.assert(!!outputFiles.length);
|
|
103120
103253
|
var emitterDiagnostics = ts.createDiagnosticCollection();
|
|
103121
103254
|
var emittedOutputs = new ts.Map();
|
|
103122
|
-
var resultFlags = BuildResultFlags.DeclarationOutputUnchanged;
|
|
103123
|
-
var existingBuildInfo = state.buildInfoCache.get(projectPath).buildInfo;
|
|
103124
103255
|
outputFiles.forEach(function (_a) {
|
|
103125
|
-
var
|
|
103126
|
-
var name = _a.name, text = _a.text, writeByteOrderMark = _a.writeByteOrderMark, buildInfo = _a.buildInfo;
|
|
103256
|
+
var name = _a.name, text = _a.text, writeByteOrderMark = _a.writeByteOrderMark;
|
|
103127
103257
|
emittedOutputs.set(toPath(state, name), name);
|
|
103128
|
-
if (buildInfo) {
|
|
103129
|
-
setBuildInfo(state, buildInfo, projectPath, config.options);
|
|
103130
|
-
if (((_b = buildInfo.program) === null || _b === void 0 ? void 0 : _b.dtsChangeTime) !== ((_c = existingBuildInfo.program) === null || _c === void 0 ? void 0 : _c.dtsChangeTime)) {
|
|
103131
|
-
resultFlags &= ~BuildResultFlags.DeclarationOutputUnchanged;
|
|
103132
|
-
}
|
|
103133
|
-
}
|
|
103134
103258
|
ts.writeFile(writeFileCallback ? { writeFile: writeFileCallback } : compilerHost, emitterDiagnostics, name, text, writeByteOrderMark);
|
|
103135
103259
|
});
|
|
103136
|
-
var emitDiagnostics = finishEmit(emitterDiagnostics, emittedOutputs, outputFiles[0].name,
|
|
103260
|
+
var emitDiagnostics = finishEmit(emitterDiagnostics, emittedOutputs, minimumDate, false, outputFiles[0].name, BuildResultFlags.DeclarationOutputUnchanged);
|
|
103137
103261
|
return { emitSkipped: false, diagnostics: emitDiagnostics };
|
|
103138
103262
|
}
|
|
103139
103263
|
function executeSteps(till, cancellationToken, writeFile, customTransformers) {
|
|
@@ -103233,7 +103357,7 @@ var ts;
|
|
|
103233
103357
|
}
|
|
103234
103358
|
continue;
|
|
103235
103359
|
}
|
|
103236
|
-
if (status.type === ts.UpToDateStatusType.UpToDateWithUpstreamTypes
|
|
103360
|
+
if (status.type === ts.UpToDateStatusType.UpToDateWithUpstreamTypes) {
|
|
103237
103361
|
reportAndStoreErrors(state, projectPath, ts.getConfigFileParsingDiagnostics(config));
|
|
103238
103362
|
return createUpdateOutputFileStampsProject(state, project, projectPath, config, buildOrder);
|
|
103239
103363
|
}
|
|
@@ -103289,7 +103413,7 @@ var ts;
|
|
|
103289
103413
|
state.projectCompilerOptions = state.baseCompilerOptions;
|
|
103290
103414
|
}
|
|
103291
103415
|
function buildErrors(state, resolvedPath, program, config, diagnostics, buildResult, errorType) {
|
|
103292
|
-
var canEmitBuildInfo = program && !ts.outFile(program.getCompilerOptions());
|
|
103416
|
+
var canEmitBuildInfo = !(buildResult & BuildResultFlags.SyntaxErrors) && program && !ts.outFile(program.getCompilerOptions());
|
|
103293
103417
|
reportAndStoreErrors(state, resolvedPath, diagnostics);
|
|
103294
103418
|
state.projectStatus.set(resolvedPath, { type: ts.UpToDateStatusType.Unbuildable, reason: errorType + " errors" });
|
|
103295
103419
|
if (canEmitBuildInfo)
|
|
@@ -103297,94 +103421,8 @@ var ts;
|
|
|
103297
103421
|
afterProgramDone(state, program, config);
|
|
103298
103422
|
return { buildResult: buildResult, step: BuildStep.QueueReferencingProjects };
|
|
103299
103423
|
}
|
|
103300
|
-
function isFileWatcherWithModifiedTime(value) {
|
|
103301
|
-
return !!value.watcher;
|
|
103302
|
-
}
|
|
103303
|
-
function getModifiedTime(state, fileName) {
|
|
103304
|
-
var path = toPath(state, fileName);
|
|
103305
|
-
var existing = state.filesWatched.get(path);
|
|
103306
|
-
if (state.watch && !!existing) {
|
|
103307
|
-
if (!isFileWatcherWithModifiedTime(existing))
|
|
103308
|
-
return existing;
|
|
103309
|
-
if (existing.modifiedTime)
|
|
103310
|
-
return existing.modifiedTime;
|
|
103311
|
-
}
|
|
103312
|
-
var result = ts.getModifiedTime(state.host, fileName);
|
|
103313
|
-
if (state.watch) {
|
|
103314
|
-
if (existing)
|
|
103315
|
-
existing.modifiedTime = result;
|
|
103316
|
-
else
|
|
103317
|
-
state.filesWatched.set(path, result);
|
|
103318
|
-
}
|
|
103319
|
-
return result;
|
|
103320
|
-
}
|
|
103321
|
-
function watchFile(state, file, callback, pollingInterval, options, watchType, project) {
|
|
103322
|
-
var path = toPath(state, file);
|
|
103323
|
-
var existing = state.filesWatched.get(path);
|
|
103324
|
-
if (existing && isFileWatcherWithModifiedTime(existing)) {
|
|
103325
|
-
existing.callbacks.push(callback);
|
|
103326
|
-
}
|
|
103327
|
-
else {
|
|
103328
|
-
var watcher = state.watchFile(file, function (fileName, eventKind, modifiedTime) {
|
|
103329
|
-
var existing = ts.Debug.checkDefined(state.filesWatched.get(path));
|
|
103330
|
-
ts.Debug.assert(isFileWatcherWithModifiedTime(existing));
|
|
103331
|
-
existing.modifiedTime = modifiedTime;
|
|
103332
|
-
existing.callbacks.forEach(function (cb) { return cb(fileName, eventKind, modifiedTime); });
|
|
103333
|
-
}, pollingInterval, options, watchType, project);
|
|
103334
|
-
state.filesWatched.set(path, { callbacks: [callback], watcher: watcher, modifiedTime: existing });
|
|
103335
|
-
}
|
|
103336
|
-
return {
|
|
103337
|
-
close: function () {
|
|
103338
|
-
var existing = ts.Debug.checkDefined(state.filesWatched.get(path));
|
|
103339
|
-
ts.Debug.assert(isFileWatcherWithModifiedTime(existing));
|
|
103340
|
-
if (existing.callbacks.length === 1) {
|
|
103341
|
-
state.filesWatched.delete(path);
|
|
103342
|
-
ts.closeFileWatcherOf(existing);
|
|
103343
|
-
}
|
|
103344
|
-
else {
|
|
103345
|
-
ts.unorderedRemoveItem(existing.callbacks, callback);
|
|
103346
|
-
}
|
|
103347
|
-
}
|
|
103348
|
-
};
|
|
103349
|
-
}
|
|
103350
|
-
function getOutputTimeStampMap(state, resolvedConfigFilePath) {
|
|
103351
|
-
if (!state.watch)
|
|
103352
|
-
return undefined;
|
|
103353
|
-
var result = state.outputTimeStamps.get(resolvedConfigFilePath);
|
|
103354
|
-
if (!result)
|
|
103355
|
-
state.outputTimeStamps.set(resolvedConfigFilePath, result = new ts.Map());
|
|
103356
|
-
return result;
|
|
103357
|
-
}
|
|
103358
|
-
function setBuildInfo(state, buildInfo, resolvedConfigPath, options) {
|
|
103359
|
-
var buildInfoPath = ts.getTsBuildInfoEmitOutputFilePath(options);
|
|
103360
|
-
var existing = getBuildInfoCacheEntry(state, buildInfoPath, resolvedConfigPath);
|
|
103361
|
-
if (existing) {
|
|
103362
|
-
existing.buildInfo = buildInfo;
|
|
103363
|
-
existing.modifiedTime = getCurrentTime(state.host);
|
|
103364
|
-
}
|
|
103365
|
-
else {
|
|
103366
|
-
state.buildInfoCache.set(resolvedConfigPath, { path: toPath(state, buildInfoPath), buildInfo: buildInfo, modifiedTime: getCurrentTime(state.host) });
|
|
103367
|
-
}
|
|
103368
|
-
}
|
|
103369
|
-
function getBuildInfoCacheEntry(state, buildInfoPath, resolvedConfigPath) {
|
|
103370
|
-
var path = toPath(state, buildInfoPath);
|
|
103371
|
-
var existing = state.buildInfoCache.get(resolvedConfigPath);
|
|
103372
|
-
return (existing === null || existing === void 0 ? void 0 : existing.path) === path ? existing : undefined;
|
|
103373
|
-
}
|
|
103374
|
-
function getBuildInfo(state, buildInfoPath, resolvedConfigPath, modifiedTime) {
|
|
103375
|
-
var path = toPath(state, buildInfoPath);
|
|
103376
|
-
var existing = state.buildInfoCache.get(resolvedConfigPath);
|
|
103377
|
-
if (existing !== undefined && existing.path === path) {
|
|
103378
|
-
return existing.buildInfo || undefined;
|
|
103379
|
-
}
|
|
103380
|
-
var value = state.readFileWithCache(buildInfoPath);
|
|
103381
|
-
var buildInfo = value ? ts.getBuildInfo(value) : undefined;
|
|
103382
|
-
ts.Debug.assert(modifiedTime || !buildInfo);
|
|
103383
|
-
state.buildInfoCache.set(resolvedConfigPath, { path: path, buildInfo: buildInfo || false, modifiedTime: modifiedTime || ts.missingFileModifiedTime });
|
|
103384
|
-
return buildInfo;
|
|
103385
|
-
}
|
|
103386
103424
|
function checkConfigFileUpToDateStatus(state, configFile, oldestOutputFileTime, oldestOutputFileName) {
|
|
103387
|
-
var tsconfigTime = getModifiedTime(state, configFile);
|
|
103425
|
+
var tsconfigTime = ts.getModifiedTime(state.host, configFile);
|
|
103388
103426
|
if (oldestOutputFileTime < tsconfigTime) {
|
|
103389
103427
|
return {
|
|
103390
103428
|
type: ts.UpToDateStatusType.OutOfDateWithSelf,
|
|
@@ -103394,22 +103432,76 @@ var ts;
|
|
|
103394
103432
|
}
|
|
103395
103433
|
}
|
|
103396
103434
|
function getUpToDateStatusWorker(state, project, resolvedPath) {
|
|
103397
|
-
var
|
|
103435
|
+
var force = !!state.options.force;
|
|
103436
|
+
var newestInputFileName = undefined;
|
|
103437
|
+
var newestInputFileTime = minimumDate;
|
|
103438
|
+
var host = state.host;
|
|
103439
|
+
for (var _i = 0, _a = project.fileNames; _i < _a.length; _i++) {
|
|
103440
|
+
var inputFile = _a[_i];
|
|
103441
|
+
if (!host.fileExists(inputFile)) {
|
|
103442
|
+
return {
|
|
103443
|
+
type: ts.UpToDateStatusType.Unbuildable,
|
|
103444
|
+
reason: inputFile + " does not exist"
|
|
103445
|
+
};
|
|
103446
|
+
}
|
|
103447
|
+
if (!force) {
|
|
103448
|
+
var inputTime = ts.getModifiedTime(host, inputFile);
|
|
103449
|
+
if (inputTime > newestInputFileTime) {
|
|
103450
|
+
newestInputFileName = inputFile;
|
|
103451
|
+
newestInputFileTime = inputTime;
|
|
103452
|
+
}
|
|
103453
|
+
}
|
|
103454
|
+
}
|
|
103398
103455
|
if (!project.fileNames.length && !ts.canJsonReportNoInputFiles(project.raw)) {
|
|
103399
103456
|
return {
|
|
103400
103457
|
type: ts.UpToDateStatusType.ContainerOnly
|
|
103401
103458
|
};
|
|
103402
103459
|
}
|
|
103403
|
-
var
|
|
103404
|
-
var
|
|
103460
|
+
var outputs = ts.getAllProjectOutputs(project, !host.useCaseSensitiveFileNames());
|
|
103461
|
+
var oldestOutputFileName = "(none)";
|
|
103462
|
+
var oldestOutputFileTime = maximumDate;
|
|
103463
|
+
var newestOutputFileName = "(none)";
|
|
103464
|
+
var newestOutputFileTime = minimumDate;
|
|
103465
|
+
var missingOutputFileName;
|
|
103466
|
+
var newestDeclarationFileContentChangedTime = minimumDate;
|
|
103467
|
+
var isOutOfDateWithInputs = false;
|
|
103468
|
+
if (!force) {
|
|
103469
|
+
for (var _b = 0, outputs_1 = outputs; _b < outputs_1.length; _b++) {
|
|
103470
|
+
var output = outputs_1[_b];
|
|
103471
|
+
if (!host.fileExists(output)) {
|
|
103472
|
+
missingOutputFileName = output;
|
|
103473
|
+
break;
|
|
103474
|
+
}
|
|
103475
|
+
var outputTime = ts.getModifiedTime(host, output);
|
|
103476
|
+
if (outputTime < oldestOutputFileTime) {
|
|
103477
|
+
oldestOutputFileTime = outputTime;
|
|
103478
|
+
oldestOutputFileName = output;
|
|
103479
|
+
}
|
|
103480
|
+
if (outputTime < newestInputFileTime) {
|
|
103481
|
+
isOutOfDateWithInputs = true;
|
|
103482
|
+
break;
|
|
103483
|
+
}
|
|
103484
|
+
if (outputTime > newestOutputFileTime) {
|
|
103485
|
+
newestOutputFileTime = outputTime;
|
|
103486
|
+
newestOutputFileName = output;
|
|
103487
|
+
}
|
|
103488
|
+
if (ts.isDeclarationFileName(output)) {
|
|
103489
|
+
var outputModifiedTime = ts.getModifiedTime(host, output);
|
|
103490
|
+
newestDeclarationFileContentChangedTime = newer(newestDeclarationFileContentChangedTime, outputModifiedTime);
|
|
103491
|
+
}
|
|
103492
|
+
}
|
|
103493
|
+
}
|
|
103494
|
+
var pseudoUpToDate = false;
|
|
103495
|
+
var usesPrepend = false;
|
|
103496
|
+
var upstreamChangedProject;
|
|
103405
103497
|
if (project.projectReferences) {
|
|
103406
103498
|
state.projectStatus.set(resolvedPath, { type: ts.UpToDateStatusType.ComputingUpstream });
|
|
103407
|
-
for (var
|
|
103408
|
-
var ref = _d[
|
|
103499
|
+
for (var _c = 0, _d = project.projectReferences; _c < _d.length; _c++) {
|
|
103500
|
+
var ref = _d[_c];
|
|
103501
|
+
usesPrepend = usesPrepend || !!(ref.prepend);
|
|
103409
103502
|
var resolvedRef = ts.resolveProjectReferencePath(ref);
|
|
103410
103503
|
var resolvedRefPath = toResolvedConfigFilePath(state, resolvedRef);
|
|
103411
|
-
var
|
|
103412
|
-
var refStatus = getUpToDateStatus(state, resolvedConfig, resolvedRefPath);
|
|
103504
|
+
var refStatus = getUpToDateStatus(state, parseConfigFile(state, resolvedRef, resolvedRefPath), resolvedRefPath);
|
|
103413
103505
|
if (refStatus.type === ts.UpToDateStatusType.ComputingUpstream ||
|
|
103414
103506
|
refStatus.type === ts.UpToDateStatusType.ContainerOnly) {
|
|
103415
103507
|
continue;
|
|
@@ -103428,169 +103520,65 @@ var ts;
|
|
|
103428
103520
|
upstreamProjectName: ref.path
|
|
103429
103521
|
};
|
|
103430
103522
|
}
|
|
103431
|
-
if (!force)
|
|
103432
|
-
|
|
103433
|
-
|
|
103434
|
-
|
|
103435
|
-
|
|
103436
|
-
|
|
103437
|
-
|
|
103438
|
-
|
|
103439
|
-
|
|
103440
|
-
|
|
103441
|
-
var buildInfoTime;
|
|
103442
|
-
var buildInfoProgram;
|
|
103443
|
-
var buildInfoVersionMap;
|
|
103444
|
-
var newestDeclarationFileContentChangedTime;
|
|
103445
|
-
if (buildInfoPath) {
|
|
103446
|
-
var buildInfoCacheEntry_1 = getBuildInfoCacheEntry(state, buildInfoPath, resolvedPath);
|
|
103447
|
-
buildInfoTime = (buildInfoCacheEntry_1 === null || buildInfoCacheEntry_1 === void 0 ? void 0 : buildInfoCacheEntry_1.modifiedTime) || ts.getModifiedTime(host, buildInfoPath);
|
|
103448
|
-
if (buildInfoTime === ts.missingFileModifiedTime) {
|
|
103449
|
-
if (!buildInfoCacheEntry_1) {
|
|
103450
|
-
state.buildInfoCache.set(resolvedPath, {
|
|
103451
|
-
path: toPath(state, buildInfoPath),
|
|
103452
|
-
buildInfo: false,
|
|
103453
|
-
modifiedTime: buildInfoTime
|
|
103454
|
-
});
|
|
103455
|
-
}
|
|
103456
|
-
return {
|
|
103457
|
-
type: ts.UpToDateStatusType.OutputMissing,
|
|
103458
|
-
missingOutputFileName: buildInfoPath
|
|
103459
|
-
};
|
|
103460
|
-
}
|
|
103461
|
-
var buildInfo = ts.Debug.checkDefined(getBuildInfo(state, buildInfoPath, resolvedPath, buildInfoTime));
|
|
103462
|
-
if ((buildInfo.bundle || buildInfo.program) && buildInfo.version !== ts.version) {
|
|
103463
|
-
return {
|
|
103464
|
-
type: ts.UpToDateStatusType.TsVersionOutputOfDate,
|
|
103465
|
-
version: buildInfo.version
|
|
103466
|
-
};
|
|
103467
|
-
}
|
|
103468
|
-
if (buildInfo.program) {
|
|
103469
|
-
if (((_a = buildInfo.program.changeFileSet) === null || _a === void 0 ? void 0 : _a.length) ||
|
|
103470
|
-
(!project.options.noEmit && ((_b = buildInfo.program.affectedFilesPendingEmit) === null || _b === void 0 ? void 0 : _b.length))) {
|
|
103523
|
+
if (!force && !missingOutputFileName) {
|
|
103524
|
+
if (refStatus.newestInputFileTime && refStatus.newestInputFileTime <= oldestOutputFileTime) {
|
|
103525
|
+
continue;
|
|
103526
|
+
}
|
|
103527
|
+
if (refStatus.newestDeclarationFileContentChangedTime && refStatus.newestDeclarationFileContentChangedTime <= oldestOutputFileTime) {
|
|
103528
|
+
pseudoUpToDate = true;
|
|
103529
|
+
upstreamChangedProject = ref.path;
|
|
103530
|
+
continue;
|
|
103531
|
+
}
|
|
103532
|
+
ts.Debug.assert(oldestOutputFileName !== undefined, "Should have an oldest output filename here");
|
|
103471
103533
|
return {
|
|
103472
|
-
type: ts.UpToDateStatusType.
|
|
103473
|
-
|
|
103534
|
+
type: ts.UpToDateStatusType.OutOfDateWithUpstream,
|
|
103535
|
+
outOfDateOutputFileName: oldestOutputFileName,
|
|
103536
|
+
newerProjectName: ref.path
|
|
103474
103537
|
};
|
|
103475
103538
|
}
|
|
103476
|
-
buildInfoProgram = buildInfo.program;
|
|
103477
103539
|
}
|
|
103478
|
-
oldestOutputFileTime = buildInfoTime;
|
|
103479
|
-
oldestOutputFileName = buildInfoPath;
|
|
103480
|
-
newestDeclarationFileContentChangedTime = ((_c = buildInfo.program) === null || _c === void 0 ? void 0 : _c.dtsChangeTime) ? new Date(buildInfo.program.dtsChangeTime) : undefined;
|
|
103481
103540
|
}
|
|
103482
|
-
|
|
103483
|
-
|
|
103484
|
-
|
|
103485
|
-
|
|
103486
|
-
|
|
103487
|
-
var inputTime = getModifiedTime(state, inputFile);
|
|
103488
|
-
if (inputTime === ts.missingFileModifiedTime) {
|
|
103489
|
-
return {
|
|
103490
|
-
type: ts.UpToDateStatusType.Unbuildable,
|
|
103491
|
-
reason: inputFile + " does not exist"
|
|
103492
|
-
};
|
|
103493
|
-
}
|
|
103494
|
-
if (buildInfoTime && buildInfoTime < inputTime) {
|
|
103495
|
-
var version_3 = void 0;
|
|
103496
|
-
var currentVersion = void 0;
|
|
103497
|
-
if (buildInfoProgram) {
|
|
103498
|
-
if (!buildInfoVersionMap)
|
|
103499
|
-
buildInfoVersionMap = ts.getBuildInfoFileVersionMap(buildInfoProgram, buildInfoPath, host);
|
|
103500
|
-
version_3 = buildInfoVersionMap.get(toPath(state, inputFile));
|
|
103501
|
-
var text = version_3 ? state.readFileWithCache(inputFile) : undefined;
|
|
103502
|
-
currentVersion = text && (host.createHash || ts.generateDjb2Hash)(text);
|
|
103503
|
-
if (version_3 && version_3 === currentVersion)
|
|
103504
|
-
pseudoInputUptodate = true;
|
|
103505
|
-
}
|
|
103506
|
-
if (!version_3 || version_3 !== currentVersion) {
|
|
103507
|
-
return {
|
|
103508
|
-
type: ts.UpToDateStatusType.OutOfDateWithSelf,
|
|
103509
|
-
outOfDateOutputFileName: buildInfoPath,
|
|
103510
|
-
newerInputFileName: inputFile
|
|
103511
|
-
};
|
|
103512
|
-
}
|
|
103513
|
-
}
|
|
103514
|
-
if (inputTime > newestInputFileTime) {
|
|
103515
|
-
newestInputFileName = inputFile;
|
|
103516
|
-
newestInputFileTime = inputTime;
|
|
103517
|
-
}
|
|
103541
|
+
if (missingOutputFileName !== undefined) {
|
|
103542
|
+
return {
|
|
103543
|
+
type: ts.UpToDateStatusType.OutputMissing,
|
|
103544
|
+
missingOutputFileName: missingOutputFileName
|
|
103545
|
+
};
|
|
103518
103546
|
}
|
|
103519
|
-
if (
|
|
103520
|
-
|
|
103521
|
-
|
|
103522
|
-
|
|
103523
|
-
|
|
103524
|
-
|
|
103525
|
-
var outputTime = outputTimeStampMap === null || outputTimeStampMap === void 0 ? void 0 : outputTimeStampMap.get(path);
|
|
103526
|
-
if (!outputTime) {
|
|
103527
|
-
outputTime = ts.getModifiedTime(state.host, output);
|
|
103528
|
-
outputTimeStampMap === null || outputTimeStampMap === void 0 ? void 0 : outputTimeStampMap.set(path, outputTime);
|
|
103529
|
-
}
|
|
103530
|
-
if (outputTime === ts.missingFileModifiedTime) {
|
|
103531
|
-
return {
|
|
103532
|
-
type: ts.UpToDateStatusType.OutputMissing,
|
|
103533
|
-
missingOutputFileName: output
|
|
103534
|
-
};
|
|
103535
|
-
}
|
|
103536
|
-
if (outputTime < oldestOutputFileTime) {
|
|
103537
|
-
oldestOutputFileTime = outputTime;
|
|
103538
|
-
oldestOutputFileName = output;
|
|
103539
|
-
}
|
|
103540
|
-
if (outputTime < newestInputFileTime) {
|
|
103541
|
-
return {
|
|
103542
|
-
type: ts.UpToDateStatusType.OutOfDateWithSelf,
|
|
103543
|
-
outOfDateOutputFileName: oldestOutputFileName,
|
|
103544
|
-
newerInputFileName: newestInputFileName
|
|
103545
|
-
};
|
|
103546
|
-
}
|
|
103547
|
-
}
|
|
103547
|
+
if (isOutOfDateWithInputs) {
|
|
103548
|
+
return {
|
|
103549
|
+
type: ts.UpToDateStatusType.OutOfDateWithSelf,
|
|
103550
|
+
outOfDateOutputFileName: oldestOutputFileName,
|
|
103551
|
+
newerInputFileName: newestInputFileName
|
|
103552
|
+
};
|
|
103548
103553
|
}
|
|
103549
|
-
|
|
103550
|
-
|
|
103551
|
-
|
|
103552
|
-
|
|
103553
|
-
|
|
103554
|
-
|
|
103555
|
-
|
|
103556
|
-
|
|
103557
|
-
var
|
|
103558
|
-
|
|
103559
|
-
|
|
103560
|
-
|
|
103561
|
-
|
|
103562
|
-
|
|
103554
|
+
else {
|
|
103555
|
+
var configStatus = checkConfigFileUpToDateStatus(state, project.options.configFilePath, oldestOutputFileTime, oldestOutputFileName);
|
|
103556
|
+
if (configStatus)
|
|
103557
|
+
return configStatus;
|
|
103558
|
+
var extendedConfigStatus = ts.forEach(project.options.configFile.extendedSourceFiles || ts.emptyArray, function (configFile) { return checkConfigFileUpToDateStatus(state, configFile, oldestOutputFileTime, oldestOutputFileName); });
|
|
103559
|
+
if (extendedConfigStatus)
|
|
103560
|
+
return extendedConfigStatus;
|
|
103561
|
+
var dependentPackageFileStatus = ts.forEach(state.lastCachedPackageJsonLookups.get(resolvedPath) || ts.emptyArray, function (_a) {
|
|
103562
|
+
var path = _a[0];
|
|
103563
|
+
return checkConfigFileUpToDateStatus(state, path, oldestOutputFileTime, oldestOutputFileName);
|
|
103564
|
+
});
|
|
103565
|
+
if (dependentPackageFileStatus)
|
|
103566
|
+
return dependentPackageFileStatus;
|
|
103567
|
+
}
|
|
103568
|
+
if (!force && !state.buildInfoChecked.has(resolvedPath)) {
|
|
103569
|
+
state.buildInfoChecked.set(resolvedPath, true);
|
|
103570
|
+
var buildInfoPath = ts.getTsBuildInfoEmitOutputFilePath(project.options);
|
|
103571
|
+
if (buildInfoPath) {
|
|
103572
|
+
var value = state.readFileWithCache(buildInfoPath);
|
|
103573
|
+
var buildInfo = value && ts.getBuildInfo(value);
|
|
103574
|
+
if (buildInfo && (buildInfo.bundle || buildInfo.program) && buildInfo.version !== ts.version) {
|
|
103563
103575
|
return {
|
|
103564
|
-
type: ts.UpToDateStatusType.
|
|
103565
|
-
|
|
103566
|
-
newerProjectName: ref.path
|
|
103576
|
+
type: ts.UpToDateStatusType.TsVersionOutputOfDate,
|
|
103577
|
+
version: buildInfo.version
|
|
103567
103578
|
};
|
|
103568
103579
|
}
|
|
103569
|
-
if (refStatus.newestDeclarationFileContentChangedTime && refStatus.newestDeclarationFileContentChangedTime <= oldestOutputFileTime) {
|
|
103570
|
-
pseudoUpToDate = true;
|
|
103571
|
-
upstreamChangedProject = ref.path;
|
|
103572
|
-
continue;
|
|
103573
|
-
}
|
|
103574
|
-
ts.Debug.assert(oldestOutputFileName !== undefined, "Should have an oldest output filename here");
|
|
103575
|
-
return {
|
|
103576
|
-
type: ts.UpToDateStatusType.OutOfDateWithUpstream,
|
|
103577
|
-
outOfDateOutputFileName: oldestOutputFileName,
|
|
103578
|
-
newerProjectName: ref.path
|
|
103579
|
-
};
|
|
103580
103580
|
}
|
|
103581
103581
|
}
|
|
103582
|
-
var configStatus = checkConfigFileUpToDateStatus(state, project.options.configFilePath, oldestOutputFileTime, oldestOutputFileName);
|
|
103583
|
-
if (configStatus)
|
|
103584
|
-
return configStatus;
|
|
103585
|
-
var extendedConfigStatus = ts.forEach(project.options.configFile.extendedSourceFiles || ts.emptyArray, function (configFile) { return checkConfigFileUpToDateStatus(state, configFile, oldestOutputFileTime, oldestOutputFileName); });
|
|
103586
|
-
if (extendedConfigStatus)
|
|
103587
|
-
return extendedConfigStatus;
|
|
103588
|
-
var dependentPackageFileStatus = ts.forEach(state.lastCachedPackageJsonLookups.get(resolvedPath) || ts.emptyArray, function (_a) {
|
|
103589
|
-
var path = _a[0];
|
|
103590
|
-
return checkConfigFileUpToDateStatus(state, path, oldestOutputFileTime, oldestOutputFileName);
|
|
103591
|
-
});
|
|
103592
|
-
if (dependentPackageFileStatus)
|
|
103593
|
-
return dependentPackageFileStatus;
|
|
103594
103582
|
if (usesPrepend && pseudoUpToDate) {
|
|
103595
103583
|
return {
|
|
103596
103584
|
type: ts.UpToDateStatusType.OutOfDateWithPrepend,
|
|
@@ -103599,36 +103587,15 @@ var ts;
|
|
|
103599
103587
|
};
|
|
103600
103588
|
}
|
|
103601
103589
|
return {
|
|
103602
|
-
type: pseudoUpToDate ?
|
|
103603
|
-
ts.UpToDateStatusType.UpToDateWithUpstreamTypes :
|
|
103604
|
-
pseudoInputUptodate ?
|
|
103605
|
-
ts.UpToDateStatusType.UpToDateWithInputFileText :
|
|
103606
|
-
ts.UpToDateStatusType.UpToDate,
|
|
103590
|
+
type: pseudoUpToDate ? ts.UpToDateStatusType.UpToDateWithUpstreamTypes : ts.UpToDateStatusType.UpToDate,
|
|
103607
103591
|
newestDeclarationFileContentChangedTime: newestDeclarationFileContentChangedTime,
|
|
103608
103592
|
newestInputFileTime: newestInputFileTime,
|
|
103593
|
+
newestOutputFileTime: newestOutputFileTime,
|
|
103609
103594
|
newestInputFileName: newestInputFileName,
|
|
103595
|
+
newestOutputFileName: newestOutputFileName,
|
|
103610
103596
|
oldestOutputFileName: oldestOutputFileName
|
|
103611
103597
|
};
|
|
103612
103598
|
}
|
|
103613
|
-
function hasSameBuildInfo(state, buildInfoCacheEntry, seenRefs, resolvedConfig, resolvedRefPath) {
|
|
103614
|
-
if (seenRefs.has(resolvedRefPath))
|
|
103615
|
-
return false;
|
|
103616
|
-
seenRefs.add(resolvedRefPath);
|
|
103617
|
-
var refBuildInfo = state.buildInfoCache.get(resolvedRefPath);
|
|
103618
|
-
if (refBuildInfo.path === buildInfoCacheEntry.path)
|
|
103619
|
-
return true;
|
|
103620
|
-
if (resolvedConfig.projectReferences) {
|
|
103621
|
-
for (var _i = 0, _a = resolvedConfig.projectReferences; _i < _a.length; _i++) {
|
|
103622
|
-
var ref = _a[_i];
|
|
103623
|
-
var resolvedRef = ts.resolveProjectReferencePath(ref);
|
|
103624
|
-
var resolvedRefPath_1 = toResolvedConfigFilePath(state, resolvedRef);
|
|
103625
|
-
var resolvedConfig_1 = parseConfigFile(state, resolvedRef, resolvedRefPath_1);
|
|
103626
|
-
if (hasSameBuildInfo(state, buildInfoCacheEntry, seenRefs, resolvedConfig_1, resolvedRefPath_1))
|
|
103627
|
-
return true;
|
|
103628
|
-
}
|
|
103629
|
-
}
|
|
103630
|
-
return false;
|
|
103631
|
-
}
|
|
103632
103599
|
function getUpToDateStatus(state, project, resolvedPath) {
|
|
103633
103600
|
if (project === undefined) {
|
|
103634
103601
|
return { type: ts.UpToDateStatusType.Unbuildable, reason: "File deleted mid-build" };
|
|
@@ -103641,64 +103608,39 @@ var ts;
|
|
|
103641
103608
|
state.projectStatus.set(resolvedPath, actual);
|
|
103642
103609
|
return actual;
|
|
103643
103610
|
}
|
|
103644
|
-
function updateOutputTimestampsWorker(state, proj,
|
|
103611
|
+
function updateOutputTimestampsWorker(state, proj, priorNewestUpdateTime, verboseMessage, skipOutputs) {
|
|
103645
103612
|
if (proj.options.noEmit)
|
|
103646
|
-
return;
|
|
103647
|
-
var now;
|
|
103648
|
-
var buildInfoPath = ts.getTsBuildInfoEmitOutputFilePath(proj.options);
|
|
103649
|
-
if (buildInfoPath) {
|
|
103650
|
-
if (!(skipOutputs === null || skipOutputs === void 0 ? void 0 : skipOutputs.has(toPath(state, buildInfoPath)))) {
|
|
103651
|
-
if (!!state.options.verbose)
|
|
103652
|
-
reportStatus(state, verboseMessage, proj.options.configFilePath);
|
|
103653
|
-
state.host.setModifiedTime(buildInfoPath, now = getCurrentTime(state.host));
|
|
103654
|
-
getBuildInfoCacheEntry(state, buildInfoPath, projectPath).modifiedTime = now;
|
|
103655
|
-
}
|
|
103656
|
-
state.outputTimeStamps.delete(projectPath);
|
|
103657
|
-
return;
|
|
103658
|
-
}
|
|
103613
|
+
return priorNewestUpdateTime;
|
|
103659
103614
|
var host = state.host;
|
|
103660
103615
|
var outputs = ts.getAllProjectOutputs(proj, !host.useCaseSensitiveFileNames());
|
|
103661
|
-
var outputTimeStampMap = getOutputTimeStampMap(state, projectPath);
|
|
103662
|
-
var modifiedOutputs = outputTimeStampMap ? new ts.Set() : undefined;
|
|
103663
103616
|
if (!skipOutputs || outputs.length !== skipOutputs.size) {
|
|
103664
103617
|
var reportVerbose = !!state.options.verbose;
|
|
103618
|
+
var now = host.now ? host.now() : new Date();
|
|
103665
103619
|
for (var _i = 0, outputs_2 = outputs; _i < outputs_2.length; _i++) {
|
|
103666
103620
|
var file = outputs_2[_i];
|
|
103667
|
-
|
|
103668
|
-
if (skipOutputs === null || skipOutputs === void 0 ? void 0 : skipOutputs.has(path))
|
|
103621
|
+
if (skipOutputs && skipOutputs.has(toPath(state, file))) {
|
|
103669
103622
|
continue;
|
|
103623
|
+
}
|
|
103670
103624
|
if (reportVerbose) {
|
|
103671
103625
|
reportVerbose = false;
|
|
103672
103626
|
reportStatus(state, verboseMessage, proj.options.configFilePath);
|
|
103673
103627
|
}
|
|
103674
|
-
|
|
103675
|
-
|
|
103676
|
-
outputTimeStampMap.set(path, now);
|
|
103677
|
-
modifiedOutputs.add(path);
|
|
103628
|
+
if (ts.isDeclarationFileName(file)) {
|
|
103629
|
+
priorNewestUpdateTime = newer(priorNewestUpdateTime, ts.getModifiedTime(host, file));
|
|
103678
103630
|
}
|
|
103631
|
+
host.setModifiedTime(file, now);
|
|
103679
103632
|
}
|
|
103680
103633
|
}
|
|
103681
|
-
|
|
103682
|
-
if (!(skipOutputs === null || skipOutputs === void 0 ? void 0 : skipOutputs.has(key)) && !modifiedOutputs.has(key))
|
|
103683
|
-
outputTimeStampMap.delete(key);
|
|
103684
|
-
});
|
|
103685
|
-
}
|
|
103686
|
-
function getDtsChangeTime(state, options, resolvedConfigPath) {
|
|
103687
|
-
var _a;
|
|
103688
|
-
if (!options.composite)
|
|
103689
|
-
return undefined;
|
|
103690
|
-
var buildInfoPath = ts.getTsBuildInfoEmitOutputFilePath(options);
|
|
103691
|
-
var buildInfo = getBuildInfo(state, buildInfoPath, resolvedConfigPath, undefined);
|
|
103692
|
-
return ((_a = buildInfo === null || buildInfo === void 0 ? void 0 : buildInfo.program) === null || _a === void 0 ? void 0 : _a.dtsChangeTime) ? new Date(buildInfo.program.dtsChangeTime) : undefined;
|
|
103634
|
+
return priorNewestUpdateTime;
|
|
103693
103635
|
}
|
|
103694
103636
|
function updateOutputTimestamps(state, proj, resolvedPath) {
|
|
103695
103637
|
if (state.options.dry) {
|
|
103696
103638
|
return reportStatus(state, ts.Diagnostics.A_non_dry_build_would_update_timestamps_for_output_of_project_0, proj.options.configFilePath);
|
|
103697
103639
|
}
|
|
103698
|
-
updateOutputTimestampsWorker(state, proj,
|
|
103640
|
+
var priorNewestUpdateTime = updateOutputTimestampsWorker(state, proj, minimumDate, ts.Diagnostics.Updating_output_timestamps_of_project_0);
|
|
103699
103641
|
state.projectStatus.set(resolvedPath, {
|
|
103700
103642
|
type: ts.UpToDateStatusType.UpToDate,
|
|
103701
|
-
newestDeclarationFileContentChangedTime:
|
|
103643
|
+
newestDeclarationFileContentChangedTime: priorNewestUpdateTime,
|
|
103702
103644
|
oldestOutputFileName: ts.getFirstProjectOutput(proj, !state.host.useCaseSensitiveFileNames())
|
|
103703
103645
|
});
|
|
103704
103646
|
}
|
|
@@ -103737,7 +103679,6 @@ var ts;
|
|
|
103737
103679
|
}
|
|
103738
103680
|
break;
|
|
103739
103681
|
}
|
|
103740
|
-
case ts.UpToDateStatusType.UpToDateWithInputFileText:
|
|
103741
103682
|
case ts.UpToDateStatusType.UpToDateWithUpstreamTypes:
|
|
103742
103683
|
case ts.UpToDateStatusType.OutOfDateWithPrepend:
|
|
103743
103684
|
if (!(buildResult & BuildResultFlags.DeclarationOutputUnchanged)) {
|
|
@@ -103881,10 +103822,12 @@ var ts;
|
|
|
103881
103822
|
function watchConfigFile(state, resolved, resolvedPath, parsed) {
|
|
103882
103823
|
if (!state.watch || state.allWatchedConfigFiles.has(resolvedPath))
|
|
103883
103824
|
return;
|
|
103884
|
-
state.allWatchedConfigFiles.set(resolvedPath, watchFile(
|
|
103825
|
+
state.allWatchedConfigFiles.set(resolvedPath, state.watchFile(resolved, function () {
|
|
103826
|
+
invalidateProjectAndScheduleBuilds(state, resolvedPath, ts.ConfigFileProgramReloadLevel.Full);
|
|
103827
|
+
}, ts.PollingInterval.High, parsed === null || parsed === void 0 ? void 0 : parsed.watchOptions, ts.WatchType.ConfigFile, resolved));
|
|
103885
103828
|
}
|
|
103886
103829
|
function watchExtendedConfigFiles(state, resolvedPath, parsed) {
|
|
103887
|
-
ts.updateSharedExtendedConfigFileWatcher(resolvedPath, parsed === null || parsed === void 0 ? void 0 : parsed.options, state.allWatchedExtendedConfigFiles, function (extendedConfigFileName, extendedConfigFilePath) { return watchFile(
|
|
103830
|
+
ts.updateSharedExtendedConfigFileWatcher(resolvedPath, parsed === null || parsed === void 0 ? void 0 : parsed.options, state.allWatchedExtendedConfigFiles, function (extendedConfigFileName, extendedConfigFilePath) { return state.watchFile(extendedConfigFileName, function () {
|
|
103888
103831
|
var _a;
|
|
103889
103832
|
return (_a = state.allWatchedExtendedConfigFiles.get(extendedConfigFilePath)) === null || _a === void 0 ? void 0 : _a.projects.forEach(function (projectConfigFilePath) {
|
|
103890
103833
|
return invalidateProjectAndScheduleBuilds(state, projectConfigFilePath, ts.ConfigFileProgramReloadLevel.Full);
|
|
@@ -103916,7 +103859,7 @@ var ts;
|
|
|
103916
103859
|
if (!state.watch)
|
|
103917
103860
|
return;
|
|
103918
103861
|
ts.mutateMap(getOrCreateValueMapFromConfigFileMap(state.allWatchedInputFiles, resolvedPath), ts.arrayToMap(parsed.fileNames, function (fileName) { return toPath(state, fileName); }), {
|
|
103919
|
-
createNewValue: function (_path, input) { return watchFile(
|
|
103862
|
+
createNewValue: function (_path, input) { return state.watchFile(input, function () { return invalidateProjectAndScheduleBuilds(state, resolvedPath, ts.ConfigFileProgramReloadLevel.None); }, ts.PollingInterval.Low, parsed === null || parsed === void 0 ? void 0 : parsed.watchOptions, ts.WatchType.SourceFile, resolved); },
|
|
103920
103863
|
onDeleteValue: ts.closeFileWatcher,
|
|
103921
103864
|
});
|
|
103922
103865
|
}
|
|
@@ -103924,7 +103867,7 @@ var ts;
|
|
|
103924
103867
|
if (!state.watch || !state.lastCachedPackageJsonLookups)
|
|
103925
103868
|
return;
|
|
103926
103869
|
ts.mutateMap(getOrCreateValueMapFromConfigFileMap(state.allWatchedPackageJsonFiles, resolvedPath), new ts.Map(state.lastCachedPackageJsonLookups.get(resolvedPath)), {
|
|
103927
|
-
createNewValue: function (path, _input) { return watchFile(
|
|
103870
|
+
createNewValue: function (path, _input) { return state.watchFile(path, function () { return invalidateProjectAndScheduleBuilds(state, resolvedPath, ts.ConfigFileProgramReloadLevel.None); }, ts.PollingInterval.High, parsed === null || parsed === void 0 ? void 0 : parsed.watchOptions, ts.WatchType.PackageJson, resolved); },
|
|
103928
103871
|
onDeleteValue: ts.closeFileWatcher,
|
|
103929
103872
|
});
|
|
103930
103873
|
}
|
|
@@ -104048,26 +103991,25 @@ var ts;
|
|
|
104048
103991
|
}
|
|
104049
103992
|
}
|
|
104050
103993
|
function reportUpToDateStatus(state, configFileName, status) {
|
|
103994
|
+
if (state.options.force && (status.type === ts.UpToDateStatusType.UpToDate || status.type === ts.UpToDateStatusType.UpToDateWithUpstreamTypes)) {
|
|
103995
|
+
return reportStatus(state, ts.Diagnostics.Project_0_is_being_forcibly_rebuilt, relName(state, configFileName));
|
|
103996
|
+
}
|
|
104051
103997
|
switch (status.type) {
|
|
104052
103998
|
case ts.UpToDateStatusType.OutOfDateWithSelf:
|
|
104053
|
-
return reportStatus(state, ts.Diagnostics.
|
|
103999
|
+
return reportStatus(state, ts.Diagnostics.Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2, relName(state, configFileName), relName(state, status.outOfDateOutputFileName), relName(state, status.newerInputFileName));
|
|
104054
104000
|
case ts.UpToDateStatusType.OutOfDateWithUpstream:
|
|
104055
|
-
return reportStatus(state, ts.Diagnostics.
|
|
104001
|
+
return reportStatus(state, ts.Diagnostics.Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2, relName(state, configFileName), relName(state, status.outOfDateOutputFileName), relName(state, status.newerProjectName));
|
|
104056
104002
|
case ts.UpToDateStatusType.OutputMissing:
|
|
104057
104003
|
return reportStatus(state, ts.Diagnostics.Project_0_is_out_of_date_because_output_file_1_does_not_exist, relName(state, configFileName), relName(state, status.missingOutputFileName));
|
|
104058
|
-
case ts.UpToDateStatusType.OutOfDateBuildInfo:
|
|
104059
|
-
return reportStatus(state, ts.Diagnostics.Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_some_of_the_changes_are_not_emitted, relName(state, configFileName), relName(state, status.buildInfoFile));
|
|
104060
104004
|
case ts.UpToDateStatusType.UpToDate:
|
|
104061
104005
|
if (status.newestInputFileTime !== undefined) {
|
|
104062
|
-
return reportStatus(state, ts.Diagnostics.
|
|
104006
|
+
return reportStatus(state, ts.Diagnostics.Project_0_is_up_to_date_because_newest_input_1_is_older_than_oldest_output_2, relName(state, configFileName), relName(state, status.newestInputFileName || ""), relName(state, status.oldestOutputFileName || ""));
|
|
104063
104007
|
}
|
|
104064
104008
|
break;
|
|
104065
104009
|
case ts.UpToDateStatusType.OutOfDateWithPrepend:
|
|
104066
104010
|
return reportStatus(state, ts.Diagnostics.Project_0_is_out_of_date_because_output_of_its_dependency_1_has_changed, relName(state, configFileName), relName(state, status.newerProjectName));
|
|
104067
104011
|
case ts.UpToDateStatusType.UpToDateWithUpstreamTypes:
|
|
104068
104012
|
return reportStatus(state, ts.Diagnostics.Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies, relName(state, configFileName));
|
|
104069
|
-
case ts.UpToDateStatusType.UpToDateWithInputFileText:
|
|
104070
|
-
return reportStatus(state, ts.Diagnostics.Project_0_is_up_to_date_but_needs_update_to_timestamps_of_output_files_that_are_older_than_input_files, relName(state, configFileName));
|
|
104071
104013
|
case ts.UpToDateStatusType.UpstreamOutOfDate:
|
|
104072
104014
|
return reportStatus(state, ts.Diagnostics.Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date, relName(state, configFileName), relName(state, status.upstreamProjectName));
|
|
104073
104015
|
case ts.UpToDateStatusType.UpstreamBlocked:
|
|
@@ -104078,8 +104020,6 @@ var ts;
|
|
|
104078
104020
|
return reportStatus(state, ts.Diagnostics.Failed_to_parse_file_0_Colon_1, relName(state, configFileName), status.reason);
|
|
104079
104021
|
case ts.UpToDateStatusType.TsVersionOutputOfDate:
|
|
104080
104022
|
return reportStatus(state, ts.Diagnostics.Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_current_version_2, relName(state, configFileName), status.version, ts.version);
|
|
104081
|
-
case ts.UpToDateStatusType.ForceBuild:
|
|
104082
|
-
return reportStatus(state, ts.Diagnostics.Project_0_is_being_forcibly_rebuilt, relName(state, configFileName));
|
|
104083
104023
|
case ts.UpToDateStatusType.ContainerOnly:
|
|
104084
104024
|
case ts.UpToDateStatusType.ComputingUpstream:
|
|
104085
104025
|
break;
|