typescript 4.8.0-dev.20220808 → 4.8.0-dev.20220809

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.
@@ -919,7 +919,7 @@
919
919
  "Method_not_implemented_95158": "Metoda nie jest zaimplementowana.",
920
920
  "Modifiers_cannot_appear_here_1184": "Modyfikatory nie mogą występować w tym miejscu.",
921
921
  "Module_0_can_only_be_default_imported_using_the_1_flag_1259": "Moduł „{0}” może być importowany domyślnie tylko przy użyciu flagi „{1}”",
922
- "Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_c_1471": "Nie można zaimportować modułu „{0}” przy użyciu tej konstrukcji. Specyfikator jest rozpoznawany tylko jako moduł ES, którego nie można zaimportować synchronicznie. Zamiast tego użyj importu dynamicznego.",
922
+ "Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_c_1471": "Nie można zaimportować modułu „{0}” przy użyciu tej konstrukcji. Specyfikator jest rozpoznawany tylko jako moduł ES, którego nie można zaimportować za pomocą wywołania „require”. Zamiast tego użyj importu ECMAScript.",
923
923
  "Module_0_declares_1_locally_but_it_is_exported_as_2_2460": "Moduł „{0}” deklaruje element „{1}” lokalnie, ale jest on eksportowany jako „{2}”.",
924
924
  "Module_0_declares_1_locally_but_it_is_not_exported_2459": "Moduł „{0}” deklaruje element „{1}” lokalnie, ale nie jest on eksportowany.",
925
925
  "Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0_1340": "Moduł „{0}” nie odwołuje się do typu, ale jest tutaj używany jako typ. Czy chodziło Ci o „typeof import(„{0}”)”?",
@@ -1385,6 +1385,7 @@
1385
1385
  "The_containing_arrow_function_captures_the_global_value_of_this_7041": "Zawierająca funkcja strzałki przechwytuje wartość globalną parametru „this”.",
1386
1386
  "The_containing_function_or_module_body_is_too_large_for_control_flow_analysis_2563": "Treść zawierającej funkcji lub modułu jest za duża do analizy przepływu sterowania.",
1387
1387
  "The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level_1309": "Bieżący plik jest modułem CommonJS i nie może używać elementu „await” na najwyższym poziomie.",
1388
+ "The_current_file_is_a_CommonJS_module_whose_imports_will_produce_require_calls_however_the_reference_1479": "Bieżący plik jest modułem CommonJS, którego importy będą generować wywołania „require”; jednak przywoływany plik jest modułem ECMAScript i nie można go zaimportować za pomocą wywołania „require”. Zamiast tego rozważ zapisanie dynamicznego wywołania „import(\"{0}\")”.",
1388
1389
  "The_current_host_does_not_support_the_0_option_5001": "Bieżący host nie obsługuje opcji „{0}”.",
1389
1390
  "The_declaration_of_0_that_you_probably_intended_to_use_is_defined_here_18018": "W tym miejscu zdefiniowano deklarację elementu „{0}”, której prawdopodobnie zamierzano użyć",
1390
1391
  "The_declaration_was_marked_as_deprecated_here_2798": "Deklaracja została oznaczona jako przestarzała w tym miejscu.",
@@ -1504,6 +1505,10 @@
1504
1505
  "This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_o_2807": "Ta składnia wymaga zaimportowanego pomocnika o nazwie „{1}” z parametrami {2}, który nie jest zgodny z tym w elemencie „{0}”. Rozważ uaktualnienie wersji elementu „{0}”.",
1505
1506
  "This_type_parameter_might_need_an_extends_0_constraint_2208": "Ten parametr typu może wymagać ograniczenia „rozszerzeń{0}”.",
1506
1507
  "This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot__1326": "To użycie elementu „import” jest nieprawidłowe. Wywołania „import()” mogą być zapisywane, ale muszą mieć nawiasy i nie mogą mieć argumentów typu.",
1508
+ "To_convert_this_file_to_an_ECMAScript_module_add_the_field_type_Colon_module_to_0_1482": "Aby przekonwertować ten plik na moduł ECMAScript, dodaj pole „\"type\": \"module\"” do „{0}”.",
1509
+ "To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_add_the_field_type_Co_1481": "Aby przekonwertować ten plik na moduł ECMAScript, zmień rozszerzenie jego pliku na „{0}” lub dodaj pole „\"type\": \"module\"” do „{1}”.",
1510
+ "To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_create_a_local_packag_1480": "Aby przekonwertować ten plik na moduł ECMAScript, zmień rozszerzenie jego pliku na „{0}” lub utwórz lokalny plik package.json z polem „{ \"type\": \"module\" }\".",
1511
+ "To_convert_this_file_to_an_ECMAScript_module_create_a_local_package_json_file_with_type_Colon_module_1483": "Aby przekonwertować ten plik na moduł ECMAScript, utwórz lokalny plik package.json z polem „{ \"type\": \"module\" }\".",
1507
1512
  "Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_n_1378": "Wyrażenia „await” najwyższego poziomu są dozwolone tylko wtedy, gdy opcja „module” jest ustawiona na wartość „es2022”, „esnext”, „system”, „node16” lub „nodenext”, a opcja „target” jest ustawiona na wartość „es2017” lub wyższą.",
1508
1513
  "Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier_1046": "Deklaracje najwyższego poziomu w plikach .d.ts muszą rozpoczynać się od modyfikatora „declare” lub „export”.",
1509
1514
  "Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_nod_1432": "Pętle najwyższego poziomu „for await” są dozwolone tylko wtedy, gdy opcja „module” jest ustawiona na wartość „es2022”, „esnext”, „system”, „node16” lub „nodenext”, a opcja „target” jest ustawiona na wartość „es2017” lub wyższą.",
@@ -919,7 +919,7 @@
919
919
  "Method_not_implemented_95158": "Metot uygulanmadı.",
920
920
  "Modifiers_cannot_appear_here_1184": "Değiştiriciler burada görüntülenemez.",
921
921
  "Module_0_can_only_be_default_imported_using_the_1_flag_1259": "'{0}' modülü yalnızca varsayılan olarak '{1}' bayrağı kullanılarak içeri aktarılabilir",
922
- "Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_c_1471": "'{0}' modülü bu yapı kullanılarak içeri aktarılamaz. Tanımlayıcı yalnızca eşzamanlı olarak içeri aktarılamayan bir ES modülüne çözümleniyor. Bunun yerine dinamik içeri aktarma kullanın.",
922
+ "Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_c_1471": "'{0}' modülü bu yapı kullanılarak içe aktarılamaz. Belirtici yalnızca 'require' ile içe aktarılamayan bir ES modülüne çözümlenir. Bunun yerine bir ECMAScript içe aktarma kullanın.",
923
923
  "Module_0_declares_1_locally_but_it_is_exported_as_2_2460": "'{0}' modülü '{1}' öğesini yerel olarak bildiriyor ancak '{2}' olarak dışarı aktarıldı.",
924
924
  "Module_0_declares_1_locally_but_it_is_not_exported_2459": "'{0}' modülü '{1}' öğesini yerel olarak bildiriyor ancak dışarı aktarılmadı.",
925
925
  "Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0_1340": "'{0}' modülü bir türe başvurmuyor ancak burada bir tür olarak kullanılmış. Şunu mu demek istediniz?: 'typeof import('{0}')'",
@@ -1385,6 +1385,7 @@
1385
1385
  "The_containing_arrow_function_captures_the_global_value_of_this_7041": "Kapsayıcı ok işlevi, 'this' öğesinin genel değerini yakalar.",
1386
1386
  "The_containing_function_or_module_body_is_too_large_for_control_flow_analysis_2563": "İçeren işlev veya modül gövdesi, denetim akışı analizi için çok büyük.",
1387
1387
  "The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level_1309": "Geçerli dosya bir CommonJS modülüdür ve en üst düzeyde 'await'i kullanamaz.",
1388
+ "The_current_file_is_a_CommonJS_module_whose_imports_will_produce_require_calls_however_the_reference_1479": "Geçerli dosya, içe aktarma işlemlerinin 'require' çağrıları üreteceği bir CommonJS modülüdür; ancak başvurulan dosya bir ECMAScript modülüdür ve 'require' ile içe aktarılamaz. Bunun yerine dinamik bir 'import(\"{0}\")' çağrısı yazmayı deneyin.",
1388
1389
  "The_current_host_does_not_support_the_0_option_5001": "Mevcut ana bilgisayar '{0}' seçeneğini desteklemiyor.",
1389
1390
  "The_declaration_of_0_that_you_probably_intended_to_use_is_defined_here_18018": "Büyük olasılıkla kullanmayı amaçladığınız '{0}' bildirimi burada tanımlanır",
1390
1391
  "The_declaration_was_marked_as_deprecated_here_2798": "Bildirim burada kullanım dışı olarak işaretlendi.",
@@ -1504,6 +1505,10 @@
1504
1505
  "This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_o_2807": "Bu söz dizimi, '{0}' içindeki yardımcı ile uyumlu olmayan, {2} parametreye sahip '{1}' adlı içeri aktarılan yardımcıyı gerektiriyor. '{0}' sürümünüzü yükseltmeyi düşünün.",
1505
1506
  "This_type_parameter_might_need_an_extends_0_constraint_2208": "Bu tür parametresinin bir `extends {0}` kısıtlamasına ihtiyacı olabilir.",
1506
1507
  "This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot__1326": "'import' çağrısının bu kullanımı geçersiz. 'import()' çağrıları yazılabilir ancak ayraç içermeleri gerekir ve tür bağımsız değişkenleri içeremezler.",
1508
+ "To_convert_this_file_to_an_ECMAScript_module_add_the_field_type_Colon_module_to_0_1482": "Bu dosyayı bir ECMAScript modülüne dönüştürmek için, '{0}' dizinine `\"type\": \"module\"` alanı ekleyin.",
1509
+ "To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_add_the_field_type_Co_1481": "Bu dosyayı bir ECMAScript modülüne dönüştürmek için dosya uzantısını '{0}' olarak değiştirin veya '{1}' dizinine ''type': 'module'' alanı ekleyin.",
1510
+ "To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_create_a_local_packag_1480": "Bu dosyayı bir ECMAScript modülüne dönüştürmek için dosya uzantısını '{0}' olarak değiştirin veya `{ \"type\": \"module\" }` ile yerel bir package.json dosyası oluşturun.",
1511
+ "To_convert_this_file_to_an_ECMAScript_module_create_a_local_package_json_file_with_type_Colon_module_1483": "Bu dosyayı bir ECMAScript modülüne dönüştürmek için, `{ \"type\": \"module\" }` ile yerel bir package.json dosyası oluşturun.",
1507
1512
  "Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_n_1378": "Üst düzey 'await' ifadelerine yalnızca 'module' seçeneği 'es2022', 'esnext', 'system', 'node16' veya 'nodenext' olarak ayarlandığında ve 'target' seçeneği 'es2017' veya üzeri olarak ayarlandığında izin verilir.",
1508
1513
  "Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier_1046": ".d.ts dosyalarındaki üst düzey bildirimler bir 'declare' veya 'export' değiştiricisi ile başlamalıdır.",
1509
1514
  "Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_nod_1432": "Üst düzey 'bekleme için' döngülerine yalnızca 'modül' seçeneği 'es2022', 'esnext', 'system', 'node16' veya 'nodenext' olarak ayarlandığında ve 'target' seçeneği 'es2017' veya üstü olarak ayarlandığında izin verilir.",
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.8";
72
- ts.version = ts.versionMajorMinor + ".0-dev.20220808";
72
+ ts.version = ts.versionMajorMinor + ".0-dev.20220809";
73
73
  var NativeCollections;
74
74
  (function (NativeCollections) {
75
75
  var globals = typeof globalThis !== "undefined" ? globalThis :
@@ -62272,15 +62272,26 @@ var ts;
62272
62272
  }
62273
62273
  propertiesArray.push(member);
62274
62274
  }
62275
- if (contextualTypeHasPattern && node.parent.kind !== 298) {
62276
- for (var _d = 0, _e = getPropertiesOfType(contextualType); _d < _e.length; _d++) {
62277
- var prop = _e[_d];
62278
- if (!propertiesTable.get(prop.escapedName) && !getPropertyOfType(spread, prop.escapedName)) {
62279
- if (!(prop.flags & 16777216)) {
62280
- error(prop.valueDeclaration || prop.bindingElement, ts.Diagnostics.Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value);
62275
+ if (contextualTypeHasPattern) {
62276
+ var rootPatternParent_1 = ts.findAncestor(contextualType.pattern.parent, function (n) {
62277
+ return n.kind === 254 ||
62278
+ n.kind === 221 ||
62279
+ n.kind === 164;
62280
+ });
62281
+ var spreadOrOutsideRootObject = ts.findAncestor(node, function (n) {
62282
+ return n === rootPatternParent_1 ||
62283
+ n.kind === 298;
62284
+ });
62285
+ if (spreadOrOutsideRootObject.kind !== 298) {
62286
+ for (var _d = 0, _e = getPropertiesOfType(contextualType); _d < _e.length; _d++) {
62287
+ var prop = _e[_d];
62288
+ if (!propertiesTable.get(prop.escapedName) && !getPropertyOfType(spread, prop.escapedName)) {
62289
+ if (!(prop.flags & 16777216)) {
62290
+ error(prop.valueDeclaration || prop.bindingElement, ts.Diagnostics.Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value);
62291
+ }
62292
+ propertiesTable.set(prop.escapedName, prop);
62293
+ propertiesArray.push(prop);
62281
62294
  }
62282
- propertiesTable.set(prop.escapedName, prop);
62283
- propertiesArray.push(prop);
62284
62295
  }
62285
62296
  }
62286
62297
  }
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 = ts.versionMajorMinor + ".0-dev.20220808";
112
+ ts.version = ts.versionMajorMinor + ".0-dev.20220809";
113
113
  /* @internal */
114
114
  var Comparison;
115
115
  (function (Comparison) {
@@ -74456,16 +74456,30 @@ var ts;
74456
74456
  // If object literal is contextually typed by the implied type of a binding pattern, augment the result
74457
74457
  // type with those properties for which the binding pattern specifies a default value.
74458
74458
  // If the object literal is spread into another object literal, skip this step and let the top-level object
74459
- // literal handle it instead.
74460
- if (contextualTypeHasPattern && node.parent.kind !== 298 /* SpreadAssignment */) {
74461
- for (var _d = 0, _e = getPropertiesOfType(contextualType); _d < _e.length; _d++) {
74462
- var prop = _e[_d];
74463
- if (!propertiesTable.get(prop.escapedName) && !getPropertyOfType(spread, prop.escapedName)) {
74464
- if (!(prop.flags & 16777216 /* Optional */)) {
74465
- error(prop.valueDeclaration || prop.bindingElement, ts.Diagnostics.Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value);
74466
- }
74467
- propertiesTable.set(prop.escapedName, prop);
74468
- propertiesArray.push(prop);
74459
+ // literal handle it instead. Note that this might require full traversal to the root pattern's parent
74460
+ // as it's the guaranteed to be the common ancestor of the pattern node and the current object node.
74461
+ // It's not possible to check if the immediate parent node is a spread assignment
74462
+ // since the type flows in non-obvious ways through conditional expressions, IIFEs and more.
74463
+ if (contextualTypeHasPattern) {
74464
+ var rootPatternParent_1 = ts.findAncestor(contextualType.pattern.parent, function (n) {
74465
+ return n.kind === 254 /* VariableDeclaration */ ||
74466
+ n.kind === 221 /* BinaryExpression */ ||
74467
+ n.kind === 164 /* Parameter */;
74468
+ });
74469
+ var spreadOrOutsideRootObject = ts.findAncestor(node, function (n) {
74470
+ return n === rootPatternParent_1 ||
74471
+ n.kind === 298 /* SpreadAssignment */;
74472
+ });
74473
+ if (spreadOrOutsideRootObject.kind !== 298 /* SpreadAssignment */) {
74474
+ for (var _d = 0, _e = getPropertiesOfType(contextualType); _d < _e.length; _d++) {
74475
+ var prop = _e[_d];
74476
+ if (!propertiesTable.get(prop.escapedName) && !getPropertyOfType(spread, prop.escapedName)) {
74477
+ if (!(prop.flags & 16777216 /* Optional */)) {
74478
+ error(prop.valueDeclaration || prop.bindingElement, ts.Diagnostics.Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value);
74479
+ }
74480
+ propertiesTable.set(prop.escapedName, prop);
74481
+ propertiesArray.push(prop);
74482
+ }
74469
74483
  }
74470
74484
  }
74471
74485
  }
@@ -303,7 +303,7 @@ var ts;
303
303
  // The following is baselined as a literal template type without intervention
304
304
  /** The version of the TypeScript compiler release */
305
305
  // eslint-disable-next-line @typescript-eslint/no-inferrable-types
306
- ts.version = ts.versionMajorMinor + ".0-dev.20220808";
306
+ ts.version = ts.versionMajorMinor + ".0-dev.20220809";
307
307
  /* @internal */
308
308
  var Comparison;
309
309
  (function (Comparison) {
@@ -74650,16 +74650,30 @@ var ts;
74650
74650
  // If object literal is contextually typed by the implied type of a binding pattern, augment the result
74651
74651
  // type with those properties for which the binding pattern specifies a default value.
74652
74652
  // If the object literal is spread into another object literal, skip this step and let the top-level object
74653
- // literal handle it instead.
74654
- if (contextualTypeHasPattern && node.parent.kind !== 298 /* SpreadAssignment */) {
74655
- for (var _d = 0, _e = getPropertiesOfType(contextualType); _d < _e.length; _d++) {
74656
- var prop = _e[_d];
74657
- if (!propertiesTable.get(prop.escapedName) && !getPropertyOfType(spread, prop.escapedName)) {
74658
- if (!(prop.flags & 16777216 /* Optional */)) {
74659
- error(prop.valueDeclaration || prop.bindingElement, ts.Diagnostics.Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value);
74660
- }
74661
- propertiesTable.set(prop.escapedName, prop);
74662
- propertiesArray.push(prop);
74653
+ // literal handle it instead. Note that this might require full traversal to the root pattern's parent
74654
+ // as it's the guaranteed to be the common ancestor of the pattern node and the current object node.
74655
+ // It's not possible to check if the immediate parent node is a spread assignment
74656
+ // since the type flows in non-obvious ways through conditional expressions, IIFEs and more.
74657
+ if (contextualTypeHasPattern) {
74658
+ var rootPatternParent_1 = ts.findAncestor(contextualType.pattern.parent, function (n) {
74659
+ return n.kind === 254 /* VariableDeclaration */ ||
74660
+ n.kind === 221 /* BinaryExpression */ ||
74661
+ n.kind === 164 /* Parameter */;
74662
+ });
74663
+ var spreadOrOutsideRootObject = ts.findAncestor(node, function (n) {
74664
+ return n === rootPatternParent_1 ||
74665
+ n.kind === 298 /* SpreadAssignment */;
74666
+ });
74667
+ if (spreadOrOutsideRootObject.kind !== 298 /* SpreadAssignment */) {
74668
+ for (var _d = 0, _e = getPropertiesOfType(contextualType); _d < _e.length; _d++) {
74669
+ var prop = _e[_d];
74670
+ if (!propertiesTable.get(prop.escapedName) && !getPropertyOfType(spread, prop.escapedName)) {
74671
+ if (!(prop.flags & 16777216 /* Optional */)) {
74672
+ error(prop.valueDeclaration || prop.bindingElement, ts.Diagnostics.Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value);
74673
+ }
74674
+ propertiesTable.set(prop.escapedName, prop);
74675
+ propertiesArray.push(prop);
74676
+ }
74663
74677
  }
74664
74678
  }
74665
74679
  }
package/lib/typescript.js CHANGED
@@ -294,7 +294,7 @@ var ts;
294
294
  // The following is baselined as a literal template type without intervention
295
295
  /** The version of the TypeScript compiler release */
296
296
  // eslint-disable-next-line @typescript-eslint/no-inferrable-types
297
- ts.version = ts.versionMajorMinor + ".0-dev.20220808";
297
+ ts.version = ts.versionMajorMinor + ".0-dev.20220809";
298
298
  /* @internal */
299
299
  var Comparison;
300
300
  (function (Comparison) {
@@ -74641,16 +74641,30 @@ var ts;
74641
74641
  // If object literal is contextually typed by the implied type of a binding pattern, augment the result
74642
74642
  // type with those properties for which the binding pattern specifies a default value.
74643
74643
  // If the object literal is spread into another object literal, skip this step and let the top-level object
74644
- // literal handle it instead.
74645
- if (contextualTypeHasPattern && node.parent.kind !== 298 /* SpreadAssignment */) {
74646
- for (var _d = 0, _e = getPropertiesOfType(contextualType); _d < _e.length; _d++) {
74647
- var prop = _e[_d];
74648
- if (!propertiesTable.get(prop.escapedName) && !getPropertyOfType(spread, prop.escapedName)) {
74649
- if (!(prop.flags & 16777216 /* Optional */)) {
74650
- error(prop.valueDeclaration || prop.bindingElement, ts.Diagnostics.Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value);
74651
- }
74652
- propertiesTable.set(prop.escapedName, prop);
74653
- propertiesArray.push(prop);
74644
+ // literal handle it instead. Note that this might require full traversal to the root pattern's parent
74645
+ // as it's the guaranteed to be the common ancestor of the pattern node and the current object node.
74646
+ // It's not possible to check if the immediate parent node is a spread assignment
74647
+ // since the type flows in non-obvious ways through conditional expressions, IIFEs and more.
74648
+ if (contextualTypeHasPattern) {
74649
+ var rootPatternParent_1 = ts.findAncestor(contextualType.pattern.parent, function (n) {
74650
+ return n.kind === 254 /* VariableDeclaration */ ||
74651
+ n.kind === 221 /* BinaryExpression */ ||
74652
+ n.kind === 164 /* Parameter */;
74653
+ });
74654
+ var spreadOrOutsideRootObject = ts.findAncestor(node, function (n) {
74655
+ return n === rootPatternParent_1 ||
74656
+ n.kind === 298 /* SpreadAssignment */;
74657
+ });
74658
+ if (spreadOrOutsideRootObject.kind !== 298 /* SpreadAssignment */) {
74659
+ for (var _d = 0, _e = getPropertiesOfType(contextualType); _d < _e.length; _d++) {
74660
+ var prop = _e[_d];
74661
+ if (!propertiesTable.get(prop.escapedName) && !getPropertyOfType(spread, prop.escapedName)) {
74662
+ if (!(prop.flags & 16777216 /* Optional */)) {
74663
+ error(prop.valueDeclaration || prop.bindingElement, ts.Diagnostics.Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value);
74664
+ }
74665
+ propertiesTable.set(prop.escapedName, prop);
74666
+ propertiesArray.push(prop);
74667
+ }
74654
74668
  }
74655
74669
  }
74656
74670
  }
@@ -294,7 +294,7 @@ var ts;
294
294
  // The following is baselined as a literal template type without intervention
295
295
  /** The version of the TypeScript compiler release */
296
296
  // eslint-disable-next-line @typescript-eslint/no-inferrable-types
297
- ts.version = ts.versionMajorMinor + ".0-dev.20220808";
297
+ ts.version = ts.versionMajorMinor + ".0-dev.20220809";
298
298
  /* @internal */
299
299
  var Comparison;
300
300
  (function (Comparison) {
@@ -74641,16 +74641,30 @@ var ts;
74641
74641
  // If object literal is contextually typed by the implied type of a binding pattern, augment the result
74642
74642
  // type with those properties for which the binding pattern specifies a default value.
74643
74643
  // If the object literal is spread into another object literal, skip this step and let the top-level object
74644
- // literal handle it instead.
74645
- if (contextualTypeHasPattern && node.parent.kind !== 298 /* SpreadAssignment */) {
74646
- for (var _d = 0, _e = getPropertiesOfType(contextualType); _d < _e.length; _d++) {
74647
- var prop = _e[_d];
74648
- if (!propertiesTable.get(prop.escapedName) && !getPropertyOfType(spread, prop.escapedName)) {
74649
- if (!(prop.flags & 16777216 /* Optional */)) {
74650
- error(prop.valueDeclaration || prop.bindingElement, ts.Diagnostics.Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value);
74651
- }
74652
- propertiesTable.set(prop.escapedName, prop);
74653
- propertiesArray.push(prop);
74644
+ // literal handle it instead. Note that this might require full traversal to the root pattern's parent
74645
+ // as it's the guaranteed to be the common ancestor of the pattern node and the current object node.
74646
+ // It's not possible to check if the immediate parent node is a spread assignment
74647
+ // since the type flows in non-obvious ways through conditional expressions, IIFEs and more.
74648
+ if (contextualTypeHasPattern) {
74649
+ var rootPatternParent_1 = ts.findAncestor(contextualType.pattern.parent, function (n) {
74650
+ return n.kind === 254 /* VariableDeclaration */ ||
74651
+ n.kind === 221 /* BinaryExpression */ ||
74652
+ n.kind === 164 /* Parameter */;
74653
+ });
74654
+ var spreadOrOutsideRootObject = ts.findAncestor(node, function (n) {
74655
+ return n === rootPatternParent_1 ||
74656
+ n.kind === 298 /* SpreadAssignment */;
74657
+ });
74658
+ if (spreadOrOutsideRootObject.kind !== 298 /* SpreadAssignment */) {
74659
+ for (var _d = 0, _e = getPropertiesOfType(contextualType); _d < _e.length; _d++) {
74660
+ var prop = _e[_d];
74661
+ if (!propertiesTable.get(prop.escapedName) && !getPropertyOfType(spread, prop.escapedName)) {
74662
+ if (!(prop.flags & 16777216 /* Optional */)) {
74663
+ error(prop.valueDeclaration || prop.bindingElement, ts.Diagnostics.Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value);
74664
+ }
74665
+ propertiesTable.set(prop.escapedName, prop);
74666
+ propertiesArray.push(prop);
74667
+ }
74654
74668
  }
74655
74669
  }
74656
74670
  }
@@ -89,7 +89,7 @@ var ts;
89
89
  // The following is baselined as a literal template type without intervention
90
90
  /** The version of the TypeScript compiler release */
91
91
  // eslint-disable-next-line @typescript-eslint/no-inferrable-types
92
- ts.version = ts.versionMajorMinor + ".0-dev.20220808";
92
+ ts.version = ts.versionMajorMinor + ".0-dev.20220809";
93
93
  /* @internal */
94
94
  var Comparison;
95
95
  (function (Comparison) {
@@ -74436,16 +74436,30 @@ var ts;
74436
74436
  // If object literal is contextually typed by the implied type of a binding pattern, augment the result
74437
74437
  // type with those properties for which the binding pattern specifies a default value.
74438
74438
  // If the object literal is spread into another object literal, skip this step and let the top-level object
74439
- // literal handle it instead.
74440
- if (contextualTypeHasPattern && node.parent.kind !== 298 /* SpreadAssignment */) {
74441
- for (var _d = 0, _e = getPropertiesOfType(contextualType); _d < _e.length; _d++) {
74442
- var prop = _e[_d];
74443
- if (!propertiesTable.get(prop.escapedName) && !getPropertyOfType(spread, prop.escapedName)) {
74444
- if (!(prop.flags & 16777216 /* Optional */)) {
74445
- error(prop.valueDeclaration || prop.bindingElement, ts.Diagnostics.Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value);
74446
- }
74447
- propertiesTable.set(prop.escapedName, prop);
74448
- propertiesArray.push(prop);
74439
+ // literal handle it instead. Note that this might require full traversal to the root pattern's parent
74440
+ // as it's the guaranteed to be the common ancestor of the pattern node and the current object node.
74441
+ // It's not possible to check if the immediate parent node is a spread assignment
74442
+ // since the type flows in non-obvious ways through conditional expressions, IIFEs and more.
74443
+ if (contextualTypeHasPattern) {
74444
+ var rootPatternParent_1 = ts.findAncestor(contextualType.pattern.parent, function (n) {
74445
+ return n.kind === 254 /* VariableDeclaration */ ||
74446
+ n.kind === 221 /* BinaryExpression */ ||
74447
+ n.kind === 164 /* Parameter */;
74448
+ });
74449
+ var spreadOrOutsideRootObject = ts.findAncestor(node, function (n) {
74450
+ return n === rootPatternParent_1 ||
74451
+ n.kind === 298 /* SpreadAssignment */;
74452
+ });
74453
+ if (spreadOrOutsideRootObject.kind !== 298 /* SpreadAssignment */) {
74454
+ for (var _d = 0, _e = getPropertiesOfType(contextualType); _d < _e.length; _d++) {
74455
+ var prop = _e[_d];
74456
+ if (!propertiesTable.get(prop.escapedName) && !getPropertyOfType(spread, prop.escapedName)) {
74457
+ if (!(prop.flags & 16777216 /* Optional */)) {
74458
+ error(prop.valueDeclaration || prop.bindingElement, ts.Diagnostics.Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value);
74459
+ }
74460
+ propertiesTable.set(prop.escapedName, prop);
74461
+ propertiesArray.push(prop);
74462
+ }
74449
74463
  }
74450
74464
  }
74451
74465
  }
@@ -919,7 +919,7 @@
919
919
  "Method_not_implemented_95158": "方法未实现。",
920
920
  "Modifiers_cannot_appear_here_1184": "修饰符不能出现在此处。",
921
921
  "Module_0_can_only_be_default_imported_using_the_1_flag_1259": "模块 \"{0}\" 只能在使用 \"{1}\" 标志时进行默认导入",
922
- "Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_c_1471": "无法使用此构造导入模块 '{0}'。说明符仅解析为无法同步导入的 ES 模块。请改用动态导入。",
922
+ "Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_c_1471": "无法使用此构造导入模块“{0}”。说明符仅解析为 ES 模块,后者不能使用“require”进行导入。请改用 ECMAScript 导入。",
923
923
  "Module_0_declares_1_locally_but_it_is_exported_as_2_2460": "模块 \"{0}\" 在本地声明 \"{1}\",但它被导出为 \"{2}\"。",
924
924
  "Module_0_declares_1_locally_but_it_is_not_exported_2459": "模块 \"{0}\" 在本地声明 \"{1}\",但未导出它。",
925
925
  "Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0_1340": "模块 \"{0}\" 不引用类型,但在此处用作类型。你是想使用 \"typeof import('{0}')\" 吗?",
@@ -1385,6 +1385,7 @@
1385
1385
  "The_containing_arrow_function_captures_the_global_value_of_this_7041": "包含箭头函数捕获 \"this\" 的全局值。",
1386
1386
  "The_containing_function_or_module_body_is_too_large_for_control_flow_analysis_2563": "包含函数或模块体对于控制流分析而言太大。",
1387
1387
  "The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level_1309": "当前文件是 CommonJS 模块,因此不能在顶级使用 “await”。",
1388
+ "The_current_file_is_a_CommonJS_module_whose_imports_will_produce_require_calls_however_the_reference_1479": "当前文件是 CommonJS 模块,其导入将生成“require”调用;但是,引用的文件是 ECMAScript 模块,它不能使用“require”进行导入。请考虑改为编写动态“import(\"{0}\")”调用。",
1388
1389
  "The_current_host_does_not_support_the_0_option_5001": "当前主机不支持“{0}”选项。",
1389
1390
  "The_declaration_of_0_that_you_probably_intended_to_use_is_defined_here_18018": "你可能打算使用的 \"{0}\" 的声明在此处定义",
1390
1391
  "The_declaration_was_marked_as_deprecated_here_2798": "该声明曾在此处标记为已弃用。",
@@ -1504,6 +1505,10 @@
1504
1505
  "This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_o_2807": "此语法需要一个名为 \"{1}\" 且包含 {2} 参数的导入帮助程序,该帮助程序与 \"{0}\" 中的相应帮助程序不兼容。请考虑升级 \"{0}\" 的版本。",
1505
1506
  "This_type_parameter_might_need_an_extends_0_constraint_2208": "此类型参数可能需要 `extends {0}` 约束。",
1506
1507
  "This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot__1326": "“import” 的这种用法无效。可以写入 “import()” 调用,但它们必须具有括号,并且不能带有类型参数。",
1508
+ "To_convert_this_file_to_an_ECMAScript_module_add_the_field_type_Colon_module_to_0_1482": "若要将此文件转换为 ECMAScript 模块,请将字段“\"type\": \"module\"”添加到“{0}”。",
1509
+ "To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_add_the_field_type_Co_1481": "若要将此文件转换为 ECMAScript 模块,请将其文件扩展名更改为“{0}”,或将字段“\"type\": \"module\"”添加到“{1}”。",
1510
+ "To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_create_a_local_packag_1480": "若要将此文件转换为 ECMAScript 模块,请将其文件扩展名更改为“{0}”,或者使用“{ \"type\": \"module\" }”创建本地 package.json 文件。",
1511
+ "To_convert_this_file_to_an_ECMAScript_module_create_a_local_package_json_file_with_type_Colon_module_1483": "若要将此文件转换为 ECMAScript 模块,请使用“{ \"type\": \"module\" }”创建本地 package.json 文件。",
1507
1512
  "Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_n_1378": "仅当 “module” 选项设置为 “es2022”、“esnext”、“system”、“node16” 或 “nodenext”,且 “target” 选项设置为 “es2017” 或更高版本时,才允许使用顶级 “await” 表达式。",
1508
1513
  "Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier_1046": ".d.ts 文件中的顶级声明必须以 \"declare\" 或 \"export\" 修饰符开头。",
1509
1514
  "Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_nod_1432": "仅当 “module” 选项设置为 “es2022”、“esnext”、“system”、“node16” 或 “nodenext”,且 “target” 选项设置为 “es2017” 或更高版本时,才允许使用顶级 “for await” 循环。",
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "typescript",
3
3
  "author": "Microsoft Corp.",
4
4
  "homepage": "https://www.typescriptlang.org/",
5
- "version": "4.8.0-dev.20220808",
5
+ "version": "4.8.0-dev.20220809",
6
6
  "license": "Apache-2.0",
7
7
  "description": "TypeScript is a language for application scale JavaScript development",
8
8
  "keywords": [