typescript 4.5.0-dev.20211002 → 4.5.0-dev.20211006
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 +4 -4
- package/lib/fr/diagnosticMessages.generated.json +4 -4
- package/lib/ru/diagnosticMessages.generated.json +4 -4
- package/lib/tr/diagnosticMessages.generated.json +4 -4
- package/lib/tsc.js +34 -15
- package/lib/tsserver.js +35 -16
- package/lib/tsserverlibrary.js +35 -16
- package/lib/typescript.js +35 -16
- package/lib/typescriptServices.js +35 -16
- package/lib/typingsInstaller.js +34 -16
- package/package.json +1 -1
|
@@ -561,7 +561,7 @@
|
|
|
561
561
|
"Duplicate_property_0_2718": "Duplicitní vlastnost {0}.",
|
|
562
562
|
"Dynamic_import_cannot_have_type_arguments_1326": "Dynamický import nemůže mít argumenty typu.",
|
|
563
563
|
"Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0_7036": "Specifikátor dynamického importu musí být typu string, ale tady má typ {0}.",
|
|
564
|
-
"
|
|
564
|
+
"Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd__1323": "Dynamické importy se podporují jen v případě, že příznak --module je nastavený na es2020, es2022, esnext, commonjs, amd, system, umd, node12 nebo nodenext.",
|
|
565
565
|
"Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_assertion_as_arguments_1450": "Dynamické importy můžou jako argumenty přijímat jenom specifikátor modulu a volitelný kontrolní výraz.",
|
|
566
566
|
"Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_1324": "Dynamické importy podporují pouze druhý argument, pokud je možnost --module nastavena na hodnotu esnext.",
|
|
567
567
|
"Each_member_of_the_union_type_0_has_construct_signatures_but_none_of_those_signatures_are_compatible_2762": "Každý člen typu sjednocení {0} má signatury konstruktu, ale žádná z těchto signatur není kompatibilní s jinou signaturou.",
|
|
@@ -1360,7 +1360,7 @@
|
|
|
1360
1360
|
"The_global_type_JSX_0_may_not_have_more_than_one_property_2608": "Globální typ JSX.{0} by neměl mít více než jednu vlastnost.",
|
|
1361
1361
|
"The_implementation_signature_is_declared_here_2750": "Signatura implementace se deklarovala tady.",
|
|
1362
1362
|
"The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output_1470": "Meta-vlastnost import.meta není povolena v souborech, které se sestaví do výstupu CommonJS.",
|
|
1363
|
-
"
|
|
1363
|
+
"The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system__1343": "Metavlastnost import.meta se povoluje jen v případě, že možnost --module je nastavená na es2020, es2022, esnext, system, node12 nebo nodenext.",
|
|
1364
1364
|
"The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_a_2742": "Odvozený typ {0} se nedá pojmenovat bez odkazu na {1}. Pravděpodobně to nebude přenosné. Vyžaduje se anotace typu.",
|
|
1365
1365
|
"The_inferred_type_of_0_references_a_type_with_a_cyclic_structure_which_cannot_be_trivially_serialize_5088": "Odvozený typ {0} se odkazuje na typ s cyklickou strukturou, která se nedá triviálně serializovat. Musí se použít anotace typu.",
|
|
1366
1366
|
"The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary_2527": "Odvozený typ {0} odkazuje na nepřístupný typ {1}. Musí se použít anotace typu.",
|
|
@@ -1459,9 +1459,9 @@
|
|
|
1459
1459
|
"This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found_2354": "Tato syntaxe vyžaduje importovanou podpůrnou aplikaci, ale modul {0} se nenašel.",
|
|
1460
1460
|
"This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_ve_2343": "Tato syntaxe vyžaduje importovanou pomocnou rutinu s názvem {1}, která v {0} neexistuje. Zvažte možnost upgradovat verzi {0}.",
|
|
1461
1461
|
"This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_o_2807": "Tato syntaxe vyžaduje importovanou pomocnou rutinu s názvem {1} a parametry {2}, která není kompatibilní s tou v {0}. Zvažte upgrade verze {0}.",
|
|
1462
|
-
"
|
|
1462
|
+
"Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_o_1378": "Výrazy await nejvyšší úrovně se povolují jen v případě, že možnost module je nastavená na es2022, esnext, system nebo nodenext a možnost target je nastavená na es2017 nebo vyšší.",
|
|
1463
1463
|
"Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier_1046": "Deklarace nejvyšší úrovně v souborech .d.ts musí začínat modifikátorem declare, nebo export.",
|
|
1464
|
-
"
|
|
1464
|
+
"Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_or__1432": "Smyčky for await nejvyšší úrovně se povolují jen v případě, že možnost module je nastavená na es2022, esnext, system nebo nodenext a možnost target je nastavená na es2017 nebo vyšší.",
|
|
1465
1465
|
"Trailing_comma_not_allowed_1009": "Čárka na konci není povolená.",
|
|
1466
1466
|
"Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule_6153": "Transpiluje každý soubor jako samostatný modul (podobné jako ts.transpileModule).",
|
|
1467
1467
|
"Try_npm_i_save_dev_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare__7035": "Vyzkoušejte deklaraci npm i --save-dev @types/{1}, pokud existuje, nebo přidejte nový soubor deklarací (.d.ts) s deklarací declare module '{0}';.",
|
|
@@ -561,7 +561,7 @@
|
|
|
561
561
|
"Duplicate_property_0_2718": "Propriété dupliquée '{0}'.",
|
|
562
562
|
"Dynamic_import_cannot_have_type_arguments_1326": "L'importation dynamique ne peut pas avoir d'arguments de type.",
|
|
563
563
|
"Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0_7036": "Le spécificateur de l'importation dynamique doit être de type 'string', mais ici il est de type '{0}'.",
|
|
564
|
-
"
|
|
564
|
+
"Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd__1323": "Les importations dynamiques sont prises en charge uniquement lorsque l’indicateur « --module » est défini sur « es2020 », « es2022 », « esnext », « commonjs », « amd », « system », « umd », « node12 » ou « nodenext ».",
|
|
565
565
|
"Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_assertion_as_arguments_1450": "Les importations dynamiques peuvent accepter uniquement un spécificateur de module et une assertion facultative en tant qu’arguments.",
|
|
566
566
|
"Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_1324": "Les importations dynamiques prennent uniquement en charge un deuxième argument lorsque l’option « --module » a la valeur « esnext ».",
|
|
567
567
|
"Each_member_of_the_union_type_0_has_construct_signatures_but_none_of_those_signatures_are_compatible_2762": "Chaque membre du type union '{0}' a des signatures de construction, mais aucune de ces signatures n'est compatible avec les autres.",
|
|
@@ -1360,7 +1360,7 @@
|
|
|
1360
1360
|
"The_global_type_JSX_0_may_not_have_more_than_one_property_2608": "Le type global 'JSX.{0}' ne peut pas avoir plusieurs propriétés.",
|
|
1361
1361
|
"The_implementation_signature_is_declared_here_2750": "La signature d'implémentation est déclarée ici.",
|
|
1362
1362
|
"The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output_1470": "La métapropriété « import.meta » n’est pas autorisée dans les fichiers qui seront intégrés dans la sortie CommonJS.",
|
|
1363
|
-
"
|
|
1363
|
+
"The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system__1343": "La méta-propriété « import.meta » est autorisée uniquement lorsque l’option « --module » est « es2020 », « es2022 », « esnext », « system », « node12 » ou « nodenext ».",
|
|
1364
1364
|
"The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_a_2742": "Le type déduit de '{0}' ne peut pas être nommé sans référence à '{1}'. Cela n'est probablement pas portable. Une annotation de type est nécessaire.",
|
|
1365
1365
|
"The_inferred_type_of_0_references_a_type_with_a_cyclic_structure_which_cannot_be_trivially_serialize_5088": "Le type déduit de '{0}' référence un type avec une structure cyclique qui ne peut pas être sérialisée de manière triviale. Une annotation de type est nécessaire.",
|
|
1366
1366
|
"The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary_2527": "Le type déduit de '{0}' référence un type '{1}' inaccessible. Une annotation de type est nécessaire.",
|
|
@@ -1459,9 +1459,9 @@
|
|
|
1459
1459
|
"This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found_2354": "Cette syntaxe nécessite une application d'assistance importée, mais le module '{0}' est introuvable.",
|
|
1460
1460
|
"This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_ve_2343": "Cette syntaxe nécessite une assistance importée nommée '{1}' mais qui n'existe pas dans '{0}'. Effectuez une mise à niveau de votre version de '{0}'.",
|
|
1461
1461
|
"This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_o_2807": "Cette syntaxe nécessite un composant d'assistance importé nommé '{1}' avec {2} paramètres, ce qui n'est pas compatible avec celui qui se trouve dans '{0}'. Effectuez une mise à niveau de votre version de '{0}'.",
|
|
1462
|
-
"
|
|
1462
|
+
"Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_o_1378": "Les expressions « await » de niveau supérieur sont autorisées uniquement lorsque l’option « module » a la valeur « es2022 », « esnext », « system » ou « nodenext », et que l’option « target » a la valeur « es2017 » ou une valeur supérieure.",
|
|
1463
1463
|
"Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier_1046": "Les déclarations de niveau supérieur dans les fichiers .d.ts doivent commencer par un modificateur 'declare' ou 'export'.",
|
|
1464
|
-
"
|
|
1464
|
+
"Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_or__1432": "Les boucles « for await » de niveau supérieur sont autorisées uniquement lorsque l’option « module » a la valeur « es2022 », « esnext », « system » ou « nodenext », et que l’option « target » est définie sur « es2017 » ou une version ultérieure.",
|
|
1465
1465
|
"Trailing_comma_not_allowed_1009": "Virgule de fin non autorisée.",
|
|
1466
1466
|
"Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule_6153": "Transpilez chaque fichier sous forme de module distinct (semblable à 'ts.transpileModule').",
|
|
1467
1467
|
"Try_npm_i_save_dev_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare__7035": "Essayez 'npm i --save-dev @types/{1}' s'il existe, ou ajoutez un nouveau fichier de déclaration (.d.ts) contenant 'declare module '{0}';'",
|
|
@@ -561,7 +561,7 @@
|
|
|
561
561
|
"Duplicate_property_0_2718": "Повторяющееся свойство \"{0}\".",
|
|
562
562
|
"Dynamic_import_cannot_have_type_arguments_1326": "При динамическом импорте не могут использоваться аргументы типов.",
|
|
563
563
|
"Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0_7036": "Описатель динамического импорта должен иметь тип \"string\", но имеет тип \"{0}\".",
|
|
564
|
-
"
|
|
564
|
+
"Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd__1323": "Динамический импорт поддерживаются только в том случае, если флагу \"--module\" присвоено значение \"es2020\", \"es2022\", \"esnext\", \"commonjs\", \"amd\", \"system\", \"umd\", \"node12\" или \"nodenext\".",
|
|
565
565
|
"Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_assertion_as_arguments_1450": "Динамические импорты могут принять спецификатор модуля и необязательное утверждение в качестве аргументов",
|
|
566
566
|
"Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_1324": "Динамические импорты поддерживают второй аргумент, только если параметр \"--module\" имеет значение \"esnext\".",
|
|
567
567
|
"Each_member_of_the_union_type_0_has_construct_signatures_but_none_of_those_signatures_are_compatible_2762": "Каждый член типа объединения \"{0}\" имеет сигнатуры конструкций, но ни одна из их не совместима с другими.",
|
|
@@ -1360,7 +1360,7 @@
|
|
|
1360
1360
|
"The_global_type_JSX_0_may_not_have_more_than_one_property_2608": "Глобальный тип \"JSX.{0}\" не может иметь больше одного свойства.",
|
|
1361
1361
|
"The_implementation_signature_is_declared_here_2750": "Здесь объявлена сигнатура реализации.",
|
|
1362
1362
|
"The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output_1470": "Метасвойство \"import.meta\" не разрешено в файлах, которые будут построены в выходных данных CommonJS.",
|
|
1363
|
-
"
|
|
1363
|
+
"The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system__1343": "Метасвойство \"import.meta\" допускается, только если параметру \"--module\" присвоено значение \"es2020\", \"es2022\", \"esnext\", \"system\", \"node12\" или \"nodenext\".",
|
|
1364
1364
|
"The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_a_2742": "Выводимому типу \"{0}\" невозможно присвоить имя без ссылки на \"{1}\". Вероятно, оно не является переносимым. Требуется заметка с типом.",
|
|
1365
1365
|
"The_inferred_type_of_0_references_a_type_with_a_cyclic_structure_which_cannot_be_trivially_serialize_5088": "Выводимый тип \"{0}\" ссылается на тип с циклической структурой, которая не может быть элементарно сериализована. Требуется заметка с типом.",
|
|
1366
1366
|
"The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary_2527": "Выведенный тип \"{0}\" ссылается на недоступный тип \"{1}\". Требуется аннотация типа.",
|
|
@@ -1459,9 +1459,9 @@
|
|
|
1459
1459
|
"This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found_2354": "Для этого синтаксиса требуется импортированный вспомогательный объект, но найти модуль \"{0}\" не удается.",
|
|
1460
1460
|
"This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_ve_2343": "Для этого синтаксиса требуется импортированный вспомогательный объект с именем \"{1}\", который не существует в \"{0}\". Рекомендуется обновить версию \"{0}\".",
|
|
1461
1461
|
"This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_o_2807": "Для этого синтаксиса требуется импортированный вспомогательный объект с именем \"{1}\" и параметрами ({2}), который не совместим с объектом в \"{0}\". Попробуйте обновить версию \"{0}\".",
|
|
1462
|
-
"
|
|
1462
|
+
"Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_o_1378": "Выражения \"await\" верхнего уровня допускаются, только если параметру \"module\" присвоено значение \"es2022\", \"esnext\", \"system\" или \"nodenext\", а параметру \"target\" присвоено значение \"es2017\" или выше.",
|
|
1463
1463
|
"Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier_1046": "Объявления верхнего уровня в файлах .d.ts должны начинаться с модификатора \"declare\" или \"export\".",
|
|
1464
|
-
"
|
|
1464
|
+
"Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_or__1432": "Циклы \"for await\" верхнего уровня допускаются, только если параметру \"module\" присвоено значение \"es2022\", \"esnext\", \"system\" или \"nodenext\", а параметру \"target\" присвоено значение \"es2017\" или выше.",
|
|
1465
1465
|
"Trailing_comma_not_allowed_1009": "Завершающая запятая запрещена.",
|
|
1466
1466
|
"Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule_6153": "Транскомпиляция каждого файла как отдельного модуля (аналогично ts.transpileModule).",
|
|
1467
1467
|
"Try_npm_i_save_dev_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare__7035": "Попробуйте использовать команду \"npm i --save-dev @types/{1}\", если он существует, или добавьте новый файл объявления (.d.ts), содержащий \"declare module '{0}';\".",
|
|
@@ -561,7 +561,7 @@
|
|
|
561
561
|
"Duplicate_property_0_2718": "'{0}' özelliğini yineleyin.",
|
|
562
562
|
"Dynamic_import_cannot_have_type_arguments_1326": "Dinamik içeri aktarma, tür bağımsız değişkenleri içeremez.",
|
|
563
563
|
"Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0_7036": "Dinamik içeri aktarmanın tanımlayıcısı 'string' türünde olmalıdır, ancak buradaki tür: '{0}'.",
|
|
564
|
-
"
|
|
564
|
+
"Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd__1323": "Dinamik içeri aktarmalar yalnızca '--module' bayrağı 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node12' veya 'nodenext' olarak ayarlandığında desteklenir.",
|
|
565
565
|
"Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_assertion_as_arguments_1450": "Dinamik içeri aktarmalar, bağımsız değişken olarak yalnızca bir modül tanımlayıcısı ve isteğe bağlı bir onay kabul edebilir",
|
|
566
566
|
"Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_1324": "Dinamik içeri aktarmalar yalnızca '--module' seçeneği 'esnext' olarak ayarlandığında ikinci bir bağımsız değişkeni destekler.",
|
|
567
567
|
"Each_member_of_the_union_type_0_has_construct_signatures_but_none_of_those_signatures_are_compatible_2762": "'{0}' birleşim türünün her bir üyesi yapı imzalarına sahip ancak bu imzaların hiçbiri birbiriyle uyumlu değil.",
|
|
@@ -1360,7 +1360,7 @@
|
|
|
1360
1360
|
"The_global_type_JSX_0_may_not_have_more_than_one_property_2608": "'JSX.{0}' genel türü birden fazla özelliğe sahip olamaz.",
|
|
1361
1361
|
"The_implementation_signature_is_declared_here_2750": "Uygulama imzası burada bildirilir.",
|
|
1362
1362
|
"The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output_1470": "CommonJS çıkışında oluşturulacak dosyalarda 'import.meta' meta özelliğine izin verilmiyor.",
|
|
1363
|
-
"
|
|
1363
|
+
"The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system__1343": "'import.meta' meta özelliğine yalnızca '--module' seçeneği 'es2020', 'es2022', 'esnext', 'system', 'node12' veya 'nodenext' olduğunda izin verilir.",
|
|
1364
1364
|
"The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_a_2742": "'{0}' öğesinin çıkarsanan türü, '{1}' başvurusu olmadan adlandırılamaz. Bu büyük olasılıkla taşınabilir değildir. Tür ek açıklaması gereklidir.",
|
|
1365
1365
|
"The_inferred_type_of_0_references_a_type_with_a_cyclic_structure_which_cannot_be_trivially_serialize_5088": "Çıkarsanan '{0}' türü, önemsiz olarak seri hale getirilemeyen döngüsel yapıya sahip bir türe başvurur. Tür ek açıklaması gerekir.",
|
|
1366
1366
|
"The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary_2527": "Çıkarsanan '{0}' türü, erişilemeyen bir '{1}' türüne başvuruyor. Tür ek açıklaması gereklidir.",
|
|
@@ -1459,9 +1459,9 @@
|
|
|
1459
1459
|
"This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found_2354": "Bu söz dizimi, içeri aktarılan bir yardımcı gerektiriyor ancak '{0}' modülü bulunamıyor.",
|
|
1460
1460
|
"This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_ve_2343": "Bu söz dizimi, '{0}' içinde bulunmayan '{1}' adlı içeri aktarılmış bir yardımcı gerektirir. '{0}' sürümünüzü yükseltmeyi deneyin.",
|
|
1461
1461
|
"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.",
|
|
1462
|
-
"
|
|
1462
|
+
"Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_o_1378": "Üst düzey 'await' ifadelerine yalnızca 'module' seçeneği 'es2022', 'esnext', 'system' veya 'nodenext' olarak ayarlandığında ve 'target' seçeneği 'es2017' veya üzeri olarak ayarlandığında izin verilir.",
|
|
1463
1463
|
"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.",
|
|
1464
|
-
"
|
|
1464
|
+
"Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_or__1432": "Üst düzey 'for await' döngülerine yalnızca 'module' seçeneği 'es2022', 'esnext', 'system' veya 'nodenext' olarak ayarlandığında ve 'target' seçeneği 'es2017' veya üzeri olarak ayarlandığında izin verilir.",
|
|
1465
1465
|
"Trailing_comma_not_allowed_1009": "Sona eklenen virgüle izin verilmez.",
|
|
1466
1466
|
"Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule_6153": "Her dosyayı ayrı bir modül olarak derleyin ('ts.transpileModule' gibi).",
|
|
1467
1467
|
"Try_npm_i_save_dev_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare__7035": "Varsa `npm i --save-dev @types/{1}` deneyin veya `declare module '{0}';` deyimini içeren yeni bir bildirim (.d.ts) dosyası ekleyin",
|
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.20211006";
|
|
73
73
|
var NativeCollections;
|
|
74
74
|
(function (NativeCollections) {
|
|
75
75
|
function tryGetNativeMap() {
|
|
@@ -5900,6 +5900,7 @@ var ts;
|
|
|
5900
5900
|
Type_0_is_not_assignable_to_type_1_Did_you_mean_2: diag(2820, ts.DiagnosticCategory.Error, "Type_0_is_not_assignable_to_type_1_Did_you_mean_2_2820", "Type '{0}' is not assignable to type '{1}'. Did you mean '{2}'?"),
|
|
5901
5901
|
Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext: diag(2821, ts.DiagnosticCategory.Error, "Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_2821", "Import assertions are only supported when the '--module' option is set to 'esnext'."),
|
|
5902
5902
|
Import_assertions_cannot_be_used_with_type_only_imports_or_exports: diag(2822, ts.DiagnosticCategory.Error, "Import_assertions_cannot_be_used_with_type_only_imports_or_exports_2822", "Import assertions cannot be used with type-only imports or exports."),
|
|
5903
|
+
Cannot_find_namespace_0_Did_you_mean_1: diag(2833, ts.DiagnosticCategory.Error, "Cannot_find_namespace_0_Did_you_mean_1_2833", "Cannot find namespace '{0}'. Did you mean '{1}'?"),
|
|
5903
5904
|
Import_declaration_0_is_using_private_name_1: diag(4000, ts.DiagnosticCategory.Error, "Import_declaration_0_is_using_private_name_1_4000", "Import declaration '{0}' is using private name '{1}'."),
|
|
5904
5905
|
Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: diag(4002, ts.DiagnosticCategory.Error, "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", "Type parameter '{0}' of exported class has or is using private name '{1}'."),
|
|
5905
5906
|
Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: diag(4004, ts.DiagnosticCategory.Error, "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", "Type parameter '{0}' of exported interface has or is using private name '{1}'."),
|
|
@@ -34699,11 +34700,15 @@ var ts;
|
|
|
34699
34700
|
if (!scope || !scope.packageJsonContent.exports) {
|
|
34700
34701
|
return undefined;
|
|
34701
34702
|
}
|
|
34703
|
+
if (typeof scope.packageJsonContent.name !== "string") {
|
|
34704
|
+
return undefined;
|
|
34705
|
+
}
|
|
34702
34706
|
var parts = ts.getPathComponents(moduleName);
|
|
34703
|
-
|
|
34707
|
+
var nameParts = ts.getPathComponents(scope.packageJsonContent.name);
|
|
34708
|
+
if (!ts.every(nameParts, function (p, i) { return parts[i] === p; })) {
|
|
34704
34709
|
return undefined;
|
|
34705
34710
|
}
|
|
34706
|
-
var trailingParts = parts.slice(
|
|
34711
|
+
var trailingParts = parts.slice(nameParts.length);
|
|
34707
34712
|
return loadModuleFromExports(scope, extensions, !ts.length(trailingParts) ? "." : "." + ts.directorySeparator + trailingParts.join(ts.directorySeparator), state, cache, redirectedReference);
|
|
34708
34713
|
}
|
|
34709
34714
|
function loadModuleFromExports(scope, extensions, subpath, state, cache, redirectedReference) {
|
|
@@ -39343,11 +39348,11 @@ var ts;
|
|
|
39343
39348
|
}
|
|
39344
39349
|
}
|
|
39345
39350
|
}
|
|
39346
|
-
function resolveName(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals
|
|
39351
|
+
function resolveName(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals) {
|
|
39347
39352
|
if (excludeGlobals === void 0) { excludeGlobals = false; }
|
|
39348
|
-
return resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, getSymbol
|
|
39353
|
+
return resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, getSymbol);
|
|
39349
39354
|
}
|
|
39350
|
-
function resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, lookup
|
|
39355
|
+
function resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, lookup) {
|
|
39351
39356
|
var _a, _b, _c;
|
|
39352
39357
|
var originalLocation = location;
|
|
39353
39358
|
var result;
|
|
@@ -39592,7 +39597,7 @@ var ts;
|
|
|
39592
39597
|
!checkAndReportErrorForUsingNamespaceModuleAsValue(errorLocation, name, meaning) &&
|
|
39593
39598
|
!checkAndReportErrorForUsingValueAsType(errorLocation, name, meaning)) {
|
|
39594
39599
|
var suggestion = void 0;
|
|
39595
|
-
if (
|
|
39600
|
+
if (suggestionCount < maximumSuggestionCount) {
|
|
39596
39601
|
suggestion = getSuggestedSymbolForNonexistentSymbol(originalLocation, name, meaning);
|
|
39597
39602
|
var isGlobalScopeAugmentationDeclaration = (suggestion === null || suggestion === void 0 ? void 0 : suggestion.valueDeclaration) && ts.isAmbientModule(suggestion.valueDeclaration) && ts.isGlobalScopeAugmentation(suggestion.valueDeclaration);
|
|
39598
39603
|
if (isGlobalScopeAugmentationDeclaration) {
|
|
@@ -39601,7 +39606,9 @@ var ts;
|
|
|
39601
39606
|
if (suggestion) {
|
|
39602
39607
|
var suggestionName = symbolToString(suggestion);
|
|
39603
39608
|
var isUncheckedJS = isUncheckedJSSuggestion(originalLocation, suggestion, false);
|
|
39604
|
-
var message =
|
|
39609
|
+
var message = meaning === 1920 || nameArg && typeof nameArg !== "string" && ts.nodeIsSynthesized(nameArg) ? ts.Diagnostics.Cannot_find_namespace_0_Did_you_mean_1
|
|
39610
|
+
: isUncheckedJS ? ts.Diagnostics.Could_not_find_name_0_Did_you_mean_1
|
|
39611
|
+
: ts.Diagnostics.Cannot_find_name_0_Did_you_mean_1;
|
|
39605
39612
|
var diagnostic = createError(errorLocation, message, diagnosticName(nameArg), suggestionName);
|
|
39606
39613
|
addErrorOrSuggestion(!isUncheckedJS, diagnostic);
|
|
39607
39614
|
if (suggestion.valueDeclaration) {
|
|
@@ -40463,7 +40470,7 @@ var ts;
|
|
|
40463
40470
|
if (name.kind === 79) {
|
|
40464
40471
|
var message = meaning === namespaceMeaning || ts.nodeIsSynthesized(name) ? ts.Diagnostics.Cannot_find_namespace_0 : getCannotFindNameDiagnosticForName(ts.getFirstIdentifier(name));
|
|
40465
40472
|
var symbolFromJSPrototype = ts.isInJSFile(name) && !ts.nodeIsSynthesized(name) ? resolveEntityNameFromAssignmentDeclaration(name, meaning) : undefined;
|
|
40466
|
-
symbol = getMergedSymbol(resolveName(location || name, name.escapedText, meaning, ignoreErrors || symbolFromJSPrototype ? undefined : message, name, true));
|
|
40473
|
+
symbol = getMergedSymbol(resolveName(location || name, name.escapedText, meaning, ignoreErrors || symbolFromJSPrototype ? undefined : message, name, true, false));
|
|
40467
40474
|
if (!symbol) {
|
|
40468
40475
|
return getMergedSymbol(symbolFromJSPrototype);
|
|
40469
40476
|
}
|
|
@@ -55958,7 +55965,7 @@ var ts;
|
|
|
55958
55965
|
var links = getNodeLinks(node);
|
|
55959
55966
|
if (!links.resolvedSymbol) {
|
|
55960
55967
|
links.resolvedSymbol = !ts.nodeIsMissing(node) &&
|
|
55961
|
-
resolveName(node, node.escapedText, 111551 | 1048576, getCannotFindNameDiagnosticForName(node), node, !ts.isWriteOnlyAccess(node), false
|
|
55968
|
+
resolveName(node, node.escapedText, 111551 | 1048576, getCannotFindNameDiagnosticForName(node), node, !ts.isWriteOnlyAccess(node), false) || unknownSymbol;
|
|
55962
55969
|
}
|
|
55963
55970
|
return links.resolvedSymbol;
|
|
55964
55971
|
}
|
|
@@ -60728,7 +60735,19 @@ var ts;
|
|
|
60728
60735
|
var result = resolveNameHelper(location, outerName, meaning, undefined, outerName, false, false, function (symbols, name, meaning) {
|
|
60729
60736
|
ts.Debug.assertEqual(outerName, name, "name should equal outerName");
|
|
60730
60737
|
var symbol = getSymbol(symbols, name, meaning);
|
|
60731
|
-
|
|
60738
|
+
if (symbol)
|
|
60739
|
+
return symbol;
|
|
60740
|
+
var candidates;
|
|
60741
|
+
if (symbols === globals) {
|
|
60742
|
+
var primitives = ts.mapDefined(["string", "number", "boolean", "object", "bigint", "symbol"], function (s) { return symbols.has((s.charAt(0).toUpperCase() + s.slice(1)))
|
|
60743
|
+
? createSymbol(524288, s)
|
|
60744
|
+
: undefined; });
|
|
60745
|
+
candidates = primitives.concat(ts.arrayFrom(symbols.values()));
|
|
60746
|
+
}
|
|
60747
|
+
else {
|
|
60748
|
+
candidates = ts.arrayFrom(symbols.values());
|
|
60749
|
+
}
|
|
60750
|
+
return getSpellingSuggestionForName(ts.unescapeLeadingUnderscores(name), candidates, meaning);
|
|
60732
60751
|
});
|
|
60733
60752
|
return result;
|
|
60734
60753
|
}
|
|
@@ -100194,11 +100213,11 @@ var ts;
|
|
|
100194
100213
|
(_a = state.moduleResolutionCache) === null || _a === void 0 ? void 0 : _a.update(config.options);
|
|
100195
100214
|
(_b = state.typeReferenceDirectiveResolutionCache) === null || _b === void 0 ? void 0 : _b.update(config.options);
|
|
100196
100215
|
program = host.createProgram(config.fileNames, config.options, compilerHost, getOldProgram(state, projectPath, config), ts.getConfigFileParsingDiagnostics(config), config.projectReferences);
|
|
100197
|
-
state.lastCachedPackageJsonLookups.set(projectPath, state.moduleResolutionCache && ts.map(state.moduleResolutionCache.getPackageJsonInfoCache().entries(), function (_a) {
|
|
100198
|
-
var path = _a[0], data = _a[1];
|
|
100199
|
-
return [state.host.realpath ? toPath(state, state.host.realpath(path)) : path, data];
|
|
100200
|
-
}));
|
|
100201
100216
|
if (state.watch) {
|
|
100217
|
+
state.lastCachedPackageJsonLookups.set(projectPath, state.moduleResolutionCache && ts.map(state.moduleResolutionCache.getPackageJsonInfoCache().entries(), function (_a) {
|
|
100218
|
+
var path = _a[0], data = _a[1];
|
|
100219
|
+
return [state.host.realpath && data ? toPath(state, state.host.realpath(path)) : path, data];
|
|
100220
|
+
}));
|
|
100202
100221
|
state.builderPrograms.set(projectPath, program);
|
|
100203
100222
|
}
|
|
100204
100223
|
step++;
|
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.20211006";
|
|
104
104
|
/* @internal */
|
|
105
105
|
var Comparison;
|
|
106
106
|
(function (Comparison) {
|
|
@@ -8674,6 +8674,7 @@ var ts;
|
|
|
8674
8674
|
Type_0_is_not_assignable_to_type_1_Did_you_mean_2: diag(2820, ts.DiagnosticCategory.Error, "Type_0_is_not_assignable_to_type_1_Did_you_mean_2_2820", "Type '{0}' is not assignable to type '{1}'. Did you mean '{2}'?"),
|
|
8675
8675
|
Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext: diag(2821, ts.DiagnosticCategory.Error, "Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_2821", "Import assertions are only supported when the '--module' option is set to 'esnext'."),
|
|
8676
8676
|
Import_assertions_cannot_be_used_with_type_only_imports_or_exports: diag(2822, ts.DiagnosticCategory.Error, "Import_assertions_cannot_be_used_with_type_only_imports_or_exports_2822", "Import assertions cannot be used with type-only imports or exports."),
|
|
8677
|
+
Cannot_find_namespace_0_Did_you_mean_1: diag(2833, ts.DiagnosticCategory.Error, "Cannot_find_namespace_0_Did_you_mean_1_2833", "Cannot find namespace '{0}'. Did you mean '{1}'?"),
|
|
8677
8678
|
Import_declaration_0_is_using_private_name_1: diag(4000, ts.DiagnosticCategory.Error, "Import_declaration_0_is_using_private_name_1_4000", "Import declaration '{0}' is using private name '{1}'."),
|
|
8678
8679
|
Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: diag(4002, ts.DiagnosticCategory.Error, "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", "Type parameter '{0}' of exported class has or is using private name '{1}'."),
|
|
8679
8680
|
Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: diag(4004, ts.DiagnosticCategory.Error, "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", "Type parameter '{0}' of exported interface has or is using private name '{1}'."),
|
|
@@ -42493,11 +42494,15 @@ var ts;
|
|
|
42493
42494
|
if (!scope || !scope.packageJsonContent.exports) {
|
|
42494
42495
|
return undefined;
|
|
42495
42496
|
}
|
|
42497
|
+
if (typeof scope.packageJsonContent.name !== "string") {
|
|
42498
|
+
return undefined;
|
|
42499
|
+
}
|
|
42496
42500
|
var parts = ts.getPathComponents(moduleName); // unrooted paths should have `""` as their 0th entry
|
|
42497
|
-
|
|
42501
|
+
var nameParts = ts.getPathComponents(scope.packageJsonContent.name);
|
|
42502
|
+
if (!ts.every(nameParts, function (p, i) { return parts[i] === p; })) {
|
|
42498
42503
|
return undefined;
|
|
42499
42504
|
}
|
|
42500
|
-
var trailingParts = parts.slice(
|
|
42505
|
+
var trailingParts = parts.slice(nameParts.length);
|
|
42501
42506
|
return loadModuleFromExports(scope, extensions, !ts.length(trailingParts) ? "." : "." + ts.directorySeparator + trailingParts.join(ts.directorySeparator), state, cache, redirectedReference);
|
|
42502
42507
|
}
|
|
42503
42508
|
function loadModuleFromExports(scope, extensions, subpath, state, cache, redirectedReference) {
|
|
@@ -47975,11 +47980,11 @@ var ts;
|
|
|
47975
47980
|
*
|
|
47976
47981
|
* @param isUse If true, this will count towards --noUnusedLocals / --noUnusedParameters.
|
|
47977
47982
|
*/
|
|
47978
|
-
function resolveName(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals
|
|
47983
|
+
function resolveName(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals) {
|
|
47979
47984
|
if (excludeGlobals === void 0) { excludeGlobals = false; }
|
|
47980
|
-
return resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, getSymbol
|
|
47985
|
+
return resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, getSymbol);
|
|
47981
47986
|
}
|
|
47982
|
-
function resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, lookup
|
|
47987
|
+
function resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, lookup) {
|
|
47983
47988
|
var _a, _b, _c;
|
|
47984
47989
|
var originalLocation = location; // needed for did-you-mean error reporting, which gathers candidates starting from the original location
|
|
47985
47990
|
var result;
|
|
@@ -48306,7 +48311,7 @@ var ts;
|
|
|
48306
48311
|
!checkAndReportErrorForUsingNamespaceModuleAsValue(errorLocation, name, meaning) &&
|
|
48307
48312
|
!checkAndReportErrorForUsingValueAsType(errorLocation, name, meaning)) {
|
|
48308
48313
|
var suggestion = void 0;
|
|
48309
|
-
if (
|
|
48314
|
+
if (suggestionCount < maximumSuggestionCount) {
|
|
48310
48315
|
suggestion = getSuggestedSymbolForNonexistentSymbol(originalLocation, name, meaning);
|
|
48311
48316
|
var isGlobalScopeAugmentationDeclaration = (suggestion === null || suggestion === void 0 ? void 0 : suggestion.valueDeclaration) && ts.isAmbientModule(suggestion.valueDeclaration) && ts.isGlobalScopeAugmentation(suggestion.valueDeclaration);
|
|
48312
48317
|
if (isGlobalScopeAugmentationDeclaration) {
|
|
@@ -48315,7 +48320,9 @@ var ts;
|
|
|
48315
48320
|
if (suggestion) {
|
|
48316
48321
|
var suggestionName = symbolToString(suggestion);
|
|
48317
48322
|
var isUncheckedJS = isUncheckedJSSuggestion(originalLocation, suggestion, /*excludeClasses*/ false);
|
|
48318
|
-
var message =
|
|
48323
|
+
var message = meaning === 1920 /* Namespace */ || nameArg && typeof nameArg !== "string" && ts.nodeIsSynthesized(nameArg) ? ts.Diagnostics.Cannot_find_namespace_0_Did_you_mean_1
|
|
48324
|
+
: isUncheckedJS ? ts.Diagnostics.Could_not_find_name_0_Did_you_mean_1
|
|
48325
|
+
: ts.Diagnostics.Cannot_find_name_0_Did_you_mean_1;
|
|
48319
48326
|
var diagnostic = createError(errorLocation, message, diagnosticName(nameArg), suggestionName);
|
|
48320
48327
|
addErrorOrSuggestion(!isUncheckedJS, diagnostic);
|
|
48321
48328
|
if (suggestion.valueDeclaration) {
|
|
@@ -49309,7 +49316,7 @@ var ts;
|
|
|
49309
49316
|
if (name.kind === 79 /* Identifier */) {
|
|
49310
49317
|
var message = meaning === namespaceMeaning || ts.nodeIsSynthesized(name) ? ts.Diagnostics.Cannot_find_namespace_0 : getCannotFindNameDiagnosticForName(ts.getFirstIdentifier(name));
|
|
49311
49318
|
var symbolFromJSPrototype = ts.isInJSFile(name) && !ts.nodeIsSynthesized(name) ? resolveEntityNameFromAssignmentDeclaration(name, meaning) : undefined;
|
|
49312
|
-
symbol = getMergedSymbol(resolveName(location || name, name.escapedText, meaning, ignoreErrors || symbolFromJSPrototype ? undefined : message, name, /*isUse*/ true));
|
|
49319
|
+
symbol = getMergedSymbol(resolveName(location || name, name.escapedText, meaning, ignoreErrors || symbolFromJSPrototype ? undefined : message, name, /*isUse*/ true, false));
|
|
49313
49320
|
if (!symbol) {
|
|
49314
49321
|
return getMergedSymbol(symbolFromJSPrototype);
|
|
49315
49322
|
}
|
|
@@ -67087,8 +67094,7 @@ var ts;
|
|
|
67087
67094
|
if (!links.resolvedSymbol) {
|
|
67088
67095
|
links.resolvedSymbol = !ts.nodeIsMissing(node) &&
|
|
67089
67096
|
resolveName(node, node.escapedText, 111551 /* Value */ | 1048576 /* ExportValue */, getCannotFindNameDiagnosticForName(node), node, !ts.isWriteOnlyAccess(node),
|
|
67090
|
-
/*excludeGlobals*/ false
|
|
67091
|
-
/*issueSuggestions*/ true) || unknownSymbol;
|
|
67097
|
+
/*excludeGlobals*/ false) || unknownSymbol;
|
|
67092
67098
|
}
|
|
67093
67099
|
return links.resolvedSymbol;
|
|
67094
67100
|
}
|
|
@@ -72652,7 +72658,19 @@ var ts;
|
|
|
72652
72658
|
// Sometimes the symbol is found when location is a return type of a function: `typeof x` and `x` is declared in the body of the function
|
|
72653
72659
|
// So the table *contains* `x` but `x` isn't actually in scope.
|
|
72654
72660
|
// However, resolveNameHelper will continue and call this callback again, so we'll eventually get a correct suggestion.
|
|
72655
|
-
|
|
72661
|
+
if (symbol)
|
|
72662
|
+
return symbol;
|
|
72663
|
+
var candidates;
|
|
72664
|
+
if (symbols === globals) {
|
|
72665
|
+
var primitives = ts.mapDefined(["string", "number", "boolean", "object", "bigint", "symbol"], function (s) { return symbols.has((s.charAt(0).toUpperCase() + s.slice(1)))
|
|
72666
|
+
? createSymbol(524288 /* TypeAlias */, s)
|
|
72667
|
+
: undefined; });
|
|
72668
|
+
candidates = primitives.concat(ts.arrayFrom(symbols.values()));
|
|
72669
|
+
}
|
|
72670
|
+
else {
|
|
72671
|
+
candidates = ts.arrayFrom(symbols.values());
|
|
72672
|
+
}
|
|
72673
|
+
return getSpellingSuggestionForName(ts.unescapeLeadingUnderscores(name), candidates, meaning);
|
|
72656
72674
|
});
|
|
72657
72675
|
return result;
|
|
72658
72676
|
}
|
|
@@ -121094,11 +121112,11 @@ var ts;
|
|
|
121094
121112
|
(_b = state.typeReferenceDirectiveResolutionCache) === null || _b === void 0 ? void 0 : _b.update(config.options);
|
|
121095
121113
|
// Create program
|
|
121096
121114
|
program = host.createProgram(config.fileNames, config.options, compilerHost, getOldProgram(state, projectPath, config), ts.getConfigFileParsingDiagnostics(config), config.projectReferences);
|
|
121097
|
-
state.lastCachedPackageJsonLookups.set(projectPath, state.moduleResolutionCache && ts.map(state.moduleResolutionCache.getPackageJsonInfoCache().entries(), function (_a) {
|
|
121098
|
-
var path = _a[0], data = _a[1];
|
|
121099
|
-
return [state.host.realpath ? toPath(state, state.host.realpath(path)) : path, data];
|
|
121100
|
-
}));
|
|
121101
121115
|
if (state.watch) {
|
|
121116
|
+
state.lastCachedPackageJsonLookups.set(projectPath, state.moduleResolutionCache && ts.map(state.moduleResolutionCache.getPackageJsonInfoCache().entries(), function (_a) {
|
|
121117
|
+
var path = _a[0], data = _a[1];
|
|
121118
|
+
return [state.host.realpath && data ? toPath(state, state.host.realpath(path)) : path, data];
|
|
121119
|
+
}));
|
|
121102
121120
|
state.builderPrograms.set(projectPath, program);
|
|
121103
121121
|
}
|
|
121104
121122
|
step++;
|
|
@@ -148763,6 +148781,7 @@ var ts;
|
|
|
148763
148781
|
ts.Diagnostics.Property_0_may_not_exist_on_type_1_Did_you_mean_2.code,
|
|
148764
148782
|
ts.Diagnostics.Cannot_find_name_0_Did_you_mean_1.code,
|
|
148765
148783
|
ts.Diagnostics.Could_not_find_name_0_Did_you_mean_1.code,
|
|
148784
|
+
ts.Diagnostics.Cannot_find_namespace_0_Did_you_mean_1.code,
|
|
148766
148785
|
ts.Diagnostics.Cannot_find_name_0_Did_you_mean_the_instance_member_this_0.code,
|
|
148767
148786
|
ts.Diagnostics.Cannot_find_name_0_Did_you_mean_the_static_member_1_0.code,
|
|
148768
148787
|
ts.Diagnostics._0_has_no_exported_member_named_1_Did_you_mean_2.code,
|
package/lib/tsserverlibrary.js
CHANGED
|
@@ -294,7 +294,7 @@ var ts;
|
|
|
294
294
|
// The following is baselined as a literal template type without intervention
|
|
295
295
|
/** The version of the TypeScript compiler release */
|
|
296
296
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
297
|
-
ts.version = ts.versionMajorMinor + ".0-dev.
|
|
297
|
+
ts.version = ts.versionMajorMinor + ".0-dev.20211006";
|
|
298
298
|
/* @internal */
|
|
299
299
|
var Comparison;
|
|
300
300
|
(function (Comparison) {
|
|
@@ -8868,6 +8868,7 @@ var ts;
|
|
|
8868
8868
|
Type_0_is_not_assignable_to_type_1_Did_you_mean_2: diag(2820, ts.DiagnosticCategory.Error, "Type_0_is_not_assignable_to_type_1_Did_you_mean_2_2820", "Type '{0}' is not assignable to type '{1}'. Did you mean '{2}'?"),
|
|
8869
8869
|
Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext: diag(2821, ts.DiagnosticCategory.Error, "Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_2821", "Import assertions are only supported when the '--module' option is set to 'esnext'."),
|
|
8870
8870
|
Import_assertions_cannot_be_used_with_type_only_imports_or_exports: diag(2822, ts.DiagnosticCategory.Error, "Import_assertions_cannot_be_used_with_type_only_imports_or_exports_2822", "Import assertions cannot be used with type-only imports or exports."),
|
|
8871
|
+
Cannot_find_namespace_0_Did_you_mean_1: diag(2833, ts.DiagnosticCategory.Error, "Cannot_find_namespace_0_Did_you_mean_1_2833", "Cannot find namespace '{0}'. Did you mean '{1}'?"),
|
|
8871
8872
|
Import_declaration_0_is_using_private_name_1: diag(4000, ts.DiagnosticCategory.Error, "Import_declaration_0_is_using_private_name_1_4000", "Import declaration '{0}' is using private name '{1}'."),
|
|
8872
8873
|
Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: diag(4002, ts.DiagnosticCategory.Error, "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", "Type parameter '{0}' of exported class has or is using private name '{1}'."),
|
|
8873
8874
|
Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: diag(4004, ts.DiagnosticCategory.Error, "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", "Type parameter '{0}' of exported interface has or is using private name '{1}'."),
|
|
@@ -42687,11 +42688,15 @@ var ts;
|
|
|
42687
42688
|
if (!scope || !scope.packageJsonContent.exports) {
|
|
42688
42689
|
return undefined;
|
|
42689
42690
|
}
|
|
42691
|
+
if (typeof scope.packageJsonContent.name !== "string") {
|
|
42692
|
+
return undefined;
|
|
42693
|
+
}
|
|
42690
42694
|
var parts = ts.getPathComponents(moduleName); // unrooted paths should have `""` as their 0th entry
|
|
42691
|
-
|
|
42695
|
+
var nameParts = ts.getPathComponents(scope.packageJsonContent.name);
|
|
42696
|
+
if (!ts.every(nameParts, function (p, i) { return parts[i] === p; })) {
|
|
42692
42697
|
return undefined;
|
|
42693
42698
|
}
|
|
42694
|
-
var trailingParts = parts.slice(
|
|
42699
|
+
var trailingParts = parts.slice(nameParts.length);
|
|
42695
42700
|
return loadModuleFromExports(scope, extensions, !ts.length(trailingParts) ? "." : "." + ts.directorySeparator + trailingParts.join(ts.directorySeparator), state, cache, redirectedReference);
|
|
42696
42701
|
}
|
|
42697
42702
|
function loadModuleFromExports(scope, extensions, subpath, state, cache, redirectedReference) {
|
|
@@ -48169,11 +48174,11 @@ var ts;
|
|
|
48169
48174
|
*
|
|
48170
48175
|
* @param isUse If true, this will count towards --noUnusedLocals / --noUnusedParameters.
|
|
48171
48176
|
*/
|
|
48172
|
-
function resolveName(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals
|
|
48177
|
+
function resolveName(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals) {
|
|
48173
48178
|
if (excludeGlobals === void 0) { excludeGlobals = false; }
|
|
48174
|
-
return resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, getSymbol
|
|
48179
|
+
return resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, getSymbol);
|
|
48175
48180
|
}
|
|
48176
|
-
function resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, lookup
|
|
48181
|
+
function resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, lookup) {
|
|
48177
48182
|
var _a, _b, _c;
|
|
48178
48183
|
var originalLocation = location; // needed for did-you-mean error reporting, which gathers candidates starting from the original location
|
|
48179
48184
|
var result;
|
|
@@ -48500,7 +48505,7 @@ var ts;
|
|
|
48500
48505
|
!checkAndReportErrorForUsingNamespaceModuleAsValue(errorLocation, name, meaning) &&
|
|
48501
48506
|
!checkAndReportErrorForUsingValueAsType(errorLocation, name, meaning)) {
|
|
48502
48507
|
var suggestion = void 0;
|
|
48503
|
-
if (
|
|
48508
|
+
if (suggestionCount < maximumSuggestionCount) {
|
|
48504
48509
|
suggestion = getSuggestedSymbolForNonexistentSymbol(originalLocation, name, meaning);
|
|
48505
48510
|
var isGlobalScopeAugmentationDeclaration = (suggestion === null || suggestion === void 0 ? void 0 : suggestion.valueDeclaration) && ts.isAmbientModule(suggestion.valueDeclaration) && ts.isGlobalScopeAugmentation(suggestion.valueDeclaration);
|
|
48506
48511
|
if (isGlobalScopeAugmentationDeclaration) {
|
|
@@ -48509,7 +48514,9 @@ var ts;
|
|
|
48509
48514
|
if (suggestion) {
|
|
48510
48515
|
var suggestionName = symbolToString(suggestion);
|
|
48511
48516
|
var isUncheckedJS = isUncheckedJSSuggestion(originalLocation, suggestion, /*excludeClasses*/ false);
|
|
48512
|
-
var message =
|
|
48517
|
+
var message = meaning === 1920 /* Namespace */ || nameArg && typeof nameArg !== "string" && ts.nodeIsSynthesized(nameArg) ? ts.Diagnostics.Cannot_find_namespace_0_Did_you_mean_1
|
|
48518
|
+
: isUncheckedJS ? ts.Diagnostics.Could_not_find_name_0_Did_you_mean_1
|
|
48519
|
+
: ts.Diagnostics.Cannot_find_name_0_Did_you_mean_1;
|
|
48513
48520
|
var diagnostic = createError(errorLocation, message, diagnosticName(nameArg), suggestionName);
|
|
48514
48521
|
addErrorOrSuggestion(!isUncheckedJS, diagnostic);
|
|
48515
48522
|
if (suggestion.valueDeclaration) {
|
|
@@ -49503,7 +49510,7 @@ var ts;
|
|
|
49503
49510
|
if (name.kind === 79 /* Identifier */) {
|
|
49504
49511
|
var message = meaning === namespaceMeaning || ts.nodeIsSynthesized(name) ? ts.Diagnostics.Cannot_find_namespace_0 : getCannotFindNameDiagnosticForName(ts.getFirstIdentifier(name));
|
|
49505
49512
|
var symbolFromJSPrototype = ts.isInJSFile(name) && !ts.nodeIsSynthesized(name) ? resolveEntityNameFromAssignmentDeclaration(name, meaning) : undefined;
|
|
49506
|
-
symbol = getMergedSymbol(resolveName(location || name, name.escapedText, meaning, ignoreErrors || symbolFromJSPrototype ? undefined : message, name, /*isUse*/ true));
|
|
49513
|
+
symbol = getMergedSymbol(resolveName(location || name, name.escapedText, meaning, ignoreErrors || symbolFromJSPrototype ? undefined : message, name, /*isUse*/ true, false));
|
|
49507
49514
|
if (!symbol) {
|
|
49508
49515
|
return getMergedSymbol(symbolFromJSPrototype);
|
|
49509
49516
|
}
|
|
@@ -67281,8 +67288,7 @@ var ts;
|
|
|
67281
67288
|
if (!links.resolvedSymbol) {
|
|
67282
67289
|
links.resolvedSymbol = !ts.nodeIsMissing(node) &&
|
|
67283
67290
|
resolveName(node, node.escapedText, 111551 /* Value */ | 1048576 /* ExportValue */, getCannotFindNameDiagnosticForName(node), node, !ts.isWriteOnlyAccess(node),
|
|
67284
|
-
/*excludeGlobals*/ false
|
|
67285
|
-
/*issueSuggestions*/ true) || unknownSymbol;
|
|
67291
|
+
/*excludeGlobals*/ false) || unknownSymbol;
|
|
67286
67292
|
}
|
|
67287
67293
|
return links.resolvedSymbol;
|
|
67288
67294
|
}
|
|
@@ -72846,7 +72852,19 @@ var ts;
|
|
|
72846
72852
|
// Sometimes the symbol is found when location is a return type of a function: `typeof x` and `x` is declared in the body of the function
|
|
72847
72853
|
// So the table *contains* `x` but `x` isn't actually in scope.
|
|
72848
72854
|
// However, resolveNameHelper will continue and call this callback again, so we'll eventually get a correct suggestion.
|
|
72849
|
-
|
|
72855
|
+
if (symbol)
|
|
72856
|
+
return symbol;
|
|
72857
|
+
var candidates;
|
|
72858
|
+
if (symbols === globals) {
|
|
72859
|
+
var primitives = ts.mapDefined(["string", "number", "boolean", "object", "bigint", "symbol"], function (s) { return symbols.has((s.charAt(0).toUpperCase() + s.slice(1)))
|
|
72860
|
+
? createSymbol(524288 /* TypeAlias */, s)
|
|
72861
|
+
: undefined; });
|
|
72862
|
+
candidates = primitives.concat(ts.arrayFrom(symbols.values()));
|
|
72863
|
+
}
|
|
72864
|
+
else {
|
|
72865
|
+
candidates = ts.arrayFrom(symbols.values());
|
|
72866
|
+
}
|
|
72867
|
+
return getSpellingSuggestionForName(ts.unescapeLeadingUnderscores(name), candidates, meaning);
|
|
72850
72868
|
});
|
|
72851
72869
|
return result;
|
|
72852
72870
|
}
|
|
@@ -121288,11 +121306,11 @@ var ts;
|
|
|
121288
121306
|
(_b = state.typeReferenceDirectiveResolutionCache) === null || _b === void 0 ? void 0 : _b.update(config.options);
|
|
121289
121307
|
// Create program
|
|
121290
121308
|
program = host.createProgram(config.fileNames, config.options, compilerHost, getOldProgram(state, projectPath, config), ts.getConfigFileParsingDiagnostics(config), config.projectReferences);
|
|
121291
|
-
state.lastCachedPackageJsonLookups.set(projectPath, state.moduleResolutionCache && ts.map(state.moduleResolutionCache.getPackageJsonInfoCache().entries(), function (_a) {
|
|
121292
|
-
var path = _a[0], data = _a[1];
|
|
121293
|
-
return [state.host.realpath ? toPath(state, state.host.realpath(path)) : path, data];
|
|
121294
|
-
}));
|
|
121295
121309
|
if (state.watch) {
|
|
121310
|
+
state.lastCachedPackageJsonLookups.set(projectPath, state.moduleResolutionCache && ts.map(state.moduleResolutionCache.getPackageJsonInfoCache().entries(), function (_a) {
|
|
121311
|
+
var path = _a[0], data = _a[1];
|
|
121312
|
+
return [state.host.realpath && data ? toPath(state, state.host.realpath(path)) : path, data];
|
|
121313
|
+
}));
|
|
121296
121314
|
state.builderPrograms.set(projectPath, program);
|
|
121297
121315
|
}
|
|
121298
121316
|
step++;
|
|
@@ -149345,6 +149363,7 @@ var ts;
|
|
|
149345
149363
|
ts.Diagnostics.Property_0_may_not_exist_on_type_1_Did_you_mean_2.code,
|
|
149346
149364
|
ts.Diagnostics.Cannot_find_name_0_Did_you_mean_1.code,
|
|
149347
149365
|
ts.Diagnostics.Could_not_find_name_0_Did_you_mean_1.code,
|
|
149366
|
+
ts.Diagnostics.Cannot_find_namespace_0_Did_you_mean_1.code,
|
|
149348
149367
|
ts.Diagnostics.Cannot_find_name_0_Did_you_mean_the_instance_member_this_0.code,
|
|
149349
149368
|
ts.Diagnostics.Cannot_find_name_0_Did_you_mean_the_static_member_1_0.code,
|
|
149350
149369
|
ts.Diagnostics._0_has_no_exported_member_named_1_Did_you_mean_2.code,
|
package/lib/typescript.js
CHANGED
|
@@ -294,7 +294,7 @@ var ts;
|
|
|
294
294
|
// The following is baselined as a literal template type without intervention
|
|
295
295
|
/** The version of the TypeScript compiler release */
|
|
296
296
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
297
|
-
ts.version = ts.versionMajorMinor + ".0-dev.
|
|
297
|
+
ts.version = ts.versionMajorMinor + ".0-dev.20211006";
|
|
298
298
|
/* @internal */
|
|
299
299
|
var Comparison;
|
|
300
300
|
(function (Comparison) {
|
|
@@ -8868,6 +8868,7 @@ var ts;
|
|
|
8868
8868
|
Type_0_is_not_assignable_to_type_1_Did_you_mean_2: diag(2820, ts.DiagnosticCategory.Error, "Type_0_is_not_assignable_to_type_1_Did_you_mean_2_2820", "Type '{0}' is not assignable to type '{1}'. Did you mean '{2}'?"),
|
|
8869
8869
|
Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext: diag(2821, ts.DiagnosticCategory.Error, "Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_2821", "Import assertions are only supported when the '--module' option is set to 'esnext'."),
|
|
8870
8870
|
Import_assertions_cannot_be_used_with_type_only_imports_or_exports: diag(2822, ts.DiagnosticCategory.Error, "Import_assertions_cannot_be_used_with_type_only_imports_or_exports_2822", "Import assertions cannot be used with type-only imports or exports."),
|
|
8871
|
+
Cannot_find_namespace_0_Did_you_mean_1: diag(2833, ts.DiagnosticCategory.Error, "Cannot_find_namespace_0_Did_you_mean_1_2833", "Cannot find namespace '{0}'. Did you mean '{1}'?"),
|
|
8871
8872
|
Import_declaration_0_is_using_private_name_1: diag(4000, ts.DiagnosticCategory.Error, "Import_declaration_0_is_using_private_name_1_4000", "Import declaration '{0}' is using private name '{1}'."),
|
|
8872
8873
|
Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: diag(4002, ts.DiagnosticCategory.Error, "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", "Type parameter '{0}' of exported class has or is using private name '{1}'."),
|
|
8873
8874
|
Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: diag(4004, ts.DiagnosticCategory.Error, "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", "Type parameter '{0}' of exported interface has or is using private name '{1}'."),
|
|
@@ -42687,11 +42688,15 @@ var ts;
|
|
|
42687
42688
|
if (!scope || !scope.packageJsonContent.exports) {
|
|
42688
42689
|
return undefined;
|
|
42689
42690
|
}
|
|
42691
|
+
if (typeof scope.packageJsonContent.name !== "string") {
|
|
42692
|
+
return undefined;
|
|
42693
|
+
}
|
|
42690
42694
|
var parts = ts.getPathComponents(moduleName); // unrooted paths should have `""` as their 0th entry
|
|
42691
|
-
|
|
42695
|
+
var nameParts = ts.getPathComponents(scope.packageJsonContent.name);
|
|
42696
|
+
if (!ts.every(nameParts, function (p, i) { return parts[i] === p; })) {
|
|
42692
42697
|
return undefined;
|
|
42693
42698
|
}
|
|
42694
|
-
var trailingParts = parts.slice(
|
|
42699
|
+
var trailingParts = parts.slice(nameParts.length);
|
|
42695
42700
|
return loadModuleFromExports(scope, extensions, !ts.length(trailingParts) ? "." : "." + ts.directorySeparator + trailingParts.join(ts.directorySeparator), state, cache, redirectedReference);
|
|
42696
42701
|
}
|
|
42697
42702
|
function loadModuleFromExports(scope, extensions, subpath, state, cache, redirectedReference) {
|
|
@@ -48169,11 +48174,11 @@ var ts;
|
|
|
48169
48174
|
*
|
|
48170
48175
|
* @param isUse If true, this will count towards --noUnusedLocals / --noUnusedParameters.
|
|
48171
48176
|
*/
|
|
48172
|
-
function resolveName(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals
|
|
48177
|
+
function resolveName(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals) {
|
|
48173
48178
|
if (excludeGlobals === void 0) { excludeGlobals = false; }
|
|
48174
|
-
return resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, getSymbol
|
|
48179
|
+
return resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, getSymbol);
|
|
48175
48180
|
}
|
|
48176
|
-
function resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, lookup
|
|
48181
|
+
function resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, lookup) {
|
|
48177
48182
|
var _a, _b, _c;
|
|
48178
48183
|
var originalLocation = location; // needed for did-you-mean error reporting, which gathers candidates starting from the original location
|
|
48179
48184
|
var result;
|
|
@@ -48500,7 +48505,7 @@ var ts;
|
|
|
48500
48505
|
!checkAndReportErrorForUsingNamespaceModuleAsValue(errorLocation, name, meaning) &&
|
|
48501
48506
|
!checkAndReportErrorForUsingValueAsType(errorLocation, name, meaning)) {
|
|
48502
48507
|
var suggestion = void 0;
|
|
48503
|
-
if (
|
|
48508
|
+
if (suggestionCount < maximumSuggestionCount) {
|
|
48504
48509
|
suggestion = getSuggestedSymbolForNonexistentSymbol(originalLocation, name, meaning);
|
|
48505
48510
|
var isGlobalScopeAugmentationDeclaration = (suggestion === null || suggestion === void 0 ? void 0 : suggestion.valueDeclaration) && ts.isAmbientModule(suggestion.valueDeclaration) && ts.isGlobalScopeAugmentation(suggestion.valueDeclaration);
|
|
48506
48511
|
if (isGlobalScopeAugmentationDeclaration) {
|
|
@@ -48509,7 +48514,9 @@ var ts;
|
|
|
48509
48514
|
if (suggestion) {
|
|
48510
48515
|
var suggestionName = symbolToString(suggestion);
|
|
48511
48516
|
var isUncheckedJS = isUncheckedJSSuggestion(originalLocation, suggestion, /*excludeClasses*/ false);
|
|
48512
|
-
var message =
|
|
48517
|
+
var message = meaning === 1920 /* Namespace */ || nameArg && typeof nameArg !== "string" && ts.nodeIsSynthesized(nameArg) ? ts.Diagnostics.Cannot_find_namespace_0_Did_you_mean_1
|
|
48518
|
+
: isUncheckedJS ? ts.Diagnostics.Could_not_find_name_0_Did_you_mean_1
|
|
48519
|
+
: ts.Diagnostics.Cannot_find_name_0_Did_you_mean_1;
|
|
48513
48520
|
var diagnostic = createError(errorLocation, message, diagnosticName(nameArg), suggestionName);
|
|
48514
48521
|
addErrorOrSuggestion(!isUncheckedJS, diagnostic);
|
|
48515
48522
|
if (suggestion.valueDeclaration) {
|
|
@@ -49503,7 +49510,7 @@ var ts;
|
|
|
49503
49510
|
if (name.kind === 79 /* Identifier */) {
|
|
49504
49511
|
var message = meaning === namespaceMeaning || ts.nodeIsSynthesized(name) ? ts.Diagnostics.Cannot_find_namespace_0 : getCannotFindNameDiagnosticForName(ts.getFirstIdentifier(name));
|
|
49505
49512
|
var symbolFromJSPrototype = ts.isInJSFile(name) && !ts.nodeIsSynthesized(name) ? resolveEntityNameFromAssignmentDeclaration(name, meaning) : undefined;
|
|
49506
|
-
symbol = getMergedSymbol(resolveName(location || name, name.escapedText, meaning, ignoreErrors || symbolFromJSPrototype ? undefined : message, name, /*isUse*/ true));
|
|
49513
|
+
symbol = getMergedSymbol(resolveName(location || name, name.escapedText, meaning, ignoreErrors || symbolFromJSPrototype ? undefined : message, name, /*isUse*/ true, false));
|
|
49507
49514
|
if (!symbol) {
|
|
49508
49515
|
return getMergedSymbol(symbolFromJSPrototype);
|
|
49509
49516
|
}
|
|
@@ -67281,8 +67288,7 @@ var ts;
|
|
|
67281
67288
|
if (!links.resolvedSymbol) {
|
|
67282
67289
|
links.resolvedSymbol = !ts.nodeIsMissing(node) &&
|
|
67283
67290
|
resolveName(node, node.escapedText, 111551 /* Value */ | 1048576 /* ExportValue */, getCannotFindNameDiagnosticForName(node), node, !ts.isWriteOnlyAccess(node),
|
|
67284
|
-
/*excludeGlobals*/ false
|
|
67285
|
-
/*issueSuggestions*/ true) || unknownSymbol;
|
|
67291
|
+
/*excludeGlobals*/ false) || unknownSymbol;
|
|
67286
67292
|
}
|
|
67287
67293
|
return links.resolvedSymbol;
|
|
67288
67294
|
}
|
|
@@ -72846,7 +72852,19 @@ var ts;
|
|
|
72846
72852
|
// Sometimes the symbol is found when location is a return type of a function: `typeof x` and `x` is declared in the body of the function
|
|
72847
72853
|
// So the table *contains* `x` but `x` isn't actually in scope.
|
|
72848
72854
|
// However, resolveNameHelper will continue and call this callback again, so we'll eventually get a correct suggestion.
|
|
72849
|
-
|
|
72855
|
+
if (symbol)
|
|
72856
|
+
return symbol;
|
|
72857
|
+
var candidates;
|
|
72858
|
+
if (symbols === globals) {
|
|
72859
|
+
var primitives = ts.mapDefined(["string", "number", "boolean", "object", "bigint", "symbol"], function (s) { return symbols.has((s.charAt(0).toUpperCase() + s.slice(1)))
|
|
72860
|
+
? createSymbol(524288 /* TypeAlias */, s)
|
|
72861
|
+
: undefined; });
|
|
72862
|
+
candidates = primitives.concat(ts.arrayFrom(symbols.values()));
|
|
72863
|
+
}
|
|
72864
|
+
else {
|
|
72865
|
+
candidates = ts.arrayFrom(symbols.values());
|
|
72866
|
+
}
|
|
72867
|
+
return getSpellingSuggestionForName(ts.unescapeLeadingUnderscores(name), candidates, meaning);
|
|
72850
72868
|
});
|
|
72851
72869
|
return result;
|
|
72852
72870
|
}
|
|
@@ -121288,11 +121306,11 @@ var ts;
|
|
|
121288
121306
|
(_b = state.typeReferenceDirectiveResolutionCache) === null || _b === void 0 ? void 0 : _b.update(config.options);
|
|
121289
121307
|
// Create program
|
|
121290
121308
|
program = host.createProgram(config.fileNames, config.options, compilerHost, getOldProgram(state, projectPath, config), ts.getConfigFileParsingDiagnostics(config), config.projectReferences);
|
|
121291
|
-
state.lastCachedPackageJsonLookups.set(projectPath, state.moduleResolutionCache && ts.map(state.moduleResolutionCache.getPackageJsonInfoCache().entries(), function (_a) {
|
|
121292
|
-
var path = _a[0], data = _a[1];
|
|
121293
|
-
return [state.host.realpath ? toPath(state, state.host.realpath(path)) : path, data];
|
|
121294
|
-
}));
|
|
121295
121309
|
if (state.watch) {
|
|
121310
|
+
state.lastCachedPackageJsonLookups.set(projectPath, state.moduleResolutionCache && ts.map(state.moduleResolutionCache.getPackageJsonInfoCache().entries(), function (_a) {
|
|
121311
|
+
var path = _a[0], data = _a[1];
|
|
121312
|
+
return [state.host.realpath && data ? toPath(state, state.host.realpath(path)) : path, data];
|
|
121313
|
+
}));
|
|
121296
121314
|
state.builderPrograms.set(projectPath, program);
|
|
121297
121315
|
}
|
|
121298
121316
|
step++;
|
|
@@ -149345,6 +149363,7 @@ var ts;
|
|
|
149345
149363
|
ts.Diagnostics.Property_0_may_not_exist_on_type_1_Did_you_mean_2.code,
|
|
149346
149364
|
ts.Diagnostics.Cannot_find_name_0_Did_you_mean_1.code,
|
|
149347
149365
|
ts.Diagnostics.Could_not_find_name_0_Did_you_mean_1.code,
|
|
149366
|
+
ts.Diagnostics.Cannot_find_namespace_0_Did_you_mean_1.code,
|
|
149348
149367
|
ts.Diagnostics.Cannot_find_name_0_Did_you_mean_the_instance_member_this_0.code,
|
|
149349
149368
|
ts.Diagnostics.Cannot_find_name_0_Did_you_mean_the_static_member_1_0.code,
|
|
149350
149369
|
ts.Diagnostics._0_has_no_exported_member_named_1_Did_you_mean_2.code,
|
|
@@ -294,7 +294,7 @@ var ts;
|
|
|
294
294
|
// The following is baselined as a literal template type without intervention
|
|
295
295
|
/** The version of the TypeScript compiler release */
|
|
296
296
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
297
|
-
ts.version = ts.versionMajorMinor + ".0-dev.
|
|
297
|
+
ts.version = ts.versionMajorMinor + ".0-dev.20211006";
|
|
298
298
|
/* @internal */
|
|
299
299
|
var Comparison;
|
|
300
300
|
(function (Comparison) {
|
|
@@ -8868,6 +8868,7 @@ var ts;
|
|
|
8868
8868
|
Type_0_is_not_assignable_to_type_1_Did_you_mean_2: diag(2820, ts.DiagnosticCategory.Error, "Type_0_is_not_assignable_to_type_1_Did_you_mean_2_2820", "Type '{0}' is not assignable to type '{1}'. Did you mean '{2}'?"),
|
|
8869
8869
|
Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext: diag(2821, ts.DiagnosticCategory.Error, "Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_2821", "Import assertions are only supported when the '--module' option is set to 'esnext'."),
|
|
8870
8870
|
Import_assertions_cannot_be_used_with_type_only_imports_or_exports: diag(2822, ts.DiagnosticCategory.Error, "Import_assertions_cannot_be_used_with_type_only_imports_or_exports_2822", "Import assertions cannot be used with type-only imports or exports."),
|
|
8871
|
+
Cannot_find_namespace_0_Did_you_mean_1: diag(2833, ts.DiagnosticCategory.Error, "Cannot_find_namespace_0_Did_you_mean_1_2833", "Cannot find namespace '{0}'. Did you mean '{1}'?"),
|
|
8871
8872
|
Import_declaration_0_is_using_private_name_1: diag(4000, ts.DiagnosticCategory.Error, "Import_declaration_0_is_using_private_name_1_4000", "Import declaration '{0}' is using private name '{1}'."),
|
|
8872
8873
|
Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: diag(4002, ts.DiagnosticCategory.Error, "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", "Type parameter '{0}' of exported class has or is using private name '{1}'."),
|
|
8873
8874
|
Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: diag(4004, ts.DiagnosticCategory.Error, "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", "Type parameter '{0}' of exported interface has or is using private name '{1}'."),
|
|
@@ -42687,11 +42688,15 @@ var ts;
|
|
|
42687
42688
|
if (!scope || !scope.packageJsonContent.exports) {
|
|
42688
42689
|
return undefined;
|
|
42689
42690
|
}
|
|
42691
|
+
if (typeof scope.packageJsonContent.name !== "string") {
|
|
42692
|
+
return undefined;
|
|
42693
|
+
}
|
|
42690
42694
|
var parts = ts.getPathComponents(moduleName); // unrooted paths should have `""` as their 0th entry
|
|
42691
|
-
|
|
42695
|
+
var nameParts = ts.getPathComponents(scope.packageJsonContent.name);
|
|
42696
|
+
if (!ts.every(nameParts, function (p, i) { return parts[i] === p; })) {
|
|
42692
42697
|
return undefined;
|
|
42693
42698
|
}
|
|
42694
|
-
var trailingParts = parts.slice(
|
|
42699
|
+
var trailingParts = parts.slice(nameParts.length);
|
|
42695
42700
|
return loadModuleFromExports(scope, extensions, !ts.length(trailingParts) ? "." : "." + ts.directorySeparator + trailingParts.join(ts.directorySeparator), state, cache, redirectedReference);
|
|
42696
42701
|
}
|
|
42697
42702
|
function loadModuleFromExports(scope, extensions, subpath, state, cache, redirectedReference) {
|
|
@@ -48169,11 +48174,11 @@ var ts;
|
|
|
48169
48174
|
*
|
|
48170
48175
|
* @param isUse If true, this will count towards --noUnusedLocals / --noUnusedParameters.
|
|
48171
48176
|
*/
|
|
48172
|
-
function resolveName(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals
|
|
48177
|
+
function resolveName(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals) {
|
|
48173
48178
|
if (excludeGlobals === void 0) { excludeGlobals = false; }
|
|
48174
|
-
return resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, getSymbol
|
|
48179
|
+
return resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, getSymbol);
|
|
48175
48180
|
}
|
|
48176
|
-
function resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, lookup
|
|
48181
|
+
function resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, lookup) {
|
|
48177
48182
|
var _a, _b, _c;
|
|
48178
48183
|
var originalLocation = location; // needed for did-you-mean error reporting, which gathers candidates starting from the original location
|
|
48179
48184
|
var result;
|
|
@@ -48500,7 +48505,7 @@ var ts;
|
|
|
48500
48505
|
!checkAndReportErrorForUsingNamespaceModuleAsValue(errorLocation, name, meaning) &&
|
|
48501
48506
|
!checkAndReportErrorForUsingValueAsType(errorLocation, name, meaning)) {
|
|
48502
48507
|
var suggestion = void 0;
|
|
48503
|
-
if (
|
|
48508
|
+
if (suggestionCount < maximumSuggestionCount) {
|
|
48504
48509
|
suggestion = getSuggestedSymbolForNonexistentSymbol(originalLocation, name, meaning);
|
|
48505
48510
|
var isGlobalScopeAugmentationDeclaration = (suggestion === null || suggestion === void 0 ? void 0 : suggestion.valueDeclaration) && ts.isAmbientModule(suggestion.valueDeclaration) && ts.isGlobalScopeAugmentation(suggestion.valueDeclaration);
|
|
48506
48511
|
if (isGlobalScopeAugmentationDeclaration) {
|
|
@@ -48509,7 +48514,9 @@ var ts;
|
|
|
48509
48514
|
if (suggestion) {
|
|
48510
48515
|
var suggestionName = symbolToString(suggestion);
|
|
48511
48516
|
var isUncheckedJS = isUncheckedJSSuggestion(originalLocation, suggestion, /*excludeClasses*/ false);
|
|
48512
|
-
var message =
|
|
48517
|
+
var message = meaning === 1920 /* Namespace */ || nameArg && typeof nameArg !== "string" && ts.nodeIsSynthesized(nameArg) ? ts.Diagnostics.Cannot_find_namespace_0_Did_you_mean_1
|
|
48518
|
+
: isUncheckedJS ? ts.Diagnostics.Could_not_find_name_0_Did_you_mean_1
|
|
48519
|
+
: ts.Diagnostics.Cannot_find_name_0_Did_you_mean_1;
|
|
48513
48520
|
var diagnostic = createError(errorLocation, message, diagnosticName(nameArg), suggestionName);
|
|
48514
48521
|
addErrorOrSuggestion(!isUncheckedJS, diagnostic);
|
|
48515
48522
|
if (suggestion.valueDeclaration) {
|
|
@@ -49503,7 +49510,7 @@ var ts;
|
|
|
49503
49510
|
if (name.kind === 79 /* Identifier */) {
|
|
49504
49511
|
var message = meaning === namespaceMeaning || ts.nodeIsSynthesized(name) ? ts.Diagnostics.Cannot_find_namespace_0 : getCannotFindNameDiagnosticForName(ts.getFirstIdentifier(name));
|
|
49505
49512
|
var symbolFromJSPrototype = ts.isInJSFile(name) && !ts.nodeIsSynthesized(name) ? resolveEntityNameFromAssignmentDeclaration(name, meaning) : undefined;
|
|
49506
|
-
symbol = getMergedSymbol(resolveName(location || name, name.escapedText, meaning, ignoreErrors || symbolFromJSPrototype ? undefined : message, name, /*isUse*/ true));
|
|
49513
|
+
symbol = getMergedSymbol(resolveName(location || name, name.escapedText, meaning, ignoreErrors || symbolFromJSPrototype ? undefined : message, name, /*isUse*/ true, false));
|
|
49507
49514
|
if (!symbol) {
|
|
49508
49515
|
return getMergedSymbol(symbolFromJSPrototype);
|
|
49509
49516
|
}
|
|
@@ -67281,8 +67288,7 @@ var ts;
|
|
|
67281
67288
|
if (!links.resolvedSymbol) {
|
|
67282
67289
|
links.resolvedSymbol = !ts.nodeIsMissing(node) &&
|
|
67283
67290
|
resolveName(node, node.escapedText, 111551 /* Value */ | 1048576 /* ExportValue */, getCannotFindNameDiagnosticForName(node), node, !ts.isWriteOnlyAccess(node),
|
|
67284
|
-
/*excludeGlobals*/ false
|
|
67285
|
-
/*issueSuggestions*/ true) || unknownSymbol;
|
|
67291
|
+
/*excludeGlobals*/ false) || unknownSymbol;
|
|
67286
67292
|
}
|
|
67287
67293
|
return links.resolvedSymbol;
|
|
67288
67294
|
}
|
|
@@ -72846,7 +72852,19 @@ var ts;
|
|
|
72846
72852
|
// Sometimes the symbol is found when location is a return type of a function: `typeof x` and `x` is declared in the body of the function
|
|
72847
72853
|
// So the table *contains* `x` but `x` isn't actually in scope.
|
|
72848
72854
|
// However, resolveNameHelper will continue and call this callback again, so we'll eventually get a correct suggestion.
|
|
72849
|
-
|
|
72855
|
+
if (symbol)
|
|
72856
|
+
return symbol;
|
|
72857
|
+
var candidates;
|
|
72858
|
+
if (symbols === globals) {
|
|
72859
|
+
var primitives = ts.mapDefined(["string", "number", "boolean", "object", "bigint", "symbol"], function (s) { return symbols.has((s.charAt(0).toUpperCase() + s.slice(1)))
|
|
72860
|
+
? createSymbol(524288 /* TypeAlias */, s)
|
|
72861
|
+
: undefined; });
|
|
72862
|
+
candidates = primitives.concat(ts.arrayFrom(symbols.values()));
|
|
72863
|
+
}
|
|
72864
|
+
else {
|
|
72865
|
+
candidates = ts.arrayFrom(symbols.values());
|
|
72866
|
+
}
|
|
72867
|
+
return getSpellingSuggestionForName(ts.unescapeLeadingUnderscores(name), candidates, meaning);
|
|
72850
72868
|
});
|
|
72851
72869
|
return result;
|
|
72852
72870
|
}
|
|
@@ -121288,11 +121306,11 @@ var ts;
|
|
|
121288
121306
|
(_b = state.typeReferenceDirectiveResolutionCache) === null || _b === void 0 ? void 0 : _b.update(config.options);
|
|
121289
121307
|
// Create program
|
|
121290
121308
|
program = host.createProgram(config.fileNames, config.options, compilerHost, getOldProgram(state, projectPath, config), ts.getConfigFileParsingDiagnostics(config), config.projectReferences);
|
|
121291
|
-
state.lastCachedPackageJsonLookups.set(projectPath, state.moduleResolutionCache && ts.map(state.moduleResolutionCache.getPackageJsonInfoCache().entries(), function (_a) {
|
|
121292
|
-
var path = _a[0], data = _a[1];
|
|
121293
|
-
return [state.host.realpath ? toPath(state, state.host.realpath(path)) : path, data];
|
|
121294
|
-
}));
|
|
121295
121309
|
if (state.watch) {
|
|
121310
|
+
state.lastCachedPackageJsonLookups.set(projectPath, state.moduleResolutionCache && ts.map(state.moduleResolutionCache.getPackageJsonInfoCache().entries(), function (_a) {
|
|
121311
|
+
var path = _a[0], data = _a[1];
|
|
121312
|
+
return [state.host.realpath && data ? toPath(state, state.host.realpath(path)) : path, data];
|
|
121313
|
+
}));
|
|
121296
121314
|
state.builderPrograms.set(projectPath, program);
|
|
121297
121315
|
}
|
|
121298
121316
|
step++;
|
|
@@ -149345,6 +149363,7 @@ var ts;
|
|
|
149345
149363
|
ts.Diagnostics.Property_0_may_not_exist_on_type_1_Did_you_mean_2.code,
|
|
149346
149364
|
ts.Diagnostics.Cannot_find_name_0_Did_you_mean_1.code,
|
|
149347
149365
|
ts.Diagnostics.Could_not_find_name_0_Did_you_mean_1.code,
|
|
149366
|
+
ts.Diagnostics.Cannot_find_namespace_0_Did_you_mean_1.code,
|
|
149348
149367
|
ts.Diagnostics.Cannot_find_name_0_Did_you_mean_the_instance_member_this_0.code,
|
|
149349
149368
|
ts.Diagnostics.Cannot_find_name_0_Did_you_mean_the_static_member_1_0.code,
|
|
149350
149369
|
ts.Diagnostics._0_has_no_exported_member_named_1_Did_you_mean_2.code,
|
package/lib/typingsInstaller.js
CHANGED
|
@@ -89,7 +89,7 @@ var ts;
|
|
|
89
89
|
// The following is baselined as a literal template type without intervention
|
|
90
90
|
/** The version of the TypeScript compiler release */
|
|
91
91
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
92
|
-
ts.version = ts.versionMajorMinor + ".0-dev.
|
|
92
|
+
ts.version = ts.versionMajorMinor + ".0-dev.20211006";
|
|
93
93
|
/* @internal */
|
|
94
94
|
var Comparison;
|
|
95
95
|
(function (Comparison) {
|
|
@@ -8663,6 +8663,7 @@ var ts;
|
|
|
8663
8663
|
Type_0_is_not_assignable_to_type_1_Did_you_mean_2: diag(2820, ts.DiagnosticCategory.Error, "Type_0_is_not_assignable_to_type_1_Did_you_mean_2_2820", "Type '{0}' is not assignable to type '{1}'. Did you mean '{2}'?"),
|
|
8664
8664
|
Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext: diag(2821, ts.DiagnosticCategory.Error, "Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_2821", "Import assertions are only supported when the '--module' option is set to 'esnext'."),
|
|
8665
8665
|
Import_assertions_cannot_be_used_with_type_only_imports_or_exports: diag(2822, ts.DiagnosticCategory.Error, "Import_assertions_cannot_be_used_with_type_only_imports_or_exports_2822", "Import assertions cannot be used with type-only imports or exports."),
|
|
8666
|
+
Cannot_find_namespace_0_Did_you_mean_1: diag(2833, ts.DiagnosticCategory.Error, "Cannot_find_namespace_0_Did_you_mean_1_2833", "Cannot find namespace '{0}'. Did you mean '{1}'?"),
|
|
8666
8667
|
Import_declaration_0_is_using_private_name_1: diag(4000, ts.DiagnosticCategory.Error, "Import_declaration_0_is_using_private_name_1_4000", "Import declaration '{0}' is using private name '{1}'."),
|
|
8667
8668
|
Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: diag(4002, ts.DiagnosticCategory.Error, "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", "Type parameter '{0}' of exported class has or is using private name '{1}'."),
|
|
8668
8669
|
Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: diag(4004, ts.DiagnosticCategory.Error, "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", "Type parameter '{0}' of exported interface has or is using private name '{1}'."),
|
|
@@ -42482,11 +42483,15 @@ var ts;
|
|
|
42482
42483
|
if (!scope || !scope.packageJsonContent.exports) {
|
|
42483
42484
|
return undefined;
|
|
42484
42485
|
}
|
|
42486
|
+
if (typeof scope.packageJsonContent.name !== "string") {
|
|
42487
|
+
return undefined;
|
|
42488
|
+
}
|
|
42485
42489
|
var parts = ts.getPathComponents(moduleName); // unrooted paths should have `""` as their 0th entry
|
|
42486
|
-
|
|
42490
|
+
var nameParts = ts.getPathComponents(scope.packageJsonContent.name);
|
|
42491
|
+
if (!ts.every(nameParts, function (p, i) { return parts[i] === p; })) {
|
|
42487
42492
|
return undefined;
|
|
42488
42493
|
}
|
|
42489
|
-
var trailingParts = parts.slice(
|
|
42494
|
+
var trailingParts = parts.slice(nameParts.length);
|
|
42490
42495
|
return loadModuleFromExports(scope, extensions, !ts.length(trailingParts) ? "." : "." + ts.directorySeparator + trailingParts.join(ts.directorySeparator), state, cache, redirectedReference);
|
|
42491
42496
|
}
|
|
42492
42497
|
function loadModuleFromExports(scope, extensions, subpath, state, cache, redirectedReference) {
|
|
@@ -47964,11 +47969,11 @@ var ts;
|
|
|
47964
47969
|
*
|
|
47965
47970
|
* @param isUse If true, this will count towards --noUnusedLocals / --noUnusedParameters.
|
|
47966
47971
|
*/
|
|
47967
|
-
function resolveName(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals
|
|
47972
|
+
function resolveName(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals) {
|
|
47968
47973
|
if (excludeGlobals === void 0) { excludeGlobals = false; }
|
|
47969
|
-
return resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, getSymbol
|
|
47974
|
+
return resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, getSymbol);
|
|
47970
47975
|
}
|
|
47971
|
-
function resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, lookup
|
|
47976
|
+
function resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, lookup) {
|
|
47972
47977
|
var _a, _b, _c;
|
|
47973
47978
|
var originalLocation = location; // needed for did-you-mean error reporting, which gathers candidates starting from the original location
|
|
47974
47979
|
var result;
|
|
@@ -48295,7 +48300,7 @@ var ts;
|
|
|
48295
48300
|
!checkAndReportErrorForUsingNamespaceModuleAsValue(errorLocation, name, meaning) &&
|
|
48296
48301
|
!checkAndReportErrorForUsingValueAsType(errorLocation, name, meaning)) {
|
|
48297
48302
|
var suggestion = void 0;
|
|
48298
|
-
if (
|
|
48303
|
+
if (suggestionCount < maximumSuggestionCount) {
|
|
48299
48304
|
suggestion = getSuggestedSymbolForNonexistentSymbol(originalLocation, name, meaning);
|
|
48300
48305
|
var isGlobalScopeAugmentationDeclaration = (suggestion === null || suggestion === void 0 ? void 0 : suggestion.valueDeclaration) && ts.isAmbientModule(suggestion.valueDeclaration) && ts.isGlobalScopeAugmentation(suggestion.valueDeclaration);
|
|
48301
48306
|
if (isGlobalScopeAugmentationDeclaration) {
|
|
@@ -48304,7 +48309,9 @@ var ts;
|
|
|
48304
48309
|
if (suggestion) {
|
|
48305
48310
|
var suggestionName = symbolToString(suggestion);
|
|
48306
48311
|
var isUncheckedJS = isUncheckedJSSuggestion(originalLocation, suggestion, /*excludeClasses*/ false);
|
|
48307
|
-
var message =
|
|
48312
|
+
var message = meaning === 1920 /* Namespace */ || nameArg && typeof nameArg !== "string" && ts.nodeIsSynthesized(nameArg) ? ts.Diagnostics.Cannot_find_namespace_0_Did_you_mean_1
|
|
48313
|
+
: isUncheckedJS ? ts.Diagnostics.Could_not_find_name_0_Did_you_mean_1
|
|
48314
|
+
: ts.Diagnostics.Cannot_find_name_0_Did_you_mean_1;
|
|
48308
48315
|
var diagnostic = createError(errorLocation, message, diagnosticName(nameArg), suggestionName);
|
|
48309
48316
|
addErrorOrSuggestion(!isUncheckedJS, diagnostic);
|
|
48310
48317
|
if (suggestion.valueDeclaration) {
|
|
@@ -49298,7 +49305,7 @@ var ts;
|
|
|
49298
49305
|
if (name.kind === 79 /* Identifier */) {
|
|
49299
49306
|
var message = meaning === namespaceMeaning || ts.nodeIsSynthesized(name) ? ts.Diagnostics.Cannot_find_namespace_0 : getCannotFindNameDiagnosticForName(ts.getFirstIdentifier(name));
|
|
49300
49307
|
var symbolFromJSPrototype = ts.isInJSFile(name) && !ts.nodeIsSynthesized(name) ? resolveEntityNameFromAssignmentDeclaration(name, meaning) : undefined;
|
|
49301
|
-
symbol = getMergedSymbol(resolveName(location || name, name.escapedText, meaning, ignoreErrors || symbolFromJSPrototype ? undefined : message, name, /*isUse*/ true));
|
|
49308
|
+
symbol = getMergedSymbol(resolveName(location || name, name.escapedText, meaning, ignoreErrors || symbolFromJSPrototype ? undefined : message, name, /*isUse*/ true, false));
|
|
49302
49309
|
if (!symbol) {
|
|
49303
49310
|
return getMergedSymbol(symbolFromJSPrototype);
|
|
49304
49311
|
}
|
|
@@ -67076,8 +67083,7 @@ var ts;
|
|
|
67076
67083
|
if (!links.resolvedSymbol) {
|
|
67077
67084
|
links.resolvedSymbol = !ts.nodeIsMissing(node) &&
|
|
67078
67085
|
resolveName(node, node.escapedText, 111551 /* Value */ | 1048576 /* ExportValue */, getCannotFindNameDiagnosticForName(node), node, !ts.isWriteOnlyAccess(node),
|
|
67079
|
-
/*excludeGlobals*/ false
|
|
67080
|
-
/*issueSuggestions*/ true) || unknownSymbol;
|
|
67086
|
+
/*excludeGlobals*/ false) || unknownSymbol;
|
|
67081
67087
|
}
|
|
67082
67088
|
return links.resolvedSymbol;
|
|
67083
67089
|
}
|
|
@@ -72641,7 +72647,19 @@ var ts;
|
|
|
72641
72647
|
// Sometimes the symbol is found when location is a return type of a function: `typeof x` and `x` is declared in the body of the function
|
|
72642
72648
|
// So the table *contains* `x` but `x` isn't actually in scope.
|
|
72643
72649
|
// However, resolveNameHelper will continue and call this callback again, so we'll eventually get a correct suggestion.
|
|
72644
|
-
|
|
72650
|
+
if (symbol)
|
|
72651
|
+
return symbol;
|
|
72652
|
+
var candidates;
|
|
72653
|
+
if (symbols === globals) {
|
|
72654
|
+
var primitives = ts.mapDefined(["string", "number", "boolean", "object", "bigint", "symbol"], function (s) { return symbols.has((s.charAt(0).toUpperCase() + s.slice(1)))
|
|
72655
|
+
? createSymbol(524288 /* TypeAlias */, s)
|
|
72656
|
+
: undefined; });
|
|
72657
|
+
candidates = primitives.concat(ts.arrayFrom(symbols.values()));
|
|
72658
|
+
}
|
|
72659
|
+
else {
|
|
72660
|
+
candidates = ts.arrayFrom(symbols.values());
|
|
72661
|
+
}
|
|
72662
|
+
return getSpellingSuggestionForName(ts.unescapeLeadingUnderscores(name), candidates, meaning);
|
|
72645
72663
|
});
|
|
72646
72664
|
return result;
|
|
72647
72665
|
}
|
|
@@ -121083,11 +121101,11 @@ var ts;
|
|
|
121083
121101
|
(_b = state.typeReferenceDirectiveResolutionCache) === null || _b === void 0 ? void 0 : _b.update(config.options);
|
|
121084
121102
|
// Create program
|
|
121085
121103
|
program = host.createProgram(config.fileNames, config.options, compilerHost, getOldProgram(state, projectPath, config), ts.getConfigFileParsingDiagnostics(config), config.projectReferences);
|
|
121086
|
-
state.lastCachedPackageJsonLookups.set(projectPath, state.moduleResolutionCache && ts.map(state.moduleResolutionCache.getPackageJsonInfoCache().entries(), function (_a) {
|
|
121087
|
-
var path = _a[0], data = _a[1];
|
|
121088
|
-
return [state.host.realpath ? toPath(state, state.host.realpath(path)) : path, data];
|
|
121089
|
-
}));
|
|
121090
121104
|
if (state.watch) {
|
|
121105
|
+
state.lastCachedPackageJsonLookups.set(projectPath, state.moduleResolutionCache && ts.map(state.moduleResolutionCache.getPackageJsonInfoCache().entries(), function (_a) {
|
|
121106
|
+
var path = _a[0], data = _a[1];
|
|
121107
|
+
return [state.host.realpath && data ? toPath(state, state.host.realpath(path)) : path, data];
|
|
121108
|
+
}));
|
|
121091
121109
|
state.builderPrograms.set(projectPath, program);
|
|
121092
121110
|
}
|
|
121093
121111
|
step++;
|
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.5.0-dev.
|
|
5
|
+
"version": "4.5.0-dev.20211006",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|