typescript 4.5.0-dev.20211022 → 4.5.0-dev.20211026
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/cs/diagnosticMessages.generated.json +1 -0
- package/lib/de/diagnosticMessages.generated.json +1 -0
- 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/ja/diagnosticMessages.generated.json +1 -0
- package/lib/ko/diagnosticMessages.generated.json +1 -0
- package/lib/pl/diagnosticMessages.generated.json +1 -0
- package/lib/pt-br/diagnosticMessages.generated.json +1 -0
- package/lib/ru/diagnosticMessages.generated.json +1 -0
- package/lib/tr/diagnosticMessages.generated.json +1 -0
- package/lib/tsc.js +45 -20
- package/lib/tsserver.js +72 -38
- package/lib/tsserverlibrary.d.ts +0 -1
- package/lib/tsserverlibrary.js +72 -38
- package/lib/typescript.d.ts +0 -1
- package/lib/typescript.js +72 -38
- package/lib/typescriptServices.d.ts +0 -1
- package/lib/typescriptServices.js +72 -38
- package/lib/typingsInstaller.js +45 -20
- 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} je definované jako přístupový objekt ve třídě {1}, ale v {2} se tady přepisuje jako vlastnost instance.",
|
|
1662
1662
|
"_0_is_deprecated_6385": "{0} je zastaralé.",
|
|
1663
1663
|
"_0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2_17012": "{0} není platnou metavlastností pro klíčové slovo {1}. Měli jste na mysli {2}?",
|
|
1664
|
+
"_0_is_not_allowed_as_a_parameter_name_1390": "{0} není povolen jako název parametru.",
|
|
1664
1665
|
"_0_is_not_allowed_as_a_variable_declaration_name_1389": "{0} se nepovoluje jako název deklarace proměnné.",
|
|
1665
1666
|
"_0_is_referenced_directly_or_indirectly_in_its_own_base_expression_2506": "Na {0} se přímo nebo nepřímo odkazuje ve vlastním základním výrazu.",
|
|
1666
1667
|
"_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation_2502": "Na {0} se odkazuje přímo nebo nepřímo v jeho vlastní anotaci typu.",
|
|
@@ -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}\" ist als Accessor in der Klasse \"{1}\" definiert, wird aber hier in \"{2}\" als Instanzeigenschaft überschrieben.",
|
|
1662
1662
|
"_0_is_deprecated_6385": "\"{0}\" ist veraltet.",
|
|
1663
1663
|
"_0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2_17012": "\"{0}\" ist keine gültige Metaeigenschaft für das Schlüsselwort \"{1}\". Meinten Sie \"{2}\"?",
|
|
1664
|
+
"_0_is_not_allowed_as_a_parameter_name_1390": "\"{0}\" ist als Parametername nicht zulässig.",
|
|
1664
1665
|
"_0_is_not_allowed_as_a_variable_declaration_name_1389": "\"{0}\" ist als Name für Variablendeklarationen nicht zulässig.",
|
|
1665
1666
|
"_0_is_referenced_directly_or_indirectly_in_its_own_base_expression_2506": "Auf \"{0}\" wird direkt oder indirekt im eigenen Basisausdruck verwiesen.",
|
|
1666
1667
|
"_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation_2502": "Auf \"{0}\" wird direkt oder indirekt in der eigenen Typanmerkung verwiesen.",
|
|
@@ -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.",
|
|
@@ -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 défini en tant qu'accesseur dans la classe '{1}', mais il est remplacé ici dans '{2}' en tant que propriété d'instance.",
|
|
1662
1662
|
"_0_is_deprecated_6385": "'{0}' est déprécié.",
|
|
1663
1663
|
"_0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2_17012": "'{0}' n'est pas une métapropriété valide pour le mot clé '{1}'. Est-ce qu'il ne s'agit pas plutôt de '{2}' ?",
|
|
1664
|
+
"_0_is_not_allowed_as_a_parameter_name_1390": "'{0}' n'est pas autorisé comme nom de paramètre.",
|
|
1664
1665
|
"_0_is_not_allowed_as_a_variable_declaration_name_1389": "'{0}' n'est pas autorisé en tant que nom de déclaration de variable.",
|
|
1665
1666
|
"_0_is_referenced_directly_or_indirectly_in_its_own_base_expression_2506": "'{0}' est référencé directement ou indirectement dans sa propre expression de base.",
|
|
1666
1667
|
"_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation_2502": "'{0}' est référencé directement ou indirectement dans sa propre annotation de type.",
|
|
@@ -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}' è definito come funzione di accesso nella classe '{1}', ma in questo punto ne viene eseguito l'override in '{2}' come proprietà di istanza.",
|
|
1662
1662
|
"_0_is_deprecated_6385": "'{0}' è deprecato.",
|
|
1663
1663
|
"_0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2_17012": "'{0}' non è una metaproprietà valida per la parola chiave '{1}'. Si intendeva '{2}'?",
|
|
1664
|
+
"_0_is_not_allowed_as_a_parameter_name_1390": "'{0}' non è un nome di parametro consentito.",
|
|
1664
1665
|
"_0_is_not_allowed_as_a_variable_declaration_name_1389": "'{0}' non è consentito come nome di una dichiarazione di variabile.",
|
|
1665
1666
|
"_0_is_referenced_directly_or_indirectly_in_its_own_base_expression_2506": "'{0}' viene usato come riferimento diretto o indiretto nella relativa espressione di base.",
|
|
1666
1667
|
"_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation_2502": "'{0}' viene usato come riferimento diretto o indiretto nella relativa annotazione di tipo.",
|
|
@@ -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}' はクラス '{1}' でアクセサーとして定義されていますが、ここではインスタンス プロパティとして '{2}' でオーバーライドされています。",
|
|
1662
1662
|
"_0_is_deprecated_6385": "'{0}' は非推奨です。",
|
|
1663
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}' はパラメーター名として使用できません。",
|
|
1664
1665
|
"_0_is_not_allowed_as_a_variable_declaration_name_1389": "'{0}' は変数宣言の名前として使用できません。",
|
|
1665
1666
|
"_0_is_referenced_directly_or_indirectly_in_its_own_base_expression_2506": "'{0}' はそれ自身のベース式内で直接または間接的に参照されます。",
|
|
1666
1667
|
"_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation_2502": "'{0}' はそれ自身の型の注釈内で直接または間接的に参照されます。",
|
|
@@ -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}'은(는) '{1}' 클래스의 접근자로 정의되지만, '{2}'에서 인스턴스 속성으로 재정의됩니다.",
|
|
1662
1662
|
"_0_is_deprecated_6385": "'{0}'은(는) 사용되지 않습니다.",
|
|
1663
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}'은(는) 매개 변수 이름으로 사용할 수 없습니다.",
|
|
1664
1665
|
"_0_is_not_allowed_as_a_variable_declaration_name_1389": "'{0}'은(는) 변수 선언 이름으로 사용할 수 없습니다.",
|
|
1665
1666
|
"_0_is_referenced_directly_or_indirectly_in_its_own_base_expression_2506": "'{0}'은(는) 자체 기본 식에서 직간접적으로 참조됩니다.",
|
|
1666
1667
|
"_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation_2502": "'{0}'은(는) 자체 형식 주석에서 직간접적으로 참조됩니다.",
|
|
@@ -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": "Element „{0}” jest zdefiniowany jako metoda dostępu w klasie „{1}”, ale jest przesłaniany tutaj w elemencie „{2}” jako właściwość wystąpienia.",
|
|
1662
1662
|
"_0_is_deprecated_6385": "Element „{0}” jest przestarzały.",
|
|
1663
1663
|
"_0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2_17012": "„{0}” nie jest prawidłową metawłaściwością słowa kluczowego „{1}”. Czy miał to być element „{2}”?",
|
|
1664
|
+
"_0_is_not_allowed_as_a_parameter_name_1390": "„{0}” jest niedozwolone jako nazwa parametru.",
|
|
1664
1665
|
"_0_is_not_allowed_as_a_variable_declaration_name_1389": "Element „{0}” nie jest dozwolony jako nazwa deklaracji zmiennej.",
|
|
1665
1666
|
"_0_is_referenced_directly_or_indirectly_in_its_own_base_expression_2506": "Element „{0}” jest przywoływany bezpośrednio lub pośrednio w jego własnym wyrażeniu podstawowym.",
|
|
1666
1667
|
"_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation_2502": "Element „{0}” jest przywoływany bezpośrednio lub pośrednio w jego własnej adnotacji typu.",
|
|
@@ -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.",
|
|
@@ -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}\" определен как метод доступа в классе \"{1}\", но переопределяется здесь в \"{2}\" как свойство экземпляра.",
|
|
1662
1662
|
"_0_is_deprecated_6385": "\"{0}\" устарело.",
|
|
1663
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}\" не является допустимым именем параметра.",
|
|
1664
1665
|
"_0_is_not_allowed_as_a_variable_declaration_name_1389": "Использование \"{0}\" в качестве имени объявления переменной не допускается.",
|
|
1665
1666
|
"_0_is_referenced_directly_or_indirectly_in_its_own_base_expression_2506": "На \"{0}\" есть прямые или непрямые ссылки в его собственном базовом выражении.",
|
|
1666
1667
|
"_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation_2502": "На \"{0}\" есть прямые или непрямые ссылки в его собственной аннотации типа.",
|
|
@@ -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}', '{1}' sınıfında bir erişimci olarak tanımlandı ancak burada, '{2}' içinde örnek özelliği olarak geçersiz kılındı.",
|
|
1662
1662
|
"_0_is_deprecated_6385": "'{0}' kullanım dışı bırakıldı.",
|
|
1663
1663
|
"_0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2_17012": "'{0}', '{1}' anahtar sözcüğü için geçerli bir meta özellik değil. Bunu mu demek istediniz: '{2}'?",
|
|
1664
|
+
"_0_is_not_allowed_as_a_parameter_name_1390": "'{0}' öğesine parametre adı olarak izin verilmiyor.",
|
|
1664
1665
|
"_0_is_not_allowed_as_a_variable_declaration_name_1389": "'{0}' öğesinin değişken bildirim adı olarak kullanılmasına izin verilmiyor.",
|
|
1665
1666
|
"_0_is_referenced_directly_or_indirectly_in_its_own_base_expression_2506": "'{0}' öğesine kendi temel ifadesinde doğrudan veya dolaylı olarak başvuruluyor.",
|
|
1666
1667
|
"_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation_2502": "'{0}' öğesine kendi tür ek açıklamasında doğrudan veya dolaylı olarak başvuruluyor.",
|
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.20211026";
|
|
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}'"),
|
|
@@ -25737,7 +25738,10 @@ var ts;
|
|
|
25737
25738
|
case 12: return parseErrorAtCurrentToken(ts.Diagnostics.Property_assignment_expected);
|
|
25738
25739
|
case 15: return parseErrorAtCurrentToken(ts.Diagnostics.Expression_or_comma_expected);
|
|
25739
25740
|
case 17: return parseErrorAtCurrentToken(ts.Diagnostics.Parameter_declaration_expected);
|
|
25740
|
-
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);
|
|
25741
25745
|
case 19: return parseErrorAtCurrentToken(ts.Diagnostics.Type_parameter_declaration_expected);
|
|
25742
25746
|
case 20: return parseErrorAtCurrentToken(ts.Diagnostics.Type_argument_expected);
|
|
25743
25747
|
case 21: return parseErrorAtCurrentToken(ts.Diagnostics.Type_expected);
|
|
@@ -37474,6 +37478,7 @@ var ts;
|
|
|
37474
37478
|
case 168:
|
|
37475
37479
|
case 171:
|
|
37476
37480
|
case 172:
|
|
37481
|
+
case 169:
|
|
37477
37482
|
var containingClass = thisContainer.parent;
|
|
37478
37483
|
var symbolTable = ts.isStatic(thisContainer) ? containingClass.symbol.exports : containingClass.symbol.members;
|
|
37479
37484
|
if (ts.hasDynamicName(node)) {
|
|
@@ -40552,21 +40557,28 @@ var ts;
|
|
|
40552
40557
|
var namespaceName = getFullyQualifiedName(namespace);
|
|
40553
40558
|
var declarationName = ts.declarationNameToString(right);
|
|
40554
40559
|
var suggestionForNonexistentModule = getSuggestedSymbolForNonexistentModule(right, namespace);
|
|
40555
|
-
var exportedTypeSymbol = getMergedSymbol(getSymbol(getExportsOfSymbol(namespace), right.escapedText, 788968));
|
|
40556
|
-
var containingQualifiedName = ts.isQualifiedName(name) && getContainingQualifiedNameNode(name);
|
|
40557
|
-
var canSuggestTypeof = containingQualifiedName && !ts.isTypeOfExpression(containingQualifiedName.parent) && tryGetQualifiedNameAsValue(containingQualifiedName);
|
|
40558
40560
|
if (suggestionForNonexistentModule) {
|
|
40559
40561
|
error(right, ts.Diagnostics._0_has_no_exported_member_named_1_Did_you_mean_2, namespaceName, declarationName, symbolToString(suggestionForNonexistentModule));
|
|
40562
|
+
return undefined;
|
|
40560
40563
|
}
|
|
40561
|
-
|
|
40564
|
+
var containingQualifiedName = ts.isQualifiedName(name) && getContainingQualifiedNameNode(name);
|
|
40565
|
+
var canSuggestTypeof = globalObjectType
|
|
40566
|
+
&& (meaning & 788968)
|
|
40567
|
+
&& containingQualifiedName
|
|
40568
|
+
&& !ts.isTypeOfExpression(containingQualifiedName.parent)
|
|
40569
|
+
&& tryGetQualifiedNameAsValue(containingQualifiedName);
|
|
40570
|
+
if (canSuggestTypeof) {
|
|
40562
40571
|
error(containingQualifiedName, ts.Diagnostics._0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0, ts.entityNameToString(containingQualifiedName));
|
|
40572
|
+
return undefined;
|
|
40563
40573
|
}
|
|
40564
|
-
|
|
40565
|
-
|
|
40566
|
-
|
|
40567
|
-
|
|
40568
|
-
|
|
40574
|
+
if (meaning & 1920 && ts.isQualifiedName(name.parent)) {
|
|
40575
|
+
var exportedTypeSymbol = getMergedSymbol(getSymbol(getExportsOfSymbol(namespace), right.escapedText, 788968));
|
|
40576
|
+
if (exportedTypeSymbol) {
|
|
40577
|
+
error(name.parent.right, ts.Diagnostics.Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_property_1_in_0_with_0_1, symbolToString(exportedTypeSymbol), ts.unescapeLeadingUnderscores(name.parent.right.escapedText));
|
|
40578
|
+
return undefined;
|
|
40579
|
+
}
|
|
40569
40580
|
}
|
|
40581
|
+
error(right, ts.Diagnostics.Namespace_0_has_no_exported_member_1, namespaceName, declarationName);
|
|
40570
40582
|
}
|
|
40571
40583
|
return undefined;
|
|
40572
40584
|
}
|
|
@@ -40868,8 +40880,8 @@ var ts;
|
|
|
40868
40880
|
if (exportEquals !== moduleSymbol) {
|
|
40869
40881
|
var type = getTypeOfSymbol(exportEquals);
|
|
40870
40882
|
if (shouldTreatPropertiesOfExternalModuleAsExports(type)) {
|
|
40871
|
-
|
|
40872
|
-
cb(symbol,
|
|
40883
|
+
forEachPropertyOfType(type, function (symbol, escapedName) {
|
|
40884
|
+
cb(symbol, escapedName);
|
|
40873
40885
|
});
|
|
40874
40886
|
}
|
|
40875
40887
|
}
|
|
@@ -41169,12 +41181,15 @@ var ts;
|
|
|
41169
41181
|
function getNamedMembers(members) {
|
|
41170
41182
|
var result;
|
|
41171
41183
|
members.forEach(function (symbol, id) {
|
|
41172
|
-
if (
|
|
41184
|
+
if (isNamedMember(symbol, id)) {
|
|
41173
41185
|
(result || (result = [])).push(symbol);
|
|
41174
41186
|
}
|
|
41175
41187
|
});
|
|
41176
41188
|
return result || ts.emptyArray;
|
|
41177
41189
|
}
|
|
41190
|
+
function isNamedMember(member, escapedName) {
|
|
41191
|
+
return !isReservedMemberName(escapedName) && symbolIsValue(member);
|
|
41192
|
+
}
|
|
41178
41193
|
function getNamedOrIndexSignatureMembers(members) {
|
|
41179
41194
|
var result = getNamedMembers(members);
|
|
41180
41195
|
var index = getIndexSymbolFromSymbolTable(members);
|
|
@@ -47090,6 +47105,16 @@ var ts;
|
|
|
47090
47105
|
getPropertiesOfUnionOrIntersectionType(type) :
|
|
47091
47106
|
getPropertiesOfObjectType(type);
|
|
47092
47107
|
}
|
|
47108
|
+
function forEachPropertyOfType(type, action) {
|
|
47109
|
+
type = getReducedApparentType(type);
|
|
47110
|
+
if (type.flags & 3670016) {
|
|
47111
|
+
resolveStructuredTypeMembers(type).members.forEach(function (symbol, escapedName) {
|
|
47112
|
+
if (isNamedMember(symbol, escapedName)) {
|
|
47113
|
+
action(symbol, escapedName);
|
|
47114
|
+
}
|
|
47115
|
+
});
|
|
47116
|
+
}
|
|
47117
|
+
}
|
|
47093
47118
|
function isTypeInvalidDueToUnionDiscriminant(contextualType, obj) {
|
|
47094
47119
|
var list = obj.properties;
|
|
47095
47120
|
return list.some(function (property) {
|
|
@@ -50421,13 +50446,14 @@ var ts;
|
|
|
50421
50446
|
}
|
|
50422
50447
|
return result;
|
|
50423
50448
|
}
|
|
50449
|
+
function isDistributionDependent(root) {
|
|
50450
|
+
return root.isDistributive && (isTypeParameterPossiblyReferenced(root.checkType, root.node.trueType) ||
|
|
50451
|
+
isTypeParameterPossiblyReferenced(root.checkType, root.node.falseType));
|
|
50452
|
+
}
|
|
50424
50453
|
function getTypeFromConditionalTypeNode(node) {
|
|
50425
50454
|
var links = getNodeLinks(node);
|
|
50426
50455
|
if (!links.resolvedType) {
|
|
50427
50456
|
var checkType = getTypeFromTypeNode(node.checkType);
|
|
50428
|
-
var isDistributive = !!(checkType.flags & 262144);
|
|
50429
|
-
var isDistributionDependent = isDistributive && (isTypeParameterPossiblyReferenced(checkType, node.trueType) ||
|
|
50430
|
-
isTypeParameterPossiblyReferenced(checkType, node.falseType));
|
|
50431
50457
|
var aliasSymbol = getAliasSymbolForTypeNode(node);
|
|
50432
50458
|
var aliasTypeArguments = getTypeArgumentsForAliasSymbol(aliasSymbol);
|
|
50433
50459
|
var allOuterTypeParameters = getOuterTypeParameters(node, true);
|
|
@@ -50436,8 +50462,7 @@ var ts;
|
|
|
50436
50462
|
node: node,
|
|
50437
50463
|
checkType: checkType,
|
|
50438
50464
|
extendsType: getTypeFromTypeNode(node.extendsType),
|
|
50439
|
-
isDistributive:
|
|
50440
|
-
isDistributionDependent: isDistributionDependent,
|
|
50465
|
+
isDistributive: !!(checkType.flags & 262144),
|
|
50441
50466
|
inferTypeParameters: getInferTypeParameters(node),
|
|
50442
50467
|
outerTypeParameters: outerTypeParameters,
|
|
50443
50468
|
instantiations: undefined,
|
|
@@ -53194,7 +53219,7 @@ var ts;
|
|
|
53194
53219
|
return 3;
|
|
53195
53220
|
}
|
|
53196
53221
|
var c = target;
|
|
53197
|
-
if (!c.root.inferTypeParameters && !c.root
|
|
53222
|
+
if (!c.root.inferTypeParameters && !isDistributionDependent(c.root)) {
|
|
53198
53223
|
var skipTrue = !isTypeAssignableTo(getPermissiveInstantiation(c.checkType), getPermissiveInstantiation(c.extendsType));
|
|
53199
53224
|
var skipFalse = !skipTrue && isTypeAssignableTo(getRestrictiveInstantiation(c.checkType), getRestrictiveInstantiation(c.extendsType));
|
|
53200
53225
|
if (result = skipTrue ? -1 : isRelatedTo(source, getTrueTypeFromConditionalType(c), 2, false)) {
|
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.20211026";
|
|
104
104
|
/* @internal */
|
|
105
105
|
var Comparison;
|
|
106
106
|
(function (Comparison) {
|
|
@@ -8141,6 +8141,7 @@ var ts;
|
|
|
8141
8141
|
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."),
|
|
8142
8142
|
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."),
|
|
8143
8143
|
_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."),
|
|
8144
|
+
_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."),
|
|
8144
8145
|
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'"),
|
|
8145
8146
|
Imported_via_0_from_file_1: diag(1393, ts.DiagnosticCategory.Message, "Imported_via_0_from_file_1_1393", "Imported via {0} from file '{1}'"),
|
|
8146
8147
|
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}'"),
|
|
@@ -31933,7 +31934,10 @@ var ts;
|
|
|
31933
31934
|
case 12 /* ObjectLiteralMembers */: return parseErrorAtCurrentToken(ts.Diagnostics.Property_assignment_expected);
|
|
31934
31935
|
case 15 /* ArrayLiteralMembers */: return parseErrorAtCurrentToken(ts.Diagnostics.Expression_or_comma_expected);
|
|
31935
31936
|
case 17 /* JSDocParameters */: return parseErrorAtCurrentToken(ts.Diagnostics.Parameter_declaration_expected);
|
|
31936
|
-
case 16 /* Parameters */:
|
|
31937
|
+
case 16 /* Parameters */:
|
|
31938
|
+
return ts.isKeyword(token())
|
|
31939
|
+
? parseErrorAtCurrentToken(ts.Diagnostics._0_is_not_allowed_as_a_parameter_name, ts.tokenToString(token()))
|
|
31940
|
+
: parseErrorAtCurrentToken(ts.Diagnostics.Parameter_declaration_expected);
|
|
31937
31941
|
case 19 /* TypeParameters */: return parseErrorAtCurrentToken(ts.Diagnostics.Type_parameter_declaration_expected);
|
|
31938
31942
|
case 20 /* TypeArguments */: return parseErrorAtCurrentToken(ts.Diagnostics.Type_argument_expected);
|
|
31939
31943
|
case 21 /* TupleElementTypes */: return parseErrorAtCurrentToken(ts.Diagnostics.Type_expected);
|
|
@@ -45693,6 +45697,7 @@ var ts;
|
|
|
45693
45697
|
case 168 /* MethodDeclaration */:
|
|
45694
45698
|
case 171 /* GetAccessor */:
|
|
45695
45699
|
case 172 /* SetAccessor */:
|
|
45700
|
+
case 169 /* ClassStaticBlockDeclaration */:
|
|
45696
45701
|
// this.foo assignment in a JavaScript class
|
|
45697
45702
|
// Bind this property to the containing class
|
|
45698
45703
|
var containingClass = thisContainer.parent;
|
|
@@ -49403,21 +49408,28 @@ var ts;
|
|
|
49403
49408
|
var namespaceName = getFullyQualifiedName(namespace);
|
|
49404
49409
|
var declarationName = ts.declarationNameToString(right);
|
|
49405
49410
|
var suggestionForNonexistentModule = getSuggestedSymbolForNonexistentModule(right, namespace);
|
|
49406
|
-
var exportedTypeSymbol = getMergedSymbol(getSymbol(getExportsOfSymbol(namespace), right.escapedText, 788968 /* Type */));
|
|
49407
|
-
var containingQualifiedName = ts.isQualifiedName(name) && getContainingQualifiedNameNode(name);
|
|
49408
|
-
var canSuggestTypeof = containingQualifiedName && !ts.isTypeOfExpression(containingQualifiedName.parent) && tryGetQualifiedNameAsValue(containingQualifiedName);
|
|
49409
49411
|
if (suggestionForNonexistentModule) {
|
|
49410
49412
|
error(right, ts.Diagnostics._0_has_no_exported_member_named_1_Did_you_mean_2, namespaceName, declarationName, symbolToString(suggestionForNonexistentModule));
|
|
49413
|
+
return undefined;
|
|
49411
49414
|
}
|
|
49412
|
-
|
|
49415
|
+
var containingQualifiedName = ts.isQualifiedName(name) && getContainingQualifiedNameNode(name);
|
|
49416
|
+
var canSuggestTypeof = globalObjectType // <-- can't pull on types if global types aren't initialized yet
|
|
49417
|
+
&& (meaning & 788968 /* Type */)
|
|
49418
|
+
&& containingQualifiedName
|
|
49419
|
+
&& !ts.isTypeOfExpression(containingQualifiedName.parent)
|
|
49420
|
+
&& tryGetQualifiedNameAsValue(containingQualifiedName);
|
|
49421
|
+
if (canSuggestTypeof) {
|
|
49413
49422
|
error(containingQualifiedName, ts.Diagnostics._0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0, ts.entityNameToString(containingQualifiedName));
|
|
49423
|
+
return undefined;
|
|
49414
49424
|
}
|
|
49415
|
-
|
|
49416
|
-
|
|
49417
|
-
|
|
49418
|
-
|
|
49419
|
-
|
|
49425
|
+
if (meaning & 1920 /* Namespace */ && ts.isQualifiedName(name.parent)) {
|
|
49426
|
+
var exportedTypeSymbol = getMergedSymbol(getSymbol(getExportsOfSymbol(namespace), right.escapedText, 788968 /* Type */));
|
|
49427
|
+
if (exportedTypeSymbol) {
|
|
49428
|
+
error(name.parent.right, ts.Diagnostics.Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_property_1_in_0_with_0_1, symbolToString(exportedTypeSymbol), ts.unescapeLeadingUnderscores(name.parent.right.escapedText));
|
|
49429
|
+
return undefined;
|
|
49430
|
+
}
|
|
49420
49431
|
}
|
|
49432
|
+
error(right, ts.Diagnostics.Namespace_0_has_no_exported_member_1, namespaceName, declarationName);
|
|
49421
49433
|
}
|
|
49422
49434
|
return undefined;
|
|
49423
49435
|
}
|
|
@@ -49753,8 +49765,8 @@ var ts;
|
|
|
49753
49765
|
if (exportEquals !== moduleSymbol) {
|
|
49754
49766
|
var type = getTypeOfSymbol(exportEquals);
|
|
49755
49767
|
if (shouldTreatPropertiesOfExternalModuleAsExports(type)) {
|
|
49756
|
-
|
|
49757
|
-
cb(symbol,
|
|
49768
|
+
forEachPropertyOfType(type, function (symbol, escapedName) {
|
|
49769
|
+
cb(symbol, escapedName);
|
|
49758
49770
|
});
|
|
49759
49771
|
}
|
|
49760
49772
|
}
|
|
@@ -50086,12 +50098,15 @@ var ts;
|
|
|
50086
50098
|
function getNamedMembers(members) {
|
|
50087
50099
|
var result;
|
|
50088
50100
|
members.forEach(function (symbol, id) {
|
|
50089
|
-
if (
|
|
50101
|
+
if (isNamedMember(symbol, id)) {
|
|
50090
50102
|
(result || (result = [])).push(symbol);
|
|
50091
50103
|
}
|
|
50092
50104
|
});
|
|
50093
50105
|
return result || ts.emptyArray;
|
|
50094
50106
|
}
|
|
50107
|
+
function isNamedMember(member, escapedName) {
|
|
50108
|
+
return !isReservedMemberName(escapedName) && symbolIsValue(member);
|
|
50109
|
+
}
|
|
50095
50110
|
function getNamedOrIndexSignatureMembers(members) {
|
|
50096
50111
|
var result = getNamedMembers(members);
|
|
50097
50112
|
var index = getIndexSymbolFromSymbolTable(members);
|
|
@@ -56924,6 +56939,16 @@ var ts;
|
|
|
56924
56939
|
getPropertiesOfUnionOrIntersectionType(type) :
|
|
56925
56940
|
getPropertiesOfObjectType(type);
|
|
56926
56941
|
}
|
|
56942
|
+
function forEachPropertyOfType(type, action) {
|
|
56943
|
+
type = getReducedApparentType(type);
|
|
56944
|
+
if (type.flags & 3670016 /* StructuredType */) {
|
|
56945
|
+
resolveStructuredTypeMembers(type).members.forEach(function (symbol, escapedName) {
|
|
56946
|
+
if (isNamedMember(symbol, escapedName)) {
|
|
56947
|
+
action(symbol, escapedName);
|
|
56948
|
+
}
|
|
56949
|
+
});
|
|
56950
|
+
}
|
|
56951
|
+
}
|
|
56927
56952
|
function isTypeInvalidDueToUnionDiscriminant(contextualType, obj) {
|
|
56928
56953
|
var list = obj.properties;
|
|
56929
56954
|
return list.some(function (property) {
|
|
@@ -60707,13 +60732,14 @@ var ts;
|
|
|
60707
60732
|
}
|
|
60708
60733
|
return result;
|
|
60709
60734
|
}
|
|
60735
|
+
function isDistributionDependent(root) {
|
|
60736
|
+
return root.isDistributive && (isTypeParameterPossiblyReferenced(root.checkType, root.node.trueType) ||
|
|
60737
|
+
isTypeParameterPossiblyReferenced(root.checkType, root.node.falseType));
|
|
60738
|
+
}
|
|
60710
60739
|
function getTypeFromConditionalTypeNode(node) {
|
|
60711
60740
|
var links = getNodeLinks(node);
|
|
60712
60741
|
if (!links.resolvedType) {
|
|
60713
60742
|
var checkType = getTypeFromTypeNode(node.checkType);
|
|
60714
|
-
var isDistributive = !!(checkType.flags & 262144 /* TypeParameter */);
|
|
60715
|
-
var isDistributionDependent = isDistributive && (isTypeParameterPossiblyReferenced(checkType, node.trueType) ||
|
|
60716
|
-
isTypeParameterPossiblyReferenced(checkType, node.falseType));
|
|
60717
60743
|
var aliasSymbol = getAliasSymbolForTypeNode(node);
|
|
60718
60744
|
var aliasTypeArguments = getTypeArgumentsForAliasSymbol(aliasSymbol);
|
|
60719
60745
|
var allOuterTypeParameters = getOuterTypeParameters(node, /*includeThisTypes*/ true);
|
|
@@ -60722,8 +60748,7 @@ var ts;
|
|
|
60722
60748
|
node: node,
|
|
60723
60749
|
checkType: checkType,
|
|
60724
60750
|
extendsType: getTypeFromTypeNode(node.extendsType),
|
|
60725
|
-
isDistributive:
|
|
60726
|
-
isDistributionDependent: isDistributionDependent,
|
|
60751
|
+
isDistributive: !!(checkType.flags & 262144 /* TypeParameter */),
|
|
60727
60752
|
inferTypeParameters: getInferTypeParameters(node),
|
|
60728
60753
|
outerTypeParameters: outerTypeParameters,
|
|
60729
60754
|
instantiations: undefined,
|
|
@@ -63870,7 +63895,7 @@ var ts;
|
|
|
63870
63895
|
// We check for a relationship to a conditional type target only when the conditional type has no
|
|
63871
63896
|
// 'infer' positions and is not distributive or is distributive but doesn't reference the check type
|
|
63872
63897
|
// parameter in either of the result types.
|
|
63873
|
-
if (!c.root.inferTypeParameters && !c.root
|
|
63898
|
+
if (!c.root.inferTypeParameters && !isDistributionDependent(c.root)) {
|
|
63874
63899
|
// Check if the conditional is always true or always false but still deferred for distribution purposes.
|
|
63875
63900
|
var skipTrue = !isTypeAssignableTo(getPermissiveInstantiation(c.checkType), getPermissiveInstantiation(c.extendsType));
|
|
63876
63901
|
var skipFalse = !skipTrue && isTypeAssignableTo(getRestrictiveInstantiation(c.checkType), getRestrictiveInstantiation(c.extendsType));
|
|
@@ -125564,10 +125589,14 @@ var ts;
|
|
|
125564
125589
|
}
|
|
125565
125590
|
var isDefault = exportKind === 1 /* Default */;
|
|
125566
125591
|
var namedSymbol = isDefault && ts.getLocalSymbolForExportDefault(symbol) || symbol;
|
|
125567
|
-
// A
|
|
125568
|
-
//
|
|
125569
|
-
//
|
|
125570
|
-
|
|
125592
|
+
// 1. A named export must be imported by its key in `moduleSymbol.exports` or `moduleSymbol.members`.
|
|
125593
|
+
// 2. A re-export merged with an export from a module augmentation can result in `symbol`
|
|
125594
|
+
// being an external module symbol; the name it is re-exported by will be `symbolTableKey`
|
|
125595
|
+
// (which comes from the keys of `moduleSymbol.exports`.)
|
|
125596
|
+
// 3. Otherwise, we have a default/namespace import that can be imported by any name, and
|
|
125597
|
+
// `symbolTableKey` will be something undesirable like `export=` or `default`, so we try to
|
|
125598
|
+
// get a better name.
|
|
125599
|
+
var importedName = exportKind === 0 /* Named */ || ts.isExternalModuleSymbol(namedSymbol)
|
|
125571
125600
|
? ts.unescapeLeadingUnderscores(symbolTableKey)
|
|
125572
125601
|
: ts.getNameForExportedSymbol(namedSymbol, scriptTarget);
|
|
125573
125602
|
var moduleName = ts.stripQuotes(moduleSymbol.name);
|
|
@@ -125798,7 +125827,7 @@ var ts;
|
|
|
125798
125827
|
cache.add(importingFile.path, defaultInfo.symbol, defaultInfo.exportKind === 1 /* Default */ ? "default" /* Default */ : "export=" /* ExportEquals */, moduleSymbol, moduleFile, defaultInfo.exportKind, isFromPackageJson, scriptTarget, checker);
|
|
125799
125828
|
}
|
|
125800
125829
|
checker.forEachExportAndPropertyOfModule(moduleSymbol, function (exported, key) {
|
|
125801
|
-
if (exported !== (defaultInfo === null || defaultInfo === void 0 ? void 0 : defaultInfo.symbol) && isImportableSymbol(exported, checker) && ts.addToSeen(seenExports,
|
|
125830
|
+
if (exported !== (defaultInfo === null || defaultInfo === void 0 ? void 0 : defaultInfo.symbol) && isImportableSymbol(exported, checker) && ts.addToSeen(seenExports, key)) {
|
|
125802
125831
|
cache.add(importingFile.path, exported, key, moduleSymbol, moduleFile, 0 /* Named */, isFromPackageJson, scriptTarget, checker);
|
|
125803
125832
|
}
|
|
125804
125833
|
});
|
|
@@ -128653,8 +128682,8 @@ var ts;
|
|
|
128653
128682
|
}
|
|
128654
128683
|
var checker = origin.isFromPackageJson ? host.getPackageJsonAutoImportProvider().getTypeChecker() : program.getTypeChecker();
|
|
128655
128684
|
var moduleSymbol = origin.moduleSymbol;
|
|
128656
|
-
var
|
|
128657
|
-
var _b = ts.codefix.getImportCompletionAction(
|
|
128685
|
+
var targetSymbol = checker.getMergedSymbol(ts.skipAlias(symbol.exportSymbol || symbol, checker));
|
|
128686
|
+
var _b = ts.codefix.getImportCompletionAction(targetSymbol, moduleSymbol, sourceFile, ts.getNameForExportedSymbol(symbol, ts.getEmitScriptTarget(compilerOptions)), host, program, formatContext, previousToken && ts.isIdentifier(previousToken) ? previousToken.getStart(sourceFile) : position, preferences), moduleSpecifier = _b.moduleSpecifier, codeAction = _b.codeAction;
|
|
128658
128687
|
ts.Debug.assert(!(data === null || data === void 0 ? void 0 : data.moduleSpecifier) || moduleSpecifier === data.moduleSpecifier);
|
|
128659
128688
|
return { sourceDisplay: [ts.textPart(moduleSpecifier)], codeActions: [codeAction] };
|
|
128660
128689
|
}
|
|
@@ -129549,8 +129578,9 @@ var ts;
|
|
|
129549
129578
|
function isNewIdentifierDefinitionLocation() {
|
|
129550
129579
|
if (contextToken) {
|
|
129551
129580
|
var containingNodeKind = contextToken.parent.kind;
|
|
129581
|
+
var tokenKind = keywordForNode(contextToken);
|
|
129552
129582
|
// Previous token may have been a keyword that was converted to an identifier.
|
|
129553
|
-
switch (
|
|
129583
|
+
switch (tokenKind) {
|
|
129554
129584
|
case 27 /* CommaToken */:
|
|
129555
129585
|
return containingNodeKind === 207 /* CallExpression */ // func( a, |
|
|
129556
129586
|
|| containingNodeKind === 170 /* Constructor */ // constructor( a, | /* public, protected, private keywords are allowed here, so show completion */
|
|
@@ -129585,10 +129615,14 @@ var ts;
|
|
|
129585
129615
|
return containingNodeKind === 222 /* TemplateExpression */; // `aa ${|
|
|
129586
129616
|
case 16 /* TemplateMiddle */:
|
|
129587
129617
|
return containingNodeKind === 232 /* TemplateSpan */; // `aa ${10} dd ${|
|
|
129588
|
-
case
|
|
129589
|
-
|
|
129590
|
-
|
|
129591
|
-
|
|
129618
|
+
case 131 /* AsyncKeyword */:
|
|
129619
|
+
return containingNodeKind === 168 /* MethodDeclaration */ // const obj = { async c|()
|
|
129620
|
+
|| containingNodeKind === 295 /* ShorthandPropertyAssignment */; // const obj = { async c|
|
|
129621
|
+
case 41 /* AsteriskToken */:
|
|
129622
|
+
return containingNodeKind === 168 /* MethodDeclaration */; // const obj = { * c|
|
|
129623
|
+
}
|
|
129624
|
+
if (isClassMemberCompletionKeyword(tokenKind)) {
|
|
129625
|
+
return true;
|
|
129592
129626
|
}
|
|
129593
129627
|
}
|
|
129594
129628
|
return false;
|
|
@@ -147893,11 +147927,11 @@ var ts;
|
|
|
147893
147927
|
AddAsTypeOnly[AddAsTypeOnly["Required"] = 2] = "Required";
|
|
147894
147928
|
AddAsTypeOnly[AddAsTypeOnly["NotAllowed"] = 4] = "NotAllowed";
|
|
147895
147929
|
})(AddAsTypeOnly || (AddAsTypeOnly = {}));
|
|
147896
|
-
function getImportCompletionAction(
|
|
147930
|
+
function getImportCompletionAction(targetSymbol, moduleSymbol, sourceFile, symbolName, host, program, formatContext, position, preferences) {
|
|
147897
147931
|
var compilerOptions = program.getCompilerOptions();
|
|
147898
147932
|
var exportInfos = ts.pathIsBareSpecifier(ts.stripQuotes(moduleSymbol.name))
|
|
147899
|
-
? [getSymbolExportInfoForSymbol(
|
|
147900
|
-
: getAllReExportingModules(sourceFile,
|
|
147933
|
+
? [getSymbolExportInfoForSymbol(targetSymbol, moduleSymbol, program, host)]
|
|
147934
|
+
: getAllReExportingModules(sourceFile, targetSymbol, moduleSymbol, symbolName, host, program, preferences, /*useAutoImportProvider*/ true);
|
|
147901
147935
|
var useRequire = shouldUseRequire(sourceFile, program);
|
|
147902
147936
|
var isValidTypeOnlyUseSite = ts.isValidTypeOnlyAliasUseSite(ts.getTokenAtPosition(sourceFile, position));
|
|
147903
147937
|
var fix = ts.Debug.checkDefined(getImportFixForSymbol(sourceFile, exportInfos, moduleSymbol, symbolName, program, position, isValidTypeOnlyUseSite, useRequire, host, preferences));
|
|
@@ -147935,7 +147969,7 @@ var ts;
|
|
|
147935
147969
|
}
|
|
147936
147970
|
}
|
|
147937
147971
|
}
|
|
147938
|
-
function getAllReExportingModules(importingFile,
|
|
147972
|
+
function getAllReExportingModules(importingFile, targetSymbol, exportingModuleSymbol, symbolName, host, program, preferences, useAutoImportProvider) {
|
|
147939
147973
|
var result = [];
|
|
147940
147974
|
var compilerOptions = program.getCompilerOptions();
|
|
147941
147975
|
var getModuleSpecifierResolutionHost = ts.memoizeOne(function (isFromPackageJson) {
|
|
@@ -147948,12 +147982,12 @@ var ts;
|
|
|
147948
147982
|
return;
|
|
147949
147983
|
}
|
|
147950
147984
|
var defaultInfo = ts.getDefaultLikeExportInfo(moduleSymbol, checker, compilerOptions);
|
|
147951
|
-
if (defaultInfo && (defaultInfo.name === symbolName || moduleSymbolToValidIdentifier(moduleSymbol, ts.getEmitScriptTarget(compilerOptions)) === symbolName) && ts.skipAlias(defaultInfo.symbol, checker) ===
|
|
147985
|
+
if (defaultInfo && (defaultInfo.name === symbolName || moduleSymbolToValidIdentifier(moduleSymbol, ts.getEmitScriptTarget(compilerOptions)) === symbolName) && ts.skipAlias(defaultInfo.symbol, checker) === targetSymbol && isImportable(program, moduleFile, isFromPackageJson)) {
|
|
147952
147986
|
result.push({ symbol: defaultInfo.symbol, moduleSymbol: moduleSymbol, moduleFileName: moduleFile === null || moduleFile === void 0 ? void 0 : moduleFile.fileName, exportKind: defaultInfo.exportKind, targetFlags: ts.skipAlias(defaultInfo.symbol, checker).flags, isFromPackageJson: isFromPackageJson });
|
|
147953
147987
|
}
|
|
147954
147988
|
for (var _i = 0, _a = checker.getExportsAndPropertiesOfModule(moduleSymbol); _i < _a.length; _i++) {
|
|
147955
147989
|
var exported = _a[_i];
|
|
147956
|
-
if (exported.name === symbolName && ts.skipAlias(exported, checker) ===
|
|
147990
|
+
if (exported.name === symbolName && checker.getMergedSymbol(ts.skipAlias(exported, checker)) === targetSymbol && isImportable(program, moduleFile, isFromPackageJson)) {
|
|
147957
147991
|
result.push({ symbol: exported, moduleSymbol: moduleSymbol, moduleFileName: moduleFile === null || moduleFile === void 0 ? void 0 : moduleFile.fileName, exportKind: 0 /* Named */, targetFlags: ts.skipAlias(exported, checker).flags, isFromPackageJson: isFromPackageJson });
|
|
147958
147992
|
}
|
|
147959
147993
|
}
|
package/lib/tsserverlibrary.d.ts
CHANGED
|
@@ -2747,7 +2747,6 @@ declare namespace ts {
|
|
|
2747
2747
|
checkType: Type;
|
|
2748
2748
|
extendsType: Type;
|
|
2749
2749
|
isDistributive: boolean;
|
|
2750
|
-
isDistributionDependent: boolean;
|
|
2751
2750
|
inferTypeParameters?: TypeParameter[];
|
|
2752
2751
|
outerTypeParameters?: TypeParameter[];
|
|
2753
2752
|
instantiations?: Map<Type>;
|