typescript 5.3.3 → 5.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/lib/cancellationToken.js +0 -1
- package/lib/cs/diagnosticMessages.generated.json +1 -1
- package/lib/de/diagnosticMessages.generated.json +1 -1
- package/lib/es/diagnosticMessages.generated.json +1 -1
- package/lib/fr/diagnosticMessages.generated.json +1 -1
- package/lib/it/diagnosticMessages.generated.json +1 -1
- package/lib/ja/diagnosticMessages.generated.json +1 -1
- package/lib/ko/diagnosticMessages.generated.json +1 -1
- package/lib/lib.dom.asynciterable.d.ts +28 -0
- package/lib/lib.dom.d.ts +363 -153
- package/lib/lib.dom.iterable.d.ts +35 -28
- package/lib/lib.es2016.d.ts +1 -0
- package/lib/lib.es2016.intl.d.ts +31 -0
- package/lib/lib.es2018.full.d.ts +1 -0
- package/lib/lib.es2018.intl.d.ts +6 -5
- package/lib/lib.es2019.full.d.ts +1 -0
- package/lib/lib.es2020.full.d.ts +1 -0
- package/lib/lib.es2020.intl.d.ts +36 -16
- package/lib/lib.es2020.string.d.ts +15 -1
- package/lib/lib.es2021.full.d.ts +1 -0
- package/lib/lib.es2021.intl.d.ts +2 -2
- package/lib/lib.es2022.full.d.ts +1 -0
- package/lib/lib.es2022.intl.d.ts +2 -2
- package/lib/lib.es2023.full.d.ts +1 -0
- package/lib/lib.es5.d.ts +21 -6
- package/lib/lib.esnext.collection.d.ts +29 -0
- package/lib/lib.esnext.d.ts +3 -0
- package/lib/lib.esnext.disposable.d.ts +1 -1
- package/lib/lib.esnext.full.d.ts +1 -0
- package/lib/lib.esnext.object.d.ts +29 -0
- package/lib/lib.esnext.promise.d.ts +35 -0
- package/lib/lib.webworker.asynciterable.d.ts +28 -0
- package/lib/lib.webworker.d.ts +202 -111
- package/lib/lib.webworker.iterable.d.ts +29 -28
- package/lib/pl/diagnosticMessages.generated.json +1 -1
- package/lib/pt-br/diagnosticMessages.generated.json +1 -1
- package/lib/ru/diagnosticMessages.generated.json +1 -1
- package/lib/tr/diagnosticMessages.generated.json +1 -1
- package/lib/tsc.js +2685 -1330
- package/lib/tsserver.js +4611 -2423
- package/lib/typescript.d.ts +95 -30
- package/lib/typescript.js +4568 -2219
- package/lib/typingsInstaller.js +501 -218
- package/lib/zh-cn/diagnosticMessages.generated.json +1 -1
- package/lib/zh-tw/diagnosticMessages.generated.json +1 -1
- package/package.json +28 -29
package/lib/typingsInstaller.js
CHANGED
|
@@ -53,8 +53,8 @@ var fs = __toESM(require("fs"));
|
|
|
53
53
|
var path = __toESM(require("path"));
|
|
54
54
|
|
|
55
55
|
// src/compiler/corePublic.ts
|
|
56
|
-
var versionMajorMinor = "5.
|
|
57
|
-
var version = "5.
|
|
56
|
+
var versionMajorMinor = "5.4";
|
|
57
|
+
var version = "5.4.2";
|
|
58
58
|
|
|
59
59
|
// src/compiler/core.ts
|
|
60
60
|
var emptyArray = [];
|
|
@@ -568,23 +568,6 @@ function compareStringsCaseSensitive(a, b) {
|
|
|
568
568
|
function getStringComparer(ignoreCase) {
|
|
569
569
|
return ignoreCase ? compareStringsCaseInsensitive : compareStringsCaseSensitive;
|
|
570
570
|
}
|
|
571
|
-
var createUIStringComparer = (() => {
|
|
572
|
-
return createIntlCollatorStringComparer;
|
|
573
|
-
function compareWithCallback(a, b, comparer) {
|
|
574
|
-
if (a === b)
|
|
575
|
-
return 0 /* EqualTo */;
|
|
576
|
-
if (a === void 0)
|
|
577
|
-
return -1 /* LessThan */;
|
|
578
|
-
if (b === void 0)
|
|
579
|
-
return 1 /* GreaterThan */;
|
|
580
|
-
const value = comparer(a, b);
|
|
581
|
-
return value < 0 ? -1 /* LessThan */ : value > 0 ? 1 /* GreaterThan */ : 0 /* EqualTo */;
|
|
582
|
-
}
|
|
583
|
-
function createIntlCollatorStringComparer(locale) {
|
|
584
|
-
const comparer = new Intl.Collator(locale, { usage: "sort", sensitivity: "variant" }).compare;
|
|
585
|
-
return (a, b) => compareWithCallback(a, b, comparer);
|
|
586
|
-
}
|
|
587
|
-
})();
|
|
588
571
|
function getSpellingSuggestion(name, candidates, getName) {
|
|
589
572
|
const maximumLengthDifference = Math.max(2, Math.floor(name.length * 0.34));
|
|
590
573
|
let bestDistance = Math.floor(name.length * 0.4) + 1;
|
|
@@ -651,9 +634,9 @@ function levenshteinWithMax(s1, s2, max) {
|
|
|
651
634
|
const res = previous[s2.length];
|
|
652
635
|
return res > max ? void 0 : res;
|
|
653
636
|
}
|
|
654
|
-
function endsWith(str, suffix) {
|
|
637
|
+
function endsWith(str, suffix, ignoreCase) {
|
|
655
638
|
const expectedPos = str.length - suffix.length;
|
|
656
|
-
return expectedPos >= 0 && str.indexOf(suffix, expectedPos) === expectedPos;
|
|
639
|
+
return expectedPos >= 0 && (ignoreCase ? equateStringsCaseInsensitive(str.slice(expectedPos), suffix) : str.indexOf(suffix, expectedPos) === expectedPos);
|
|
657
640
|
}
|
|
658
641
|
function removeMinAndVersionNumbers(fileName) {
|
|
659
642
|
let end = fileName.length;
|
|
@@ -740,8 +723,8 @@ function findBestPatternMatch(values, getPattern, candidate) {
|
|
|
740
723
|
}
|
|
741
724
|
return matchedValue;
|
|
742
725
|
}
|
|
743
|
-
function startsWith(str, prefix) {
|
|
744
|
-
return str.lastIndexOf(prefix, 0) === 0;
|
|
726
|
+
function startsWith(str, prefix, ignoreCase) {
|
|
727
|
+
return ignoreCase ? equateStringsCaseInsensitive(str.slice(0, prefix.length), prefix) : str.lastIndexOf(prefix, 0) === 0;
|
|
745
728
|
}
|
|
746
729
|
function isPatternMatch({ prefix, suffix }, candidate) {
|
|
747
730
|
return candidate.length >= prefix.length + suffix.length && startsWith(candidate, prefix) && endsWith(candidate, suffix);
|
|
@@ -2961,6 +2944,7 @@ var ModifierFlags = /* @__PURE__ */ ((ModifierFlags3) => {
|
|
|
2961
2944
|
return ModifierFlags3;
|
|
2962
2945
|
})(ModifierFlags || {});
|
|
2963
2946
|
var RelationComparisonResult = /* @__PURE__ */ ((RelationComparisonResult3) => {
|
|
2947
|
+
RelationComparisonResult3[RelationComparisonResult3["None"] = 0] = "None";
|
|
2964
2948
|
RelationComparisonResult3[RelationComparisonResult3["Succeeded"] = 1] = "Succeeded";
|
|
2965
2949
|
RelationComparisonResult3[RelationComparisonResult3["Failed"] = 2] = "Failed";
|
|
2966
2950
|
RelationComparisonResult3[RelationComparisonResult3["Reported"] = 4] = "Reported";
|
|
@@ -3017,7 +3001,7 @@ var SymbolFlags = /* @__PURE__ */ ((SymbolFlags2) => {
|
|
|
3017
3001
|
SymbolFlags2[SymbolFlags2["Transient"] = 33554432] = "Transient";
|
|
3018
3002
|
SymbolFlags2[SymbolFlags2["Assignment"] = 67108864] = "Assignment";
|
|
3019
3003
|
SymbolFlags2[SymbolFlags2["ModuleExports"] = 134217728] = "ModuleExports";
|
|
3020
|
-
SymbolFlags2[SymbolFlags2["All"] =
|
|
3004
|
+
SymbolFlags2[SymbolFlags2["All"] = -1] = "All";
|
|
3021
3005
|
SymbolFlags2[SymbolFlags2["Enum"] = 384] = "Enum";
|
|
3022
3006
|
SymbolFlags2[SymbolFlags2["Variable"] = 3] = "Variable";
|
|
3023
3007
|
SymbolFlags2[SymbolFlags2["Value"] = 111551] = "Value";
|
|
@@ -3085,6 +3069,7 @@ var TypeFlags = /* @__PURE__ */ ((TypeFlags2) => {
|
|
|
3085
3069
|
TypeFlags2[TypeFlags2["NonPrimitive"] = 67108864] = "NonPrimitive";
|
|
3086
3070
|
TypeFlags2[TypeFlags2["TemplateLiteral"] = 134217728] = "TemplateLiteral";
|
|
3087
3071
|
TypeFlags2[TypeFlags2["StringMapping"] = 268435456] = "StringMapping";
|
|
3072
|
+
TypeFlags2[TypeFlags2["Reserved1"] = 536870912] = "Reserved1";
|
|
3088
3073
|
TypeFlags2[TypeFlags2["AnyOrUnknown"] = 3] = "AnyOrUnknown";
|
|
3089
3074
|
TypeFlags2[TypeFlags2["Nullable"] = 98304] = "Nullable";
|
|
3090
3075
|
TypeFlags2[TypeFlags2["Literal"] = 2944] = "Literal";
|
|
@@ -3122,6 +3107,7 @@ var TypeFlags = /* @__PURE__ */ ((TypeFlags2) => {
|
|
|
3122
3107
|
TypeFlags2[TypeFlags2["IncludesWildcard"] = 8388608 /* IndexedAccess */] = "IncludesWildcard";
|
|
3123
3108
|
TypeFlags2[TypeFlags2["IncludesEmptyObject"] = 16777216 /* Conditional */] = "IncludesEmptyObject";
|
|
3124
3109
|
TypeFlags2[TypeFlags2["IncludesInstantiable"] = 33554432 /* Substitution */] = "IncludesInstantiable";
|
|
3110
|
+
TypeFlags2[TypeFlags2["IncludesConstrainedTypeVariable"] = 536870912 /* Reserved1 */] = "IncludesConstrainedTypeVariable";
|
|
3125
3111
|
TypeFlags2[TypeFlags2["NotPrimitiveUnion"] = 36323331] = "NotPrimitiveUnion";
|
|
3126
3112
|
return TypeFlags2;
|
|
3127
3113
|
})(TypeFlags || {});
|
|
@@ -3168,6 +3154,7 @@ var ObjectFlags = /* @__PURE__ */ ((ObjectFlags3) => {
|
|
|
3168
3154
|
ObjectFlags3[ObjectFlags3["IsUnknownLikeUnion"] = 67108864] = "IsUnknownLikeUnion";
|
|
3169
3155
|
ObjectFlags3[ObjectFlags3["IsNeverIntersectionComputed"] = 16777216] = "IsNeverIntersectionComputed";
|
|
3170
3156
|
ObjectFlags3[ObjectFlags3["IsNeverIntersection"] = 33554432] = "IsNeverIntersection";
|
|
3157
|
+
ObjectFlags3[ObjectFlags3["IsConstrainedTypeVariable"] = 67108864] = "IsConstrainedTypeVariable";
|
|
3171
3158
|
return ObjectFlags3;
|
|
3172
3159
|
})(ObjectFlags || {});
|
|
3173
3160
|
var SignatureFlags = /* @__PURE__ */ ((SignatureFlags4) => {
|
|
@@ -3934,6 +3921,7 @@ function createSystemWatchFunctions({
|
|
|
3934
3921
|
useNonPollingWatchers,
|
|
3935
3922
|
tscWatchDirectory,
|
|
3936
3923
|
inodeWatching,
|
|
3924
|
+
fsWatchWithTimestamp,
|
|
3937
3925
|
sysLog: sysLog2
|
|
3938
3926
|
}) {
|
|
3939
3927
|
const pollingWatches = /* @__PURE__ */ new Map();
|
|
@@ -4172,7 +4160,7 @@ function createSystemWatchFunctions({
|
|
|
4172
4160
|
return watchPresentFileSystemEntryWithFsWatchFile();
|
|
4173
4161
|
}
|
|
4174
4162
|
try {
|
|
4175
|
-
const presentWatcher = fsWatchWorker(
|
|
4163
|
+
const presentWatcher = (!fsWatchWithTimestamp ? fsWatchWorker : fsWatchWorkerHandlingTimestamp)(
|
|
4176
4164
|
fileOrDirectory,
|
|
4177
4165
|
recursive,
|
|
4178
4166
|
inodeWatching ? callbackChangingToMissingFileSystemEntry : callback
|
|
@@ -4235,6 +4223,18 @@ function createSystemWatchFunctions({
|
|
|
4235
4223
|
);
|
|
4236
4224
|
}
|
|
4237
4225
|
}
|
|
4226
|
+
function fsWatchWorkerHandlingTimestamp(fileOrDirectory, recursive, callback) {
|
|
4227
|
+
let modifiedTime = getModifiedTime2(fileOrDirectory) || missingFileModifiedTime;
|
|
4228
|
+
return fsWatchWorker(fileOrDirectory, recursive, (eventName, relativeFileName, currentModifiedTime) => {
|
|
4229
|
+
if (eventName === "change") {
|
|
4230
|
+
currentModifiedTime || (currentModifiedTime = getModifiedTime2(fileOrDirectory) || missingFileModifiedTime);
|
|
4231
|
+
if (currentModifiedTime.getTime() === modifiedTime.getTime())
|
|
4232
|
+
return;
|
|
4233
|
+
}
|
|
4234
|
+
modifiedTime = currentModifiedTime || getModifiedTime2(fileOrDirectory) || missingFileModifiedTime;
|
|
4235
|
+
callback(eventName, relativeFileName, modifiedTime);
|
|
4236
|
+
});
|
|
4237
|
+
}
|
|
4238
4238
|
}
|
|
4239
4239
|
function patchWriteFileEnsuringDirectory(sys2) {
|
|
4240
4240
|
const originalWriteFile = sys2.writeFile;
|
|
@@ -4263,12 +4263,13 @@ var sys = (() => {
|
|
|
4263
4263
|
let activeSession;
|
|
4264
4264
|
let profilePath = "./profile.cpuprofile";
|
|
4265
4265
|
const Buffer2 = require("buffer").Buffer;
|
|
4266
|
-
const
|
|
4266
|
+
const isMacOs = process.platform === "darwin";
|
|
4267
|
+
const isLinuxOrMacOs = process.platform === "linux" || isMacOs;
|
|
4267
4268
|
const platform = _os.platform();
|
|
4268
4269
|
const useCaseSensitiveFileNames2 = isFileSystemCaseSensitive();
|
|
4269
4270
|
const fsRealpath = !!_fs.realpathSync.native ? process.platform === "win32" ? fsRealPathHandlingLongPath : _fs.realpathSync.native : _fs.realpathSync;
|
|
4270
4271
|
const executingFilePath = __filename.endsWith("sys.js") ? _path.join(_path.dirname(__dirname), "__fake__.js") : __filename;
|
|
4271
|
-
const fsSupportsRecursiveFsWatch = process.platform === "win32" ||
|
|
4272
|
+
const fsSupportsRecursiveFsWatch = process.platform === "win32" || isMacOs;
|
|
4272
4273
|
const getCurrentDirectory = memoize(() => process.cwd());
|
|
4273
4274
|
const { watchFile, watchDirectory } = createSystemWatchFunctions({
|
|
4274
4275
|
pollingWatchFileWorker: fsWatchFileWorker,
|
|
@@ -4288,6 +4289,7 @@ var sys = (() => {
|
|
|
4288
4289
|
useNonPollingWatchers: !!process.env.TSC_NONPOLLING_WATCHER,
|
|
4289
4290
|
tscWatchDirectory: process.env.TSC_WATCHDIRECTORY,
|
|
4290
4291
|
inodeWatching: isLinuxOrMacOs,
|
|
4292
|
+
fsWatchWithTimestamp: isMacOs,
|
|
4291
4293
|
sysLog
|
|
4292
4294
|
});
|
|
4293
4295
|
const nodeSystem = {
|
|
@@ -4310,6 +4312,7 @@ var sys = (() => {
|
|
|
4310
4312
|
resolvePath: (path2) => _path.resolve(path2),
|
|
4311
4313
|
fileExists,
|
|
4312
4314
|
directoryExists,
|
|
4315
|
+
getAccessibleFileSystemEntries,
|
|
4313
4316
|
createDirectory(directoryName) {
|
|
4314
4317
|
if (!nodeSystem.directoryExists(directoryName)) {
|
|
4315
4318
|
try {
|
|
@@ -5314,6 +5317,10 @@ var Diagnostics = {
|
|
|
5314
5317
|
ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled: diag(1286, 1 /* Error */, "ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled_1286", "ESM syntax is not allowed in a CommonJS module when 'verbatimModuleSyntax' is enabled."),
|
|
5315
5318
|
A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled: diag(1287, 1 /* Error */, "A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimM_1287", "A top-level 'export' modifier cannot be used on value declarations in a CommonJS module when 'verbatimModuleSyntax' is enabled."),
|
|
5316
5319
|
An_import_alias_cannot_resolve_to_a_type_or_type_only_declaration_when_verbatimModuleSyntax_is_enabled: diag(1288, 1 /* Error */, "An_import_alias_cannot_resolve_to_a_type_or_type_only_declaration_when_verbatimModuleSyntax_is_enabl_1288", "An import alias cannot resolve to a type or type-only declaration when 'verbatimModuleSyntax' is enabled."),
|
|
5320
|
+
_0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_import_type_where_0_is_imported: diag(1289, 1 /* Error */, "_0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_1289", "'{0}' resolves to a type-only declaration and must be marked type-only in this file before re-exporting when '{1}' is enabled. Consider using 'import type' where '{0}' is imported."),
|
|
5321
|
+
_0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_export_type_0_as_default: diag(1290, 1 /* Error */, "_0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_1290", "'{0}' resolves to a type-only declaration and must be marked type-only in this file before re-exporting when '{1}' is enabled. Consider using 'export type { {0} as default }'."),
|
|
5322
|
+
_0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_import_type_where_0_is_imported: diag(1291, 1 /* Error */, "_0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enable_1291", "'{0}' resolves to a type and must be marked type-only in this file before re-exporting when '{1}' is enabled. Consider using 'import type' where '{0}' is imported."),
|
|
5323
|
+
_0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_export_type_0_as_default: diag(1292, 1 /* Error */, "_0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enable_1292", "'{0}' resolves to a type and must be marked type-only in this file before re-exporting when '{1}' is enabled. Consider using 'export type { {0} as default }'."),
|
|
5317
5324
|
with_statements_are_not_allowed_in_an_async_function_block: diag(1300, 1 /* Error */, "with_statements_are_not_allowed_in_an_async_function_block_1300", "'with' statements are not allowed in an async function block."),
|
|
5318
5325
|
await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules: diag(1308, 1 /* Error */, "await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_1308", "'await' expressions are only allowed within async functions and at the top levels of modules."),
|
|
5319
5326
|
The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level: diag(1309, 1 /* Error */, "The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level_1309", "The current file is a CommonJS module and cannot use 'await' at the top level."),
|
|
@@ -5377,7 +5384,7 @@ var Diagnostics = {
|
|
|
5377
5384
|
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."),
|
|
5378
5385
|
_0_was_imported_here: diag(1376, 3 /* Message */, "_0_was_imported_here_1376", "'{0}' was imported here."),
|
|
5379
5386
|
_0_was_exported_here: diag(1377, 3 /* Message */, "_0_was_exported_here_1377", "'{0}' was exported here."),
|
|
5380
|
-
|
|
5387
|
+
Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_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', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher."),
|
|
5381
5388
|
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'."),
|
|
5382
5389
|
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'."),
|
|
5383
5390
|
Unexpected_token_Did_you_mean_or_rbrace: diag(1381, 1 /* Error */, "Unexpected_token_Did_you_mean_or_rbrace_1381", "Unexpected token. Did you mean `{'}'}` or `}`?"),
|
|
@@ -5428,7 +5435,7 @@ var Diagnostics = {
|
|
|
5428
5435
|
File_redirects_to_file_0: diag(1429, 3 /* Message */, "File_redirects_to_file_0_1429", "File redirects to file '{0}'"),
|
|
5429
5436
|
The_file_is_in_the_program_because_Colon: diag(1430, 3 /* Message */, "The_file_is_in_the_program_because_Colon_1430", "The file is in the program because:"),
|
|
5430
5437
|
for_await_loops_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module: diag(1431, 1 /* Error */, "for_await_loops_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_1431", "'for await' loops are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module."),
|
|
5431
|
-
|
|
5438
|
+
Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher: diag(1432, 1 /* Error */, "Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_nod_1432", "Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher."),
|
|
5432
5439
|
Neither_decorators_nor_modifiers_may_be_applied_to_this_parameters: diag(1433, 1 /* Error */, "Neither_decorators_nor_modifiers_may_be_applied_to_this_parameters_1433", "Neither decorators nor modifiers may be applied to 'this' parameters."),
|
|
5433
5440
|
Unexpected_keyword_or_identifier: diag(1434, 1 /* Error */, "Unexpected_keyword_or_identifier_1434", "Unexpected keyword or identifier."),
|
|
5434
5441
|
Unknown_keyword_or_identifier_Did_you_mean_0: diag(1435, 1 /* Error */, "Unknown_keyword_or_identifier_Did_you_mean_0_1435", "Unknown keyword or identifier. Did you mean '{0}'?"),
|
|
@@ -6011,9 +6018,9 @@ var Diagnostics = {
|
|
|
6011
6018
|
Duplicate_identifier_0_Compiler_reserves_name_1_when_emitting_super_references_in_static_initializers: diag(2818, 1 /* Error */, "Duplicate_identifier_0_Compiler_reserves_name_1_when_emitting_super_references_in_static_initializer_2818", "Duplicate identifier '{0}'. Compiler reserves name '{1}' when emitting 'super' references in static initializers."),
|
|
6012
6019
|
Namespace_name_cannot_be_0: diag(2819, 1 /* Error */, "Namespace_name_cannot_be_0_2819", "Namespace name cannot be '{0}'."),
|
|
6013
6020
|
Type_0_is_not_assignable_to_type_1_Did_you_mean_2: diag(2820, 1 /* Error */, "Type_0_is_not_assignable_to_type_1_Did_you_mean_2_2820", "Type '{0}' is not assignable to type '{1}'. Did you mean '{2}'?"),
|
|
6014
|
-
|
|
6021
|
+
Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_nodenext_or_preserve: diag(2821, 1 /* Error */, "Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_nodenext_or_preserve_2821", "Import assertions are only supported when the '--module' option is set to 'esnext', 'nodenext', or 'preserve'."),
|
|
6015
6022
|
Import_assertions_cannot_be_used_with_type_only_imports_or_exports: diag(2822, 1 /* Error */, "Import_assertions_cannot_be_used_with_type_only_imports_or_exports_2822", "Import assertions cannot be used with type-only imports or exports."),
|
|
6016
|
-
|
|
6023
|
+
Import_attributes_are_only_supported_when_the_module_option_is_set_to_esnext_nodenext_or_preserve: diag(2823, 1 /* Error */, "Import_attributes_are_only_supported_when_the_module_option_is_set_to_esnext_nodenext_or_preserve_2823", "Import attributes are only supported when the '--module' option is set to 'esnext', 'nodenext', or 'preserve'."),
|
|
6017
6024
|
Cannot_find_namespace_0_Did_you_mean_1: diag(2833, 1 /* Error */, "Cannot_find_namespace_0_Did_you_mean_1_2833", "Cannot find namespace '{0}'. Did you mean '{1}'?"),
|
|
6018
6025
|
Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_node16_or_nodenext_Consider_adding_an_extension_to_the_import_path: diag(2834, 1 /* Error */, "Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_n_2834", "Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path."),
|
|
6019
6026
|
Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_node16_or_nodenext_Did_you_mean_0: diag(2835, 1 /* Error */, "Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_n_2835", "Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean '{0}'?"),
|
|
@@ -6033,7 +6040,7 @@ var Diagnostics = {
|
|
|
6033
6040
|
The_initializer_of_an_await_using_declaration_must_be_either_an_object_with_a_Symbol_asyncDispose_or_Symbol_dispose_method_or_be_null_or_undefined: diag(2851, 1 /* Error */, "The_initializer_of_an_await_using_declaration_must_be_either_an_object_with_a_Symbol_asyncDispose_or_2851", "The initializer of an 'await using' declaration must be either an object with a '[Symbol.asyncDispose]()' or '[Symbol.dispose]()' method, or be 'null' or 'undefined'."),
|
|
6034
6041
|
await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules: diag(2852, 1 /* Error */, "await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_2852", "'await using' statements are only allowed within async functions and at the top levels of modules."),
|
|
6035
6042
|
await_using_statements_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(2853, 1 /* Error */, "await_using_statements_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_th_2853", "'await using' statements 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."),
|
|
6036
|
-
|
|
6043
|
+
Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher: diag(2854, 1 /* Error */, "Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_sys_2854", "Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher."),
|
|
6037
6044
|
Class_field_0_defined_by_the_parent_class_is_not_accessible_in_the_child_class_via_super: diag(2855, 1 /* Error */, "Class_field_0_defined_by_the_parent_class_is_not_accessible_in_the_child_class_via_super_2855", "Class field '{0}' defined by the parent class is not accessible in the child class via super."),
|
|
6038
6045
|
Import_attributes_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls: diag(2856, 1 /* Error */, "Import_attributes_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls_2856", "Import attributes are not allowed on statements that compile to CommonJS 'require' calls."),
|
|
6039
6046
|
Import_attributes_cannot_be_used_with_type_only_imports_or_exports: diag(2857, 1 /* Error */, "Import_attributes_cannot_be_used_with_type_only_imports_or_exports_2857", "Import attributes cannot be used with type-only imports or exports."),
|
|
@@ -6044,6 +6051,10 @@ var Diagnostics = {
|
|
|
6044
6051
|
Type_0_is_generic_and_can_only_be_indexed_for_reading: diag(2862, 1 /* Error */, "Type_0_is_generic_and_can_only_be_indexed_for_reading_2862", "Type '{0}' is generic and can only be indexed for reading."),
|
|
6045
6052
|
A_class_cannot_extend_a_primitive_type_like_0_Classes_can_only_extend_constructable_values: diag(2863, 1 /* Error */, "A_class_cannot_extend_a_primitive_type_like_0_Classes_can_only_extend_constructable_values_2863", "A class cannot extend a primitive type like '{0}'. Classes can only extend constructable values."),
|
|
6046
6053
|
A_class_cannot_implement_a_primitive_type_like_0_It_can_only_implement_other_named_object_types: diag(2864, 1 /* Error */, "A_class_cannot_implement_a_primitive_type_like_0_It_can_only_implement_other_named_object_types_2864", "A class cannot implement a primitive type like '{0}'. It can only implement other named object types."),
|
|
6054
|
+
Import_0_conflicts_with_local_value_so_must_be_declared_with_a_type_only_import_when_isolatedModules_is_enabled: diag(2865, 1 /* Error */, "Import_0_conflicts_with_local_value_so_must_be_declared_with_a_type_only_import_when_isolatedModules_2865", "Import '{0}' conflicts with local value, so must be declared with a type-only import when 'isolatedModules' is enabled."),
|
|
6055
|
+
Import_0_conflicts_with_global_value_used_in_this_file_so_must_be_declared_with_a_type_only_import_when_isolatedModules_is_enabled: diag(2866, 1 /* Error */, "Import_0_conflicts_with_global_value_used_in_this_file_so_must_be_declared_with_a_type_only_import_w_2866", "Import '{0}' conflicts with global value used in this file, so must be declared with a type-only import when 'isolatedModules' is enabled."),
|
|
6056
|
+
Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_Bun_Try_npm_i_save_dev_types_Slashbun: diag(2867, 1 /* Error */, "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_Bun_Try_npm_i_save_dev_types_Slashbun_2867", "Cannot find name '{0}'. Do you need to install type definitions for Bun? Try `npm i --save-dev @types/bun`."),
|
|
6057
|
+
Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_Bun_Try_npm_i_save_dev_types_Slashbun_and_then_add_bun_to_the_types_field_in_your_tsconfig: diag(2868, 1 /* Error */, "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_Bun_Try_npm_i_save_dev_types_Slashbun_2868", "Cannot find name '{0}'. Do you need to install type definitions for Bun? Try `npm i --save-dev @types/bun` and then add 'bun' to the types field in your tsconfig."),
|
|
6047
6058
|
Import_declaration_0_is_using_private_name_1: diag(4e3, 1 /* Error */, "Import_declaration_0_is_using_private_name_1_4000", "Import declaration '{0}' is using private name '{1}'."),
|
|
6048
6059
|
Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: diag(4002, 1 /* Error */, "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", "Type parameter '{0}' of exported class has or is using private name '{1}'."),
|
|
6049
6060
|
Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: diag(4004, 1 /* Error */, "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", "Type parameter '{0}' of exported interface has or is using private name '{1}'."),
|
|
@@ -6152,6 +6163,8 @@ var Diagnostics = {
|
|
|
6152
6163
|
This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0: diag(4122, 1 /* Error */, "This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4122", "This member cannot have a JSDoc comment with an '@override' tag because it is not declared in the base class '{0}'."),
|
|
6153
6164
|
This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1: diag(4123, 1 /* Error */, "This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4123", "This member cannot have a JSDoc comment with an 'override' tag because it is not declared in the base class '{0}'. Did you mean '{1}'?"),
|
|
6154
6165
|
Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next: diag(4124, 1 /* Error */, "Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_w_4124", "Compiler option '{0}' of value '{1}' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'."),
|
|
6166
|
+
Each_declaration_of_0_1_differs_in_its_value_where_2_was_expected_but_3_was_given: diag(4125, 1 /* Error */, "Each_declaration_of_0_1_differs_in_its_value_where_2_was_expected_but_3_was_given_4125", "Each declaration of '{0}.{1}' differs in its value, where '{2}' was expected but '{3}' was given."),
|
|
6167
|
+
One_value_of_0_1_is_the_string_2_and_the_other_is_assumed_to_be_an_unknown_numeric_value: diag(4126, 1 /* Error */, "One_value_of_0_1_is_the_string_2_and_the_other_is_assumed_to_be_an_unknown_numeric_value_4126", "One value of '{0}.{1}' is the string '{2}', and the other is assumed to be an unknown numeric value."),
|
|
6155
6168
|
The_current_host_does_not_support_the_0_option: diag(5001, 1 /* Error */, "The_current_host_does_not_support_the_0_option_5001", "The current host does not support the '{0}' option."),
|
|
6156
6169
|
Cannot_find_the_common_subdirectory_path_for_the_input_files: diag(5009, 1 /* Error */, "Cannot_find_the_common_subdirectory_path_for_the_input_files_5009", "Cannot find the common subdirectory path for the input files."),
|
|
6157
6170
|
File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0: diag(5010, 1 /* Error */, "File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0_5010", "File specification cannot end in a recursive directory wildcard ('**'): '{0}'."),
|
|
@@ -6183,7 +6196,7 @@ var Diagnostics = {
|
|
|
6183
6196
|
Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript_files_Learn_more_at_https_Colon_Slash_Slashaka_ms_Slashtsconfig: diag(5068, 1 /* Error */, "Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript__5068", "Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig."),
|
|
6184
6197
|
Option_0_cannot_be_specified_without_specifying_option_1_or_option_2: diag(5069, 1 /* Error */, "Option_0_cannot_be_specified_without_specifying_option_1_or_option_2_5069", "Option '{0}' cannot be specified without specifying option '{1}' or option '{2}'."),
|
|
6185
6198
|
Option_resolveJsonModule_cannot_be_specified_when_moduleResolution_is_set_to_classic: diag(5070, 1 /* Error */, "Option_resolveJsonModule_cannot_be_specified_when_moduleResolution_is_set_to_classic_5070", "Option '--resolveJsonModule' cannot be specified when 'moduleResolution' is set to 'classic'."),
|
|
6186
|
-
|
|
6199
|
+
Option_resolveJsonModule_cannot_be_specified_when_module_is_set_to_none_system_or_umd: diag(5071, 1 /* Error */, "Option_resolveJsonModule_cannot_be_specified_when_module_is_set_to_none_system_or_umd_5071", "Option '--resolveJsonModule' cannot be specified when 'module' is set to 'none', 'system', or 'umd'."),
|
|
6187
6200
|
Unknown_build_option_0: diag(5072, 1 /* Error */, "Unknown_build_option_0_5072", "Unknown build option '{0}'."),
|
|
6188
6201
|
Build_option_0_requires_a_value_of_type_1: diag(5073, 1 /* Error */, "Build_option_0_requires_a_value_of_type_1_5073", "Build option '{0}' requires a value of type {1}."),
|
|
6189
6202
|
Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBuildInfoFile_is_specified: diag(5074, 1 /* Error */, "Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBui_5074", "Option '--incremental' can only be specified using tsconfig, emitting to single file or when option '--tsBuildInfoFile' is specified."),
|
|
@@ -6206,7 +6219,7 @@ var Diagnostics = {
|
|
|
6206
6219
|
The_root_value_of_a_0_file_must_be_an_object: diag(5092, 1 /* Error */, "The_root_value_of_a_0_file_must_be_an_object_5092", "The root value of a '{0}' file must be an object."),
|
|
6207
6220
|
Compiler_option_0_may_only_be_used_with_build: diag(5093, 1 /* Error */, "Compiler_option_0_may_only_be_used_with_build_5093", "Compiler option '--{0}' may only be used with '--build'."),
|
|
6208
6221
|
Compiler_option_0_may_not_be_used_with_build: diag(5094, 1 /* Error */, "Compiler_option_0_may_not_be_used_with_build_5094", "Compiler option '--{0}' may not be used with '--build'."),
|
|
6209
|
-
|
|
6222
|
+
Option_0_can_only_be_used_when_module_is_set_to_preserve_or_to_es2015_or_later: diag(5095, 1 /* Error */, "Option_0_can_only_be_used_when_module_is_set_to_preserve_or_to_es2015_or_later_5095", "Option '{0}' can only be used when 'module' is set to 'preserve' or to 'es2015' or later."),
|
|
6210
6223
|
Option_allowImportingTsExtensions_can_only_be_used_when_either_noEmit_or_emitDeclarationOnly_is_set: diag(5096, 1 /* Error */, "Option_allowImportingTsExtensions_can_only_be_used_when_either_noEmit_or_emitDeclarationOnly_is_set_5096", "Option 'allowImportingTsExtensions' can only be used when either 'noEmit' or 'emitDeclarationOnly' is set."),
|
|
6211
6224
|
An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled: diag(5097, 1 /* Error */, "An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled_5097", "An import path can only end with a '{0}' extension when 'allowImportingTsExtensions' is enabled."),
|
|
6212
6225
|
Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler: diag(5098, 1 /* Error */, "Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler_5098", "Option '{0}' can only be used when 'moduleResolution' is set to 'node16', 'nodenext', or 'bundler'."),
|
|
@@ -6286,7 +6299,6 @@ var Diagnostics = {
|
|
|
6286
6299
|
Disallow_inconsistently_cased_references_to_the_same_file: diag(6078, 3 /* Message */, "Disallow_inconsistently_cased_references_to_the_same_file_6078", "Disallow inconsistently-cased references to the same file."),
|
|
6287
6300
|
Specify_library_files_to_be_included_in_the_compilation: diag(6079, 3 /* Message */, "Specify_library_files_to_be_included_in_the_compilation_6079", "Specify library files to be included in the compilation."),
|
|
6288
6301
|
Specify_JSX_code_generation: diag(6080, 3 /* Message */, "Specify_JSX_code_generation_6080", "Specify JSX code generation."),
|
|
6289
|
-
File_0_has_an_unsupported_extension_so_skipping_it: diag(6081, 3 /* Message */, "File_0_has_an_unsupported_extension_so_skipping_it_6081", "File '{0}' has an unsupported extension, so skipping it."),
|
|
6290
6302
|
Only_amd_and_system_modules_are_supported_alongside_0: diag(6082, 1 /* Error */, "Only_amd_and_system_modules_are_supported_alongside_0_6082", "Only 'amd' and 'system' modules are supported alongside --{0}."),
|
|
6291
6303
|
Base_directory_to_resolve_non_absolute_module_names: diag(6083, 3 /* Message */, "Base_directory_to_resolve_non_absolute_module_names_6083", "Base directory to resolve non-absolute module names."),
|
|
6292
6304
|
Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react_JSX_emit: diag(6084, 3 /* Message */, "Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react__6084", "[Deprecated] Use '--jsxFactory' instead. Specify the object invoked for createElement when targeting 'react' JSX emit"),
|
|
@@ -6507,6 +6519,8 @@ var Diagnostics = {
|
|
|
6507
6519
|
Export_specifier_0_does_not_exist_in_package_json_scope_at_path_1: diag(6276, 3 /* Message */, "Export_specifier_0_does_not_exist_in_package_json_scope_at_path_1_6276", "Export specifier '{0}' does not exist in package.json scope at path '{1}'."),
|
|
6508
6520
|
Resolution_of_non_relative_name_failed_trying_with_modern_Node_resolution_features_disabled_to_see_if_npm_library_needs_configuration_update: diag(6277, 3 /* Message */, "Resolution_of_non_relative_name_failed_trying_with_modern_Node_resolution_features_disabled_to_see_i_6277", "Resolution of non-relative name failed; trying with modern Node resolution features disabled to see if npm library needs configuration update."),
|
|
6509
6521
|
There_are_types_at_0_but_this_result_could_not_be_resolved_when_respecting_package_json_exports_The_1_library_may_need_to_update_its_package_json_or_typings: diag(6278, 3 /* Message */, "There_are_types_at_0_but_this_result_could_not_be_resolved_when_respecting_package_json_exports_The__6278", `There are types at '{0}', but this result could not be resolved when respecting package.json "exports". The '{1}' library may need to update its package.json or typings.`),
|
|
6522
|
+
Resolution_of_non_relative_name_failed_trying_with_moduleResolution_bundler_to_see_if_project_may_need_configuration_update: diag(6279, 3 /* Message */, "Resolution_of_non_relative_name_failed_trying_with_moduleResolution_bundler_to_see_if_project_may_ne_6279", "Resolution of non-relative name failed; trying with '--moduleResolution bundler' to see if project may need configuration update."),
|
|
6523
|
+
There_are_types_at_0_but_this_result_could_not_be_resolved_under_your_current_moduleResolution_setting_Consider_updating_to_node16_nodenext_or_bundler: diag(6280, 3 /* Message */, "There_are_types_at_0_but_this_result_could_not_be_resolved_under_your_current_moduleResolution_setti_6280", "There are types at '{0}', but this result could not be resolved under your current 'moduleResolution' setting. Consider updating to 'node16', 'nodenext', or 'bundler'."),
|
|
6510
6524
|
Enable_project_compilation: diag(6302, 3 /* Message */, "Enable_project_compilation_6302", "Enable project compilation"),
|
|
6511
6525
|
Composite_projects_may_not_disable_declaration_emit: diag(6304, 1 /* Error */, "Composite_projects_may_not_disable_declaration_emit_6304", "Composite projects may not disable declaration emit."),
|
|
6512
6526
|
Output_file_0_has_not_been_built_from_source_file_1: diag(6305, 1 /* Error */, "Output_file_0_has_not_been_built_from_source_file_1_6305", "Output file '{0}' has not been built from source file '{1}'."),
|
|
@@ -7124,6 +7138,12 @@ var Diagnostics = {
|
|
|
7124
7138
|
Could_not_find_variable_to_inline: diag(95185, 3 /* Message */, "Could_not_find_variable_to_inline_95185", "Could not find variable to inline."),
|
|
7125
7139
|
Variables_with_multiple_declarations_cannot_be_inlined: diag(95186, 3 /* Message */, "Variables_with_multiple_declarations_cannot_be_inlined_95186", "Variables with multiple declarations cannot be inlined."),
|
|
7126
7140
|
Add_missing_comma_for_object_member_completion_0: diag(95187, 3 /* Message */, "Add_missing_comma_for_object_member_completion_0_95187", "Add missing comma for object member completion '{0}'."),
|
|
7141
|
+
Add_missing_parameter_to_0: diag(95188, 3 /* Message */, "Add_missing_parameter_to_0_95188", "Add missing parameter to '{0}'"),
|
|
7142
|
+
Add_missing_parameters_to_0: diag(95189, 3 /* Message */, "Add_missing_parameters_to_0_95189", "Add missing parameters to '{0}'"),
|
|
7143
|
+
Add_all_missing_parameters: diag(95190, 3 /* Message */, "Add_all_missing_parameters_95190", "Add all missing parameters"),
|
|
7144
|
+
Add_optional_parameter_to_0: diag(95191, 3 /* Message */, "Add_optional_parameter_to_0_95191", "Add optional parameter to '{0}'"),
|
|
7145
|
+
Add_optional_parameters_to_0: diag(95192, 3 /* Message */, "Add_optional_parameters_to_0_95192", "Add optional parameters to '{0}'"),
|
|
7146
|
+
Add_all_optional_parameters: diag(95193, 3 /* Message */, "Add_all_optional_parameters_95193", "Add all optional parameters"),
|
|
7127
7147
|
No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer: diag(18004, 1 /* Error */, "No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer_18004", "No value exists in scope for the shorthand property '{0}'. Either declare one or provide an initializer."),
|
|
7128
7148
|
Classes_may_not_have_a_field_named_constructor: diag(18006, 1 /* Error */, "Classes_may_not_have_a_field_named_constructor_18006", "Classes may not have a field named 'constructor'."),
|
|
7129
7149
|
JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array: diag(18007, 1 /* Error */, "JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array_18007", "JSX expressions may not use the comma operator. Did you mean to write an array?"),
|
|
@@ -8416,7 +8436,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
|
|
|
8416
8436
|
}
|
|
8417
8437
|
const ch = codePointAt(text, pos);
|
|
8418
8438
|
if (pos === 0) {
|
|
8419
|
-
if (
|
|
8439
|
+
if (text.slice(0, 256).includes("\uFFFD")) {
|
|
8420
8440
|
error(Diagnostics.File_appears_to_be_binary);
|
|
8421
8441
|
pos = end;
|
|
8422
8442
|
return token = 8 /* NonTextFileMarkerTrivia */;
|
|
@@ -10576,12 +10596,12 @@ function canHaveJSDoc(node) {
|
|
|
10576
10596
|
function getJSDocCommentsAndTags(hostNode, noCache) {
|
|
10577
10597
|
let result;
|
|
10578
10598
|
if (isVariableLike(hostNode) && hasInitializer(hostNode) && hasJSDocNodes(hostNode.initializer)) {
|
|
10579
|
-
result = addRange(result, filterOwnedJSDocTags(hostNode,
|
|
10599
|
+
result = addRange(result, filterOwnedJSDocTags(hostNode, hostNode.initializer.jsDoc));
|
|
10580
10600
|
}
|
|
10581
10601
|
let node = hostNode;
|
|
10582
10602
|
while (node && node.parent) {
|
|
10583
10603
|
if (hasJSDocNodes(node)) {
|
|
10584
|
-
result = addRange(result, filterOwnedJSDocTags(hostNode,
|
|
10604
|
+
result = addRange(result, filterOwnedJSDocTags(hostNode, node.jsDoc));
|
|
10585
10605
|
}
|
|
10586
10606
|
if (node.kind === 169 /* Parameter */) {
|
|
10587
10607
|
result = addRange(result, (noCache ? getJSDocParameterTagsNoCache : getJSDocParameterTags)(node));
|
|
@@ -10595,12 +10615,16 @@ function getJSDocCommentsAndTags(hostNode, noCache) {
|
|
|
10595
10615
|
}
|
|
10596
10616
|
return result || emptyArray;
|
|
10597
10617
|
}
|
|
10598
|
-
function filterOwnedJSDocTags(hostNode,
|
|
10599
|
-
|
|
10600
|
-
|
|
10601
|
-
|
|
10602
|
-
|
|
10603
|
-
|
|
10618
|
+
function filterOwnedJSDocTags(hostNode, comments) {
|
|
10619
|
+
const lastJsDoc = last(comments);
|
|
10620
|
+
return flatMap(comments, (jsDoc) => {
|
|
10621
|
+
if (jsDoc === lastJsDoc) {
|
|
10622
|
+
const ownedTags = filter(jsDoc.tags, (tag) => ownsJSDocTag(hostNode, tag));
|
|
10623
|
+
return jsDoc.tags === ownedTags ? [jsDoc] : ownedTags;
|
|
10624
|
+
} else {
|
|
10625
|
+
return filter(jsDoc.tags, isJSDocOverloadTag);
|
|
10626
|
+
}
|
|
10627
|
+
});
|
|
10604
10628
|
}
|
|
10605
10629
|
function ownsJSDocTag(hostNode, tag) {
|
|
10606
10630
|
return !(isJSDocTypeTag(tag) || isJSDocSatisfiesTag(tag)) || !tag.parent || !isJSDoc(tag.parent) || !isParenthesizedExpression(tag.parent.parent) || tag.parent.parent === hostNode;
|
|
@@ -11114,7 +11138,7 @@ function Symbol4(flags, name) {
|
|
|
11114
11138
|
this.exportSymbol = void 0;
|
|
11115
11139
|
this.constEnumOnlyModule = void 0;
|
|
11116
11140
|
this.isReferenced = void 0;
|
|
11117
|
-
this.
|
|
11141
|
+
this.lastAssignmentPos = void 0;
|
|
11118
11142
|
this.links = void 0;
|
|
11119
11143
|
}
|
|
11120
11144
|
function Type3(checker, flags) {
|
|
@@ -11287,46 +11311,237 @@ function createCompilerDiagnostic(message, ...args) {
|
|
|
11287
11311
|
function getLanguageVariant(scriptKind) {
|
|
11288
11312
|
return scriptKind === 4 /* TSX */ || scriptKind === 2 /* JSX */ || scriptKind === 1 /* JS */ || scriptKind === 6 /* JSON */ ? 1 /* JSX */ : 0 /* Standard */;
|
|
11289
11313
|
}
|
|
11290
|
-
function
|
|
11291
|
-
return
|
|
11292
|
-
}
|
|
11293
|
-
function getEmitModuleKind(compilerOptions) {
|
|
11294
|
-
return typeof compilerOptions.module === "number" ? compilerOptions.module : getEmitScriptTarget(compilerOptions) >= 2 /* ES2015 */ ? 5 /* ES2015 */ : 1 /* CommonJS */;
|
|
11314
|
+
function createComputedCompilerOptions(options) {
|
|
11315
|
+
return options;
|
|
11295
11316
|
}
|
|
11296
|
-
|
|
11297
|
-
|
|
11298
|
-
|
|
11299
|
-
|
|
11300
|
-
|
|
11301
|
-
|
|
11302
|
-
|
|
11303
|
-
|
|
11304
|
-
|
|
11305
|
-
|
|
11306
|
-
|
|
11307
|
-
|
|
11308
|
-
|
|
11309
|
-
|
|
11310
|
-
|
|
11311
|
-
|
|
11317
|
+
var computedOptions = createComputedCompilerOptions({
|
|
11318
|
+
target: {
|
|
11319
|
+
dependencies: ["module"],
|
|
11320
|
+
computeValue: (compilerOptions) => {
|
|
11321
|
+
return compilerOptions.target ?? (compilerOptions.module === 100 /* Node16 */ && 9 /* ES2022 */ || compilerOptions.module === 199 /* NodeNext */ && 99 /* ESNext */ || 1 /* ES5 */);
|
|
11322
|
+
}
|
|
11323
|
+
},
|
|
11324
|
+
module: {
|
|
11325
|
+
dependencies: ["target"],
|
|
11326
|
+
computeValue: (compilerOptions) => {
|
|
11327
|
+
return typeof compilerOptions.module === "number" ? compilerOptions.module : computedOptions.target.computeValue(compilerOptions) >= 2 /* ES2015 */ ? 5 /* ES2015 */ : 1 /* CommonJS */;
|
|
11328
|
+
}
|
|
11329
|
+
},
|
|
11330
|
+
moduleResolution: {
|
|
11331
|
+
dependencies: ["module", "target"],
|
|
11332
|
+
computeValue: (compilerOptions) => {
|
|
11333
|
+
let moduleResolution = compilerOptions.moduleResolution;
|
|
11334
|
+
if (moduleResolution === void 0) {
|
|
11335
|
+
switch (computedOptions.module.computeValue(compilerOptions)) {
|
|
11336
|
+
case 1 /* CommonJS */:
|
|
11337
|
+
moduleResolution = 2 /* Node10 */;
|
|
11338
|
+
break;
|
|
11339
|
+
case 100 /* Node16 */:
|
|
11340
|
+
moduleResolution = 3 /* Node16 */;
|
|
11341
|
+
break;
|
|
11342
|
+
case 199 /* NodeNext */:
|
|
11343
|
+
moduleResolution = 99 /* NodeNext */;
|
|
11344
|
+
break;
|
|
11345
|
+
case 200 /* Preserve */:
|
|
11346
|
+
moduleResolution = 100 /* Bundler */;
|
|
11347
|
+
break;
|
|
11348
|
+
default:
|
|
11349
|
+
moduleResolution = 1 /* Classic */;
|
|
11350
|
+
break;
|
|
11351
|
+
}
|
|
11352
|
+
}
|
|
11353
|
+
return moduleResolution;
|
|
11354
|
+
}
|
|
11355
|
+
},
|
|
11356
|
+
moduleDetection: {
|
|
11357
|
+
dependencies: ["module", "target"],
|
|
11358
|
+
computeValue: (compilerOptions) => {
|
|
11359
|
+
return compilerOptions.moduleDetection || (computedOptions.module.computeValue(compilerOptions) === 100 /* Node16 */ || computedOptions.module.computeValue(compilerOptions) === 199 /* NodeNext */ ? 3 /* Force */ : 2 /* Auto */);
|
|
11360
|
+
}
|
|
11361
|
+
},
|
|
11362
|
+
isolatedModules: {
|
|
11363
|
+
dependencies: ["verbatimModuleSyntax"],
|
|
11364
|
+
computeValue: (compilerOptions) => {
|
|
11365
|
+
return !!(compilerOptions.isolatedModules || compilerOptions.verbatimModuleSyntax);
|
|
11366
|
+
}
|
|
11367
|
+
},
|
|
11368
|
+
esModuleInterop: {
|
|
11369
|
+
dependencies: ["module", "target"],
|
|
11370
|
+
computeValue: (compilerOptions) => {
|
|
11371
|
+
if (compilerOptions.esModuleInterop !== void 0) {
|
|
11372
|
+
return compilerOptions.esModuleInterop;
|
|
11373
|
+
}
|
|
11374
|
+
switch (computedOptions.module.computeValue(compilerOptions)) {
|
|
11375
|
+
case 100 /* Node16 */:
|
|
11376
|
+
case 199 /* NodeNext */:
|
|
11377
|
+
case 200 /* Preserve */:
|
|
11378
|
+
return true;
|
|
11379
|
+
}
|
|
11380
|
+
return false;
|
|
11381
|
+
}
|
|
11382
|
+
},
|
|
11383
|
+
allowSyntheticDefaultImports: {
|
|
11384
|
+
dependencies: ["module", "target", "moduleResolution"],
|
|
11385
|
+
computeValue: (compilerOptions) => {
|
|
11386
|
+
if (compilerOptions.allowSyntheticDefaultImports !== void 0) {
|
|
11387
|
+
return compilerOptions.allowSyntheticDefaultImports;
|
|
11388
|
+
}
|
|
11389
|
+
return computedOptions.esModuleInterop.computeValue(compilerOptions) || computedOptions.module.computeValue(compilerOptions) === 4 /* System */ || computedOptions.moduleResolution.computeValue(compilerOptions) === 100 /* Bundler */;
|
|
11390
|
+
}
|
|
11391
|
+
},
|
|
11392
|
+
resolvePackageJsonExports: {
|
|
11393
|
+
dependencies: ["moduleResolution"],
|
|
11394
|
+
computeValue: (compilerOptions) => {
|
|
11395
|
+
const moduleResolution = computedOptions.moduleResolution.computeValue(compilerOptions);
|
|
11396
|
+
if (!moduleResolutionSupportsPackageJsonExportsAndImports(moduleResolution)) {
|
|
11397
|
+
return false;
|
|
11398
|
+
}
|
|
11399
|
+
if (compilerOptions.resolvePackageJsonExports !== void 0) {
|
|
11400
|
+
return compilerOptions.resolvePackageJsonExports;
|
|
11401
|
+
}
|
|
11402
|
+
switch (moduleResolution) {
|
|
11403
|
+
case 3 /* Node16 */:
|
|
11404
|
+
case 99 /* NodeNext */:
|
|
11405
|
+
case 100 /* Bundler */:
|
|
11406
|
+
return true;
|
|
11407
|
+
}
|
|
11408
|
+
return false;
|
|
11409
|
+
}
|
|
11410
|
+
},
|
|
11411
|
+
resolvePackageJsonImports: {
|
|
11412
|
+
dependencies: ["moduleResolution", "resolvePackageJsonExports"],
|
|
11413
|
+
computeValue: (compilerOptions) => {
|
|
11414
|
+
const moduleResolution = computedOptions.moduleResolution.computeValue(compilerOptions);
|
|
11415
|
+
if (!moduleResolutionSupportsPackageJsonExportsAndImports(moduleResolution)) {
|
|
11416
|
+
return false;
|
|
11417
|
+
}
|
|
11418
|
+
if (compilerOptions.resolvePackageJsonExports !== void 0) {
|
|
11419
|
+
return compilerOptions.resolvePackageJsonExports;
|
|
11420
|
+
}
|
|
11421
|
+
switch (moduleResolution) {
|
|
11422
|
+
case 3 /* Node16 */:
|
|
11423
|
+
case 99 /* NodeNext */:
|
|
11424
|
+
case 100 /* Bundler */:
|
|
11425
|
+
return true;
|
|
11426
|
+
}
|
|
11427
|
+
return false;
|
|
11428
|
+
}
|
|
11429
|
+
},
|
|
11430
|
+
resolveJsonModule: {
|
|
11431
|
+
dependencies: ["moduleResolution", "module", "target"],
|
|
11432
|
+
computeValue: (compilerOptions) => {
|
|
11433
|
+
if (compilerOptions.resolveJsonModule !== void 0) {
|
|
11434
|
+
return compilerOptions.resolveJsonModule;
|
|
11435
|
+
}
|
|
11436
|
+
return computedOptions.moduleResolution.computeValue(compilerOptions) === 100 /* Bundler */;
|
|
11437
|
+
}
|
|
11438
|
+
},
|
|
11439
|
+
declaration: {
|
|
11440
|
+
dependencies: ["composite"],
|
|
11441
|
+
computeValue: (compilerOptions) => {
|
|
11442
|
+
return !!(compilerOptions.declaration || compilerOptions.composite);
|
|
11443
|
+
}
|
|
11444
|
+
},
|
|
11445
|
+
preserveConstEnums: {
|
|
11446
|
+
dependencies: ["isolatedModules", "verbatimModuleSyntax"],
|
|
11447
|
+
computeValue: (compilerOptions) => {
|
|
11448
|
+
return !!(compilerOptions.preserveConstEnums || computedOptions.isolatedModules.computeValue(compilerOptions));
|
|
11449
|
+
}
|
|
11450
|
+
},
|
|
11451
|
+
incremental: {
|
|
11452
|
+
dependencies: ["composite"],
|
|
11453
|
+
computeValue: (compilerOptions) => {
|
|
11454
|
+
return !!(compilerOptions.incremental || compilerOptions.composite);
|
|
11455
|
+
}
|
|
11456
|
+
},
|
|
11457
|
+
declarationMap: {
|
|
11458
|
+
dependencies: ["declaration", "composite"],
|
|
11459
|
+
computeValue: (compilerOptions) => {
|
|
11460
|
+
return !!(compilerOptions.declarationMap && computedOptions.declaration.computeValue(compilerOptions));
|
|
11461
|
+
}
|
|
11462
|
+
},
|
|
11463
|
+
allowJs: {
|
|
11464
|
+
dependencies: ["checkJs"],
|
|
11465
|
+
computeValue: (compilerOptions) => {
|
|
11466
|
+
return compilerOptions.allowJs === void 0 ? !!compilerOptions.checkJs : compilerOptions.allowJs;
|
|
11467
|
+
}
|
|
11468
|
+
},
|
|
11469
|
+
useDefineForClassFields: {
|
|
11470
|
+
dependencies: ["target", "module"],
|
|
11471
|
+
computeValue: (compilerOptions) => {
|
|
11472
|
+
return compilerOptions.useDefineForClassFields === void 0 ? computedOptions.target.computeValue(compilerOptions) >= 9 /* ES2022 */ : compilerOptions.useDefineForClassFields;
|
|
11473
|
+
}
|
|
11474
|
+
},
|
|
11475
|
+
noImplicitAny: {
|
|
11476
|
+
dependencies: ["strict"],
|
|
11477
|
+
computeValue: (compilerOptions) => {
|
|
11478
|
+
return getStrictOptionValue(compilerOptions, "noImplicitAny");
|
|
11479
|
+
}
|
|
11480
|
+
},
|
|
11481
|
+
noImplicitThis: {
|
|
11482
|
+
dependencies: ["strict"],
|
|
11483
|
+
computeValue: (compilerOptions) => {
|
|
11484
|
+
return getStrictOptionValue(compilerOptions, "noImplicitThis");
|
|
11485
|
+
}
|
|
11486
|
+
},
|
|
11487
|
+
strictNullChecks: {
|
|
11488
|
+
dependencies: ["strict"],
|
|
11489
|
+
computeValue: (compilerOptions) => {
|
|
11490
|
+
return getStrictOptionValue(compilerOptions, "strictNullChecks");
|
|
11491
|
+
}
|
|
11492
|
+
},
|
|
11493
|
+
strictFunctionTypes: {
|
|
11494
|
+
dependencies: ["strict"],
|
|
11495
|
+
computeValue: (compilerOptions) => {
|
|
11496
|
+
return getStrictOptionValue(compilerOptions, "strictFunctionTypes");
|
|
11497
|
+
}
|
|
11498
|
+
},
|
|
11499
|
+
strictBindCallApply: {
|
|
11500
|
+
dependencies: ["strict"],
|
|
11501
|
+
computeValue: (compilerOptions) => {
|
|
11502
|
+
return getStrictOptionValue(compilerOptions, "strictBindCallApply");
|
|
11503
|
+
}
|
|
11504
|
+
},
|
|
11505
|
+
strictPropertyInitialization: {
|
|
11506
|
+
dependencies: ["strict"],
|
|
11507
|
+
computeValue: (compilerOptions) => {
|
|
11508
|
+
return getStrictOptionValue(compilerOptions, "strictPropertyInitialization");
|
|
11509
|
+
}
|
|
11510
|
+
},
|
|
11511
|
+
alwaysStrict: {
|
|
11512
|
+
dependencies: ["strict"],
|
|
11513
|
+
computeValue: (compilerOptions) => {
|
|
11514
|
+
return getStrictOptionValue(compilerOptions, "alwaysStrict");
|
|
11515
|
+
}
|
|
11516
|
+
},
|
|
11517
|
+
useUnknownInCatchVariables: {
|
|
11518
|
+
dependencies: ["strict"],
|
|
11519
|
+
computeValue: (compilerOptions) => {
|
|
11520
|
+
return getStrictOptionValue(compilerOptions, "useUnknownInCatchVariables");
|
|
11312
11521
|
}
|
|
11313
11522
|
}
|
|
11314
|
-
|
|
11315
|
-
|
|
11316
|
-
|
|
11317
|
-
|
|
11318
|
-
|
|
11523
|
+
});
|
|
11524
|
+
var getEmitScriptTarget = computedOptions.target.computeValue;
|
|
11525
|
+
var getEmitModuleKind = computedOptions.module.computeValue;
|
|
11526
|
+
var getEmitModuleResolutionKind = computedOptions.moduleResolution.computeValue;
|
|
11527
|
+
var getEmitModuleDetectionKind = computedOptions.moduleDetection.computeValue;
|
|
11528
|
+
var getIsolatedModules = computedOptions.isolatedModules.computeValue;
|
|
11529
|
+
var getESModuleInterop = computedOptions.esModuleInterop.computeValue;
|
|
11530
|
+
var getAllowSyntheticDefaultImports = computedOptions.allowSyntheticDefaultImports.computeValue;
|
|
11531
|
+
var getResolvePackageJsonExports = computedOptions.resolvePackageJsonExports.computeValue;
|
|
11532
|
+
var getResolvePackageJsonImports = computedOptions.resolvePackageJsonImports.computeValue;
|
|
11533
|
+
var getResolveJsonModule = computedOptions.resolveJsonModule.computeValue;
|
|
11534
|
+
var getEmitDeclarations = computedOptions.declaration.computeValue;
|
|
11535
|
+
var shouldPreserveConstEnums = computedOptions.preserveConstEnums.computeValue;
|
|
11536
|
+
var isIncrementalCompilation = computedOptions.incremental.computeValue;
|
|
11537
|
+
var getAreDeclarationMapsEnabled = computedOptions.declarationMap.computeValue;
|
|
11538
|
+
var getAllowJSCompilerOption = computedOptions.allowJs.computeValue;
|
|
11539
|
+
var getUseDefineForClassFields = computedOptions.useDefineForClassFields.computeValue;
|
|
11319
11540
|
function moduleResolutionSupportsPackageJsonExportsAndImports(moduleResolution) {
|
|
11320
11541
|
return moduleResolution >= 3 /* Node16 */ && moduleResolution <= 99 /* NodeNext */ || moduleResolution === 100 /* Bundler */;
|
|
11321
11542
|
}
|
|
11322
|
-
function
|
|
11323
|
-
|
|
11324
|
-
return compilerOptions.resolveJsonModule;
|
|
11325
|
-
}
|
|
11326
|
-
return getEmitModuleResolutionKind(compilerOptions) === 100 /* Bundler */;
|
|
11327
|
-
}
|
|
11328
|
-
function getAllowJSCompilerOption(compilerOptions) {
|
|
11329
|
-
return compilerOptions.allowJs === void 0 ? !!compilerOptions.checkJs : compilerOptions.allowJs;
|
|
11543
|
+
function getStrictOptionValue(compilerOptions, flag) {
|
|
11544
|
+
return compilerOptions[flag] === void 0 ? !!compilerOptions.strict : !!compilerOptions[flag];
|
|
11330
11545
|
}
|
|
11331
11546
|
var reservedCharacterPattern = /[^\w\s/]/g;
|
|
11332
11547
|
var wildcardCharCodes = [42 /* asterisk */, 63 /* question */];
|
|
@@ -11384,7 +11599,7 @@ function getRegularExpressionsForWildcards(specs, basePath, usage) {
|
|
|
11384
11599
|
function isImplicitGlob(lastPathComponent) {
|
|
11385
11600
|
return !/[.*?]/.test(lastPathComponent);
|
|
11386
11601
|
}
|
|
11387
|
-
function getSubPatternFromSpec(spec, basePath, usage, { singleAsteriskRegexFragment, doubleAsteriskRegexFragment, replaceWildcardCharacter: replaceWildcardCharacter2 }) {
|
|
11602
|
+
function getSubPatternFromSpec(spec, basePath, usage, { singleAsteriskRegexFragment, doubleAsteriskRegexFragment, replaceWildcardCharacter: replaceWildcardCharacter2 } = wildcardMatchers[usage]) {
|
|
11388
11603
|
let subpattern = "";
|
|
11389
11604
|
let hasWrittenComponent = false;
|
|
11390
11605
|
const components = getNormalizedPathComponents(spec, basePath);
|
|
@@ -11739,6 +11954,10 @@ function getEscapedTextOfJsxNamespacedName(node) {
|
|
|
11739
11954
|
function getTextOfJsxNamespacedName(node) {
|
|
11740
11955
|
return `${idText(node.namespace)}:${idText(node.name)}`;
|
|
11741
11956
|
}
|
|
11957
|
+
var stringReplace = String.prototype.replace;
|
|
11958
|
+
function replaceFirstStar(s, replacement) {
|
|
11959
|
+
return stringReplace.call(s, "*", replacement);
|
|
11960
|
+
}
|
|
11742
11961
|
|
|
11743
11962
|
// src/compiler/factory/baseNodeFactory.ts
|
|
11744
11963
|
function createBaseNodeFactory() {
|
|
@@ -12334,7 +12553,7 @@ var nullNodeConverters = {
|
|
|
12334
12553
|
var nextAutoGenerateId = 0;
|
|
12335
12554
|
var nodeFactoryPatchers = [];
|
|
12336
12555
|
function createNodeFactory(flags, baseFactory2) {
|
|
12337
|
-
const
|
|
12556
|
+
const setOriginal = flags & 8 /* NoOriginalNode */ ? identity : setOriginalNode;
|
|
12338
12557
|
const parenthesizerRules = memoize(() => flags & 1 /* NoParenthesizerRules */ ? nullParenthesizerRules : createParenthesizerRules(factory2));
|
|
12339
12558
|
const converters = memoize(() => flags & 2 /* NoNodeConverters */ ? nullNodeConverters : createNodeConverters(factory2));
|
|
12340
12559
|
const getBinaryCreateFunction = memoizeOne((operator) => (left, right) => createBinaryExpression(left, operator, right));
|
|
@@ -13041,8 +13260,10 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
13041
13260
|
return update(updated, original);
|
|
13042
13261
|
}
|
|
13043
13262
|
function createNumericLiteral(value, numericLiteralFlags = 0 /* None */) {
|
|
13263
|
+
const text = typeof value === "number" ? value + "" : value;
|
|
13264
|
+
Debug.assert(text.charCodeAt(0) !== 45 /* minus */, "Negative numbers should be created in combination with createPrefixUnaryExpression");
|
|
13044
13265
|
const node = createBaseDeclaration(9 /* NumericLiteral */);
|
|
13045
|
-
node.text =
|
|
13266
|
+
node.text = text;
|
|
13046
13267
|
node.numericLiteralFlags = numericLiteralFlags;
|
|
13047
13268
|
if (numericLiteralFlags & 384 /* BinaryOrOctalSpecifier */)
|
|
13048
13269
|
node.transformFlags |= 1024 /* ContainsES2015 */;
|
|
@@ -15832,7 +16053,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15832
16053
|
}
|
|
15833
16054
|
function cloneSourceFile(source) {
|
|
15834
16055
|
const node = source.redirectInfo ? cloneRedirectedSourceFile(source) : cloneSourceFileWorker(source);
|
|
15835
|
-
|
|
16056
|
+
setOriginal(node, source);
|
|
15836
16057
|
return node;
|
|
15837
16058
|
}
|
|
15838
16059
|
function cloneSourceFileWithChanges(source, statements, isDeclarationFile, referencedFiles, typeReferences, hasNoDefaultLib, libReferences) {
|
|
@@ -15965,7 +16186,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15965
16186
|
const clone2 = createBaseIdentifier(node.escapedText);
|
|
15966
16187
|
clone2.flags |= node.flags & ~16 /* Synthesized */;
|
|
15967
16188
|
clone2.transformFlags = node.transformFlags;
|
|
15968
|
-
|
|
16189
|
+
setOriginal(clone2, node);
|
|
15969
16190
|
setIdentifierAutoGenerate(clone2, { ...node.emitNode.autoGenerate });
|
|
15970
16191
|
return clone2;
|
|
15971
16192
|
}
|
|
@@ -15976,7 +16197,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15976
16197
|
clone2.flowNode = node.flowNode;
|
|
15977
16198
|
clone2.symbol = node.symbol;
|
|
15978
16199
|
clone2.transformFlags = node.transformFlags;
|
|
15979
|
-
|
|
16200
|
+
setOriginal(clone2, node);
|
|
15980
16201
|
const typeArguments = getIdentifierTypeArguments(node);
|
|
15981
16202
|
if (typeArguments)
|
|
15982
16203
|
setIdentifierTypeArguments(clone2, typeArguments);
|
|
@@ -15986,7 +16207,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15986
16207
|
const clone2 = createBasePrivateIdentifier(node.escapedText);
|
|
15987
16208
|
clone2.flags |= node.flags & ~16 /* Synthesized */;
|
|
15988
16209
|
clone2.transformFlags = node.transformFlags;
|
|
15989
|
-
|
|
16210
|
+
setOriginal(clone2, node);
|
|
15990
16211
|
setIdentifierAutoGenerate(clone2, { ...node.emitNode.autoGenerate });
|
|
15991
16212
|
return clone2;
|
|
15992
16213
|
}
|
|
@@ -15994,7 +16215,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15994
16215
|
const clone2 = createBasePrivateIdentifier(node.escapedText);
|
|
15995
16216
|
clone2.flags |= node.flags & ~16 /* Synthesized */;
|
|
15996
16217
|
clone2.transformFlags = node.transformFlags;
|
|
15997
|
-
|
|
16218
|
+
setOriginal(clone2, node);
|
|
15998
16219
|
return clone2;
|
|
15999
16220
|
}
|
|
16000
16221
|
function cloneNode(node) {
|
|
@@ -16019,7 +16240,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
16019
16240
|
const clone2 = !isNodeKind(node.kind) ? baseFactory2.createBaseTokenNode(node.kind) : baseFactory2.createBaseNode(node.kind);
|
|
16020
16241
|
clone2.flags |= node.flags & ~16 /* Synthesized */;
|
|
16021
16242
|
clone2.transformFlags = node.transformFlags;
|
|
16022
|
-
|
|
16243
|
+
setOriginal(clone2, node);
|
|
16023
16244
|
for (const key in node) {
|
|
16024
16245
|
if (hasProperty(clone2, key) || !hasProperty(node, key)) {
|
|
16025
16246
|
continue;
|
|
@@ -16544,7 +16765,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
16544
16765
|
return typeof value === "number" ? createToken(value) : value;
|
|
16545
16766
|
}
|
|
16546
16767
|
function asEmbeddedStatement(statement) {
|
|
16547
|
-
return statement && isNotEmittedStatement(statement) ? setTextRange(
|
|
16768
|
+
return statement && isNotEmittedStatement(statement) ? setTextRange(setOriginal(createEmptyStatement(), statement), statement) : statement;
|
|
16548
16769
|
}
|
|
16549
16770
|
function asVariableDeclaration(variableDeclaration) {
|
|
16550
16771
|
if (typeof variableDeclaration === "string" || variableDeclaration && !isVariableDeclaration(variableDeclaration)) {
|
|
@@ -16560,19 +16781,13 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
16560
16781
|
}
|
|
16561
16782
|
return variableDeclaration;
|
|
16562
16783
|
}
|
|
16563
|
-
|
|
16564
|
-
|
|
16565
|
-
|
|
16566
|
-
|
|
16567
|
-
|
|
16568
|
-
|
|
16569
|
-
}
|
|
16570
|
-
function updateWithOriginal(updated, original) {
|
|
16571
|
-
if (updated !== original) {
|
|
16572
|
-
setOriginalNode(updated, original);
|
|
16573
|
-
setTextRange(updated, original);
|
|
16784
|
+
function update(updated, original) {
|
|
16785
|
+
if (updated !== original) {
|
|
16786
|
+
setOriginal(updated, original);
|
|
16787
|
+
setTextRange(updated, original);
|
|
16788
|
+
}
|
|
16789
|
+
return updated;
|
|
16574
16790
|
}
|
|
16575
|
-
return updated;
|
|
16576
16791
|
}
|
|
16577
16792
|
function getDefaultTagNameForKind(kind) {
|
|
16578
16793
|
switch (kind) {
|
|
@@ -17341,6 +17556,9 @@ function isJSDocReadonlyTag(node) {
|
|
|
17341
17556
|
function isJSDocOverrideTag(node) {
|
|
17342
17557
|
return node.kind === 344 /* JSDocOverrideTag */;
|
|
17343
17558
|
}
|
|
17559
|
+
function isJSDocOverloadTag(node) {
|
|
17560
|
+
return node.kind === 346 /* JSDocOverloadTag */;
|
|
17561
|
+
}
|
|
17344
17562
|
function isJSDocDeprecatedTag(node) {
|
|
17345
17563
|
return node.kind === 338 /* JSDocDeprecatedTag */;
|
|
17346
17564
|
}
|
|
@@ -18708,8 +18926,10 @@ var Parser;
|
|
|
18708
18926
|
setTextRangePosWidth(sourceFile, 0, sourceText.length);
|
|
18709
18927
|
setFields(sourceFile);
|
|
18710
18928
|
if (!isDeclarationFile && isExternalModule(sourceFile) && sourceFile.transformFlags & 67108864 /* ContainsPossibleTopLevelAwait */) {
|
|
18929
|
+
const oldSourceFile = sourceFile;
|
|
18711
18930
|
sourceFile = reparseTopLevelAwait(sourceFile);
|
|
18712
|
-
|
|
18931
|
+
if (oldSourceFile !== sourceFile)
|
|
18932
|
+
setFields(sourceFile);
|
|
18713
18933
|
}
|
|
18714
18934
|
return sourceFile;
|
|
18715
18935
|
function setFields(sourceFile2) {
|
|
@@ -20107,8 +20327,7 @@ var Parser;
|
|
|
20107
20327
|
function parseJSDocFunctionType() {
|
|
20108
20328
|
const pos = getNodePos();
|
|
20109
20329
|
const hasJSDoc = hasPrecedingJSDocComment();
|
|
20110
|
-
if (
|
|
20111
|
-
nextToken();
|
|
20330
|
+
if (tryParse(nextTokenIsOpenParen)) {
|
|
20112
20331
|
const parameters = parseParameters(4 /* Type */ | 32 /* JSDoc */);
|
|
20113
20332
|
const type = parseReturnType(
|
|
20114
20333
|
59 /* ColonToken */,
|
|
@@ -23029,6 +23248,10 @@ var Parser;
|
|
|
23029
23248
|
function nextTokenIsStringLiteral() {
|
|
23030
23249
|
return nextToken() === 11 /* StringLiteral */;
|
|
23031
23250
|
}
|
|
23251
|
+
function nextTokenIsFromKeywordOrEqualsToken() {
|
|
23252
|
+
nextToken();
|
|
23253
|
+
return token() === 161 /* FromKeyword */ || token() === 64 /* EqualsToken */;
|
|
23254
|
+
}
|
|
23032
23255
|
function nextTokenIsIdentifierOrStringLiteralOnSameLine() {
|
|
23033
23256
|
nextToken();
|
|
23034
23257
|
return !scanner.hasPrecedingLineBreak() && (isIdentifier2() || token() === 11 /* StringLiteral */);
|
|
@@ -23724,7 +23947,7 @@ var Parser;
|
|
|
23724
23947
|
identifier = parseIdentifier();
|
|
23725
23948
|
}
|
|
23726
23949
|
let isTypeOnly = false;
|
|
23727
|
-
if (
|
|
23950
|
+
if ((identifier == null ? void 0 : identifier.escapedText) === "type" && (token() !== 161 /* FromKeyword */ || isIdentifier2() && lookAhead(nextTokenIsFromKeywordOrEqualsToken)) && (isIdentifier2() || tokenAfterImportDefinitelyProducesImportDeclaration())) {
|
|
23728
23951
|
isTypeOnly = true;
|
|
23729
23952
|
identifier = isIdentifier2() ? parseIdentifier() : void 0;
|
|
23730
23953
|
}
|
|
@@ -24103,7 +24326,7 @@ var Parser;
|
|
|
24103
24326
|
if (!jsDocDiagnostics) {
|
|
24104
24327
|
jsDocDiagnostics = [];
|
|
24105
24328
|
}
|
|
24106
|
-
jsDocDiagnostics
|
|
24329
|
+
addRange(jsDocDiagnostics, parseDiagnostics, saveParseDiagnosticsLength);
|
|
24107
24330
|
}
|
|
24108
24331
|
currentToken = saveToken;
|
|
24109
24332
|
parseDiagnostics.length = saveParseDiagnosticsLength;
|
|
@@ -24507,18 +24730,7 @@ var Parser;
|
|
|
24507
24730
|
}
|
|
24508
24731
|
nextTokenJSDoc();
|
|
24509
24732
|
skipWhitespace();
|
|
24510
|
-
const
|
|
24511
|
-
let name = tokenIsIdentifierOrKeyword(token()) ? parseEntityName(
|
|
24512
|
-
/*allowReservedWords*/
|
|
24513
|
-
true
|
|
24514
|
-
) : void 0;
|
|
24515
|
-
if (name) {
|
|
24516
|
-
while (token() === 81 /* PrivateIdentifier */) {
|
|
24517
|
-
reScanHashToken();
|
|
24518
|
-
nextTokenJSDoc();
|
|
24519
|
-
name = finishNode(factory2.createJSDocMemberName(name, parseIdentifier()), p2);
|
|
24520
|
-
}
|
|
24521
|
-
}
|
|
24733
|
+
const name = parseJSDocLinkName();
|
|
24522
24734
|
const text = [];
|
|
24523
24735
|
while (token() !== 20 /* CloseBraceToken */ && token() !== 4 /* NewLineTrivia */ && token() !== 1 /* EndOfFileToken */) {
|
|
24524
24736
|
text.push(scanner.getTokenText());
|
|
@@ -24527,6 +24739,26 @@ var Parser;
|
|
|
24527
24739
|
const create = linkType === "link" ? factory2.createJSDocLink : linkType === "linkcode" ? factory2.createJSDocLinkCode : factory2.createJSDocLinkPlain;
|
|
24528
24740
|
return finishNode(create(name, text.join("")), start2, scanner.getTokenEnd());
|
|
24529
24741
|
}
|
|
24742
|
+
function parseJSDocLinkName() {
|
|
24743
|
+
if (tokenIsIdentifierOrKeyword(token())) {
|
|
24744
|
+
const pos = getNodePos();
|
|
24745
|
+
let name = parseIdentifierName();
|
|
24746
|
+
while (parseOptional(25 /* DotToken */)) {
|
|
24747
|
+
name = finishNode(factory2.createQualifiedName(name, token() === 81 /* PrivateIdentifier */ ? createMissingNode(
|
|
24748
|
+
80 /* Identifier */,
|
|
24749
|
+
/*reportAtCurrentPosition*/
|
|
24750
|
+
false
|
|
24751
|
+
) : parseIdentifier()), pos);
|
|
24752
|
+
}
|
|
24753
|
+
while (token() === 81 /* PrivateIdentifier */) {
|
|
24754
|
+
reScanHashToken();
|
|
24755
|
+
nextTokenJSDoc();
|
|
24756
|
+
name = finishNode(factory2.createJSDocMemberName(name, parseIdentifier()), pos);
|
|
24757
|
+
}
|
|
24758
|
+
return name;
|
|
24759
|
+
}
|
|
24760
|
+
return void 0;
|
|
24761
|
+
}
|
|
24530
24762
|
function parseJSDocLinkPrefix() {
|
|
24531
24763
|
skipWhitespaceOrAsterisk();
|
|
24532
24764
|
if (token() === 19 /* OpenBraceToken */ && nextTokenJSDoc() === 60 /* AtToken */ && tokenIsIdentifierOrKeyword(nextTokenJSDoc())) {
|
|
@@ -24928,6 +25160,8 @@ var Parser;
|
|
|
24928
25160
|
break;
|
|
24929
25161
|
case "template":
|
|
24930
25162
|
return parseTemplateTag(start2, tagName, indent3, indentText);
|
|
25163
|
+
case "this":
|
|
25164
|
+
return parseThisTag(start2, tagName, indent3, indentText);
|
|
24931
25165
|
default:
|
|
24932
25166
|
return false;
|
|
24933
25167
|
}
|
|
@@ -24942,6 +25176,12 @@ var Parser;
|
|
|
24942
25176
|
if (isBracketed) {
|
|
24943
25177
|
skipWhitespace();
|
|
24944
25178
|
}
|
|
25179
|
+
const modifiers = parseModifiers(
|
|
25180
|
+
/*allowDecorators*/
|
|
25181
|
+
false,
|
|
25182
|
+
/*permitConstAsModifier*/
|
|
25183
|
+
true
|
|
25184
|
+
);
|
|
24945
25185
|
const name = parseJSDocIdentifierName(Diagnostics.Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces);
|
|
24946
25186
|
let defaultType;
|
|
24947
25187
|
if (isBracketed) {
|
|
@@ -24954,8 +25194,7 @@ var Parser;
|
|
|
24954
25194
|
return void 0;
|
|
24955
25195
|
}
|
|
24956
25196
|
return finishNode(factory2.createTypeParameterDeclaration(
|
|
24957
|
-
|
|
24958
|
-
void 0,
|
|
25197
|
+
modifiers,
|
|
24959
25198
|
name,
|
|
24960
25199
|
/*constraint*/
|
|
24961
25200
|
void 0,
|
|
@@ -25390,7 +25629,25 @@ var IncrementalParser;
|
|
|
25390
25629
|
})(InvalidPosition || (InvalidPosition = {}));
|
|
25391
25630
|
})(IncrementalParser || (IncrementalParser = {}));
|
|
25392
25631
|
function isDeclarationFileName(fileName) {
|
|
25393
|
-
return
|
|
25632
|
+
return getDeclarationFileExtension(fileName) !== void 0;
|
|
25633
|
+
}
|
|
25634
|
+
function getDeclarationFileExtension(fileName) {
|
|
25635
|
+
const standardExtension = getAnyExtensionFromPath(
|
|
25636
|
+
fileName,
|
|
25637
|
+
supportedDeclarationExtensions,
|
|
25638
|
+
/*ignoreCase*/
|
|
25639
|
+
false
|
|
25640
|
+
);
|
|
25641
|
+
if (standardExtension) {
|
|
25642
|
+
return standardExtension;
|
|
25643
|
+
}
|
|
25644
|
+
if (fileExtensionIs(fileName, ".ts" /* Ts */)) {
|
|
25645
|
+
const index = getBaseFileName(fileName).lastIndexOf(".d.");
|
|
25646
|
+
if (index >= 0) {
|
|
25647
|
+
return fileName.substring(index);
|
|
25648
|
+
}
|
|
25649
|
+
}
|
|
25650
|
+
return void 0;
|
|
25394
25651
|
}
|
|
25395
25652
|
function parseResolutionMode(mode, pos, end, reportDiagnostic) {
|
|
25396
25653
|
if (!mode) {
|
|
@@ -25633,9 +25890,11 @@ var libEntries = [
|
|
|
25633
25890
|
// Host only
|
|
25634
25891
|
["dom", "lib.dom.d.ts"],
|
|
25635
25892
|
["dom.iterable", "lib.dom.iterable.d.ts"],
|
|
25893
|
+
["dom.asynciterable", "lib.dom.asynciterable.d.ts"],
|
|
25636
25894
|
["webworker", "lib.webworker.d.ts"],
|
|
25637
25895
|
["webworker.importscripts", "lib.webworker.importscripts.d.ts"],
|
|
25638
25896
|
["webworker.iterable", "lib.webworker.iterable.d.ts"],
|
|
25897
|
+
["webworker.asynciterable", "lib.webworker.asynciterable.d.ts"],
|
|
25639
25898
|
["scripthost", "lib.scripthost.d.ts"],
|
|
25640
25899
|
// ES2015 Or ESNext By-feature options
|
|
25641
25900
|
["es2015.core", "lib.es2015.core.d.ts"],
|
|
@@ -25648,6 +25907,7 @@ var libEntries = [
|
|
|
25648
25907
|
["es2015.symbol", "lib.es2015.symbol.d.ts"],
|
|
25649
25908
|
["es2015.symbol.wellknown", "lib.es2015.symbol.wellknown.d.ts"],
|
|
25650
25909
|
["es2016.array.include", "lib.es2016.array.include.d.ts"],
|
|
25910
|
+
["es2016.intl", "lib.es2016.intl.d.ts"],
|
|
25651
25911
|
["es2017.date", "lib.es2017.date.d.ts"],
|
|
25652
25912
|
["es2017.object", "lib.es2017.object.d.ts"],
|
|
25653
25913
|
["es2017.sharedmemory", "lib.es2017.sharedmemory.d.ts"],
|
|
@@ -25686,16 +25946,17 @@ var libEntries = [
|
|
|
25686
25946
|
["es2023.array", "lib.es2023.array.d.ts"],
|
|
25687
25947
|
["es2023.collection", "lib.es2023.collection.d.ts"],
|
|
25688
25948
|
["esnext.array", "lib.es2023.array.d.ts"],
|
|
25689
|
-
["esnext.collection", "lib.
|
|
25949
|
+
["esnext.collection", "lib.esnext.collection.d.ts"],
|
|
25690
25950
|
["esnext.symbol", "lib.es2019.symbol.d.ts"],
|
|
25691
25951
|
["esnext.asynciterable", "lib.es2018.asynciterable.d.ts"],
|
|
25692
25952
|
["esnext.intl", "lib.esnext.intl.d.ts"],
|
|
25693
25953
|
["esnext.disposable", "lib.esnext.disposable.d.ts"],
|
|
25694
25954
|
["esnext.bigint", "lib.es2020.bigint.d.ts"],
|
|
25695
25955
|
["esnext.string", "lib.es2022.string.d.ts"],
|
|
25696
|
-
["esnext.promise", "lib.
|
|
25956
|
+
["esnext.promise", "lib.esnext.promise.d.ts"],
|
|
25697
25957
|
["esnext.weakref", "lib.es2021.weakref.d.ts"],
|
|
25698
25958
|
["esnext.decorators", "lib.esnext.decorators.d.ts"],
|
|
25959
|
+
["esnext.object", "lib.esnext.object.d.ts"],
|
|
25699
25960
|
["decorators", "lib.decorators.d.ts"],
|
|
25700
25961
|
["decorators.legacy", "lib.decorators.legacy.d.ts"]
|
|
25701
25962
|
];
|
|
@@ -25979,6 +26240,7 @@ var targetOptionDeclaration = {
|
|
|
25979
26240
|
affectsModuleResolution: true,
|
|
25980
26241
|
affectsEmit: true,
|
|
25981
26242
|
affectsBuildInfo: true,
|
|
26243
|
+
deprecatedKeys: /* @__PURE__ */ new Set(["es3"]),
|
|
25982
26244
|
paramType: Diagnostics.VERSION,
|
|
25983
26245
|
showInSimplifiedHelpView: true,
|
|
25984
26246
|
category: Diagnostics.Language_and_Environment,
|
|
@@ -26000,7 +26262,8 @@ var moduleOptionDeclaration = {
|
|
|
26000
26262
|
es2022: 7 /* ES2022 */,
|
|
26001
26263
|
esnext: 99 /* ESNext */,
|
|
26002
26264
|
node16: 100 /* Node16 */,
|
|
26003
|
-
nodenext: 199 /* NodeNext
|
|
26265
|
+
nodenext: 199 /* NodeNext */,
|
|
26266
|
+
preserve: 200 /* Preserve */
|
|
26004
26267
|
})),
|
|
26005
26268
|
affectsSourceFile: true,
|
|
26006
26269
|
affectsModuleResolution: true,
|
|
@@ -27405,7 +27668,7 @@ function formatExtensions(extensions) {
|
|
|
27405
27668
|
result.push("JSON");
|
|
27406
27669
|
return result.join(", ");
|
|
27407
27670
|
}
|
|
27408
|
-
function createResolvedModuleWithFailedLookupLocationsHandlingSymlink(moduleName, resolved, isExternalLibraryImport, failedLookupLocations, affectingLocations, diagnostics, state, cache,
|
|
27671
|
+
function createResolvedModuleWithFailedLookupLocationsHandlingSymlink(moduleName, resolved, isExternalLibraryImport, failedLookupLocations, affectingLocations, diagnostics, state, cache, alternateResult) {
|
|
27409
27672
|
if (!state.resultFromCache && !state.compilerOptions.preserveSymlinks && resolved && isExternalLibraryImport && !resolved.originalPath && !isExternalModuleNameRelative(moduleName)) {
|
|
27410
27673
|
const { resolvedFileName, originalPath } = getOriginalAndResolvedFileName(resolved.path, state.host, state.traceEnabled);
|
|
27411
27674
|
if (originalPath)
|
|
@@ -27419,10 +27682,10 @@ function createResolvedModuleWithFailedLookupLocationsHandlingSymlink(moduleName
|
|
|
27419
27682
|
diagnostics,
|
|
27420
27683
|
state.resultFromCache,
|
|
27421
27684
|
cache,
|
|
27422
|
-
|
|
27685
|
+
alternateResult
|
|
27423
27686
|
);
|
|
27424
27687
|
}
|
|
27425
|
-
function createResolvedModuleWithFailedLookupLocations(resolved, isExternalLibraryImport, failedLookupLocations, affectingLocations, diagnostics, resultFromCache, cache,
|
|
27688
|
+
function createResolvedModuleWithFailedLookupLocations(resolved, isExternalLibraryImport, failedLookupLocations, affectingLocations, diagnostics, resultFromCache, cache, alternateResult) {
|
|
27426
27689
|
if (resultFromCache) {
|
|
27427
27690
|
if (!(cache == null ? void 0 : cache.isReadonly)) {
|
|
27428
27691
|
resultFromCache.failedLookupLocations = updateResolutionField(resultFromCache.failedLookupLocations, failedLookupLocations);
|
|
@@ -27450,7 +27713,7 @@ function createResolvedModuleWithFailedLookupLocations(resolved, isExternalLibra
|
|
|
27450
27713
|
failedLookupLocations: initializeResolutionField(failedLookupLocations),
|
|
27451
27714
|
affectingLocations: initializeResolutionField(affectingLocations),
|
|
27452
27715
|
resolutionDiagnostics: initializeResolutionField(diagnostics),
|
|
27453
|
-
|
|
27716
|
+
alternateResult
|
|
27454
27717
|
};
|
|
27455
27718
|
}
|
|
27456
27719
|
function initializeResolutionField(value) {
|
|
@@ -27626,6 +27889,9 @@ function getConditions(options, resolutionMode) {
|
|
|
27626
27889
|
}
|
|
27627
27890
|
return concatenate(conditions, options.customConditions);
|
|
27628
27891
|
}
|
|
27892
|
+
function isPackageJsonInfo(entry) {
|
|
27893
|
+
return !!(entry == null ? void 0 : entry.contents);
|
|
27894
|
+
}
|
|
27629
27895
|
function resolveModuleName(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {
|
|
27630
27896
|
var _a, _b, _c;
|
|
27631
27897
|
const traceEnabled = isTraceEnabled(compilerOptions, host);
|
|
@@ -27647,20 +27913,7 @@ function resolveModuleName(moduleName, containingFile, compilerOptions, host, ca
|
|
|
27647
27913
|
} else {
|
|
27648
27914
|
let moduleResolution = compilerOptions.moduleResolution;
|
|
27649
27915
|
if (moduleResolution === void 0) {
|
|
27650
|
-
|
|
27651
|
-
case 1 /* CommonJS */:
|
|
27652
|
-
moduleResolution = 2 /* Node10 */;
|
|
27653
|
-
break;
|
|
27654
|
-
case 100 /* Node16 */:
|
|
27655
|
-
moduleResolution = 3 /* Node16 */;
|
|
27656
|
-
break;
|
|
27657
|
-
case 199 /* NodeNext */:
|
|
27658
|
-
moduleResolution = 99 /* NodeNext */;
|
|
27659
|
-
break;
|
|
27660
|
-
default:
|
|
27661
|
-
moduleResolution = 1 /* Classic */;
|
|
27662
|
-
break;
|
|
27663
|
-
}
|
|
27916
|
+
moduleResolution = getEmitModuleResolutionKind(compilerOptions);
|
|
27664
27917
|
if (traceEnabled) {
|
|
27665
27918
|
trace(host, Diagnostics.Module_resolution_kind_is_not_specified_using_0, ModuleResolutionKind[moduleResolution]);
|
|
27666
27919
|
}
|
|
@@ -27924,7 +28177,7 @@ function nodeModuleNameResolver(moduleName, containingFile, compilerOptions, hos
|
|
|
27924
28177
|
return nodeModuleNameResolverWorker(conditions ? 30 /* AllFeatures */ : 0 /* None */, moduleName, getDirectoryPath(containingFile), compilerOptions, host, cache, extensions, !!isConfigLookup, redirectedReference, conditions);
|
|
27925
28178
|
}
|
|
27926
28179
|
function nodeModuleNameResolverWorker(features, moduleName, containingDirectory, compilerOptions, host, cache, extensions, isConfigLookup, redirectedReference, conditions) {
|
|
27927
|
-
var _a, _b, _c, _d;
|
|
28180
|
+
var _a, _b, _c, _d, _e;
|
|
27928
28181
|
const traceEnabled = isTraceEnabled(compilerOptions, host);
|
|
27929
28182
|
const failedLookupLocations = [];
|
|
27930
28183
|
const affectingLocations = [];
|
|
@@ -27946,7 +28199,8 @@ function nodeModuleNameResolverWorker(features, moduleName, containingDirectory,
|
|
|
27946
28199
|
requestContainingDirectory: containingDirectory,
|
|
27947
28200
|
reportDiagnostic: (diag2) => void diagnostics.push(diag2),
|
|
27948
28201
|
isConfigLookup,
|
|
27949
|
-
candidateIsFromPackageJsonField: false
|
|
28202
|
+
candidateIsFromPackageJsonField: false,
|
|
28203
|
+
resolvedPackageDirectory: false
|
|
27950
28204
|
};
|
|
27951
28205
|
if (traceEnabled && moduleResolutionSupportsPackageJsonExportsAndImports(moduleResolution)) {
|
|
27952
28206
|
trace(host, Diagnostics.Resolving_in_0_mode_with_conditions_1, features & 32 /* EsmMode */ ? "ESM" : "CJS", state.conditions.map((c) => `'${c}'`).join(", "));
|
|
@@ -27959,29 +28213,46 @@ function nodeModuleNameResolverWorker(features, moduleName, containingDirectory,
|
|
|
27959
28213
|
} else {
|
|
27960
28214
|
result = tryResolve(extensions, state);
|
|
27961
28215
|
}
|
|
27962
|
-
let
|
|
27963
|
-
if (
|
|
27964
|
-
|
|
27965
|
-
|
|
27966
|
-
|
|
27967
|
-
|
|
27968
|
-
|
|
27969
|
-
|
|
27970
|
-
|
|
27971
|
-
|
|
27972
|
-
|
|
28216
|
+
let alternateResult;
|
|
28217
|
+
if (state.resolvedPackageDirectory && !isConfigLookup && !isExternalModuleNameRelative(moduleName)) {
|
|
28218
|
+
const wantedTypesButGotJs = (result == null ? void 0 : result.value) && extensions & (1 /* TypeScript */ | 4 /* Declaration */) && !extensionIsOk(1 /* TypeScript */ | 4 /* Declaration */, result.value.resolved.extension);
|
|
28219
|
+
if (((_a = result == null ? void 0 : result.value) == null ? void 0 : _a.isExternalLibraryImport) && wantedTypesButGotJs && features & 8 /* Exports */ && (conditions == null ? void 0 : conditions.includes("import"))) {
|
|
28220
|
+
traceIfEnabled(state, Diagnostics.Resolution_of_non_relative_name_failed_trying_with_modern_Node_resolution_features_disabled_to_see_if_npm_library_needs_configuration_update);
|
|
28221
|
+
const diagnosticState = {
|
|
28222
|
+
...state,
|
|
28223
|
+
features: state.features & ~8 /* Exports */,
|
|
28224
|
+
reportDiagnostic: noop
|
|
28225
|
+
};
|
|
28226
|
+
const diagnosticResult = tryResolve(extensions & (1 /* TypeScript */ | 4 /* Declaration */), diagnosticState);
|
|
28227
|
+
if ((_b = diagnosticResult == null ? void 0 : diagnosticResult.value) == null ? void 0 : _b.isExternalLibraryImport) {
|
|
28228
|
+
alternateResult = diagnosticResult.value.resolved.path;
|
|
28229
|
+
}
|
|
28230
|
+
} else if ((!(result == null ? void 0 : result.value) || wantedTypesButGotJs) && moduleResolution === 2 /* Node10 */) {
|
|
28231
|
+
traceIfEnabled(state, Diagnostics.Resolution_of_non_relative_name_failed_trying_with_moduleResolution_bundler_to_see_if_project_may_need_configuration_update);
|
|
28232
|
+
const diagnosticsCompilerOptions = { ...state.compilerOptions, moduleResolution: 100 /* Bundler */ };
|
|
28233
|
+
const diagnosticState = {
|
|
28234
|
+
...state,
|
|
28235
|
+
compilerOptions: diagnosticsCompilerOptions,
|
|
28236
|
+
features: 30 /* BundlerDefault */,
|
|
28237
|
+
conditions: getConditions(diagnosticsCompilerOptions),
|
|
28238
|
+
reportDiagnostic: noop
|
|
28239
|
+
};
|
|
28240
|
+
const diagnosticResult = tryResolve(extensions & (1 /* TypeScript */ | 4 /* Declaration */), diagnosticState);
|
|
28241
|
+
if ((_c = diagnosticResult == null ? void 0 : diagnosticResult.value) == null ? void 0 : _c.isExternalLibraryImport) {
|
|
28242
|
+
alternateResult = diagnosticResult.value.resolved.path;
|
|
28243
|
+
}
|
|
27973
28244
|
}
|
|
27974
28245
|
}
|
|
27975
28246
|
return createResolvedModuleWithFailedLookupLocationsHandlingSymlink(
|
|
27976
28247
|
moduleName,
|
|
27977
|
-
(
|
|
27978
|
-
(
|
|
28248
|
+
(_d = result == null ? void 0 : result.value) == null ? void 0 : _d.resolved,
|
|
28249
|
+
(_e = result == null ? void 0 : result.value) == null ? void 0 : _e.isExternalLibraryImport,
|
|
27979
28250
|
failedLookupLocations,
|
|
27980
28251
|
affectingLocations,
|
|
27981
28252
|
diagnostics,
|
|
27982
28253
|
state,
|
|
27983
28254
|
cache,
|
|
27984
|
-
|
|
28255
|
+
alternateResult
|
|
27985
28256
|
);
|
|
27986
28257
|
function tryResolve(extensions2, state2) {
|
|
27987
28258
|
const loader = (extensions3, candidate, onlyRecordFailures, state3) => nodeLoadModuleByRelativeName(
|
|
@@ -28253,13 +28524,13 @@ function getPackageJsonInfo(packageDirectory, onlyRecordFailures, state) {
|
|
|
28253
28524
|
}
|
|
28254
28525
|
const existing = (_b = state.packageJsonInfoCache) == null ? void 0 : _b.getPackageJsonInfo(packageJsonPath);
|
|
28255
28526
|
if (existing !== void 0) {
|
|
28256
|
-
if (
|
|
28527
|
+
if (isPackageJsonInfo(existing)) {
|
|
28257
28528
|
if (traceEnabled)
|
|
28258
28529
|
trace(host, Diagnostics.File_0_exists_according_to_earlier_cached_lookups, packageJsonPath);
|
|
28259
28530
|
(_c = state.affectingLocations) == null ? void 0 : _c.push(packageJsonPath);
|
|
28260
28531
|
return existing.packageDirectory === packageDirectory ? existing : { packageDirectory, contents: existing.contents };
|
|
28261
28532
|
} else {
|
|
28262
|
-
if (existing && traceEnabled)
|
|
28533
|
+
if (existing.directoryExists && traceEnabled)
|
|
28263
28534
|
trace(host, Diagnostics.File_0_does_not_exist_according_to_earlier_cached_lookups, packageJsonPath);
|
|
28264
28535
|
(_d = state.failedLookupLocations) == null ? void 0 : _d.push(packageJsonPath);
|
|
28265
28536
|
return void 0;
|
|
@@ -28281,7 +28552,7 @@ function getPackageJsonInfo(packageDirectory, onlyRecordFailures, state) {
|
|
|
28281
28552
|
trace(host, Diagnostics.File_0_does_not_exist, packageJsonPath);
|
|
28282
28553
|
}
|
|
28283
28554
|
if (state.packageJsonInfoCache && !state.packageJsonInfoCache.isReadonly)
|
|
28284
|
-
state.packageJsonInfoCache.setPackageJsonInfo(packageJsonPath, directoryExists);
|
|
28555
|
+
state.packageJsonInfoCache.setPackageJsonInfo(packageJsonPath, { packageDirectory, directoryExists });
|
|
28285
28556
|
(_f = state.failedLookupLocations) == null ? void 0 : _f.push(packageJsonPath);
|
|
28286
28557
|
}
|
|
28287
28558
|
}
|
|
@@ -28295,15 +28566,9 @@ function loadNodeModuleFromDirectoryWorker(extensions, candidate, onlyRecordFail
|
|
|
28295
28566
|
}
|
|
28296
28567
|
}
|
|
28297
28568
|
const loader = (extensions2, candidate2, onlyRecordFailures2, state2) => {
|
|
28298
|
-
const fromFile =
|
|
28569
|
+
const fromFile = loadFileNameFromPackageJsonField(extensions2, candidate2, onlyRecordFailures2, state2);
|
|
28299
28570
|
if (fromFile) {
|
|
28300
|
-
|
|
28301
|
-
if (resolved) {
|
|
28302
|
-
return noPackageId(resolved);
|
|
28303
|
-
}
|
|
28304
|
-
if (state2.traceEnabled) {
|
|
28305
|
-
trace(state2.host, Diagnostics.File_0_has_an_unsupported_extension_so_skipping_it, fromFile);
|
|
28306
|
-
}
|
|
28571
|
+
return noPackageId(fromFile);
|
|
28307
28572
|
}
|
|
28308
28573
|
const expandedExtensions = extensions2 === 4 /* Declaration */ ? 1 /* TypeScript */ | 4 /* Declaration */ : extensions2;
|
|
28309
28574
|
const features = state2.features;
|
|
@@ -28359,10 +28624,6 @@ function loadNodeModuleFromDirectoryWorker(extensions, candidate, onlyRecordFail
|
|
|
28359
28624
|
return loadModuleFromFile(extensions, indexPath, onlyRecordFailuresForIndex, state);
|
|
28360
28625
|
}
|
|
28361
28626
|
}
|
|
28362
|
-
function resolvedIfExtensionMatches(extensions, path2, resolvedUsingTsExtension) {
|
|
28363
|
-
const ext = tryGetExtensionFromPath2(path2);
|
|
28364
|
-
return ext !== void 0 && extensionIsOk(extensions, ext) ? { path: path2, ext, resolvedUsingTsExtension } : void 0;
|
|
28365
|
-
}
|
|
28366
28627
|
function extensionIsOk(extensions, extension) {
|
|
28367
28628
|
return extensions & 2 /* JavaScript */ && (extension === ".js" /* Js */ || extension === ".jsx" /* Jsx */ || extension === ".mjs" /* Mjs */ || extension === ".cjs" /* Cjs */) || extensions & 1 /* TypeScript */ && (extension === ".ts" /* Ts */ || extension === ".tsx" /* Tsx */ || extension === ".mts" /* Mts */ || extension === ".cts" /* Cts */) || extensions & 4 /* Declaration */ && (extension === ".d.ts" /* Dts */ || extension === ".d.mts" /* Dmts */ || extension === ".d.cts" /* Dcts */) || extensions & 8 /* Json */ && extension === ".json" /* Json */ || false;
|
|
28368
28629
|
}
|
|
@@ -28943,6 +29204,9 @@ function loadModuleFromSpecificNodeModulesDirectory(extensions, moduleName, node
|
|
|
28943
29204
|
if (rest !== "") {
|
|
28944
29205
|
packageInfo = rootPackageInfo ?? getPackageJsonInfo(packageDirectory, !nodeModulesDirectoryExists, state);
|
|
28945
29206
|
}
|
|
29207
|
+
if (packageInfo) {
|
|
29208
|
+
state.resolvedPackageDirectory = true;
|
|
29209
|
+
}
|
|
28946
29210
|
if (packageInfo && packageInfo.contents.packageJsonContent.exports && state.features & 8 /* Exports */) {
|
|
28947
29211
|
return (_b = loadModuleFromExports(packageInfo, extensions, combinePaths(".", rest), state, cache, redirectedReference)) == null ? void 0 : _b.value;
|
|
28948
29212
|
}
|
|
@@ -28979,7 +29243,7 @@ function tryLoadModuleUsingPaths(extensions, moduleName, baseDirectory, paths, p
|
|
|
28979
29243
|
trace(state.host, Diagnostics.Module_name_0_matched_pattern_1, moduleName, matchedPatternText);
|
|
28980
29244
|
}
|
|
28981
29245
|
const resolved = forEach(paths[matchedPatternText], (subst) => {
|
|
28982
|
-
const path2 = matchedStar ? subst
|
|
29246
|
+
const path2 = matchedStar ? replaceFirstStar(subst, matchedStar) : subst;
|
|
28983
29247
|
const candidate = normalizePath(combinePaths(baseDirectory, path2));
|
|
28984
29248
|
if (state.traceEnabled) {
|
|
28985
29249
|
trace(state.host, Diagnostics.Trying_substitution_0_candidate_module_location_Colon_1, subst, path2);
|
|
@@ -29049,7 +29313,8 @@ function classicNameResolver(moduleName, containingFile, compilerOptions, host,
|
|
|
29049
29313
|
requestContainingDirectory: containingDirectory,
|
|
29050
29314
|
reportDiagnostic: (diag2) => void diagnostics.push(diag2),
|
|
29051
29315
|
isConfigLookup: false,
|
|
29052
|
-
candidateIsFromPackageJsonField: false
|
|
29316
|
+
candidateIsFromPackageJsonField: false,
|
|
29317
|
+
resolvedPackageDirectory: false
|
|
29053
29318
|
};
|
|
29054
29319
|
const resolved = tryResolve(1 /* TypeScript */ | 4 /* Declaration */) || tryResolve(2 /* JavaScript */ | (compilerOptions.resolveJsonModule ? 8 /* Json */ : 0));
|
|
29055
29320
|
return createResolvedModuleWithFailedLookupLocationsHandlingSymlink(
|
|
@@ -29264,7 +29529,8 @@ var intrinsicTypeKinds = new Map(Object.entries({
|
|
|
29264
29529
|
Uppercase: 0 /* Uppercase */,
|
|
29265
29530
|
Lowercase: 1 /* Lowercase */,
|
|
29266
29531
|
Capitalize: 2 /* Capitalize */,
|
|
29267
|
-
Uncapitalize: 3 /* Uncapitalize
|
|
29532
|
+
Uncapitalize: 3 /* Uncapitalize */,
|
|
29533
|
+
NoInfer: 4 /* NoInfer */
|
|
29268
29534
|
}));
|
|
29269
29535
|
function getNodeId(node) {
|
|
29270
29536
|
if (!node.id) {
|
|
@@ -31843,6 +32109,32 @@ var TypingsInstaller = class {
|
|
|
31843
32109
|
}
|
|
31844
32110
|
this.processCacheLocation(this.globalCachePath);
|
|
31845
32111
|
}
|
|
32112
|
+
/** @internal */
|
|
32113
|
+
handleRequest(req) {
|
|
32114
|
+
switch (req.kind) {
|
|
32115
|
+
case "discover":
|
|
32116
|
+
this.install(req);
|
|
32117
|
+
break;
|
|
32118
|
+
case "closeProject":
|
|
32119
|
+
this.closeProject(req);
|
|
32120
|
+
break;
|
|
32121
|
+
case "typesRegistry": {
|
|
32122
|
+
const typesRegistry = {};
|
|
32123
|
+
this.typesRegistry.forEach((value, key) => {
|
|
32124
|
+
typesRegistry[key] = value;
|
|
32125
|
+
});
|
|
32126
|
+
const response = { kind: EventTypesRegistry, typesRegistry };
|
|
32127
|
+
this.sendResponse(response);
|
|
32128
|
+
break;
|
|
32129
|
+
}
|
|
32130
|
+
case "installPackage": {
|
|
32131
|
+
this.installPackage(req);
|
|
32132
|
+
break;
|
|
32133
|
+
}
|
|
32134
|
+
default:
|
|
32135
|
+
Debug.assertNever(req);
|
|
32136
|
+
}
|
|
32137
|
+
}
|
|
31846
32138
|
closeProject(req) {
|
|
31847
32139
|
this.closeWatchers(req.projectName);
|
|
31848
32140
|
}
|
|
@@ -31898,6 +32190,37 @@ var TypingsInstaller = class {
|
|
|
31898
32190
|
}
|
|
31899
32191
|
}
|
|
31900
32192
|
}
|
|
32193
|
+
/** @internal */
|
|
32194
|
+
installPackage(req) {
|
|
32195
|
+
const { fileName, packageName, projectName, projectRootPath, id } = req;
|
|
32196
|
+
const cwd = forEachAncestorDirectory(getDirectoryPath(fileName), (directory) => {
|
|
32197
|
+
if (this.installTypingHost.fileExists(combinePaths(directory, "package.json"))) {
|
|
32198
|
+
return directory;
|
|
32199
|
+
}
|
|
32200
|
+
}) || projectRootPath;
|
|
32201
|
+
if (cwd) {
|
|
32202
|
+
this.installWorker(-1, [packageName], cwd, (success) => {
|
|
32203
|
+
const message = success ? `Package ${packageName} installed.` : `There was an error installing ${packageName}.`;
|
|
32204
|
+
const response = {
|
|
32205
|
+
kind: ActionPackageInstalled,
|
|
32206
|
+
projectName,
|
|
32207
|
+
id,
|
|
32208
|
+
success,
|
|
32209
|
+
message
|
|
32210
|
+
};
|
|
32211
|
+
this.sendResponse(response);
|
|
32212
|
+
});
|
|
32213
|
+
} else {
|
|
32214
|
+
const response = {
|
|
32215
|
+
kind: ActionPackageInstalled,
|
|
32216
|
+
projectName,
|
|
32217
|
+
id,
|
|
32218
|
+
success: false,
|
|
32219
|
+
message: "Could not determine a project root path."
|
|
32220
|
+
};
|
|
32221
|
+
this.sendResponse(response);
|
|
32222
|
+
}
|
|
32223
|
+
}
|
|
31901
32224
|
initializeSafeList() {
|
|
31902
32225
|
if (this.typesMapLocation) {
|
|
31903
32226
|
const safeListFromMap = ts_JsTyping_exports.loadTypesMap(this.installTypingHost, this.typesMapLocation);
|
|
@@ -32231,40 +32554,7 @@ var NodeTypingsInstaller = class extends TypingsInstaller {
|
|
|
32231
32554
|
this.sendResponse(this.delayedInitializationError);
|
|
32232
32555
|
this.delayedInitializationError = void 0;
|
|
32233
32556
|
}
|
|
32234
|
-
|
|
32235
|
-
case "discover":
|
|
32236
|
-
this.install(req);
|
|
32237
|
-
break;
|
|
32238
|
-
case "closeProject":
|
|
32239
|
-
this.closeProject(req);
|
|
32240
|
-
break;
|
|
32241
|
-
case "typesRegistry": {
|
|
32242
|
-
const typesRegistry = {};
|
|
32243
|
-
this.typesRegistry.forEach((value, key) => {
|
|
32244
|
-
typesRegistry[key] = value;
|
|
32245
|
-
});
|
|
32246
|
-
const response = { kind: EventTypesRegistry, typesRegistry };
|
|
32247
|
-
this.sendResponse(response);
|
|
32248
|
-
break;
|
|
32249
|
-
}
|
|
32250
|
-
case "installPackage": {
|
|
32251
|
-
const { fileName, packageName, projectName, projectRootPath } = req;
|
|
32252
|
-
const cwd = getDirectoryOfPackageJson(fileName, this.installTypingHost) || projectRootPath;
|
|
32253
|
-
if (cwd) {
|
|
32254
|
-
this.installWorker(-1, [packageName], cwd, (success) => {
|
|
32255
|
-
const message = success ? `Package ${packageName} installed.` : `There was an error installing ${packageName}.`;
|
|
32256
|
-
const response = { kind: ActionPackageInstalled, projectName, success, message };
|
|
32257
|
-
this.sendResponse(response);
|
|
32258
|
-
});
|
|
32259
|
-
} else {
|
|
32260
|
-
const response = { kind: ActionPackageInstalled, projectName, success: false, message: "Could not determine a project root path." };
|
|
32261
|
-
this.sendResponse(response);
|
|
32262
|
-
}
|
|
32263
|
-
break;
|
|
32264
|
-
}
|
|
32265
|
-
default:
|
|
32266
|
-
Debug.assertNever(req);
|
|
32267
|
-
}
|
|
32557
|
+
super.handleRequest(req);
|
|
32268
32558
|
}
|
|
32269
32559
|
sendResponse(response) {
|
|
32270
32560
|
if (this.log.isEnabled()) {
|
|
@@ -32277,7 +32567,7 @@ var NodeTypingsInstaller = class extends TypingsInstaller {
|
|
|
32277
32567
|
}
|
|
32278
32568
|
installWorker(requestId, packageNames, cwd, onRequestCompleted) {
|
|
32279
32569
|
if (this.log.isEnabled()) {
|
|
32280
|
-
this.log.writeLine(`#${requestId} with arguments
|
|
32570
|
+
this.log.writeLine(`#${requestId} with cwd: ${cwd} arguments: ${JSON.stringify(packageNames)}`);
|
|
32281
32571
|
}
|
|
32282
32572
|
const start = Date.now();
|
|
32283
32573
|
const hasError = installNpmPackages(this.npmPath, version, packageNames, (command) => this.execSyncAndLog(command, { cwd }));
|
|
@@ -32304,13 +32594,6 @@ var NodeTypingsInstaller = class extends TypingsInstaller {
|
|
|
32304
32594
|
}
|
|
32305
32595
|
}
|
|
32306
32596
|
};
|
|
32307
|
-
function getDirectoryOfPackageJson(fileName, host) {
|
|
32308
|
-
return forEachAncestorDirectory(getDirectoryPath(fileName), (directory) => {
|
|
32309
|
-
if (host.fileExists(combinePaths(directory, "package.json"))) {
|
|
32310
|
-
return directory;
|
|
32311
|
-
}
|
|
32312
|
-
});
|
|
32313
|
-
}
|
|
32314
32597
|
var logFilePath = findArgument(Arguments.LogFile);
|
|
32315
32598
|
var globalTypingsCacheLocation = findArgument(Arguments.GlobalCacheLocation);
|
|
32316
32599
|
var typingSafeListLocation = findArgument(Arguments.TypingSafeListLocation);
|