@typescript-deploys/pr-build 5.2.0-pr-54838-4 → 5.2.0-pr-54922-6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/tsc.js +302 -330
- package/lib/tsserver.js +478 -406
- package/lib/tsserverlibrary.d.ts +3 -4
- package/lib/tsserverlibrary.js +478 -405
- package/lib/typescript.d.ts +2 -3
- package/lib/typescript.js +457 -384
- package/lib/typingsInstaller.js +104 -100
- package/package.json +2 -2
package/lib/tsserverlibrary.js
CHANGED
|
@@ -35,7 +35,7 @@ var ts = (() => {
|
|
|
35
35
|
"src/compiler/corePublic.ts"() {
|
|
36
36
|
"use strict";
|
|
37
37
|
versionMajorMinor = "5.2";
|
|
38
|
-
version = `${versionMajorMinor}.0-insiders.
|
|
38
|
+
version = `${versionMajorMinor}.0-insiders.20230707`;
|
|
39
39
|
Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
40
40
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
41
41
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -1464,8 +1464,8 @@ var ts = (() => {
|
|
|
1464
1464
|
}
|
|
1465
1465
|
return false;
|
|
1466
1466
|
}
|
|
1467
|
-
function createGetCanonicalFileName(
|
|
1468
|
-
return
|
|
1467
|
+
function createGetCanonicalFileName(useCaseSensitiveFileNames2) {
|
|
1468
|
+
return useCaseSensitiveFileNames2 ? identity : toFileNameLowerCase;
|
|
1469
1469
|
}
|
|
1470
1470
|
function patternText({ prefix, suffix }) {
|
|
1471
1471
|
return `${prefix}*${suffix}`;
|
|
@@ -1599,13 +1599,6 @@ var ts = (() => {
|
|
|
1599
1599
|
return array.slice(0, index);
|
|
1600
1600
|
}
|
|
1601
1601
|
}
|
|
1602
|
-
function startWhitespaceCount(s) {
|
|
1603
|
-
for (let i = 0; i < s.length; i++) {
|
|
1604
|
-
if (!isWhiteSpaceLike(s.charCodeAt(i)))
|
|
1605
|
-
return i;
|
|
1606
|
-
}
|
|
1607
|
-
return s.length;
|
|
1608
|
-
}
|
|
1609
1602
|
function skipWhile(array, predicate) {
|
|
1610
1603
|
if (array) {
|
|
1611
1604
|
const len = array.length;
|
|
@@ -5432,10 +5425,10 @@ ${lanes.join("\n")}
|
|
|
5432
5425
|
pollingIntervalQueue(pollingInterval).pollScheduled = host.setTimeout(pollingInterval === 250 /* Low */ ? pollLowPollingIntervalQueue : pollPollingIntervalQueue, pollingInterval, pollingInterval === 250 /* Low */ ? "pollLowPollingIntervalQueue" : "pollPollingIntervalQueue", pollingIntervalQueue(pollingInterval));
|
|
5433
5426
|
}
|
|
5434
5427
|
}
|
|
5435
|
-
function createUseFsEventsOnParentDirectoryWatchFile(fsWatch,
|
|
5428
|
+
function createUseFsEventsOnParentDirectoryWatchFile(fsWatch, useCaseSensitiveFileNames2) {
|
|
5436
5429
|
const fileWatcherCallbacks = createMultiMap();
|
|
5437
5430
|
const dirWatchers = /* @__PURE__ */ new Map();
|
|
5438
|
-
const toCanonicalName = createGetCanonicalFileName(
|
|
5431
|
+
const toCanonicalName = createGetCanonicalFileName(useCaseSensitiveFileNames2);
|
|
5439
5432
|
return nonPollingWatchFile;
|
|
5440
5433
|
function nonPollingWatchFile(fileName, callback, _pollingInterval, fallbackOptions) {
|
|
5441
5434
|
const filePath = toCanonicalName(fileName);
|
|
@@ -5511,8 +5504,8 @@ ${lanes.join("\n")}
|
|
|
5511
5504
|
pollScheduled = host.setTimeout(pollQueue, 2e3 /* High */, "pollQueue");
|
|
5512
5505
|
}
|
|
5513
5506
|
}
|
|
5514
|
-
function createSingleWatcherPerName(cache,
|
|
5515
|
-
const toCanonicalFileName = createGetCanonicalFileName(
|
|
5507
|
+
function createSingleWatcherPerName(cache, useCaseSensitiveFileNames2, name, callback, createWatcher) {
|
|
5508
|
+
const toCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames2);
|
|
5516
5509
|
const path = toCanonicalFileName(name);
|
|
5517
5510
|
const existing = cache.get(path);
|
|
5518
5511
|
if (existing) {
|
|
@@ -5562,7 +5555,7 @@ ${lanes.join("\n")}
|
|
|
5562
5555
|
}
|
|
5563
5556
|
function createDirectoryWatcherSupportingRecursive({
|
|
5564
5557
|
watchDirectory,
|
|
5565
|
-
useCaseSensitiveFileNames,
|
|
5558
|
+
useCaseSensitiveFileNames: useCaseSensitiveFileNames2,
|
|
5566
5559
|
getCurrentDirectory,
|
|
5567
5560
|
getAccessibleSortedChildDirectories,
|
|
5568
5561
|
fileSystemEntryExists,
|
|
@@ -5574,8 +5567,8 @@ ${lanes.join("\n")}
|
|
|
5574
5567
|
const callbackCache = createMultiMap();
|
|
5575
5568
|
const cacheToUpdateChildWatches = /* @__PURE__ */ new Map();
|
|
5576
5569
|
let timerToUpdateChildWatches;
|
|
5577
|
-
const filePathComparer = getStringComparer(!
|
|
5578
|
-
const toCanonicalFilePath = createGetCanonicalFileName(
|
|
5570
|
+
const filePathComparer = getStringComparer(!useCaseSensitiveFileNames2);
|
|
5571
|
+
const toCanonicalFilePath = createGetCanonicalFileName(useCaseSensitiveFileNames2);
|
|
5579
5572
|
return (dirName, callback, recursive, options) => recursive ? createDirectoryWatcher(dirName, options, callback) : watchDirectory(dirName, callback, recursive, options);
|
|
5580
5573
|
function createDirectoryWatcher(dirName, options, callback) {
|
|
5581
5574
|
const dirPath = toCanonicalFilePath(dirName);
|
|
@@ -5742,12 +5735,12 @@ ${lanes.join("\n")}
|
|
|
5742
5735
|
}
|
|
5743
5736
|
}
|
|
5744
5737
|
function isIgnoredPath(path, options) {
|
|
5745
|
-
return some(ignoredPaths, (searchPath) => isInPath(path, searchPath)) || isIgnoredByWatchOptions(path, options,
|
|
5738
|
+
return some(ignoredPaths, (searchPath) => isInPath(path, searchPath)) || isIgnoredByWatchOptions(path, options, useCaseSensitiveFileNames2, getCurrentDirectory);
|
|
5746
5739
|
}
|
|
5747
5740
|
function isInPath(path, searchPath) {
|
|
5748
5741
|
if (stringContains(path, searchPath))
|
|
5749
5742
|
return true;
|
|
5750
|
-
if (
|
|
5743
|
+
if (useCaseSensitiveFileNames2)
|
|
5751
5744
|
return false;
|
|
5752
5745
|
return stringContains(toCanonicalFilePath(path), searchPath);
|
|
5753
5746
|
}
|
|
@@ -5765,14 +5758,14 @@ ${lanes.join("\n")}
|
|
|
5765
5758
|
}
|
|
5766
5759
|
};
|
|
5767
5760
|
}
|
|
5768
|
-
function isIgnoredByWatchOptions(pathToCheck, options,
|
|
5769
|
-
return ((options == null ? void 0 : options.excludeDirectories) || (options == null ? void 0 : options.excludeFiles)) && (matchesExclude(pathToCheck, options == null ? void 0 : options.excludeFiles,
|
|
5761
|
+
function isIgnoredByWatchOptions(pathToCheck, options, useCaseSensitiveFileNames2, getCurrentDirectory) {
|
|
5762
|
+
return ((options == null ? void 0 : options.excludeDirectories) || (options == null ? void 0 : options.excludeFiles)) && (matchesExclude(pathToCheck, options == null ? void 0 : options.excludeFiles, useCaseSensitiveFileNames2, getCurrentDirectory()) || matchesExclude(pathToCheck, options == null ? void 0 : options.excludeDirectories, useCaseSensitiveFileNames2, getCurrentDirectory()));
|
|
5770
5763
|
}
|
|
5771
|
-
function createFsWatchCallbackForDirectoryWatcherCallback(directoryName, callback, options,
|
|
5764
|
+
function createFsWatchCallbackForDirectoryWatcherCallback(directoryName, callback, options, useCaseSensitiveFileNames2, getCurrentDirectory) {
|
|
5772
5765
|
return (eventName, relativeFileName) => {
|
|
5773
5766
|
if (eventName === "rename") {
|
|
5774
5767
|
const fileName = !relativeFileName ? directoryName : normalizePath(combinePaths(directoryName, relativeFileName));
|
|
5775
|
-
if (!relativeFileName || !isIgnoredByWatchOptions(fileName, options,
|
|
5768
|
+
if (!relativeFileName || !isIgnoredByWatchOptions(fileName, options, useCaseSensitiveFileNames2, getCurrentDirectory)) {
|
|
5776
5769
|
callback(fileName);
|
|
5777
5770
|
}
|
|
5778
5771
|
}
|
|
@@ -5785,7 +5778,7 @@ ${lanes.join("\n")}
|
|
|
5785
5778
|
clearTimeout: clearTimeout2,
|
|
5786
5779
|
fsWatchWorker,
|
|
5787
5780
|
fileSystemEntryExists,
|
|
5788
|
-
useCaseSensitiveFileNames,
|
|
5781
|
+
useCaseSensitiveFileNames: useCaseSensitiveFileNames2,
|
|
5789
5782
|
getCurrentDirectory,
|
|
5790
5783
|
fsSupportsRecursiveFsWatch,
|
|
5791
5784
|
getAccessibleSortedChildDirectories,
|
|
@@ -5857,7 +5850,7 @@ ${lanes.join("\n")}
|
|
|
5857
5850
|
);
|
|
5858
5851
|
case 5 /* UseFsEventsOnParentDirectory */:
|
|
5859
5852
|
if (!nonPollingWatchFile) {
|
|
5860
|
-
nonPollingWatchFile = createUseFsEventsOnParentDirectoryWatchFile(fsWatch,
|
|
5853
|
+
nonPollingWatchFile = createUseFsEventsOnParentDirectoryWatchFile(fsWatch, useCaseSensitiveFileNames2);
|
|
5861
5854
|
}
|
|
5862
5855
|
return nonPollingWatchFile(fileName, callback, pollingInterval, getFallbackOptions(options));
|
|
5863
5856
|
default:
|
|
@@ -5906,7 +5899,7 @@ ${lanes.join("\n")}
|
|
|
5906
5899
|
return fsWatch(
|
|
5907
5900
|
directoryName,
|
|
5908
5901
|
1 /* Directory */,
|
|
5909
|
-
createFsWatchCallbackForDirectoryWatcherCallback(directoryName, callback, options,
|
|
5902
|
+
createFsWatchCallbackForDirectoryWatcherCallback(directoryName, callback, options, useCaseSensitiveFileNames2, getCurrentDirectory),
|
|
5910
5903
|
recursive,
|
|
5911
5904
|
500 /* Medium */,
|
|
5912
5905
|
getFallbackOptions(options)
|
|
@@ -5914,7 +5907,7 @@ ${lanes.join("\n")}
|
|
|
5914
5907
|
}
|
|
5915
5908
|
if (!hostRecursiveDirectoryWatcher) {
|
|
5916
5909
|
hostRecursiveDirectoryWatcher = createDirectoryWatcherSupportingRecursive({
|
|
5917
|
-
useCaseSensitiveFileNames,
|
|
5910
|
+
useCaseSensitiveFileNames: useCaseSensitiveFileNames2,
|
|
5918
5911
|
getCurrentDirectory,
|
|
5919
5912
|
fileSystemEntryExists,
|
|
5920
5913
|
getAccessibleSortedChildDirectories,
|
|
@@ -5960,7 +5953,7 @@ ${lanes.join("\n")}
|
|
|
5960
5953
|
return fsWatch(
|
|
5961
5954
|
directoryName,
|
|
5962
5955
|
1 /* Directory */,
|
|
5963
|
-
createFsWatchCallbackForDirectoryWatcherCallback(directoryName, callback, options,
|
|
5956
|
+
createFsWatchCallbackForDirectoryWatcherCallback(directoryName, callback, options, useCaseSensitiveFileNames2, getCurrentDirectory),
|
|
5964
5957
|
recursive,
|
|
5965
5958
|
500 /* Medium */,
|
|
5966
5959
|
getFallbackOptions(watchDirectoryOptions)
|
|
@@ -5988,7 +5981,7 @@ ${lanes.join("\n")}
|
|
|
5988
5981
|
function pollingWatchFile(fileName, callback, pollingInterval, options) {
|
|
5989
5982
|
return createSingleWatcherPerName(
|
|
5990
5983
|
pollingWatches,
|
|
5991
|
-
|
|
5984
|
+
useCaseSensitiveFileNames2,
|
|
5992
5985
|
fileName,
|
|
5993
5986
|
callback,
|
|
5994
5987
|
(cb) => pollingWatchFileWorker(fileName, cb, pollingInterval, options)
|
|
@@ -5997,7 +5990,7 @@ ${lanes.join("\n")}
|
|
|
5997
5990
|
function fsWatch(fileOrDirectory, entryKind, callback, recursive, fallbackPollingInterval, fallbackOptions) {
|
|
5998
5991
|
return createSingleWatcherPerName(
|
|
5999
5992
|
recursive ? fsWatchesRecursive : fsWatches,
|
|
6000
|
-
|
|
5993
|
+
useCaseSensitiveFileNames2,
|
|
6001
5994
|
fileOrDirectory,
|
|
6002
5995
|
callback,
|
|
6003
5996
|
(cb) => fsWatchHandlingExistenceOnHost(fileOrDirectory, entryKind, cb, recursive, fallbackPollingInterval, fallbackOptions)
|
|
@@ -6156,7 +6149,7 @@ ${lanes.join("\n")}
|
|
|
6156
6149
|
const Buffer2 = require("buffer").Buffer;
|
|
6157
6150
|
const isLinuxOrMacOs = process.platform === "linux" || process.platform === "darwin";
|
|
6158
6151
|
const platform = _os.platform();
|
|
6159
|
-
const
|
|
6152
|
+
const useCaseSensitiveFileNames2 = isFileSystemCaseSensitive();
|
|
6160
6153
|
const fsRealpath = !!_fs.realpathSync.native ? process.platform === "win32" ? fsRealPathHandlingLongPath : _fs.realpathSync.native : _fs.realpathSync;
|
|
6161
6154
|
const executingFilePath = __filename.endsWith("sys.js") ? _path.join(_path.dirname(__dirname), "__fake__.js") : __filename;
|
|
6162
6155
|
const fsSupportsRecursiveFsWatch = process.platform === "win32" || process.platform === "darwin";
|
|
@@ -6167,7 +6160,7 @@ ${lanes.join("\n")}
|
|
|
6167
6160
|
setTimeout,
|
|
6168
6161
|
clearTimeout,
|
|
6169
6162
|
fsWatchWorker,
|
|
6170
|
-
useCaseSensitiveFileNames,
|
|
6163
|
+
useCaseSensitiveFileNames: useCaseSensitiveFileNames2,
|
|
6171
6164
|
getCurrentDirectory,
|
|
6172
6165
|
fileSystemEntryExists,
|
|
6173
6166
|
// Node 4.0 `fs.watch` function supports the "recursive" option on both OSX and Windows
|
|
@@ -6184,7 +6177,7 @@ ${lanes.join("\n")}
|
|
|
6184
6177
|
const nodeSystem = {
|
|
6185
6178
|
args: process.argv.slice(2),
|
|
6186
6179
|
newLine: _os.EOL,
|
|
6187
|
-
useCaseSensitiveFileNames,
|
|
6180
|
+
useCaseSensitiveFileNames: useCaseSensitiveFileNames2,
|
|
6188
6181
|
write(s) {
|
|
6189
6182
|
process.stdout.write(s);
|
|
6190
6183
|
},
|
|
@@ -6313,12 +6306,12 @@ ${lanes.join("\n")}
|
|
|
6313
6306
|
for (const node of profile.nodes) {
|
|
6314
6307
|
if (node.callFrame.url) {
|
|
6315
6308
|
const url = normalizeSlashes(node.callFrame.url);
|
|
6316
|
-
if (containsPath(fileUrlRoot, url,
|
|
6309
|
+
if (containsPath(fileUrlRoot, url, useCaseSensitiveFileNames2)) {
|
|
6317
6310
|
node.callFrame.url = getRelativePathToDirectoryOrUrl(
|
|
6318
6311
|
fileUrlRoot,
|
|
6319
6312
|
url,
|
|
6320
6313
|
fileUrlRoot,
|
|
6321
|
-
createGetCanonicalFileName(
|
|
6314
|
+
createGetCanonicalFileName(useCaseSensitiveFileNames2),
|
|
6322
6315
|
/*isAbsolutePathAnUrl*/
|
|
6323
6316
|
true
|
|
6324
6317
|
);
|
|
@@ -6498,7 +6491,7 @@ ${lanes.join("\n")}
|
|
|
6498
6491
|
}
|
|
6499
6492
|
}
|
|
6500
6493
|
function readDirectory(path, extensions, excludes, includes, depth) {
|
|
6501
|
-
return matchFiles(path, extensions, excludes, includes,
|
|
6494
|
+
return matchFiles(path, extensions, excludes, includes, useCaseSensitiveFileNames2, process.cwd(), depth, getAccessibleFileSystemEntries, realpath);
|
|
6502
6495
|
}
|
|
6503
6496
|
function fileSystemEntryExists(path, entryKind) {
|
|
6504
6497
|
const originalStackTraceLimit = Error.stackTraceLimit;
|
|
@@ -7028,7 +7021,7 @@ ${lanes.join("\n")}
|
|
|
7028
7021
|
Identifier_expected: diag(1003, 1 /* Error */, "Identifier_expected_1003", "Identifier expected."),
|
|
7029
7022
|
_0_expected: diag(1005, 1 /* Error */, "_0_expected_1005", "'{0}' expected."),
|
|
7030
7023
|
A_file_cannot_have_a_reference_to_itself: diag(1006, 1 /* Error */, "A_file_cannot_have_a_reference_to_itself_1006", "A file cannot have a reference to itself."),
|
|
7031
|
-
|
|
7024
|
+
The_parser_expected_to_find_a_1_to_match_the_0_token_here: diag(1007, 1 /* Error */, "The_parser_expected_to_find_a_1_to_match_the_0_token_here_1007", "The parser expected to find a '{1}' to match the '{0}' token here."),
|
|
7032
7025
|
Trailing_comma_not_allowed: diag(1009, 1 /* Error */, "Trailing_comma_not_allowed_1009", "Trailing comma not allowed."),
|
|
7033
7026
|
Asterisk_Slash_expected: diag(1010, 1 /* Error */, "Asterisk_Slash_expected_1010", "'*/' expected."),
|
|
7034
7027
|
An_element_access_expression_should_take_an_argument: diag(1011, 1 /* Error */, "An_element_access_expression_should_take_an_argument_1011", "An element access expression should take an argument."),
|
|
@@ -7290,7 +7283,7 @@ ${lanes.join("\n")}
|
|
|
7290
7283
|
unique_symbol_types_are_not_allowed_here: diag(1335, 1 /* Error */, "unique_symbol_types_are_not_allowed_here_1335", "'unique symbol' types are not allowed here."),
|
|
7291
7284
|
An_index_signature_parameter_type_cannot_be_a_literal_type_or_generic_type_Consider_using_a_mapped_object_type_instead: diag(1337, 1 /* Error */, "An_index_signature_parameter_type_cannot_be_a_literal_type_or_generic_type_Consider_using_a_mapped_o_1337", "An index signature parameter type cannot be a literal type or generic type. Consider using a mapped object type instead."),
|
|
7292
7285
|
infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type: diag(1338, 1 /* Error */, "infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type_1338", "'infer' declarations are only permitted in the 'extends' clause of a conditional type."),
|
|
7293
|
-
|
|
7286
|
+
Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here: diag(1339, 1 /* 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."),
|
|
7294
7287
|
Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0: diag(1340, 1 /* 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}')'?"),
|
|
7295
7288
|
Class_constructor_may_not_be_an_accessor: diag(1341, 1 /* Error */, "Class_constructor_may_not_be_an_accessor_1341", "Class constructor may not be an accessor."),
|
|
7296
7289
|
The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system_node16_or_nodenext: diag(1343, 1 /* 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'."),
|
|
@@ -7298,7 +7291,7 @@ ${lanes.join("\n")}
|
|
|
7298
7291
|
An_expression_of_type_void_cannot_be_tested_for_truthiness: diag(1345, 1 /* Error */, "An_expression_of_type_void_cannot_be_tested_for_truthiness_1345", "An expression of type 'void' cannot be tested for truthiness."),
|
|
7299
7292
|
This_parameter_is_not_allowed_with_use_strict_directive: diag(1346, 1 /* Error */, "This_parameter_is_not_allowed_with_use_strict_directive_1346", "This parameter is not allowed with 'use strict' directive."),
|
|
7300
7293
|
use_strict_directive_cannot_be_used_with_non_simple_parameter_list: diag(1347, 1 /* Error */, "use_strict_directive_cannot_be_used_with_non_simple_parameter_list_1347", "'use strict' directive cannot be used with non-simple parameter list."),
|
|
7301
|
-
|
|
7294
|
+
Non_simple_parameter_declared_here: diag(1348, 1 /* Error */, "Non_simple_parameter_declared_here_1348", "Non-simple parameter declared here."),
|
|
7302
7295
|
use_strict_directive_used_here: diag(1349, 1 /* Error */, "use_strict_directive_used_here_1349", "'use strict' directive used here."),
|
|
7303
7296
|
Print_the_final_configuration_instead_of_building: diag(1350, 3 /* Message */, "Print_the_final_configuration_instead_of_building_1350", "Print the final configuration instead of building."),
|
|
7304
7297
|
An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal: diag(1351, 1 /* Error */, "An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal_1351", "An identifier or keyword cannot immediately follow a numeric literal."),
|
|
@@ -7322,8 +7315,8 @@ ${lanes.join("\n")}
|
|
|
7322
7315
|
Did_you_mean_0: diag(1369, 3 /* Message */, "Did_you_mean_0_1369", "Did you mean '{0}'?"),
|
|
7323
7316
|
This_import_is_never_used_as_a_value_and_must_use_import_type_because_importsNotUsedAsValues_is_set_to_error: diag(1371, 1 /* Error */, "This_import_is_never_used_as_a_value_and_must_use_import_type_because_importsNotUsedAsValues_is_set__1371", "This import is never used as a value and must use 'import type' because 'importsNotUsedAsValues' is set to 'error'."),
|
|
7324
7317
|
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, 1 /* 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."),
|
|
7325
|
-
|
|
7326
|
-
|
|
7318
|
+
_0_was_imported_here: diag(1376, 3 /* Message */, "_0_was_imported_here_1376", "'{0}' was imported here."),
|
|
7319
|
+
_0_was_exported_here: diag(1377, 3 /* Message */, "_0_was_exported_here_1377", "'{0}' was exported here."),
|
|
7327
7320
|
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, 1 /* 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."),
|
|
7328
7321
|
An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type: diag(1379, 1 /* 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'."),
|
|
7329
7322
|
An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type: diag(1380, 1 /* 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'."),
|
|
@@ -7342,34 +7335,34 @@ ${lanes.join("\n")}
|
|
|
7342
7335
|
Imported_via_0_from_file_1_with_packageId_2_to_import_importHelpers_as_specified_in_compilerOptions: diag(1396, 3 /* Message */, "Imported_via_0_from_file_1_with_packageId_2_to_import_importHelpers_as_specified_in_compilerOptions_1396", "Imported via {0} from file '{1}' with packageId '{2}' to import 'importHelpers' as specified in compilerOptions"),
|
|
7343
7336
|
Imported_via_0_from_file_1_to_import_jsx_and_jsxs_factory_functions: diag(1397, 3 /* Message */, "Imported_via_0_from_file_1_to_import_jsx_and_jsxs_factory_functions_1397", "Imported via {0} from file '{1}' to import 'jsx' and 'jsxs' factory functions"),
|
|
7344
7337
|
Imported_via_0_from_file_1_with_packageId_2_to_import_jsx_and_jsxs_factory_functions: diag(1398, 3 /* Message */, "Imported_via_0_from_file_1_with_packageId_2_to_import_jsx_and_jsxs_factory_functions_1398", "Imported via {0} from file '{1}' with packageId '{2}' to import 'jsx' and 'jsxs' factory functions"),
|
|
7345
|
-
|
|
7338
|
+
File_is_included_via_import_here: diag(1399, 3 /* Message */, "File_is_included_via_import_here_1399", "File is included via import here."),
|
|
7346
7339
|
Referenced_via_0_from_file_1: diag(1400, 3 /* Message */, "Referenced_via_0_from_file_1_1400", "Referenced via '{0}' from file '{1}'"),
|
|
7347
|
-
|
|
7340
|
+
File_is_included_via_reference_here: diag(1401, 3 /* Message */, "File_is_included_via_reference_here_1401", "File is included via reference here."),
|
|
7348
7341
|
Type_library_referenced_via_0_from_file_1: diag(1402, 3 /* Message */, "Type_library_referenced_via_0_from_file_1_1402", "Type library referenced via '{0}' from file '{1}'"),
|
|
7349
7342
|
Type_library_referenced_via_0_from_file_1_with_packageId_2: diag(1403, 3 /* Message */, "Type_library_referenced_via_0_from_file_1_with_packageId_2_1403", "Type library referenced via '{0}' from file '{1}' with packageId '{2}'"),
|
|
7350
|
-
|
|
7343
|
+
File_is_included_via_type_library_reference_here: diag(1404, 3 /* Message */, "File_is_included_via_type_library_reference_here_1404", "File is included via type library reference here."),
|
|
7351
7344
|
Library_referenced_via_0_from_file_1: diag(1405, 3 /* Message */, "Library_referenced_via_0_from_file_1_1405", "Library referenced via '{0}' from file '{1}'"),
|
|
7352
|
-
|
|
7345
|
+
File_is_included_via_library_reference_here: diag(1406, 3 /* Message */, "File_is_included_via_library_reference_here_1406", "File is included via library reference here."),
|
|
7353
7346
|
Matched_by_include_pattern_0_in_1: diag(1407, 3 /* Message */, "Matched_by_include_pattern_0_in_1_1407", "Matched by include pattern '{0}' in '{1}'"),
|
|
7354
|
-
|
|
7347
|
+
File_is_matched_by_include_pattern_specified_here: diag(1408, 3 /* Message */, "File_is_matched_by_include_pattern_specified_here_1408", "File is matched by include pattern specified here."),
|
|
7355
7348
|
Part_of_files_list_in_tsconfig_json: diag(1409, 3 /* Message */, "Part_of_files_list_in_tsconfig_json_1409", "Part of 'files' list in tsconfig.json"),
|
|
7356
|
-
|
|
7349
|
+
File_is_matched_by_files_list_specified_here: diag(1410, 3 /* Message */, "File_is_matched_by_files_list_specified_here_1410", "File is matched by 'files' list specified here."),
|
|
7357
7350
|
Output_from_referenced_project_0_included_because_1_specified: diag(1411, 3 /* Message */, "Output_from_referenced_project_0_included_because_1_specified_1411", "Output from referenced project '{0}' included because '{1}' specified"),
|
|
7358
7351
|
Output_from_referenced_project_0_included_because_module_is_specified_as_none: diag(1412, 3 /* Message */, "Output_from_referenced_project_0_included_because_module_is_specified_as_none_1412", "Output from referenced project '{0}' included because '--module' is specified as 'none'"),
|
|
7359
|
-
|
|
7352
|
+
File_is_output_from_referenced_project_specified_here: diag(1413, 3 /* Message */, "File_is_output_from_referenced_project_specified_here_1413", "File is output from referenced project specified here."),
|
|
7360
7353
|
Source_from_referenced_project_0_included_because_1_specified: diag(1414, 3 /* Message */, "Source_from_referenced_project_0_included_because_1_specified_1414", "Source from referenced project '{0}' included because '{1}' specified"),
|
|
7361
7354
|
Source_from_referenced_project_0_included_because_module_is_specified_as_none: diag(1415, 3 /* Message */, "Source_from_referenced_project_0_included_because_module_is_specified_as_none_1415", "Source from referenced project '{0}' included because '--module' is specified as 'none'"),
|
|
7362
|
-
|
|
7355
|
+
File_is_source_from_referenced_project_specified_here: diag(1416, 3 /* Message */, "File_is_source_from_referenced_project_specified_here_1416", "File is source from referenced project specified here."),
|
|
7363
7356
|
Entry_point_of_type_library_0_specified_in_compilerOptions: diag(1417, 3 /* Message */, "Entry_point_of_type_library_0_specified_in_compilerOptions_1417", "Entry point of type library '{0}' specified in compilerOptions"),
|
|
7364
7357
|
Entry_point_of_type_library_0_specified_in_compilerOptions_with_packageId_1: diag(1418, 3 /* Message */, "Entry_point_of_type_library_0_specified_in_compilerOptions_with_packageId_1_1418", "Entry point of type library '{0}' specified in compilerOptions with packageId '{1}'"),
|
|
7365
|
-
|
|
7358
|
+
File_is_entry_point_of_type_library_specified_here: diag(1419, 3 /* Message */, "File_is_entry_point_of_type_library_specified_here_1419", "File is entry point of type library specified here."),
|
|
7366
7359
|
Entry_point_for_implicit_type_library_0: diag(1420, 3 /* Message */, "Entry_point_for_implicit_type_library_0_1420", "Entry point for implicit type library '{0}'"),
|
|
7367
7360
|
Entry_point_for_implicit_type_library_0_with_packageId_1: diag(1421, 3 /* Message */, "Entry_point_for_implicit_type_library_0_with_packageId_1_1421", "Entry point for implicit type library '{0}' with packageId '{1}'"),
|
|
7368
7361
|
Library_0_specified_in_compilerOptions: diag(1422, 3 /* Message */, "Library_0_specified_in_compilerOptions_1422", "Library '{0}' specified in compilerOptions"),
|
|
7369
|
-
|
|
7362
|
+
File_is_library_specified_here: diag(1423, 3 /* Message */, "File_is_library_specified_here_1423", "File is library specified here."),
|
|
7370
7363
|
Default_library: diag(1424, 3 /* Message */, "Default_library_1424", "Default library"),
|
|
7371
7364
|
Default_library_for_target_0: diag(1425, 3 /* Message */, "Default_library_for_target_0_1425", "Default library for target '{0}'"),
|
|
7372
|
-
|
|
7365
|
+
File_is_default_library_for_target_specified_here: diag(1426, 3 /* Message */, "File_is_default_library_for_target_specified_here_1426", "File is default library for target specified here."),
|
|
7373
7366
|
Root_file_specified_for_compilation: diag(1427, 3 /* Message */, "Root_file_specified_for_compilation_1427", "Root file specified for compilation"),
|
|
7374
7367
|
File_is_output_of_project_reference_source_0: diag(1428, 3 /* Message */, "File_is_output_of_project_reference_source_0_1428", "File is output of project reference source '{0}'"),
|
|
7375
7368
|
File_redirects_to_file_0: diag(1429, 3 /* Message */, "File_redirects_to_file_0_1429", "File redirects to file '{0}'"),
|
|
@@ -7822,7 +7815,7 @@ ${lanes.join("\n")}
|
|
|
7822
7815
|
Cannot_extend_an_interface_0_Did_you_mean_implements: diag(2689, 1 /* Error */, "Cannot_extend_an_interface_0_Did_you_mean_implements_2689", "Cannot extend an interface '{0}'. Did you mean 'implements'?"),
|
|
7823
7816
|
_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Did_you_mean_to_use_1_in_0: diag(2690, 1 /* Error */, "_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Did_you_mean_to_use_1_in_0_2690", "'{0}' only refers to a type, but is being used as a value here. Did you mean to use '{1} in {0}'?"),
|
|
7824
7817
|
_0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible: diag(2692, 1 /* Error */, "_0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible_2692", "'{0}' is a primitive, but '{1}' is a wrapper object. Prefer using '{0}' when possible."),
|
|
7825
|
-
|
|
7818
|
+
_0_only_refers_to_a_type_but_is_being_used_as_a_value_here: diag(2693, 1 /* Error */, "_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_2693", "'{0}' only refers to a type, but is being used as a value here."),
|
|
7826
7819
|
Namespace_0_has_no_exported_member_1: diag(2694, 1 /* Error */, "Namespace_0_has_no_exported_member_1_2694", "Namespace '{0}' has no exported member '{1}'."),
|
|
7827
7820
|
Left_side_of_comma_operator_is_unused_and_has_no_side_effects: diag(
|
|
7828
7821
|
2695,
|
|
@@ -7838,7 +7831,7 @@ ${lanes.join("\n")}
|
|
|
7838
7831
|
Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1: diag(2699, 1 /* Error */, "Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1_2699", "Static property '{0}' conflicts with built-in property 'Function.{0}' of constructor function '{1}'."),
|
|
7839
7832
|
Rest_types_may_only_be_created_from_object_types: diag(2700, 1 /* Error */, "Rest_types_may_only_be_created_from_object_types_2700", "Rest types may only be created from object types."),
|
|
7840
7833
|
The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access: diag(2701, 1 /* Error */, "The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access_2701", "The target of an object rest assignment must be a variable or a property access."),
|
|
7841
|
-
|
|
7834
|
+
_0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here: diag(2702, 1 /* Error */, "_0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here_2702", "'{0}' only refers to a type, but is being used as a namespace here."),
|
|
7842
7835
|
The_operand_of_a_delete_operator_must_be_a_property_reference: diag(2703, 1 /* Error */, "The_operand_of_a_delete_operator_must_be_a_property_reference_2703", "The operand of a 'delete' operator must be a property reference."),
|
|
7843
7836
|
The_operand_of_a_delete_operator_cannot_be_a_read_only_property: diag(2704, 1 /* Error */, "The_operand_of_a_delete_operator_cannot_be_a_read_only_property_2704", "The operand of a 'delete' operator cannot be a read-only property."),
|
|
7844
7837
|
An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option: diag(2705, 1 /* Error */, "An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_de_2705", "An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option."),
|
|
@@ -7864,12 +7857,12 @@ ${lanes.join("\n")}
|
|
|
7864
7857
|
Class_name_cannot_be_Object_when_targeting_ES5_with_module_0: diag(2725, 1 /* Error */, "Class_name_cannot_be_Object_when_targeting_ES5_with_module_0_2725", "Class name cannot be 'Object' when targeting ES5 with module {0}."),
|
|
7865
7858
|
Cannot_find_lib_definition_for_0: diag(2726, 1 /* Error */, "Cannot_find_lib_definition_for_0_2726", "Cannot find lib definition for '{0}'."),
|
|
7866
7859
|
Cannot_find_lib_definition_for_0_Did_you_mean_1: diag(2727, 1 /* Error */, "Cannot_find_lib_definition_for_0_Did_you_mean_1_2727", "Cannot find lib definition for '{0}'. Did you mean '{1}'?"),
|
|
7867
|
-
|
|
7860
|
+
_0_is_declared_here: diag(2728, 3 /* Message */, "_0_is_declared_here_2728", "'{0}' is declared here."),
|
|
7868
7861
|
Property_0_is_used_before_its_initialization: diag(2729, 1 /* Error */, "Property_0_is_used_before_its_initialization_2729", "Property '{0}' is used before its initialization."),
|
|
7869
7862
|
An_arrow_function_cannot_have_a_this_parameter: diag(2730, 1 /* Error */, "An_arrow_function_cannot_have_a_this_parameter_2730", "An arrow function cannot have a 'this' parameter."),
|
|
7870
7863
|
Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_in_String: diag(2731, 1 /* Error */, "Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_i_2731", "Implicit conversion of a 'symbol' to a 'string' will fail at runtime. Consider wrapping this expression in 'String(...)'."),
|
|
7871
7864
|
Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension: diag(2732, 1 /* Error */, "Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension_2732", "Cannot find module '{0}'. Consider using '--resolveJsonModule' to import module with '.json' extension."),
|
|
7872
|
-
|
|
7865
|
+
Property_0_was_also_declared_here: diag(2733, 1 /* Error */, "Property_0_was_also_declared_here_2733", "Property '{0}' was also declared here."),
|
|
7873
7866
|
Are_you_missing_a_semicolon: diag(2734, 1 /* Error */, "Are_you_missing_a_semicolon_2734", "Are you missing a semicolon?"),
|
|
7874
7867
|
Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1: diag(2735, 1 /* Error */, "Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1_2735", "Did you mean for '{0}' to be constrained to type 'new (...args: any[]) => {1}'?"),
|
|
7875
7868
|
Operator_0_cannot_be_applied_to_type_1: diag(2736, 1 /* Error */, "Operator_0_cannot_be_applied_to_type_1_2736", "Operator '{0}' cannot be applied to type '{1}'."),
|
|
@@ -7886,10 +7879,10 @@ ${lanes.join("\n")}
|
|
|
7886
7879
|
_0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_type_of_1_is_2: diag(2747, 1 /* Error */, "_0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_t_2747", "'{0}' components don't accept text as child elements. Text in JSX has the type 'string', but the expected type of '{1}' is '{2}'."),
|
|
7887
7880
|
Cannot_access_ambient_const_enums_when_0_is_enabled: diag(2748, 1 /* Error */, "Cannot_access_ambient_const_enums_when_0_is_enabled_2748", "Cannot access ambient const enums when '{0}' is enabled."),
|
|
7888
7881
|
_0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0: diag(2749, 1 /* Error */, "_0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0_2749", "'{0}' refers to a value, but is being used as a type here. Did you mean 'typeof {0}'?"),
|
|
7889
|
-
|
|
7882
|
+
The_implementation_signature_is_declared_here: diag(2750, 1 /* Error */, "The_implementation_signature_is_declared_here_2750", "The implementation signature is declared here."),
|
|
7890
7883
|
Circularity_originates_in_type_at_this_location: diag(2751, 1 /* Error */, "Circularity_originates_in_type_at_this_location_2751", "Circularity originates in type at this location."),
|
|
7891
|
-
|
|
7892
|
-
|
|
7884
|
+
The_first_export_default_is_here: diag(2752, 1 /* Error */, "The_first_export_default_is_here_2752", "The first export default is here."),
|
|
7885
|
+
Another_export_default_is_here: diag(2753, 1 /* Error */, "Another_export_default_is_here_2753", "Another export default is here."),
|
|
7893
7886
|
super_may_not_use_type_arguments: diag(2754, 1 /* Error */, "super_may_not_use_type_arguments_2754", "'super' may not use type arguments."),
|
|
7894
7887
|
No_constituent_of_type_0_is_callable: diag(2755, 1 /* Error */, "No_constituent_of_type_0_is_callable_2755", "No constituent of type '{0}' is callable."),
|
|
7895
7888
|
Not_all_constituents_of_type_0_are_callable: diag(2756, 1 /* Error */, "Not_all_constituents_of_type_0_are_callable_2756", "Not all constituents of type '{0}' are callable."),
|
|
@@ -7907,7 +7900,7 @@ ${lanes.join("\n")}
|
|
|
7907
7900
|
The_0_property_of_an_async_iterator_must_be_a_method: diag(2768, 1 /* Error */, "The_0_property_of_an_async_iterator_must_be_a_method_2768", "The '{0}' property of an async iterator must be a method."),
|
|
7908
7901
|
No_overload_matches_this_call: diag(2769, 1 /* Error */, "No_overload_matches_this_call_2769", "No overload matches this call."),
|
|
7909
7902
|
The_last_overload_gave_the_following_error: diag(2770, 1 /* Error */, "The_last_overload_gave_the_following_error_2770", "The last overload gave the following error."),
|
|
7910
|
-
|
|
7903
|
+
The_last_overload_is_declared_here: diag(2771, 1 /* Error */, "The_last_overload_is_declared_here_2771", "The last overload is declared here."),
|
|
7911
7904
|
Overload_0_of_1_2_gave_the_following_error: diag(2772, 1 /* Error */, "Overload_0_of_1_2_gave_the_following_error_2772", "Overload {0} of {1}, '{2}', gave the following error."),
|
|
7912
7905
|
Did_you_forget_to_use_await: diag(2773, 1 /* Error */, "Did_you_forget_to_use_await_2773", "Did you forget to use 'await'?"),
|
|
7913
7906
|
This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_instead: diag(2774, 1 /* Error */, "This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_2774", "This condition will always return true since this function is always defined. Did you mean to call it instead?"),
|
|
@@ -7934,7 +7927,7 @@ ${lanes.join("\n")}
|
|
|
7934
7927
|
The_intrinsic_keyword_can_only_be_used_to_declare_compiler_provided_intrinsic_types: diag(2795, 1 /* Error */, "The_intrinsic_keyword_can_only_be_used_to_declare_compiler_provided_intrinsic_types_2795", "The 'intrinsic' keyword can only be used to declare compiler provided intrinsic types."),
|
|
7935
7928
|
It_is_likely_that_you_are_missing_a_comma_to_separate_these_two_template_expressions_They_form_a_tagged_template_expression_which_cannot_be_invoked: diag(2796, 1 /* Error */, "It_is_likely_that_you_are_missing_a_comma_to_separate_these_two_template_expressions_They_form_a_tag_2796", "It is likely that you are missing a comma to separate these two template expressions. They form a tagged template expression which cannot be invoked."),
|
|
7936
7929
|
A_mixin_class_that_extends_from_a_type_variable_containing_an_abstract_construct_signature_must_also_be_declared_abstract: diag(2797, 1 /* Error */, "A_mixin_class_that_extends_from_a_type_variable_containing_an_abstract_construct_signature_must_also_2797", "A mixin class that extends from a type variable containing an abstract construct signature must also be declared 'abstract'."),
|
|
7937
|
-
|
|
7930
|
+
The_declaration_was_marked_as_deprecated_here: diag(2798, 1 /* Error */, "The_declaration_was_marked_as_deprecated_here_2798", "The declaration was marked as deprecated here."),
|
|
7938
7931
|
Type_produces_a_tuple_type_that_is_too_large_to_represent: diag(2799, 1 /* Error */, "Type_produces_a_tuple_type_that_is_too_large_to_represent_2799", "Type produces a tuple type that is too large to represent."),
|
|
7939
7932
|
Expression_produces_a_tuple_type_that_is_too_large_to_represent: diag(2800, 1 /* Error */, "Expression_produces_a_tuple_type_that_is_too_large_to_represent_2800", "Expression produces a tuple type that is too large to represent."),
|
|
7940
7933
|
This_condition_will_always_return_true_since_this_0_is_always_defined: diag(2801, 1 /* Error */, "This_condition_will_always_return_true_since_this_0_is_always_defined_2801", "This condition will always return true since this '{0}' is always defined."),
|
|
@@ -8371,8 +8364,8 @@ ${lanes.join("\n")}
|
|
|
8371
8364
|
Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0: diag(6200, 1 /* Error */, "Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0_6200", "Definitions of the following identifiers conflict with those in another file: {0}"),
|
|
8372
8365
|
Conflicts_are_in_this_file: diag(6201, 3 /* Message */, "Conflicts_are_in_this_file_6201", "Conflicts are in this file."),
|
|
8373
8366
|
Project_references_may_not_form_a_circular_graph_Cycle_detected_Colon_0: diag(6202, 1 /* Error */, "Project_references_may_not_form_a_circular_graph_Cycle_detected_Colon_0_6202", "Project references may not form a circular graph. Cycle detected: {0}"),
|
|
8374
|
-
|
|
8375
|
-
|
|
8367
|
+
_0_was_also_declared_here: diag(6203, 3 /* Message */, "_0_was_also_declared_here_6203", "'{0}' was also declared here."),
|
|
8368
|
+
and_here: diag(6204, 3 /* Message */, "and_here_6204", "and here."),
|
|
8376
8369
|
All_type_parameters_are_unused: diag(6205, 1 /* Error */, "All_type_parameters_are_unused_6205", "All type parameters are unused."),
|
|
8377
8370
|
package_json_has_a_typesVersions_field_with_version_specific_path_mappings: diag(6206, 3 /* Message */, "package_json_has_a_typesVersions_field_with_version_specific_path_mappings_6206", "'package.json' has a 'typesVersions' field with version-specific path mappings."),
|
|
8378
8371
|
package_json_does_not_have_a_typesVersions_entry_that_matches_version_0: diag(6207, 3 /* Message */, "package_json_does_not_have_a_typesVersions_entry_that_matches_version_0_6207", "'package.json' does not have a 'typesVersions' entry that matches version '{0}'."),
|
|
@@ -8792,7 +8785,7 @@ ${lanes.join("\n")}
|
|
|
8792
8785
|
You_cannot_rename_a_module_via_a_global_import: diag(8031, 1 /* Error */, "You_cannot_rename_a_module_via_a_global_import_8031", "You cannot rename a module via a global import."),
|
|
8793
8786
|
Qualified_name_0_is_not_allowed_without_a_leading_param_object_1: diag(8032, 1 /* Error */, "Qualified_name_0_is_not_allowed_without_a_leading_param_object_1_8032", "Qualified name '{0}' is not allowed without a leading '@param {object} {1}'."),
|
|
8794
8787
|
A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags: diag(8033, 1 /* Error */, "A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags_8033", "A JSDoc '@typedef' comment may not contain multiple '@type' tags."),
|
|
8795
|
-
|
|
8788
|
+
The_tag_was_first_specified_here: diag(8034, 1 /* Error */, "The_tag_was_first_specified_here_8034", "The tag was first specified here."),
|
|
8796
8789
|
You_cannot_rename_elements_that_are_defined_in_a_node_modules_folder: diag(8035, 1 /* Error */, "You_cannot_rename_elements_that_are_defined_in_a_node_modules_folder_8035", "You cannot rename elements that are defined in a 'node_modules' folder."),
|
|
8797
8790
|
You_cannot_rename_elements_that_are_defined_in_another_node_modules_folder: diag(8036, 1 /* Error */, "You_cannot_rename_elements_that_are_defined_in_another_node_modules_folder_8036", "You cannot rename elements that are defined in another 'node_modules' folder."),
|
|
8798
8791
|
Type_satisfaction_expressions_can_only_be_used_in_TypeScript_files: diag(8037, 1 /* Error */, "Type_satisfaction_expressions_can_only_be_used_in_TypeScript_files_8037", "Type satisfaction expressions can only be used in TypeScript files."),
|
|
@@ -9746,7 +9739,7 @@ ${lanes.join("\n")}
|
|
|
9746
9739
|
if (withMinus)
|
|
9747
9740
|
start2--;
|
|
9748
9741
|
error2(Diagnostics.Octal_literals_are_not_allowed_Use_the_syntax_0, start2, pos - start2, literal);
|
|
9749
|
-
return
|
|
9742
|
+
return 9 /* NumericLiteral */;
|
|
9750
9743
|
}
|
|
9751
9744
|
} else {
|
|
9752
9745
|
mainFragment = scanNumberFragment();
|
|
@@ -9786,20 +9779,18 @@ ${lanes.join("\n")}
|
|
|
9786
9779
|
}
|
|
9787
9780
|
if (tokenFlags & 8192 /* ContainsLeadingZero */) {
|
|
9788
9781
|
error2(Diagnostics.Decimals_with_leading_zeros_are_not_allowed, start2, end2 - start2);
|
|
9789
|
-
|
|
9782
|
+
tokenValue = "" + +result;
|
|
9783
|
+
return 9 /* NumericLiteral */;
|
|
9790
9784
|
}
|
|
9791
9785
|
if (decimalFragment !== void 0 || tokenFlags & 16 /* Scientific */) {
|
|
9792
9786
|
checkForIdentifierStartAfterNumericLiteral(start2, decimalFragment === void 0 && !!(tokenFlags & 16 /* Scientific */));
|
|
9793
|
-
|
|
9794
|
-
|
|
9795
|
-
value: "" + +result
|
|
9796
|
-
// if value is not an integer, it can be safely coerced to a number
|
|
9797
|
-
};
|
|
9787
|
+
tokenValue = "" + +result;
|
|
9788
|
+
return 9 /* NumericLiteral */;
|
|
9798
9789
|
} else {
|
|
9799
9790
|
tokenValue = result;
|
|
9800
9791
|
const type = checkBigIntSuffix();
|
|
9801
9792
|
checkForIdentifierStartAfterNumericLiteral(start2);
|
|
9802
|
-
return
|
|
9793
|
+
return type;
|
|
9803
9794
|
}
|
|
9804
9795
|
}
|
|
9805
9796
|
function checkForIdentifierStartAfterNumericLiteral(numericStart, isScientific) {
|
|
@@ -10408,7 +10399,7 @@ ${lanes.join("\n")}
|
|
|
10408
10399
|
return token = 41 /* MinusToken */;
|
|
10409
10400
|
case 46 /* dot */:
|
|
10410
10401
|
if (isDigit(text.charCodeAt(pos + 1))) {
|
|
10411
|
-
|
|
10402
|
+
scanNumber();
|
|
10412
10403
|
return token = 9 /* NumericLiteral */;
|
|
10413
10404
|
}
|
|
10414
10405
|
if (text.charCodeAt(pos + 1) === 46 /* dot */ && text.charCodeAt(pos + 2) === 46 /* dot */) {
|
|
@@ -10526,8 +10517,7 @@ ${lanes.join("\n")}
|
|
|
10526
10517
|
case 55 /* _7 */:
|
|
10527
10518
|
case 56 /* _8 */:
|
|
10528
10519
|
case 57 /* _9 */:
|
|
10529
|
-
|
|
10530
|
-
return token;
|
|
10520
|
+
return token = scanNumber();
|
|
10531
10521
|
case 58 /* colon */:
|
|
10532
10522
|
pos++;
|
|
10533
10523
|
return token = 59 /* ColonToken */;
|
|
@@ -16419,7 +16409,7 @@ ${lanes.join("\n")}
|
|
|
16419
16409
|
}
|
|
16420
16410
|
function createTextWriter(newLine) {
|
|
16421
16411
|
var output;
|
|
16422
|
-
var
|
|
16412
|
+
var indent3;
|
|
16423
16413
|
var lineStart;
|
|
16424
16414
|
var lineCount;
|
|
16425
16415
|
var linePos;
|
|
@@ -16437,7 +16427,7 @@ ${lanes.join("\n")}
|
|
|
16437
16427
|
function writeText(s) {
|
|
16438
16428
|
if (s && s.length) {
|
|
16439
16429
|
if (lineStart) {
|
|
16440
|
-
s = getIndentString(
|
|
16430
|
+
s = getIndentString(indent3) + s;
|
|
16441
16431
|
lineStart = false;
|
|
16442
16432
|
}
|
|
16443
16433
|
output += s;
|
|
@@ -16456,7 +16446,7 @@ ${lanes.join("\n")}
|
|
|
16456
16446
|
}
|
|
16457
16447
|
function reset2() {
|
|
16458
16448
|
output = "";
|
|
16459
|
-
|
|
16449
|
+
indent3 = 0;
|
|
16460
16450
|
lineStart = true;
|
|
16461
16451
|
lineCount = 0;
|
|
16462
16452
|
linePos = 0;
|
|
@@ -16493,15 +16483,15 @@ ${lanes.join("\n")}
|
|
|
16493
16483
|
writeLiteral,
|
|
16494
16484
|
writeLine,
|
|
16495
16485
|
increaseIndent: () => {
|
|
16496
|
-
|
|
16486
|
+
indent3++;
|
|
16497
16487
|
},
|
|
16498
16488
|
decreaseIndent: () => {
|
|
16499
|
-
|
|
16489
|
+
indent3--;
|
|
16500
16490
|
},
|
|
16501
|
-
getIndent: () =>
|
|
16491
|
+
getIndent: () => indent3,
|
|
16502
16492
|
getTextPos: () => output.length,
|
|
16503
16493
|
getLine: () => lineCount,
|
|
16504
|
-
getColumn: () => lineStart ?
|
|
16494
|
+
getColumn: () => lineStart ? indent3 * getIndentSize() : output.length - linePos,
|
|
16505
16495
|
getText: () => output,
|
|
16506
16496
|
isAtStartOfLine: () => lineStart,
|
|
16507
16497
|
hasTrailingComment: () => hasTrailingComment,
|
|
@@ -18412,7 +18402,7 @@ ${lanes.join("\n")}
|
|
|
18412
18402
|
function replaceWildcardCharacter(match, singleAsteriskRegexFragment) {
|
|
18413
18403
|
return match === "*" ? singleAsteriskRegexFragment : match === "?" ? "[^/]" : "\\" + match;
|
|
18414
18404
|
}
|
|
18415
|
-
function getFileMatcherPatterns(path, excludes, includes,
|
|
18405
|
+
function getFileMatcherPatterns(path, excludes, includes, useCaseSensitiveFileNames2, currentDirectory) {
|
|
18416
18406
|
path = normalizePath(path);
|
|
18417
18407
|
currentDirectory = normalizePath(currentDirectory);
|
|
18418
18408
|
const absolutePath = combinePaths(currentDirectory, path);
|
|
@@ -18421,22 +18411,22 @@ ${lanes.join("\n")}
|
|
|
18421
18411
|
includeFilePattern: getRegularExpressionForWildcard(includes, absolutePath, "files"),
|
|
18422
18412
|
includeDirectoryPattern: getRegularExpressionForWildcard(includes, absolutePath, "directories"),
|
|
18423
18413
|
excludePattern: getRegularExpressionForWildcard(excludes, absolutePath, "exclude"),
|
|
18424
|
-
basePaths: getBasePaths(path, includes,
|
|
18414
|
+
basePaths: getBasePaths(path, includes, useCaseSensitiveFileNames2)
|
|
18425
18415
|
};
|
|
18426
18416
|
}
|
|
18427
|
-
function getRegexFromPattern(pattern,
|
|
18428
|
-
return new RegExp(pattern,
|
|
18417
|
+
function getRegexFromPattern(pattern, useCaseSensitiveFileNames2) {
|
|
18418
|
+
return new RegExp(pattern, useCaseSensitiveFileNames2 ? "" : "i");
|
|
18429
18419
|
}
|
|
18430
|
-
function matchFiles(path, extensions, excludes, includes,
|
|
18420
|
+
function matchFiles(path, extensions, excludes, includes, useCaseSensitiveFileNames2, currentDirectory, depth, getFileSystemEntries, realpath) {
|
|
18431
18421
|
path = normalizePath(path);
|
|
18432
18422
|
currentDirectory = normalizePath(currentDirectory);
|
|
18433
|
-
const patterns = getFileMatcherPatterns(path, excludes, includes,
|
|
18434
|
-
const includeFileRegexes = patterns.includeFilePatterns && patterns.includeFilePatterns.map((pattern) => getRegexFromPattern(pattern,
|
|
18435
|
-
const includeDirectoryRegex = patterns.includeDirectoryPattern && getRegexFromPattern(patterns.includeDirectoryPattern,
|
|
18436
|
-
const excludeRegex = patterns.excludePattern && getRegexFromPattern(patterns.excludePattern,
|
|
18423
|
+
const patterns = getFileMatcherPatterns(path, excludes, includes, useCaseSensitiveFileNames2, currentDirectory);
|
|
18424
|
+
const includeFileRegexes = patterns.includeFilePatterns && patterns.includeFilePatterns.map((pattern) => getRegexFromPattern(pattern, useCaseSensitiveFileNames2));
|
|
18425
|
+
const includeDirectoryRegex = patterns.includeDirectoryPattern && getRegexFromPattern(patterns.includeDirectoryPattern, useCaseSensitiveFileNames2);
|
|
18426
|
+
const excludeRegex = patterns.excludePattern && getRegexFromPattern(patterns.excludePattern, useCaseSensitiveFileNames2);
|
|
18437
18427
|
const results = includeFileRegexes ? includeFileRegexes.map(() => []) : [[]];
|
|
18438
18428
|
const visited = /* @__PURE__ */ new Map();
|
|
18439
|
-
const toCanonical = createGetCanonicalFileName(
|
|
18429
|
+
const toCanonical = createGetCanonicalFileName(useCaseSensitiveFileNames2);
|
|
18440
18430
|
for (const basePath of patterns.basePaths) {
|
|
18441
18431
|
visitDirectory(basePath, combinePaths(currentDirectory, basePath), depth);
|
|
18442
18432
|
}
|
|
@@ -18478,7 +18468,7 @@ ${lanes.join("\n")}
|
|
|
18478
18468
|
}
|
|
18479
18469
|
}
|
|
18480
18470
|
}
|
|
18481
|
-
function getBasePaths(path, includes,
|
|
18471
|
+
function getBasePaths(path, includes, useCaseSensitiveFileNames2) {
|
|
18482
18472
|
const basePaths = [path];
|
|
18483
18473
|
if (includes) {
|
|
18484
18474
|
const includeBasePaths = [];
|
|
@@ -18486,9 +18476,9 @@ ${lanes.join("\n")}
|
|
|
18486
18476
|
const absolute = isRootedDiskPath(include) ? include : normalizePath(combinePaths(path, include));
|
|
18487
18477
|
includeBasePaths.push(getIncludeBasePath(absolute));
|
|
18488
18478
|
}
|
|
18489
|
-
includeBasePaths.sort(getStringComparer(!
|
|
18479
|
+
includeBasePaths.sort(getStringComparer(!useCaseSensitiveFileNames2));
|
|
18490
18480
|
for (const includeBasePath of includeBasePaths) {
|
|
18491
|
-
if (every(basePaths, (basePath) => !containsPath(basePath, includeBasePath, path, !
|
|
18481
|
+
if (every(basePaths, (basePath) => !containsPath(basePath, includeBasePath, path, !useCaseSensitiveFileNames2))) {
|
|
18492
18482
|
basePaths.push(includeBasePath);
|
|
18493
18483
|
}
|
|
18494
18484
|
}
|
|
@@ -29559,7 +29549,7 @@ ${lanes.join("\n")}
|
|
|
29559
29549
|
if (lastError) {
|
|
29560
29550
|
addRelatedInfo(
|
|
29561
29551
|
lastError,
|
|
29562
|
-
createDetachedDiagnostic(fileName, openPosition, 1, Diagnostics.
|
|
29552
|
+
createDetachedDiagnostic(fileName, openPosition, 1, Diagnostics.The_parser_expected_to_find_a_1_to_match_the_0_token_here, tokenToString(openKind), tokenToString(closeKind))
|
|
29563
29553
|
);
|
|
29564
29554
|
}
|
|
29565
29555
|
}
|
|
@@ -31147,7 +31137,7 @@ ${lanes.join("\n")}
|
|
|
31147
31137
|
if (lastError && lastError.code === Diagnostics._0_expected.code) {
|
|
31148
31138
|
addRelatedInfo(
|
|
31149
31139
|
lastError,
|
|
31150
|
-
createDetachedDiagnostic(fileName, openBracePosition, 1, Diagnostics.
|
|
31140
|
+
createDetachedDiagnostic(fileName, openBracePosition, 1, Diagnostics.The_parser_expected_to_find_a_1_to_match_the_0_token_here, "{", "}")
|
|
31151
31141
|
);
|
|
31152
31142
|
}
|
|
31153
31143
|
}
|
|
@@ -34251,7 +34241,7 @@ ${lanes.join("\n")}
|
|
|
34251
34241
|
if (lastError && lastError.code === Diagnostics._0_expected.code) {
|
|
34252
34242
|
addRelatedInfo(
|
|
34253
34243
|
lastError,
|
|
34254
|
-
createDetachedDiagnostic(fileName, openBracePosition, 1, Diagnostics.
|
|
34244
|
+
createDetachedDiagnostic(fileName, openBracePosition, 1, Diagnostics.The_parser_expected_to_find_a_1_to_match_the_0_token_here, "{", "}")
|
|
34255
34245
|
);
|
|
34256
34246
|
}
|
|
34257
34247
|
}
|
|
@@ -34619,20 +34609,20 @@ ${lanes.join("\n")}
|
|
|
34619
34609
|
function doJSDocScan() {
|
|
34620
34610
|
let state = 1 /* SawAsterisk */;
|
|
34621
34611
|
let margin;
|
|
34622
|
-
let
|
|
34612
|
+
let indent3 = start - (content.lastIndexOf("\n", start) + 1) + 4;
|
|
34623
34613
|
function pushComment(text) {
|
|
34624
34614
|
if (!margin) {
|
|
34625
|
-
margin =
|
|
34615
|
+
margin = indent3;
|
|
34626
34616
|
}
|
|
34627
34617
|
comments.push(text);
|
|
34628
|
-
|
|
34618
|
+
indent3 += text.length;
|
|
34629
34619
|
}
|
|
34630
34620
|
nextTokenJSDoc();
|
|
34631
34621
|
while (parseOptionalJsdoc(5 /* WhitespaceTrivia */))
|
|
34632
34622
|
;
|
|
34633
34623
|
if (parseOptionalJsdoc(4 /* NewLineTrivia */)) {
|
|
34634
34624
|
state = 0 /* BeginningOfLine */;
|
|
34635
|
-
|
|
34625
|
+
indent3 = 0;
|
|
34636
34626
|
}
|
|
34637
34627
|
loop:
|
|
34638
34628
|
while (true) {
|
|
@@ -34641,14 +34631,14 @@ ${lanes.join("\n")}
|
|
|
34641
34631
|
removeTrailingWhitespace(comments);
|
|
34642
34632
|
if (!commentsPos)
|
|
34643
34633
|
commentsPos = getNodePos();
|
|
34644
|
-
addTag(parseTag(
|
|
34634
|
+
addTag(parseTag(indent3));
|
|
34645
34635
|
state = 0 /* BeginningOfLine */;
|
|
34646
34636
|
margin = void 0;
|
|
34647
34637
|
break;
|
|
34648
34638
|
case 4 /* NewLineTrivia */:
|
|
34649
34639
|
comments.push(scanner2.getTokenText());
|
|
34650
34640
|
state = 0 /* BeginningOfLine */;
|
|
34651
|
-
|
|
34641
|
+
indent3 = 0;
|
|
34652
34642
|
break;
|
|
34653
34643
|
case 42 /* AsteriskToken */:
|
|
34654
34644
|
const asterisk = scanner2.getTokenText();
|
|
@@ -34658,16 +34648,16 @@ ${lanes.join("\n")}
|
|
|
34658
34648
|
} else {
|
|
34659
34649
|
Debug.assert(state === 0 /* BeginningOfLine */);
|
|
34660
34650
|
state = 1 /* SawAsterisk */;
|
|
34661
|
-
|
|
34651
|
+
indent3 += asterisk.length;
|
|
34662
34652
|
}
|
|
34663
34653
|
break;
|
|
34664
34654
|
case 5 /* WhitespaceTrivia */:
|
|
34665
34655
|
Debug.assert(state !== 2 /* SavingComments */, "whitespace shouldn't come from the scanner while saving top-level comment text");
|
|
34666
34656
|
const whitespace = scanner2.getTokenText();
|
|
34667
|
-
if (margin !== void 0 &&
|
|
34668
|
-
comments.push(whitespace.slice(margin -
|
|
34657
|
+
if (margin !== void 0 && indent3 + whitespace.length > margin) {
|
|
34658
|
+
comments.push(whitespace.slice(margin - indent3));
|
|
34669
34659
|
}
|
|
34670
|
-
|
|
34660
|
+
indent3 += whitespace.length;
|
|
34671
34661
|
break;
|
|
34672
34662
|
case 1 /* EndOfFileToken */:
|
|
34673
34663
|
break loop;
|
|
@@ -34869,7 +34859,7 @@ ${lanes.join("\n")}
|
|
|
34869
34859
|
}
|
|
34870
34860
|
return parseTagComments(margin, indentText.slice(margin));
|
|
34871
34861
|
}
|
|
34872
|
-
function parseTagComments(
|
|
34862
|
+
function parseTagComments(indent3, initialMargin) {
|
|
34873
34863
|
const commentsPos2 = getNodePos();
|
|
34874
34864
|
let comments2 = [];
|
|
34875
34865
|
const parts2 = [];
|
|
@@ -34878,10 +34868,10 @@ ${lanes.join("\n")}
|
|
|
34878
34868
|
let margin;
|
|
34879
34869
|
function pushComment(text) {
|
|
34880
34870
|
if (!margin) {
|
|
34881
|
-
margin =
|
|
34871
|
+
margin = indent3;
|
|
34882
34872
|
}
|
|
34883
34873
|
comments2.push(text);
|
|
34884
|
-
|
|
34874
|
+
indent3 += text.length;
|
|
34885
34875
|
}
|
|
34886
34876
|
if (initialMargin !== void 0) {
|
|
34887
34877
|
if (initialMargin !== "") {
|
|
@@ -34896,7 +34886,7 @@ ${lanes.join("\n")}
|
|
|
34896
34886
|
case 4 /* NewLineTrivia */:
|
|
34897
34887
|
state = 0 /* BeginningOfLine */;
|
|
34898
34888
|
comments2.push(scanner2.getTokenText());
|
|
34899
|
-
|
|
34889
|
+
indent3 = 0;
|
|
34900
34890
|
break;
|
|
34901
34891
|
case 60 /* AtToken */:
|
|
34902
34892
|
scanner2.resetTokenState(scanner2.getTokenEnd() - 1);
|
|
@@ -34906,11 +34896,11 @@ ${lanes.join("\n")}
|
|
|
34906
34896
|
case 5 /* WhitespaceTrivia */:
|
|
34907
34897
|
Debug.assert(state !== 2 /* SavingComments */ && state !== 3 /* SavingBackticks */, "whitespace shouldn't come from the scanner while saving comment text");
|
|
34908
34898
|
const whitespace = scanner2.getTokenText();
|
|
34909
|
-
if (margin !== void 0 &&
|
|
34910
|
-
comments2.push(whitespace.slice(margin -
|
|
34899
|
+
if (margin !== void 0 && indent3 + whitespace.length > margin) {
|
|
34900
|
+
comments2.push(whitespace.slice(margin - indent3));
|
|
34911
34901
|
state = 2 /* SavingComments */;
|
|
34912
34902
|
}
|
|
34913
|
-
|
|
34903
|
+
indent3 += whitespace.length;
|
|
34914
34904
|
break;
|
|
34915
34905
|
case 19 /* OpenBraceToken */:
|
|
34916
34906
|
state = 2 /* SavingComments */;
|
|
@@ -34943,7 +34933,7 @@ ${lanes.join("\n")}
|
|
|
34943
34933
|
case 42 /* AsteriskToken */:
|
|
34944
34934
|
if (state === 0 /* BeginningOfLine */) {
|
|
34945
34935
|
state = 1 /* SawAsterisk */;
|
|
34946
|
-
|
|
34936
|
+
indent3 += 1;
|
|
34947
34937
|
break;
|
|
34948
34938
|
}
|
|
34949
34939
|
default:
|
|
@@ -35008,8 +34998,8 @@ ${lanes.join("\n")}
|
|
|
35008
34998
|
function isJSDocLinkTag(kind) {
|
|
35009
34999
|
return kind === "link" || kind === "linkcode" || kind === "linkplain";
|
|
35010
35000
|
}
|
|
35011
|
-
function parseUnknownTag(start2, tagName,
|
|
35012
|
-
return finishNode(factory2.createJSDocUnknownTag(tagName, parseTrailingTagComments(start2, getNodePos(),
|
|
35001
|
+
function parseUnknownTag(start2, tagName, indent3, indentText) {
|
|
35002
|
+
return finishNode(factory2.createJSDocUnknownTag(tagName, parseTrailingTagComments(start2, getNodePos(), indent3, indentText)), start2);
|
|
35013
35003
|
}
|
|
35014
35004
|
function addTag(tag) {
|
|
35015
35005
|
if (!tag) {
|
|
@@ -35056,7 +35046,7 @@ ${lanes.join("\n")}
|
|
|
35056
35046
|
return isTypeReferenceNode(node) && isIdentifier(node.typeName) && node.typeName.escapedText === "Object" && !node.typeArguments;
|
|
35057
35047
|
}
|
|
35058
35048
|
}
|
|
35059
|
-
function parseParameterOrPropertyTag(start2, tagName, target,
|
|
35049
|
+
function parseParameterOrPropertyTag(start2, tagName, target, indent3) {
|
|
35060
35050
|
let typeExpression = tryParseTypeExpression();
|
|
35061
35051
|
let isNameFirst = !typeExpression;
|
|
35062
35052
|
skipWhitespaceOrAsterisk();
|
|
@@ -35065,8 +35055,8 @@ ${lanes.join("\n")}
|
|
|
35065
35055
|
if (isNameFirst && !lookAhead(parseJSDocLinkPrefix)) {
|
|
35066
35056
|
typeExpression = tryParseTypeExpression();
|
|
35067
35057
|
}
|
|
35068
|
-
const comment = parseTrailingTagComments(start2, getNodePos(),
|
|
35069
|
-
const nestedTypeLiteral = parseNestedTypeLiteral(typeExpression, name, target,
|
|
35058
|
+
const comment = parseTrailingTagComments(start2, getNodePos(), indent3, indentText);
|
|
35059
|
+
const nestedTypeLiteral = parseNestedTypeLiteral(typeExpression, name, target, indent3);
|
|
35070
35060
|
if (nestedTypeLiteral) {
|
|
35071
35061
|
typeExpression = nestedTypeLiteral;
|
|
35072
35062
|
isNameFirst = true;
|
|
@@ -35074,12 +35064,12 @@ ${lanes.join("\n")}
|
|
|
35074
35064
|
const result2 = target === 1 /* Property */ ? factory2.createJSDocPropertyTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment) : factory2.createJSDocParameterTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment);
|
|
35075
35065
|
return finishNode(result2, start2);
|
|
35076
35066
|
}
|
|
35077
|
-
function parseNestedTypeLiteral(typeExpression, name, target,
|
|
35067
|
+
function parseNestedTypeLiteral(typeExpression, name, target, indent3) {
|
|
35078
35068
|
if (typeExpression && isObjectOrObjectArrayTypeReference(typeExpression.type)) {
|
|
35079
35069
|
const pos = getNodePos();
|
|
35080
35070
|
let child;
|
|
35081
35071
|
let children;
|
|
35082
|
-
while (child = tryParse(() => parseChildParameterOrPropertyTag(target,
|
|
35072
|
+
while (child = tryParse(() => parseChildParameterOrPropertyTag(target, indent3, name))) {
|
|
35083
35073
|
if (child.kind === 348 /* JSDocParameterTag */ || child.kind === 355 /* JSDocPropertyTag */) {
|
|
35084
35074
|
children = append(children, child);
|
|
35085
35075
|
} else if (child.kind === 352 /* JSDocTemplateTag */) {
|
|
@@ -35092,14 +35082,14 @@ ${lanes.join("\n")}
|
|
|
35092
35082
|
}
|
|
35093
35083
|
}
|
|
35094
35084
|
}
|
|
35095
|
-
function parseReturnTag(start2, tagName,
|
|
35085
|
+
function parseReturnTag(start2, tagName, indent3, indentText) {
|
|
35096
35086
|
if (some(tags, isJSDocReturnTag)) {
|
|
35097
35087
|
parseErrorAt(tagName.pos, scanner2.getTokenStart(), Diagnostics._0_tag_already_specified, unescapeLeadingUnderscores(tagName.escapedText));
|
|
35098
35088
|
}
|
|
35099
35089
|
const typeExpression = tryParseTypeExpression();
|
|
35100
|
-
return finishNode(factory2.createJSDocReturnTag(tagName, typeExpression, parseTrailingTagComments(start2, getNodePos(),
|
|
35090
|
+
return finishNode(factory2.createJSDocReturnTag(tagName, typeExpression, parseTrailingTagComments(start2, getNodePos(), indent3, indentText)), start2);
|
|
35101
35091
|
}
|
|
35102
|
-
function parseTypeTag(start2, tagName,
|
|
35092
|
+
function parseTypeTag(start2, tagName, indent3, indentText) {
|
|
35103
35093
|
if (some(tags, isJSDocTypeTag)) {
|
|
35104
35094
|
parseErrorAt(tagName.pos, scanner2.getTokenStart(), Diagnostics._0_tag_already_specified, unescapeLeadingUnderscores(tagName.escapedText));
|
|
35105
35095
|
}
|
|
@@ -35107,25 +35097,25 @@ ${lanes.join("\n")}
|
|
|
35107
35097
|
/*mayOmitBraces*/
|
|
35108
35098
|
true
|
|
35109
35099
|
);
|
|
35110
|
-
const comments2 =
|
|
35100
|
+
const comments2 = indent3 !== void 0 && indentText !== void 0 ? parseTrailingTagComments(start2, getNodePos(), indent3, indentText) : void 0;
|
|
35111
35101
|
return finishNode(factory2.createJSDocTypeTag(tagName, typeExpression, comments2), start2);
|
|
35112
35102
|
}
|
|
35113
|
-
function parseSeeTag(start2, tagName,
|
|
35103
|
+
function parseSeeTag(start2, tagName, indent3, indentText) {
|
|
35114
35104
|
const isMarkdownOrJSDocLink = token() === 23 /* OpenBracketToken */ || lookAhead(() => nextTokenJSDoc() === 60 /* AtToken */ && tokenIsIdentifierOrKeyword(nextTokenJSDoc()) && isJSDocLinkTag(scanner2.getTokenValue()));
|
|
35115
35105
|
const nameExpression = isMarkdownOrJSDocLink ? void 0 : parseJSDocNameReference();
|
|
35116
|
-
const comments2 =
|
|
35106
|
+
const comments2 = indent3 !== void 0 && indentText !== void 0 ? parseTrailingTagComments(start2, getNodePos(), indent3, indentText) : void 0;
|
|
35117
35107
|
return finishNode(factory2.createJSDocSeeTag(tagName, nameExpression, comments2), start2);
|
|
35118
35108
|
}
|
|
35119
|
-
function parseThrowsTag(start2, tagName,
|
|
35109
|
+
function parseThrowsTag(start2, tagName, indent3, indentText) {
|
|
35120
35110
|
const typeExpression = tryParseTypeExpression();
|
|
35121
|
-
const comment = parseTrailingTagComments(start2, getNodePos(),
|
|
35111
|
+
const comment = parseTrailingTagComments(start2, getNodePos(), indent3, indentText);
|
|
35122
35112
|
return finishNode(factory2.createJSDocThrowsTag(tagName, typeExpression, comment), start2);
|
|
35123
35113
|
}
|
|
35124
|
-
function parseAuthorTag(start2, tagName,
|
|
35114
|
+
function parseAuthorTag(start2, tagName, indent3, indentText) {
|
|
35125
35115
|
const commentStart = getNodePos();
|
|
35126
35116
|
const textOnly = parseAuthorNameAndEmail();
|
|
35127
35117
|
let commentEnd = scanner2.getTokenFullStart();
|
|
35128
|
-
const comments2 = parseTrailingTagComments(start2, commentEnd,
|
|
35118
|
+
const comments2 = parseTrailingTagComments(start2, commentEnd, indent3, indentText);
|
|
35129
35119
|
if (!comments2) {
|
|
35130
35120
|
commentEnd = scanner2.getTokenFullStart();
|
|
35131
35121
|
}
|
|
@@ -35209,19 +35199,19 @@ ${lanes.join("\n")}
|
|
|
35209
35199
|
skipWhitespace();
|
|
35210
35200
|
return finishNode(factory2.createJSDocEnumTag(tagName, typeExpression, parseTrailingTagComments(start2, getNodePos(), margin, indentText)), start2);
|
|
35211
35201
|
}
|
|
35212
|
-
function parseTypedefTag(start2, tagName,
|
|
35202
|
+
function parseTypedefTag(start2, tagName, indent3, indentText) {
|
|
35213
35203
|
let typeExpression = tryParseTypeExpression();
|
|
35214
35204
|
skipWhitespaceOrAsterisk();
|
|
35215
35205
|
const fullName = parseJSDocTypeNameWithNamespace();
|
|
35216
35206
|
skipWhitespace();
|
|
35217
|
-
let comment = parseTagComments(
|
|
35207
|
+
let comment = parseTagComments(indent3);
|
|
35218
35208
|
let end2;
|
|
35219
35209
|
if (!typeExpression || isObjectOrObjectArrayTypeReference(typeExpression.type)) {
|
|
35220
35210
|
let child;
|
|
35221
35211
|
let childTypeTag;
|
|
35222
35212
|
let jsDocPropertyTags;
|
|
35223
35213
|
let hasChildren = false;
|
|
35224
|
-
while (child = tryParse(() => parseChildPropertyTag(
|
|
35214
|
+
while (child = tryParse(() => parseChildPropertyTag(indent3))) {
|
|
35225
35215
|
if (child.kind === 352 /* JSDocTemplateTag */) {
|
|
35226
35216
|
break;
|
|
35227
35217
|
}
|
|
@@ -35230,7 +35220,7 @@ ${lanes.join("\n")}
|
|
|
35230
35220
|
if (childTypeTag) {
|
|
35231
35221
|
const lastError = parseErrorAtCurrentToken(Diagnostics.A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags);
|
|
35232
35222
|
if (lastError) {
|
|
35233
|
-
addRelatedInfo(lastError, createDetachedDiagnostic(fileName, 0, 0, Diagnostics.
|
|
35223
|
+
addRelatedInfo(lastError, createDetachedDiagnostic(fileName, 0, 0, Diagnostics.The_tag_was_first_specified_here));
|
|
35234
35224
|
}
|
|
35235
35225
|
break;
|
|
35236
35226
|
} else {
|
|
@@ -35249,7 +35239,7 @@ ${lanes.join("\n")}
|
|
|
35249
35239
|
}
|
|
35250
35240
|
end2 = end2 || comment !== void 0 ? getNodePos() : (fullName ?? typeExpression ?? tagName).end;
|
|
35251
35241
|
if (!comment) {
|
|
35252
|
-
comment = parseTrailingTagComments(start2, end2,
|
|
35242
|
+
comment = parseTrailingTagComments(start2, end2, indent3, indentText);
|
|
35253
35243
|
}
|
|
35254
35244
|
const typedefTag = factory2.createJSDocTypedefTag(tagName, typeExpression, fullName, comment);
|
|
35255
35245
|
return finishNode(typedefTag, start2, end2);
|
|
@@ -35279,11 +35269,11 @@ ${lanes.join("\n")}
|
|
|
35279
35269
|
}
|
|
35280
35270
|
return typeNameOrNamespaceName;
|
|
35281
35271
|
}
|
|
35282
|
-
function parseCallbackTagParameters(
|
|
35272
|
+
function parseCallbackTagParameters(indent3) {
|
|
35283
35273
|
const pos = getNodePos();
|
|
35284
35274
|
let child;
|
|
35285
35275
|
let parameters;
|
|
35286
|
-
while (child = tryParse(() => parseChildParameterOrPropertyTag(4 /* CallbackParameter */,
|
|
35276
|
+
while (child = tryParse(() => parseChildParameterOrPropertyTag(4 /* CallbackParameter */, indent3))) {
|
|
35287
35277
|
if (child.kind === 352 /* JSDocTemplateTag */) {
|
|
35288
35278
|
parseErrorAtRange(child.tagName, Diagnostics.A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag);
|
|
35289
35279
|
break;
|
|
@@ -35292,11 +35282,11 @@ ${lanes.join("\n")}
|
|
|
35292
35282
|
}
|
|
35293
35283
|
return createNodeArray(parameters || [], pos);
|
|
35294
35284
|
}
|
|
35295
|
-
function parseJSDocSignature(start2,
|
|
35296
|
-
const parameters = parseCallbackTagParameters(
|
|
35285
|
+
function parseJSDocSignature(start2, indent3) {
|
|
35286
|
+
const parameters = parseCallbackTagParameters(indent3);
|
|
35297
35287
|
const returnTag = tryParse(() => {
|
|
35298
35288
|
if (parseOptionalJsdoc(60 /* AtToken */)) {
|
|
35299
|
-
const tag = parseTag(
|
|
35289
|
+
const tag = parseTag(indent3);
|
|
35300
35290
|
if (tag && tag.kind === 349 /* JSDocReturnTag */) {
|
|
35301
35291
|
return tag;
|
|
35302
35292
|
}
|
|
@@ -35309,23 +35299,23 @@ ${lanes.join("\n")}
|
|
|
35309
35299
|
returnTag
|
|
35310
35300
|
), start2);
|
|
35311
35301
|
}
|
|
35312
|
-
function parseCallbackTag(start2, tagName,
|
|
35302
|
+
function parseCallbackTag(start2, tagName, indent3, indentText) {
|
|
35313
35303
|
const fullName = parseJSDocTypeNameWithNamespace();
|
|
35314
35304
|
skipWhitespace();
|
|
35315
|
-
let comment = parseTagComments(
|
|
35316
|
-
const typeExpression = parseJSDocSignature(start2,
|
|
35305
|
+
let comment = parseTagComments(indent3);
|
|
35306
|
+
const typeExpression = parseJSDocSignature(start2, indent3);
|
|
35317
35307
|
if (!comment) {
|
|
35318
|
-
comment = parseTrailingTagComments(start2, getNodePos(),
|
|
35308
|
+
comment = parseTrailingTagComments(start2, getNodePos(), indent3, indentText);
|
|
35319
35309
|
}
|
|
35320
35310
|
const end2 = comment !== void 0 ? getNodePos() : typeExpression.end;
|
|
35321
35311
|
return finishNode(factory2.createJSDocCallbackTag(tagName, typeExpression, fullName, comment), start2, end2);
|
|
35322
35312
|
}
|
|
35323
|
-
function parseOverloadTag(start2, tagName,
|
|
35313
|
+
function parseOverloadTag(start2, tagName, indent3, indentText) {
|
|
35324
35314
|
skipWhitespace();
|
|
35325
|
-
let comment = parseTagComments(
|
|
35326
|
-
const typeExpression = parseJSDocSignature(start2,
|
|
35315
|
+
let comment = parseTagComments(indent3);
|
|
35316
|
+
const typeExpression = parseJSDocSignature(start2, indent3);
|
|
35327
35317
|
if (!comment) {
|
|
35328
|
-
comment = parseTrailingTagComments(start2, getNodePos(),
|
|
35318
|
+
comment = parseTrailingTagComments(start2, getNodePos(), indent3, indentText);
|
|
35329
35319
|
}
|
|
35330
35320
|
const end2 = comment !== void 0 ? getNodePos() : typeExpression.end;
|
|
35331
35321
|
return finishNode(factory2.createJSDocOverloadTag(tagName, typeExpression, comment), start2, end2);
|
|
@@ -35341,17 +35331,17 @@ ${lanes.join("\n")}
|
|
|
35341
35331
|
}
|
|
35342
35332
|
return a.escapedText === b.escapedText;
|
|
35343
35333
|
}
|
|
35344
|
-
function parseChildPropertyTag(
|
|
35345
|
-
return parseChildParameterOrPropertyTag(1 /* Property */,
|
|
35334
|
+
function parseChildPropertyTag(indent3) {
|
|
35335
|
+
return parseChildParameterOrPropertyTag(1 /* Property */, indent3);
|
|
35346
35336
|
}
|
|
35347
|
-
function parseChildParameterOrPropertyTag(target,
|
|
35337
|
+
function parseChildParameterOrPropertyTag(target, indent3, name) {
|
|
35348
35338
|
let canParseTag = true;
|
|
35349
35339
|
let seenAsterisk = false;
|
|
35350
35340
|
while (true) {
|
|
35351
35341
|
switch (nextTokenJSDoc()) {
|
|
35352
35342
|
case 60 /* AtToken */:
|
|
35353
35343
|
if (canParseTag) {
|
|
35354
|
-
const child = tryParseChildTag(target,
|
|
35344
|
+
const child = tryParseChildTag(target, indent3);
|
|
35355
35345
|
if (child && (child.kind === 348 /* JSDocParameterTag */ || child.kind === 355 /* JSDocPropertyTag */) && name && (isIdentifier(child.name) || !escapedTextsEqual(name, child.name.left))) {
|
|
35356
35346
|
return false;
|
|
35357
35347
|
}
|
|
@@ -35377,7 +35367,7 @@ ${lanes.join("\n")}
|
|
|
35377
35367
|
}
|
|
35378
35368
|
}
|
|
35379
35369
|
}
|
|
35380
|
-
function tryParseChildTag(target,
|
|
35370
|
+
function tryParseChildTag(target, indent3) {
|
|
35381
35371
|
Debug.assert(token() === 60 /* AtToken */);
|
|
35382
35372
|
const start2 = scanner2.getTokenFullStart();
|
|
35383
35373
|
nextTokenJSDoc();
|
|
@@ -35397,14 +35387,14 @@ ${lanes.join("\n")}
|
|
|
35397
35387
|
t = 2 /* Parameter */ | 4 /* CallbackParameter */;
|
|
35398
35388
|
break;
|
|
35399
35389
|
case "template":
|
|
35400
|
-
return parseTemplateTag(start2, tagName,
|
|
35390
|
+
return parseTemplateTag(start2, tagName, indent3, indentText);
|
|
35401
35391
|
default:
|
|
35402
35392
|
return false;
|
|
35403
35393
|
}
|
|
35404
35394
|
if (!(target & t)) {
|
|
35405
35395
|
return false;
|
|
35406
35396
|
}
|
|
35407
|
-
return parseParameterOrPropertyTag(start2, tagName, target,
|
|
35397
|
+
return parseParameterOrPropertyTag(start2, tagName, target, indent3);
|
|
35408
35398
|
}
|
|
35409
35399
|
function parseTemplateTagTypeParameter() {
|
|
35410
35400
|
const typeParameterPos = getNodePos();
|
|
@@ -35445,10 +35435,10 @@ ${lanes.join("\n")}
|
|
|
35445
35435
|
} while (parseOptionalJsdoc(28 /* CommaToken */));
|
|
35446
35436
|
return createNodeArray(typeParameters, pos);
|
|
35447
35437
|
}
|
|
35448
|
-
function parseTemplateTag(start2, tagName,
|
|
35438
|
+
function parseTemplateTag(start2, tagName, indent3, indentText) {
|
|
35449
35439
|
const constraint = token() === 19 /* OpenBraceToken */ ? parseJSDocTypeExpression() : void 0;
|
|
35450
35440
|
const typeParameters = parseTemplateTagTypeParameters();
|
|
35451
|
-
return finishNode(factory2.createJSDocTemplateTag(tagName, constraint, typeParameters, parseTrailingTagComments(start2, getNodePos(),
|
|
35441
|
+
return finishNode(factory2.createJSDocTemplateTag(tagName, constraint, typeParameters, parseTrailingTagComments(start2, getNodePos(), indent3, indentText)), start2);
|
|
35452
35442
|
}
|
|
35453
35443
|
function parseOptionalJsdoc(t) {
|
|
35454
35444
|
if (token() === t) {
|
|
@@ -37279,19 +37269,19 @@ ${lanes.join("\n")}
|
|
|
37279
37269
|
const wildcardFiles = arrayFrom(wildcardFileMap.values());
|
|
37280
37270
|
return literalFiles.concat(wildcardFiles, arrayFrom(wildCardJsonFileMap.values()));
|
|
37281
37271
|
}
|
|
37282
|
-
function isExcludedFile(pathToCheck, spec, basePath,
|
|
37272
|
+
function isExcludedFile(pathToCheck, spec, basePath, useCaseSensitiveFileNames2, currentDirectory) {
|
|
37283
37273
|
const { validatedFilesSpec, validatedIncludeSpecs, validatedExcludeSpecs } = spec;
|
|
37284
37274
|
if (!length(validatedIncludeSpecs) || !length(validatedExcludeSpecs))
|
|
37285
37275
|
return false;
|
|
37286
37276
|
basePath = normalizePath(basePath);
|
|
37287
|
-
const keyMapper = createGetCanonicalFileName(
|
|
37277
|
+
const keyMapper = createGetCanonicalFileName(useCaseSensitiveFileNames2);
|
|
37288
37278
|
if (validatedFilesSpec) {
|
|
37289
37279
|
for (const fileName of validatedFilesSpec) {
|
|
37290
37280
|
if (keyMapper(getNormalizedAbsolutePath(fileName, basePath)) === pathToCheck)
|
|
37291
37281
|
return false;
|
|
37292
37282
|
}
|
|
37293
37283
|
}
|
|
37294
|
-
return matchesExcludeWorker(pathToCheck, validatedExcludeSpecs,
|
|
37284
|
+
return matchesExcludeWorker(pathToCheck, validatedExcludeSpecs, useCaseSensitiveFileNames2, currentDirectory, basePath);
|
|
37295
37285
|
}
|
|
37296
37286
|
function invalidDotDotAfterRecursiveWildcard(s) {
|
|
37297
37287
|
const wildcardIndex = startsWith(s, "**/") ? 0 : s.indexOf("/**/");
|
|
@@ -37301,17 +37291,17 @@ ${lanes.join("\n")}
|
|
|
37301
37291
|
const lastDotIndex = endsWith(s, "/..") ? s.length : s.lastIndexOf("/../");
|
|
37302
37292
|
return lastDotIndex > wildcardIndex;
|
|
37303
37293
|
}
|
|
37304
|
-
function matchesExclude(pathToCheck, excludeSpecs,
|
|
37294
|
+
function matchesExclude(pathToCheck, excludeSpecs, useCaseSensitiveFileNames2, currentDirectory) {
|
|
37305
37295
|
return matchesExcludeWorker(
|
|
37306
37296
|
pathToCheck,
|
|
37307
37297
|
filter(excludeSpecs, (spec) => !invalidDotDotAfterRecursiveWildcard(spec)),
|
|
37308
|
-
|
|
37298
|
+
useCaseSensitiveFileNames2,
|
|
37309
37299
|
currentDirectory
|
|
37310
37300
|
);
|
|
37311
37301
|
}
|
|
37312
|
-
function matchesExcludeWorker(pathToCheck, excludeSpecs,
|
|
37302
|
+
function matchesExcludeWorker(pathToCheck, excludeSpecs, useCaseSensitiveFileNames2, currentDirectory, basePath) {
|
|
37313
37303
|
const excludePattern = getRegularExpressionForWildcard(excludeSpecs, combinePaths(normalizePath(currentDirectory), basePath), "exclude");
|
|
37314
|
-
const excludeRegex = excludePattern && getRegexFromPattern(excludePattern,
|
|
37304
|
+
const excludeRegex = excludePattern && getRegexFromPattern(excludePattern, useCaseSensitiveFileNames2);
|
|
37315
37305
|
if (!excludeRegex)
|
|
37316
37306
|
return false;
|
|
37317
37307
|
if (excludeRegex.test(pathToCheck))
|
|
@@ -37341,9 +37331,9 @@ ${lanes.join("\n")}
|
|
|
37341
37331
|
return [Diagnostics.File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0, spec];
|
|
37342
37332
|
}
|
|
37343
37333
|
}
|
|
37344
|
-
function getWildcardDirectories({ validatedIncludeSpecs: include, validatedExcludeSpecs: exclude }, path,
|
|
37334
|
+
function getWildcardDirectories({ validatedIncludeSpecs: include, validatedExcludeSpecs: exclude }, path, useCaseSensitiveFileNames2) {
|
|
37345
37335
|
const rawExcludeRegex = getRegularExpressionForWildcard(exclude, path, "exclude");
|
|
37346
|
-
const excludeRegex = rawExcludeRegex && new RegExp(rawExcludeRegex,
|
|
37336
|
+
const excludeRegex = rawExcludeRegex && new RegExp(rawExcludeRegex, useCaseSensitiveFileNames2 ? "" : "i");
|
|
37347
37337
|
const wildcardDirectories = {};
|
|
37348
37338
|
if (include !== void 0) {
|
|
37349
37339
|
const recursiveKeys = [];
|
|
@@ -37352,7 +37342,7 @@ ${lanes.join("\n")}
|
|
|
37352
37342
|
if (excludeRegex && excludeRegex.test(spec)) {
|
|
37353
37343
|
continue;
|
|
37354
37344
|
}
|
|
37355
|
-
const match = getWildcardDirectoryFromSpec(spec,
|
|
37345
|
+
const match = getWildcardDirectoryFromSpec(spec, useCaseSensitiveFileNames2);
|
|
37356
37346
|
if (match) {
|
|
37357
37347
|
const { key, flags } = match;
|
|
37358
37348
|
const existingFlags = wildcardDirectories[key];
|
|
@@ -37367,7 +37357,7 @@ ${lanes.join("\n")}
|
|
|
37367
37357
|
for (const key in wildcardDirectories) {
|
|
37368
37358
|
if (hasProperty(wildcardDirectories, key)) {
|
|
37369
37359
|
for (const recursiveKey of recursiveKeys) {
|
|
37370
|
-
if (key !== recursiveKey && containsPath(recursiveKey, key, path, !
|
|
37360
|
+
if (key !== recursiveKey && containsPath(recursiveKey, key, path, !useCaseSensitiveFileNames2)) {
|
|
37371
37361
|
delete wildcardDirectories[key];
|
|
37372
37362
|
}
|
|
37373
37363
|
}
|
|
@@ -37376,20 +37366,20 @@ ${lanes.join("\n")}
|
|
|
37376
37366
|
}
|
|
37377
37367
|
return wildcardDirectories;
|
|
37378
37368
|
}
|
|
37379
|
-
function getWildcardDirectoryFromSpec(spec,
|
|
37369
|
+
function getWildcardDirectoryFromSpec(spec, useCaseSensitiveFileNames2) {
|
|
37380
37370
|
const match = wildcardDirectoryPattern.exec(spec);
|
|
37381
37371
|
if (match) {
|
|
37382
37372
|
const questionWildcardIndex = spec.indexOf("?");
|
|
37383
37373
|
const starWildcardIndex = spec.indexOf("*");
|
|
37384
37374
|
const lastDirectorySeperatorIndex = spec.lastIndexOf(directorySeparator);
|
|
37385
37375
|
return {
|
|
37386
|
-
key:
|
|
37376
|
+
key: useCaseSensitiveFileNames2 ? match[0] : toFileNameLowerCase(match[0]),
|
|
37387
37377
|
flags: questionWildcardIndex !== -1 && questionWildcardIndex < lastDirectorySeperatorIndex || starWildcardIndex !== -1 && starWildcardIndex < lastDirectorySeperatorIndex ? 1 /* Recursive */ : 0 /* None */
|
|
37388
37378
|
};
|
|
37389
37379
|
}
|
|
37390
37380
|
if (isImplicitGlob(spec.substring(spec.lastIndexOf(directorySeparator) + 1))) {
|
|
37391
37381
|
return {
|
|
37392
|
-
key: removeTrailingDirectorySeparator(
|
|
37382
|
+
key: removeTrailingDirectorySeparator(useCaseSensitiveFileNames2 ? spec : toFileNameLowerCase(spec)),
|
|
37393
37383
|
flags: 1 /* Recursive */
|
|
37394
37384
|
};
|
|
37395
37385
|
}
|
|
@@ -37994,6 +37984,7 @@ ${lanes.join("\n")}
|
|
|
37994
37984
|
{
|
|
37995
37985
|
name: "checkJs",
|
|
37996
37986
|
type: "boolean",
|
|
37987
|
+
affectsModuleResolution: true,
|
|
37997
37988
|
showInSimplifiedHelpView: true,
|
|
37998
37989
|
category: Diagnostics.JavaScript_Support,
|
|
37999
37990
|
description: Diagnostics.Enable_error_reporting_in_type_checked_JavaScript_files,
|
|
@@ -39074,6 +39065,18 @@ ${lanes.join("\n")}
|
|
|
39074
39065
|
result.push("JSON");
|
|
39075
39066
|
return result.join(", ");
|
|
39076
39067
|
}
|
|
39068
|
+
function extensionsToExtensionsArray(extensions) {
|
|
39069
|
+
const result = [];
|
|
39070
|
+
if (extensions & 1 /* TypeScript */)
|
|
39071
|
+
result.push(...supportedTSImplementationExtensions);
|
|
39072
|
+
if (extensions & 2 /* JavaScript */)
|
|
39073
|
+
result.push(...supportedJSExtensionsFlat);
|
|
39074
|
+
if (extensions & 4 /* Declaration */)
|
|
39075
|
+
result.push(...supportedDeclarationExtensions);
|
|
39076
|
+
if (extensions & 8 /* Json */)
|
|
39077
|
+
result.push(".json" /* Json */);
|
|
39078
|
+
return result;
|
|
39079
|
+
}
|
|
39077
39080
|
function resolvedTypeScriptOnly(resolved) {
|
|
39078
39081
|
if (!resolved) {
|
|
39079
39082
|
return void 0;
|
|
@@ -39246,8 +39249,8 @@ ${lanes.join("\n")}
|
|
|
39246
39249
|
return typeRoots;
|
|
39247
39250
|
}
|
|
39248
39251
|
function arePathsEqual(path1, path2, host) {
|
|
39249
|
-
const
|
|
39250
|
-
return comparePaths(path1, path2, !
|
|
39252
|
+
const useCaseSensitiveFileNames2 = typeof host.useCaseSensitiveFileNames === "function" ? host.useCaseSensitiveFileNames() : host.useCaseSensitiveFileNames;
|
|
39253
|
+
return comparePaths(path1, path2, !useCaseSensitiveFileNames2) === 0 /* EqualTo */;
|
|
39251
39254
|
}
|
|
39252
39255
|
function getOriginalAndResolvedFileName(fileName, host, traceEnabled) {
|
|
39253
39256
|
const resolvedFileName = realPath(fileName, host, traceEnabled);
|
|
@@ -40510,7 +40513,7 @@ ${lanes.join("\n")}
|
|
|
40510
40513
|
arrayIsEqualTo
|
|
40511
40514
|
);
|
|
40512
40515
|
for (const conditions of conditionSets) {
|
|
40513
|
-
const loadPackageJsonExportsState = { ...loadPackageJsonMainState, failedLookupLocations: [], conditions };
|
|
40516
|
+
const loadPackageJsonExportsState = { ...loadPackageJsonMainState, failedLookupLocations: [], conditions, host };
|
|
40514
40517
|
const exportResolutions = loadEntrypointsFromExportMap(
|
|
40515
40518
|
packageJsonInfo,
|
|
40516
40519
|
packageJsonInfo.contents.packageJsonContent.exports,
|
|
@@ -40542,23 +40545,42 @@ ${lanes.join("\n")}
|
|
|
40542
40545
|
return entrypoints;
|
|
40543
40546
|
function loadEntrypointsFromTargetExports(target) {
|
|
40544
40547
|
var _a, _b;
|
|
40545
|
-
if (typeof target === "string" && startsWith(target, "./")
|
|
40546
|
-
|
|
40547
|
-
|
|
40548
|
-
|
|
40549
|
-
|
|
40550
|
-
|
|
40551
|
-
|
|
40552
|
-
|
|
40553
|
-
|
|
40554
|
-
|
|
40555
|
-
|
|
40556
|
-
|
|
40557
|
-
|
|
40558
|
-
|
|
40559
|
-
|
|
40560
|
-
|
|
40561
|
-
|
|
40548
|
+
if (typeof target === "string" && startsWith(target, "./")) {
|
|
40549
|
+
if (target.indexOf("*") >= 0 && state.host.readDirectory) {
|
|
40550
|
+
if (target.indexOf("*") !== target.lastIndexOf("*")) {
|
|
40551
|
+
return false;
|
|
40552
|
+
}
|
|
40553
|
+
state.host.readDirectory(
|
|
40554
|
+
scope.packageDirectory,
|
|
40555
|
+
extensionsToExtensionsArray(extensions),
|
|
40556
|
+
/*excludes*/
|
|
40557
|
+
void 0,
|
|
40558
|
+
[changeAnyExtension(target.replace("*", "**/*"), getDeclarationEmitExtensionForPath(target))]
|
|
40559
|
+
).forEach((entry) => {
|
|
40560
|
+
entrypoints = appendIfUnique(entrypoints, {
|
|
40561
|
+
path: entry,
|
|
40562
|
+
ext: getAnyExtensionFromPath(entry),
|
|
40563
|
+
resolvedUsingTsExtension: void 0
|
|
40564
|
+
});
|
|
40565
|
+
});
|
|
40566
|
+
} else {
|
|
40567
|
+
const partsAfterFirst = getPathComponents(target).slice(2);
|
|
40568
|
+
if (partsAfterFirst.indexOf("..") >= 0 || partsAfterFirst.indexOf(".") >= 0 || partsAfterFirst.indexOf("node_modules") >= 0) {
|
|
40569
|
+
return false;
|
|
40570
|
+
}
|
|
40571
|
+
const resolvedTarget = combinePaths(scope.packageDirectory, target);
|
|
40572
|
+
const finalPath = getNormalizedAbsolutePath(resolvedTarget, (_b = (_a = state.host).getCurrentDirectory) == null ? void 0 : _b.call(_a));
|
|
40573
|
+
const result = loadFileNameFromPackageJsonField(
|
|
40574
|
+
extensions,
|
|
40575
|
+
finalPath,
|
|
40576
|
+
/*onlyRecordFailures*/
|
|
40577
|
+
false,
|
|
40578
|
+
state
|
|
40579
|
+
);
|
|
40580
|
+
if (result) {
|
|
40581
|
+
entrypoints = appendIfUnique(entrypoints, result, (a, b) => a.path === b.path);
|
|
40582
|
+
return true;
|
|
40583
|
+
}
|
|
40562
40584
|
}
|
|
40563
40585
|
} else if (Array.isArray(target)) {
|
|
40564
40586
|
for (const t of target) {
|
|
@@ -40767,6 +40789,9 @@ ${lanes.join("\n")}
|
|
|
40767
40789
|
}
|
|
40768
40790
|
const trailingParts = parts.slice(nameParts.length);
|
|
40769
40791
|
const subpath = !length(trailingParts) ? "." : `.${directorySeparator}${trailingParts.join(directorySeparator)}`;
|
|
40792
|
+
if (getAllowJSCompilerOption(state.compilerOptions) && !pathContainsNodeModules(directory)) {
|
|
40793
|
+
return loadModuleFromExports(scope, extensions, subpath, state, cache, redirectedReference);
|
|
40794
|
+
}
|
|
40770
40795
|
const priorityExtensions = extensions & (1 /* TypeScript */ | 4 /* Declaration */);
|
|
40771
40796
|
const secondaryExtensions = extensions & ~(1 /* TypeScript */ | 4 /* Declaration */);
|
|
40772
40797
|
return loadModuleFromExports(scope, priorityExtensions, subpath, state, cache, redirectedReference) || loadModuleFromExports(scope, secondaryExtensions, subpath, state, cache, redirectedReference);
|
|
@@ -41114,13 +41139,10 @@ ${lanes.join("\n")}
|
|
|
41114
41139
|
function combineDirectoryPath(root, dir) {
|
|
41115
41140
|
return ensureTrailingDirectorySeparator(combinePaths(root, dir));
|
|
41116
41141
|
}
|
|
41117
|
-
function useCaseSensitiveFileNames() {
|
|
41118
|
-
return !state.host.useCaseSensitiveFileNames ? true : typeof state.host.useCaseSensitiveFileNames === "boolean" ? state.host.useCaseSensitiveFileNames : state.host.useCaseSensitiveFileNames();
|
|
41119
|
-
}
|
|
41120
41142
|
function tryLoadInputFileForPath(finalPath, entry, packagePath, isImports2) {
|
|
41121
41143
|
var _a, _b, _c, _d;
|
|
41122
|
-
if (!state.isConfigLookup && (state.compilerOptions.declarationDir || state.compilerOptions.outDir) && finalPath.indexOf("/node_modules/") === -1 && (state.compilerOptions.configFile ? containsPath(scope.packageDirectory, toAbsolutePath(state.compilerOptions.configFile.fileName), !useCaseSensitiveFileNames()) : true)) {
|
|
41123
|
-
const getCanonicalFileName = hostGetCanonicalFileName({ useCaseSensitiveFileNames });
|
|
41144
|
+
if (!state.isConfigLookup && (state.compilerOptions.declarationDir || state.compilerOptions.outDir) && finalPath.indexOf("/node_modules/") === -1 && (state.compilerOptions.configFile ? containsPath(scope.packageDirectory, toAbsolutePath(state.compilerOptions.configFile.fileName), !useCaseSensitiveFileNames(state)) : true)) {
|
|
41145
|
+
const getCanonicalFileName = hostGetCanonicalFileName({ useCaseSensitiveFileNames: () => useCaseSensitiveFileNames(state) });
|
|
41124
41146
|
const commonSourceDirGuesses = [];
|
|
41125
41147
|
if (state.compilerOptions.rootDir || state.compilerOptions.composite && state.compilerOptions.configFilePath) {
|
|
41126
41148
|
const commonDir = toAbsolutePath(getCommonSourceDirectory(state.compilerOptions, () => [], ((_b = (_a = state.host).getCurrentDirectory) == null ? void 0 : _b.call(_a)) || "", getCanonicalFileName));
|
|
@@ -41149,7 +41171,7 @@ ${lanes.join("\n")}
|
|
|
41149
41171
|
for (const commonSourceDirGuess of commonSourceDirGuesses) {
|
|
41150
41172
|
const candidateDirectories = getOutputDirectoriesForBaseDirectory(commonSourceDirGuess);
|
|
41151
41173
|
for (const candidateDir of candidateDirectories) {
|
|
41152
|
-
if (containsPath(candidateDir, finalPath, !useCaseSensitiveFileNames())) {
|
|
41174
|
+
if (containsPath(candidateDir, finalPath, !useCaseSensitiveFileNames(state))) {
|
|
41153
41175
|
const pathFragment = finalPath.slice(candidateDir.length + 1);
|
|
41154
41176
|
const possibleInputBase = combinePaths(commonSourceDirGuess, pathFragment);
|
|
41155
41177
|
const jsAndDtsExtensions = [".mjs" /* Mjs */, ".cjs" /* Cjs */, ".js" /* Js */, ".json" /* Json */, ".d.mts" /* Dmts */, ".d.cts" /* Dcts */, ".d.ts" /* Dts */];
|
|
@@ -41159,7 +41181,7 @@ ${lanes.join("\n")}
|
|
|
41159
41181
|
for (const possibleExt of inputExts) {
|
|
41160
41182
|
if (!extensionIsOk(extensions, possibleExt))
|
|
41161
41183
|
continue;
|
|
41162
|
-
const possibleInputWithInputExtension = changeAnyExtension(possibleInputBase, possibleExt, ext, !useCaseSensitiveFileNames());
|
|
41184
|
+
const possibleInputWithInputExtension = changeAnyExtension(possibleInputBase, possibleExt, ext, !useCaseSensitiveFileNames(state));
|
|
41163
41185
|
if (state.host.fileExists(possibleInputWithInputExtension)) {
|
|
41164
41186
|
return toSearchResult(withPackageId(scope, loadFileNameFromPackageJsonField(
|
|
41165
41187
|
extensions,
|
|
@@ -41575,6 +41597,9 @@ ${lanes.join("\n")}
|
|
|
41575
41597
|
trace(state.host, diagnostic, ...args);
|
|
41576
41598
|
}
|
|
41577
41599
|
}
|
|
41600
|
+
function useCaseSensitiveFileNames(state) {
|
|
41601
|
+
return !state.host.useCaseSensitiveFileNames ? true : typeof state.host.useCaseSensitiveFileNames === "boolean" ? state.host.useCaseSensitiveFileNames : state.host.useCaseSensitiveFileNames();
|
|
41602
|
+
}
|
|
41578
41603
|
var typeScriptVersion, nodeModulesAtTypes, NodeResolutionFeatures, nodeModulesPathPart, mangledScopedPackageSeparator;
|
|
41579
41604
|
var init_moduleNameResolver = __esm({
|
|
41580
41605
|
"src/compiler/moduleNameResolver.ts"() {
|
|
@@ -41959,10 +41984,10 @@ ${lanes.join("\n")}
|
|
|
41959
41984
|
const decl = getNameOfDeclaration(declaration) || declaration;
|
|
41960
41985
|
const diag3 = messageNeedsName ? createDiagnosticForNode2(decl, message, getDisplayName(declaration)) : createDiagnosticForNode2(decl, message);
|
|
41961
41986
|
file.bindDiagnostics.push(
|
|
41962
|
-
multipleDefaultExports ? addRelatedInfo(diag3, createDiagnosticForNode2(declarationName, index === 0 ? Diagnostics.
|
|
41987
|
+
multipleDefaultExports ? addRelatedInfo(diag3, createDiagnosticForNode2(declarationName, index === 0 ? Diagnostics.Another_export_default_is_here : Diagnostics.and_here)) : diag3
|
|
41963
41988
|
);
|
|
41964
41989
|
if (multipleDefaultExports) {
|
|
41965
|
-
relatedInformation.push(createDiagnosticForNode2(decl, Diagnostics.
|
|
41990
|
+
relatedInformation.push(createDiagnosticForNode2(decl, Diagnostics.The_first_export_default_is_here));
|
|
41966
41991
|
}
|
|
41967
41992
|
});
|
|
41968
41993
|
const diag2 = messageNeedsName ? createDiagnosticForNode2(declarationName, message, getDisplayName(node)) : createDiagnosticForNode2(declarationName, message);
|
|
@@ -45080,7 +45105,9 @@ ${lanes.join("\n")}
|
|
|
45080
45105
|
for (const { ending, value } of candidates) {
|
|
45081
45106
|
if (value.length >= prefix.length + suffix.length && startsWith(value, prefix) && endsWith(value, suffix) && validateEnding({ ending, value })) {
|
|
45082
45107
|
const matchedStar = value.substring(prefix.length, value.length - suffix.length);
|
|
45083
|
-
|
|
45108
|
+
if (!pathIsRelative(matchedStar)) {
|
|
45109
|
+
return key.replace("*", matchedStar);
|
|
45110
|
+
}
|
|
45084
45111
|
}
|
|
45085
45112
|
}
|
|
45086
45113
|
} else if (some(candidates, (c) => c.ending !== 0 /* Minimal */ && pattern === c.value) || some(candidates, (c) => c.ending === 0 /* Minimal */ && pattern === c.value && validateEnding(c))) {
|
|
@@ -45152,7 +45179,7 @@ ${lanes.join("\n")}
|
|
|
45152
45179
|
for (const key of getOwnKeys(exports)) {
|
|
45153
45180
|
if (key === "default" || conditions.indexOf(key) >= 0 || isApplicableVersionedTypesKey(conditions, key)) {
|
|
45154
45181
|
const subTarget = exports[key];
|
|
45155
|
-
const result = tryGetModuleNameFromExports(options, targetFilePath, packageDirectory, packageName, subTarget, conditions);
|
|
45182
|
+
const result = tryGetModuleNameFromExports(options, targetFilePath, packageDirectory, packageName, subTarget, conditions, mode);
|
|
45156
45183
|
if (result) {
|
|
45157
45184
|
return result;
|
|
45158
45185
|
}
|
|
@@ -46210,7 +46237,7 @@ ${lanes.join("\n")}
|
|
|
46210
46237
|
};
|
|
46211
46238
|
var amalgamatedDuplicates;
|
|
46212
46239
|
var reverseMappedCache = /* @__PURE__ */ new Map();
|
|
46213
|
-
var
|
|
46240
|
+
var homomorphicMappedTypeInferenceStack = [];
|
|
46214
46241
|
var ambientModulesCache;
|
|
46215
46242
|
var patternAmbientModules;
|
|
46216
46243
|
var patternAmbientModuleAugmentations;
|
|
@@ -46467,7 +46494,7 @@ ${lanes.join("\n")}
|
|
|
46467
46494
|
if (deprecatedTag) {
|
|
46468
46495
|
addRelatedInfo(
|
|
46469
46496
|
diagnostic,
|
|
46470
|
-
createDiagnosticForNode(deprecatedTag, Diagnostics.
|
|
46497
|
+
createDiagnosticForNode(deprecatedTag, Diagnostics.The_declaration_was_marked_as_deprecated_here)
|
|
46471
46498
|
);
|
|
46472
46499
|
}
|
|
46473
46500
|
suggestionDiagnostics.add(diagnostic);
|
|
@@ -46662,8 +46689,8 @@ ${lanes.join("\n")}
|
|
|
46662
46689
|
if (adjustedNode === errorNode)
|
|
46663
46690
|
continue;
|
|
46664
46691
|
err.relatedInformation = err.relatedInformation || [];
|
|
46665
|
-
const leadingMessage = createDiagnosticForNode(adjustedNode, Diagnostics.
|
|
46666
|
-
const followOnMessage = createDiagnosticForNode(adjustedNode, Diagnostics.
|
|
46692
|
+
const leadingMessage = createDiagnosticForNode(adjustedNode, Diagnostics._0_was_also_declared_here, symbolName2);
|
|
46693
|
+
const followOnMessage = createDiagnosticForNode(adjustedNode, Diagnostics.and_here);
|
|
46667
46694
|
if (length(err.relatedInformation) >= 5 || some(err.relatedInformation, (r) => compareDiagnostics(r, followOnMessage) === 0 /* EqualTo */ || compareDiagnostics(r, leadingMessage) === 0 /* EqualTo */))
|
|
46668
46695
|
continue;
|
|
46669
46696
|
addRelatedInfo(err, !length(err.relatedInformation) ? leadingMessage : followOnMessage);
|
|
@@ -47274,7 +47301,7 @@ ${lanes.join("\n")}
|
|
|
47274
47301
|
if (suggestion.valueDeclaration) {
|
|
47275
47302
|
addRelatedInfo(
|
|
47276
47303
|
diagnostic,
|
|
47277
|
-
createDiagnosticForNode(suggestion.valueDeclaration, Diagnostics.
|
|
47304
|
+
createDiagnosticForNode(suggestion.valueDeclaration, Diagnostics._0_is_declared_here, suggestionName)
|
|
47278
47305
|
);
|
|
47279
47306
|
}
|
|
47280
47307
|
}
|
|
@@ -47336,7 +47363,7 @@ ${lanes.join("\n")}
|
|
|
47336
47363
|
diagnostic,
|
|
47337
47364
|
createDiagnosticForNode(
|
|
47338
47365
|
typeOnlyDeclaration,
|
|
47339
|
-
typeOnlyDeclaration.kind === 281 /* ExportSpecifier */ || typeOnlyDeclaration.kind === 278 /* ExportDeclaration */ || typeOnlyDeclaration.kind === 280 /* NamespaceExport */ ? Diagnostics.
|
|
47366
|
+
typeOnlyDeclaration.kind === 281 /* ExportSpecifier */ || typeOnlyDeclaration.kind === 278 /* ExportDeclaration */ || typeOnlyDeclaration.kind === 280 /* NamespaceExport */ ? Diagnostics._0_was_exported_here : Diagnostics._0_was_imported_here,
|
|
47340
47367
|
unescapedName
|
|
47341
47368
|
)
|
|
47342
47369
|
);
|
|
@@ -47473,7 +47500,7 @@ ${lanes.join("\n")}
|
|
|
47473
47500
|
return true;
|
|
47474
47501
|
}
|
|
47475
47502
|
}
|
|
47476
|
-
error2(errorLocation, Diagnostics.
|
|
47503
|
+
error2(errorLocation, Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here, unescapeLeadingUnderscores(name));
|
|
47477
47504
|
return true;
|
|
47478
47505
|
}
|
|
47479
47506
|
}
|
|
@@ -47515,7 +47542,7 @@ ${lanes.join("\n")}
|
|
|
47515
47542
|
if (isExtendedByInterface(errorLocation)) {
|
|
47516
47543
|
error2(errorLocation, Diagnostics.An_interface_cannot_extend_a_primitive_type_like_0_an_interface_can_only_extend_named_types_and_classes, unescapeLeadingUnderscores(name));
|
|
47517
47544
|
} else {
|
|
47518
|
-
error2(errorLocation, Diagnostics.
|
|
47545
|
+
error2(errorLocation, Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here, unescapeLeadingUnderscores(name));
|
|
47519
47546
|
}
|
|
47520
47547
|
return true;
|
|
47521
47548
|
}
|
|
@@ -47538,7 +47565,7 @@ ${lanes.join("\n")}
|
|
|
47538
47565
|
} else if (maybeMappedType(errorLocation, symbol)) {
|
|
47539
47566
|
error2(errorLocation, Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Did_you_mean_to_use_1_in_0, rawName, rawName === "K" ? "P" : "K");
|
|
47540
47567
|
} else {
|
|
47541
|
-
error2(errorLocation, Diagnostics.
|
|
47568
|
+
error2(errorLocation, Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here, rawName);
|
|
47542
47569
|
}
|
|
47543
47570
|
return true;
|
|
47544
47571
|
}
|
|
@@ -47644,7 +47671,7 @@ ${lanes.join("\n")}
|
|
|
47644
47671
|
if (diagnosticMessage) {
|
|
47645
47672
|
addRelatedInfo(
|
|
47646
47673
|
diagnosticMessage,
|
|
47647
|
-
createDiagnosticForNode(declaration, Diagnostics.
|
|
47674
|
+
createDiagnosticForNode(declaration, Diagnostics._0_is_declared_here, declarationName)
|
|
47648
47675
|
);
|
|
47649
47676
|
}
|
|
47650
47677
|
}
|
|
@@ -47712,7 +47739,7 @@ ${lanes.join("\n")}
|
|
|
47712
47739
|
const typeOnlyDeclaration = getTypeOnlyAliasDeclaration(getSymbolOfDeclaration(node));
|
|
47713
47740
|
const isExport = typeOnlyDeclaration.kind === 281 /* ExportSpecifier */ || typeOnlyDeclaration.kind === 278 /* ExportDeclaration */;
|
|
47714
47741
|
const message = isExport ? Diagnostics.An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type : Diagnostics.An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type;
|
|
47715
|
-
const relatedMessage = isExport ? Diagnostics.
|
|
47742
|
+
const relatedMessage = isExport ? Diagnostics._0_was_exported_here : Diagnostics._0_was_imported_here;
|
|
47716
47743
|
const name = typeOnlyDeclaration.kind === 278 /* ExportDeclaration */ ? "*" : unescapeLeadingUnderscores(typeOnlyDeclaration.name.escapedText);
|
|
47717
47744
|
addRelatedInfo(error2(node.moduleReference, message), createDiagnosticForNode(typeOnlyDeclaration, relatedMessage, name));
|
|
47718
47745
|
}
|
|
@@ -48034,7 +48061,7 @@ ${lanes.join("\n")}
|
|
|
48034
48061
|
if (suggestion.valueDeclaration) {
|
|
48035
48062
|
addRelatedInfo(
|
|
48036
48063
|
diagnostic,
|
|
48037
|
-
createDiagnosticForNode(suggestion.valueDeclaration, Diagnostics.
|
|
48064
|
+
createDiagnosticForNode(suggestion.valueDeclaration, Diagnostics._0_is_declared_here, suggestionName)
|
|
48038
48065
|
);
|
|
48039
48066
|
}
|
|
48040
48067
|
} else {
|
|
@@ -48064,7 +48091,7 @@ ${lanes.join("\n")}
|
|
|
48064
48091
|
if (localSymbol.declarations) {
|
|
48065
48092
|
addRelatedInfo(
|
|
48066
48093
|
diagnostic,
|
|
48067
|
-
...map(localSymbol.declarations, (decl, index) => createDiagnosticForNode(decl, index === 0 ? Diagnostics.
|
|
48094
|
+
...map(localSymbol.declarations, (decl, index) => createDiagnosticForNode(decl, index === 0 ? Diagnostics._0_is_declared_here : Diagnostics.and_here, declarationName))
|
|
48068
48095
|
);
|
|
48069
48096
|
}
|
|
48070
48097
|
}
|
|
@@ -50801,6 +50828,7 @@ ${lanes.join("\n")}
|
|
|
50801
50828
|
);
|
|
50802
50829
|
}
|
|
50803
50830
|
function signatureToSignatureDeclarationHelper(signature, kind, context, options) {
|
|
50831
|
+
var _a;
|
|
50804
50832
|
const suppressAny = context.flags & 256 /* SuppressAnyReturnType */;
|
|
50805
50833
|
if (suppressAny)
|
|
50806
50834
|
context.flags &= ~256 /* SuppressAnyReturnType */;
|
|
@@ -50936,6 +50964,20 @@ ${lanes.join("\n")}
|
|
|
50936
50964
|
if (typeArguments) {
|
|
50937
50965
|
node.typeArguments = factory.createNodeArray(typeArguments);
|
|
50938
50966
|
}
|
|
50967
|
+
if (((_a = signature.declaration) == null ? void 0 : _a.kind) === 330 /* JSDocSignature */ && signature.declaration.parent.kind === 346 /* JSDocOverloadTag */) {
|
|
50968
|
+
const comment = getTextOfNode(
|
|
50969
|
+
signature.declaration.parent.parent,
|
|
50970
|
+
/*includeTrivia*/
|
|
50971
|
+
true
|
|
50972
|
+
).slice(2, -2).split(/\r\n|\n|\r/).map((line) => line.replace(/^\s+/, " ")).join("\n");
|
|
50973
|
+
addSyntheticLeadingComment(
|
|
50974
|
+
node,
|
|
50975
|
+
3 /* MultiLineCommentTrivia */,
|
|
50976
|
+
comment,
|
|
50977
|
+
/*hasTrailingNewLine*/
|
|
50978
|
+
true
|
|
50979
|
+
);
|
|
50980
|
+
}
|
|
50939
50981
|
cleanup == null ? void 0 : cleanup();
|
|
50940
50982
|
return node;
|
|
50941
50983
|
}
|
|
@@ -54109,11 +54151,11 @@ ${lanes.join("\n")}
|
|
|
54109
54151
|
const exportedMemberName = ((_a = tryCast(exportedMember.valueDeclaration, isNamedDeclaration)) == null ? void 0 : _a.name) || exportedMember.valueDeclaration;
|
|
54110
54152
|
addRelatedInfo(
|
|
54111
54153
|
error2(s.valueDeclaration, Diagnostics.Duplicate_identifier_0, unescapedName),
|
|
54112
|
-
createDiagnosticForNode(exportedMemberName, Diagnostics.
|
|
54154
|
+
createDiagnosticForNode(exportedMemberName, Diagnostics._0_was_also_declared_here, unescapedName)
|
|
54113
54155
|
);
|
|
54114
54156
|
addRelatedInfo(
|
|
54115
54157
|
error2(exportedMemberName, Diagnostics.Duplicate_identifier_0, unescapedName),
|
|
54116
|
-
createDiagnosticForNode(s.valueDeclaration, Diagnostics.
|
|
54158
|
+
createDiagnosticForNode(s.valueDeclaration, Diagnostics._0_was_also_declared_here, unescapedName)
|
|
54117
54159
|
);
|
|
54118
54160
|
}
|
|
54119
54161
|
const union = createSymbol(s.flags | exportedMember.flags, name);
|
|
@@ -55348,7 +55390,7 @@ ${lanes.join("\n")}
|
|
|
55348
55390
|
if (lateSymbol.flags & getExcludedSymbolFlags(symbolFlags) || earlySymbol) {
|
|
55349
55391
|
const declarations = earlySymbol ? concatenate(earlySymbol.declarations, lateSymbol.declarations) : lateSymbol.declarations;
|
|
55350
55392
|
const name = !(type.flags & 8192 /* UniqueESSymbol */) && unescapeLeadingUnderscores(memberName) || declarationNameToString(declName);
|
|
55351
|
-
forEach(declarations, (declaration) => error2(getNameOfDeclaration(declaration) || declaration, Diagnostics.
|
|
55393
|
+
forEach(declarations, (declaration) => error2(getNameOfDeclaration(declaration) || declaration, Diagnostics.Property_0_was_also_declared_here, name));
|
|
55352
55394
|
error2(declName || decl, Diagnostics.Duplicate_property_0, name);
|
|
55353
55395
|
lateSymbol = createSymbol(0 /* None */, memberName, 4096 /* Late */);
|
|
55354
55396
|
}
|
|
@@ -60260,7 +60302,7 @@ ${lanes.join("\n")}
|
|
|
60260
60302
|
if (moduleSymbol.flags & targetMeaning) {
|
|
60261
60303
|
links.resolvedType = resolveImportSymbolType(node, links, moduleSymbol, targetMeaning);
|
|
60262
60304
|
} else {
|
|
60263
|
-
const errorMessage = targetMeaning === 111551 /* Value */ ? Diagnostics.
|
|
60305
|
+
const errorMessage = targetMeaning === 111551 /* Value */ ? Diagnostics.Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here : Diagnostics.Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0;
|
|
60264
60306
|
error2(node, errorMessage, node.argument.literal.text);
|
|
60265
60307
|
links.resolvedSymbol = unknownSymbol;
|
|
60266
60308
|
links.resolvedType = errorType;
|
|
@@ -64021,7 +64063,7 @@ ${lanes.join("\n")}
|
|
|
64021
64063
|
);
|
|
64022
64064
|
reportError(Diagnostics.Property_0_is_missing_in_type_1_but_required_in_type_2, propName, ...getTypeNamesForErrorDisplay(source2, target2));
|
|
64023
64065
|
if (length(unmatchedProperty.declarations)) {
|
|
64024
|
-
associateRelatedInfo(createDiagnosticForNode(unmatchedProperty.declarations[0], Diagnostics.
|
|
64066
|
+
associateRelatedInfo(createDiagnosticForNode(unmatchedProperty.declarations[0], Diagnostics._0_is_declared_here, propName));
|
|
64025
64067
|
}
|
|
64026
64068
|
if (shouldSkipElaboration && errorInfo) {
|
|
64027
64069
|
overrideNextErrorInfo++;
|
|
@@ -65599,17 +65641,18 @@ ${lanes.join("\n")}
|
|
|
65599
65641
|
);
|
|
65600
65642
|
}
|
|
65601
65643
|
function inferTypeForHomomorphicMappedType(source, target, constraint) {
|
|
65602
|
-
|
|
65603
|
-
|
|
65644
|
+
const cacheKey = source.id + "," + target.id + "," + constraint.id;
|
|
65645
|
+
if (reverseMappedCache.has(cacheKey)) {
|
|
65646
|
+
return reverseMappedCache.get(cacheKey);
|
|
65604
65647
|
}
|
|
65605
|
-
const
|
|
65606
|
-
if (
|
|
65607
|
-
return
|
|
65648
|
+
const recursionKey = source.id + "," + (target.target || target).id;
|
|
65649
|
+
if (contains(homomorphicMappedTypeInferenceStack, recursionKey)) {
|
|
65650
|
+
return void 0;
|
|
65608
65651
|
}
|
|
65609
|
-
|
|
65652
|
+
homomorphicMappedTypeInferenceStack.push(recursionKey);
|
|
65610
65653
|
const type = createReverseMappedType(source, target, constraint);
|
|
65611
|
-
|
|
65612
|
-
reverseMappedCache.set(
|
|
65654
|
+
homomorphicMappedTypeInferenceStack.pop();
|
|
65655
|
+
reverseMappedCache.set(cacheKey, type);
|
|
65613
65656
|
return type;
|
|
65614
65657
|
}
|
|
65615
65658
|
function isPartiallyInferableType(type) {
|
|
@@ -71796,7 +71839,7 @@ ${lanes.join("\n")}
|
|
|
71796
71839
|
if (diagnosticMessage) {
|
|
71797
71840
|
addRelatedInfo(
|
|
71798
71841
|
diagnosticMessage,
|
|
71799
|
-
createDiagnosticForNode(valueDeclaration, Diagnostics.
|
|
71842
|
+
createDiagnosticForNode(valueDeclaration, Diagnostics._0_is_declared_here, declarationName)
|
|
71800
71843
|
);
|
|
71801
71844
|
}
|
|
71802
71845
|
}
|
|
@@ -71883,7 +71926,7 @@ ${lanes.join("\n")}
|
|
|
71883
71926
|
const suggestedName = symbolName(suggestion);
|
|
71884
71927
|
const message = isUncheckedJS ? Diagnostics.Property_0_may_not_exist_on_type_1_Did_you_mean_2 : Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_mean_2;
|
|
71885
71928
|
errorInfo = chainDiagnosticMessages(errorInfo, message, missingProperty, container, suggestedName);
|
|
71886
|
-
relatedInfo = suggestion.valueDeclaration && createDiagnosticForNode(suggestion.valueDeclaration, Diagnostics.
|
|
71929
|
+
relatedInfo = suggestion.valueDeclaration && createDiagnosticForNode(suggestion.valueDeclaration, Diagnostics._0_is_declared_here, suggestedName);
|
|
71887
71930
|
} else {
|
|
71888
71931
|
const diagnostic = containerSeemsToBeEmptyDomElement(containingType) ? Diagnostics.Property_0_does_not_exist_on_type_1_Try_changing_the_lib_compiler_option_to_include_dom : Diagnostics.Property_0_does_not_exist_on_type_1;
|
|
71889
71932
|
errorInfo = chainDiagnosticMessages(elaborateNeverIntersection(errorInfo, containingType), diagnostic, missingProperty, container);
|
|
@@ -72600,7 +72643,7 @@ ${lanes.join("\n")}
|
|
|
72600
72643
|
const diag2 = createDiagnosticForNode(node.tagName, Diagnostics.Tag_0_expects_at_least_1_arguments_but_the_JSX_factory_2_provides_at_most_3, entityNameToString(node.tagName), absoluteMinArgCount, entityNameToString(factory2), maxParamCount);
|
|
72601
72644
|
const tagNameDeclaration = (_a = getSymbolAtLocation(node.tagName)) == null ? void 0 : _a.valueDeclaration;
|
|
72602
72645
|
if (tagNameDeclaration) {
|
|
72603
|
-
addRelatedInfo(diag2, createDiagnosticForNode(tagNameDeclaration, Diagnostics.
|
|
72646
|
+
addRelatedInfo(diag2, createDiagnosticForNode(tagNameDeclaration, Diagnostics._0_is_declared_here, entityNameToString(node.tagName)));
|
|
72604
72647
|
}
|
|
72605
72648
|
if (errorOutputContainer && errorOutputContainer.skipLogging) {
|
|
72606
72649
|
(errorOutputContainer.errors || (errorOutputContainer.errors = [])).push(diag2);
|
|
@@ -73052,7 +73095,7 @@ ${lanes.join("\n")}
|
|
|
73052
73095
|
if (diags) {
|
|
73053
73096
|
for (const d of diags) {
|
|
73054
73097
|
if (last2.declaration && candidatesForArgumentError.length > 3) {
|
|
73055
|
-
addRelatedInfo(d, createDiagnosticForNode(last2.declaration, Diagnostics.
|
|
73098
|
+
addRelatedInfo(d, createDiagnosticForNode(last2.declaration, Diagnostics.The_last_overload_is_declared_here));
|
|
73056
73099
|
}
|
|
73057
73100
|
addImplementationSuccessElaboration(last2, d);
|
|
73058
73101
|
diagnostics.add(d);
|
|
@@ -78192,7 +78235,7 @@ ${lanes.join("\n")}
|
|
|
78192
78235
|
const errorNode = signature.declaration && isJSDocSignature(signature.declaration) ? signature.declaration.parent.tagName : signature.declaration;
|
|
78193
78236
|
addRelatedInfo(
|
|
78194
78237
|
error2(errorNode, Diagnostics.This_overload_signature_is_not_compatible_with_its_implementation_signature),
|
|
78195
|
-
createDiagnosticForNode(bodyDeclaration, Diagnostics.
|
|
78238
|
+
createDiagnosticForNode(bodyDeclaration, Diagnostics.The_implementation_signature_is_declared_here)
|
|
78196
78239
|
);
|
|
78197
78240
|
break;
|
|
78198
78241
|
}
|
|
@@ -78658,7 +78701,7 @@ ${lanes.join("\n")}
|
|
|
78658
78701
|
const diag2 = error2(typeName, Diagnostics.A_type_referenced_in_a_decorated_signature_must_be_imported_with_import_type_or_a_namespace_import_when_isolatedModules_and_emitDecoratorMetadata_are_enabled);
|
|
78659
78702
|
const aliasDeclaration = find(rootSymbol.declarations || emptyArray, isAliasSymbolDeclaration2);
|
|
78660
78703
|
if (aliasDeclaration) {
|
|
78661
|
-
addRelatedInfo(diag2, createDiagnosticForNode(aliasDeclaration, Diagnostics.
|
|
78704
|
+
addRelatedInfo(diag2, createDiagnosticForNode(aliasDeclaration, Diagnostics._0_was_imported_here, idText(rootName)));
|
|
78662
78705
|
}
|
|
78663
78706
|
}
|
|
78664
78707
|
}
|
|
@@ -79602,7 +79645,7 @@ ${lanes.join("\n")}
|
|
|
79602
79645
|
if (firstDeclaration) {
|
|
79603
79646
|
addRelatedInfo(
|
|
79604
79647
|
err,
|
|
79605
|
-
createDiagnosticForNode(firstDeclaration, Diagnostics.
|
|
79648
|
+
createDiagnosticForNode(firstDeclaration, Diagnostics._0_was_also_declared_here, declName)
|
|
79606
79649
|
);
|
|
79607
79650
|
}
|
|
79608
79651
|
}
|
|
@@ -80712,7 +80755,7 @@ ${lanes.join("\n")}
|
|
|
80712
80755
|
typeToString(info.type)
|
|
80713
80756
|
);
|
|
80714
80757
|
if (propDeclaration && errorNode !== propDeclaration) {
|
|
80715
|
-
addRelatedInfo(diagnostic, createDiagnosticForNode(propDeclaration, Diagnostics.
|
|
80758
|
+
addRelatedInfo(diagnostic, createDiagnosticForNode(propDeclaration, Diagnostics._0_is_declared_here, symbolToString(prop)));
|
|
80716
80759
|
}
|
|
80717
80760
|
diagnostics.add(diagnostic);
|
|
80718
80761
|
}
|
|
@@ -85047,7 +85090,7 @@ ${lanes.join("\n")}
|
|
|
85047
85090
|
createDiagnosticForNode(useStrictDirective, Diagnostics.use_strict_directive_used_here)
|
|
85048
85091
|
);
|
|
85049
85092
|
});
|
|
85050
|
-
const diagnostics2 = nonSimpleParameters.map((parameter, index) => index === 0 ? createDiagnosticForNode(parameter, Diagnostics.
|
|
85093
|
+
const diagnostics2 = nonSimpleParameters.map((parameter, index) => index === 0 ? createDiagnosticForNode(parameter, Diagnostics.Non_simple_parameter_declared_here) : createDiagnosticForNode(parameter, Diagnostics.and_here));
|
|
85051
85094
|
addRelatedInfo(error2(useStrictDirective, Diagnostics.use_strict_directive_cannot_be_used_with_non_simple_parameter_list), ...diagnostics2);
|
|
85052
85095
|
return true;
|
|
85053
85096
|
}
|
|
@@ -116956,14 +116999,14 @@ ${lanes.join("\n")}
|
|
|
116956
116999
|
});
|
|
116957
117000
|
|
|
116958
117001
|
// src/compiler/watchUtilities.ts
|
|
116959
|
-
function createCachedDirectoryStructureHost(host, currentDirectory,
|
|
117002
|
+
function createCachedDirectoryStructureHost(host, currentDirectory, useCaseSensitiveFileNames2) {
|
|
116960
117003
|
if (!host.getDirectories || !host.readDirectory) {
|
|
116961
117004
|
return void 0;
|
|
116962
117005
|
}
|
|
116963
117006
|
const cachedReadDirectoryResult = /* @__PURE__ */ new Map();
|
|
116964
|
-
const getCanonicalFileName = createGetCanonicalFileName(
|
|
117007
|
+
const getCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames2);
|
|
116965
117008
|
return {
|
|
116966
|
-
useCaseSensitiveFileNames,
|
|
117009
|
+
useCaseSensitiveFileNames: useCaseSensitiveFileNames2,
|
|
116967
117010
|
fileExists,
|
|
116968
117011
|
readFile: (path, encoding) => host.readFile(path, encoding),
|
|
116969
117012
|
directoryExists: host.directoryExists && directoryExists,
|
|
@@ -117085,7 +117128,7 @@ ${lanes.join("\n")}
|
|
|
117085
117128
|
const rootResult = tryReadDirectory2(rootDir, rootDirPath);
|
|
117086
117129
|
let rootSymLinkResult;
|
|
117087
117130
|
if (rootResult !== void 0) {
|
|
117088
|
-
return matchFiles(rootDir, extensions, excludes, includes,
|
|
117131
|
+
return matchFiles(rootDir, extensions, excludes, includes, useCaseSensitiveFileNames2, currentDirectory, depth, getFileSystemEntries, realpath);
|
|
117089
117132
|
}
|
|
117090
117133
|
return host.readDirectory(rootDir, extensions, excludes, includes, depth);
|
|
117091
117134
|
function getFileSystemEntries(dir) {
|
|
@@ -117280,7 +117323,7 @@ ${lanes.join("\n")}
|
|
|
117280
117323
|
program,
|
|
117281
117324
|
extraFileExtensions,
|
|
117282
117325
|
currentDirectory,
|
|
117283
|
-
useCaseSensitiveFileNames,
|
|
117326
|
+
useCaseSensitiveFileNames: useCaseSensitiveFileNames2,
|
|
117284
117327
|
writeLog,
|
|
117285
117328
|
toPath: toPath3
|
|
117286
117329
|
}) {
|
|
@@ -117296,7 +117339,7 @@ ${lanes.join("\n")}
|
|
|
117296
117339
|
writeLog(`Project: ${configFileName} Detected file add/remove of non supported extension: ${fileOrDirectory}`);
|
|
117297
117340
|
return true;
|
|
117298
117341
|
}
|
|
117299
|
-
if (isExcludedFile(fileOrDirectory, options.configFile.configFileSpecs, getNormalizedAbsolutePath(getDirectoryPath(configFileName), currentDirectory),
|
|
117342
|
+
if (isExcludedFile(fileOrDirectory, options.configFile.configFileSpecs, getNormalizedAbsolutePath(getDirectoryPath(configFileName), currentDirectory), useCaseSensitiveFileNames2, currentDirectory)) {
|
|
117300
117343
|
writeLog(`Project: ${configFileName} Detected excluded file: ${fileOrDirectory}`);
|
|
117301
117344
|
return true;
|
|
117302
117345
|
}
|
|
@@ -117353,7 +117396,7 @@ ${lanes.join("\n")}
|
|
|
117353
117396
|
function createExcludeHandlingAddWatch(key) {
|
|
117354
117397
|
return (file, cb, flags, options, detailInfo1, detailInfo2) => {
|
|
117355
117398
|
var _a;
|
|
117356
|
-
return !matchesExclude(file, key === "watchFile" ? options == null ? void 0 : options.excludeFiles : options == null ? void 0 : options.excludeDirectories,
|
|
117399
|
+
return !matchesExclude(file, key === "watchFile" ? options == null ? void 0 : options.excludeFiles : options == null ? void 0 : options.excludeDirectories, useCaseSensitiveFileNames2(), ((_a = host.getCurrentDirectory) == null ? void 0 : _a.call(host)) || "") ? factory2[key].call(
|
|
117357
117400
|
/*thisArgs*/
|
|
117358
117401
|
void 0,
|
|
117359
117402
|
file,
|
|
@@ -117365,7 +117408,7 @@ ${lanes.join("\n")}
|
|
|
117365
117408
|
) : excludeWatcherFactory(file, flags, options, detailInfo1, detailInfo2);
|
|
117366
117409
|
};
|
|
117367
117410
|
}
|
|
117368
|
-
function
|
|
117411
|
+
function useCaseSensitiveFileNames2() {
|
|
117369
117412
|
return typeof host.useCaseSensitiveFileNames === "boolean" ? host.useCaseSensitiveFileNames : host.useCaseSensitiveFileNames();
|
|
117370
117413
|
}
|
|
117371
117414
|
function createExcludeWatcherWithLogging(file, flags, options, detailInfo1, detailInfo2) {
|
|
@@ -117731,49 +117774,39 @@ ${lanes.join("\n")}
|
|
|
117731
117774
|
function formatColorAndReset(text, formatStyle) {
|
|
117732
117775
|
return formatStyle + text + resetEscapeSequence;
|
|
117733
117776
|
}
|
|
117734
|
-
function formatCodeSpan(file, start, length2,
|
|
117777
|
+
function formatCodeSpan(file, start, length2, indent3, squiggleColor, host) {
|
|
117735
117778
|
const { line: firstLine, character: firstLineChar } = getLineAndCharacterOfPosition(file, start);
|
|
117736
117779
|
const { line: lastLine, character: lastLineChar } = getLineAndCharacterOfPosition(file, start + length2);
|
|
117737
117780
|
const lastLineInFile = getLineAndCharacterOfPosition(file, file.text.length).line;
|
|
117738
|
-
const gutterWidth = 1;
|
|
117739
117781
|
const hasMoreThanFiveLines = lastLine - firstLine >= 4;
|
|
117740
|
-
let
|
|
117741
|
-
|
|
117742
|
-
|
|
117743
|
-
i = lastLine - 1;
|
|
117744
|
-
}
|
|
117745
|
-
const lineStart = getPositionOfLineAndCharacter(file, i, 0);
|
|
117746
|
-
const lineEnd = i < lastLineInFile ? getPositionOfLineAndCharacter(file, i + 1, 0) : file.text.length;
|
|
117747
|
-
const lineContent = file.text.slice(lineStart, lineEnd);
|
|
117748
|
-
whitespaceToTrim = Math.min(whitespaceToTrim, startWhitespaceCount(lineContent));
|
|
117782
|
+
let gutterWidth = (lastLine + 1 + "").length;
|
|
117783
|
+
if (hasMoreThanFiveLines) {
|
|
117784
|
+
gutterWidth = Math.max(ellipsis.length, gutterWidth);
|
|
117749
117785
|
}
|
|
117750
117786
|
let context = "";
|
|
117751
117787
|
for (let i = firstLine; i <= lastLine; i++) {
|
|
117752
117788
|
context += host.getNewLine();
|
|
117753
117789
|
if (hasMoreThanFiveLines && firstLine + 1 < i && i < lastLine - 1) {
|
|
117754
|
-
context +=
|
|
117790
|
+
context += indent3 + formatColorAndReset(padLeft(ellipsis, gutterWidth), gutterStyleSequence) + gutterSeparator + host.getNewLine();
|
|
117755
117791
|
i = lastLine - 1;
|
|
117756
117792
|
}
|
|
117757
117793
|
const lineStart = getPositionOfLineAndCharacter(file, i, 0);
|
|
117758
117794
|
const lineEnd = i < lastLineInFile ? getPositionOfLineAndCharacter(file, i + 1, 0) : file.text.length;
|
|
117759
117795
|
let lineContent = file.text.slice(lineStart, lineEnd);
|
|
117760
|
-
lineContent = lineContent.slice(whitespaceToTrim);
|
|
117761
117796
|
lineContent = trimStringEnd(lineContent);
|
|
117762
117797
|
lineContent = lineContent.replace(/\t/g, " ");
|
|
117763
|
-
|
|
117764
|
-
context += indent2 + padLeft(gutterLine, gutterWidth) + gutterSeparator;
|
|
117798
|
+
context += indent3 + formatColorAndReset(padLeft(i + 1 + "", gutterWidth), gutterStyleSequence) + gutterSeparator;
|
|
117765
117799
|
context += lineContent + host.getNewLine();
|
|
117766
|
-
context +=
|
|
117767
|
-
context +=
|
|
117800
|
+
context += indent3 + formatColorAndReset(padLeft("", gutterWidth), gutterStyleSequence) + gutterSeparator;
|
|
117801
|
+
context += squiggleColor;
|
|
117768
117802
|
if (i === firstLine) {
|
|
117769
117803
|
const lastCharForLine = i === lastLine ? lastLineChar : void 0;
|
|
117770
|
-
context += lineContent.slice(0, firstLineChar
|
|
117771
|
-
|
|
117772
|
-
context += lineContent.slice(firstLineChar - whitespaceToTrim, amendedLastChar).replace(/./g, "\u2594");
|
|
117804
|
+
context += lineContent.slice(0, firstLineChar).replace(/\S/g, " ");
|
|
117805
|
+
context += lineContent.slice(firstLineChar, lastCharForLine).replace(/./g, "~");
|
|
117773
117806
|
} else if (i === lastLine) {
|
|
117774
|
-
context += lineContent.slice(0, lastLineChar).replace(/./g, "
|
|
117807
|
+
context += lineContent.slice(0, lastLineChar).replace(/./g, "~");
|
|
117775
117808
|
} else {
|
|
117776
|
-
context += lineContent.replace(/./g, "
|
|
117809
|
+
context += lineContent.replace(/./g, "~");
|
|
117777
117810
|
}
|
|
117778
117811
|
context += resetEscapeSequence;
|
|
117779
117812
|
}
|
|
@@ -117791,87 +117824,54 @@ ${lanes.join("\n")}
|
|
|
117791
117824
|
return output;
|
|
117792
117825
|
}
|
|
117793
117826
|
function formatDiagnosticsWithColorAndContext(diagnostics, host) {
|
|
117794
|
-
var _a, _b;
|
|
117795
|
-
const terminalWidth = ((_b = (_a = sys).getWidthOfTerminal) == null ? void 0 : _b.call(_a)) ?? 0;
|
|
117796
|
-
const indent2 = terminalWidth < 60 ? "" : halfIndent;
|
|
117797
117827
|
let output = "";
|
|
117798
117828
|
for (const diagnostic of diagnostics) {
|
|
117799
|
-
|
|
117800
|
-
const diagnosticCatName = diagnosticCategoryName(
|
|
117801
|
-
diagnostic,
|
|
117802
|
-
/*lowerCase*/
|
|
117803
|
-
false
|
|
117804
|
-
);
|
|
117805
|
-
const diagnosticCatNameColored = formatColorAndReset(diagnosticCatName, getCategoryFormat(diagnostic.category));
|
|
117806
|
-
if (diagnostic.file && diagnostic.code !== Diagnostics.File_appears_to_be_binary.code) {
|
|
117829
|
+
if (diagnostic.file) {
|
|
117807
117830
|
const { file, start } = diagnostic;
|
|
117808
|
-
|
|
117809
|
-
|
|
117810
|
-
|
|
117811
|
-
|
|
117812
|
-
|
|
117813
|
-
|
|
117814
|
-
|
|
117815
|
-
padWidth = defaultPad;
|
|
117816
|
-
output += padLeft(diagnosticCatNameColored, padWidth + (diagnosticCatNameColored.length - diagnosticCatName.length));
|
|
117817
|
-
output += " " + diagnosticCode;
|
|
117818
|
-
output += formatCodeSpan(diagnostic.file, diagnostic.start, diagnostic.length, indent2, getCategoryFormat(diagnostic.category), host);
|
|
117831
|
+
output += formatLocation(file, start, host);
|
|
117832
|
+
output += " - ";
|
|
117833
|
+
}
|
|
117834
|
+
output += formatColorAndReset(diagnosticCategoryName(diagnostic), getCategoryFormat(diagnostic.category));
|
|
117835
|
+
output += formatColorAndReset(` TS${diagnostic.code}: `, "\x1B[90m" /* Grey */);
|
|
117836
|
+
output += flattenDiagnosticMessageText(diagnostic.messageText, host.getNewLine());
|
|
117837
|
+
if (diagnostic.file && diagnostic.code !== Diagnostics.File_appears_to_be_binary.code) {
|
|
117819
117838
|
output += host.getNewLine();
|
|
117820
|
-
|
|
117821
|
-
output += formatColorAndReset(bullet, getCategoryFormat(diagnostic.category)) + " " + diagnosticCatNameColored + " " + diagnosticCode;
|
|
117839
|
+
output += formatCodeSpan(diagnostic.file, diagnostic.start, diagnostic.length, "", getCategoryFormat(diagnostic.category), host);
|
|
117822
117840
|
}
|
|
117823
|
-
let diagnosticText = flattenDiagnosticMessageText(
|
|
117824
|
-
diagnostic.messageText,
|
|
117825
|
-
host.getNewLine(),
|
|
117826
|
-
0,
|
|
117827
|
-
/*pretty*/
|
|
117828
|
-
true
|
|
117829
|
-
);
|
|
117830
|
-
diagnosticText = diagnosticText.split(host.getNewLine()).map((text) => indent2 + text).join(host.getNewLine());
|
|
117831
|
-
output += diagnosticText;
|
|
117832
|
-
output += host.getNewLine();
|
|
117833
117841
|
if (diagnostic.relatedInformation) {
|
|
117834
117842
|
output += host.getNewLine();
|
|
117835
117843
|
for (const { file, start, length: length2, messageText } of diagnostic.relatedInformation) {
|
|
117836
|
-
output += indent2 + trimStringStart(flattenDiagnosticMessageText(
|
|
117837
|
-
messageText,
|
|
117838
|
-
host.getNewLine(),
|
|
117839
|
-
0,
|
|
117840
|
-
/*pretty*/
|
|
117841
|
-
true
|
|
117842
|
-
));
|
|
117843
117844
|
if (file) {
|
|
117844
|
-
output += " " + formatLocation(file, start, host);
|
|
117845
117845
|
output += host.getNewLine();
|
|
117846
|
-
output +=
|
|
117846
|
+
output += halfIndent + formatLocation(file, start, host);
|
|
117847
|
+
output += formatCodeSpan(file, start, length2, indent, "\x1B[96m" /* Cyan */, host);
|
|
117847
117848
|
}
|
|
117849
|
+
output += host.getNewLine();
|
|
117850
|
+
output += indent + flattenDiagnosticMessageText(messageText, host.getNewLine());
|
|
117848
117851
|
}
|
|
117849
117852
|
}
|
|
117853
|
+
output += host.getNewLine();
|
|
117850
117854
|
}
|
|
117851
117855
|
return output;
|
|
117852
117856
|
}
|
|
117853
|
-
function flattenDiagnosticMessageText(diag2, newLine,
|
|
117857
|
+
function flattenDiagnosticMessageText(diag2, newLine, indent3 = 0) {
|
|
117854
117858
|
if (isString(diag2)) {
|
|
117855
117859
|
return diag2;
|
|
117856
117860
|
} else if (diag2 === void 0) {
|
|
117857
117861
|
return "";
|
|
117858
117862
|
}
|
|
117859
117863
|
let result = "";
|
|
117860
|
-
if (
|
|
117864
|
+
if (indent3) {
|
|
117861
117865
|
result += newLine;
|
|
117862
|
-
|
|
117863
|
-
|
|
117864
|
-
|
|
117865
|
-
result += " ";
|
|
117866
|
-
}
|
|
117867
|
-
} else
|
|
117868
|
-
result += newLine;
|
|
117866
|
+
for (let i = 0; i < indent3; i++) {
|
|
117867
|
+
result += " ";
|
|
117868
|
+
}
|
|
117869
117869
|
}
|
|
117870
117870
|
result += diag2.messageText;
|
|
117871
|
-
|
|
117871
|
+
indent3++;
|
|
117872
117872
|
if (diag2.next) {
|
|
117873
117873
|
for (const kid of diag2.next) {
|
|
117874
|
-
result += flattenDiagnosticMessageText(kid, newLine,
|
|
117874
|
+
result += flattenDiagnosticMessageText(kid, newLine, indent3);
|
|
117875
117875
|
}
|
|
117876
117876
|
}
|
|
117877
117877
|
return result;
|
|
@@ -120867,16 +120867,16 @@ ${lanes.join("\n")}
|
|
|
120867
120867
|
let message2;
|
|
120868
120868
|
switch (reason.kind) {
|
|
120869
120869
|
case 3 /* Import */:
|
|
120870
|
-
message2 = Diagnostics.
|
|
120870
|
+
message2 = Diagnostics.File_is_included_via_import_here;
|
|
120871
120871
|
break;
|
|
120872
120872
|
case 4 /* ReferenceFile */:
|
|
120873
|
-
message2 = Diagnostics.
|
|
120873
|
+
message2 = Diagnostics.File_is_included_via_reference_here;
|
|
120874
120874
|
break;
|
|
120875
120875
|
case 5 /* TypeReferenceDirective */:
|
|
120876
|
-
message2 = Diagnostics.
|
|
120876
|
+
message2 = Diagnostics.File_is_included_via_type_library_reference_here;
|
|
120877
120877
|
break;
|
|
120878
120878
|
case 7 /* LibReferenceDirective */:
|
|
120879
|
-
message2 = Diagnostics.
|
|
120879
|
+
message2 = Diagnostics.File_is_included_via_library_reference_here;
|
|
120880
120880
|
break;
|
|
120881
120881
|
default:
|
|
120882
120882
|
Debug.assertNever(reason);
|
|
@@ -120900,14 +120900,14 @@ ${lanes.join("\n")}
|
|
|
120900
120900
|
const matchedByFiles = getMatchedFileSpec(program, fileName);
|
|
120901
120901
|
if (matchedByFiles) {
|
|
120902
120902
|
configFileNode = getTsConfigPropArrayElementValue(options.configFile, "files", matchedByFiles);
|
|
120903
|
-
message = Diagnostics.
|
|
120903
|
+
message = Diagnostics.File_is_matched_by_files_list_specified_here;
|
|
120904
120904
|
break;
|
|
120905
120905
|
}
|
|
120906
120906
|
const matchedByInclude = getMatchedIncludeSpec(program, fileName);
|
|
120907
120907
|
if (!matchedByInclude || !isString(matchedByInclude))
|
|
120908
120908
|
return void 0;
|
|
120909
120909
|
configFileNode = getTsConfigPropArrayElementValue(options.configFile, "include", matchedByInclude);
|
|
120910
|
-
message = Diagnostics.
|
|
120910
|
+
message = Diagnostics.File_is_matched_by_include_pattern_specified_here;
|
|
120911
120911
|
break;
|
|
120912
120912
|
case 1 /* SourceFromProjectReference */:
|
|
120913
120913
|
case 2 /* OutputFromProjectReference */:
|
|
@@ -120928,23 +120928,23 @@ ${lanes.join("\n")}
|
|
|
120928
120928
|
return referencesSyntax && referencesSyntax.elements.length > index ? createDiagnosticForNodeInSourceFile(
|
|
120929
120929
|
sourceFile,
|
|
120930
120930
|
referencesSyntax.elements[index],
|
|
120931
|
-
reason.kind === 2 /* OutputFromProjectReference */ ? Diagnostics.
|
|
120931
|
+
reason.kind === 2 /* OutputFromProjectReference */ ? Diagnostics.File_is_output_from_referenced_project_specified_here : Diagnostics.File_is_source_from_referenced_project_specified_here
|
|
120932
120932
|
) : void 0;
|
|
120933
120933
|
case 8 /* AutomaticTypeDirectiveFile */:
|
|
120934
120934
|
if (!options.types)
|
|
120935
120935
|
return void 0;
|
|
120936
120936
|
configFileNode = getOptionsSyntaxByArrayElementValue("types", reason.typeReference);
|
|
120937
|
-
message = Diagnostics.
|
|
120937
|
+
message = Diagnostics.File_is_entry_point_of_type_library_specified_here;
|
|
120938
120938
|
break;
|
|
120939
120939
|
case 6 /* LibFile */:
|
|
120940
120940
|
if (reason.index !== void 0) {
|
|
120941
120941
|
configFileNode = getOptionsSyntaxByArrayElementValue("lib", options.lib[reason.index]);
|
|
120942
|
-
message = Diagnostics.
|
|
120942
|
+
message = Diagnostics.File_is_library_specified_here;
|
|
120943
120943
|
break;
|
|
120944
120944
|
}
|
|
120945
120945
|
const target = forEachEntry(targetOptionDeclaration.type, (value, key) => value === getEmitScriptTarget(options) ? key : void 0);
|
|
120946
120946
|
configFileNode = target ? getOptionsSyntaxByValue("target", target) : void 0;
|
|
120947
|
-
message = Diagnostics.
|
|
120947
|
+
message = Diagnostics.File_is_default_library_for_target_specified_here;
|
|
120948
120948
|
break;
|
|
120949
120949
|
default:
|
|
120950
120950
|
Debug.assertNever(reason);
|
|
@@ -121348,6 +121348,9 @@ ${lanes.join("\n")}
|
|
|
121348
121348
|
return directoryStructureHost.readDirectory(root, extensions, excludes, includes, depth);
|
|
121349
121349
|
},
|
|
121350
121350
|
readFile: (f) => directoryStructureHost.readFile(f),
|
|
121351
|
+
directoryExists: maybeBind(directoryStructureHost, directoryStructureHost.directoryExists),
|
|
121352
|
+
getDirectories: maybeBind(directoryStructureHost, directoryStructureHost.getDirectories),
|
|
121353
|
+
realpath: maybeBind(directoryStructureHost, directoryStructureHost.realpath),
|
|
121351
121354
|
useCaseSensitiveFileNames: host.useCaseSensitiveFileNames(),
|
|
121352
121355
|
getCurrentDirectory: () => host.getCurrentDirectory(),
|
|
121353
121356
|
onUnRecoverableConfigFileDiagnostic: host.onUnRecoverableConfigFileDiagnostic || returnUndefined,
|
|
@@ -121436,7 +121439,7 @@ ${lanes.join("\n")}
|
|
|
121436
121439
|
}
|
|
121437
121440
|
Debug.fail("should never ask for module name at index higher than possible module name");
|
|
121438
121441
|
}
|
|
121439
|
-
var ForegroundColorEscapeSequences, gutterStyleSequence, gutterSeparator, resetEscapeSequence, ellipsis, halfIndent,
|
|
121442
|
+
var ForegroundColorEscapeSequences, gutterStyleSequence, gutterSeparator, resetEscapeSequence, ellipsis, halfIndent, indent, emptyResolution, moduleResolutionNameAndModeGetter, typeReferenceResolutionNameAndModeGetter, inferredTypesContainingFile, plainJSErrors, emitSkippedWithNoDiagnostics;
|
|
121440
121443
|
var init_program = __esm({
|
|
121441
121444
|
"src/compiler/program.ts"() {
|
|
121442
121445
|
"use strict";
|
|
@@ -121455,7 +121458,7 @@ ${lanes.join("\n")}
|
|
|
121455
121458
|
resetEscapeSequence = "\x1B[0m";
|
|
121456
121459
|
ellipsis = "...";
|
|
121457
121460
|
halfIndent = " ";
|
|
121458
|
-
|
|
121461
|
+
indent = " ";
|
|
121459
121462
|
emptyResolution = {
|
|
121460
121463
|
resolvedModule: void 0,
|
|
121461
121464
|
resolvedTypeReferenceDirective: void 0
|
|
@@ -121473,8 +121476,8 @@ ${lanes.join("\n")}
|
|
|
121473
121476
|
// binder errors
|
|
121474
121477
|
Diagnostics.Cannot_redeclare_block_scoped_variable_0.code,
|
|
121475
121478
|
Diagnostics.A_module_cannot_have_multiple_default_exports.code,
|
|
121476
|
-
Diagnostics.
|
|
121477
|
-
Diagnostics.
|
|
121479
|
+
Diagnostics.Another_export_default_is_here.code,
|
|
121480
|
+
Diagnostics.The_first_export_default_is_here.code,
|
|
121478
121481
|
Diagnostics.Identifier_expected_0_is_a_reserved_word_at_the_top_level_of_a_module.code,
|
|
121479
121482
|
Diagnostics.Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode.code,
|
|
121480
121483
|
Diagnostics.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here.code,
|
|
@@ -124543,12 +124546,12 @@ ${lanes.join("\n")}
|
|
|
124543
124546
|
return true;
|
|
124544
124547
|
const isJsonFile = fileExtensionIs(fileName, ".json" /* Json */);
|
|
124545
124548
|
const basePath = getDirectoryPath(getNormalizedAbsolutePath(configFile.fileName, program.getCurrentDirectory()));
|
|
124546
|
-
const
|
|
124549
|
+
const useCaseSensitiveFileNames2 = program.useCaseSensitiveFileNames();
|
|
124547
124550
|
return find((_b = configFile == null ? void 0 : configFile.configFileSpecs) == null ? void 0 : _b.validatedIncludeSpecs, (includeSpec) => {
|
|
124548
124551
|
if (isJsonFile && !endsWith(includeSpec, ".json" /* Json */))
|
|
124549
124552
|
return false;
|
|
124550
124553
|
const pattern = getPatternFromSpec(includeSpec, basePath, "files");
|
|
124551
|
-
return !!pattern && getRegexFromPattern(`(${pattern})$`,
|
|
124554
|
+
return !!pattern && getRegexFromPattern(`(${pattern})$`, useCaseSensitiveFileNames2).test(fileName);
|
|
124552
124555
|
});
|
|
124553
124556
|
}
|
|
124554
124557
|
function fileIncludeReasonToDiagnostics(program, reason, fileNameConvertor) {
|
|
@@ -124752,7 +124755,7 @@ ${lanes.join("\n")}
|
|
|
124752
124755
|
return result;
|
|
124753
124756
|
}
|
|
124754
124757
|
function createCompilerHostFromProgramHost(host, getCompilerOptions, directoryStructureHost = host) {
|
|
124755
|
-
const
|
|
124758
|
+
const useCaseSensitiveFileNames2 = host.useCaseSensitiveFileNames();
|
|
124756
124759
|
const compilerHost = {
|
|
124757
124760
|
getSourceFile: createGetSourceFile(
|
|
124758
124761
|
(fileName, encoding) => !encoding ? compilerHost.readFile(fileName) : host.readFile(fileName, encoding),
|
|
@@ -124768,8 +124771,8 @@ ${lanes.join("\n")}
|
|
|
124768
124771
|
(path) => host.directoryExists(path)
|
|
124769
124772
|
),
|
|
124770
124773
|
getCurrentDirectory: memoize(() => host.getCurrentDirectory()),
|
|
124771
|
-
useCaseSensitiveFileNames: () =>
|
|
124772
|
-
getCanonicalFileName: createGetCanonicalFileName(
|
|
124774
|
+
useCaseSensitiveFileNames: () => useCaseSensitiveFileNames2,
|
|
124775
|
+
getCanonicalFileName: createGetCanonicalFileName(useCaseSensitiveFileNames2),
|
|
124773
124776
|
getNewLine: () => getNewLineCharacter(getCompilerOptions()),
|
|
124774
124777
|
fileExists: (f) => host.fileExists(f),
|
|
124775
124778
|
readFile: (f) => host.readFile(f),
|
|
@@ -125050,7 +125053,7 @@ ${lanes.join("\n")}
|
|
|
125050
125053
|
const sourceFilesCache = /* @__PURE__ */ new Map();
|
|
125051
125054
|
let missingFilePathsRequestedForRelease;
|
|
125052
125055
|
let hasChangedCompilerOptions = false;
|
|
125053
|
-
const
|
|
125056
|
+
const useCaseSensitiveFileNames2 = host.useCaseSensitiveFileNames();
|
|
125054
125057
|
const currentDirectory = host.getCurrentDirectory();
|
|
125055
125058
|
const { configFileName, optionsToExtend: optionsToExtendForConfigFile = {}, watchOptionsToExtend, extraFileExtensions, createProgram: createProgram2 } = host;
|
|
125056
125059
|
let { rootFiles: rootFileNames, options: compilerOptions, watchOptions, projectReferences } = host;
|
|
@@ -125058,7 +125061,7 @@ ${lanes.join("\n")}
|
|
|
125058
125061
|
let configFileParsingDiagnostics;
|
|
125059
125062
|
let canConfigFileJsonReportNoInputFiles = false;
|
|
125060
125063
|
let hasChangedConfigFileParsingErrors = false;
|
|
125061
|
-
const cachedDirectoryStructureHost = configFileName === void 0 ? void 0 : createCachedDirectoryStructureHost(host, currentDirectory,
|
|
125064
|
+
const cachedDirectoryStructureHost = configFileName === void 0 ? void 0 : createCachedDirectoryStructureHost(host, currentDirectory, useCaseSensitiveFileNames2);
|
|
125062
125065
|
const directoryStructureHost = cachedDirectoryStructureHost || host;
|
|
125063
125066
|
const parseConfigFileHost = parseConfigHostFromCompilerHostLike(host, directoryStructureHost);
|
|
125064
125067
|
let newLine = updateNewLine();
|
|
@@ -125076,8 +125079,8 @@ ${lanes.join("\n")}
|
|
|
125076
125079
|
Debug.assert(compilerOptions);
|
|
125077
125080
|
Debug.assert(rootFileNames);
|
|
125078
125081
|
const { watchFile: watchFile2, watchDirectory, writeLog } = createWatchFactory(host, compilerOptions);
|
|
125079
|
-
const getCanonicalFileName = createGetCanonicalFileName(
|
|
125080
|
-
writeLog(`Current directory: ${currentDirectory} CaseSensitiveFileNames: ${
|
|
125082
|
+
const getCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames2);
|
|
125083
|
+
writeLog(`Current directory: ${currentDirectory} CaseSensitiveFileNames: ${useCaseSensitiveFileNames2}`);
|
|
125081
125084
|
let configFileWatcher;
|
|
125082
125085
|
if (configFileName) {
|
|
125083
125086
|
configFileWatcher = watchFile2(configFileName, scheduleProgramReload, 2e3 /* High */, watchOptions, WatchType.ConfigFile);
|
|
@@ -125583,7 +125586,7 @@ ${lanes.join("\n")}
|
|
|
125583
125586
|
options: compilerOptions,
|
|
125584
125587
|
program: getCurrentBuilderProgram() || rootFileNames,
|
|
125585
125588
|
currentDirectory,
|
|
125586
|
-
useCaseSensitiveFileNames,
|
|
125589
|
+
useCaseSensitiveFileNames: useCaseSensitiveFileNames2,
|
|
125587
125590
|
writeLog,
|
|
125588
125591
|
toPath: toPath3
|
|
125589
125592
|
}))
|
|
@@ -125673,7 +125676,7 @@ ${lanes.join("\n")}
|
|
|
125673
125676
|
options: config.parsedCommandLine.options,
|
|
125674
125677
|
program: config.parsedCommandLine.fileNames,
|
|
125675
125678
|
currentDirectory,
|
|
125676
|
-
useCaseSensitiveFileNames,
|
|
125679
|
+
useCaseSensitiveFileNames: useCaseSensitiveFileNames2,
|
|
125677
125680
|
writeLog,
|
|
125678
125681
|
toPath: toPath3
|
|
125679
125682
|
}))
|
|
@@ -130184,7 +130187,7 @@ ${lanes.join("\n")}
|
|
|
130184
130187
|
const absoluteMaximumLength = defaultMaximumTruncationLength * 10;
|
|
130185
130188
|
let displayParts;
|
|
130186
130189
|
let lineStart;
|
|
130187
|
-
let
|
|
130190
|
+
let indent3;
|
|
130188
130191
|
let length2;
|
|
130189
130192
|
resetWriter();
|
|
130190
130193
|
const unknownWrite = (text) => writeKind(text, 17 /* text */);
|
|
@@ -130220,12 +130223,12 @@ ${lanes.join("\n")}
|
|
|
130220
130223
|
hasTrailingWhitespace: () => false,
|
|
130221
130224
|
hasTrailingComment: () => false,
|
|
130222
130225
|
rawWrite: notImplemented,
|
|
130223
|
-
getIndent: () =>
|
|
130226
|
+
getIndent: () => indent3,
|
|
130224
130227
|
increaseIndent: () => {
|
|
130225
|
-
|
|
130228
|
+
indent3++;
|
|
130226
130229
|
},
|
|
130227
130230
|
decreaseIndent: () => {
|
|
130228
|
-
|
|
130231
|
+
indent3--;
|
|
130229
130232
|
},
|
|
130230
130233
|
clear: resetWriter
|
|
130231
130234
|
};
|
|
@@ -130233,7 +130236,7 @@ ${lanes.join("\n")}
|
|
|
130233
130236
|
if (length2 > absoluteMaximumLength)
|
|
130234
130237
|
return;
|
|
130235
130238
|
if (lineStart) {
|
|
130236
|
-
const indentString = getIndentString(
|
|
130239
|
+
const indentString = getIndentString(indent3);
|
|
130237
130240
|
if (indentString) {
|
|
130238
130241
|
length2 += indentString.length;
|
|
130239
130242
|
displayParts.push(displayPart(indentString, 16 /* space */));
|
|
@@ -130265,7 +130268,7 @@ ${lanes.join("\n")}
|
|
|
130265
130268
|
function resetWriter() {
|
|
130266
130269
|
displayParts = [];
|
|
130267
130270
|
lineStart = true;
|
|
130268
|
-
|
|
130271
|
+
indent3 = 0;
|
|
130269
130272
|
length2 = 0;
|
|
130270
130273
|
}
|
|
130271
130274
|
}
|
|
@@ -131569,10 +131572,10 @@ ${lanes.join("\n")}
|
|
|
131569
131572
|
}
|
|
131570
131573
|
function forEachExternalModuleToImportFrom(program, host, preferences, useAutoImportProvider, cb) {
|
|
131571
131574
|
var _a, _b;
|
|
131572
|
-
const
|
|
131575
|
+
const useCaseSensitiveFileNames2 = hostUsesCaseSensitiveFileNames(host);
|
|
131573
131576
|
const excludePatterns = preferences.autoImportFileExcludePatterns && mapDefined(preferences.autoImportFileExcludePatterns, (spec) => {
|
|
131574
131577
|
const pattern = getPatternFromSpec(spec, "", "exclude");
|
|
131575
|
-
return pattern ? getRegexFromPattern(pattern,
|
|
131578
|
+
return pattern ? getRegexFromPattern(pattern, useCaseSensitiveFileNames2) : void 0;
|
|
131576
131579
|
});
|
|
131577
131580
|
forEachExternalModule(program.getTypeChecker(), program.getSourceFiles(), excludePatterns, (module2, file) => cb(
|
|
131578
131581
|
module2,
|
|
@@ -133068,12 +133071,12 @@ ${lanes.join("\n")}
|
|
|
133068
133071
|
function isDocumentRegistryEntry(entry) {
|
|
133069
133072
|
return !!entry.sourceFile;
|
|
133070
133073
|
}
|
|
133071
|
-
function createDocumentRegistry(
|
|
133072
|
-
return createDocumentRegistryInternal(
|
|
133074
|
+
function createDocumentRegistry(useCaseSensitiveFileNames2, currentDirectory) {
|
|
133075
|
+
return createDocumentRegistryInternal(useCaseSensitiveFileNames2, currentDirectory);
|
|
133073
133076
|
}
|
|
133074
|
-
function createDocumentRegistryInternal(
|
|
133077
|
+
function createDocumentRegistryInternal(useCaseSensitiveFileNames2, currentDirectory = "", externalCache) {
|
|
133075
133078
|
const buckets = /* @__PURE__ */ new Map();
|
|
133076
|
-
const getCanonicalFileName = createGetCanonicalFileName(!!
|
|
133079
|
+
const getCanonicalFileName = createGetCanonicalFileName(!!useCaseSensitiveFileNames2);
|
|
133077
133080
|
function reportStats() {
|
|
133078
133081
|
const bucketInfoArray = arrayFrom(buckets.keys()).filter((name) => name && name.charAt(0) === "_").map((name) => {
|
|
133079
133082
|
const entries = buckets.get(name);
|
|
@@ -133282,12 +133285,12 @@ ${lanes.join("\n")}
|
|
|
133282
133285
|
|
|
133283
133286
|
// src/services/getEditsForFileRename.ts
|
|
133284
133287
|
function getEditsForFileRename(program, oldFileOrDirPath, newFileOrDirPath, host, formatContext, preferences, sourceMapper) {
|
|
133285
|
-
const
|
|
133286
|
-
const getCanonicalFileName = createGetCanonicalFileName(
|
|
133288
|
+
const useCaseSensitiveFileNames2 = hostUsesCaseSensitiveFileNames(host);
|
|
133289
|
+
const getCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames2);
|
|
133287
133290
|
const oldToNew = getPathUpdater(oldFileOrDirPath, newFileOrDirPath, getCanonicalFileName, sourceMapper);
|
|
133288
133291
|
const newToOld = getPathUpdater(newFileOrDirPath, oldFileOrDirPath, getCanonicalFileName, sourceMapper);
|
|
133289
133292
|
return ts_textChanges_exports.ChangeTracker.with({ host, formatContext, preferences }, (changeTracker) => {
|
|
133290
|
-
updateTsconfigFiles(program, changeTracker, oldToNew, oldFileOrDirPath, newFileOrDirPath, host.getCurrentDirectory(),
|
|
133293
|
+
updateTsconfigFiles(program, changeTracker, oldToNew, oldFileOrDirPath, newFileOrDirPath, host.getCurrentDirectory(), useCaseSensitiveFileNames2);
|
|
133291
133294
|
updateImports(program, changeTracker, oldToNew, newToOld, host, getCanonicalFileName);
|
|
133292
133295
|
});
|
|
133293
133296
|
}
|
|
@@ -133309,7 +133312,7 @@ ${lanes.join("\n")}
|
|
|
133309
133312
|
const rel = getRelativePathFromFile(a0, b0, getCanonicalFileName);
|
|
133310
133313
|
return combinePathsSafe(getDirectoryPath(a1), rel);
|
|
133311
133314
|
}
|
|
133312
|
-
function updateTsconfigFiles(program, changeTracker, oldToNew, oldFileOrDirPath, newFileOrDirPath, currentDirectory,
|
|
133315
|
+
function updateTsconfigFiles(program, changeTracker, oldToNew, oldFileOrDirPath, newFileOrDirPath, currentDirectory, useCaseSensitiveFileNames2) {
|
|
133313
133316
|
const { configFile } = program.getCompilerOptions();
|
|
133314
133317
|
if (!configFile)
|
|
133315
133318
|
return;
|
|
@@ -133333,10 +133336,10 @@ ${lanes.join("\n")}
|
|
|
133333
133336
|
/*excludes*/
|
|
133334
133337
|
[],
|
|
133335
133338
|
includes,
|
|
133336
|
-
|
|
133339
|
+
useCaseSensitiveFileNames2,
|
|
133337
133340
|
currentDirectory
|
|
133338
133341
|
);
|
|
133339
|
-
if (getRegexFromPattern(Debug.checkDefined(matchers.includeFilePattern),
|
|
133342
|
+
if (getRegexFromPattern(Debug.checkDefined(matchers.includeFilePattern), useCaseSensitiveFileNames2).test(oldFileOrDirPath) && !getRegexFromPattern(Debug.checkDefined(matchers.includeFilePattern), useCaseSensitiveFileNames2).test(newFileOrDirPath)) {
|
|
133340
133343
|
changeTracker.insertNodeAfter(configFile, last(property.initializer.elements), factory.createStringLiteral(relativePath(newFileOrDirPath)));
|
|
133341
133344
|
}
|
|
133342
133345
|
return;
|
|
@@ -133384,7 +133387,7 @@ ${lanes.join("\n")}
|
|
|
133384
133387
|
configDir,
|
|
133385
133388
|
path,
|
|
133386
133389
|
/*ignoreCase*/
|
|
133387
|
-
!
|
|
133390
|
+
!useCaseSensitiveFileNames2
|
|
133388
133391
|
);
|
|
133389
133392
|
}
|
|
133390
133393
|
}
|
|
@@ -136698,7 +136701,7 @@ ${lanes.join("\n")}
|
|
|
136698
136701
|
const body = addExports(oldFile, toMove.all, usage.oldFileImportsFromTargetFile, useEsModuleSyntax);
|
|
136699
136702
|
if (typeof targetFile !== "string") {
|
|
136700
136703
|
if (targetFile.statements.length > 0) {
|
|
136701
|
-
changes
|
|
136704
|
+
moveStatementsToTargetFile(changes, program, body, targetFile, toMove);
|
|
136702
136705
|
} else {
|
|
136703
136706
|
changes.insertNodesAtEndOfFile(
|
|
136704
136707
|
targetFile,
|
|
@@ -137491,6 +137494,67 @@ ${lanes.join("\n")}
|
|
|
137491
137494
|
return false;
|
|
137492
137495
|
}
|
|
137493
137496
|
}
|
|
137497
|
+
function moveStatementsToTargetFile(changes, program, statements, targetFile, toMove) {
|
|
137498
|
+
var _a;
|
|
137499
|
+
const removedExports = /* @__PURE__ */ new Set();
|
|
137500
|
+
const targetExports = (_a = targetFile.symbol) == null ? void 0 : _a.exports;
|
|
137501
|
+
if (targetExports) {
|
|
137502
|
+
const checker = program.getTypeChecker();
|
|
137503
|
+
const targetToSourceExports = /* @__PURE__ */ new Map();
|
|
137504
|
+
for (const node of toMove.all) {
|
|
137505
|
+
if (isTopLevelDeclarationStatement(node) && hasSyntacticModifier(node, 1 /* Export */)) {
|
|
137506
|
+
forEachTopLevelDeclaration(node, (declaration) => {
|
|
137507
|
+
var _a2;
|
|
137508
|
+
const targetDeclarations = canHaveSymbol(declaration) ? (_a2 = targetExports.get(declaration.symbol.escapedName)) == null ? void 0 : _a2.declarations : void 0;
|
|
137509
|
+
const exportDeclaration = firstDefined(targetDeclarations, (d) => isExportDeclaration(d) ? d : isExportSpecifier(d) ? tryCast(d.parent.parent, isExportDeclaration) : void 0);
|
|
137510
|
+
if (exportDeclaration && exportDeclaration.moduleSpecifier) {
|
|
137511
|
+
targetToSourceExports.set(
|
|
137512
|
+
exportDeclaration,
|
|
137513
|
+
(targetToSourceExports.get(exportDeclaration) || /* @__PURE__ */ new Set()).add(declaration)
|
|
137514
|
+
);
|
|
137515
|
+
}
|
|
137516
|
+
});
|
|
137517
|
+
}
|
|
137518
|
+
}
|
|
137519
|
+
for (const [exportDeclaration, topLevelDeclarations] of arrayFrom(targetToSourceExports)) {
|
|
137520
|
+
if (exportDeclaration.exportClause && isNamedExports(exportDeclaration.exportClause) && length(exportDeclaration.exportClause.elements)) {
|
|
137521
|
+
const elements = exportDeclaration.exportClause.elements;
|
|
137522
|
+
const updatedElements = filter(elements, (elem) => find(skipAlias(elem.symbol, checker).declarations, (d) => isTopLevelDeclaration(d) && topLevelDeclarations.has(d)) === void 0);
|
|
137523
|
+
if (length(updatedElements) === 0) {
|
|
137524
|
+
changes.deleteNode(targetFile, exportDeclaration);
|
|
137525
|
+
removedExports.add(exportDeclaration);
|
|
137526
|
+
continue;
|
|
137527
|
+
}
|
|
137528
|
+
if (length(updatedElements) < length(elements)) {
|
|
137529
|
+
changes.replaceNode(
|
|
137530
|
+
targetFile,
|
|
137531
|
+
exportDeclaration,
|
|
137532
|
+
factory.updateExportDeclaration(
|
|
137533
|
+
exportDeclaration,
|
|
137534
|
+
exportDeclaration.modifiers,
|
|
137535
|
+
exportDeclaration.isTypeOnly,
|
|
137536
|
+
factory.updateNamedExports(exportDeclaration.exportClause, factory.createNodeArray(updatedElements, elements.hasTrailingComma)),
|
|
137537
|
+
exportDeclaration.moduleSpecifier,
|
|
137538
|
+
exportDeclaration.assertClause
|
|
137539
|
+
)
|
|
137540
|
+
);
|
|
137541
|
+
}
|
|
137542
|
+
}
|
|
137543
|
+
}
|
|
137544
|
+
}
|
|
137545
|
+
const lastReExport = findLast(targetFile.statements, (n) => isExportDeclaration(n) && !!n.moduleSpecifier && !removedExports.has(n));
|
|
137546
|
+
if (lastReExport) {
|
|
137547
|
+
changes.insertNodesBefore(
|
|
137548
|
+
targetFile,
|
|
137549
|
+
lastReExport,
|
|
137550
|
+
statements,
|
|
137551
|
+
/*blankLineBetween*/
|
|
137552
|
+
true
|
|
137553
|
+
);
|
|
137554
|
+
} else {
|
|
137555
|
+
changes.insertNodesAfter(targetFile, targetFile.statements[targetFile.statements.length - 1], statements);
|
|
137556
|
+
}
|
|
137557
|
+
}
|
|
137494
137558
|
function getOverloadRangeToMove(sourceFile, statement) {
|
|
137495
137559
|
if (isFunctionLikeDeclaration(statement)) {
|
|
137496
137560
|
const declarations = statement.symbol.declarations;
|
|
@@ -141526,10 +141590,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
141526
141590
|
host.log(message);
|
|
141527
141591
|
}
|
|
141528
141592
|
}
|
|
141529
|
-
const
|
|
141530
|
-
const getCanonicalFileName = createGetCanonicalFileName(
|
|
141593
|
+
const useCaseSensitiveFileNames2 = hostUsesCaseSensitiveFileNames(host);
|
|
141594
|
+
const getCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames2);
|
|
141531
141595
|
const sourceMapper = getSourceMapper({
|
|
141532
|
-
useCaseSensitiveFileNames: () =>
|
|
141596
|
+
useCaseSensitiveFileNames: () => useCaseSensitiveFileNames2,
|
|
141533
141597
|
getCurrentDirectory: () => currentDirectory,
|
|
141534
141598
|
getProgram,
|
|
141535
141599
|
fileExists: maybeBind(host, host.fileExists),
|
|
@@ -141577,7 +141641,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
141577
141641
|
getSourceFileByPath: getOrCreateSourceFileByPath,
|
|
141578
141642
|
getCancellationToken: () => cancellationToken,
|
|
141579
141643
|
getCanonicalFileName,
|
|
141580
|
-
useCaseSensitiveFileNames: () =>
|
|
141644
|
+
useCaseSensitiveFileNames: () => useCaseSensitiveFileNames2,
|
|
141581
141645
|
getNewLine: () => getNewLineCharacter(newSettings),
|
|
141582
141646
|
getDefaultLibFileName: (options2) => host.getDefaultLibFileName(options2),
|
|
141583
141647
|
writeFile: noop,
|
|
@@ -141621,9 +141685,12 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
141621
141685
|
compilerHost.getSourceFile = getSourceFileWithCache;
|
|
141622
141686
|
(_c = host.setCompilerHost) == null ? void 0 : _c.call(host, compilerHost);
|
|
141623
141687
|
const parseConfigHost = {
|
|
141624
|
-
useCaseSensitiveFileNames,
|
|
141688
|
+
useCaseSensitiveFileNames: useCaseSensitiveFileNames2,
|
|
141625
141689
|
fileExists: (fileName) => compilerHost.fileExists(fileName),
|
|
141626
141690
|
readFile: (fileName) => compilerHost.readFile(fileName),
|
|
141691
|
+
directoryExists: (f) => compilerHost.directoryExists(f),
|
|
141692
|
+
getDirectories: (f) => compilerHost.getDirectories(f),
|
|
141693
|
+
realpath: compilerHost.realpath,
|
|
141627
141694
|
readDirectory: (...args) => compilerHost.readDirectory(...args),
|
|
141628
141695
|
trace: compilerHost.trace,
|
|
141629
141696
|
getCurrentDirectory: compilerHost.getCurrentDirectory,
|
|
@@ -149742,7 +149809,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
149742
149809
|
Diagnostics.Cannot_find_name_0_Did_you_mean_the_static_member_1_0.code,
|
|
149743
149810
|
Diagnostics.Cannot_find_namespace_0.code,
|
|
149744
149811
|
Diagnostics._0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead.code,
|
|
149745
|
-
Diagnostics.
|
|
149812
|
+
Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here.code,
|
|
149746
149813
|
Diagnostics.No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer.code,
|
|
149747
149814
|
Diagnostics._0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type.code
|
|
149748
149815
|
];
|
|
@@ -160514,16 +160581,18 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
160514
160581
|
const fragmentDirectory = fragmentHasPath ? hasTrailingDirectorySeparator(fragment) ? fragment : getDirectoryPath(fragment) : void 0;
|
|
160515
160582
|
const expandedPrefixDirectory = fragmentHasPath ? combinePaths(normalizedPrefixDirectory, normalizedPrefixBase + fragmentDirectory) : normalizedPrefixDirectory;
|
|
160516
160583
|
const normalizedSuffix = normalizePath(parsed.suffix);
|
|
160584
|
+
const declarationExtension = normalizedSuffix && getDeclarationEmitExtensionForPath("_" + normalizedSuffix);
|
|
160585
|
+
const matchingSuffixes = declarationExtension ? [changeExtension(normalizedSuffix, declarationExtension), normalizedSuffix] : [normalizedSuffix];
|
|
160517
160586
|
const baseDirectory = normalizePath(combinePaths(packageDirectory, expandedPrefixDirectory));
|
|
160518
160587
|
const completePrefix = fragmentHasPath ? baseDirectory : ensureTrailingDirectorySeparator(baseDirectory) + normalizedPrefixBase;
|
|
160519
|
-
const
|
|
160588
|
+
const includeGlobs = normalizedSuffix ? matchingSuffixes.map((suffix) => "**/*" + suffix) : ["./*"];
|
|
160520
160589
|
const matches = mapDefined(tryReadDirectory(
|
|
160521
160590
|
host,
|
|
160522
160591
|
baseDirectory,
|
|
160523
160592
|
extensionOptions.extensionsToSearch,
|
|
160524
160593
|
/*exclude*/
|
|
160525
160594
|
void 0,
|
|
160526
|
-
|
|
160595
|
+
includeGlobs
|
|
160527
160596
|
), (match) => {
|
|
160528
160597
|
const trimmedWithPattern = trimPrefixAndSuffix(match);
|
|
160529
160598
|
if (trimmedWithPattern) {
|
|
@@ -160537,8 +160606,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
160537
160606
|
const directories = normalizedSuffix ? emptyArray : mapDefined(tryGetDirectories(host, baseDirectory), (dir) => dir === "node_modules" ? void 0 : directoryResult(dir));
|
|
160538
160607
|
return [...matches, ...directories];
|
|
160539
160608
|
function trimPrefixAndSuffix(path) {
|
|
160540
|
-
|
|
160541
|
-
|
|
160609
|
+
return firstDefined(matchingSuffixes, (suffix) => {
|
|
160610
|
+
const inner = withoutStartAndEnd(normalizePath(path), completePrefix, suffix);
|
|
160611
|
+
return inner === void 0 ? void 0 : removeLeadingDirectorySeparator(inner);
|
|
160612
|
+
});
|
|
160542
160613
|
}
|
|
160543
160614
|
}
|
|
160544
160615
|
function withoutStartAndEnd(s, start, end) {
|
|
@@ -167853,6 +167924,9 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
167853
167924
|
insertNodeBefore(sourceFile, before, newNode, blankLineBetween = false, options = {}) {
|
|
167854
167925
|
this.insertNodeAt(sourceFile, getAdjustedStartPosition(sourceFile, before, options), newNode, this.getOptionsForInsertNodeBefore(before, newNode, blankLineBetween));
|
|
167855
167926
|
}
|
|
167927
|
+
insertNodesBefore(sourceFile, before, newNodes, blankLineBetween = false, options = {}) {
|
|
167928
|
+
this.insertNodesAt(sourceFile, getAdjustedStartPosition(sourceFile, before, options), newNodes, this.getOptionsForInsertNodeBefore(before, first(newNodes), blankLineBetween));
|
|
167929
|
+
}
|
|
167856
167930
|
insertModifierAt(sourceFile, pos, modifier, options = {}) {
|
|
167857
167931
|
this.insertNodeAt(sourceFile, pos, factory.createToken(modifier), options);
|
|
167858
167932
|
}
|
|
@@ -167864,8 +167938,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
167864
167938
|
const startPosition = getFirstNonSpaceCharacterPosition(sourceFile.text, lineStartPosition);
|
|
167865
167939
|
const insertAtLineStart = isValidLocationToAddComment(sourceFile, startPosition);
|
|
167866
167940
|
const token = getTouchingToken(sourceFile, insertAtLineStart ? startPosition : position);
|
|
167867
|
-
const
|
|
167868
|
-
const text = `${insertAtLineStart ? "" : this.newLineCharacter}//${commentText}${this.newLineCharacter}${
|
|
167941
|
+
const indent3 = sourceFile.text.slice(lineStartPosition, startPosition);
|
|
167942
|
+
const text = `${insertAtLineStart ? "" : this.newLineCharacter}//${commentText}${this.newLineCharacter}${indent3}`;
|
|
167869
167943
|
this.insertText(sourceFile, token.getStart(sourceFile), text);
|
|
167870
167944
|
}
|
|
167871
167945
|
insertJsdocCommentBefore(sourceFile, node, tag) {
|
|
@@ -167884,8 +167958,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
167884
167958
|
}
|
|
167885
167959
|
}
|
|
167886
167960
|
const startPosition = getPrecedingNonSpaceCharacterPosition(sourceFile.text, fnStart - 1);
|
|
167887
|
-
const
|
|
167888
|
-
this.insertNodeAt(sourceFile, fnStart, tag, { suffix: this.newLineCharacter +
|
|
167961
|
+
const indent3 = sourceFile.text.slice(startPosition, fnStart);
|
|
167962
|
+
this.insertNodeAt(sourceFile, fnStart, tag, { suffix: this.newLineCharacter + indent3 });
|
|
167889
167963
|
}
|
|
167890
167964
|
createJSDocText(sourceFile, node) {
|
|
167891
167965
|
const comments = flatMap(node.jsDoc, (jsDoc2) => isString(jsDoc2.comment) ? factory.createJSDocText(jsDoc2.comment) : jsDoc2.comment);
|
|
@@ -171965,7 +172039,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
171965
172039
|
array.splice(removeIndex, 1);
|
|
171966
172040
|
}
|
|
171967
172041
|
}
|
|
171968
|
-
function
|
|
172042
|
+
function indent2(str) {
|
|
171969
172043
|
return indentStr + str.replace(/\n/g, indentStr);
|
|
171970
172044
|
}
|
|
171971
172045
|
function stringifyIndented(json) {
|
|
@@ -174493,7 +174567,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
174493
174567
|
return this.projectService.includePackageJsonAutoImports();
|
|
174494
174568
|
}
|
|
174495
174569
|
/** @internal */
|
|
174496
|
-
|
|
174570
|
+
getHostForAutoImportProvider() {
|
|
174497
174571
|
var _a, _b;
|
|
174498
174572
|
if (this.program) {
|
|
174499
174573
|
return {
|
|
@@ -174504,7 +174578,8 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
174504
174578
|
readFile: this.projectService.host.readFile.bind(this.projectService.host),
|
|
174505
174579
|
getDirectories: this.projectService.host.getDirectories.bind(this.projectService.host),
|
|
174506
174580
|
trace: (_b = this.projectService.host.trace) == null ? void 0 : _b.bind(this.projectService.host),
|
|
174507
|
-
useCaseSensitiveFileNames: this.program.useCaseSensitiveFileNames()
|
|
174581
|
+
useCaseSensitiveFileNames: this.program.useCaseSensitiveFileNames(),
|
|
174582
|
+
readDirectory: this.projectService.host.readDirectory.bind(this.projectService.host)
|
|
174508
174583
|
};
|
|
174509
174584
|
}
|
|
174510
174585
|
return this.projectService.host;
|
|
@@ -174532,7 +174607,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
174532
174607
|
if (dependencySelection) {
|
|
174533
174608
|
(_a = tracing) == null ? void 0 : _a.push(tracing.Phase.Session, "getPackageJsonAutoImportProvider");
|
|
174534
174609
|
const start = timestamp();
|
|
174535
|
-
this.autoImportProviderHost = AutoImportProviderProject.create(dependencySelection, this, this.
|
|
174610
|
+
this.autoImportProviderHost = AutoImportProviderProject.create(dependencySelection, this, this.getHostForAutoImportProvider(), this.documentRegistry);
|
|
174536
174611
|
if (this.autoImportProviderHost) {
|
|
174537
174612
|
updateProjectIfDirty(this.autoImportProviderHost);
|
|
174538
174613
|
this.sendPerformanceEvent("CreatePackageJsonAutoImportProvider", timestamp() - start);
|
|
@@ -174748,7 +174823,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
174748
174823
|
this.getParsedCommandLine = maybeBind(this.hostProject, this.hostProject.getParsedCommandLine);
|
|
174749
174824
|
}
|
|
174750
174825
|
/** @internal */
|
|
174751
|
-
static getRootFileNames(dependencySelection, hostProject,
|
|
174826
|
+
static getRootFileNames(dependencySelection, hostProject, host, compilerOptions) {
|
|
174752
174827
|
var _a, _b;
|
|
174753
174828
|
if (!dependencySelection) {
|
|
174754
174829
|
return emptyArray;
|
|
@@ -174778,7 +174853,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
174778
174853
|
name,
|
|
174779
174854
|
hostProject.currentDirectory,
|
|
174780
174855
|
compilerOptions,
|
|
174781
|
-
|
|
174856
|
+
host,
|
|
174782
174857
|
program.getModuleResolutionCache()
|
|
174783
174858
|
);
|
|
174784
174859
|
if (packageJson) {
|
|
@@ -174795,7 +174870,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
174795
174870
|
`@types/${name}`,
|
|
174796
174871
|
directory,
|
|
174797
174872
|
compilerOptions,
|
|
174798
|
-
|
|
174873
|
+
host,
|
|
174799
174874
|
program.getModuleResolutionCache()
|
|
174800
174875
|
);
|
|
174801
174876
|
if (typesPackageJson) {
|
|
@@ -174835,12 +174910,12 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
174835
174910
|
const entrypoints = getEntrypointsFromPackageJsonInfo(
|
|
174836
174911
|
packageJson,
|
|
174837
174912
|
compilerOptions,
|
|
174838
|
-
|
|
174913
|
+
host,
|
|
174839
174914
|
program2.getModuleResolutionCache(),
|
|
174840
174915
|
resolveJs
|
|
174841
174916
|
);
|
|
174842
174917
|
if (entrypoints) {
|
|
174843
|
-
const real = (_a2 =
|
|
174918
|
+
const real = (_a2 = host.realpath) == null ? void 0 : _a2.call(host, packageJson.packageDirectory);
|
|
174844
174919
|
const isSymlink = real && real !== packageJson.packageDirectory;
|
|
174845
174920
|
if (isSymlink) {
|
|
174846
174921
|
symlinkCache.setSymlinkedDirectory(packageJson.packageDirectory, {
|
|
@@ -174858,7 +174933,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
174858
174933
|
}
|
|
174859
174934
|
}
|
|
174860
174935
|
/** @internal */
|
|
174861
|
-
static create(dependencySelection, hostProject,
|
|
174936
|
+
static create(dependencySelection, hostProject, host, documentRegistry) {
|
|
174862
174937
|
if (dependencySelection === 0 /* Off */) {
|
|
174863
174938
|
return void 0;
|
|
174864
174939
|
}
|
|
@@ -174866,7 +174941,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
174866
174941
|
...hostProject.getCompilerOptions(),
|
|
174867
174942
|
...this.compilerOptionsOverrides
|
|
174868
174943
|
};
|
|
174869
|
-
const rootNames = this.getRootFileNames(dependencySelection, hostProject,
|
|
174944
|
+
const rootNames = this.getRootFileNames(dependencySelection, hostProject, host, compilerOptions);
|
|
174870
174945
|
if (!rootNames.length) {
|
|
174871
174946
|
return void 0;
|
|
174872
174947
|
}
|
|
@@ -174885,7 +174960,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
174885
174960
|
rootFileNames = _AutoImportProviderProject.getRootFileNames(
|
|
174886
174961
|
this.hostProject.includePackageJsonAutoImports(),
|
|
174887
174962
|
this.hostProject,
|
|
174888
|
-
this.hostProject.
|
|
174963
|
+
this.hostProject.getHostForAutoImportProvider(),
|
|
174889
174964
|
this.getCompilationSettings()
|
|
174890
174965
|
);
|
|
174891
174966
|
}
|
|
@@ -174924,7 +174999,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
174924
174999
|
onPackageJsonChange() {
|
|
174925
175000
|
throw new Error("package.json changes should be notified on an AutoImportProvider's host project");
|
|
174926
175001
|
}
|
|
174927
|
-
|
|
175002
|
+
getHostForAutoImportProvider() {
|
|
174928
175003
|
throw new Error("AutoImportProviderProject cannot provide its own host; use `hostProject.getModuleResolutionHostForAutomImportProvider()` instead.");
|
|
174929
175004
|
}
|
|
174930
175005
|
getProjectReferences() {
|
|
@@ -178759,7 +178834,7 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
178759
178834
|
const verboseLogging = logger.hasLevel(3 /* verbose */);
|
|
178760
178835
|
const json = JSON.stringify(msg);
|
|
178761
178836
|
if (verboseLogging) {
|
|
178762
|
-
logger.info(`${msg.type}:${
|
|
178837
|
+
logger.info(`${msg.type}:${indent2(JSON.stringify(msg, void 0, " "))}`);
|
|
178763
178838
|
}
|
|
178764
178839
|
const len = byteLength(json, "utf8");
|
|
178765
178840
|
return `Content-Length: ${1 + len}\r
|
|
@@ -180068,9 +180143,9 @@ ${json}${newLine}`;
|
|
|
180068
180143
|
logErrorWorker(err, cmd, fileRequest) {
|
|
180069
180144
|
let msg = "Exception on executing command " + cmd;
|
|
180070
180145
|
if (err.message) {
|
|
180071
|
-
msg += ":\n" +
|
|
180146
|
+
msg += ":\n" + indent2(err.message);
|
|
180072
180147
|
if (err.stack) {
|
|
180073
|
-
msg += "\n" +
|
|
180148
|
+
msg += "\n" + indent2(err.stack);
|
|
180074
180149
|
}
|
|
180075
180150
|
}
|
|
180076
180151
|
if (this.logger.hasLevel(3 /* verbose */)) {
|
|
@@ -180082,7 +180157,7 @@ ${json}${newLine}`;
|
|
|
180082
180157
|
const text = getSnapshotText(scriptInfo.getSnapshot());
|
|
180083
180158
|
msg += `
|
|
180084
180159
|
|
|
180085
|
-
File text of ${fileRequest.file}:${
|
|
180160
|
+
File text of ${fileRequest.file}:${indent2(text)}
|
|
180086
180161
|
`;
|
|
180087
180162
|
}
|
|
180088
180163
|
} catch {
|
|
@@ -181923,7 +181998,7 @@ ${e.message}`;
|
|
|
181923
181998
|
if (this.logger.hasLevel(2 /* requestTime */)) {
|
|
181924
181999
|
start = this.hrtime();
|
|
181925
182000
|
if (this.logger.hasLevel(3 /* verbose */)) {
|
|
181926
|
-
this.logger.info(`request:${
|
|
182001
|
+
this.logger.info(`request:${indent2(this.toStringMessage(message))}`);
|
|
181927
182002
|
}
|
|
181928
182003
|
}
|
|
181929
182004
|
let request;
|
|
@@ -182796,7 +182871,7 @@ ${e.message}`;
|
|
|
182796
182871
|
getLocationInNewDocument: () => getLocationInNewDocument,
|
|
182797
182872
|
hasArgument: () => hasArgument,
|
|
182798
182873
|
hasNoTypeScriptSource: () => hasNoTypeScriptSource,
|
|
182799
|
-
indent: () =>
|
|
182874
|
+
indent: () => indent2,
|
|
182800
182875
|
isConfigFile: () => isConfigFile,
|
|
182801
182876
|
isConfiguredProject: () => isConfiguredProject,
|
|
182802
182877
|
isDynamicFileName: () => isDynamicFileName,
|
|
@@ -184956,7 +185031,6 @@ ${e.message}`;
|
|
|
184956
185031
|
startEndOverlapsWithStartEnd: () => startEndOverlapsWithStartEnd,
|
|
184957
185032
|
startOnNewLine: () => startOnNewLine,
|
|
184958
185033
|
startTracing: () => startTracing,
|
|
184959
|
-
startWhitespaceCount: () => startWhitespaceCount,
|
|
184960
185034
|
startsWith: () => startsWith,
|
|
184961
185035
|
startsWithDirectory: () => startsWithDirectory,
|
|
184962
185036
|
startsWithUnderscore: () => startsWithUnderscore,
|
|
@@ -185212,7 +185286,7 @@ ${e.message}`;
|
|
|
185212
185286
|
getLocationInNewDocument: () => getLocationInNewDocument,
|
|
185213
185287
|
hasArgument: () => hasArgument,
|
|
185214
185288
|
hasNoTypeScriptSource: () => hasNoTypeScriptSource,
|
|
185215
|
-
indent: () =>
|
|
185289
|
+
indent: () => indent2,
|
|
185216
185290
|
isConfigFile: () => isConfigFile,
|
|
185217
185291
|
isConfiguredProject: () => isConfiguredProject,
|
|
185218
185292
|
isDynamicFileName: () => isDynamicFileName,
|
|
@@ -187360,7 +187434,6 @@ ${e.message}`;
|
|
|
187360
187434
|
startEndOverlapsWithStartEnd: () => startEndOverlapsWithStartEnd,
|
|
187361
187435
|
startOnNewLine: () => startOnNewLine,
|
|
187362
187436
|
startTracing: () => startTracing,
|
|
187363
|
-
startWhitespaceCount: () => startWhitespaceCount,
|
|
187364
187437
|
startsWith: () => startsWith,
|
|
187365
187438
|
startsWithDirectory: () => startsWithDirectory,
|
|
187366
187439
|
startsWithUnderscore: () => startsWithUnderscore,
|