Update LKG (#37116)

This commit is contained in:
Wesley Wigham 2020-02-28 14:02:40 -08:00 committed by GitHub
parent c6c2c4c8d5
commit 6a1e474cac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 2276 additions and 2121 deletions

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -173,7 +173,7 @@
"An_element_access_expression_should_take_an_argument_1011": "要素アクセス式では、引数を取る必要があります。",
"An_enum_member_cannot_be_named_with_a_private_identifier_18024": "private 識別子を使用して列挙型メンバーに名前を付けることはできません。",
"An_enum_member_cannot_have_a_numeric_name_2452": "列挙型メンバーに数値名を含めることはできません。",
"An_enum_member_name_must_be_followed_by_a_or_1357": "列挙型メンバー名の後には、','、'='、'}' のいずれかを指定する必要があります。",
"An_enum_member_name_must_be_followed_by_a_or_1357": "列挙型メンバー名の後には、','、'='、'}' のいずれかを指定する必要があります。",
"An_export_assignment_can_only_be_used_in_a_module_1231": "エクスポートの代入はモジュールでのみ使用可能です。",
"An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements_2309": "エクスポートの代入は、エクスポートされた他の要素を含むモジュールでは使用できません。",
"An_export_assignment_cannot_be_used_in_a_namespace_1063": "エクスポートの代入は、名前空間では使用できません。",
@ -222,7 +222,7 @@
"Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_2345": "型 '{0}' の引数を型 '{1}' のパラメーターに割り当てることはできません。",
"Array_element_destructuring_pattern_expected_1181": "配列要素の非構造化パターンが必要です。",
"Assertions_require_every_name_in_the_call_target_to_be_declared_with_an_explicit_type_annotation_2775": "アサーションでは、呼び出し先のすべての名前が明示的な型の注釈で宣言されている必要があります。",
"Assertions_require_the_call_target_to_be_an_identifier_or_qualified_name_2776": "アサーションでは、呼び出しが識別子または修飾名である必要があります。",
"Assertions_require_the_call_target_to_be_an_identifier_or_qualified_name_2776": "アサーションでは、呼び出しが識別子または修飾名である必要があります。",
"Asterisk_Slash_expected_1010": "'*/' が必要です。",
"Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_2669": "グローバル スコープの拡張を直接入れ子にできるのは、外部モジュールまたは環境モジュールの宣言内のみです。",
"Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambien_2670": "グローバル スコープの拡張は、環境コンテキストに既にある場合を除いて、'declare' 修飾子を使用する必要があります。",
@ -582,7 +582,7 @@
"Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here_1359": "識別子が予期されていました。'{0}' は、ここでは使用できない予約語です。",
"Identifier_expected_1003": "識別子が必要です。",
"Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules_1216": "識別子が必要です。'__esModule' は、ECMAScript モジュールを変換するときのエクスポート済みマーカーとして予約されています。",
"If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_S_7040": "'{0}' パッケージが実際にこのモジュールを公開する場合は、pull request を送信して 'https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/{1}' を修正することを検討してください",
"If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_S_7040": "'{0}' パッケージが実際にこのモジュールを公開する場合は、pull request を送信して 'https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/{1}' を修正することを検討してください",
"Ignore_this_error_message_90019": "このエラー メッセージを無視する",
"Implement_all_inherited_abstract_classes_95040": "継承されたすべての抽象クラスを実装します",
"Implement_all_unimplemented_interfaces_95032": "実装されていないすべてのインターフェイスを実装します",
@ -780,7 +780,7 @@
"Output_directory_for_generated_declaration_files_6166": "生成された宣言ファイルの出力ディレクトリ。",
"Output_file_0_from_project_1_does_not_exist_6309": "プロジェクト '{1}' からの出力ファイル '{0}' がありません",
"Output_file_0_has_not_been_built_from_source_file_1_6305": "出力ファイル '{0}' はソース ファイル '{1}' からビルドされていません。",
"Overload_0_of_1_2_gave_the_following_error_2772": "{1} のうち {0}、'{2}' のオーバーロードにより、次のエラーが発生しました。",
"Overload_0_of_1_2_gave_the_following_error_2772": "{1}、'{2}' の {0} のオーバーロードにより、次のエラーが発生しました。",
"Overload_signatures_must_all_be_abstract_or_non_abstract_2512": "オーバーロードのシグネチャはすべてが抽象または非抽象である必要があります。",
"Overload_signatures_must_all_be_ambient_or_non_ambient_2384": "オーバーロードのシグネチャは、すべてアンビエントであるか、すべてアンビエントでないかのどちらかである必要があります。",
"Overload_signatures_must_all_be_exported_or_non_exported_2383": "オーバーロードのシグネチャはすべてがエクスポート済みであるか、またはエクスポート済みでない必要があります。",
@ -828,10 +828,10 @@
"Prefix_all_unused_declarations_with_where_possible_95025": "可能な場合は、使用されていないすべての宣言にプレフィックスとして '_' を付けます",
"Prefix_with_declare_95094": "'declare' を前に付ける",
"Print_names_of_files_part_of_the_compilation_6155": "コンパイルの一環としてファイルの名前を書き出します。",
"Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing_6503": "コンパイルの一部であるファイルの名前の表示を実行してから、処理を停止します。",
"Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing_6503": "コンパイルの一部であるファイルの名前を出力してから、処理を停止します。",
"Print_names_of_generated_files_part_of_the_compilation_6154": "コンパイルの一環として生成されたファイル名を書き出します。",
"Print_the_compiler_s_version_6019": "コンパイラのバージョンを表示します。",
"Print_the_final_configuration_instead_of_building_1350": "ビルドを実行するのではなく、最終的な構成を表示します。",
"Print_the_final_configuration_instead_of_building_1350": "ビルドを実行するのではなく、最終的な構成を出力します。",
"Print_this_message_6017": "このメッセージを表示します。",
"Private_identifiers_are_not_allowed_in_variable_declarations_18029": "変数宣言では、private 識別子は許可されていません。",
"Private_identifiers_are_not_allowed_outside_class_bodies_18016": "private 識別子は、クラス本体の外では許可されていません。",
@ -994,16 +994,16 @@
"Source_Map_Options_6175": "ソース マップ オプション",
"Specialized_overload_signature_is_not_assignable_to_any_non_specialized_signature_2382": "特殊化されたオーバーロード シグネチャは、特殊化されていないシグネチャに割り当てることはできません。",
"Specifier_of_dynamic_import_cannot_be_spread_element_1325": "動的インポートの指定子にはスプレッド要素を指定できません。",
"Specify_ECMAScript_target_version_Colon_ES3_default_ES5_ES2015_ES2016_ES2017_ES2018_ES2019_ES2020_or_6015": "ECMAScript のターゲット バージョンを指定します'ES3' (既定値)、'ES5'、'ES2015'、'ES2016'、'ES2017'、'ES2018'、'ES2019'、'ES2020'、'ESNEXT'",
"Specify_ECMAScript_target_version_Colon_ES3_default_ES5_ES2015_ES2016_ES2017_ES2018_ES2019_ES2020_or_6015": "ECMAScript のターゲット バージョンを指定します: 'ES3' (既定値)、'ES5'、'ES2015'、'ES2016'、'ES2017'、'ES2018'、'ES2019'、'ES2020'、'ESNEXT'",
"Specify_JSX_code_generation_Colon_preserve_react_native_or_react_6080": "JSX コード生成を指定します: 'preserve'、'react-native'、'react'。",
"Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types_1368": "型にのみ使用されるインポートの生成または確認動作を指定する",
"Specify_file_to_store_incremental_compilation_information_6380": "増分コンパイル情報を格納するファイルを指定する",
"Specify_library_files_to_be_included_in_the_compilation_6079": "コンパイルに含めるライブラリ ファイルを指定します。",
"Specify_module_code_generation_Colon_none_commonjs_amd_system_umd_es2015_es2020_or_ESNext_6016": "モジュール コードの生成を指定します'none'、'commonjs'、'amd'、'system'、'umd'、'es2015'、'es2020、'ESNext'。",
"Specify_module_code_generation_Colon_none_commonjs_amd_system_umd_es2015_es2020_or_ESNext_6016": "モジュール コードの生成を指定します: 'none'、'commonjs'、'amd'、'system'、'umd'、'es2015'、'es2020、'ESNext'。",
"Specify_module_resolution_strategy_Colon_node_Node_js_or_classic_TypeScript_pre_1_6_6069": "モジュールの解決方法を指定します: 'node' (Node.js) または 'classic' (TypeScript pre-1.6)。",
"Specify_strategy_for_creating_a_polling_watch_when_it_fails_to_create_using_file_system_events_Colon_6227": "ファイル システムのイベントを使用して作成できなかった場合に、ポーリング監視を作成する方法を指定します'FixedInterval' (既定)、'PriorityInterval'、'DynamicPriority'。",
"Specify_strategy_for_watching_directory_on_platforms_that_don_t_support_recursive_watching_natively__6226": "再帰的な監視をサポートしていないプラットフォーム上のディレクトリを監視する方法を指定します'UseFsEvents' (既定)、'FixedPollingInterval'、'DynamicPriorityPolling'。",
"Specify_strategy_for_watching_file_Colon_FixedPollingInterval_default_PriorityPollingInterval_Dynami_6225": "ファイルの監視方法を指定します'FixedPollingInterval' (既定)、'PriorityPollingInterval'、'DynamicPriorityPolling'、'UseFsEvents'、'UseFsEventsOnParentDirectory'。",
"Specify_strategy_for_creating_a_polling_watch_when_it_fails_to_create_using_file_system_events_Colon_6227": "ファイル システムのイベントを使用して作成できなかった場合に、ポーリング監視を作成する方法を指定します: 'FixedInterval' (既定)、'PriorityInterval'、'DynamicPriority'。",
"Specify_strategy_for_watching_directory_on_platforms_that_don_t_support_recursive_watching_natively__6226": "再帰的な監視をネイティブでサポートしていないプラットフォーム上のディレクトリを監視する方法を指定します: 'UseFsEvents' (既定)、'FixedPollingInterval'、'DynamicPriorityPolling'。",
"Specify_strategy_for_watching_file_Colon_FixedPollingInterval_default_PriorityPollingInterval_Dynami_6225": "ファイルの監視方法を指定します: 'FixedPollingInterval' (既定)、'PriorityPollingInterval'、'DynamicPriorityPolling'、'UseFsEvents'、'UseFsEventsOnParentDirectory'。",
"Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h_6146": "'react' JSX 発行 ('React.createElement' や 'h') などを対象とするときに使用する JSX ファクトリ関数を指定します。",
"Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix_6060": "ファイルの生成時に使用する行シーケンスの末尾を指定します: 'CRLF' (dos) または 'LF' (unix)。",
"Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations_6004": "デバッガーがソースの場所の代わりに TypeScript ファイルを検索する必要のある場所を指定します。",
@ -1035,6 +1035,7 @@
"Symbol_reference_does_not_refer_to_the_global_Symbol_constructor_object_2470": "'Symbol' 参照は、グローバル シンボル コンストラクター オブジェクトを参照しません。",
"Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_supp_6228": "再帰的な監視をネイティブでサポートしていないプラットフォーム上で、同期的にコールバックを呼び出してディレクトリ監視の状態を更新します。",
"Syntax_Colon_0_6023": "構文: {0}",
"Tag_0_expects_at_least_1_arguments_but_the_JSX_factory_2_provides_at_most_3_6229": "Tag '{0}' expects at least '{1}' arguments, but the JSX factory '{2}' provides at most '{3}'.",
"Tagged_template_expressions_are_not_permitted_in_an_optional_chain_1358": "タグ付きテンプレート式は、省略可能なチェーンでは許可されていません。",
"The_0_modifier_can_only_be_used_in_TypeScript_files_8009": "'{0}' 修飾子は TypeScript ファイルでのみ使用できます。",
"The_0_operator_cannot_be_applied_to_type_symbol_2469": "'{0}' 演算子を 'symbol' 型に適用することはできません。",
@ -1072,7 +1073,7 @@
"The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation_2483": "'for...of' ステートメントの左側で型の注釈を使用することはできません。",
"The_left_hand_side_of_a_for_of_statement_may_not_be_an_optional_property_access_2781": "'for...of' ステートメントの左辺には、省略可能なプロパティ アクセスを指定できません。",
"The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access_2487": "'for...of' ステートメントの左側は、変数またはプロパティ アクセスである必要があります。",
"The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2362": "算術演算の左辺には、'any' 型、'number' 型、'bigint' 型または列挙型を指定する必要があります。",
"The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2362": "算術演算の左辺には、'any' 型、'number' 型、'bigint' 型または列挙型を指定する必要があります。",
"The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access_2779": "代入式の左辺には、省略可能なプロパティ アクセスを指定できません。",
"The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access_2364": "代入式の左側は、変数またはプロパティ アクセスである必要があります。",
"The_left_hand_side_of_an_in_expression_must_be_of_type_any_string_number_or_symbol_2360": "'in' 式の左辺の型は 'any'、'string'、'number'、または 'symbol' でなければなりません。",
@ -1084,7 +1085,7 @@
"The_operand_of_a_delete_operator_must_be_a_property_reference_2703": "'delete' 演算子のオペランドはプロパティ参照である必要があります。",
"The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access_2777": "インクリメント演算子またはデクリメント演算子のオペランドには、省略可能なプロパティ アクセスを指定することはできません。",
"The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access_2357": "インクリメントまたはデクリメント演算子のオペランドは、変数またはプロパティ アクセスである必要があります。",
"The_parser_expected_to_find_a_to_match_the_token_here_1007": "パーサーは、'{' トークンに一致する '}' を予期していました。",
"The_parser_expected_to_find_a_to_match_the_token_here_1007": "パーサーは、ここで '{' トークンに一致する '}' を予期していました。",
"The_property_0_cannot_be_accessed_on_type_1_within_this_class_because_it_is_shadowed_by_another_priv_18014": "同じスペルの別の private 識別子によってシャドウされているため、このクラス内の型 '{1}' ではプロパティ '{0}' にアクセスできません。",
"The_return_type_of_a_JSX_element_constructor_must_return_an_object_type_2601": "JSX 要素コンストラクターの戻り値の型は、オブジェクト型を返す必要があります。",
"The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any_1237": "パラメーター デコレーター関数の戻り値の型は、'void' か 'any' である必要があります。",
@ -1092,7 +1093,7 @@
"The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_t_1058": "非同期関数の戻り値の型は、有効な Promise であるか、呼び出し可能な 'then' メンバーを含んでいないかのどちらかであることが必要です。",
"The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_1064": "非同期関数または非同期メソッドの戻り値の型は、グローバル Promise<T> 型である必要があります。",
"The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_2407": "'for...in' ステートメントの右側には、'any' 型、オブジェクト型、型パラメーターを指定する必要がありますが、ここでは型 '{0}' が指定されています。",
"The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2363": "算術演算の右辺には、'any' 型、'number' 型、'bigint' 型または列挙型を指定する必要があります。",
"The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2363": "算術演算の右辺には、'any' 型、'number' 型、'bigint' 型または列挙型を指定する必要があります。",
"The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter_2361": "'in' 式の右辺は、'any' 型、オブジェクト型、型パラメーターでなければなりません。",
"The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_F_2359": "instanceof' 式の右辺には、'any' 型、または 'Function' インターフェイス型に割り当てることができる型を指定してください。",
"The_shadowing_declaration_of_0_is_defined_here_18017": "'{0}' のシャドウ宣言はここで定義されています",
@ -1104,7 +1105,7 @@
"The_this_types_of_each_signature_are_incompatible_2685": "各シグネチャの 'this' 型に互換性がありません。",
"The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1_4104": "型 '{0}' は 'readonly' であるため、変更可能な型 '{1}' に代入することはできません。",
"The_type_argument_for_type_parameter_0_cannot_be_inferred_from_the_usage_Consider_specifying_the_typ_2453": "型パラメーター '{0}' の型引数を使用法から推論することはできません。型引数を明示的に指定してください。",
"The_type_of_a_function_declaration_must_match_the_function_s_signature_8030": "関数宣言の型は、関数のシグネチャと一致する必要があります。",
"The_type_of_a_function_declaration_must_match_the_function_s_signature_8030": "関数宣言の型は、関数のシグネチャと一致する必要があります。",
"The_type_returned_by_the_0_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_pro_2547": "非同期反復子の '{0}()' メソッドによって返される型は、'value' プロパティを持つ型に対する promise である必要があります。",
"The_type_returned_by_the_0_method_of_an_iterator_must_have_a_value_property_2490": "反復子の '{0}()' メソッドによって返される型には 'value' プロパティが必要です。",
"The_types_of_0_are_incompatible_between_these_types_2200": "'{0}' の型は、これらの型同士で互換性がありません。",
@ -1143,8 +1144,8 @@
"Type_0_has_no_construct_signatures_2761": "型 '{0}' にはコンストラクト シグネチャがありません。",
"Type_0_has_no_matching_index_signature_for_type_1_2537": "型 '{0}' には型 '{1}' と一致するインデックス シグネチャがありません。",
"Type_0_has_no_properties_in_common_with_type_1_2559": "型 '{0}' には型 '{1}' と共通のプロパティがありません。",
"Type_0_is_missing_the_following_properties_from_type_1_Colon_2_2739": "型 '{0}' には 型 '{1}': {2} からの次のプロパティがありません",
"Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more_2740": "型 '{0}' には 型 '{1}': {2}、{3} などからの次のプロパティがありません",
"Type_0_is_missing_the_following_properties_from_type_1_Colon_2_2739": "型 '{0}' には 型 '{1}' からの次のプロパティがありません: {2}",
"Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more_2740": "型 '{0}' には 型 '{1}' からの次のプロパティがありません: {2}、{3} など。",
"Type_0_is_not_a_constructor_function_type_2507": "型 '{0}' はコンストラクター関数型ではありません。",
"Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Prom_1055": "型 '{0}' は Promise と互換性のあるコンストラクター値を参照しないため、ES5/ES3 において有効な非同期関数の戻り値の型ではありません。",
"Type_0_is_not_an_array_type_2461": "型 '{0}' は配列型ではありません。",
@ -1180,7 +1181,7 @@
"Type_of_computed_property_s_value_is_0_which_is_not_assignable_to_type_1_2418": "計算されたプロパティの値の型は '{0}' です。これは、型 '{1}' に代入することはできません。",
"Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_con_1322": "'yield*' オペランドの反復要素の型は、有効な Promise であるか、呼び出し可能な 'then' メンバーを含んでいないかのどちらかであることが必要です。",
"Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_cal_1321": "非同期ジェネレーター内の 'yield' オペランドの型は、有効な Promise であるか、呼び出し可能な 'then' メンバーを含んでいないかのどちらかであることが必要です。",
"Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cau_7038": "型はこのインポートから生成されます。名前空間スタイルのインポートは、呼び出すこともコンストラクトすることもできず、実行時にエラーが発生します。代わりに、既定のインポートまたはインポートの要求を使用することを検討してください。",
"Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cau_7038": "型はこのインポート生成されます。名前空間スタイルのインポートは、呼び出すこともコンストラクトすることもできず、実行時にエラーが発生します。代わりに、ここで既定のインポートまたはインポートの要求を使用することを検討してください。",
"Type_parameter_0_has_a_circular_constraint_2313": "型パラメーター '{0}' に循環制約があります。",
"Type_parameter_0_has_a_circular_default_2716": "型パラメーター '{0}' に循環既定値があります。",
"Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1_4008": "エクスポートされたインターフェイスの呼び出しシグネチャの型パラメーター '{0}' が、プライベート名 '{1}' を持っているか、使用しています。",
@ -1325,7 +1326,7 @@
"const_declarations_must_be_initialized_1155": "'const' 宣言は初期化する必要があります。",
"const_enum_member_initializer_was_evaluated_to_a_non_finite_value_2477": "'const' 列挙型メンバーの初期化子が、無限値に評価されました。",
"const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN_2478": "'const' 列挙型メンバーの初期化子が、許可されない値 'NaN' に評価されました。",
"const_enum_member_initializers_can_only_contain_literal_values_and_other_computed_enum_values_2474": "定数列挙型メンバーの初期化子には、リテラル値および他の計算された列挙型の値のみを含めることができます。",
"const_enum_member_initializers_can_only_contain_literal_values_and_other_computed_enum_values_2474": "const 列挙型メンバーの初期化子には、リテラル値および他の計算された列挙型の値のみを含めることができます。",
"const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_im_2475": "'const' 列挙型は、プロパティまたはインデックスのアクセス式、インポート宣言またはエクスポートの代入の右辺、型のクエリにのみ使用できます。",
"constructor_is_a_reserved_word_18012": "'#constructor' は予約語です。",
"delete_cannot_be_called_on_an_identifier_in_strict_mode_1102": "厳格モードでは 'delete' を識別子で呼び出すことはできません。",

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -4413,6 +4413,7 @@ var ts;
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'."),
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 `&rbrace;`?"),
Unexpected_token_Did_you_mean_or_gt: diag(1382, ts.DiagnosticCategory.Error, "Unexpected_token_Did_you_mean_or_gt_1382", "Unexpected token. Did you mean `{'>'}` or `&gt;`?"),
Only_named_exports_may_use_export_type: diag(1383, ts.DiagnosticCategory.Error, "Only_named_exports_may_use_export_type_1383", "Only named exports may use 'export type'."),
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."),
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."),
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),
@ -14747,6 +14748,10 @@ var ts;
|| !isExpressionNode(useSite);
}
ts.isValidTypeOnlyAliasUseSite = isValidTypeOnlyAliasUseSite;
function typeOnlyDeclarationIsExport(typeOnlyDeclaration) {
return typeOnlyDeclaration.kind === 263;
}
ts.typeOnlyDeclarationIsExport = typeOnlyDeclarationIsExport;
function isPartOfPossiblyValidTypeOrAbstractComputedPropertyName(node) {
while (node.kind === 75 || node.kind === 194) {
node = node.parent;
@ -29486,10 +29491,11 @@ var ts;
if (!ts.isValidTypeOnlyAliasUseSite(useSite)) {
var typeOnlyDeclaration = getTypeOnlyAliasDeclaration(symbol);
if (typeOnlyDeclaration) {
var message = typeOnlyDeclaration.kind === 263
var isExport = ts.typeOnlyDeclarationIsExport(typeOnlyDeclaration);
var message = isExport
? ts.Diagnostics._0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type
: ts.Diagnostics._0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type;
var relatedMessage = typeOnlyDeclaration.kind === 263
var relatedMessage = isExport
? ts.Diagnostics._0_was_exported_here
: ts.Diagnostics._0_was_imported_here;
var unescapedName = ts.unescapeLeadingUnderscores(name);
@ -29761,10 +29767,11 @@ var ts;
function checkAndReportErrorForResolvingImportAliasToTypeOnlySymbol(node, resolved) {
if (markSymbolOfAliasDeclarationIfTypeOnly(node, undefined, resolved, false)) {
var typeOnlyDeclaration = getTypeOnlyAliasDeclaration(getSymbolOfNode(node));
var message = typeOnlyDeclaration.kind === 263
var isExport = ts.typeOnlyDeclarationIsExport(typeOnlyDeclaration);
var message = isExport
? ts.Diagnostics.An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type
: ts.Diagnostics.An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type;
var relatedMessage = typeOnlyDeclaration.kind === 263
var relatedMessage = isExport
? ts.Diagnostics._0_was_exported_here
: ts.Diagnostics._0_was_imported_here;
var name = ts.unescapeLeadingUnderscores(typeOnlyDeclaration.name.escapedText);
@ -54422,6 +54429,7 @@ var ts;
if (node.moduleSpecifier && node.exportClause && ts.isNamedExports(node.exportClause) && ts.length(node.exportClause.elements) && languageVersion === 0) {
checkExternalEmitHelpers(node, 1048576);
}
checkGrammarExportDeclaration(node);
if (!node.moduleSpecifier || checkExternalImportOrExportDeclaration(node)) {
if (node.exportClause) {
if (ts.isNamedExports(node.exportClause)) {
@ -54448,6 +54456,14 @@ var ts;
}
}
}
function checkGrammarExportDeclaration(node) {
var _a;
var isTypeOnlyExportStar = node.isTypeOnly && ((_a = node.exportClause) === null || _a === void 0 ? void 0 : _a.kind) !== 261;
if (isTypeOnlyExportStar) {
grammarErrorOnNode(node, ts.Diagnostics.Only_named_exports_may_use_export_type);
}
return !isTypeOnlyExportStar;
}
function checkGrammarModuleElementContext(node, errorMessage) {
var isInAppropriateContext = node.parent.kind === 290 || node.parent.kind === 250 || node.parent.kind === 249;
if (!isInAppropriateContext) {
@ -61113,7 +61129,7 @@ var ts;
var setter = ts.createPropertyAssignment("set", setterFunction);
properties_5.push(setter);
}
properties_5.push(ts.createPropertyAssignment("enumerable", ts.createTrue()));
properties_5.push(ts.createPropertyAssignment("enumerable", getAccessor || setAccessor ? ts.createFalse() : ts.createTrue()));
properties_5.push(ts.createPropertyAssignment("configurable", ts.createTrue()));
var expression = ts.setTextRange(ts.createCall(ts.createPropertyAccess(ts.createIdentifier("Object"), "defineProperty"), undefined, [
receiver,
@ -69006,7 +69022,7 @@ var ts;
ts.setCommentRange(setter, ts.getCommentRange(setAccessor));
properties.push(setter);
}
properties.push(ts.createPropertyAssignment("enumerable", ts.createTrue()), ts.createPropertyAssignment("configurable", ts.createTrue()));
properties.push(ts.createPropertyAssignment("enumerable", getAccessor || setAccessor ? ts.createFalse() : ts.createTrue()), ts.createPropertyAssignment("configurable", ts.createTrue()));
var call = ts.createCall(ts.createPropertyAccess(ts.createIdentifier("Object"), "defineProperty"), undefined, [
target,
propertyName,
@ -72048,6 +72064,9 @@ var ts;
if (shouldEmitUnderscoreUnderscoreESModule()) {
ts.append(statements, createUnderscoreUnderscoreESModule());
}
if (ts.length(currentModuleInfo.exportedNames)) {
ts.append(statements, ts.createExpressionStatement(ts.reduceLeft(currentModuleInfo.exportedNames, function (prev, nextId) { return ts.createAssignment(ts.createPropertyAccess(ts.createIdentifier("exports"), ts.createIdentifier(ts.idText(nextId))), prev); }, ts.createVoidZero())));
}
ts.append(statements, ts.visitNode(currentModuleInfo.externalHelpersImportDeclaration, sourceElementVisitor, ts.isStatement));
ts.addRange(statements, ts.visitNodes(node.statements, sourceElementVisitor, ts.isStatement, statementOffset));
addExportEqualsIfNeeded(statements, false);
@ -72160,6 +72179,9 @@ var ts;
if (shouldEmitUnderscoreUnderscoreESModule()) {
ts.append(statements, createUnderscoreUnderscoreESModule());
}
if (ts.length(currentModuleInfo.exportedNames)) {
ts.append(statements, ts.createExpressionStatement(ts.reduceLeft(currentModuleInfo.exportedNames, function (prev, nextId) { return ts.createAssignment(ts.createPropertyAccess(ts.createIdentifier("exports"), ts.createIdentifier(ts.idText(nextId))), prev); }, ts.createVoidZero())));
}
ts.append(statements, ts.visitNode(currentModuleInfo.externalHelpersImportDeclaration, sourceElementVisitor, ts.isStatement));
if (moduleKind === ts.ModuleKind.AMD) {
ts.addRange(statements, ts.mapDefined(currentModuleInfo.externalImports, getAMDImportExpressionForImport));
@ -72544,7 +72566,7 @@ var ts;
}
variables = ts.append(variables, variable);
}
else {
else if (variable.initializer) {
expressions = ts.append(expressions, transformInitializedVariable(variable));
}
}

View file

@ -6886,6 +6886,7 @@ var ts;
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'."),
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 `&rbrace;`?"),
Unexpected_token_Did_you_mean_or_gt: diag(1382, ts.DiagnosticCategory.Error, "Unexpected_token_Did_you_mean_or_gt_1382", "Unexpected token. Did you mean `{'>'}` or `&gt;`?"),
Only_named_exports_may_use_export_type: diag(1383, ts.DiagnosticCategory.Error, "Only_named_exports_may_use_export_type_1383", "Only named exports may use 'export type'."),
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."),
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."),
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.", /*reportsUnnecessary*/ undefined, /*elidedInCompatabilityPyramid*/ true),
@ -18416,6 +18417,10 @@ var ts;
|| !isExpressionNode(useSite);
}
ts.isValidTypeOnlyAliasUseSite = isValidTypeOnlyAliasUseSite;
function typeOnlyDeclarationIsExport(typeOnlyDeclaration) {
return typeOnlyDeclaration.kind === 263 /* ExportSpecifier */;
}
ts.typeOnlyDeclarationIsExport = typeOnlyDeclarationIsExport;
function isPartOfPossiblyValidTypeOrAbstractComputedPropertyName(node) {
while (node.kind === 75 /* Identifier */ || node.kind === 194 /* PropertyAccessExpression */) {
node = node.parent;
@ -36019,10 +36024,11 @@ var ts;
if (!ts.isValidTypeOnlyAliasUseSite(useSite)) {
var typeOnlyDeclaration = getTypeOnlyAliasDeclaration(symbol);
if (typeOnlyDeclaration) {
var message = typeOnlyDeclaration.kind === 263 /* ExportSpecifier */
var isExport = ts.typeOnlyDeclarationIsExport(typeOnlyDeclaration);
var message = isExport
? ts.Diagnostics._0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type
: ts.Diagnostics._0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type;
var relatedMessage = typeOnlyDeclaration.kind === 263 /* ExportSpecifier */
var relatedMessage = isExport
? ts.Diagnostics._0_was_exported_here
: ts.Diagnostics._0_was_imported_here;
var unescapedName = ts.unescapeLeadingUnderscores(name);
@ -36324,10 +36330,11 @@ var ts;
function checkAndReportErrorForResolvingImportAliasToTypeOnlySymbol(node, resolved) {
if (markSymbolOfAliasDeclarationIfTypeOnly(node, /*immediateTarget*/ undefined, resolved, /*overwriteEmpty*/ false)) {
var typeOnlyDeclaration = getTypeOnlyAliasDeclaration(getSymbolOfNode(node));
var message = typeOnlyDeclaration.kind === 263 /* ExportSpecifier */
var isExport = ts.typeOnlyDeclarationIsExport(typeOnlyDeclaration);
var message = isExport
? ts.Diagnostics.An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type
: ts.Diagnostics.An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type;
var relatedMessage = typeOnlyDeclaration.kind === 263 /* ExportSpecifier */
var relatedMessage = isExport
? ts.Diagnostics._0_was_exported_here
: ts.Diagnostics._0_was_imported_here;
// Non-null assertion is safe because the optionality comes from ImportClause,
@ -64970,6 +64977,7 @@ var ts;
if (node.moduleSpecifier && node.exportClause && ts.isNamedExports(node.exportClause) && ts.length(node.exportClause.elements) && languageVersion === 0 /* ES3 */) {
checkExternalEmitHelpers(node, 1048576 /* CreateBinding */);
}
checkGrammarExportDeclaration(node);
if (!node.moduleSpecifier || checkExternalImportOrExportDeclaration(node)) {
if (node.exportClause) {
// export { x, y }
@ -64999,6 +65007,14 @@ var ts;
}
}
}
function checkGrammarExportDeclaration(node) {
var _a;
var isTypeOnlyExportStar = node.isTypeOnly && ((_a = node.exportClause) === null || _a === void 0 ? void 0 : _a.kind) !== 261 /* NamedExports */;
if (isTypeOnlyExportStar) {
grammarErrorOnNode(node, ts.Diagnostics.Only_named_exports_may_use_export_type);
}
return !isTypeOnlyExportStar;
}
function checkGrammarModuleElementContext(node, errorMessage) {
var isInAppropriateContext = node.parent.kind === 290 /* SourceFile */ || node.parent.kind === 250 /* ModuleBlock */ || node.parent.kind === 249 /* ModuleDeclaration */;
if (!isInAppropriateContext) {
@ -72217,7 +72233,7 @@ var ts;
var setter = ts.createPropertyAssignment("set", setterFunction);
properties_5.push(setter);
}
properties_5.push(ts.createPropertyAssignment("enumerable", ts.createTrue()));
properties_5.push(ts.createPropertyAssignment("enumerable", getAccessor || setAccessor ? ts.createFalse() : ts.createTrue()));
properties_5.push(ts.createPropertyAssignment("configurable", ts.createTrue()));
var expression = ts.setTextRange(ts.createCall(ts.createPropertyAccess(ts.createIdentifier("Object"), "defineProperty"),
/*typeArguments*/ undefined, [
@ -82813,7 +82829,7 @@ var ts;
ts.setCommentRange(setter, ts.getCommentRange(setAccessor));
properties.push(setter);
}
properties.push(ts.createPropertyAssignment("enumerable", ts.createTrue()), ts.createPropertyAssignment("configurable", ts.createTrue()));
properties.push(ts.createPropertyAssignment("enumerable", getAccessor || setAccessor ? ts.createFalse() : ts.createTrue()), ts.createPropertyAssignment("configurable", ts.createTrue()));
var call = ts.createCall(ts.createPropertyAccess(ts.createIdentifier("Object"), "defineProperty"),
/*typeArguments*/ undefined, [
target,
@ -87606,6 +87622,9 @@ var ts;
if (shouldEmitUnderscoreUnderscoreESModule()) {
ts.append(statements, createUnderscoreUnderscoreESModule());
}
if (ts.length(currentModuleInfo.exportedNames)) {
ts.append(statements, ts.createExpressionStatement(ts.reduceLeft(currentModuleInfo.exportedNames, function (prev, nextId) { return ts.createAssignment(ts.createPropertyAccess(ts.createIdentifier("exports"), ts.createIdentifier(ts.idText(nextId))), prev); }, ts.createVoidZero())));
}
ts.append(statements, ts.visitNode(currentModuleInfo.externalHelpersImportDeclaration, sourceElementVisitor, ts.isStatement));
ts.addRange(statements, ts.visitNodes(node.statements, sourceElementVisitor, ts.isStatement, statementOffset));
addExportEqualsIfNeeded(statements, /*emitAsReturn*/ false);
@ -87820,6 +87839,9 @@ var ts;
if (shouldEmitUnderscoreUnderscoreESModule()) {
ts.append(statements, createUnderscoreUnderscoreESModule());
}
if (ts.length(currentModuleInfo.exportedNames)) {
ts.append(statements, ts.createExpressionStatement(ts.reduceLeft(currentModuleInfo.exportedNames, function (prev, nextId) { return ts.createAssignment(ts.createPropertyAccess(ts.createIdentifier("exports"), ts.createIdentifier(ts.idText(nextId))), prev); }, ts.createVoidZero())));
}
// Visit each statement of the module body.
ts.append(statements, ts.visitNode(currentModuleInfo.externalHelpersImportDeclaration, sourceElementVisitor, ts.isStatement));
if (moduleKind === ts.ModuleKind.AMD) {
@ -88365,7 +88387,7 @@ var ts;
}
variables = ts.append(variables, variable);
}
else {
else if (variable.initializer) {
expressions = ts.append(expressions, transformInitializedVariable(variable));
}
}
@ -114067,20 +114089,22 @@ var ts;
};
}
});
for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
var decl = _a[_i];
switch (decl.kind) {
case 290 /* SourceFile */:
// Don't include the source file itself. (This may not be ideal behavior, but awkward to include an entire file as a reference.)
break;
case 249 /* ModuleDeclaration */:
if (sourceFilesSet.has(decl.getSourceFile().fileName)) {
references.push(nodeEntry(decl.name));
}
break;
default:
// This may be merged with something.
ts.Debug.assert(!!(symbol.flags & 33554432 /* Transient */), "Expected a module symbol to be declared by a SourceFile or ModuleDeclaration.");
if (symbol.declarations) {
for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
var decl = _a[_i];
switch (decl.kind) {
case 290 /* SourceFile */:
// Don't include the source file itself. (This may not be ideal behavior, but awkward to include an entire file as a reference.)
break;
case 249 /* ModuleDeclaration */:
if (sourceFilesSet.has(decl.getSourceFile().fileName)) {
references.push(nodeEntry(decl.name));
}
break;
default:
// This may be merged with something.
ts.Debug.assert(!!(symbol.flags & 33554432 /* Transient */), "Expected a module symbol to be declared by a SourceFile or ModuleDeclaration.");
}
}
}
var exported = symbol.exports.get("export=" /* ExportEquals */);
@ -114388,6 +114412,8 @@ var ts;
}
// Go to the symbol we imported from and find references for it.
function searchForImportedSymbol(symbol, state) {
if (!symbol.declarations)
return;
for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
var declaration = _a[_i];
var exportingFile = declaration.getSourceFile();
@ -114823,7 +114849,7 @@ var ts;
*/
function findOwnConstructorReferences(classSymbol, sourceFile, addNode) {
var constructorSymbol = getClassConstructorSymbol(classSymbol);
if (constructorSymbol) {
if (constructorSymbol && constructorSymbol.declarations) {
for (var _i = 0, _a = constructorSymbol.declarations; _i < _a.length; _i++) {
var decl = _a[_i];
var ctrKeyword = ts.findChildOfKind(decl, 129 /* ConstructorKeyword */, sourceFile);
@ -114853,7 +114879,7 @@ var ts;
/** Find references to `super` in the constructor of an extending class. */
function findSuperConstructorAccesses(classDeclaration, addNode) {
var constructor = getClassConstructorSymbol(classDeclaration.symbol);
if (!constructor) {
if (!(constructor && constructor.declarations)) {
return;
}
for (var _i = 0, _a = constructor.declarations; _i < _a.length; _i++) {
@ -114978,7 +115004,7 @@ var ts;
}
// Set the key so that we don't infinitely recurse
cachedResults.set(key, false);
var inherits = symbol.declarations.some(function (declaration) {
var inherits = !!symbol.declarations && symbol.declarations.some(function (declaration) {
return ts.getAllSuperTypeNodes(declaration).some(function (typeReference) {
var type = checker.getTypeAtLocation(typeReference);
return !!type && !!type.symbol && explicitlyInheritsFrom(type.symbol, parent, cachedResults, checker);

View file

@ -7036,6 +7036,7 @@ var ts;
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'."),
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 `&rbrace;`?"),
Unexpected_token_Did_you_mean_or_gt: diag(1382, ts.DiagnosticCategory.Error, "Unexpected_token_Did_you_mean_or_gt_1382", "Unexpected token. Did you mean `{'>'}` or `&gt;`?"),
Only_named_exports_may_use_export_type: diag(1383, ts.DiagnosticCategory.Error, "Only_named_exports_may_use_export_type_1383", "Only named exports may use 'export type'."),
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."),
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."),
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.", /*reportsUnnecessary*/ undefined, /*elidedInCompatabilityPyramid*/ true),
@ -18566,6 +18567,10 @@ var ts;
|| !isExpressionNode(useSite);
}
ts.isValidTypeOnlyAliasUseSite = isValidTypeOnlyAliasUseSite;
function typeOnlyDeclarationIsExport(typeOnlyDeclaration) {
return typeOnlyDeclaration.kind === 263 /* ExportSpecifier */;
}
ts.typeOnlyDeclarationIsExport = typeOnlyDeclarationIsExport;
function isPartOfPossiblyValidTypeOrAbstractComputedPropertyName(node) {
while (node.kind === 75 /* Identifier */ || node.kind === 194 /* PropertyAccessExpression */) {
node = node.parent;
@ -36169,10 +36174,11 @@ var ts;
if (!ts.isValidTypeOnlyAliasUseSite(useSite)) {
var typeOnlyDeclaration = getTypeOnlyAliasDeclaration(symbol);
if (typeOnlyDeclaration) {
var message = typeOnlyDeclaration.kind === 263 /* ExportSpecifier */
var isExport = ts.typeOnlyDeclarationIsExport(typeOnlyDeclaration);
var message = isExport
? ts.Diagnostics._0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type
: ts.Diagnostics._0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type;
var relatedMessage = typeOnlyDeclaration.kind === 263 /* ExportSpecifier */
var relatedMessage = isExport
? ts.Diagnostics._0_was_exported_here
: ts.Diagnostics._0_was_imported_here;
var unescapedName = ts.unescapeLeadingUnderscores(name);
@ -36474,10 +36480,11 @@ var ts;
function checkAndReportErrorForResolvingImportAliasToTypeOnlySymbol(node, resolved) {
if (markSymbolOfAliasDeclarationIfTypeOnly(node, /*immediateTarget*/ undefined, resolved, /*overwriteEmpty*/ false)) {
var typeOnlyDeclaration = getTypeOnlyAliasDeclaration(getSymbolOfNode(node));
var message = typeOnlyDeclaration.kind === 263 /* ExportSpecifier */
var isExport = ts.typeOnlyDeclarationIsExport(typeOnlyDeclaration);
var message = isExport
? ts.Diagnostics.An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type
: ts.Diagnostics.An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type;
var relatedMessage = typeOnlyDeclaration.kind === 263 /* ExportSpecifier */
var relatedMessage = isExport
? ts.Diagnostics._0_was_exported_here
: ts.Diagnostics._0_was_imported_here;
// Non-null assertion is safe because the optionality comes from ImportClause,
@ -65120,6 +65127,7 @@ var ts;
if (node.moduleSpecifier && node.exportClause && ts.isNamedExports(node.exportClause) && ts.length(node.exportClause.elements) && languageVersion === 0 /* ES3 */) {
checkExternalEmitHelpers(node, 1048576 /* CreateBinding */);
}
checkGrammarExportDeclaration(node);
if (!node.moduleSpecifier || checkExternalImportOrExportDeclaration(node)) {
if (node.exportClause) {
// export { x, y }
@ -65149,6 +65157,14 @@ var ts;
}
}
}
function checkGrammarExportDeclaration(node) {
var _a;
var isTypeOnlyExportStar = node.isTypeOnly && ((_a = node.exportClause) === null || _a === void 0 ? void 0 : _a.kind) !== 261 /* NamedExports */;
if (isTypeOnlyExportStar) {
grammarErrorOnNode(node, ts.Diagnostics.Only_named_exports_may_use_export_type);
}
return !isTypeOnlyExportStar;
}
function checkGrammarModuleElementContext(node, errorMessage) {
var isInAppropriateContext = node.parent.kind === 290 /* SourceFile */ || node.parent.kind === 250 /* ModuleBlock */ || node.parent.kind === 249 /* ModuleDeclaration */;
if (!isInAppropriateContext) {
@ -72367,7 +72383,7 @@ var ts;
var setter = ts.createPropertyAssignment("set", setterFunction);
properties_5.push(setter);
}
properties_5.push(ts.createPropertyAssignment("enumerable", ts.createTrue()));
properties_5.push(ts.createPropertyAssignment("enumerable", getAccessor || setAccessor ? ts.createFalse() : ts.createTrue()));
properties_5.push(ts.createPropertyAssignment("configurable", ts.createTrue()));
var expression = ts.setTextRange(ts.createCall(ts.createPropertyAccess(ts.createIdentifier("Object"), "defineProperty"),
/*typeArguments*/ undefined, [
@ -82963,7 +82979,7 @@ var ts;
ts.setCommentRange(setter, ts.getCommentRange(setAccessor));
properties.push(setter);
}
properties.push(ts.createPropertyAssignment("enumerable", ts.createTrue()), ts.createPropertyAssignment("configurable", ts.createTrue()));
properties.push(ts.createPropertyAssignment("enumerable", getAccessor || setAccessor ? ts.createFalse() : ts.createTrue()), ts.createPropertyAssignment("configurable", ts.createTrue()));
var call = ts.createCall(ts.createPropertyAccess(ts.createIdentifier("Object"), "defineProperty"),
/*typeArguments*/ undefined, [
target,
@ -87756,6 +87772,9 @@ var ts;
if (shouldEmitUnderscoreUnderscoreESModule()) {
ts.append(statements, createUnderscoreUnderscoreESModule());
}
if (ts.length(currentModuleInfo.exportedNames)) {
ts.append(statements, ts.createExpressionStatement(ts.reduceLeft(currentModuleInfo.exportedNames, function (prev, nextId) { return ts.createAssignment(ts.createPropertyAccess(ts.createIdentifier("exports"), ts.createIdentifier(ts.idText(nextId))), prev); }, ts.createVoidZero())));
}
ts.append(statements, ts.visitNode(currentModuleInfo.externalHelpersImportDeclaration, sourceElementVisitor, ts.isStatement));
ts.addRange(statements, ts.visitNodes(node.statements, sourceElementVisitor, ts.isStatement, statementOffset));
addExportEqualsIfNeeded(statements, /*emitAsReturn*/ false);
@ -87970,6 +87989,9 @@ var ts;
if (shouldEmitUnderscoreUnderscoreESModule()) {
ts.append(statements, createUnderscoreUnderscoreESModule());
}
if (ts.length(currentModuleInfo.exportedNames)) {
ts.append(statements, ts.createExpressionStatement(ts.reduceLeft(currentModuleInfo.exportedNames, function (prev, nextId) { return ts.createAssignment(ts.createPropertyAccess(ts.createIdentifier("exports"), ts.createIdentifier(ts.idText(nextId))), prev); }, ts.createVoidZero())));
}
// Visit each statement of the module body.
ts.append(statements, ts.visitNode(currentModuleInfo.externalHelpersImportDeclaration, sourceElementVisitor, ts.isStatement));
if (moduleKind === ts.ModuleKind.AMD) {
@ -88515,7 +88537,7 @@ var ts;
}
variables = ts.append(variables, variable);
}
else {
else if (variable.initializer) {
expressions = ts.append(expressions, transformInitializedVariable(variable));
}
}
@ -114590,20 +114612,22 @@ var ts;
};
}
});
for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
var decl = _a[_i];
switch (decl.kind) {
case 290 /* SourceFile */:
// Don't include the source file itself. (This may not be ideal behavior, but awkward to include an entire file as a reference.)
break;
case 249 /* ModuleDeclaration */:
if (sourceFilesSet.has(decl.getSourceFile().fileName)) {
references.push(nodeEntry(decl.name));
}
break;
default:
// This may be merged with something.
ts.Debug.assert(!!(symbol.flags & 33554432 /* Transient */), "Expected a module symbol to be declared by a SourceFile or ModuleDeclaration.");
if (symbol.declarations) {
for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
var decl = _a[_i];
switch (decl.kind) {
case 290 /* SourceFile */:
// Don't include the source file itself. (This may not be ideal behavior, but awkward to include an entire file as a reference.)
break;
case 249 /* ModuleDeclaration */:
if (sourceFilesSet.has(decl.getSourceFile().fileName)) {
references.push(nodeEntry(decl.name));
}
break;
default:
// This may be merged with something.
ts.Debug.assert(!!(symbol.flags & 33554432 /* Transient */), "Expected a module symbol to be declared by a SourceFile or ModuleDeclaration.");
}
}
}
var exported = symbol.exports.get("export=" /* ExportEquals */);
@ -114911,6 +114935,8 @@ var ts;
}
// Go to the symbol we imported from and find references for it.
function searchForImportedSymbol(symbol, state) {
if (!symbol.declarations)
return;
for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
var declaration = _a[_i];
var exportingFile = declaration.getSourceFile();
@ -115346,7 +115372,7 @@ var ts;
*/
function findOwnConstructorReferences(classSymbol, sourceFile, addNode) {
var constructorSymbol = getClassConstructorSymbol(classSymbol);
if (constructorSymbol) {
if (constructorSymbol && constructorSymbol.declarations) {
for (var _i = 0, _a = constructorSymbol.declarations; _i < _a.length; _i++) {
var decl = _a[_i];
var ctrKeyword = ts.findChildOfKind(decl, 129 /* ConstructorKeyword */, sourceFile);
@ -115376,7 +115402,7 @@ var ts;
/** Find references to `super` in the constructor of an extending class. */
function findSuperConstructorAccesses(classDeclaration, addNode) {
var constructor = getClassConstructorSymbol(classDeclaration.symbol);
if (!constructor) {
if (!(constructor && constructor.declarations)) {
return;
}
for (var _i = 0, _a = constructor.declarations; _i < _a.length; _i++) {
@ -115501,7 +115527,7 @@ var ts;
}
// Set the key so that we don't infinitely recurse
cachedResults.set(key, false);
var inherits = symbol.declarations.some(function (declaration) {
var inherits = !!symbol.declarations && symbol.declarations.some(function (declaration) {
return ts.getAllSuperTypeNodes(declaration).some(function (typeReference) {
var type = checker.getTypeAtLocation(typeReference);
return !!type && !!type.symbol && explicitlyInheritsFrom(type.symbol, parent, cachedResults, checker);

View file

@ -7036,6 +7036,7 @@ var ts;
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'."),
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 `&rbrace;`?"),
Unexpected_token_Did_you_mean_or_gt: diag(1382, ts.DiagnosticCategory.Error, "Unexpected_token_Did_you_mean_or_gt_1382", "Unexpected token. Did you mean `{'>'}` or `&gt;`?"),
Only_named_exports_may_use_export_type: diag(1383, ts.DiagnosticCategory.Error, "Only_named_exports_may_use_export_type_1383", "Only named exports may use 'export type'."),
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."),
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."),
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.", /*reportsUnnecessary*/ undefined, /*elidedInCompatabilityPyramid*/ true),
@ -18566,6 +18567,10 @@ var ts;
|| !isExpressionNode(useSite);
}
ts.isValidTypeOnlyAliasUseSite = isValidTypeOnlyAliasUseSite;
function typeOnlyDeclarationIsExport(typeOnlyDeclaration) {
return typeOnlyDeclaration.kind === 263 /* ExportSpecifier */;
}
ts.typeOnlyDeclarationIsExport = typeOnlyDeclarationIsExport;
function isPartOfPossiblyValidTypeOrAbstractComputedPropertyName(node) {
while (node.kind === 75 /* Identifier */ || node.kind === 194 /* PropertyAccessExpression */) {
node = node.parent;
@ -36169,10 +36174,11 @@ var ts;
if (!ts.isValidTypeOnlyAliasUseSite(useSite)) {
var typeOnlyDeclaration = getTypeOnlyAliasDeclaration(symbol);
if (typeOnlyDeclaration) {
var message = typeOnlyDeclaration.kind === 263 /* ExportSpecifier */
var isExport = ts.typeOnlyDeclarationIsExport(typeOnlyDeclaration);
var message = isExport
? ts.Diagnostics._0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type
: ts.Diagnostics._0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type;
var relatedMessage = typeOnlyDeclaration.kind === 263 /* ExportSpecifier */
var relatedMessage = isExport
? ts.Diagnostics._0_was_exported_here
: ts.Diagnostics._0_was_imported_here;
var unescapedName = ts.unescapeLeadingUnderscores(name);
@ -36474,10 +36480,11 @@ var ts;
function checkAndReportErrorForResolvingImportAliasToTypeOnlySymbol(node, resolved) {
if (markSymbolOfAliasDeclarationIfTypeOnly(node, /*immediateTarget*/ undefined, resolved, /*overwriteEmpty*/ false)) {
var typeOnlyDeclaration = getTypeOnlyAliasDeclaration(getSymbolOfNode(node));
var message = typeOnlyDeclaration.kind === 263 /* ExportSpecifier */
var isExport = ts.typeOnlyDeclarationIsExport(typeOnlyDeclaration);
var message = isExport
? ts.Diagnostics.An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type
: ts.Diagnostics.An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type;
var relatedMessage = typeOnlyDeclaration.kind === 263 /* ExportSpecifier */
var relatedMessage = isExport
? ts.Diagnostics._0_was_exported_here
: ts.Diagnostics._0_was_imported_here;
// Non-null assertion is safe because the optionality comes from ImportClause,
@ -65120,6 +65127,7 @@ var ts;
if (node.moduleSpecifier && node.exportClause && ts.isNamedExports(node.exportClause) && ts.length(node.exportClause.elements) && languageVersion === 0 /* ES3 */) {
checkExternalEmitHelpers(node, 1048576 /* CreateBinding */);
}
checkGrammarExportDeclaration(node);
if (!node.moduleSpecifier || checkExternalImportOrExportDeclaration(node)) {
if (node.exportClause) {
// export { x, y }
@ -65149,6 +65157,14 @@ var ts;
}
}
}
function checkGrammarExportDeclaration(node) {
var _a;
var isTypeOnlyExportStar = node.isTypeOnly && ((_a = node.exportClause) === null || _a === void 0 ? void 0 : _a.kind) !== 261 /* NamedExports */;
if (isTypeOnlyExportStar) {
grammarErrorOnNode(node, ts.Diagnostics.Only_named_exports_may_use_export_type);
}
return !isTypeOnlyExportStar;
}
function checkGrammarModuleElementContext(node, errorMessage) {
var isInAppropriateContext = node.parent.kind === 290 /* SourceFile */ || node.parent.kind === 250 /* ModuleBlock */ || node.parent.kind === 249 /* ModuleDeclaration */;
if (!isInAppropriateContext) {
@ -72367,7 +72383,7 @@ var ts;
var setter = ts.createPropertyAssignment("set", setterFunction);
properties_5.push(setter);
}
properties_5.push(ts.createPropertyAssignment("enumerable", ts.createTrue()));
properties_5.push(ts.createPropertyAssignment("enumerable", getAccessor || setAccessor ? ts.createFalse() : ts.createTrue()));
properties_5.push(ts.createPropertyAssignment("configurable", ts.createTrue()));
var expression = ts.setTextRange(ts.createCall(ts.createPropertyAccess(ts.createIdentifier("Object"), "defineProperty"),
/*typeArguments*/ undefined, [
@ -82963,7 +82979,7 @@ var ts;
ts.setCommentRange(setter, ts.getCommentRange(setAccessor));
properties.push(setter);
}
properties.push(ts.createPropertyAssignment("enumerable", ts.createTrue()), ts.createPropertyAssignment("configurable", ts.createTrue()));
properties.push(ts.createPropertyAssignment("enumerable", getAccessor || setAccessor ? ts.createFalse() : ts.createTrue()), ts.createPropertyAssignment("configurable", ts.createTrue()));
var call = ts.createCall(ts.createPropertyAccess(ts.createIdentifier("Object"), "defineProperty"),
/*typeArguments*/ undefined, [
target,
@ -87756,6 +87772,9 @@ var ts;
if (shouldEmitUnderscoreUnderscoreESModule()) {
ts.append(statements, createUnderscoreUnderscoreESModule());
}
if (ts.length(currentModuleInfo.exportedNames)) {
ts.append(statements, ts.createExpressionStatement(ts.reduceLeft(currentModuleInfo.exportedNames, function (prev, nextId) { return ts.createAssignment(ts.createPropertyAccess(ts.createIdentifier("exports"), ts.createIdentifier(ts.idText(nextId))), prev); }, ts.createVoidZero())));
}
ts.append(statements, ts.visitNode(currentModuleInfo.externalHelpersImportDeclaration, sourceElementVisitor, ts.isStatement));
ts.addRange(statements, ts.visitNodes(node.statements, sourceElementVisitor, ts.isStatement, statementOffset));
addExportEqualsIfNeeded(statements, /*emitAsReturn*/ false);
@ -87970,6 +87989,9 @@ var ts;
if (shouldEmitUnderscoreUnderscoreESModule()) {
ts.append(statements, createUnderscoreUnderscoreESModule());
}
if (ts.length(currentModuleInfo.exportedNames)) {
ts.append(statements, ts.createExpressionStatement(ts.reduceLeft(currentModuleInfo.exportedNames, function (prev, nextId) { return ts.createAssignment(ts.createPropertyAccess(ts.createIdentifier("exports"), ts.createIdentifier(ts.idText(nextId))), prev); }, ts.createVoidZero())));
}
// Visit each statement of the module body.
ts.append(statements, ts.visitNode(currentModuleInfo.externalHelpersImportDeclaration, sourceElementVisitor, ts.isStatement));
if (moduleKind === ts.ModuleKind.AMD) {
@ -88515,7 +88537,7 @@ var ts;
}
variables = ts.append(variables, variable);
}
else {
else if (variable.initializer) {
expressions = ts.append(expressions, transformInitializedVariable(variable));
}
}
@ -114590,20 +114612,22 @@ var ts;
};
}
});
for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
var decl = _a[_i];
switch (decl.kind) {
case 290 /* SourceFile */:
// Don't include the source file itself. (This may not be ideal behavior, but awkward to include an entire file as a reference.)
break;
case 249 /* ModuleDeclaration */:
if (sourceFilesSet.has(decl.getSourceFile().fileName)) {
references.push(nodeEntry(decl.name));
}
break;
default:
// This may be merged with something.
ts.Debug.assert(!!(symbol.flags & 33554432 /* Transient */), "Expected a module symbol to be declared by a SourceFile or ModuleDeclaration.");
if (symbol.declarations) {
for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
var decl = _a[_i];
switch (decl.kind) {
case 290 /* SourceFile */:
// Don't include the source file itself. (This may not be ideal behavior, but awkward to include an entire file as a reference.)
break;
case 249 /* ModuleDeclaration */:
if (sourceFilesSet.has(decl.getSourceFile().fileName)) {
references.push(nodeEntry(decl.name));
}
break;
default:
// This may be merged with something.
ts.Debug.assert(!!(symbol.flags & 33554432 /* Transient */), "Expected a module symbol to be declared by a SourceFile or ModuleDeclaration.");
}
}
}
var exported = symbol.exports.get("export=" /* ExportEquals */);
@ -114911,6 +114935,8 @@ var ts;
}
// Go to the symbol we imported from and find references for it.
function searchForImportedSymbol(symbol, state) {
if (!symbol.declarations)
return;
for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
var declaration = _a[_i];
var exportingFile = declaration.getSourceFile();
@ -115346,7 +115372,7 @@ var ts;
*/
function findOwnConstructorReferences(classSymbol, sourceFile, addNode) {
var constructorSymbol = getClassConstructorSymbol(classSymbol);
if (constructorSymbol) {
if (constructorSymbol && constructorSymbol.declarations) {
for (var _i = 0, _a = constructorSymbol.declarations; _i < _a.length; _i++) {
var decl = _a[_i];
var ctrKeyword = ts.findChildOfKind(decl, 129 /* ConstructorKeyword */, sourceFile);
@ -115376,7 +115402,7 @@ var ts;
/** Find references to `super` in the constructor of an extending class. */
function findSuperConstructorAccesses(classDeclaration, addNode) {
var constructor = getClassConstructorSymbol(classDeclaration.symbol);
if (!constructor) {
if (!(constructor && constructor.declarations)) {
return;
}
for (var _i = 0, _a = constructor.declarations; _i < _a.length; _i++) {
@ -115501,7 +115527,7 @@ var ts;
}
// Set the key so that we don't infinitely recurse
cachedResults.set(key, false);
var inherits = symbol.declarations.some(function (declaration) {
var inherits = !!symbol.declarations && symbol.declarations.some(function (declaration) {
return ts.getAllSuperTypeNodes(declaration).some(function (typeReference) {
var type = checker.getTypeAtLocation(typeReference);
return !!type && !!type.symbol && explicitlyInheritsFrom(type.symbol, parent, cachedResults, checker);

View file

@ -7036,6 +7036,7 @@ var ts;
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'."),
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 `&rbrace;`?"),
Unexpected_token_Did_you_mean_or_gt: diag(1382, ts.DiagnosticCategory.Error, "Unexpected_token_Did_you_mean_or_gt_1382", "Unexpected token. Did you mean `{'>'}` or `&gt;`?"),
Only_named_exports_may_use_export_type: diag(1383, ts.DiagnosticCategory.Error, "Only_named_exports_may_use_export_type_1383", "Only named exports may use 'export type'."),
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."),
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."),
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.", /*reportsUnnecessary*/ undefined, /*elidedInCompatabilityPyramid*/ true),
@ -18566,6 +18567,10 @@ var ts;
|| !isExpressionNode(useSite);
}
ts.isValidTypeOnlyAliasUseSite = isValidTypeOnlyAliasUseSite;
function typeOnlyDeclarationIsExport(typeOnlyDeclaration) {
return typeOnlyDeclaration.kind === 263 /* ExportSpecifier */;
}
ts.typeOnlyDeclarationIsExport = typeOnlyDeclarationIsExport;
function isPartOfPossiblyValidTypeOrAbstractComputedPropertyName(node) {
while (node.kind === 75 /* Identifier */ || node.kind === 194 /* PropertyAccessExpression */) {
node = node.parent;
@ -36169,10 +36174,11 @@ var ts;
if (!ts.isValidTypeOnlyAliasUseSite(useSite)) {
var typeOnlyDeclaration = getTypeOnlyAliasDeclaration(symbol);
if (typeOnlyDeclaration) {
var message = typeOnlyDeclaration.kind === 263 /* ExportSpecifier */
var isExport = ts.typeOnlyDeclarationIsExport(typeOnlyDeclaration);
var message = isExport
? ts.Diagnostics._0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type
: ts.Diagnostics._0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type;
var relatedMessage = typeOnlyDeclaration.kind === 263 /* ExportSpecifier */
var relatedMessage = isExport
? ts.Diagnostics._0_was_exported_here
: ts.Diagnostics._0_was_imported_here;
var unescapedName = ts.unescapeLeadingUnderscores(name);
@ -36474,10 +36480,11 @@ var ts;
function checkAndReportErrorForResolvingImportAliasToTypeOnlySymbol(node, resolved) {
if (markSymbolOfAliasDeclarationIfTypeOnly(node, /*immediateTarget*/ undefined, resolved, /*overwriteEmpty*/ false)) {
var typeOnlyDeclaration = getTypeOnlyAliasDeclaration(getSymbolOfNode(node));
var message = typeOnlyDeclaration.kind === 263 /* ExportSpecifier */
var isExport = ts.typeOnlyDeclarationIsExport(typeOnlyDeclaration);
var message = isExport
? ts.Diagnostics.An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type
: ts.Diagnostics.An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type;
var relatedMessage = typeOnlyDeclaration.kind === 263 /* ExportSpecifier */
var relatedMessage = isExport
? ts.Diagnostics._0_was_exported_here
: ts.Diagnostics._0_was_imported_here;
// Non-null assertion is safe because the optionality comes from ImportClause,
@ -65120,6 +65127,7 @@ var ts;
if (node.moduleSpecifier && node.exportClause && ts.isNamedExports(node.exportClause) && ts.length(node.exportClause.elements) && languageVersion === 0 /* ES3 */) {
checkExternalEmitHelpers(node, 1048576 /* CreateBinding */);
}
checkGrammarExportDeclaration(node);
if (!node.moduleSpecifier || checkExternalImportOrExportDeclaration(node)) {
if (node.exportClause) {
// export { x, y }
@ -65149,6 +65157,14 @@ var ts;
}
}
}
function checkGrammarExportDeclaration(node) {
var _a;
var isTypeOnlyExportStar = node.isTypeOnly && ((_a = node.exportClause) === null || _a === void 0 ? void 0 : _a.kind) !== 261 /* NamedExports */;
if (isTypeOnlyExportStar) {
grammarErrorOnNode(node, ts.Diagnostics.Only_named_exports_may_use_export_type);
}
return !isTypeOnlyExportStar;
}
function checkGrammarModuleElementContext(node, errorMessage) {
var isInAppropriateContext = node.parent.kind === 290 /* SourceFile */ || node.parent.kind === 250 /* ModuleBlock */ || node.parent.kind === 249 /* ModuleDeclaration */;
if (!isInAppropriateContext) {
@ -72367,7 +72383,7 @@ var ts;
var setter = ts.createPropertyAssignment("set", setterFunction);
properties_5.push(setter);
}
properties_5.push(ts.createPropertyAssignment("enumerable", ts.createTrue()));
properties_5.push(ts.createPropertyAssignment("enumerable", getAccessor || setAccessor ? ts.createFalse() : ts.createTrue()));
properties_5.push(ts.createPropertyAssignment("configurable", ts.createTrue()));
var expression = ts.setTextRange(ts.createCall(ts.createPropertyAccess(ts.createIdentifier("Object"), "defineProperty"),
/*typeArguments*/ undefined, [
@ -82963,7 +82979,7 @@ var ts;
ts.setCommentRange(setter, ts.getCommentRange(setAccessor));
properties.push(setter);
}
properties.push(ts.createPropertyAssignment("enumerable", ts.createTrue()), ts.createPropertyAssignment("configurable", ts.createTrue()));
properties.push(ts.createPropertyAssignment("enumerable", getAccessor || setAccessor ? ts.createFalse() : ts.createTrue()), ts.createPropertyAssignment("configurable", ts.createTrue()));
var call = ts.createCall(ts.createPropertyAccess(ts.createIdentifier("Object"), "defineProperty"),
/*typeArguments*/ undefined, [
target,
@ -87756,6 +87772,9 @@ var ts;
if (shouldEmitUnderscoreUnderscoreESModule()) {
ts.append(statements, createUnderscoreUnderscoreESModule());
}
if (ts.length(currentModuleInfo.exportedNames)) {
ts.append(statements, ts.createExpressionStatement(ts.reduceLeft(currentModuleInfo.exportedNames, function (prev, nextId) { return ts.createAssignment(ts.createPropertyAccess(ts.createIdentifier("exports"), ts.createIdentifier(ts.idText(nextId))), prev); }, ts.createVoidZero())));
}
ts.append(statements, ts.visitNode(currentModuleInfo.externalHelpersImportDeclaration, sourceElementVisitor, ts.isStatement));
ts.addRange(statements, ts.visitNodes(node.statements, sourceElementVisitor, ts.isStatement, statementOffset));
addExportEqualsIfNeeded(statements, /*emitAsReturn*/ false);
@ -87970,6 +87989,9 @@ var ts;
if (shouldEmitUnderscoreUnderscoreESModule()) {
ts.append(statements, createUnderscoreUnderscoreESModule());
}
if (ts.length(currentModuleInfo.exportedNames)) {
ts.append(statements, ts.createExpressionStatement(ts.reduceLeft(currentModuleInfo.exportedNames, function (prev, nextId) { return ts.createAssignment(ts.createPropertyAccess(ts.createIdentifier("exports"), ts.createIdentifier(ts.idText(nextId))), prev); }, ts.createVoidZero())));
}
// Visit each statement of the module body.
ts.append(statements, ts.visitNode(currentModuleInfo.externalHelpersImportDeclaration, sourceElementVisitor, ts.isStatement));
if (moduleKind === ts.ModuleKind.AMD) {
@ -88515,7 +88537,7 @@ var ts;
}
variables = ts.append(variables, variable);
}
else {
else if (variable.initializer) {
expressions = ts.append(expressions, transformInitializedVariable(variable));
}
}
@ -114590,20 +114612,22 @@ var ts;
};
}
});
for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
var decl = _a[_i];
switch (decl.kind) {
case 290 /* SourceFile */:
// Don't include the source file itself. (This may not be ideal behavior, but awkward to include an entire file as a reference.)
break;
case 249 /* ModuleDeclaration */:
if (sourceFilesSet.has(decl.getSourceFile().fileName)) {
references.push(nodeEntry(decl.name));
}
break;
default:
// This may be merged with something.
ts.Debug.assert(!!(symbol.flags & 33554432 /* Transient */), "Expected a module symbol to be declared by a SourceFile or ModuleDeclaration.");
if (symbol.declarations) {
for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
var decl = _a[_i];
switch (decl.kind) {
case 290 /* SourceFile */:
// Don't include the source file itself. (This may not be ideal behavior, but awkward to include an entire file as a reference.)
break;
case 249 /* ModuleDeclaration */:
if (sourceFilesSet.has(decl.getSourceFile().fileName)) {
references.push(nodeEntry(decl.name));
}
break;
default:
// This may be merged with something.
ts.Debug.assert(!!(symbol.flags & 33554432 /* Transient */), "Expected a module symbol to be declared by a SourceFile or ModuleDeclaration.");
}
}
}
var exported = symbol.exports.get("export=" /* ExportEquals */);
@ -114911,6 +114935,8 @@ var ts;
}
// Go to the symbol we imported from and find references for it.
function searchForImportedSymbol(symbol, state) {
if (!symbol.declarations)
return;
for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
var declaration = _a[_i];
var exportingFile = declaration.getSourceFile();
@ -115346,7 +115372,7 @@ var ts;
*/
function findOwnConstructorReferences(classSymbol, sourceFile, addNode) {
var constructorSymbol = getClassConstructorSymbol(classSymbol);
if (constructorSymbol) {
if (constructorSymbol && constructorSymbol.declarations) {
for (var _i = 0, _a = constructorSymbol.declarations; _i < _a.length; _i++) {
var decl = _a[_i];
var ctrKeyword = ts.findChildOfKind(decl, 129 /* ConstructorKeyword */, sourceFile);
@ -115376,7 +115402,7 @@ var ts;
/** Find references to `super` in the constructor of an extending class. */
function findSuperConstructorAccesses(classDeclaration, addNode) {
var constructor = getClassConstructorSymbol(classDeclaration.symbol);
if (!constructor) {
if (!(constructor && constructor.declarations)) {
return;
}
for (var _i = 0, _a = constructor.declarations; _i < _a.length; _i++) {
@ -115501,7 +115527,7 @@ var ts;
}
// Set the key so that we don't infinitely recurse
cachedResults.set(key, false);
var inherits = symbol.declarations.some(function (declaration) {
var inherits = !!symbol.declarations && symbol.declarations.some(function (declaration) {
return ts.getAllSuperTypeNodes(declaration).some(function (typeReference) {
var type = checker.getTypeAtLocation(typeReference);
return !!type && !!type.symbol && explicitlyInheritsFrom(type.symbol, parent, cachedResults, checker);

View file

@ -6875,6 +6875,7 @@ var ts;
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'."),
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 `&rbrace;`?"),
Unexpected_token_Did_you_mean_or_gt: diag(1382, ts.DiagnosticCategory.Error, "Unexpected_token_Did_you_mean_or_gt_1382", "Unexpected token. Did you mean `{'>'}` or `&gt;`?"),
Only_named_exports_may_use_export_type: diag(1383, ts.DiagnosticCategory.Error, "Only_named_exports_may_use_export_type_1383", "Only named exports may use 'export type'."),
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."),
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."),
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.", /*reportsUnnecessary*/ undefined, /*elidedInCompatabilityPyramid*/ true),
@ -18405,6 +18406,10 @@ var ts;
|| !isExpressionNode(useSite);
}
ts.isValidTypeOnlyAliasUseSite = isValidTypeOnlyAliasUseSite;
function typeOnlyDeclarationIsExport(typeOnlyDeclaration) {
return typeOnlyDeclaration.kind === 263 /* ExportSpecifier */;
}
ts.typeOnlyDeclarationIsExport = typeOnlyDeclarationIsExport;
function isPartOfPossiblyValidTypeOrAbstractComputedPropertyName(node) {
while (node.kind === 75 /* Identifier */ || node.kind === 194 /* PropertyAccessExpression */) {
node = node.parent;
@ -36008,10 +36013,11 @@ var ts;
if (!ts.isValidTypeOnlyAliasUseSite(useSite)) {
var typeOnlyDeclaration = getTypeOnlyAliasDeclaration(symbol);
if (typeOnlyDeclaration) {
var message = typeOnlyDeclaration.kind === 263 /* ExportSpecifier */
var isExport = ts.typeOnlyDeclarationIsExport(typeOnlyDeclaration);
var message = isExport
? ts.Diagnostics._0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type
: ts.Diagnostics._0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type;
var relatedMessage = typeOnlyDeclaration.kind === 263 /* ExportSpecifier */
var relatedMessage = isExport
? ts.Diagnostics._0_was_exported_here
: ts.Diagnostics._0_was_imported_here;
var unescapedName = ts.unescapeLeadingUnderscores(name);
@ -36313,10 +36319,11 @@ var ts;
function checkAndReportErrorForResolvingImportAliasToTypeOnlySymbol(node, resolved) {
if (markSymbolOfAliasDeclarationIfTypeOnly(node, /*immediateTarget*/ undefined, resolved, /*overwriteEmpty*/ false)) {
var typeOnlyDeclaration = getTypeOnlyAliasDeclaration(getSymbolOfNode(node));
var message = typeOnlyDeclaration.kind === 263 /* ExportSpecifier */
var isExport = ts.typeOnlyDeclarationIsExport(typeOnlyDeclaration);
var message = isExport
? ts.Diagnostics.An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type
: ts.Diagnostics.An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type;
var relatedMessage = typeOnlyDeclaration.kind === 263 /* ExportSpecifier */
var relatedMessage = isExport
? ts.Diagnostics._0_was_exported_here
: ts.Diagnostics._0_was_imported_here;
// Non-null assertion is safe because the optionality comes from ImportClause,
@ -64959,6 +64966,7 @@ var ts;
if (node.moduleSpecifier && node.exportClause && ts.isNamedExports(node.exportClause) && ts.length(node.exportClause.elements) && languageVersion === 0 /* ES3 */) {
checkExternalEmitHelpers(node, 1048576 /* CreateBinding */);
}
checkGrammarExportDeclaration(node);
if (!node.moduleSpecifier || checkExternalImportOrExportDeclaration(node)) {
if (node.exportClause) {
// export { x, y }
@ -64988,6 +64996,14 @@ var ts;
}
}
}
function checkGrammarExportDeclaration(node) {
var _a;
var isTypeOnlyExportStar = node.isTypeOnly && ((_a = node.exportClause) === null || _a === void 0 ? void 0 : _a.kind) !== 261 /* NamedExports */;
if (isTypeOnlyExportStar) {
grammarErrorOnNode(node, ts.Diagnostics.Only_named_exports_may_use_export_type);
}
return !isTypeOnlyExportStar;
}
function checkGrammarModuleElementContext(node, errorMessage) {
var isInAppropriateContext = node.parent.kind === 290 /* SourceFile */ || node.parent.kind === 250 /* ModuleBlock */ || node.parent.kind === 249 /* ModuleDeclaration */;
if (!isInAppropriateContext) {
@ -72206,7 +72222,7 @@ var ts;
var setter = ts.createPropertyAssignment("set", setterFunction);
properties_5.push(setter);
}
properties_5.push(ts.createPropertyAssignment("enumerable", ts.createTrue()));
properties_5.push(ts.createPropertyAssignment("enumerable", getAccessor || setAccessor ? ts.createFalse() : ts.createTrue()));
properties_5.push(ts.createPropertyAssignment("configurable", ts.createTrue()));
var expression = ts.setTextRange(ts.createCall(ts.createPropertyAccess(ts.createIdentifier("Object"), "defineProperty"),
/*typeArguments*/ undefined, [
@ -82802,7 +82818,7 @@ var ts;
ts.setCommentRange(setter, ts.getCommentRange(setAccessor));
properties.push(setter);
}
properties.push(ts.createPropertyAssignment("enumerable", ts.createTrue()), ts.createPropertyAssignment("configurable", ts.createTrue()));
properties.push(ts.createPropertyAssignment("enumerable", getAccessor || setAccessor ? ts.createFalse() : ts.createTrue()), ts.createPropertyAssignment("configurable", ts.createTrue()));
var call = ts.createCall(ts.createPropertyAccess(ts.createIdentifier("Object"), "defineProperty"),
/*typeArguments*/ undefined, [
target,
@ -87595,6 +87611,9 @@ var ts;
if (shouldEmitUnderscoreUnderscoreESModule()) {
ts.append(statements, createUnderscoreUnderscoreESModule());
}
if (ts.length(currentModuleInfo.exportedNames)) {
ts.append(statements, ts.createExpressionStatement(ts.reduceLeft(currentModuleInfo.exportedNames, function (prev, nextId) { return ts.createAssignment(ts.createPropertyAccess(ts.createIdentifier("exports"), ts.createIdentifier(ts.idText(nextId))), prev); }, ts.createVoidZero())));
}
ts.append(statements, ts.visitNode(currentModuleInfo.externalHelpersImportDeclaration, sourceElementVisitor, ts.isStatement));
ts.addRange(statements, ts.visitNodes(node.statements, sourceElementVisitor, ts.isStatement, statementOffset));
addExportEqualsIfNeeded(statements, /*emitAsReturn*/ false);
@ -87809,6 +87828,9 @@ var ts;
if (shouldEmitUnderscoreUnderscoreESModule()) {
ts.append(statements, createUnderscoreUnderscoreESModule());
}
if (ts.length(currentModuleInfo.exportedNames)) {
ts.append(statements, ts.createExpressionStatement(ts.reduceLeft(currentModuleInfo.exportedNames, function (prev, nextId) { return ts.createAssignment(ts.createPropertyAccess(ts.createIdentifier("exports"), ts.createIdentifier(ts.idText(nextId))), prev); }, ts.createVoidZero())));
}
// Visit each statement of the module body.
ts.append(statements, ts.visitNode(currentModuleInfo.externalHelpersImportDeclaration, sourceElementVisitor, ts.isStatement));
if (moduleKind === ts.ModuleKind.AMD) {
@ -88354,7 +88376,7 @@ var ts;
}
variables = ts.append(variables, variable);
}
else {
else if (variable.initializer) {
expressions = ts.append(expressions, transformInitializedVariable(variable));
}
}