typescript 4.5.0-dev.20211020 → 4.5.0-dev.20211024
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/es/diagnosticMessages.generated.json +1 -0
- package/lib/fr/diagnosticMessages.generated.json +1 -0
- package/lib/it/diagnosticMessages.generated.json +1 -0
- package/lib/lib.es5.d.ts +2 -2
- package/lib/pl/diagnosticMessages.generated.json +1 -0
- package/lib/pt-br/diagnosticMessages.generated.json +1 -0
- package/lib/ru/diagnosticMessages.generated.json +2 -0
- package/lib/tr/diagnosticMessages.generated.json +1 -0
- package/lib/tsc.js +50 -44
- package/lib/tsserver.js +113 -76
- package/lib/tsserverlibrary.js +113 -76
- package/lib/typescript.js +113 -76
- package/lib/typescriptServices.js +113 -76
- package/lib/typingsInstaller.js +56 -50
- package/lib/zh-cn/diagnosticMessages.generated.json +1 -0
- package/lib/zh-tw/diagnosticMessages.generated.json +1 -0
- package/package.json +1 -1
|
@@ -1661,6 +1661,7 @@
|
|
|
1661
1661
|
"_0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property_2610": "\"{0}\" se define como descriptor de acceso en la clase \"{1}\", pero se reemplaza aquí en \"{2}\" como propiedad de instancia.",
|
|
1662
1662
|
"_0_is_deprecated_6385": "\"{0}\" está en desuso.",
|
|
1663
1663
|
"_0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2_17012": "\"{0}\" no es una propiedad Meta válida para la palabra clave \"{1}\". ¿Pretendía usar \"{2}\"?",
|
|
1664
|
+
"_0_is_not_allowed_as_a_parameter_name_1390": "No se permite “{0}” como nombre de parámetro.",
|
|
1664
1665
|
"_0_is_not_allowed_as_a_variable_declaration_name_1389": "No se permite \"{0}\" como nombre de declaración de variable.",
|
|
1665
1666
|
"_0_is_referenced_directly_or_indirectly_in_its_own_base_expression_2506": "Se hace referencia a '{0}' directa o indirectamente en su propia expresión base.",
|
|
1666
1667
|
"_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation_2502": "Se hace referencia a '{0}' directa o indirectamente en su propia anotación de tipo.",
|
|
@@ -47,6 +47,7 @@
|
|
|
47
47
|
"A_label_is_not_allowed_here_1344": "Étiquette non autorisée ici.",
|
|
48
48
|
"A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_c_5086": "Un élément de tuple étiqueté est déclaré facultatif avec un point d'interrogation après le nom et avant les deux points, plutôt qu'après le type.",
|
|
49
49
|
"A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type_5087": "Un élément de tuple étiqueté est déclaré en tant que rest avec '...' avant le nom, plutôt qu'avant le type.",
|
|
50
|
+
"A_mapped_type_may_not_declare_properties_or_methods_7061": "Un type mappé ne peut pas déclarer de propriétés ou de méthodes.",
|
|
50
51
|
"A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_memb_2651": "Un initialiseur de membre dans une déclaration d'enum ne peut pas référencer des membres déclarés après lui, notamment des membres définis dans d'autres enums.",
|
|
51
52
|
"A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any_2545": "Une classe mixin doit avoir un constructeur avec un paramètre rest unique de type 'any[]'.",
|
|
52
53
|
"A_mixin_class_that_extends_from_a_type_variable_containing_an_abstract_construct_signature_must_also_2797": "Une classe mixin qui s'étend à partir d'une variable de type contenant une signature de construction abstraite doit également être déclarée 'abstract'.",
|
|
@@ -47,6 +47,7 @@
|
|
|
47
47
|
"A_label_is_not_allowed_here_1344": "In questo punto non sono consentite etichette.",
|
|
48
48
|
"A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_c_5086": "Un elemento tupla con etichetta è dichiarato come facoltativo con un punto interrogativo dopo il nome e prima dei due punti, anziché dopo il tipo.",
|
|
49
49
|
"A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type_5087": "Un elemento tupla con etichetta è dichiarato come inattivo con '...' prima del nome, anziché prima del tipo.",
|
|
50
|
+
"A_mapped_type_may_not_declare_properties_or_methods_7061": "Un tipo di cui è stato eseguito il mapping non può dichiarare proprietà o metodi.",
|
|
50
51
|
"A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_memb_2651": "Un inizializzatore di membro in una dichiarazione di enumerazione non può fare riferimento a membri dichiarati successivamente, inclusi quelli definiti in altre enumerazioni.",
|
|
51
52
|
"A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any_2545": "Una classe mixin deve includere un costruttore con un unico parametro REST di tipo 'any[]'.",
|
|
52
53
|
"A_mixin_class_that_extends_from_a_type_variable_containing_an_abstract_construct_signature_must_also_2797": "Una classe mixin estesa da una variabile di tipo contenente una firma del costrutto astratta deve essere dichiarata anche come 'abstract'.",
|
package/lib/lib.es5.d.ts
CHANGED
|
@@ -216,13 +216,13 @@ interface ObjectConstructor {
|
|
|
216
216
|
|
|
217
217
|
/**
|
|
218
218
|
* Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
|
|
219
|
-
* @param
|
|
219
|
+
* @param a Object on which to lock the attributes.
|
|
220
220
|
*/
|
|
221
221
|
freeze<T>(a: T[]): readonly T[];
|
|
222
222
|
|
|
223
223
|
/**
|
|
224
224
|
* Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
|
|
225
|
-
* @param
|
|
225
|
+
* @param f Object on which to lock the attributes.
|
|
226
226
|
*/
|
|
227
227
|
freeze<T extends Function>(f: T): T;
|
|
228
228
|
|
|
@@ -47,6 +47,7 @@
|
|
|
47
47
|
"A_label_is_not_allowed_here_1344": "Etykieta nie jest dozwolona w tym miejscu.",
|
|
48
48
|
"A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_c_5086": "Element krotki z etykietą jest deklarowany jako opcjonalny za pomocą znaku zapytania po nazwie i przed dwukropkiem, a nie po typie.",
|
|
49
49
|
"A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type_5087": "Oznaczony etykietą element krotki jest deklarowany jako reszta z \"...\" przed nazwą, a nie przed typem.",
|
|
50
|
+
"A_mapped_type_may_not_declare_properties_or_methods_7061": "Zmapowany typ nie może deklarować właściwości ani metod.",
|
|
50
51
|
"A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_memb_2651": "Inicjator składowej w deklaracji wyliczenia nie może przywoływać składowych zadeklarowanych po nim, w tym składowych zdefiniowanych w innych wyliczeniach.",
|
|
51
52
|
"A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any_2545": "Klasa mixin musi mieć konstruktor z pojedynczym parametrem rest o typie „any[]”.",
|
|
52
53
|
"A_mixin_class_that_extends_from_a_type_variable_containing_an_abstract_construct_signature_must_also_2797": "Klasa domieszki, która rozciąga się od zmiennej typu zawierającej sygnaturę konstrukcji abstrakcyjnej, musi być również zadeklarowana jako „abstract”.",
|
|
@@ -1661,6 +1661,7 @@
|
|
|
1661
1661
|
"_0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property_2610": "'{0}' está definido como um acessador na classe '{1}', mas é substituído aqui em '{2}' como uma propriedade de instância.",
|
|
1662
1662
|
"_0_is_deprecated_6385": "'{0}' foi preterido.",
|
|
1663
1663
|
"_0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2_17012": "'{0}' não é uma metapropriedade para a palavra-chave '{1}'. Você quis dizer '{2}'?",
|
|
1664
|
+
"_0_is_not_allowed_as_a_parameter_name_1390": "'{0}' não é permitido como um nome de parâmetro.",
|
|
1664
1665
|
"_0_is_not_allowed_as_a_variable_declaration_name_1389": "'{0}' não é permitido como um nome de declaração de variável.",
|
|
1665
1666
|
"_0_is_referenced_directly_or_indirectly_in_its_own_base_expression_2506": "'{0}' é referenciado direta ou indiretamente em sua própria expressão base.",
|
|
1666
1667
|
"_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation_2502": "'{0}' é referenciado direta ou indiretamente em sua própria anotação de tipo.",
|
|
@@ -47,6 +47,7 @@
|
|
|
47
47
|
"A_label_is_not_allowed_here_1344": "Метка здесь запрещена.",
|
|
48
48
|
"A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_c_5086": "Элемент маркированного кортежа объявлен как необязательный с вопросительным знаком между именем и двоеточием, а не после типа.",
|
|
49
49
|
"A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type_5087": "Маркированный элемент кортежа объявлен как rest с многоточием перед именем, а не перед типом.",
|
|
50
|
+
"A_mapped_type_may_not_declare_properties_or_methods_7061": "Сопоставленный тип не может объявлять свойства и методы.",
|
|
50
51
|
"A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_memb_2651": "Инициализатор элемента в объявлении перечисления не может ссылаться на элементы, объявленные после него, включая элементы, определенные в других перечислениях.",
|
|
51
52
|
"A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any_2545": "Класс примеси должен иметь конструктор с одиночным параметром REST типа any[].",
|
|
52
53
|
"A_mixin_class_that_extends_from_a_type_variable_containing_an_abstract_construct_signature_must_also_2797": "Класс примеси, который наследуется от переменной типа, содержащей сигнатуру абстрактной конструкции, должен быть также объявлен как \"abstract\".",
|
|
@@ -1660,6 +1661,7 @@
|
|
|
1660
1661
|
"_0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property_2610": "\"{0}\" определен как метод доступа в классе \"{1}\", но переопределяется здесь в \"{2}\" как свойство экземпляра.",
|
|
1661
1662
|
"_0_is_deprecated_6385": "\"{0}\" устарело.",
|
|
1662
1663
|
"_0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2_17012": "\"{0}\" не является допустимым метасвойством для ключевого слова \"{1}\". Вы имели в виду \"{2}\"?",
|
|
1664
|
+
"_0_is_not_allowed_as_a_parameter_name_1390": "\"{0}\" не является допустимым именем параметра.",
|
|
1663
1665
|
"_0_is_not_allowed_as_a_variable_declaration_name_1389": "Использование \"{0}\" в качестве имени объявления переменной не допускается.",
|
|
1664
1666
|
"_0_is_referenced_directly_or_indirectly_in_its_own_base_expression_2506": "На \"{0}\" есть прямые или непрямые ссылки в его собственном базовом выражении.",
|
|
1665
1667
|
"_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation_2502": "На \"{0}\" есть прямые или непрямые ссылки в его собственной аннотации типа.",
|
|
@@ -47,6 +47,7 @@
|
|
|
47
47
|
"A_label_is_not_allowed_here_1344": "'Burada etikete izin verilmiyor.",
|
|
48
48
|
"A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_c_5086": "Etiketli demet öğesi türden sonra değil, addan sonra ve iki nokta işaretinden önce bir soru işareti ile isteğe bağlı olarak bildirilir.",
|
|
49
49
|
"A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type_5087": "Etiketlenmiş bir demet öğesi, tür yerine addan önce '...' ile bekleyen olarak bildirilir.",
|
|
50
|
+
"A_mapped_type_may_not_declare_properties_or_methods_7061": "Eşlenmiş bir tür özellik veya metot bildiremez.",
|
|
50
51
|
"A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_memb_2651": "Sabit listesi bildirimindeki bir üye başlatıcısı, diğer sabit listelerinde tanımlanan üyeler dahil olmak üzere kendinden sonra bildirilen üyelere başvuramaz.",
|
|
51
52
|
"A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any_2545": "Mixin sınıfının 'any[]' türünde tek bir rest parametresi içeren bir oluşturucusu olmalıdır.",
|
|
52
53
|
"A_mixin_class_that_extends_from_a_type_variable_containing_an_abstract_construct_signature_must_also_2797": "Soyut yapı imzası içeren bir tür değişkeninden genişleyen mixin sınıfı da 'soyut' olarak bildirilmelidir.",
|
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.5";
|
|
72
|
-
ts.version = ts.versionMajorMinor + ".0-dev.
|
|
72
|
+
ts.version = ts.versionMajorMinor + ".0-dev.20211024";
|
|
73
73
|
var NativeCollections;
|
|
74
74
|
(function (NativeCollections) {
|
|
75
75
|
function tryGetNativeMap() {
|
|
@@ -5363,6 +5363,7 @@ var ts;
|
|
|
5363
5363
|
Function_type_notation_must_be_parenthesized_when_used_in_an_intersection_type: diag(1387, ts.DiagnosticCategory.Error, "Function_type_notation_must_be_parenthesized_when_used_in_an_intersection_type_1387", "Function type notation must be parenthesized when used in an intersection type."),
|
|
5364
5364
|
Constructor_type_notation_must_be_parenthesized_when_used_in_an_intersection_type: diag(1388, ts.DiagnosticCategory.Error, "Constructor_type_notation_must_be_parenthesized_when_used_in_an_intersection_type_1388", "Constructor type notation must be parenthesized when used in an intersection type."),
|
|
5365
5365
|
_0_is_not_allowed_as_a_variable_declaration_name: diag(1389, ts.DiagnosticCategory.Error, "_0_is_not_allowed_as_a_variable_declaration_name_1389", "'{0}' is not allowed as a variable declaration name."),
|
|
5366
|
+
_0_is_not_allowed_as_a_parameter_name: diag(1390, ts.DiagnosticCategory.Error, "_0_is_not_allowed_as_a_parameter_name_1390", "'{0}' is not allowed as a parameter name."),
|
|
5366
5367
|
An_import_alias_cannot_use_import_type: diag(1392, ts.DiagnosticCategory.Error, "An_import_alias_cannot_use_import_type_1392", "An import alias cannot use 'import type'"),
|
|
5367
5368
|
Imported_via_0_from_file_1: diag(1393, ts.DiagnosticCategory.Message, "Imported_via_0_from_file_1_1393", "Imported via {0} from file '{1}'"),
|
|
5368
5369
|
Imported_via_0_from_file_1_with_packageId_2: diag(1394, ts.DiagnosticCategory.Message, "Imported_via_0_from_file_1_with_packageId_2_1394", "Imported via {0} from file '{1}' with packageId '{2}'"),
|
|
@@ -15846,7 +15847,7 @@ var ts;
|
|
|
15846
15847
|
includeFilePattern: getRegularExpressionForWildcard(includes, absolutePath, "files"),
|
|
15847
15848
|
includeDirectoryPattern: getRegularExpressionForWildcard(includes, absolutePath, "directories"),
|
|
15848
15849
|
excludePattern: getRegularExpressionForWildcard(excludes, absolutePath, "exclude"),
|
|
15849
|
-
basePaths: getBasePaths(
|
|
15850
|
+
basePaths: getBasePaths(absolutePath, includes, useCaseSensitiveFileNames)
|
|
15850
15851
|
};
|
|
15851
15852
|
}
|
|
15852
15853
|
ts.getFileMatcherPatterns = getFileMatcherPatterns;
|
|
@@ -15865,20 +15866,20 @@ var ts;
|
|
|
15865
15866
|
var visited = new ts.Map();
|
|
15866
15867
|
var toCanonical = ts.createGetCanonicalFileName(useCaseSensitiveFileNames);
|
|
15867
15868
|
for (var _i = 0, _a = patterns.basePaths; _i < _a.length; _i++) {
|
|
15868
|
-
var
|
|
15869
|
-
if (directoryExists(
|
|
15870
|
-
visitDirectory(
|
|
15869
|
+
var absoluteBasePath = _a[_i];
|
|
15870
|
+
if (directoryExists(absoluteBasePath)) {
|
|
15871
|
+
visitDirectory(absoluteBasePath, depth);
|
|
15871
15872
|
}
|
|
15872
15873
|
}
|
|
15873
15874
|
return ts.flatten(results);
|
|
15874
|
-
function visitDirectory(
|
|
15875
|
+
function visitDirectory(absolutePath, depth) {
|
|
15875
15876
|
var canonicalPath = toCanonical(realpath(absolutePath));
|
|
15876
15877
|
if (visited.has(canonicalPath))
|
|
15877
15878
|
return;
|
|
15878
15879
|
visited.set(canonicalPath, true);
|
|
15879
|
-
var _a = getFileSystemEntries(
|
|
15880
|
+
var _a = getFileSystemEntries(absolutePath), files = _a.files, directories = _a.directories;
|
|
15880
15881
|
var _loop_1 = function (current) {
|
|
15881
|
-
var name = ts.combinePaths(
|
|
15882
|
+
var name = ts.combinePaths(absolutePath, current);
|
|
15882
15883
|
var absoluteName = ts.combinePaths(absolutePath, current);
|
|
15883
15884
|
if (extensions && !ts.fileExtensionIsOneOf(name, extensions))
|
|
15884
15885
|
return "continue";
|
|
@@ -15906,28 +15907,27 @@ var ts;
|
|
|
15906
15907
|
}
|
|
15907
15908
|
for (var _c = 0, _d = ts.sort(directories, ts.compareStringsCaseSensitive); _c < _d.length; _c++) {
|
|
15908
15909
|
var current = _d[_c];
|
|
15909
|
-
var name = ts.combinePaths(path, current);
|
|
15910
15910
|
var absoluteName = ts.combinePaths(absolutePath, current);
|
|
15911
15911
|
if ((!includeDirectoryRegex || includeDirectoryRegex.test(absoluteName)) &&
|
|
15912
15912
|
(!excludeRegex || !excludeRegex.test(absoluteName))) {
|
|
15913
|
-
visitDirectory(
|
|
15913
|
+
visitDirectory(absoluteName, depth);
|
|
15914
15914
|
}
|
|
15915
15915
|
}
|
|
15916
15916
|
}
|
|
15917
15917
|
}
|
|
15918
15918
|
ts.matchFiles = matchFiles;
|
|
15919
|
-
function getBasePaths(
|
|
15920
|
-
var basePaths = [
|
|
15919
|
+
function getBasePaths(absoluteTsconfigPath, includes, useCaseSensitiveFileNames) {
|
|
15920
|
+
var basePaths = [absoluteTsconfigPath];
|
|
15921
15921
|
if (includes) {
|
|
15922
15922
|
var includeBasePaths = [];
|
|
15923
15923
|
for (var _i = 0, includes_1 = includes; _i < includes_1.length; _i++) {
|
|
15924
15924
|
var include = includes_1[_i];
|
|
15925
|
-
var
|
|
15926
|
-
includeBasePaths.push(getIncludeBasePath(
|
|
15925
|
+
var absoluteIncludePath = ts.isRootedDiskPath(include) ? include : ts.normalizePath(ts.combinePaths(absoluteTsconfigPath, include));
|
|
15926
|
+
includeBasePaths.push(getIncludeBasePath(absoluteIncludePath));
|
|
15927
15927
|
}
|
|
15928
15928
|
includeBasePaths.sort(ts.getStringComparer(!useCaseSensitiveFileNames));
|
|
15929
15929
|
var _loop_2 = function (includeBasePath) {
|
|
15930
|
-
if (ts.every(basePaths, function (basePath) { return !ts.containsPath(basePath, includeBasePath,
|
|
15930
|
+
if (ts.every(basePaths, function (basePath) { return !ts.containsPath(basePath, includeBasePath, absoluteTsconfigPath, !useCaseSensitiveFileNames); })) {
|
|
15931
15931
|
basePaths.push(includeBasePath);
|
|
15932
15932
|
}
|
|
15933
15933
|
};
|
|
@@ -25738,7 +25738,10 @@ var ts;
|
|
|
25738
25738
|
case 12: return parseErrorAtCurrentToken(ts.Diagnostics.Property_assignment_expected);
|
|
25739
25739
|
case 15: return parseErrorAtCurrentToken(ts.Diagnostics.Expression_or_comma_expected);
|
|
25740
25740
|
case 17: return parseErrorAtCurrentToken(ts.Diagnostics.Parameter_declaration_expected);
|
|
25741
|
-
case 16:
|
|
25741
|
+
case 16:
|
|
25742
|
+
return ts.isKeyword(token())
|
|
25743
|
+
? parseErrorAtCurrentToken(ts.Diagnostics._0_is_not_allowed_as_a_parameter_name, ts.tokenToString(token()))
|
|
25744
|
+
: parseErrorAtCurrentToken(ts.Diagnostics.Parameter_declaration_expected);
|
|
25742
25745
|
case 19: return parseErrorAtCurrentToken(ts.Diagnostics.Type_parameter_declaration_expected);
|
|
25743
25746
|
case 20: return parseErrorAtCurrentToken(ts.Diagnostics.Type_argument_expected);
|
|
25744
25747
|
case 21: return parseErrorAtCurrentToken(ts.Diagnostics.Type_expected);
|
|
@@ -37475,6 +37478,7 @@ var ts;
|
|
|
37475
37478
|
case 168:
|
|
37476
37479
|
case 171:
|
|
37477
37480
|
case 172:
|
|
37481
|
+
case 169:
|
|
37478
37482
|
var containingClass = thisContainer.parent;
|
|
37479
37483
|
var symbolTable = ts.isStatic(thisContainer) ? containingClass.symbol.exports : containingClass.symbol.members;
|
|
37480
37484
|
if (ts.hasDynamicName(node)) {
|
|
@@ -40869,8 +40873,8 @@ var ts;
|
|
|
40869
40873
|
if (exportEquals !== moduleSymbol) {
|
|
40870
40874
|
var type = getTypeOfSymbol(exportEquals);
|
|
40871
40875
|
if (shouldTreatPropertiesOfExternalModuleAsExports(type)) {
|
|
40872
|
-
|
|
40873
|
-
cb(symbol,
|
|
40876
|
+
forEachPropertyOfType(type, function (symbol, escapedName) {
|
|
40877
|
+
cb(symbol, escapedName);
|
|
40874
40878
|
});
|
|
40875
40879
|
}
|
|
40876
40880
|
}
|
|
@@ -41170,12 +41174,15 @@ var ts;
|
|
|
41170
41174
|
function getNamedMembers(members) {
|
|
41171
41175
|
var result;
|
|
41172
41176
|
members.forEach(function (symbol, id) {
|
|
41173
|
-
if (
|
|
41177
|
+
if (isNamedMember(symbol, id)) {
|
|
41174
41178
|
(result || (result = [])).push(symbol);
|
|
41175
41179
|
}
|
|
41176
41180
|
});
|
|
41177
41181
|
return result || ts.emptyArray;
|
|
41178
41182
|
}
|
|
41183
|
+
function isNamedMember(member, escapedName) {
|
|
41184
|
+
return !isReservedMemberName(escapedName) && symbolIsValue(member);
|
|
41185
|
+
}
|
|
41179
41186
|
function getNamedOrIndexSignatureMembers(members) {
|
|
41180
41187
|
var result = getNamedMembers(members);
|
|
41181
41188
|
var index = getIndexSymbolFromSymbolTable(members);
|
|
@@ -47091,6 +47098,16 @@ var ts;
|
|
|
47091
47098
|
getPropertiesOfUnionOrIntersectionType(type) :
|
|
47092
47099
|
getPropertiesOfObjectType(type);
|
|
47093
47100
|
}
|
|
47101
|
+
function forEachPropertyOfType(type, action) {
|
|
47102
|
+
type = getReducedApparentType(type);
|
|
47103
|
+
if (type.flags & 3670016) {
|
|
47104
|
+
resolveStructuredTypeMembers(type).members.forEach(function (symbol, escapedName) {
|
|
47105
|
+
if (isNamedMember(symbol, escapedName)) {
|
|
47106
|
+
action(symbol, escapedName);
|
|
47107
|
+
}
|
|
47108
|
+
});
|
|
47109
|
+
}
|
|
47110
|
+
}
|
|
47094
47111
|
function isTypeInvalidDueToUnionDiscriminant(contextualType, obj) {
|
|
47095
47112
|
var list = obj.properties;
|
|
47096
47113
|
return list.some(function (property) {
|
|
@@ -50171,12 +50188,6 @@ var ts;
|
|
|
50171
50188
|
}
|
|
50172
50189
|
return type[cache] = type;
|
|
50173
50190
|
}
|
|
50174
|
-
function isConditionalTypeAlwaysTrueDisregardingInferTypes(type) {
|
|
50175
|
-
var extendsInferParamMapper = type.root.inferTypeParameters && createTypeMapper(type.root.inferTypeParameters, ts.map(type.root.inferTypeParameters, function () { return wildcardType; }));
|
|
50176
|
-
var checkType = type.checkType;
|
|
50177
|
-
var extendsType = type.extendsType;
|
|
50178
|
-
return isTypeAssignableTo(getRestrictiveInstantiation(checkType), getRestrictiveInstantiation(instantiateType(extendsType, extendsInferParamMapper)));
|
|
50179
|
-
}
|
|
50180
50191
|
function getSimplifiedConditionalType(type, writing) {
|
|
50181
50192
|
var checkType = type.checkType;
|
|
50182
50193
|
var extendsType = type.extendsType;
|
|
@@ -50428,6 +50439,10 @@ var ts;
|
|
|
50428
50439
|
}
|
|
50429
50440
|
return result;
|
|
50430
50441
|
}
|
|
50442
|
+
function isDistributionDependent(root) {
|
|
50443
|
+
return root.isDistributive && (isTypeParameterPossiblyReferenced(root.checkType, root.node.trueType) ||
|
|
50444
|
+
isTypeParameterPossiblyReferenced(root.checkType, root.node.falseType));
|
|
50445
|
+
}
|
|
50431
50446
|
function getTypeFromConditionalTypeNode(node) {
|
|
50432
50447
|
var links = getNodeLinks(node);
|
|
50433
50448
|
if (!links.resolvedType) {
|
|
@@ -53197,25 +53212,16 @@ var ts;
|
|
|
53197
53212
|
return 3;
|
|
53198
53213
|
}
|
|
53199
53214
|
var c = target;
|
|
53200
|
-
|
|
53201
|
-
|
|
53202
|
-
|
|
53203
|
-
|
|
53204
|
-
|
|
53205
|
-
|
|
53206
|
-
|
|
53207
|
-
|
|
53208
|
-
|
|
53209
|
-
|
|
53210
|
-
var localResult = expanding ? 3 : undefined;
|
|
53211
|
-
if (skipTrue || expanding || (localResult = isRelatedTo(source, distributionMapper ? instantiateType(getTypeFromTypeNode(c.root.node.trueType), distributionMapper) : getTrueTypeFromConditionalType(c), 2, false))) {
|
|
53212
|
-
if (!skipFalse && !expanding) {
|
|
53213
|
-
localResult = (localResult || 3) & isRelatedTo(source, distributionMapper ? instantiateType(getTypeFromTypeNode(c.root.node.falseType), distributionMapper) : getFalseTypeFromConditionalType(c), 2, false);
|
|
53214
|
-
}
|
|
53215
|
-
}
|
|
53216
|
-
if (localResult) {
|
|
53217
|
-
resetErrorInfo(saveErrorInfo);
|
|
53218
|
-
return localResult;
|
|
53215
|
+
if (!c.root.inferTypeParameters && !isDistributionDependent(c.root)) {
|
|
53216
|
+
var skipTrue = !isTypeAssignableTo(getPermissiveInstantiation(c.checkType), getPermissiveInstantiation(c.extendsType));
|
|
53217
|
+
var skipFalse = !skipTrue && isTypeAssignableTo(getRestrictiveInstantiation(c.checkType), getRestrictiveInstantiation(c.extendsType));
|
|
53218
|
+
if (result = skipTrue ? -1 : isRelatedTo(source, getTrueTypeFromConditionalType(c), 2, false)) {
|
|
53219
|
+
result &= skipFalse ? -1 : isRelatedTo(source, getFalseTypeFromConditionalType(c), 2, false);
|
|
53220
|
+
if (result) {
|
|
53221
|
+
resetErrorInfo(saveErrorInfo);
|
|
53222
|
+
return result;
|
|
53223
|
+
}
|
|
53224
|
+
}
|
|
53219
53225
|
}
|
|
53220
53226
|
}
|
|
53221
53227
|
else if (target.flags & 134217728) {
|