typescript 4.7.0-dev.20220321 → 4.7.0-dev.20220322
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/de/diagnosticMessages.generated.json +34 -34
- package/lib/es/diagnosticMessages.generated.json +27 -27
- package/lib/it/diagnosticMessages.generated.json +36 -36
- package/lib/ja/diagnosticMessages.generated.json +15 -15
- package/lib/pl/diagnosticMessages.generated.json +19 -19
- package/lib/tsc.js +1 -1
- package/lib/tsserver.js +56 -39
- package/lib/tsserverlibrary.js +56 -39
- package/lib/typescript.js +6 -2
- package/lib/typescriptServices.js +6 -2
- package/lib/typingsInstaller.js +1 -1
- package/lib/zh-cn/diagnosticMessages.generated.json +24 -24
- package/package.json +1 -1
package/lib/tsserverlibrary.js
CHANGED
|
@@ -294,7 +294,7 @@ var ts;
|
|
|
294
294
|
// The following is baselined as a literal template type without intervention
|
|
295
295
|
/** The version of the TypeScript compiler release */
|
|
296
296
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
297
|
-
ts.version = ts.versionMajorMinor + ".0-dev.
|
|
297
|
+
ts.version = ts.versionMajorMinor + ".0-dev.20220322";
|
|
298
298
|
/* @internal */
|
|
299
299
|
var Comparison;
|
|
300
300
|
(function (Comparison) {
|
|
@@ -128565,7 +128565,7 @@ var ts;
|
|
|
128565
128565
|
packageName = ts.unmangleScopedPackageName(ts.getPackageNameFromTypesPackageName(moduleFile.fileName.substring(topLevelPackageNameIndex + 1, packageRootIndex)));
|
|
128566
128566
|
if (ts.startsWith(importingFile, moduleFile.path.substring(0, topLevelNodeModulesIndex))) {
|
|
128567
128567
|
var prevDeepestNodeModulesPath = packages.get(packageName);
|
|
128568
|
-
var nodeModulesPath = moduleFile.fileName.substring(0, topLevelPackageNameIndex);
|
|
128568
|
+
var nodeModulesPath = moduleFile.fileName.substring(0, topLevelPackageNameIndex + 1);
|
|
128569
128569
|
if (prevDeepestNodeModulesPath) {
|
|
128570
128570
|
var prevDeepestNodeModulesIndex = prevDeepestNodeModulesPath.indexOf(ts.nodeModulesPathPart);
|
|
128571
128571
|
if (topLevelNodeModulesIndex > prevDeepestNodeModulesIndex) {
|
|
@@ -128736,6 +128736,9 @@ var ts;
|
|
|
128736
128736
|
function isNotShadowedByDeeperNodeModulesPackage(info, packageName) {
|
|
128737
128737
|
if (!packageName || !info.moduleFileName)
|
|
128738
128738
|
return true;
|
|
128739
|
+
var typingsCacheLocation = host.getGlobalTypingsCacheLocation();
|
|
128740
|
+
if (typingsCacheLocation && ts.startsWith(info.moduleFileName, typingsCacheLocation))
|
|
128741
|
+
return true;
|
|
128739
128742
|
var packageDeepestNodeModulesPath = packages.get(packageName);
|
|
128740
128743
|
return !packageDeepestNodeModulesPath || ts.startsWith(info.moduleFileName, packageDeepestNodeModulesPath);
|
|
128741
128744
|
}
|
|
@@ -128814,6 +128817,7 @@ var ts;
|
|
|
128814
128817
|
var cache = ((_b = host.getCachedExportInfoMap) === null || _b === void 0 ? void 0 : _b.call(host)) || createCacheableExportInfoMap({
|
|
128815
128818
|
getCurrentProgram: function () { return program; },
|
|
128816
128819
|
getPackageJsonAutoImportProvider: function () { var _a; return (_a = host.getPackageJsonAutoImportProvider) === null || _a === void 0 ? void 0 : _a.call(host); },
|
|
128820
|
+
getGlobalTypingsCacheLocation: function () { var _a; return (_a = host.getGlobalTypingsCacheLocation) === null || _a === void 0 ? void 0 : _a.call(host); },
|
|
128817
128821
|
});
|
|
128818
128822
|
if (cache.isUsableByFile(importingFile.path)) {
|
|
128819
128823
|
(_c = host.log) === null || _c === void 0 ? void 0 : _c.call(host, "getExportInfoMap: cache hit");
|
|
@@ -168986,13 +168990,12 @@ var ts;
|
|
|
168986
168990
|
}
|
|
168987
168991
|
var dependenciesAdded = 0;
|
|
168988
168992
|
if (dependencyNames) {
|
|
168989
|
-
var
|
|
168990
|
-
|
|
168991
|
-
var name = _d[_c];
|
|
168993
|
+
var symlinkCache_1 = hostProject.getSymlinkCache();
|
|
168994
|
+
var _loop_2 = function (name) {
|
|
168992
168995
|
// Avoid creating a large project that would significantly slow down time to editor interactivity
|
|
168993
|
-
if (dependencySelection === 2 /* Auto */ && dependenciesAdded >
|
|
168994
|
-
hostProject.log("AutoImportProviderProject: attempted to add more than " +
|
|
168995
|
-
return ts.emptyArray;
|
|
168996
|
+
if (dependencySelection === 2 /* Auto */ && dependenciesAdded > this_2.maxDependencies) {
|
|
168997
|
+
hostProject.log("AutoImportProviderProject: attempted to add more than " + this_2.maxDependencies + " dependencies. Aborting.");
|
|
168998
|
+
return { value: ts.emptyArray };
|
|
168996
168999
|
}
|
|
168997
169000
|
// 1. Try to load from the implementation package. For many dependencies, the
|
|
168998
169001
|
// package.json will exist, but the package will not contain any typings,
|
|
@@ -169000,29 +169003,43 @@ var ts;
|
|
|
169000
169003
|
// is missing altogether, we will move on to trying the @types package (2).
|
|
169001
169004
|
var packageJson = ts.resolvePackageNameToPackageJson(name, hostProject.currentDirectory, compilerOptions, moduleResolutionHost, program.getModuleResolutionCache());
|
|
169002
169005
|
if (packageJson) {
|
|
169003
|
-
var entrypoints = getRootNamesFromPackageJson(packageJson, program,
|
|
169006
|
+
var entrypoints = getRootNamesFromPackageJson(packageJson, program, symlinkCache_1);
|
|
169004
169007
|
if (entrypoints) {
|
|
169005
169008
|
rootNames = ts.concatenate(rootNames, entrypoints);
|
|
169006
169009
|
dependenciesAdded += entrypoints.length ? 1 : 0;
|
|
169007
|
-
continue;
|
|
169010
|
+
return "continue";
|
|
169008
169011
|
}
|
|
169009
169012
|
}
|
|
169010
|
-
// 2. Try to load from the @types package
|
|
169011
|
-
|
|
169012
|
-
|
|
169013
|
-
|
|
169014
|
-
|
|
169015
|
-
|
|
169016
|
-
|
|
169017
|
-
|
|
169013
|
+
// 2. Try to load from the @types package in the tree and in the global
|
|
169014
|
+
// typings cache location, if enabled.
|
|
169015
|
+
var done = ts.forEach([hostProject.currentDirectory, hostProject.getGlobalTypingsCacheLocation()], function (directory) {
|
|
169016
|
+
if (directory) {
|
|
169017
|
+
var typesPackageJson = ts.resolvePackageNameToPackageJson("@types/" + name, directory, compilerOptions, moduleResolutionHost, program.getModuleResolutionCache());
|
|
169018
|
+
if (typesPackageJson) {
|
|
169019
|
+
var entrypoints = getRootNamesFromPackageJson(typesPackageJson, program, symlinkCache_1);
|
|
169020
|
+
rootNames = ts.concatenate(rootNames, entrypoints);
|
|
169021
|
+
dependenciesAdded += (entrypoints === null || entrypoints === void 0 ? void 0 : entrypoints.length) ? 1 : 0;
|
|
169022
|
+
return true;
|
|
169023
|
+
}
|
|
169024
|
+
}
|
|
169025
|
+
});
|
|
169026
|
+
if (done)
|
|
169027
|
+
return "continue";
|
|
169018
169028
|
// 3. If the @types package did not exist and the user has settings that
|
|
169019
169029
|
// allow processing JS from node_modules, go back to the implementation
|
|
169020
169030
|
// package and load the JS.
|
|
169021
169031
|
if (packageJson && compilerOptions.allowJs && compilerOptions.maxNodeModuleJsDepth) {
|
|
169022
|
-
var entrypoints = getRootNamesFromPackageJson(packageJson, program,
|
|
169032
|
+
var entrypoints = getRootNamesFromPackageJson(packageJson, program, symlinkCache_1, /*allowJs*/ true);
|
|
169023
169033
|
rootNames = ts.concatenate(rootNames, entrypoints);
|
|
169024
169034
|
dependenciesAdded += (entrypoints === null || entrypoints === void 0 ? void 0 : entrypoints.length) ? 1 : 0;
|
|
169025
169035
|
}
|
|
169036
|
+
};
|
|
169037
|
+
var this_2 = this;
|
|
169038
|
+
for (var _c = 0, _d = ts.arrayFrom(dependencyNames.keys()); _c < _d.length; _c++) {
|
|
169039
|
+
var name = _d[_c];
|
|
169040
|
+
var state_1 = _loop_2(name);
|
|
169041
|
+
if (typeof state_1 === "object")
|
|
169042
|
+
return state_1.value;
|
|
169026
169043
|
}
|
|
169027
169044
|
}
|
|
169028
169045
|
if (rootNames === null || rootNames === void 0 ? void 0 : rootNames.length) {
|
|
@@ -170421,7 +170438,7 @@ var ts;
|
|
|
170421
170438
|
}
|
|
170422
170439
|
project.updateGraph();
|
|
170423
170440
|
if (!this.useSingleInferredProject && !project.projectRootPath) {
|
|
170424
|
-
var
|
|
170441
|
+
var _loop_3 = function (inferredProject) {
|
|
170425
170442
|
if (inferredProject === project || inferredProject.isOrphan()) {
|
|
170426
170443
|
return "continue";
|
|
170427
170444
|
}
|
|
@@ -170442,7 +170459,7 @@ var ts;
|
|
|
170442
170459
|
// Note that we need to create a copy of the array since the list of project can change
|
|
170443
170460
|
for (var _i = 0, _a = this.inferredProjects; _i < _a.length; _i++) {
|
|
170444
170461
|
var inferredProject = _a[_i];
|
|
170445
|
-
|
|
170462
|
+
_loop_3(inferredProject);
|
|
170446
170463
|
}
|
|
170447
170464
|
}
|
|
170448
170465
|
return project;
|
|
@@ -171383,7 +171400,7 @@ var ts;
|
|
|
171383
171400
|
return projects;
|
|
171384
171401
|
function combineProjects(toAddInfo) {
|
|
171385
171402
|
if (toAddInfo !== info) {
|
|
171386
|
-
var
|
|
171403
|
+
var _loop_4 = function (project) {
|
|
171387
171404
|
// Add the projects only if they can use symLink targets and not already in the list
|
|
171388
171405
|
if (project.languageServiceEnabled &&
|
|
171389
171406
|
!project.isOrphan() &&
|
|
@@ -171400,7 +171417,7 @@ var ts;
|
|
|
171400
171417
|
};
|
|
171401
171418
|
for (var _i = 0, _a = toAddInfo.containingProjects; _i < _a.length; _i++) {
|
|
171402
171419
|
var project = _a[_i];
|
|
171403
|
-
|
|
171420
|
+
_loop_4(project);
|
|
171404
171421
|
}
|
|
171405
171422
|
}
|
|
171406
171423
|
}
|
|
@@ -172330,13 +172347,13 @@ var ts;
|
|
|
172330
172347
|
return result;
|
|
172331
172348
|
};
|
|
172332
172349
|
ProjectService.prototype.collectChanges = function (lastKnownProjectVersions, currentProjects, includeProjectReferenceRedirectInfo, result) {
|
|
172333
|
-
var
|
|
172350
|
+
var _loop_5 = function (proj) {
|
|
172334
172351
|
var knownProject = ts.find(lastKnownProjectVersions, function (p) { return p.projectName === proj.getProjectName(); });
|
|
172335
172352
|
result.push(proj.getChangesSinceVersion(knownProject && knownProject.version, includeProjectReferenceRedirectInfo));
|
|
172336
172353
|
};
|
|
172337
172354
|
for (var _i = 0, currentProjects_1 = currentProjects; _i < currentProjects_1.length; _i++) {
|
|
172338
172355
|
var proj = currentProjects_1[_i];
|
|
172339
|
-
|
|
172356
|
+
_loop_5(proj);
|
|
172340
172357
|
}
|
|
172341
172358
|
};
|
|
172342
172359
|
/* @internal */
|
|
@@ -172476,12 +172493,12 @@ var ts;
|
|
|
172476
172493
|
var excludeRules = [];
|
|
172477
172494
|
var normalizedNames = rootFiles.map(function (f) { return ts.normalizeSlashes(f.fileName); });
|
|
172478
172495
|
var excludedFiles = [];
|
|
172479
|
-
var
|
|
172480
|
-
var rule =
|
|
172496
|
+
var _loop_6 = function (name) {
|
|
172497
|
+
var rule = this_3.safelist[name];
|
|
172481
172498
|
for (var _b = 0, normalizedNames_1 = normalizedNames; _b < normalizedNames_1.length; _b++) {
|
|
172482
172499
|
var root = normalizedNames_1[_b];
|
|
172483
172500
|
if (rule.match.test(root)) {
|
|
172484
|
-
|
|
172501
|
+
this_3.logger.info("Excluding files based on rule " + name + " matching file '" + root + "'");
|
|
172485
172502
|
// If the file matches, collect its types packages and exclude rules
|
|
172486
172503
|
if (rule.types) {
|
|
172487
172504
|
for (var _c = 0, _d = rule.types; _c < _d.length; _c++) {
|
|
@@ -172494,7 +172511,7 @@ var ts;
|
|
|
172494
172511
|
}
|
|
172495
172512
|
}
|
|
172496
172513
|
if (rule.exclude) {
|
|
172497
|
-
var
|
|
172514
|
+
var _loop_8 = function (exclude) {
|
|
172498
172515
|
var processedRule = root.replace(rule.match, function () {
|
|
172499
172516
|
var groups = [];
|
|
172500
172517
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
@@ -172521,7 +172538,7 @@ var ts;
|
|
|
172521
172538
|
};
|
|
172522
172539
|
for (var _e = 0, _f = rule.exclude; _e < _f.length; _e++) {
|
|
172523
172540
|
var exclude = _f[_e];
|
|
172524
|
-
|
|
172541
|
+
_loop_8(exclude);
|
|
172525
172542
|
}
|
|
172526
172543
|
}
|
|
172527
172544
|
else {
|
|
@@ -172534,14 +172551,14 @@ var ts;
|
|
|
172534
172551
|
}
|
|
172535
172552
|
}
|
|
172536
172553
|
};
|
|
172537
|
-
var
|
|
172554
|
+
var this_3 = this;
|
|
172538
172555
|
for (var _i = 0, _a = Object.keys(this.safelist); _i < _a.length; _i++) {
|
|
172539
172556
|
var name = _a[_i];
|
|
172540
|
-
|
|
172557
|
+
_loop_6(name);
|
|
172541
172558
|
}
|
|
172542
172559
|
var excludeRegexes = excludeRules.map(function (e) { return new RegExp(e, "i"); });
|
|
172543
172560
|
var filesToKeep = [];
|
|
172544
|
-
var
|
|
172561
|
+
var _loop_7 = function (i) {
|
|
172545
172562
|
if (excludeRegexes.some(function (re) { return re.test(normalizedNames[i]); })) {
|
|
172546
172563
|
excludedFiles.push(normalizedNames[i]);
|
|
172547
172564
|
}
|
|
@@ -172552,9 +172569,9 @@ var ts;
|
|
|
172552
172569
|
if (ts.fileExtensionIs(baseName, "js")) {
|
|
172553
172570
|
var inferredTypingName = ts.removeFileExtension(baseName);
|
|
172554
172571
|
var cleanedTypingName = ts.removeMinAndVersionNumbers(inferredTypingName);
|
|
172555
|
-
var typeName =
|
|
172572
|
+
var typeName = this_4.legacySafelist.get(cleanedTypingName);
|
|
172556
172573
|
if (typeName !== undefined) {
|
|
172557
|
-
|
|
172574
|
+
this_4.logger.info("Excluded '" + normalizedNames[i] + "' because it matched " + cleanedTypingName + " from the legacy safelist");
|
|
172558
172575
|
excludedFiles.push(normalizedNames[i]);
|
|
172559
172576
|
// *exclude* it from the project...
|
|
172560
172577
|
exclude = true;
|
|
@@ -172577,9 +172594,9 @@ var ts;
|
|
|
172577
172594
|
}
|
|
172578
172595
|
}
|
|
172579
172596
|
};
|
|
172580
|
-
var
|
|
172597
|
+
var this_4 = this;
|
|
172581
172598
|
for (var i = 0; i < proj.rootFiles.length; i++) {
|
|
172582
|
-
|
|
172599
|
+
_loop_7(i);
|
|
172583
172600
|
}
|
|
172584
172601
|
proj.rootFiles = filesToKeep;
|
|
172585
172602
|
return excludedFiles;
|
|
@@ -173233,7 +173250,7 @@ var ts;
|
|
|
173233
173250
|
logger.info("Finding references to " + location.fileName + " position " + location.pos + " in project " + project.getProjectName());
|
|
173234
173251
|
var projectOutputs = project.getLanguageService().findReferences(location.fileName, location.pos);
|
|
173235
173252
|
if (projectOutputs) {
|
|
173236
|
-
var
|
|
173253
|
+
var _loop_9 = function (referencedSymbol) {
|
|
173237
173254
|
var mappedDefinitionFile = getMappedLocation(project, documentSpanLocation(referencedSymbol.definition));
|
|
173238
173255
|
var definition = mappedDefinitionFile === undefined ?
|
|
173239
173256
|
referencedSymbol.definition : __assign(__assign({}, referencedSymbol.definition), { textSpan: ts.createTextSpan(mappedDefinitionFile.pos, referencedSymbol.definition.textSpan.length), fileName: mappedDefinitionFile.fileName, contextSpan: getMappedContextSpan(referencedSymbol.definition, project) });
|
|
@@ -173252,7 +173269,7 @@ var ts;
|
|
|
173252
173269
|
};
|
|
173253
173270
|
for (var _i = 0, projectOutputs_2 = projectOutputs; _i < projectOutputs_2.length; _i++) {
|
|
173254
173271
|
var referencedSymbol = projectOutputs_2[_i];
|
|
173255
|
-
|
|
173272
|
+
_loop_9(referencedSymbol);
|
|
173256
173273
|
}
|
|
173257
173274
|
}
|
|
173258
173275
|
});
|
package/lib/typescript.js
CHANGED
|
@@ -294,7 +294,7 @@ var ts;
|
|
|
294
294
|
// The following is baselined as a literal template type without intervention
|
|
295
295
|
/** The version of the TypeScript compiler release */
|
|
296
296
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
297
|
-
ts.version = ts.versionMajorMinor + ".0-dev.
|
|
297
|
+
ts.version = ts.versionMajorMinor + ".0-dev.20220322";
|
|
298
298
|
/* @internal */
|
|
299
299
|
var Comparison;
|
|
300
300
|
(function (Comparison) {
|
|
@@ -128565,7 +128565,7 @@ var ts;
|
|
|
128565
128565
|
packageName = ts.unmangleScopedPackageName(ts.getPackageNameFromTypesPackageName(moduleFile.fileName.substring(topLevelPackageNameIndex + 1, packageRootIndex)));
|
|
128566
128566
|
if (ts.startsWith(importingFile, moduleFile.path.substring(0, topLevelNodeModulesIndex))) {
|
|
128567
128567
|
var prevDeepestNodeModulesPath = packages.get(packageName);
|
|
128568
|
-
var nodeModulesPath = moduleFile.fileName.substring(0, topLevelPackageNameIndex);
|
|
128568
|
+
var nodeModulesPath = moduleFile.fileName.substring(0, topLevelPackageNameIndex + 1);
|
|
128569
128569
|
if (prevDeepestNodeModulesPath) {
|
|
128570
128570
|
var prevDeepestNodeModulesIndex = prevDeepestNodeModulesPath.indexOf(ts.nodeModulesPathPart);
|
|
128571
128571
|
if (topLevelNodeModulesIndex > prevDeepestNodeModulesIndex) {
|
|
@@ -128736,6 +128736,9 @@ var ts;
|
|
|
128736
128736
|
function isNotShadowedByDeeperNodeModulesPackage(info, packageName) {
|
|
128737
128737
|
if (!packageName || !info.moduleFileName)
|
|
128738
128738
|
return true;
|
|
128739
|
+
var typingsCacheLocation = host.getGlobalTypingsCacheLocation();
|
|
128740
|
+
if (typingsCacheLocation && ts.startsWith(info.moduleFileName, typingsCacheLocation))
|
|
128741
|
+
return true;
|
|
128739
128742
|
var packageDeepestNodeModulesPath = packages.get(packageName);
|
|
128740
128743
|
return !packageDeepestNodeModulesPath || ts.startsWith(info.moduleFileName, packageDeepestNodeModulesPath);
|
|
128741
128744
|
}
|
|
@@ -128814,6 +128817,7 @@ var ts;
|
|
|
128814
128817
|
var cache = ((_b = host.getCachedExportInfoMap) === null || _b === void 0 ? void 0 : _b.call(host)) || createCacheableExportInfoMap({
|
|
128815
128818
|
getCurrentProgram: function () { return program; },
|
|
128816
128819
|
getPackageJsonAutoImportProvider: function () { var _a; return (_a = host.getPackageJsonAutoImportProvider) === null || _a === void 0 ? void 0 : _a.call(host); },
|
|
128820
|
+
getGlobalTypingsCacheLocation: function () { var _a; return (_a = host.getGlobalTypingsCacheLocation) === null || _a === void 0 ? void 0 : _a.call(host); },
|
|
128817
128821
|
});
|
|
128818
128822
|
if (cache.isUsableByFile(importingFile.path)) {
|
|
128819
128823
|
(_c = host.log) === null || _c === void 0 ? void 0 : _c.call(host, "getExportInfoMap: cache hit");
|
|
@@ -294,7 +294,7 @@ var ts;
|
|
|
294
294
|
// The following is baselined as a literal template type without intervention
|
|
295
295
|
/** The version of the TypeScript compiler release */
|
|
296
296
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
297
|
-
ts.version = ts.versionMajorMinor + ".0-dev.
|
|
297
|
+
ts.version = ts.versionMajorMinor + ".0-dev.20220322";
|
|
298
298
|
/* @internal */
|
|
299
299
|
var Comparison;
|
|
300
300
|
(function (Comparison) {
|
|
@@ -128565,7 +128565,7 @@ var ts;
|
|
|
128565
128565
|
packageName = ts.unmangleScopedPackageName(ts.getPackageNameFromTypesPackageName(moduleFile.fileName.substring(topLevelPackageNameIndex + 1, packageRootIndex)));
|
|
128566
128566
|
if (ts.startsWith(importingFile, moduleFile.path.substring(0, topLevelNodeModulesIndex))) {
|
|
128567
128567
|
var prevDeepestNodeModulesPath = packages.get(packageName);
|
|
128568
|
-
var nodeModulesPath = moduleFile.fileName.substring(0, topLevelPackageNameIndex);
|
|
128568
|
+
var nodeModulesPath = moduleFile.fileName.substring(0, topLevelPackageNameIndex + 1);
|
|
128569
128569
|
if (prevDeepestNodeModulesPath) {
|
|
128570
128570
|
var prevDeepestNodeModulesIndex = prevDeepestNodeModulesPath.indexOf(ts.nodeModulesPathPart);
|
|
128571
128571
|
if (topLevelNodeModulesIndex > prevDeepestNodeModulesIndex) {
|
|
@@ -128736,6 +128736,9 @@ var ts;
|
|
|
128736
128736
|
function isNotShadowedByDeeperNodeModulesPackage(info, packageName) {
|
|
128737
128737
|
if (!packageName || !info.moduleFileName)
|
|
128738
128738
|
return true;
|
|
128739
|
+
var typingsCacheLocation = host.getGlobalTypingsCacheLocation();
|
|
128740
|
+
if (typingsCacheLocation && ts.startsWith(info.moduleFileName, typingsCacheLocation))
|
|
128741
|
+
return true;
|
|
128739
128742
|
var packageDeepestNodeModulesPath = packages.get(packageName);
|
|
128740
128743
|
return !packageDeepestNodeModulesPath || ts.startsWith(info.moduleFileName, packageDeepestNodeModulesPath);
|
|
128741
128744
|
}
|
|
@@ -128814,6 +128817,7 @@ var ts;
|
|
|
128814
128817
|
var cache = ((_b = host.getCachedExportInfoMap) === null || _b === void 0 ? void 0 : _b.call(host)) || createCacheableExportInfoMap({
|
|
128815
128818
|
getCurrentProgram: function () { return program; },
|
|
128816
128819
|
getPackageJsonAutoImportProvider: function () { var _a; return (_a = host.getPackageJsonAutoImportProvider) === null || _a === void 0 ? void 0 : _a.call(host); },
|
|
128820
|
+
getGlobalTypingsCacheLocation: function () { var _a; return (_a = host.getGlobalTypingsCacheLocation) === null || _a === void 0 ? void 0 : _a.call(host); },
|
|
128817
128821
|
});
|
|
128818
128822
|
if (cache.isUsableByFile(importingFile.path)) {
|
|
128819
128823
|
(_c = host.log) === null || _c === void 0 ? void 0 : _c.call(host, "getExportInfoMap: cache hit");
|
package/lib/typingsInstaller.js
CHANGED
|
@@ -89,7 +89,7 @@ var ts;
|
|
|
89
89
|
// The following is baselined as a literal template type without intervention
|
|
90
90
|
/** The version of the TypeScript compiler release */
|
|
91
91
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
92
|
-
ts.version = ts.versionMajorMinor + ".0-dev.
|
|
92
|
+
ts.version = ts.versionMajorMinor + ".0-dev.20220322";
|
|
93
93
|
/* @internal */
|
|
94
94
|
var Comparison;
|
|
95
95
|
(function (Comparison) {
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
"A_type_predicate_cannot_reference_element_0_in_a_binding_pattern_1230": "类型谓词无法在绑定模式中引用元素“{0}”。",
|
|
102
102
|
"A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods_1228": "只允许在函数和方法的返回类型位置使用类型谓词。",
|
|
103
103
|
"A_type_predicate_s_type_must_be_assignable_to_its_parameter_s_type_2677": "类型谓词的类型不可赋给其参数的类型。",
|
|
104
|
-
"A_type_referenced_in_a_decorated_signature_must_be_imported_with_import_type_or_a_namespace_import_w_1272": "
|
|
104
|
+
"A_type_referenced_in_a_decorated_signature_must_be_imported_with_import_type_or_a_namespace_import_w_1272": "启用 “isolatedModules” 和 “emitDecoratorMetadata” 时,必须使用 “import type” 或命名空间导入来导入修饰签名中引用的类型。",
|
|
105
105
|
"A_variable_whose_type_is_a_unique_symbol_type_must_be_const_1332": "类型为 \"unique symbol\" 的变量必须为 \"const\"。",
|
|
106
106
|
"A_yield_expression_is_only_allowed_in_a_generator_body_1163": "只允许在生成器正文中使用 \"yield\" 表达式。",
|
|
107
107
|
"Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression_2513": "无法通过 super 表达式访问“{1}”类中的“{0}”抽象方法。",
|
|
@@ -266,7 +266,7 @@
|
|
|
266
266
|
"Binding_element_0_implicitly_has_an_1_type_7031": "绑定元素“{0}”隐式具有“{1}”类型。",
|
|
267
267
|
"Block_scoped_variable_0_used_before_its_declaration_2448": "声明之前已使用的块范围变量“{0}”。",
|
|
268
268
|
"Build_a_composite_project_in_the_working_directory_6925": "在工作目录中生成复合项目。",
|
|
269
|
-
"Build_all_projects_including_those_that_appear_to_be_up_to_date_6636": "
|
|
269
|
+
"Build_all_projects_including_those_that_appear_to_be_up_to_date_6636": "生成所有项目,包括那些似乎是最新的项目。",
|
|
270
270
|
"Build_one_or_more_projects_and_their_dependencies_if_out_of_date_6364": "生成一个或多个项目及其依赖项(如果已过期)",
|
|
271
271
|
"Build_option_0_requires_a_value_of_type_1_5073": "生成选项 \"{0}\" 需要类型 {1} 的值。",
|
|
272
272
|
"Building_project_0_6358": "正在生成项目“{0}”...",
|
|
@@ -418,7 +418,7 @@
|
|
|
418
418
|
"Constructors_for_derived_classes_must_contain_a_super_call_2377": "派生类的构造函数必须包含 \"super\" 调用。",
|
|
419
419
|
"Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_mod_6126": "未指定包含文件,并且无法确定根目录,正在跳过在 \"node_modules\" 文件夹中查找。",
|
|
420
420
|
"Containing_function_is_not_an_arrow_function_95128": "包含函数不是箭头函数",
|
|
421
|
-
"Control_what_method_is_used_to_detect_module_format_JS_files_1475": "
|
|
421
|
+
"Control_what_method_is_used_to_detect_module_format_JS_files_1475": "控制用于检测模块格式 JS 文件的方法。",
|
|
422
422
|
"Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the__2352": "类型 \"{0}\" 到类型 \"{1}\" 的转换可能是错误的,因为两种类型不能充分重叠。如果这是有意的,请先将表达式转换为 \"unknown\"。",
|
|
423
423
|
"Convert_0_to_1_in_0_95003": "将“{0}”转换为 {0} 中的 {1}",
|
|
424
424
|
"Convert_0_to_mapped_object_type_95055": "将“{0}”转换为映射对象类型",
|
|
@@ -498,7 +498,7 @@
|
|
|
498
498
|
"Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name_1207": "不能向多个同名的 get/set 访问器应用修饰器。",
|
|
499
499
|
"Decorators_may_not_be_applied_to_this_parameters_1433": "修饰器不能应用于 “this” 参数。",
|
|
500
500
|
"Decorators_must_precede_the_name_and_all_keywords_of_property_declarations_1436": "修饰器必须位于属性声明的名称和所有关键字之前。",
|
|
501
|
-
"Default_catch_clause_variables_as_unknown_instead_of_any_6803": "
|
|
501
|
+
"Default_catch_clause_variables_as_unknown_instead_of_any_6803": "将 catch 子句变量默认为 “unknown” 而不是 “any”。",
|
|
502
502
|
"Default_export_of_the_module_has_or_is_using_private_name_0_4082": "模块的默认导出具有或正在使用专用名称“{0}”。",
|
|
503
503
|
"Default_library_1424": "默认库",
|
|
504
504
|
"Default_library_for_target_0_1425": "目标 \"{0}\" 的默认库",
|
|
@@ -506,7 +506,7 @@
|
|
|
506
506
|
"Delete_all_unused_declarations_95024": "删除未使用的所有声明",
|
|
507
507
|
"Delete_all_unused_imports_95147": "删除所有未使用的导入",
|
|
508
508
|
"Delete_all_unused_param_tags_95172": "删除所有未使用的 “@param” 标记",
|
|
509
|
-
"Delete_the_outputs_of_all_projects_6365": "
|
|
509
|
+
"Delete_the_outputs_of_all_projects_6365": "删除所有项目的输出。",
|
|
510
510
|
"Delete_unused_param_tag_0_95171": "删除未使用的 “@param” 标记“{0}”",
|
|
511
511
|
"Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react__6084": "[已弃用] 请改用 \"--jsxFactory\"。已 \"react\" JSX 发出设为目标时,请指定要为 createElement 调用的对象",
|
|
512
512
|
"Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file_6170": "[已弃用] 请改用 \"--outFile\"。连接并发出到单个文件的输出",
|
|
@@ -525,7 +525,7 @@
|
|
|
525
525
|
"Disable_adding_use_strict_directives_in_emitted_JavaScript_files_6669": "禁止在发出的 JavaScript 文件中添加 “use strict” 指令。",
|
|
526
526
|
"Disable_checking_for_this_file_90018": "禁用检查此文件",
|
|
527
527
|
"Disable_emitting_comments_6688": "禁用发出注释。",
|
|
528
|
-
"Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments_6701": "禁用在其 JSDoc 注释中包含 “@internal”
|
|
528
|
+
"Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments_6701": "禁用在其 JSDoc 注释中包含 “@internal” 的发出声明。",
|
|
529
529
|
"Disable_emitting_files_from_a_compilation_6660": "禁用从编译发出文件。",
|
|
530
530
|
"Disable_emitting_files_if_any_type_checking_errors_are_reported_6662": "禁用在报告了任何类型检查错误时发出文件。",
|
|
531
531
|
"Disable_erasing_const_enum_declarations_in_generated_code_6682": "在生成的代码中禁用擦除 “const enum” 声明。",
|
|
@@ -534,7 +534,7 @@
|
|
|
534
534
|
"Disable_generating_custom_helper_functions_like_extends_in_compiled_output_6661": "在已编译输出中禁用生成自定义帮助程序函数(如 “__extends”)。",
|
|
535
535
|
"Disable_including_any_library_files_including_the_default_lib_d_ts_6670": "禁用包括任何库文件(包括默认的 lib.d.ts)。",
|
|
536
536
|
"Disable_loading_referenced_projects_6235": "禁止加载引用的项目。",
|
|
537
|
-
"Disable_preferring_source_files_instead_of_declaration_files_when_referencing_composite_projects_6620": "
|
|
537
|
+
"Disable_preferring_source_files_instead_of_declaration_files_when_referencing_composite_projects_6620": "在引用复合项目时禁用首选源文件而不是声明文件。",
|
|
538
538
|
"Disable_reporting_of_excess_property_errors_during_the_creation_of_object_literals_6702": "禁用在创建对象文字期间报告多余属性错误。",
|
|
539
539
|
"Disable_resolving_symlinks_to_their_realpath_This_correlates_to_the_same_flag_in_node_6683": "禁用将符号链接解析为其实际路径。这会关联到节点中的同一标志。",
|
|
540
540
|
"Disable_size_limitations_on_JavaScript_projects_6162": "禁用对 JavaScript 项目的大小限制。",
|
|
@@ -543,9 +543,9 @@
|
|
|
543
543
|
"Disable_the_type_acquisition_for_JavaScript_projects_6625": "禁用针对 JavaScript 项目的类型获取",
|
|
544
544
|
"Disable_truncating_types_in_error_messages_6663": "在错误消息中禁用截断类型。",
|
|
545
545
|
"Disable_use_of_source_files_instead_of_declaration_files_from_referenced_projects_6221": "禁止使用源文件而不是引用项目中的声明文件。",
|
|
546
|
-
"Disable_wiping_the_console_in_watch_mode_6684": "
|
|
546
|
+
"Disable_wiping_the_console_in_watch_mode_6684": "禁用在监视模式下擦除控制台。",
|
|
547
547
|
"Disables_inference_for_type_acquisition_by_looking_at_filenames_in_a_project_6616": "禁用通过查看项目中的文件名进行类型获取推理。",
|
|
548
|
-
"Disallow_import_s_require_s_or_reference_s_from_expanding_the_number_of_files_TypeScript_should_add__6672": "禁止 “import”、“require” 或
|
|
548
|
+
"Disallow_import_s_require_s_or_reference_s_from_expanding_the_number_of_files_TypeScript_should_add__6672": "禁止 “import”、“require” 或 “<reference>” 扩展 TypeScript 应添加到项目的文件数。",
|
|
549
549
|
"Disallow_inconsistently_cased_references_to_the_same_file_6078": "不允许对同一文件采用大小不一致的引用。",
|
|
550
550
|
"Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files_6159": "请勿将三斜杠引用或导入的模块添加到已编译文件列表中。",
|
|
551
551
|
"Do_not_emit_comments_to_output_6009": "请勿将注释发出到输出。",
|
|
@@ -590,22 +590,22 @@
|
|
|
590
590
|
"Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files_6622": "在输出文件的开头发出一个 UTF-8 字节顺序标记(BOM)。",
|
|
591
591
|
"Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file_6151": "发出包含源映射而非包含单独文件的单个文件。",
|
|
592
592
|
"Emit_a_v8_CPU_profile_of_the_compiler_run_for_debugging_6638": "发出用于调试的编译器运行的 v8 CPU 配置文件。",
|
|
593
|
-
"Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheti_6626": "发出其他 JavaScript
|
|
593
|
+
"Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheti_6626": "发出其他 JavaScript 以轻松支持导入 CommonJS 模块。这将启用 “allowSyntheticDefaultImports” 以实现类型兼容性。",
|
|
594
594
|
"Emit_class_fields_with_Define_instead_of_Set_6222": "使用 Define 而不是 Set 发出类字段。",
|
|
595
595
|
"Emit_design_type_metadata_for_decorated_declarations_in_source_files_6624": "为源文件中的修饰声明发出设计类型元数据。",
|
|
596
596
|
"Emit_more_compliant_but_verbose_and_less_performant_JavaScript_for_iteration_6621": "发出更合规但更详细且性能较低的 JavaScript 进行迭代。",
|
|
597
597
|
"Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap__6152": "在单个文件内发出源以及源映射;需要设置 \"--inlineSourceMap\" 或 \"--sourceMap\"。",
|
|
598
598
|
"Enable_all_strict_type_checking_options_6180": "启用所有严格类型检查选项。",
|
|
599
|
-
"Enable_color_and_formatting_in_TypeScript_s_output_to_make_compiler_errors_easier_to_read_6685": "在 TypeScript
|
|
599
|
+
"Enable_color_and_formatting_in_TypeScript_s_output_to_make_compiler_errors_easier_to_read_6685": "在 TypeScript 输出中启用颜色和格式设置,以使编译器错误更易于阅读。",
|
|
600
600
|
"Enable_constraints_that_allow_a_TypeScript_project_to_be_used_with_project_references_6611": "启用允许将 TypeScript 项目与项目引用一起使用的约束。",
|
|
601
601
|
"Enable_error_reporting_for_codepaths_that_do_not_explicitly_return_in_a_function_6667": "为未在函数中显式返回的代码路径启用错误报告。",
|
|
602
602
|
"Enable_error_reporting_for_expressions_and_declarations_with_an_implied_any_type_6665": "对具有隐式 “any” 类型的表达式和声明启用错误报告。",
|
|
603
603
|
"Enable_error_reporting_for_fallthrough_cases_in_switch_statements_6664": "为 switch 语句中的故障案例启用错误报告。",
|
|
604
604
|
"Enable_error_reporting_in_type_checked_JavaScript_files_6609": "在已检查类型的 JavaScript 文件中启用错误报告。",
|
|
605
|
-
"Enable_error_reporting_when_local_variables_aren_t_read_6675": "
|
|
606
|
-
"Enable_error_reporting_when_this_is_given_the_type_any_6668": "
|
|
605
|
+
"Enable_error_reporting_when_local_variables_aren_t_read_6675": "在未读取局部变量时启用错误报告。",
|
|
606
|
+
"Enable_error_reporting_when_this_is_given_the_type_any_6668": "在 “this” 的类型为 “any” 时启用错误报告。",
|
|
607
607
|
"Enable_experimental_support_for_TC39_stage_2_draft_decorators_6630": "为 TC39 暂存 2 草稿修饰器启用实验性支持。",
|
|
608
|
-
"Enable_importing_json_files_6689": "启用导入 .json
|
|
608
|
+
"Enable_importing_json_files_6689": "启用导入 .json 文件。",
|
|
609
609
|
"Enable_project_compilation_6302": "启用项目编译",
|
|
610
610
|
"Enable_strict_bind_call_and_apply_methods_on_functions_6214": "对函数启用严格的 \"bind\"、\"call\" 和 \"apply\" 方法。",
|
|
611
611
|
"Enable_strict_checking_of_function_types_6186": "对函数类型启用严格检查。",
|
|
@@ -614,11 +614,11 @@
|
|
|
614
614
|
"Enable_the_experimentalDecorators_option_in_your_configuration_file_95074": "在配置文件中启用 \"experimentalDecorators\" 选项",
|
|
615
615
|
"Enable_the_jsx_flag_in_your_configuration_file_95088": "在配置文件中启用 \"--jsx\" 标志",
|
|
616
616
|
"Enable_tracing_of_the_name_resolution_process_6085": "启用名称解析过程的跟踪。",
|
|
617
|
-
"Enable_verbose_logging_6713": "
|
|
617
|
+
"Enable_verbose_logging_6713": "启用详细日志记录。",
|
|
618
618
|
"Enables_emit_interoperability_between_CommonJS_and_ES_Modules_via_creation_of_namespace_objects_for__7037": "通过为所有导入创建命名空间对象来启用 CommonJS 和 ES 模块之间的发出互操作性。表示 \"allowSyntheticDefaultImports\"。",
|
|
619
619
|
"Enables_experimental_support_for_ES7_decorators_6065": "对 ES7 修饰器启用实验支持。",
|
|
620
620
|
"Enables_experimental_support_for_emitting_type_metadata_for_decorators_6066": "对发出修饰器的类型元数据启用实验支持。",
|
|
621
|
-
"Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type_6671": "
|
|
621
|
+
"Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type_6671": "对使用索引类型声明的键强制使用索引访问器。",
|
|
622
622
|
"Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier_6666": "确保使用替代修饰符标记派生类中的替代成员。",
|
|
623
623
|
"Ensure_that_casing_is_correct_in_imports_6637": "确保导入中的大小写正确。",
|
|
624
624
|
"Ensure_that_each_file_can_be_safely_transpiled_without_relying_on_other_imports_6645": "确保可以安全地转译每个文件,而无需依赖其他导入。",
|
|
@@ -759,7 +759,7 @@
|
|
|
759
759
|
"Global_type_0_must_be_a_class_or_interface_type_2316": "全局类型“{0}”必须为类或接口类型。",
|
|
760
760
|
"Global_type_0_must_have_1_type_parameter_s_2317": "全局类型“{0}”必须具有 {1} 个类型参数。",
|
|
761
761
|
"Have_recompiles_in_incremental_and_watch_assume_that_changes_within_a_file_will_only_affect_files_di_6384": "在 \"--incremental\" 和 \"--watch\" 中有重新编译,假定文件中的更改只会影响直接依赖它的文件。",
|
|
762
|
-
"Have_recompiles_in_projects_that_use_incremental_and_watch_mode_assume_that_changes_within_a_file_wi_6606": "在使用 “incremental” 和 “watch”
|
|
762
|
+
"Have_recompiles_in_projects_that_use_incremental_and_watch_mode_assume_that_changes_within_a_file_wi_6606": "在使用 “incremental” 和 “watch” 模式的项目中具有重新编译会假定文件中的更改将仅直接影响依赖于它的文件。",
|
|
763
763
|
"Hexadecimal_digit_expected_1125": "应为十六进制数字。",
|
|
764
764
|
"Identifier_expected_0_is_a_reserved_word_at_the_top_level_of_a_module_1262": "应为标识符。“{0}”是模块顶层的预留字。",
|
|
765
765
|
"Identifier_expected_0_is_a_reserved_word_in_strict_mode_1212": "应为标识符。“{0}”在严格模式下是保留字。",
|
|
@@ -1149,7 +1149,7 @@
|
|
|
1149
1149
|
"Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4027": "导出类的公共静态属性“{0}”具有或正在使用外部模块“{2}”中的名称“{1}”。",
|
|
1150
1150
|
"Public_static_property_0_of_exported_class_has_or_is_using_private_name_1_4028": "导出类的公共静态属性“{0}”具有或正在使用专用名称“{1}”。",
|
|
1151
1151
|
"Qualified_name_0_is_not_allowed_without_a_leading_param_object_1_8032": "不允许使用限定名 \"{0}\",因为没有前导 \"@param {object} {1}\"。",
|
|
1152
|
-
"Raise_an_error_when_a_function_parameter_isn_t_read_6676": "
|
|
1152
|
+
"Raise_an_error_when_a_function_parameter_isn_t_read_6676": "在未读取函数参数时引发错误。",
|
|
1153
1153
|
"Raise_error_on_expressions_and_declarations_with_an_implied_any_type_6052": "对具有隐式 \"any\" 类型的表达式和声明引发错误。",
|
|
1154
1154
|
"Raise_error_on_this_expressions_with_an_implied_any_type_6115": "在带隐式“any\" 类型的 \"this\" 表达式上引发错误。",
|
|
1155
1155
|
"Re_exporting_a_type_when_the_isolatedModules_flag_is_provided_requires_using_export_type_1205": "提供 \"--isolatedModules\" 标志时,需要使用 \"export type\" 才能重新导出类型。",
|
|
@@ -1290,7 +1290,7 @@
|
|
|
1290
1290
|
"Specify_a_set_of_entries_that_re_map_imports_to_additional_lookup_locations_6680": "指定一组将导入重新映射到其他查找位置的条目。",
|
|
1291
1291
|
"Specify_an_array_of_objects_that_specify_paths_for_projects_Used_in_project_references_6687": "指定为项目指定路径的对象数组。在项目引用中使用。",
|
|
1292
1292
|
"Specify_an_output_folder_for_all_emitted_files_6678": "为所有已发出的文件指定输出文件夹。",
|
|
1293
|
-
"Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types_6718": "
|
|
1293
|
+
"Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types_6718": "指定仅用于类型的导入的发出/检查行为。",
|
|
1294
1294
|
"Specify_file_to_store_incremental_compilation_information_6380": "指定用于存储增量编译信息的文件",
|
|
1295
1295
|
"Specify_how_TypeScript_looks_up_a_file_from_a_given_module_specifier_6658": "指定 TypeScript 如何从给定的模块说明符查找文件。",
|
|
1296
1296
|
"Specify_how_directories_are_watched_on_systems_that_lack_recursive_file_watching_functionality_6714": "指定在缺少递归文件监视功能的系统上监视目录的方式。",
|
|
@@ -1299,7 +1299,7 @@
|
|
|
1299
1299
|
"Specify_module_code_generation_6016": "指定模块代码生成。",
|
|
1300
1300
|
"Specify_module_resolution_strategy_Colon_node_Node_js_or_classic_TypeScript_pre_1_6_6069": "指定模块解析策略: \"node\" (Node.js)或 \"classic\" (TypeScript pre-1.6)。",
|
|
1301
1301
|
"Specify_module_specifier_used_to_import_the_JSX_factory_functions_when_using_jsx_Colon_react_jsx_Ast_6649": "指定使用 “jsx: react-jsx*” 时用于导入 JSX 中心函数的模块说明符。",
|
|
1302
|
-
"Specify_multiple_folders_that_act_like_Slashnode_modules_Slash_types_6710": "
|
|
1302
|
+
"Specify_multiple_folders_that_act_like_Slashnode_modules_Slash_types_6710": "指定多个行为类似于 “./node_modules/@types” 的文件夹。",
|
|
1303
1303
|
"Specify_one_or_more_path_or_node_module_references_to_base_configuration_files_from_which_settings_a_6633": "指定对从中继承设置的基本配置文件的一个或多个路径或节点模块引用。",
|
|
1304
1304
|
"Specify_options_for_automatic_acquisition_of_declaration_files_6709": "指定用于自动获取声明文件的选项。",
|
|
1305
1305
|
"Specify_strategy_for_creating_a_polling_watch_when_it_fails_to_create_using_file_system_events_Colon_6227": "指定在使用文件系统事件创建轮询监视失败时创建轮询监视的策略: \"FixedInterval\" (默认)、\"PriorityInterval\"、\"DynamicPriority\"、\"FixedChunkSize\"。",
|
|
@@ -1307,7 +1307,7 @@
|
|
|
1307
1307
|
"Specify_strategy_for_watching_file_Colon_FixedPollingInterval_default_PriorityPollingInterval_Dynami_6225": "指定监视文件的策略: \"FixedPollingInterval\" (默认)、\"PriorityPollingInterval\"、\"DynamicPriorityPolling\"、\"FixedChunkSizePolling\"、\"UseFsEvents\"、\"UseFsEventsOnParentDirectory\"。",
|
|
1308
1308
|
"Specify_the_JSX_Fragment_reference_used_for_fragments_when_targeting_React_JSX_emit_e_g_React_Fragme_6648": "指定在将 React JSX 发出设定为目标时用于片段的 JSX 片段引用,例如 “React.Fragment” 或 “Fragment”。",
|
|
1309
1309
|
"Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h_6146": "指定在设定 \"react\" JSX 发出目标时要使用的 JSX 工厂函数,例如 \"react.createElement\" 或 \"h\"。",
|
|
1310
|
-
"Specify_the_JSX_factory_function_used_when_targeting_React_JSX_emit_e_g_React_createElement_or_h_6647": "指定在将 React JSX 发出设定为目标时要使用的 JSX 中心函数,例如 “react.createElement” 或 “h
|
|
1310
|
+
"Specify_the_JSX_factory_function_used_when_targeting_React_JSX_emit_e_g_React_createElement_or_h_6647": "指定在将 React JSX 发出设定为目标时要使用的 JSX 中心函数,例如 “react.createElement” 或 “h”。",
|
|
1311
1311
|
"Specify_the_JSX_fragment_factory_function_to_use_when_targeting_react_JSX_emit_with_jsxFactory_compi_18034": "当指定使用 \"jsxFactory\" 编译器选项面向 \"react\" JSX 发出时,指定要使用的 JSX 片段工厂函数,例如 \"Fragment\"。",
|
|
1312
1312
|
"Specify_the_base_directory_to_resolve_non_relative_module_names_6607": "指定基目录以解析非相关模块名称。",
|
|
1313
1313
|
"Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix_6060": "指定发出文件时要使用的行序列结尾: \"CRLF\" (dos)或 \"LF\" (unix)。",
|
|
@@ -1316,7 +1316,7 @@
|
|
|
1316
1316
|
"Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations_6655": "指定调试程序应将映射文件放置到的位置而不是生成的位置。",
|
|
1317
1317
|
"Specify_the_maximum_folder_depth_used_for_checking_JavaScript_files_from_node_modules_Only_applicabl_6656": "指定用于从 “node_modules” 检查 JavaScript 文件的最大文件夹深度。仅适用于 “allowJs”。",
|
|
1318
1318
|
"Specify_the_module_specifier_to_be_used_to_import_the_jsx_and_jsxs_factory_functions_from_eg_react_6238": "指定要用于从 eg,react 中导入 “jsx” 和 “jsxs” 工厂函数的模块说明符",
|
|
1319
|
-
"Specify_the_object_invoked_for_createElement_This_only_applies_when_targeting_react_JSX_emit_6686": "指定为 “createElement”
|
|
1319
|
+
"Specify_the_object_invoked_for_createElement_This_only_applies_when_targeting_react_JSX_emit_6686": "指定为 “createElement” 调用的对象。这仅适用于将 “react” JSX 发出设定为目标的情况。",
|
|
1320
1320
|
"Specify_the_output_directory_for_generated_declaration_files_6613": "指定已生成声明文件的输出目录。",
|
|
1321
1321
|
"Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir_6058": "指定输入文件的根目录。与 --outDir 一起用于控制输出目录结构。",
|
|
1322
1322
|
"Specify_the_root_folder_within_your_source_files_6690": "指定源文件中的根文件夹。",
|
|
@@ -1347,7 +1347,7 @@
|
|
|
1347
1347
|
"Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors_2337": "不允许在构造函数外部或在构造函数内的嵌套函数中进行 Super 调用。",
|
|
1348
1348
|
"Suppress_excess_property_checks_for_object_literals_6072": "取消对象文字的多余属性检查。",
|
|
1349
1349
|
"Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures_6055": "抑制缺少索引签名的索引对象的 noImplicitAny 错误。",
|
|
1350
|
-
"Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures_6703": "
|
|
1350
|
+
"Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures_6703": "在对缺少索引签名的对象编制索引时,抑制 “noImplicitAny” 错误。",
|
|
1351
1351
|
"Switch_each_misused_0_to_1_95138": "将每个误用的“{0}”切换到“{1}”",
|
|
1352
1352
|
"Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_supp_6704": "在不支持本机递归监视的平台上同步调用回调并更新目录观察程序的状态。",
|
|
1353
1353
|
"Syntax_Colon_0_6023": "语法: {0}",
|
|
@@ -1720,7 +1720,7 @@
|
|
|
1720
1720
|
"abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration_1242": "\"abstract\" 修饰符仅可出现在类、方法或属性声明中。",
|
|
1721
1721
|
"and_here_6204": "并在这里。",
|
|
1722
1722
|
"arguments_cannot_be_referenced_in_property_initializers_2815": "无法在属性初始化表达式中引用 \"arguments\"。",
|
|
1723
|
-
"auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_w_1476": "
|
|
1723
|
+
"auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_w_1476": "“auto”: 将导入、导出、import.meta、jsx (带有 jsx: react-jsx)或 esm 格式(带模块: node12+)的文件视为模块。",
|
|
1724
1724
|
"await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_fi_1375": "仅当文件是模块时,才允许在该文件的顶层使用 \"await\" 表达式,但此文件没有导入或导出。请考虑添加空的 \"export {}\" 以将此文件变为模块。",
|
|
1725
1725
|
"await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_1308": "仅允许在异步函数和模块顶级使用 \"await\" 表达式。",
|
|
1726
1726
|
"await_expressions_cannot_be_used_in_a_parameter_initializer_2524": "不能在参数初始化表达式中使用 \"await\" 表达式。",
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "typescript",
|
|
3
3
|
"author": "Microsoft Corp.",
|
|
4
4
|
"homepage": "https://www.typescriptlang.org/",
|
|
5
|
-
"version": "4.7.0-dev.
|
|
5
|
+
"version": "4.7.0-dev.20220322",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|