@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/tsserver.js
CHANGED
|
@@ -2147,7 +2147,6 @@ __export(server_exports, {
|
|
|
2147
2147
|
startEndOverlapsWithStartEnd: () => startEndOverlapsWithStartEnd,
|
|
2148
2148
|
startOnNewLine: () => startOnNewLine,
|
|
2149
2149
|
startTracing: () => startTracing,
|
|
2150
|
-
startWhitespaceCount: () => startWhitespaceCount,
|
|
2151
2150
|
startsWith: () => startsWith,
|
|
2152
2151
|
startsWithDirectory: () => startsWithDirectory,
|
|
2153
2152
|
startsWithUnderscore: () => startsWithUnderscore,
|
|
@@ -2328,7 +2327,7 @@ module.exports = __toCommonJS(server_exports);
|
|
|
2328
2327
|
|
|
2329
2328
|
// src/compiler/corePublic.ts
|
|
2330
2329
|
var versionMajorMinor = "5.2";
|
|
2331
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
2330
|
+
var version = `${versionMajorMinor}.0-insiders.20230707`;
|
|
2332
2331
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2333
2332
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2334
2333
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -3840,8 +3839,8 @@ function unorderedRemoveFirstItemWhere(array, predicate) {
|
|
|
3840
3839
|
}
|
|
3841
3840
|
return false;
|
|
3842
3841
|
}
|
|
3843
|
-
function createGetCanonicalFileName(
|
|
3844
|
-
return
|
|
3842
|
+
function createGetCanonicalFileName(useCaseSensitiveFileNames2) {
|
|
3843
|
+
return useCaseSensitiveFileNames2 ? identity : toFileNameLowerCase;
|
|
3845
3844
|
}
|
|
3846
3845
|
function patternText({ prefix, suffix }) {
|
|
3847
3846
|
return `${prefix}*${suffix}`;
|
|
@@ -3975,13 +3974,6 @@ function takeWhile(array, predicate) {
|
|
|
3975
3974
|
return array.slice(0, index);
|
|
3976
3975
|
}
|
|
3977
3976
|
}
|
|
3978
|
-
function startWhitespaceCount(s) {
|
|
3979
|
-
for (let i = 0; i < s.length; i++) {
|
|
3980
|
-
if (!isWhiteSpaceLike(s.charCodeAt(i)))
|
|
3981
|
-
return i;
|
|
3982
|
-
}
|
|
3983
|
-
return s.length;
|
|
3984
|
-
}
|
|
3985
3977
|
function skipWhile(array, predicate) {
|
|
3986
3978
|
if (array) {
|
|
3987
3979
|
const len = array.length;
|
|
@@ -7685,10 +7677,10 @@ function createDynamicPriorityPollingWatchFile(host) {
|
|
|
7685
7677
|
pollingIntervalQueue(pollingInterval).pollScheduled = host.setTimeout(pollingInterval === 250 /* Low */ ? pollLowPollingIntervalQueue : pollPollingIntervalQueue, pollingInterval, pollingInterval === 250 /* Low */ ? "pollLowPollingIntervalQueue" : "pollPollingIntervalQueue", pollingIntervalQueue(pollingInterval));
|
|
7686
7678
|
}
|
|
7687
7679
|
}
|
|
7688
|
-
function createUseFsEventsOnParentDirectoryWatchFile(fsWatch,
|
|
7680
|
+
function createUseFsEventsOnParentDirectoryWatchFile(fsWatch, useCaseSensitiveFileNames2) {
|
|
7689
7681
|
const fileWatcherCallbacks = createMultiMap();
|
|
7690
7682
|
const dirWatchers = /* @__PURE__ */ new Map();
|
|
7691
|
-
const toCanonicalName = createGetCanonicalFileName(
|
|
7683
|
+
const toCanonicalName = createGetCanonicalFileName(useCaseSensitiveFileNames2);
|
|
7692
7684
|
return nonPollingWatchFile;
|
|
7693
7685
|
function nonPollingWatchFile(fileName, callback, _pollingInterval, fallbackOptions) {
|
|
7694
7686
|
const filePath = toCanonicalName(fileName);
|
|
@@ -7764,8 +7756,8 @@ function createFixedChunkSizePollingWatchFile(host) {
|
|
|
7764
7756
|
pollScheduled = host.setTimeout(pollQueue, 2e3 /* High */, "pollQueue");
|
|
7765
7757
|
}
|
|
7766
7758
|
}
|
|
7767
|
-
function createSingleWatcherPerName(cache,
|
|
7768
|
-
const toCanonicalFileName = createGetCanonicalFileName(
|
|
7759
|
+
function createSingleWatcherPerName(cache, useCaseSensitiveFileNames2, name, callback, createWatcher) {
|
|
7760
|
+
const toCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames2);
|
|
7769
7761
|
const path = toCanonicalFileName(name);
|
|
7770
7762
|
const existing = cache.get(path);
|
|
7771
7763
|
if (existing) {
|
|
@@ -7817,7 +7809,7 @@ function setSysLog(logger) {
|
|
|
7817
7809
|
}
|
|
7818
7810
|
function createDirectoryWatcherSupportingRecursive({
|
|
7819
7811
|
watchDirectory,
|
|
7820
|
-
useCaseSensitiveFileNames,
|
|
7812
|
+
useCaseSensitiveFileNames: useCaseSensitiveFileNames2,
|
|
7821
7813
|
getCurrentDirectory,
|
|
7822
7814
|
getAccessibleSortedChildDirectories,
|
|
7823
7815
|
fileSystemEntryExists,
|
|
@@ -7829,8 +7821,8 @@ function createDirectoryWatcherSupportingRecursive({
|
|
|
7829
7821
|
const callbackCache = createMultiMap();
|
|
7830
7822
|
const cacheToUpdateChildWatches = /* @__PURE__ */ new Map();
|
|
7831
7823
|
let timerToUpdateChildWatches;
|
|
7832
|
-
const filePathComparer = getStringComparer(!
|
|
7833
|
-
const toCanonicalFilePath = createGetCanonicalFileName(
|
|
7824
|
+
const filePathComparer = getStringComparer(!useCaseSensitiveFileNames2);
|
|
7825
|
+
const toCanonicalFilePath = createGetCanonicalFileName(useCaseSensitiveFileNames2);
|
|
7834
7826
|
return (dirName, callback, recursive, options) => recursive ? createDirectoryWatcher(dirName, options, callback) : watchDirectory(dirName, callback, recursive, options);
|
|
7835
7827
|
function createDirectoryWatcher(dirName, options, callback) {
|
|
7836
7828
|
const dirPath = toCanonicalFilePath(dirName);
|
|
@@ -7997,12 +7989,12 @@ function createDirectoryWatcherSupportingRecursive({
|
|
|
7997
7989
|
}
|
|
7998
7990
|
}
|
|
7999
7991
|
function isIgnoredPath(path, options) {
|
|
8000
|
-
return some(ignoredPaths, (searchPath) => isInPath(path, searchPath)) || isIgnoredByWatchOptions(path, options,
|
|
7992
|
+
return some(ignoredPaths, (searchPath) => isInPath(path, searchPath)) || isIgnoredByWatchOptions(path, options, useCaseSensitiveFileNames2, getCurrentDirectory);
|
|
8001
7993
|
}
|
|
8002
7994
|
function isInPath(path, searchPath) {
|
|
8003
7995
|
if (stringContains(path, searchPath))
|
|
8004
7996
|
return true;
|
|
8005
|
-
if (
|
|
7997
|
+
if (useCaseSensitiveFileNames2)
|
|
8006
7998
|
return false;
|
|
8007
7999
|
return stringContains(toCanonicalFilePath(path), searchPath);
|
|
8008
8000
|
}
|
|
@@ -8025,14 +8017,14 @@ function createFsWatchCallbackForFileWatcherCallback(fileName, callback, getModi
|
|
|
8025
8017
|
}
|
|
8026
8018
|
};
|
|
8027
8019
|
}
|
|
8028
|
-
function isIgnoredByWatchOptions(pathToCheck, options,
|
|
8029
|
-
return ((options == null ? void 0 : options.excludeDirectories) || (options == null ? void 0 : options.excludeFiles)) && (matchesExclude(pathToCheck, options == null ? void 0 : options.excludeFiles,
|
|
8020
|
+
function isIgnoredByWatchOptions(pathToCheck, options, useCaseSensitiveFileNames2, getCurrentDirectory) {
|
|
8021
|
+
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()));
|
|
8030
8022
|
}
|
|
8031
|
-
function createFsWatchCallbackForDirectoryWatcherCallback(directoryName, callback, options,
|
|
8023
|
+
function createFsWatchCallbackForDirectoryWatcherCallback(directoryName, callback, options, useCaseSensitiveFileNames2, getCurrentDirectory) {
|
|
8032
8024
|
return (eventName, relativeFileName) => {
|
|
8033
8025
|
if (eventName === "rename") {
|
|
8034
8026
|
const fileName = !relativeFileName ? directoryName : normalizePath(combinePaths(directoryName, relativeFileName));
|
|
8035
|
-
if (!relativeFileName || !isIgnoredByWatchOptions(fileName, options,
|
|
8027
|
+
if (!relativeFileName || !isIgnoredByWatchOptions(fileName, options, useCaseSensitiveFileNames2, getCurrentDirectory)) {
|
|
8036
8028
|
callback(fileName);
|
|
8037
8029
|
}
|
|
8038
8030
|
}
|
|
@@ -8045,7 +8037,7 @@ function createSystemWatchFunctions({
|
|
|
8045
8037
|
clearTimeout: clearTimeout2,
|
|
8046
8038
|
fsWatchWorker,
|
|
8047
8039
|
fileSystemEntryExists,
|
|
8048
|
-
useCaseSensitiveFileNames,
|
|
8040
|
+
useCaseSensitiveFileNames: useCaseSensitiveFileNames2,
|
|
8049
8041
|
getCurrentDirectory,
|
|
8050
8042
|
fsSupportsRecursiveFsWatch,
|
|
8051
8043
|
getAccessibleSortedChildDirectories,
|
|
@@ -8117,7 +8109,7 @@ function createSystemWatchFunctions({
|
|
|
8117
8109
|
);
|
|
8118
8110
|
case 5 /* UseFsEventsOnParentDirectory */:
|
|
8119
8111
|
if (!nonPollingWatchFile) {
|
|
8120
|
-
nonPollingWatchFile = createUseFsEventsOnParentDirectoryWatchFile(fsWatch,
|
|
8112
|
+
nonPollingWatchFile = createUseFsEventsOnParentDirectoryWatchFile(fsWatch, useCaseSensitiveFileNames2);
|
|
8121
8113
|
}
|
|
8122
8114
|
return nonPollingWatchFile(fileName, callback, pollingInterval, getFallbackOptions(options));
|
|
8123
8115
|
default:
|
|
@@ -8166,7 +8158,7 @@ function createSystemWatchFunctions({
|
|
|
8166
8158
|
return fsWatch(
|
|
8167
8159
|
directoryName,
|
|
8168
8160
|
1 /* Directory */,
|
|
8169
|
-
createFsWatchCallbackForDirectoryWatcherCallback(directoryName, callback, options,
|
|
8161
|
+
createFsWatchCallbackForDirectoryWatcherCallback(directoryName, callback, options, useCaseSensitiveFileNames2, getCurrentDirectory),
|
|
8170
8162
|
recursive,
|
|
8171
8163
|
500 /* Medium */,
|
|
8172
8164
|
getFallbackOptions(options)
|
|
@@ -8174,7 +8166,7 @@ function createSystemWatchFunctions({
|
|
|
8174
8166
|
}
|
|
8175
8167
|
if (!hostRecursiveDirectoryWatcher) {
|
|
8176
8168
|
hostRecursiveDirectoryWatcher = createDirectoryWatcherSupportingRecursive({
|
|
8177
|
-
useCaseSensitiveFileNames,
|
|
8169
|
+
useCaseSensitiveFileNames: useCaseSensitiveFileNames2,
|
|
8178
8170
|
getCurrentDirectory,
|
|
8179
8171
|
fileSystemEntryExists,
|
|
8180
8172
|
getAccessibleSortedChildDirectories,
|
|
@@ -8220,7 +8212,7 @@ function createSystemWatchFunctions({
|
|
|
8220
8212
|
return fsWatch(
|
|
8221
8213
|
directoryName,
|
|
8222
8214
|
1 /* Directory */,
|
|
8223
|
-
createFsWatchCallbackForDirectoryWatcherCallback(directoryName, callback, options,
|
|
8215
|
+
createFsWatchCallbackForDirectoryWatcherCallback(directoryName, callback, options, useCaseSensitiveFileNames2, getCurrentDirectory),
|
|
8224
8216
|
recursive,
|
|
8225
8217
|
500 /* Medium */,
|
|
8226
8218
|
getFallbackOptions(watchDirectoryOptions)
|
|
@@ -8248,7 +8240,7 @@ function createSystemWatchFunctions({
|
|
|
8248
8240
|
function pollingWatchFile(fileName, callback, pollingInterval, options) {
|
|
8249
8241
|
return createSingleWatcherPerName(
|
|
8250
8242
|
pollingWatches,
|
|
8251
|
-
|
|
8243
|
+
useCaseSensitiveFileNames2,
|
|
8252
8244
|
fileName,
|
|
8253
8245
|
callback,
|
|
8254
8246
|
(cb) => pollingWatchFileWorker(fileName, cb, pollingInterval, options)
|
|
@@ -8257,7 +8249,7 @@ function createSystemWatchFunctions({
|
|
|
8257
8249
|
function fsWatch(fileOrDirectory, entryKind, callback, recursive, fallbackPollingInterval, fallbackOptions) {
|
|
8258
8250
|
return createSingleWatcherPerName(
|
|
8259
8251
|
recursive ? fsWatchesRecursive : fsWatches,
|
|
8260
|
-
|
|
8252
|
+
useCaseSensitiveFileNames2,
|
|
8261
8253
|
fileOrDirectory,
|
|
8262
8254
|
callback,
|
|
8263
8255
|
(cb) => fsWatchHandlingExistenceOnHost(fileOrDirectory, entryKind, cb, recursive, fallbackPollingInterval, fallbackOptions)
|
|
@@ -8385,7 +8377,7 @@ var sys = (() => {
|
|
|
8385
8377
|
const Buffer2 = require("buffer").Buffer;
|
|
8386
8378
|
const isLinuxOrMacOs = process.platform === "linux" || process.platform === "darwin";
|
|
8387
8379
|
const platform = _os.platform();
|
|
8388
|
-
const
|
|
8380
|
+
const useCaseSensitiveFileNames2 = isFileSystemCaseSensitive();
|
|
8389
8381
|
const fsRealpath = !!_fs.realpathSync.native ? process.platform === "win32" ? fsRealPathHandlingLongPath : _fs.realpathSync.native : _fs.realpathSync;
|
|
8390
8382
|
const executingFilePath = __filename.endsWith("sys.js") ? _path.join(_path.dirname(__dirname), "__fake__.js") : __filename;
|
|
8391
8383
|
const fsSupportsRecursiveFsWatch = process.platform === "win32" || process.platform === "darwin";
|
|
@@ -8396,7 +8388,7 @@ var sys = (() => {
|
|
|
8396
8388
|
setTimeout,
|
|
8397
8389
|
clearTimeout,
|
|
8398
8390
|
fsWatchWorker,
|
|
8399
|
-
useCaseSensitiveFileNames,
|
|
8391
|
+
useCaseSensitiveFileNames: useCaseSensitiveFileNames2,
|
|
8400
8392
|
getCurrentDirectory,
|
|
8401
8393
|
fileSystemEntryExists,
|
|
8402
8394
|
// Node 4.0 `fs.watch` function supports the "recursive" option on both OSX and Windows
|
|
@@ -8413,7 +8405,7 @@ var sys = (() => {
|
|
|
8413
8405
|
const nodeSystem = {
|
|
8414
8406
|
args: process.argv.slice(2),
|
|
8415
8407
|
newLine: _os.EOL,
|
|
8416
|
-
useCaseSensitiveFileNames,
|
|
8408
|
+
useCaseSensitiveFileNames: useCaseSensitiveFileNames2,
|
|
8417
8409
|
write(s) {
|
|
8418
8410
|
process.stdout.write(s);
|
|
8419
8411
|
},
|
|
@@ -8542,12 +8534,12 @@ var sys = (() => {
|
|
|
8542
8534
|
for (const node of profile.nodes) {
|
|
8543
8535
|
if (node.callFrame.url) {
|
|
8544
8536
|
const url = normalizeSlashes(node.callFrame.url);
|
|
8545
|
-
if (containsPath(fileUrlRoot, url,
|
|
8537
|
+
if (containsPath(fileUrlRoot, url, useCaseSensitiveFileNames2)) {
|
|
8546
8538
|
node.callFrame.url = getRelativePathToDirectoryOrUrl(
|
|
8547
8539
|
fileUrlRoot,
|
|
8548
8540
|
url,
|
|
8549
8541
|
fileUrlRoot,
|
|
8550
|
-
createGetCanonicalFileName(
|
|
8542
|
+
createGetCanonicalFileName(useCaseSensitiveFileNames2),
|
|
8551
8543
|
/*isAbsolutePathAnUrl*/
|
|
8552
8544
|
true
|
|
8553
8545
|
);
|
|
@@ -8727,7 +8719,7 @@ var sys = (() => {
|
|
|
8727
8719
|
}
|
|
8728
8720
|
}
|
|
8729
8721
|
function readDirectory(path, extensions, excludes, includes, depth) {
|
|
8730
|
-
return matchFiles(path, extensions, excludes, includes,
|
|
8722
|
+
return matchFiles(path, extensions, excludes, includes, useCaseSensitiveFileNames2, process.cwd(), depth, getAccessibleFileSystemEntries, realpath);
|
|
8731
8723
|
}
|
|
8732
8724
|
function fileSystemEntryExists(path, entryKind) {
|
|
8733
8725
|
const originalStackTraceLimit = Error.stackTraceLimit;
|
|
@@ -9246,7 +9238,7 @@ var Diagnostics = {
|
|
|
9246
9238
|
Identifier_expected: diag(1003, 1 /* Error */, "Identifier_expected_1003", "Identifier expected."),
|
|
9247
9239
|
_0_expected: diag(1005, 1 /* Error */, "_0_expected_1005", "'{0}' expected."),
|
|
9248
9240
|
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."),
|
|
9249
|
-
|
|
9241
|
+
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."),
|
|
9250
9242
|
Trailing_comma_not_allowed: diag(1009, 1 /* Error */, "Trailing_comma_not_allowed_1009", "Trailing comma not allowed."),
|
|
9251
9243
|
Asterisk_Slash_expected: diag(1010, 1 /* Error */, "Asterisk_Slash_expected_1010", "'*/' expected."),
|
|
9252
9244
|
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."),
|
|
@@ -9508,7 +9500,7 @@ var Diagnostics = {
|
|
|
9508
9500
|
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."),
|
|
9509
9501
|
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."),
|
|
9510
9502
|
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."),
|
|
9511
|
-
|
|
9503
|
+
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."),
|
|
9512
9504
|
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}')'?"),
|
|
9513
9505
|
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."),
|
|
9514
9506
|
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'."),
|
|
@@ -9516,7 +9508,7 @@ var Diagnostics = {
|
|
|
9516
9508
|
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."),
|
|
9517
9509
|
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."),
|
|
9518
9510
|
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."),
|
|
9519
|
-
|
|
9511
|
+
Non_simple_parameter_declared_here: diag(1348, 1 /* Error */, "Non_simple_parameter_declared_here_1348", "Non-simple parameter declared here."),
|
|
9520
9512
|
use_strict_directive_used_here: diag(1349, 1 /* Error */, "use_strict_directive_used_here_1349", "'use strict' directive used here."),
|
|
9521
9513
|
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."),
|
|
9522
9514
|
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."),
|
|
@@ -9540,8 +9532,8 @@ var Diagnostics = {
|
|
|
9540
9532
|
Did_you_mean_0: diag(1369, 3 /* Message */, "Did_you_mean_0_1369", "Did you mean '{0}'?"),
|
|
9541
9533
|
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'."),
|
|
9542
9534
|
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."),
|
|
9543
|
-
|
|
9544
|
-
|
|
9535
|
+
_0_was_imported_here: diag(1376, 3 /* Message */, "_0_was_imported_here_1376", "'{0}' was imported here."),
|
|
9536
|
+
_0_was_exported_here: diag(1377, 3 /* Message */, "_0_was_exported_here_1377", "'{0}' was exported here."),
|
|
9545
9537
|
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."),
|
|
9546
9538
|
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'."),
|
|
9547
9539
|
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'."),
|
|
@@ -9560,34 +9552,34 @@ var Diagnostics = {
|
|
|
9560
9552
|
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"),
|
|
9561
9553
|
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"),
|
|
9562
9554
|
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"),
|
|
9563
|
-
|
|
9555
|
+
File_is_included_via_import_here: diag(1399, 3 /* Message */, "File_is_included_via_import_here_1399", "File is included via import here."),
|
|
9564
9556
|
Referenced_via_0_from_file_1: diag(1400, 3 /* Message */, "Referenced_via_0_from_file_1_1400", "Referenced via '{0}' from file '{1}'"),
|
|
9565
|
-
|
|
9557
|
+
File_is_included_via_reference_here: diag(1401, 3 /* Message */, "File_is_included_via_reference_here_1401", "File is included via reference here."),
|
|
9566
9558
|
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}'"),
|
|
9567
9559
|
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}'"),
|
|
9568
|
-
|
|
9560
|
+
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."),
|
|
9569
9561
|
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}'"),
|
|
9570
|
-
|
|
9562
|
+
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."),
|
|
9571
9563
|
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}'"),
|
|
9572
|
-
|
|
9564
|
+
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."),
|
|
9573
9565
|
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"),
|
|
9574
|
-
|
|
9566
|
+
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."),
|
|
9575
9567
|
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"),
|
|
9576
9568
|
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'"),
|
|
9577
|
-
|
|
9569
|
+
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."),
|
|
9578
9570
|
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"),
|
|
9579
9571
|
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'"),
|
|
9580
|
-
|
|
9572
|
+
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."),
|
|
9581
9573
|
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"),
|
|
9582
9574
|
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}'"),
|
|
9583
|
-
|
|
9575
|
+
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."),
|
|
9584
9576
|
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}'"),
|
|
9585
9577
|
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}'"),
|
|
9586
9578
|
Library_0_specified_in_compilerOptions: diag(1422, 3 /* Message */, "Library_0_specified_in_compilerOptions_1422", "Library '{0}' specified in compilerOptions"),
|
|
9587
|
-
|
|
9579
|
+
File_is_library_specified_here: diag(1423, 3 /* Message */, "File_is_library_specified_here_1423", "File is library specified here."),
|
|
9588
9580
|
Default_library: diag(1424, 3 /* Message */, "Default_library_1424", "Default library"),
|
|
9589
9581
|
Default_library_for_target_0: diag(1425, 3 /* Message */, "Default_library_for_target_0_1425", "Default library for target '{0}'"),
|
|
9590
|
-
|
|
9582
|
+
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."),
|
|
9591
9583
|
Root_file_specified_for_compilation: diag(1427, 3 /* Message */, "Root_file_specified_for_compilation_1427", "Root file specified for compilation"),
|
|
9592
9584
|
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}'"),
|
|
9593
9585
|
File_redirects_to_file_0: diag(1429, 3 /* Message */, "File_redirects_to_file_0_1429", "File redirects to file '{0}'"),
|
|
@@ -10040,7 +10032,7 @@ var Diagnostics = {
|
|
|
10040
10032
|
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'?"),
|
|
10041
10033
|
_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}'?"),
|
|
10042
10034
|
_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."),
|
|
10043
|
-
|
|
10035
|
+
_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."),
|
|
10044
10036
|
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}'."),
|
|
10045
10037
|
Left_side_of_comma_operator_is_unused_and_has_no_side_effects: diag(
|
|
10046
10038
|
2695,
|
|
@@ -10056,7 +10048,7 @@ var Diagnostics = {
|
|
|
10056
10048
|
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}'."),
|
|
10057
10049
|
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."),
|
|
10058
10050
|
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."),
|
|
10059
|
-
|
|
10051
|
+
_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."),
|
|
10060
10052
|
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."),
|
|
10061
10053
|
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."),
|
|
10062
10054
|
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."),
|
|
@@ -10082,12 +10074,12 @@ var Diagnostics = {
|
|
|
10082
10074
|
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}."),
|
|
10083
10075
|
Cannot_find_lib_definition_for_0: diag(2726, 1 /* Error */, "Cannot_find_lib_definition_for_0_2726", "Cannot find lib definition for '{0}'."),
|
|
10084
10076
|
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}'?"),
|
|
10085
|
-
|
|
10077
|
+
_0_is_declared_here: diag(2728, 3 /* Message */, "_0_is_declared_here_2728", "'{0}' is declared here."),
|
|
10086
10078
|
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."),
|
|
10087
10079
|
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."),
|
|
10088
10080
|
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(...)'."),
|
|
10089
10081
|
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."),
|
|
10090
|
-
|
|
10082
|
+
Property_0_was_also_declared_here: diag(2733, 1 /* Error */, "Property_0_was_also_declared_here_2733", "Property '{0}' was also declared here."),
|
|
10091
10083
|
Are_you_missing_a_semicolon: diag(2734, 1 /* Error */, "Are_you_missing_a_semicolon_2734", "Are you missing a semicolon?"),
|
|
10092
10084
|
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}'?"),
|
|
10093
10085
|
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}'."),
|
|
@@ -10104,10 +10096,10 @@ var Diagnostics = {
|
|
|
10104
10096
|
_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}'."),
|
|
10105
10097
|
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."),
|
|
10106
10098
|
_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}'?"),
|
|
10107
|
-
|
|
10099
|
+
The_implementation_signature_is_declared_here: diag(2750, 1 /* Error */, "The_implementation_signature_is_declared_here_2750", "The implementation signature is declared here."),
|
|
10108
10100
|
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."),
|
|
10109
|
-
|
|
10110
|
-
|
|
10101
|
+
The_first_export_default_is_here: diag(2752, 1 /* Error */, "The_first_export_default_is_here_2752", "The first export default is here."),
|
|
10102
|
+
Another_export_default_is_here: diag(2753, 1 /* Error */, "Another_export_default_is_here_2753", "Another export default is here."),
|
|
10111
10103
|
super_may_not_use_type_arguments: diag(2754, 1 /* Error */, "super_may_not_use_type_arguments_2754", "'super' may not use type arguments."),
|
|
10112
10104
|
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."),
|
|
10113
10105
|
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."),
|
|
@@ -10125,7 +10117,7 @@ var Diagnostics = {
|
|
|
10125
10117
|
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."),
|
|
10126
10118
|
No_overload_matches_this_call: diag(2769, 1 /* Error */, "No_overload_matches_this_call_2769", "No overload matches this call."),
|
|
10127
10119
|
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."),
|
|
10128
|
-
|
|
10120
|
+
The_last_overload_is_declared_here: diag(2771, 1 /* Error */, "The_last_overload_is_declared_here_2771", "The last overload is declared here."),
|
|
10129
10121
|
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."),
|
|
10130
10122
|
Did_you_forget_to_use_await: diag(2773, 1 /* Error */, "Did_you_forget_to_use_await_2773", "Did you forget to use 'await'?"),
|
|
10131
10123
|
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?"),
|
|
@@ -10152,7 +10144,7 @@ var Diagnostics = {
|
|
|
10152
10144
|
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."),
|
|
10153
10145
|
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."),
|
|
10154
10146
|
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'."),
|
|
10155
|
-
|
|
10147
|
+
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."),
|
|
10156
10148
|
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."),
|
|
10157
10149
|
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."),
|
|
10158
10150
|
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."),
|
|
@@ -10589,8 +10581,8 @@ var Diagnostics = {
|
|
|
10589
10581
|
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}"),
|
|
10590
10582
|
Conflicts_are_in_this_file: diag(6201, 3 /* Message */, "Conflicts_are_in_this_file_6201", "Conflicts are in this file."),
|
|
10591
10583
|
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}"),
|
|
10592
|
-
|
|
10593
|
-
|
|
10584
|
+
_0_was_also_declared_here: diag(6203, 3 /* Message */, "_0_was_also_declared_here_6203", "'{0}' was also declared here."),
|
|
10585
|
+
and_here: diag(6204, 3 /* Message */, "and_here_6204", "and here."),
|
|
10594
10586
|
All_type_parameters_are_unused: diag(6205, 1 /* Error */, "All_type_parameters_are_unused_6205", "All type parameters are unused."),
|
|
10595
10587
|
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."),
|
|
10596
10588
|
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}'."),
|
|
@@ -11010,7 +11002,7 @@ var Diagnostics = {
|
|
|
11010
11002
|
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."),
|
|
11011
11003
|
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}'."),
|
|
11012
11004
|
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."),
|
|
11013
|
-
|
|
11005
|
+
The_tag_was_first_specified_here: diag(8034, 1 /* Error */, "The_tag_was_first_specified_here_8034", "The tag was first specified here."),
|
|
11014
11006
|
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."),
|
|
11015
11007
|
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."),
|
|
11016
11008
|
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."),
|
|
@@ -12123,7 +12115,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
|
|
|
12123
12115
|
if (withMinus)
|
|
12124
12116
|
start3--;
|
|
12125
12117
|
error2(Diagnostics.Octal_literals_are_not_allowed_Use_the_syntax_0, start3, pos - start3, literal);
|
|
12126
|
-
return
|
|
12118
|
+
return 9 /* NumericLiteral */;
|
|
12127
12119
|
}
|
|
12128
12120
|
} else {
|
|
12129
12121
|
mainFragment = scanNumberFragment();
|
|
@@ -12163,20 +12155,18 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
|
|
|
12163
12155
|
}
|
|
12164
12156
|
if (tokenFlags & 8192 /* ContainsLeadingZero */) {
|
|
12165
12157
|
error2(Diagnostics.Decimals_with_leading_zeros_are_not_allowed, start3, end2 - start3);
|
|
12166
|
-
|
|
12158
|
+
tokenValue = "" + +result;
|
|
12159
|
+
return 9 /* NumericLiteral */;
|
|
12167
12160
|
}
|
|
12168
12161
|
if (decimalFragment !== void 0 || tokenFlags & 16 /* Scientific */) {
|
|
12169
12162
|
checkForIdentifierStartAfterNumericLiteral(start3, decimalFragment === void 0 && !!(tokenFlags & 16 /* Scientific */));
|
|
12170
|
-
|
|
12171
|
-
|
|
12172
|
-
value: "" + +result
|
|
12173
|
-
// if value is not an integer, it can be safely coerced to a number
|
|
12174
|
-
};
|
|
12163
|
+
tokenValue = "" + +result;
|
|
12164
|
+
return 9 /* NumericLiteral */;
|
|
12175
12165
|
} else {
|
|
12176
12166
|
tokenValue = result;
|
|
12177
12167
|
const type = checkBigIntSuffix();
|
|
12178
12168
|
checkForIdentifierStartAfterNumericLiteral(start3);
|
|
12179
|
-
return
|
|
12169
|
+
return type;
|
|
12180
12170
|
}
|
|
12181
12171
|
}
|
|
12182
12172
|
function checkForIdentifierStartAfterNumericLiteral(numericStart, isScientific) {
|
|
@@ -12785,7 +12775,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
|
|
|
12785
12775
|
return token = 41 /* MinusToken */;
|
|
12786
12776
|
case 46 /* dot */:
|
|
12787
12777
|
if (isDigit(text.charCodeAt(pos + 1))) {
|
|
12788
|
-
|
|
12778
|
+
scanNumber();
|
|
12789
12779
|
return token = 9 /* NumericLiteral */;
|
|
12790
12780
|
}
|
|
12791
12781
|
if (text.charCodeAt(pos + 1) === 46 /* dot */ && text.charCodeAt(pos + 2) === 46 /* dot */) {
|
|
@@ -12903,8 +12893,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
|
|
|
12903
12893
|
case 55 /* _7 */:
|
|
12904
12894
|
case 56 /* _8 */:
|
|
12905
12895
|
case 57 /* _9 */:
|
|
12906
|
-
|
|
12907
|
-
return token;
|
|
12896
|
+
return token = scanNumber();
|
|
12908
12897
|
case 58 /* colon */:
|
|
12909
12898
|
pos++;
|
|
12910
12899
|
return token = 59 /* ColonToken */;
|
|
@@ -18719,7 +18708,7 @@ function isNightly() {
|
|
|
18719
18708
|
}
|
|
18720
18709
|
function createTextWriter(newLine) {
|
|
18721
18710
|
var output;
|
|
18722
|
-
var
|
|
18711
|
+
var indent3;
|
|
18723
18712
|
var lineStart;
|
|
18724
18713
|
var lineCount;
|
|
18725
18714
|
var linePos;
|
|
@@ -18737,7 +18726,7 @@ function createTextWriter(newLine) {
|
|
|
18737
18726
|
function writeText(s) {
|
|
18738
18727
|
if (s && s.length) {
|
|
18739
18728
|
if (lineStart) {
|
|
18740
|
-
s = getIndentString(
|
|
18729
|
+
s = getIndentString(indent3) + s;
|
|
18741
18730
|
lineStart = false;
|
|
18742
18731
|
}
|
|
18743
18732
|
output += s;
|
|
@@ -18756,7 +18745,7 @@ function createTextWriter(newLine) {
|
|
|
18756
18745
|
}
|
|
18757
18746
|
function reset2() {
|
|
18758
18747
|
output = "";
|
|
18759
|
-
|
|
18748
|
+
indent3 = 0;
|
|
18760
18749
|
lineStart = true;
|
|
18761
18750
|
lineCount = 0;
|
|
18762
18751
|
linePos = 0;
|
|
@@ -18793,15 +18782,15 @@ function createTextWriter(newLine) {
|
|
|
18793
18782
|
writeLiteral,
|
|
18794
18783
|
writeLine,
|
|
18795
18784
|
increaseIndent: () => {
|
|
18796
|
-
|
|
18785
|
+
indent3++;
|
|
18797
18786
|
},
|
|
18798
18787
|
decreaseIndent: () => {
|
|
18799
|
-
|
|
18788
|
+
indent3--;
|
|
18800
18789
|
},
|
|
18801
|
-
getIndent: () =>
|
|
18790
|
+
getIndent: () => indent3,
|
|
18802
18791
|
getTextPos: () => output.length,
|
|
18803
18792
|
getLine: () => lineCount,
|
|
18804
|
-
getColumn: () => lineStart ?
|
|
18793
|
+
getColumn: () => lineStart ? indent3 * getIndentSize() : output.length - linePos,
|
|
18805
18794
|
getText: () => output,
|
|
18806
18795
|
isAtStartOfLine: () => lineStart,
|
|
18807
18796
|
hasTrailingComment: () => hasTrailingComment,
|
|
@@ -20766,7 +20755,7 @@ function getSubPatternFromSpec(spec, basePath, usage, { singleAsteriskRegexFragm
|
|
|
20766
20755
|
function replaceWildcardCharacter(match, singleAsteriskRegexFragment) {
|
|
20767
20756
|
return match === "*" ? singleAsteriskRegexFragment : match === "?" ? "[^/]" : "\\" + match;
|
|
20768
20757
|
}
|
|
20769
|
-
function getFileMatcherPatterns(path, excludes, includes,
|
|
20758
|
+
function getFileMatcherPatterns(path, excludes, includes, useCaseSensitiveFileNames2, currentDirectory) {
|
|
20770
20759
|
path = normalizePath(path);
|
|
20771
20760
|
currentDirectory = normalizePath(currentDirectory);
|
|
20772
20761
|
const absolutePath = combinePaths(currentDirectory, path);
|
|
@@ -20775,22 +20764,22 @@ function getFileMatcherPatterns(path, excludes, includes, useCaseSensitiveFileNa
|
|
|
20775
20764
|
includeFilePattern: getRegularExpressionForWildcard(includes, absolutePath, "files"),
|
|
20776
20765
|
includeDirectoryPattern: getRegularExpressionForWildcard(includes, absolutePath, "directories"),
|
|
20777
20766
|
excludePattern: getRegularExpressionForWildcard(excludes, absolutePath, "exclude"),
|
|
20778
|
-
basePaths: getBasePaths(path, includes,
|
|
20767
|
+
basePaths: getBasePaths(path, includes, useCaseSensitiveFileNames2)
|
|
20779
20768
|
};
|
|
20780
20769
|
}
|
|
20781
|
-
function getRegexFromPattern(pattern,
|
|
20782
|
-
return new RegExp(pattern,
|
|
20770
|
+
function getRegexFromPattern(pattern, useCaseSensitiveFileNames2) {
|
|
20771
|
+
return new RegExp(pattern, useCaseSensitiveFileNames2 ? "" : "i");
|
|
20783
20772
|
}
|
|
20784
|
-
function matchFiles(path, extensions, excludes, includes,
|
|
20773
|
+
function matchFiles(path, extensions, excludes, includes, useCaseSensitiveFileNames2, currentDirectory, depth, getFileSystemEntries, realpath) {
|
|
20785
20774
|
path = normalizePath(path);
|
|
20786
20775
|
currentDirectory = normalizePath(currentDirectory);
|
|
20787
|
-
const patterns = getFileMatcherPatterns(path, excludes, includes,
|
|
20788
|
-
const includeFileRegexes = patterns.includeFilePatterns && patterns.includeFilePatterns.map((pattern) => getRegexFromPattern(pattern,
|
|
20789
|
-
const includeDirectoryRegex = patterns.includeDirectoryPattern && getRegexFromPattern(patterns.includeDirectoryPattern,
|
|
20790
|
-
const excludeRegex = patterns.excludePattern && getRegexFromPattern(patterns.excludePattern,
|
|
20776
|
+
const patterns = getFileMatcherPatterns(path, excludes, includes, useCaseSensitiveFileNames2, currentDirectory);
|
|
20777
|
+
const includeFileRegexes = patterns.includeFilePatterns && patterns.includeFilePatterns.map((pattern) => getRegexFromPattern(pattern, useCaseSensitiveFileNames2));
|
|
20778
|
+
const includeDirectoryRegex = patterns.includeDirectoryPattern && getRegexFromPattern(patterns.includeDirectoryPattern, useCaseSensitiveFileNames2);
|
|
20779
|
+
const excludeRegex = patterns.excludePattern && getRegexFromPattern(patterns.excludePattern, useCaseSensitiveFileNames2);
|
|
20791
20780
|
const results = includeFileRegexes ? includeFileRegexes.map(() => []) : [[]];
|
|
20792
20781
|
const visited = /* @__PURE__ */ new Map();
|
|
20793
|
-
const toCanonical = createGetCanonicalFileName(
|
|
20782
|
+
const toCanonical = createGetCanonicalFileName(useCaseSensitiveFileNames2);
|
|
20794
20783
|
for (const basePath of patterns.basePaths) {
|
|
20795
20784
|
visitDirectory(basePath, combinePaths(currentDirectory, basePath), depth);
|
|
20796
20785
|
}
|
|
@@ -20832,7 +20821,7 @@ function matchFiles(path, extensions, excludes, includes, useCaseSensitiveFileNa
|
|
|
20832
20821
|
}
|
|
20833
20822
|
}
|
|
20834
20823
|
}
|
|
20835
|
-
function getBasePaths(path, includes,
|
|
20824
|
+
function getBasePaths(path, includes, useCaseSensitiveFileNames2) {
|
|
20836
20825
|
const basePaths = [path];
|
|
20837
20826
|
if (includes) {
|
|
20838
20827
|
const includeBasePaths = [];
|
|
@@ -20840,9 +20829,9 @@ function getBasePaths(path, includes, useCaseSensitiveFileNames) {
|
|
|
20840
20829
|
const absolute = isRootedDiskPath(include) ? include : normalizePath(combinePaths(path, include));
|
|
20841
20830
|
includeBasePaths.push(getIncludeBasePath(absolute));
|
|
20842
20831
|
}
|
|
20843
|
-
includeBasePaths.sort(getStringComparer(!
|
|
20832
|
+
includeBasePaths.sort(getStringComparer(!useCaseSensitiveFileNames2));
|
|
20844
20833
|
for (const includeBasePath of includeBasePaths) {
|
|
20845
|
-
if (every(basePaths, (basePath) => !containsPath(basePath, includeBasePath, path, !
|
|
20834
|
+
if (every(basePaths, (basePath) => !containsPath(basePath, includeBasePath, path, !useCaseSensitiveFileNames2))) {
|
|
20846
20835
|
basePaths.push(includeBasePath);
|
|
20847
20836
|
}
|
|
20848
20837
|
}
|
|
@@ -31487,7 +31476,7 @@ var Parser;
|
|
|
31487
31476
|
if (lastError) {
|
|
31488
31477
|
addRelatedInfo(
|
|
31489
31478
|
lastError,
|
|
31490
|
-
createDetachedDiagnostic(fileName, openPosition, 1, Diagnostics.
|
|
31479
|
+
createDetachedDiagnostic(fileName, openPosition, 1, Diagnostics.The_parser_expected_to_find_a_1_to_match_the_0_token_here, tokenToString(openKind), tokenToString(closeKind))
|
|
31491
31480
|
);
|
|
31492
31481
|
}
|
|
31493
31482
|
}
|
|
@@ -33075,7 +33064,7 @@ var Parser;
|
|
|
33075
33064
|
if (lastError && lastError.code === Diagnostics._0_expected.code) {
|
|
33076
33065
|
addRelatedInfo(
|
|
33077
33066
|
lastError,
|
|
33078
|
-
createDetachedDiagnostic(fileName, openBracePosition, 1, Diagnostics.
|
|
33067
|
+
createDetachedDiagnostic(fileName, openBracePosition, 1, Diagnostics.The_parser_expected_to_find_a_1_to_match_the_0_token_here, "{", "}")
|
|
33079
33068
|
);
|
|
33080
33069
|
}
|
|
33081
33070
|
}
|
|
@@ -36179,7 +36168,7 @@ var Parser;
|
|
|
36179
36168
|
if (lastError && lastError.code === Diagnostics._0_expected.code) {
|
|
36180
36169
|
addRelatedInfo(
|
|
36181
36170
|
lastError,
|
|
36182
|
-
createDetachedDiagnostic(fileName, openBracePosition, 1, Diagnostics.
|
|
36171
|
+
createDetachedDiagnostic(fileName, openBracePosition, 1, Diagnostics.The_parser_expected_to_find_a_1_to_match_the_0_token_here, "{", "}")
|
|
36183
36172
|
);
|
|
36184
36173
|
}
|
|
36185
36174
|
}
|
|
@@ -36547,20 +36536,20 @@ var Parser;
|
|
|
36547
36536
|
function doJSDocScan() {
|
|
36548
36537
|
let state = 1 /* SawAsterisk */;
|
|
36549
36538
|
let margin;
|
|
36550
|
-
let
|
|
36539
|
+
let indent3 = start2 - (content.lastIndexOf("\n", start2) + 1) + 4;
|
|
36551
36540
|
function pushComment(text) {
|
|
36552
36541
|
if (!margin) {
|
|
36553
|
-
margin =
|
|
36542
|
+
margin = indent3;
|
|
36554
36543
|
}
|
|
36555
36544
|
comments.push(text);
|
|
36556
|
-
|
|
36545
|
+
indent3 += text.length;
|
|
36557
36546
|
}
|
|
36558
36547
|
nextTokenJSDoc();
|
|
36559
36548
|
while (parseOptionalJsdoc(5 /* WhitespaceTrivia */))
|
|
36560
36549
|
;
|
|
36561
36550
|
if (parseOptionalJsdoc(4 /* NewLineTrivia */)) {
|
|
36562
36551
|
state = 0 /* BeginningOfLine */;
|
|
36563
|
-
|
|
36552
|
+
indent3 = 0;
|
|
36564
36553
|
}
|
|
36565
36554
|
loop:
|
|
36566
36555
|
while (true) {
|
|
@@ -36569,14 +36558,14 @@ var Parser;
|
|
|
36569
36558
|
removeTrailingWhitespace(comments);
|
|
36570
36559
|
if (!commentsPos)
|
|
36571
36560
|
commentsPos = getNodePos();
|
|
36572
|
-
addTag(parseTag(
|
|
36561
|
+
addTag(parseTag(indent3));
|
|
36573
36562
|
state = 0 /* BeginningOfLine */;
|
|
36574
36563
|
margin = void 0;
|
|
36575
36564
|
break;
|
|
36576
36565
|
case 4 /* NewLineTrivia */:
|
|
36577
36566
|
comments.push(scanner2.getTokenText());
|
|
36578
36567
|
state = 0 /* BeginningOfLine */;
|
|
36579
|
-
|
|
36568
|
+
indent3 = 0;
|
|
36580
36569
|
break;
|
|
36581
36570
|
case 42 /* AsteriskToken */:
|
|
36582
36571
|
const asterisk = scanner2.getTokenText();
|
|
@@ -36586,16 +36575,16 @@ var Parser;
|
|
|
36586
36575
|
} else {
|
|
36587
36576
|
Debug.assert(state === 0 /* BeginningOfLine */);
|
|
36588
36577
|
state = 1 /* SawAsterisk */;
|
|
36589
|
-
|
|
36578
|
+
indent3 += asterisk.length;
|
|
36590
36579
|
}
|
|
36591
36580
|
break;
|
|
36592
36581
|
case 5 /* WhitespaceTrivia */:
|
|
36593
36582
|
Debug.assert(state !== 2 /* SavingComments */, "whitespace shouldn't come from the scanner while saving top-level comment text");
|
|
36594
36583
|
const whitespace = scanner2.getTokenText();
|
|
36595
|
-
if (margin !== void 0 &&
|
|
36596
|
-
comments.push(whitespace.slice(margin -
|
|
36584
|
+
if (margin !== void 0 && indent3 + whitespace.length > margin) {
|
|
36585
|
+
comments.push(whitespace.slice(margin - indent3));
|
|
36597
36586
|
}
|
|
36598
|
-
|
|
36587
|
+
indent3 += whitespace.length;
|
|
36599
36588
|
break;
|
|
36600
36589
|
case 1 /* EndOfFileToken */:
|
|
36601
36590
|
break loop;
|
|
@@ -36797,7 +36786,7 @@ var Parser;
|
|
|
36797
36786
|
}
|
|
36798
36787
|
return parseTagComments(margin, indentText.slice(margin));
|
|
36799
36788
|
}
|
|
36800
|
-
function parseTagComments(
|
|
36789
|
+
function parseTagComments(indent3, initialMargin) {
|
|
36801
36790
|
const commentsPos2 = getNodePos();
|
|
36802
36791
|
let comments2 = [];
|
|
36803
36792
|
const parts2 = [];
|
|
@@ -36806,10 +36795,10 @@ var Parser;
|
|
|
36806
36795
|
let margin;
|
|
36807
36796
|
function pushComment(text) {
|
|
36808
36797
|
if (!margin) {
|
|
36809
|
-
margin =
|
|
36798
|
+
margin = indent3;
|
|
36810
36799
|
}
|
|
36811
36800
|
comments2.push(text);
|
|
36812
|
-
|
|
36801
|
+
indent3 += text.length;
|
|
36813
36802
|
}
|
|
36814
36803
|
if (initialMargin !== void 0) {
|
|
36815
36804
|
if (initialMargin !== "") {
|
|
@@ -36824,7 +36813,7 @@ var Parser;
|
|
|
36824
36813
|
case 4 /* NewLineTrivia */:
|
|
36825
36814
|
state = 0 /* BeginningOfLine */;
|
|
36826
36815
|
comments2.push(scanner2.getTokenText());
|
|
36827
|
-
|
|
36816
|
+
indent3 = 0;
|
|
36828
36817
|
break;
|
|
36829
36818
|
case 60 /* AtToken */:
|
|
36830
36819
|
scanner2.resetTokenState(scanner2.getTokenEnd() - 1);
|
|
@@ -36834,11 +36823,11 @@ var Parser;
|
|
|
36834
36823
|
case 5 /* WhitespaceTrivia */:
|
|
36835
36824
|
Debug.assert(state !== 2 /* SavingComments */ && state !== 3 /* SavingBackticks */, "whitespace shouldn't come from the scanner while saving comment text");
|
|
36836
36825
|
const whitespace = scanner2.getTokenText();
|
|
36837
|
-
if (margin !== void 0 &&
|
|
36838
|
-
comments2.push(whitespace.slice(margin -
|
|
36826
|
+
if (margin !== void 0 && indent3 + whitespace.length > margin) {
|
|
36827
|
+
comments2.push(whitespace.slice(margin - indent3));
|
|
36839
36828
|
state = 2 /* SavingComments */;
|
|
36840
36829
|
}
|
|
36841
|
-
|
|
36830
|
+
indent3 += whitespace.length;
|
|
36842
36831
|
break;
|
|
36843
36832
|
case 19 /* OpenBraceToken */:
|
|
36844
36833
|
state = 2 /* SavingComments */;
|
|
@@ -36871,7 +36860,7 @@ var Parser;
|
|
|
36871
36860
|
case 42 /* AsteriskToken */:
|
|
36872
36861
|
if (state === 0 /* BeginningOfLine */) {
|
|
36873
36862
|
state = 1 /* SawAsterisk */;
|
|
36874
|
-
|
|
36863
|
+
indent3 += 1;
|
|
36875
36864
|
break;
|
|
36876
36865
|
}
|
|
36877
36866
|
default:
|
|
@@ -36936,8 +36925,8 @@ var Parser;
|
|
|
36936
36925
|
function isJSDocLinkTag(kind) {
|
|
36937
36926
|
return kind === "link" || kind === "linkcode" || kind === "linkplain";
|
|
36938
36927
|
}
|
|
36939
|
-
function parseUnknownTag(start3, tagName,
|
|
36940
|
-
return finishNode(factory2.createJSDocUnknownTag(tagName, parseTrailingTagComments(start3, getNodePos(),
|
|
36928
|
+
function parseUnknownTag(start3, tagName, indent3, indentText) {
|
|
36929
|
+
return finishNode(factory2.createJSDocUnknownTag(tagName, parseTrailingTagComments(start3, getNodePos(), indent3, indentText)), start3);
|
|
36941
36930
|
}
|
|
36942
36931
|
function addTag(tag) {
|
|
36943
36932
|
if (!tag) {
|
|
@@ -36984,7 +36973,7 @@ var Parser;
|
|
|
36984
36973
|
return isTypeReferenceNode(node) && isIdentifier(node.typeName) && node.typeName.escapedText === "Object" && !node.typeArguments;
|
|
36985
36974
|
}
|
|
36986
36975
|
}
|
|
36987
|
-
function parseParameterOrPropertyTag(start3, tagName, target,
|
|
36976
|
+
function parseParameterOrPropertyTag(start3, tagName, target, indent3) {
|
|
36988
36977
|
let typeExpression = tryParseTypeExpression();
|
|
36989
36978
|
let isNameFirst = !typeExpression;
|
|
36990
36979
|
skipWhitespaceOrAsterisk();
|
|
@@ -36993,8 +36982,8 @@ var Parser;
|
|
|
36993
36982
|
if (isNameFirst && !lookAhead(parseJSDocLinkPrefix)) {
|
|
36994
36983
|
typeExpression = tryParseTypeExpression();
|
|
36995
36984
|
}
|
|
36996
|
-
const comment = parseTrailingTagComments(start3, getNodePos(),
|
|
36997
|
-
const nestedTypeLiteral = parseNestedTypeLiteral(typeExpression, name, target,
|
|
36985
|
+
const comment = parseTrailingTagComments(start3, getNodePos(), indent3, indentText);
|
|
36986
|
+
const nestedTypeLiteral = parseNestedTypeLiteral(typeExpression, name, target, indent3);
|
|
36998
36987
|
if (nestedTypeLiteral) {
|
|
36999
36988
|
typeExpression = nestedTypeLiteral;
|
|
37000
36989
|
isNameFirst = true;
|
|
@@ -37002,12 +36991,12 @@ var Parser;
|
|
|
37002
36991
|
const result2 = target === 1 /* Property */ ? factory2.createJSDocPropertyTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment) : factory2.createJSDocParameterTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment);
|
|
37003
36992
|
return finishNode(result2, start3);
|
|
37004
36993
|
}
|
|
37005
|
-
function parseNestedTypeLiteral(typeExpression, name, target,
|
|
36994
|
+
function parseNestedTypeLiteral(typeExpression, name, target, indent3) {
|
|
37006
36995
|
if (typeExpression && isObjectOrObjectArrayTypeReference(typeExpression.type)) {
|
|
37007
36996
|
const pos = getNodePos();
|
|
37008
36997
|
let child;
|
|
37009
36998
|
let children;
|
|
37010
|
-
while (child = tryParse(() => parseChildParameterOrPropertyTag(target,
|
|
36999
|
+
while (child = tryParse(() => parseChildParameterOrPropertyTag(target, indent3, name))) {
|
|
37011
37000
|
if (child.kind === 348 /* JSDocParameterTag */ || child.kind === 355 /* JSDocPropertyTag */) {
|
|
37012
37001
|
children = append(children, child);
|
|
37013
37002
|
} else if (child.kind === 352 /* JSDocTemplateTag */) {
|
|
@@ -37020,14 +37009,14 @@ var Parser;
|
|
|
37020
37009
|
}
|
|
37021
37010
|
}
|
|
37022
37011
|
}
|
|
37023
|
-
function parseReturnTag(start3, tagName,
|
|
37012
|
+
function parseReturnTag(start3, tagName, indent3, indentText) {
|
|
37024
37013
|
if (some(tags, isJSDocReturnTag)) {
|
|
37025
37014
|
parseErrorAt(tagName.pos, scanner2.getTokenStart(), Diagnostics._0_tag_already_specified, unescapeLeadingUnderscores(tagName.escapedText));
|
|
37026
37015
|
}
|
|
37027
37016
|
const typeExpression = tryParseTypeExpression();
|
|
37028
|
-
return finishNode(factory2.createJSDocReturnTag(tagName, typeExpression, parseTrailingTagComments(start3, getNodePos(),
|
|
37017
|
+
return finishNode(factory2.createJSDocReturnTag(tagName, typeExpression, parseTrailingTagComments(start3, getNodePos(), indent3, indentText)), start3);
|
|
37029
37018
|
}
|
|
37030
|
-
function parseTypeTag(start3, tagName,
|
|
37019
|
+
function parseTypeTag(start3, tagName, indent3, indentText) {
|
|
37031
37020
|
if (some(tags, isJSDocTypeTag)) {
|
|
37032
37021
|
parseErrorAt(tagName.pos, scanner2.getTokenStart(), Diagnostics._0_tag_already_specified, unescapeLeadingUnderscores(tagName.escapedText));
|
|
37033
37022
|
}
|
|
@@ -37035,25 +37024,25 @@ var Parser;
|
|
|
37035
37024
|
/*mayOmitBraces*/
|
|
37036
37025
|
true
|
|
37037
37026
|
);
|
|
37038
|
-
const comments2 =
|
|
37027
|
+
const comments2 = indent3 !== void 0 && indentText !== void 0 ? parseTrailingTagComments(start3, getNodePos(), indent3, indentText) : void 0;
|
|
37039
37028
|
return finishNode(factory2.createJSDocTypeTag(tagName, typeExpression, comments2), start3);
|
|
37040
37029
|
}
|
|
37041
|
-
function parseSeeTag(start3, tagName,
|
|
37030
|
+
function parseSeeTag(start3, tagName, indent3, indentText) {
|
|
37042
37031
|
const isMarkdownOrJSDocLink = token() === 23 /* OpenBracketToken */ || lookAhead(() => nextTokenJSDoc() === 60 /* AtToken */ && tokenIsIdentifierOrKeyword(nextTokenJSDoc()) && isJSDocLinkTag(scanner2.getTokenValue()));
|
|
37043
37032
|
const nameExpression = isMarkdownOrJSDocLink ? void 0 : parseJSDocNameReference();
|
|
37044
|
-
const comments2 =
|
|
37033
|
+
const comments2 = indent3 !== void 0 && indentText !== void 0 ? parseTrailingTagComments(start3, getNodePos(), indent3, indentText) : void 0;
|
|
37045
37034
|
return finishNode(factory2.createJSDocSeeTag(tagName, nameExpression, comments2), start3);
|
|
37046
37035
|
}
|
|
37047
|
-
function parseThrowsTag(start3, tagName,
|
|
37036
|
+
function parseThrowsTag(start3, tagName, indent3, indentText) {
|
|
37048
37037
|
const typeExpression = tryParseTypeExpression();
|
|
37049
|
-
const comment = parseTrailingTagComments(start3, getNodePos(),
|
|
37038
|
+
const comment = parseTrailingTagComments(start3, getNodePos(), indent3, indentText);
|
|
37050
37039
|
return finishNode(factory2.createJSDocThrowsTag(tagName, typeExpression, comment), start3);
|
|
37051
37040
|
}
|
|
37052
|
-
function parseAuthorTag(start3, tagName,
|
|
37041
|
+
function parseAuthorTag(start3, tagName, indent3, indentText) {
|
|
37053
37042
|
const commentStart = getNodePos();
|
|
37054
37043
|
const textOnly = parseAuthorNameAndEmail();
|
|
37055
37044
|
let commentEnd = scanner2.getTokenFullStart();
|
|
37056
|
-
const comments2 = parseTrailingTagComments(start3, commentEnd,
|
|
37045
|
+
const comments2 = parseTrailingTagComments(start3, commentEnd, indent3, indentText);
|
|
37057
37046
|
if (!comments2) {
|
|
37058
37047
|
commentEnd = scanner2.getTokenFullStart();
|
|
37059
37048
|
}
|
|
@@ -37137,19 +37126,19 @@ var Parser;
|
|
|
37137
37126
|
skipWhitespace();
|
|
37138
37127
|
return finishNode(factory2.createJSDocEnumTag(tagName, typeExpression, parseTrailingTagComments(start3, getNodePos(), margin, indentText)), start3);
|
|
37139
37128
|
}
|
|
37140
|
-
function parseTypedefTag(start3, tagName,
|
|
37129
|
+
function parseTypedefTag(start3, tagName, indent3, indentText) {
|
|
37141
37130
|
let typeExpression = tryParseTypeExpression();
|
|
37142
37131
|
skipWhitespaceOrAsterisk();
|
|
37143
37132
|
const fullName = parseJSDocTypeNameWithNamespace();
|
|
37144
37133
|
skipWhitespace();
|
|
37145
|
-
let comment = parseTagComments(
|
|
37134
|
+
let comment = parseTagComments(indent3);
|
|
37146
37135
|
let end2;
|
|
37147
37136
|
if (!typeExpression || isObjectOrObjectArrayTypeReference(typeExpression.type)) {
|
|
37148
37137
|
let child;
|
|
37149
37138
|
let childTypeTag;
|
|
37150
37139
|
let jsDocPropertyTags;
|
|
37151
37140
|
let hasChildren = false;
|
|
37152
|
-
while (child = tryParse(() => parseChildPropertyTag(
|
|
37141
|
+
while (child = tryParse(() => parseChildPropertyTag(indent3))) {
|
|
37153
37142
|
if (child.kind === 352 /* JSDocTemplateTag */) {
|
|
37154
37143
|
break;
|
|
37155
37144
|
}
|
|
@@ -37158,7 +37147,7 @@ var Parser;
|
|
|
37158
37147
|
if (childTypeTag) {
|
|
37159
37148
|
const lastError = parseErrorAtCurrentToken(Diagnostics.A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags);
|
|
37160
37149
|
if (lastError) {
|
|
37161
|
-
addRelatedInfo(lastError, createDetachedDiagnostic(fileName, 0, 0, Diagnostics.
|
|
37150
|
+
addRelatedInfo(lastError, createDetachedDiagnostic(fileName, 0, 0, Diagnostics.The_tag_was_first_specified_here));
|
|
37162
37151
|
}
|
|
37163
37152
|
break;
|
|
37164
37153
|
} else {
|
|
@@ -37177,7 +37166,7 @@ var Parser;
|
|
|
37177
37166
|
}
|
|
37178
37167
|
end2 = end2 || comment !== void 0 ? getNodePos() : (fullName ?? typeExpression ?? tagName).end;
|
|
37179
37168
|
if (!comment) {
|
|
37180
|
-
comment = parseTrailingTagComments(start3, end2,
|
|
37169
|
+
comment = parseTrailingTagComments(start3, end2, indent3, indentText);
|
|
37181
37170
|
}
|
|
37182
37171
|
const typedefTag = factory2.createJSDocTypedefTag(tagName, typeExpression, fullName, comment);
|
|
37183
37172
|
return finishNode(typedefTag, start3, end2);
|
|
@@ -37207,11 +37196,11 @@ var Parser;
|
|
|
37207
37196
|
}
|
|
37208
37197
|
return typeNameOrNamespaceName;
|
|
37209
37198
|
}
|
|
37210
|
-
function parseCallbackTagParameters(
|
|
37199
|
+
function parseCallbackTagParameters(indent3) {
|
|
37211
37200
|
const pos = getNodePos();
|
|
37212
37201
|
let child;
|
|
37213
37202
|
let parameters;
|
|
37214
|
-
while (child = tryParse(() => parseChildParameterOrPropertyTag(4 /* CallbackParameter */,
|
|
37203
|
+
while (child = tryParse(() => parseChildParameterOrPropertyTag(4 /* CallbackParameter */, indent3))) {
|
|
37215
37204
|
if (child.kind === 352 /* JSDocTemplateTag */) {
|
|
37216
37205
|
parseErrorAtRange(child.tagName, Diagnostics.A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag);
|
|
37217
37206
|
break;
|
|
@@ -37220,11 +37209,11 @@ var Parser;
|
|
|
37220
37209
|
}
|
|
37221
37210
|
return createNodeArray(parameters || [], pos);
|
|
37222
37211
|
}
|
|
37223
|
-
function parseJSDocSignature(start3,
|
|
37224
|
-
const parameters = parseCallbackTagParameters(
|
|
37212
|
+
function parseJSDocSignature(start3, indent3) {
|
|
37213
|
+
const parameters = parseCallbackTagParameters(indent3);
|
|
37225
37214
|
const returnTag = tryParse(() => {
|
|
37226
37215
|
if (parseOptionalJsdoc(60 /* AtToken */)) {
|
|
37227
|
-
const tag = parseTag(
|
|
37216
|
+
const tag = parseTag(indent3);
|
|
37228
37217
|
if (tag && tag.kind === 349 /* JSDocReturnTag */) {
|
|
37229
37218
|
return tag;
|
|
37230
37219
|
}
|
|
@@ -37237,23 +37226,23 @@ var Parser;
|
|
|
37237
37226
|
returnTag
|
|
37238
37227
|
), start3);
|
|
37239
37228
|
}
|
|
37240
|
-
function parseCallbackTag(start3, tagName,
|
|
37229
|
+
function parseCallbackTag(start3, tagName, indent3, indentText) {
|
|
37241
37230
|
const fullName = parseJSDocTypeNameWithNamespace();
|
|
37242
37231
|
skipWhitespace();
|
|
37243
|
-
let comment = parseTagComments(
|
|
37244
|
-
const typeExpression = parseJSDocSignature(start3,
|
|
37232
|
+
let comment = parseTagComments(indent3);
|
|
37233
|
+
const typeExpression = parseJSDocSignature(start3, indent3);
|
|
37245
37234
|
if (!comment) {
|
|
37246
|
-
comment = parseTrailingTagComments(start3, getNodePos(),
|
|
37235
|
+
comment = parseTrailingTagComments(start3, getNodePos(), indent3, indentText);
|
|
37247
37236
|
}
|
|
37248
37237
|
const end2 = comment !== void 0 ? getNodePos() : typeExpression.end;
|
|
37249
37238
|
return finishNode(factory2.createJSDocCallbackTag(tagName, typeExpression, fullName, comment), start3, end2);
|
|
37250
37239
|
}
|
|
37251
|
-
function parseOverloadTag(start3, tagName,
|
|
37240
|
+
function parseOverloadTag(start3, tagName, indent3, indentText) {
|
|
37252
37241
|
skipWhitespace();
|
|
37253
|
-
let comment = parseTagComments(
|
|
37254
|
-
const typeExpression = parseJSDocSignature(start3,
|
|
37242
|
+
let comment = parseTagComments(indent3);
|
|
37243
|
+
const typeExpression = parseJSDocSignature(start3, indent3);
|
|
37255
37244
|
if (!comment) {
|
|
37256
|
-
comment = parseTrailingTagComments(start3, getNodePos(),
|
|
37245
|
+
comment = parseTrailingTagComments(start3, getNodePos(), indent3, indentText);
|
|
37257
37246
|
}
|
|
37258
37247
|
const end2 = comment !== void 0 ? getNodePos() : typeExpression.end;
|
|
37259
37248
|
return finishNode(factory2.createJSDocOverloadTag(tagName, typeExpression, comment), start3, end2);
|
|
@@ -37269,17 +37258,17 @@ var Parser;
|
|
|
37269
37258
|
}
|
|
37270
37259
|
return a.escapedText === b.escapedText;
|
|
37271
37260
|
}
|
|
37272
|
-
function parseChildPropertyTag(
|
|
37273
|
-
return parseChildParameterOrPropertyTag(1 /* Property */,
|
|
37261
|
+
function parseChildPropertyTag(indent3) {
|
|
37262
|
+
return parseChildParameterOrPropertyTag(1 /* Property */, indent3);
|
|
37274
37263
|
}
|
|
37275
|
-
function parseChildParameterOrPropertyTag(target,
|
|
37264
|
+
function parseChildParameterOrPropertyTag(target, indent3, name) {
|
|
37276
37265
|
let canParseTag = true;
|
|
37277
37266
|
let seenAsterisk = false;
|
|
37278
37267
|
while (true) {
|
|
37279
37268
|
switch (nextTokenJSDoc()) {
|
|
37280
37269
|
case 60 /* AtToken */:
|
|
37281
37270
|
if (canParseTag) {
|
|
37282
|
-
const child = tryParseChildTag(target,
|
|
37271
|
+
const child = tryParseChildTag(target, indent3);
|
|
37283
37272
|
if (child && (child.kind === 348 /* JSDocParameterTag */ || child.kind === 355 /* JSDocPropertyTag */) && name && (isIdentifier(child.name) || !escapedTextsEqual(name, child.name.left))) {
|
|
37284
37273
|
return false;
|
|
37285
37274
|
}
|
|
@@ -37305,7 +37294,7 @@ var Parser;
|
|
|
37305
37294
|
}
|
|
37306
37295
|
}
|
|
37307
37296
|
}
|
|
37308
|
-
function tryParseChildTag(target,
|
|
37297
|
+
function tryParseChildTag(target, indent3) {
|
|
37309
37298
|
Debug.assert(token() === 60 /* AtToken */);
|
|
37310
37299
|
const start3 = scanner2.getTokenFullStart();
|
|
37311
37300
|
nextTokenJSDoc();
|
|
@@ -37325,14 +37314,14 @@ var Parser;
|
|
|
37325
37314
|
t = 2 /* Parameter */ | 4 /* CallbackParameter */;
|
|
37326
37315
|
break;
|
|
37327
37316
|
case "template":
|
|
37328
|
-
return parseTemplateTag(start3, tagName,
|
|
37317
|
+
return parseTemplateTag(start3, tagName, indent3, indentText);
|
|
37329
37318
|
default:
|
|
37330
37319
|
return false;
|
|
37331
37320
|
}
|
|
37332
37321
|
if (!(target & t)) {
|
|
37333
37322
|
return false;
|
|
37334
37323
|
}
|
|
37335
|
-
return parseParameterOrPropertyTag(start3, tagName, target,
|
|
37324
|
+
return parseParameterOrPropertyTag(start3, tagName, target, indent3);
|
|
37336
37325
|
}
|
|
37337
37326
|
function parseTemplateTagTypeParameter() {
|
|
37338
37327
|
const typeParameterPos = getNodePos();
|
|
@@ -37373,10 +37362,10 @@ var Parser;
|
|
|
37373
37362
|
} while (parseOptionalJsdoc(28 /* CommaToken */));
|
|
37374
37363
|
return createNodeArray(typeParameters, pos);
|
|
37375
37364
|
}
|
|
37376
|
-
function parseTemplateTag(start3, tagName,
|
|
37365
|
+
function parseTemplateTag(start3, tagName, indent3, indentText) {
|
|
37377
37366
|
const constraint = token() === 19 /* OpenBraceToken */ ? parseJSDocTypeExpression() : void 0;
|
|
37378
37367
|
const typeParameters = parseTemplateTagTypeParameters();
|
|
37379
|
-
return finishNode(factory2.createJSDocTemplateTag(tagName, constraint, typeParameters, parseTrailingTagComments(start3, getNodePos(),
|
|
37368
|
+
return finishNode(factory2.createJSDocTemplateTag(tagName, constraint, typeParameters, parseTrailingTagComments(start3, getNodePos(), indent3, indentText)), start3);
|
|
37380
37369
|
}
|
|
37381
37370
|
function parseOptionalJsdoc(t) {
|
|
37382
37371
|
if (token() === t) {
|
|
@@ -38513,6 +38502,7 @@ var commandOptionsWithoutBuild = [
|
|
|
38513
38502
|
{
|
|
38514
38503
|
name: "checkJs",
|
|
38515
38504
|
type: "boolean",
|
|
38505
|
+
affectsModuleResolution: true,
|
|
38516
38506
|
showInSimplifiedHelpView: true,
|
|
38517
38507
|
category: Diagnostics.JavaScript_Support,
|
|
38518
38508
|
description: Diagnostics.Enable_error_reporting_in_type_checked_JavaScript_files,
|
|
@@ -40958,19 +40948,19 @@ function getFileNamesFromConfigSpecs(configFileSpecs, basePath, options, host, e
|
|
|
40958
40948
|
const wildcardFiles = arrayFrom(wildcardFileMap.values());
|
|
40959
40949
|
return literalFiles.concat(wildcardFiles, arrayFrom(wildCardJsonFileMap.values()));
|
|
40960
40950
|
}
|
|
40961
|
-
function isExcludedFile(pathToCheck, spec, basePath,
|
|
40951
|
+
function isExcludedFile(pathToCheck, spec, basePath, useCaseSensitiveFileNames2, currentDirectory) {
|
|
40962
40952
|
const { validatedFilesSpec, validatedIncludeSpecs, validatedExcludeSpecs } = spec;
|
|
40963
40953
|
if (!length(validatedIncludeSpecs) || !length(validatedExcludeSpecs))
|
|
40964
40954
|
return false;
|
|
40965
40955
|
basePath = normalizePath(basePath);
|
|
40966
|
-
const keyMapper = createGetCanonicalFileName(
|
|
40956
|
+
const keyMapper = createGetCanonicalFileName(useCaseSensitiveFileNames2);
|
|
40967
40957
|
if (validatedFilesSpec) {
|
|
40968
40958
|
for (const fileName of validatedFilesSpec) {
|
|
40969
40959
|
if (keyMapper(getNormalizedAbsolutePath(fileName, basePath)) === pathToCheck)
|
|
40970
40960
|
return false;
|
|
40971
40961
|
}
|
|
40972
40962
|
}
|
|
40973
|
-
return matchesExcludeWorker(pathToCheck, validatedExcludeSpecs,
|
|
40963
|
+
return matchesExcludeWorker(pathToCheck, validatedExcludeSpecs, useCaseSensitiveFileNames2, currentDirectory, basePath);
|
|
40974
40964
|
}
|
|
40975
40965
|
function invalidDotDotAfterRecursiveWildcard(s) {
|
|
40976
40966
|
const wildcardIndex = startsWith(s, "**/") ? 0 : s.indexOf("/**/");
|
|
@@ -40980,17 +40970,17 @@ function invalidDotDotAfterRecursiveWildcard(s) {
|
|
|
40980
40970
|
const lastDotIndex = endsWith(s, "/..") ? s.length : s.lastIndexOf("/../");
|
|
40981
40971
|
return lastDotIndex > wildcardIndex;
|
|
40982
40972
|
}
|
|
40983
|
-
function matchesExclude(pathToCheck, excludeSpecs,
|
|
40973
|
+
function matchesExclude(pathToCheck, excludeSpecs, useCaseSensitiveFileNames2, currentDirectory) {
|
|
40984
40974
|
return matchesExcludeWorker(
|
|
40985
40975
|
pathToCheck,
|
|
40986
40976
|
filter(excludeSpecs, (spec) => !invalidDotDotAfterRecursiveWildcard(spec)),
|
|
40987
|
-
|
|
40977
|
+
useCaseSensitiveFileNames2,
|
|
40988
40978
|
currentDirectory
|
|
40989
40979
|
);
|
|
40990
40980
|
}
|
|
40991
|
-
function matchesExcludeWorker(pathToCheck, excludeSpecs,
|
|
40981
|
+
function matchesExcludeWorker(pathToCheck, excludeSpecs, useCaseSensitiveFileNames2, currentDirectory, basePath) {
|
|
40992
40982
|
const excludePattern = getRegularExpressionForWildcard(excludeSpecs, combinePaths(normalizePath(currentDirectory), basePath), "exclude");
|
|
40993
|
-
const excludeRegex = excludePattern && getRegexFromPattern(excludePattern,
|
|
40983
|
+
const excludeRegex = excludePattern && getRegexFromPattern(excludePattern, useCaseSensitiveFileNames2);
|
|
40994
40984
|
if (!excludeRegex)
|
|
40995
40985
|
return false;
|
|
40996
40986
|
if (excludeRegex.test(pathToCheck))
|
|
@@ -41020,9 +41010,9 @@ function specToDiagnostic(spec, disallowTrailingRecursion) {
|
|
|
41020
41010
|
return [Diagnostics.File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0, spec];
|
|
41021
41011
|
}
|
|
41022
41012
|
}
|
|
41023
|
-
function getWildcardDirectories({ validatedIncludeSpecs: include, validatedExcludeSpecs: exclude }, path,
|
|
41013
|
+
function getWildcardDirectories({ validatedIncludeSpecs: include, validatedExcludeSpecs: exclude }, path, useCaseSensitiveFileNames2) {
|
|
41024
41014
|
const rawExcludeRegex = getRegularExpressionForWildcard(exclude, path, "exclude");
|
|
41025
|
-
const excludeRegex = rawExcludeRegex && new RegExp(rawExcludeRegex,
|
|
41015
|
+
const excludeRegex = rawExcludeRegex && new RegExp(rawExcludeRegex, useCaseSensitiveFileNames2 ? "" : "i");
|
|
41026
41016
|
const wildcardDirectories = {};
|
|
41027
41017
|
if (include !== void 0) {
|
|
41028
41018
|
const recursiveKeys = [];
|
|
@@ -41031,7 +41021,7 @@ function getWildcardDirectories({ validatedIncludeSpecs: include, validatedExclu
|
|
|
41031
41021
|
if (excludeRegex && excludeRegex.test(spec)) {
|
|
41032
41022
|
continue;
|
|
41033
41023
|
}
|
|
41034
|
-
const match = getWildcardDirectoryFromSpec(spec,
|
|
41024
|
+
const match = getWildcardDirectoryFromSpec(spec, useCaseSensitiveFileNames2);
|
|
41035
41025
|
if (match) {
|
|
41036
41026
|
const { key, flags } = match;
|
|
41037
41027
|
const existingFlags = wildcardDirectories[key];
|
|
@@ -41046,7 +41036,7 @@ function getWildcardDirectories({ validatedIncludeSpecs: include, validatedExclu
|
|
|
41046
41036
|
for (const key in wildcardDirectories) {
|
|
41047
41037
|
if (hasProperty(wildcardDirectories, key)) {
|
|
41048
41038
|
for (const recursiveKey of recursiveKeys) {
|
|
41049
|
-
if (key !== recursiveKey && containsPath(recursiveKey, key, path, !
|
|
41039
|
+
if (key !== recursiveKey && containsPath(recursiveKey, key, path, !useCaseSensitiveFileNames2)) {
|
|
41050
41040
|
delete wildcardDirectories[key];
|
|
41051
41041
|
}
|
|
41052
41042
|
}
|
|
@@ -41055,20 +41045,20 @@ function getWildcardDirectories({ validatedIncludeSpecs: include, validatedExclu
|
|
|
41055
41045
|
}
|
|
41056
41046
|
return wildcardDirectories;
|
|
41057
41047
|
}
|
|
41058
|
-
function getWildcardDirectoryFromSpec(spec,
|
|
41048
|
+
function getWildcardDirectoryFromSpec(spec, useCaseSensitiveFileNames2) {
|
|
41059
41049
|
const match = wildcardDirectoryPattern.exec(spec);
|
|
41060
41050
|
if (match) {
|
|
41061
41051
|
const questionWildcardIndex = spec.indexOf("?");
|
|
41062
41052
|
const starWildcardIndex = spec.indexOf("*");
|
|
41063
41053
|
const lastDirectorySeperatorIndex = spec.lastIndexOf(directorySeparator);
|
|
41064
41054
|
return {
|
|
41065
|
-
key:
|
|
41055
|
+
key: useCaseSensitiveFileNames2 ? match[0] : toFileNameLowerCase(match[0]),
|
|
41066
41056
|
flags: questionWildcardIndex !== -1 && questionWildcardIndex < lastDirectorySeperatorIndex || starWildcardIndex !== -1 && starWildcardIndex < lastDirectorySeperatorIndex ? 1 /* Recursive */ : 0 /* None */
|
|
41067
41057
|
};
|
|
41068
41058
|
}
|
|
41069
41059
|
if (isImplicitGlob(spec.substring(spec.lastIndexOf(directorySeparator) + 1))) {
|
|
41070
41060
|
return {
|
|
41071
|
-
key: removeTrailingDirectorySeparator(
|
|
41061
|
+
key: removeTrailingDirectorySeparator(useCaseSensitiveFileNames2 ? spec : toFileNameLowerCase(spec)),
|
|
41072
41062
|
flags: 1 /* Recursive */
|
|
41073
41063
|
};
|
|
41074
41064
|
}
|
|
@@ -41214,6 +41204,18 @@ function formatExtensions(extensions) {
|
|
|
41214
41204
|
result.push("JSON");
|
|
41215
41205
|
return result.join(", ");
|
|
41216
41206
|
}
|
|
41207
|
+
function extensionsToExtensionsArray(extensions) {
|
|
41208
|
+
const result = [];
|
|
41209
|
+
if (extensions & 1 /* TypeScript */)
|
|
41210
|
+
result.push(...supportedTSImplementationExtensions);
|
|
41211
|
+
if (extensions & 2 /* JavaScript */)
|
|
41212
|
+
result.push(...supportedJSExtensionsFlat);
|
|
41213
|
+
if (extensions & 4 /* Declaration */)
|
|
41214
|
+
result.push(...supportedDeclarationExtensions);
|
|
41215
|
+
if (extensions & 8 /* Json */)
|
|
41216
|
+
result.push(".json" /* Json */);
|
|
41217
|
+
return result;
|
|
41218
|
+
}
|
|
41217
41219
|
function resolvedTypeScriptOnly(resolved) {
|
|
41218
41220
|
if (!resolved) {
|
|
41219
41221
|
return void 0;
|
|
@@ -41388,8 +41390,8 @@ function getDefaultTypeRoots(currentDirectory) {
|
|
|
41388
41390
|
}
|
|
41389
41391
|
var nodeModulesAtTypes = combinePaths("node_modules", "@types");
|
|
41390
41392
|
function arePathsEqual(path1, path2, host) {
|
|
41391
|
-
const
|
|
41392
|
-
return comparePaths(path1, path2, !
|
|
41393
|
+
const useCaseSensitiveFileNames2 = typeof host.useCaseSensitiveFileNames === "function" ? host.useCaseSensitiveFileNames() : host.useCaseSensitiveFileNames;
|
|
41394
|
+
return comparePaths(path1, path2, !useCaseSensitiveFileNames2) === 0 /* EqualTo */;
|
|
41393
41395
|
}
|
|
41394
41396
|
function getOriginalAndResolvedFileName(fileName, host, traceEnabled) {
|
|
41395
41397
|
const resolvedFileName = realPath(fileName, host, traceEnabled);
|
|
@@ -42666,7 +42668,7 @@ function getEntrypointsFromPackageJsonInfo(packageJsonInfo, options, host, cache
|
|
|
42666
42668
|
arrayIsEqualTo
|
|
42667
42669
|
);
|
|
42668
42670
|
for (const conditions of conditionSets) {
|
|
42669
|
-
const loadPackageJsonExportsState = { ...loadPackageJsonMainState, failedLookupLocations: [], conditions };
|
|
42671
|
+
const loadPackageJsonExportsState = { ...loadPackageJsonMainState, failedLookupLocations: [], conditions, host };
|
|
42670
42672
|
const exportResolutions = loadEntrypointsFromExportMap(
|
|
42671
42673
|
packageJsonInfo,
|
|
42672
42674
|
packageJsonInfo.contents.packageJsonContent.exports,
|
|
@@ -42698,23 +42700,42 @@ function loadEntrypointsFromExportMap(scope, exports, state, extensions) {
|
|
|
42698
42700
|
return entrypoints;
|
|
42699
42701
|
function loadEntrypointsFromTargetExports(target) {
|
|
42700
42702
|
var _a, _b;
|
|
42701
|
-
if (typeof target === "string" && startsWith(target, "./")
|
|
42702
|
-
|
|
42703
|
-
|
|
42704
|
-
|
|
42705
|
-
|
|
42706
|
-
|
|
42707
|
-
|
|
42708
|
-
|
|
42709
|
-
|
|
42710
|
-
|
|
42711
|
-
|
|
42712
|
-
|
|
42713
|
-
|
|
42714
|
-
|
|
42715
|
-
|
|
42716
|
-
|
|
42717
|
-
|
|
42703
|
+
if (typeof target === "string" && startsWith(target, "./")) {
|
|
42704
|
+
if (target.indexOf("*") >= 0 && state.host.readDirectory) {
|
|
42705
|
+
if (target.indexOf("*") !== target.lastIndexOf("*")) {
|
|
42706
|
+
return false;
|
|
42707
|
+
}
|
|
42708
|
+
state.host.readDirectory(
|
|
42709
|
+
scope.packageDirectory,
|
|
42710
|
+
extensionsToExtensionsArray(extensions),
|
|
42711
|
+
/*excludes*/
|
|
42712
|
+
void 0,
|
|
42713
|
+
[changeAnyExtension(target.replace("*", "**/*"), getDeclarationEmitExtensionForPath(target))]
|
|
42714
|
+
).forEach((entry) => {
|
|
42715
|
+
entrypoints = appendIfUnique(entrypoints, {
|
|
42716
|
+
path: entry,
|
|
42717
|
+
ext: getAnyExtensionFromPath(entry),
|
|
42718
|
+
resolvedUsingTsExtension: void 0
|
|
42719
|
+
});
|
|
42720
|
+
});
|
|
42721
|
+
} else {
|
|
42722
|
+
const partsAfterFirst = getPathComponents(target).slice(2);
|
|
42723
|
+
if (partsAfterFirst.indexOf("..") >= 0 || partsAfterFirst.indexOf(".") >= 0 || partsAfterFirst.indexOf("node_modules") >= 0) {
|
|
42724
|
+
return false;
|
|
42725
|
+
}
|
|
42726
|
+
const resolvedTarget = combinePaths(scope.packageDirectory, target);
|
|
42727
|
+
const finalPath = getNormalizedAbsolutePath(resolvedTarget, (_b = (_a = state.host).getCurrentDirectory) == null ? void 0 : _b.call(_a));
|
|
42728
|
+
const result = loadFileNameFromPackageJsonField(
|
|
42729
|
+
extensions,
|
|
42730
|
+
finalPath,
|
|
42731
|
+
/*onlyRecordFailures*/
|
|
42732
|
+
false,
|
|
42733
|
+
state
|
|
42734
|
+
);
|
|
42735
|
+
if (result) {
|
|
42736
|
+
entrypoints = appendIfUnique(entrypoints, result, (a, b) => a.path === b.path);
|
|
42737
|
+
return true;
|
|
42738
|
+
}
|
|
42718
42739
|
}
|
|
42719
42740
|
} else if (Array.isArray(target)) {
|
|
42720
42741
|
for (const t of target) {
|
|
@@ -42923,6 +42944,9 @@ function loadModuleFromSelfNameReference(extensions, moduleName, directory, stat
|
|
|
42923
42944
|
}
|
|
42924
42945
|
const trailingParts = parts.slice(nameParts.length);
|
|
42925
42946
|
const subpath = !length(trailingParts) ? "." : `.${directorySeparator}${trailingParts.join(directorySeparator)}`;
|
|
42947
|
+
if (getAllowJSCompilerOption(state.compilerOptions) && !pathContainsNodeModules(directory)) {
|
|
42948
|
+
return loadModuleFromExports(scope, extensions, subpath, state, cache, redirectedReference);
|
|
42949
|
+
}
|
|
42926
42950
|
const priorityExtensions = extensions & (1 /* TypeScript */ | 4 /* Declaration */);
|
|
42927
42951
|
const secondaryExtensions = extensions & ~(1 /* TypeScript */ | 4 /* Declaration */);
|
|
42928
42952
|
return loadModuleFromExports(scope, priorityExtensions, subpath, state, cache, redirectedReference) || loadModuleFromExports(scope, secondaryExtensions, subpath, state, cache, redirectedReference);
|
|
@@ -43270,13 +43294,10 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec
|
|
|
43270
43294
|
function combineDirectoryPath(root, dir) {
|
|
43271
43295
|
return ensureTrailingDirectorySeparator(combinePaths(root, dir));
|
|
43272
43296
|
}
|
|
43273
|
-
function useCaseSensitiveFileNames() {
|
|
43274
|
-
return !state.host.useCaseSensitiveFileNames ? true : typeof state.host.useCaseSensitiveFileNames === "boolean" ? state.host.useCaseSensitiveFileNames : state.host.useCaseSensitiveFileNames();
|
|
43275
|
-
}
|
|
43276
43297
|
function tryLoadInputFileForPath(finalPath, entry, packagePath, isImports2) {
|
|
43277
43298
|
var _a, _b, _c, _d;
|
|
43278
|
-
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)) {
|
|
43279
|
-
const getCanonicalFileName = hostGetCanonicalFileName({ useCaseSensitiveFileNames });
|
|
43299
|
+
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)) {
|
|
43300
|
+
const getCanonicalFileName = hostGetCanonicalFileName({ useCaseSensitiveFileNames: () => useCaseSensitiveFileNames(state) });
|
|
43280
43301
|
const commonSourceDirGuesses = [];
|
|
43281
43302
|
if (state.compilerOptions.rootDir || state.compilerOptions.composite && state.compilerOptions.configFilePath) {
|
|
43282
43303
|
const commonDir = toAbsolutePath(getCommonSourceDirectory(state.compilerOptions, () => [], ((_b = (_a = state.host).getCurrentDirectory) == null ? void 0 : _b.call(_a)) || "", getCanonicalFileName));
|
|
@@ -43305,7 +43326,7 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec
|
|
|
43305
43326
|
for (const commonSourceDirGuess of commonSourceDirGuesses) {
|
|
43306
43327
|
const candidateDirectories = getOutputDirectoriesForBaseDirectory(commonSourceDirGuess);
|
|
43307
43328
|
for (const candidateDir of candidateDirectories) {
|
|
43308
|
-
if (containsPath(candidateDir, finalPath, !useCaseSensitiveFileNames())) {
|
|
43329
|
+
if (containsPath(candidateDir, finalPath, !useCaseSensitiveFileNames(state))) {
|
|
43309
43330
|
const pathFragment = finalPath.slice(candidateDir.length + 1);
|
|
43310
43331
|
const possibleInputBase = combinePaths(commonSourceDirGuess, pathFragment);
|
|
43311
43332
|
const jsAndDtsExtensions = [".mjs" /* Mjs */, ".cjs" /* Cjs */, ".js" /* Js */, ".json" /* Json */, ".d.mts" /* Dmts */, ".d.cts" /* Dcts */, ".d.ts" /* Dts */];
|
|
@@ -43315,7 +43336,7 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec
|
|
|
43315
43336
|
for (const possibleExt of inputExts) {
|
|
43316
43337
|
if (!extensionIsOk(extensions, possibleExt))
|
|
43317
43338
|
continue;
|
|
43318
|
-
const possibleInputWithInputExtension = changeAnyExtension(possibleInputBase, possibleExt, ext, !useCaseSensitiveFileNames());
|
|
43339
|
+
const possibleInputWithInputExtension = changeAnyExtension(possibleInputBase, possibleExt, ext, !useCaseSensitiveFileNames(state));
|
|
43319
43340
|
if (state.host.fileExists(possibleInputWithInputExtension)) {
|
|
43320
43341
|
return toSearchResult(withPackageId(scope, loadFileNameFromPackageJsonField(
|
|
43321
43342
|
extensions,
|
|
@@ -43732,6 +43753,9 @@ function traceIfEnabled(state, diagnostic, ...args) {
|
|
|
43732
43753
|
trace(state.host, diagnostic, ...args);
|
|
43733
43754
|
}
|
|
43734
43755
|
}
|
|
43756
|
+
function useCaseSensitiveFileNames(state) {
|
|
43757
|
+
return !state.host.useCaseSensitiveFileNames ? true : typeof state.host.useCaseSensitiveFileNames === "boolean" ? state.host.useCaseSensitiveFileNames : state.host.useCaseSensitiveFileNames();
|
|
43758
|
+
}
|
|
43735
43759
|
|
|
43736
43760
|
// src/compiler/binder.ts
|
|
43737
43761
|
var ModuleInstanceState = /* @__PURE__ */ ((ModuleInstanceState2) => {
|
|
@@ -44112,10 +44136,10 @@ function createBinder() {
|
|
|
44112
44136
|
const decl = getNameOfDeclaration(declaration) || declaration;
|
|
44113
44137
|
const diag3 = messageNeedsName ? createDiagnosticForNode2(decl, message, getDisplayName(declaration)) : createDiagnosticForNode2(decl, message);
|
|
44114
44138
|
file.bindDiagnostics.push(
|
|
44115
|
-
multipleDefaultExports ? addRelatedInfo(diag3, createDiagnosticForNode2(declarationName, index === 0 ? Diagnostics.
|
|
44139
|
+
multipleDefaultExports ? addRelatedInfo(diag3, createDiagnosticForNode2(declarationName, index === 0 ? Diagnostics.Another_export_default_is_here : Diagnostics.and_here)) : diag3
|
|
44116
44140
|
);
|
|
44117
44141
|
if (multipleDefaultExports) {
|
|
44118
|
-
relatedInformation.push(createDiagnosticForNode2(decl, Diagnostics.
|
|
44142
|
+
relatedInformation.push(createDiagnosticForNode2(decl, Diagnostics.The_first_export_default_is_here));
|
|
44119
44143
|
}
|
|
44120
44144
|
});
|
|
44121
44145
|
const diag2 = messageNeedsName ? createDiagnosticForNode2(declarationName, message, getDisplayName(node)) : createDiagnosticForNode2(declarationName, message);
|
|
@@ -47215,7 +47239,9 @@ function tryGetModuleNameFromPaths(relativeToBaseUrl, paths, allowedEndings, hos
|
|
|
47215
47239
|
for (const { ending, value } of candidates) {
|
|
47216
47240
|
if (value.length >= prefix.length + suffix.length && startsWith(value, prefix) && endsWith(value, suffix) && validateEnding({ ending, value })) {
|
|
47217
47241
|
const matchedStar = value.substring(prefix.length, value.length - suffix.length);
|
|
47218
|
-
|
|
47242
|
+
if (!pathIsRelative(matchedStar)) {
|
|
47243
|
+
return key.replace("*", matchedStar);
|
|
47244
|
+
}
|
|
47219
47245
|
}
|
|
47220
47246
|
}
|
|
47221
47247
|
} else if (some(candidates, (c) => c.ending !== 0 /* Minimal */ && pattern === c.value) || some(candidates, (c) => c.ending === 0 /* Minimal */ && pattern === c.value && validateEnding(c))) {
|
|
@@ -47287,7 +47313,7 @@ function tryGetModuleNameFromExports(options, targetFilePath, packageDirectory,
|
|
|
47287
47313
|
for (const key of getOwnKeys(exports)) {
|
|
47288
47314
|
if (key === "default" || conditions.indexOf(key) >= 0 || isApplicableVersionedTypesKey(conditions, key)) {
|
|
47289
47315
|
const subTarget = exports[key];
|
|
47290
|
-
const result = tryGetModuleNameFromExports(options, targetFilePath, packageDirectory, packageName, subTarget, conditions);
|
|
47316
|
+
const result = tryGetModuleNameFromExports(options, targetFilePath, packageDirectory, packageName, subTarget, conditions, mode);
|
|
47291
47317
|
if (result) {
|
|
47292
47318
|
return result;
|
|
47293
47319
|
}
|
|
@@ -48444,7 +48470,7 @@ function createTypeChecker(host) {
|
|
|
48444
48470
|
};
|
|
48445
48471
|
var amalgamatedDuplicates;
|
|
48446
48472
|
var reverseMappedCache = /* @__PURE__ */ new Map();
|
|
48447
|
-
var
|
|
48473
|
+
var homomorphicMappedTypeInferenceStack = [];
|
|
48448
48474
|
var ambientModulesCache;
|
|
48449
48475
|
var patternAmbientModules;
|
|
48450
48476
|
var patternAmbientModuleAugmentations;
|
|
@@ -48701,7 +48727,7 @@ function createTypeChecker(host) {
|
|
|
48701
48727
|
if (deprecatedTag) {
|
|
48702
48728
|
addRelatedInfo(
|
|
48703
48729
|
diagnostic,
|
|
48704
|
-
createDiagnosticForNode(deprecatedTag, Diagnostics.
|
|
48730
|
+
createDiagnosticForNode(deprecatedTag, Diagnostics.The_declaration_was_marked_as_deprecated_here)
|
|
48705
48731
|
);
|
|
48706
48732
|
}
|
|
48707
48733
|
suggestionDiagnostics.add(diagnostic);
|
|
@@ -48896,8 +48922,8 @@ function createTypeChecker(host) {
|
|
|
48896
48922
|
if (adjustedNode === errorNode)
|
|
48897
48923
|
continue;
|
|
48898
48924
|
err.relatedInformation = err.relatedInformation || [];
|
|
48899
|
-
const leadingMessage = createDiagnosticForNode(adjustedNode, Diagnostics.
|
|
48900
|
-
const followOnMessage = createDiagnosticForNode(adjustedNode, Diagnostics.
|
|
48925
|
+
const leadingMessage = createDiagnosticForNode(adjustedNode, Diagnostics._0_was_also_declared_here, symbolName2);
|
|
48926
|
+
const followOnMessage = createDiagnosticForNode(adjustedNode, Diagnostics.and_here);
|
|
48901
48927
|
if (length(err.relatedInformation) >= 5 || some(err.relatedInformation, (r) => compareDiagnostics(r, followOnMessage) === 0 /* EqualTo */ || compareDiagnostics(r, leadingMessage) === 0 /* EqualTo */))
|
|
48902
48928
|
continue;
|
|
48903
48929
|
addRelatedInfo(err, !length(err.relatedInformation) ? leadingMessage : followOnMessage);
|
|
@@ -49508,7 +49534,7 @@ function createTypeChecker(host) {
|
|
|
49508
49534
|
if (suggestion.valueDeclaration) {
|
|
49509
49535
|
addRelatedInfo(
|
|
49510
49536
|
diagnostic,
|
|
49511
|
-
createDiagnosticForNode(suggestion.valueDeclaration, Diagnostics.
|
|
49537
|
+
createDiagnosticForNode(suggestion.valueDeclaration, Diagnostics._0_is_declared_here, suggestionName)
|
|
49512
49538
|
);
|
|
49513
49539
|
}
|
|
49514
49540
|
}
|
|
@@ -49570,7 +49596,7 @@ function createTypeChecker(host) {
|
|
|
49570
49596
|
diagnostic,
|
|
49571
49597
|
createDiagnosticForNode(
|
|
49572
49598
|
typeOnlyDeclaration,
|
|
49573
|
-
typeOnlyDeclaration.kind === 281 /* ExportSpecifier */ || typeOnlyDeclaration.kind === 278 /* ExportDeclaration */ || typeOnlyDeclaration.kind === 280 /* NamespaceExport */ ? Diagnostics.
|
|
49599
|
+
typeOnlyDeclaration.kind === 281 /* ExportSpecifier */ || typeOnlyDeclaration.kind === 278 /* ExportDeclaration */ || typeOnlyDeclaration.kind === 280 /* NamespaceExport */ ? Diagnostics._0_was_exported_here : Diagnostics._0_was_imported_here,
|
|
49574
49600
|
unescapedName
|
|
49575
49601
|
)
|
|
49576
49602
|
);
|
|
@@ -49707,7 +49733,7 @@ function createTypeChecker(host) {
|
|
|
49707
49733
|
return true;
|
|
49708
49734
|
}
|
|
49709
49735
|
}
|
|
49710
|
-
error2(errorLocation, Diagnostics.
|
|
49736
|
+
error2(errorLocation, Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here, unescapeLeadingUnderscores(name));
|
|
49711
49737
|
return true;
|
|
49712
49738
|
}
|
|
49713
49739
|
}
|
|
@@ -49749,7 +49775,7 @@ function createTypeChecker(host) {
|
|
|
49749
49775
|
if (isExtendedByInterface(errorLocation)) {
|
|
49750
49776
|
error2(errorLocation, Diagnostics.An_interface_cannot_extend_a_primitive_type_like_0_an_interface_can_only_extend_named_types_and_classes, unescapeLeadingUnderscores(name));
|
|
49751
49777
|
} else {
|
|
49752
|
-
error2(errorLocation, Diagnostics.
|
|
49778
|
+
error2(errorLocation, Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here, unescapeLeadingUnderscores(name));
|
|
49753
49779
|
}
|
|
49754
49780
|
return true;
|
|
49755
49781
|
}
|
|
@@ -49772,7 +49798,7 @@ function createTypeChecker(host) {
|
|
|
49772
49798
|
} else if (maybeMappedType(errorLocation, symbol)) {
|
|
49773
49799
|
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");
|
|
49774
49800
|
} else {
|
|
49775
|
-
error2(errorLocation, Diagnostics.
|
|
49801
|
+
error2(errorLocation, Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here, rawName);
|
|
49776
49802
|
}
|
|
49777
49803
|
return true;
|
|
49778
49804
|
}
|
|
@@ -49878,7 +49904,7 @@ function createTypeChecker(host) {
|
|
|
49878
49904
|
if (diagnosticMessage) {
|
|
49879
49905
|
addRelatedInfo(
|
|
49880
49906
|
diagnosticMessage,
|
|
49881
|
-
createDiagnosticForNode(declaration, Diagnostics.
|
|
49907
|
+
createDiagnosticForNode(declaration, Diagnostics._0_is_declared_here, declarationName)
|
|
49882
49908
|
);
|
|
49883
49909
|
}
|
|
49884
49910
|
}
|
|
@@ -49946,7 +49972,7 @@ function createTypeChecker(host) {
|
|
|
49946
49972
|
const typeOnlyDeclaration = getTypeOnlyAliasDeclaration(getSymbolOfDeclaration(node));
|
|
49947
49973
|
const isExport = typeOnlyDeclaration.kind === 281 /* ExportSpecifier */ || typeOnlyDeclaration.kind === 278 /* ExportDeclaration */;
|
|
49948
49974
|
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;
|
|
49949
|
-
const relatedMessage = isExport ? Diagnostics.
|
|
49975
|
+
const relatedMessage = isExport ? Diagnostics._0_was_exported_here : Diagnostics._0_was_imported_here;
|
|
49950
49976
|
const name = typeOnlyDeclaration.kind === 278 /* ExportDeclaration */ ? "*" : unescapeLeadingUnderscores(typeOnlyDeclaration.name.escapedText);
|
|
49951
49977
|
addRelatedInfo(error2(node.moduleReference, message), createDiagnosticForNode(typeOnlyDeclaration, relatedMessage, name));
|
|
49952
49978
|
}
|
|
@@ -50268,7 +50294,7 @@ function createTypeChecker(host) {
|
|
|
50268
50294
|
if (suggestion.valueDeclaration) {
|
|
50269
50295
|
addRelatedInfo(
|
|
50270
50296
|
diagnostic,
|
|
50271
|
-
createDiagnosticForNode(suggestion.valueDeclaration, Diagnostics.
|
|
50297
|
+
createDiagnosticForNode(suggestion.valueDeclaration, Diagnostics._0_is_declared_here, suggestionName)
|
|
50272
50298
|
);
|
|
50273
50299
|
}
|
|
50274
50300
|
} else {
|
|
@@ -50298,7 +50324,7 @@ function createTypeChecker(host) {
|
|
|
50298
50324
|
if (localSymbol.declarations) {
|
|
50299
50325
|
addRelatedInfo(
|
|
50300
50326
|
diagnostic,
|
|
50301
|
-
...map(localSymbol.declarations, (decl, index) => createDiagnosticForNode(decl, index === 0 ? Diagnostics.
|
|
50327
|
+
...map(localSymbol.declarations, (decl, index) => createDiagnosticForNode(decl, index === 0 ? Diagnostics._0_is_declared_here : Diagnostics.and_here, declarationName))
|
|
50302
50328
|
);
|
|
50303
50329
|
}
|
|
50304
50330
|
}
|
|
@@ -53035,6 +53061,7 @@ function createTypeChecker(host) {
|
|
|
53035
53061
|
);
|
|
53036
53062
|
}
|
|
53037
53063
|
function signatureToSignatureDeclarationHelper(signature, kind, context, options) {
|
|
53064
|
+
var _a;
|
|
53038
53065
|
const suppressAny = context.flags & 256 /* SuppressAnyReturnType */;
|
|
53039
53066
|
if (suppressAny)
|
|
53040
53067
|
context.flags &= ~256 /* SuppressAnyReturnType */;
|
|
@@ -53170,6 +53197,20 @@ function createTypeChecker(host) {
|
|
|
53170
53197
|
if (typeArguments) {
|
|
53171
53198
|
node.typeArguments = factory.createNodeArray(typeArguments);
|
|
53172
53199
|
}
|
|
53200
|
+
if (((_a = signature.declaration) == null ? void 0 : _a.kind) === 330 /* JSDocSignature */ && signature.declaration.parent.kind === 346 /* JSDocOverloadTag */) {
|
|
53201
|
+
const comment = getTextOfNode(
|
|
53202
|
+
signature.declaration.parent.parent,
|
|
53203
|
+
/*includeTrivia*/
|
|
53204
|
+
true
|
|
53205
|
+
).slice(2, -2).split(/\r\n|\n|\r/).map((line) => line.replace(/^\s+/, " ")).join("\n");
|
|
53206
|
+
addSyntheticLeadingComment(
|
|
53207
|
+
node,
|
|
53208
|
+
3 /* MultiLineCommentTrivia */,
|
|
53209
|
+
comment,
|
|
53210
|
+
/*hasTrailingNewLine*/
|
|
53211
|
+
true
|
|
53212
|
+
);
|
|
53213
|
+
}
|
|
53173
53214
|
cleanup == null ? void 0 : cleanup();
|
|
53174
53215
|
return node;
|
|
53175
53216
|
}
|
|
@@ -56343,11 +56384,11 @@ function createTypeChecker(host) {
|
|
|
56343
56384
|
const exportedMemberName = ((_a = tryCast(exportedMember.valueDeclaration, isNamedDeclaration)) == null ? void 0 : _a.name) || exportedMember.valueDeclaration;
|
|
56344
56385
|
addRelatedInfo(
|
|
56345
56386
|
error2(s.valueDeclaration, Diagnostics.Duplicate_identifier_0, unescapedName),
|
|
56346
|
-
createDiagnosticForNode(exportedMemberName, Diagnostics.
|
|
56387
|
+
createDiagnosticForNode(exportedMemberName, Diagnostics._0_was_also_declared_here, unescapedName)
|
|
56347
56388
|
);
|
|
56348
56389
|
addRelatedInfo(
|
|
56349
56390
|
error2(exportedMemberName, Diagnostics.Duplicate_identifier_0, unescapedName),
|
|
56350
|
-
createDiagnosticForNode(s.valueDeclaration, Diagnostics.
|
|
56391
|
+
createDiagnosticForNode(s.valueDeclaration, Diagnostics._0_was_also_declared_here, unescapedName)
|
|
56351
56392
|
);
|
|
56352
56393
|
}
|
|
56353
56394
|
const union = createSymbol(s.flags | exportedMember.flags, name);
|
|
@@ -57582,7 +57623,7 @@ function createTypeChecker(host) {
|
|
|
57582
57623
|
if (lateSymbol.flags & getExcludedSymbolFlags(symbolFlags) || earlySymbol) {
|
|
57583
57624
|
const declarations = earlySymbol ? concatenate(earlySymbol.declarations, lateSymbol.declarations) : lateSymbol.declarations;
|
|
57584
57625
|
const name = !(type.flags & 8192 /* UniqueESSymbol */) && unescapeLeadingUnderscores(memberName) || declarationNameToString(declName);
|
|
57585
|
-
forEach(declarations, (declaration) => error2(getNameOfDeclaration(declaration) || declaration, Diagnostics.
|
|
57626
|
+
forEach(declarations, (declaration) => error2(getNameOfDeclaration(declaration) || declaration, Diagnostics.Property_0_was_also_declared_here, name));
|
|
57586
57627
|
error2(declName || decl, Diagnostics.Duplicate_property_0, name);
|
|
57587
57628
|
lateSymbol = createSymbol(0 /* None */, memberName, 4096 /* Late */);
|
|
57588
57629
|
}
|
|
@@ -62494,7 +62535,7 @@ function createTypeChecker(host) {
|
|
|
62494
62535
|
if (moduleSymbol.flags & targetMeaning) {
|
|
62495
62536
|
links.resolvedType = resolveImportSymbolType(node, links, moduleSymbol, targetMeaning);
|
|
62496
62537
|
} else {
|
|
62497
|
-
const errorMessage = targetMeaning === 111551 /* Value */ ? Diagnostics.
|
|
62538
|
+
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;
|
|
62498
62539
|
error2(node, errorMessage, node.argument.literal.text);
|
|
62499
62540
|
links.resolvedSymbol = unknownSymbol;
|
|
62500
62541
|
links.resolvedType = errorType;
|
|
@@ -66255,7 +66296,7 @@ function createTypeChecker(host) {
|
|
|
66255
66296
|
);
|
|
66256
66297
|
reportError(Diagnostics.Property_0_is_missing_in_type_1_but_required_in_type_2, propName, ...getTypeNamesForErrorDisplay(source2, target2));
|
|
66257
66298
|
if (length(unmatchedProperty.declarations)) {
|
|
66258
|
-
associateRelatedInfo(createDiagnosticForNode(unmatchedProperty.declarations[0], Diagnostics.
|
|
66299
|
+
associateRelatedInfo(createDiagnosticForNode(unmatchedProperty.declarations[0], Diagnostics._0_is_declared_here, propName));
|
|
66259
66300
|
}
|
|
66260
66301
|
if (shouldSkipElaboration && errorInfo) {
|
|
66261
66302
|
overrideNextErrorInfo++;
|
|
@@ -67833,17 +67874,18 @@ function createTypeChecker(host) {
|
|
|
67833
67874
|
);
|
|
67834
67875
|
}
|
|
67835
67876
|
function inferTypeForHomomorphicMappedType(source, target, constraint) {
|
|
67836
|
-
|
|
67837
|
-
|
|
67877
|
+
const cacheKey = source.id + "," + target.id + "," + constraint.id;
|
|
67878
|
+
if (reverseMappedCache.has(cacheKey)) {
|
|
67879
|
+
return reverseMappedCache.get(cacheKey);
|
|
67838
67880
|
}
|
|
67839
|
-
const
|
|
67840
|
-
if (
|
|
67841
|
-
return
|
|
67881
|
+
const recursionKey = source.id + "," + (target.target || target).id;
|
|
67882
|
+
if (contains(homomorphicMappedTypeInferenceStack, recursionKey)) {
|
|
67883
|
+
return void 0;
|
|
67842
67884
|
}
|
|
67843
|
-
|
|
67885
|
+
homomorphicMappedTypeInferenceStack.push(recursionKey);
|
|
67844
67886
|
const type = createReverseMappedType(source, target, constraint);
|
|
67845
|
-
|
|
67846
|
-
reverseMappedCache.set(
|
|
67887
|
+
homomorphicMappedTypeInferenceStack.pop();
|
|
67888
|
+
reverseMappedCache.set(cacheKey, type);
|
|
67847
67889
|
return type;
|
|
67848
67890
|
}
|
|
67849
67891
|
function isPartiallyInferableType(type) {
|
|
@@ -74030,7 +74072,7 @@ function createTypeChecker(host) {
|
|
|
74030
74072
|
if (diagnosticMessage) {
|
|
74031
74073
|
addRelatedInfo(
|
|
74032
74074
|
diagnosticMessage,
|
|
74033
|
-
createDiagnosticForNode(valueDeclaration, Diagnostics.
|
|
74075
|
+
createDiagnosticForNode(valueDeclaration, Diagnostics._0_is_declared_here, declarationName)
|
|
74034
74076
|
);
|
|
74035
74077
|
}
|
|
74036
74078
|
}
|
|
@@ -74117,7 +74159,7 @@ function createTypeChecker(host) {
|
|
|
74117
74159
|
const suggestedName = symbolName(suggestion);
|
|
74118
74160
|
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;
|
|
74119
74161
|
errorInfo = chainDiagnosticMessages(errorInfo, message, missingProperty, container, suggestedName);
|
|
74120
|
-
relatedInfo = suggestion.valueDeclaration && createDiagnosticForNode(suggestion.valueDeclaration, Diagnostics.
|
|
74162
|
+
relatedInfo = suggestion.valueDeclaration && createDiagnosticForNode(suggestion.valueDeclaration, Diagnostics._0_is_declared_here, suggestedName);
|
|
74121
74163
|
} else {
|
|
74122
74164
|
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;
|
|
74123
74165
|
errorInfo = chainDiagnosticMessages(elaborateNeverIntersection(errorInfo, containingType), diagnostic, missingProperty, container);
|
|
@@ -74834,7 +74876,7 @@ function createTypeChecker(host) {
|
|
|
74834
74876
|
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);
|
|
74835
74877
|
const tagNameDeclaration = (_a = getSymbolAtLocation(node.tagName)) == null ? void 0 : _a.valueDeclaration;
|
|
74836
74878
|
if (tagNameDeclaration) {
|
|
74837
|
-
addRelatedInfo(diag2, createDiagnosticForNode(tagNameDeclaration, Diagnostics.
|
|
74879
|
+
addRelatedInfo(diag2, createDiagnosticForNode(tagNameDeclaration, Diagnostics._0_is_declared_here, entityNameToString(node.tagName)));
|
|
74838
74880
|
}
|
|
74839
74881
|
if (errorOutputContainer && errorOutputContainer.skipLogging) {
|
|
74840
74882
|
(errorOutputContainer.errors || (errorOutputContainer.errors = [])).push(diag2);
|
|
@@ -75286,7 +75328,7 @@ function createTypeChecker(host) {
|
|
|
75286
75328
|
if (diags) {
|
|
75287
75329
|
for (const d of diags) {
|
|
75288
75330
|
if (last2.declaration && candidatesForArgumentError.length > 3) {
|
|
75289
|
-
addRelatedInfo(d, createDiagnosticForNode(last2.declaration, Diagnostics.
|
|
75331
|
+
addRelatedInfo(d, createDiagnosticForNode(last2.declaration, Diagnostics.The_last_overload_is_declared_here));
|
|
75290
75332
|
}
|
|
75291
75333
|
addImplementationSuccessElaboration(last2, d);
|
|
75292
75334
|
diagnostics.add(d);
|
|
@@ -80426,7 +80468,7 @@ function createTypeChecker(host) {
|
|
|
80426
80468
|
const errorNode = signature.declaration && isJSDocSignature(signature.declaration) ? signature.declaration.parent.tagName : signature.declaration;
|
|
80427
80469
|
addRelatedInfo(
|
|
80428
80470
|
error2(errorNode, Diagnostics.This_overload_signature_is_not_compatible_with_its_implementation_signature),
|
|
80429
|
-
createDiagnosticForNode(bodyDeclaration, Diagnostics.
|
|
80471
|
+
createDiagnosticForNode(bodyDeclaration, Diagnostics.The_implementation_signature_is_declared_here)
|
|
80430
80472
|
);
|
|
80431
80473
|
break;
|
|
80432
80474
|
}
|
|
@@ -80892,7 +80934,7 @@ function createTypeChecker(host) {
|
|
|
80892
80934
|
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);
|
|
80893
80935
|
const aliasDeclaration = find(rootSymbol.declarations || emptyArray, isAliasSymbolDeclaration2);
|
|
80894
80936
|
if (aliasDeclaration) {
|
|
80895
|
-
addRelatedInfo(diag2, createDiagnosticForNode(aliasDeclaration, Diagnostics.
|
|
80937
|
+
addRelatedInfo(diag2, createDiagnosticForNode(aliasDeclaration, Diagnostics._0_was_imported_here, idText(rootName)));
|
|
80896
80938
|
}
|
|
80897
80939
|
}
|
|
80898
80940
|
}
|
|
@@ -81836,7 +81878,7 @@ function createTypeChecker(host) {
|
|
|
81836
81878
|
if (firstDeclaration) {
|
|
81837
81879
|
addRelatedInfo(
|
|
81838
81880
|
err,
|
|
81839
|
-
createDiagnosticForNode(firstDeclaration, Diagnostics.
|
|
81881
|
+
createDiagnosticForNode(firstDeclaration, Diagnostics._0_was_also_declared_here, declName)
|
|
81840
81882
|
);
|
|
81841
81883
|
}
|
|
81842
81884
|
}
|
|
@@ -82946,7 +82988,7 @@ function createTypeChecker(host) {
|
|
|
82946
82988
|
typeToString(info.type)
|
|
82947
82989
|
);
|
|
82948
82990
|
if (propDeclaration && errorNode !== propDeclaration) {
|
|
82949
|
-
addRelatedInfo(diagnostic, createDiagnosticForNode(propDeclaration, Diagnostics.
|
|
82991
|
+
addRelatedInfo(diagnostic, createDiagnosticForNode(propDeclaration, Diagnostics._0_is_declared_here, symbolToString(prop)));
|
|
82950
82992
|
}
|
|
82951
82993
|
diagnostics.add(diagnostic);
|
|
82952
82994
|
}
|
|
@@ -87281,7 +87323,7 @@ function createTypeChecker(host) {
|
|
|
87281
87323
|
createDiagnosticForNode(useStrictDirective, Diagnostics.use_strict_directive_used_here)
|
|
87282
87324
|
);
|
|
87283
87325
|
});
|
|
87284
|
-
const diagnostics2 = nonSimpleParameters.map((parameter, index) => index === 0 ? createDiagnosticForNode(parameter, Diagnostics.
|
|
87326
|
+
const diagnostics2 = nonSimpleParameters.map((parameter, index) => index === 0 ? createDiagnosticForNode(parameter, Diagnostics.Non_simple_parameter_declared_here) : createDiagnosticForNode(parameter, Diagnostics.and_here));
|
|
87285
87327
|
addRelatedInfo(error2(useStrictDirective, Diagnostics.use_strict_directive_cannot_be_used_with_non_simple_parameter_list), ...diagnostics2);
|
|
87286
87328
|
return true;
|
|
87287
87329
|
}
|
|
@@ -118854,14 +118896,14 @@ function getEmitListItem(emit, parenthesizerRule) {
|
|
|
118854
118896
|
}
|
|
118855
118897
|
|
|
118856
118898
|
// src/compiler/watchUtilities.ts
|
|
118857
|
-
function createCachedDirectoryStructureHost(host, currentDirectory,
|
|
118899
|
+
function createCachedDirectoryStructureHost(host, currentDirectory, useCaseSensitiveFileNames2) {
|
|
118858
118900
|
if (!host.getDirectories || !host.readDirectory) {
|
|
118859
118901
|
return void 0;
|
|
118860
118902
|
}
|
|
118861
118903
|
const cachedReadDirectoryResult = /* @__PURE__ */ new Map();
|
|
118862
|
-
const getCanonicalFileName = createGetCanonicalFileName(
|
|
118904
|
+
const getCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames2);
|
|
118863
118905
|
return {
|
|
118864
|
-
useCaseSensitiveFileNames,
|
|
118906
|
+
useCaseSensitiveFileNames: useCaseSensitiveFileNames2,
|
|
118865
118907
|
fileExists,
|
|
118866
118908
|
readFile: (path, encoding) => host.readFile(path, encoding),
|
|
118867
118909
|
directoryExists: host.directoryExists && directoryExists,
|
|
@@ -118983,7 +119025,7 @@ function createCachedDirectoryStructureHost(host, currentDirectory, useCaseSensi
|
|
|
118983
119025
|
const rootResult = tryReadDirectory2(rootDir, rootDirPath);
|
|
118984
119026
|
let rootSymLinkResult;
|
|
118985
119027
|
if (rootResult !== void 0) {
|
|
118986
|
-
return matchFiles(rootDir, extensions, excludes, includes,
|
|
119028
|
+
return matchFiles(rootDir, extensions, excludes, includes, useCaseSensitiveFileNames2, currentDirectory, depth, getFileSystemEntries, realpath);
|
|
118987
119029
|
}
|
|
118988
119030
|
return host.readDirectory(rootDir, extensions, excludes, includes, depth);
|
|
118989
119031
|
function getFileSystemEntries(dir) {
|
|
@@ -119184,7 +119226,7 @@ function isIgnoredFileFromWildCardWatching({
|
|
|
119184
119226
|
program,
|
|
119185
119227
|
extraFileExtensions,
|
|
119186
119228
|
currentDirectory,
|
|
119187
|
-
useCaseSensitiveFileNames,
|
|
119229
|
+
useCaseSensitiveFileNames: useCaseSensitiveFileNames2,
|
|
119188
119230
|
writeLog,
|
|
119189
119231
|
toPath: toPath3
|
|
119190
119232
|
}) {
|
|
@@ -119200,7 +119242,7 @@ function isIgnoredFileFromWildCardWatching({
|
|
|
119200
119242
|
writeLog(`Project: ${configFileName} Detected file add/remove of non supported extension: ${fileOrDirectory}`);
|
|
119201
119243
|
return true;
|
|
119202
119244
|
}
|
|
119203
|
-
if (isExcludedFile(fileOrDirectory, options.configFile.configFileSpecs, getNormalizedAbsolutePath(getDirectoryPath(configFileName), currentDirectory),
|
|
119245
|
+
if (isExcludedFile(fileOrDirectory, options.configFile.configFileSpecs, getNormalizedAbsolutePath(getDirectoryPath(configFileName), currentDirectory), useCaseSensitiveFileNames2, currentDirectory)) {
|
|
119204
119246
|
writeLog(`Project: ${configFileName} Detected excluded file: ${fileOrDirectory}`);
|
|
119205
119247
|
return true;
|
|
119206
119248
|
}
|
|
@@ -119263,7 +119305,7 @@ function getWatchFactory(host, watchLogLevel, log, getDetailWatchInfo2) {
|
|
|
119263
119305
|
function createExcludeHandlingAddWatch(key) {
|
|
119264
119306
|
return (file, cb, flags, options, detailInfo1, detailInfo2) => {
|
|
119265
119307
|
var _a;
|
|
119266
|
-
return !matchesExclude(file, key === "watchFile" ? options == null ? void 0 : options.excludeFiles : options == null ? void 0 : options.excludeDirectories,
|
|
119308
|
+
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(
|
|
119267
119309
|
/*thisArgs*/
|
|
119268
119310
|
void 0,
|
|
119269
119311
|
file,
|
|
@@ -119275,7 +119317,7 @@ function getWatchFactory(host, watchLogLevel, log, getDetailWatchInfo2) {
|
|
|
119275
119317
|
) : excludeWatcherFactory(file, flags, options, detailInfo1, detailInfo2);
|
|
119276
119318
|
};
|
|
119277
119319
|
}
|
|
119278
|
-
function
|
|
119320
|
+
function useCaseSensitiveFileNames2() {
|
|
119279
119321
|
return typeof host.useCaseSensitiveFileNames === "boolean" ? host.useCaseSensitiveFileNames : host.useCaseSensitiveFileNames();
|
|
119280
119322
|
}
|
|
119281
119323
|
function createExcludeWatcherWithLogging(file, flags, options, detailInfo1, detailInfo2) {
|
|
@@ -119620,7 +119662,7 @@ var gutterSeparator = " ";
|
|
|
119620
119662
|
var resetEscapeSequence = "\x1B[0m";
|
|
119621
119663
|
var ellipsis = "...";
|
|
119622
119664
|
var halfIndent = " ";
|
|
119623
|
-
var
|
|
119665
|
+
var indent = " ";
|
|
119624
119666
|
function getCategoryFormat(category) {
|
|
119625
119667
|
switch (category) {
|
|
119626
119668
|
case 1 /* Error */:
|
|
@@ -119636,49 +119678,39 @@ function getCategoryFormat(category) {
|
|
|
119636
119678
|
function formatColorAndReset(text, formatStyle) {
|
|
119637
119679
|
return formatStyle + text + resetEscapeSequence;
|
|
119638
119680
|
}
|
|
119639
|
-
function formatCodeSpan(file, start2, length2,
|
|
119681
|
+
function formatCodeSpan(file, start2, length2, indent3, squiggleColor, host) {
|
|
119640
119682
|
const { line: firstLine, character: firstLineChar } = getLineAndCharacterOfPosition(file, start2);
|
|
119641
119683
|
const { line: lastLine, character: lastLineChar } = getLineAndCharacterOfPosition(file, start2 + length2);
|
|
119642
119684
|
const lastLineInFile = getLineAndCharacterOfPosition(file, file.text.length).line;
|
|
119643
|
-
const gutterWidth = 1;
|
|
119644
119685
|
const hasMoreThanFiveLines = lastLine - firstLine >= 4;
|
|
119645
|
-
let
|
|
119646
|
-
|
|
119647
|
-
|
|
119648
|
-
i = lastLine - 1;
|
|
119649
|
-
}
|
|
119650
|
-
const lineStart = getPositionOfLineAndCharacter(file, i, 0);
|
|
119651
|
-
const lineEnd = i < lastLineInFile ? getPositionOfLineAndCharacter(file, i + 1, 0) : file.text.length;
|
|
119652
|
-
const lineContent = file.text.slice(lineStart, lineEnd);
|
|
119653
|
-
whitespaceToTrim = Math.min(whitespaceToTrim, startWhitespaceCount(lineContent));
|
|
119686
|
+
let gutterWidth = (lastLine + 1 + "").length;
|
|
119687
|
+
if (hasMoreThanFiveLines) {
|
|
119688
|
+
gutterWidth = Math.max(ellipsis.length, gutterWidth);
|
|
119654
119689
|
}
|
|
119655
119690
|
let context = "";
|
|
119656
119691
|
for (let i = firstLine; i <= lastLine; i++) {
|
|
119657
119692
|
context += host.getNewLine();
|
|
119658
119693
|
if (hasMoreThanFiveLines && firstLine + 1 < i && i < lastLine - 1) {
|
|
119659
|
-
context +=
|
|
119694
|
+
context += indent3 + formatColorAndReset(padLeft(ellipsis, gutterWidth), gutterStyleSequence) + gutterSeparator + host.getNewLine();
|
|
119660
119695
|
i = lastLine - 1;
|
|
119661
119696
|
}
|
|
119662
119697
|
const lineStart = getPositionOfLineAndCharacter(file, i, 0);
|
|
119663
119698
|
const lineEnd = i < lastLineInFile ? getPositionOfLineAndCharacter(file, i + 1, 0) : file.text.length;
|
|
119664
119699
|
let lineContent = file.text.slice(lineStart, lineEnd);
|
|
119665
|
-
lineContent = lineContent.slice(whitespaceToTrim);
|
|
119666
119700
|
lineContent = trimStringEnd(lineContent);
|
|
119667
119701
|
lineContent = lineContent.replace(/\t/g, " ");
|
|
119668
|
-
|
|
119669
|
-
context += indent2 + padLeft(gutterLine, gutterWidth) + gutterSeparator;
|
|
119702
|
+
context += indent3 + formatColorAndReset(padLeft(i + 1 + "", gutterWidth), gutterStyleSequence) + gutterSeparator;
|
|
119670
119703
|
context += lineContent + host.getNewLine();
|
|
119671
|
-
context +=
|
|
119672
|
-
context +=
|
|
119704
|
+
context += indent3 + formatColorAndReset(padLeft("", gutterWidth), gutterStyleSequence) + gutterSeparator;
|
|
119705
|
+
context += squiggleColor;
|
|
119673
119706
|
if (i === firstLine) {
|
|
119674
119707
|
const lastCharForLine = i === lastLine ? lastLineChar : void 0;
|
|
119675
|
-
context += lineContent.slice(0, firstLineChar
|
|
119676
|
-
|
|
119677
|
-
context += lineContent.slice(firstLineChar - whitespaceToTrim, amendedLastChar).replace(/./g, "\u2594");
|
|
119708
|
+
context += lineContent.slice(0, firstLineChar).replace(/\S/g, " ");
|
|
119709
|
+
context += lineContent.slice(firstLineChar, lastCharForLine).replace(/./g, "~");
|
|
119678
119710
|
} else if (i === lastLine) {
|
|
119679
|
-
context += lineContent.slice(0, lastLineChar).replace(/./g, "
|
|
119711
|
+
context += lineContent.slice(0, lastLineChar).replace(/./g, "~");
|
|
119680
119712
|
} else {
|
|
119681
|
-
context += lineContent.replace(/./g, "
|
|
119713
|
+
context += lineContent.replace(/./g, "~");
|
|
119682
119714
|
}
|
|
119683
119715
|
context += resetEscapeSequence;
|
|
119684
119716
|
}
|
|
@@ -119696,87 +119728,54 @@ function formatLocation(file, start2, host, color = formatColorAndReset) {
|
|
|
119696
119728
|
return output;
|
|
119697
119729
|
}
|
|
119698
119730
|
function formatDiagnosticsWithColorAndContext(diagnostics, host) {
|
|
119699
|
-
var _a, _b;
|
|
119700
|
-
const terminalWidth = ((_b = (_a = sys).getWidthOfTerminal) == null ? void 0 : _b.call(_a)) ?? 0;
|
|
119701
|
-
const indent2 = terminalWidth < 60 ? "" : halfIndent;
|
|
119702
119731
|
let output = "";
|
|
119703
119732
|
for (const diagnostic of diagnostics) {
|
|
119704
|
-
|
|
119705
|
-
const diagnosticCatName = diagnosticCategoryName(
|
|
119706
|
-
diagnostic,
|
|
119707
|
-
/*lowerCase*/
|
|
119708
|
-
false
|
|
119709
|
-
);
|
|
119710
|
-
const diagnosticCatNameColored = formatColorAndReset(diagnosticCatName, getCategoryFormat(diagnostic.category));
|
|
119711
|
-
if (diagnostic.file && diagnostic.code !== Diagnostics.File_appears_to_be_binary.code) {
|
|
119733
|
+
if (diagnostic.file) {
|
|
119712
119734
|
const { file, start: start2 } = diagnostic;
|
|
119713
|
-
|
|
119714
|
-
|
|
119715
|
-
|
|
119716
|
-
|
|
119717
|
-
|
|
119718
|
-
|
|
119719
|
-
|
|
119720
|
-
padWidth = defaultPad;
|
|
119721
|
-
output += padLeft(diagnosticCatNameColored, padWidth + (diagnosticCatNameColored.length - diagnosticCatName.length));
|
|
119722
|
-
output += " " + diagnosticCode;
|
|
119723
|
-
output += formatCodeSpan(diagnostic.file, diagnostic.start, diagnostic.length, indent2, getCategoryFormat(diagnostic.category), host);
|
|
119735
|
+
output += formatLocation(file, start2, host);
|
|
119736
|
+
output += " - ";
|
|
119737
|
+
}
|
|
119738
|
+
output += formatColorAndReset(diagnosticCategoryName(diagnostic), getCategoryFormat(diagnostic.category));
|
|
119739
|
+
output += formatColorAndReset(` TS${diagnostic.code}: `, "\x1B[90m" /* Grey */);
|
|
119740
|
+
output += flattenDiagnosticMessageText(diagnostic.messageText, host.getNewLine());
|
|
119741
|
+
if (diagnostic.file && diagnostic.code !== Diagnostics.File_appears_to_be_binary.code) {
|
|
119724
119742
|
output += host.getNewLine();
|
|
119725
|
-
|
|
119726
|
-
output += formatColorAndReset(bullet, getCategoryFormat(diagnostic.category)) + " " + diagnosticCatNameColored + " " + diagnosticCode;
|
|
119743
|
+
output += formatCodeSpan(diagnostic.file, diagnostic.start, diagnostic.length, "", getCategoryFormat(diagnostic.category), host);
|
|
119727
119744
|
}
|
|
119728
|
-
let diagnosticText = flattenDiagnosticMessageText(
|
|
119729
|
-
diagnostic.messageText,
|
|
119730
|
-
host.getNewLine(),
|
|
119731
|
-
0,
|
|
119732
|
-
/*pretty*/
|
|
119733
|
-
true
|
|
119734
|
-
);
|
|
119735
|
-
diagnosticText = diagnosticText.split(host.getNewLine()).map((text) => indent2 + text).join(host.getNewLine());
|
|
119736
|
-
output += diagnosticText;
|
|
119737
|
-
output += host.getNewLine();
|
|
119738
119745
|
if (diagnostic.relatedInformation) {
|
|
119739
119746
|
output += host.getNewLine();
|
|
119740
119747
|
for (const { file, start: start2, length: length2, messageText } of diagnostic.relatedInformation) {
|
|
119741
|
-
output += indent2 + trimStringStart(flattenDiagnosticMessageText(
|
|
119742
|
-
messageText,
|
|
119743
|
-
host.getNewLine(),
|
|
119744
|
-
0,
|
|
119745
|
-
/*pretty*/
|
|
119746
|
-
true
|
|
119747
|
-
));
|
|
119748
119748
|
if (file) {
|
|
119749
|
-
output += " " + formatLocation(file, start2, host);
|
|
119750
119749
|
output += host.getNewLine();
|
|
119751
|
-
output +=
|
|
119750
|
+
output += halfIndent + formatLocation(file, start2, host);
|
|
119751
|
+
output += formatCodeSpan(file, start2, length2, indent, "\x1B[96m" /* Cyan */, host);
|
|
119752
119752
|
}
|
|
119753
|
+
output += host.getNewLine();
|
|
119754
|
+
output += indent + flattenDiagnosticMessageText(messageText, host.getNewLine());
|
|
119753
119755
|
}
|
|
119754
119756
|
}
|
|
119757
|
+
output += host.getNewLine();
|
|
119755
119758
|
}
|
|
119756
119759
|
return output;
|
|
119757
119760
|
}
|
|
119758
|
-
function flattenDiagnosticMessageText(diag2, newLine,
|
|
119761
|
+
function flattenDiagnosticMessageText(diag2, newLine, indent3 = 0) {
|
|
119759
119762
|
if (isString(diag2)) {
|
|
119760
119763
|
return diag2;
|
|
119761
119764
|
} else if (diag2 === void 0) {
|
|
119762
119765
|
return "";
|
|
119763
119766
|
}
|
|
119764
119767
|
let result = "";
|
|
119765
|
-
if (
|
|
119768
|
+
if (indent3) {
|
|
119766
119769
|
result += newLine;
|
|
119767
|
-
|
|
119768
|
-
|
|
119769
|
-
|
|
119770
|
-
result += " ";
|
|
119771
|
-
}
|
|
119772
|
-
} else
|
|
119773
|
-
result += newLine;
|
|
119770
|
+
for (let i = 0; i < indent3; i++) {
|
|
119771
|
+
result += " ";
|
|
119772
|
+
}
|
|
119774
119773
|
}
|
|
119775
119774
|
result += diag2.messageText;
|
|
119776
|
-
|
|
119775
|
+
indent3++;
|
|
119777
119776
|
if (diag2.next) {
|
|
119778
119777
|
for (const kid of diag2.next) {
|
|
119779
|
-
result += flattenDiagnosticMessageText(kid, newLine,
|
|
119778
|
+
result += flattenDiagnosticMessageText(kid, newLine, indent3);
|
|
119780
119779
|
}
|
|
119781
119780
|
}
|
|
119782
119781
|
return result;
|
|
@@ -120084,8 +120083,8 @@ var plainJSErrors = /* @__PURE__ */ new Set([
|
|
|
120084
120083
|
// binder errors
|
|
120085
120084
|
Diagnostics.Cannot_redeclare_block_scoped_variable_0.code,
|
|
120086
120085
|
Diagnostics.A_module_cannot_have_multiple_default_exports.code,
|
|
120087
|
-
Diagnostics.
|
|
120088
|
-
Diagnostics.
|
|
120086
|
+
Diagnostics.Another_export_default_is_here.code,
|
|
120087
|
+
Diagnostics.The_first_export_default_is_here.code,
|
|
120089
120088
|
Diagnostics.Identifier_expected_0_is_a_reserved_word_at_the_top_level_of_a_module.code,
|
|
120090
120089
|
Diagnostics.Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode.code,
|
|
120091
120090
|
Diagnostics.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here.code,
|
|
@@ -122882,16 +122881,16 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
|
|
|
122882
122881
|
let message2;
|
|
122883
122882
|
switch (reason.kind) {
|
|
122884
122883
|
case 3 /* Import */:
|
|
122885
|
-
message2 = Diagnostics.
|
|
122884
|
+
message2 = Diagnostics.File_is_included_via_import_here;
|
|
122886
122885
|
break;
|
|
122887
122886
|
case 4 /* ReferenceFile */:
|
|
122888
|
-
message2 = Diagnostics.
|
|
122887
|
+
message2 = Diagnostics.File_is_included_via_reference_here;
|
|
122889
122888
|
break;
|
|
122890
122889
|
case 5 /* TypeReferenceDirective */:
|
|
122891
|
-
message2 = Diagnostics.
|
|
122890
|
+
message2 = Diagnostics.File_is_included_via_type_library_reference_here;
|
|
122892
122891
|
break;
|
|
122893
122892
|
case 7 /* LibReferenceDirective */:
|
|
122894
|
-
message2 = Diagnostics.
|
|
122893
|
+
message2 = Diagnostics.File_is_included_via_library_reference_here;
|
|
122895
122894
|
break;
|
|
122896
122895
|
default:
|
|
122897
122896
|
Debug.assertNever(reason);
|
|
@@ -122915,14 +122914,14 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
|
|
|
122915
122914
|
const matchedByFiles = getMatchedFileSpec(program, fileName);
|
|
122916
122915
|
if (matchedByFiles) {
|
|
122917
122916
|
configFileNode = getTsConfigPropArrayElementValue(options.configFile, "files", matchedByFiles);
|
|
122918
|
-
message = Diagnostics.
|
|
122917
|
+
message = Diagnostics.File_is_matched_by_files_list_specified_here;
|
|
122919
122918
|
break;
|
|
122920
122919
|
}
|
|
122921
122920
|
const matchedByInclude = getMatchedIncludeSpec(program, fileName);
|
|
122922
122921
|
if (!matchedByInclude || !isString(matchedByInclude))
|
|
122923
122922
|
return void 0;
|
|
122924
122923
|
configFileNode = getTsConfigPropArrayElementValue(options.configFile, "include", matchedByInclude);
|
|
122925
|
-
message = Diagnostics.
|
|
122924
|
+
message = Diagnostics.File_is_matched_by_include_pattern_specified_here;
|
|
122926
122925
|
break;
|
|
122927
122926
|
case 1 /* SourceFromProjectReference */:
|
|
122928
122927
|
case 2 /* OutputFromProjectReference */:
|
|
@@ -122943,23 +122942,23 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
|
|
|
122943
122942
|
return referencesSyntax && referencesSyntax.elements.length > index ? createDiagnosticForNodeInSourceFile(
|
|
122944
122943
|
sourceFile,
|
|
122945
122944
|
referencesSyntax.elements[index],
|
|
122946
|
-
reason.kind === 2 /* OutputFromProjectReference */ ? Diagnostics.
|
|
122945
|
+
reason.kind === 2 /* OutputFromProjectReference */ ? Diagnostics.File_is_output_from_referenced_project_specified_here : Diagnostics.File_is_source_from_referenced_project_specified_here
|
|
122947
122946
|
) : void 0;
|
|
122948
122947
|
case 8 /* AutomaticTypeDirectiveFile */:
|
|
122949
122948
|
if (!options.types)
|
|
122950
122949
|
return void 0;
|
|
122951
122950
|
configFileNode = getOptionsSyntaxByArrayElementValue("types", reason.typeReference);
|
|
122952
|
-
message = Diagnostics.
|
|
122951
|
+
message = Diagnostics.File_is_entry_point_of_type_library_specified_here;
|
|
122953
122952
|
break;
|
|
122954
122953
|
case 6 /* LibFile */:
|
|
122955
122954
|
if (reason.index !== void 0) {
|
|
122956
122955
|
configFileNode = getOptionsSyntaxByArrayElementValue("lib", options.lib[reason.index]);
|
|
122957
|
-
message = Diagnostics.
|
|
122956
|
+
message = Diagnostics.File_is_library_specified_here;
|
|
122958
122957
|
break;
|
|
122959
122958
|
}
|
|
122960
122959
|
const target = forEachEntry(targetOptionDeclaration.type, (value, key) => value === getEmitScriptTarget(options) ? key : void 0);
|
|
122961
122960
|
configFileNode = target ? getOptionsSyntaxByValue("target", target) : void 0;
|
|
122962
|
-
message = Diagnostics.
|
|
122961
|
+
message = Diagnostics.File_is_default_library_for_target_specified_here;
|
|
122963
122962
|
break;
|
|
122964
122963
|
default:
|
|
122965
122964
|
Debug.assertNever(reason);
|
|
@@ -123364,6 +123363,9 @@ function parseConfigHostFromCompilerHostLike(host, directoryStructureHost = host
|
|
|
123364
123363
|
return directoryStructureHost.readDirectory(root, extensions, excludes, includes, depth);
|
|
123365
123364
|
},
|
|
123366
123365
|
readFile: (f) => directoryStructureHost.readFile(f),
|
|
123366
|
+
directoryExists: maybeBind(directoryStructureHost, directoryStructureHost.directoryExists),
|
|
123367
|
+
getDirectories: maybeBind(directoryStructureHost, directoryStructureHost.getDirectories),
|
|
123368
|
+
realpath: maybeBind(directoryStructureHost, directoryStructureHost.realpath),
|
|
123367
123369
|
useCaseSensitiveFileNames: host.useCaseSensitiveFileNames(),
|
|
123368
123370
|
getCurrentDirectory: () => host.getCurrentDirectory(),
|
|
123369
123371
|
onUnRecoverableConfigFileDiagnostic: host.onUnRecoverableConfigFileDiagnostic || returnUndefined,
|
|
@@ -126403,12 +126405,12 @@ function getMatchedIncludeSpec(program, fileName) {
|
|
|
126403
126405
|
return true;
|
|
126404
126406
|
const isJsonFile = fileExtensionIs(fileName, ".json" /* Json */);
|
|
126405
126407
|
const basePath = getDirectoryPath(getNormalizedAbsolutePath(configFile.fileName, program.getCurrentDirectory()));
|
|
126406
|
-
const
|
|
126408
|
+
const useCaseSensitiveFileNames2 = program.useCaseSensitiveFileNames();
|
|
126407
126409
|
return find((_b = configFile == null ? void 0 : configFile.configFileSpecs) == null ? void 0 : _b.validatedIncludeSpecs, (includeSpec) => {
|
|
126408
126410
|
if (isJsonFile && !endsWith(includeSpec, ".json" /* Json */))
|
|
126409
126411
|
return false;
|
|
126410
126412
|
const pattern = getPatternFromSpec(includeSpec, basePath, "files");
|
|
126411
|
-
return !!pattern && getRegexFromPattern(`(${pattern})$`,
|
|
126413
|
+
return !!pattern && getRegexFromPattern(`(${pattern})$`, useCaseSensitiveFileNames2).test(fileName);
|
|
126412
126414
|
});
|
|
126413
126415
|
}
|
|
126414
126416
|
function fileIncludeReasonToDiagnostics(program, reason, fileNameConvertor) {
|
|
@@ -126637,7 +126639,7 @@ function createWatchFactory(host, options) {
|
|
|
126637
126639
|
return result;
|
|
126638
126640
|
}
|
|
126639
126641
|
function createCompilerHostFromProgramHost(host, getCompilerOptions, directoryStructureHost = host) {
|
|
126640
|
-
const
|
|
126642
|
+
const useCaseSensitiveFileNames2 = host.useCaseSensitiveFileNames();
|
|
126641
126643
|
const compilerHost = {
|
|
126642
126644
|
getSourceFile: createGetSourceFile(
|
|
126643
126645
|
(fileName, encoding) => !encoding ? compilerHost.readFile(fileName) : host.readFile(fileName, encoding),
|
|
@@ -126653,8 +126655,8 @@ function createCompilerHostFromProgramHost(host, getCompilerOptions, directorySt
|
|
|
126653
126655
|
(path) => host.directoryExists(path)
|
|
126654
126656
|
),
|
|
126655
126657
|
getCurrentDirectory: memoize(() => host.getCurrentDirectory()),
|
|
126656
|
-
useCaseSensitiveFileNames: () =>
|
|
126657
|
-
getCanonicalFileName: createGetCanonicalFileName(
|
|
126658
|
+
useCaseSensitiveFileNames: () => useCaseSensitiveFileNames2,
|
|
126659
|
+
getCanonicalFileName: createGetCanonicalFileName(useCaseSensitiveFileNames2),
|
|
126658
126660
|
getNewLine: () => getNewLineCharacter(getCompilerOptions()),
|
|
126659
126661
|
fileExists: (f) => host.fileExists(f),
|
|
126660
126662
|
readFile: (f) => host.readFile(f),
|
|
@@ -126894,7 +126896,7 @@ function createWatchProgram(host) {
|
|
|
126894
126896
|
const sourceFilesCache = /* @__PURE__ */ new Map();
|
|
126895
126897
|
let missingFilePathsRequestedForRelease;
|
|
126896
126898
|
let hasChangedCompilerOptions = false;
|
|
126897
|
-
const
|
|
126899
|
+
const useCaseSensitiveFileNames2 = host.useCaseSensitiveFileNames();
|
|
126898
126900
|
const currentDirectory = host.getCurrentDirectory();
|
|
126899
126901
|
const { configFileName, optionsToExtend: optionsToExtendForConfigFile = {}, watchOptionsToExtend, extraFileExtensions, createProgram: createProgram2 } = host;
|
|
126900
126902
|
let { rootFiles: rootFileNames, options: compilerOptions, watchOptions, projectReferences } = host;
|
|
@@ -126902,7 +126904,7 @@ function createWatchProgram(host) {
|
|
|
126902
126904
|
let configFileParsingDiagnostics;
|
|
126903
126905
|
let canConfigFileJsonReportNoInputFiles = false;
|
|
126904
126906
|
let hasChangedConfigFileParsingErrors = false;
|
|
126905
|
-
const cachedDirectoryStructureHost = configFileName === void 0 ? void 0 : createCachedDirectoryStructureHost(host, currentDirectory,
|
|
126907
|
+
const cachedDirectoryStructureHost = configFileName === void 0 ? void 0 : createCachedDirectoryStructureHost(host, currentDirectory, useCaseSensitiveFileNames2);
|
|
126906
126908
|
const directoryStructureHost = cachedDirectoryStructureHost || host;
|
|
126907
126909
|
const parseConfigFileHost = parseConfigHostFromCompilerHostLike(host, directoryStructureHost);
|
|
126908
126910
|
let newLine = updateNewLine();
|
|
@@ -126920,8 +126922,8 @@ function createWatchProgram(host) {
|
|
|
126920
126922
|
Debug.assert(compilerOptions);
|
|
126921
126923
|
Debug.assert(rootFileNames);
|
|
126922
126924
|
const { watchFile: watchFile2, watchDirectory, writeLog } = createWatchFactory(host, compilerOptions);
|
|
126923
|
-
const getCanonicalFileName = createGetCanonicalFileName(
|
|
126924
|
-
writeLog(`Current directory: ${currentDirectory} CaseSensitiveFileNames: ${
|
|
126925
|
+
const getCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames2);
|
|
126926
|
+
writeLog(`Current directory: ${currentDirectory} CaseSensitiveFileNames: ${useCaseSensitiveFileNames2}`);
|
|
126925
126927
|
let configFileWatcher;
|
|
126926
126928
|
if (configFileName) {
|
|
126927
126929
|
configFileWatcher = watchFile2(configFileName, scheduleProgramReload, 2e3 /* High */, watchOptions, WatchType.ConfigFile);
|
|
@@ -127427,7 +127429,7 @@ function createWatchProgram(host) {
|
|
|
127427
127429
|
options: compilerOptions,
|
|
127428
127430
|
program: getCurrentBuilderProgram() || rootFileNames,
|
|
127429
127431
|
currentDirectory,
|
|
127430
|
-
useCaseSensitiveFileNames,
|
|
127432
|
+
useCaseSensitiveFileNames: useCaseSensitiveFileNames2,
|
|
127431
127433
|
writeLog,
|
|
127432
127434
|
toPath: toPath3
|
|
127433
127435
|
}))
|
|
@@ -127517,7 +127519,7 @@ function createWatchProgram(host) {
|
|
|
127517
127519
|
options: config.parsedCommandLine.options,
|
|
127518
127520
|
program: config.parsedCommandLine.fileNames,
|
|
127519
127521
|
currentDirectory,
|
|
127520
|
-
useCaseSensitiveFileNames,
|
|
127522
|
+
useCaseSensitiveFileNames: useCaseSensitiveFileNames2,
|
|
127521
127523
|
writeLog,
|
|
127522
127524
|
toPath: toPath3
|
|
127523
127525
|
}))
|
|
@@ -131919,7 +131921,7 @@ function getDisplayPartWriter() {
|
|
|
131919
131921
|
const absoluteMaximumLength = defaultMaximumTruncationLength * 10;
|
|
131920
131922
|
let displayParts;
|
|
131921
131923
|
let lineStart;
|
|
131922
|
-
let
|
|
131924
|
+
let indent3;
|
|
131923
131925
|
let length2;
|
|
131924
131926
|
resetWriter();
|
|
131925
131927
|
const unknownWrite = (text) => writeKind(text, 17 /* text */);
|
|
@@ -131955,12 +131957,12 @@ function getDisplayPartWriter() {
|
|
|
131955
131957
|
hasTrailingWhitespace: () => false,
|
|
131956
131958
|
hasTrailingComment: () => false,
|
|
131957
131959
|
rawWrite: notImplemented,
|
|
131958
|
-
getIndent: () =>
|
|
131960
|
+
getIndent: () => indent3,
|
|
131959
131961
|
increaseIndent: () => {
|
|
131960
|
-
|
|
131962
|
+
indent3++;
|
|
131961
131963
|
},
|
|
131962
131964
|
decreaseIndent: () => {
|
|
131963
|
-
|
|
131965
|
+
indent3--;
|
|
131964
131966
|
},
|
|
131965
131967
|
clear: resetWriter
|
|
131966
131968
|
};
|
|
@@ -131968,7 +131970,7 @@ function getDisplayPartWriter() {
|
|
|
131968
131970
|
if (length2 > absoluteMaximumLength)
|
|
131969
131971
|
return;
|
|
131970
131972
|
if (lineStart) {
|
|
131971
|
-
const indentString = getIndentString(
|
|
131973
|
+
const indentString = getIndentString(indent3);
|
|
131972
131974
|
if (indentString) {
|
|
131973
131975
|
length2 += indentString.length;
|
|
131974
131976
|
displayParts.push(displayPart(indentString, 16 /* space */));
|
|
@@ -132000,7 +132002,7 @@ function getDisplayPartWriter() {
|
|
|
132000
132002
|
function resetWriter() {
|
|
132001
132003
|
displayParts = [];
|
|
132002
132004
|
lineStart = true;
|
|
132003
|
-
|
|
132005
|
+
indent3 = 0;
|
|
132004
132006
|
length2 = 0;
|
|
132005
132007
|
}
|
|
132006
132008
|
}
|
|
@@ -133269,10 +133271,10 @@ function isImportablePath(fromPath, toPath3, getCanonicalFileName, globalCachePa
|
|
|
133269
133271
|
}
|
|
133270
133272
|
function forEachExternalModuleToImportFrom(program, host, preferences, useAutoImportProvider, cb) {
|
|
133271
133273
|
var _a, _b;
|
|
133272
|
-
const
|
|
133274
|
+
const useCaseSensitiveFileNames2 = hostUsesCaseSensitiveFileNames(host);
|
|
133273
133275
|
const excludePatterns = preferences.autoImportFileExcludePatterns && mapDefined(preferences.autoImportFileExcludePatterns, (spec) => {
|
|
133274
133276
|
const pattern = getPatternFromSpec(spec, "", "exclude");
|
|
133275
|
-
return pattern ? getRegexFromPattern(pattern,
|
|
133277
|
+
return pattern ? getRegexFromPattern(pattern, useCaseSensitiveFileNames2) : void 0;
|
|
133276
133278
|
});
|
|
133277
133279
|
forEachExternalModule(program.getTypeChecker(), program.getSourceFiles(), excludePatterns, (module2, file) => cb(
|
|
133278
133280
|
module2,
|
|
@@ -134734,12 +134736,12 @@ var DocumentHighlights;
|
|
|
134734
134736
|
function isDocumentRegistryEntry(entry) {
|
|
134735
134737
|
return !!entry.sourceFile;
|
|
134736
134738
|
}
|
|
134737
|
-
function createDocumentRegistry(
|
|
134738
|
-
return createDocumentRegistryInternal(
|
|
134739
|
+
function createDocumentRegistry(useCaseSensitiveFileNames2, currentDirectory) {
|
|
134740
|
+
return createDocumentRegistryInternal(useCaseSensitiveFileNames2, currentDirectory);
|
|
134739
134741
|
}
|
|
134740
|
-
function createDocumentRegistryInternal(
|
|
134742
|
+
function createDocumentRegistryInternal(useCaseSensitiveFileNames2, currentDirectory = "", externalCache) {
|
|
134741
134743
|
const buckets = /* @__PURE__ */ new Map();
|
|
134742
|
-
const getCanonicalFileName = createGetCanonicalFileName(!!
|
|
134744
|
+
const getCanonicalFileName = createGetCanonicalFileName(!!useCaseSensitiveFileNames2);
|
|
134743
134745
|
function reportStats() {
|
|
134744
134746
|
const bucketInfoArray = arrayFrom(buckets.keys()).filter((name) => name && name.charAt(0) === "_").map((name) => {
|
|
134745
134747
|
const entries = buckets.get(name);
|
|
@@ -134942,12 +134944,12 @@ function getDocumentRegistryBucketKeyWithMode(key, mode) {
|
|
|
134942
134944
|
|
|
134943
134945
|
// src/services/getEditsForFileRename.ts
|
|
134944
134946
|
function getEditsForFileRename(program, oldFileOrDirPath, newFileOrDirPath, host, formatContext, preferences, sourceMapper) {
|
|
134945
|
-
const
|
|
134946
|
-
const getCanonicalFileName = createGetCanonicalFileName(
|
|
134947
|
+
const useCaseSensitiveFileNames2 = hostUsesCaseSensitiveFileNames(host);
|
|
134948
|
+
const getCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames2);
|
|
134947
134949
|
const oldToNew = getPathUpdater(oldFileOrDirPath, newFileOrDirPath, getCanonicalFileName, sourceMapper);
|
|
134948
134950
|
const newToOld = getPathUpdater(newFileOrDirPath, oldFileOrDirPath, getCanonicalFileName, sourceMapper);
|
|
134949
134951
|
return ts_textChanges_exports.ChangeTracker.with({ host, formatContext, preferences }, (changeTracker) => {
|
|
134950
|
-
updateTsconfigFiles(program, changeTracker, oldToNew, oldFileOrDirPath, newFileOrDirPath, host.getCurrentDirectory(),
|
|
134952
|
+
updateTsconfigFiles(program, changeTracker, oldToNew, oldFileOrDirPath, newFileOrDirPath, host.getCurrentDirectory(), useCaseSensitiveFileNames2);
|
|
134951
134953
|
updateImports(program, changeTracker, oldToNew, newToOld, host, getCanonicalFileName);
|
|
134952
134954
|
});
|
|
134953
134955
|
}
|
|
@@ -134969,7 +134971,7 @@ function makeCorrespondingRelativeChange(a0, b0, a1, getCanonicalFileName) {
|
|
|
134969
134971
|
const rel = getRelativePathFromFile(a0, b0, getCanonicalFileName);
|
|
134970
134972
|
return combinePathsSafe(getDirectoryPath(a1), rel);
|
|
134971
134973
|
}
|
|
134972
|
-
function updateTsconfigFiles(program, changeTracker, oldToNew, oldFileOrDirPath, newFileOrDirPath, currentDirectory,
|
|
134974
|
+
function updateTsconfigFiles(program, changeTracker, oldToNew, oldFileOrDirPath, newFileOrDirPath, currentDirectory, useCaseSensitiveFileNames2) {
|
|
134973
134975
|
const { configFile } = program.getCompilerOptions();
|
|
134974
134976
|
if (!configFile)
|
|
134975
134977
|
return;
|
|
@@ -134993,10 +134995,10 @@ function updateTsconfigFiles(program, changeTracker, oldToNew, oldFileOrDirPath,
|
|
|
134993
134995
|
/*excludes*/
|
|
134994
134996
|
[],
|
|
134995
134997
|
includes,
|
|
134996
|
-
|
|
134998
|
+
useCaseSensitiveFileNames2,
|
|
134997
134999
|
currentDirectory
|
|
134998
135000
|
);
|
|
134999
|
-
if (getRegexFromPattern(Debug.checkDefined(matchers.includeFilePattern),
|
|
135001
|
+
if (getRegexFromPattern(Debug.checkDefined(matchers.includeFilePattern), useCaseSensitiveFileNames2).test(oldFileOrDirPath) && !getRegexFromPattern(Debug.checkDefined(matchers.includeFilePattern), useCaseSensitiveFileNames2).test(newFileOrDirPath)) {
|
|
135000
135002
|
changeTracker.insertNodeAfter(configFile, last(property.initializer.elements), factory.createStringLiteral(relativePath(newFileOrDirPath)));
|
|
135001
135003
|
}
|
|
135002
135004
|
return;
|
|
@@ -135044,7 +135046,7 @@ function updateTsconfigFiles(program, changeTracker, oldToNew, oldFileOrDirPath,
|
|
|
135044
135046
|
configDir,
|
|
135045
135047
|
path,
|
|
135046
135048
|
/*ignoreCase*/
|
|
135047
|
-
!
|
|
135049
|
+
!useCaseSensitiveFileNames2
|
|
135048
135050
|
);
|
|
135049
135051
|
}
|
|
135050
135052
|
}
|
|
@@ -138324,7 +138326,7 @@ function getNewStatementsAndRemoveFromOldFile2(oldFile, targetFile, usage, chang
|
|
|
138324
138326
|
const body = addExports(oldFile, toMove.all, usage.oldFileImportsFromTargetFile, useEsModuleSyntax);
|
|
138325
138327
|
if (typeof targetFile !== "string") {
|
|
138326
138328
|
if (targetFile.statements.length > 0) {
|
|
138327
|
-
changes
|
|
138329
|
+
moveStatementsToTargetFile(changes, program, body, targetFile, toMove);
|
|
138328
138330
|
} else {
|
|
138329
138331
|
changes.insertNodesAtEndOfFile(
|
|
138330
138332
|
targetFile,
|
|
@@ -139117,6 +139119,67 @@ function isNonVariableTopLevelDeclaration(node) {
|
|
|
139117
139119
|
return false;
|
|
139118
139120
|
}
|
|
139119
139121
|
}
|
|
139122
|
+
function moveStatementsToTargetFile(changes, program, statements, targetFile, toMove) {
|
|
139123
|
+
var _a;
|
|
139124
|
+
const removedExports = /* @__PURE__ */ new Set();
|
|
139125
|
+
const targetExports = (_a = targetFile.symbol) == null ? void 0 : _a.exports;
|
|
139126
|
+
if (targetExports) {
|
|
139127
|
+
const checker = program.getTypeChecker();
|
|
139128
|
+
const targetToSourceExports = /* @__PURE__ */ new Map();
|
|
139129
|
+
for (const node of toMove.all) {
|
|
139130
|
+
if (isTopLevelDeclarationStatement(node) && hasSyntacticModifier(node, 1 /* Export */)) {
|
|
139131
|
+
forEachTopLevelDeclaration(node, (declaration) => {
|
|
139132
|
+
var _a2;
|
|
139133
|
+
const targetDeclarations = canHaveSymbol(declaration) ? (_a2 = targetExports.get(declaration.symbol.escapedName)) == null ? void 0 : _a2.declarations : void 0;
|
|
139134
|
+
const exportDeclaration = firstDefined(targetDeclarations, (d) => isExportDeclaration(d) ? d : isExportSpecifier(d) ? tryCast(d.parent.parent, isExportDeclaration) : void 0);
|
|
139135
|
+
if (exportDeclaration && exportDeclaration.moduleSpecifier) {
|
|
139136
|
+
targetToSourceExports.set(
|
|
139137
|
+
exportDeclaration,
|
|
139138
|
+
(targetToSourceExports.get(exportDeclaration) || /* @__PURE__ */ new Set()).add(declaration)
|
|
139139
|
+
);
|
|
139140
|
+
}
|
|
139141
|
+
});
|
|
139142
|
+
}
|
|
139143
|
+
}
|
|
139144
|
+
for (const [exportDeclaration, topLevelDeclarations] of arrayFrom(targetToSourceExports)) {
|
|
139145
|
+
if (exportDeclaration.exportClause && isNamedExports(exportDeclaration.exportClause) && length(exportDeclaration.exportClause.elements)) {
|
|
139146
|
+
const elements = exportDeclaration.exportClause.elements;
|
|
139147
|
+
const updatedElements = filter(elements, (elem) => find(skipAlias(elem.symbol, checker).declarations, (d) => isTopLevelDeclaration(d) && topLevelDeclarations.has(d)) === void 0);
|
|
139148
|
+
if (length(updatedElements) === 0) {
|
|
139149
|
+
changes.deleteNode(targetFile, exportDeclaration);
|
|
139150
|
+
removedExports.add(exportDeclaration);
|
|
139151
|
+
continue;
|
|
139152
|
+
}
|
|
139153
|
+
if (length(updatedElements) < length(elements)) {
|
|
139154
|
+
changes.replaceNode(
|
|
139155
|
+
targetFile,
|
|
139156
|
+
exportDeclaration,
|
|
139157
|
+
factory.updateExportDeclaration(
|
|
139158
|
+
exportDeclaration,
|
|
139159
|
+
exportDeclaration.modifiers,
|
|
139160
|
+
exportDeclaration.isTypeOnly,
|
|
139161
|
+
factory.updateNamedExports(exportDeclaration.exportClause, factory.createNodeArray(updatedElements, elements.hasTrailingComma)),
|
|
139162
|
+
exportDeclaration.moduleSpecifier,
|
|
139163
|
+
exportDeclaration.assertClause
|
|
139164
|
+
)
|
|
139165
|
+
);
|
|
139166
|
+
}
|
|
139167
|
+
}
|
|
139168
|
+
}
|
|
139169
|
+
}
|
|
139170
|
+
const lastReExport = findLast(targetFile.statements, (n) => isExportDeclaration(n) && !!n.moduleSpecifier && !removedExports.has(n));
|
|
139171
|
+
if (lastReExport) {
|
|
139172
|
+
changes.insertNodesBefore(
|
|
139173
|
+
targetFile,
|
|
139174
|
+
lastReExport,
|
|
139175
|
+
statements,
|
|
139176
|
+
/*blankLineBetween*/
|
|
139177
|
+
true
|
|
139178
|
+
);
|
|
139179
|
+
} else {
|
|
139180
|
+
changes.insertNodesAfter(targetFile, targetFile.statements[targetFile.statements.length - 1], statements);
|
|
139181
|
+
}
|
|
139182
|
+
}
|
|
139120
139183
|
function getOverloadRangeToMove(sourceFile, statement) {
|
|
139121
139184
|
if (isFunctionLikeDeclaration(statement)) {
|
|
139122
139185
|
const declarations = statement.symbol.declarations;
|
|
@@ -143582,10 +143645,10 @@ function createLanguageService(host, documentRegistry = createDocumentRegistry(h
|
|
|
143582
143645
|
host.log(message);
|
|
143583
143646
|
}
|
|
143584
143647
|
}
|
|
143585
|
-
const
|
|
143586
|
-
const getCanonicalFileName = createGetCanonicalFileName(
|
|
143648
|
+
const useCaseSensitiveFileNames2 = hostUsesCaseSensitiveFileNames(host);
|
|
143649
|
+
const getCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames2);
|
|
143587
143650
|
const sourceMapper = getSourceMapper({
|
|
143588
|
-
useCaseSensitiveFileNames: () =>
|
|
143651
|
+
useCaseSensitiveFileNames: () => useCaseSensitiveFileNames2,
|
|
143589
143652
|
getCurrentDirectory: () => currentDirectory,
|
|
143590
143653
|
getProgram,
|
|
143591
143654
|
fileExists: maybeBind(host, host.fileExists),
|
|
@@ -143633,7 +143696,7 @@ function createLanguageService(host, documentRegistry = createDocumentRegistry(h
|
|
|
143633
143696
|
getSourceFileByPath: getOrCreateSourceFileByPath,
|
|
143634
143697
|
getCancellationToken: () => cancellationToken,
|
|
143635
143698
|
getCanonicalFileName,
|
|
143636
|
-
useCaseSensitiveFileNames: () =>
|
|
143699
|
+
useCaseSensitiveFileNames: () => useCaseSensitiveFileNames2,
|
|
143637
143700
|
getNewLine: () => getNewLineCharacter(newSettings),
|
|
143638
143701
|
getDefaultLibFileName: (options2) => host.getDefaultLibFileName(options2),
|
|
143639
143702
|
writeFile: noop,
|
|
@@ -143677,9 +143740,12 @@ function createLanguageService(host, documentRegistry = createDocumentRegistry(h
|
|
|
143677
143740
|
compilerHost.getSourceFile = getSourceFileWithCache;
|
|
143678
143741
|
(_c = host.setCompilerHost) == null ? void 0 : _c.call(host, compilerHost);
|
|
143679
143742
|
const parseConfigHost = {
|
|
143680
|
-
useCaseSensitiveFileNames,
|
|
143743
|
+
useCaseSensitiveFileNames: useCaseSensitiveFileNames2,
|
|
143681
143744
|
fileExists: (fileName) => compilerHost.fileExists(fileName),
|
|
143682
143745
|
readFile: (fileName) => compilerHost.readFile(fileName),
|
|
143746
|
+
directoryExists: (f) => compilerHost.directoryExists(f),
|
|
143747
|
+
getDirectories: (f) => compilerHost.getDirectories(f),
|
|
143748
|
+
realpath: compilerHost.realpath,
|
|
143683
143749
|
readDirectory: (...args) => compilerHost.readDirectory(...args),
|
|
143684
143750
|
trace: compilerHost.trace,
|
|
143685
143751
|
getCurrentDirectory: compilerHost.getCurrentDirectory,
|
|
@@ -149777,7 +149843,7 @@ var errorCodes18 = [
|
|
|
149777
149843
|
Diagnostics.Cannot_find_name_0_Did_you_mean_the_static_member_1_0.code,
|
|
149778
149844
|
Diagnostics.Cannot_find_namespace_0.code,
|
|
149779
149845
|
Diagnostics._0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead.code,
|
|
149780
|
-
Diagnostics.
|
|
149846
|
+
Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here.code,
|
|
149781
149847
|
Diagnostics.No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer.code,
|
|
149782
149848
|
Diagnostics._0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type.code
|
|
149783
149849
|
];
|
|
@@ -161239,16 +161305,18 @@ function getModulesForPathsPattern(fragment, packageDirectory, pattern, extensio
|
|
|
161239
161305
|
const fragmentDirectory = fragmentHasPath ? hasTrailingDirectorySeparator(fragment) ? fragment : getDirectoryPath(fragment) : void 0;
|
|
161240
161306
|
const expandedPrefixDirectory = fragmentHasPath ? combinePaths(normalizedPrefixDirectory, normalizedPrefixBase + fragmentDirectory) : normalizedPrefixDirectory;
|
|
161241
161307
|
const normalizedSuffix = normalizePath(parsed.suffix);
|
|
161308
|
+
const declarationExtension = normalizedSuffix && getDeclarationEmitExtensionForPath("_" + normalizedSuffix);
|
|
161309
|
+
const matchingSuffixes = declarationExtension ? [changeExtension(normalizedSuffix, declarationExtension), normalizedSuffix] : [normalizedSuffix];
|
|
161242
161310
|
const baseDirectory = normalizePath(combinePaths(packageDirectory, expandedPrefixDirectory));
|
|
161243
161311
|
const completePrefix = fragmentHasPath ? baseDirectory : ensureTrailingDirectorySeparator(baseDirectory) + normalizedPrefixBase;
|
|
161244
|
-
const
|
|
161312
|
+
const includeGlobs = normalizedSuffix ? matchingSuffixes.map((suffix) => "**/*" + suffix) : ["./*"];
|
|
161245
161313
|
const matches = mapDefined(tryReadDirectory(
|
|
161246
161314
|
host,
|
|
161247
161315
|
baseDirectory,
|
|
161248
161316
|
extensionOptions.extensionsToSearch,
|
|
161249
161317
|
/*exclude*/
|
|
161250
161318
|
void 0,
|
|
161251
|
-
|
|
161319
|
+
includeGlobs
|
|
161252
161320
|
), (match) => {
|
|
161253
161321
|
const trimmedWithPattern = trimPrefixAndSuffix(match);
|
|
161254
161322
|
if (trimmedWithPattern) {
|
|
@@ -161262,8 +161330,10 @@ function getModulesForPathsPattern(fragment, packageDirectory, pattern, extensio
|
|
|
161262
161330
|
const directories = normalizedSuffix ? emptyArray : mapDefined(tryGetDirectories(host, baseDirectory), (dir) => dir === "node_modules" ? void 0 : directoryResult(dir));
|
|
161263
161331
|
return [...matches, ...directories];
|
|
161264
161332
|
function trimPrefixAndSuffix(path) {
|
|
161265
|
-
|
|
161266
|
-
|
|
161333
|
+
return firstDefined(matchingSuffixes, (suffix) => {
|
|
161334
|
+
const inner = withoutStartAndEnd(normalizePath(path), completePrefix, suffix);
|
|
161335
|
+
return inner === void 0 ? void 0 : removeLeadingDirectorySeparator(inner);
|
|
161336
|
+
});
|
|
161267
161337
|
}
|
|
161268
161338
|
}
|
|
161269
161339
|
function withoutStartAndEnd(s, start2, end) {
|
|
@@ -167983,6 +168053,9 @@ var ChangeTracker = class _ChangeTracker {
|
|
|
167983
168053
|
insertNodeBefore(sourceFile, before, newNode, blankLineBetween = false, options = {}) {
|
|
167984
168054
|
this.insertNodeAt(sourceFile, getAdjustedStartPosition(sourceFile, before, options), newNode, this.getOptionsForInsertNodeBefore(before, newNode, blankLineBetween));
|
|
167985
168055
|
}
|
|
168056
|
+
insertNodesBefore(sourceFile, before, newNodes, blankLineBetween = false, options = {}) {
|
|
168057
|
+
this.insertNodesAt(sourceFile, getAdjustedStartPosition(sourceFile, before, options), newNodes, this.getOptionsForInsertNodeBefore(before, first(newNodes), blankLineBetween));
|
|
168058
|
+
}
|
|
167986
168059
|
insertModifierAt(sourceFile, pos, modifier, options = {}) {
|
|
167987
168060
|
this.insertNodeAt(sourceFile, pos, factory.createToken(modifier), options);
|
|
167988
168061
|
}
|
|
@@ -167994,8 +168067,8 @@ var ChangeTracker = class _ChangeTracker {
|
|
|
167994
168067
|
const startPosition = getFirstNonSpaceCharacterPosition(sourceFile.text, lineStartPosition);
|
|
167995
168068
|
const insertAtLineStart = isValidLocationToAddComment(sourceFile, startPosition);
|
|
167996
168069
|
const token = getTouchingToken(sourceFile, insertAtLineStart ? startPosition : position);
|
|
167997
|
-
const
|
|
167998
|
-
const text = `${insertAtLineStart ? "" : this.newLineCharacter}//${commentText}${this.newLineCharacter}${
|
|
168070
|
+
const indent3 = sourceFile.text.slice(lineStartPosition, startPosition);
|
|
168071
|
+
const text = `${insertAtLineStart ? "" : this.newLineCharacter}//${commentText}${this.newLineCharacter}${indent3}`;
|
|
167999
168072
|
this.insertText(sourceFile, token.getStart(sourceFile), text);
|
|
168000
168073
|
}
|
|
168001
168074
|
insertJsdocCommentBefore(sourceFile, node, tag) {
|
|
@@ -168014,8 +168087,8 @@ var ChangeTracker = class _ChangeTracker {
|
|
|
168014
168087
|
}
|
|
168015
168088
|
}
|
|
168016
168089
|
const startPosition = getPrecedingNonSpaceCharacterPosition(sourceFile.text, fnStart - 1);
|
|
168017
|
-
const
|
|
168018
|
-
this.insertNodeAt(sourceFile, fnStart, tag, { suffix: this.newLineCharacter +
|
|
168090
|
+
const indent3 = sourceFile.text.slice(startPosition, fnStart);
|
|
168091
|
+
this.insertNodeAt(sourceFile, fnStart, tag, { suffix: this.newLineCharacter + indent3 });
|
|
168019
168092
|
}
|
|
168020
168093
|
createJSDocText(sourceFile, node) {
|
|
168021
168094
|
const comments = flatMap(node.jsDoc, (jsDoc2) => isString(jsDoc2.comment) ? factory.createJSDocText(jsDoc2.comment) : jsDoc2.comment);
|
|
@@ -173817,7 +173890,6 @@ __export(ts_exports2, {
|
|
|
173817
173890
|
startEndOverlapsWithStartEnd: () => startEndOverlapsWithStartEnd,
|
|
173818
173891
|
startOnNewLine: () => startOnNewLine,
|
|
173819
173892
|
startTracing: () => startTracing,
|
|
173820
|
-
startWhitespaceCount: () => startWhitespaceCount,
|
|
173821
173893
|
startsWith: () => startsWith,
|
|
173822
173894
|
startsWithDirectory: () => startsWithDirectory,
|
|
173823
173895
|
startsWithUnderscore: () => startsWithUnderscore,
|
|
@@ -174202,7 +174274,7 @@ __export(ts_server_exports3, {
|
|
|
174202
174274
|
getLocationInNewDocument: () => getLocationInNewDocument,
|
|
174203
174275
|
hasArgument: () => hasArgument,
|
|
174204
174276
|
hasNoTypeScriptSource: () => hasNoTypeScriptSource,
|
|
174205
|
-
indent: () =>
|
|
174277
|
+
indent: () => indent2,
|
|
174206
174278
|
isConfigFile: () => isConfigFile,
|
|
174207
174279
|
isConfiguredProject: () => isConfiguredProject,
|
|
174208
174280
|
isDynamicFileName: () => isDynamicFileName,
|
|
@@ -174766,7 +174838,7 @@ function removeSorted(array, remove, compare) {
|
|
|
174766
174838
|
}
|
|
174767
174839
|
}
|
|
174768
174840
|
var indentStr = "\n ";
|
|
174769
|
-
function
|
|
174841
|
+
function indent2(str) {
|
|
174770
174842
|
return indentStr + str.replace(/\n/g, indentStr);
|
|
174771
174843
|
}
|
|
174772
174844
|
function stringifyIndented(json) {
|
|
@@ -177153,7 +177225,7 @@ var Project3 = class _Project {
|
|
|
177153
177225
|
return this.projectService.includePackageJsonAutoImports();
|
|
177154
177226
|
}
|
|
177155
177227
|
/** @internal */
|
|
177156
|
-
|
|
177228
|
+
getHostForAutoImportProvider() {
|
|
177157
177229
|
var _a, _b;
|
|
177158
177230
|
if (this.program) {
|
|
177159
177231
|
return {
|
|
@@ -177164,7 +177236,8 @@ var Project3 = class _Project {
|
|
|
177164
177236
|
readFile: this.projectService.host.readFile.bind(this.projectService.host),
|
|
177165
177237
|
getDirectories: this.projectService.host.getDirectories.bind(this.projectService.host),
|
|
177166
177238
|
trace: (_b = this.projectService.host.trace) == null ? void 0 : _b.bind(this.projectService.host),
|
|
177167
|
-
useCaseSensitiveFileNames: this.program.useCaseSensitiveFileNames()
|
|
177239
|
+
useCaseSensitiveFileNames: this.program.useCaseSensitiveFileNames(),
|
|
177240
|
+
readDirectory: this.projectService.host.readDirectory.bind(this.projectService.host)
|
|
177168
177241
|
};
|
|
177169
177242
|
}
|
|
177170
177243
|
return this.projectService.host;
|
|
@@ -177192,7 +177265,7 @@ var Project3 = class _Project {
|
|
|
177192
177265
|
if (dependencySelection) {
|
|
177193
177266
|
(_a = tracing) == null ? void 0 : _a.push(tracing.Phase.Session, "getPackageJsonAutoImportProvider");
|
|
177194
177267
|
const start2 = timestamp();
|
|
177195
|
-
this.autoImportProviderHost = AutoImportProviderProject.create(dependencySelection, this, this.
|
|
177268
|
+
this.autoImportProviderHost = AutoImportProviderProject.create(dependencySelection, this, this.getHostForAutoImportProvider(), this.documentRegistry);
|
|
177196
177269
|
if (this.autoImportProviderHost) {
|
|
177197
177270
|
updateProjectIfDirty(this.autoImportProviderHost);
|
|
177198
177271
|
this.sendPerformanceEvent("CreatePackageJsonAutoImportProvider", timestamp() - start2);
|
|
@@ -177430,7 +177503,7 @@ var _AutoImportProviderProject = class _AutoImportProviderProject extends Projec
|
|
|
177430
177503
|
this.getParsedCommandLine = maybeBind(this.hostProject, this.hostProject.getParsedCommandLine);
|
|
177431
177504
|
}
|
|
177432
177505
|
/** @internal */
|
|
177433
|
-
static getRootFileNames(dependencySelection, hostProject,
|
|
177506
|
+
static getRootFileNames(dependencySelection, hostProject, host, compilerOptions) {
|
|
177434
177507
|
var _a, _b;
|
|
177435
177508
|
if (!dependencySelection) {
|
|
177436
177509
|
return emptyArray;
|
|
@@ -177460,7 +177533,7 @@ var _AutoImportProviderProject = class _AutoImportProviderProject extends Projec
|
|
|
177460
177533
|
name,
|
|
177461
177534
|
hostProject.currentDirectory,
|
|
177462
177535
|
compilerOptions,
|
|
177463
|
-
|
|
177536
|
+
host,
|
|
177464
177537
|
program.getModuleResolutionCache()
|
|
177465
177538
|
);
|
|
177466
177539
|
if (packageJson) {
|
|
@@ -177477,7 +177550,7 @@ var _AutoImportProviderProject = class _AutoImportProviderProject extends Projec
|
|
|
177477
177550
|
`@types/${name}`,
|
|
177478
177551
|
directory,
|
|
177479
177552
|
compilerOptions,
|
|
177480
|
-
|
|
177553
|
+
host,
|
|
177481
177554
|
program.getModuleResolutionCache()
|
|
177482
177555
|
);
|
|
177483
177556
|
if (typesPackageJson) {
|
|
@@ -177517,12 +177590,12 @@ var _AutoImportProviderProject = class _AutoImportProviderProject extends Projec
|
|
|
177517
177590
|
const entrypoints = getEntrypointsFromPackageJsonInfo(
|
|
177518
177591
|
packageJson,
|
|
177519
177592
|
compilerOptions,
|
|
177520
|
-
|
|
177593
|
+
host,
|
|
177521
177594
|
program2.getModuleResolutionCache(),
|
|
177522
177595
|
resolveJs
|
|
177523
177596
|
);
|
|
177524
177597
|
if (entrypoints) {
|
|
177525
|
-
const real = (_a2 =
|
|
177598
|
+
const real = (_a2 = host.realpath) == null ? void 0 : _a2.call(host, packageJson.packageDirectory);
|
|
177526
177599
|
const isSymlink = real && real !== packageJson.packageDirectory;
|
|
177527
177600
|
if (isSymlink) {
|
|
177528
177601
|
symlinkCache.setSymlinkedDirectory(packageJson.packageDirectory, {
|
|
@@ -177540,7 +177613,7 @@ var _AutoImportProviderProject = class _AutoImportProviderProject extends Projec
|
|
|
177540
177613
|
}
|
|
177541
177614
|
}
|
|
177542
177615
|
/** @internal */
|
|
177543
|
-
static create(dependencySelection, hostProject,
|
|
177616
|
+
static create(dependencySelection, hostProject, host, documentRegistry) {
|
|
177544
177617
|
if (dependencySelection === 0 /* Off */) {
|
|
177545
177618
|
return void 0;
|
|
177546
177619
|
}
|
|
@@ -177548,7 +177621,7 @@ var _AutoImportProviderProject = class _AutoImportProviderProject extends Projec
|
|
|
177548
177621
|
...hostProject.getCompilerOptions(),
|
|
177549
177622
|
...this.compilerOptionsOverrides
|
|
177550
177623
|
};
|
|
177551
|
-
const rootNames = this.getRootFileNames(dependencySelection, hostProject,
|
|
177624
|
+
const rootNames = this.getRootFileNames(dependencySelection, hostProject, host, compilerOptions);
|
|
177552
177625
|
if (!rootNames.length) {
|
|
177553
177626
|
return void 0;
|
|
177554
177627
|
}
|
|
@@ -177567,7 +177640,7 @@ var _AutoImportProviderProject = class _AutoImportProviderProject extends Projec
|
|
|
177567
177640
|
rootFileNames = _AutoImportProviderProject.getRootFileNames(
|
|
177568
177641
|
this.hostProject.includePackageJsonAutoImports(),
|
|
177569
177642
|
this.hostProject,
|
|
177570
|
-
this.hostProject.
|
|
177643
|
+
this.hostProject.getHostForAutoImportProvider(),
|
|
177571
177644
|
this.getCompilationSettings()
|
|
177572
177645
|
);
|
|
177573
177646
|
}
|
|
@@ -177606,7 +177679,7 @@ var _AutoImportProviderProject = class _AutoImportProviderProject extends Projec
|
|
|
177606
177679
|
onPackageJsonChange() {
|
|
177607
177680
|
throw new Error("package.json changes should be notified on an AutoImportProvider's host project");
|
|
177608
177681
|
}
|
|
177609
|
-
|
|
177682
|
+
getHostForAutoImportProvider() {
|
|
177610
177683
|
throw new Error("AutoImportProviderProject cannot provide its own host; use `hostProject.getModuleResolutionHostForAutomImportProvider()` instead.");
|
|
177611
177684
|
}
|
|
177612
177685
|
getProjectReferences() {
|
|
@@ -181434,7 +181507,7 @@ function formatMessage2(msg, logger, byteLength, newLine) {
|
|
|
181434
181507
|
const verboseLogging = logger.hasLevel(3 /* verbose */);
|
|
181435
181508
|
const json = JSON.stringify(msg);
|
|
181436
181509
|
if (verboseLogging) {
|
|
181437
|
-
logger.info(`${msg.type}:${
|
|
181510
|
+
logger.info(`${msg.type}:${indent2(JSON.stringify(msg, void 0, " "))}`);
|
|
181438
181511
|
}
|
|
181439
181512
|
const len = byteLength(json, "utf8");
|
|
181440
181513
|
return `Content-Length: ${1 + len}\r
|
|
@@ -182655,9 +182728,9 @@ var Session3 = class _Session {
|
|
|
182655
182728
|
logErrorWorker(err, cmd, fileRequest) {
|
|
182656
182729
|
let msg = "Exception on executing command " + cmd;
|
|
182657
182730
|
if (err.message) {
|
|
182658
|
-
msg += ":\n" +
|
|
182731
|
+
msg += ":\n" + indent2(err.message);
|
|
182659
182732
|
if (err.stack) {
|
|
182660
|
-
msg += "\n" +
|
|
182733
|
+
msg += "\n" + indent2(err.stack);
|
|
182661
182734
|
}
|
|
182662
182735
|
}
|
|
182663
182736
|
if (this.logger.hasLevel(3 /* verbose */)) {
|
|
@@ -182669,7 +182742,7 @@ var Session3 = class _Session {
|
|
|
182669
182742
|
const text = getSnapshotText(scriptInfo.getSnapshot());
|
|
182670
182743
|
msg += `
|
|
182671
182744
|
|
|
182672
|
-
File text of ${fileRequest.file}:${
|
|
182745
|
+
File text of ${fileRequest.file}:${indent2(text)}
|
|
182673
182746
|
`;
|
|
182674
182747
|
}
|
|
182675
182748
|
} catch {
|
|
@@ -184510,7 +184583,7 @@ ${e.message}`;
|
|
|
184510
184583
|
if (this.logger.hasLevel(2 /* requestTime */)) {
|
|
184511
184584
|
start2 = this.hrtime();
|
|
184512
184585
|
if (this.logger.hasLevel(3 /* verbose */)) {
|
|
184513
|
-
this.logger.info(`request:${
|
|
184586
|
+
this.logger.info(`request:${indent2(this.toStringMessage(message))}`);
|
|
184514
184587
|
}
|
|
184515
184588
|
}
|
|
184516
184589
|
let request;
|
|
@@ -185449,7 +185522,7 @@ __export(ts_server_exports4, {
|
|
|
185449
185522
|
getLogLevel: () => getLogLevel,
|
|
185450
185523
|
hasArgument: () => hasArgument,
|
|
185451
185524
|
hasNoTypeScriptSource: () => hasNoTypeScriptSource,
|
|
185452
|
-
indent: () =>
|
|
185525
|
+
indent: () => indent2,
|
|
185453
185526
|
initializeNodeSystem: () => initializeNodeSystem,
|
|
185454
185527
|
isConfigFile: () => isConfigFile,
|
|
185455
185528
|
isConfiguredProject: () => isConfiguredProject,
|
|
@@ -186096,7 +186169,7 @@ function startNodeSession(options, logger, cancellationToken) {
|
|
|
186096
186169
|
const verboseLogging = logger.hasLevel(3 /* verbose */);
|
|
186097
186170
|
if (verboseLogging) {
|
|
186098
186171
|
const json = JSON.stringify(msg);
|
|
186099
|
-
logger.info(`${msg.type}:${
|
|
186172
|
+
logger.info(`${msg.type}:${indent2(json)}`);
|
|
186100
186173
|
}
|
|
186101
186174
|
process.send(msg);
|
|
186102
186175
|
}
|
|
@@ -188331,7 +188404,6 @@ start(initializeNodeSystem(), require("os").platform());
|
|
|
188331
188404
|
startEndOverlapsWithStartEnd,
|
|
188332
188405
|
startOnNewLine,
|
|
188333
188406
|
startTracing,
|
|
188334
|
-
startWhitespaceCount,
|
|
188335
188407
|
startsWith,
|
|
188336
188408
|
startsWithDirectory,
|
|
188337
188409
|
startsWithUnderscore,
|