typescript 4.6.0-dev.20220207 → 4.6.0-dev.20220208
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 +1 -2
- package/lib/ru/diagnosticMessages.generated.json +1 -2
- package/lib/tsc.js +2 -2
- package/lib/tsserver.js +26 -7
- package/lib/tsserverlibrary.js +26 -7
- package/lib/typescript.js +23 -5
- package/lib/typescriptServices.js +23 -5
- package/lib/typingsInstaller.js +2 -2
- package/lib/zh-tw/diagnosticMessages.generated.json +1 -2
- package/package.json +1 -1
|
@@ -435,6 +435,7 @@
|
|
|
435
435
|
"Convert_function_to_an_ES2015_class_95001": "Funktion in eine ES2015-Klasse konvertieren",
|
|
436
436
|
"Convert_invalid_character_to_its_html_entity_code_95100": "Ungültiges Zeichen in entsprechenden HTML-Entitätscode konvertieren",
|
|
437
437
|
"Convert_named_export_to_default_export_95062": "Benannten Export in Standardexport konvertieren",
|
|
438
|
+
"Convert_named_imports_to_default_import_95170": "Konvertieren benannter Importe in Standardimporte",
|
|
438
439
|
"Convert_named_imports_to_namespace_import_95057": "Benannte Importe in Namespaceimport konvertieren",
|
|
439
440
|
"Convert_namespace_import_to_named_imports_95056": "Namespaceimport in benannte Importe konvertieren",
|
|
440
441
|
"Convert_overload_list_to_single_signature_95118": "Überladungsliste in einzelne Signatur konvertieren",
|
|
@@ -1116,7 +1117,6 @@
|
|
|
1116
1117
|
"Property_0_is_protected_in_type_1_but_public_in_type_2_2444": "Die Eigenschaft \"{0}\" ist im Typ \"{1}\" geschützt, im Typ \"{2}\" aber öffentlich.",
|
|
1117
1118
|
"Property_0_is_used_before_being_assigned_2565": "Die Eigenschaft \"{0}\" wird vor ihrer Zuweisung verwendet.",
|
|
1118
1119
|
"Property_0_is_used_before_its_initialization_2729": "Die Eigenschaft \"{0}\" wird vor ihrer Initialisierung verwendet.",
|
|
1119
|
-
"Property_0_may_not_be_used_in_a_static_property_s_initializer_in_the_same_class_when_target_is_esnex_2810": "Die Eigenschaft \"{0}\" darf nicht im Initialisierer einer statischen Eigenschaft in derselben Klasse verwendet werden, wenn \"target\" auf \"esnext\" und \"useDefineForClassFields\" auf FALSE festgelegt ist.",
|
|
1120
1120
|
"Property_0_may_not_exist_on_type_1_Did_you_mean_2_2568": "Die Eigenschaft \"{0}\" ist für den Typ \"{1}\" möglicherweise nicht vorhanden. Meinten Sie \"{2}\"?",
|
|
1121
1121
|
"Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property_2606": "Die Eigenschaft \"{0}\" des JSX-Verteilungsattributs kann nicht der Zieleigenschaft zugewiesen werden.",
|
|
1122
1122
|
"Property_0_of_exported_class_expression_may_not_be_private_or_protected_4094": "Die Eigenschaft \"{0}\" des exportierten Klassenausdrucks ist unter Umständen nicht privat oder geschützt.",
|
|
@@ -1324,7 +1324,6 @@
|
|
|
1324
1324
|
"Starting_compilation_in_watch_mode_6031": "Kompilierung im Überwachungsmodus wird gestartet...",
|
|
1325
1325
|
"Statement_expected_1129": "Eine Anweisung wurde erwartet.",
|
|
1326
1326
|
"Statements_are_not_allowed_in_ambient_contexts_1036": "Anweisungen sind in Umgebungskontexten unzulässig.",
|
|
1327
|
-
"Static_fields_with_private_names_can_t_have_initializers_when_the_useDefineForClassFields_flag_is_no_2805": "Statische Felder mit privaten Namen dürfen keine Initialisierer enthalten, wenn das Flag \"--useDefineForClassFields\" nicht mit dem Wert \"esnext\" für \"--target\" angegeben wird. Erwägen Sie, das Flag \"--useDefineForClassFields\" hinzuzufügen.",
|
|
1328
1327
|
"Static_members_cannot_reference_class_type_parameters_2302": "Statische Member dürfen nicht auf Klassentypparameter verweisen.",
|
|
1329
1328
|
"Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1_2699": "Die statische Eigenschaft \"{0}\" steht in Konflikt mit der integrierten Eigenschaft \"Function.{0}\" der Konstruktorfunktion \"{1}\".",
|
|
1330
1329
|
"String_literal_expected_1141": "Ein Zeichenfolgenliteral wurde erwartet.",
|
|
@@ -435,6 +435,7 @@
|
|
|
435
435
|
"Convert_function_to_an_ES2015_class_95001": "Преобразование функции в класс ES2015",
|
|
436
436
|
"Convert_invalid_character_to_its_html_entity_code_95100": "Преобразовать недопустимый знак в его код сущности HTML",
|
|
437
437
|
"Convert_named_export_to_default_export_95062": "Преобразовать именованный экспорт в экспорт по умолчанию",
|
|
438
|
+
"Convert_named_imports_to_default_import_95170": "Преобразовать именованные операции импорта в стандартный импорт",
|
|
438
439
|
"Convert_named_imports_to_namespace_import_95057": "Преобразовать операции импорта имен в импорт пространства имен",
|
|
439
440
|
"Convert_namespace_import_to_named_imports_95056": "Преобразовать импорт пространства имен в операции импорта имен",
|
|
440
441
|
"Convert_overload_list_to_single_signature_95118": "Преобразовать список перегрузок в одиночную сигнатуру",
|
|
@@ -1116,7 +1117,6 @@
|
|
|
1116
1117
|
"Property_0_is_protected_in_type_1_but_public_in_type_2_2444": "Свойство \"{0}\" является защищенным в типе \"{1}\" и общим в типе \"{2}\".",
|
|
1117
1118
|
"Property_0_is_used_before_being_assigned_2565": "Свойство \"{0}\" используется перед присваиванием значения.",
|
|
1118
1119
|
"Property_0_is_used_before_its_initialization_2729": "Свойство \"{0}\" используется перед его инициализацией.",
|
|
1119
|
-
"Property_0_may_not_be_used_in_a_static_property_s_initializer_in_the_same_class_when_target_is_esnex_2810": "Свойство \"{0}\" не может использоваться в инициализаторе статического свойства в том же классе, если \"target\" имеет значение \"esnext\", а \"useDefineForClassFields\" — \"false\".",
|
|
1120
1120
|
"Property_0_may_not_exist_on_type_1_Did_you_mean_2_2568": "Свойство \"{0}\" может не существовать в типе \"{1}\". Вы имели в виду \"{2}\"?",
|
|
1121
1121
|
"Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property_2606": "Свойство \"{0}\" атрибута расширения JSX не может быть назначено для целевого свойства.",
|
|
1122
1122
|
"Property_0_of_exported_class_expression_may_not_be_private_or_protected_4094": "Свойство \"{0}\" выражения экспортированного класса не может быть частным или защищенным.",
|
|
@@ -1324,7 +1324,6 @@
|
|
|
1324
1324
|
"Starting_compilation_in_watch_mode_6031": "Запуск компиляции в режиме наблюдения...",
|
|
1325
1325
|
"Statement_expected_1129": "Ожидался оператор.",
|
|
1326
1326
|
"Statements_are_not_allowed_in_ambient_contexts_1036": "Операторы не разрешены в окружающих контекстах.",
|
|
1327
|
-
"Static_fields_with_private_names_can_t_have_initializers_when_the_useDefineForClassFields_flag_is_no_2805": "Статические поля с частными именами не могут иметь инициализаторы, если не указан флаг \"--useDefineForClassFields\" с параметром \"--target\", имеющим значение \"esnext\". Рекомендуется добавить флаг \"--useDefineForClassFields\".",
|
|
1328
1327
|
"Static_members_cannot_reference_class_type_parameters_2302": "Статические элементы не могут ссылаться на параметры типов класса.",
|
|
1329
1328
|
"Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1_2699": "Статическое свойство \"{0}\" конфликтует со встроенным свойством \"Function.{0}\" функции-конструктора \"{1}\".",
|
|
1330
1329
|
"String_literal_expected_1141": "Ожидался строковый литерал.",
|
package/lib/tsc.js
CHANGED
|
@@ -69,7 +69,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
69
69
|
var ts;
|
|
70
70
|
(function (ts) {
|
|
71
71
|
ts.versionMajorMinor = "4.6";
|
|
72
|
-
ts.version = ts.versionMajorMinor + ".0-dev.
|
|
72
|
+
ts.version = ts.versionMajorMinor + ".0-dev.20220208";
|
|
73
73
|
var NativeCollections;
|
|
74
74
|
(function (NativeCollections) {
|
|
75
75
|
var globals = typeof globalThis !== "undefined" ? globalThis :
|
|
@@ -48920,7 +48920,7 @@ var ts;
|
|
|
48920
48920
|
}
|
|
48921
48921
|
function getImpliedConstraint(type, checkNode, extendsNode) {
|
|
48922
48922
|
return isUnaryTupleTypeNode(checkNode) && isUnaryTupleTypeNode(extendsNode) ? getImpliedConstraint(type, checkNode.elements[0], extendsNode.elements[0]) :
|
|
48923
|
-
getActualTypeVariable(getTypeFromTypeNode(checkNode)) === type ? getTypeFromTypeNode(extendsNode) :
|
|
48923
|
+
getActualTypeVariable(getTypeFromTypeNode(checkNode)) === getActualTypeVariable(type) ? getTypeFromTypeNode(extendsNode) :
|
|
48924
48924
|
undefined;
|
|
48925
48925
|
}
|
|
48926
48926
|
function getConditionalFlowTypeOfType(type, node) {
|
package/lib/tsserver.js
CHANGED
|
@@ -100,7 +100,7 @@ var ts;
|
|
|
100
100
|
// The following is baselined as a literal template type without intervention
|
|
101
101
|
/** The version of the TypeScript compiler release */
|
|
102
102
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
103
|
-
ts.version = ts.versionMajorMinor + ".0-dev.
|
|
103
|
+
ts.version = ts.versionMajorMinor + ".0-dev.20220208";
|
|
104
104
|
/* @internal */
|
|
105
105
|
var Comparison;
|
|
106
106
|
(function (Comparison) {
|
|
@@ -59044,7 +59044,7 @@ var ts;
|
|
|
59044
59044
|
}
|
|
59045
59045
|
function getImpliedConstraint(type, checkNode, extendsNode) {
|
|
59046
59046
|
return isUnaryTupleTypeNode(checkNode) && isUnaryTupleTypeNode(extendsNode) ? getImpliedConstraint(type, checkNode.elements[0], extendsNode.elements[0]) :
|
|
59047
|
-
getActualTypeVariable(getTypeFromTypeNode(checkNode)) === type ? getTypeFromTypeNode(extendsNode) :
|
|
59047
|
+
getActualTypeVariable(getTypeFromTypeNode(checkNode)) === getActualTypeVariable(type) ? getTypeFromTypeNode(extendsNode) :
|
|
59048
59048
|
undefined;
|
|
59049
59049
|
}
|
|
59050
59050
|
function getConditionalFlowTypeOfType(type, node) {
|
|
@@ -130328,7 +130328,8 @@ var ts;
|
|
|
130328
130328
|
case 103 /* NewKeyword */:
|
|
130329
130329
|
return checker.getContextualType(parent);
|
|
130330
130330
|
case 82 /* CaseKeyword */:
|
|
130331
|
-
|
|
130331
|
+
var caseClause = ts.tryCast(parent, ts.isCaseClause);
|
|
130332
|
+
return caseClause ? ts.getSwitchedType(caseClause, checker) : undefined;
|
|
130332
130333
|
case 18 /* OpenBraceToken */:
|
|
130333
130334
|
return ts.isJsxExpression(parent) && !ts.isJsxElement(parent.parent) && !ts.isJsxFragment(parent.parent) ? checker.getContextualTypeForJsxAttribute(parent.parent) : undefined;
|
|
130334
130335
|
default:
|
|
@@ -132973,7 +132974,24 @@ var ts;
|
|
|
132973
132974
|
function acquireOrUpdateDocument(fileName, path, compilationSettings, key, scriptSnapshot, version, acquiring, scriptKind) {
|
|
132974
132975
|
scriptKind = ts.ensureScriptKind(fileName, scriptKind);
|
|
132975
132976
|
var scriptTarget = scriptKind === 6 /* JSON */ ? 100 /* JSON */ : ts.getEmitScriptTarget(compilationSettings);
|
|
132977
|
+
var oldBucketCount = buckets.size;
|
|
132976
132978
|
var bucket = ts.getOrUpdate(buckets, key, function () { return new ts.Map(); });
|
|
132979
|
+
if (ts.tracing) {
|
|
132980
|
+
if (buckets.size > oldBucketCount) {
|
|
132981
|
+
// It is interesting, but not definitively problematic if a build requires multiple document registry buckets -
|
|
132982
|
+
// perhaps they are for two projects that don't have any overlap.
|
|
132983
|
+
// Bonus: these events can help us interpret the more interesting event below.
|
|
132984
|
+
ts.tracing.instant("session" /* Session */, "createdDocumentRegistryBucket", { configFilePath: compilationSettings.configFilePath, key: key });
|
|
132985
|
+
}
|
|
132986
|
+
// It is fairly suspicious to have one path in two buckets - you'd expect dependencies to have similar configurations.
|
|
132987
|
+
// If this occurs unexpectedly, the fix is likely to synchronize the project settings.
|
|
132988
|
+
// Skip .d.ts files to reduce noise (should also cover most of node_modules).
|
|
132989
|
+
var otherBucketKey = !ts.fileExtensionIs(path, ".d.ts" /* Dts */) &&
|
|
132990
|
+
ts.forEachEntry(buckets, function (bucket, bucketKey) { return bucketKey !== key && bucket.has(path) && bucketKey; });
|
|
132991
|
+
if (otherBucketKey) {
|
|
132992
|
+
ts.tracing.instant("session" /* Session */, "documentRegistryBucketOverlap", { path: path, key1: otherBucketKey, key2: key });
|
|
132993
|
+
}
|
|
132994
|
+
}
|
|
132977
132995
|
var bucketEntry = bucket.get(path);
|
|
132978
132996
|
var entry = bucketEntry && getDocumentRegistryEntry(bucketEntry, scriptKind);
|
|
132979
132997
|
if (!entry && externalCache) {
|
|
@@ -156749,8 +156767,8 @@ var ts;
|
|
|
156749
156767
|
// but a super *method call* simply implies a 'this' reference
|
|
156750
156768
|
if (node.parent.kind === 207 /* CallExpression */) {
|
|
156751
156769
|
// Super constructor call
|
|
156752
|
-
var containingClass_1 = ts.getContainingClass(node);
|
|
156753
|
-
if (containingClass_1.pos < span.start || containingClass_1.end >= (span.start + span.length)) {
|
|
156770
|
+
var containingClass_1 = ts.getContainingClass(node);
|
|
156771
|
+
if (containingClass_1 === undefined || containingClass_1.pos < span.start || containingClass_1.end >= (span.start + span.length)) {
|
|
156754
156772
|
(errors || (errors = [])).push(ts.createDiagnosticForNode(node, Messages.cannotExtractSuper));
|
|
156755
156773
|
return true;
|
|
156756
156774
|
}
|
|
@@ -171569,9 +171587,10 @@ var ts;
|
|
|
171569
171587
|
var info = infos && ts.firstOrUndefined(infos);
|
|
171570
171588
|
return info && !info.isLocal ? { fileName: info.fileName, pos: info.textSpan.start } : undefined;
|
|
171571
171589
|
}
|
|
171572
|
-
function combineProjectOutputForReferences(projects, defaultProject, initialLocation) {
|
|
171590
|
+
function combineProjectOutputForReferences(projects, defaultProject, initialLocation, logger) {
|
|
171573
171591
|
var outputs = [];
|
|
171574
171592
|
combineProjectOutputWorker(projects, defaultProject, initialLocation, function (project, location, getMappedLocation) {
|
|
171593
|
+
logger.info("Finding references to " + location.fileName + " position " + location.pos + " in project " + project.getProjectName());
|
|
171575
171594
|
var _loop_8 = function (outputReferencedSymbol) {
|
|
171576
171595
|
var mappedDefinitionFile = getMappedLocation(project, documentSpanLocation(outputReferencedSymbol.definition));
|
|
171577
171596
|
var definition = mappedDefinitionFile === undefined ?
|
|
@@ -172929,7 +172948,7 @@ var ts;
|
|
|
172929
172948
|
var file = server.toNormalizedPath(args.file);
|
|
172930
172949
|
var projects = this.getProjects(args);
|
|
172931
172950
|
var position = this.getPositionInFile(args, file);
|
|
172932
|
-
var references = combineProjectOutputForReferences(projects, this.getDefaultProject(args), { fileName: args.file, pos: position });
|
|
172951
|
+
var references = combineProjectOutputForReferences(projects, this.getDefaultProject(args), { fileName: args.file, pos: position }, this.logger);
|
|
172933
172952
|
if (!simplifiedResult)
|
|
172934
172953
|
return references;
|
|
172935
172954
|
var defaultProject = this.getDefaultProject(args);
|
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.20220208";
|
|
298
298
|
/* @internal */
|
|
299
299
|
var Comparison;
|
|
300
300
|
(function (Comparison) {
|
|
@@ -59238,7 +59238,7 @@ var ts;
|
|
|
59238
59238
|
}
|
|
59239
59239
|
function getImpliedConstraint(type, checkNode, extendsNode) {
|
|
59240
59240
|
return isUnaryTupleTypeNode(checkNode) && isUnaryTupleTypeNode(extendsNode) ? getImpliedConstraint(type, checkNode.elements[0], extendsNode.elements[0]) :
|
|
59241
|
-
getActualTypeVariable(getTypeFromTypeNode(checkNode)) === type ? getTypeFromTypeNode(extendsNode) :
|
|
59241
|
+
getActualTypeVariable(getTypeFromTypeNode(checkNode)) === getActualTypeVariable(type) ? getTypeFromTypeNode(extendsNode) :
|
|
59242
59242
|
undefined;
|
|
59243
59243
|
}
|
|
59244
59244
|
function getConditionalFlowTypeOfType(type, node) {
|
|
@@ -130939,7 +130939,8 @@ var ts;
|
|
|
130939
130939
|
case 103 /* NewKeyword */:
|
|
130940
130940
|
return checker.getContextualType(parent);
|
|
130941
130941
|
case 82 /* CaseKeyword */:
|
|
130942
|
-
|
|
130942
|
+
var caseClause = ts.tryCast(parent, ts.isCaseClause);
|
|
130943
|
+
return caseClause ? ts.getSwitchedType(caseClause, checker) : undefined;
|
|
130943
130944
|
case 18 /* OpenBraceToken */:
|
|
130944
130945
|
return ts.isJsxExpression(parent) && !ts.isJsxElement(parent.parent) && !ts.isJsxFragment(parent.parent) ? checker.getContextualTypeForJsxAttribute(parent.parent) : undefined;
|
|
130945
130946
|
default:
|
|
@@ -133584,7 +133585,24 @@ var ts;
|
|
|
133584
133585
|
function acquireOrUpdateDocument(fileName, path, compilationSettings, key, scriptSnapshot, version, acquiring, scriptKind) {
|
|
133585
133586
|
scriptKind = ts.ensureScriptKind(fileName, scriptKind);
|
|
133586
133587
|
var scriptTarget = scriptKind === 6 /* JSON */ ? 100 /* JSON */ : ts.getEmitScriptTarget(compilationSettings);
|
|
133588
|
+
var oldBucketCount = buckets.size;
|
|
133587
133589
|
var bucket = ts.getOrUpdate(buckets, key, function () { return new ts.Map(); });
|
|
133590
|
+
if (ts.tracing) {
|
|
133591
|
+
if (buckets.size > oldBucketCount) {
|
|
133592
|
+
// It is interesting, but not definitively problematic if a build requires multiple document registry buckets -
|
|
133593
|
+
// perhaps they are for two projects that don't have any overlap.
|
|
133594
|
+
// Bonus: these events can help us interpret the more interesting event below.
|
|
133595
|
+
ts.tracing.instant("session" /* Session */, "createdDocumentRegistryBucket", { configFilePath: compilationSettings.configFilePath, key: key });
|
|
133596
|
+
}
|
|
133597
|
+
// It is fairly suspicious to have one path in two buckets - you'd expect dependencies to have similar configurations.
|
|
133598
|
+
// If this occurs unexpectedly, the fix is likely to synchronize the project settings.
|
|
133599
|
+
// Skip .d.ts files to reduce noise (should also cover most of node_modules).
|
|
133600
|
+
var otherBucketKey = !ts.fileExtensionIs(path, ".d.ts" /* Dts */) &&
|
|
133601
|
+
ts.forEachEntry(buckets, function (bucket, bucketKey) { return bucketKey !== key && bucket.has(path) && bucketKey; });
|
|
133602
|
+
if (otherBucketKey) {
|
|
133603
|
+
ts.tracing.instant("session" /* Session */, "documentRegistryBucketOverlap", { path: path, key1: otherBucketKey, key2: key });
|
|
133604
|
+
}
|
|
133605
|
+
}
|
|
133588
133606
|
var bucketEntry = bucket.get(path);
|
|
133589
133607
|
var entry = bucketEntry && getDocumentRegistryEntry(bucketEntry, scriptKind);
|
|
133590
133608
|
if (!entry && externalCache) {
|
|
@@ -157360,8 +157378,8 @@ var ts;
|
|
|
157360
157378
|
// but a super *method call* simply implies a 'this' reference
|
|
157361
157379
|
if (node.parent.kind === 207 /* CallExpression */) {
|
|
157362
157380
|
// Super constructor call
|
|
157363
|
-
var containingClass_1 = ts.getContainingClass(node);
|
|
157364
|
-
if (containingClass_1.pos < span.start || containingClass_1.end >= (span.start + span.length)) {
|
|
157381
|
+
var containingClass_1 = ts.getContainingClass(node);
|
|
157382
|
+
if (containingClass_1 === undefined || containingClass_1.pos < span.start || containingClass_1.end >= (span.start + span.length)) {
|
|
157365
157383
|
(errors || (errors = [])).push(ts.createDiagnosticForNode(node, Messages.cannotExtractSuper));
|
|
157366
157384
|
return true;
|
|
157367
157385
|
}
|
|
@@ -171763,9 +171781,10 @@ var ts;
|
|
|
171763
171781
|
var info = infos && ts.firstOrUndefined(infos);
|
|
171764
171782
|
return info && !info.isLocal ? { fileName: info.fileName, pos: info.textSpan.start } : undefined;
|
|
171765
171783
|
}
|
|
171766
|
-
function combineProjectOutputForReferences(projects, defaultProject, initialLocation) {
|
|
171784
|
+
function combineProjectOutputForReferences(projects, defaultProject, initialLocation, logger) {
|
|
171767
171785
|
var outputs = [];
|
|
171768
171786
|
combineProjectOutputWorker(projects, defaultProject, initialLocation, function (project, location, getMappedLocation) {
|
|
171787
|
+
logger.info("Finding references to " + location.fileName + " position " + location.pos + " in project " + project.getProjectName());
|
|
171769
171788
|
var _loop_8 = function (outputReferencedSymbol) {
|
|
171770
171789
|
var mappedDefinitionFile = getMappedLocation(project, documentSpanLocation(outputReferencedSymbol.definition));
|
|
171771
171790
|
var definition = mappedDefinitionFile === undefined ?
|
|
@@ -173123,7 +173142,7 @@ var ts;
|
|
|
173123
173142
|
var file = server.toNormalizedPath(args.file);
|
|
173124
173143
|
var projects = this.getProjects(args);
|
|
173125
173144
|
var position = this.getPositionInFile(args, file);
|
|
173126
|
-
var references = combineProjectOutputForReferences(projects, this.getDefaultProject(args), { fileName: args.file, pos: position });
|
|
173145
|
+
var references = combineProjectOutputForReferences(projects, this.getDefaultProject(args), { fileName: args.file, pos: position }, this.logger);
|
|
173127
173146
|
if (!simplifiedResult)
|
|
173128
173147
|
return references;
|
|
173129
173148
|
var defaultProject = this.getDefaultProject(args);
|
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.20220208";
|
|
298
298
|
/* @internal */
|
|
299
299
|
var Comparison;
|
|
300
300
|
(function (Comparison) {
|
|
@@ -59238,7 +59238,7 @@ var ts;
|
|
|
59238
59238
|
}
|
|
59239
59239
|
function getImpliedConstraint(type, checkNode, extendsNode) {
|
|
59240
59240
|
return isUnaryTupleTypeNode(checkNode) && isUnaryTupleTypeNode(extendsNode) ? getImpliedConstraint(type, checkNode.elements[0], extendsNode.elements[0]) :
|
|
59241
|
-
getActualTypeVariable(getTypeFromTypeNode(checkNode)) === type ? getTypeFromTypeNode(extendsNode) :
|
|
59241
|
+
getActualTypeVariable(getTypeFromTypeNode(checkNode)) === getActualTypeVariable(type) ? getTypeFromTypeNode(extendsNode) :
|
|
59242
59242
|
undefined;
|
|
59243
59243
|
}
|
|
59244
59244
|
function getConditionalFlowTypeOfType(type, node) {
|
|
@@ -130939,7 +130939,8 @@ var ts;
|
|
|
130939
130939
|
case 103 /* NewKeyword */:
|
|
130940
130940
|
return checker.getContextualType(parent);
|
|
130941
130941
|
case 82 /* CaseKeyword */:
|
|
130942
|
-
|
|
130942
|
+
var caseClause = ts.tryCast(parent, ts.isCaseClause);
|
|
130943
|
+
return caseClause ? ts.getSwitchedType(caseClause, checker) : undefined;
|
|
130943
130944
|
case 18 /* OpenBraceToken */:
|
|
130944
130945
|
return ts.isJsxExpression(parent) && !ts.isJsxElement(parent.parent) && !ts.isJsxFragment(parent.parent) ? checker.getContextualTypeForJsxAttribute(parent.parent) : undefined;
|
|
130945
130946
|
default:
|
|
@@ -133584,7 +133585,24 @@ var ts;
|
|
|
133584
133585
|
function acquireOrUpdateDocument(fileName, path, compilationSettings, key, scriptSnapshot, version, acquiring, scriptKind) {
|
|
133585
133586
|
scriptKind = ts.ensureScriptKind(fileName, scriptKind);
|
|
133586
133587
|
var scriptTarget = scriptKind === 6 /* JSON */ ? 100 /* JSON */ : ts.getEmitScriptTarget(compilationSettings);
|
|
133588
|
+
var oldBucketCount = buckets.size;
|
|
133587
133589
|
var bucket = ts.getOrUpdate(buckets, key, function () { return new ts.Map(); });
|
|
133590
|
+
if (ts.tracing) {
|
|
133591
|
+
if (buckets.size > oldBucketCount) {
|
|
133592
|
+
// It is interesting, but not definitively problematic if a build requires multiple document registry buckets -
|
|
133593
|
+
// perhaps they are for two projects that don't have any overlap.
|
|
133594
|
+
// Bonus: these events can help us interpret the more interesting event below.
|
|
133595
|
+
ts.tracing.instant("session" /* Session */, "createdDocumentRegistryBucket", { configFilePath: compilationSettings.configFilePath, key: key });
|
|
133596
|
+
}
|
|
133597
|
+
// It is fairly suspicious to have one path in two buckets - you'd expect dependencies to have similar configurations.
|
|
133598
|
+
// If this occurs unexpectedly, the fix is likely to synchronize the project settings.
|
|
133599
|
+
// Skip .d.ts files to reduce noise (should also cover most of node_modules).
|
|
133600
|
+
var otherBucketKey = !ts.fileExtensionIs(path, ".d.ts" /* Dts */) &&
|
|
133601
|
+
ts.forEachEntry(buckets, function (bucket, bucketKey) { return bucketKey !== key && bucket.has(path) && bucketKey; });
|
|
133602
|
+
if (otherBucketKey) {
|
|
133603
|
+
ts.tracing.instant("session" /* Session */, "documentRegistryBucketOverlap", { path: path, key1: otherBucketKey, key2: key });
|
|
133604
|
+
}
|
|
133605
|
+
}
|
|
133588
133606
|
var bucketEntry = bucket.get(path);
|
|
133589
133607
|
var entry = bucketEntry && getDocumentRegistryEntry(bucketEntry, scriptKind);
|
|
133590
133608
|
if (!entry && externalCache) {
|
|
@@ -157360,8 +157378,8 @@ var ts;
|
|
|
157360
157378
|
// but a super *method call* simply implies a 'this' reference
|
|
157361
157379
|
if (node.parent.kind === 207 /* CallExpression */) {
|
|
157362
157380
|
// Super constructor call
|
|
157363
|
-
var containingClass_1 = ts.getContainingClass(node);
|
|
157364
|
-
if (containingClass_1.pos < span.start || containingClass_1.end >= (span.start + span.length)) {
|
|
157381
|
+
var containingClass_1 = ts.getContainingClass(node);
|
|
157382
|
+
if (containingClass_1 === undefined || containingClass_1.pos < span.start || containingClass_1.end >= (span.start + span.length)) {
|
|
157365
157383
|
(errors || (errors = [])).push(ts.createDiagnosticForNode(node, Messages.cannotExtractSuper));
|
|
157366
157384
|
return true;
|
|
157367
157385
|
}
|
|
@@ -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.20220208";
|
|
298
298
|
/* @internal */
|
|
299
299
|
var Comparison;
|
|
300
300
|
(function (Comparison) {
|
|
@@ -59238,7 +59238,7 @@ var ts;
|
|
|
59238
59238
|
}
|
|
59239
59239
|
function getImpliedConstraint(type, checkNode, extendsNode) {
|
|
59240
59240
|
return isUnaryTupleTypeNode(checkNode) && isUnaryTupleTypeNode(extendsNode) ? getImpliedConstraint(type, checkNode.elements[0], extendsNode.elements[0]) :
|
|
59241
|
-
getActualTypeVariable(getTypeFromTypeNode(checkNode)) === type ? getTypeFromTypeNode(extendsNode) :
|
|
59241
|
+
getActualTypeVariable(getTypeFromTypeNode(checkNode)) === getActualTypeVariable(type) ? getTypeFromTypeNode(extendsNode) :
|
|
59242
59242
|
undefined;
|
|
59243
59243
|
}
|
|
59244
59244
|
function getConditionalFlowTypeOfType(type, node) {
|
|
@@ -130939,7 +130939,8 @@ var ts;
|
|
|
130939
130939
|
case 103 /* NewKeyword */:
|
|
130940
130940
|
return checker.getContextualType(parent);
|
|
130941
130941
|
case 82 /* CaseKeyword */:
|
|
130942
|
-
|
|
130942
|
+
var caseClause = ts.tryCast(parent, ts.isCaseClause);
|
|
130943
|
+
return caseClause ? ts.getSwitchedType(caseClause, checker) : undefined;
|
|
130943
130944
|
case 18 /* OpenBraceToken */:
|
|
130944
130945
|
return ts.isJsxExpression(parent) && !ts.isJsxElement(parent.parent) && !ts.isJsxFragment(parent.parent) ? checker.getContextualTypeForJsxAttribute(parent.parent) : undefined;
|
|
130945
130946
|
default:
|
|
@@ -133584,7 +133585,24 @@ var ts;
|
|
|
133584
133585
|
function acquireOrUpdateDocument(fileName, path, compilationSettings, key, scriptSnapshot, version, acquiring, scriptKind) {
|
|
133585
133586
|
scriptKind = ts.ensureScriptKind(fileName, scriptKind);
|
|
133586
133587
|
var scriptTarget = scriptKind === 6 /* JSON */ ? 100 /* JSON */ : ts.getEmitScriptTarget(compilationSettings);
|
|
133588
|
+
var oldBucketCount = buckets.size;
|
|
133587
133589
|
var bucket = ts.getOrUpdate(buckets, key, function () { return new ts.Map(); });
|
|
133590
|
+
if (ts.tracing) {
|
|
133591
|
+
if (buckets.size > oldBucketCount) {
|
|
133592
|
+
// It is interesting, but not definitively problematic if a build requires multiple document registry buckets -
|
|
133593
|
+
// perhaps they are for two projects that don't have any overlap.
|
|
133594
|
+
// Bonus: these events can help us interpret the more interesting event below.
|
|
133595
|
+
ts.tracing.instant("session" /* Session */, "createdDocumentRegistryBucket", { configFilePath: compilationSettings.configFilePath, key: key });
|
|
133596
|
+
}
|
|
133597
|
+
// It is fairly suspicious to have one path in two buckets - you'd expect dependencies to have similar configurations.
|
|
133598
|
+
// If this occurs unexpectedly, the fix is likely to synchronize the project settings.
|
|
133599
|
+
// Skip .d.ts files to reduce noise (should also cover most of node_modules).
|
|
133600
|
+
var otherBucketKey = !ts.fileExtensionIs(path, ".d.ts" /* Dts */) &&
|
|
133601
|
+
ts.forEachEntry(buckets, function (bucket, bucketKey) { return bucketKey !== key && bucket.has(path) && bucketKey; });
|
|
133602
|
+
if (otherBucketKey) {
|
|
133603
|
+
ts.tracing.instant("session" /* Session */, "documentRegistryBucketOverlap", { path: path, key1: otherBucketKey, key2: key });
|
|
133604
|
+
}
|
|
133605
|
+
}
|
|
133588
133606
|
var bucketEntry = bucket.get(path);
|
|
133589
133607
|
var entry = bucketEntry && getDocumentRegistryEntry(bucketEntry, scriptKind);
|
|
133590
133608
|
if (!entry && externalCache) {
|
|
@@ -157360,8 +157378,8 @@ var ts;
|
|
|
157360
157378
|
// but a super *method call* simply implies a 'this' reference
|
|
157361
157379
|
if (node.parent.kind === 207 /* CallExpression */) {
|
|
157362
157380
|
// Super constructor call
|
|
157363
|
-
var containingClass_1 = ts.getContainingClass(node);
|
|
157364
|
-
if (containingClass_1.pos < span.start || containingClass_1.end >= (span.start + span.length)) {
|
|
157381
|
+
var containingClass_1 = ts.getContainingClass(node);
|
|
157382
|
+
if (containingClass_1 === undefined || containingClass_1.pos < span.start || containingClass_1.end >= (span.start + span.length)) {
|
|
157365
157383
|
(errors || (errors = [])).push(ts.createDiagnosticForNode(node, Messages.cannotExtractSuper));
|
|
157366
157384
|
return true;
|
|
157367
157385
|
}
|
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.20220208";
|
|
93
93
|
/* @internal */
|
|
94
94
|
var Comparison;
|
|
95
95
|
(function (Comparison) {
|
|
@@ -59033,7 +59033,7 @@ var ts;
|
|
|
59033
59033
|
}
|
|
59034
59034
|
function getImpliedConstraint(type, checkNode, extendsNode) {
|
|
59035
59035
|
return isUnaryTupleTypeNode(checkNode) && isUnaryTupleTypeNode(extendsNode) ? getImpliedConstraint(type, checkNode.elements[0], extendsNode.elements[0]) :
|
|
59036
|
-
getActualTypeVariable(getTypeFromTypeNode(checkNode)) === type ? getTypeFromTypeNode(extendsNode) :
|
|
59036
|
+
getActualTypeVariable(getTypeFromTypeNode(checkNode)) === getActualTypeVariable(type) ? getTypeFromTypeNode(extendsNode) :
|
|
59037
59037
|
undefined;
|
|
59038
59038
|
}
|
|
59039
59039
|
function getConditionalFlowTypeOfType(type, node) {
|
|
@@ -435,6 +435,7 @@
|
|
|
435
435
|
"Convert_function_to_an_ES2015_class_95001": "將函式轉換為 ES2015 類別",
|
|
436
436
|
"Convert_invalid_character_to_its_html_entity_code_95100": "將無效字元轉換為其 HTML 實體代碼",
|
|
437
437
|
"Convert_named_export_to_default_export_95062": "將具名匯出轉換為預設匯出",
|
|
438
|
+
"Convert_named_imports_to_default_import_95170": "將具名匯入轉換為預設匯入",
|
|
438
439
|
"Convert_named_imports_to_namespace_import_95057": "將具名匯入轉換為命名空間匯入",
|
|
439
440
|
"Convert_namespace_import_to_named_imports_95056": "將命名空間匯入轉換為具名匯入",
|
|
440
441
|
"Convert_overload_list_to_single_signature_95118": "將多載清單轉換成單一特徵標記",
|
|
@@ -1116,7 +1117,6 @@
|
|
|
1116
1117
|
"Property_0_is_protected_in_type_1_but_public_in_type_2_2444": "在類型 '{1}' 中,'{0}' 是受保護屬性,但在類型 '{2}' 中是公用屬性。",
|
|
1117
1118
|
"Property_0_is_used_before_being_assigned_2565": "屬性 '{0}' 已在指派之前使用。",
|
|
1118
1119
|
"Property_0_is_used_before_its_initialization_2729": "將屬性 '{0}' 初始化前已使用該屬性。",
|
|
1119
|
-
"Property_0_may_not_be_used_in_a_static_property_s_initializer_in_the_same_class_when_target_is_esnex_2810": "當 'target' 為 'esnext' 且 'useDefineForClassFields' 為 'false' 時,不能在同一個類別的靜態屬性初始設定式中使用屬性 '{0}'。",
|
|
1120
1120
|
"Property_0_may_not_exist_on_type_1_Did_you_mean_2_2568": "類型 '{1}' 可能不存在屬性 '{0}'。您指的是 '{2}' 嗎?",
|
|
1121
1121
|
"Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property_2606": "JSX 擴張屬性 (Attribute) 的屬性 (Property) '{0}' 不可指派給目標屬性 (Property)。",
|
|
1122
1122
|
"Property_0_of_exported_class_expression_may_not_be_private_or_protected_4094": "匯出之類別運算式的屬性 '{0}' 可能為私人或受保護。",
|
|
@@ -1324,7 +1324,6 @@
|
|
|
1324
1324
|
"Starting_compilation_in_watch_mode_6031": "在監看模式中開始編譯...",
|
|
1325
1325
|
"Statement_expected_1129": "必須是陳述式。",
|
|
1326
1326
|
"Statements_are_not_allowed_in_ambient_contexts_1036": "環境內容中不得有陳述式。",
|
|
1327
|
-
"Static_fields_with_private_names_can_t_have_initializers_when_the_useDefineForClassFields_flag_is_no_2805": "當 '--useDefineForClassFields' 旗標未以 'esnext' 的 '--target' 指定時,具有私人名稱的靜態欄位不得有初始設定式。請考慮新增 '--useDefineForClassFields' 旗標。",
|
|
1328
1327
|
"Static_members_cannot_reference_class_type_parameters_2302": "靜態成員不得參考類別類型參數。",
|
|
1329
1328
|
"Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1_2699": "靜態屬性 '{0}' 與建構函式 '{1}' 的內建屬性 'Function.{0}' 相衝突。",
|
|
1330
1329
|
"String_literal_expected_1141": "必須是字串常值。",
|
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.6.0-dev.
|
|
5
|
+
"version": "4.6.0-dev.20220208",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|