@typescript-deploys/pr-build 4.5.0-pr-45884-2 → 4.5.0-pr-45903-8
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 +6 -0
- package/lib/de/diagnosticMessages.generated.json +1 -0
- package/lib/es/diagnosticMessages.generated.json +1 -0
- package/lib/it/diagnosticMessages.generated.json +6 -0
- package/lib/ja/diagnosticMessages.generated.json +1 -0
- package/lib/ko/diagnosticMessages.generated.json +6 -0
- package/lib/lib.es2018.intl.d.ts +2 -2
- package/lib/lib.es5.d.ts +5 -7
- package/lib/pl/diagnosticMessages.generated.json +1 -0
- package/lib/protocol.d.ts +1 -0
- package/lib/pt-br/diagnosticMessages.generated.json +6 -0
- package/lib/ru/diagnosticMessages.generated.json +1 -0
- package/lib/tr/diagnosticMessages.generated.json +6 -0
- package/lib/tsc.js +336 -973
- package/lib/tsserver.js +430 -1125
- package/lib/tsserverlibrary.d.ts +18 -67
- package/lib/tsserverlibrary.js +430 -1125
- package/lib/typescript.d.ts +15 -65
- package/lib/typescript.js +424 -1120
- package/lib/typescriptServices.d.ts +15 -65
- package/lib/typescriptServices.js +424 -1120
- package/lib/typingsInstaller.js +368 -1075
- package/lib/zh-cn/diagnosticMessages.generated.json +1 -0
- package/lib/zh-tw/diagnosticMessages.generated.json +6 -0
- package/package.json +2 -2
|
@@ -1426,15 +1426,20 @@
|
|
|
1426
1426
|
"This_import_is_never_used_as_a_value_and_must_use_import_type_because_importsNotUsedAsValues_is_set__1371": "Tento import se nikdy nepoužívá jako hodnota a musí používat import type, protože importsNotUsedAsValues je nastavené na error.",
|
|
1427
1427
|
"This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_fil_6233": "Toto je deklarace, která se rozšiřuje. Zvažte možnost přesunout rozšiřující deklaraci do stejného souboru.",
|
|
1428
1428
|
"This_may_be_converted_to_an_async_function_80006": "Toto je možné převést na asynchronní funkci.",
|
|
1429
|
+
"This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4122": "This member cannot have a JSDoc comment with an '@override' tag because it is not declared in the base class '{0}'.",
|
|
1430
|
+
"This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4123": "This member cannot have a JSDoc comment with an 'override' tag because it is not declared in the base class '{0}'. Did you mean '{1}'?",
|
|
1431
|
+
"This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_4121": "This member cannot have a JSDoc comment with an '@override' tag because its containing class '{0}' does not extend another class.",
|
|
1429
1432
|
"This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_4113": "Tento člen nemůže mít modifikátor override, protože není deklarovaný v základní třídě {0}.",
|
|
1430
1433
|
"This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you__4117": "Tento člen nemůže mít modifikátor override, protože není deklarovaný v základní třídě {0}. Měli jste na mysli {1}?",
|
|
1431
1434
|
"This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another__4112": "Tento člen nemůže mít modifikátor override, protože třída {0}, která ho obsahuje, nerozšiřuje jinou třídu.",
|
|
1435
|
+
"This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_4119": "This member must have a JSDoc comment with an '@override' tag because it overrides a member in the base class '{0}'.",
|
|
1432
1436
|
"This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0_4114": "Tento člen musí mít modifikátor override, protože přepisuje člen v základní třídě {0}.",
|
|
1433
1437
|
"This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared__4116": "Tento člen musí mít modifikátor override, protože přepisuje abstraktní metodu, která je deklarovaná v základní třídě {0}.",
|
|
1434
1438
|
"This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_2497": "Na tento modul je možné se pomocí importů nebo exportů ECMAScript odkazovat jen tak, že se zapne příznak {0} a odkáže se na výchozí export.",
|
|
1435
1439
|
"This_module_is_declared_with_using_export_and_can_only_be_used_with_a_default_import_when_using_the__2594": "Tento modul se deklaroval pomocí export =, a když se používá příznak {0}, dá se použít jen s výchozím importem.",
|
|
1436
1440
|
"This_overload_signature_is_not_compatible_with_its_implementation_signature_2394": "Tato signatura přetížení není kompatibilní se signaturou implementace.",
|
|
1437
1441
|
"This_parameter_is_not_allowed_with_use_strict_directive_1346": "Tento parametr se nepodporuje s direktivou use strict.",
|
|
1442
|
+
"This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_4120": "This parameter property must have a JSDoc comment with an '@override' tag because it overrides a member in the base class '{0}'.",
|
|
1438
1443
|
"This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0_4115": "Tato vlastnost parametru musí mít modifikátor override, protože přepisuje člen v základní třídě {0}.",
|
|
1439
1444
|
"This_spread_always_overwrites_this_property_2785": "Tento rozsah vždy přepíše tuto vlastnost.",
|
|
1440
1445
|
"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.",
|
|
@@ -1469,6 +1474,7 @@
|
|
|
1469
1474
|
"Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns__2549": "Typ {0} není typem pole nebo řetězce, nebo nemá metodu [Symbol.iterator](), která vrací iterátor.",
|
|
1470
1475
|
"Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator_2548": "Typ {0} není typem pole, nebo nemá metodu [Symbol.iterator](), která vrací iterátor.",
|
|
1471
1476
|
"Type_0_is_not_assignable_to_type_1_2322": "Typ {0} nejde přiřadit typu {1}.",
|
|
1477
|
+
"Type_0_is_not_assignable_to_type_1_Did_you_mean_2_2820": "Typ {0} se nedá přiřadit k typu {1}. Měli jste na mysli {2}?",
|
|
1472
1478
|
"Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated_2719": "Typ {0} se nedá přiřadit typu {1}. Existují dva různé typy s tímto názvem, ale nesouvisí spolu.",
|
|
1473
1479
|
"Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefi_2375": "Typ {0} se nedá přiřadit k typu {1} s hodnotou exactOptionalPropertyTypes: true. Zvažte možnost přidat hodnotu undefined do typů vlastností cíle.",
|
|
1474
1480
|
"Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefi_2412": "Typ {0} se nedá přiřadit k typu {1} s hodnotou exactOptionalPropertyTypes: true. Zvažte možnost přidat hodnotu undefined do typu cíle.",
|
|
@@ -1469,6 +1469,7 @@
|
|
|
1469
1469
|
"Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns__2549": "Typ \"{0}\" ist kein Array-Typ oder Zeichenfolgentyp oder weist keine \"[Symbol.iterator]()\"-Methode auf, die einen Iterator zurückgibt.",
|
|
1470
1470
|
"Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator_2548": "Typ \"{0}\" ist kein Array-Typ oder weist keine \"[Symbol.iterator]()\"-Methode auf, die einen Iterator zurückgibt.",
|
|
1471
1471
|
"Type_0_is_not_assignable_to_type_1_2322": "Der Typ \"{0}\" kann dem Typ \"{1}\" nicht zugewiesen werden.",
|
|
1472
|
+
"Type_0_is_not_assignable_to_type_1_Did_you_mean_2_2820": "Typ \"{0}\" kann dem Typ \"{1}\" nicht zugewiesen werden. Meinten Sie \"{2}\"?",
|
|
1472
1473
|
"Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated_2719": "Der Typ \"{0}\" kann dem Typ \"{1}\" nicht zugewiesen werden. Es sind zwei verschiedene Typen mit diesem Namen vorhanden, diese sind jedoch nicht verwandt.",
|
|
1473
1474
|
"Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefi_2375": "Der Typ „{0}“ kann dem Typ „{1}“ mit „exactOptionalPropertyTypes: true“ nicht zugewiesen werden. Erwägen Sie das Hinzufügen von „undefined“ zu den Typen der Zieleigenschaften.",
|
|
1474
1475
|
"Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefi_2412": "Der Typ „{0}“ kann dem Typ „{1}“ mit „exactOptionalPropertyTypes: true“ nicht zugewiesen werden. Erwägen Sie das Hinzufügen von „undefined“ zum Typ des Ziels.",
|
|
@@ -1469,6 +1469,7 @@
|
|
|
1469
1469
|
"Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns__2549": "El tipo \"{0}\" no es un tipo de matriz o un tipo de cadena o no tiene un método \"[Symbol.iterator]()\" que devuelve un iterador.",
|
|
1470
1470
|
"Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator_2548": "El tipo \"{0}\" no es un tipo de matriz o no tiene un método \"[Symbol.iterator]()\" que devuelve un iterador.",
|
|
1471
1471
|
"Type_0_is_not_assignable_to_type_1_2322": "El tipo '{0}' no se puede asignar al tipo '{1}'.",
|
|
1472
|
+
"Type_0_is_not_assignable_to_type_1_Did_you_mean_2_2820": "El tipo '{0}' no se puede asignar al tipo '{1}'. ¿Quería decir \"{2}\"?",
|
|
1472
1473
|
"Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated_2719": "El tipo \"{0}\" no se puede asignar al tipo \"{1}\". Existen dos tipos distintos con este nombre, pero no están relacionados.",
|
|
1473
1474
|
"Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefi_2375": "El tipo '{0}' no se puede asignar al tipo '{1}' con 'exactOptionalPropertyTypes: true'. Considere la posibilidad de agregar \"undefined\" a los tipos de propiedades del destino.",
|
|
1474
1475
|
"Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefi_2412": "El tipo '{0}' no se puede asignar al tipo '{1}' con 'exactOptionalPropertyTypes: true'. Considere la posibilidad de agregar \"undefined\" al tipo del destino.",
|
|
@@ -1426,15 +1426,20 @@
|
|
|
1426
1426
|
"This_import_is_never_used_as_a_value_and_must_use_import_type_because_importsNotUsedAsValues_is_set__1371": "Questa importazione non viene mai usata come valore e deve usare 'import type' perché 'importsNotUsedAsValues' è impostato su 'error'.",
|
|
1427
1427
|
"This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_fil_6233": "Questa è la dichiarazione che verrà aumentata. Provare a spostare la dichiarazione che causa l'aumento nello stesso file.",
|
|
1428
1428
|
"This_may_be_converted_to_an_async_function_80006": "Può essere convertita in una funzione asincrona.",
|
|
1429
|
+
"This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4122": "Questo membro non può avere un commento JSDoc con un tag '@override' perché non è dichiarato nella classe di base '{0}'.",
|
|
1430
|
+
"This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4123": "Questo membro non può avere un commento JSDoc con un tag 'override' perché non è dichiarato nella classe di base '{0}'. Intendevi '{1}'?",
|
|
1431
|
+
"This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_4121": "Questo membro non può avere un commento JSDoc con un tag '@override' perché la classe che lo contiene '{0}' non estende un'altra classe.",
|
|
1429
1432
|
"This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_4113": "Questo membro non può includere un modificatore 'override' perché non è dichiarato nella classe di base '{0}'.",
|
|
1430
1433
|
"This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you__4117": "Questo membro non può includere un modificatore 'override' perché non è dichiarato nella classe di base '{0}'. Forse intendevi '{1}'?",
|
|
1431
1434
|
"This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another__4112": "Questo membro non può includere un modificatore 'override' perché la classe '{0}', che lo contiene, non estende un'altra classe.",
|
|
1435
|
+
"This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_4119": "Questo membro deve avere un commento JSDoc con un tag '@override' perché sostituisce un membro nella classe di base '{0}'.",
|
|
1432
1436
|
"This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0_4114": "Questo membro deve includere un modificatore 'override' perché sovrascrive un membro nella classe di base '{0}'.",
|
|
1433
1437
|
"This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared__4116": "Questo membro deve includere un modificatore 'override' perché esegue l'override di un metodo astratto dichiarato nella classe di base '{0}'.",
|
|
1434
1438
|
"This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_2497": "È possibile fare riferimento a questo modulo solo con importazioni/esportazioni ECMAScript attivando il flag '{0}' e facendo riferimento alla relativa esportazione predefinita.",
|
|
1435
1439
|
"This_module_is_declared_with_using_export_and_can_only_be_used_with_a_default_import_when_using_the__2594": "Il modulo viene dichiarato con 'export =' e può essere usato solo con un'importazione predefinita quando si usa il flag '{0}'.",
|
|
1436
1440
|
"This_overload_signature_is_not_compatible_with_its_implementation_signature_2394": "Questa firma di overload non è compatibile con la relativa firma di implementazione.",
|
|
1437
1441
|
"This_parameter_is_not_allowed_with_use_strict_directive_1346": "Questo parametro non è consentito con la direttiva 'use strict'.",
|
|
1442
|
+
"This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_4120": "Questa proprietà di parametro deve avere un commento JSDoc con un tag '@override' perché sostituisce un membro nella classe di base '{0}'.",
|
|
1438
1443
|
"This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0_4115": "Questa proprietà parametro deve includere un modificatore 'override' perché sovrascrive un membro nella classe di base '{0}'.",
|
|
1439
1444
|
"This_spread_always_overwrites_this_property_2785": "Questo spread sovrascrive sempre questa proprietà.",
|
|
1440
1445
|
"This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found_2354": "Con questa sintassi è richiesto un helper importato, ma il modulo '{0}' non è stato trovato.",
|
|
@@ -1469,6 +1474,7 @@
|
|
|
1469
1474
|
"Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns__2549": "Il tipo '{0}' non è un tipo matrice o stringa oppure non contiene un metodo '[Symbol.iterator]()' che restituisce un iteratore.",
|
|
1470
1475
|
"Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator_2548": "Il tipo '{0}' non è un tipo matrice oppure non contiene un metodo '[Symbol.iterator]()' che restituisce un iteratore.",
|
|
1471
1476
|
"Type_0_is_not_assignable_to_type_1_2322": "Il tipo '{0}' non è assegnabile al tipo '{1}'.",
|
|
1477
|
+
"Type_0_is_not_assignable_to_type_1_Did_you_mean_2_2820": "Il tipo '{0}' non è assegnabile al tipo '{1}'. Si intendeva '{2}'?",
|
|
1472
1478
|
"Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated_2719": "Il tipo '{0}' non è assegnabile al tipo '{1}'. Sono presenti due tipi diversi con questo nome, che però non sono correlati.",
|
|
1473
1479
|
"Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefi_2375": "L'argomento di tipo '{0}' non può essere assegnato al tipo '{1}' con 'exactOptionalPropertyTypes: true'. Provare ad aggiungere 'undefined' ai tipi di proprietà di destinazione.",
|
|
1474
1480
|
"Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefi_2412": "L'argomento di tipo '{0}' non può essere assegnato al tipo '{1}' con 'exactOptionalPropertyTypes: true'. Provare ad aggiungere 'undefined' al tipo di destinazione.",
|
|
@@ -1469,6 +1469,7 @@
|
|
|
1469
1469
|
"Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns__2549": "型 '{0}' は、配列型でも文字列型でもないか、反復子を返す '[Symbol.iterator]()' メソッドを持っていません。",
|
|
1470
1470
|
"Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator_2548": "型 '{0}' は、配列型ではないか、反復子を返す '[Symbol.iterator]()' メソッドを持っていません。",
|
|
1471
1471
|
"Type_0_is_not_assignable_to_type_1_2322": "型 '{0}' を型 '{1}' に割り当てることはできません。",
|
|
1472
|
+
"Type_0_is_not_assignable_to_type_1_Did_you_mean_2_2820": "型 '{0}' を型 '{1}' に割り当てることはできません。'{2}' でよろしいですか?",
|
|
1472
1473
|
"Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated_2719": "型 '{0}' は型 '{1}' に割り当てられません。同じ名前で 2 つの異なる型が存在しますが、これは関連していません。",
|
|
1473
1474
|
"Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefi_2375": "型 '{0}' を、'exactOptionalPropertyTypes: true' が指定されている型 '{1}' に割り当てることはできません。ターゲットのプロパティの型に 'undefined' を追加することを検討してください。",
|
|
1474
1475
|
"Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefi_2412": "型 '{0}' を、'exactOptionalPropertyTypes: true' が指定されている型 '{1}' に割り当てることはできません。ターゲットの型に 'undefined' を追加することを検討してください。",
|
|
@@ -1426,15 +1426,20 @@
|
|
|
1426
1426
|
"This_import_is_never_used_as_a_value_and_must_use_import_type_because_importsNotUsedAsValues_is_set__1371": "이 가져오기는 값으로 사용되지 않으며 'importsNotUsedAsValues'가 'error'로 설정되어 있기 때문에 'import type'을 사용해야 합니다.",
|
|
1427
1427
|
"This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_fil_6233": "확대되는 선언입니다. 확대하는 선언을 같은 파일로 이동하는 것이 좋습니다.",
|
|
1428
1428
|
"This_may_be_converted_to_an_async_function_80006": "비동기 함수로 변환될 수 있습니다.",
|
|
1429
|
+
"This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4122": "이 멤버는 기본 클래스 '{0}'에서 선언되지 않았기 때문에 'override' 태그가 있는 JSDoc 주석을 가질 수 없습니다.",
|
|
1430
|
+
"This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4123": "이 멤버는 기본 클래스 '{0}'에서 선언되지 않았기 때문에 'override' 태그가 있는 JSDoc 주석을 가질 수 없습니다. ‘{1}’을(를) 의미했나요?",
|
|
1431
|
+
"This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_4121": "이 멤버는 포함하는 클래스 '{0}'이(가) 다른 클래스를 확장하지 않기 때문에 '@override' 태그가 있는 JSDoc 주석을 가질 수 없습니다.",
|
|
1429
1432
|
"This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_4113": "이 멤버는 기본 클래스 '{0}'에 선언되지 않았으므로 'override' 한정자를 포함할 수 없습니다.",
|
|
1430
1433
|
"This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you__4117": "이 멤버는 기본 클래스 '{0}'에 선언되지 않았으므로 'override' 한정자를 포함할 수 없습니다. '{1}'였습니까?",
|
|
1431
1434
|
"This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another__4112": "이 멤버는 포함하는 클래스 '{0}'이(가) 다른 클래스를 확장하지 않으므로 'override' 한정자를 포함할 수 없습니다.",
|
|
1435
|
+
"This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_4119": "이 멤버는 기본 클래스 '{0}'의 멤버를 재정의하므로 '@override' 태그가 있는 JSDoc 주석이 있어야 합니다.",
|
|
1432
1436
|
"This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0_4114": "이 멤버는 기본 클래스 '{0}'의 멤버를 재정의하므로 'override' 한정자를 포함해야 합니다.",
|
|
1433
1437
|
"This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared__4116": "이 멤버는 기본 클래스 '{0}'에 선언된 추상 메서드를 재정의하므로 'override' 한정자를 포함해야 합니다.",
|
|
1434
1438
|
"This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_2497": "이 모듈은 '{0}' 플래그를 켜고 기본 내보내기를 참조하여 ECMAScript 가져오기/내보내기를 통해서만 참조할 수 있습니다.",
|
|
1435
1439
|
"This_module_is_declared_with_using_export_and_can_only_be_used_with_a_default_import_when_using_the__2594": "이 모듈은 'export ='를 사용하여 선언되었으며 '{0}' 플래그를 사용하는 경우에만 기본 가져오기와 함께 사용할 수 있습니다.",
|
|
1436
1440
|
"This_overload_signature_is_not_compatible_with_its_implementation_signature_2394": "이 오버로드 시그니처는 해당 구현 시그니처와 호환되지 않습니다.",
|
|
1437
1441
|
"This_parameter_is_not_allowed_with_use_strict_directive_1346": "이 매개 변수는 'use strict' 지시문에서 사용할 수 없습니다.",
|
|
1442
|
+
"This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_4120": "이 매개변수 속성은 기본 클래스 '{0}'의 멤버를 재정의하므로 '@override' 태그가 있는 JSDoc 주석이 있어야 합니다.",
|
|
1438
1443
|
"This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0_4115": "이 매개 변수 속성은 기본 클래스 '{0}'의 멤버를 재정의하므로 'override' 한정자를 포함해야 합니다.",
|
|
1439
1444
|
"This_spread_always_overwrites_this_property_2785": "이 스프레드는 항상 이 속성을 덮어씁니다.",
|
|
1440
1445
|
"This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found_2354": "이 구문에는 가져온 도우미가 필요하지만 '{0}' 모듈을 찾을 수 없습니다.",
|
|
@@ -1469,6 +1474,7 @@
|
|
|
1469
1474
|
"Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns__2549": "'{0}' 형식은 배열 형식 또는 문자열 형식이 아니거나, 반복기를 반환하는 '[Symbol.iterator]()' 메서드가 없습니다.",
|
|
1470
1475
|
"Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator_2548": "'{0}' 형식은 배열 형식이 아니거나 반복기를 반환하는 '[Symbol.iterator]()' 메서드가 없습니다.",
|
|
1471
1476
|
"Type_0_is_not_assignable_to_type_1_2322": "'{0}' 형식은 '{1}' 형식에 할당할 수 없습니다.",
|
|
1477
|
+
"Type_0_is_not_assignable_to_type_1_Did_you_mean_2_2820": "'{0}' 형식은 '{1}' 형식에 할당할 수 없습니다. '{2}'을(를) 의미했나요?",
|
|
1472
1478
|
"Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated_2719": "'{0}' 형식을 '{1}' 형식에 할당할 수 없습니다. 이름이 같은 2개의 서로 다른 형식이 있지만 서로 관련은 없습니다.",
|
|
1473
1479
|
"Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefi_2375": "'{0}' 유형은 'exactOptionalPropertyTypes: true'가 있는 '{1}' 유형에 할당할 수 없습니다. 대상 속성의 유형에 'undefined'를 추가하는 것을 고려하세요.",
|
|
1474
1480
|
"Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefi_2412": "'{0}' 유형은 'exactOptionalPropertyTypes: true'가 있는 '{1}' 유형에 할당할 수 없습니다. 대상 유형에 'undefined'를 추가하는 것을 고려하세요.",
|
package/lib/lib.es2018.intl.d.ts
CHANGED
|
@@ -60,10 +60,10 @@ declare namespace Intl {
|
|
|
60
60
|
// We can only have one definition for 'type' in TypeScript, and so you can learn where the keys come from here:
|
|
61
61
|
type ES2018NumberFormatPartType = "literal" | "nan" | "infinity" | "percent" | "integer" | "group" | "decimal" | "fraction" | "plusSign" | "minusSign" | "percentSign" | "currency" | "code" | "symbol" | "name";
|
|
62
62
|
type ES2020NumberFormatPartType = "compact" | "exponentInteger" | "exponentMinusSign" | "exponentSeparator" | "unit" | "unknown";
|
|
63
|
-
type
|
|
63
|
+
type NumberFormatPartTypes = ES2018NumberFormatPartType | ES2020NumberFormatPartType;
|
|
64
64
|
|
|
65
65
|
interface NumberFormatPart {
|
|
66
|
-
type:
|
|
66
|
+
type: NumberFormatPartTypes;
|
|
67
67
|
value: string;
|
|
68
68
|
}
|
|
69
69
|
|
package/lib/lib.es5.d.ts
CHANGED
|
@@ -1497,13 +1497,11 @@ interface Promise<T> {
|
|
|
1497
1497
|
*/
|
|
1498
1498
|
type Awaited<T> =
|
|
1499
1499
|
T extends null | undefined ? T : // special case for `null | undefined` when not in `--strictNullChecks` mode
|
|
1500
|
-
T extends object ? // `await` only unwraps object types with a callable then
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
T : // argument was not an object
|
|
1506
|
-
T; // non-thenable
|
|
1500
|
+
T extends object & { then(onfulfilled: infer F): any } ? // `await` only unwraps object types with a callable `then`. Non-object types are not unwrapped
|
|
1501
|
+
F extends ((value: infer V) => any) ? // if the argument to `then` is callable, extracts the argument
|
|
1502
|
+
Awaited<V> : // recursively unwrap the value
|
|
1503
|
+
never : // the argument to `then` was not callable
|
|
1504
|
+
T; // non-object or non-thenable
|
|
1507
1505
|
|
|
1508
1506
|
interface ArrayLike<T> {
|
|
1509
1507
|
readonly length: number;
|
|
@@ -1469,6 +1469,7 @@
|
|
|
1469
1469
|
"Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns__2549": "Typ „{0}” nie jest typem tablicy ani ciągu lub nie ma metody „[Symbol.iterator]()” zwracającej iterator.",
|
|
1470
1470
|
"Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator_2548": "Typ „{0}” nie jest typem tablicy lub nie ma metody „[Symbol.iterator]()” zwracającej iterator.",
|
|
1471
1471
|
"Type_0_is_not_assignable_to_type_1_2322": "Typu „{0}” nie można przypisać do typu „{1}”.",
|
|
1472
|
+
"Type_0_is_not_assignable_to_type_1_Did_you_mean_2_2820": "Nie można przypisać typu „{0}” do typu „{1}”. Czy chodziło Ci o „{2}”?",
|
|
1472
1473
|
"Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated_2719": "Typu „{0}” nie można przypisać do typu „{1}”. Istnieją dwa różne typy o tej nazwie, lecz są ze sobą niezwiązane.",
|
|
1473
1474
|
"Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefi_2375": "Nie można przypisać typu \"{0}\" do typu \"{1}\" o wartości \"exactOptionalPropertyTypes: true\". Rozważ dodanie elementu \"undefined\" do typów właściwości obiektu docelowego.",
|
|
1474
1475
|
"Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefi_2412": "Nie można przypisać typu \"{0}\" do typu \"{1}\" o wartości \"exactOptionalPropertyTypes: true\". Rozważ dodanie elementu \"undefined\" do typu elementu docelowego.",
|
package/lib/protocol.d.ts
CHANGED
|
@@ -2647,6 +2647,7 @@ declare namespace ts.server.protocol {
|
|
|
2647
2647
|
readonly provideRefactorNotApplicableReason?: boolean;
|
|
2648
2648
|
readonly allowRenameOfImportPath?: boolean;
|
|
2649
2649
|
readonly includePackageJsonAutoImports?: "auto" | "on" | "off";
|
|
2650
|
+
readonly jsxSnippetCompletion?: "auto" | "braces" | "none";
|
|
2650
2651
|
readonly displayPartsForJSDoc?: boolean;
|
|
2651
2652
|
readonly generateReturnInDocTemplate?: boolean;
|
|
2652
2653
|
}
|
|
@@ -1426,15 +1426,20 @@
|
|
|
1426
1426
|
"This_import_is_never_used_as_a_value_and_must_use_import_type_because_importsNotUsedAsValues_is_set__1371": "Esta importação nunca é usada como um valor e precisa usar um 'tipo de importação' porque 'importsNotUsedAsValues' está definido como 'erro'.",
|
|
1427
1427
|
"This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_fil_6233": "Esta é a declaração que está sendo aumentada. Considere mover a declaração em aumento para o mesmo arquivo.",
|
|
1428
1428
|
"This_may_be_converted_to_an_async_function_80006": "Isso pode ser convertido em uma função assíncrona.",
|
|
1429
|
+
"This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4122": "Este membro não pode ter um comentário JSDoc com uma marca '@override' porque ele não está declarado na classe base '{0}'.",
|
|
1430
|
+
"This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4123": "Esse membro não pode ter um comentário JSDoc com uma marca 'override' porque ele não está declarado na classe base '{0}'. Você quis dizer '{1}'?",
|
|
1431
|
+
"This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_4121": "Este membro não pode ter um comentário JSDoc com uma marca '@override' porque sua classe que contém '{0}' não estende outra classe.",
|
|
1429
1432
|
"This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_4113": "Este membro não pode ter um modificador 'override' porque não está declarado na classe base '{0}'.",
|
|
1430
1433
|
"This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you__4117": "Esse membro não pode ter um modificador de 'substituição' porque ele não é declarado na classe base '{0}'. Você quis dizer '{1}'?",
|
|
1431
1434
|
"This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another__4112": "Este membro não pode ter um modificador 'override' porque a classe que o contém, '{0}', não se estende para outra classe.",
|
|
1435
|
+
"This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_4119": "Essa membro deve ter um comentário JSDoc com uma marca '@override' porque ela substitui um membro na classe base '{0}'.",
|
|
1432
1436
|
"This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0_4114": "Este membro precisa ter um modificador 'override' porque substitui um membro na classe base '{0}'.",
|
|
1433
1437
|
"This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared__4116": "Este membro precisa ter um modificador 'override' porque substitui um método abstrato que é declarado na classe base '{0}'.",
|
|
1434
1438
|
"This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_2497": "Esse módulo só pode ser referenciado com importações/exportações de ECMAScript ligando o sinalizador '{0}' e referenciando sua exportação padrão.",
|
|
1435
1439
|
"This_module_is_declared_with_using_export_and_can_only_be_used_with_a_default_import_when_using_the__2594": "Esse módulo é declarado com o uso de 'export =' e só pode ser usado com uma importação padrão ao usar o sinalizador '{0}'.",
|
|
1436
1440
|
"This_overload_signature_is_not_compatible_with_its_implementation_signature_2394": "Esta assinatura de sobrecarga não é compatível com sua assinatura de implementação.",
|
|
1437
1441
|
"This_parameter_is_not_allowed_with_use_strict_directive_1346": "Este parâmetro não é permitido com a diretiva 'use strict'.",
|
|
1442
|
+
"This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_4120": "Essa propriedade de parâmetro deve ter um comentário JSDoc com uma marca '@override' porque ela substitui um membro na classe base '{0}'.",
|
|
1438
1443
|
"This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0_4115": "Esta propriedade de parâmetro deve ter uma modificação de 'substituição' porque substitui um membro na classe base '{0}'.",
|
|
1439
1444
|
"This_spread_always_overwrites_this_property_2785": "Essa difusão sempre substitui essa propriedade.",
|
|
1440
1445
|
"This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found_2354": "Essa sintaxe requer um auxiliar importado, mas o módulo '{0}' não pode ser encontrado.",
|
|
@@ -1469,6 +1474,7 @@
|
|
|
1469
1474
|
"Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns__2549": "O tipo '{0}' não é um tipo de matriz de um tipo de cadeia ou não tem um método '[Symbol.iterator]()' que retorna um iterador.",
|
|
1470
1475
|
"Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator_2548": "O tipo '{0}' não é um tipo de matriz ou não tem um método '[Symbol.iterator]()' que retorna um iterador.",
|
|
1471
1476
|
"Type_0_is_not_assignable_to_type_1_2322": "O tipo '{0}' não pode ser atribuído ao tipo '{1}'.",
|
|
1477
|
+
"Type_0_is_not_assignable_to_type_1_Did_you_mean_2_2820": "O tipo '' não pode ser atribuído ao tipo {0} '{1}'. Você quis dizer '{2}'?",
|
|
1472
1478
|
"Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated_2719": "O tipo '{0}' não é atribuível ao tipo '{1}'. Dois tipos diferentes com esse nome existem, mas eles não estão relacionados.",
|
|
1473
1479
|
"Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefi_2375": "O tipo '{0}' não pode ser atribuído ao tipo '{1}' com 'exactOptionalPropertyTypes: true'. Considere adicionar 'undefined' aos tipos das propriedades do destino.",
|
|
1474
1480
|
"Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefi_2412": "O tipo '{0}' não pode ser atribuído ao tipo '{1}' com 'exactOptionalPropertyTypes: true'. Considere adicionar 'undefined' ao tipo do destino.",
|
|
@@ -1469,6 +1469,7 @@
|
|
|
1469
1469
|
"Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns__2549": "{0} не является типом массива или строки или в нем нет метода [Symbol.iterator](), который возвращает итератор.",
|
|
1470
1470
|
"Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator_2548": "{0} не является типом массива или в нем нет метода [Symbol.iterator](), который возвращает итератор.",
|
|
1471
1471
|
"Type_0_is_not_assignable_to_type_1_2322": "Тип \"{0}\" не может быть назначен для типа \"{1}\".",
|
|
1472
|
+
"Type_0_is_not_assignable_to_type_1_Did_you_mean_2_2820": "Тип \"{0}\" невозможно присвоить типу \"{1}\". Вы имели в виду \"{2}\"?",
|
|
1472
1473
|
"Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated_2719": "Тип \"{0}\" невозможно присвоить типу \"{1}\". Существует два разных типа с таким именем, но они не связаны.",
|
|
1473
1474
|
"Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefi_2375": "Невозможно назначить тип \"{0}\" типу \"{1}\", когда свойство \"exactOptionalPropertyTypes\" имеет значение \"true\". Рассмотрите возможность добавления типа \"undefined\" к типам свойств цели.",
|
|
1474
1475
|
"Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefi_2412": "Невозможно назначить тип \"{0}\" типу \"{1}\", когда свойство \"exactOptionalPropertyTypes\" имеет значение \"true\". Рассмотрите возможность добавления типа \"undefined\" к типу цели.",
|
|
@@ -1426,15 +1426,20 @@
|
|
|
1426
1426
|
"This_import_is_never_used_as_a_value_and_must_use_import_type_because_importsNotUsedAsValues_is_set__1371": "'importsNotUsedAsValues' 'error' olarak ayarlandığından, bu içeri aktarma hiçbir zaman değer olarak kullanılmaz ve 'import type' kullanmalıdır.",
|
|
1427
1427
|
"This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_fil_6233": "Bu, genişletilmekte olan bildirimdir. Genişleten bildirimi aynı dosyaya taşımayı düşünün.",
|
|
1428
1428
|
"This_may_be_converted_to_an_async_function_80006": "Bu, asenkron bir işleve dönüştürülebilir.",
|
|
1429
|
+
"This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4122": "Bu üye, '{0}' temel sınıfında bildirilmediğinden '@override' etiketi olan bir JSDoc yorumuna sahip olamaz.",
|
|
1430
|
+
"This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4123": "Bu üye, '{0}' temel sınıfında bildirilmediğinden 'override' etiketi olan bir JSDoc yorumuna sahip olamaz. '{1}' öğesini mi kastettiniz?",
|
|
1431
|
+
"This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_4121": "Kapsayan sınıfı '{0}' başka bir sınıfı genişletmediğinden, bu üye '@override' etiketi olan bir JSDoc yorumuna sahip olamaz.",
|
|
1429
1432
|
"This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_4113": "Bu üye '{0}' temel sınıfında bildirilmediğinden 'override' değiştiricisine sahip olamaz.",
|
|
1430
1433
|
"This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you__4117": "Bu üye, '{0}' temel sınıfında bildirilmediğinden 'override' değiştiricisine sahip olamaz. '{1}' öğesini mi kastettiniz?",
|
|
1431
1434
|
"This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another__4112": "Kapsayan '{0}' sınıfı başka bir sınıfı genişletmediğinden bu üye 'override' değiştiricisine sahip olamaz.",
|
|
1435
|
+
"This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_4119": "' {0}' temel sınıfındaki bir üyeyi geçersiz kıldığından, bu üyenin '@override' etiketi olan bir JSDoc yorumu olmalıdır.",
|
|
1432
1436
|
"This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0_4114": "Bu üye, '{0}' temel sınıfındaki bir üyeyi geçersiz kıldığından 'override' değiştiricisine sahip olmalıdır.",
|
|
1433
1437
|
"This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared__4116": "Bu üye, '{0}' temel sınıfında bildirilen soyut bir metodu geçersiz kıldığından 'override' değiştiricisine sahip olmalıdır.",
|
|
1434
1438
|
"This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_2497": "Bu modüle yalnızca '{0}' bayrağını açıp modülün varsayılan dışarı aktarma işlemine başvurarak ECMAScript içeri/dışarı aktarma işlemleri ile başvurulabilir.",
|
|
1435
1439
|
"This_module_is_declared_with_using_export_and_can_only_be_used_with_a_default_import_when_using_the__2594": "Bu modül, 'export =' kullanılarak bildirildi ve yalnızca '{0}' bayrağı kullanılırken varsayılan bir içeri aktarma ile kullanılabilir.",
|
|
1436
1440
|
"This_overload_signature_is_not_compatible_with_its_implementation_signature_2394": "Bu aşırı yükleme imzası, uygulama imzasıyla uyumlu değil.",
|
|
1437
1441
|
"This_parameter_is_not_allowed_with_use_strict_directive_1346": "Bu parametreye 'use strict' yönergesi ile izin verilmiyor.",
|
|
1442
|
+
"This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_4120": "' {0}' temel sınıfındaki bir üyeyi geçersiz kıldığından, bu parametre özelliğinin '@override' etiketi olan bir JSDoc yorumu olmalıdır.",
|
|
1438
1443
|
"This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0_4115": "Bu parametre özelliği, '{0}' temel sınıfındaki bir üyeyi geçersiz kıldığından bir 'override' değiştiricisi içermelidir.",
|
|
1439
1444
|
"This_spread_always_overwrites_this_property_2785": "Bu yayılma her zaman bu özelliğin üzerine yazar.",
|
|
1440
1445
|
"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.",
|
|
@@ -1469,6 +1474,7 @@
|
|
|
1469
1474
|
"Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns__2549": "'{0}' türü, bir dizi türü veya dize türü değil ya da bir yineleyici döndüren '[Symbol.iterator]()' metoduna sahip değil.",
|
|
1470
1475
|
"Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator_2548": "'{0}' türü, bir dizi türü değil ya da bir yineleyici döndüren '[Symbol.iterator]()' metoduna sahip değil.",
|
|
1471
1476
|
"Type_0_is_not_assignable_to_type_1_2322": "'{0}' türü, '{1}' türüne atanamaz.",
|
|
1477
|
+
"Type_0_is_not_assignable_to_type_1_Did_you_mean_2_2820": "'{0}' türü '{1}' türüne atanamaz. '{2}' mi demek istediniz?",
|
|
1472
1478
|
"Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated_2719": "'{0}' türü '{1}' türüne atanamaz. Bu ada sahip iki farklı tür mevcut, ancak bu türler birbiriyle ilişkisiz.",
|
|
1473
1479
|
"Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefi_2375": "'{0}' türü, '{1}' türüne 'exactOptionalPropertyTypes: true' ile atanamaz. Hedef özelliklerinin türlerine 'undefined' eklemeyi deneyin.",
|
|
1474
1480
|
"Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefi_2412": "'{0}' türü, '{1}' türüne 'exactOptionalPropertyTypes: true' ile atanamaz. Hedef türüne 'undefined' eklemeyi deneyin.",
|
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-insiders.
|
|
72
|
+
ts.version = ts.versionMajorMinor + ".0-insiders.20210916";
|
|
73
73
|
var NativeCollections;
|
|
74
74
|
(function (NativeCollections) {
|
|
75
75
|
function tryGetNativeMap() {
|
|
@@ -3259,8 +3259,6 @@ var ts;
|
|
|
3259
3259
|
(function (ModuleResolutionKind) {
|
|
3260
3260
|
ModuleResolutionKind[ModuleResolutionKind["Classic"] = 1] = "Classic";
|
|
3261
3261
|
ModuleResolutionKind[ModuleResolutionKind["NodeJs"] = 2] = "NodeJs";
|
|
3262
|
-
ModuleResolutionKind[ModuleResolutionKind["Node12"] = 3] = "Node12";
|
|
3263
|
-
ModuleResolutionKind[ModuleResolutionKind["NodeNext"] = 99] = "NodeNext";
|
|
3264
3262
|
})(ModuleResolutionKind = ts.ModuleResolutionKind || (ts.ModuleResolutionKind = {}));
|
|
3265
3263
|
var WatchFileKind;
|
|
3266
3264
|
(function (WatchFileKind) {
|
|
@@ -3295,8 +3293,6 @@ var ts;
|
|
|
3295
3293
|
ModuleKind[ModuleKind["ES2015"] = 5] = "ES2015";
|
|
3296
3294
|
ModuleKind[ModuleKind["ES2020"] = 6] = "ES2020";
|
|
3297
3295
|
ModuleKind[ModuleKind["ESNext"] = 99] = "ESNext";
|
|
3298
|
-
ModuleKind[ModuleKind["Node12"] = 100] = "Node12";
|
|
3299
|
-
ModuleKind[ModuleKind["NodeNext"] = 199] = "NodeNext";
|
|
3300
3296
|
})(ModuleKind = ts.ModuleKind || (ts.ModuleKind = {}));
|
|
3301
3297
|
ts.commentPragmas = {
|
|
3302
3298
|
"reference": {
|
|
@@ -5297,7 +5293,7 @@ var ts;
|
|
|
5297
5293
|
Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: diag(1320, ts.DiagnosticCategory.Error, "Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member_1320", "Type of 'await' operand must either be a valid promise or must not contain a callable 'then' member."),
|
|
5298
5294
|
Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: diag(1321, ts.DiagnosticCategory.Error, "Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_cal_1321", "Type of 'yield' operand in an async generator must either be a valid promise or must not contain a callable 'then' member."),
|
|
5299
5295
|
Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: diag(1322, ts.DiagnosticCategory.Error, "Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_con_1322", "Type of iterated elements of a 'yield*' operand must either be a valid promise or must not contain a callable 'then' member."),
|
|
5300
|
-
|
|
5296
|
+
Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_esnext_commonjs_amd_system_or_umd: diag(1323, ts.DiagnosticCategory.Error, "Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_esnext_commonjs_amd_system__1323", "Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'esnext', 'commonjs', 'amd', 'system', or 'umd'."),
|
|
5301
5297
|
Dynamic_import_must_have_one_specifier_as_an_argument: diag(1324, ts.DiagnosticCategory.Error, "Dynamic_import_must_have_one_specifier_as_an_argument_1324", "Dynamic import must have one specifier as an argument."),
|
|
5302
5298
|
Specifier_of_dynamic_import_cannot_be_spread_element: diag(1325, ts.DiagnosticCategory.Error, "Specifier_of_dynamic_import_cannot_be_spread_element_1325", "Specifier of dynamic import cannot be spread element."),
|
|
5303
5299
|
Dynamic_import_cannot_have_type_arguments: diag(1326, ts.DiagnosticCategory.Error, "Dynamic_import_cannot_have_type_arguments_1326", "Dynamic import cannot have type arguments."),
|
|
@@ -5315,7 +5311,7 @@ var ts;
|
|
|
5315
5311
|
Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here: diag(1339, ts.DiagnosticCategory.Error, "Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here_1339", "Module '{0}' does not refer to a value, but is used as a value here."),
|
|
5316
5312
|
Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0: diag(1340, ts.DiagnosticCategory.Error, "Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0_1340", "Module '{0}' does not refer to a type, but is used as a type here. Did you mean 'typeof import('{0}')'?"),
|
|
5317
5313
|
Type_arguments_cannot_be_used_here: diag(1342, ts.DiagnosticCategory.Error, "Type_arguments_cannot_be_used_here_1342", "Type arguments cannot be used here."),
|
|
5318
|
-
|
|
5314
|
+
The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_esnext_or_system: diag(1343, ts.DiagnosticCategory.Error, "The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_esnext_or_system_1343", "The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'esnext', or 'system'."),
|
|
5319
5315
|
A_label_is_not_allowed_here: diag(1344, ts.DiagnosticCategory.Error, "A_label_is_not_allowed_here_1344", "'A label is not allowed here."),
|
|
5320
5316
|
An_expression_of_type_void_cannot_be_tested_for_truthiness: diag(1345, ts.DiagnosticCategory.Error, "An_expression_of_type_void_cannot_be_tested_for_truthiness_1345", "An expression of type 'void' cannot be tested for truthiness."),
|
|
5321
5317
|
This_parameter_is_not_allowed_with_use_strict_directive: diag(1346, ts.DiagnosticCategory.Error, "This_parameter_is_not_allowed_with_use_strict_directive_1346", "This parameter is not allowed with 'use strict' directive."),
|
|
@@ -5346,7 +5342,7 @@ var ts;
|
|
|
5346
5342
|
await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module: diag(1375, ts.DiagnosticCategory.Error, "await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_fi_1375", "'await' expressions are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module."),
|
|
5347
5343
|
_0_was_imported_here: diag(1376, ts.DiagnosticCategory.Message, "_0_was_imported_here_1376", "'{0}' was imported here."),
|
|
5348
5344
|
_0_was_exported_here: diag(1377, ts.DiagnosticCategory.Message, "_0_was_exported_here_1377", "'{0}' was exported here."),
|
|
5349
|
-
|
|
5345
|
+
Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_esnext_or_system_and_the_target_option_is_set_to_es2017_or_higher: diag(1378, ts.DiagnosticCategory.Error, "Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_esnext_or_system_and_t_1378", "Top-level 'await' expressions are only allowed when the 'module' option is set to 'esnext' or 'system', and the 'target' option is set to 'es2017' or higher."),
|
|
5350
5346
|
An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type: diag(1379, ts.DiagnosticCategory.Error, "An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type_1379", "An import alias cannot reference a declaration that was exported using 'export type'."),
|
|
5351
5347
|
An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type: diag(1380, ts.DiagnosticCategory.Error, "An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type_1380", "An import alias cannot reference a declaration that was imported using 'import type'."),
|
|
5352
5348
|
Unexpected_token_Did_you_mean_or_rbrace: diag(1381, ts.DiagnosticCategory.Error, "Unexpected_token_Did_you_mean_or_rbrace_1381", "Unexpected token. Did you mean `{'}'}` or `}`?"),
|
|
@@ -5398,7 +5394,7 @@ var ts;
|
|
|
5398
5394
|
File_redirects_to_file_0: diag(1429, ts.DiagnosticCategory.Message, "File_redirects_to_file_0_1429", "File redirects to file '{0}'"),
|
|
5399
5395
|
The_file_is_in_the_program_because_Colon: diag(1430, ts.DiagnosticCategory.Message, "The_file_is_in_the_program_because_Colon_1430", "The file is in the program because:"),
|
|
5400
5396
|
for_await_loops_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module: diag(1431, ts.DiagnosticCategory.Error, "for_await_loops_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_1431", "'for await' loops are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module."),
|
|
5401
|
-
|
|
5397
|
+
Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_esnext_or_system_and_the_target_option_is_set_to_es2017_or_higher: diag(1432, ts.DiagnosticCategory.Error, "Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_esnext_or_system_and_the_1432", "Top-level 'for await' loops are only allowed when the 'module' option is set to 'esnext' or 'system', and the 'target' option is set to 'es2017' or higher."),
|
|
5402
5398
|
Decorators_may_not_be_applied_to_this_parameters: diag(1433, ts.DiagnosticCategory.Error, "Decorators_may_not_be_applied_to_this_parameters_1433", "Decorators may not be applied to 'this' parameters."),
|
|
5403
5399
|
Unexpected_keyword_or_identifier: diag(1434, ts.DiagnosticCategory.Error, "Unexpected_keyword_or_identifier_1434", "Unexpected keyword or identifier."),
|
|
5404
5400
|
Unknown_keyword_or_identifier_Did_you_mean_0: diag(1435, ts.DiagnosticCategory.Error, "Unknown_keyword_or_identifier_Did_you_mean_0_1435", "Unknown keyword or identifier. Did you mean '{0}'?"),
|
|
@@ -5414,8 +5410,6 @@ var ts;
|
|
|
5414
5410
|
_0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_preserveValueImports_and_isolatedModules_are_both_enabled: diag(1446, ts.DiagnosticCategory.Error, "_0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_preserveVa_1446", "'{0}' resolves to a type-only declaration and must be imported using a type-only import when 'preserveValueImports' and 'isolatedModules' are both enabled."),
|
|
5415
5411
|
_0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_isolatedModules_is_enabled: diag(1448, ts.DiagnosticCategory.Error, "_0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_isol_1448", "'{0}' resolves to a type-only declaration and must be re-exported using a type-only re-export when 'isolatedModules' is enabled."),
|
|
5416
5412
|
Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed: diag(1449, ts.DiagnosticCategory.Message, "Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed_1449", "Preserve unused imported values in the JavaScript output that would otherwise be removed."),
|
|
5417
|
-
The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output: diag(1470, ts.DiagnosticCategory.Error, "The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output_1470", "The 'import.meta' meta-property is not allowed in files which will build into CommonJS output."),
|
|
5418
|
-
Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_es_module_which_cannot_be_imported_synchronously_Use_dynamic_import_instead: diag(1471, ts.DiagnosticCategory.Error, "Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_es_module_which_c_1471", "Module '{0}' cannot be imported using this construct. The specifier only resolves to an es module, which cannot be imported synchronously. Use dynamic import instead."),
|
|
5419
5413
|
The_types_of_0_are_incompatible_between_these_types: diag(2200, ts.DiagnosticCategory.Error, "The_types_of_0_are_incompatible_between_these_types_2200", "The types of '{0}' are incompatible between these types."),
|
|
5420
5414
|
The_types_returned_by_0_are_incompatible_between_these_types: diag(2201, ts.DiagnosticCategory.Error, "The_types_returned_by_0_are_incompatible_between_these_types_2201", "The types returned by '{0}' are incompatible between these types."),
|
|
5421
5415
|
Call_signature_return_types_0_and_1_are_incompatible: diag(2202, ts.DiagnosticCategory.Error, "Call_signature_return_types_0_and_1_are_incompatible_2202", "Call signature return types '{0}' and '{1}' are incompatible.", undefined, true),
|
|
@@ -5994,6 +5988,11 @@ var ts;
|
|
|
5994
5988
|
This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared_in_the_base_class_0: diag(4116, ts.DiagnosticCategory.Error, "This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared__4116", "This member must have an 'override' modifier because it overrides an abstract method that is declared in the base class '{0}'."),
|
|
5995
5989
|
This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1: diag(4117, ts.DiagnosticCategory.Error, "This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you__4117", "This member cannot have an 'override' modifier because it is not declared in the base class '{0}'. Did you mean '{1}'?"),
|
|
5996
5990
|
The_type_of_this_node_cannot_be_serialized_because_its_property_0_cannot_be_serialized: diag(4118, ts.DiagnosticCategory.Error, "The_type_of_this_node_cannot_be_serialized_because_its_property_0_cannot_be_serialized_4118", "The type of this node cannot be serialized because its property '{0}' cannot be serialized."),
|
|
5991
|
+
This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0: diag(4119, ts.DiagnosticCategory.Error, "This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_4119", "This member must have a JSDoc comment with an '@override' tag because it overrides a member in the base class '{0}'."),
|
|
5992
|
+
This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0: diag(4120, ts.DiagnosticCategory.Error, "This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_4120", "This parameter property must have a JSDoc comment with an '@override' tag because it overrides a member in the base class '{0}'."),
|
|
5993
|
+
This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_extend_another_class: diag(4121, ts.DiagnosticCategory.Error, "This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_4121", "This member cannot have a JSDoc comment with an '@override' tag because its containing class '{0}' does not extend another class."),
|
|
5994
|
+
This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0: diag(4122, ts.DiagnosticCategory.Error, "This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4122", "This member cannot have a JSDoc comment with an '@override' tag because it is not declared in the base class '{0}'."),
|
|
5995
|
+
This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1: diag(4123, ts.DiagnosticCategory.Error, "This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4123", "This member cannot have a JSDoc comment with an 'override' tag because it is not declared in the base class '{0}'. Did you mean '{1}'?"),
|
|
5997
5996
|
The_current_host_does_not_support_the_0_option: diag(5001, ts.DiagnosticCategory.Error, "The_current_host_does_not_support_the_0_option_5001", "The current host does not support the '{0}' option."),
|
|
5998
5997
|
Cannot_find_the_common_subdirectory_path_for_the_input_files: diag(5009, ts.DiagnosticCategory.Error, "Cannot_find_the_common_subdirectory_path_for_the_input_files_5009", "Cannot find the common subdirectory path for the input files."),
|
|
5999
5998
|
File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0: diag(5010, ts.DiagnosticCategory.Error, "File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0_5010", "File specification cannot end in a recursive directory wildcard ('**'): '{0}'."),
|
|
@@ -6278,13 +6277,6 @@ var ts;
|
|
|
6278
6277
|
Output_Formatting: diag(6256, ts.DiagnosticCategory.Message, "Output_Formatting_6256", "Output Formatting"),
|
|
6279
6278
|
Completeness: diag(6257, ts.DiagnosticCategory.Message, "Completeness_6257", "Completeness"),
|
|
6280
6279
|
_0_should_be_set_inside_the_compilerOptions_object_of_the_config_json_file: diag(6258, ts.DiagnosticCategory.Error, "_0_should_be_set_inside_the_compilerOptions_object_of_the_config_json_file_6258", "'{0}' should be set inside the 'compilerOptions' object of the config json file"),
|
|
6281
|
-
Directory_0_has_no_containing_package_json_scope_Imports_will_not_resolve: diag(6270, ts.DiagnosticCategory.Message, "Directory_0_has_no_containing_package_json_scope_Imports_will_not_resolve_6270", "Directory '{0}' has no containing package.json scope. Imports will not resolve."),
|
|
6282
|
-
Import_specifier_0_does_not_exist_in_package_json_scope_at_path_1: diag(6271, ts.DiagnosticCategory.Message, "Import_specifier_0_does_not_exist_in_package_json_scope_at_path_1_6271", "Import specifier '{0}' does not exist in package.json scope at path '{1}'."),
|
|
6283
|
-
Invalid_import_specifier_0_has_no_possible_resolutions: diag(6272, ts.DiagnosticCategory.Message, "Invalid_import_specifier_0_has_no_possible_resolutions_6272", "Invalid import specifier '{0}' has no possible resolutions."),
|
|
6284
|
-
package_json_scope_0_has_no_imports_defined: diag(6273, ts.DiagnosticCategory.Message, "package_json_scope_0_has_no_imports_defined_6273", "package.json scope '{0}' has no imports defined."),
|
|
6285
|
-
package_json_scope_0_explicitly_maps_specifier_1_to_null: diag(6274, ts.DiagnosticCategory.Message, "package_json_scope_0_explicitly_maps_specifier_1_to_null_6274", "package.json scope '{0}' explicitly maps specifier '{1}' to null."),
|
|
6286
|
-
package_json_scope_0_has_invalid_type_for_target_of_specifier_1: diag(6275, ts.DiagnosticCategory.Message, "package_json_scope_0_has_invalid_type_for_target_of_specifier_1_6275", "package.json scope '{0}' has invalid type for target of specifier '{1}'"),
|
|
6287
|
-
Export_specifier_0_does_not_exist_in_package_json_scope_at_path_1: diag(6276, ts.DiagnosticCategory.Message, "Export_specifier_0_does_not_exist_in_package_json_scope_at_path_1_6276", "Export specifier '{0}' does not exist in package.json scope at path '{1}'."),
|
|
6288
6280
|
Enable_project_compilation: diag(6302, ts.DiagnosticCategory.Message, "Enable_project_compilation_6302", "Enable project compilation"),
|
|
6289
6281
|
Composite_projects_may_not_disable_declaration_emit: diag(6304, ts.DiagnosticCategory.Error, "Composite_projects_may_not_disable_declaration_emit_6304", "Composite projects may not disable declaration emit."),
|
|
6290
6282
|
Output_file_0_has_not_been_built_from_source_file_1: diag(6305, ts.DiagnosticCategory.Error, "Output_file_0_has_not_been_built_from_source_file_1_6305", "Output file '{0}' has not been built from source file '{1}'."),
|
|
@@ -6544,8 +6536,6 @@ var ts;
|
|
|
6544
6536
|
The_inferred_type_of_this_node_exceeds_the_maximum_length_the_compiler_will_serialize_An_explicit_type_annotation_is_needed: diag(7056, ts.DiagnosticCategory.Error, "The_inferred_type_of_this_node_exceeds_the_maximum_length_the_compiler_will_serialize_An_explicit_ty_7056", "The inferred type of this node exceeds the maximum length the compiler will serialize. An explicit type annotation is needed."),
|
|
6545
6537
|
yield_expression_implicitly_results_in_an_any_type_because_its_containing_generator_lacks_a_return_type_annotation: diag(7057, ts.DiagnosticCategory.Error, "yield_expression_implicitly_results_in_an_any_type_because_its_containing_generator_lacks_a_return_t_7057", "'yield' expression implicitly results in an 'any' type because its containing generator lacks a return-type annotation."),
|
|
6546
6538
|
If_the_0_package_actually_exposes_this_module_try_adding_a_new_declaration_d_ts_file_containing_declare_module_1: diag(7058, ts.DiagnosticCategory.Error, "If_the_0_package_actually_exposes_this_module_try_adding_a_new_declaration_d_ts_file_containing_decl_7058", "If the '{0}' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '{1}';`"),
|
|
6547
|
-
This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead: diag(7059, ts.DiagnosticCategory.Error, "This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead_7059", "This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead."),
|
|
6548
|
-
This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Add_a_trailing_comma_or_explicit_constraint: diag(7060, ts.DiagnosticCategory.Error, "This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Add_a_trailing_comma_or_explicit_cons_7060", "This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma or explicit constraint."),
|
|
6549
6539
|
You_cannot_rename_this_element: diag(8000, ts.DiagnosticCategory.Error, "You_cannot_rename_this_element_8000", "You cannot rename this element."),
|
|
6550
6540
|
You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library: diag(8001, ts.DiagnosticCategory.Error, "You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library_8001", "You cannot rename elements that are defined in the standard TypeScript library."),
|
|
6551
6541
|
import_can_only_be_used_in_TypeScript_files: diag(8002, ts.DiagnosticCategory.Error, "import_can_only_be_used_in_TypeScript_files_8002", "'import ... =' can only be used in TypeScript files."),
|
|
@@ -8917,7 +8907,7 @@ var ts;
|
|
|
8917
8907
|
}
|
|
8918
8908
|
ts.sortAndDeduplicateDiagnostics = sortAndDeduplicateDiagnostics;
|
|
8919
8909
|
function getDefaultLibFileName(options) {
|
|
8920
|
-
switch (
|
|
8910
|
+
switch (options.target) {
|
|
8921
8911
|
case 99:
|
|
8922
8912
|
return "lib.esnext.full.d.ts";
|
|
8923
8913
|
case 8:
|
|
@@ -10599,22 +10589,22 @@ var ts;
|
|
|
10599
10589
|
return node.end - node.pos;
|
|
10600
10590
|
}
|
|
10601
10591
|
ts.getFullWidth = getFullWidth;
|
|
10602
|
-
function getResolvedModule(sourceFile, moduleNameText
|
|
10603
|
-
return sourceFile && sourceFile.resolvedModules && sourceFile.resolvedModules.get(moduleNameText
|
|
10592
|
+
function getResolvedModule(sourceFile, moduleNameText) {
|
|
10593
|
+
return sourceFile && sourceFile.resolvedModules && sourceFile.resolvedModules.get(moduleNameText);
|
|
10604
10594
|
}
|
|
10605
10595
|
ts.getResolvedModule = getResolvedModule;
|
|
10606
|
-
function setResolvedModule(sourceFile, moduleNameText, resolvedModule
|
|
10596
|
+
function setResolvedModule(sourceFile, moduleNameText, resolvedModule) {
|
|
10607
10597
|
if (!sourceFile.resolvedModules) {
|
|
10608
|
-
sourceFile.resolvedModules = ts.
|
|
10598
|
+
sourceFile.resolvedModules = new ts.Map();
|
|
10609
10599
|
}
|
|
10610
|
-
sourceFile.resolvedModules.set(moduleNameText,
|
|
10600
|
+
sourceFile.resolvedModules.set(moduleNameText, resolvedModule);
|
|
10611
10601
|
}
|
|
10612
10602
|
ts.setResolvedModule = setResolvedModule;
|
|
10613
10603
|
function setResolvedTypeReferenceDirective(sourceFile, typeReferenceDirectiveName, resolvedTypeReferenceDirective) {
|
|
10614
10604
|
if (!sourceFile.resolvedTypeReferenceDirectiveNames) {
|
|
10615
|
-
sourceFile.resolvedTypeReferenceDirectiveNames = ts.
|
|
10605
|
+
sourceFile.resolvedTypeReferenceDirectiveNames = new ts.Map();
|
|
10616
10606
|
}
|
|
10617
|
-
sourceFile.resolvedTypeReferenceDirectiveNames.set(typeReferenceDirectiveName,
|
|
10607
|
+
sourceFile.resolvedTypeReferenceDirectiveNames.set(typeReferenceDirectiveName, resolvedTypeReferenceDirective);
|
|
10618
10608
|
}
|
|
10619
10609
|
ts.setResolvedTypeReferenceDirective = setResolvedTypeReferenceDirective;
|
|
10620
10610
|
function projectReferenceIsEqualTo(oldRef, newRef) {
|
|
@@ -10646,11 +10636,11 @@ var ts;
|
|
|
10646
10636
|
&& oldResolution.originalPath === newResolution.originalPath;
|
|
10647
10637
|
}
|
|
10648
10638
|
ts.typeDirectiveIsEqualTo = typeDirectiveIsEqualTo;
|
|
10649
|
-
function hasChangesInResolutions(names, newResolutions, oldResolutions,
|
|
10639
|
+
function hasChangesInResolutions(names, newResolutions, oldResolutions, comparer) {
|
|
10650
10640
|
ts.Debug.assert(names.length === newResolutions.length);
|
|
10651
10641
|
for (var i = 0; i < names.length; i++) {
|
|
10652
10642
|
var newResolution = newResolutions[i];
|
|
10653
|
-
var oldResolution = oldResolutions && oldResolutions.get(names[i]
|
|
10643
|
+
var oldResolution = oldResolutions && oldResolutions.get(names[i]);
|
|
10654
10644
|
var changed = oldResolution
|
|
10655
10645
|
? !newResolution || !comparer(oldResolution, newResolution)
|
|
10656
10646
|
: newResolution;
|
|
@@ -11094,11 +11084,8 @@ var ts;
|
|
|
11094
11084
|
return (_a = symbol.declarations) === null || _a === void 0 ? void 0 : _a.find(function (d) { return !isExternalModuleAugmentation(d) && !(ts.isModuleDeclaration(d) && isGlobalScopeAugmentation(d)); });
|
|
11095
11085
|
}
|
|
11096
11086
|
ts.getNonAugmentationDeclaration = getNonAugmentationDeclaration;
|
|
11097
|
-
function isCommonJSContainingModuleKind(kind) {
|
|
11098
|
-
return kind === ts.ModuleKind.CommonJS || kind === ts.ModuleKind.Node12 || kind === ts.ModuleKind.NodeNext;
|
|
11099
|
-
}
|
|
11100
11087
|
function isEffectiveExternalModule(node, compilerOptions) {
|
|
11101
|
-
return ts.isExternalModule(node) || compilerOptions.isolatedModules || (
|
|
11088
|
+
return ts.isExternalModule(node) || compilerOptions.isolatedModules || ((getEmitModuleKind(compilerOptions) === ts.ModuleKind.CommonJS) && !!node.commonJsModuleIndicator);
|
|
11102
11089
|
}
|
|
11103
11090
|
ts.isEffectiveExternalModule = isEffectiveExternalModule;
|
|
11104
11091
|
function isEffectiveStrictModeSourceFile(node, compilerOptions) {
|
|
@@ -13953,17 +13940,9 @@ var ts;
|
|
|
13953
13940
|
var path = outputDir
|
|
13954
13941
|
? getSourceFilePathInNewDirWorker(fileName, outputDir, currentDirectory, commonSourceDirectory, getCanonicalFileName)
|
|
13955
13942
|
: fileName;
|
|
13956
|
-
|
|
13957
|
-
return removeFileExtension(path) + declarationExtension;
|
|
13943
|
+
return removeFileExtension(path) + ".d.ts";
|
|
13958
13944
|
}
|
|
13959
13945
|
ts.getDeclarationEmitOutputFilePathWorker = getDeclarationEmitOutputFilePathWorker;
|
|
13960
|
-
function getDeclarationEmitExtensionForPath(path) {
|
|
13961
|
-
return ts.fileExtensionIsOneOf(path, [".mjs", ".mts"]) ? ".d.mts" :
|
|
13962
|
-
ts.fileExtensionIsOneOf(path, [".cjs", ".cts"]) ? ".d.cts" :
|
|
13963
|
-
ts.fileExtensionIsOneOf(path, [".json"]) ? ".json.d.ts" :
|
|
13964
|
-
".d.ts";
|
|
13965
|
-
}
|
|
13966
|
-
ts.getDeclarationEmitExtensionForPath = getDeclarationEmitExtensionForPath;
|
|
13967
13946
|
function outFile(options) {
|
|
13968
13947
|
return options.outFile || options.out;
|
|
13969
13948
|
}
|
|
@@ -14605,7 +14584,7 @@ var ts;
|
|
|
14605
14584
|
return symbol && ts.length(symbol.declarations) > 0 && hasSyntacticModifier(symbol.declarations[0], 512);
|
|
14606
14585
|
}
|
|
14607
14586
|
function tryExtractTSExtension(fileName) {
|
|
14608
|
-
return ts.find(supportedTSExtensionsForExtractExtension, function (extension) { return ts.fileExtensionIs(fileName, extension); });
|
|
14587
|
+
return ts.find(ts.supportedTSExtensionsForExtractExtension, function (extension) { return ts.fileExtensionIs(fileName, extension); });
|
|
14609
14588
|
}
|
|
14610
14589
|
ts.tryExtractTSExtension = tryExtractTSExtension;
|
|
14611
14590
|
function getExpandedCharCodes(input) {
|
|
@@ -15463,10 +15442,7 @@ var ts;
|
|
|
15463
15442
|
}
|
|
15464
15443
|
ts.getLanguageVariant = getLanguageVariant;
|
|
15465
15444
|
function getEmitScriptTarget(compilerOptions) {
|
|
15466
|
-
return compilerOptions.target ||
|
|
15467
|
-
(compilerOptions.module === ts.ModuleKind.Node12 && 7) ||
|
|
15468
|
-
(compilerOptions.module === ts.ModuleKind.NodeNext && 99) ||
|
|
15469
|
-
0;
|
|
15445
|
+
return compilerOptions.target || 0;
|
|
15470
15446
|
}
|
|
15471
15447
|
ts.getEmitScriptTarget = getEmitScriptTarget;
|
|
15472
15448
|
function getEmitModuleKind(compilerOptions) {
|
|
@@ -15478,20 +15454,7 @@ var ts;
|
|
|
15478
15454
|
function getEmitModuleResolutionKind(compilerOptions) {
|
|
15479
15455
|
var moduleResolution = compilerOptions.moduleResolution;
|
|
15480
15456
|
if (moduleResolution === undefined) {
|
|
15481
|
-
|
|
15482
|
-
case ts.ModuleKind.CommonJS:
|
|
15483
|
-
moduleResolution = ts.ModuleResolutionKind.NodeJs;
|
|
15484
|
-
break;
|
|
15485
|
-
case ts.ModuleKind.Node12:
|
|
15486
|
-
moduleResolution = ts.ModuleResolutionKind.Node12;
|
|
15487
|
-
break;
|
|
15488
|
-
case ts.ModuleKind.NodeNext:
|
|
15489
|
-
moduleResolution = ts.ModuleResolutionKind.NodeNext;
|
|
15490
|
-
break;
|
|
15491
|
-
default:
|
|
15492
|
-
moduleResolution = ts.ModuleResolutionKind.Classic;
|
|
15493
|
-
break;
|
|
15494
|
-
}
|
|
15457
|
+
moduleResolution = getEmitModuleKind(compilerOptions) === ts.ModuleKind.CommonJS ? ts.ModuleResolutionKind.NodeJs : ts.ModuleResolutionKind.Classic;
|
|
15495
15458
|
}
|
|
15496
15459
|
return moduleResolution;
|
|
15497
15460
|
}
|
|
@@ -15521,23 +15484,11 @@ var ts;
|
|
|
15521
15484
|
return !!(getEmitDeclarations(options) && options.declarationMap);
|
|
15522
15485
|
}
|
|
15523
15486
|
ts.getAreDeclarationMapsEnabled = getAreDeclarationMapsEnabled;
|
|
15524
|
-
function getESModuleInterop(compilerOptions) {
|
|
15525
|
-
if (compilerOptions.esModuleInterop !== undefined) {
|
|
15526
|
-
return compilerOptions.esModuleInterop;
|
|
15527
|
-
}
|
|
15528
|
-
switch (getEmitModuleKind(compilerOptions)) {
|
|
15529
|
-
case ts.ModuleKind.Node12:
|
|
15530
|
-
case ts.ModuleKind.NodeNext:
|
|
15531
|
-
return true;
|
|
15532
|
-
}
|
|
15533
|
-
return undefined;
|
|
15534
|
-
}
|
|
15535
|
-
ts.getESModuleInterop = getESModuleInterop;
|
|
15536
15487
|
function getAllowSyntheticDefaultImports(compilerOptions) {
|
|
15537
15488
|
var moduleKind = getEmitModuleKind(compilerOptions);
|
|
15538
15489
|
return compilerOptions.allowSyntheticDefaultImports !== undefined
|
|
15539
15490
|
? compilerOptions.allowSyntheticDefaultImports
|
|
15540
|
-
:
|
|
15491
|
+
: compilerOptions.esModuleInterop ||
|
|
15541
15492
|
moduleKind === ts.ModuleKind.System;
|
|
15542
15493
|
}
|
|
15543
15494
|
ts.getAllowSyntheticDefaultImports = getAllowSyntheticDefaultImports;
|
|
@@ -15562,7 +15513,7 @@ var ts;
|
|
|
15562
15513
|
}
|
|
15563
15514
|
ts.getAllowJSCompilerOption = getAllowJSCompilerOption;
|
|
15564
15515
|
function getUseDefineForClassFields(compilerOptions) {
|
|
15565
|
-
return compilerOptions.useDefineForClassFields === undefined ?
|
|
15516
|
+
return compilerOptions.useDefineForClassFields === undefined ? compilerOptions.target === 99 : compilerOptions.useDefineForClassFields;
|
|
15566
15517
|
}
|
|
15567
15518
|
ts.getUseDefineForClassFields = getUseDefineForClassFields;
|
|
15568
15519
|
function compilerOptionsAffectSemanticDiagnostics(newOptions, oldOptions) {
|
|
@@ -15940,51 +15891,48 @@ var ts;
|
|
|
15940
15891
|
}
|
|
15941
15892
|
}
|
|
15942
15893
|
ts.getScriptKindFromFileName = getScriptKindFromFileName;
|
|
15943
|
-
ts.supportedTSExtensions = [
|
|
15944
|
-
ts.
|
|
15945
|
-
|
|
15946
|
-
|
|
15947
|
-
ts.
|
|
15948
|
-
|
|
15949
|
-
var
|
|
15950
|
-
var allSupportedExtensionsWithJson = __spreadArray(__spreadArray([], allSupportedExtensions, true), [[".json"]], false);
|
|
15894
|
+
ts.supportedTSExtensions = [".ts", ".tsx", ".d.ts"];
|
|
15895
|
+
ts.supportedTSExtensionsWithJson = [".ts", ".tsx", ".d.ts", ".json"];
|
|
15896
|
+
ts.supportedTSExtensionsForExtractExtension = [".d.ts", ".ts", ".tsx"];
|
|
15897
|
+
ts.supportedJSExtensions = [".js", ".jsx"];
|
|
15898
|
+
ts.supportedJSAndJsonExtensions = [".js", ".jsx", ".json"];
|
|
15899
|
+
var allSupportedExtensions = __spreadArray(__spreadArray([], ts.supportedTSExtensions, true), ts.supportedJSExtensions, true);
|
|
15900
|
+
var allSupportedExtensionsWithJson = __spreadArray(__spreadArray(__spreadArray([], ts.supportedTSExtensions, true), ts.supportedJSExtensions, true), [".json"], false);
|
|
15951
15901
|
function getSupportedExtensions(options, extraFileExtensions) {
|
|
15952
15902
|
var needJsExtensions = options && getAllowJSCompilerOption(options);
|
|
15953
15903
|
if (!extraFileExtensions || extraFileExtensions.length === 0) {
|
|
15954
15904
|
return needJsExtensions ? allSupportedExtensions : ts.supportedTSExtensions;
|
|
15955
15905
|
}
|
|
15956
|
-
var
|
|
15957
|
-
|
|
15958
|
-
var extensions = __spreadArray(__spreadArray([], builtins, true), ts.mapDefined(extraFileExtensions, function (x) { return x.scriptKind === 7 || needJsExtensions && isJSLike(x.scriptKind) && flatBuiltins.indexOf(x.extension) === -1 ? [x.extension] : undefined; }), true);
|
|
15959
|
-
return extensions;
|
|
15906
|
+
var extensions = __spreadArray(__spreadArray([], needJsExtensions ? allSupportedExtensions : ts.supportedTSExtensions, true), ts.mapDefined(extraFileExtensions, function (x) { return x.scriptKind === 7 || needJsExtensions && isJSLike(x.scriptKind) ? x.extension : undefined; }), true);
|
|
15907
|
+
return ts.deduplicate(extensions, ts.equateStringsCaseSensitive, ts.compareStringsCaseSensitive);
|
|
15960
15908
|
}
|
|
15961
15909
|
ts.getSupportedExtensions = getSupportedExtensions;
|
|
15962
|
-
function
|
|
15910
|
+
function getSuppoertedExtensionsWithJsonIfResolveJsonModule(options, supportedExtensions) {
|
|
15963
15911
|
if (!options || !options.resolveJsonModule)
|
|
15964
15912
|
return supportedExtensions;
|
|
15965
15913
|
if (supportedExtensions === allSupportedExtensions)
|
|
15966
15914
|
return allSupportedExtensionsWithJson;
|
|
15967
15915
|
if (supportedExtensions === ts.supportedTSExtensions)
|
|
15968
|
-
return supportedTSExtensionsWithJson;
|
|
15969
|
-
return __spreadArray(__spreadArray([], supportedExtensions, true), [
|
|
15916
|
+
return ts.supportedTSExtensionsWithJson;
|
|
15917
|
+
return __spreadArray(__spreadArray([], supportedExtensions, true), [".json"], false);
|
|
15970
15918
|
}
|
|
15971
|
-
ts.
|
|
15919
|
+
ts.getSuppoertedExtensionsWithJsonIfResolveJsonModule = getSuppoertedExtensionsWithJsonIfResolveJsonModule;
|
|
15972
15920
|
function isJSLike(scriptKind) {
|
|
15973
15921
|
return scriptKind === 1 || scriptKind === 2;
|
|
15974
15922
|
}
|
|
15975
15923
|
function hasJSFileExtension(fileName) {
|
|
15976
|
-
return ts.some(ts.
|
|
15924
|
+
return ts.some(ts.supportedJSExtensions, function (extension) { return ts.fileExtensionIs(fileName, extension); });
|
|
15977
15925
|
}
|
|
15978
15926
|
ts.hasJSFileExtension = hasJSFileExtension;
|
|
15979
15927
|
function hasTSFileExtension(fileName) {
|
|
15980
|
-
return ts.some(ts.
|
|
15928
|
+
return ts.some(ts.supportedTSExtensions, function (extension) { return ts.fileExtensionIs(fileName, extension); });
|
|
15981
15929
|
}
|
|
15982
15930
|
ts.hasTSFileExtension = hasTSFileExtension;
|
|
15983
15931
|
function isSupportedSourceFileName(fileName, compilerOptions, extraFileExtensions) {
|
|
15984
15932
|
if (!fileName)
|
|
15985
15933
|
return false;
|
|
15986
15934
|
var supportedExtensions = getSupportedExtensions(compilerOptions, extraFileExtensions);
|
|
15987
|
-
for (var _i = 0, _a =
|
|
15935
|
+
for (var _i = 0, _a = getSuppoertedExtensionsWithJsonIfResolveJsonModule(compilerOptions, supportedExtensions); _i < _a.length; _i++) {
|
|
15988
15936
|
var extension = _a[_i];
|
|
15989
15937
|
if (ts.fileExtensionIs(fileName, extension)) {
|
|
15990
15938
|
return true;
|
|
@@ -16001,7 +15949,37 @@ var ts;
|
|
|
16001
15949
|
return ts.compareValues(numberOfDirectorySeparators(path1), numberOfDirectorySeparators(path2));
|
|
16002
15950
|
}
|
|
16003
15951
|
ts.compareNumberOfDirectorySeparators = compareNumberOfDirectorySeparators;
|
|
16004
|
-
|
|
15952
|
+
function getExtensionPriority(path, supportedExtensions) {
|
|
15953
|
+
for (var i = supportedExtensions.length - 1; i >= 0; i--) {
|
|
15954
|
+
if (ts.fileExtensionIs(path, supportedExtensions[i])) {
|
|
15955
|
+
return adjustExtensionPriority(i, supportedExtensions);
|
|
15956
|
+
}
|
|
15957
|
+
}
|
|
15958
|
+
return 0;
|
|
15959
|
+
}
|
|
15960
|
+
ts.getExtensionPriority = getExtensionPriority;
|
|
15961
|
+
function adjustExtensionPriority(extensionPriority, supportedExtensions) {
|
|
15962
|
+
if (extensionPriority < 2) {
|
|
15963
|
+
return 0;
|
|
15964
|
+
}
|
|
15965
|
+
else if (extensionPriority < supportedExtensions.length) {
|
|
15966
|
+
return 2;
|
|
15967
|
+
}
|
|
15968
|
+
else {
|
|
15969
|
+
return supportedExtensions.length;
|
|
15970
|
+
}
|
|
15971
|
+
}
|
|
15972
|
+
ts.adjustExtensionPriority = adjustExtensionPriority;
|
|
15973
|
+
function getNextLowestExtensionPriority(extensionPriority, supportedExtensions) {
|
|
15974
|
+
if (extensionPriority < 2) {
|
|
15975
|
+
return 2;
|
|
15976
|
+
}
|
|
15977
|
+
else {
|
|
15978
|
+
return supportedExtensions.length;
|
|
15979
|
+
}
|
|
15980
|
+
}
|
|
15981
|
+
ts.getNextLowestExtensionPriority = getNextLowestExtensionPriority;
|
|
15982
|
+
var extensionsToRemove = [".d.ts", ".ts", ".js", ".tsx", ".jsx", ".json"];
|
|
16005
15983
|
function removeFileExtension(path) {
|
|
16006
15984
|
for (var _i = 0, extensionsToRemove_1 = extensionsToRemove; _i < extensionsToRemove_1.length; _i++) {
|
|
16007
15985
|
var ext = extensionsToRemove_1[_i];
|
|
@@ -20415,7 +20393,6 @@ var ts;
|
|
|
20415
20393
|
node.transformFlags =
|
|
20416
20394
|
propagateChildrenFlags(node.statements) |
|
|
20417
20395
|
propagateChildFlags(node.endOfFileToken);
|
|
20418
|
-
node.impliedNodeFormat = source.impliedNodeFormat;
|
|
20419
20396
|
return node;
|
|
20420
20397
|
}
|
|
20421
20398
|
function updateSourceFile(node, statements, isDeclarationFile, referencedFiles, typeReferenceDirectives, hasNoDefaultLib, libReferenceDirectives) {
|
|
@@ -21695,7 +21672,7 @@ var ts;
|
|
|
21695
21672
|
]), location);
|
|
21696
21673
|
}
|
|
21697
21674
|
function createAssignHelper(attributesSegments) {
|
|
21698
|
-
if (
|
|
21675
|
+
if (context.getCompilerOptions().target >= 2) {
|
|
21699
21676
|
return factory.createCallExpression(factory.createPropertyAccessExpression(factory.createIdentifier("Object"), "assign"), undefined, attributesSegments);
|
|
21700
21677
|
}
|
|
21701
21678
|
context.requestEmitHelper(ts.assignHelper);
|
|
@@ -23219,7 +23196,7 @@ var ts;
|
|
|
23219
23196
|
if (compilerOptions.importHelpers && ts.isEffectiveExternalModule(sourceFile, compilerOptions)) {
|
|
23220
23197
|
var namedBindings = void 0;
|
|
23221
23198
|
var moduleKind = ts.getEmitModuleKind(compilerOptions);
|
|
23222
|
-
if (
|
|
23199
|
+
if (moduleKind >= ts.ModuleKind.ES2015 && moduleKind <= ts.ModuleKind.ESNext) {
|
|
23223
23200
|
var helpers = ts.getEmitHelpers(sourceFile);
|
|
23224
23201
|
if (helpers) {
|
|
23225
23202
|
var helperNames = [];
|
|
@@ -23264,9 +23241,9 @@ var ts;
|
|
|
23264
23241
|
return externalHelpersModuleName;
|
|
23265
23242
|
}
|
|
23266
23243
|
var moduleKind = ts.getEmitModuleKind(compilerOptions);
|
|
23267
|
-
var create = (hasExportStarsToExportValues || (
|
|
23244
|
+
var create = (hasExportStarsToExportValues || (compilerOptions.esModuleInterop && hasImportStarOrImportDefault))
|
|
23268
23245
|
&& moduleKind !== ts.ModuleKind.System
|
|
23269
|
-
&&
|
|
23246
|
+
&& moduleKind < ts.ModuleKind.ES2015;
|
|
23270
23247
|
if (!create) {
|
|
23271
23248
|
var helpers = ts.getEmitHelpers(node);
|
|
23272
23249
|
if (helpers) {
|
|
@@ -30851,9 +30828,7 @@ var ts;
|
|
|
30851
30828
|
es6: ts.ModuleKind.ES2015,
|
|
30852
30829
|
es2015: ts.ModuleKind.ES2015,
|
|
30853
30830
|
es2020: ts.ModuleKind.ES2020,
|
|
30854
|
-
esnext: ts.ModuleKind.ESNext
|
|
30855
|
-
node12: ts.ModuleKind.Node12,
|
|
30856
|
-
nodenext: ts.ModuleKind.NodeNext,
|
|
30831
|
+
esnext: ts.ModuleKind.ESNext
|
|
30857
30832
|
})),
|
|
30858
30833
|
affectsModuleResolution: true,
|
|
30859
30834
|
affectsEmit: true,
|
|
@@ -33063,7 +33038,7 @@ var ts;
|
|
|
33063
33038
|
var wildCardJsonFileMap = new ts.Map();
|
|
33064
33039
|
var validatedFilesSpec = configFileSpecs.validatedFilesSpec, validatedIncludeSpecs = configFileSpecs.validatedIncludeSpecs, validatedExcludeSpecs = configFileSpecs.validatedExcludeSpecs;
|
|
33065
33040
|
var supportedExtensions = ts.getSupportedExtensions(options, extraFileExtensions);
|
|
33066
|
-
var supportedExtensionsWithJsonIfResolveJsonModule = ts.
|
|
33041
|
+
var supportedExtensionsWithJsonIfResolveJsonModule = ts.getSuppoertedExtensionsWithJsonIfResolveJsonModule(options, supportedExtensions);
|
|
33067
33042
|
if (validatedFilesSpec) {
|
|
33068
33043
|
for (var _i = 0, validatedFilesSpec_1 = validatedFilesSpec; _i < validatedFilesSpec_1.length; _i++) {
|
|
33069
33044
|
var fileName = validatedFilesSpec_1[_i];
|
|
@@ -33098,7 +33073,7 @@ var ts;
|
|
|
33098
33073
|
wildcardFileMap.set(key, file);
|
|
33099
33074
|
}
|
|
33100
33075
|
};
|
|
33101
|
-
for (var _a = 0, _b = host.readDirectory(basePath,
|
|
33076
|
+
for (var _a = 0, _b = host.readDirectory(basePath, supportedExtensionsWithJsonIfResolveJsonModule, validatedExcludeSpecs, validatedIncludeSpecs, undefined); _a < _b.length; _a++) {
|
|
33102
33077
|
var file = _b[_a];
|
|
33103
33078
|
_loop_6(file);
|
|
33104
33079
|
}
|
|
@@ -33230,36 +33205,23 @@ var ts;
|
|
|
33230
33205
|
return undefined;
|
|
33231
33206
|
}
|
|
33232
33207
|
function hasFileWithHigherPriorityExtension(file, literalFiles, wildcardFiles, extensions, keyMapper) {
|
|
33233
|
-
var
|
|
33234
|
-
|
|
33235
|
-
|
|
33236
|
-
|
|
33237
|
-
|
|
33238
|
-
var ext = extensionGroup_1[_i];
|
|
33239
|
-
if (ts.fileExtensionIs(file, ext)) {
|
|
33240
|
-
return false;
|
|
33241
|
-
}
|
|
33242
|
-
var higherPriorityPath = keyMapper(ts.changeExtension(file, ext));
|
|
33208
|
+
var extensionPriority = ts.getExtensionPriority(file, extensions);
|
|
33209
|
+
var adjustedExtensionPriority = ts.adjustExtensionPriority(extensionPriority, extensions);
|
|
33210
|
+
for (var i = 0; i < adjustedExtensionPriority; i++) {
|
|
33211
|
+
var higherPriorityExtension = extensions[i];
|
|
33212
|
+
var higherPriorityPath = keyMapper(ts.changeExtension(file, higherPriorityExtension));
|
|
33243
33213
|
if (literalFiles.has(higherPriorityPath) || wildcardFiles.has(higherPriorityPath)) {
|
|
33244
|
-
if (ext === ".d.ts" && (ts.fileExtensionIs(file, ".js") || ts.fileExtensionIs(file, ".jsx"))) {
|
|
33245
|
-
continue;
|
|
33246
|
-
}
|
|
33247
33214
|
return true;
|
|
33248
33215
|
}
|
|
33249
33216
|
}
|
|
33250
33217
|
return false;
|
|
33251
33218
|
}
|
|
33252
33219
|
function removeWildcardFilesWithLowerPriorityExtension(file, wildcardFiles, extensions, keyMapper) {
|
|
33253
|
-
var
|
|
33254
|
-
|
|
33255
|
-
|
|
33256
|
-
|
|
33257
|
-
|
|
33258
|
-
var ext = extensionGroup[i];
|
|
33259
|
-
if (ts.fileExtensionIs(file, ext)) {
|
|
33260
|
-
return;
|
|
33261
|
-
}
|
|
33262
|
-
var lowerPriorityPath = keyMapper(ts.changeExtension(file, ext));
|
|
33220
|
+
var extensionPriority = ts.getExtensionPriority(file, extensions);
|
|
33221
|
+
var nextExtensionPriority = ts.getNextLowestExtensionPriority(extensionPriority, extensions);
|
|
33222
|
+
for (var i = nextExtensionPriority; i < extensions.length; i++) {
|
|
33223
|
+
var lowerPriorityExtension = extensions[i];
|
|
33224
|
+
var lowerPriorityPath = keyMapper(ts.changeExtension(file, lowerPriorityExtension));
|
|
33263
33225
|
wildcardFiles.delete(lowerPriorityPath);
|
|
33264
33226
|
}
|
|
33265
33227
|
}
|
|
@@ -33495,7 +33457,7 @@ var ts;
|
|
|
33495
33457
|
}
|
|
33496
33458
|
var containingDirectory = containingFile ? ts.getDirectoryPath(containingFile) : undefined;
|
|
33497
33459
|
var perFolderCache = containingDirectory ? cache && cache.getOrCreateCacheForDirectory(containingDirectory, redirectedReference) : undefined;
|
|
33498
|
-
var result = perFolderCache && perFolderCache.get(typeReferenceDirectiveName
|
|
33460
|
+
var result = perFolderCache && perFolderCache.get(typeReferenceDirectiveName);
|
|
33499
33461
|
if (result) {
|
|
33500
33462
|
if (traceEnabled) {
|
|
33501
33463
|
trace(host, ts.Diagnostics.Resolving_type_reference_directive_0_containing_file_1, typeReferenceDirectiveName, containingFile);
|
|
@@ -33529,7 +33491,7 @@ var ts;
|
|
|
33529
33491
|
}
|
|
33530
33492
|
}
|
|
33531
33493
|
var failedLookupLocations = [];
|
|
33532
|
-
var moduleResolutionState = { compilerOptions: options, host: host, traceEnabled: traceEnabled, failedLookupLocations: failedLookupLocations, packageJsonInfoCache: cache
|
|
33494
|
+
var moduleResolutionState = { compilerOptions: options, host: host, traceEnabled: traceEnabled, failedLookupLocations: failedLookupLocations, packageJsonInfoCache: cache };
|
|
33533
33495
|
var resolved = primaryLookup();
|
|
33534
33496
|
var primary = true;
|
|
33535
33497
|
if (!resolved) {
|
|
@@ -33549,7 +33511,7 @@ var ts;
|
|
|
33549
33511
|
};
|
|
33550
33512
|
}
|
|
33551
33513
|
result = { resolvedTypeReferenceDirective: resolvedTypeReferenceDirective, failedLookupLocations: failedLookupLocations };
|
|
33552
|
-
perFolderCache === null || perFolderCache === void 0 ? void 0 : perFolderCache.set(typeReferenceDirectiveName,
|
|
33514
|
+
perFolderCache === null || perFolderCache === void 0 ? void 0 : perFolderCache.set(typeReferenceDirectiveName, result);
|
|
33553
33515
|
if (traceEnabled)
|
|
33554
33516
|
traceResult(result);
|
|
33555
33517
|
return result;
|
|
@@ -33741,54 +33703,9 @@ var ts;
|
|
|
33741
33703
|
}
|
|
33742
33704
|
function getOrCreateCacheForDirectory(directoryName, redirectedReference) {
|
|
33743
33705
|
var path = ts.toPath(directoryName, currentDirectory, getCanonicalFileName);
|
|
33744
|
-
return getOrCreateCache(directoryToModuleNameMap, redirectedReference, path, function () { return
|
|
33745
|
-
}
|
|
33746
|
-
}
|
|
33747
|
-
function createModeAwareCache() {
|
|
33748
|
-
var underlying = new ts.Map();
|
|
33749
|
-
var memoizedReverseKeys = new ts.Map();
|
|
33750
|
-
var cache = {
|
|
33751
|
-
get: function (specifier, mode) {
|
|
33752
|
-
return underlying.get(getUnderlyingCacheKey(specifier, mode));
|
|
33753
|
-
},
|
|
33754
|
-
set: function (specifier, mode, value) {
|
|
33755
|
-
underlying.set(getUnderlyingCacheKey(specifier, mode), value);
|
|
33756
|
-
return cache;
|
|
33757
|
-
},
|
|
33758
|
-
delete: function (specifier, mode) {
|
|
33759
|
-
underlying.delete(getUnderlyingCacheKey(specifier, mode));
|
|
33760
|
-
return cache;
|
|
33761
|
-
},
|
|
33762
|
-
has: function (specifier, mode) {
|
|
33763
|
-
return underlying.has(getUnderlyingCacheKey(specifier, mode));
|
|
33764
|
-
},
|
|
33765
|
-
forEach: function (cb) {
|
|
33766
|
-
return underlying.forEach(function (elem, key) {
|
|
33767
|
-
var _a = memoizedReverseKeys.get(key), specifier = _a[0], mode = _a[1];
|
|
33768
|
-
return cb(elem, specifier, mode);
|
|
33769
|
-
});
|
|
33770
|
-
},
|
|
33771
|
-
size: function () {
|
|
33772
|
-
return underlying.size;
|
|
33773
|
-
}
|
|
33774
|
-
};
|
|
33775
|
-
return cache;
|
|
33776
|
-
function getUnderlyingCacheKey(specifier, mode) {
|
|
33777
|
-
var result = mode === undefined ? specifier : mode + "|" + specifier;
|
|
33778
|
-
memoizedReverseKeys.set(result, [specifier, mode]);
|
|
33779
|
-
return result;
|
|
33780
|
-
}
|
|
33781
|
-
}
|
|
33782
|
-
ts.createModeAwareCache = createModeAwareCache;
|
|
33783
|
-
function zipToModeAwareCache(file, keys, values) {
|
|
33784
|
-
ts.Debug.assert(keys.length === values.length);
|
|
33785
|
-
var map = createModeAwareCache();
|
|
33786
|
-
for (var i = 0; i < keys.length; ++i) {
|
|
33787
|
-
map.set(keys[i], ts.getModeForResolutionAtIndex(file, i), values[i]);
|
|
33706
|
+
return getOrCreateCache(directoryToModuleNameMap, redirectedReference, path, function () { return new ts.Map(); });
|
|
33788
33707
|
}
|
|
33789
|
-
return map;
|
|
33790
33708
|
}
|
|
33791
|
-
ts.zipToModeAwareCache = zipToModeAwareCache;
|
|
33792
33709
|
function createModuleResolutionCache(currentDirectory, getCanonicalFileName, options, directoryToModuleNameMap, moduleNameToDirectoryMap) {
|
|
33793
33710
|
var preDirectoryResolutionCache = createPerDirectoryResolutionCache(currentDirectory, getCanonicalFileName, directoryToModuleNameMap || (directoryToModuleNameMap = createCacheWithRedirects(options)));
|
|
33794
33711
|
moduleNameToDirectoryMap || (moduleNameToDirectoryMap = createCacheWithRedirects(options));
|
|
@@ -33802,9 +33719,9 @@ var ts;
|
|
|
33802
33719
|
function update(options) {
|
|
33803
33720
|
updateRedirectsMap(options, directoryToModuleNameMap, moduleNameToDirectoryMap);
|
|
33804
33721
|
}
|
|
33805
|
-
function getOrCreateCacheForModuleName(nonRelativeModuleName,
|
|
33722
|
+
function getOrCreateCacheForModuleName(nonRelativeModuleName, redirectedReference) {
|
|
33806
33723
|
ts.Debug.assert(!ts.isExternalModuleNameRelative(nonRelativeModuleName));
|
|
33807
|
-
return getOrCreateCache(moduleNameToDirectoryMap, redirectedReference,
|
|
33724
|
+
return getOrCreateCache(moduleNameToDirectoryMap, redirectedReference, nonRelativeModuleName, createPerModuleNameCache);
|
|
33808
33725
|
}
|
|
33809
33726
|
function createPerModuleNameCache() {
|
|
33810
33727
|
var directoryPathMap = new ts.Map();
|
|
@@ -33864,15 +33781,13 @@ var ts;
|
|
|
33864
33781
|
}
|
|
33865
33782
|
}
|
|
33866
33783
|
ts.createTypeReferenceDirectiveResolutionCache = createTypeReferenceDirectiveResolutionCache;
|
|
33867
|
-
function resolveModuleNameFromCache(moduleName, containingFile, cache
|
|
33784
|
+
function resolveModuleNameFromCache(moduleName, containingFile, cache) {
|
|
33868
33785
|
var containingDirectory = ts.getDirectoryPath(containingFile);
|
|
33869
33786
|
var perFolderCache = cache && cache.getOrCreateCacheForDirectory(containingDirectory);
|
|
33870
|
-
|
|
33871
|
-
return undefined;
|
|
33872
|
-
return perFolderCache.get(moduleName, mode);
|
|
33787
|
+
return perFolderCache && perFolderCache.get(moduleName);
|
|
33873
33788
|
}
|
|
33874
33789
|
ts.resolveModuleNameFromCache = resolveModuleNameFromCache;
|
|
33875
|
-
function resolveModuleName(moduleName, containingFile, compilerOptions, host, cache, redirectedReference
|
|
33790
|
+
function resolveModuleName(moduleName, containingFile, compilerOptions, host, cache, redirectedReference) {
|
|
33876
33791
|
var traceEnabled = isTraceEnabled(compilerOptions, host);
|
|
33877
33792
|
if (redirectedReference) {
|
|
33878
33793
|
compilerOptions = redirectedReference.commandLine.options;
|
|
@@ -33885,7 +33800,7 @@ var ts;
|
|
|
33885
33800
|
}
|
|
33886
33801
|
var containingDirectory = ts.getDirectoryPath(containingFile);
|
|
33887
33802
|
var perFolderCache = cache && cache.getOrCreateCacheForDirectory(containingDirectory, redirectedReference);
|
|
33888
|
-
var result = perFolderCache && perFolderCache.get(moduleName
|
|
33803
|
+
var result = perFolderCache && perFolderCache.get(moduleName);
|
|
33889
33804
|
if (result) {
|
|
33890
33805
|
if (traceEnabled) {
|
|
33891
33806
|
trace(host, ts.Diagnostics.Resolution_for_module_0_was_found_in_cache_from_location_1, moduleName, containingDirectory);
|
|
@@ -33894,20 +33809,7 @@ var ts;
|
|
|
33894
33809
|
else {
|
|
33895
33810
|
var moduleResolution = compilerOptions.moduleResolution;
|
|
33896
33811
|
if (moduleResolution === undefined) {
|
|
33897
|
-
|
|
33898
|
-
case ts.ModuleKind.CommonJS:
|
|
33899
|
-
moduleResolution = ts.ModuleResolutionKind.NodeJs;
|
|
33900
|
-
break;
|
|
33901
|
-
case ts.ModuleKind.Node12:
|
|
33902
|
-
moduleResolution = ts.ModuleResolutionKind.Node12;
|
|
33903
|
-
break;
|
|
33904
|
-
case ts.ModuleKind.NodeNext:
|
|
33905
|
-
moduleResolution = ts.ModuleResolutionKind.NodeNext;
|
|
33906
|
-
break;
|
|
33907
|
-
default:
|
|
33908
|
-
moduleResolution = ts.ModuleResolutionKind.Classic;
|
|
33909
|
-
break;
|
|
33910
|
-
}
|
|
33812
|
+
moduleResolution = ts.getEmitModuleKind(compilerOptions) === ts.ModuleKind.CommonJS ? ts.ModuleResolutionKind.NodeJs : ts.ModuleResolutionKind.Classic;
|
|
33911
33813
|
if (traceEnabled) {
|
|
33912
33814
|
trace(host, ts.Diagnostics.Module_resolution_kind_is_not_specified_using_0, ts.ModuleResolutionKind[moduleResolution]);
|
|
33913
33815
|
}
|
|
@@ -33919,12 +33821,6 @@ var ts;
|
|
|
33919
33821
|
}
|
|
33920
33822
|
ts.perfLogger.logStartResolveModule(moduleName);
|
|
33921
33823
|
switch (moduleResolution) {
|
|
33922
|
-
case ts.ModuleResolutionKind.Node12:
|
|
33923
|
-
result = node12ModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode);
|
|
33924
|
-
break;
|
|
33925
|
-
case ts.ModuleResolutionKind.NodeNext:
|
|
33926
|
-
result = nodeNextModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode);
|
|
33927
|
-
break;
|
|
33928
33824
|
case ts.ModuleResolutionKind.NodeJs:
|
|
33929
33825
|
result = nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference);
|
|
33930
33826
|
break;
|
|
@@ -33938,9 +33834,9 @@ var ts;
|
|
|
33938
33834
|
ts.perfLogger.logInfoEvent("Module \"" + moduleName + "\" resolved to \"" + result.resolvedModule.resolvedFileName + "\"");
|
|
33939
33835
|
ts.perfLogger.logStopResolveModule((result && result.resolvedModule) ? "" + result.resolvedModule.resolvedFileName : "null");
|
|
33940
33836
|
if (perFolderCache) {
|
|
33941
|
-
perFolderCache.set(moduleName,
|
|
33837
|
+
perFolderCache.set(moduleName, result);
|
|
33942
33838
|
if (!ts.isExternalModuleNameRelative(moduleName)) {
|
|
33943
|
-
cache.getOrCreateCacheForModuleName(moduleName,
|
|
33839
|
+
cache.getOrCreateCacheForModuleName(moduleName, redirectedReference).set(containingDirectory, result);
|
|
33944
33840
|
}
|
|
33945
33841
|
}
|
|
33946
33842
|
}
|
|
@@ -34074,43 +33970,22 @@ var ts;
|
|
|
34074
33970
|
return tryResolveJSModuleWorker(moduleName, initialDir, host).resolvedModule;
|
|
34075
33971
|
}
|
|
34076
33972
|
ts.tryResolveJSModule = tryResolveJSModule;
|
|
34077
|
-
var NodeResolutionFeatures;
|
|
34078
|
-
(function (NodeResolutionFeatures) {
|
|
34079
|
-
NodeResolutionFeatures[NodeResolutionFeatures["None"] = 0] = "None";
|
|
34080
|
-
NodeResolutionFeatures[NodeResolutionFeatures["Imports"] = 2] = "Imports";
|
|
34081
|
-
NodeResolutionFeatures[NodeResolutionFeatures["SelfName"] = 4] = "SelfName";
|
|
34082
|
-
NodeResolutionFeatures[NodeResolutionFeatures["Exports"] = 8] = "Exports";
|
|
34083
|
-
NodeResolutionFeatures[NodeResolutionFeatures["ExportsPatternTrailers"] = 16] = "ExportsPatternTrailers";
|
|
34084
|
-
NodeResolutionFeatures[NodeResolutionFeatures["AllFeatures"] = 30] = "AllFeatures";
|
|
34085
|
-
NodeResolutionFeatures[NodeResolutionFeatures["EsmMode"] = 32] = "EsmMode";
|
|
34086
|
-
})(NodeResolutionFeatures || (NodeResolutionFeatures = {}));
|
|
34087
|
-
function node12ModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {
|
|
34088
|
-
return nodeNextModuleNameResolverWorker(NodeResolutionFeatures.Imports | NodeResolutionFeatures.SelfName | NodeResolutionFeatures.Exports, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode);
|
|
34089
|
-
}
|
|
34090
|
-
function nodeNextModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {
|
|
34091
|
-
return nodeNextModuleNameResolverWorker(NodeResolutionFeatures.AllFeatures, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode);
|
|
34092
|
-
}
|
|
34093
|
-
function nodeNextModuleNameResolverWorker(features, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {
|
|
34094
|
-
var containingDirectory = ts.getDirectoryPath(containingFile);
|
|
34095
|
-
var esmMode = resolutionMode === ts.ModuleKind.ESNext ? NodeResolutionFeatures.EsmMode : 0;
|
|
34096
|
-
return nodeModuleNameResolverWorker(features | esmMode, moduleName, containingDirectory, compilerOptions, host, cache, compilerOptions.resolveJsonModule ? tsPlusJsonExtensions : tsExtensions, redirectedReference);
|
|
34097
|
-
}
|
|
34098
33973
|
var jsOnlyExtensions = [Extensions.JavaScript];
|
|
34099
33974
|
var tsExtensions = [Extensions.TypeScript, Extensions.JavaScript];
|
|
34100
33975
|
var tsPlusJsonExtensions = __spreadArray(__spreadArray([], tsExtensions, true), [Extensions.Json], false);
|
|
34101
33976
|
var tsconfigExtensions = [Extensions.TSConfig];
|
|
34102
33977
|
function tryResolveJSModuleWorker(moduleName, initialDir, host) {
|
|
34103
|
-
return nodeModuleNameResolverWorker(
|
|
33978
|
+
return nodeModuleNameResolverWorker(moduleName, initialDir, { moduleResolution: ts.ModuleResolutionKind.NodeJs, allowJs: true }, host, undefined, jsOnlyExtensions, undefined);
|
|
34104
33979
|
}
|
|
34105
33980
|
function nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, lookupConfig) {
|
|
34106
|
-
return nodeModuleNameResolverWorker(
|
|
33981
|
+
return nodeModuleNameResolverWorker(moduleName, ts.getDirectoryPath(containingFile), compilerOptions, host, cache, lookupConfig ? tsconfigExtensions : (compilerOptions.resolveJsonModule ? tsPlusJsonExtensions : tsExtensions), redirectedReference);
|
|
34107
33982
|
}
|
|
34108
33983
|
ts.nodeModuleNameResolver = nodeModuleNameResolver;
|
|
34109
|
-
function nodeModuleNameResolverWorker(
|
|
33984
|
+
function nodeModuleNameResolverWorker(moduleName, containingDirectory, compilerOptions, host, cache, extensions, redirectedReference) {
|
|
34110
33985
|
var _a, _b;
|
|
34111
33986
|
var traceEnabled = isTraceEnabled(compilerOptions, host);
|
|
34112
33987
|
var failedLookupLocations = [];
|
|
34113
|
-
var state = { compilerOptions: compilerOptions, host: host, traceEnabled: traceEnabled, failedLookupLocations: failedLookupLocations, packageJsonInfoCache: cache
|
|
33988
|
+
var state = { compilerOptions: compilerOptions, host: host, traceEnabled: traceEnabled, failedLookupLocations: failedLookupLocations, packageJsonInfoCache: cache };
|
|
34114
33989
|
var result = ts.forEach(extensions, function (ext) { return tryResolve(ext); });
|
|
34115
33990
|
return createResolvedModuleWithFailedLookupLocations((_a = result === null || result === void 0 ? void 0 : result.value) === null || _a === void 0 ? void 0 : _a.resolved, (_b = result === null || result === void 0 ? void 0 : result.value) === null || _b === void 0 ? void 0 : _b.isExternalLibraryImport, failedLookupLocations, state.resultFromCache);
|
|
34116
33991
|
function tryResolve(extensions) {
|
|
@@ -34120,19 +33995,10 @@ var ts;
|
|
|
34120
33995
|
return toSearchResult({ resolved: resolved, isExternalLibraryImport: pathContainsNodeModules(resolved.path) });
|
|
34121
33996
|
}
|
|
34122
33997
|
if (!ts.isExternalModuleNameRelative(moduleName)) {
|
|
34123
|
-
|
|
34124
|
-
|
|
34125
|
-
resolved_1 = loadModuleFromImports(extensions, moduleName, containingDirectory, state, cache, redirectedReference);
|
|
34126
|
-
}
|
|
34127
|
-
if (!resolved_1 && features & NodeResolutionFeatures.SelfName) {
|
|
34128
|
-
resolved_1 = loadModuleFromSelfNameReference(extensions, moduleName, containingDirectory, state, cache, redirectedReference);
|
|
34129
|
-
}
|
|
34130
|
-
if (!resolved_1) {
|
|
34131
|
-
if (traceEnabled) {
|
|
34132
|
-
trace(host, ts.Diagnostics.Loading_module_0_from_node_modules_folder_target_file_type_1, moduleName, Extensions[extensions]);
|
|
34133
|
-
}
|
|
34134
|
-
resolved_1 = loadModuleFromNearestNodeModulesDirectory(extensions, moduleName, containingDirectory, state, cache, redirectedReference);
|
|
33998
|
+
if (traceEnabled) {
|
|
33999
|
+
trace(host, ts.Diagnostics.Loading_module_0_from_node_modules_folder_target_file_type_1, moduleName, Extensions[extensions]);
|
|
34135
34000
|
}
|
|
34001
|
+
var resolved_1 = loadModuleFromNearestNodeModulesDirectory(extensions, moduleName, containingDirectory, state, cache, redirectedReference);
|
|
34136
34002
|
if (!resolved_1)
|
|
34137
34003
|
return undefined;
|
|
34138
34004
|
var resolvedValue = resolved_1.value;
|
|
@@ -34222,28 +34088,22 @@ var ts;
|
|
|
34222
34088
|
function loadModuleFromFile(extensions, candidate, onlyRecordFailures, state) {
|
|
34223
34089
|
if (extensions === Extensions.Json || extensions === Extensions.TSConfig) {
|
|
34224
34090
|
var extensionLess = ts.tryRemoveExtension(candidate, ".json");
|
|
34225
|
-
|
|
34226
|
-
return (extensionLess === undefined && extensions === Extensions.Json) ? undefined : tryAddingExtensions(extensionLess || candidate, extensions, extension, onlyRecordFailures, state);
|
|
34091
|
+
return (extensionLess === undefined && extensions === Extensions.Json) ? undefined : tryAddingExtensions(extensionLess || candidate, extensions, onlyRecordFailures, state);
|
|
34227
34092
|
}
|
|
34228
|
-
|
|
34229
|
-
|
|
34230
|
-
|
|
34231
|
-
return resolvedByAddingExtension;
|
|
34232
|
-
}
|
|
34093
|
+
var resolvedByAddingExtension = tryAddingExtensions(candidate, extensions, onlyRecordFailures, state);
|
|
34094
|
+
if (resolvedByAddingExtension) {
|
|
34095
|
+
return resolvedByAddingExtension;
|
|
34233
34096
|
}
|
|
34234
|
-
|
|
34235
|
-
}
|
|
34236
|
-
function loadModuleFromFileNoImplicitExtensions(extensions, candidate, onlyRecordFailures, state) {
|
|
34237
|
-
if (ts.hasJSFileExtension(candidate) || (ts.fileExtensionIs(candidate, ".json") && state.compilerOptions.resolveJsonModule)) {
|
|
34097
|
+
if (ts.hasJSFileExtension(candidate)) {
|
|
34238
34098
|
var extensionless = ts.removeFileExtension(candidate);
|
|
34239
|
-
var extension = candidate.substring(extensionless.length);
|
|
34240
34099
|
if (state.traceEnabled) {
|
|
34100
|
+
var extension = candidate.substring(extensionless.length);
|
|
34241
34101
|
trace(state.host, ts.Diagnostics.File_name_0_has_a_1_extension_stripping_it, candidate, extension);
|
|
34242
34102
|
}
|
|
34243
|
-
return tryAddingExtensions(extensionless, extensions,
|
|
34103
|
+
return tryAddingExtensions(extensionless, extensions, onlyRecordFailures, state);
|
|
34244
34104
|
}
|
|
34245
34105
|
}
|
|
34246
|
-
function tryAddingExtensions(candidate, extensions,
|
|
34106
|
+
function tryAddingExtensions(candidate, extensions, onlyRecordFailures, state) {
|
|
34247
34107
|
if (!onlyRecordFailures) {
|
|
34248
34108
|
var directory = ts.getDirectoryPath(candidate);
|
|
34249
34109
|
if (directory) {
|
|
@@ -34252,51 +34112,11 @@ var ts;
|
|
|
34252
34112
|
}
|
|
34253
34113
|
switch (extensions) {
|
|
34254
34114
|
case Extensions.DtsOnly:
|
|
34255
|
-
|
|
34256
|
-
case ".mjs":
|
|
34257
|
-
case ".mts":
|
|
34258
|
-
case ".d.mts":
|
|
34259
|
-
return tryExtension(".d.mts");
|
|
34260
|
-
case ".cjs":
|
|
34261
|
-
case ".cts":
|
|
34262
|
-
case ".d.cts":
|
|
34263
|
-
return tryExtension(".d.cts");
|
|
34264
|
-
case ".json":
|
|
34265
|
-
candidate += ".json";
|
|
34266
|
-
return tryExtension(".d.ts");
|
|
34267
|
-
default: return tryExtension(".d.ts");
|
|
34268
|
-
}
|
|
34115
|
+
return tryExtension(".d.ts");
|
|
34269
34116
|
case Extensions.TypeScript:
|
|
34270
|
-
|
|
34271
|
-
case ".mjs":
|
|
34272
|
-
case ".mts":
|
|
34273
|
-
case ".d.mts":
|
|
34274
|
-
return tryExtension(".mts") || tryExtension(".d.mts");
|
|
34275
|
-
case ".cjs":
|
|
34276
|
-
case ".cts":
|
|
34277
|
-
case ".d.cts":
|
|
34278
|
-
return tryExtension(".cts") || tryExtension(".d.cts");
|
|
34279
|
-
case ".json":
|
|
34280
|
-
candidate += ".json";
|
|
34281
|
-
return tryExtension(".d.ts");
|
|
34282
|
-
default:
|
|
34283
|
-
return tryExtension(".ts") || tryExtension(".tsx") || tryExtension(".d.ts");
|
|
34284
|
-
}
|
|
34117
|
+
return tryExtension(".ts") || tryExtension(".tsx") || tryExtension(".d.ts");
|
|
34285
34118
|
case Extensions.JavaScript:
|
|
34286
|
-
|
|
34287
|
-
case ".mjs":
|
|
34288
|
-
case ".mts":
|
|
34289
|
-
case ".d.mts":
|
|
34290
|
-
return tryExtension(".mjs");
|
|
34291
|
-
case ".cjs":
|
|
34292
|
-
case ".cts":
|
|
34293
|
-
case ".d.cts":
|
|
34294
|
-
return tryExtension(".cjs");
|
|
34295
|
-
case ".json":
|
|
34296
|
-
return tryExtension(".json");
|
|
34297
|
-
default:
|
|
34298
|
-
return tryExtension(".js") || tryExtension(".jsx");
|
|
34299
|
-
}
|
|
34119
|
+
return tryExtension(".js") || tryExtension(".jsx");
|
|
34300
34120
|
case Extensions.TSConfig:
|
|
34301
34121
|
case Extensions.Json:
|
|
34302
34122
|
return tryExtension(".json");
|
|
@@ -34330,28 +34150,6 @@ var ts;
|
|
|
34330
34150
|
var versionPaths = packageInfo && packageInfo.versionPaths;
|
|
34331
34151
|
return withPackageId(packageInfo, loadNodeModuleFromDirectoryWorker(extensions, candidate, onlyRecordFailures, state, packageJsonContent, versionPaths));
|
|
34332
34152
|
}
|
|
34333
|
-
function getPackageScopeForPath(fileName, packageJsonInfoCache, host, options) {
|
|
34334
|
-
var state = {
|
|
34335
|
-
host: host,
|
|
34336
|
-
compilerOptions: options,
|
|
34337
|
-
traceEnabled: isTraceEnabled(options, host),
|
|
34338
|
-
failedLookupLocations: [],
|
|
34339
|
-
packageJsonInfoCache: packageJsonInfoCache,
|
|
34340
|
-
features: 0,
|
|
34341
|
-
conditions: [],
|
|
34342
|
-
};
|
|
34343
|
-
var parts = ts.getPathComponents(fileName);
|
|
34344
|
-
parts.pop();
|
|
34345
|
-
while (parts.length > 0) {
|
|
34346
|
-
var pkg = getPackageJsonInfo(ts.getPathFromPathComponents(parts), false, state);
|
|
34347
|
-
if (pkg) {
|
|
34348
|
-
return pkg;
|
|
34349
|
-
}
|
|
34350
|
-
parts.pop();
|
|
34351
|
-
}
|
|
34352
|
-
return undefined;
|
|
34353
|
-
}
|
|
34354
|
-
ts.getPackageScopeForPath = getPackageScopeForPath;
|
|
34355
34153
|
function getPackageJsonInfo(packageDirectory, onlyRecordFailures, state) {
|
|
34356
34154
|
var _a, _b, _c;
|
|
34357
34155
|
var host = state.host, traceEnabled = state.traceEnabled;
|
|
@@ -34393,7 +34191,6 @@ var ts;
|
|
|
34393
34191
|
state.failedLookupLocations.push(packageJsonPath);
|
|
34394
34192
|
}
|
|
34395
34193
|
}
|
|
34396
|
-
ts.getPackageJsonInfo = getPackageJsonInfo;
|
|
34397
34194
|
function loadNodeModuleFromDirectoryWorker(extensions, candidate, onlyRecordFailures, state, jsonContent, versionPaths) {
|
|
34398
34195
|
var packageFile;
|
|
34399
34196
|
if (jsonContent) {
|
|
@@ -34445,9 +34242,7 @@ var ts;
|
|
|
34445
34242
|
var packageFileResult = packageFile && removeIgnoredPackageId(loader(extensions, packageFile, onlyRecordFailuresForPackageFile, state));
|
|
34446
34243
|
if (packageFileResult)
|
|
34447
34244
|
return packageFileResult;
|
|
34448
|
-
|
|
34449
|
-
return loadModuleFromFile(extensions, indexPath, onlyRecordFailuresForIndex, state);
|
|
34450
|
-
}
|
|
34245
|
+
return loadModuleFromFile(extensions, indexPath, onlyRecordFailuresForIndex, state);
|
|
34451
34246
|
}
|
|
34452
34247
|
function resolvedIfExtensionMatches(extensions, path) {
|
|
34453
34248
|
var ext = ts.tryGetExtensionFromPath(path);
|
|
@@ -34474,211 +34269,6 @@ var ts;
|
|
|
34474
34269
|
return idx === -1 ? { packageName: moduleName, rest: "" } : { packageName: moduleName.slice(0, idx), rest: moduleName.slice(idx + 1) };
|
|
34475
34270
|
}
|
|
34476
34271
|
ts.parsePackageName = parsePackageName;
|
|
34477
|
-
function allKeysStartWithDot(obj) {
|
|
34478
|
-
return ts.every(ts.getOwnKeys(obj), function (k) { return ts.startsWith(k, "."); });
|
|
34479
|
-
}
|
|
34480
|
-
function noKeyStartsWithDot(obj) {
|
|
34481
|
-
return !ts.some(ts.getOwnKeys(obj), function (k) { return ts.startsWith(k, "."); });
|
|
34482
|
-
}
|
|
34483
|
-
function loadModuleFromSelfNameReference(extensions, moduleName, directory, state, cache, redirectedReference) {
|
|
34484
|
-
var _a, _b;
|
|
34485
|
-
var useCaseSensitiveFileNames = typeof state.host.useCaseSensitiveFileNames === "function" ? state.host.useCaseSensitiveFileNames() : state.host.useCaseSensitiveFileNames;
|
|
34486
|
-
var directoryPath = ts.toPath(ts.combinePaths(directory, "dummy"), (_b = (_a = state.host).getCurrentDirectory) === null || _b === void 0 ? void 0 : _b.call(_a), ts.createGetCanonicalFileName(useCaseSensitiveFileNames === undefined ? true : useCaseSensitiveFileNames));
|
|
34487
|
-
var scope = getPackageScopeForPath(directoryPath, state.packageJsonInfoCache, state.host, state.compilerOptions);
|
|
34488
|
-
if (!scope || !scope.packageJsonContent.exports) {
|
|
34489
|
-
return undefined;
|
|
34490
|
-
}
|
|
34491
|
-
var parts = ts.getPathComponents(moduleName);
|
|
34492
|
-
if (scope.packageJsonContent.name !== parts[1]) {
|
|
34493
|
-
return undefined;
|
|
34494
|
-
}
|
|
34495
|
-
var trailingParts = parts.slice(2);
|
|
34496
|
-
return loadModuleFromExports(scope, extensions, !ts.length(trailingParts) ? "." : "." + ts.directorySeparator + trailingParts.join(ts.directorySeparator), state, cache, redirectedReference);
|
|
34497
|
-
}
|
|
34498
|
-
function loadModuleFromExports(scope, extensions, subpath, state, cache, redirectedReference) {
|
|
34499
|
-
if (!scope.packageJsonContent.exports) {
|
|
34500
|
-
return undefined;
|
|
34501
|
-
}
|
|
34502
|
-
if (subpath === ".") {
|
|
34503
|
-
var mainExport = void 0;
|
|
34504
|
-
if (typeof scope.packageJsonContent.exports === "string" || Array.isArray(scope.packageJsonContent.exports) || (typeof scope.packageJsonContent.exports === "object" && noKeyStartsWithDot(scope.packageJsonContent.exports))) {
|
|
34505
|
-
mainExport = scope.packageJsonContent.exports;
|
|
34506
|
-
}
|
|
34507
|
-
else if (ts.hasProperty(scope.packageJsonContent.exports, ".")) {
|
|
34508
|
-
mainExport = scope.packageJsonContent.exports["."];
|
|
34509
|
-
}
|
|
34510
|
-
if (mainExport) {
|
|
34511
|
-
var loadModuleFromTargetImportOrExport = getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirectedReference, subpath, scope, false);
|
|
34512
|
-
return loadModuleFromTargetImportOrExport(mainExport, "", false);
|
|
34513
|
-
}
|
|
34514
|
-
}
|
|
34515
|
-
else if (allKeysStartWithDot(scope.packageJsonContent.exports)) {
|
|
34516
|
-
if (typeof scope.packageJsonContent.exports !== "object") {
|
|
34517
|
-
if (state.traceEnabled) {
|
|
34518
|
-
trace(state.host, ts.Diagnostics.Export_specifier_0_does_not_exist_in_package_json_scope_at_path_1, subpath, scope.packageDirectory);
|
|
34519
|
-
}
|
|
34520
|
-
return toSearchResult(undefined);
|
|
34521
|
-
}
|
|
34522
|
-
var result = loadModuleFromImportsOrExports(extensions, state, cache, redirectedReference, subpath, scope.packageJsonContent.exports, scope, false);
|
|
34523
|
-
if (result) {
|
|
34524
|
-
return result;
|
|
34525
|
-
}
|
|
34526
|
-
}
|
|
34527
|
-
if (state.traceEnabled) {
|
|
34528
|
-
trace(state.host, ts.Diagnostics.Export_specifier_0_does_not_exist_in_package_json_scope_at_path_1, subpath, scope.packageDirectory);
|
|
34529
|
-
}
|
|
34530
|
-
return toSearchResult(undefined);
|
|
34531
|
-
}
|
|
34532
|
-
function loadModuleFromImports(extensions, moduleName, directory, state, cache, redirectedReference) {
|
|
34533
|
-
var _a, _b;
|
|
34534
|
-
if (moduleName === "#" || ts.startsWith(moduleName, "#/")) {
|
|
34535
|
-
if (state.traceEnabled) {
|
|
34536
|
-
trace(state.host, ts.Diagnostics.Invalid_import_specifier_0_has_no_possible_resolutions, moduleName);
|
|
34537
|
-
}
|
|
34538
|
-
return toSearchResult(undefined);
|
|
34539
|
-
}
|
|
34540
|
-
var useCaseSensitiveFileNames = typeof state.host.useCaseSensitiveFileNames === "function" ? state.host.useCaseSensitiveFileNames() : state.host.useCaseSensitiveFileNames;
|
|
34541
|
-
var directoryPath = ts.toPath(ts.combinePaths(directory, "dummy"), (_b = (_a = state.host).getCurrentDirectory) === null || _b === void 0 ? void 0 : _b.call(_a), ts.createGetCanonicalFileName(useCaseSensitiveFileNames === undefined ? true : useCaseSensitiveFileNames));
|
|
34542
|
-
var scope = getPackageScopeForPath(directoryPath, state.packageJsonInfoCache, state.host, state.compilerOptions);
|
|
34543
|
-
if (!scope) {
|
|
34544
|
-
if (state.traceEnabled) {
|
|
34545
|
-
trace(state.host, ts.Diagnostics.Directory_0_has_no_containing_package_json_scope_Imports_will_not_resolve, directoryPath);
|
|
34546
|
-
}
|
|
34547
|
-
return toSearchResult(undefined);
|
|
34548
|
-
}
|
|
34549
|
-
if (!scope.packageJsonContent.imports) {
|
|
34550
|
-
if (state.traceEnabled) {
|
|
34551
|
-
trace(state.host, ts.Diagnostics.package_json_scope_0_has_no_imports_defined, scope.packageDirectory);
|
|
34552
|
-
}
|
|
34553
|
-
return toSearchResult(undefined);
|
|
34554
|
-
}
|
|
34555
|
-
var result = loadModuleFromImportsOrExports(extensions, state, cache, redirectedReference, moduleName, scope.packageJsonContent.imports, scope, true);
|
|
34556
|
-
if (result) {
|
|
34557
|
-
return result;
|
|
34558
|
-
}
|
|
34559
|
-
if (state.traceEnabled) {
|
|
34560
|
-
trace(state.host, ts.Diagnostics.Import_specifier_0_does_not_exist_in_package_json_scope_at_path_1, moduleName, scope.packageDirectory);
|
|
34561
|
-
}
|
|
34562
|
-
return toSearchResult(undefined);
|
|
34563
|
-
}
|
|
34564
|
-
function loadModuleFromImportsOrExports(extensions, state, cache, redirectedReference, moduleName, lookupTable, scope, isImports) {
|
|
34565
|
-
var loadModuleFromTargetImportOrExport = getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirectedReference, moduleName, scope, isImports);
|
|
34566
|
-
if (!ts.endsWith(moduleName, ts.directorySeparator) && moduleName.indexOf("*") === -1 && ts.hasProperty(lookupTable, moduleName)) {
|
|
34567
|
-
var target = lookupTable[moduleName];
|
|
34568
|
-
return loadModuleFromTargetImportOrExport(target, "", false);
|
|
34569
|
-
}
|
|
34570
|
-
var expandingKeys = ts.sort(ts.filter(ts.getOwnKeys(lookupTable), function (k) { return k.indexOf("*") !== -1 || ts.endsWith(k, "/"); }), function (a, b) { return a.length - b.length; });
|
|
34571
|
-
for (var _i = 0, expandingKeys_1 = expandingKeys; _i < expandingKeys_1.length; _i++) {
|
|
34572
|
-
var potentialTarget = expandingKeys_1[_i];
|
|
34573
|
-
if (state.features & NodeResolutionFeatures.ExportsPatternTrailers && matchesPatternWithTrailer(potentialTarget, moduleName)) {
|
|
34574
|
-
var target = lookupTable[potentialTarget];
|
|
34575
|
-
var starPos = potentialTarget.indexOf("*");
|
|
34576
|
-
var subpath = moduleName.substring(potentialTarget.substring(0, starPos).length, moduleName.length - (potentialTarget.length - 1 - starPos));
|
|
34577
|
-
return loadModuleFromTargetImportOrExport(target, subpath, true);
|
|
34578
|
-
}
|
|
34579
|
-
else if (ts.endsWith(potentialTarget, "*") && ts.startsWith(moduleName, potentialTarget.substring(0, potentialTarget.length - 1))) {
|
|
34580
|
-
var target = lookupTable[potentialTarget];
|
|
34581
|
-
var subpath = moduleName.substring(potentialTarget.length - 1);
|
|
34582
|
-
return loadModuleFromTargetImportOrExport(target, subpath, true);
|
|
34583
|
-
}
|
|
34584
|
-
else if (ts.startsWith(moduleName, potentialTarget)) {
|
|
34585
|
-
var target = lookupTable[potentialTarget];
|
|
34586
|
-
var subpath = moduleName.substring(potentialTarget.length);
|
|
34587
|
-
return loadModuleFromTargetImportOrExport(target, subpath, false);
|
|
34588
|
-
}
|
|
34589
|
-
}
|
|
34590
|
-
function matchesPatternWithTrailer(target, name) {
|
|
34591
|
-
if (ts.endsWith(target, "*"))
|
|
34592
|
-
return false;
|
|
34593
|
-
var starPos = target.indexOf("*");
|
|
34594
|
-
if (starPos === -1)
|
|
34595
|
-
return false;
|
|
34596
|
-
return ts.startsWith(name, target.substring(0, starPos)) && ts.endsWith(name, target.substring(starPos + 1));
|
|
34597
|
-
}
|
|
34598
|
-
}
|
|
34599
|
-
function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirectedReference, moduleName, scope, isImports) {
|
|
34600
|
-
return loadModuleFromTargetImportOrExport;
|
|
34601
|
-
function loadModuleFromTargetImportOrExport(target, subpath, pattern) {
|
|
34602
|
-
var _a, _b;
|
|
34603
|
-
if (typeof target === "string") {
|
|
34604
|
-
if (!pattern && subpath.length > 0 && !ts.endsWith(target, "/")) {
|
|
34605
|
-
if (state.traceEnabled) {
|
|
34606
|
-
trace(state.host, ts.Diagnostics.package_json_scope_0_has_invalid_type_for_target_of_specifier_1, scope.packageDirectory, moduleName);
|
|
34607
|
-
}
|
|
34608
|
-
return toSearchResult(undefined);
|
|
34609
|
-
}
|
|
34610
|
-
if (!ts.startsWith(target, "./")) {
|
|
34611
|
-
if (isImports && !ts.startsWith(target, "../") && !ts.startsWith(target, "/") && !ts.isRootedDiskPath(target)) {
|
|
34612
|
-
var combinedLookup = pattern ? target.replace(/\*/g, subpath) : target + subpath;
|
|
34613
|
-
var result = nodeModuleNameResolverWorker(state.features, combinedLookup, scope.packageDirectory + "/", state.compilerOptions, state.host, cache, [extensions], redirectedReference);
|
|
34614
|
-
return toSearchResult(result.resolvedModule ? { path: result.resolvedModule.resolvedFileName, extension: result.resolvedModule.extension, packageId: result.resolvedModule.packageId, originalPath: result.resolvedModule.originalPath } : undefined);
|
|
34615
|
-
}
|
|
34616
|
-
if (state.traceEnabled) {
|
|
34617
|
-
trace(state.host, ts.Diagnostics.package_json_scope_0_has_invalid_type_for_target_of_specifier_1, scope.packageDirectory, moduleName);
|
|
34618
|
-
}
|
|
34619
|
-
return toSearchResult(undefined);
|
|
34620
|
-
}
|
|
34621
|
-
var parts = ts.pathIsRelative(target) ? ts.getPathComponents(target).slice(1) : ts.getPathComponents(target);
|
|
34622
|
-
var partsAfterFirst = parts.slice(1);
|
|
34623
|
-
if (partsAfterFirst.indexOf("..") >= 0 || partsAfterFirst.indexOf(".") >= 0 || partsAfterFirst.indexOf("node_modules") >= 0) {
|
|
34624
|
-
if (state.traceEnabled) {
|
|
34625
|
-
trace(state.host, ts.Diagnostics.package_json_scope_0_has_invalid_type_for_target_of_specifier_1, scope.packageDirectory, moduleName);
|
|
34626
|
-
}
|
|
34627
|
-
return toSearchResult(undefined);
|
|
34628
|
-
}
|
|
34629
|
-
var resolvedTarget = ts.combinePaths(scope.packageDirectory, target);
|
|
34630
|
-
var subpathParts = ts.getPathComponents(subpath);
|
|
34631
|
-
if (subpathParts.indexOf("..") >= 0 || subpathParts.indexOf(".") >= 0 || subpathParts.indexOf("node_modules") >= 0) {
|
|
34632
|
-
if (state.traceEnabled) {
|
|
34633
|
-
trace(state.host, ts.Diagnostics.package_json_scope_0_has_invalid_type_for_target_of_specifier_1, scope.packageDirectory, moduleName);
|
|
34634
|
-
}
|
|
34635
|
-
return toSearchResult(undefined);
|
|
34636
|
-
}
|
|
34637
|
-
var finalPath = ts.getNormalizedAbsolutePath(pattern ? resolvedTarget.replace(/\*/g, subpath) : resolvedTarget + subpath, (_b = (_a = state.host).getCurrentDirectory) === null || _b === void 0 ? void 0 : _b.call(_a));
|
|
34638
|
-
return toSearchResult(withPackageId(scope, loadModuleFromFileNoImplicitExtensions(extensions, finalPath, false, state)));
|
|
34639
|
-
}
|
|
34640
|
-
else if (typeof target === "object" && target !== null) {
|
|
34641
|
-
if (!Array.isArray(target)) {
|
|
34642
|
-
for (var _i = 0, _c = ts.getOwnKeys(target); _i < _c.length; _i++) {
|
|
34643
|
-
var key = _c[_i];
|
|
34644
|
-
if (key === "default" || state.conditions.indexOf(key) >= 0) {
|
|
34645
|
-
var subTarget = target[key];
|
|
34646
|
-
var result = loadModuleFromTargetImportOrExport(subTarget, subpath, pattern);
|
|
34647
|
-
if (result) {
|
|
34648
|
-
return result;
|
|
34649
|
-
}
|
|
34650
|
-
}
|
|
34651
|
-
}
|
|
34652
|
-
return undefined;
|
|
34653
|
-
}
|
|
34654
|
-
else {
|
|
34655
|
-
if (!ts.length(target)) {
|
|
34656
|
-
if (state.traceEnabled) {
|
|
34657
|
-
trace(state.host, ts.Diagnostics.package_json_scope_0_has_invalid_type_for_target_of_specifier_1, scope.packageDirectory, moduleName);
|
|
34658
|
-
}
|
|
34659
|
-
return toSearchResult(undefined);
|
|
34660
|
-
}
|
|
34661
|
-
for (var _d = 0, target_1 = target; _d < target_1.length; _d++) {
|
|
34662
|
-
var elem = target_1[_d];
|
|
34663
|
-
var result = loadModuleFromTargetImportOrExport(elem, subpath, pattern);
|
|
34664
|
-
if (result) {
|
|
34665
|
-
return result;
|
|
34666
|
-
}
|
|
34667
|
-
}
|
|
34668
|
-
}
|
|
34669
|
-
}
|
|
34670
|
-
else if (target === null) {
|
|
34671
|
-
if (state.traceEnabled) {
|
|
34672
|
-
trace(state.host, ts.Diagnostics.package_json_scope_0_explicitly_maps_specifier_1_to_null, scope.packageDirectory, moduleName);
|
|
34673
|
-
}
|
|
34674
|
-
return toSearchResult(undefined);
|
|
34675
|
-
}
|
|
34676
|
-
if (state.traceEnabled) {
|
|
34677
|
-
trace(state.host, ts.Diagnostics.package_json_scope_0_has_invalid_type_for_target_of_specifier_1, scope.packageDirectory, moduleName);
|
|
34678
|
-
}
|
|
34679
|
-
return toSearchResult(undefined);
|
|
34680
|
-
}
|
|
34681
|
-
}
|
|
34682
34272
|
function loadModuleFromNearestNodeModulesDirectory(extensions, moduleName, directory, state, cache, redirectedReference) {
|
|
34683
34273
|
return loadModuleFromNearestNodeModulesDirectoryWorker(extensions, moduleName, directory, state, false, cache, redirectedReference);
|
|
34684
34274
|
}
|
|
@@ -34686,24 +34276,24 @@ var ts;
|
|
|
34686
34276
|
return loadModuleFromNearestNodeModulesDirectoryWorker(Extensions.DtsOnly, moduleName, directory, state, true, undefined, undefined);
|
|
34687
34277
|
}
|
|
34688
34278
|
function loadModuleFromNearestNodeModulesDirectoryWorker(extensions, moduleName, directory, state, typesScopeOnly, cache, redirectedReference) {
|
|
34689
|
-
var perModuleNameCache = cache && cache.getOrCreateCacheForModuleName(moduleName,
|
|
34279
|
+
var perModuleNameCache = cache && cache.getOrCreateCacheForModuleName(moduleName, redirectedReference);
|
|
34690
34280
|
return ts.forEachAncestorDirectory(ts.normalizeSlashes(directory), function (ancestorDirectory) {
|
|
34691
34281
|
if (ts.getBaseFileName(ancestorDirectory) !== "node_modules") {
|
|
34692
34282
|
var resolutionFromCache = tryFindNonRelativeModuleNameInCache(perModuleNameCache, moduleName, ancestorDirectory, state);
|
|
34693
34283
|
if (resolutionFromCache) {
|
|
34694
34284
|
return resolutionFromCache;
|
|
34695
34285
|
}
|
|
34696
|
-
return toSearchResult(loadModuleFromImmediateNodeModulesDirectory(extensions, moduleName, ancestorDirectory, state, typesScopeOnly
|
|
34286
|
+
return toSearchResult(loadModuleFromImmediateNodeModulesDirectory(extensions, moduleName, ancestorDirectory, state, typesScopeOnly));
|
|
34697
34287
|
}
|
|
34698
34288
|
});
|
|
34699
34289
|
}
|
|
34700
|
-
function loadModuleFromImmediateNodeModulesDirectory(extensions, moduleName, directory, state, typesScopeOnly
|
|
34290
|
+
function loadModuleFromImmediateNodeModulesDirectory(extensions, moduleName, directory, state, typesScopeOnly) {
|
|
34701
34291
|
var nodeModulesFolder = ts.combinePaths(directory, "node_modules");
|
|
34702
34292
|
var nodeModulesFolderExists = ts.directoryProbablyExists(nodeModulesFolder, state.host);
|
|
34703
34293
|
if (!nodeModulesFolderExists && state.traceEnabled) {
|
|
34704
34294
|
trace(state.host, ts.Diagnostics.Directory_0_does_not_exist_skipping_all_lookups_in_it, nodeModulesFolder);
|
|
34705
34295
|
}
|
|
34706
|
-
var packageResult = typesScopeOnly ? undefined : loadModuleFromSpecificNodeModulesDirectory(extensions, moduleName, nodeModulesFolder, nodeModulesFolderExists, state
|
|
34296
|
+
var packageResult = typesScopeOnly ? undefined : loadModuleFromSpecificNodeModulesDirectory(extensions, moduleName, nodeModulesFolder, nodeModulesFolderExists, state);
|
|
34707
34297
|
if (packageResult) {
|
|
34708
34298
|
return packageResult;
|
|
34709
34299
|
}
|
|
@@ -34716,32 +34306,26 @@ var ts;
|
|
|
34716
34306
|
}
|
|
34717
34307
|
nodeModulesAtTypesExists = false;
|
|
34718
34308
|
}
|
|
34719
|
-
return loadModuleFromSpecificNodeModulesDirectory(Extensions.DtsOnly, mangleScopedPackageNameWithTrace(moduleName, state), nodeModulesAtTypes_1, nodeModulesAtTypesExists, state
|
|
34309
|
+
return loadModuleFromSpecificNodeModulesDirectory(Extensions.DtsOnly, mangleScopedPackageNameWithTrace(moduleName, state), nodeModulesAtTypes_1, nodeModulesAtTypesExists, state);
|
|
34720
34310
|
}
|
|
34721
34311
|
}
|
|
34722
|
-
function loadModuleFromSpecificNodeModulesDirectory(extensions, moduleName, nodeModulesDirectory, nodeModulesDirectoryExists, state
|
|
34312
|
+
function loadModuleFromSpecificNodeModulesDirectory(extensions, moduleName, nodeModulesDirectory, nodeModulesDirectoryExists, state) {
|
|
34723
34313
|
var candidate = ts.normalizePath(ts.combinePaths(nodeModulesDirectory, moduleName));
|
|
34724
34314
|
var packageInfo = getPackageJsonInfo(candidate, !nodeModulesDirectoryExists, state);
|
|
34725
|
-
if (
|
|
34726
|
-
|
|
34727
|
-
|
|
34728
|
-
|
|
34729
|
-
return noPackageId(fromFile);
|
|
34730
|
-
}
|
|
34731
|
-
var fromDirectory = loadNodeModuleFromDirectoryWorker(extensions, candidate, !nodeModulesDirectoryExists, state, packageInfo.packageJsonContent, packageInfo.versionPaths);
|
|
34732
|
-
return withPackageId(packageInfo, fromDirectory);
|
|
34315
|
+
if (packageInfo) {
|
|
34316
|
+
var fromFile = loadModuleFromFile(extensions, candidate, !nodeModulesDirectoryExists, state);
|
|
34317
|
+
if (fromFile) {
|
|
34318
|
+
return noPackageId(fromFile);
|
|
34733
34319
|
}
|
|
34320
|
+
var fromDirectory = loadNodeModuleFromDirectoryWorker(extensions, candidate, !nodeModulesDirectoryExists, state, packageInfo.packageJsonContent, packageInfo.versionPaths);
|
|
34321
|
+
return withPackageId(packageInfo, fromDirectory);
|
|
34734
34322
|
}
|
|
34735
|
-
var _a = parsePackageName(moduleName), packageName = _a.packageName, rest = _a.rest;
|
|
34736
34323
|
var loader = function (extensions, candidate, onlyRecordFailures, state) {
|
|
34737
|
-
var _a;
|
|
34738
|
-
if (packageInfo && packageInfo.packageJsonContent.exports && state.features & NodeResolutionFeatures.Exports) {
|
|
34739
|
-
return (_a = loadModuleFromExports(packageInfo, extensions, ts.combinePaths(".", rest), state, cache, redirectedReference)) === null || _a === void 0 ? void 0 : _a.value;
|
|
34740
|
-
}
|
|
34741
34324
|
var pathAndExtension = loadModuleFromFile(extensions, candidate, onlyRecordFailures, state) ||
|
|
34742
34325
|
loadNodeModuleFromDirectoryWorker(extensions, candidate, onlyRecordFailures, state, packageInfo && packageInfo.packageJsonContent, packageInfo && packageInfo.versionPaths);
|
|
34743
34326
|
return withPackageId(packageInfo, pathAndExtension);
|
|
34744
34327
|
};
|
|
34328
|
+
var _a = parsePackageName(moduleName), packageName = _a.packageName, rest = _a.rest;
|
|
34745
34329
|
if (rest !== "") {
|
|
34746
34330
|
var packageDirectory = ts.combinePaths(nodeModulesDirectory, packageName);
|
|
34747
34331
|
packageInfo = getPackageJsonInfo(packageDirectory, !nodeModulesDirectoryExists, state);
|
|
@@ -34834,7 +34418,7 @@ var ts;
|
|
|
34834
34418
|
function classicNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference) {
|
|
34835
34419
|
var traceEnabled = isTraceEnabled(compilerOptions, host);
|
|
34836
34420
|
var failedLookupLocations = [];
|
|
34837
|
-
var state = { compilerOptions: compilerOptions, host: host, traceEnabled: traceEnabled, failedLookupLocations: failedLookupLocations, packageJsonInfoCache: cache
|
|
34421
|
+
var state = { compilerOptions: compilerOptions, host: host, traceEnabled: traceEnabled, failedLookupLocations: failedLookupLocations, packageJsonInfoCache: cache };
|
|
34838
34422
|
var containingDirectory = ts.getDirectoryPath(containingFile);
|
|
34839
34423
|
var resolved = tryResolve(Extensions.TypeScript) || tryResolve(Extensions.JavaScript);
|
|
34840
34424
|
return createResolvedModuleWithFailedLookupLocations(resolved && resolved.value, false, failedLookupLocations, state.resultFromCache);
|
|
@@ -34844,7 +34428,7 @@ var ts;
|
|
|
34844
34428
|
return { value: resolvedUsingSettings };
|
|
34845
34429
|
}
|
|
34846
34430
|
if (!ts.isExternalModuleNameRelative(moduleName)) {
|
|
34847
|
-
var perModuleNameCache_1 = cache && cache.getOrCreateCacheForModuleName(moduleName,
|
|
34431
|
+
var perModuleNameCache_1 = cache && cache.getOrCreateCacheForModuleName(moduleName, redirectedReference);
|
|
34848
34432
|
var resolved_3 = ts.forEachAncestorDirectory(containingDirectory, function (directory) {
|
|
34849
34433
|
var resolutionFromCache = tryFindNonRelativeModuleNameInCache(perModuleNameCache_1, moduleName, directory, state);
|
|
34850
34434
|
if (resolutionFromCache) {
|
|
@@ -34873,8 +34457,8 @@ var ts;
|
|
|
34873
34457
|
trace(host, ts.Diagnostics.Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using_cache_location_2, projectName, moduleName, globalCache);
|
|
34874
34458
|
}
|
|
34875
34459
|
var failedLookupLocations = [];
|
|
34876
|
-
var state = { compilerOptions: compilerOptions, host: host, traceEnabled: traceEnabled, failedLookupLocations: failedLookupLocations, packageJsonInfoCache: packageJsonInfoCache
|
|
34877
|
-
var resolved = loadModuleFromImmediateNodeModulesDirectory(Extensions.DtsOnly, moduleName, globalCache, state, false
|
|
34460
|
+
var state = { compilerOptions: compilerOptions, host: host, traceEnabled: traceEnabled, failedLookupLocations: failedLookupLocations, packageJsonInfoCache: packageJsonInfoCache };
|
|
34461
|
+
var resolved = loadModuleFromImmediateNodeModulesDirectory(Extensions.DtsOnly, moduleName, globalCache, state, false);
|
|
34878
34462
|
return createResolvedModuleWithFailedLookupLocations(resolved, true, failedLookupLocations, state.resultFromCache);
|
|
34879
34463
|
}
|
|
34880
34464
|
ts.loadModuleFromGlobalCache = loadModuleFromGlobalCache;
|
|
@@ -36727,7 +36311,7 @@ var ts;
|
|
|
36727
36311
|
}
|
|
36728
36312
|
}
|
|
36729
36313
|
function checkStrictModeLabeledStatement(node) {
|
|
36730
|
-
if (inStrictMode &&
|
|
36314
|
+
if (inStrictMode && options.target >= 2) {
|
|
36731
36315
|
if (ts.isDeclarationStatement(node.statement) || ts.isVariableStatement(node.statement)) {
|
|
36732
36316
|
errorOnFirstToken(node.label, ts.Diagnostics.A_label_is_not_allowed_here);
|
|
36733
36317
|
}
|
|
@@ -37885,7 +37469,7 @@ var ts;
|
|
|
37885
37469
|
host.getSourceFiles().forEach(function (sf) {
|
|
37886
37470
|
if (!sf.resolvedModules)
|
|
37887
37471
|
return;
|
|
37888
|
-
sf.resolvedModules
|
|
37472
|
+
ts.forEachEntry(sf.resolvedModules, function (r) {
|
|
37889
37473
|
if (r && r.packageId)
|
|
37890
37474
|
map.set(r.packageId.name, r.extension === ".d.ts" || !!map.get(r.packageId.name));
|
|
37891
37475
|
});
|
|
@@ -38944,7 +38528,7 @@ var ts;
|
|
|
38944
38528
|
return !isPropertyImmediatelyReferencedWithinDeclaration(declaration, usage, false);
|
|
38945
38529
|
}
|
|
38946
38530
|
else if (ts.isParameterPropertyDeclaration(declaration, declaration.parent)) {
|
|
38947
|
-
return !(
|
|
38531
|
+
return !(compilerOptions.target === 99 && useDefineForClassFields
|
|
38948
38532
|
&& ts.getContainingClass(declaration) === ts.getContainingClass(usage)
|
|
38949
38533
|
&& isUsedInFunctionOrInstanceProperty(usage, declaration));
|
|
38950
38534
|
}
|
|
@@ -38960,7 +38544,7 @@ var ts;
|
|
|
38960
38544
|
return true;
|
|
38961
38545
|
}
|
|
38962
38546
|
if (isUsedInFunctionOrInstanceProperty(usage, declaration)) {
|
|
38963
|
-
if (
|
|
38547
|
+
if (compilerOptions.target === 99 && useDefineForClassFields
|
|
38964
38548
|
&& ts.getContainingClass(declaration)
|
|
38965
38549
|
&& (ts.isPropertyDeclaration(declaration) || ts.isParameterPropertyDeclaration(declaration, declaration.parent))) {
|
|
38966
38550
|
return !isPropertyImmediatelyReferencedWithinDeclaration(declaration, usage, true);
|
|
@@ -39251,7 +38835,7 @@ var ts;
|
|
|
39251
38835
|
}
|
|
39252
38836
|
break;
|
|
39253
38837
|
case 212:
|
|
39254
|
-
if (
|
|
38838
|
+
if (compilerOptions.target >= 2) {
|
|
39255
38839
|
break;
|
|
39256
38840
|
}
|
|
39257
38841
|
case 167:
|
|
@@ -39393,7 +38977,7 @@ var ts;
|
|
|
39393
38977
|
return undefined;
|
|
39394
38978
|
}
|
|
39395
38979
|
if (nameNotFoundMessage) {
|
|
39396
|
-
if (propertyWithInvalidInitializer && !(
|
|
38980
|
+
if (propertyWithInvalidInitializer && !(compilerOptions.target === 99 && useDefineForClassFields)) {
|
|
39397
38981
|
var propertyName = propertyWithInvalidInitializer.name;
|
|
39398
38982
|
error(errorLocation, ts.Diagnostics.Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor, ts.declarationNameToString(propertyName), diagnosticName(nameArg));
|
|
39399
38983
|
return undefined;
|
|
@@ -39890,7 +39474,7 @@ var ts;
|
|
|
39890
39474
|
if (!ts.isIdentifier(name)) {
|
|
39891
39475
|
return undefined;
|
|
39892
39476
|
}
|
|
39893
|
-
var suppressInteropError = name.escapedText === "default" && !!(compilerOptions.allowSyntheticDefaultImports ||
|
|
39477
|
+
var suppressInteropError = name.escapedText === "default" && !!(compilerOptions.allowSyntheticDefaultImports || compilerOptions.esModuleInterop);
|
|
39894
39478
|
var targetSymbol = resolveESModuleSymbol(moduleSymbol, moduleSpecifier, false, suppressInteropError);
|
|
39895
39479
|
if (targetSymbol) {
|
|
39896
39480
|
if (name.escapedText) {
|
|
@@ -39966,18 +39550,18 @@ var ts;
|
|
|
39966
39550
|
}
|
|
39967
39551
|
function reportInvalidImportEqualsExportMember(node, name, declarationName, moduleName) {
|
|
39968
39552
|
if (moduleKind >= ts.ModuleKind.ES2015) {
|
|
39969
|
-
var message =
|
|
39553
|
+
var message = compilerOptions.esModuleInterop ? ts.Diagnostics._0_can_only_be_imported_by_using_a_default_import :
|
|
39970
39554
|
ts.Diagnostics._0_can_only_be_imported_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import;
|
|
39971
39555
|
error(name, message, declarationName);
|
|
39972
39556
|
}
|
|
39973
39557
|
else {
|
|
39974
39558
|
if (ts.isInJSFile(node)) {
|
|
39975
|
-
var message =
|
|
39559
|
+
var message = compilerOptions.esModuleInterop ? ts.Diagnostics._0_can_only_be_imported_by_using_a_require_call_or_by_using_a_default_import :
|
|
39976
39560
|
ts.Diagnostics._0_can_only_be_imported_by_using_a_require_call_or_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import;
|
|
39977
39561
|
error(name, message, declarationName);
|
|
39978
39562
|
}
|
|
39979
39563
|
else {
|
|
39980
|
-
var message =
|
|
39564
|
+
var message = compilerOptions.esModuleInterop ? ts.Diagnostics._0_can_only_be_imported_by_using_import_1_require_2_or_a_default_import :
|
|
39981
39565
|
ts.Diagnostics._0_can_only_be_imported_by_using_import_1_require_2_or_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import;
|
|
39982
39566
|
error(name, message, declarationName, declarationName, moduleName);
|
|
39983
39567
|
}
|
|
@@ -40355,7 +39939,6 @@ var ts;
|
|
|
40355
39939
|
: undefined;
|
|
40356
39940
|
}
|
|
40357
39941
|
function resolveExternalModule(location, moduleReference, moduleNotFoundError, errorNode, isForAugmentation) {
|
|
40358
|
-
var _a, _b, _c, _d;
|
|
40359
39942
|
if (isForAugmentation === void 0) { isForAugmentation = false; }
|
|
40360
39943
|
if (ts.startsWith(moduleReference, "@types/")) {
|
|
40361
39944
|
var diag = ts.Diagnostics.Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1;
|
|
@@ -40367,13 +39950,7 @@ var ts;
|
|
|
40367
39950
|
return ambientModule;
|
|
40368
39951
|
}
|
|
40369
39952
|
var currentSourceFile = ts.getSourceFileOfNode(location);
|
|
40370
|
-
var
|
|
40371
|
-
? location
|
|
40372
|
-
: ((_a = (ts.isImportCall(location) ? location : ts.findAncestor(location, ts.isImportCall))) === null || _a === void 0 ? void 0 : _a.arguments[0]) ||
|
|
40373
|
-
((_b = (ts.isImportDeclaration(location) ? location : ts.findAncestor(location, ts.isImportDeclaration))) === null || _b === void 0 ? void 0 : _b.moduleSpecifier) ||
|
|
40374
|
-
((_c = (ts.isExternalModuleImportEqualsDeclaration(location) ? location : ts.findAncestor(location, ts.isExternalModuleImportEqualsDeclaration))) === null || _c === void 0 ? void 0 : _c.moduleReference.expression) ||
|
|
40375
|
-
((_d = (ts.isExportDeclaration(location) ? location : ts.findAncestor(location, ts.isExportDeclaration))) === null || _d === void 0 ? void 0 : _d.moduleSpecifier);
|
|
40376
|
-
var resolvedModule = ts.getResolvedModule(currentSourceFile, moduleReference, contextSpecifier && ts.isStringLiteralLike(contextSpecifier) ? ts.getModeForUsageLocation(currentSourceFile, contextSpecifier) : undefined);
|
|
39953
|
+
var resolvedModule = ts.getResolvedModule(currentSourceFile, moduleReference);
|
|
40377
39954
|
var resolutionDiagnostic = resolvedModule && ts.getResolutionDiagnostic(compilerOptions, resolvedModule);
|
|
40378
39955
|
var sourceFile = resolvedModule && !resolutionDiagnostic && host.getSourceFile(resolvedModule.resolvedFileName);
|
|
40379
39956
|
if (sourceFile) {
|
|
@@ -40381,12 +39958,6 @@ var ts;
|
|
|
40381
39958
|
if (resolvedModule.isExternalLibraryImport && !ts.resolutionExtensionIsTSOrJson(resolvedModule.extension)) {
|
|
40382
39959
|
errorOnImplicitAnyModule(false, errorNode, resolvedModule, moduleReference);
|
|
40383
39960
|
}
|
|
40384
|
-
if (ts.getEmitModuleResolutionKind(compilerOptions) === ts.ModuleResolutionKind.Node12 || ts.getEmitModuleResolutionKind(compilerOptions) === ts.ModuleResolutionKind.NodeNext) {
|
|
40385
|
-
var isSyncImport = (currentSourceFile.impliedNodeFormat === ts.ModuleKind.CommonJS && !ts.findAncestor(location, ts.isImportCall)) || !!ts.findAncestor(location, ts.isImportEqualsDeclaration);
|
|
40386
|
-
if (isSyncImport && sourceFile.impliedNodeFormat === ts.ModuleKind.ESNext) {
|
|
40387
|
-
error(errorNode, ts.Diagnostics.Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_es_module_which_cannot_be_imported_synchronously_Use_dynamic_import_instead, moduleReference);
|
|
40388
|
-
}
|
|
40389
|
-
}
|
|
40390
39961
|
return getMergedSymbol(sourceFile.symbol);
|
|
40391
39962
|
}
|
|
40392
39963
|
if (moduleNotFoundError) {
|
|
@@ -40431,14 +40002,15 @@ var ts;
|
|
|
40431
40002
|
var diag = ts.Diagnostics.An_import_path_cannot_end_with_a_0_extension_Consider_importing_1_instead;
|
|
40432
40003
|
var importSourceWithoutExtension = ts.removeExtension(moduleReference, tsExtension);
|
|
40433
40004
|
var replacedImportSource = importSourceWithoutExtension;
|
|
40434
|
-
|
|
40005
|
+
var moduleKind_1 = ts.getEmitModuleKind(compilerOptions);
|
|
40006
|
+
if (moduleKind_1 >= ts.ModuleKind.ES2015) {
|
|
40435
40007
|
replacedImportSource += ".js";
|
|
40436
40008
|
}
|
|
40437
40009
|
error(errorNode, diag, tsExtension, replacedImportSource);
|
|
40438
40010
|
}
|
|
40439
40011
|
else if (!compilerOptions.resolveJsonModule &&
|
|
40440
40012
|
ts.fileExtensionIs(moduleReference, ".json") &&
|
|
40441
|
-
ts.getEmitModuleResolutionKind(compilerOptions)
|
|
40013
|
+
ts.getEmitModuleResolutionKind(compilerOptions) === ts.ModuleResolutionKind.NodeJs &&
|
|
40442
40014
|
ts.hasJsonModuleEmitEnabled(compilerOptions)) {
|
|
40443
40015
|
error(errorNode, ts.Diagnostics.Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension, moduleReference);
|
|
40444
40016
|
}
|
|
@@ -40505,7 +40077,7 @@ var ts;
|
|
|
40505
40077
|
error(referencingLocation, ts.Diagnostics.This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_referencing_its_default_export, compilerOptionName);
|
|
40506
40078
|
return symbol;
|
|
40507
40079
|
}
|
|
40508
|
-
if (
|
|
40080
|
+
if (compilerOptions.esModuleInterop) {
|
|
40509
40081
|
var referenceParent = referencingLocation.parent;
|
|
40510
40082
|
if ((ts.isImportDeclaration(referenceParent) && ts.getNamespaceDeclarationNode(referenceParent)) ||
|
|
40511
40083
|
ts.isImportCall(referenceParent)) {
|
|
@@ -42441,7 +42013,7 @@ var ts;
|
|
|
42441
42013
|
var nonRootParts = chain.length > 1 ? createAccessFromSymbolChain(chain, chain.length - 1, 1) : undefined;
|
|
42442
42014
|
var typeParameterNodes = overrideTypeArguments || lookupTypeParameterNodes(chain, 0, context);
|
|
42443
42015
|
var specifier = getSpecifierForModuleSymbol(chain[0], context);
|
|
42444
|
-
if (!(context.flags & 67108864) && ts.getEmitModuleResolutionKind(compilerOptions)
|
|
42016
|
+
if (!(context.flags & 67108864) && ts.getEmitModuleResolutionKind(compilerOptions) === ts.ModuleResolutionKind.NodeJs && specifier.indexOf("/node_modules/") >= 0) {
|
|
42445
42017
|
context.encounteredError = true;
|
|
42446
42018
|
if (context.tracker.reportLikelyUnsafeImportRequiredError) {
|
|
42447
42019
|
context.tracker.reportLikelyUnsafeImportRequiredError(specifier);
|
|
@@ -42658,7 +42230,7 @@ var ts;
|
|
|
42658
42230
|
if (nameType) {
|
|
42659
42231
|
if (nameType.flags & 384) {
|
|
42660
42232
|
var name = "" + nameType.value;
|
|
42661
|
-
if (!ts.isIdentifierText(name,
|
|
42233
|
+
if (!ts.isIdentifierText(name, compilerOptions.target) && !isNumericLiteralName(name)) {
|
|
42662
42234
|
return ts.factory.createStringLiteral(name, !!singleQuote);
|
|
42663
42235
|
}
|
|
42664
42236
|
if (isNumericLiteralName(name) && ts.startsWith(name, "-")) {
|
|
@@ -42672,7 +42244,7 @@ var ts;
|
|
|
42672
42244
|
}
|
|
42673
42245
|
}
|
|
42674
42246
|
function createPropertyNameNodeForIdentifierOrLiteral(name, stringNamed, singleQuote) {
|
|
42675
|
-
return ts.isIdentifierText(name,
|
|
42247
|
+
return ts.isIdentifierText(name, compilerOptions.target) ? ts.factory.createIdentifier(name) :
|
|
42676
42248
|
!stringNamed && isNumericLiteralName(name) && +name >= 0 ? ts.factory.createNumericLiteral(+name) :
|
|
42677
42249
|
ts.factory.createStringLiteral(name, !!singleQuote);
|
|
42678
42250
|
}
|
|
@@ -43414,26 +42986,6 @@ var ts;
|
|
|
43414
42986
|
context.enclosingDeclaration = oldEnclosing;
|
|
43415
42987
|
addResult(ts.setTextRange(ts.factory.createClassDeclaration(undefined, undefined, localName, typeParamDecls, heritageClauses, __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], indexSignatures, true), staticMembers, true), constructors, true), publicProperties, true), privateProperties, true)), symbol.declarations && ts.filter(symbol.declarations, function (d) { return ts.isClassDeclaration(d) || ts.isClassExpression(d); })[0]), modifierFlags);
|
|
43416
42988
|
}
|
|
43417
|
-
function getSomeTargetNameFromDeclarations(declarations) {
|
|
43418
|
-
return ts.firstDefined(declarations, function (d) {
|
|
43419
|
-
if (ts.isImportSpecifier(d) || ts.isExportSpecifier(d)) {
|
|
43420
|
-
return ts.idText(d.propertyName || d.name);
|
|
43421
|
-
}
|
|
43422
|
-
if (ts.isBinaryExpression(d) || ts.isExportAssignment(d)) {
|
|
43423
|
-
var expression = ts.isExportAssignment(d) ? d.expression : d.right;
|
|
43424
|
-
if (ts.isPropertyAccessExpression(expression)) {
|
|
43425
|
-
return ts.idText(expression.name);
|
|
43426
|
-
}
|
|
43427
|
-
}
|
|
43428
|
-
if (isAliasSymbolDeclaration(d)) {
|
|
43429
|
-
var name = ts.getNameOfDeclaration(d);
|
|
43430
|
-
if (name && ts.isIdentifier(name)) {
|
|
43431
|
-
return ts.idText(name);
|
|
43432
|
-
}
|
|
43433
|
-
}
|
|
43434
|
-
return undefined;
|
|
43435
|
-
});
|
|
43436
|
-
}
|
|
43437
42989
|
function serializeAsAlias(symbol, localName, modifierFlags) {
|
|
43438
42990
|
var _a, _b, _c, _d, _e;
|
|
43439
42991
|
var node = getDeclarationOfAliasSymbol(symbol);
|
|
@@ -43443,8 +42995,8 @@ var ts;
|
|
|
43443
42995
|
if (!target) {
|
|
43444
42996
|
return;
|
|
43445
42997
|
}
|
|
43446
|
-
var verbatimTargetName = ts.
|
|
43447
|
-
if (verbatimTargetName === "export=" && (
|
|
42998
|
+
var verbatimTargetName = ts.unescapeLeadingUnderscores(target.escapedName);
|
|
42999
|
+
if (verbatimTargetName === "export=" && (compilerOptions.esModuleInterop || compilerOptions.allowSyntheticDefaultImports)) {
|
|
43448
43000
|
verbatimTargetName = "default";
|
|
43449
43001
|
}
|
|
43450
43002
|
var targetName = getInternalSymbolName(target, verbatimTargetName);
|
|
@@ -43871,7 +43423,7 @@ var ts;
|
|
|
43871
43423
|
if (nameType) {
|
|
43872
43424
|
if (nameType.flags & 384) {
|
|
43873
43425
|
var name = "" + nameType.value;
|
|
43874
|
-
if (!ts.isIdentifierText(name,
|
|
43426
|
+
if (!ts.isIdentifierText(name, compilerOptions.target) && !isNumericLiteralName(name)) {
|
|
43875
43427
|
return "\"" + ts.escapeString(name, 34) + "\"";
|
|
43876
43428
|
}
|
|
43877
43429
|
if (isNumericLiteralName(name) && ts.startsWith(name, "-")) {
|
|
@@ -51907,7 +51459,7 @@ var ts;
|
|
|
51907
51459
|
if (path.length === 0) {
|
|
51908
51460
|
path = "" + str;
|
|
51909
51461
|
}
|
|
51910
|
-
else if (ts.isIdentifierText(str,
|
|
51462
|
+
else if (ts.isIdentifierText(str, compilerOptions.target)) {
|
|
51911
51463
|
path = path + "." + str;
|
|
51912
51464
|
}
|
|
51913
51465
|
else if (str[0] === "[" && str[str.length - 1] === "]") {
|
|
@@ -57472,7 +57024,19 @@ var ts;
|
|
|
57472
57024
|
return substituteConstraints ? mapType(type, function (t) { return t.flags & 465829888 ? getBaseConstraintOrType(t) : t; }) : type;
|
|
57473
57025
|
}
|
|
57474
57026
|
function isExportOrExportExpression(location) {
|
|
57475
|
-
return !!ts.findAncestor(location, function (
|
|
57027
|
+
return !!ts.findAncestor(location, function (n) {
|
|
57028
|
+
var parent = n.parent;
|
|
57029
|
+
if (parent === undefined) {
|
|
57030
|
+
return "quit";
|
|
57031
|
+
}
|
|
57032
|
+
if (ts.isExportAssignment(parent)) {
|
|
57033
|
+
return parent.expression === n && ts.isEntityNameExpression(n);
|
|
57034
|
+
}
|
|
57035
|
+
if (ts.isExportSpecifier(parent)) {
|
|
57036
|
+
return parent.name === n || parent.propertyName === n;
|
|
57037
|
+
}
|
|
57038
|
+
return false;
|
|
57039
|
+
});
|
|
57476
57040
|
}
|
|
57477
57041
|
function markAliasReferenced(symbol, location) {
|
|
57478
57042
|
if (isNonLocalAlias(symbol, 111551) && !isInTypeQuery(location) && !getTypeOnlyAliasDeclaration(symbol)) {
|
|
@@ -59932,7 +59496,7 @@ var ts;
|
|
|
59932
59496
|
if (assignmentKind && lexicallyScopedSymbol && lexicallyScopedSymbol.valueDeclaration && ts.isMethodDeclaration(lexicallyScopedSymbol.valueDeclaration)) {
|
|
59933
59497
|
grammarErrorOnNode(right, ts.Diagnostics.Cannot_assign_to_private_method_0_Private_methods_are_not_writable, ts.idText(right));
|
|
59934
59498
|
}
|
|
59935
|
-
if ((lexicallyScopedSymbol === null || lexicallyScopedSymbol === void 0 ? void 0 : lexicallyScopedSymbol.valueDeclaration) && (
|
|
59499
|
+
if ((lexicallyScopedSymbol === null || lexicallyScopedSymbol === void 0 ? void 0 : lexicallyScopedSymbol.valueDeclaration) && (compilerOptions.target === 99 && !useDefineForClassFields)) {
|
|
59936
59500
|
var lexicalClass_1 = ts.getContainingClass(lexicallyScopedSymbol.valueDeclaration);
|
|
59937
59501
|
var parentStaticFieldInitializer = ts.findAncestor(node, function (n) {
|
|
59938
59502
|
if (n === lexicalClass_1)
|
|
@@ -62147,12 +61711,6 @@ var ts;
|
|
|
62147
61711
|
return getReturnTypeOfSignature(signature);
|
|
62148
61712
|
}
|
|
62149
61713
|
function checkAssertion(node) {
|
|
62150
|
-
if (node.kind === 209) {
|
|
62151
|
-
var file = ts.getSourceFileOfNode(node);
|
|
62152
|
-
if (file && ts.fileExtensionIsOneOf(file.fileName, [".cts", ".mts"])) {
|
|
62153
|
-
grammarErrorOnNode(node, ts.Diagnostics.This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead);
|
|
62154
|
-
}
|
|
62155
|
-
}
|
|
62156
61714
|
return checkAssertionWorker(node, node.type, node.expression);
|
|
62157
61715
|
}
|
|
62158
61716
|
function isValidConstAssertionArgument(node) {
|
|
@@ -62253,14 +61811,7 @@ var ts;
|
|
|
62253
61811
|
}
|
|
62254
61812
|
function checkImportMetaProperty(node) {
|
|
62255
61813
|
if (moduleKind !== ts.ModuleKind.ES2020 && moduleKind !== ts.ModuleKind.ESNext && moduleKind !== ts.ModuleKind.System) {
|
|
62256
|
-
|
|
62257
|
-
if (ts.getSourceFileOfNode(node).impliedNodeFormat !== ts.ModuleKind.ESNext) {
|
|
62258
|
-
error(node, ts.Diagnostics.The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output);
|
|
62259
|
-
}
|
|
62260
|
-
}
|
|
62261
|
-
else {
|
|
62262
|
-
error(node, ts.Diagnostics.The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_esnext_system_node12_or_nodenext);
|
|
62263
|
-
}
|
|
61814
|
+
error(node, ts.Diagnostics.The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_esnext_or_system);
|
|
62264
61815
|
}
|
|
62265
61816
|
var file = ts.getSourceFileOfNode(node);
|
|
62266
61817
|
ts.Debug.assert(!!(file.flags & 2097152), "Containing file is missing import meta node flag.");
|
|
@@ -63087,9 +62638,9 @@ var ts;
|
|
|
63087
62638
|
var diagnostic = ts.createFileDiagnostic(sourceFile, span.start, span.length, ts.Diagnostics.await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module);
|
|
63088
62639
|
diagnostics.add(diagnostic);
|
|
63089
62640
|
}
|
|
63090
|
-
if ((moduleKind !== ts.ModuleKind.ESNext && moduleKind !== ts.ModuleKind.System
|
|
62641
|
+
if ((moduleKind !== ts.ModuleKind.ESNext && moduleKind !== ts.ModuleKind.System) || languageVersion < 4) {
|
|
63091
62642
|
span = ts.getSpanOfTokenAtPosition(sourceFile, node.pos);
|
|
63092
|
-
var diagnostic = ts.createFileDiagnostic(sourceFile, span.start, span.length, ts.Diagnostics.
|
|
62643
|
+
var diagnostic = ts.createFileDiagnostic(sourceFile, span.start, span.length, ts.Diagnostics.Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_esnext_or_system_and_the_target_option_is_set_to_es2017_or_higher);
|
|
63093
62644
|
diagnostics.add(diagnostic);
|
|
63094
62645
|
}
|
|
63095
62646
|
}
|
|
@@ -64904,7 +64455,7 @@ var ts;
|
|
|
64904
64455
|
if (classExtendsNull) {
|
|
64905
64456
|
error(superCall, ts.Diagnostics.A_constructor_cannot_contain_a_super_call_when_its_class_extends_null);
|
|
64906
64457
|
}
|
|
64907
|
-
var superCallShouldBeFirst = (
|
|
64458
|
+
var superCallShouldBeFirst = (compilerOptions.target !== 99 || !useDefineForClassFields) &&
|
|
64908
64459
|
(ts.some(node.parent.members, isInstancePropertyWithInitializerOrPrivateIdentifierProperty) ||
|
|
64909
64460
|
ts.some(node.parameters, function (p) { return ts.hasSyntacticModifier(p, 16476); }));
|
|
64910
64461
|
if (superCallShouldBeFirst) {
|
|
@@ -66348,7 +65899,7 @@ var ts;
|
|
|
66348
65899
|
});
|
|
66349
65900
|
}
|
|
66350
65901
|
function checkCollisionWithRequireExportsInGeneratedCode(node, name) {
|
|
66351
|
-
if (moduleKind >= ts.ModuleKind.ES2015
|
|
65902
|
+
if (moduleKind >= ts.ModuleKind.ES2015) {
|
|
66352
65903
|
return;
|
|
66353
65904
|
}
|
|
66354
65905
|
if (!name || !needCollisionCheckForIdentifier(node, name, "require") && !needCollisionCheckForIdentifier(node, name, "exports")) {
|
|
@@ -67573,8 +67124,8 @@ var ts;
|
|
|
67573
67124
|
}
|
|
67574
67125
|
}
|
|
67575
67126
|
function checkClassNameCollisionWithObject(name) {
|
|
67576
|
-
if (languageVersion
|
|
67577
|
-
&&
|
|
67127
|
+
if (languageVersion === 1 && name.escapedText === "Object"
|
|
67128
|
+
&& moduleKind < ts.ModuleKind.ES2015) {
|
|
67578
67129
|
error(name, ts.Diagnostics.Class_name_cannot_be_Object_when_targeting_ES5_with_module_0, ts.ModuleKind[moduleKind]);
|
|
67579
67130
|
}
|
|
67580
67131
|
}
|
|
@@ -67820,6 +67371,7 @@ var ts;
|
|
|
67820
67371
|
function checkClassMember(member, memberIsParameterProperty) {
|
|
67821
67372
|
var hasOverride = ts.hasOverrideModifier(member);
|
|
67822
67373
|
var hasStatic = ts.isStatic(member);
|
|
67374
|
+
var isJs = ts.isInJSFile(member);
|
|
67823
67375
|
if (baseWithThis && (hasOverride || compilerOptions.noImplicitOverride)) {
|
|
67824
67376
|
var declaredProp = member.name && getSymbolAtLocation(member.name) || getSymbolAtLocation(member);
|
|
67825
67377
|
if (!declaredProp) {
|
|
@@ -67833,8 +67385,12 @@ var ts;
|
|
|
67833
67385
|
if (prop && !baseProp && hasOverride) {
|
|
67834
67386
|
var suggestion = getSuggestedSymbolForNonexistentClassMember(ts.symbolName(declaredProp), baseType);
|
|
67835
67387
|
suggestion ?
|
|
67836
|
-
error(member,
|
|
67837
|
-
|
|
67388
|
+
error(member, isJs ?
|
|
67389
|
+
ts.Diagnostics.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1 :
|
|
67390
|
+
ts.Diagnostics.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1, baseClassName, symbolToString(suggestion)) :
|
|
67391
|
+
error(member, isJs ?
|
|
67392
|
+
ts.Diagnostics.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0 :
|
|
67393
|
+
ts.Diagnostics.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0, baseClassName);
|
|
67838
67394
|
}
|
|
67839
67395
|
else if (prop && (baseProp === null || baseProp === void 0 ? void 0 : baseProp.declarations) && compilerOptions.noImplicitOverride && !nodeInAmbientContext) {
|
|
67840
67396
|
var baseHasAbstract = ts.some(baseProp.declarations, ts.hasAbstractModifier);
|
|
@@ -67843,8 +67399,12 @@ var ts;
|
|
|
67843
67399
|
}
|
|
67844
67400
|
if (!baseHasAbstract) {
|
|
67845
67401
|
var diag = memberIsParameterProperty ?
|
|
67846
|
-
|
|
67847
|
-
|
|
67402
|
+
isJs ?
|
|
67403
|
+
ts.Diagnostics.This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0 :
|
|
67404
|
+
ts.Diagnostics.This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0 :
|
|
67405
|
+
isJs ?
|
|
67406
|
+
ts.Diagnostics.This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0 :
|
|
67407
|
+
ts.Diagnostics.This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0;
|
|
67848
67408
|
error(member, diag, baseClassName);
|
|
67849
67409
|
}
|
|
67850
67410
|
else if (ts.hasAbstractModifier(member) && baseHasAbstract) {
|
|
@@ -67854,7 +67414,9 @@ var ts;
|
|
|
67854
67414
|
}
|
|
67855
67415
|
else if (hasOverride) {
|
|
67856
67416
|
var className = typeToString(type);
|
|
67857
|
-
error(member,
|
|
67417
|
+
error(member, isJs ?
|
|
67418
|
+
ts.Diagnostics.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_extend_another_class :
|
|
67419
|
+
ts.Diagnostics.This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another_class, className);
|
|
67858
67420
|
}
|
|
67859
67421
|
}
|
|
67860
67422
|
}
|
|
@@ -68620,8 +68182,8 @@ var ts;
|
|
|
68620
68182
|
checkAliasSymbol(node);
|
|
68621
68183
|
if (node.kind === 268 &&
|
|
68622
68184
|
ts.idText(node.propertyName || node.name) === "default" &&
|
|
68623
|
-
|
|
68624
|
-
moduleKind !== ts.ModuleKind.System &&
|
|
68185
|
+
compilerOptions.esModuleInterop &&
|
|
68186
|
+
moduleKind !== ts.ModuleKind.System && moduleKind < ts.ModuleKind.ES2015) {
|
|
68625
68187
|
checkExternalEmitHelpers(node, 131072);
|
|
68626
68188
|
}
|
|
68627
68189
|
}
|
|
@@ -68641,7 +68203,7 @@ var ts;
|
|
|
68641
68203
|
if (importClause.namedBindings) {
|
|
68642
68204
|
if (importClause.namedBindings.kind === 266) {
|
|
68643
68205
|
checkImportBinding(importClause.namedBindings);
|
|
68644
|
-
if (moduleKind !== ts.ModuleKind.System &&
|
|
68206
|
+
if (moduleKind !== ts.ModuleKind.System && moduleKind < ts.ModuleKind.ES2015 && compilerOptions.esModuleInterop) {
|
|
68645
68207
|
checkExternalEmitHelpers(node, 65536);
|
|
68646
68208
|
}
|
|
68647
68209
|
}
|
|
@@ -68683,7 +68245,7 @@ var ts;
|
|
|
68683
68245
|
}
|
|
68684
68246
|
}
|
|
68685
68247
|
else {
|
|
68686
|
-
if (moduleKind >= ts.ModuleKind.ES2015 &&
|
|
68248
|
+
if (moduleKind >= ts.ModuleKind.ES2015 && !node.isTypeOnly && !(node.flags & 8388608)) {
|
|
68687
68249
|
grammarErrorOnNode(node, ts.Diagnostics.Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_ns_from_mod_import_a_from_mod_import_d_from_mod_or_another_module_format_instead);
|
|
68688
68250
|
}
|
|
68689
68251
|
}
|
|
@@ -68718,9 +68280,9 @@ var ts;
|
|
|
68718
68280
|
else if (node.exportClause) {
|
|
68719
68281
|
checkAliasSymbol(node.exportClause);
|
|
68720
68282
|
}
|
|
68721
|
-
if (moduleKind !== ts.ModuleKind.System &&
|
|
68283
|
+
if (moduleKind !== ts.ModuleKind.System && moduleKind < ts.ModuleKind.ES2015) {
|
|
68722
68284
|
if (node.exportClause) {
|
|
68723
|
-
if (
|
|
68285
|
+
if (compilerOptions.esModuleInterop) {
|
|
68724
68286
|
checkExternalEmitHelpers(node, 65536);
|
|
68725
68287
|
}
|
|
68726
68288
|
}
|
|
@@ -68800,9 +68362,9 @@ var ts;
|
|
|
68800
68362
|
}
|
|
68801
68363
|
}
|
|
68802
68364
|
else {
|
|
68803
|
-
if (
|
|
68365
|
+
if (compilerOptions.esModuleInterop &&
|
|
68804
68366
|
moduleKind !== ts.ModuleKind.System &&
|
|
68805
|
-
|
|
68367
|
+
moduleKind < ts.ModuleKind.ES2015 &&
|
|
68806
68368
|
ts.idText(node.propertyName || node.name) === "default") {
|
|
68807
68369
|
checkExternalEmitHelpers(node, 131072);
|
|
68808
68370
|
}
|
|
@@ -68857,7 +68419,7 @@ var ts;
|
|
|
68857
68419
|
grammarErrorOnNode(node.expression, ts.Diagnostics.The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context);
|
|
68858
68420
|
}
|
|
68859
68421
|
if (node.isExportEquals && !(node.flags & 8388608)) {
|
|
68860
|
-
if (moduleKind >= ts.ModuleKind.ES2015
|
|
68422
|
+
if (moduleKind >= ts.ModuleKind.ES2015) {
|
|
68861
68423
|
grammarErrorOnNode(node, ts.Diagnostics.Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or_another_module_format_instead);
|
|
68862
68424
|
}
|
|
68863
68425
|
else if (moduleKind === ts.ModuleKind.System) {
|
|
@@ -71152,11 +70714,6 @@ var ts;
|
|
|
71152
70714
|
if (!ts.isArrowFunction(node)) {
|
|
71153
70715
|
return false;
|
|
71154
70716
|
}
|
|
71155
|
-
if (node.typeParameters && !(ts.length(node.typeParameters) > 1 || node.typeParameters.hasTrailingComma || node.typeParameters[0].constraint)) {
|
|
71156
|
-
if (file && ts.fileExtensionIsOneOf(file.fileName, [".mts", ".cts"])) {
|
|
71157
|
-
grammarErrorOnNode(node.typeParameters[0], ts.Diagnostics.This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Add_a_trailing_comma_or_explicit_constraint);
|
|
71158
|
-
}
|
|
71159
|
-
}
|
|
71160
70717
|
var equalsGreaterThanToken = node.equalsGreaterThanToken;
|
|
71161
70718
|
var startLine = ts.getLineAndCharacterOfPosition(file, equalsGreaterThanToken.pos).line;
|
|
71162
70719
|
var endLine = ts.getLineAndCharacterOfPosition(file, equalsGreaterThanToken.end).line;
|
|
@@ -71469,8 +71026,8 @@ var ts;
|
|
|
71469
71026
|
if (!ts.isEffectiveExternalModule(sourceFile, compilerOptions)) {
|
|
71470
71027
|
diagnostics.add(ts.createDiagnosticForNode(forInOrOfStatement.awaitModifier, ts.Diagnostics.for_await_loops_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module));
|
|
71471
71028
|
}
|
|
71472
|
-
if ((moduleKind !== ts.ModuleKind.ESNext && moduleKind !== ts.ModuleKind.System
|
|
71473
|
-
diagnostics.add(ts.createDiagnosticForNode(forInOrOfStatement.awaitModifier, ts.Diagnostics.
|
|
71029
|
+
if ((moduleKind !== ts.ModuleKind.ESNext && moduleKind !== ts.ModuleKind.System) || languageVersion < 4) {
|
|
71030
|
+
diagnostics.add(ts.createDiagnosticForNode(forInOrOfStatement.awaitModifier, ts.Diagnostics.Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_esnext_or_system_and_the_target_option_is_set_to_es2017_or_higher));
|
|
71474
71031
|
}
|
|
71475
71032
|
}
|
|
71476
71033
|
}
|
|
@@ -71787,7 +71344,8 @@ var ts;
|
|
|
71787
71344
|
: ts.Diagnostics.A_definite_assignment_assertion_is_not_permitted_in_this_context;
|
|
71788
71345
|
return grammarErrorOnNode(node.exclamationToken, message);
|
|
71789
71346
|
}
|
|
71790
|
-
|
|
71347
|
+
var moduleKind = ts.getEmitModuleKind(compilerOptions);
|
|
71348
|
+
if (moduleKind < ts.ModuleKind.ES2015 && moduleKind !== ts.ModuleKind.System &&
|
|
71791
71349
|
!(node.parent.parent.flags & 8388608) && ts.hasSyntacticModifier(node.parent.parent, 1)) {
|
|
71792
71350
|
checkESModuleMarker(node.name);
|
|
71793
71351
|
}
|
|
@@ -72084,7 +71642,7 @@ var ts;
|
|
|
72084
71642
|
}
|
|
72085
71643
|
function checkGrammarImportCallExpression(node) {
|
|
72086
71644
|
if (moduleKind === ts.ModuleKind.ES2015) {
|
|
72087
|
-
return grammarErrorOnNode(node, ts.Diagnostics.
|
|
71645
|
+
return grammarErrorOnNode(node, ts.Diagnostics.Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_esnext_commonjs_amd_system_or_umd);
|
|
72088
71646
|
}
|
|
72089
71647
|
if (node.typeArguments) {
|
|
72090
71648
|
return grammarErrorOnNode(node, ts.Diagnostics.Dynamic_import_cannot_have_type_arguments);
|
|
@@ -75837,7 +75395,7 @@ var ts;
|
|
|
75837
75395
|
function transformSourceFile(node) {
|
|
75838
75396
|
var options = context.getCompilerOptions();
|
|
75839
75397
|
if (node.isDeclarationFile
|
|
75840
|
-
|| useDefineForClassFields &&
|
|
75398
|
+
|| useDefineForClassFields && options.target === 99) {
|
|
75841
75399
|
return node;
|
|
75842
75400
|
}
|
|
75843
75401
|
var visited = ts.visitEachChild(node, visitor, context);
|
|
@@ -78703,7 +78261,7 @@ var ts;
|
|
|
78703
78261
|
objectProperties = factory.createNull();
|
|
78704
78262
|
}
|
|
78705
78263
|
else {
|
|
78706
|
-
var target =
|
|
78264
|
+
var target = compilerOptions.target;
|
|
78707
78265
|
if (target && target >= 5) {
|
|
78708
78266
|
objectProperties = factory.createObjectLiteralExpression(ts.flatten(ts.spanMap(attrs, ts.isJsxSpreadAttribute, function (attrs, isSpread) {
|
|
78709
78267
|
return isSpread ? ts.map(attrs, transformJsxSpreadAttributeToSpreadAssignment) : ts.map(attrs, transformJsxAttributeToObjectLiteralElement);
|
|
@@ -83128,7 +82686,7 @@ var ts;
|
|
|
83128
82686
|
case 345:
|
|
83129
82687
|
return visitPartiallyEmittedExpression(node, valueIsDiscarded);
|
|
83130
82688
|
case 206:
|
|
83131
|
-
if (ts.isImportCall(node)
|
|
82689
|
+
if (ts.isImportCall(node)) {
|
|
83132
82690
|
return visitImportCallExpression(node);
|
|
83133
82691
|
}
|
|
83134
82692
|
break;
|
|
@@ -83299,7 +82857,7 @@ var ts;
|
|
|
83299
82857
|
}
|
|
83300
82858
|
}
|
|
83301
82859
|
var promise = factory.createNewExpression(factory.createIdentifier("Promise"), undefined, [func]);
|
|
83302
|
-
if (
|
|
82860
|
+
if (compilerOptions.esModuleInterop) {
|
|
83303
82861
|
return factory.createCallExpression(factory.createPropertyAccessExpression(promise, factory.createIdentifier("then")), undefined, [emitHelpers().createImportStarCallbackHelper()]);
|
|
83304
82862
|
}
|
|
83305
82863
|
return promise;
|
|
@@ -83307,7 +82865,7 @@ var ts;
|
|
|
83307
82865
|
function createImportCallExpressionCommonJS(arg, containsLexicalThis) {
|
|
83308
82866
|
var promiseResolveCall = factory.createCallExpression(factory.createPropertyAccessExpression(factory.createIdentifier("Promise"), "resolve"), undefined, []);
|
|
83309
82867
|
var requireCall = factory.createCallExpression(factory.createIdentifier("require"), undefined, arg ? [arg] : []);
|
|
83310
|
-
if (
|
|
82868
|
+
if (compilerOptions.esModuleInterop) {
|
|
83311
82869
|
requireCall = emitHelpers().createImportStarHelper(requireCall);
|
|
83312
82870
|
}
|
|
83313
82871
|
var func;
|
|
@@ -83323,7 +82881,7 @@ var ts;
|
|
|
83323
82881
|
return factory.createCallExpression(factory.createPropertyAccessExpression(promiseResolveCall, "then"), undefined, [func]);
|
|
83324
82882
|
}
|
|
83325
82883
|
function getHelperExpressionForExport(node, innerExpr) {
|
|
83326
|
-
if (!
|
|
82884
|
+
if (!compilerOptions.esModuleInterop || ts.getEmitFlags(node) & 67108864) {
|
|
83327
82885
|
return innerExpr;
|
|
83328
82886
|
}
|
|
83329
82887
|
if (ts.getExportNeedsImportStarHelper(node)) {
|
|
@@ -83332,7 +82890,7 @@ var ts;
|
|
|
83332
82890
|
return innerExpr;
|
|
83333
82891
|
}
|
|
83334
82892
|
function getHelperExpressionForImport(node, innerExpr) {
|
|
83335
|
-
if (!
|
|
82893
|
+
if (!compilerOptions.esModuleInterop || ts.getEmitFlags(node) & 67108864) {
|
|
83336
82894
|
return innerExpr;
|
|
83337
82895
|
}
|
|
83338
82896
|
if (ts.getImportNeedsImportStarHelper(node)) {
|
|
@@ -83431,7 +82989,7 @@ var ts;
|
|
|
83431
82989
|
statements.push(ts.setOriginalNode(ts.setTextRange(factory.createExpressionStatement(emitHelpers().createCreateBindingHelper(generatedName, factory.createStringLiteralFromNode(specifier.propertyName || specifier.name), specifier.propertyName ? factory.createStringLiteralFromNode(specifier.name) : undefined)), specifier), specifier));
|
|
83432
82990
|
}
|
|
83433
82991
|
else {
|
|
83434
|
-
var exportNeedsImportDefault = !!
|
|
82992
|
+
var exportNeedsImportDefault = !!compilerOptions.esModuleInterop &&
|
|
83435
82993
|
!(ts.getEmitFlags(node) & 67108864) &&
|
|
83436
82994
|
ts.idText(specifier.propertyName || specifier.name) === "default";
|
|
83437
82995
|
var exportedValue = factory.createPropertyAccessExpression(exportNeedsImportDefault ? emitHelpers().createImportDefaultHelper(generatedName) : generatedName, specifier.propertyName || specifier.name);
|
|
@@ -84774,10 +84332,7 @@ var ts;
|
|
|
84774
84332
|
(function (ts) {
|
|
84775
84333
|
function transformECMAScriptModule(context) {
|
|
84776
84334
|
var factory = context.factory, emitHelpers = context.getEmitHelperFactory;
|
|
84777
|
-
var host = context.getEmitHost();
|
|
84778
|
-
var resolver = context.getEmitResolver();
|
|
84779
84335
|
var compilerOptions = context.getCompilerOptions();
|
|
84780
|
-
var languageVersion = ts.getEmitScriptTarget(compilerOptions);
|
|
84781
84336
|
var previousOnEmitNode = context.onEmitNode;
|
|
84782
84337
|
var previousOnSubstituteNode = context.onSubstituteNode;
|
|
84783
84338
|
context.onEmitNode = onEmitNode;
|
|
@@ -84785,21 +84340,13 @@ var ts;
|
|
|
84785
84340
|
context.enableEmitNotification(300);
|
|
84786
84341
|
context.enableSubstitution(79);
|
|
84787
84342
|
var helperNameSubstitutions;
|
|
84788
|
-
var currentSourceFile;
|
|
84789
|
-
var importRequireStatements;
|
|
84790
84343
|
return ts.chainBundle(context, transformSourceFile);
|
|
84791
84344
|
function transformSourceFile(node) {
|
|
84792
84345
|
if (node.isDeclarationFile) {
|
|
84793
84346
|
return node;
|
|
84794
84347
|
}
|
|
84795
84348
|
if (ts.isExternalModule(node) || compilerOptions.isolatedModules) {
|
|
84796
|
-
currentSourceFile = node;
|
|
84797
|
-
importRequireStatements = undefined;
|
|
84798
84349
|
var result = updateExternalModule(node);
|
|
84799
|
-
currentSourceFile = undefined;
|
|
84800
|
-
if (importRequireStatements) {
|
|
84801
|
-
result = factory.updateSourceFile(result, ts.setTextRange(factory.createNodeArray(ts.insertStatementsAfterCustomPrologue(result.statements.slice(), importRequireStatements)), result.statements));
|
|
84802
|
-
}
|
|
84803
84350
|
if (!ts.isExternalModule(node) || ts.some(result.statements, ts.isExternalModuleIndicator)) {
|
|
84804
84351
|
return result;
|
|
84805
84352
|
}
|
|
@@ -84823,7 +84370,7 @@ var ts;
|
|
|
84823
84370
|
function visitor(node) {
|
|
84824
84371
|
switch (node.kind) {
|
|
84825
84372
|
case 263:
|
|
84826
|
-
return
|
|
84373
|
+
return undefined;
|
|
84827
84374
|
case 269:
|
|
84828
84375
|
return visitExportAssignment(node);
|
|
84829
84376
|
case 270:
|
|
@@ -84832,44 +84379,6 @@ var ts;
|
|
|
84832
84379
|
}
|
|
84833
84380
|
return node;
|
|
84834
84381
|
}
|
|
84835
|
-
function createRequireCall(importNode) {
|
|
84836
|
-
var moduleName = ts.getExternalModuleNameLiteral(factory, importNode, ts.Debug.checkDefined(currentSourceFile), host, resolver, compilerOptions);
|
|
84837
|
-
var args = [];
|
|
84838
|
-
if (moduleName) {
|
|
84839
|
-
args.push(moduleName);
|
|
84840
|
-
}
|
|
84841
|
-
if (!importRequireStatements) {
|
|
84842
|
-
var createRequireName = factory.createUniqueName("_createRequire", 16 | 32);
|
|
84843
|
-
var importStatement = factory.createImportDeclaration(undefined, undefined, factory.createImportClause(false, undefined, factory.createNamedImports([
|
|
84844
|
-
factory.createImportSpecifier(factory.createIdentifier("createRequire"), createRequireName)
|
|
84845
|
-
])), factory.createStringLiteral("module"));
|
|
84846
|
-
var requireHelperName = factory.createUniqueName("__require", 16 | 32);
|
|
84847
|
-
var requireStatement = factory.createVariableStatement(undefined, factory.createVariableDeclarationList([
|
|
84848
|
-
factory.createVariableDeclaration(requireHelperName, undefined, undefined, factory.createCallExpression(factory.cloneNode(createRequireName), undefined, [
|
|
84849
|
-
factory.createPropertyAccessExpression(factory.createMetaProperty(100, factory.createIdentifier("meta")), factory.createIdentifier("url"))
|
|
84850
|
-
]))
|
|
84851
|
-
], languageVersion >= 2 ? 2 : 0));
|
|
84852
|
-
importRequireStatements = [importStatement, requireStatement];
|
|
84853
|
-
}
|
|
84854
|
-
var name = importRequireStatements[1].declarationList.declarations[0].name;
|
|
84855
|
-
ts.Debug.assertNode(name, ts.isIdentifier);
|
|
84856
|
-
return factory.createCallExpression(factory.cloneNode(name), undefined, args);
|
|
84857
|
-
}
|
|
84858
|
-
function visitImportEqualsDeclaration(node) {
|
|
84859
|
-
ts.Debug.assert(ts.isExternalModuleImportEqualsDeclaration(node), "import= for internal module references should be handled in an earlier transformer.");
|
|
84860
|
-
var statements;
|
|
84861
|
-
statements = ts.append(statements, ts.setOriginalNode(ts.setTextRange(factory.createVariableStatement(undefined, factory.createVariableDeclarationList([
|
|
84862
|
-
factory.createVariableDeclaration(factory.cloneNode(node.name), undefined, undefined, createRequireCall(node))
|
|
84863
|
-
], languageVersion >= 2 ? 2 : 0)), node), node));
|
|
84864
|
-
statements = appendExportsOfImportEqualsDeclaration(statements, node);
|
|
84865
|
-
return ts.singleOrMany(statements);
|
|
84866
|
-
}
|
|
84867
|
-
function appendExportsOfImportEqualsDeclaration(statements, node) {
|
|
84868
|
-
if (ts.hasSyntacticModifier(node, 1)) {
|
|
84869
|
-
statements = ts.append(statements, factory.createExportDeclaration(undefined, undefined, node.isTypeOnly, factory.createNamedExports([factory.createExportSpecifier(undefined, ts.idText(node.name))])));
|
|
84870
|
-
}
|
|
84871
|
-
return statements;
|
|
84872
|
-
}
|
|
84873
84382
|
function visitExportAssignment(node) {
|
|
84874
84383
|
return node.isExportEquals ? undefined : node;
|
|
84875
84384
|
}
|
|
@@ -84919,74 +84428,6 @@ var ts;
|
|
|
84919
84428
|
ts.transformECMAScriptModule = transformECMAScriptModule;
|
|
84920
84429
|
})(ts || (ts = {}));
|
|
84921
84430
|
var ts;
|
|
84922
|
-
(function (ts) {
|
|
84923
|
-
function transformNodeModule(context) {
|
|
84924
|
-
var previousOnSubstituteNode = context.onSubstituteNode;
|
|
84925
|
-
var previousOnEmitNode = context.onEmitNode;
|
|
84926
|
-
var esmTransform = ts.transformECMAScriptModule(context);
|
|
84927
|
-
var esmOnSubstituteNode = context.onSubstituteNode;
|
|
84928
|
-
var esmOnEmitNode = context.onEmitNode;
|
|
84929
|
-
context.onSubstituteNode = previousOnSubstituteNode;
|
|
84930
|
-
context.onEmitNode = previousOnEmitNode;
|
|
84931
|
-
var cjsTransform = ts.transformModule(context);
|
|
84932
|
-
var cjsOnSubstituteNode = context.onSubstituteNode;
|
|
84933
|
-
var cjsOnEmitNode = context.onEmitNode;
|
|
84934
|
-
context.onSubstituteNode = onSubstituteNode;
|
|
84935
|
-
context.onEmitNode = onEmitNode;
|
|
84936
|
-
context.enableSubstitution(300);
|
|
84937
|
-
context.enableEmitNotification(300);
|
|
84938
|
-
var currentSourceFile;
|
|
84939
|
-
return transformSourceFileOrBundle;
|
|
84940
|
-
function onSubstituteNode(hint, node) {
|
|
84941
|
-
if (ts.isSourceFile(node)) {
|
|
84942
|
-
currentSourceFile = node;
|
|
84943
|
-
return previousOnSubstituteNode(hint, node);
|
|
84944
|
-
}
|
|
84945
|
-
else {
|
|
84946
|
-
if (!currentSourceFile) {
|
|
84947
|
-
return previousOnSubstituteNode(hint, node);
|
|
84948
|
-
}
|
|
84949
|
-
if (currentSourceFile.impliedNodeFormat === ts.ModuleKind.ESNext) {
|
|
84950
|
-
return esmOnSubstituteNode(hint, node);
|
|
84951
|
-
}
|
|
84952
|
-
return cjsOnSubstituteNode(hint, node);
|
|
84953
|
-
}
|
|
84954
|
-
}
|
|
84955
|
-
function onEmitNode(hint, node, emitCallback) {
|
|
84956
|
-
if (ts.isSourceFile(node)) {
|
|
84957
|
-
currentSourceFile = node;
|
|
84958
|
-
}
|
|
84959
|
-
if (!currentSourceFile) {
|
|
84960
|
-
return previousOnEmitNode(hint, node, emitCallback);
|
|
84961
|
-
}
|
|
84962
|
-
if (currentSourceFile.impliedNodeFormat === ts.ModuleKind.ESNext) {
|
|
84963
|
-
return esmOnEmitNode(hint, node, emitCallback);
|
|
84964
|
-
}
|
|
84965
|
-
return cjsOnEmitNode(hint, node, emitCallback);
|
|
84966
|
-
}
|
|
84967
|
-
function getModuleTransformForFile(file) {
|
|
84968
|
-
return file.impliedNodeFormat === ts.ModuleKind.ESNext ? esmTransform : cjsTransform;
|
|
84969
|
-
}
|
|
84970
|
-
function transformSourceFile(node) {
|
|
84971
|
-
if (node.isDeclarationFile) {
|
|
84972
|
-
return node;
|
|
84973
|
-
}
|
|
84974
|
-
currentSourceFile = node;
|
|
84975
|
-
var result = getModuleTransformForFile(node)(node);
|
|
84976
|
-
currentSourceFile = undefined;
|
|
84977
|
-
ts.Debug.assert(ts.isSourceFile(result));
|
|
84978
|
-
return result;
|
|
84979
|
-
}
|
|
84980
|
-
function transformSourceFileOrBundle(node) {
|
|
84981
|
-
return node.kind === 300 ? transformSourceFile(node) : transformBundle(node);
|
|
84982
|
-
}
|
|
84983
|
-
function transformBundle(node) {
|
|
84984
|
-
return context.factory.createBundle(ts.map(node.sourceFiles, transformSourceFile), node.prepends);
|
|
84985
|
-
}
|
|
84986
|
-
}
|
|
84987
|
-
ts.transformNodeModule = transformNodeModule;
|
|
84988
|
-
})(ts || (ts = {}));
|
|
84989
|
-
var ts;
|
|
84990
84431
|
(function (ts) {
|
|
84991
84432
|
function canProduceDiagnostics(node) {
|
|
84992
84433
|
return ts.isVariableDeclaration(node) ||
|
|
@@ -86640,9 +86081,6 @@ var ts;
|
|
|
86640
86081
|
return ts.transformECMAScriptModule;
|
|
86641
86082
|
case ts.ModuleKind.System:
|
|
86642
86083
|
return ts.transformSystemModule;
|
|
86643
|
-
case ts.ModuleKind.Node12:
|
|
86644
|
-
case ts.ModuleKind.NodeNext:
|
|
86645
|
-
return ts.transformNodeModule;
|
|
86646
86084
|
default:
|
|
86647
86085
|
return ts.transformModule;
|
|
86648
86086
|
}
|
|
@@ -87139,7 +86577,7 @@ var ts;
|
|
|
87139
86577
|
return getOutputPathsForBundle(options, forceDtsPaths);
|
|
87140
86578
|
}
|
|
87141
86579
|
else {
|
|
87142
|
-
var ownOutputFilePath = ts.getOwnEmitOutputFilePath(sourceFile.fileName, host, getOutputExtension(sourceFile
|
|
86580
|
+
var ownOutputFilePath = ts.getOwnEmitOutputFilePath(sourceFile.fileName, host, getOutputExtension(sourceFile, options));
|
|
87143
86581
|
var isJsonFile = ts.isJsonSourceFile(sourceFile);
|
|
87144
86582
|
var isJsonEmittedToSameLocation = isJsonFile &&
|
|
87145
86583
|
ts.comparePaths(sourceFile.fileName, ownOutputFilePath, host.getCurrentDirectory(), !host.useCaseSensitiveFileNames()) === 0;
|
|
@@ -87154,12 +86592,21 @@ var ts;
|
|
|
87154
86592
|
function getSourceMapFilePath(jsFilePath, options) {
|
|
87155
86593
|
return (options.sourceMap && !options.inlineSourceMap) ? jsFilePath + ".map" : undefined;
|
|
87156
86594
|
}
|
|
87157
|
-
function getOutputExtension(
|
|
87158
|
-
|
|
87159
|
-
|
|
87160
|
-
|
|
87161
|
-
|
|
87162
|
-
|
|
86595
|
+
function getOutputExtension(sourceFile, options) {
|
|
86596
|
+
if (ts.isJsonSourceFile(sourceFile)) {
|
|
86597
|
+
return ".json";
|
|
86598
|
+
}
|
|
86599
|
+
if (options.jsx === 1) {
|
|
86600
|
+
if (ts.isSourceFileJS(sourceFile)) {
|
|
86601
|
+
if (ts.fileExtensionIs(sourceFile.fileName, ".jsx")) {
|
|
86602
|
+
return ".jsx";
|
|
86603
|
+
}
|
|
86604
|
+
}
|
|
86605
|
+
else if (sourceFile.languageVariant === 1) {
|
|
86606
|
+
return ".jsx";
|
|
86607
|
+
}
|
|
86608
|
+
}
|
|
86609
|
+
return ".js";
|
|
87163
86610
|
}
|
|
87164
86611
|
ts.getOutputExtension = getOutputExtension;
|
|
87165
86612
|
function getOutputPathWithoutChangingExt(inputFileName, configFile, ignoreCase, outputDir, getCommonSourceDirectory) {
|
|
@@ -87168,14 +86615,19 @@ var ts;
|
|
|
87168
86615
|
inputFileName;
|
|
87169
86616
|
}
|
|
87170
86617
|
function getOutputDeclarationFileName(inputFileName, configFile, ignoreCase, getCommonSourceDirectory) {
|
|
87171
|
-
|
|
86618
|
+
ts.Debug.assert(!ts.fileExtensionIs(inputFileName, ".d.ts") && !ts.fileExtensionIs(inputFileName, ".json"));
|
|
86619
|
+
return ts.changeExtension(getOutputPathWithoutChangingExt(inputFileName, configFile, ignoreCase, configFile.options.declarationDir || configFile.options.outDir, getCommonSourceDirectory), ".d.ts");
|
|
87172
86620
|
}
|
|
87173
86621
|
ts.getOutputDeclarationFileName = getOutputDeclarationFileName;
|
|
87174
86622
|
function getOutputJSFileName(inputFileName, configFile, ignoreCase, getCommonSourceDirectory) {
|
|
87175
86623
|
if (configFile.options.emitDeclarationOnly)
|
|
87176
86624
|
return undefined;
|
|
87177
86625
|
var isJsonFile = ts.fileExtensionIs(inputFileName, ".json");
|
|
87178
|
-
var outputFileName = ts.changeExtension(getOutputPathWithoutChangingExt(inputFileName, configFile, ignoreCase, configFile.options.outDir, getCommonSourceDirectory),
|
|
86626
|
+
var outputFileName = ts.changeExtension(getOutputPathWithoutChangingExt(inputFileName, configFile, ignoreCase, configFile.options.outDir, getCommonSourceDirectory), isJsonFile ?
|
|
86627
|
+
".json" :
|
|
86628
|
+
configFile.options.jsx === 1 && (ts.fileExtensionIs(inputFileName, ".tsx") || ts.fileExtensionIs(inputFileName, ".jsx")) ?
|
|
86629
|
+
".jsx" :
|
|
86630
|
+
".js");
|
|
87179
86631
|
return !isJsonFile || ts.comparePaths(inputFileName, outputFileName, ts.Debug.checkDefined(configFile.options.configFilePath), ignoreCase) !== 0 ?
|
|
87180
86632
|
outputFileName :
|
|
87181
86633
|
undefined;
|
|
@@ -87239,7 +86691,7 @@ var ts;
|
|
|
87239
86691
|
ts.getCommonSourceDirectory = getCommonSourceDirectory;
|
|
87240
86692
|
function getCommonSourceDirectoryOfConfig(_a, ignoreCase) {
|
|
87241
86693
|
var options = _a.options, fileNames = _a.fileNames;
|
|
87242
|
-
return getCommonSourceDirectory(options, function () { return ts.filter(fileNames, function (file) { return !(options.noEmitForJsFiles && ts.fileExtensionIsOneOf(file, ts.
|
|
86694
|
+
return getCommonSourceDirectory(options, function () { return ts.filter(fileNames, function (file) { return !(options.noEmitForJsFiles && ts.fileExtensionIsOneOf(file, ts.supportedJSExtensions)) && !ts.fileExtensionIs(file, ".d.ts"); }); }, ts.getDirectoryPath(ts.normalizeSlashes(ts.Debug.checkDefined(options.configFilePath))), ts.createGetCanonicalFileName(!ignoreCase));
|
|
87243
86695
|
}
|
|
87244
86696
|
ts.getCommonSourceDirectoryOfConfig = getCommonSourceDirectoryOfConfig;
|
|
87245
86697
|
function getAllProjectOutputs(configFile, ignoreCase) {
|
|
@@ -91988,7 +91440,7 @@ var ts;
|
|
|
91988
91440
|
if (options.declarationDir)
|
|
91989
91441
|
return false;
|
|
91990
91442
|
}
|
|
91991
|
-
else if (!ts.fileExtensionIsOneOf(fileOrDirectoryPath, ts.
|
|
91443
|
+
else if (!ts.fileExtensionIsOneOf(fileOrDirectoryPath, ts.supportedJSExtensions)) {
|
|
91992
91444
|
return false;
|
|
91993
91445
|
}
|
|
91994
91446
|
var filePathWithoutExtension = ts.removeFileExtension(fileOrDirectoryPath);
|
|
@@ -92571,67 +92023,6 @@ var ts;
|
|
|
92571
92023
|
return resolutions;
|
|
92572
92024
|
}
|
|
92573
92025
|
ts.loadWithLocalCache = loadWithLocalCache;
|
|
92574
|
-
function getModeForResolutionAtIndex(file, index) {
|
|
92575
|
-
if (file.impliedNodeFormat === undefined)
|
|
92576
|
-
return undefined;
|
|
92577
|
-
if (file.impliedNodeFormat !== ts.ModuleKind.ESNext) {
|
|
92578
|
-
var usage_1 = getModuleNameStringLiteralAt(file, index);
|
|
92579
|
-
if (usage_1.parent) {
|
|
92580
|
-
return ts.isImportCall(ts.walkUpParenthesizedExpressions(usage_1.parent)) ? ts.ModuleKind.ESNext : ts.ModuleKind.CommonJS;
|
|
92581
|
-
}
|
|
92582
|
-
if (ts.some(file.statements, function (s) {
|
|
92583
|
-
return (ts.isImportDeclaration(s) && s.moduleSpecifier === usage_1) ||
|
|
92584
|
-
(ts.isImportEqualsDeclaration(s) && ts.isExternalModuleReference(s.moduleReference) && ts.skipParentheses(s.moduleReference.expression) === usage_1) ||
|
|
92585
|
-
(ts.isModuleDeclaration(s) && s.name === usage_1) ||
|
|
92586
|
-
(ts.isExportDeclaration(s) && s.moduleSpecifier === usage_1);
|
|
92587
|
-
})) {
|
|
92588
|
-
return ts.ModuleKind.CommonJS;
|
|
92589
|
-
}
|
|
92590
|
-
return ts.ModuleKind.ESNext;
|
|
92591
|
-
}
|
|
92592
|
-
var usage = getModuleNameStringLiteralAt(file, index);
|
|
92593
|
-
if (usage.parent) {
|
|
92594
|
-
return ts.isImportEqualsDeclaration(ts.walkUpParenthesizedExpressions(usage.parent).parent) ? ts.ModuleKind.CommonJS : ts.ModuleKind.ESNext;
|
|
92595
|
-
}
|
|
92596
|
-
if (ts.some(file.statements, function (s) { return ts.isImportEqualsDeclaration(s) && ts.isExternalModuleReference(s.moduleReference) && ts.skipParentheses(s.moduleReference.expression) === usage; })) {
|
|
92597
|
-
return ts.ModuleKind.CommonJS;
|
|
92598
|
-
}
|
|
92599
|
-
return ts.ModuleKind.ESNext;
|
|
92600
|
-
}
|
|
92601
|
-
ts.getModeForResolutionAtIndex = getModeForResolutionAtIndex;
|
|
92602
|
-
function getModeForUsageLocation(file, usage) {
|
|
92603
|
-
if (file.impliedNodeFormat === undefined)
|
|
92604
|
-
return undefined;
|
|
92605
|
-
if (file.impliedNodeFormat !== ts.ModuleKind.ESNext) {
|
|
92606
|
-
return ts.isImportCall(ts.walkUpParenthesizedExpressions(usage.parent)) ? ts.ModuleKind.ESNext : ts.ModuleKind.CommonJS;
|
|
92607
|
-
}
|
|
92608
|
-
return ts.isImportEqualsDeclaration(ts.walkUpParenthesizedExpressions(usage.parent).parent) ? ts.ModuleKind.CommonJS : ts.ModuleKind.ESNext;
|
|
92609
|
-
}
|
|
92610
|
-
ts.getModeForUsageLocation = getModeForUsageLocation;
|
|
92611
|
-
function loadWithModeAwareCache(names, containingFile, containingFileName, redirectedReference, loader) {
|
|
92612
|
-
if (names.length === 0) {
|
|
92613
|
-
return [];
|
|
92614
|
-
}
|
|
92615
|
-
var resolutions = [];
|
|
92616
|
-
var cache = new ts.Map();
|
|
92617
|
-
var i = 0;
|
|
92618
|
-
for (var _i = 0, names_3 = names; _i < names_3.length; _i++) {
|
|
92619
|
-
var name = names_3[_i];
|
|
92620
|
-
var result = void 0;
|
|
92621
|
-
var mode = getModeForResolutionAtIndex(containingFile, i);
|
|
92622
|
-
i++;
|
|
92623
|
-
var cacheKey = mode !== undefined ? mode + "|" + name : name;
|
|
92624
|
-
if (cache.has(cacheKey)) {
|
|
92625
|
-
result = cache.get(cacheKey);
|
|
92626
|
-
}
|
|
92627
|
-
else {
|
|
92628
|
-
cache.set(cacheKey, result = loader(name, mode, containingFileName, redirectedReference));
|
|
92629
|
-
}
|
|
92630
|
-
resolutions.push(result);
|
|
92631
|
-
}
|
|
92632
|
-
return resolutions;
|
|
92633
|
-
}
|
|
92634
|
-
ts.loadWithModeAwareCache = loadWithModeAwareCache;
|
|
92635
92026
|
function forEachResolvedProjectReference(resolvedProjectReferences, cb) {
|
|
92636
92027
|
return forEachProjectReference(undefined, resolvedProjectReferences, function (resolvedRef, parent) { return resolvedRef && cb(resolvedRef, parent); });
|
|
92637
92028
|
}
|
|
@@ -92683,7 +92074,7 @@ var ts;
|
|
|
92683
92074
|
switch (kind) {
|
|
92684
92075
|
case ts.FileIncludeKind.Import:
|
|
92685
92076
|
var importLiteral = getModuleNameStringLiteralAt(file, index);
|
|
92686
|
-
packageId = (_e = (_d = file.resolvedModules) === null || _d === void 0 ? void 0 : _d.get(importLiteral.text
|
|
92077
|
+
packageId = (_e = (_d = file.resolvedModules) === null || _d === void 0 ? void 0 : _d.get(importLiteral.text)) === null || _e === void 0 ? void 0 : _e.packageId;
|
|
92687
92078
|
if (importLiteral.pos === -1)
|
|
92688
92079
|
return { file: file, packageId: packageId, text: importLiteral.text };
|
|
92689
92080
|
pos = ts.skipTrivia(file.text, importLiteral.pos);
|
|
@@ -92694,7 +92085,7 @@ var ts;
|
|
|
92694
92085
|
break;
|
|
92695
92086
|
case ts.FileIncludeKind.TypeReferenceDirective:
|
|
92696
92087
|
(_b = file.typeReferenceDirectives[index], pos = _b.pos, end = _b.end);
|
|
92697
|
-
packageId = (_g = (_f = file.resolvedTypeReferenceDirectiveNames) === null || _f === void 0 ? void 0 : _f.get(ts.toFileNameLowerCase(file.typeReferenceDirectives[index].fileName)
|
|
92088
|
+
packageId = (_g = (_f = file.resolvedTypeReferenceDirectiveNames) === null || _f === void 0 ? void 0 : _f.get(ts.toFileNameLowerCase(file.typeReferenceDirectives[index].fileName))) === null || _g === void 0 ? void 0 : _g.packageId;
|
|
92698
92089
|
break;
|
|
92699
92090
|
case ts.FileIncludeKind.LibReferenceDirective:
|
|
92700
92091
|
(_c = file.libReferenceDirectives[index], pos = _c.pos, end = _c.end);
|
|
@@ -92761,23 +92152,6 @@ var ts;
|
|
|
92761
92152
|
configFileParseResult.errors;
|
|
92762
92153
|
}
|
|
92763
92154
|
ts.getConfigFileParsingDiagnostics = getConfigFileParsingDiagnostics;
|
|
92764
|
-
function getImpliedNodeFormatForFile(fileName, packageJsonInfoCache, host, options) {
|
|
92765
|
-
switch (ts.getEmitModuleResolutionKind(options)) {
|
|
92766
|
-
case ts.ModuleResolutionKind.Node12:
|
|
92767
|
-
case ts.ModuleResolutionKind.NodeNext:
|
|
92768
|
-
return ts.fileExtensionIsOneOf(fileName, [".d.mts", ".mts", ".mjs"]) ? ts.ModuleKind.ESNext :
|
|
92769
|
-
ts.fileExtensionIsOneOf(fileName, [".d.cts", ".cts", ".cjs"]) ? ts.ModuleKind.CommonJS :
|
|
92770
|
-
ts.fileExtensionIsOneOf(fileName, [".d.ts", ".ts", ".tsx", ".js", ".jsx"]) ? lookupFromPackageJson() :
|
|
92771
|
-
undefined;
|
|
92772
|
-
default:
|
|
92773
|
-
return undefined;
|
|
92774
|
-
}
|
|
92775
|
-
function lookupFromPackageJson() {
|
|
92776
|
-
var scope = ts.getPackageScopeForPath(fileName, packageJsonInfoCache, host, options);
|
|
92777
|
-
return (scope === null || scope === void 0 ? void 0 : scope.packageJsonContent.type) === "module" ? ts.ModuleKind.ESNext : ts.ModuleKind.CommonJS;
|
|
92778
|
-
}
|
|
92779
|
-
}
|
|
92780
|
-
ts.getImpliedNodeFormatForFile = getImpliedNodeFormatForFile;
|
|
92781
92155
|
function shouldProgramCreateNewSourceFiles(program, newOptions) {
|
|
92782
92156
|
if (!program)
|
|
92783
92157
|
return false;
|
|
@@ -92793,7 +92167,7 @@ var ts;
|
|
|
92793
92167
|
};
|
|
92794
92168
|
}
|
|
92795
92169
|
function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _configFileParsingDiagnostics) {
|
|
92796
|
-
var _a, _b, _c
|
|
92170
|
+
var _a, _b, _c;
|
|
92797
92171
|
var createProgramOptions = ts.isArray(rootNamesOrOptions) ? createCreateProgramOptions(rootNamesOrOptions, _options, _host, _oldProgram, _configFileParsingDiagnostics) : rootNamesOrOptions;
|
|
92798
92172
|
var rootNames = createProgramOptions.rootNames, options = createProgramOptions.options, configFileParsingDiagnostics = createProgramOptions.configFileParsingDiagnostics, projectReferences = createProgramOptions.projectReferences;
|
|
92799
92173
|
var oldProgram = createProgramOptions.oldProgram;
|
|
@@ -92825,7 +92199,7 @@ var ts;
|
|
|
92825
92199
|
var programDiagnostics = ts.createDiagnosticCollection();
|
|
92826
92200
|
var currentDirectory = host.getCurrentDirectory();
|
|
92827
92201
|
var supportedExtensions = ts.getSupportedExtensions(options);
|
|
92828
|
-
var supportedExtensionsWithJsonIfResolveJsonModule = ts.
|
|
92202
|
+
var supportedExtensionsWithJsonIfResolveJsonModule = ts.getSuppoertedExtensionsWithJsonIfResolveJsonModule(options, supportedExtensions);
|
|
92829
92203
|
var hasEmitBlockingDiagnostics = new ts.Map();
|
|
92830
92204
|
var _compilerOptionsObjectLiteralSyntax;
|
|
92831
92205
|
var moduleResolutionCache;
|
|
@@ -92833,7 +92207,7 @@ var ts;
|
|
|
92833
92207
|
var actualResolveModuleNamesWorker;
|
|
92834
92208
|
var hasInvalidatedResolution = host.hasInvalidatedResolution || ts.returnFalse;
|
|
92835
92209
|
if (host.resolveModuleNames) {
|
|
92836
|
-
actualResolveModuleNamesWorker = function (moduleNames, containingFile,
|
|
92210
|
+
actualResolveModuleNamesWorker = function (moduleNames, containingFile, reusedNames, redirectedReference) { return host.resolveModuleNames(ts.Debug.checkEachDefined(moduleNames), containingFile, reusedNames, redirectedReference, options).map(function (resolved) {
|
|
92837
92211
|
if (!resolved || resolved.extension !== undefined) {
|
|
92838
92212
|
return resolved;
|
|
92839
92213
|
}
|
|
@@ -92841,12 +92215,11 @@ var ts;
|
|
|
92841
92215
|
withExtension.extension = ts.extensionFromPath(resolved.resolvedFileName);
|
|
92842
92216
|
return withExtension;
|
|
92843
92217
|
}); };
|
|
92844
|
-
moduleResolutionCache = (_a = host.getModuleResolutionCache) === null || _a === void 0 ? void 0 : _a.call(host);
|
|
92845
92218
|
}
|
|
92846
92219
|
else {
|
|
92847
92220
|
moduleResolutionCache = ts.createModuleResolutionCache(currentDirectory, getCanonicalFileName, options);
|
|
92848
|
-
var loader_1 = function (moduleName,
|
|
92849
|
-
actualResolveModuleNamesWorker = function (moduleNames, containingFile,
|
|
92221
|
+
var loader_1 = function (moduleName, containingFile, redirectedReference) { return ts.resolveModuleName(moduleName, containingFile, options, host, moduleResolutionCache, redirectedReference).resolvedModule; };
|
|
92222
|
+
actualResolveModuleNamesWorker = function (moduleNames, containingFile, _reusedNames, redirectedReference) { return loadWithLocalCache(ts.Debug.checkEachDefined(moduleNames), containingFile, redirectedReference, loader_1); };
|
|
92850
92223
|
}
|
|
92851
92224
|
var actualResolveTypeReferenceDirectiveNamesWorker;
|
|
92852
92225
|
if (host.resolveTypeReferenceDirectives) {
|
|
@@ -92868,9 +92241,9 @@ var ts;
|
|
|
92868
92241
|
var projectReferenceRedirects;
|
|
92869
92242
|
var mapFromFileToProjectReferenceRedirects;
|
|
92870
92243
|
var mapFromToProjectReferenceRedirectSource;
|
|
92871
|
-
var useSourceOfProjectReferenceRedirect = !!((
|
|
92244
|
+
var useSourceOfProjectReferenceRedirect = !!((_a = host.useSourceOfProjectReferenceRedirect) === null || _a === void 0 ? void 0 : _a.call(host)) &&
|
|
92872
92245
|
!options.disableSourceOfProjectReferenceRedirect;
|
|
92873
|
-
var
|
|
92246
|
+
var _d = updateHostForUseSourceOfProjectReferenceRedirect({
|
|
92874
92247
|
compilerHost: host,
|
|
92875
92248
|
getSymlinkCache: getSymlinkCache,
|
|
92876
92249
|
useSourceOfProjectReferenceRedirect: useSourceOfProjectReferenceRedirect,
|
|
@@ -92878,7 +92251,7 @@ var ts;
|
|
|
92878
92251
|
getResolvedProjectReferences: getResolvedProjectReferences,
|
|
92879
92252
|
getSourceOfProjectReferenceRedirect: getSourceOfProjectReferenceRedirect,
|
|
92880
92253
|
forEachResolvedProjectReference: forEachResolvedProjectReference
|
|
92881
|
-
}), onProgramCreateComplete =
|
|
92254
|
+
}), onProgramCreateComplete = _d.onProgramCreateComplete, fileExists = _d.fileExists, directoryExists = _d.directoryExists;
|
|
92882
92255
|
ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.push("program", "shouldProgramCreateNewSourceFiles", { hasOldProgram: !!oldProgram });
|
|
92883
92256
|
var shouldCreateNewSourceFile = shouldProgramCreateNewSourceFiles(oldProgram, options);
|
|
92884
92257
|
ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.pop();
|
|
@@ -92933,7 +92306,7 @@ var ts;
|
|
|
92933
92306
|
var containingFilename = ts.combinePaths(containingDirectory, ts.inferredTypesContainingFile);
|
|
92934
92307
|
var resolutions = resolveTypeReferenceDirectiveNamesWorker(typeReferences, containingFilename);
|
|
92935
92308
|
for (var i = 0; i < typeReferences.length; i++) {
|
|
92936
|
-
processTypeReferenceDirective(typeReferences[i], resolutions[i], { kind: ts.FileIncludeKind.AutomaticTypeDirectiveFile, typeReference: typeReferences[i], packageId: (
|
|
92309
|
+
processTypeReferenceDirective(typeReferences[i], resolutions[i], { kind: ts.FileIncludeKind.AutomaticTypeDirectiveFile, typeReference: typeReferences[i], packageId: (_b = resolutions[i]) === null || _b === void 0 ? void 0 : _b.packageId });
|
|
92937
92310
|
}
|
|
92938
92311
|
ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.pop();
|
|
92939
92312
|
}
|
|
@@ -92944,7 +92317,7 @@ var ts;
|
|
|
92944
92317
|
}
|
|
92945
92318
|
else {
|
|
92946
92319
|
ts.forEach(options.lib, function (libFileName, index) {
|
|
92947
|
-
processRootFile(
|
|
92320
|
+
processRootFile(pathForLibFile(libFileName), true, false, { kind: ts.FileIncludeKind.LibFile, index: index });
|
|
92948
92321
|
});
|
|
92949
92322
|
}
|
|
92950
92323
|
}
|
|
@@ -93040,7 +92413,7 @@ var ts;
|
|
|
93040
92413
|
fileExists: fileExists,
|
|
93041
92414
|
directoryExists: directoryExists,
|
|
93042
92415
|
getSymlinkCache: getSymlinkCache,
|
|
93043
|
-
realpath: (
|
|
92416
|
+
realpath: (_c = host.realpath) === null || _c === void 0 ? void 0 : _c.bind(host),
|
|
93044
92417
|
useCaseSensitiveFileNames: function () { return host.useCaseSensitiveFileNames(); },
|
|
93045
92418
|
getFileIncludeReasons: function () { return fileReasons; },
|
|
93046
92419
|
structureIsReused: structureIsReused,
|
|
@@ -93069,7 +92442,7 @@ var ts;
|
|
|
93069
92442
|
var redirectedReference = getRedirectReferenceForResolution(containingFile);
|
|
93070
92443
|
ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.push("program", "resolveModuleNamesWorker", { containingFileName: containingFileName });
|
|
93071
92444
|
ts.performance.mark("beforeResolveModule");
|
|
93072
|
-
var result = actualResolveModuleNamesWorker(moduleNames,
|
|
92445
|
+
var result = actualResolveModuleNamesWorker(moduleNames, containingFileName, reusedNames, redirectedReference);
|
|
93073
92446
|
ts.performance.mark("afterResolveModule");
|
|
93074
92447
|
ts.performance.measure("ResolveModule", "beforeResolveModule", "afterResolveModule");
|
|
93075
92448
|
ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.pop();
|
|
@@ -93128,8 +92501,8 @@ var ts;
|
|
|
93128
92501
|
}
|
|
93129
92502
|
return ts.libs.length + 2;
|
|
93130
92503
|
}
|
|
93131
|
-
function getResolvedModuleWithFailedLookupLocationsFromCache(moduleName, containingFile
|
|
93132
|
-
return moduleResolutionCache && ts.resolveModuleNameFromCache(moduleName, containingFile, moduleResolutionCache
|
|
92504
|
+
function getResolvedModuleWithFailedLookupLocationsFromCache(moduleName, containingFile) {
|
|
92505
|
+
return moduleResolutionCache && ts.resolveModuleNameFromCache(moduleName, containingFile, moduleResolutionCache);
|
|
93133
92506
|
}
|
|
93134
92507
|
function toPath(fileName) {
|
|
93135
92508
|
return ts.toPath(fileName, currentDirectory, getCanonicalFileName);
|
|
@@ -93160,11 +92533,9 @@ var ts;
|
|
|
93160
92533
|
var oldSourceFile = oldProgram && oldProgram.getSourceFile(file.fileName);
|
|
93161
92534
|
if (oldSourceFile !== file && file.resolvedModules) {
|
|
93162
92535
|
var result_14 = [];
|
|
93163
|
-
var i = 0;
|
|
93164
92536
|
for (var _i = 0, moduleNames_1 = moduleNames; _i < moduleNames_1.length; _i++) {
|
|
93165
92537
|
var moduleName = moduleNames_1[_i];
|
|
93166
|
-
var resolvedModule = file.resolvedModules.get(moduleName
|
|
93167
|
-
i++;
|
|
92538
|
+
var resolvedModule = file.resolvedModules.get(moduleName);
|
|
93168
92539
|
result_14.push(resolvedModule);
|
|
93169
92540
|
}
|
|
93170
92541
|
return result_14;
|
|
@@ -93176,7 +92547,7 @@ var ts;
|
|
|
93176
92547
|
for (var i = 0; i < moduleNames.length; i++) {
|
|
93177
92548
|
var moduleName = moduleNames[i];
|
|
93178
92549
|
if (file === oldSourceFile && !hasInvalidatedResolution(oldSourceFile.path)) {
|
|
93179
|
-
var oldResolvedModule = ts.getResolvedModule(oldSourceFile, moduleName
|
|
92550
|
+
var oldResolvedModule = ts.getResolvedModule(oldSourceFile, moduleName);
|
|
93180
92551
|
if (oldResolvedModule) {
|
|
93181
92552
|
if (ts.isTraceEnabled(options, host)) {
|
|
93182
92553
|
ts.trace(host, oldResolvedModule.packageId ?
|
|
@@ -93196,7 +92567,7 @@ var ts;
|
|
|
93196
92567
|
}
|
|
93197
92568
|
}
|
|
93198
92569
|
else {
|
|
93199
|
-
resolvesToAmbientModuleInNonModifiedFile = moduleNameResolvesToAmbientModuleInNonModifiedFile(moduleName
|
|
92570
|
+
resolvesToAmbientModuleInNonModifiedFile = moduleNameResolvesToAmbientModuleInNonModifiedFile(moduleName);
|
|
93200
92571
|
}
|
|
93201
92572
|
if (resolvesToAmbientModuleInNonModifiedFile) {
|
|
93202
92573
|
(result || (result = new Array(moduleNames.length)))[i] = predictedToResolveToAmbientModuleMarker;
|
|
@@ -93226,8 +92597,8 @@ var ts;
|
|
|
93226
92597
|
}
|
|
93227
92598
|
ts.Debug.assert(j === resolutions.length);
|
|
93228
92599
|
return result;
|
|
93229
|
-
function moduleNameResolvesToAmbientModuleInNonModifiedFile(moduleName
|
|
93230
|
-
var resolutionToFile = ts.getResolvedModule(oldSourceFile, moduleName
|
|
92600
|
+
function moduleNameResolvesToAmbientModuleInNonModifiedFile(moduleName) {
|
|
92601
|
+
var resolutionToFile = ts.getResolvedModule(oldSourceFile, moduleName);
|
|
93231
92602
|
var resolvedFile = resolutionToFile && oldProgram.getSourceFile(resolutionToFile.resolvedFileName);
|
|
93232
92603
|
if (resolutionToFile && resolvedFile) {
|
|
93233
92604
|
return false;
|
|
@@ -93289,8 +92660,8 @@ var ts;
|
|
|
93289
92660
|
for (var _i = 0, oldSourceFiles_2 = oldSourceFiles; _i < oldSourceFiles_2.length; _i++) {
|
|
93290
92661
|
var oldSourceFile = oldSourceFiles_2[_i];
|
|
93291
92662
|
var newSourceFile = host.getSourceFileByPath
|
|
93292
|
-
? host.getSourceFileByPath(oldSourceFile.fileName, oldSourceFile.resolvedPath,
|
|
93293
|
-
: host.getSourceFile(oldSourceFile.fileName,
|
|
92663
|
+
? host.getSourceFileByPath(oldSourceFile.fileName, oldSourceFile.resolvedPath, options.target, undefined, shouldCreateNewSourceFile)
|
|
92664
|
+
: host.getSourceFile(oldSourceFile.fileName, options.target, undefined, shouldCreateNewSourceFile);
|
|
93294
92665
|
if (!newSourceFile) {
|
|
93295
92666
|
return 0;
|
|
93296
92667
|
}
|
|
@@ -93373,20 +92744,20 @@ var ts;
|
|
|
93373
92744
|
var _f = modifiedSourceFiles_1[_e], oldSourceFile = _f.oldFile, newSourceFile = _f.newFile;
|
|
93374
92745
|
var moduleNames = getModuleNames(newSourceFile);
|
|
93375
92746
|
var resolutions = resolveModuleNamesReusingOldState(moduleNames, newSourceFile);
|
|
93376
|
-
var resolutionsChanged = ts.hasChangesInResolutions(moduleNames, resolutions, oldSourceFile.resolvedModules,
|
|
92747
|
+
var resolutionsChanged = ts.hasChangesInResolutions(moduleNames, resolutions, oldSourceFile.resolvedModules, ts.moduleResolutionIsEqualTo);
|
|
93377
92748
|
if (resolutionsChanged) {
|
|
93378
92749
|
structureIsReused = 1;
|
|
93379
|
-
newSourceFile.resolvedModules = ts.
|
|
92750
|
+
newSourceFile.resolvedModules = ts.zipToMap(moduleNames, resolutions);
|
|
93380
92751
|
}
|
|
93381
92752
|
else {
|
|
93382
92753
|
newSourceFile.resolvedModules = oldSourceFile.resolvedModules;
|
|
93383
92754
|
}
|
|
93384
92755
|
var typesReferenceDirectives = ts.map(newSourceFile.typeReferenceDirectives, function (ref) { return ts.toFileNameLowerCase(ref.fileName); });
|
|
93385
92756
|
var typeReferenceResolutions = resolveTypeReferenceDirectiveNamesWorker(typesReferenceDirectives, newSourceFile);
|
|
93386
|
-
var typeReferenceEesolutionsChanged = ts.hasChangesInResolutions(typesReferenceDirectives, typeReferenceResolutions, oldSourceFile.resolvedTypeReferenceDirectiveNames,
|
|
92757
|
+
var typeReferenceEesolutionsChanged = ts.hasChangesInResolutions(typesReferenceDirectives, typeReferenceResolutions, oldSourceFile.resolvedTypeReferenceDirectiveNames, ts.typeDirectiveIsEqualTo);
|
|
93387
92758
|
if (typeReferenceEesolutionsChanged) {
|
|
93388
92759
|
structureIsReused = 1;
|
|
93389
|
-
newSourceFile.resolvedTypeReferenceDirectiveNames = ts.
|
|
92760
|
+
newSourceFile.resolvedTypeReferenceDirectiveNames = ts.zipToMap(typesReferenceDirectives, typeReferenceResolutions);
|
|
93390
92761
|
}
|
|
93391
92762
|
else {
|
|
93392
92763
|
newSourceFile.resolvedTypeReferenceDirectiveNames = oldSourceFile.resolvedTypeReferenceDirectiveNames;
|
|
@@ -93500,7 +92871,7 @@ var ts;
|
|
|
93500
92871
|
return equalityComparer(file.fileName, getDefaultLibraryFileName());
|
|
93501
92872
|
}
|
|
93502
92873
|
else {
|
|
93503
|
-
return ts.some(options.lib, function (libFileName) { return equalityComparer(file.fileName,
|
|
92874
|
+
return ts.some(options.lib, function (libFileName) { return equalityComparer(file.fileName, pathForLibFile(libFileName)); });
|
|
93504
92875
|
}
|
|
93505
92876
|
}
|
|
93506
92877
|
function getDiagnosticsProducingTypeChecker() {
|
|
@@ -94009,7 +93380,7 @@ var ts;
|
|
|
94009
93380
|
var libName = ts.toFileNameLowerCase(ref.fileName);
|
|
94010
93381
|
var libFileName = ts.libMap.get(libName);
|
|
94011
93382
|
if (libFileName) {
|
|
94012
|
-
return getSourceFile(
|
|
93383
|
+
return getSourceFile(pathForLibFile(libFileName));
|
|
94013
93384
|
}
|
|
94014
93385
|
}
|
|
94015
93386
|
function getSourceFileFromReference(referencingFile, ref) {
|
|
@@ -94018,13 +93389,13 @@ var ts;
|
|
|
94018
93389
|
function getSourceFileFromReferenceWorker(fileName, getSourceFile, fail, reason) {
|
|
94019
93390
|
if (ts.hasExtension(fileName)) {
|
|
94020
93391
|
var canonicalFileName_1 = host.getCanonicalFileName(fileName);
|
|
94021
|
-
if (!options.allowNonTsExtensions && !ts.forEach(
|
|
93392
|
+
if (!options.allowNonTsExtensions && !ts.forEach(supportedExtensionsWithJsonIfResolveJsonModule, function (extension) { return ts.fileExtensionIs(canonicalFileName_1, extension); })) {
|
|
94022
93393
|
if (fail) {
|
|
94023
93394
|
if (ts.hasJSFileExtension(canonicalFileName_1)) {
|
|
94024
93395
|
fail(ts.Diagnostics.File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option, fileName);
|
|
94025
93396
|
}
|
|
94026
93397
|
else {
|
|
94027
|
-
fail(ts.Diagnostics.File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1, fileName, "'" +
|
|
93398
|
+
fail(ts.Diagnostics.File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1, fileName, "'" + supportedExtensions.join("', '") + "'");
|
|
94028
93399
|
}
|
|
94029
93400
|
}
|
|
94030
93401
|
return undefined;
|
|
@@ -94054,9 +93425,9 @@ var ts;
|
|
|
94054
93425
|
fail(ts.Diagnostics.File_0_not_found, fileName);
|
|
94055
93426
|
return undefined;
|
|
94056
93427
|
}
|
|
94057
|
-
var sourceFileWithAddedExtension = ts.forEach(supportedExtensions
|
|
93428
|
+
var sourceFileWithAddedExtension = ts.forEach(supportedExtensions, function (extension) { return getSourceFile(fileName + extension); });
|
|
94058
93429
|
if (fail && !sourceFileWithAddedExtension)
|
|
94059
|
-
fail(ts.Diagnostics.Could_not_resolve_the_path_0_with_the_extensions_Colon_1, fileName, "'" +
|
|
93430
|
+
fail(ts.Diagnostics.Could_not_resolve_the_path_0_with_the_extensions_Colon_1, fileName, "'" + supportedExtensions.join("', '") + "'");
|
|
94060
93431
|
return sourceFileWithAddedExtension;
|
|
94061
93432
|
}
|
|
94062
93433
|
}
|
|
@@ -94181,7 +93552,7 @@ var ts;
|
|
|
94181
93552
|
redirectedPath = toPath(redirect);
|
|
94182
93553
|
}
|
|
94183
93554
|
}
|
|
94184
|
-
var file = host.getSourceFile(fileName,
|
|
93555
|
+
var file = host.getSourceFile(fileName, options.target, function (hostErrorMessage) { return addFilePreprocessingFileExplainingDiagnostic(undefined, reason, ts.Diagnostics.Cannot_read_file_0_Colon_1, [fileName, hostErrorMessage]); }, shouldCreateNewSourceFile);
|
|
94185
93556
|
if (packageId) {
|
|
94186
93557
|
var packageIdKey = ts.packageIdToString(packageId);
|
|
94187
93558
|
var fileFromPackageId = packageIdToSourceFile.get(packageIdKey);
|
|
@@ -94206,7 +93577,6 @@ var ts;
|
|
|
94206
93577
|
file.path = path;
|
|
94207
93578
|
file.resolvedPath = toPath(fileName);
|
|
94208
93579
|
file.originalFileName = originalFileName;
|
|
94209
|
-
file.impliedNodeFormat = getImpliedNodeFormatForFile(file.resolvedPath, moduleResolutionCache === null || moduleResolutionCache === void 0 ? void 0 : moduleResolutionCache.getPackageJsonInfoCache(), host, options);
|
|
94210
93580
|
addFileIncludeReason(file, reason);
|
|
94211
93581
|
if (host.useCaseSensitiveFileNames()) {
|
|
94212
93582
|
var pathLowerCase = ts.toFileNameLowerCase(path);
|
|
@@ -94376,12 +93746,27 @@ var ts;
|
|
|
94376
93746
|
resolvedTypeReferenceDirectives.set(typeReferenceDirective, resolvedTypeReferenceDirective);
|
|
94377
93747
|
}
|
|
94378
93748
|
}
|
|
93749
|
+
function pathForLibFile(libFileName) {
|
|
93750
|
+
var components = libFileName.split(".");
|
|
93751
|
+
var path = components[1];
|
|
93752
|
+
var i = 2;
|
|
93753
|
+
while (components[i] && components[i] !== "d") {
|
|
93754
|
+
path += (i === 2 ? "/" : "-") + components[i];
|
|
93755
|
+
i++;
|
|
93756
|
+
}
|
|
93757
|
+
var resolveFrom = ts.combinePaths(currentDirectory, "__lib_node_modules_lookup_" + libFileName + "__.ts");
|
|
93758
|
+
var localOverrideModuleResult = ts.resolveModuleName("@typescript/" + path, resolveFrom, { moduleResolution: ts.ModuleResolutionKind.NodeJs }, host, moduleResolutionCache);
|
|
93759
|
+
if (localOverrideModuleResult === null || localOverrideModuleResult === void 0 ? void 0 : localOverrideModuleResult.resolvedModule) {
|
|
93760
|
+
return localOverrideModuleResult.resolvedModule.resolvedFileName;
|
|
93761
|
+
}
|
|
93762
|
+
return ts.combinePaths(defaultLibraryPath, libFileName);
|
|
93763
|
+
}
|
|
94379
93764
|
function processLibReferenceDirectives(file) {
|
|
94380
93765
|
ts.forEach(file.libReferenceDirectives, function (libReference, index) {
|
|
94381
93766
|
var libName = ts.toFileNameLowerCase(libReference.fileName);
|
|
94382
93767
|
var libFileName = ts.libMap.get(libName);
|
|
94383
93768
|
if (libFileName) {
|
|
94384
|
-
processRootFile(
|
|
93769
|
+
processRootFile(pathForLibFile(libFileName), true, true, { kind: ts.FileIncludeKind.LibReferenceDirective, file: file.path, index: index, });
|
|
94385
93770
|
}
|
|
94386
93771
|
else {
|
|
94387
93772
|
var unqualifiedLibName = ts.removeSuffix(ts.removePrefix(libName, "lib."), ".d.ts");
|
|
@@ -94409,7 +93794,7 @@ var ts;
|
|
|
94409
93794
|
var optionsForFile = (useSourceOfProjectReferenceRedirect ? (_a = getRedirectReferenceForResolution(file)) === null || _a === void 0 ? void 0 : _a.commandLine.options : undefined) || options;
|
|
94410
93795
|
for (var index = 0; index < moduleNames.length; index++) {
|
|
94411
93796
|
var resolution = resolutions[index];
|
|
94412
|
-
ts.setResolvedModule(file, moduleNames[index], resolution
|
|
93797
|
+
ts.setResolvedModule(file, moduleNames[index], resolution);
|
|
94413
93798
|
if (!resolution) {
|
|
94414
93799
|
continue;
|
|
94415
93800
|
}
|
|
@@ -94617,7 +94002,7 @@ var ts;
|
|
|
94617
94002
|
if (options.noImplicitUseStrict && ts.getStrictOptionValue(options, "alwaysStrict")) {
|
|
94618
94003
|
createDiagnosticForOptionName(ts.Diagnostics.Option_0_cannot_be_specified_with_option_1, "noImplicitUseStrict", "alwaysStrict");
|
|
94619
94004
|
}
|
|
94620
|
-
var languageVersion =
|
|
94005
|
+
var languageVersion = options.target || 0;
|
|
94621
94006
|
var firstNonAmbientExternalModuleSourceFile = ts.find(files, function (f) { return ts.isExternalModule(f) && !f.isDeclarationFile; });
|
|
94622
94007
|
if (options.isolatedModules) {
|
|
94623
94008
|
if (options.module === ts.ModuleKind.None && languageVersion < 2) {
|
|
@@ -94861,7 +94246,7 @@ var ts;
|
|
|
94861
94246
|
message = ts.Diagnostics.File_is_library_specified_here;
|
|
94862
94247
|
break;
|
|
94863
94248
|
}
|
|
94864
|
-
var target = ts.forEachEntry(ts.targetOptionDeclaration.type, function (value, key) { return value ===
|
|
94249
|
+
var target = ts.forEachEntry(ts.targetOptionDeclaration.type, function (value, key) { return value === options.target ? key : undefined; });
|
|
94865
94250
|
configFileNode = target ? getOptionsSyntaxByValue("target", target) : undefined;
|
|
94866
94251
|
message = ts.Diagnostics.File_is_default_library_for_target_specified_here;
|
|
94867
94252
|
break;
|
|
@@ -95024,7 +94409,7 @@ var ts;
|
|
|
95024
94409
|
if (options.outDir) {
|
|
95025
94410
|
return ts.containsPath(options.outDir, filePath, currentDirectory, !host.useCaseSensitiveFileNames());
|
|
95026
94411
|
}
|
|
95027
|
-
if (ts.fileExtensionIsOneOf(filePath, ts.
|
|
94412
|
+
if (ts.fileExtensionIsOneOf(filePath, ts.supportedJSExtensions) || ts.fileExtensionIs(filePath, ".d.ts")) {
|
|
95028
94413
|
var filePathWithoutExtension = ts.removeFileExtension(filePath);
|
|
95029
94414
|
return !!getSourceFileByPath((filePathWithoutExtension + ".ts")) ||
|
|
95030
94415
|
!!getSourceFileByPath((filePathWithoutExtension + ".tsx"));
|
|
@@ -95488,7 +94873,7 @@ var ts;
|
|
|
95488
94873
|
}
|
|
95489
94874
|
}
|
|
95490
94875
|
}
|
|
95491
|
-
fileInfos.set(sourceFile.resolvedPath, { version: version_2, signature: oldInfo && oldInfo.signature, affectsGlobalScope: isFileAffectingGlobalScope(sourceFile) || undefined
|
|
94876
|
+
fileInfos.set(sourceFile.resolvedPath, { version: version_2, signature: oldInfo && oldInfo.signature, affectsGlobalScope: isFileAffectingGlobalScope(sourceFile) || undefined });
|
|
95492
94877
|
}
|
|
95493
94878
|
return {
|
|
95494
94879
|
fileInfos: fileInfos,
|
|
@@ -95556,7 +94941,7 @@ var ts;
|
|
|
95556
94941
|
var emitOutput_1 = getFileEmitOutput(programOfThisState, sourceFile, true, cancellationToken, undefined, true);
|
|
95557
94942
|
var firstDts_1 = ts.firstOrUndefined(emitOutput_1.outputFiles);
|
|
95558
94943
|
if (firstDts_1) {
|
|
95559
|
-
ts.Debug.assert(ts.
|
|
94944
|
+
ts.Debug.assert(ts.fileExtensionIs(firstDts_1.name, ".d.ts"), "File extension for signature expected to be dts", function () { return "Found: " + ts.getAnyExtensionFromPath(firstDts_1.name) + " for " + firstDts_1.name + ":: All output files: " + JSON.stringify(emitOutput_1.outputFiles.map(function (f) { return f.name; })); });
|
|
95560
94945
|
latestSignature = (computeHash || ts.generateDjb2Hash)(firstDts_1.text);
|
|
95561
94946
|
if (exportedModulesMapCache && latestSignature !== prevSignature) {
|
|
95562
94947
|
updateExportedModules(sourceFile, emitOutput_1.exportedModulesFromDeclarationEmit, exportedModulesMapCache);
|
|
@@ -95804,13 +95189,6 @@ var ts;
|
|
|
95804
95189
|
ts.Debug.assert(!state.seenAffectedFiles || !state.seenAffectedFiles.size);
|
|
95805
95190
|
state.seenAffectedFiles = state.seenAffectedFiles || new ts.Set();
|
|
95806
95191
|
}
|
|
95807
|
-
if (useOldState) {
|
|
95808
|
-
ts.forEachEntry(oldState.fileInfos, function (info, sourceFilePath) {
|
|
95809
|
-
if (state.fileInfos.has(sourceFilePath) && state.fileInfos.get(sourceFilePath).impliedFormat !== info.impliedFormat) {
|
|
95810
|
-
state.changedFilesSet.add(sourceFilePath);
|
|
95811
|
-
}
|
|
95812
|
-
});
|
|
95813
|
-
}
|
|
95814
95192
|
state.buildInfoEmitPending = !!state.changedFilesSet.size;
|
|
95815
95193
|
return state;
|
|
95816
95194
|
}
|
|
@@ -96110,13 +95488,13 @@ var ts;
|
|
|
96110
95488
|
var actualSignature = signature !== null && signature !== void 0 ? signature : value.signature;
|
|
96111
95489
|
return value.version === actualSignature ?
|
|
96112
95490
|
value.affectsGlobalScope ?
|
|
96113
|
-
{ version: value.version, signature: undefined, affectsGlobalScope: true
|
|
95491
|
+
{ version: value.version, signature: undefined, affectsGlobalScope: true } :
|
|
96114
95492
|
value.version :
|
|
96115
95493
|
actualSignature !== undefined ?
|
|
96116
95494
|
signature === undefined ?
|
|
96117
95495
|
value :
|
|
96118
|
-
{ version: value.version, signature: signature, affectsGlobalScope: value.affectsGlobalScope
|
|
96119
|
-
{ version: value.version, signature: false, affectsGlobalScope: value.affectsGlobalScope
|
|
95496
|
+
{ version: value.version, signature: signature, affectsGlobalScope: value.affectsGlobalScope } :
|
|
95497
|
+
{ version: value.version, signature: false, affectsGlobalScope: value.affectsGlobalScope };
|
|
96120
95498
|
});
|
|
96121
95499
|
var referencedMap;
|
|
96122
95500
|
if (state.referencedMap) {
|
|
@@ -96469,10 +95847,10 @@ var ts;
|
|
|
96469
95847
|
}
|
|
96470
95848
|
function toBuilderStateFileInfo(fileInfo) {
|
|
96471
95849
|
return ts.isString(fileInfo) ?
|
|
96472
|
-
{ version: fileInfo, signature: fileInfo, affectsGlobalScope: undefined
|
|
95850
|
+
{ version: fileInfo, signature: fileInfo, affectsGlobalScope: undefined } :
|
|
96473
95851
|
ts.isString(fileInfo.signature) ?
|
|
96474
95852
|
fileInfo :
|
|
96475
|
-
{ version: fileInfo.version, signature: fileInfo.signature === false ? undefined : fileInfo.version, affectsGlobalScope: fileInfo.affectsGlobalScope
|
|
95853
|
+
{ version: fileInfo.version, signature: fileInfo.signature === false ? undefined : fileInfo.version, affectsGlobalScope: fileInfo.affectsGlobalScope };
|
|
96476
95854
|
}
|
|
96477
95855
|
ts.toBuilderStateFileInfo = toBuilderStateFileInfo;
|
|
96478
95856
|
function createBuildProgramUsingProgramBuildInfo(program, buildInfoPath, host) {
|
|
@@ -96772,14 +96150,14 @@ var ts;
|
|
|
96772
96150
|
}
|
|
96773
96151
|
function resolveNamesWithLocalCache(_a) {
|
|
96774
96152
|
var _b, _c, _d;
|
|
96775
|
-
var names = _a.names, containingFile = _a.containingFile, redirectedReference = _a.redirectedReference, cache = _a.cache, perDirectoryCacheWithRedirects = _a.perDirectoryCacheWithRedirects, loader = _a.loader, getResolutionWithResolvedFileName = _a.getResolutionWithResolvedFileName, shouldRetryResolution = _a.shouldRetryResolution, reusedNames = _a.reusedNames, logChanges = _a.logChanges
|
|
96153
|
+
var names = _a.names, containingFile = _a.containingFile, redirectedReference = _a.redirectedReference, cache = _a.cache, perDirectoryCacheWithRedirects = _a.perDirectoryCacheWithRedirects, loader = _a.loader, getResolutionWithResolvedFileName = _a.getResolutionWithResolvedFileName, shouldRetryResolution = _a.shouldRetryResolution, reusedNames = _a.reusedNames, logChanges = _a.logChanges;
|
|
96776
96154
|
var path = resolutionHost.toPath(containingFile);
|
|
96777
|
-
var resolutionsInFile = cache.get(path) || cache.set(path, ts.
|
|
96155
|
+
var resolutionsInFile = cache.get(path) || cache.set(path, new ts.Map()).get(path);
|
|
96778
96156
|
var dirPath = ts.getDirectoryPath(path);
|
|
96779
96157
|
var perDirectoryCache = perDirectoryCacheWithRedirects.getOrCreateMapOfCacheRedirects(redirectedReference);
|
|
96780
96158
|
var perDirectoryResolution = perDirectoryCache.get(dirPath);
|
|
96781
96159
|
if (!perDirectoryResolution) {
|
|
96782
|
-
perDirectoryResolution = ts.
|
|
96160
|
+
perDirectoryResolution = new ts.Map();
|
|
96783
96161
|
perDirectoryCache.set(dirPath, perDirectoryResolution);
|
|
96784
96162
|
}
|
|
96785
96163
|
var resolvedModules = [];
|
|
@@ -96790,18 +96168,15 @@ var ts;
|
|
|
96790
96168
|
var unmatchedRedirects = oldRedirect ?
|
|
96791
96169
|
!redirectedReference || redirectedReference.sourceFile.path !== oldRedirect.sourceFile.path :
|
|
96792
96170
|
!!redirectedReference;
|
|
96793
|
-
var seenNamesInFile = ts.
|
|
96794
|
-
var
|
|
96795
|
-
|
|
96796
|
-
var
|
|
96797
|
-
|
|
96798
|
-
i++;
|
|
96799
|
-
var resolution = resolutionsInFile.get(name, mode);
|
|
96800
|
-
if (!seenNamesInFile.has(name, mode) &&
|
|
96171
|
+
var seenNamesInFile = new ts.Map();
|
|
96172
|
+
for (var _i = 0, names_3 = names; _i < names_3.length; _i++) {
|
|
96173
|
+
var name = names_3[_i];
|
|
96174
|
+
var resolution = resolutionsInFile.get(name);
|
|
96175
|
+
if (!seenNamesInFile.has(name) &&
|
|
96801
96176
|
unmatchedRedirects || !resolution || resolution.isInvalidated ||
|
|
96802
96177
|
(hasInvalidatedNonRelativeUnresolvedImport && !ts.isExternalModuleNameRelative(name) && shouldRetryResolution(resolution))) {
|
|
96803
96178
|
var existingResolution = resolution;
|
|
96804
|
-
var resolutionInDirectory = perDirectoryResolution.get(name
|
|
96179
|
+
var resolutionInDirectory = perDirectoryResolution.get(name);
|
|
96805
96180
|
if (resolutionInDirectory) {
|
|
96806
96181
|
resolution = resolutionInDirectory;
|
|
96807
96182
|
var host = ((_b = resolutionHost.getCompilerHost) === null || _b === void 0 ? void 0 : _b.call(resolutionHost)) || resolutionHost;
|
|
@@ -96821,10 +96196,10 @@ var ts;
|
|
|
96821
96196
|
}
|
|
96822
96197
|
}
|
|
96823
96198
|
else {
|
|
96824
|
-
resolution = loader(name, containingFile, compilerOptions, ((_c = resolutionHost.getCompilerHost) === null || _c === void 0 ? void 0 : _c.call(resolutionHost)) || resolutionHost, redirectedReference
|
|
96825
|
-
perDirectoryResolution.set(name,
|
|
96199
|
+
resolution = loader(name, containingFile, compilerOptions, ((_c = resolutionHost.getCompilerHost) === null || _c === void 0 ? void 0 : _c.call(resolutionHost)) || resolutionHost, redirectedReference);
|
|
96200
|
+
perDirectoryResolution.set(name, resolution);
|
|
96826
96201
|
}
|
|
96827
|
-
resolutionsInFile.set(name,
|
|
96202
|
+
resolutionsInFile.set(name, resolution);
|
|
96828
96203
|
watchFailedLookupLocationsOfExternalModuleResolutions(name, resolution, path, getResolutionWithResolvedFileName);
|
|
96829
96204
|
if (existingResolution) {
|
|
96830
96205
|
stopWatchFailedLookupLocationOfResolution(existingResolution, path, getResolutionWithResolvedFileName);
|
|
@@ -96836,7 +96211,7 @@ var ts;
|
|
|
96836
96211
|
}
|
|
96837
96212
|
else {
|
|
96838
96213
|
var host = ((_d = resolutionHost.getCompilerHost) === null || _d === void 0 ? void 0 : _d.call(resolutionHost)) || resolutionHost;
|
|
96839
|
-
if (ts.isTraceEnabled(compilerOptions, host) && !seenNamesInFile.has(name
|
|
96214
|
+
if (ts.isTraceEnabled(compilerOptions, host) && !seenNamesInFile.has(name)) {
|
|
96840
96215
|
var resolved = getResolutionWithResolvedFileName(resolution);
|
|
96841
96216
|
ts.trace(host, loader === resolveModuleName ?
|
|
96842
96217
|
(resolved === null || resolved === void 0 ? void 0 : resolved.resolvedFileName) ?
|
|
@@ -96852,13 +96227,13 @@ var ts;
|
|
|
96852
96227
|
}
|
|
96853
96228
|
}
|
|
96854
96229
|
ts.Debug.assert(resolution !== undefined && !resolution.isInvalidated);
|
|
96855
|
-
seenNamesInFile.set(name,
|
|
96230
|
+
seenNamesInFile.set(name, true);
|
|
96856
96231
|
resolvedModules.push(getResolutionWithResolvedFileName(resolution));
|
|
96857
96232
|
}
|
|
96858
|
-
resolutionsInFile.forEach(function (resolution, name
|
|
96859
|
-
if (!seenNamesInFile.has(name
|
|
96233
|
+
resolutionsInFile.forEach(function (resolution, name) {
|
|
96234
|
+
if (!seenNamesInFile.has(name) && !ts.contains(reusedNames, name)) {
|
|
96860
96235
|
stopWatchFailedLookupLocationOfResolution(resolution, path, getResolutionWithResolvedFileName);
|
|
96861
|
-
resolutionsInFile.delete(name
|
|
96236
|
+
resolutionsInFile.delete(name);
|
|
96862
96237
|
}
|
|
96863
96238
|
});
|
|
96864
96239
|
return resolvedModules;
|
|
@@ -96892,7 +96267,7 @@ var ts;
|
|
|
96892
96267
|
shouldRetryResolution: function (resolution) { return resolution.resolvedTypeReferenceDirective === undefined; },
|
|
96893
96268
|
});
|
|
96894
96269
|
}
|
|
96895
|
-
function resolveModuleNames(moduleNames, containingFile, reusedNames, redirectedReference
|
|
96270
|
+
function resolveModuleNames(moduleNames, containingFile, reusedNames, redirectedReference) {
|
|
96896
96271
|
return resolveNamesWithLocalCache({
|
|
96897
96272
|
names: moduleNames,
|
|
96898
96273
|
containingFile: containingFile,
|
|
@@ -96904,14 +96279,11 @@ var ts;
|
|
|
96904
96279
|
shouldRetryResolution: function (resolution) { return !resolution.resolvedModule || !ts.resolutionExtensionIsTSOrJson(resolution.resolvedModule.extension); },
|
|
96905
96280
|
reusedNames: reusedNames,
|
|
96906
96281
|
logChanges: logChangesWhenResolvingModule,
|
|
96907
|
-
containingSourceFile: containingSourceFile,
|
|
96908
96282
|
});
|
|
96909
96283
|
}
|
|
96910
|
-
function getResolvedModuleWithFailedLookupLocationsFromCache(moduleName, containingFile
|
|
96284
|
+
function getResolvedModuleWithFailedLookupLocationsFromCache(moduleName, containingFile) {
|
|
96911
96285
|
var cache = resolvedModuleNames.get(resolutionHost.toPath(containingFile));
|
|
96912
|
-
|
|
96913
|
-
return undefined;
|
|
96914
|
-
return cache.get(moduleName, resolutionMode);
|
|
96286
|
+
return cache && cache.get(moduleName);
|
|
96915
96287
|
}
|
|
96916
96288
|
function isNodeModulesAtTypesDirectory(dirPath) {
|
|
96917
96289
|
return ts.endsWith(dirPath, "/node_modules/@types");
|
|
@@ -97700,7 +97072,7 @@ var ts;
|
|
|
97700
97072
|
function tryGetAnyFileFromPath(host, path) {
|
|
97701
97073
|
if (!host.fileExists)
|
|
97702
97074
|
return;
|
|
97703
|
-
var extensions = ts.
|
|
97075
|
+
var extensions = ts.getSupportedExtensions({ allowJs: true }, [{ extension: "node", isMixedContent: false }, { extension: "json", isMixedContent: false, scriptKind: 6 }]);
|
|
97704
97076
|
for (var _i = 0, extensions_3 = extensions; _i < extensions_3.length; _i++) {
|
|
97705
97077
|
var e = extensions_3[_i];
|
|
97706
97078
|
var fullPath = path + e;
|
|
@@ -97788,14 +97160,6 @@ var ts;
|
|
|
97788
97160
|
case ".jsx":
|
|
97789
97161
|
case ".json":
|
|
97790
97162
|
return ext;
|
|
97791
|
-
case ".d.mts":
|
|
97792
|
-
case ".mts":
|
|
97793
|
-
case ".mjs":
|
|
97794
|
-
return ".mjs";
|
|
97795
|
-
case ".d.cts":
|
|
97796
|
-
case ".cts":
|
|
97797
|
-
case ".cjs":
|
|
97798
|
-
return ".cjs";
|
|
97799
97163
|
default:
|
|
97800
97164
|
return undefined;
|
|
97801
97165
|
}
|
|
@@ -98049,7 +97413,7 @@ var ts;
|
|
|
98049
97413
|
case ts.FileIncludeKind.LibFile:
|
|
98050
97414
|
if (reason.index !== undefined)
|
|
98051
97415
|
return ts.chainDiagnosticMessages(undefined, ts.Diagnostics.Library_0_specified_in_compilerOptions, options.lib[reason.index]);
|
|
98052
|
-
var target = ts.forEachEntry(ts.targetOptionDeclaration.type, function (value, key) { return value ===
|
|
97416
|
+
var target = ts.forEachEntry(ts.targetOptionDeclaration.type, function (value, key) { return value === options.target ? key : undefined; });
|
|
98053
97417
|
return ts.chainDiagnosticMessages(undefined, target ?
|
|
98054
97418
|
ts.Diagnostics.Default_library_for_target_0 :
|
|
98055
97419
|
ts.Diagnostics.Default_library, target);
|
|
@@ -98437,7 +97801,7 @@ var ts;
|
|
|
98437
97801
|
}
|
|
98438
97802
|
return host.resolveModuleNames.apply(host, args);
|
|
98439
97803
|
}) :
|
|
98440
|
-
(function (moduleNames, containingFile, reusedNames, redirectedReference
|
|
97804
|
+
(function (moduleNames, containingFile, reusedNames, redirectedReference) { return resolutionCache.resolveModuleNames(moduleNames, containingFile, reusedNames, redirectedReference); });
|
|
98441
97805
|
compilerHost.resolveTypeReferenceDirectives = host.resolveTypeReferenceDirectives ?
|
|
98442
97806
|
(function () {
|
|
98443
97807
|
var args = [];
|
|
@@ -99083,11 +98447,10 @@ var ts;
|
|
|
99083
98447
|
var moduleResolutionCache = !compilerHost.resolveModuleNames ? ts.createModuleResolutionCache(currentDirectory, getCanonicalFileName) : undefined;
|
|
99084
98448
|
var typeReferenceDirectiveResolutionCache = !compilerHost.resolveTypeReferenceDirectives ? ts.createTypeReferenceDirectiveResolutionCache(currentDirectory, getCanonicalFileName, undefined, moduleResolutionCache === null || moduleResolutionCache === void 0 ? void 0 : moduleResolutionCache.getPackageJsonInfoCache()) : undefined;
|
|
99085
98449
|
if (!compilerHost.resolveModuleNames) {
|
|
99086
|
-
var loader_3 = function (moduleName,
|
|
99087
|
-
compilerHost.resolveModuleNames = function (moduleNames, containingFile, _reusedNames, redirectedReference
|
|
99088
|
-
return ts.
|
|
98450
|
+
var loader_3 = function (moduleName, containingFile, redirectedReference) { return ts.resolveModuleName(moduleName, containingFile, state.projectCompilerOptions, compilerHost, moduleResolutionCache, redirectedReference).resolvedModule; };
|
|
98451
|
+
compilerHost.resolveModuleNames = function (moduleNames, containingFile, _reusedNames, redirectedReference) {
|
|
98452
|
+
return ts.loadWithLocalCache(ts.Debug.checkEachDefined(moduleNames), containingFile, redirectedReference, loader_3);
|
|
99089
98453
|
};
|
|
99090
|
-
compilerHost.getModuleResolutionCache = function () { return moduleResolutionCache; };
|
|
99091
98454
|
}
|
|
99092
98455
|
if (!compilerHost.resolveTypeReferenceDirectives) {
|
|
99093
98456
|
var loader_4 = function (moduleName, containingFile, redirectedReference) { return ts.resolveTypeReferenceDirective(moduleName, containingFile, state.projectCompilerOptions, compilerHost, redirectedReference, state.typeReferenceDirectiveResolutionCache).resolvedTypeReferenceDirective; };
|
|
@@ -100445,10 +99808,10 @@ var ts;
|
|
|
100445
99808
|
return "Definitions";
|
|
100446
99809
|
}
|
|
100447
99810
|
var path = file.path;
|
|
100448
|
-
if (ts.fileExtensionIsOneOf(path, ts.
|
|
99811
|
+
if (ts.fileExtensionIsOneOf(path, ts.supportedTSExtensions)) {
|
|
100449
99812
|
return "TypeScript";
|
|
100450
99813
|
}
|
|
100451
|
-
else if (ts.fileExtensionIsOneOf(path, ts.
|
|
99814
|
+
else if (ts.fileExtensionIsOneOf(path, ts.supportedJSExtensions)) {
|
|
100452
99815
|
return "JavaScript";
|
|
100453
99816
|
}
|
|
100454
99817
|
else if (ts.fileExtensionIs(path, ".json")) {
|