typescript 4.9.0-dev.20220917 → 4.9.0-dev.20220919

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.
@@ -1469,6 +1469,7 @@
1469
1469
  "The_type_returned_by_the_0_method_of_an_iterator_must_have_a_value_property_2490": "Typ vrácený metodou {0}() iterátoru musí obsahovat vlastnost value.",
1470
1470
  "The_types_of_0_are_incompatible_between_these_types_2200": "Typy {0} nejsou mezi těmito typy kompatibilní.",
1471
1471
  "The_types_returned_by_0_are_incompatible_between_these_types_2201": "Typy vrácené metodou {0} nejsou mezi těmito typy kompatibilní.",
1472
+ "The_value_0_cannot_be_used_here_18050": "Hodnota „{0}“ se tady nedá použít.",
1472
1473
  "The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer_1189": "Deklarace proměnné příkazu for...in nemůže obsahovat inicializátor.",
1473
1474
  "The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer_1190": "Deklarace proměnné příkazu for...of nemůže obsahovat inicializátor.",
1474
1475
  "The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any_2410": "Příkaz with není podporovaný. Všechny symboly s blokem with budou typu any.",
@@ -1728,6 +1729,10 @@
1728
1729
  "_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}?",
1729
1730
  "_0_is_not_allowed_as_a_parameter_name_1390": "{0} není povolen jako název parametru.",
1730
1731
  "_0_is_not_allowed_as_a_variable_declaration_name_1389": "{0} se nepovoluje jako název deklarace proměnné.",
1732
+ "_0_is_of_type_unknown_18046": "„{0}“ je typ unknown",
1733
+ "_0_is_possibly_null_18047": "„{0}“ je pravděpodobně typ null.",
1734
+ "_0_is_possibly_null_or_undefined_18049": "„{0}“ je typ null nebo undefined",
1735
+ "_0_is_possibly_undefined_18048": "„{0}“ je pravděpodobně typ undefined.",
1731
1736
  "_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.",
1732
1737
  "_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.",
1733
1738
  "_0_is_specified_more_than_once_so_this_usage_will_be_overwritten_2783": "{0} se zadalo více než jednou, proto se toto použití přepíše.",
@@ -1469,6 +1469,7 @@
1469
1469
  "The_type_returned_by_the_0_method_of_an_iterator_must_have_a_value_property_2490": "Le type retourné par la méthode '{0}()' d'un itérateur doit avoir une propriété 'value'.",
1470
1470
  "The_types_of_0_are_incompatible_between_these_types_2200": "Les types de '{0}' sont incompatibles entre eux.",
1471
1471
  "The_types_returned_by_0_are_incompatible_between_these_types_2201": "Les types retournés par '{0}' sont incompatibles entre eux.",
1472
+ "The_value_0_cannot_be_used_here_18050": "La valeur '{0}' ne peut pas être utilisée ici.",
1472
1473
  "The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer_1189": "La déclaration de variable d'une instruction 'for...in' ne peut pas avoir d'initialiseur.",
1473
1474
  "The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer_1190": "La déclaration de variable d'une instruction 'for...of' ne peut pas avoir d'initialiseur.",
1474
1475
  "The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any_2410": "L'instruction 'with' n'est pas prise en charge. Tous les symboles d'un bloc 'with' ont le type 'any'.",
@@ -1728,6 +1729,10 @@
1728
1729
  "_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}' ?",
1729
1730
  "_0_is_not_allowed_as_a_parameter_name_1390": "'{0}' n'est pas autorisé comme nom de paramètre.",
1730
1731
  "_0_is_not_allowed_as_a_variable_declaration_name_1389": "'{0}' n'est pas autorisé en tant que nom de déclaration de variable.",
1732
+ "_0_is_of_type_unknown_18046": "'{0}' est de type 'unknown'.",
1733
+ "_0_is_possibly_null_18047": "'{0}' est peut-être 'null'.",
1734
+ "_0_is_possibly_null_or_undefined_18049": "'{0}' est peut-être 'null' ou 'undefined'.",
1735
+ "_0_is_possibly_undefined_18048": "'{0}' est peut-être 'non défini'.",
1731
1736
  "_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.",
1732
1737
  "_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.",
1733
1738
  "_0_is_specified_more_than_once_so_this_usage_will_be_overwritten_2783": "'{0}' est spécifié plusieurs fois. Cette utilisation va donc être remplacée.",
@@ -1469,6 +1469,7 @@
1469
1469
  "The_type_returned_by_the_0_method_of_an_iterator_must_have_a_value_property_2490": "反復子の '{0}()' メソッドによって返される型には 'value' プロパティが必要です。",
1470
1470
  "The_types_of_0_are_incompatible_between_these_types_2200": "'{0}' の型は、これらの型同士で互換性がありません。",
1471
1471
  "The_types_returned_by_0_are_incompatible_between_these_types_2201": "'{0}' によって返された型は、これらの型同士で互換性がありません。",
1472
+ "The_value_0_cannot_be_used_here_18050": "値 '{0}' はここでは使用できません。",
1472
1473
  "The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer_1189": "'for...in' ステートメントの変数宣言に初期化子を指定することはできません。",
1473
1474
  "The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer_1190": "'for...of' ステートメントの変数宣言に初期化子を指定することはできません。",
1474
1475
  "The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any_2410": "'with' ステートメントはサポートされていません。'with' ブロック内のすべてのシンボルの型は 'any' になります。",
@@ -1728,6 +1729,10 @@
1728
1729
  "_0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2_17012": "'{0}' はキーワード '{1}' に関するメタプロパティとして無効です。候補: '{2}'。",
1729
1730
  "_0_is_not_allowed_as_a_parameter_name_1390": "'{0}' はパラメーター名として使用できません。",
1730
1731
  "_0_is_not_allowed_as_a_variable_declaration_name_1389": "'{0}' は変数宣言の名前として使用できません。",
1732
+ "_0_is_of_type_unknown_18046": "'{0}''は 'unknown' 型です。",
1733
+ "_0_is_possibly_null_18047": "'{0}' は 'null' の可能性があります。",
1734
+ "_0_is_possibly_null_or_undefined_18049": "'{0}' は 'null' か 'undefined' の可能性があります。",
1735
+ "_0_is_possibly_undefined_18048": "'{0}' は 'undefined' の可能性があります。",
1731
1736
  "_0_is_referenced_directly_or_indirectly_in_its_own_base_expression_2506": "'{0}' はそれ自身のベース式内で直接または間接的に参照されます。",
1732
1737
  "_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation_2502": "'{0}' はそれ自身の型の注釈内で直接または間接的に参照されます。",
1733
1738
  "_0_is_specified_more_than_once_so_this_usage_will_be_overwritten_2783": "'{0}' が複数回指定されているため、ここでの使用は上書きされます。",
@@ -1469,6 +1469,7 @@
1469
1469
  "The_type_returned_by_the_0_method_of_an_iterator_must_have_a_value_property_2490": "반복기의 '{0}()' 메서드에 의해 반환되는 형식에는 'value' 속성이 있어야 합니다.",
1470
1470
  "The_types_of_0_are_incompatible_between_these_types_2200": "'{0}'의 형식은 해당 형식 간에 호환되지 않습니다.",
1471
1471
  "The_types_returned_by_0_are_incompatible_between_these_types_2201": "'{0}'에서 반환되는 형식은 해당 형식 간에 호환되지 않습니다.",
1472
+ "The_value_0_cannot_be_used_here_18050": "여기서는 '{0}' 값을 사용할 수 없습니다.",
1472
1473
  "The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer_1189": "'for...in' 문의 변수 선언에 이니셜라이저가 포함될 수 없습니다.",
1473
1474
  "The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer_1190": "'for...of' 문의 변수 선언에 이니셜라이저가 포함될 수 없습니다.",
1474
1475
  "The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any_2410": "'with' 문은 지원되지 않습니다. 'with' 블록의 모든 기호가 'any' 형식이 됩니다.",
@@ -1728,6 +1729,10 @@
1728
1729
  "_0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2_17012": "'{0}'은(는) '{1}' 키워드에 대한 올바른 메타 속성이 아닙니다. '{2}'을(를) 사용하시겠습니까?",
1729
1730
  "_0_is_not_allowed_as_a_parameter_name_1390": "'{0}'은(는) 매개 변수 이름으로 사용할 수 없습니다.",
1730
1731
  "_0_is_not_allowed_as_a_variable_declaration_name_1389": "'{0}'은(는) 변수 선언 이름으로 사용할 수 없습니다.",
1732
+ "_0_is_of_type_unknown_18046": "'{0}'은(는) 'unknown' 형식입니다.",
1733
+ "_0_is_possibly_null_18047": "'{0}'은(는) 'null'일 수 있습니다.",
1734
+ "_0_is_possibly_null_or_undefined_18049": "'{0}'은(는) 'null' 또는 'undefined'일 수 있습니다.",
1735
+ "_0_is_possibly_undefined_18048": "'{0}'은(는) 'undefined'일 수 있습니다.",
1731
1736
  "_0_is_referenced_directly_or_indirectly_in_its_own_base_expression_2506": "'{0}'은(는) 자체 기본 식에서 직간접적으로 참조됩니다.",
1732
1737
  "_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation_2502": "'{0}'은(는) 자체 형식 주석에서 직간접적으로 참조됩니다.",
1733
1738
  "_0_is_specified_more_than_once_so_this_usage_will_be_overwritten_2783": "'{0}'이(가) 두 번 이상 지정되어 이 사용량을 덮어씁니다.",
@@ -1469,6 +1469,7 @@
1469
1469
  "The_type_returned_by_the_0_method_of_an_iterator_must_have_a_value_property_2490": "O tipo retornado pelo método '{0}()' de um iterador deve ter uma propriedade 'value'.",
1470
1470
  "The_types_of_0_are_incompatible_between_these_types_2200": "Os tipos de '{0}' são incompatíveis entre esses tipos.",
1471
1471
  "The_types_returned_by_0_are_incompatible_between_these_types_2201": "Os tipos retornados por '{0}' são incompatíveis entre esses tipos.",
1472
+ "The_value_0_cannot_be_used_here_18050": "O valor '{0}' não pode ser usado aqui.",
1472
1473
  "The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer_1189": "A declaração de variável de uma instrução 'for...in' não pode ter um inicializador.",
1473
1474
  "The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer_1190": "A declaração de variável de uma instrução 'for...of' não pode ter um inicializador.",
1474
1475
  "The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any_2410": "A instrução \"with\" não tem suporte. Todos os símbolos em um bloco \"with\" terão o tipo \"any\".",
@@ -1728,6 +1729,10 @@
1728
1729
  "_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}'?",
1729
1730
  "_0_is_not_allowed_as_a_parameter_name_1390": "'{0}' não é permitido como um nome de parâmetro.",
1730
1731
  "_0_is_not_allowed_as_a_variable_declaration_name_1389": "'{0}' não é permitido como um nome de declaração de variável.",
1732
+ "_0_is_of_type_unknown_18046": "'{0}' é do tipo 'desconhecido'.",
1733
+ "_0_is_possibly_null_18047": "'{0}' é possivelmente 'null'.",
1734
+ "_0_is_possibly_null_or_undefined_18049": "'{0}' é possivelmente 'null' ou 'undefined'.",
1735
+ "_0_is_possibly_undefined_18048": "'{0}' é possivelmente 'indefinido'.",
1731
1736
  "_0_is_referenced_directly_or_indirectly_in_its_own_base_expression_2506": "'{0}' é referenciado direta ou indiretamente em sua própria expressão base.",
1732
1737
  "_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.",
1733
1738
  "_0_is_specified_more_than_once_so_this_usage_will_be_overwritten_2783": "'{0}' foi especificado mais de uma vez, portanto esse uso será substituído.",
@@ -1469,6 +1469,7 @@
1469
1469
  "The_type_returned_by_the_0_method_of_an_iterator_must_have_a_value_property_2490": "Тип, возвращаемый методом \"{0}()\" итератора, должен содержать свойство \"value\".",
1470
1470
  "The_types_of_0_are_incompatible_between_these_types_2200": "Типы \"{0}\" несовместимы между этими типами.",
1471
1471
  "The_types_returned_by_0_are_incompatible_between_these_types_2201": "Типы, возвращаемые \"{0}\", несовместимы между этими типами.",
1472
+ "The_value_0_cannot_be_used_here_18050": "Здесь нельзя использовать значение \"{0}\".",
1472
1473
  "The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer_1189": "Объявление переменной оператора for...in не может содержать инициализатор.",
1473
1474
  "The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer_1190": "Объявление переменной оператора for...of не может содержать инициализатор.",
1474
1475
  "The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any_2410": "Оператор with не поддерживается. Все символы в блоке with получат тип any.",
@@ -1728,6 +1729,10 @@
1728
1729
  "_0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2_17012": "\"{0}\" не является допустимым метасвойством для ключевого слова \"{1}\". Вы имели в виду \"{2}\"?",
1729
1730
  "_0_is_not_allowed_as_a_parameter_name_1390": "\"{0}\" не является допустимым именем параметра.",
1730
1731
  "_0_is_not_allowed_as_a_variable_declaration_name_1389": "Использование \"{0}\" в качестве имени объявления переменной не допускается.",
1732
+ "_0_is_of_type_unknown_18046": "\"{0}\" относится к типу unknown.",
1733
+ "_0_is_possibly_null_18047": "Возможно, \"{0}\" имеет значение null.",
1734
+ "_0_is_possibly_null_or_undefined_18049": "Возможно, \"{0}\" имеет значение null или undefined.",
1735
+ "_0_is_possibly_undefined_18048": "Возможно, \"{0}\" имеет значение undefined.",
1731
1736
  "_0_is_referenced_directly_or_indirectly_in_its_own_base_expression_2506": "На \"{0}\" есть прямые или непрямые ссылки в его собственном базовом выражении.",
1732
1737
  "_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation_2502": "На \"{0}\" есть прямые или непрямые ссылки в его собственной аннотации типа.",
1733
1738
  "_0_is_specified_more_than_once_so_this_usage_will_be_overwritten_2783": "\"{0}\" указан несколько раз, поэтому такое использование будет перезаписано.",
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.9";
72
- ts.version = "".concat(ts.versionMajorMinor, ".0-dev.20220917");
72
+ ts.version = "".concat(ts.versionMajorMinor, ".0-dev.20220919");
73
73
  var NativeCollections;
74
74
  (function (NativeCollections) {
75
75
  var globals = typeof globalThis !== "undefined" ? globalThis :
@@ -40638,6 +40638,7 @@ var ts;
40638
40638
  isPropertyAccessible: isPropertyAccessible,
40639
40639
  getTypeOnlyAliasDeclaration: getTypeOnlyAliasDeclaration,
40640
40640
  getMemberOverrideModifierStatus: getMemberOverrideModifierStatus,
40641
+ isTypeParameterPossiblyReferenced: isTypeParameterPossiblyReferenced,
40641
40642
  };
40642
40643
  function runWithInferenceBlockedFromSourceNode(node, fn) {
40643
40644
  var containingCall = ts.findAncestor(node, ts.isCallLikeExpression);
@@ -53849,6 +53850,24 @@ var ts;
53849
53850
  return !tp.isThisType && ts.isPartOfTypeNode(node) && maybeTypeParameterReference(node) &&
53850
53851
  getTypeFromTypeNodeWorker(node) === tp;
53851
53852
  case 183:
53853
+ var entityName = node.exprName;
53854
+ var firstIdentifier = ts.getFirstIdentifier(entityName);
53855
+ var firstIdentifierSymbol = getResolvedSymbol(firstIdentifier);
53856
+ var tpDeclaration = tp.symbol.declarations[0];
53857
+ var tpScope_1;
53858
+ if (tpDeclaration.kind === 165) {
53859
+ tpScope_1 = tpDeclaration.parent;
53860
+ }
53861
+ else if (tp.isThisType) {
53862
+ tpScope_1 = tpDeclaration;
53863
+ }
53864
+ else {
53865
+ return true;
53866
+ }
53867
+ if (firstIdentifierSymbol.declarations) {
53868
+ return ts.some(firstIdentifierSymbol.declarations, function (idDecl) { return ts.isNodeDescendantOf(idDecl, tpScope_1); }) ||
53869
+ ts.some(node.typeArguments, containsReference);
53870
+ }
53852
53871
  return true;
53853
53872
  case 171:
53854
53873
  case 170:
@@ -60980,10 +60999,11 @@ var ts;
60980
60999
  if (!(links.flags & 268435456)) {
60981
61000
  links.flags |= 268435456;
60982
61001
  var parentType = getTypeForBindingElementParent(parent, 0);
61002
+ var parentTypeConstraint = parentType && mapType(parentType, getBaseConstraintOrType);
60983
61003
  links.flags &= ~268435456;
60984
- if (parentType && parentType.flags & 1048576 && !(parent.kind === 166 && isSymbolAssigned(symbol))) {
61004
+ if (parentTypeConstraint && parentTypeConstraint.flags & 1048576 && !(parent.kind === 166 && isSymbolAssigned(symbol))) {
60985
61005
  var pattern = declaration.parent;
60986
- var narrowedType = getFlowTypeOfReference(pattern, parentType, parentType, undefined, location.flowNode);
61006
+ var narrowedType = getFlowTypeOfReference(pattern, parentTypeConstraint, parentTypeConstraint, undefined, location.flowNode);
60987
61007
  if (narrowedType.flags & 131072) {
60988
61008
  return neverType;
60989
61009
  }
package/lib/tsserver.js CHANGED
@@ -109,7 +109,7 @@ var ts;
109
109
  // The following is baselined as a literal template type without intervention
110
110
  /** The version of the TypeScript compiler release */
111
111
  // eslint-disable-next-line @typescript-eslint/no-inferrable-types
112
- ts.version = "".concat(ts.versionMajorMinor, ".0-dev.20220917");
112
+ ts.version = "".concat(ts.versionMajorMinor, ".0-dev.20220919");
113
113
  /* @internal */
114
114
  var Comparison;
115
115
  (function (Comparison) {
@@ -49542,6 +49542,7 @@ var ts;
49542
49542
  isPropertyAccessible: isPropertyAccessible,
49543
49543
  getTypeOnlyAliasDeclaration: getTypeOnlyAliasDeclaration,
49544
49544
  getMemberOverrideModifierStatus: getMemberOverrideModifierStatus,
49545
+ isTypeParameterPossiblyReferenced: isTypeParameterPossiblyReferenced,
49545
49546
  };
49546
49547
  function runWithInferenceBlockedFromSourceNode(node, fn) {
49547
49548
  var containingCall = ts.findAncestor(node, ts.isCallLikeExpression);
@@ -64599,9 +64600,10 @@ var ts;
64599
64600
  node.parent.kind === 202 /* SyntaxKind.ImportType */ && node.parent.typeArguments && node === node.parent.qualifier);
64600
64601
  }
64601
64602
  function isTypeParameterPossiblyReferenced(tp, node) {
64602
- // If the type parameter doesn't have exactly one declaration, if there are invening statement blocks
64603
+ // If the type parameter doesn't have exactly one declaration, if there are intervening statement blocks
64603
64604
  // between the node and the type parameter declaration, if the node contains actual references to the
64604
- // type parameter, or if the node contains type queries, we consider the type parameter possibly referenced.
64605
+ // type parameter, or if the node contains type queries that we can't prove couldn't contain references to the type parameter,
64606
+ // we consider the type parameter possibly referenced.
64605
64607
  if (tp.symbol && tp.symbol.declarations && tp.symbol.declarations.length === 1) {
64606
64608
  var container = tp.symbol.declarations[0].parent;
64607
64609
  for (var n = node; n !== container; n = n.parent) {
@@ -64620,6 +64622,27 @@ var ts;
64620
64622
  return !tp.isThisType && ts.isPartOfTypeNode(node) && maybeTypeParameterReference(node) &&
64621
64623
  getTypeFromTypeNodeWorker(node) === tp; // use worker because we're looking for === equality
64622
64624
  case 183 /* SyntaxKind.TypeQuery */:
64625
+ var entityName = node.exprName;
64626
+ var firstIdentifier = ts.getFirstIdentifier(entityName);
64627
+ var firstIdentifierSymbol = getResolvedSymbol(firstIdentifier);
64628
+ var tpDeclaration = tp.symbol.declarations[0]; // There is exactly one declaration, otherwise `containsReference` is not called
64629
+ var tpScope_1;
64630
+ if (tpDeclaration.kind === 165 /* SyntaxKind.TypeParameter */) { // Type parameter is a regular type parameter, e.g. foo<T>
64631
+ tpScope_1 = tpDeclaration.parent;
64632
+ }
64633
+ else if (tp.isThisType) {
64634
+ // Type parameter is the this type, and its declaration is the class declaration.
64635
+ tpScope_1 = tpDeclaration;
64636
+ }
64637
+ else {
64638
+ // Type parameter's declaration was unrecognized.
64639
+ // This could happen if the type parameter comes from e.g. a JSDoc annotation, so we default to returning true.
64640
+ return true;
64641
+ }
64642
+ if (firstIdentifierSymbol.declarations) {
64643
+ return ts.some(firstIdentifierSymbol.declarations, function (idDecl) { return ts.isNodeDescendantOf(idDecl, tpScope_1); }) ||
64644
+ ts.some(node.typeArguments, containsReference);
64645
+ }
64623
64646
  return true;
64624
64647
  case 171 /* SyntaxKind.MethodDeclaration */:
64625
64648
  case 170 /* SyntaxKind.MethodSignature */:
@@ -72873,10 +72896,11 @@ var ts;
72873
72896
  if (!(links.flags & 268435456 /* NodeCheckFlags.InCheckIdentifier */)) {
72874
72897
  links.flags |= 268435456 /* NodeCheckFlags.InCheckIdentifier */;
72875
72898
  var parentType = getTypeForBindingElementParent(parent, 0 /* CheckMode.Normal */);
72899
+ var parentTypeConstraint = parentType && mapType(parentType, getBaseConstraintOrType);
72876
72900
  links.flags &= ~268435456 /* NodeCheckFlags.InCheckIdentifier */;
72877
- if (parentType && parentType.flags & 1048576 /* TypeFlags.Union */ && !(parent.kind === 166 /* SyntaxKind.Parameter */ && isSymbolAssigned(symbol))) {
72901
+ if (parentTypeConstraint && parentTypeConstraint.flags & 1048576 /* TypeFlags.Union */ && !(parent.kind === 166 /* SyntaxKind.Parameter */ && isSymbolAssigned(symbol))) {
72878
72902
  var pattern = declaration.parent;
72879
- var narrowedType = getFlowTypeOfReference(pattern, parentType, parentType, /*flowContainer*/ undefined, location.flowNode);
72903
+ var narrowedType = getFlowTypeOfReference(pattern, parentTypeConstraint, parentTypeConstraint, /*flowContainer*/ undefined, location.flowNode);
72880
72904
  if (narrowedType.flags & 131072 /* TypeFlags.Never */) {
72881
72905
  return neverType;
72882
72906
  }
@@ -108,7 +108,7 @@ var ts;
108
108
  // The following is baselined as a literal template type without intervention
109
109
  /** The version of the TypeScript compiler release */
110
110
  // eslint-disable-next-line @typescript-eslint/no-inferrable-types
111
- ts.version = "".concat(ts.versionMajorMinor, ".0-dev.20220917");
111
+ ts.version = "".concat(ts.versionMajorMinor, ".0-dev.20220919");
112
112
  /* @internal */
113
113
  var Comparison;
114
114
  (function (Comparison) {
@@ -49541,6 +49541,7 @@ var ts;
49541
49541
  isPropertyAccessible: isPropertyAccessible,
49542
49542
  getTypeOnlyAliasDeclaration: getTypeOnlyAliasDeclaration,
49543
49543
  getMemberOverrideModifierStatus: getMemberOverrideModifierStatus,
49544
+ isTypeParameterPossiblyReferenced: isTypeParameterPossiblyReferenced,
49544
49545
  };
49545
49546
  function runWithInferenceBlockedFromSourceNode(node, fn) {
49546
49547
  var containingCall = ts.findAncestor(node, ts.isCallLikeExpression);
@@ -64598,9 +64599,10 @@ var ts;
64598
64599
  node.parent.kind === 202 /* SyntaxKind.ImportType */ && node.parent.typeArguments && node === node.parent.qualifier);
64599
64600
  }
64600
64601
  function isTypeParameterPossiblyReferenced(tp, node) {
64601
- // If the type parameter doesn't have exactly one declaration, if there are invening statement blocks
64602
+ // If the type parameter doesn't have exactly one declaration, if there are intervening statement blocks
64602
64603
  // between the node and the type parameter declaration, if the node contains actual references to the
64603
- // type parameter, or if the node contains type queries, we consider the type parameter possibly referenced.
64604
+ // type parameter, or if the node contains type queries that we can't prove couldn't contain references to the type parameter,
64605
+ // we consider the type parameter possibly referenced.
64604
64606
  if (tp.symbol && tp.symbol.declarations && tp.symbol.declarations.length === 1) {
64605
64607
  var container = tp.symbol.declarations[0].parent;
64606
64608
  for (var n = node; n !== container; n = n.parent) {
@@ -64619,6 +64621,27 @@ var ts;
64619
64621
  return !tp.isThisType && ts.isPartOfTypeNode(node) && maybeTypeParameterReference(node) &&
64620
64622
  getTypeFromTypeNodeWorker(node) === tp; // use worker because we're looking for === equality
64621
64623
  case 183 /* SyntaxKind.TypeQuery */:
64624
+ var entityName = node.exprName;
64625
+ var firstIdentifier = ts.getFirstIdentifier(entityName);
64626
+ var firstIdentifierSymbol = getResolvedSymbol(firstIdentifier);
64627
+ var tpDeclaration = tp.symbol.declarations[0]; // There is exactly one declaration, otherwise `containsReference` is not called
64628
+ var tpScope_1;
64629
+ if (tpDeclaration.kind === 165 /* SyntaxKind.TypeParameter */) { // Type parameter is a regular type parameter, e.g. foo<T>
64630
+ tpScope_1 = tpDeclaration.parent;
64631
+ }
64632
+ else if (tp.isThisType) {
64633
+ // Type parameter is the this type, and its declaration is the class declaration.
64634
+ tpScope_1 = tpDeclaration;
64635
+ }
64636
+ else {
64637
+ // Type parameter's declaration was unrecognized.
64638
+ // This could happen if the type parameter comes from e.g. a JSDoc annotation, so we default to returning true.
64639
+ return true;
64640
+ }
64641
+ if (firstIdentifierSymbol.declarations) {
64642
+ return ts.some(firstIdentifierSymbol.declarations, function (idDecl) { return ts.isNodeDescendantOf(idDecl, tpScope_1); }) ||
64643
+ ts.some(node.typeArguments, containsReference);
64644
+ }
64622
64645
  return true;
64623
64646
  case 171 /* SyntaxKind.MethodDeclaration */:
64624
64647
  case 170 /* SyntaxKind.MethodSignature */:
@@ -72872,10 +72895,11 @@ var ts;
72872
72895
  if (!(links.flags & 268435456 /* NodeCheckFlags.InCheckIdentifier */)) {
72873
72896
  links.flags |= 268435456 /* NodeCheckFlags.InCheckIdentifier */;
72874
72897
  var parentType = getTypeForBindingElementParent(parent, 0 /* CheckMode.Normal */);
72898
+ var parentTypeConstraint = parentType && mapType(parentType, getBaseConstraintOrType);
72875
72899
  links.flags &= ~268435456 /* NodeCheckFlags.InCheckIdentifier */;
72876
- if (parentType && parentType.flags & 1048576 /* TypeFlags.Union */ && !(parent.kind === 166 /* SyntaxKind.Parameter */ && isSymbolAssigned(symbol))) {
72900
+ if (parentTypeConstraint && parentTypeConstraint.flags & 1048576 /* TypeFlags.Union */ && !(parent.kind === 166 /* SyntaxKind.Parameter */ && isSymbolAssigned(symbol))) {
72877
72901
  var pattern = declaration.parent;
72878
- var narrowedType = getFlowTypeOfReference(pattern, parentType, parentType, /*flowContainer*/ undefined, location.flowNode);
72902
+ var narrowedType = getFlowTypeOfReference(pattern, parentTypeConstraint, parentTypeConstraint, /*flowContainer*/ undefined, location.flowNode);
72879
72903
  if (narrowedType.flags & 131072 /* TypeFlags.Never */) {
72880
72904
  return neverType;
72881
72905
  }
package/lib/typescript.js CHANGED
@@ -99,7 +99,7 @@ var ts;
99
99
  // The following is baselined as a literal template type without intervention
100
100
  /** The version of the TypeScript compiler release */
101
101
  // eslint-disable-next-line @typescript-eslint/no-inferrable-types
102
- ts.version = "".concat(ts.versionMajorMinor, ".0-dev.20220917");
102
+ ts.version = "".concat(ts.versionMajorMinor, ".0-dev.20220919");
103
103
  /* @internal */
104
104
  var Comparison;
105
105
  (function (Comparison) {
@@ -49532,6 +49532,7 @@ var ts;
49532
49532
  isPropertyAccessible: isPropertyAccessible,
49533
49533
  getTypeOnlyAliasDeclaration: getTypeOnlyAliasDeclaration,
49534
49534
  getMemberOverrideModifierStatus: getMemberOverrideModifierStatus,
49535
+ isTypeParameterPossiblyReferenced: isTypeParameterPossiblyReferenced,
49535
49536
  };
49536
49537
  function runWithInferenceBlockedFromSourceNode(node, fn) {
49537
49538
  var containingCall = ts.findAncestor(node, ts.isCallLikeExpression);
@@ -64589,9 +64590,10 @@ var ts;
64589
64590
  node.parent.kind === 202 /* SyntaxKind.ImportType */ && node.parent.typeArguments && node === node.parent.qualifier);
64590
64591
  }
64591
64592
  function isTypeParameterPossiblyReferenced(tp, node) {
64592
- // If the type parameter doesn't have exactly one declaration, if there are invening statement blocks
64593
+ // If the type parameter doesn't have exactly one declaration, if there are intervening statement blocks
64593
64594
  // between the node and the type parameter declaration, if the node contains actual references to the
64594
- // type parameter, or if the node contains type queries, we consider the type parameter possibly referenced.
64595
+ // type parameter, or if the node contains type queries that we can't prove couldn't contain references to the type parameter,
64596
+ // we consider the type parameter possibly referenced.
64595
64597
  if (tp.symbol && tp.symbol.declarations && tp.symbol.declarations.length === 1) {
64596
64598
  var container = tp.symbol.declarations[0].parent;
64597
64599
  for (var n = node; n !== container; n = n.parent) {
@@ -64610,6 +64612,27 @@ var ts;
64610
64612
  return !tp.isThisType && ts.isPartOfTypeNode(node) && maybeTypeParameterReference(node) &&
64611
64613
  getTypeFromTypeNodeWorker(node) === tp; // use worker because we're looking for === equality
64612
64614
  case 183 /* SyntaxKind.TypeQuery */:
64615
+ var entityName = node.exprName;
64616
+ var firstIdentifier = ts.getFirstIdentifier(entityName);
64617
+ var firstIdentifierSymbol = getResolvedSymbol(firstIdentifier);
64618
+ var tpDeclaration = tp.symbol.declarations[0]; // There is exactly one declaration, otherwise `containsReference` is not called
64619
+ var tpScope_1;
64620
+ if (tpDeclaration.kind === 165 /* SyntaxKind.TypeParameter */) { // Type parameter is a regular type parameter, e.g. foo<T>
64621
+ tpScope_1 = tpDeclaration.parent;
64622
+ }
64623
+ else if (tp.isThisType) {
64624
+ // Type parameter is the this type, and its declaration is the class declaration.
64625
+ tpScope_1 = tpDeclaration;
64626
+ }
64627
+ else {
64628
+ // Type parameter's declaration was unrecognized.
64629
+ // This could happen if the type parameter comes from e.g. a JSDoc annotation, so we default to returning true.
64630
+ return true;
64631
+ }
64632
+ if (firstIdentifierSymbol.declarations) {
64633
+ return ts.some(firstIdentifierSymbol.declarations, function (idDecl) { return ts.isNodeDescendantOf(idDecl, tpScope_1); }) ||
64634
+ ts.some(node.typeArguments, containsReference);
64635
+ }
64613
64636
  return true;
64614
64637
  case 171 /* SyntaxKind.MethodDeclaration */:
64615
64638
  case 170 /* SyntaxKind.MethodSignature */:
@@ -72863,10 +72886,11 @@ var ts;
72863
72886
  if (!(links.flags & 268435456 /* NodeCheckFlags.InCheckIdentifier */)) {
72864
72887
  links.flags |= 268435456 /* NodeCheckFlags.InCheckIdentifier */;
72865
72888
  var parentType = getTypeForBindingElementParent(parent, 0 /* CheckMode.Normal */);
72889
+ var parentTypeConstraint = parentType && mapType(parentType, getBaseConstraintOrType);
72866
72890
  links.flags &= ~268435456 /* NodeCheckFlags.InCheckIdentifier */;
72867
- if (parentType && parentType.flags & 1048576 /* TypeFlags.Union */ && !(parent.kind === 166 /* SyntaxKind.Parameter */ && isSymbolAssigned(symbol))) {
72891
+ if (parentTypeConstraint && parentTypeConstraint.flags & 1048576 /* TypeFlags.Union */ && !(parent.kind === 166 /* SyntaxKind.Parameter */ && isSymbolAssigned(symbol))) {
72868
72892
  var pattern = declaration.parent;
72869
- var narrowedType = getFlowTypeOfReference(pattern, parentType, parentType, /*flowContainer*/ undefined, location.flowNode);
72893
+ var narrowedType = getFlowTypeOfReference(pattern, parentTypeConstraint, parentTypeConstraint, /*flowContainer*/ undefined, location.flowNode);
72870
72894
  if (narrowedType.flags & 131072 /* TypeFlags.Never */) {
72871
72895
  return neverType;
72872
72896
  }
@@ -99,7 +99,7 @@ var ts;
99
99
  // The following is baselined as a literal template type without intervention
100
100
  /** The version of the TypeScript compiler release */
101
101
  // eslint-disable-next-line @typescript-eslint/no-inferrable-types
102
- ts.version = "".concat(ts.versionMajorMinor, ".0-dev.20220917");
102
+ ts.version = "".concat(ts.versionMajorMinor, ".0-dev.20220919");
103
103
  /* @internal */
104
104
  var Comparison;
105
105
  (function (Comparison) {
@@ -49532,6 +49532,7 @@ var ts;
49532
49532
  isPropertyAccessible: isPropertyAccessible,
49533
49533
  getTypeOnlyAliasDeclaration: getTypeOnlyAliasDeclaration,
49534
49534
  getMemberOverrideModifierStatus: getMemberOverrideModifierStatus,
49535
+ isTypeParameterPossiblyReferenced: isTypeParameterPossiblyReferenced,
49535
49536
  };
49536
49537
  function runWithInferenceBlockedFromSourceNode(node, fn) {
49537
49538
  var containingCall = ts.findAncestor(node, ts.isCallLikeExpression);
@@ -64589,9 +64590,10 @@ var ts;
64589
64590
  node.parent.kind === 202 /* SyntaxKind.ImportType */ && node.parent.typeArguments && node === node.parent.qualifier);
64590
64591
  }
64591
64592
  function isTypeParameterPossiblyReferenced(tp, node) {
64592
- // If the type parameter doesn't have exactly one declaration, if there are invening statement blocks
64593
+ // If the type parameter doesn't have exactly one declaration, if there are intervening statement blocks
64593
64594
  // between the node and the type parameter declaration, if the node contains actual references to the
64594
- // type parameter, or if the node contains type queries, we consider the type parameter possibly referenced.
64595
+ // type parameter, or if the node contains type queries that we can't prove couldn't contain references to the type parameter,
64596
+ // we consider the type parameter possibly referenced.
64595
64597
  if (tp.symbol && tp.symbol.declarations && tp.symbol.declarations.length === 1) {
64596
64598
  var container = tp.symbol.declarations[0].parent;
64597
64599
  for (var n = node; n !== container; n = n.parent) {
@@ -64610,6 +64612,27 @@ var ts;
64610
64612
  return !tp.isThisType && ts.isPartOfTypeNode(node) && maybeTypeParameterReference(node) &&
64611
64613
  getTypeFromTypeNodeWorker(node) === tp; // use worker because we're looking for === equality
64612
64614
  case 183 /* SyntaxKind.TypeQuery */:
64615
+ var entityName = node.exprName;
64616
+ var firstIdentifier = ts.getFirstIdentifier(entityName);
64617
+ var firstIdentifierSymbol = getResolvedSymbol(firstIdentifier);
64618
+ var tpDeclaration = tp.symbol.declarations[0]; // There is exactly one declaration, otherwise `containsReference` is not called
64619
+ var tpScope_1;
64620
+ if (tpDeclaration.kind === 165 /* SyntaxKind.TypeParameter */) { // Type parameter is a regular type parameter, e.g. foo<T>
64621
+ tpScope_1 = tpDeclaration.parent;
64622
+ }
64623
+ else if (tp.isThisType) {
64624
+ // Type parameter is the this type, and its declaration is the class declaration.
64625
+ tpScope_1 = tpDeclaration;
64626
+ }
64627
+ else {
64628
+ // Type parameter's declaration was unrecognized.
64629
+ // This could happen if the type parameter comes from e.g. a JSDoc annotation, so we default to returning true.
64630
+ return true;
64631
+ }
64632
+ if (firstIdentifierSymbol.declarations) {
64633
+ return ts.some(firstIdentifierSymbol.declarations, function (idDecl) { return ts.isNodeDescendantOf(idDecl, tpScope_1); }) ||
64634
+ ts.some(node.typeArguments, containsReference);
64635
+ }
64613
64636
  return true;
64614
64637
  case 171 /* SyntaxKind.MethodDeclaration */:
64615
64638
  case 170 /* SyntaxKind.MethodSignature */:
@@ -72863,10 +72886,11 @@ var ts;
72863
72886
  if (!(links.flags & 268435456 /* NodeCheckFlags.InCheckIdentifier */)) {
72864
72887
  links.flags |= 268435456 /* NodeCheckFlags.InCheckIdentifier */;
72865
72888
  var parentType = getTypeForBindingElementParent(parent, 0 /* CheckMode.Normal */);
72889
+ var parentTypeConstraint = parentType && mapType(parentType, getBaseConstraintOrType);
72866
72890
  links.flags &= ~268435456 /* NodeCheckFlags.InCheckIdentifier */;
72867
- if (parentType && parentType.flags & 1048576 /* TypeFlags.Union */ && !(parent.kind === 166 /* SyntaxKind.Parameter */ && isSymbolAssigned(symbol))) {
72891
+ if (parentTypeConstraint && parentTypeConstraint.flags & 1048576 /* TypeFlags.Union */ && !(parent.kind === 166 /* SyntaxKind.Parameter */ && isSymbolAssigned(symbol))) {
72868
72892
  var pattern = declaration.parent;
72869
- var narrowedType = getFlowTypeOfReference(pattern, parentType, parentType, /*flowContainer*/ undefined, location.flowNode);
72893
+ var narrowedType = getFlowTypeOfReference(pattern, parentTypeConstraint, parentTypeConstraint, /*flowContainer*/ undefined, location.flowNode);
72870
72894
  if (narrowedType.flags & 131072 /* TypeFlags.Never */) {
72871
72895
  return neverType;
72872
72896
  }
@@ -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 = "".concat(ts.versionMajorMinor, ".0-dev.20220917");
92
+ ts.version = "".concat(ts.versionMajorMinor, ".0-dev.20220919");
93
93
  /* @internal */
94
94
  var Comparison;
95
95
  (function (Comparison) {
@@ -49522,6 +49522,7 @@ var ts;
49522
49522
  isPropertyAccessible: isPropertyAccessible,
49523
49523
  getTypeOnlyAliasDeclaration: getTypeOnlyAliasDeclaration,
49524
49524
  getMemberOverrideModifierStatus: getMemberOverrideModifierStatus,
49525
+ isTypeParameterPossiblyReferenced: isTypeParameterPossiblyReferenced,
49525
49526
  };
49526
49527
  function runWithInferenceBlockedFromSourceNode(node, fn) {
49527
49528
  var containingCall = ts.findAncestor(node, ts.isCallLikeExpression);
@@ -64579,9 +64580,10 @@ var ts;
64579
64580
  node.parent.kind === 202 /* SyntaxKind.ImportType */ && node.parent.typeArguments && node === node.parent.qualifier);
64580
64581
  }
64581
64582
  function isTypeParameterPossiblyReferenced(tp, node) {
64582
- // If the type parameter doesn't have exactly one declaration, if there are invening statement blocks
64583
+ // If the type parameter doesn't have exactly one declaration, if there are intervening statement blocks
64583
64584
  // between the node and the type parameter declaration, if the node contains actual references to the
64584
- // type parameter, or if the node contains type queries, we consider the type parameter possibly referenced.
64585
+ // type parameter, or if the node contains type queries that we can't prove couldn't contain references to the type parameter,
64586
+ // we consider the type parameter possibly referenced.
64585
64587
  if (tp.symbol && tp.symbol.declarations && tp.symbol.declarations.length === 1) {
64586
64588
  var container = tp.symbol.declarations[0].parent;
64587
64589
  for (var n = node; n !== container; n = n.parent) {
@@ -64600,6 +64602,27 @@ var ts;
64600
64602
  return !tp.isThisType && ts.isPartOfTypeNode(node) && maybeTypeParameterReference(node) &&
64601
64603
  getTypeFromTypeNodeWorker(node) === tp; // use worker because we're looking for === equality
64602
64604
  case 183 /* SyntaxKind.TypeQuery */:
64605
+ var entityName = node.exprName;
64606
+ var firstIdentifier = ts.getFirstIdentifier(entityName);
64607
+ var firstIdentifierSymbol = getResolvedSymbol(firstIdentifier);
64608
+ var tpDeclaration = tp.symbol.declarations[0]; // There is exactly one declaration, otherwise `containsReference` is not called
64609
+ var tpScope_1;
64610
+ if (tpDeclaration.kind === 165 /* SyntaxKind.TypeParameter */) { // Type parameter is a regular type parameter, e.g. foo<T>
64611
+ tpScope_1 = tpDeclaration.parent;
64612
+ }
64613
+ else if (tp.isThisType) {
64614
+ // Type parameter is the this type, and its declaration is the class declaration.
64615
+ tpScope_1 = tpDeclaration;
64616
+ }
64617
+ else {
64618
+ // Type parameter's declaration was unrecognized.
64619
+ // This could happen if the type parameter comes from e.g. a JSDoc annotation, so we default to returning true.
64620
+ return true;
64621
+ }
64622
+ if (firstIdentifierSymbol.declarations) {
64623
+ return ts.some(firstIdentifierSymbol.declarations, function (idDecl) { return ts.isNodeDescendantOf(idDecl, tpScope_1); }) ||
64624
+ ts.some(node.typeArguments, containsReference);
64625
+ }
64603
64626
  return true;
64604
64627
  case 171 /* SyntaxKind.MethodDeclaration */:
64605
64628
  case 170 /* SyntaxKind.MethodSignature */:
@@ -72853,10 +72876,11 @@ var ts;
72853
72876
  if (!(links.flags & 268435456 /* NodeCheckFlags.InCheckIdentifier */)) {
72854
72877
  links.flags |= 268435456 /* NodeCheckFlags.InCheckIdentifier */;
72855
72878
  var parentType = getTypeForBindingElementParent(parent, 0 /* CheckMode.Normal */);
72879
+ var parentTypeConstraint = parentType && mapType(parentType, getBaseConstraintOrType);
72856
72880
  links.flags &= ~268435456 /* NodeCheckFlags.InCheckIdentifier */;
72857
- if (parentType && parentType.flags & 1048576 /* TypeFlags.Union */ && !(parent.kind === 166 /* SyntaxKind.Parameter */ && isSymbolAssigned(symbol))) {
72881
+ if (parentTypeConstraint && parentTypeConstraint.flags & 1048576 /* TypeFlags.Union */ && !(parent.kind === 166 /* SyntaxKind.Parameter */ && isSymbolAssigned(symbol))) {
72858
72882
  var pattern = declaration.parent;
72859
- var narrowedType = getFlowTypeOfReference(pattern, parentType, parentType, /*flowContainer*/ undefined, location.flowNode);
72883
+ var narrowedType = getFlowTypeOfReference(pattern, parentTypeConstraint, parentTypeConstraint, /*flowContainer*/ undefined, location.flowNode);
72860
72884
  if (narrowedType.flags & 131072 /* TypeFlags.Never */) {
72861
72885
  return neverType;
72862
72886
  }
@@ -1469,6 +1469,7 @@
1469
1469
  "The_type_returned_by_the_0_method_of_an_iterator_must_have_a_value_property_2490": "迭代器的 \"{0}()\" 方法返回的类型必须具有 \"value\" 属性。",
1470
1470
  "The_types_of_0_are_incompatible_between_these_types_2200": "在这些类型中,\"{0}\" 的类型不兼容。",
1471
1471
  "The_types_returned_by_0_are_incompatible_between_these_types_2201": "在这些类型中,\"{0}\" 返回的类型不兼容。",
1472
+ "The_value_0_cannot_be_used_here_18050": "此处不能使用值“{0}”。",
1472
1473
  "The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer_1189": "\"for...in\" 语句的变量声明不能有初始化表达式。",
1473
1474
  "The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer_1190": "\"for...of\" 语句的变量声明不能有初始化表达式。",
1474
1475
  "The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any_2410": "不支持 \"with\" 语句。\"with\" 程序块中的所有符号都将具有类型 \"any\"。",
@@ -1728,6 +1729,10 @@
1728
1729
  "_0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2_17012": "“{0}”不是关键字“{1}”的有效元属性。是否是指“{2}”?",
1729
1730
  "_0_is_not_allowed_as_a_parameter_name_1390": "不允许将 '{0}' 作为参数名。",
1730
1731
  "_0_is_not_allowed_as_a_variable_declaration_name_1389": "“{0}”不得用作变量声明名称。",
1732
+ "_0_is_of_type_unknown_18046": "“{0}”的类型为“未知”。",
1733
+ "_0_is_possibly_null_18047": "“{0}”可能为 “null”。",
1734
+ "_0_is_possibly_null_or_undefined_18049": "{0}可能为 “null” 或“未定义”。",
1735
+ "_0_is_possibly_undefined_18048": "“{0}”可能为“未定义”。",
1731
1736
  "_0_is_referenced_directly_or_indirectly_in_its_own_base_expression_2506": "“{0}”在其自身的基表达式中得到直接或间接引用。",
1732
1737
  "_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation_2502": "“{0}”在其自身的类型批注中得到直接或间接引用。",
1733
1738
  "_0_is_specified_more_than_once_so_this_usage_will_be_overwritten_2783": "多次指定了 \"{0}\",因此将重写此用法。",
@@ -1469,6 +1469,7 @@
1469
1469
  "The_type_returned_by_the_0_method_of_an_iterator_must_have_a_value_property_2490": "迭代器 '{0}()' 方法所傳回的類型必須具有 'value' 屬性。",
1470
1470
  "The_types_of_0_are_incompatible_between_these_types_2200": "'{0}' 的類型在這些類型之間不相容。",
1471
1471
  "The_types_returned_by_0_are_incompatible_between_these_types_2201": "'{0}' 所傳回的類型在這些類型之間不相容。",
1472
+ "The_value_0_cannot_be_used_here_18050": "此處無法使用值 '{0}'。",
1472
1473
  "The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer_1189": "'for...in' 陳述式的變數宣告不得有初始設定式。",
1473
1474
  "The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer_1190": "'for...of' 陳述式的變數宣告不得有初始設定式。",
1474
1475
  "The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any_2410": "不支援 'with' 陳述式。'with' 區塊中的所有符號都會有類型 'any'。",
@@ -1728,6 +1729,10 @@
1728
1729
  "_0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2_17012": "'{0}' 對關鍵字 '{1}' 而言不是有效的中繼屬性。您是指 '{2}' 嗎?",
1729
1730
  "_0_is_not_allowed_as_a_parameter_name_1390": "不允許 '{0}' 做為參數名稱。",
1730
1731
  "_0_is_not_allowed_as_a_variable_declaration_name_1389": "'{0}' 不能是變數宣告名稱。",
1732
+ "_0_is_of_type_unknown_18046": "'{0}' 的類型為 'unknown'。",
1733
+ "_0_is_possibly_null_18047": "'{0}' 可能是 'null'。",
1734
+ "_0_is_possibly_null_or_undefined_18049": "'{0}' 可能為「null」或「未定義」。",
1735
+ "_0_is_possibly_undefined_18048": "'{0}' 可能為「未定義」。",
1731
1736
  "_0_is_referenced_directly_or_indirectly_in_its_own_base_expression_2506": "'{0}' 在其本身的基底運算式中直接或間接受到參考。",
1732
1737
  "_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation_2502": "'{0}' 在其本身的類型註釋中直接或間接受到參考。",
1733
1738
  "_0_is_specified_more_than_once_so_this_usage_will_be_overwritten_2783": "多次指定 '{0}',因此將會覆寫此使用方式。",
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.9.0-dev.20220917",
5
+ "version": "4.9.0-dev.20220919",
6
6
  "license": "Apache-2.0",
7
7
  "description": "TypeScript is a language for application scale JavaScript development",
8
8
  "keywords": [