diff --git a/bin/lib.core.d.ts b/bin/lib.core.d.ts index 1d3ed6dca4c..00dc83fa80a 100644 --- a/bin/lib.core.d.ts +++ b/bin/lib.core.d.ts @@ -499,6 +499,10 @@ declare var Number: { POSITIVE_INFINITY: number; } +interface TemplateStringsArray extends Array { + raw: string[]; +} + interface Math { /** The mathematical constant e. This is Euler's number, the base of natural logarithms. */ E: number; diff --git a/bin/lib.d.ts b/bin/lib.d.ts index 8fb56ba3129..8890fab4284 100644 --- a/bin/lib.d.ts +++ b/bin/lib.d.ts @@ -499,6 +499,10 @@ declare var Number: { POSITIVE_INFINITY: number; } +interface TemplateStringsArray extends Array { + raw: string[]; +} + interface Math { /** The mathematical constant e. This is Euler's number, the base of natural logarithms. */ E: number; diff --git a/bin/tsc.js b/bin/tsc.js index 53e1047e852..df74c76f504 100644 --- a/bin/tsc.js +++ b/bin/tsc.js @@ -13,1421 +13,6 @@ See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ -var ts; -(function (ts) { - ts.Diagnostics = { - Unterminated_string_literal: { code: 1002, category: 1 /* Error */, key: "Unterminated string literal." }, - Identifier_expected: { code: 1003, category: 1 /* Error */, key: "Identifier expected." }, - _0_expected: { code: 1005, category: 1 /* Error */, key: "'{0}' expected." }, - A_file_cannot_have_a_reference_to_itself: { code: 1006, category: 1 /* Error */, key: "A file cannot have a reference to itself." }, - Trailing_comma_not_allowed: { code: 1009, category: 1 /* Error */, key: "Trailing comma not allowed." }, - Asterisk_Slash_expected: { code: 1010, category: 1 /* Error */, key: "'*/' expected." }, - Unexpected_token: { code: 1012, category: 1 /* Error */, key: "Unexpected token." }, - Catch_clause_parameter_cannot_have_a_type_annotation: { code: 1013, category: 1 /* Error */, key: "Catch clause parameter cannot have a type annotation." }, - A_rest_parameter_must_be_last_in_a_parameter_list: { code: 1014, category: 1 /* Error */, key: "A rest parameter must be last in a parameter list." }, - Parameter_cannot_have_question_mark_and_initializer: { code: 1015, category: 1 /* Error */, key: "Parameter cannot have question mark and initializer." }, - A_required_parameter_cannot_follow_an_optional_parameter: { code: 1016, category: 1 /* Error */, key: "A required parameter cannot follow an optional parameter." }, - An_index_signature_cannot_have_a_rest_parameter: { code: 1017, category: 1 /* Error */, key: "An index signature cannot have a rest parameter." }, - An_index_signature_parameter_cannot_have_an_accessibility_modifier: { code: 1018, category: 1 /* Error */, key: "An index signature parameter cannot have an accessibility modifier." }, - An_index_signature_parameter_cannot_have_a_question_mark: { code: 1019, category: 1 /* Error */, key: "An index signature parameter cannot have a question mark." }, - An_index_signature_parameter_cannot_have_an_initializer: { code: 1020, category: 1 /* Error */, key: "An index signature parameter cannot have an initializer." }, - An_index_signature_must_have_a_type_annotation: { code: 1021, category: 1 /* Error */, key: "An index signature must have a type annotation." }, - An_index_signature_parameter_must_have_a_type_annotation: { code: 1022, category: 1 /* Error */, key: "An index signature parameter must have a type annotation." }, - An_index_signature_parameter_type_must_be_string_or_number: { code: 1023, category: 1 /* Error */, key: "An index signature parameter type must be 'string' or 'number'." }, - A_class_or_interface_declaration_can_only_have_one_extends_clause: { code: 1024, category: 1 /* Error */, key: "A class or interface declaration can only have one 'extends' clause." }, - An_extends_clause_must_precede_an_implements_clause: { code: 1025, category: 1 /* Error */, key: "An 'extends' clause must precede an 'implements' clause." }, - A_class_can_only_extend_a_single_class: { code: 1026, category: 1 /* Error */, key: "A class can only extend a single class." }, - A_class_declaration_can_only_have_one_implements_clause: { code: 1027, category: 1 /* Error */, key: "A class declaration can only have one 'implements' clause." }, - Accessibility_modifier_already_seen: { code: 1028, category: 1 /* Error */, key: "Accessibility modifier already seen." }, - _0_modifier_must_precede_1_modifier: { code: 1029, category: 1 /* Error */, key: "'{0}' modifier must precede '{1}' modifier." }, - _0_modifier_already_seen: { code: 1030, category: 1 /* Error */, key: "'{0}' modifier already seen." }, - _0_modifier_cannot_appear_on_a_class_element: { code: 1031, category: 1 /* Error */, key: "'{0}' modifier cannot appear on a class element." }, - An_interface_declaration_cannot_have_an_implements_clause: { code: 1032, category: 1 /* Error */, key: "An interface declaration cannot have an 'implements' clause." }, - super_must_be_followed_by_an_argument_list_or_member_access: { code: 1034, category: 1 /* Error */, key: "'super' must be followed by an argument list or member access." }, - Only_ambient_modules_can_use_quoted_names: { code: 1035, category: 1 /* Error */, key: "Only ambient modules can use quoted names." }, - Statements_are_not_allowed_in_ambient_contexts: { code: 1036, category: 1 /* Error */, key: "Statements are not allowed in ambient contexts." }, - A_function_implementation_cannot_be_declared_in_an_ambient_context: { code: 1037, category: 1 /* Error */, key: "A function implementation cannot be declared in an ambient context." }, - A_declare_modifier_cannot_be_used_in_an_already_ambient_context: { code: 1038, category: 1 /* Error */, key: "A 'declare' modifier cannot be used in an already ambient context." }, - Initializers_are_not_allowed_in_ambient_contexts: { code: 1039, category: 1 /* Error */, key: "Initializers are not allowed in ambient contexts." }, - _0_modifier_cannot_appear_on_a_module_element: { code: 1044, category: 1 /* Error */, key: "'{0}' modifier cannot appear on a module element." }, - A_declare_modifier_cannot_be_used_with_an_interface_declaration: { code: 1045, category: 1 /* Error */, key: "A 'declare' modifier cannot be used with an interface declaration." }, - A_declare_modifier_is_required_for_a_top_level_declaration_in_a_d_ts_file: { code: 1046, category: 1 /* Error */, key: "A 'declare' modifier is required for a top level declaration in a .d.ts file." }, - A_rest_parameter_cannot_be_optional: { code: 1047, category: 1 /* Error */, key: "A rest parameter cannot be optional." }, - A_rest_parameter_cannot_have_an_initializer: { code: 1048, category: 1 /* Error */, key: "A rest parameter cannot have an initializer." }, - A_set_accessor_must_have_exactly_one_parameter: { code: 1049, category: 1 /* Error */, key: "A 'set' accessor must have exactly one parameter." }, - A_set_accessor_cannot_have_an_optional_parameter: { code: 1051, category: 1 /* Error */, key: "A 'set' accessor cannot have an optional parameter." }, - A_set_accessor_parameter_cannot_have_an_initializer: { code: 1052, category: 1 /* Error */, key: "A 'set' accessor parameter cannot have an initializer." }, - A_set_accessor_cannot_have_rest_parameter: { code: 1053, category: 1 /* Error */, key: "A 'set' accessor cannot have rest parameter." }, - A_get_accessor_cannot_have_parameters: { code: 1054, category: 1 /* Error */, key: "A 'get' accessor cannot have parameters." }, - Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher: { code: 1056, category: 1 /* Error */, key: "Accessors are only available when targeting ECMAScript 5 and higher." }, - Enum_member_must_have_initializer: { code: 1061, category: 1 /* Error */, key: "Enum member must have initializer." }, - An_export_assignment_cannot_be_used_in_an_internal_module: { code: 1063, category: 1 /* Error */, key: "An export assignment cannot be used in an internal module." }, - Ambient_enum_elements_can_only_have_integer_literal_initializers: { code: 1066, category: 1 /* Error */, key: "Ambient enum elements can only have integer literal initializers." }, - Unexpected_token_A_constructor_method_accessor_or_property_was_expected: { code: 1068, category: 1 /* Error */, key: "Unexpected token. A constructor, method, accessor, or property was expected." }, - A_declare_modifier_cannot_be_used_with_an_import_declaration: { code: 1079, category: 1 /* Error */, key: "A 'declare' modifier cannot be used with an import declaration." }, - Invalid_reference_directive_syntax: { code: 1084, category: 1 /* Error */, key: "Invalid 'reference' directive syntax." }, - Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher: { code: 1085, category: 1 /* Error */, key: "Octal literals are not available when targeting ECMAScript 5 and higher." }, - An_accessor_cannot_be_declared_in_an_ambient_context: { code: 1086, category: 1 /* Error */, key: "An accessor cannot be declared in an ambient context." }, - _0_modifier_cannot_appear_on_a_constructor_declaration: { code: 1089, category: 1 /* Error */, key: "'{0}' modifier cannot appear on a constructor declaration." }, - _0_modifier_cannot_appear_on_a_parameter: { code: 1090, category: 1 /* Error */, key: "'{0}' modifier cannot appear on a parameter." }, - Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement: { code: 1091, category: 1 /* Error */, key: "Only a single variable declaration is allowed in a 'for...in' statement." }, - Type_parameters_cannot_appear_on_a_constructor_declaration: { code: 1092, category: 1 /* Error */, key: "Type parameters cannot appear on a constructor declaration." }, - Type_annotation_cannot_appear_on_a_constructor_declaration: { code: 1093, category: 1 /* Error */, key: "Type annotation cannot appear on a constructor declaration." }, - An_accessor_cannot_have_type_parameters: { code: 1094, category: 1 /* Error */, key: "An accessor cannot have type parameters." }, - A_set_accessor_cannot_have_a_return_type_annotation: { code: 1095, category: 1 /* Error */, key: "A 'set' accessor cannot have a return type annotation." }, - An_index_signature_must_have_exactly_one_parameter: { code: 1096, category: 1 /* Error */, key: "An index signature must have exactly one parameter." }, - _0_list_cannot_be_empty: { code: 1097, category: 1 /* Error */, key: "'{0}' list cannot be empty." }, - Type_parameter_list_cannot_be_empty: { code: 1098, category: 1 /* Error */, key: "Type parameter list cannot be empty." }, - Type_argument_list_cannot_be_empty: { code: 1099, category: 1 /* Error */, key: "Type argument list cannot be empty." }, - Invalid_use_of_0_in_strict_mode: { code: 1100, category: 1 /* Error */, key: "Invalid use of '{0}' in strict mode." }, - with_statements_are_not_allowed_in_strict_mode: { code: 1101, category: 1 /* Error */, key: "'with' statements are not allowed in strict mode." }, - delete_cannot_be_called_on_an_identifier_in_strict_mode: { code: 1102, category: 1 /* Error */, key: "'delete' cannot be called on an identifier in strict mode." }, - A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement: { code: 1104, category: 1 /* Error */, key: "A 'continue' statement can only be used within an enclosing iteration statement." }, - A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement: { code: 1105, category: 1 /* Error */, key: "A 'break' statement can only be used within an enclosing iteration or switch statement." }, - Jump_target_cannot_cross_function_boundary: { code: 1107, category: 1 /* Error */, key: "Jump target cannot cross function boundary." }, - A_return_statement_can_only_be_used_within_a_function_body: { code: 1108, category: 1 /* Error */, key: "A 'return' statement can only be used within a function body." }, - Expression_expected: { code: 1109, category: 1 /* Error */, key: "Expression expected." }, - Type_expected: { code: 1110, category: 1 /* Error */, key: "Type expected." }, - A_constructor_implementation_cannot_be_declared_in_an_ambient_context: { code: 1111, category: 1 /* Error */, key: "A constructor implementation cannot be declared in an ambient context." }, - A_class_member_cannot_be_declared_optional: { code: 1112, category: 1 /* Error */, key: "A class member cannot be declared optional." }, - A_default_clause_cannot_appear_more_than_once_in_a_switch_statement: { code: 1113, category: 1 /* Error */, key: "A 'default' clause cannot appear more than once in a 'switch' statement." }, - Duplicate_label_0: { code: 1114, category: 1 /* Error */, key: "Duplicate label '{0}'" }, - A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement: { code: 1115, category: 1 /* Error */, key: "A 'continue' statement can only jump to a label of an enclosing iteration statement." }, - A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement: { code: 1116, category: 1 /* Error */, key: "A 'break' statement can only jump to a label of an enclosing statement." }, - An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode: { code: 1117, category: 1 /* Error */, key: "An object literal cannot have multiple properties with the same name in strict mode." }, - An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name: { code: 1118, category: 1 /* Error */, key: "An object literal cannot have multiple get/set accessors with the same name." }, - An_object_literal_cannot_have_property_and_accessor_with_the_same_name: { code: 1119, category: 1 /* Error */, key: "An object literal cannot have property and accessor with the same name." }, - An_export_assignment_cannot_have_modifiers: { code: 1120, category: 1 /* Error */, key: "An export assignment cannot have modifiers." }, - Octal_literals_are_not_allowed_in_strict_mode: { code: 1121, category: 1 /* Error */, key: "Octal literals are not allowed in strict mode." }, - A_tuple_type_element_list_cannot_be_empty: { code: 1122, category: 1 /* Error */, key: "A tuple type element list cannot be empty." }, - Variable_declaration_list_cannot_be_empty: { code: 1123, category: 1 /* Error */, key: "Variable declaration list cannot be empty." }, - Digit_expected: { code: 1124, category: 1 /* Error */, key: "Digit expected." }, - Hexadecimal_digit_expected: { code: 1125, category: 1 /* Error */, key: "Hexadecimal digit expected." }, - Unexpected_end_of_text: { code: 1126, category: 1 /* Error */, key: "Unexpected end of text." }, - Invalid_character: { code: 1127, category: 1 /* Error */, key: "Invalid character." }, - Declaration_or_statement_expected: { code: 1128, category: 1 /* Error */, key: "Declaration or statement expected." }, - Statement_expected: { code: 1129, category: 1 /* Error */, key: "Statement expected." }, - case_or_default_expected: { code: 1130, category: 1 /* Error */, key: "'case' or 'default' expected." }, - Property_or_signature_expected: { code: 1131, category: 1 /* Error */, key: "Property or signature expected." }, - Enum_member_expected: { code: 1132, category: 1 /* Error */, key: "Enum member expected." }, - Type_reference_expected: { code: 1133, category: 1 /* Error */, key: "Type reference expected." }, - Variable_declaration_expected: { code: 1134, category: 1 /* Error */, key: "Variable declaration expected." }, - Argument_expression_expected: { code: 1135, category: 1 /* Error */, key: "Argument expression expected." }, - Property_assignment_expected: { code: 1136, category: 1 /* Error */, key: "Property assignment expected." }, - Expression_or_comma_expected: { code: 1137, category: 1 /* Error */, key: "Expression or comma expected." }, - Parameter_declaration_expected: { code: 1138, category: 1 /* Error */, key: "Parameter declaration expected." }, - Type_parameter_declaration_expected: { code: 1139, category: 1 /* Error */, key: "Type parameter declaration expected." }, - Type_argument_expected: { code: 1140, category: 1 /* Error */, key: "Type argument expected." }, - String_literal_expected: { code: 1141, category: 1 /* Error */, key: "String literal expected." }, - Line_break_not_permitted_here: { code: 1142, category: 1 /* Error */, key: "Line break not permitted here." }, - catch_or_finally_expected: { code: 1143, category: 1 /* Error */, key: "'catch' or 'finally' expected." }, - Block_or_expected: { code: 1144, category: 1 /* Error */, key: "Block or ';' expected." }, - Modifiers_not_permitted_on_index_signature_members: { code: 1145, category: 1 /* Error */, key: "Modifiers not permitted on index signature members." }, - Declaration_expected: { code: 1146, category: 1 /* Error */, key: "Declaration expected." }, - Import_declarations_in_an_internal_module_cannot_reference_an_external_module: { code: 1147, category: 1 /* Error */, key: "Import declarations in an internal module cannot reference an external module." }, - Cannot_compile_external_modules_unless_the_module_flag_is_provided: { code: 1148, category: 1 /* Error */, key: "Cannot compile external modules unless the '--module' flag is provided." }, - Filename_0_differs_from_already_included_filename_1_only_in_casing: { code: 1149, category: 1 /* Error */, key: "Filename '{0}' differs from already included filename '{1}' only in casing" }, - new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead: { code: 1150, category: 1 /* Error */, key: "'new T[]' cannot be used to create an array. Use 'new Array()' instead." }, - var_let_or_const_expected: { code: 1152, category: 1 /* Error */, key: "'var', 'let' or 'const' expected." }, - let_declarations_are_only_available_when_targeting_ECMAScript_6_and_higher: { code: 1153, category: 1 /* Error */, key: "'let' declarations are only available when targeting ECMAScript 6 and higher." }, - const_declarations_are_only_available_when_targeting_ECMAScript_6_and_higher: { code: 1154, category: 1 /* Error */, key: "'const' declarations are only available when targeting ECMAScript 6 and higher." }, - const_declarations_must_be_initialized: { code: 1155, category: 1 /* Error */, key: "'const' declarations must be initialized" }, - const_declarations_can_only_be_declared_inside_a_block: { code: 1156, category: 1 /* Error */, key: "'const' declarations can only be declared inside a block." }, - let_declarations_can_only_be_declared_inside_a_block: { code: 1157, category: 1 /* Error */, key: "'let' declarations can only be declared inside a block." }, - Invalid_template_literal_expected: { code: 1158, category: 1 /* Error */, key: "Invalid template literal; expected '}'" }, - Tagged_templates_are_only_available_when_targeting_ECMAScript_6_and_higher: { code: 1159, category: 1 /* Error */, key: "Tagged templates are only available when targeting ECMAScript 6 and higher." }, - Duplicate_identifier_0: { code: 2300, category: 1 /* Error */, key: "Duplicate identifier '{0}'." }, - Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor: { code: 2301, category: 1 /* Error */, key: "Initializer of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor." }, - Static_members_cannot_reference_class_type_parameters: { code: 2302, category: 1 /* Error */, key: "Static members cannot reference class type parameters." }, - Circular_definition_of_import_alias_0: { code: 2303, category: 1 /* Error */, key: "Circular definition of import alias '{0}'." }, - Cannot_find_name_0: { code: 2304, category: 1 /* Error */, key: "Cannot find name '{0}'." }, - Module_0_has_no_exported_member_1: { code: 2305, category: 1 /* Error */, key: "Module '{0}' has no exported member '{1}'." }, - File_0_is_not_an_external_module: { code: 2306, category: 1 /* Error */, key: "File '{0}' is not an external module." }, - Cannot_find_external_module_0: { code: 2307, category: 1 /* Error */, key: "Cannot find external module '{0}'." }, - A_module_cannot_have_more_than_one_export_assignment: { code: 2308, category: 1 /* Error */, key: "A module cannot have more than one export assignment." }, - An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements: { code: 2309, category: 1 /* Error */, key: "An export assignment cannot be used in a module with other exported elements." }, - Type_0_recursively_references_itself_as_a_base_type: { code: 2310, category: 1 /* Error */, key: "Type '{0}' recursively references itself as a base type." }, - A_class_may_only_extend_another_class: { code: 2311, category: 1 /* Error */, key: "A class may only extend another class." }, - An_interface_may_only_extend_a_class_or_another_interface: { code: 2312, category: 1 /* Error */, key: "An interface may only extend a class or another interface." }, - Constraint_of_a_type_parameter_cannot_reference_any_type_parameter_from_the_same_type_parameter_list: { code: 2313, category: 1 /* Error */, key: "Constraint of a type parameter cannot reference any type parameter from the same type parameter list." }, - Generic_type_0_requires_1_type_argument_s: { code: 2314, category: 1 /* Error */, key: "Generic type '{0}' requires {1} type argument(s)." }, - Type_0_is_not_generic: { code: 2315, category: 1 /* Error */, key: "Type '{0}' is not generic." }, - Global_type_0_must_be_a_class_or_interface_type: { code: 2316, category: 1 /* Error */, key: "Global type '{0}' must be a class or interface type." }, - Global_type_0_must_have_1_type_parameter_s: { code: 2317, category: 1 /* Error */, key: "Global type '{0}' must have {1} type parameter(s)." }, - Cannot_find_global_type_0: { code: 2318, category: 1 /* Error */, key: "Cannot find global type '{0}'." }, - Named_properties_0_of_types_1_and_2_are_not_identical: { code: 2319, category: 1 /* Error */, key: "Named properties '{0}' of types '{1}' and '{2}' are not identical." }, - Interface_0_cannot_simultaneously_extend_types_1_and_2: { code: 2320, category: 1 /* Error */, key: "Interface '{0}' cannot simultaneously extend types '{1}' and '{2}'." }, - Excessive_stack_depth_comparing_types_0_and_1: { code: 2321, category: 1 /* Error */, key: "Excessive stack depth comparing types '{0}' and '{1}'." }, - Type_0_is_not_assignable_to_type_1: { code: 2323, category: 1 /* Error */, key: "Type '{0}' is not assignable to type '{1}'." }, - Property_0_is_missing_in_type_1: { code: 2324, category: 1 /* Error */, key: "Property '{0}' is missing in type '{1}'." }, - Property_0_is_private_in_type_1_but_not_in_type_2: { code: 2325, category: 1 /* Error */, key: "Property '{0}' is private in type '{1}' but not in type '{2}'." }, - Types_of_property_0_are_incompatible: { code: 2326, category: 1 /* Error */, key: "Types of property '{0}' are incompatible." }, - Property_0_is_optional_in_type_1_but_required_in_type_2: { code: 2327, category: 1 /* Error */, key: "Property '{0}' is optional in type '{1}' but required in type '{2}'." }, - Types_of_parameters_0_and_1_are_incompatible: { code: 2328, category: 1 /* Error */, key: "Types of parameters '{0}' and '{1}' are incompatible." }, - Index_signature_is_missing_in_type_0: { code: 2329, category: 1 /* Error */, key: "Index signature is missing in type '{0}'." }, - Index_signatures_are_incompatible: { code: 2330, category: 1 /* Error */, key: "Index signatures are incompatible." }, - this_cannot_be_referenced_in_a_module_body: { code: 2331, category: 1 /* Error */, key: "'this' cannot be referenced in a module body." }, - this_cannot_be_referenced_in_current_location: { code: 2332, category: 1 /* Error */, key: "'this' cannot be referenced in current location." }, - this_cannot_be_referenced_in_constructor_arguments: { code: 2333, category: 1 /* Error */, key: "'this' cannot be referenced in constructor arguments." }, - this_cannot_be_referenced_in_a_static_property_initializer: { code: 2334, category: 1 /* Error */, key: "'this' cannot be referenced in a static property initializer." }, - super_can_only_be_referenced_in_a_derived_class: { code: 2335, category: 1 /* Error */, key: "'super' can only be referenced in a derived class." }, - super_cannot_be_referenced_in_constructor_arguments: { code: 2336, category: 1 /* Error */, key: "'super' cannot be referenced in constructor arguments." }, - Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors: { code: 2337, category: 1 /* Error */, key: "Super calls are not permitted outside constructors or in nested functions inside constructors" }, - super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_derived_class: { code: 2338, category: 1 /* Error */, key: "'super' property access is permitted only in a constructor, member function, or member accessor of a derived class" }, - Property_0_does_not_exist_on_type_1: { code: 2339, category: 1 /* Error */, key: "Property '{0}' does not exist on type '{1}'." }, - Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword: { code: 2340, category: 1 /* Error */, key: "Only public and protected methods of the base class are accessible via the 'super' keyword" }, - Property_0_is_private_and_only_accessible_within_class_1: { code: 2341, category: 1 /* Error */, key: "Property '{0}' is private and only accessible within class '{1}'." }, - An_index_expression_argument_must_be_of_type_string_number_or_any: { code: 2342, category: 1 /* Error */, key: "An index expression argument must be of type 'string', 'number', or 'any'." }, - Type_0_does_not_satisfy_the_constraint_1: { code: 2344, category: 1 /* Error */, key: "Type '{0}' does not satisfy the constraint '{1}'." }, - Argument_of_type_0_is_not_assignable_to_parameter_of_type_1: { code: 2345, category: 1 /* Error */, key: "Argument of type '{0}' is not assignable to parameter of type '{1}'." }, - Supplied_parameters_do_not_match_any_signature_of_call_target: { code: 2346, category: 1 /* Error */, key: "Supplied parameters do not match any signature of call target." }, - Untyped_function_calls_may_not_accept_type_arguments: { code: 2347, category: 1 /* Error */, key: "Untyped function calls may not accept type arguments." }, - Value_of_type_0_is_not_callable_Did_you_mean_to_include_new: { code: 2348, category: 1 /* Error */, key: "Value of type '{0}' is not callable. Did you mean to include 'new'?" }, - Cannot_invoke_an_expression_whose_type_lacks_a_call_signature: { code: 2349, category: 1 /* Error */, key: "Cannot invoke an expression whose type lacks a call signature." }, - Only_a_void_function_can_be_called_with_the_new_keyword: { code: 2350, category: 1 /* Error */, key: "Only a void function can be called with the 'new' keyword." }, - Cannot_use_new_with_an_expression_whose_type_lacks_a_call_or_construct_signature: { code: 2351, category: 1 /* Error */, key: "Cannot use 'new' with an expression whose type lacks a call or construct signature." }, - Neither_type_0_nor_type_1_is_assignable_to_the_other: { code: 2352, category: 1 /* Error */, key: "Neither type '{0}' nor type '{1}' is assignable to the other." }, - No_best_common_type_exists_among_return_expressions: { code: 2354, category: 1 /* Error */, key: "No best common type exists among return expressions." }, - A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value_or_consist_of_a_single_throw_statement: { code: 2355, category: 1 /* Error */, key: "A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement." }, - An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type: { code: 2356, category: 1 /* Error */, key: "An arithmetic operand must be of type 'any', 'number' or an enum type." }, - The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_property_or_indexer: { code: 2357, category: 1 /* Error */, key: "The operand of an increment or decrement operator must be a variable, property or indexer." }, - The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter: { code: 2358, category: 1 /* Error */, key: "The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter." }, - The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_Function_interface_type: { code: 2359, category: 1 /* Error */, key: "The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type." }, - The_left_hand_side_of_an_in_expression_must_be_of_types_any_string_or_number: { code: 2360, category: 1 /* Error */, key: "The left-hand side of an 'in' expression must be of types 'any', 'string' or 'number'." }, - The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter: { code: 2361, category: 1 /* Error */, key: "The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter" }, - The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type: { code: 2362, category: 1 /* Error */, key: "The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type." }, - The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type: { code: 2363, category: 1 /* Error */, key: "The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type." }, - Invalid_left_hand_side_of_assignment_expression: { code: 2364, category: 1 /* Error */, key: "Invalid left-hand side of assignment expression." }, - Operator_0_cannot_be_applied_to_types_1_and_2: { code: 2365, category: 1 /* Error */, key: "Operator '{0}' cannot be applied to types '{1}' and '{2}'." }, - Type_parameter_name_cannot_be_0: { code: 2368, category: 1 /* Error */, key: "Type parameter name cannot be '{0}'" }, - A_parameter_property_is_only_allowed_in_a_constructor_implementation: { code: 2369, category: 1 /* Error */, key: "A parameter property is only allowed in a constructor implementation." }, - A_rest_parameter_must_be_of_an_array_type: { code: 2370, category: 1 /* Error */, key: "A rest parameter must be of an array type." }, - A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation: { code: 2371, category: 1 /* Error */, key: "A parameter initializer is only allowed in a function or constructor implementation." }, - Parameter_0_cannot_be_referenced_in_its_initializer: { code: 2372, category: 1 /* Error */, key: "Parameter '{0}' cannot be referenced in its initializer." }, - Initializer_of_parameter_0_cannot_reference_identifier_1_declared_after_it: { code: 2373, category: 1 /* Error */, key: "Initializer of parameter '{0}' cannot reference identifier '{1}' declared after it." }, - Duplicate_string_index_signature: { code: 2374, category: 1 /* Error */, key: "Duplicate string index signature." }, - Duplicate_number_index_signature: { code: 2375, category: 1 /* Error */, key: "Duplicate number index signature." }, - A_super_call_must_be_the_first_statement_in_the_constructor_when_a_class_contains_initialized_properties_or_has_parameter_properties: { code: 2376, category: 1 /* Error */, key: "A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties." }, - Constructors_for_derived_classes_must_contain_a_super_call: { code: 2377, category: 1 /* Error */, key: "Constructors for derived classes must contain a 'super' call." }, - A_get_accessor_must_return_a_value_or_consist_of_a_single_throw_statement: { code: 2378, category: 1 /* Error */, key: "A 'get' accessor must return a value or consist of a single 'throw' statement." }, - Getter_and_setter_accessors_do_not_agree_in_visibility: { code: 2379, category: 1 /* Error */, key: "Getter and setter accessors do not agree in visibility." }, - get_and_set_accessor_must_have_the_same_type: { code: 2380, category: 1 /* Error */, key: "'get' and 'set' accessor must have the same type." }, - A_signature_with_an_implementation_cannot_use_a_string_literal_type: { code: 2381, category: 1 /* Error */, key: "A signature with an implementation cannot use a string literal type." }, - Specialized_overload_signature_is_not_assignable_to_any_non_specialized_signature: { code: 2382, category: 1 /* Error */, key: "Specialized overload signature is not assignable to any non-specialized signature." }, - Overload_signatures_must_all_be_exported_or_not_exported: { code: 2383, category: 1 /* Error */, key: "Overload signatures must all be exported or not exported." }, - Overload_signatures_must_all_be_ambient_or_non_ambient: { code: 2384, category: 1 /* Error */, key: "Overload signatures must all be ambient or non-ambient." }, - Overload_signatures_must_all_be_public_private_or_protected: { code: 2385, category: 1 /* Error */, key: "Overload signatures must all be public, private or protected." }, - Overload_signatures_must_all_be_optional_or_required: { code: 2386, category: 1 /* Error */, key: "Overload signatures must all be optional or required." }, - Function_overload_must_be_static: { code: 2387, category: 1 /* Error */, key: "Function overload must be static." }, - Function_overload_must_not_be_static: { code: 2388, category: 1 /* Error */, key: "Function overload must not be static." }, - Function_implementation_name_must_be_0: { code: 2389, category: 1 /* Error */, key: "Function implementation name must be '{0}'." }, - Constructor_implementation_is_missing: { code: 2390, category: 1 /* Error */, key: "Constructor implementation is missing." }, - Function_implementation_is_missing_or_not_immediately_following_the_declaration: { code: 2391, category: 1 /* Error */, key: "Function implementation is missing or not immediately following the declaration." }, - Multiple_constructor_implementations_are_not_allowed: { code: 2392, category: 1 /* Error */, key: "Multiple constructor implementations are not allowed." }, - Duplicate_function_implementation: { code: 2393, category: 1 /* Error */, key: "Duplicate function implementation." }, - Overload_signature_is_not_compatible_with_function_implementation: { code: 2394, category: 1 /* Error */, key: "Overload signature is not compatible with function implementation." }, - Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local: { code: 2395, category: 1 /* Error */, key: "Individual declarations in merged declaration {0} must be all exported or all local." }, - Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters: { code: 2396, category: 1 /* Error */, key: "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters." }, - Duplicate_identifier_i_Compiler_uses_i_to_initialize_rest_parameter: { code: 2397, category: 1 /* Error */, key: "Duplicate identifier '_i'. Compiler uses '_i' to initialize rest parameter." }, - Expression_resolves_to_variable_declaration_i_that_compiler_uses_to_initialize_rest_parameter: { code: 2398, category: 1 /* Error */, key: "Expression resolves to variable declaration '_i' that compiler uses to initialize rest parameter." }, - Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference: { code: 2399, category: 1 /* Error */, key: "Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference." }, - Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference: { code: 2400, category: 1 /* Error */, key: "Expression resolves to variable declaration '_this' that compiler uses to capture 'this' reference." }, - Duplicate_identifier_super_Compiler_uses_super_to_capture_base_class_reference: { code: 2401, category: 1 /* Error */, key: "Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference." }, - Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference: { code: 2402, category: 1 /* Error */, key: "Expression resolves to '_super' that compiler uses to capture base class reference." }, - Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2: { code: 2403, category: 1 /* Error */, key: "Subsequent variable declarations must have the same type. Variable '{0}' must be of type '{1}', but here has type '{2}'." }, - The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation: { code: 2404, category: 1 /* Error */, key: "The left-hand side of a 'for...in' statement cannot use a type annotation." }, - The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any: { code: 2405, category: 1 /* Error */, key: "The left-hand side of a 'for...in' statement must be of type 'string' or 'any'." }, - Invalid_left_hand_side_in_for_in_statement: { code: 2406, category: 1 /* Error */, key: "Invalid left-hand side in 'for...in' statement." }, - The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter: { code: 2407, category: 1 /* Error */, key: "The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter." }, - Setters_cannot_return_a_value: { code: 2408, category: 1 /* Error */, key: "Setters cannot return a value." }, - Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class: { code: 2409, category: 1 /* Error */, key: "Return type of constructor signature must be assignable to the instance type of the class" }, - All_symbols_within_a_with_block_will_be_resolved_to_any: { code: 2410, category: 1 /* Error */, key: "All symbols within a 'with' block will be resolved to 'any'." }, - Property_0_of_type_1_is_not_assignable_to_string_index_type_2: { code: 2411, category: 1 /* Error */, key: "Property '{0}' of type '{1}' is not assignable to string index type '{2}'." }, - Property_0_of_type_1_is_not_assignable_to_numeric_index_type_2: { code: 2412, category: 1 /* Error */, key: "Property '{0}' of type '{1}' is not assignable to numeric index type '{2}'." }, - Numeric_index_type_0_is_not_assignable_to_string_index_type_1: { code: 2413, category: 1 /* Error */, key: "Numeric index type '{0}' is not assignable to string index type '{1}'." }, - Class_name_cannot_be_0: { code: 2414, category: 1 /* Error */, key: "Class name cannot be '{0}'" }, - Class_0_incorrectly_extends_base_class_1: { code: 2415, category: 1 /* Error */, key: "Class '{0}' incorrectly extends base class '{1}'." }, - Class_static_side_0_incorrectly_extends_base_class_static_side_1: { code: 2417, category: 1 /* Error */, key: "Class static side '{0}' incorrectly extends base class static side '{1}'." }, - Type_name_0_in_extends_clause_does_not_reference_constructor_function_for_0: { code: 2419, category: 1 /* Error */, key: "Type name '{0}' in extends clause does not reference constructor function for '{0}'." }, - Class_0_incorrectly_implements_interface_1: { code: 2420, category: 1 /* Error */, key: "Class '{0}' incorrectly implements interface '{1}'." }, - A_class_may_only_implement_another_class_or_interface: { code: 2422, category: 1 /* Error */, key: "A class may only implement another class or interface." }, - Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor: { code: 2423, category: 1 /* Error */, key: "Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member accessor." }, - Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_property: { code: 2424, category: 1 /* Error */, key: "Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member property." }, - Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_function: { code: 2425, category: 1 /* Error */, key: "Class '{0}' defines instance member property '{1}', but extended class '{2}' defines it as instance member function." }, - Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_function: { code: 2426, category: 1 /* Error */, key: "Class '{0}' defines instance member accessor '{1}', but extended class '{2}' defines it as instance member function." }, - Interface_name_cannot_be_0: { code: 2427, category: 1 /* Error */, key: "Interface name cannot be '{0}'" }, - All_declarations_of_an_interface_must_have_identical_type_parameters: { code: 2428, category: 1 /* Error */, key: "All declarations of an interface must have identical type parameters." }, - Interface_0_incorrectly_extends_interface_1: { code: 2430, category: 1 /* Error */, key: "Interface '{0}' incorrectly extends interface '{1}'." }, - Enum_name_cannot_be_0: { code: 2431, category: 1 /* Error */, key: "Enum name cannot be '{0}'" }, - In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enum_element: { code: 2432, category: 1 /* Error */, key: "In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element." }, - A_module_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merged: { code: 2433, category: 1 /* Error */, key: "A module declaration cannot be in a different file from a class or function with which it is merged" }, - A_module_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged: { code: 2434, category: 1 /* Error */, key: "A module declaration cannot be located prior to a class or function with which it is merged" }, - Ambient_external_modules_cannot_be_nested_in_other_modules: { code: 2435, category: 1 /* Error */, key: "Ambient external modules cannot be nested in other modules." }, - Ambient_external_module_declaration_cannot_specify_relative_module_name: { code: 2436, category: 1 /* Error */, key: "Ambient external module declaration cannot specify relative module name." }, - Module_0_is_hidden_by_a_local_declaration_with_the_same_name: { code: 2437, category: 1 /* Error */, key: "Module '{0}' is hidden by a local declaration with the same name" }, - Import_name_cannot_be_0: { code: 2438, category: 1 /* Error */, key: "Import name cannot be '{0}'" }, - Import_declaration_in_an_ambient_external_module_declaration_cannot_reference_external_module_through_relative_external_module_name: { code: 2439, category: 1 /* Error */, key: "Import declaration in an ambient external module declaration cannot reference external module through relative external module name." }, - Import_declaration_conflicts_with_local_declaration_of_0: { code: 2440, category: 1 /* Error */, key: "Import declaration conflicts with local declaration of '{0}'" }, - Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_an_external_module: { code: 2441, category: 1 /* Error */, key: "Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of an external module." }, - Types_have_separate_declarations_of_a_private_property_0: { code: 2442, category: 1 /* Error */, key: "Types have separate declarations of a private property '{0}'." }, - Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2: { code: 2443, category: 1 /* Error */, key: "Property '{0}' is protected but type '{1}' is not a class derived from '{2}'." }, - Property_0_is_protected_in_type_1_but_public_in_type_2: { code: 2444, category: 1 /* Error */, key: "Property '{0}' is protected in type '{1}' but public in type '{2}'." }, - Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses: { code: 2445, category: 1 /* Error */, key: "Property '{0}' is protected and only accessible within class '{1}' and its subclasses." }, - Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1: { code: 2446, category: 1 /* Error */, key: "Property '{0}' is protected and only accessible through an instance of class '{1}'." }, - The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead: { code: 2447, category: 1 /* Error */, key: "The '{0}' operator is not allowed for boolean types. Consider using '{1}' instead." }, - Block_scoped_variable_0_used_before_its_declaration: { code: 2448, category: 1 /* Error */, key: "Block-scoped variable '{0}' used before its declaration.", isEarly: true }, - The_operand_of_an_increment_or_decrement_operator_cannot_be_a_constant: { code: 2449, category: 1 /* Error */, key: "The operand of an increment or decrement operator cannot be a constant.", isEarly: true }, - Left_hand_side_of_assignment_expression_cannot_be_a_constant: { code: 2450, category: 1 /* Error */, key: "Left-hand side of assignment expression cannot be a constant.", isEarly: true }, - Cannot_redeclare_block_scoped_variable_0: { code: 2451, category: 1 /* Error */, key: "Cannot redeclare block-scoped variable '{0}'.", isEarly: true }, - An_enum_member_cannot_have_a_numeric_name: { code: 2452, category: 1 /* Error */, key: "An enum member cannot have a numeric name." }, - The_type_argument_for_type_parameter_0_cannot_be_inferred_from_the_usage_Consider_specifying_the_type_arguments_explicitly: { code: 2453, category: 1 /* Error */, key: "The type argument for type parameter '{0}' cannot be inferred from the usage. Consider specifying the type arguments explicitly." }, - Type_argument_candidate_1_is_not_a_valid_type_argument_because_it_is_not_a_supertype_of_candidate_0: { code: 2455, category: 1 /* Error */, key: "Type argument candidate '{1}' is not a valid type argument because it is not a supertype of candidate '{0}'." }, - Type_alias_0_circularly_references_itself: { code: 2456, category: 1 /* Error */, key: "Type alias '{0}' circularly references itself." }, - Type_alias_name_cannot_be_0: { code: 2457, category: 1 /* Error */, key: "Type alias name cannot be '{0}'" }, - Import_declaration_0_is_using_private_name_1: { code: 4000, category: 1 /* Error */, key: "Import declaration '{0}' is using private name '{1}'." }, - Type_parameter_0_of_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 4001, category: 1 /* Error */, key: "Type parameter '{0}' of exported class has or is using name '{1}' from private module '{2}'." }, - Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: { code: 4002, category: 1 /* Error */, key: "Type parameter '{0}' of exported class has or is using private name '{1}'." }, - Type_parameter_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2: { code: 4003, category: 1 /* Error */, key: "Type parameter '{0}' of exported interface has or is using name '{1}' from private module '{2}'." }, - Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: { code: 4004, category: 1 /* Error */, key: "Type parameter '{0}' of exported interface has or is using private name '{1}'." }, - Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2: { code: 4005, category: 1 /* Error */, key: "Type parameter '{0}' of constructor signature from exported interface has or is using name '{1}' from private module '{2}'." }, - Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1: { code: 4006, category: 1 /* Error */, key: "Type parameter '{0}' of constructor signature from exported interface has or is using private name '{1}'." }, - Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2: { code: 4007, category: 1 /* Error */, key: "Type parameter '{0}' of call signature from exported interface has or is using name '{1}' from private module '{2}'." }, - Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1: { code: 4008, category: 1 /* Error */, key: "Type parameter '{0}' of call signature from exported interface has or is using private name '{1}'." }, - Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 4009, category: 1 /* Error */, key: "Type parameter '{0}' of public static method from exported class has or is using name '{1}' from private module '{2}'." }, - Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1: { code: 4010, category: 1 /* Error */, key: "Type parameter '{0}' of public static method from exported class has or is using private name '{1}'." }, - Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 4011, category: 1 /* Error */, key: "Type parameter '{0}' of public method from exported class has or is using name '{1}' from private module '{2}'." }, - Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1: { code: 4012, category: 1 /* Error */, key: "Type parameter '{0}' of public method from exported class has or is using private name '{1}'." }, - Type_parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2: { code: 4013, category: 1 /* Error */, key: "Type parameter '{0}' of method from exported interface has or is using name '{1}' from private module '{2}'." }, - Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1: { code: 4014, category: 1 /* Error */, key: "Type parameter '{0}' of method from exported interface has or is using private name '{1}'." }, - Type_parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2: { code: 4015, category: 1 /* Error */, key: "Type parameter '{0}' of exported function has or is using name '{1}' from private module '{2}'." }, - Type_parameter_0_of_exported_function_has_or_is_using_private_name_1: { code: 4016, category: 1 /* Error */, key: "Type parameter '{0}' of exported function has or is using private name '{1}'." }, - Implements_clause_of_exported_class_0_has_or_is_using_name_1_from_private_module_2: { code: 4017, category: 1 /* Error */, key: "Implements clause of exported class '{0}' has or is using name '{1}' from private module '{2}'." }, - Extends_clause_of_exported_class_0_has_or_is_using_name_1_from_private_module_2: { code: 4018, category: 1 /* Error */, key: "Extends clause of exported class '{0}' has or is using name '{1}' from private module '{2}'." }, - Implements_clause_of_exported_class_0_has_or_is_using_private_name_1: { code: 4019, category: 1 /* Error */, key: "Implements clause of exported class '{0}' has or is using private name '{1}'." }, - Extends_clause_of_exported_class_0_has_or_is_using_private_name_1: { code: 4020, category: 1 /* Error */, key: "Extends clause of exported class '{0}' has or is using private name '{1}'." }, - Extends_clause_of_exported_interface_0_has_or_is_using_name_1_from_private_module_2: { code: 4021, category: 1 /* Error */, key: "Extends clause of exported interface '{0}' has or is using name '{1}' from private module '{2}'." }, - Extends_clause_of_exported_interface_0_has_or_is_using_private_name_1: { code: 4022, category: 1 /* Error */, key: "Extends clause of exported interface '{0}' has or is using private name '{1}'." }, - Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: { code: 4023, category: 1 /* Error */, key: "Exported variable '{0}' has or is using name '{1}' from external module {2} but cannot be named." }, - Exported_variable_0_has_or_is_using_name_1_from_private_module_2: { code: 4024, category: 1 /* Error */, key: "Exported variable '{0}' has or is using name '{1}' from private module '{2}'." }, - Exported_variable_0_has_or_is_using_private_name_1: { code: 4025, category: 1 /* Error */, key: "Exported variable '{0}' has or is using private name '{1}'." }, - Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: { code: 4026, category: 1 /* Error */, key: "Public static property '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named." }, - Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 4027, category: 1 /* Error */, key: "Public static property '{0}' of exported class has or is using name '{1}' from private module '{2}'." }, - Public_static_property_0_of_exported_class_has_or_is_using_private_name_1: { code: 4028, category: 1 /* Error */, key: "Public static property '{0}' of exported class has or is using private name '{1}'." }, - Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: { code: 4029, category: 1 /* Error */, key: "Public property '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named." }, - Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 4030, category: 1 /* Error */, key: "Public property '{0}' of exported class has or is using name '{1}' from private module '{2}'." }, - Public_property_0_of_exported_class_has_or_is_using_private_name_1: { code: 4031, category: 1 /* Error */, key: "Public property '{0}' of exported class has or is using private name '{1}'." }, - Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2: { code: 4032, category: 1 /* Error */, key: "Property '{0}' of exported interface has or is using name '{1}' from private module '{2}'." }, - Property_0_of_exported_interface_has_or_is_using_private_name_1: { code: 4033, category: 1 /* Error */, key: "Property '{0}' of exported interface has or is using private name '{1}'." }, - Parameter_0_of_public_static_property_setter_from_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 4034, category: 1 /* Error */, key: "Parameter '{0}' of public static property setter from exported class has or is using name '{1}' from private module '{2}'." }, - Parameter_0_of_public_static_property_setter_from_exported_class_has_or_is_using_private_name_1: { code: 4035, category: 1 /* Error */, key: "Parameter '{0}' of public static property setter from exported class has or is using private name '{1}'." }, - Parameter_0_of_public_property_setter_from_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 4036, category: 1 /* Error */, key: "Parameter '{0}' of public property setter from exported class has or is using name '{1}' from private module '{2}'." }, - Parameter_0_of_public_property_setter_from_exported_class_has_or_is_using_private_name_1: { code: 4037, category: 1 /* Error */, key: "Parameter '{0}' of public property setter from exported class has or is using private name '{1}'." }, - Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: { code: 4038, category: 1 /* Error */, key: "Return type of public static property getter from exported class has or is using name '{0}' from external module {1} but cannot be named." }, - Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_name_0_from_private_module_1: { code: 4039, category: 1 /* Error */, key: "Return type of public static property getter from exported class has or is using name '{0}' from private module '{1}'." }, - Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_private_name_0: { code: 4040, category: 1 /* Error */, key: "Return type of public static property getter from exported class has or is using private name '{0}'." }, - Return_type_of_public_property_getter_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: { code: 4041, category: 1 /* Error */, key: "Return type of public property getter from exported class has or is using name '{0}' from external module {1} but cannot be named." }, - Return_type_of_public_property_getter_from_exported_class_has_or_is_using_name_0_from_private_module_1: { code: 4042, category: 1 /* Error */, key: "Return type of public property getter from exported class has or is using name '{0}' from private module '{1}'." }, - Return_type_of_public_property_getter_from_exported_class_has_or_is_using_private_name_0: { code: 4043, category: 1 /* Error */, key: "Return type of public property getter from exported class has or is using private name '{0}'." }, - Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1: { code: 4044, category: 1 /* Error */, key: "Return type of constructor signature from exported interface has or is using name '{0}' from private module '{1}'." }, - Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0: { code: 4045, category: 1 /* Error */, key: "Return type of constructor signature from exported interface has or is using private name '{0}'." }, - Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1: { code: 4046, category: 1 /* Error */, key: "Return type of call signature from exported interface has or is using name '{0}' from private module '{1}'." }, - Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0: { code: 4047, category: 1 /* Error */, key: "Return type of call signature from exported interface has or is using private name '{0}'." }, - Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1: { code: 4048, category: 1 /* Error */, key: "Return type of index signature from exported interface has or is using name '{0}' from private module '{1}'." }, - Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0: { code: 4049, category: 1 /* Error */, key: "Return type of index signature from exported interface has or is using private name '{0}'." }, - Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: { code: 4050, category: 1 /* Error */, key: "Return type of public static method from exported class has or is using name '{0}' from external module {1} but cannot be named." }, - Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1: { code: 4051, category: 1 /* Error */, key: "Return type of public static method from exported class has or is using name '{0}' from private module '{1}'." }, - Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0: { code: 4052, category: 1 /* Error */, key: "Return type of public static method from exported class has or is using private name '{0}'." }, - Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: { code: 4053, category: 1 /* Error */, key: "Return type of public method from exported class has or is using name '{0}' from external module {1} but cannot be named." }, - Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1: { code: 4054, category: 1 /* Error */, key: "Return type of public method from exported class has or is using name '{0}' from private module '{1}'." }, - Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0: { code: 4055, category: 1 /* Error */, key: "Return type of public method from exported class has or is using private name '{0}'." }, - Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1: { code: 4056, category: 1 /* Error */, key: "Return type of method from exported interface has or is using name '{0}' from private module '{1}'." }, - Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0: { code: 4057, category: 1 /* Error */, key: "Return type of method from exported interface has or is using private name '{0}'." }, - Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: { code: 4058, category: 1 /* Error */, key: "Return type of exported function has or is using name '{0}' from external module {1} but cannot be named." }, - Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1: { code: 4059, category: 1 /* Error */, key: "Return type of exported function has or is using name '{0}' from private module '{1}'." }, - Return_type_of_exported_function_has_or_is_using_private_name_0: { code: 4060, category: 1 /* Error */, key: "Return type of exported function has or is using private name '{0}'." }, - Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: { code: 4061, category: 1 /* Error */, key: "Parameter '{0}' of constructor from exported class has or is using name '{1}' from external module {2} but cannot be named." }, - Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 4062, category: 1 /* Error */, key: "Parameter '{0}' of constructor from exported class has or is using name '{1}' from private module '{2}'." }, - Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1: { code: 4063, category: 1 /* Error */, key: "Parameter '{0}' of constructor from exported class has or is using private name '{1}'." }, - Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2: { code: 4064, category: 1 /* Error */, key: "Parameter '{0}' of constructor signature from exported interface has or is using name '{1}' from private module '{2}'." }, - Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1: { code: 4065, category: 1 /* Error */, key: "Parameter '{0}' of constructor signature from exported interface has or is using private name '{1}'." }, - Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2: { code: 4066, category: 1 /* Error */, key: "Parameter '{0}' of call signature from exported interface has or is using name '{1}' from private module '{2}'." }, - Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1: { code: 4067, category: 1 /* Error */, key: "Parameter '{0}' of call signature from exported interface has or is using private name '{1}'." }, - Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: { code: 4068, category: 1 /* Error */, key: "Parameter '{0}' of public static method from exported class has or is using name '{1}' from external module {2} but cannot be named." }, - Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 4069, category: 1 /* Error */, key: "Parameter '{0}' of public static method from exported class has or is using name '{1}' from private module '{2}'." }, - Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1: { code: 4070, category: 1 /* Error */, key: "Parameter '{0}' of public static method from exported class has or is using private name '{1}'." }, - Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: { code: 4071, category: 1 /* Error */, key: "Parameter '{0}' of public method from exported class has or is using name '{1}' from external module {2} but cannot be named." }, - Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 4072, category: 1 /* Error */, key: "Parameter '{0}' of public method from exported class has or is using name '{1}' from private module '{2}'." }, - Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1: { code: 4073, category: 1 /* Error */, key: "Parameter '{0}' of public method from exported class has or is using private name '{1}'." }, - Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2: { code: 4074, category: 1 /* Error */, key: "Parameter '{0}' of method from exported interface has or is using name '{1}' from private module '{2}'." }, - Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1: { code: 4075, category: 1 /* Error */, key: "Parameter '{0}' of method from exported interface has or is using private name '{1}'." }, - Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: { code: 4076, category: 1 /* Error */, key: "Parameter '{0}' of exported function has or is using name '{1}' from external module {2} but cannot be named." }, - Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2: { code: 4077, category: 1 /* Error */, key: "Parameter '{0}' of exported function has or is using name '{1}' from private module '{2}'." }, - Parameter_0_of_exported_function_has_or_is_using_private_name_1: { code: 4078, category: 1 /* Error */, key: "Parameter '{0}' of exported function has or is using private name '{1}'." }, - Exported_type_alias_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: { code: 4079, category: 1 /* Error */, key: "Exported type alias '{0}' has or is using name '{1}' from external module {2} but cannot be named." }, - Exported_type_alias_0_has_or_is_using_name_1_from_private_module_2: { code: 4080, category: 1 /* Error */, key: "Exported type alias '{0}' has or is using name '{1}' from private module '{2}'." }, - Exported_type_alias_0_has_or_is_using_private_name_1: { code: 4081, category: 1 /* Error */, key: "Exported type alias '{0}' has or is using private name '{1}'." }, - Enum_declarations_must_all_be_const_or_non_const: { code: 4082, category: 1 /* Error */, key: "Enum declarations must all be const or non-const." }, - In_const_enum_declarations_member_initializer_must_be_constant_expression: { code: 4083, category: 1 /* Error */, key: "In 'const' enum declarations member initializer must be constant expression.", isEarly: true }, - const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment: { code: 4084, category: 1 /* Error */, key: "'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment." }, - Index_expression_arguments_in_const_enums_must_be_of_type_string: { code: 4085, category: 1 /* Error */, key: "Index expression arguments in 'const' enums must be of type 'string'." }, - const_enum_member_initializer_was_evaluated_to_a_non_finite_value: { code: 4086, category: 1 /* Error */, key: "'const' enum member initializer was evaluated to a non-finite value." }, - const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN: { code: 4087, category: 1 /* Error */, key: "'const' enum member initializer was evaluated to disallowed value 'NaN'." }, - The_current_host_does_not_support_the_0_option: { code: 5001, category: 1 /* Error */, key: "The current host does not support the '{0}' option." }, - Cannot_find_the_common_subdirectory_path_for_the_input_files: { code: 5009, category: 1 /* Error */, key: "Cannot find the common subdirectory path for the input files." }, - Cannot_read_file_0_Colon_1: { code: 5012, category: 1 /* Error */, key: "Cannot read file '{0}': {1}" }, - Unsupported_file_encoding: { code: 5013, category: 1 /* Error */, key: "Unsupported file encoding." }, - Unknown_compiler_option_0: { code: 5023, category: 1 /* Error */, key: "Unknown compiler option '{0}'." }, - Could_not_write_file_0_Colon_1: { code: 5033, category: 1 /* Error */, key: "Could not write file '{0}': {1}" }, - Option_mapRoot_cannot_be_specified_without_specifying_sourcemap_option: { code: 5038, category: 1 /* Error */, key: "Option mapRoot cannot be specified without specifying sourcemap option." }, - Option_sourceRoot_cannot_be_specified_without_specifying_sourcemap_option: { code: 5039, category: 1 /* Error */, key: "Option sourceRoot cannot be specified without specifying sourcemap option." }, - Concatenate_and_emit_output_to_single_file: { code: 6001, category: 2 /* Message */, key: "Concatenate and emit output to single file." }, - Generates_corresponding_d_ts_file: { code: 6002, category: 2 /* Message */, key: "Generates corresponding '.d.ts' file." }, - Specifies_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations: { code: 6003, category: 2 /* Message */, key: "Specifies the location where debugger should locate map files instead of generated locations." }, - Specifies_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations: { code: 6004, category: 2 /* Message */, key: "Specifies the location where debugger should locate TypeScript files instead of source locations." }, - Watch_input_files: { code: 6005, category: 2 /* Message */, key: "Watch input files." }, - Redirect_output_structure_to_the_directory: { code: 6006, category: 2 /* Message */, key: "Redirect output structure to the directory." }, - Do_not_erase_const_enum_declarations_in_generated_code: { code: 6007, category: 2 /* Message */, key: "Do not erase const enum declarations in generated code." }, - Do_not_emit_comments_to_output: { code: 6009, category: 2 /* Message */, key: "Do not emit comments to output." }, - Specify_ECMAScript_target_version_Colon_ES3_default_ES5_or_ES6_experimental: { code: 6015, category: 2 /* Message */, key: "Specify ECMAScript target version: 'ES3' (default), 'ES5', or 'ES6' (experimental)" }, - Specify_module_code_generation_Colon_commonjs_or_amd: { code: 6016, category: 2 /* Message */, key: "Specify module code generation: 'commonjs' or 'amd'" }, - Print_this_message: { code: 6017, category: 2 /* Message */, key: "Print this message." }, - Print_the_compiler_s_version: { code: 6019, category: 2 /* Message */, key: "Print the compiler's version." }, - Syntax_Colon_0: { code: 6023, category: 2 /* Message */, key: "Syntax: {0}" }, - options: { code: 6024, category: 2 /* Message */, key: "options" }, - file: { code: 6025, category: 2 /* Message */, key: "file" }, - Examples_Colon_0: { code: 6026, category: 2 /* Message */, key: "Examples: {0}" }, - Options_Colon: { code: 6027, category: 2 /* Message */, key: "Options:" }, - Version_0: { code: 6029, category: 2 /* Message */, key: "Version {0}" }, - Insert_command_line_options_and_files_from_a_file: { code: 6030, category: 2 /* Message */, key: "Insert command line options and files from a file." }, - File_change_detected_Compiling: { code: 6032, category: 2 /* Message */, key: "File change detected. Compiling..." }, - KIND: { code: 6034, category: 2 /* Message */, key: "KIND" }, - FILE: { code: 6035, category: 2 /* Message */, key: "FILE" }, - VERSION: { code: 6036, category: 2 /* Message */, key: "VERSION" }, - LOCATION: { code: 6037, category: 2 /* Message */, key: "LOCATION" }, - DIRECTORY: { code: 6038, category: 2 /* Message */, key: "DIRECTORY" }, - Compilation_complete_Watching_for_file_changes: { code: 6042, category: 2 /* Message */, key: "Compilation complete. Watching for file changes." }, - Generates_corresponding_map_file: { code: 6043, category: 2 /* Message */, key: "Generates corresponding '.map' file." }, - Compiler_option_0_expects_an_argument: { code: 6044, category: 1 /* Error */, key: "Compiler option '{0}' expects an argument." }, - Unterminated_quoted_string_in_response_file_0: { code: 6045, category: 1 /* Error */, key: "Unterminated quoted string in response file '{0}'." }, - Argument_for_module_option_must_be_commonjs_or_amd: { code: 6046, category: 1 /* Error */, key: "Argument for '--module' option must be 'commonjs' or 'amd'." }, - Argument_for_target_option_must_be_es3_es5_or_es6: { code: 6047, category: 1 /* Error */, key: "Argument for '--target' option must be 'es3', 'es5', or 'es6'." }, - Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1: { code: 6048, category: 1 /* Error */, key: "Locale must be of the form or -. For example '{0}' or '{1}'." }, - Unsupported_locale_0: { code: 6049, category: 1 /* Error */, key: "Unsupported locale '{0}'." }, - Unable_to_open_file_0: { code: 6050, category: 1 /* Error */, key: "Unable to open file '{0}'." }, - Corrupted_locale_file_0: { code: 6051, category: 1 /* Error */, key: "Corrupted locale file {0}." }, - Warn_on_expressions_and_declarations_with_an_implied_any_type: { code: 6052, category: 2 /* Message */, key: "Warn on expressions and declarations with an implied 'any' type." }, - File_0_not_found: { code: 6053, category: 1 /* Error */, key: "File '{0}' not found." }, - File_0_must_have_extension_ts_or_d_ts: { code: 6054, category: 1 /* Error */, key: "File '{0}' must have extension '.ts' or '.d.ts'." }, - Variable_0_implicitly_has_an_1_type: { code: 7005, category: 1 /* Error */, key: "Variable '{0}' implicitly has an '{1}' type." }, - Parameter_0_implicitly_has_an_1_type: { code: 7006, category: 1 /* Error */, key: "Parameter '{0}' implicitly has an '{1}' type." }, - Member_0_implicitly_has_an_1_type: { code: 7008, category: 1 /* Error */, key: "Member '{0}' implicitly has an '{1}' type." }, - new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type: { code: 7009, category: 1 /* Error */, key: "'new' expression, whose target lacks a construct signature, implicitly has an 'any' type." }, - _0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type: { code: 7010, category: 1 /* Error */, key: "'{0}', which lacks return-type annotation, implicitly has an '{1}' return type." }, - Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type: { code: 7011, category: 1 /* Error */, key: "Function expression, which lacks return-type annotation, implicitly has an '{0}' return type." }, - Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type: { code: 7013, category: 1 /* Error */, key: "Construct signature, which lacks return-type annotation, implicitly has an 'any' return type." }, - Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_type_annotation: { code: 7016, category: 1 /* Error */, key: "Property '{0}' implicitly has type 'any', because its 'set' accessor lacks a type annotation." }, - Index_signature_of_object_type_implicitly_has_an_any_type: { code: 7017, category: 1 /* Error */, key: "Index signature of object type implicitly has an 'any' type." }, - Object_literal_s_property_0_implicitly_has_an_1_type: { code: 7018, category: 1 /* Error */, key: "Object literal's property '{0}' implicitly has an '{1}' type." }, - Rest_parameter_0_implicitly_has_an_any_type: { code: 7019, category: 1 /* Error */, key: "Rest parameter '{0}' implicitly has an 'any[]' type." }, - Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type: { code: 7020, category: 1 /* Error */, key: "Call signature, which lacks return-type annotation, implicitly has an 'any' return type." }, - _0_implicitly_has_type_any_because_it_is_referenced_directly_or_indirectly_in_its_own_type_annotation: { code: 7021, category: 1 /* Error */, key: "'{0}' implicitly has type 'any' because it is referenced directly or indirectly in its own type annotation." }, - _0_implicitly_has_type_any_because_it_is_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer: { code: 7022, category: 1 /* Error */, key: "'{0}' implicitly has type 'any' because it is does not have a type annotation and is referenced directly or indirectly in its own initializer." }, - _0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions: { code: 7023, category: 1 /* Error */, key: "'{0}' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions." }, - Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions: { code: 7024, category: 1 /* Error */, key: "Function implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions." }, - You_cannot_rename_this_element: { code: 8000, category: 1 /* Error */, key: "You cannot rename this element." } - }; -})(ts || (ts = {})); -var ts; -(function (ts) { - var textToToken = { - "any": 109 /* AnyKeyword */, - "boolean": 110 /* BooleanKeyword */, - "break": 64 /* BreakKeyword */, - "case": 65 /* CaseKeyword */, - "catch": 66 /* CatchKeyword */, - "class": 67 /* ClassKeyword */, - "continue": 69 /* ContinueKeyword */, - "const": 68 /* ConstKeyword */, - "constructor": 111 /* ConstructorKeyword */, - "debugger": 70 /* DebuggerKeyword */, - "declare": 112 /* DeclareKeyword */, - "default": 71 /* DefaultKeyword */, - "delete": 72 /* DeleteKeyword */, - "do": 73 /* DoKeyword */, - "else": 74 /* ElseKeyword */, - "enum": 75 /* EnumKeyword */, - "export": 76 /* ExportKeyword */, - "extends": 77 /* ExtendsKeyword */, - "false": 78 /* FalseKeyword */, - "finally": 79 /* FinallyKeyword */, - "for": 80 /* ForKeyword */, - "function": 81 /* FunctionKeyword */, - "get": 113 /* GetKeyword */, - "if": 82 /* IfKeyword */, - "implements": 100 /* ImplementsKeyword */, - "import": 83 /* ImportKeyword */, - "in": 84 /* InKeyword */, - "instanceof": 85 /* InstanceOfKeyword */, - "interface": 101 /* InterfaceKeyword */, - "let": 102 /* LetKeyword */, - "module": 114 /* ModuleKeyword */, - "new": 86 /* NewKeyword */, - "null": 87 /* NullKeyword */, - "number": 116 /* NumberKeyword */, - "package": 103 /* PackageKeyword */, - "private": 104 /* PrivateKeyword */, - "protected": 105 /* ProtectedKeyword */, - "public": 106 /* PublicKeyword */, - "require": 115 /* RequireKeyword */, - "return": 88 /* ReturnKeyword */, - "set": 117 /* SetKeyword */, - "static": 107 /* StaticKeyword */, - "string": 118 /* StringKeyword */, - "super": 89 /* SuperKeyword */, - "switch": 90 /* SwitchKeyword */, - "this": 91 /* ThisKeyword */, - "throw": 92 /* ThrowKeyword */, - "true": 93 /* TrueKeyword */, - "try": 94 /* TryKeyword */, - "type": 119 /* TypeKeyword */, - "typeof": 95 /* TypeOfKeyword */, - "var": 96 /* VarKeyword */, - "void": 97 /* VoidKeyword */, - "while": 98 /* WhileKeyword */, - "with": 99 /* WithKeyword */, - "yield": 108 /* YieldKeyword */, - "{": 13 /* OpenBraceToken */, - "}": 14 /* CloseBraceToken */, - "(": 15 /* OpenParenToken */, - ")": 16 /* CloseParenToken */, - "[": 17 /* OpenBracketToken */, - "]": 18 /* CloseBracketToken */, - ".": 19 /* DotToken */, - "...": 20 /* DotDotDotToken */, - ";": 21 /* SemicolonToken */, - ",": 22 /* CommaToken */, - "<": 23 /* LessThanToken */, - ">": 24 /* GreaterThanToken */, - "<=": 25 /* LessThanEqualsToken */, - ">=": 26 /* GreaterThanEqualsToken */, - "==": 27 /* EqualsEqualsToken */, - "!=": 28 /* ExclamationEqualsToken */, - "===": 29 /* EqualsEqualsEqualsToken */, - "!==": 30 /* ExclamationEqualsEqualsToken */, - "=>": 31 /* EqualsGreaterThanToken */, - "+": 32 /* PlusToken */, - "-": 33 /* MinusToken */, - "*": 34 /* AsteriskToken */, - "/": 35 /* SlashToken */, - "%": 36 /* PercentToken */, - "++": 37 /* PlusPlusToken */, - "--": 38 /* MinusMinusToken */, - "<<": 39 /* LessThanLessThanToken */, - ">>": 40 /* GreaterThanGreaterThanToken */, - ">>>": 41 /* GreaterThanGreaterThanGreaterThanToken */, - "&": 42 /* AmpersandToken */, - "|": 43 /* BarToken */, - "^": 44 /* CaretToken */, - "!": 45 /* ExclamationToken */, - "~": 46 /* TildeToken */, - "&&": 47 /* AmpersandAmpersandToken */, - "||": 48 /* BarBarToken */, - "?": 49 /* QuestionToken */, - ":": 50 /* ColonToken */, - "=": 51 /* EqualsToken */, - "+=": 52 /* PlusEqualsToken */, - "-=": 53 /* MinusEqualsToken */, - "*=": 54 /* AsteriskEqualsToken */, - "/=": 55 /* SlashEqualsToken */, - "%=": 56 /* PercentEqualsToken */, - "<<=": 57 /* LessThanLessThanEqualsToken */, - ">>=": 58 /* GreaterThanGreaterThanEqualsToken */, - ">>>=": 59 /* GreaterThanGreaterThanGreaterThanEqualsToken */, - "&=": 60 /* AmpersandEqualsToken */, - "|=": 61 /* BarEqualsToken */, - "^=": 62 /* CaretEqualsToken */ - }; - var unicodeES3IdentifierStart = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 543, 546, 563, 592, 685, 688, 696, 699, 705, 720, 721, 736, 740, 750, 750, 890, 890, 902, 902, 904, 906, 908, 908, 910, 929, 931, 974, 976, 983, 986, 1011, 1024, 1153, 1164, 1220, 1223, 1224, 1227, 1228, 1232, 1269, 1272, 1273, 1329, 1366, 1369, 1369, 1377, 1415, 1488, 1514, 1520, 1522, 1569, 1594, 1600, 1610, 1649, 1747, 1749, 1749, 1765, 1766, 1786, 1788, 1808, 1808, 1810, 1836, 1920, 1957, 2309, 2361, 2365, 2365, 2384, 2384, 2392, 2401, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2524, 2525, 2527, 2529, 2544, 2545, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2649, 2652, 2654, 2654, 2674, 2676, 2693, 2699, 2701, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2749, 2749, 2768, 2768, 2784, 2784, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2870, 2873, 2877, 2877, 2908, 2909, 2911, 2913, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 2997, 2999, 3001, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3168, 3169, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3294, 3294, 3296, 3297, 3333, 3340, 3342, 3344, 3346, 3368, 3370, 3385, 3424, 3425, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3585, 3632, 3634, 3635, 3648, 3654, 3713, 3714, 3716, 3716, 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743, 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3760, 3762, 3763, 3773, 3773, 3776, 3780, 3782, 3782, 3804, 3805, 3840, 3840, 3904, 3911, 3913, 3946, 3976, 3979, 4096, 4129, 4131, 4135, 4137, 4138, 4176, 4181, 4256, 4293, 4304, 4342, 4352, 4441, 4447, 4514, 4520, 4601, 4608, 4614, 4616, 4678, 4680, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4742, 4744, 4744, 4746, 4749, 4752, 4782, 4784, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4814, 4816, 4822, 4824, 4846, 4848, 4878, 4880, 4880, 4882, 4885, 4888, 4894, 4896, 4934, 4936, 4954, 5024, 5108, 5121, 5740, 5743, 5750, 5761, 5786, 5792, 5866, 6016, 6067, 6176, 6263, 6272, 6312, 7680, 7835, 7840, 7929, 7936, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8319, 8319, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8497, 8499, 8505, 8544, 8579, 12293, 12295, 12321, 12329, 12337, 12341, 12344, 12346, 12353, 12436, 12445, 12446, 12449, 12538, 12540, 12542, 12549, 12588, 12593, 12686, 12704, 12727, 13312, 19893, 19968, 40869, 40960, 42124, 44032, 55203, 63744, 64045, 64256, 64262, 64275, 64279, 64285, 64285, 64287, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65136, 65138, 65140, 65140, 65142, 65276, 65313, 65338, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500,]; - var unicodeES3IdentifierPart = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 543, 546, 563, 592, 685, 688, 696, 699, 705, 720, 721, 736, 740, 750, 750, 768, 846, 864, 866, 890, 890, 902, 902, 904, 906, 908, 908, 910, 929, 931, 974, 976, 983, 986, 1011, 1024, 1153, 1155, 1158, 1164, 1220, 1223, 1224, 1227, 1228, 1232, 1269, 1272, 1273, 1329, 1366, 1369, 1369, 1377, 1415, 1425, 1441, 1443, 1465, 1467, 1469, 1471, 1471, 1473, 1474, 1476, 1476, 1488, 1514, 1520, 1522, 1569, 1594, 1600, 1621, 1632, 1641, 1648, 1747, 1749, 1756, 1759, 1768, 1770, 1773, 1776, 1788, 1808, 1836, 1840, 1866, 1920, 1968, 2305, 2307, 2309, 2361, 2364, 2381, 2384, 2388, 2392, 2403, 2406, 2415, 2433, 2435, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2492, 2492, 2494, 2500, 2503, 2504, 2507, 2509, 2519, 2519, 2524, 2525, 2527, 2531, 2534, 2545, 2562, 2562, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2620, 2620, 2622, 2626, 2631, 2632, 2635, 2637, 2649, 2652, 2654, 2654, 2662, 2676, 2689, 2691, 2693, 2699, 2701, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2748, 2757, 2759, 2761, 2763, 2765, 2768, 2768, 2784, 2784, 2790, 2799, 2817, 2819, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2870, 2873, 2876, 2883, 2887, 2888, 2891, 2893, 2902, 2903, 2908, 2909, 2911, 2913, 2918, 2927, 2946, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 2997, 2999, 3001, 3006, 3010, 3014, 3016, 3018, 3021, 3031, 3031, 3047, 3055, 3073, 3075, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3134, 3140, 3142, 3144, 3146, 3149, 3157, 3158, 3168, 3169, 3174, 3183, 3202, 3203, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3262, 3268, 3270, 3272, 3274, 3277, 3285, 3286, 3294, 3294, 3296, 3297, 3302, 3311, 3330, 3331, 3333, 3340, 3342, 3344, 3346, 3368, 3370, 3385, 3390, 3395, 3398, 3400, 3402, 3405, 3415, 3415, 3424, 3425, 3430, 3439, 3458, 3459, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3530, 3530, 3535, 3540, 3542, 3542, 3544, 3551, 3570, 3571, 3585, 3642, 3648, 3662, 3664, 3673, 3713, 3714, 3716, 3716, 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743, 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3769, 3771, 3773, 3776, 3780, 3782, 3782, 3784, 3789, 3792, 3801, 3804, 3805, 3840, 3840, 3864, 3865, 3872, 3881, 3893, 3893, 3895, 3895, 3897, 3897, 3902, 3911, 3913, 3946, 3953, 3972, 3974, 3979, 3984, 3991, 3993, 4028, 4038, 4038, 4096, 4129, 4131, 4135, 4137, 4138, 4140, 4146, 4150, 4153, 4160, 4169, 4176, 4185, 4256, 4293, 4304, 4342, 4352, 4441, 4447, 4514, 4520, 4601, 4608, 4614, 4616, 4678, 4680, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4742, 4744, 4744, 4746, 4749, 4752, 4782, 4784, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4814, 4816, 4822, 4824, 4846, 4848, 4878, 4880, 4880, 4882, 4885, 4888, 4894, 4896, 4934, 4936, 4954, 4969, 4977, 5024, 5108, 5121, 5740, 5743, 5750, 5761, 5786, 5792, 5866, 6016, 6099, 6112, 6121, 6160, 6169, 6176, 6263, 6272, 6313, 7680, 7835, 7840, 7929, 7936, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8255, 8256, 8319, 8319, 8400, 8412, 8417, 8417, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8497, 8499, 8505, 8544, 8579, 12293, 12295, 12321, 12335, 12337, 12341, 12344, 12346, 12353, 12436, 12441, 12442, 12445, 12446, 12449, 12542, 12549, 12588, 12593, 12686, 12704, 12727, 13312, 19893, 19968, 40869, 40960, 42124, 44032, 55203, 63744, 64045, 64256, 64262, 64275, 64279, 64285, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65056, 65059, 65075, 65076, 65101, 65103, 65136, 65138, 65140, 65140, 65142, 65276, 65296, 65305, 65313, 65338, 65343, 65343, 65345, 65370, 65381, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500,]; - var unicodeES5IdentifierStart = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 705, 710, 721, 736, 740, 748, 748, 750, 750, 880, 884, 886, 887, 890, 893, 902, 902, 904, 906, 908, 908, 910, 929, 931, 1013, 1015, 1153, 1162, 1319, 1329, 1366, 1369, 1369, 1377, 1415, 1488, 1514, 1520, 1522, 1568, 1610, 1646, 1647, 1649, 1747, 1749, 1749, 1765, 1766, 1774, 1775, 1786, 1788, 1791, 1791, 1808, 1808, 1810, 1839, 1869, 1957, 1969, 1969, 1994, 2026, 2036, 2037, 2042, 2042, 2048, 2069, 2074, 2074, 2084, 2084, 2088, 2088, 2112, 2136, 2208, 2208, 2210, 2220, 2308, 2361, 2365, 2365, 2384, 2384, 2392, 2401, 2417, 2423, 2425, 2431, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2493, 2493, 2510, 2510, 2524, 2525, 2527, 2529, 2544, 2545, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2649, 2652, 2654, 2654, 2674, 2676, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2749, 2749, 2768, 2768, 2784, 2785, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2869, 2873, 2877, 2877, 2908, 2909, 2911, 2913, 2929, 2929, 2947, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3024, 3024, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3133, 3133, 3160, 3161, 3168, 3169, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3261, 3261, 3294, 3294, 3296, 3297, 3313, 3314, 3333, 3340, 3342, 3344, 3346, 3386, 3389, 3389, 3406, 3406, 3424, 3425, 3450, 3455, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3585, 3632, 3634, 3635, 3648, 3654, 3713, 3714, 3716, 3716, 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743, 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3760, 3762, 3763, 3773, 3773, 3776, 3780, 3782, 3782, 3804, 3807, 3840, 3840, 3904, 3911, 3913, 3948, 3976, 3980, 4096, 4138, 4159, 4159, 4176, 4181, 4186, 4189, 4193, 4193, 4197, 4198, 4206, 4208, 4213, 4225, 4238, 4238, 4256, 4293, 4295, 4295, 4301, 4301, 4304, 4346, 4348, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4822, 4824, 4880, 4882, 4885, 4888, 4954, 4992, 5007, 5024, 5108, 5121, 5740, 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5872, 5888, 5900, 5902, 5905, 5920, 5937, 5952, 5969, 5984, 5996, 5998, 6000, 6016, 6067, 6103, 6103, 6108, 6108, 6176, 6263, 6272, 6312, 6314, 6314, 6320, 6389, 6400, 6428, 6480, 6509, 6512, 6516, 6528, 6571, 6593, 6599, 6656, 6678, 6688, 6740, 6823, 6823, 6917, 6963, 6981, 6987, 7043, 7072, 7086, 7087, 7098, 7141, 7168, 7203, 7245, 7247, 7258, 7293, 7401, 7404, 7406, 7409, 7413, 7414, 7424, 7615, 7680, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8305, 8305, 8319, 8319, 8336, 8348, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8505, 8508, 8511, 8517, 8521, 8526, 8526, 8544, 8584, 11264, 11310, 11312, 11358, 11360, 11492, 11499, 11502, 11506, 11507, 11520, 11557, 11559, 11559, 11565, 11565, 11568, 11623, 11631, 11631, 11648, 11670, 11680, 11686, 11688, 11694, 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726, 11728, 11734, 11736, 11742, 11823, 11823, 12293, 12295, 12321, 12329, 12337, 12341, 12344, 12348, 12353, 12438, 12445, 12447, 12449, 12538, 12540, 12543, 12549, 12589, 12593, 12686, 12704, 12730, 12784, 12799, 13312, 19893, 19968, 40908, 40960, 42124, 42192, 42237, 42240, 42508, 42512, 42527, 42538, 42539, 42560, 42606, 42623, 42647, 42656, 42735, 42775, 42783, 42786, 42888, 42891, 42894, 42896, 42899, 42912, 42922, 43000, 43009, 43011, 43013, 43015, 43018, 43020, 43042, 43072, 43123, 43138, 43187, 43250, 43255, 43259, 43259, 43274, 43301, 43312, 43334, 43360, 43388, 43396, 43442, 43471, 43471, 43520, 43560, 43584, 43586, 43588, 43595, 43616, 43638, 43642, 43642, 43648, 43695, 43697, 43697, 43701, 43702, 43705, 43709, 43712, 43712, 43714, 43714, 43739, 43741, 43744, 43754, 43762, 43764, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43814, 43816, 43822, 43968, 44002, 44032, 55203, 55216, 55238, 55243, 55291, 63744, 64109, 64112, 64217, 64256, 64262, 64275, 64279, 64285, 64285, 64287, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65136, 65140, 65142, 65276, 65313, 65338, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500,]; - var unicodeES5IdentifierPart = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 705, 710, 721, 736, 740, 748, 748, 750, 750, 768, 884, 886, 887, 890, 893, 902, 902, 904, 906, 908, 908, 910, 929, 931, 1013, 1015, 1153, 1155, 1159, 1162, 1319, 1329, 1366, 1369, 1369, 1377, 1415, 1425, 1469, 1471, 1471, 1473, 1474, 1476, 1477, 1479, 1479, 1488, 1514, 1520, 1522, 1552, 1562, 1568, 1641, 1646, 1747, 1749, 1756, 1759, 1768, 1770, 1788, 1791, 1791, 1808, 1866, 1869, 1969, 1984, 2037, 2042, 2042, 2048, 2093, 2112, 2139, 2208, 2208, 2210, 2220, 2276, 2302, 2304, 2403, 2406, 2415, 2417, 2423, 2425, 2431, 2433, 2435, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2492, 2500, 2503, 2504, 2507, 2510, 2519, 2519, 2524, 2525, 2527, 2531, 2534, 2545, 2561, 2563, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2620, 2620, 2622, 2626, 2631, 2632, 2635, 2637, 2641, 2641, 2649, 2652, 2654, 2654, 2662, 2677, 2689, 2691, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2748, 2757, 2759, 2761, 2763, 2765, 2768, 2768, 2784, 2787, 2790, 2799, 2817, 2819, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2869, 2873, 2876, 2884, 2887, 2888, 2891, 2893, 2902, 2903, 2908, 2909, 2911, 2915, 2918, 2927, 2929, 2929, 2946, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3006, 3010, 3014, 3016, 3018, 3021, 3024, 3024, 3031, 3031, 3046, 3055, 3073, 3075, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3133, 3140, 3142, 3144, 3146, 3149, 3157, 3158, 3160, 3161, 3168, 3171, 3174, 3183, 3202, 3203, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3260, 3268, 3270, 3272, 3274, 3277, 3285, 3286, 3294, 3294, 3296, 3299, 3302, 3311, 3313, 3314, 3330, 3331, 3333, 3340, 3342, 3344, 3346, 3386, 3389, 3396, 3398, 3400, 3402, 3406, 3415, 3415, 3424, 3427, 3430, 3439, 3450, 3455, 3458, 3459, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3530, 3530, 3535, 3540, 3542, 3542, 3544, 3551, 3570, 3571, 3585, 3642, 3648, 3662, 3664, 3673, 3713, 3714, 3716, 3716, 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743, 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3769, 3771, 3773, 3776, 3780, 3782, 3782, 3784, 3789, 3792, 3801, 3804, 3807, 3840, 3840, 3864, 3865, 3872, 3881, 3893, 3893, 3895, 3895, 3897, 3897, 3902, 3911, 3913, 3948, 3953, 3972, 3974, 3991, 3993, 4028, 4038, 4038, 4096, 4169, 4176, 4253, 4256, 4293, 4295, 4295, 4301, 4301, 4304, 4346, 4348, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4822, 4824, 4880, 4882, 4885, 4888, 4954, 4957, 4959, 4992, 5007, 5024, 5108, 5121, 5740, 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5872, 5888, 5900, 5902, 5908, 5920, 5940, 5952, 5971, 5984, 5996, 5998, 6000, 6002, 6003, 6016, 6099, 6103, 6103, 6108, 6109, 6112, 6121, 6155, 6157, 6160, 6169, 6176, 6263, 6272, 6314, 6320, 6389, 6400, 6428, 6432, 6443, 6448, 6459, 6470, 6509, 6512, 6516, 6528, 6571, 6576, 6601, 6608, 6617, 6656, 6683, 6688, 6750, 6752, 6780, 6783, 6793, 6800, 6809, 6823, 6823, 6912, 6987, 6992, 7001, 7019, 7027, 7040, 7155, 7168, 7223, 7232, 7241, 7245, 7293, 7376, 7378, 7380, 7414, 7424, 7654, 7676, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8204, 8205, 8255, 8256, 8276, 8276, 8305, 8305, 8319, 8319, 8336, 8348, 8400, 8412, 8417, 8417, 8421, 8432, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8505, 8508, 8511, 8517, 8521, 8526, 8526, 8544, 8584, 11264, 11310, 11312, 11358, 11360, 11492, 11499, 11507, 11520, 11557, 11559, 11559, 11565, 11565, 11568, 11623, 11631, 11631, 11647, 11670, 11680, 11686, 11688, 11694, 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726, 11728, 11734, 11736, 11742, 11744, 11775, 11823, 11823, 12293, 12295, 12321, 12335, 12337, 12341, 12344, 12348, 12353, 12438, 12441, 12442, 12445, 12447, 12449, 12538, 12540, 12543, 12549, 12589, 12593, 12686, 12704, 12730, 12784, 12799, 13312, 19893, 19968, 40908, 40960, 42124, 42192, 42237, 42240, 42508, 42512, 42539, 42560, 42607, 42612, 42621, 42623, 42647, 42655, 42737, 42775, 42783, 42786, 42888, 42891, 42894, 42896, 42899, 42912, 42922, 43000, 43047, 43072, 43123, 43136, 43204, 43216, 43225, 43232, 43255, 43259, 43259, 43264, 43309, 43312, 43347, 43360, 43388, 43392, 43456, 43471, 43481, 43520, 43574, 43584, 43597, 43600, 43609, 43616, 43638, 43642, 43643, 43648, 43714, 43739, 43741, 43744, 43759, 43762, 43766, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43814, 43816, 43822, 43968, 44010, 44012, 44013, 44016, 44025, 44032, 55203, 55216, 55238, 55243, 55291, 63744, 64109, 64112, 64217, 64256, 64262, 64275, 64279, 64285, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65024, 65039, 65056, 65062, 65075, 65076, 65101, 65103, 65136, 65140, 65142, 65276, 65296, 65305, 65313, 65338, 65343, 65343, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500,]; - function lookupInUnicodeMap(code, map) { - if (code < map[0]) { - return false; - } - var lo = 0; - var hi = map.length; - var mid; - while (lo + 1 < hi) { - mid = lo + (hi - lo) / 2; - mid -= mid % 2; - if (map[mid] <= code && code <= map[mid + 1]) { - return true; - } - if (code < map[mid]) { - hi = mid; - } - else { - lo = mid + 2; - } - } - return false; - } - function isUnicodeIdentifierStart(code, languageVersion) { - return languageVersion === 0 /* ES3 */ ? lookupInUnicodeMap(code, unicodeES3IdentifierStart) : lookupInUnicodeMap(code, unicodeES5IdentifierStart); - } - function isUnicodeIdentifierPart(code, languageVersion) { - return languageVersion === 0 /* ES3 */ ? lookupInUnicodeMap(code, unicodeES3IdentifierPart) : lookupInUnicodeMap(code, unicodeES5IdentifierPart); - } - function makeReverseMap(source) { - var result = []; - for (var name in source) { - if (source.hasOwnProperty(name)) { - result[source[name]] = name; - } - } - return result; - } - var tokenStrings = makeReverseMap(textToToken); - function tokenToString(t) { - return tokenStrings[t]; - } - ts.tokenToString = tokenToString; - function getLineStarts(text) { - var result = new Array(); - var pos = 0; - var lineStart = 0; - while (pos < text.length) { - var ch = text.charCodeAt(pos++); - switch (ch) { - case 13 /* carriageReturn */: - if (text.charCodeAt(pos) === 10 /* lineFeed */) { - pos++; - } - case 10 /* lineFeed */: - result.push(lineStart); - lineStart = pos; - break; - default: - if (ch > 127 /* maxAsciiCharacter */ && isLineBreak(ch)) { - result.push(lineStart); - lineStart = pos; - } - break; - } - } - result.push(lineStart); - return result; - } - ts.getLineStarts = getLineStarts; - function getPositionFromLineAndCharacter(lineStarts, line, character) { - ts.Debug.assert(line > 0); - return lineStarts[line - 1] + character - 1; - } - ts.getPositionFromLineAndCharacter = getPositionFromLineAndCharacter; - function getLineAndCharacterOfPosition(lineStarts, position) { - var lineNumber = ts.binarySearch(lineStarts, position); - if (lineNumber < 0) { - lineNumber = (~lineNumber) - 1; - } - return { - line: lineNumber + 1, - character: position - lineStarts[lineNumber] + 1 - }; - } - ts.getLineAndCharacterOfPosition = getLineAndCharacterOfPosition; - function positionToLineAndCharacter(text, pos) { - var lineStarts = getLineStarts(text); - return getLineAndCharacterOfPosition(lineStarts, pos); - } - ts.positionToLineAndCharacter = positionToLineAndCharacter; - var hasOwnProperty = Object.prototype.hasOwnProperty; - function isWhiteSpace(ch) { - return ch === 32 /* space */ || ch === 9 /* tab */ || ch === 11 /* verticalTab */ || ch === 12 /* formFeed */ || ch === 160 /* nonBreakingSpace */ || ch === 5760 /* ogham */ || ch >= 8192 /* enQuad */ && ch <= 8203 /* zeroWidthSpace */ || ch === 8239 /* narrowNoBreakSpace */ || ch === 8287 /* mathematicalSpace */ || ch === 12288 /* ideographicSpace */ || ch === 65279 /* byteOrderMark */; - } - ts.isWhiteSpace = isWhiteSpace; - function isLineBreak(ch) { - return ch === 10 /* lineFeed */ || ch === 13 /* carriageReturn */ || ch === 8232 /* lineSeparator */ || ch === 8233 /* paragraphSeparator */ || ch === 133 /* nextLine */; - } - ts.isLineBreak = isLineBreak; - function isDigit(ch) { - return ch >= 48 /* _0 */ && ch <= 57 /* _9 */; - } - function isOctalDigit(ch) { - return ch >= 48 /* _0 */ && ch <= 55 /* _7 */; - } - ts.isOctalDigit = isOctalDigit; - function skipTrivia(text, pos, stopAfterLineBreak) { - while (true) { - var ch = text.charCodeAt(pos); - switch (ch) { - case 13 /* carriageReturn */: - if (text.charCodeAt(pos + 1) === 10 /* lineFeed */) - pos++; - case 10 /* lineFeed */: - pos++; - if (stopAfterLineBreak) - return pos; - continue; - case 9 /* tab */: - case 11 /* verticalTab */: - case 12 /* formFeed */: - case 32 /* space */: - pos++; - continue; - case 47 /* slash */: - if (text.charCodeAt(pos + 1) === 47 /* slash */) { - pos += 2; - while (pos < text.length) { - if (isLineBreak(text.charCodeAt(pos))) { - break; - } - pos++; - } - continue; - } - if (text.charCodeAt(pos + 1) === 42 /* asterisk */) { - pos += 2; - while (pos < text.length) { - if (text.charCodeAt(pos) === 42 /* asterisk */ && text.charCodeAt(pos + 1) === 47 /* slash */) { - pos += 2; - break; - } - pos++; - } - continue; - } - break; - default: - if (ch > 127 /* maxAsciiCharacter */ && (isWhiteSpace(ch) || isLineBreak(ch))) { - pos++; - continue; - } - break; - } - return pos; - } - } - ts.skipTrivia = skipTrivia; - function getCommentRanges(text, pos, trailing) { - var result; - var collecting = trailing || pos === 0; - while (true) { - var ch = text.charCodeAt(pos); - switch (ch) { - case 13 /* carriageReturn */: - if (text.charCodeAt(pos + 1) === 10 /* lineFeed */) - pos++; - case 10 /* lineFeed */: - pos++; - if (trailing) { - return result; - } - collecting = true; - if (result && result.length) { - result[result.length - 1].hasTrailingNewLine = true; - } - continue; - case 9 /* tab */: - case 11 /* verticalTab */: - case 12 /* formFeed */: - case 32 /* space */: - pos++; - continue; - case 47 /* slash */: - var nextChar = text.charCodeAt(pos + 1); - var hasTrailingNewLine = false; - if (nextChar === 47 /* slash */ || nextChar === 42 /* asterisk */) { - var startPos = pos; - pos += 2; - if (nextChar === 47 /* slash */) { - while (pos < text.length) { - if (isLineBreak(text.charCodeAt(pos))) { - hasTrailingNewLine = true; - break; - } - pos++; - } - } - else { - while (pos < text.length) { - if (text.charCodeAt(pos) === 42 /* asterisk */ && text.charCodeAt(pos + 1) === 47 /* slash */) { - pos += 2; - break; - } - pos++; - } - } - if (collecting) { - if (!result) - result = []; - result.push({ pos: startPos, end: pos, hasTrailingNewLine: hasTrailingNewLine }); - } - continue; - } - break; - default: - if (ch > 127 /* maxAsciiCharacter */ && (isWhiteSpace(ch) || isLineBreak(ch))) { - if (result && result.length && isLineBreak(ch)) { - result[result.length - 1].hasTrailingNewLine = true; - } - pos++; - continue; - } - break; - } - return result; - } - } - function getLeadingCommentRanges(text, pos) { - return getCommentRanges(text, pos, false); - } - ts.getLeadingCommentRanges = getLeadingCommentRanges; - function getTrailingCommentRanges(text, pos) { - return getCommentRanges(text, pos, true); - } - ts.getTrailingCommentRanges = getTrailingCommentRanges; - function isIdentifierStart(ch, languageVersion) { - return ch >= 65 /* A */ && ch <= 90 /* Z */ || ch >= 97 /* a */ && ch <= 122 /* z */ || ch === 36 /* $ */ || ch === 95 /* _ */ || ch > 127 /* maxAsciiCharacter */ && isUnicodeIdentifierStart(ch, languageVersion); - } - ts.isIdentifierStart = isIdentifierStart; - function isIdentifierPart(ch, languageVersion) { - return ch >= 65 /* A */ && ch <= 90 /* Z */ || ch >= 97 /* a */ && ch <= 122 /* z */ || ch >= 48 /* _0 */ && ch <= 57 /* _9 */ || ch === 36 /* $ */ || ch === 95 /* _ */ || ch > 127 /* maxAsciiCharacter */ && isUnicodeIdentifierPart(ch, languageVersion); - } - ts.isIdentifierPart = isIdentifierPart; - function createScanner(languageVersion, skipTrivia, text, onError, onComment) { - var pos; - var len; - var startPos; - var tokenPos; - var token; - var tokenValue; - var precedingLineBreak; - function error(message) { - if (onError) { - onError(message); - } - } - function isIdentifierStart(ch) { - return ch >= 65 /* A */ && ch <= 90 /* Z */ || ch >= 97 /* a */ && ch <= 122 /* z */ || ch === 36 /* $ */ || ch === 95 /* _ */ || ch > 127 /* maxAsciiCharacter */ && isUnicodeIdentifierStart(ch, languageVersion); - } - function isIdentifierPart(ch) { - return ch >= 65 /* A */ && ch <= 90 /* Z */ || ch >= 97 /* a */ && ch <= 122 /* z */ || ch >= 48 /* _0 */ && ch <= 57 /* _9 */ || ch === 36 /* $ */ || ch === 95 /* _ */ || ch > 127 /* maxAsciiCharacter */ && isUnicodeIdentifierPart(ch, languageVersion); - } - function scanNumber() { - var start = pos; - while (isDigit(text.charCodeAt(pos))) - pos++; - if (text.charCodeAt(pos) === 46 /* dot */) { - pos++; - while (isDigit(text.charCodeAt(pos))) - pos++; - } - var end = pos; - if (text.charCodeAt(pos) === 69 /* E */ || text.charCodeAt(pos) === 101 /* e */) { - pos++; - if (text.charCodeAt(pos) === 43 /* plus */ || text.charCodeAt(pos) === 45 /* minus */) - pos++; - if (isDigit(text.charCodeAt(pos))) { - pos++; - while (isDigit(text.charCodeAt(pos))) - pos++; - end = pos; - } - else { - error(ts.Diagnostics.Digit_expected); - } - } - return +(text.substring(start, end)); - } - function scanOctalDigits() { - var start = pos; - while (isOctalDigit(text.charCodeAt(pos))) { - pos++; - } - return +(text.substring(start, pos)); - } - function scanHexDigits(count, mustMatchCount) { - var digits = 0; - var value = 0; - while (digits < count || !mustMatchCount) { - var ch = text.charCodeAt(pos); - if (ch >= 48 /* _0 */ && ch <= 57 /* _9 */) { - value = value * 16 + ch - 48 /* _0 */; - } - else if (ch >= 65 /* A */ && ch <= 70 /* F */) { - value = value * 16 + ch - 65 /* A */ + 10; - } - else if (ch >= 97 /* a */ && ch <= 102 /* f */) { - value = value * 16 + ch - 97 /* a */ + 10; - } - else { - break; - } - pos++; - digits++; - } - if (digits < count) { - value = -1; - } - return value; - } - function scanString() { - var quote = text.charCodeAt(pos++); - var result = ""; - var start = pos; - while (true) { - if (pos >= len) { - result += text.substring(start, pos); - error(ts.Diagnostics.Unexpected_end_of_text); - break; - } - var ch = text.charCodeAt(pos); - if (ch === quote) { - result += text.substring(start, pos); - pos++; - break; - } - if (ch === 92 /* backslash */) { - result += text.substring(start, pos); - result += scanEscapeSequence(); - start = pos; - continue; - } - if (isLineBreak(ch)) { - result += text.substring(start, pos); - error(ts.Diagnostics.Unterminated_string_literal); - break; - } - pos++; - } - return result; - } - function scanTemplateAndSetTokenValue() { - var startedWithBacktick = text.charCodeAt(pos) === 96 /* backtick */; - pos++; - var start = pos; - var contents = ""; - var resultingToken; - while (true) { - if (pos >= len) { - contents += text.substring(start, pos); - error(ts.Diagnostics.Unexpected_end_of_text); - resultingToken = startedWithBacktick ? 9 /* NoSubstitutionTemplateLiteral */ : 12 /* TemplateTail */; - break; - } - var currChar = text.charCodeAt(pos); - if (currChar === 96 /* backtick */) { - contents += text.substring(start, pos); - pos++; - resultingToken = startedWithBacktick ? 9 /* NoSubstitutionTemplateLiteral */ : 12 /* TemplateTail */; - break; - } - if (currChar === 36 /* $ */ && pos + 1 < len && text.charCodeAt(pos + 1) === 123 /* openBrace */) { - contents += text.substring(start, pos); - pos += 2; - resultingToken = startedWithBacktick ? 10 /* TemplateHead */ : 11 /* TemplateMiddle */; - break; - } - if (currChar === 92 /* backslash */) { - contents += text.substring(start, pos); - contents += scanEscapeSequence(); - start = pos; - continue; - } - if (currChar === 13 /* carriageReturn */) { - contents += text.substring(start, pos); - if (pos + 1 < len && text.charCodeAt(pos + 1) === 10 /* lineFeed */) { - pos++; - } - pos++; - contents += "\n"; - start = pos; - continue; - } - pos++; - } - ts.Debug.assert(resultingToken !== undefined); - tokenValue = contents; - return resultingToken; - } - function scanEscapeSequence() { - pos++; - if (pos >= len) { - error(ts.Diagnostics.Unexpected_end_of_text); - return ""; - } - var ch = text.charCodeAt(pos++); - switch (ch) { - case 48 /* _0 */: - return "\0"; - case 98 /* b */: - return "\b"; - case 116 /* t */: - return "\t"; - case 110 /* n */: - return "\n"; - case 118 /* v */: - return "\v"; - case 102 /* f */: - return "\f"; - case 114 /* r */: - return "\r"; - case 39 /* singleQuote */: - return "\'"; - case 34 /* doubleQuote */: - return "\""; - case 120 /* x */: - case 117 /* u */: - var ch = scanHexDigits(ch === 120 /* x */ ? 2 : 4, true); - if (ch >= 0) { - return String.fromCharCode(ch); - } - else { - error(ts.Diagnostics.Hexadecimal_digit_expected); - return ""; - } - case 13 /* carriageReturn */: - if (pos < len && text.charCodeAt(pos) === 10 /* lineFeed */) { - pos++; - } - case 10 /* lineFeed */: - case 8232 /* lineSeparator */: - case 8233 /* paragraphSeparator */: - return ""; - default: - return String.fromCharCode(ch); - } - } - function peekUnicodeEscape() { - if (pos + 5 < len && text.charCodeAt(pos + 1) === 117 /* u */) { - var start = pos; - pos += 2; - var value = scanHexDigits(4, true); - pos = start; - return value; - } - return -1; - } - function scanIdentifierParts() { - var result = ""; - var start = pos; - while (pos < len) { - var ch = text.charCodeAt(pos); - if (isIdentifierPart(ch)) { - pos++; - } - else if (ch === 92 /* backslash */) { - ch = peekUnicodeEscape(); - if (!(ch >= 0 && isIdentifierPart(ch))) { - break; - } - result += text.substring(start, pos); - result += String.fromCharCode(ch); - pos += 6; - start = pos; - } - else { - break; - } - } - result += text.substring(start, pos); - return result; - } - function getIdentifierToken() { - var len = tokenValue.length; - if (len >= 2 && len <= 11) { - var ch = tokenValue.charCodeAt(0); - if (ch >= 97 /* a */ && ch <= 122 /* z */ && hasOwnProperty.call(textToToken, tokenValue)) { - return token = textToToken[tokenValue]; - } - } - return token = 63 /* Identifier */; - } - function scan() { - startPos = pos; - precedingLineBreak = false; - while (true) { - tokenPos = pos; - if (pos >= len) { - return token = 1 /* EndOfFileToken */; - } - var ch = text.charCodeAt(pos); - switch (ch) { - case 10 /* lineFeed */: - case 13 /* carriageReturn */: - precedingLineBreak = true; - if (skipTrivia) { - pos++; - continue; - } - else { - if (ch === 13 /* carriageReturn */ && pos + 1 < len && text.charCodeAt(pos + 1) === 10 /* lineFeed */) { - pos += 2; - } - else { - pos++; - } - return token = 4 /* NewLineTrivia */; - } - case 9 /* tab */: - case 11 /* verticalTab */: - case 12 /* formFeed */: - case 32 /* space */: - if (skipTrivia) { - pos++; - continue; - } - else { - while (pos < len && isWhiteSpace(text.charCodeAt(pos))) { - pos++; - } - return token = 5 /* WhitespaceTrivia */; - } - case 33 /* exclamation */: - if (text.charCodeAt(pos + 1) === 61 /* equals */) { - if (text.charCodeAt(pos + 2) === 61 /* equals */) { - return pos += 3, token = 30 /* ExclamationEqualsEqualsToken */; - } - return pos += 2, token = 28 /* ExclamationEqualsToken */; - } - return pos++, token = 45 /* ExclamationToken */; - case 34 /* doubleQuote */: - case 39 /* singleQuote */: - tokenValue = scanString(); - return token = 7 /* StringLiteral */; - case 96 /* backtick */: - return token = scanTemplateAndSetTokenValue(); - case 37 /* percent */: - if (text.charCodeAt(pos + 1) === 61 /* equals */) { - return pos += 2, token = 56 /* PercentEqualsToken */; - } - return pos++, token = 36 /* PercentToken */; - case 38 /* ampersand */: - if (text.charCodeAt(pos + 1) === 38 /* ampersand */) { - return pos += 2, token = 47 /* AmpersandAmpersandToken */; - } - if (text.charCodeAt(pos + 1) === 61 /* equals */) { - return pos += 2, token = 60 /* AmpersandEqualsToken */; - } - return pos++, token = 42 /* AmpersandToken */; - case 40 /* openParen */: - return pos++, token = 15 /* OpenParenToken */; - case 41 /* closeParen */: - return pos++, token = 16 /* CloseParenToken */; - case 42 /* asterisk */: - if (text.charCodeAt(pos + 1) === 61 /* equals */) { - return pos += 2, token = 54 /* AsteriskEqualsToken */; - } - return pos++, token = 34 /* AsteriskToken */; - case 43 /* plus */: - if (text.charCodeAt(pos + 1) === 43 /* plus */) { - return pos += 2, token = 37 /* PlusPlusToken */; - } - if (text.charCodeAt(pos + 1) === 61 /* equals */) { - return pos += 2, token = 52 /* PlusEqualsToken */; - } - return pos++, token = 32 /* PlusToken */; - case 44 /* comma */: - return pos++, token = 22 /* CommaToken */; - case 45 /* minus */: - if (text.charCodeAt(pos + 1) === 45 /* minus */) { - return pos += 2, token = 38 /* MinusMinusToken */; - } - if (text.charCodeAt(pos + 1) === 61 /* equals */) { - return pos += 2, token = 53 /* MinusEqualsToken */; - } - return pos++, token = 33 /* MinusToken */; - case 46 /* dot */: - if (isDigit(text.charCodeAt(pos + 1))) { - tokenValue = "" + scanNumber(); - return token = 6 /* NumericLiteral */; - } - if (text.charCodeAt(pos + 1) === 46 /* dot */ && text.charCodeAt(pos + 2) === 46 /* dot */) { - return pos += 3, token = 20 /* DotDotDotToken */; - } - return pos++, token = 19 /* DotToken */; - case 47 /* slash */: - if (text.charCodeAt(pos + 1) === 47 /* slash */) { - pos += 2; - while (pos < len) { - if (isLineBreak(text.charCodeAt(pos))) { - break; - } - pos++; - } - if (onComment) { - onComment(tokenPos, pos); - } - if (skipTrivia) { - continue; - } - else { - return token = 2 /* SingleLineCommentTrivia */; - } - } - if (text.charCodeAt(pos + 1) === 42 /* asterisk */) { - pos += 2; - var commentClosed = false; - while (pos < len) { - var ch = text.charCodeAt(pos); - if (ch === 42 /* asterisk */ && text.charCodeAt(pos + 1) === 47 /* slash */) { - pos += 2; - commentClosed = true; - break; - } - if (isLineBreak(ch)) { - precedingLineBreak = true; - } - pos++; - } - if (!commentClosed) { - error(ts.Diagnostics.Asterisk_Slash_expected); - } - if (onComment) { - onComment(tokenPos, pos); - } - if (skipTrivia) { - continue; - } - else { - return token = 3 /* MultiLineCommentTrivia */; - } - } - if (text.charCodeAt(pos + 1) === 61 /* equals */) { - return pos += 2, token = 55 /* SlashEqualsToken */; - } - return pos++, token = 35 /* SlashToken */; - case 48 /* _0 */: - if (pos + 2 < len && (text.charCodeAt(pos + 1) === 88 /* X */ || text.charCodeAt(pos + 1) === 120 /* x */)) { - pos += 2; - var value = scanHexDigits(1, false); - if (value < 0) { - error(ts.Diagnostics.Hexadecimal_digit_expected); - value = 0; - } - tokenValue = "" + value; - return 6 /* NumericLiteral */; - } - if (pos + 1 < len && isOctalDigit(text.charCodeAt(pos + 1))) { - tokenValue = "" + scanOctalDigits(); - return 6 /* NumericLiteral */; - } - case 49 /* _1 */: - case 50 /* _2 */: - case 51 /* _3 */: - case 52 /* _4 */: - case 53 /* _5 */: - case 54 /* _6 */: - case 55 /* _7 */: - case 56 /* _8 */: - case 57 /* _9 */: - tokenValue = "" + scanNumber(); - return token = 6 /* NumericLiteral */; - case 58 /* colon */: - return pos++, token = 50 /* ColonToken */; - case 59 /* semicolon */: - return pos++, token = 21 /* SemicolonToken */; - case 60 /* lessThan */: - if (text.charCodeAt(pos + 1) === 60 /* lessThan */) { - if (text.charCodeAt(pos + 2) === 61 /* equals */) { - return pos += 3, token = 57 /* LessThanLessThanEqualsToken */; - } - return pos += 2, token = 39 /* LessThanLessThanToken */; - } - if (text.charCodeAt(pos + 1) === 61 /* equals */) { - return pos += 2, token = 25 /* LessThanEqualsToken */; - } - return pos++, token = 23 /* LessThanToken */; - case 61 /* equals */: - if (text.charCodeAt(pos + 1) === 61 /* equals */) { - if (text.charCodeAt(pos + 2) === 61 /* equals */) { - return pos += 3, token = 29 /* EqualsEqualsEqualsToken */; - } - return pos += 2, token = 27 /* EqualsEqualsToken */; - } - if (text.charCodeAt(pos + 1) === 62 /* greaterThan */) { - return pos += 2, token = 31 /* EqualsGreaterThanToken */; - } - return pos++, token = 51 /* EqualsToken */; - case 62 /* greaterThan */: - return pos++, token = 24 /* GreaterThanToken */; - case 63 /* question */: - return pos++, token = 49 /* QuestionToken */; - case 91 /* openBracket */: - return pos++, token = 17 /* OpenBracketToken */; - case 93 /* closeBracket */: - return pos++, token = 18 /* CloseBracketToken */; - case 94 /* caret */: - if (text.charCodeAt(pos + 1) === 61 /* equals */) { - return pos += 2, token = 62 /* CaretEqualsToken */; - } - return pos++, token = 44 /* CaretToken */; - case 123 /* openBrace */: - return pos++, token = 13 /* OpenBraceToken */; - case 124 /* bar */: - if (text.charCodeAt(pos + 1) === 124 /* bar */) { - return pos += 2, token = 48 /* BarBarToken */; - } - if (text.charCodeAt(pos + 1) === 61 /* equals */) { - return pos += 2, token = 61 /* BarEqualsToken */; - } - return pos++, token = 43 /* BarToken */; - case 125 /* closeBrace */: - return pos++, token = 14 /* CloseBraceToken */; - case 126 /* tilde */: - return pos++, token = 46 /* TildeToken */; - case 92 /* backslash */: - var ch = peekUnicodeEscape(); - if (ch >= 0 && isIdentifierStart(ch)) { - pos += 6; - tokenValue = String.fromCharCode(ch) + scanIdentifierParts(); - return token = getIdentifierToken(); - } - error(ts.Diagnostics.Invalid_character); - return pos++, token = 0 /* Unknown */; - default: - if (isIdentifierStart(ch)) { - pos++; - while (pos < len && isIdentifierPart(ch = text.charCodeAt(pos))) - pos++; - tokenValue = text.substring(tokenPos, pos); - if (ch === 92 /* backslash */) { - tokenValue += scanIdentifierParts(); - } - return token = getIdentifierToken(); - } - else if (isWhiteSpace(ch)) { - pos++; - continue; - } - else if (isLineBreak(ch)) { - precedingLineBreak = true; - pos++; - continue; - } - error(ts.Diagnostics.Invalid_character); - return pos++, token = 0 /* Unknown */; - } - } - } - function reScanGreaterToken() { - if (token === 24 /* GreaterThanToken */) { - if (text.charCodeAt(pos) === 62 /* greaterThan */) { - if (text.charCodeAt(pos + 1) === 62 /* greaterThan */) { - if (text.charCodeAt(pos + 2) === 61 /* equals */) { - return pos += 3, token = 59 /* GreaterThanGreaterThanGreaterThanEqualsToken */; - } - return pos += 2, token = 41 /* GreaterThanGreaterThanGreaterThanToken */; - } - if (text.charCodeAt(pos + 1) === 61 /* equals */) { - return pos += 2, token = 58 /* GreaterThanGreaterThanEqualsToken */; - } - return pos++, token = 40 /* GreaterThanGreaterThanToken */; - } - if (text.charCodeAt(pos) === 61 /* equals */) { - return pos++, token = 26 /* GreaterThanEqualsToken */; - } - } - return token; - } - function reScanSlashToken() { - if (token === 35 /* SlashToken */ || token === 55 /* SlashEqualsToken */) { - var p = tokenPos + 1; - var inEscape = false; - var inCharacterClass = false; - while (true) { - if (p >= len) { - return token; - } - var ch = text.charCodeAt(p); - if (isLineBreak(ch)) { - return token; - } - if (inEscape) { - inEscape = false; - } - else if (ch === 47 /* slash */ && !inCharacterClass) { - break; - } - else if (ch === 91 /* openBracket */) { - inCharacterClass = true; - } - else if (ch === 92 /* backslash */) { - inEscape = true; - } - else if (ch === 93 /* closeBracket */) { - inCharacterClass = false; - } - p++; - } - p++; - while (isIdentifierPart(text.charCodeAt(p))) { - p++; - } - pos = p; - tokenValue = text.substring(tokenPos, pos); - token = 8 /* RegularExpressionLiteral */; - } - return token; - } - function reScanTemplateToken() { - ts.Debug.assert(token === 14 /* CloseBraceToken */, "'reScanTemplateToken' should only be called on a '}'"); - pos = tokenPos; - return token = scanTemplateAndSetTokenValue(); - } - function tryScan(callback) { - var savePos = pos; - var saveStartPos = startPos; - var saveTokenPos = tokenPos; - var saveToken = token; - var saveTokenValue = tokenValue; - var savePrecedingLineBreak = precedingLineBreak; - var result = callback(); - if (!result) { - pos = savePos; - startPos = saveStartPos; - tokenPos = saveTokenPos; - token = saveToken; - tokenValue = saveTokenValue; - precedingLineBreak = savePrecedingLineBreak; - } - return result; - } - function setText(newText) { - text = newText || ""; - len = text.length; - setTextPos(0); - } - function setTextPos(textPos) { - pos = textPos; - startPos = textPos; - tokenPos = textPos; - token = 0 /* Unknown */; - precedingLineBreak = false; - } - setText(text); - return { - getStartPos: function () { return startPos; }, - getTextPos: function () { return pos; }, - getToken: function () { return token; }, - getTokenPos: function () { return tokenPos; }, - getTokenText: function () { return text.substring(tokenPos, pos); }, - getTokenValue: function () { return tokenValue; }, - hasPrecedingLineBreak: function () { return precedingLineBreak; }, - isIdentifier: function () { return token === 63 /* Identifier */ || token > 99 /* LastReservedWord */; }, - isReservedWord: function () { return token >= 64 /* FirstReservedWord */ && token <= 99 /* LastReservedWord */; }, - reScanGreaterToken: reScanGreaterToken, - reScanSlashToken: reScanSlashToken, - reScanTemplateToken: reScanTemplateToken, - scan: scan, - setText: setText, - setTextPos: setTextPos, - tryScan: tryScan - }; - } - ts.createScanner = createScanner; -})(ts || (ts = {})); var ts; (function (ts) { (function (EmitReturnStatus) { @@ -1545,6 +130,13 @@ var ts; return result; } ts.sum = sum; + function lastOrUndefined(array) { + if (array.length === 0) { + return undefined; + } + return array[array.length - 1]; + } + ts.lastOrUndefined = lastOrUndefined; function binarySearch(array, value) { var low = 0; var high = array.length - 1; @@ -2192,7 +784,1429 @@ var sys = (function () { })(); var ts; (function (ts) { - var nodeConstructors = new Array(196 /* Count */); + ts.Diagnostics = { + Unterminated_string_literal: { code: 1002, category: 1 /* Error */, key: "Unterminated string literal." }, + Identifier_expected: { code: 1003, category: 1 /* Error */, key: "Identifier expected." }, + _0_expected: { code: 1005, category: 1 /* Error */, key: "'{0}' expected." }, + A_file_cannot_have_a_reference_to_itself: { code: 1006, category: 1 /* Error */, key: "A file cannot have a reference to itself." }, + Trailing_comma_not_allowed: { code: 1009, category: 1 /* Error */, key: "Trailing comma not allowed." }, + Asterisk_Slash_expected: { code: 1010, category: 1 /* Error */, key: "'*/' expected." }, + Unexpected_token: { code: 1012, category: 1 /* Error */, key: "Unexpected token." }, + Catch_clause_parameter_cannot_have_a_type_annotation: { code: 1013, category: 1 /* Error */, key: "Catch clause parameter cannot have a type annotation." }, + A_rest_parameter_must_be_last_in_a_parameter_list: { code: 1014, category: 1 /* Error */, key: "A rest parameter must be last in a parameter list." }, + Parameter_cannot_have_question_mark_and_initializer: { code: 1015, category: 1 /* Error */, key: "Parameter cannot have question mark and initializer." }, + A_required_parameter_cannot_follow_an_optional_parameter: { code: 1016, category: 1 /* Error */, key: "A required parameter cannot follow an optional parameter." }, + An_index_signature_cannot_have_a_rest_parameter: { code: 1017, category: 1 /* Error */, key: "An index signature cannot have a rest parameter." }, + An_index_signature_parameter_cannot_have_an_accessibility_modifier: { code: 1018, category: 1 /* Error */, key: "An index signature parameter cannot have an accessibility modifier." }, + An_index_signature_parameter_cannot_have_a_question_mark: { code: 1019, category: 1 /* Error */, key: "An index signature parameter cannot have a question mark." }, + An_index_signature_parameter_cannot_have_an_initializer: { code: 1020, category: 1 /* Error */, key: "An index signature parameter cannot have an initializer." }, + An_index_signature_must_have_a_type_annotation: { code: 1021, category: 1 /* Error */, key: "An index signature must have a type annotation." }, + An_index_signature_parameter_must_have_a_type_annotation: { code: 1022, category: 1 /* Error */, key: "An index signature parameter must have a type annotation." }, + An_index_signature_parameter_type_must_be_string_or_number: { code: 1023, category: 1 /* Error */, key: "An index signature parameter type must be 'string' or 'number'." }, + A_class_or_interface_declaration_can_only_have_one_extends_clause: { code: 1024, category: 1 /* Error */, key: "A class or interface declaration can only have one 'extends' clause." }, + An_extends_clause_must_precede_an_implements_clause: { code: 1025, category: 1 /* Error */, key: "An 'extends' clause must precede an 'implements' clause." }, + A_class_can_only_extend_a_single_class: { code: 1026, category: 1 /* Error */, key: "A class can only extend a single class." }, + A_class_declaration_can_only_have_one_implements_clause: { code: 1027, category: 1 /* Error */, key: "A class declaration can only have one 'implements' clause." }, + Accessibility_modifier_already_seen: { code: 1028, category: 1 /* Error */, key: "Accessibility modifier already seen." }, + _0_modifier_must_precede_1_modifier: { code: 1029, category: 1 /* Error */, key: "'{0}' modifier must precede '{1}' modifier." }, + _0_modifier_already_seen: { code: 1030, category: 1 /* Error */, key: "'{0}' modifier already seen." }, + _0_modifier_cannot_appear_on_a_class_element: { code: 1031, category: 1 /* Error */, key: "'{0}' modifier cannot appear on a class element." }, + An_interface_declaration_cannot_have_an_implements_clause: { code: 1032, category: 1 /* Error */, key: "An interface declaration cannot have an 'implements' clause." }, + super_must_be_followed_by_an_argument_list_or_member_access: { code: 1034, category: 1 /* Error */, key: "'super' must be followed by an argument list or member access." }, + Only_ambient_modules_can_use_quoted_names: { code: 1035, category: 1 /* Error */, key: "Only ambient modules can use quoted names." }, + Statements_are_not_allowed_in_ambient_contexts: { code: 1036, category: 1 /* Error */, key: "Statements are not allowed in ambient contexts." }, + A_function_implementation_cannot_be_declared_in_an_ambient_context: { code: 1037, category: 1 /* Error */, key: "A function implementation cannot be declared in an ambient context." }, + A_declare_modifier_cannot_be_used_in_an_already_ambient_context: { code: 1038, category: 1 /* Error */, key: "A 'declare' modifier cannot be used in an already ambient context." }, + Initializers_are_not_allowed_in_ambient_contexts: { code: 1039, category: 1 /* Error */, key: "Initializers are not allowed in ambient contexts." }, + _0_modifier_cannot_appear_on_a_module_element: { code: 1044, category: 1 /* Error */, key: "'{0}' modifier cannot appear on a module element." }, + A_declare_modifier_cannot_be_used_with_an_interface_declaration: { code: 1045, category: 1 /* Error */, key: "A 'declare' modifier cannot be used with an interface declaration." }, + A_declare_modifier_is_required_for_a_top_level_declaration_in_a_d_ts_file: { code: 1046, category: 1 /* Error */, key: "A 'declare' modifier is required for a top level declaration in a .d.ts file." }, + A_rest_parameter_cannot_be_optional: { code: 1047, category: 1 /* Error */, key: "A rest parameter cannot be optional." }, + A_rest_parameter_cannot_have_an_initializer: { code: 1048, category: 1 /* Error */, key: "A rest parameter cannot have an initializer." }, + A_set_accessor_must_have_exactly_one_parameter: { code: 1049, category: 1 /* Error */, key: "A 'set' accessor must have exactly one parameter." }, + A_set_accessor_cannot_have_an_optional_parameter: { code: 1051, category: 1 /* Error */, key: "A 'set' accessor cannot have an optional parameter." }, + A_set_accessor_parameter_cannot_have_an_initializer: { code: 1052, category: 1 /* Error */, key: "A 'set' accessor parameter cannot have an initializer." }, + A_set_accessor_cannot_have_rest_parameter: { code: 1053, category: 1 /* Error */, key: "A 'set' accessor cannot have rest parameter." }, + A_get_accessor_cannot_have_parameters: { code: 1054, category: 1 /* Error */, key: "A 'get' accessor cannot have parameters." }, + Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher: { code: 1056, category: 1 /* Error */, key: "Accessors are only available when targeting ECMAScript 5 and higher." }, + Enum_member_must_have_initializer: { code: 1061, category: 1 /* Error */, key: "Enum member must have initializer." }, + An_export_assignment_cannot_be_used_in_an_internal_module: { code: 1063, category: 1 /* Error */, key: "An export assignment cannot be used in an internal module." }, + Ambient_enum_elements_can_only_have_integer_literal_initializers: { code: 1066, category: 1 /* Error */, key: "Ambient enum elements can only have integer literal initializers." }, + Unexpected_token_A_constructor_method_accessor_or_property_was_expected: { code: 1068, category: 1 /* Error */, key: "Unexpected token. A constructor, method, accessor, or property was expected." }, + A_declare_modifier_cannot_be_used_with_an_import_declaration: { code: 1079, category: 1 /* Error */, key: "A 'declare' modifier cannot be used with an import declaration." }, + Invalid_reference_directive_syntax: { code: 1084, category: 1 /* Error */, key: "Invalid 'reference' directive syntax." }, + Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher: { code: 1085, category: 1 /* Error */, key: "Octal literals are not available when targeting ECMAScript 5 and higher." }, + An_accessor_cannot_be_declared_in_an_ambient_context: { code: 1086, category: 1 /* Error */, key: "An accessor cannot be declared in an ambient context." }, + _0_modifier_cannot_appear_on_a_constructor_declaration: { code: 1089, category: 1 /* Error */, key: "'{0}' modifier cannot appear on a constructor declaration." }, + _0_modifier_cannot_appear_on_a_parameter: { code: 1090, category: 1 /* Error */, key: "'{0}' modifier cannot appear on a parameter." }, + Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement: { code: 1091, category: 1 /* Error */, key: "Only a single variable declaration is allowed in a 'for...in' statement." }, + Type_parameters_cannot_appear_on_a_constructor_declaration: { code: 1092, category: 1 /* Error */, key: "Type parameters cannot appear on a constructor declaration." }, + Type_annotation_cannot_appear_on_a_constructor_declaration: { code: 1093, category: 1 /* Error */, key: "Type annotation cannot appear on a constructor declaration." }, + An_accessor_cannot_have_type_parameters: { code: 1094, category: 1 /* Error */, key: "An accessor cannot have type parameters." }, + A_set_accessor_cannot_have_a_return_type_annotation: { code: 1095, category: 1 /* Error */, key: "A 'set' accessor cannot have a return type annotation." }, + An_index_signature_must_have_exactly_one_parameter: { code: 1096, category: 1 /* Error */, key: "An index signature must have exactly one parameter." }, + _0_list_cannot_be_empty: { code: 1097, category: 1 /* Error */, key: "'{0}' list cannot be empty." }, + Type_parameter_list_cannot_be_empty: { code: 1098, category: 1 /* Error */, key: "Type parameter list cannot be empty." }, + Type_argument_list_cannot_be_empty: { code: 1099, category: 1 /* Error */, key: "Type argument list cannot be empty." }, + Invalid_use_of_0_in_strict_mode: { code: 1100, category: 1 /* Error */, key: "Invalid use of '{0}' in strict mode." }, + with_statements_are_not_allowed_in_strict_mode: { code: 1101, category: 1 /* Error */, key: "'with' statements are not allowed in strict mode." }, + delete_cannot_be_called_on_an_identifier_in_strict_mode: { code: 1102, category: 1 /* Error */, key: "'delete' cannot be called on an identifier in strict mode." }, + A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement: { code: 1104, category: 1 /* Error */, key: "A 'continue' statement can only be used within an enclosing iteration statement." }, + A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement: { code: 1105, category: 1 /* Error */, key: "A 'break' statement can only be used within an enclosing iteration or switch statement." }, + Jump_target_cannot_cross_function_boundary: { code: 1107, category: 1 /* Error */, key: "Jump target cannot cross function boundary." }, + A_return_statement_can_only_be_used_within_a_function_body: { code: 1108, category: 1 /* Error */, key: "A 'return' statement can only be used within a function body." }, + Expression_expected: { code: 1109, category: 1 /* Error */, key: "Expression expected." }, + Type_expected: { code: 1110, category: 1 /* Error */, key: "Type expected." }, + A_constructor_implementation_cannot_be_declared_in_an_ambient_context: { code: 1111, category: 1 /* Error */, key: "A constructor implementation cannot be declared in an ambient context." }, + A_class_member_cannot_be_declared_optional: { code: 1112, category: 1 /* Error */, key: "A class member cannot be declared optional." }, + A_default_clause_cannot_appear_more_than_once_in_a_switch_statement: { code: 1113, category: 1 /* Error */, key: "A 'default' clause cannot appear more than once in a 'switch' statement." }, + Duplicate_label_0: { code: 1114, category: 1 /* Error */, key: "Duplicate label '{0}'" }, + A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement: { code: 1115, category: 1 /* Error */, key: "A 'continue' statement can only jump to a label of an enclosing iteration statement." }, + A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement: { code: 1116, category: 1 /* Error */, key: "A 'break' statement can only jump to a label of an enclosing statement." }, + An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode: { code: 1117, category: 1 /* Error */, key: "An object literal cannot have multiple properties with the same name in strict mode." }, + An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name: { code: 1118, category: 1 /* Error */, key: "An object literal cannot have multiple get/set accessors with the same name." }, + An_object_literal_cannot_have_property_and_accessor_with_the_same_name: { code: 1119, category: 1 /* Error */, key: "An object literal cannot have property and accessor with the same name." }, + An_export_assignment_cannot_have_modifiers: { code: 1120, category: 1 /* Error */, key: "An export assignment cannot have modifiers." }, + Octal_literals_are_not_allowed_in_strict_mode: { code: 1121, category: 1 /* Error */, key: "Octal literals are not allowed in strict mode." }, + A_tuple_type_element_list_cannot_be_empty: { code: 1122, category: 1 /* Error */, key: "A tuple type element list cannot be empty." }, + Variable_declaration_list_cannot_be_empty: { code: 1123, category: 1 /* Error */, key: "Variable declaration list cannot be empty." }, + Digit_expected: { code: 1124, category: 1 /* Error */, key: "Digit expected." }, + Hexadecimal_digit_expected: { code: 1125, category: 1 /* Error */, key: "Hexadecimal digit expected." }, + Unexpected_end_of_text: { code: 1126, category: 1 /* Error */, key: "Unexpected end of text." }, + Invalid_character: { code: 1127, category: 1 /* Error */, key: "Invalid character." }, + Declaration_or_statement_expected: { code: 1128, category: 1 /* Error */, key: "Declaration or statement expected." }, + Statement_expected: { code: 1129, category: 1 /* Error */, key: "Statement expected." }, + case_or_default_expected: { code: 1130, category: 1 /* Error */, key: "'case' or 'default' expected." }, + Property_or_signature_expected: { code: 1131, category: 1 /* Error */, key: "Property or signature expected." }, + Enum_member_expected: { code: 1132, category: 1 /* Error */, key: "Enum member expected." }, + Type_reference_expected: { code: 1133, category: 1 /* Error */, key: "Type reference expected." }, + Variable_declaration_expected: { code: 1134, category: 1 /* Error */, key: "Variable declaration expected." }, + Argument_expression_expected: { code: 1135, category: 1 /* Error */, key: "Argument expression expected." }, + Property_assignment_expected: { code: 1136, category: 1 /* Error */, key: "Property assignment expected." }, + Expression_or_comma_expected: { code: 1137, category: 1 /* Error */, key: "Expression or comma expected." }, + Parameter_declaration_expected: { code: 1138, category: 1 /* Error */, key: "Parameter declaration expected." }, + Type_parameter_declaration_expected: { code: 1139, category: 1 /* Error */, key: "Type parameter declaration expected." }, + Type_argument_expected: { code: 1140, category: 1 /* Error */, key: "Type argument expected." }, + String_literal_expected: { code: 1141, category: 1 /* Error */, key: "String literal expected." }, + Line_break_not_permitted_here: { code: 1142, category: 1 /* Error */, key: "Line break not permitted here." }, + catch_or_finally_expected: { code: 1143, category: 1 /* Error */, key: "'catch' or 'finally' expected." }, + Block_or_expected: { code: 1144, category: 1 /* Error */, key: "Block or ';' expected." }, + Modifiers_not_permitted_on_index_signature_members: { code: 1145, category: 1 /* Error */, key: "Modifiers not permitted on index signature members." }, + Declaration_expected: { code: 1146, category: 1 /* Error */, key: "Declaration expected." }, + Import_declarations_in_an_internal_module_cannot_reference_an_external_module: { code: 1147, category: 1 /* Error */, key: "Import declarations in an internal module cannot reference an external module." }, + Cannot_compile_external_modules_unless_the_module_flag_is_provided: { code: 1148, category: 1 /* Error */, key: "Cannot compile external modules unless the '--module' flag is provided." }, + Filename_0_differs_from_already_included_filename_1_only_in_casing: { code: 1149, category: 1 /* Error */, key: "Filename '{0}' differs from already included filename '{1}' only in casing" }, + new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead: { code: 1150, category: 1 /* Error */, key: "'new T[]' cannot be used to create an array. Use 'new Array()' instead." }, + var_let_or_const_expected: { code: 1152, category: 1 /* Error */, key: "'var', 'let' or 'const' expected." }, + let_declarations_are_only_available_when_targeting_ECMAScript_6_and_higher: { code: 1153, category: 1 /* Error */, key: "'let' declarations are only available when targeting ECMAScript 6 and higher." }, + const_declarations_are_only_available_when_targeting_ECMAScript_6_and_higher: { code: 1154, category: 1 /* Error */, key: "'const' declarations are only available when targeting ECMAScript 6 and higher." }, + const_declarations_must_be_initialized: { code: 1155, category: 1 /* Error */, key: "'const' declarations must be initialized" }, + const_declarations_can_only_be_declared_inside_a_block: { code: 1156, category: 1 /* Error */, key: "'const' declarations can only be declared inside a block." }, + let_declarations_can_only_be_declared_inside_a_block: { code: 1157, category: 1 /* Error */, key: "'let' declarations can only be declared inside a block." }, + Invalid_template_literal_expected: { code: 1158, category: 1 /* Error */, key: "Invalid template literal; expected '}'" }, + Tagged_templates_are_only_available_when_targeting_ECMAScript_6_and_higher: { code: 1159, category: 1 /* Error */, key: "Tagged templates are only available when targeting ECMAScript 6 and higher." }, + Unterminated_template_literal: { code: 1160, category: 1 /* Error */, key: "Unterminated template literal." }, + Unterminated_regular_expression_literal: { code: 1161, category: 1 /* Error */, key: "Unterminated regular expression literal." }, + A_object_member_cannot_be_declared_optional: { code: 1160, category: 1 /* Error */, key: "A object member cannot be declared optional." }, + Duplicate_identifier_0: { code: 2300, category: 1 /* Error */, key: "Duplicate identifier '{0}'." }, + Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor: { code: 2301, category: 1 /* Error */, key: "Initializer of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor." }, + Static_members_cannot_reference_class_type_parameters: { code: 2302, category: 1 /* Error */, key: "Static members cannot reference class type parameters." }, + Circular_definition_of_import_alias_0: { code: 2303, category: 1 /* Error */, key: "Circular definition of import alias '{0}'." }, + Cannot_find_name_0: { code: 2304, category: 1 /* Error */, key: "Cannot find name '{0}'." }, + Module_0_has_no_exported_member_1: { code: 2305, category: 1 /* Error */, key: "Module '{0}' has no exported member '{1}'." }, + File_0_is_not_an_external_module: { code: 2306, category: 1 /* Error */, key: "File '{0}' is not an external module." }, + Cannot_find_external_module_0: { code: 2307, category: 1 /* Error */, key: "Cannot find external module '{0}'." }, + A_module_cannot_have_more_than_one_export_assignment: { code: 2308, category: 1 /* Error */, key: "A module cannot have more than one export assignment." }, + An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements: { code: 2309, category: 1 /* Error */, key: "An export assignment cannot be used in a module with other exported elements." }, + Type_0_recursively_references_itself_as_a_base_type: { code: 2310, category: 1 /* Error */, key: "Type '{0}' recursively references itself as a base type." }, + A_class_may_only_extend_another_class: { code: 2311, category: 1 /* Error */, key: "A class may only extend another class." }, + An_interface_may_only_extend_a_class_or_another_interface: { code: 2312, category: 1 /* Error */, key: "An interface may only extend a class or another interface." }, + Constraint_of_a_type_parameter_cannot_reference_any_type_parameter_from_the_same_type_parameter_list: { code: 2313, category: 1 /* Error */, key: "Constraint of a type parameter cannot reference any type parameter from the same type parameter list." }, + Generic_type_0_requires_1_type_argument_s: { code: 2314, category: 1 /* Error */, key: "Generic type '{0}' requires {1} type argument(s)." }, + Type_0_is_not_generic: { code: 2315, category: 1 /* Error */, key: "Type '{0}' is not generic." }, + Global_type_0_must_be_a_class_or_interface_type: { code: 2316, category: 1 /* Error */, key: "Global type '{0}' must be a class or interface type." }, + Global_type_0_must_have_1_type_parameter_s: { code: 2317, category: 1 /* Error */, key: "Global type '{0}' must have {1} type parameter(s)." }, + Cannot_find_global_type_0: { code: 2318, category: 1 /* Error */, key: "Cannot find global type '{0}'." }, + Named_properties_0_of_types_1_and_2_are_not_identical: { code: 2319, category: 1 /* Error */, key: "Named properties '{0}' of types '{1}' and '{2}' are not identical." }, + Interface_0_cannot_simultaneously_extend_types_1_and_2: { code: 2320, category: 1 /* Error */, key: "Interface '{0}' cannot simultaneously extend types '{1}' and '{2}'." }, + Excessive_stack_depth_comparing_types_0_and_1: { code: 2321, category: 1 /* Error */, key: "Excessive stack depth comparing types '{0}' and '{1}'." }, + Type_0_is_not_assignable_to_type_1: { code: 2322, category: 1 /* Error */, key: "Type '{0}' is not assignable to type '{1}'." }, + Property_0_is_missing_in_type_1: { code: 2324, category: 1 /* Error */, key: "Property '{0}' is missing in type '{1}'." }, + Property_0_is_private_in_type_1_but_not_in_type_2: { code: 2325, category: 1 /* Error */, key: "Property '{0}' is private in type '{1}' but not in type '{2}'." }, + Types_of_property_0_are_incompatible: { code: 2326, category: 1 /* Error */, key: "Types of property '{0}' are incompatible." }, + Property_0_is_optional_in_type_1_but_required_in_type_2: { code: 2327, category: 1 /* Error */, key: "Property '{0}' is optional in type '{1}' but required in type '{2}'." }, + Types_of_parameters_0_and_1_are_incompatible: { code: 2328, category: 1 /* Error */, key: "Types of parameters '{0}' and '{1}' are incompatible." }, + Index_signature_is_missing_in_type_0: { code: 2329, category: 1 /* Error */, key: "Index signature is missing in type '{0}'." }, + Index_signatures_are_incompatible: { code: 2330, category: 1 /* Error */, key: "Index signatures are incompatible." }, + this_cannot_be_referenced_in_a_module_body: { code: 2331, category: 1 /* Error */, key: "'this' cannot be referenced in a module body." }, + this_cannot_be_referenced_in_current_location: { code: 2332, category: 1 /* Error */, key: "'this' cannot be referenced in current location." }, + this_cannot_be_referenced_in_constructor_arguments: { code: 2333, category: 1 /* Error */, key: "'this' cannot be referenced in constructor arguments." }, + this_cannot_be_referenced_in_a_static_property_initializer: { code: 2334, category: 1 /* Error */, key: "'this' cannot be referenced in a static property initializer." }, + super_can_only_be_referenced_in_a_derived_class: { code: 2335, category: 1 /* Error */, key: "'super' can only be referenced in a derived class." }, + super_cannot_be_referenced_in_constructor_arguments: { code: 2336, category: 1 /* Error */, key: "'super' cannot be referenced in constructor arguments." }, + Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors: { code: 2337, category: 1 /* Error */, key: "Super calls are not permitted outside constructors or in nested functions inside constructors" }, + super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_derived_class: { code: 2338, category: 1 /* Error */, key: "'super' property access is permitted only in a constructor, member function, or member accessor of a derived class" }, + Property_0_does_not_exist_on_type_1: { code: 2339, category: 1 /* Error */, key: "Property '{0}' does not exist on type '{1}'." }, + Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword: { code: 2340, category: 1 /* Error */, key: "Only public and protected methods of the base class are accessible via the 'super' keyword" }, + Property_0_is_private_and_only_accessible_within_class_1: { code: 2341, category: 1 /* Error */, key: "Property '{0}' is private and only accessible within class '{1}'." }, + An_index_expression_argument_must_be_of_type_string_number_or_any: { code: 2342, category: 1 /* Error */, key: "An index expression argument must be of type 'string', 'number', or 'any'." }, + Type_0_does_not_satisfy_the_constraint_1: { code: 2344, category: 1 /* Error */, key: "Type '{0}' does not satisfy the constraint '{1}'." }, + Argument_of_type_0_is_not_assignable_to_parameter_of_type_1: { code: 2345, category: 1 /* Error */, key: "Argument of type '{0}' is not assignable to parameter of type '{1}'." }, + Supplied_parameters_do_not_match_any_signature_of_call_target: { code: 2346, category: 1 /* Error */, key: "Supplied parameters do not match any signature of call target." }, + Untyped_function_calls_may_not_accept_type_arguments: { code: 2347, category: 1 /* Error */, key: "Untyped function calls may not accept type arguments." }, + Value_of_type_0_is_not_callable_Did_you_mean_to_include_new: { code: 2348, category: 1 /* Error */, key: "Value of type '{0}' is not callable. Did you mean to include 'new'?" }, + Cannot_invoke_an_expression_whose_type_lacks_a_call_signature: { code: 2349, category: 1 /* Error */, key: "Cannot invoke an expression whose type lacks a call signature." }, + Only_a_void_function_can_be_called_with_the_new_keyword: { code: 2350, category: 1 /* Error */, key: "Only a void function can be called with the 'new' keyword." }, + Cannot_use_new_with_an_expression_whose_type_lacks_a_call_or_construct_signature: { code: 2351, category: 1 /* Error */, key: "Cannot use 'new' with an expression whose type lacks a call or construct signature." }, + Neither_type_0_nor_type_1_is_assignable_to_the_other: { code: 2352, category: 1 /* Error */, key: "Neither type '{0}' nor type '{1}' is assignable to the other." }, + No_best_common_type_exists_among_return_expressions: { code: 2354, category: 1 /* Error */, key: "No best common type exists among return expressions." }, + A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value_or_consist_of_a_single_throw_statement: { code: 2355, category: 1 /* Error */, key: "A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement." }, + An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type: { code: 2356, category: 1 /* Error */, key: "An arithmetic operand must be of type 'any', 'number' or an enum type." }, + The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_property_or_indexer: { code: 2357, category: 1 /* Error */, key: "The operand of an increment or decrement operator must be a variable, property or indexer." }, + The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter: { code: 2358, category: 1 /* Error */, key: "The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter." }, + The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_Function_interface_type: { code: 2359, category: 1 /* Error */, key: "The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type." }, + The_left_hand_side_of_an_in_expression_must_be_of_types_any_string_or_number: { code: 2360, category: 1 /* Error */, key: "The left-hand side of an 'in' expression must be of types 'any', 'string' or 'number'." }, + The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter: { code: 2361, category: 1 /* Error */, key: "The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter" }, + The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type: { code: 2362, category: 1 /* Error */, key: "The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type." }, + The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type: { code: 2363, category: 1 /* Error */, key: "The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type." }, + Invalid_left_hand_side_of_assignment_expression: { code: 2364, category: 1 /* Error */, key: "Invalid left-hand side of assignment expression." }, + Operator_0_cannot_be_applied_to_types_1_and_2: { code: 2365, category: 1 /* Error */, key: "Operator '{0}' cannot be applied to types '{1}' and '{2}'." }, + Type_parameter_name_cannot_be_0: { code: 2368, category: 1 /* Error */, key: "Type parameter name cannot be '{0}'" }, + A_parameter_property_is_only_allowed_in_a_constructor_implementation: { code: 2369, category: 1 /* Error */, key: "A parameter property is only allowed in a constructor implementation." }, + A_rest_parameter_must_be_of_an_array_type: { code: 2370, category: 1 /* Error */, key: "A rest parameter must be of an array type." }, + A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation: { code: 2371, category: 1 /* Error */, key: "A parameter initializer is only allowed in a function or constructor implementation." }, + Parameter_0_cannot_be_referenced_in_its_initializer: { code: 2372, category: 1 /* Error */, key: "Parameter '{0}' cannot be referenced in its initializer." }, + Initializer_of_parameter_0_cannot_reference_identifier_1_declared_after_it: { code: 2373, category: 1 /* Error */, key: "Initializer of parameter '{0}' cannot reference identifier '{1}' declared after it." }, + Duplicate_string_index_signature: { code: 2374, category: 1 /* Error */, key: "Duplicate string index signature." }, + Duplicate_number_index_signature: { code: 2375, category: 1 /* Error */, key: "Duplicate number index signature." }, + A_super_call_must_be_the_first_statement_in_the_constructor_when_a_class_contains_initialized_properties_or_has_parameter_properties: { code: 2376, category: 1 /* Error */, key: "A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties." }, + Constructors_for_derived_classes_must_contain_a_super_call: { code: 2377, category: 1 /* Error */, key: "Constructors for derived classes must contain a 'super' call." }, + A_get_accessor_must_return_a_value_or_consist_of_a_single_throw_statement: { code: 2378, category: 1 /* Error */, key: "A 'get' accessor must return a value or consist of a single 'throw' statement." }, + Getter_and_setter_accessors_do_not_agree_in_visibility: { code: 2379, category: 1 /* Error */, key: "Getter and setter accessors do not agree in visibility." }, + get_and_set_accessor_must_have_the_same_type: { code: 2380, category: 1 /* Error */, key: "'get' and 'set' accessor must have the same type." }, + A_signature_with_an_implementation_cannot_use_a_string_literal_type: { code: 2381, category: 1 /* Error */, key: "A signature with an implementation cannot use a string literal type." }, + Specialized_overload_signature_is_not_assignable_to_any_non_specialized_signature: { code: 2382, category: 1 /* Error */, key: "Specialized overload signature is not assignable to any non-specialized signature." }, + Overload_signatures_must_all_be_exported_or_not_exported: { code: 2383, category: 1 /* Error */, key: "Overload signatures must all be exported or not exported." }, + Overload_signatures_must_all_be_ambient_or_non_ambient: { code: 2384, category: 1 /* Error */, key: "Overload signatures must all be ambient or non-ambient." }, + Overload_signatures_must_all_be_public_private_or_protected: { code: 2385, category: 1 /* Error */, key: "Overload signatures must all be public, private or protected." }, + Overload_signatures_must_all_be_optional_or_required: { code: 2386, category: 1 /* Error */, key: "Overload signatures must all be optional or required." }, + Function_overload_must_be_static: { code: 2387, category: 1 /* Error */, key: "Function overload must be static." }, + Function_overload_must_not_be_static: { code: 2388, category: 1 /* Error */, key: "Function overload must not be static." }, + Function_implementation_name_must_be_0: { code: 2389, category: 1 /* Error */, key: "Function implementation name must be '{0}'." }, + Constructor_implementation_is_missing: { code: 2390, category: 1 /* Error */, key: "Constructor implementation is missing." }, + Function_implementation_is_missing_or_not_immediately_following_the_declaration: { code: 2391, category: 1 /* Error */, key: "Function implementation is missing or not immediately following the declaration." }, + Multiple_constructor_implementations_are_not_allowed: { code: 2392, category: 1 /* Error */, key: "Multiple constructor implementations are not allowed." }, + Duplicate_function_implementation: { code: 2393, category: 1 /* Error */, key: "Duplicate function implementation." }, + Overload_signature_is_not_compatible_with_function_implementation: { code: 2394, category: 1 /* Error */, key: "Overload signature is not compatible with function implementation." }, + Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local: { code: 2395, category: 1 /* Error */, key: "Individual declarations in merged declaration {0} must be all exported or all local." }, + Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters: { code: 2396, category: 1 /* Error */, key: "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters." }, + Duplicate_identifier_i_Compiler_uses_i_to_initialize_rest_parameter: { code: 2397, category: 1 /* Error */, key: "Duplicate identifier '_i'. Compiler uses '_i' to initialize rest parameter." }, + Expression_resolves_to_variable_declaration_i_that_compiler_uses_to_initialize_rest_parameter: { code: 2398, category: 1 /* Error */, key: "Expression resolves to variable declaration '_i' that compiler uses to initialize rest parameter." }, + Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference: { code: 2399, category: 1 /* Error */, key: "Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference." }, + Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference: { code: 2400, category: 1 /* Error */, key: "Expression resolves to variable declaration '_this' that compiler uses to capture 'this' reference." }, + Duplicate_identifier_super_Compiler_uses_super_to_capture_base_class_reference: { code: 2401, category: 1 /* Error */, key: "Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference." }, + Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference: { code: 2402, category: 1 /* Error */, key: "Expression resolves to '_super' that compiler uses to capture base class reference." }, + Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2: { code: 2403, category: 1 /* Error */, key: "Subsequent variable declarations must have the same type. Variable '{0}' must be of type '{1}', but here has type '{2}'." }, + The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation: { code: 2404, category: 1 /* Error */, key: "The left-hand side of a 'for...in' statement cannot use a type annotation." }, + The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any: { code: 2405, category: 1 /* Error */, key: "The left-hand side of a 'for...in' statement must be of type 'string' or 'any'." }, + Invalid_left_hand_side_in_for_in_statement: { code: 2406, category: 1 /* Error */, key: "Invalid left-hand side in 'for...in' statement." }, + The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter: { code: 2407, category: 1 /* Error */, key: "The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter." }, + Setters_cannot_return_a_value: { code: 2408, category: 1 /* Error */, key: "Setters cannot return a value." }, + Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class: { code: 2409, category: 1 /* Error */, key: "Return type of constructor signature must be assignable to the instance type of the class" }, + All_symbols_within_a_with_block_will_be_resolved_to_any: { code: 2410, category: 1 /* Error */, key: "All symbols within a 'with' block will be resolved to 'any'." }, + Property_0_of_type_1_is_not_assignable_to_string_index_type_2: { code: 2411, category: 1 /* Error */, key: "Property '{0}' of type '{1}' is not assignable to string index type '{2}'." }, + Property_0_of_type_1_is_not_assignable_to_numeric_index_type_2: { code: 2412, category: 1 /* Error */, key: "Property '{0}' of type '{1}' is not assignable to numeric index type '{2}'." }, + Numeric_index_type_0_is_not_assignable_to_string_index_type_1: { code: 2413, category: 1 /* Error */, key: "Numeric index type '{0}' is not assignable to string index type '{1}'." }, + Class_name_cannot_be_0: { code: 2414, category: 1 /* Error */, key: "Class name cannot be '{0}'" }, + Class_0_incorrectly_extends_base_class_1: { code: 2415, category: 1 /* Error */, key: "Class '{0}' incorrectly extends base class '{1}'." }, + Class_static_side_0_incorrectly_extends_base_class_static_side_1: { code: 2417, category: 1 /* Error */, key: "Class static side '{0}' incorrectly extends base class static side '{1}'." }, + Type_name_0_in_extends_clause_does_not_reference_constructor_function_for_0: { code: 2419, category: 1 /* Error */, key: "Type name '{0}' in extends clause does not reference constructor function for '{0}'." }, + Class_0_incorrectly_implements_interface_1: { code: 2420, category: 1 /* Error */, key: "Class '{0}' incorrectly implements interface '{1}'." }, + A_class_may_only_implement_another_class_or_interface: { code: 2422, category: 1 /* Error */, key: "A class may only implement another class or interface." }, + Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor: { code: 2423, category: 1 /* Error */, key: "Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member accessor." }, + Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_property: { code: 2424, category: 1 /* Error */, key: "Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member property." }, + Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_function: { code: 2425, category: 1 /* Error */, key: "Class '{0}' defines instance member property '{1}', but extended class '{2}' defines it as instance member function." }, + Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_function: { code: 2426, category: 1 /* Error */, key: "Class '{0}' defines instance member accessor '{1}', but extended class '{2}' defines it as instance member function." }, + Interface_name_cannot_be_0: { code: 2427, category: 1 /* Error */, key: "Interface name cannot be '{0}'" }, + All_declarations_of_an_interface_must_have_identical_type_parameters: { code: 2428, category: 1 /* Error */, key: "All declarations of an interface must have identical type parameters." }, + Interface_0_incorrectly_extends_interface_1: { code: 2430, category: 1 /* Error */, key: "Interface '{0}' incorrectly extends interface '{1}'." }, + Enum_name_cannot_be_0: { code: 2431, category: 1 /* Error */, key: "Enum name cannot be '{0}'" }, + In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enum_element: { code: 2432, category: 1 /* Error */, key: "In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element." }, + A_module_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merged: { code: 2433, category: 1 /* Error */, key: "A module declaration cannot be in a different file from a class or function with which it is merged" }, + A_module_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged: { code: 2434, category: 1 /* Error */, key: "A module declaration cannot be located prior to a class or function with which it is merged" }, + Ambient_external_modules_cannot_be_nested_in_other_modules: { code: 2435, category: 1 /* Error */, key: "Ambient external modules cannot be nested in other modules." }, + Ambient_external_module_declaration_cannot_specify_relative_module_name: { code: 2436, category: 1 /* Error */, key: "Ambient external module declaration cannot specify relative module name." }, + Module_0_is_hidden_by_a_local_declaration_with_the_same_name: { code: 2437, category: 1 /* Error */, key: "Module '{0}' is hidden by a local declaration with the same name" }, + Import_name_cannot_be_0: { code: 2438, category: 1 /* Error */, key: "Import name cannot be '{0}'" }, + Import_declaration_in_an_ambient_external_module_declaration_cannot_reference_external_module_through_relative_external_module_name: { code: 2439, category: 1 /* Error */, key: "Import declaration in an ambient external module declaration cannot reference external module through relative external module name." }, + Import_declaration_conflicts_with_local_declaration_of_0: { code: 2440, category: 1 /* Error */, key: "Import declaration conflicts with local declaration of '{0}'" }, + Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_an_external_module: { code: 2441, category: 1 /* Error */, key: "Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of an external module." }, + Types_have_separate_declarations_of_a_private_property_0: { code: 2442, category: 1 /* Error */, key: "Types have separate declarations of a private property '{0}'." }, + Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2: { code: 2443, category: 1 /* Error */, key: "Property '{0}' is protected but type '{1}' is not a class derived from '{2}'." }, + Property_0_is_protected_in_type_1_but_public_in_type_2: { code: 2444, category: 1 /* Error */, key: "Property '{0}' is protected in type '{1}' but public in type '{2}'." }, + Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses: { code: 2445, category: 1 /* Error */, key: "Property '{0}' is protected and only accessible within class '{1}' and its subclasses." }, + Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1: { code: 2446, category: 1 /* Error */, key: "Property '{0}' is protected and only accessible through an instance of class '{1}'." }, + The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead: { code: 2447, category: 1 /* Error */, key: "The '{0}' operator is not allowed for boolean types. Consider using '{1}' instead." }, + Block_scoped_variable_0_used_before_its_declaration: { code: 2448, category: 1 /* Error */, key: "Block-scoped variable '{0}' used before its declaration.", isEarly: true }, + The_operand_of_an_increment_or_decrement_operator_cannot_be_a_constant: { code: 2449, category: 1 /* Error */, key: "The operand of an increment or decrement operator cannot be a constant.", isEarly: true }, + Left_hand_side_of_assignment_expression_cannot_be_a_constant: { code: 2450, category: 1 /* Error */, key: "Left-hand side of assignment expression cannot be a constant.", isEarly: true }, + Cannot_redeclare_block_scoped_variable_0: { code: 2451, category: 1 /* Error */, key: "Cannot redeclare block-scoped variable '{0}'.", isEarly: true }, + An_enum_member_cannot_have_a_numeric_name: { code: 2452, category: 1 /* Error */, key: "An enum member cannot have a numeric name." }, + The_type_argument_for_type_parameter_0_cannot_be_inferred_from_the_usage_Consider_specifying_the_type_arguments_explicitly: { code: 2453, category: 1 /* Error */, key: "The type argument for type parameter '{0}' cannot be inferred from the usage. Consider specifying the type arguments explicitly." }, + Type_argument_candidate_1_is_not_a_valid_type_argument_because_it_is_not_a_supertype_of_candidate_0: { code: 2455, category: 1 /* Error */, key: "Type argument candidate '{1}' is not a valid type argument because it is not a supertype of candidate '{0}'." }, + Type_alias_0_circularly_references_itself: { code: 2456, category: 1 /* Error */, key: "Type alias '{0}' circularly references itself." }, + Type_alias_name_cannot_be_0: { code: 2457, category: 1 /* Error */, key: "Type alias name cannot be '{0}'" }, + An_AMD_module_cannot_have_multiple_name_assignments: { code: 2458, category: 1 /* Error */, key: "An AMD module cannot have multiple name assignments." }, + Import_declaration_0_is_using_private_name_1: { code: 4000, category: 1 /* Error */, key: "Import declaration '{0}' is using private name '{1}'." }, + Type_parameter_0_of_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 4001, category: 1 /* Error */, key: "Type parameter '{0}' of exported class has or is using name '{1}' from private module '{2}'." }, + Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: { code: 4002, category: 1 /* Error */, key: "Type parameter '{0}' of exported class has or is using private name '{1}'." }, + Type_parameter_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2: { code: 4003, category: 1 /* Error */, key: "Type parameter '{0}' of exported interface has or is using name '{1}' from private module '{2}'." }, + Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: { code: 4004, category: 1 /* Error */, key: "Type parameter '{0}' of exported interface has or is using private name '{1}'." }, + Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2: { code: 4005, category: 1 /* Error */, key: "Type parameter '{0}' of constructor signature from exported interface has or is using name '{1}' from private module '{2}'." }, + Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1: { code: 4006, category: 1 /* Error */, key: "Type parameter '{0}' of constructor signature from exported interface has or is using private name '{1}'." }, + Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2: { code: 4007, category: 1 /* Error */, key: "Type parameter '{0}' of call signature from exported interface has or is using name '{1}' from private module '{2}'." }, + Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1: { code: 4008, category: 1 /* Error */, key: "Type parameter '{0}' of call signature from exported interface has or is using private name '{1}'." }, + Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 4009, category: 1 /* Error */, key: "Type parameter '{0}' of public static method from exported class has or is using name '{1}' from private module '{2}'." }, + Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1: { code: 4010, category: 1 /* Error */, key: "Type parameter '{0}' of public static method from exported class has or is using private name '{1}'." }, + Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 4011, category: 1 /* Error */, key: "Type parameter '{0}' of public method from exported class has or is using name '{1}' from private module '{2}'." }, + Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1: { code: 4012, category: 1 /* Error */, key: "Type parameter '{0}' of public method from exported class has or is using private name '{1}'." }, + Type_parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2: { code: 4013, category: 1 /* Error */, key: "Type parameter '{0}' of method from exported interface has or is using name '{1}' from private module '{2}'." }, + Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1: { code: 4014, category: 1 /* Error */, key: "Type parameter '{0}' of method from exported interface has or is using private name '{1}'." }, + Type_parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2: { code: 4015, category: 1 /* Error */, key: "Type parameter '{0}' of exported function has or is using name '{1}' from private module '{2}'." }, + Type_parameter_0_of_exported_function_has_or_is_using_private_name_1: { code: 4016, category: 1 /* Error */, key: "Type parameter '{0}' of exported function has or is using private name '{1}'." }, + Implements_clause_of_exported_class_0_has_or_is_using_name_1_from_private_module_2: { code: 4017, category: 1 /* Error */, key: "Implements clause of exported class '{0}' has or is using name '{1}' from private module '{2}'." }, + Extends_clause_of_exported_class_0_has_or_is_using_name_1_from_private_module_2: { code: 4018, category: 1 /* Error */, key: "Extends clause of exported class '{0}' has or is using name '{1}' from private module '{2}'." }, + Implements_clause_of_exported_class_0_has_or_is_using_private_name_1: { code: 4019, category: 1 /* Error */, key: "Implements clause of exported class '{0}' has or is using private name '{1}'." }, + Extends_clause_of_exported_class_0_has_or_is_using_private_name_1: { code: 4020, category: 1 /* Error */, key: "Extends clause of exported class '{0}' has or is using private name '{1}'." }, + Extends_clause_of_exported_interface_0_has_or_is_using_name_1_from_private_module_2: { code: 4021, category: 1 /* Error */, key: "Extends clause of exported interface '{0}' has or is using name '{1}' from private module '{2}'." }, + Extends_clause_of_exported_interface_0_has_or_is_using_private_name_1: { code: 4022, category: 1 /* Error */, key: "Extends clause of exported interface '{0}' has or is using private name '{1}'." }, + Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: { code: 4023, category: 1 /* Error */, key: "Exported variable '{0}' has or is using name '{1}' from external module {2} but cannot be named." }, + Exported_variable_0_has_or_is_using_name_1_from_private_module_2: { code: 4024, category: 1 /* Error */, key: "Exported variable '{0}' has or is using name '{1}' from private module '{2}'." }, + Exported_variable_0_has_or_is_using_private_name_1: { code: 4025, category: 1 /* Error */, key: "Exported variable '{0}' has or is using private name '{1}'." }, + Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: { code: 4026, category: 1 /* Error */, key: "Public static property '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named." }, + Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 4027, category: 1 /* Error */, key: "Public static property '{0}' of exported class has or is using name '{1}' from private module '{2}'." }, + Public_static_property_0_of_exported_class_has_or_is_using_private_name_1: { code: 4028, category: 1 /* Error */, key: "Public static property '{0}' of exported class has or is using private name '{1}'." }, + Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: { code: 4029, category: 1 /* Error */, key: "Public property '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named." }, + Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 4030, category: 1 /* Error */, key: "Public property '{0}' of exported class has or is using name '{1}' from private module '{2}'." }, + Public_property_0_of_exported_class_has_or_is_using_private_name_1: { code: 4031, category: 1 /* Error */, key: "Public property '{0}' of exported class has or is using private name '{1}'." }, + Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2: { code: 4032, category: 1 /* Error */, key: "Property '{0}' of exported interface has or is using name '{1}' from private module '{2}'." }, + Property_0_of_exported_interface_has_or_is_using_private_name_1: { code: 4033, category: 1 /* Error */, key: "Property '{0}' of exported interface has or is using private name '{1}'." }, + Parameter_0_of_public_static_property_setter_from_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 4034, category: 1 /* Error */, key: "Parameter '{0}' of public static property setter from exported class has or is using name '{1}' from private module '{2}'." }, + Parameter_0_of_public_static_property_setter_from_exported_class_has_or_is_using_private_name_1: { code: 4035, category: 1 /* Error */, key: "Parameter '{0}' of public static property setter from exported class has or is using private name '{1}'." }, + Parameter_0_of_public_property_setter_from_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 4036, category: 1 /* Error */, key: "Parameter '{0}' of public property setter from exported class has or is using name '{1}' from private module '{2}'." }, + Parameter_0_of_public_property_setter_from_exported_class_has_or_is_using_private_name_1: { code: 4037, category: 1 /* Error */, key: "Parameter '{0}' of public property setter from exported class has or is using private name '{1}'." }, + Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: { code: 4038, category: 1 /* Error */, key: "Return type of public static property getter from exported class has or is using name '{0}' from external module {1} but cannot be named." }, + Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_name_0_from_private_module_1: { code: 4039, category: 1 /* Error */, key: "Return type of public static property getter from exported class has or is using name '{0}' from private module '{1}'." }, + Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_private_name_0: { code: 4040, category: 1 /* Error */, key: "Return type of public static property getter from exported class has or is using private name '{0}'." }, + Return_type_of_public_property_getter_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: { code: 4041, category: 1 /* Error */, key: "Return type of public property getter from exported class has or is using name '{0}' from external module {1} but cannot be named." }, + Return_type_of_public_property_getter_from_exported_class_has_or_is_using_name_0_from_private_module_1: { code: 4042, category: 1 /* Error */, key: "Return type of public property getter from exported class has or is using name '{0}' from private module '{1}'." }, + Return_type_of_public_property_getter_from_exported_class_has_or_is_using_private_name_0: { code: 4043, category: 1 /* Error */, key: "Return type of public property getter from exported class has or is using private name '{0}'." }, + Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1: { code: 4044, category: 1 /* Error */, key: "Return type of constructor signature from exported interface has or is using name '{0}' from private module '{1}'." }, + Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0: { code: 4045, category: 1 /* Error */, key: "Return type of constructor signature from exported interface has or is using private name '{0}'." }, + Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1: { code: 4046, category: 1 /* Error */, key: "Return type of call signature from exported interface has or is using name '{0}' from private module '{1}'." }, + Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0: { code: 4047, category: 1 /* Error */, key: "Return type of call signature from exported interface has or is using private name '{0}'." }, + Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1: { code: 4048, category: 1 /* Error */, key: "Return type of index signature from exported interface has or is using name '{0}' from private module '{1}'." }, + Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0: { code: 4049, category: 1 /* Error */, key: "Return type of index signature from exported interface has or is using private name '{0}'." }, + Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: { code: 4050, category: 1 /* Error */, key: "Return type of public static method from exported class has or is using name '{0}' from external module {1} but cannot be named." }, + Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1: { code: 4051, category: 1 /* Error */, key: "Return type of public static method from exported class has or is using name '{0}' from private module '{1}'." }, + Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0: { code: 4052, category: 1 /* Error */, key: "Return type of public static method from exported class has or is using private name '{0}'." }, + Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: { code: 4053, category: 1 /* Error */, key: "Return type of public method from exported class has or is using name '{0}' from external module {1} but cannot be named." }, + Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1: { code: 4054, category: 1 /* Error */, key: "Return type of public method from exported class has or is using name '{0}' from private module '{1}'." }, + Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0: { code: 4055, category: 1 /* Error */, key: "Return type of public method from exported class has or is using private name '{0}'." }, + Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1: { code: 4056, category: 1 /* Error */, key: "Return type of method from exported interface has or is using name '{0}' from private module '{1}'." }, + Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0: { code: 4057, category: 1 /* Error */, key: "Return type of method from exported interface has or is using private name '{0}'." }, + Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: { code: 4058, category: 1 /* Error */, key: "Return type of exported function has or is using name '{0}' from external module {1} but cannot be named." }, + Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1: { code: 4059, category: 1 /* Error */, key: "Return type of exported function has or is using name '{0}' from private module '{1}'." }, + Return_type_of_exported_function_has_or_is_using_private_name_0: { code: 4060, category: 1 /* Error */, key: "Return type of exported function has or is using private name '{0}'." }, + Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: { code: 4061, category: 1 /* Error */, key: "Parameter '{0}' of constructor from exported class has or is using name '{1}' from external module {2} but cannot be named." }, + Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 4062, category: 1 /* Error */, key: "Parameter '{0}' of constructor from exported class has or is using name '{1}' from private module '{2}'." }, + Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1: { code: 4063, category: 1 /* Error */, key: "Parameter '{0}' of constructor from exported class has or is using private name '{1}'." }, + Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2: { code: 4064, category: 1 /* Error */, key: "Parameter '{0}' of constructor signature from exported interface has or is using name '{1}' from private module '{2}'." }, + Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1: { code: 4065, category: 1 /* Error */, key: "Parameter '{0}' of constructor signature from exported interface has or is using private name '{1}'." }, + Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2: { code: 4066, category: 1 /* Error */, key: "Parameter '{0}' of call signature from exported interface has or is using name '{1}' from private module '{2}'." }, + Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1: { code: 4067, category: 1 /* Error */, key: "Parameter '{0}' of call signature from exported interface has or is using private name '{1}'." }, + Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: { code: 4068, category: 1 /* Error */, key: "Parameter '{0}' of public static method from exported class has or is using name '{1}' from external module {2} but cannot be named." }, + Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 4069, category: 1 /* Error */, key: "Parameter '{0}' of public static method from exported class has or is using name '{1}' from private module '{2}'." }, + Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1: { code: 4070, category: 1 /* Error */, key: "Parameter '{0}' of public static method from exported class has or is using private name '{1}'." }, + Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: { code: 4071, category: 1 /* Error */, key: "Parameter '{0}' of public method from exported class has or is using name '{1}' from external module {2} but cannot be named." }, + Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 4072, category: 1 /* Error */, key: "Parameter '{0}' of public method from exported class has or is using name '{1}' from private module '{2}'." }, + Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1: { code: 4073, category: 1 /* Error */, key: "Parameter '{0}' of public method from exported class has or is using private name '{1}'." }, + Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2: { code: 4074, category: 1 /* Error */, key: "Parameter '{0}' of method from exported interface has or is using name '{1}' from private module '{2}'." }, + Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1: { code: 4075, category: 1 /* Error */, key: "Parameter '{0}' of method from exported interface has or is using private name '{1}'." }, + Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: { code: 4076, category: 1 /* Error */, key: "Parameter '{0}' of exported function has or is using name '{1}' from external module {2} but cannot be named." }, + Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2: { code: 4077, category: 1 /* Error */, key: "Parameter '{0}' of exported function has or is using name '{1}' from private module '{2}'." }, + Parameter_0_of_exported_function_has_or_is_using_private_name_1: { code: 4078, category: 1 /* Error */, key: "Parameter '{0}' of exported function has or is using private name '{1}'." }, + Exported_type_alias_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: { code: 4079, category: 1 /* Error */, key: "Exported type alias '{0}' has or is using name '{1}' from external module {2} but cannot be named." }, + Exported_type_alias_0_has_or_is_using_name_1_from_private_module_2: { code: 4080, category: 1 /* Error */, key: "Exported type alias '{0}' has or is using name '{1}' from private module '{2}'." }, + Exported_type_alias_0_has_or_is_using_private_name_1: { code: 4081, category: 1 /* Error */, key: "Exported type alias '{0}' has or is using private name '{1}'." }, + Enum_declarations_must_all_be_const_or_non_const: { code: 4082, category: 1 /* Error */, key: "Enum declarations must all be const or non-const." }, + In_const_enum_declarations_member_initializer_must_be_constant_expression: { code: 4083, category: 1 /* Error */, key: "In 'const' enum declarations member initializer must be constant expression.", isEarly: true }, + const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment: { code: 4084, category: 1 /* Error */, key: "'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment." }, + Index_expression_arguments_in_const_enums_must_be_of_type_string: { code: 4085, category: 1 /* Error */, key: "Index expression arguments in 'const' enums must be of type 'string'." }, + const_enum_member_initializer_was_evaluated_to_a_non_finite_value: { code: 4086, category: 1 /* Error */, key: "'const' enum member initializer was evaluated to a non-finite value." }, + const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN: { code: 4087, category: 1 /* Error */, key: "'const' enum member initializer was evaluated to disallowed value 'NaN'." }, + The_current_host_does_not_support_the_0_option: { code: 5001, category: 1 /* Error */, key: "The current host does not support the '{0}' option." }, + Cannot_find_the_common_subdirectory_path_for_the_input_files: { code: 5009, category: 1 /* Error */, key: "Cannot find the common subdirectory path for the input files." }, + Cannot_read_file_0_Colon_1: { code: 5012, category: 1 /* Error */, key: "Cannot read file '{0}': {1}" }, + Unsupported_file_encoding: { code: 5013, category: 1 /* Error */, key: "Unsupported file encoding." }, + Unknown_compiler_option_0: { code: 5023, category: 1 /* Error */, key: "Unknown compiler option '{0}'." }, + Could_not_write_file_0_Colon_1: { code: 5033, category: 1 /* Error */, key: "Could not write file '{0}': {1}" }, + Option_mapRoot_cannot_be_specified_without_specifying_sourcemap_option: { code: 5038, category: 1 /* Error */, key: "Option mapRoot cannot be specified without specifying sourcemap option." }, + Option_sourceRoot_cannot_be_specified_without_specifying_sourcemap_option: { code: 5039, category: 1 /* Error */, key: "Option sourceRoot cannot be specified without specifying sourcemap option." }, + Concatenate_and_emit_output_to_single_file: { code: 6001, category: 2 /* Message */, key: "Concatenate and emit output to single file." }, + Generates_corresponding_d_ts_file: { code: 6002, category: 2 /* Message */, key: "Generates corresponding '.d.ts' file." }, + Specifies_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations: { code: 6003, category: 2 /* Message */, key: "Specifies the location where debugger should locate map files instead of generated locations." }, + Specifies_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations: { code: 6004, category: 2 /* Message */, key: "Specifies the location where debugger should locate TypeScript files instead of source locations." }, + Watch_input_files: { code: 6005, category: 2 /* Message */, key: "Watch input files." }, + Redirect_output_structure_to_the_directory: { code: 6006, category: 2 /* Message */, key: "Redirect output structure to the directory." }, + Do_not_erase_const_enum_declarations_in_generated_code: { code: 6007, category: 2 /* Message */, key: "Do not erase const enum declarations in generated code." }, + Do_not_emit_outputs_if_any_type_checking_errors_were_reported: { code: 6008, category: 2 /* Message */, key: "Do not emit outputs if any type checking errors were reported." }, + Do_not_emit_comments_to_output: { code: 6009, category: 2 /* Message */, key: "Do not emit comments to output." }, + Specify_ECMAScript_target_version_Colon_ES3_default_ES5_or_ES6_experimental: { code: 6015, category: 2 /* Message */, key: "Specify ECMAScript target version: 'ES3' (default), 'ES5', or 'ES6' (experimental)" }, + Specify_module_code_generation_Colon_commonjs_or_amd: { code: 6016, category: 2 /* Message */, key: "Specify module code generation: 'commonjs' or 'amd'" }, + Print_this_message: { code: 6017, category: 2 /* Message */, key: "Print this message." }, + Print_the_compiler_s_version: { code: 6019, category: 2 /* Message */, key: "Print the compiler's version." }, + Syntax_Colon_0: { code: 6023, category: 2 /* Message */, key: "Syntax: {0}" }, + options: { code: 6024, category: 2 /* Message */, key: "options" }, + file: { code: 6025, category: 2 /* Message */, key: "file" }, + Examples_Colon_0: { code: 6026, category: 2 /* Message */, key: "Examples: {0}" }, + Options_Colon: { code: 6027, category: 2 /* Message */, key: "Options:" }, + Version_0: { code: 6029, category: 2 /* Message */, key: "Version {0}" }, + Insert_command_line_options_and_files_from_a_file: { code: 6030, category: 2 /* Message */, key: "Insert command line options and files from a file." }, + File_change_detected_Compiling: { code: 6032, category: 2 /* Message */, key: "File change detected. Compiling..." }, + KIND: { code: 6034, category: 2 /* Message */, key: "KIND" }, + FILE: { code: 6035, category: 2 /* Message */, key: "FILE" }, + VERSION: { code: 6036, category: 2 /* Message */, key: "VERSION" }, + LOCATION: { code: 6037, category: 2 /* Message */, key: "LOCATION" }, + DIRECTORY: { code: 6038, category: 2 /* Message */, key: "DIRECTORY" }, + Compilation_complete_Watching_for_file_changes: { code: 6042, category: 2 /* Message */, key: "Compilation complete. Watching for file changes." }, + Generates_corresponding_map_file: { code: 6043, category: 2 /* Message */, key: "Generates corresponding '.map' file." }, + Compiler_option_0_expects_an_argument: { code: 6044, category: 1 /* Error */, key: "Compiler option '{0}' expects an argument." }, + Unterminated_quoted_string_in_response_file_0: { code: 6045, category: 1 /* Error */, key: "Unterminated quoted string in response file '{0}'." }, + Argument_for_module_option_must_be_commonjs_or_amd: { code: 6046, category: 1 /* Error */, key: "Argument for '--module' option must be 'commonjs' or 'amd'." }, + Argument_for_target_option_must_be_es3_es5_or_es6: { code: 6047, category: 1 /* Error */, key: "Argument for '--target' option must be 'es3', 'es5', or 'es6'." }, + Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1: { code: 6048, category: 1 /* Error */, key: "Locale must be of the form or -. For example '{0}' or '{1}'." }, + Unsupported_locale_0: { code: 6049, category: 1 /* Error */, key: "Unsupported locale '{0}'." }, + Unable_to_open_file_0: { code: 6050, category: 1 /* Error */, key: "Unable to open file '{0}'." }, + Corrupted_locale_file_0: { code: 6051, category: 1 /* Error */, key: "Corrupted locale file {0}." }, + Warn_on_expressions_and_declarations_with_an_implied_any_type: { code: 6052, category: 2 /* Message */, key: "Warn on expressions and declarations with an implied 'any' type." }, + File_0_not_found: { code: 6053, category: 1 /* Error */, key: "File '{0}' not found." }, + File_0_must_have_extension_ts_or_d_ts: { code: 6054, category: 1 /* Error */, key: "File '{0}' must have extension '.ts' or '.d.ts'." }, + Variable_0_implicitly_has_an_1_type: { code: 7005, category: 1 /* Error */, key: "Variable '{0}' implicitly has an '{1}' type." }, + Parameter_0_implicitly_has_an_1_type: { code: 7006, category: 1 /* Error */, key: "Parameter '{0}' implicitly has an '{1}' type." }, + Member_0_implicitly_has_an_1_type: { code: 7008, category: 1 /* Error */, key: "Member '{0}' implicitly has an '{1}' type." }, + new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type: { code: 7009, category: 1 /* Error */, key: "'new' expression, whose target lacks a construct signature, implicitly has an 'any' type." }, + _0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type: { code: 7010, category: 1 /* Error */, key: "'{0}', which lacks return-type annotation, implicitly has an '{1}' return type." }, + Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type: { code: 7011, category: 1 /* Error */, key: "Function expression, which lacks return-type annotation, implicitly has an '{0}' return type." }, + Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type: { code: 7013, category: 1 /* Error */, key: "Construct signature, which lacks return-type annotation, implicitly has an 'any' return type." }, + Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_type_annotation: { code: 7016, category: 1 /* Error */, key: "Property '{0}' implicitly has type 'any', because its 'set' accessor lacks a type annotation." }, + Index_signature_of_object_type_implicitly_has_an_any_type: { code: 7017, category: 1 /* Error */, key: "Index signature of object type implicitly has an 'any' type." }, + Object_literal_s_property_0_implicitly_has_an_1_type: { code: 7018, category: 1 /* Error */, key: "Object literal's property '{0}' implicitly has an '{1}' type." }, + Rest_parameter_0_implicitly_has_an_any_type: { code: 7019, category: 1 /* Error */, key: "Rest parameter '{0}' implicitly has an 'any[]' type." }, + Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type: { code: 7020, category: 1 /* Error */, key: "Call signature, which lacks return-type annotation, implicitly has an 'any' return type." }, + _0_implicitly_has_type_any_because_it_is_referenced_directly_or_indirectly_in_its_own_type_annotation: { code: 7021, category: 1 /* Error */, key: "'{0}' implicitly has type 'any' because it is referenced directly or indirectly in its own type annotation." }, + _0_implicitly_has_type_any_because_it_is_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer: { code: 7022, category: 1 /* Error */, key: "'{0}' implicitly has type 'any' because it is does not have a type annotation and is referenced directly or indirectly in its own initializer." }, + _0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions: { code: 7023, category: 1 /* Error */, key: "'{0}' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions." }, + Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions: { code: 7024, category: 1 /* Error */, key: "Function implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions." }, + You_cannot_rename_this_element: { code: 8000, category: 1 /* Error */, key: "You cannot rename this element." } + }; +})(ts || (ts = {})); +var ts; +(function (ts) { + var textToToken = { + "any": 109 /* AnyKeyword */, + "boolean": 110 /* BooleanKeyword */, + "break": 64 /* BreakKeyword */, + "case": 65 /* CaseKeyword */, + "catch": 66 /* CatchKeyword */, + "class": 67 /* ClassKeyword */, + "continue": 69 /* ContinueKeyword */, + "const": 68 /* ConstKeyword */, + "constructor": 111 /* ConstructorKeyword */, + "debugger": 70 /* DebuggerKeyword */, + "declare": 112 /* DeclareKeyword */, + "default": 71 /* DefaultKeyword */, + "delete": 72 /* DeleteKeyword */, + "do": 73 /* DoKeyword */, + "else": 74 /* ElseKeyword */, + "enum": 75 /* EnumKeyword */, + "export": 76 /* ExportKeyword */, + "extends": 77 /* ExtendsKeyword */, + "false": 78 /* FalseKeyword */, + "finally": 79 /* FinallyKeyword */, + "for": 80 /* ForKeyword */, + "function": 81 /* FunctionKeyword */, + "get": 113 /* GetKeyword */, + "if": 82 /* IfKeyword */, + "implements": 100 /* ImplementsKeyword */, + "import": 83 /* ImportKeyword */, + "in": 84 /* InKeyword */, + "instanceof": 85 /* InstanceOfKeyword */, + "interface": 101 /* InterfaceKeyword */, + "let": 102 /* LetKeyword */, + "module": 114 /* ModuleKeyword */, + "new": 86 /* NewKeyword */, + "null": 87 /* NullKeyword */, + "number": 116 /* NumberKeyword */, + "package": 103 /* PackageKeyword */, + "private": 104 /* PrivateKeyword */, + "protected": 105 /* ProtectedKeyword */, + "public": 106 /* PublicKeyword */, + "require": 115 /* RequireKeyword */, + "return": 88 /* ReturnKeyword */, + "set": 117 /* SetKeyword */, + "static": 107 /* StaticKeyword */, + "string": 118 /* StringKeyword */, + "super": 89 /* SuperKeyword */, + "switch": 90 /* SwitchKeyword */, + "this": 91 /* ThisKeyword */, + "throw": 92 /* ThrowKeyword */, + "true": 93 /* TrueKeyword */, + "try": 94 /* TryKeyword */, + "type": 119 /* TypeKeyword */, + "typeof": 95 /* TypeOfKeyword */, + "var": 96 /* VarKeyword */, + "void": 97 /* VoidKeyword */, + "while": 98 /* WhileKeyword */, + "with": 99 /* WithKeyword */, + "yield": 108 /* YieldKeyword */, + "{": 13 /* OpenBraceToken */, + "}": 14 /* CloseBraceToken */, + "(": 15 /* OpenParenToken */, + ")": 16 /* CloseParenToken */, + "[": 17 /* OpenBracketToken */, + "]": 18 /* CloseBracketToken */, + ".": 19 /* DotToken */, + "...": 20 /* DotDotDotToken */, + ";": 21 /* SemicolonToken */, + ",": 22 /* CommaToken */, + "<": 23 /* LessThanToken */, + ">": 24 /* GreaterThanToken */, + "<=": 25 /* LessThanEqualsToken */, + ">=": 26 /* GreaterThanEqualsToken */, + "==": 27 /* EqualsEqualsToken */, + "!=": 28 /* ExclamationEqualsToken */, + "===": 29 /* EqualsEqualsEqualsToken */, + "!==": 30 /* ExclamationEqualsEqualsToken */, + "=>": 31 /* EqualsGreaterThanToken */, + "+": 32 /* PlusToken */, + "-": 33 /* MinusToken */, + "*": 34 /* AsteriskToken */, + "/": 35 /* SlashToken */, + "%": 36 /* PercentToken */, + "++": 37 /* PlusPlusToken */, + "--": 38 /* MinusMinusToken */, + "<<": 39 /* LessThanLessThanToken */, + ">>": 40 /* GreaterThanGreaterThanToken */, + ">>>": 41 /* GreaterThanGreaterThanGreaterThanToken */, + "&": 42 /* AmpersandToken */, + "|": 43 /* BarToken */, + "^": 44 /* CaretToken */, + "!": 45 /* ExclamationToken */, + "~": 46 /* TildeToken */, + "&&": 47 /* AmpersandAmpersandToken */, + "||": 48 /* BarBarToken */, + "?": 49 /* QuestionToken */, + ":": 50 /* ColonToken */, + "=": 51 /* EqualsToken */, + "+=": 52 /* PlusEqualsToken */, + "-=": 53 /* MinusEqualsToken */, + "*=": 54 /* AsteriskEqualsToken */, + "/=": 55 /* SlashEqualsToken */, + "%=": 56 /* PercentEqualsToken */, + "<<=": 57 /* LessThanLessThanEqualsToken */, + ">>=": 58 /* GreaterThanGreaterThanEqualsToken */, + ">>>=": 59 /* GreaterThanGreaterThanGreaterThanEqualsToken */, + "&=": 60 /* AmpersandEqualsToken */, + "|=": 61 /* BarEqualsToken */, + "^=": 62 /* CaretEqualsToken */ + }; + var unicodeES3IdentifierStart = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 543, 546, 563, 592, 685, 688, 696, 699, 705, 720, 721, 736, 740, 750, 750, 890, 890, 902, 902, 904, 906, 908, 908, 910, 929, 931, 974, 976, 983, 986, 1011, 1024, 1153, 1164, 1220, 1223, 1224, 1227, 1228, 1232, 1269, 1272, 1273, 1329, 1366, 1369, 1369, 1377, 1415, 1488, 1514, 1520, 1522, 1569, 1594, 1600, 1610, 1649, 1747, 1749, 1749, 1765, 1766, 1786, 1788, 1808, 1808, 1810, 1836, 1920, 1957, 2309, 2361, 2365, 2365, 2384, 2384, 2392, 2401, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2524, 2525, 2527, 2529, 2544, 2545, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2649, 2652, 2654, 2654, 2674, 2676, 2693, 2699, 2701, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2749, 2749, 2768, 2768, 2784, 2784, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2870, 2873, 2877, 2877, 2908, 2909, 2911, 2913, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 2997, 2999, 3001, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3168, 3169, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3294, 3294, 3296, 3297, 3333, 3340, 3342, 3344, 3346, 3368, 3370, 3385, 3424, 3425, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3585, 3632, 3634, 3635, 3648, 3654, 3713, 3714, 3716, 3716, 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743, 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3760, 3762, 3763, 3773, 3773, 3776, 3780, 3782, 3782, 3804, 3805, 3840, 3840, 3904, 3911, 3913, 3946, 3976, 3979, 4096, 4129, 4131, 4135, 4137, 4138, 4176, 4181, 4256, 4293, 4304, 4342, 4352, 4441, 4447, 4514, 4520, 4601, 4608, 4614, 4616, 4678, 4680, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4742, 4744, 4744, 4746, 4749, 4752, 4782, 4784, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4814, 4816, 4822, 4824, 4846, 4848, 4878, 4880, 4880, 4882, 4885, 4888, 4894, 4896, 4934, 4936, 4954, 5024, 5108, 5121, 5740, 5743, 5750, 5761, 5786, 5792, 5866, 6016, 6067, 6176, 6263, 6272, 6312, 7680, 7835, 7840, 7929, 7936, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8319, 8319, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8497, 8499, 8505, 8544, 8579, 12293, 12295, 12321, 12329, 12337, 12341, 12344, 12346, 12353, 12436, 12445, 12446, 12449, 12538, 12540, 12542, 12549, 12588, 12593, 12686, 12704, 12727, 13312, 19893, 19968, 40869, 40960, 42124, 44032, 55203, 63744, 64045, 64256, 64262, 64275, 64279, 64285, 64285, 64287, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65136, 65138, 65140, 65140, 65142, 65276, 65313, 65338, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500,]; + var unicodeES3IdentifierPart = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 543, 546, 563, 592, 685, 688, 696, 699, 705, 720, 721, 736, 740, 750, 750, 768, 846, 864, 866, 890, 890, 902, 902, 904, 906, 908, 908, 910, 929, 931, 974, 976, 983, 986, 1011, 1024, 1153, 1155, 1158, 1164, 1220, 1223, 1224, 1227, 1228, 1232, 1269, 1272, 1273, 1329, 1366, 1369, 1369, 1377, 1415, 1425, 1441, 1443, 1465, 1467, 1469, 1471, 1471, 1473, 1474, 1476, 1476, 1488, 1514, 1520, 1522, 1569, 1594, 1600, 1621, 1632, 1641, 1648, 1747, 1749, 1756, 1759, 1768, 1770, 1773, 1776, 1788, 1808, 1836, 1840, 1866, 1920, 1968, 2305, 2307, 2309, 2361, 2364, 2381, 2384, 2388, 2392, 2403, 2406, 2415, 2433, 2435, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2492, 2492, 2494, 2500, 2503, 2504, 2507, 2509, 2519, 2519, 2524, 2525, 2527, 2531, 2534, 2545, 2562, 2562, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2620, 2620, 2622, 2626, 2631, 2632, 2635, 2637, 2649, 2652, 2654, 2654, 2662, 2676, 2689, 2691, 2693, 2699, 2701, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2748, 2757, 2759, 2761, 2763, 2765, 2768, 2768, 2784, 2784, 2790, 2799, 2817, 2819, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2870, 2873, 2876, 2883, 2887, 2888, 2891, 2893, 2902, 2903, 2908, 2909, 2911, 2913, 2918, 2927, 2946, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 2997, 2999, 3001, 3006, 3010, 3014, 3016, 3018, 3021, 3031, 3031, 3047, 3055, 3073, 3075, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3134, 3140, 3142, 3144, 3146, 3149, 3157, 3158, 3168, 3169, 3174, 3183, 3202, 3203, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3262, 3268, 3270, 3272, 3274, 3277, 3285, 3286, 3294, 3294, 3296, 3297, 3302, 3311, 3330, 3331, 3333, 3340, 3342, 3344, 3346, 3368, 3370, 3385, 3390, 3395, 3398, 3400, 3402, 3405, 3415, 3415, 3424, 3425, 3430, 3439, 3458, 3459, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3530, 3530, 3535, 3540, 3542, 3542, 3544, 3551, 3570, 3571, 3585, 3642, 3648, 3662, 3664, 3673, 3713, 3714, 3716, 3716, 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743, 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3769, 3771, 3773, 3776, 3780, 3782, 3782, 3784, 3789, 3792, 3801, 3804, 3805, 3840, 3840, 3864, 3865, 3872, 3881, 3893, 3893, 3895, 3895, 3897, 3897, 3902, 3911, 3913, 3946, 3953, 3972, 3974, 3979, 3984, 3991, 3993, 4028, 4038, 4038, 4096, 4129, 4131, 4135, 4137, 4138, 4140, 4146, 4150, 4153, 4160, 4169, 4176, 4185, 4256, 4293, 4304, 4342, 4352, 4441, 4447, 4514, 4520, 4601, 4608, 4614, 4616, 4678, 4680, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4742, 4744, 4744, 4746, 4749, 4752, 4782, 4784, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4814, 4816, 4822, 4824, 4846, 4848, 4878, 4880, 4880, 4882, 4885, 4888, 4894, 4896, 4934, 4936, 4954, 4969, 4977, 5024, 5108, 5121, 5740, 5743, 5750, 5761, 5786, 5792, 5866, 6016, 6099, 6112, 6121, 6160, 6169, 6176, 6263, 6272, 6313, 7680, 7835, 7840, 7929, 7936, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8255, 8256, 8319, 8319, 8400, 8412, 8417, 8417, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8497, 8499, 8505, 8544, 8579, 12293, 12295, 12321, 12335, 12337, 12341, 12344, 12346, 12353, 12436, 12441, 12442, 12445, 12446, 12449, 12542, 12549, 12588, 12593, 12686, 12704, 12727, 13312, 19893, 19968, 40869, 40960, 42124, 44032, 55203, 63744, 64045, 64256, 64262, 64275, 64279, 64285, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65056, 65059, 65075, 65076, 65101, 65103, 65136, 65138, 65140, 65140, 65142, 65276, 65296, 65305, 65313, 65338, 65343, 65343, 65345, 65370, 65381, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500,]; + var unicodeES5IdentifierStart = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 705, 710, 721, 736, 740, 748, 748, 750, 750, 880, 884, 886, 887, 890, 893, 902, 902, 904, 906, 908, 908, 910, 929, 931, 1013, 1015, 1153, 1162, 1319, 1329, 1366, 1369, 1369, 1377, 1415, 1488, 1514, 1520, 1522, 1568, 1610, 1646, 1647, 1649, 1747, 1749, 1749, 1765, 1766, 1774, 1775, 1786, 1788, 1791, 1791, 1808, 1808, 1810, 1839, 1869, 1957, 1969, 1969, 1994, 2026, 2036, 2037, 2042, 2042, 2048, 2069, 2074, 2074, 2084, 2084, 2088, 2088, 2112, 2136, 2208, 2208, 2210, 2220, 2308, 2361, 2365, 2365, 2384, 2384, 2392, 2401, 2417, 2423, 2425, 2431, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2493, 2493, 2510, 2510, 2524, 2525, 2527, 2529, 2544, 2545, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2649, 2652, 2654, 2654, 2674, 2676, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2749, 2749, 2768, 2768, 2784, 2785, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2869, 2873, 2877, 2877, 2908, 2909, 2911, 2913, 2929, 2929, 2947, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3024, 3024, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3133, 3133, 3160, 3161, 3168, 3169, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3261, 3261, 3294, 3294, 3296, 3297, 3313, 3314, 3333, 3340, 3342, 3344, 3346, 3386, 3389, 3389, 3406, 3406, 3424, 3425, 3450, 3455, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3585, 3632, 3634, 3635, 3648, 3654, 3713, 3714, 3716, 3716, 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743, 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3760, 3762, 3763, 3773, 3773, 3776, 3780, 3782, 3782, 3804, 3807, 3840, 3840, 3904, 3911, 3913, 3948, 3976, 3980, 4096, 4138, 4159, 4159, 4176, 4181, 4186, 4189, 4193, 4193, 4197, 4198, 4206, 4208, 4213, 4225, 4238, 4238, 4256, 4293, 4295, 4295, 4301, 4301, 4304, 4346, 4348, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4822, 4824, 4880, 4882, 4885, 4888, 4954, 4992, 5007, 5024, 5108, 5121, 5740, 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5872, 5888, 5900, 5902, 5905, 5920, 5937, 5952, 5969, 5984, 5996, 5998, 6000, 6016, 6067, 6103, 6103, 6108, 6108, 6176, 6263, 6272, 6312, 6314, 6314, 6320, 6389, 6400, 6428, 6480, 6509, 6512, 6516, 6528, 6571, 6593, 6599, 6656, 6678, 6688, 6740, 6823, 6823, 6917, 6963, 6981, 6987, 7043, 7072, 7086, 7087, 7098, 7141, 7168, 7203, 7245, 7247, 7258, 7293, 7401, 7404, 7406, 7409, 7413, 7414, 7424, 7615, 7680, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8305, 8305, 8319, 8319, 8336, 8348, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8505, 8508, 8511, 8517, 8521, 8526, 8526, 8544, 8584, 11264, 11310, 11312, 11358, 11360, 11492, 11499, 11502, 11506, 11507, 11520, 11557, 11559, 11559, 11565, 11565, 11568, 11623, 11631, 11631, 11648, 11670, 11680, 11686, 11688, 11694, 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726, 11728, 11734, 11736, 11742, 11823, 11823, 12293, 12295, 12321, 12329, 12337, 12341, 12344, 12348, 12353, 12438, 12445, 12447, 12449, 12538, 12540, 12543, 12549, 12589, 12593, 12686, 12704, 12730, 12784, 12799, 13312, 19893, 19968, 40908, 40960, 42124, 42192, 42237, 42240, 42508, 42512, 42527, 42538, 42539, 42560, 42606, 42623, 42647, 42656, 42735, 42775, 42783, 42786, 42888, 42891, 42894, 42896, 42899, 42912, 42922, 43000, 43009, 43011, 43013, 43015, 43018, 43020, 43042, 43072, 43123, 43138, 43187, 43250, 43255, 43259, 43259, 43274, 43301, 43312, 43334, 43360, 43388, 43396, 43442, 43471, 43471, 43520, 43560, 43584, 43586, 43588, 43595, 43616, 43638, 43642, 43642, 43648, 43695, 43697, 43697, 43701, 43702, 43705, 43709, 43712, 43712, 43714, 43714, 43739, 43741, 43744, 43754, 43762, 43764, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43814, 43816, 43822, 43968, 44002, 44032, 55203, 55216, 55238, 55243, 55291, 63744, 64109, 64112, 64217, 64256, 64262, 64275, 64279, 64285, 64285, 64287, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65136, 65140, 65142, 65276, 65313, 65338, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500,]; + var unicodeES5IdentifierPart = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 705, 710, 721, 736, 740, 748, 748, 750, 750, 768, 884, 886, 887, 890, 893, 902, 902, 904, 906, 908, 908, 910, 929, 931, 1013, 1015, 1153, 1155, 1159, 1162, 1319, 1329, 1366, 1369, 1369, 1377, 1415, 1425, 1469, 1471, 1471, 1473, 1474, 1476, 1477, 1479, 1479, 1488, 1514, 1520, 1522, 1552, 1562, 1568, 1641, 1646, 1747, 1749, 1756, 1759, 1768, 1770, 1788, 1791, 1791, 1808, 1866, 1869, 1969, 1984, 2037, 2042, 2042, 2048, 2093, 2112, 2139, 2208, 2208, 2210, 2220, 2276, 2302, 2304, 2403, 2406, 2415, 2417, 2423, 2425, 2431, 2433, 2435, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2492, 2500, 2503, 2504, 2507, 2510, 2519, 2519, 2524, 2525, 2527, 2531, 2534, 2545, 2561, 2563, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2620, 2620, 2622, 2626, 2631, 2632, 2635, 2637, 2641, 2641, 2649, 2652, 2654, 2654, 2662, 2677, 2689, 2691, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2748, 2757, 2759, 2761, 2763, 2765, 2768, 2768, 2784, 2787, 2790, 2799, 2817, 2819, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2869, 2873, 2876, 2884, 2887, 2888, 2891, 2893, 2902, 2903, 2908, 2909, 2911, 2915, 2918, 2927, 2929, 2929, 2946, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3006, 3010, 3014, 3016, 3018, 3021, 3024, 3024, 3031, 3031, 3046, 3055, 3073, 3075, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3133, 3140, 3142, 3144, 3146, 3149, 3157, 3158, 3160, 3161, 3168, 3171, 3174, 3183, 3202, 3203, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3260, 3268, 3270, 3272, 3274, 3277, 3285, 3286, 3294, 3294, 3296, 3299, 3302, 3311, 3313, 3314, 3330, 3331, 3333, 3340, 3342, 3344, 3346, 3386, 3389, 3396, 3398, 3400, 3402, 3406, 3415, 3415, 3424, 3427, 3430, 3439, 3450, 3455, 3458, 3459, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3530, 3530, 3535, 3540, 3542, 3542, 3544, 3551, 3570, 3571, 3585, 3642, 3648, 3662, 3664, 3673, 3713, 3714, 3716, 3716, 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743, 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3769, 3771, 3773, 3776, 3780, 3782, 3782, 3784, 3789, 3792, 3801, 3804, 3807, 3840, 3840, 3864, 3865, 3872, 3881, 3893, 3893, 3895, 3895, 3897, 3897, 3902, 3911, 3913, 3948, 3953, 3972, 3974, 3991, 3993, 4028, 4038, 4038, 4096, 4169, 4176, 4253, 4256, 4293, 4295, 4295, 4301, 4301, 4304, 4346, 4348, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4822, 4824, 4880, 4882, 4885, 4888, 4954, 4957, 4959, 4992, 5007, 5024, 5108, 5121, 5740, 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5872, 5888, 5900, 5902, 5908, 5920, 5940, 5952, 5971, 5984, 5996, 5998, 6000, 6002, 6003, 6016, 6099, 6103, 6103, 6108, 6109, 6112, 6121, 6155, 6157, 6160, 6169, 6176, 6263, 6272, 6314, 6320, 6389, 6400, 6428, 6432, 6443, 6448, 6459, 6470, 6509, 6512, 6516, 6528, 6571, 6576, 6601, 6608, 6617, 6656, 6683, 6688, 6750, 6752, 6780, 6783, 6793, 6800, 6809, 6823, 6823, 6912, 6987, 6992, 7001, 7019, 7027, 7040, 7155, 7168, 7223, 7232, 7241, 7245, 7293, 7376, 7378, 7380, 7414, 7424, 7654, 7676, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8204, 8205, 8255, 8256, 8276, 8276, 8305, 8305, 8319, 8319, 8336, 8348, 8400, 8412, 8417, 8417, 8421, 8432, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8505, 8508, 8511, 8517, 8521, 8526, 8526, 8544, 8584, 11264, 11310, 11312, 11358, 11360, 11492, 11499, 11507, 11520, 11557, 11559, 11559, 11565, 11565, 11568, 11623, 11631, 11631, 11647, 11670, 11680, 11686, 11688, 11694, 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726, 11728, 11734, 11736, 11742, 11744, 11775, 11823, 11823, 12293, 12295, 12321, 12335, 12337, 12341, 12344, 12348, 12353, 12438, 12441, 12442, 12445, 12447, 12449, 12538, 12540, 12543, 12549, 12589, 12593, 12686, 12704, 12730, 12784, 12799, 13312, 19893, 19968, 40908, 40960, 42124, 42192, 42237, 42240, 42508, 42512, 42539, 42560, 42607, 42612, 42621, 42623, 42647, 42655, 42737, 42775, 42783, 42786, 42888, 42891, 42894, 42896, 42899, 42912, 42922, 43000, 43047, 43072, 43123, 43136, 43204, 43216, 43225, 43232, 43255, 43259, 43259, 43264, 43309, 43312, 43347, 43360, 43388, 43392, 43456, 43471, 43481, 43520, 43574, 43584, 43597, 43600, 43609, 43616, 43638, 43642, 43643, 43648, 43714, 43739, 43741, 43744, 43759, 43762, 43766, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43814, 43816, 43822, 43968, 44010, 44012, 44013, 44016, 44025, 44032, 55203, 55216, 55238, 55243, 55291, 63744, 64109, 64112, 64217, 64256, 64262, 64275, 64279, 64285, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65024, 65039, 65056, 65062, 65075, 65076, 65101, 65103, 65136, 65140, 65142, 65276, 65296, 65305, 65313, 65338, 65343, 65343, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500,]; + function lookupInUnicodeMap(code, map) { + if (code < map[0]) { + return false; + } + var lo = 0; + var hi = map.length; + var mid; + while (lo + 1 < hi) { + mid = lo + (hi - lo) / 2; + mid -= mid % 2; + if (map[mid] <= code && code <= map[mid + 1]) { + return true; + } + if (code < map[mid]) { + hi = mid; + } + else { + lo = mid + 2; + } + } + return false; + } + function isUnicodeIdentifierStart(code, languageVersion) { + return languageVersion === 0 /* ES3 */ ? lookupInUnicodeMap(code, unicodeES3IdentifierStart) : lookupInUnicodeMap(code, unicodeES5IdentifierStart); + } + function isUnicodeIdentifierPart(code, languageVersion) { + return languageVersion === 0 /* ES3 */ ? lookupInUnicodeMap(code, unicodeES3IdentifierPart) : lookupInUnicodeMap(code, unicodeES5IdentifierPart); + } + function makeReverseMap(source) { + var result = []; + for (var name in source) { + if (source.hasOwnProperty(name)) { + result[source[name]] = name; + } + } + return result; + } + var tokenStrings = makeReverseMap(textToToken); + function tokenToString(t) { + return tokenStrings[t]; + } + ts.tokenToString = tokenToString; + function computeLineStarts(text) { + var result = new Array(); + var pos = 0; + var lineStart = 0; + while (pos < text.length) { + var ch = text.charCodeAt(pos++); + switch (ch) { + case 13 /* carriageReturn */: + if (text.charCodeAt(pos) === 10 /* lineFeed */) { + pos++; + } + case 10 /* lineFeed */: + result.push(lineStart); + lineStart = pos; + break; + default: + if (ch > 127 /* maxAsciiCharacter */ && isLineBreak(ch)) { + result.push(lineStart); + lineStart = pos; + } + break; + } + } + result.push(lineStart); + return result; + } + ts.computeLineStarts = computeLineStarts; + function getPositionFromLineAndCharacter(lineStarts, line, character) { + ts.Debug.assert(line > 0); + return lineStarts[line - 1] + character - 1; + } + ts.getPositionFromLineAndCharacter = getPositionFromLineAndCharacter; + function getLineAndCharacterOfPosition(lineStarts, position) { + var lineNumber = ts.binarySearch(lineStarts, position); + if (lineNumber < 0) { + lineNumber = (~lineNumber) - 1; + } + return { + line: lineNumber + 1, + character: position - lineStarts[lineNumber] + 1 + }; + } + ts.getLineAndCharacterOfPosition = getLineAndCharacterOfPosition; + function positionToLineAndCharacter(text, pos) { + var lineStarts = computeLineStarts(text); + return getLineAndCharacterOfPosition(lineStarts, pos); + } + ts.positionToLineAndCharacter = positionToLineAndCharacter; + var hasOwnProperty = Object.prototype.hasOwnProperty; + function isWhiteSpace(ch) { + return ch === 32 /* space */ || ch === 9 /* tab */ || ch === 11 /* verticalTab */ || ch === 12 /* formFeed */ || ch === 160 /* nonBreakingSpace */ || ch === 5760 /* ogham */ || ch >= 8192 /* enQuad */ && ch <= 8203 /* zeroWidthSpace */ || ch === 8239 /* narrowNoBreakSpace */ || ch === 8287 /* mathematicalSpace */ || ch === 12288 /* ideographicSpace */ || ch === 65279 /* byteOrderMark */; + } + ts.isWhiteSpace = isWhiteSpace; + function isLineBreak(ch) { + return ch === 10 /* lineFeed */ || ch === 13 /* carriageReturn */ || ch === 8232 /* lineSeparator */ || ch === 8233 /* paragraphSeparator */ || ch === 133 /* nextLine */; + } + ts.isLineBreak = isLineBreak; + function isDigit(ch) { + return ch >= 48 /* _0 */ && ch <= 57 /* _9 */; + } + function isOctalDigit(ch) { + return ch >= 48 /* _0 */ && ch <= 55 /* _7 */; + } + ts.isOctalDigit = isOctalDigit; + function skipTrivia(text, pos, stopAfterLineBreak) { + while (true) { + var ch = text.charCodeAt(pos); + switch (ch) { + case 13 /* carriageReturn */: + if (text.charCodeAt(pos + 1) === 10 /* lineFeed */) + pos++; + case 10 /* lineFeed */: + pos++; + if (stopAfterLineBreak) + return pos; + continue; + case 9 /* tab */: + case 11 /* verticalTab */: + case 12 /* formFeed */: + case 32 /* space */: + pos++; + continue; + case 47 /* slash */: + if (text.charCodeAt(pos + 1) === 47 /* slash */) { + pos += 2; + while (pos < text.length) { + if (isLineBreak(text.charCodeAt(pos))) { + break; + } + pos++; + } + continue; + } + if (text.charCodeAt(pos + 1) === 42 /* asterisk */) { + pos += 2; + while (pos < text.length) { + if (text.charCodeAt(pos) === 42 /* asterisk */ && text.charCodeAt(pos + 1) === 47 /* slash */) { + pos += 2; + break; + } + pos++; + } + continue; + } + break; + default: + if (ch > 127 /* maxAsciiCharacter */ && (isWhiteSpace(ch) || isLineBreak(ch))) { + pos++; + continue; + } + break; + } + return pos; + } + } + ts.skipTrivia = skipTrivia; + function getCommentRanges(text, pos, trailing) { + var result; + var collecting = trailing || pos === 0; + while (true) { + var ch = text.charCodeAt(pos); + switch (ch) { + case 13 /* carriageReturn */: + if (text.charCodeAt(pos + 1) === 10 /* lineFeed */) + pos++; + case 10 /* lineFeed */: + pos++; + if (trailing) { + return result; + } + collecting = true; + if (result && result.length) { + result[result.length - 1].hasTrailingNewLine = true; + } + continue; + case 9 /* tab */: + case 11 /* verticalTab */: + case 12 /* formFeed */: + case 32 /* space */: + pos++; + continue; + case 47 /* slash */: + var nextChar = text.charCodeAt(pos + 1); + var hasTrailingNewLine = false; + if (nextChar === 47 /* slash */ || nextChar === 42 /* asterisk */) { + var startPos = pos; + pos += 2; + if (nextChar === 47 /* slash */) { + while (pos < text.length) { + if (isLineBreak(text.charCodeAt(pos))) { + hasTrailingNewLine = true; + break; + } + pos++; + } + } + else { + while (pos < text.length) { + if (text.charCodeAt(pos) === 42 /* asterisk */ && text.charCodeAt(pos + 1) === 47 /* slash */) { + pos += 2; + break; + } + pos++; + } + } + if (collecting) { + if (!result) + result = []; + result.push({ pos: startPos, end: pos, hasTrailingNewLine: hasTrailingNewLine }); + } + continue; + } + break; + default: + if (ch > 127 /* maxAsciiCharacter */ && (isWhiteSpace(ch) || isLineBreak(ch))) { + if (result && result.length && isLineBreak(ch)) { + result[result.length - 1].hasTrailingNewLine = true; + } + pos++; + continue; + } + break; + } + return result; + } + } + function getLeadingCommentRanges(text, pos) { + return getCommentRanges(text, pos, false); + } + ts.getLeadingCommentRanges = getLeadingCommentRanges; + function getTrailingCommentRanges(text, pos) { + return getCommentRanges(text, pos, true); + } + ts.getTrailingCommentRanges = getTrailingCommentRanges; + function isIdentifierStart(ch, languageVersion) { + return ch >= 65 /* A */ && ch <= 90 /* Z */ || ch >= 97 /* a */ && ch <= 122 /* z */ || ch === 36 /* $ */ || ch === 95 /* _ */ || ch > 127 /* maxAsciiCharacter */ && isUnicodeIdentifierStart(ch, languageVersion); + } + ts.isIdentifierStart = isIdentifierStart; + function isIdentifierPart(ch, languageVersion) { + return ch >= 65 /* A */ && ch <= 90 /* Z */ || ch >= 97 /* a */ && ch <= 122 /* z */ || ch >= 48 /* _0 */ && ch <= 57 /* _9 */ || ch === 36 /* $ */ || ch === 95 /* _ */ || ch > 127 /* maxAsciiCharacter */ && isUnicodeIdentifierPart(ch, languageVersion); + } + ts.isIdentifierPart = isIdentifierPart; + function createScanner(languageVersion, skipTrivia, text, onError, onComment) { + var pos; + var len; + var startPos; + var tokenPos; + var token; + var tokenValue; + var precedingLineBreak; + function error(message) { + if (onError) { + onError(message); + } + } + function isIdentifierStart(ch) { + return ch >= 65 /* A */ && ch <= 90 /* Z */ || ch >= 97 /* a */ && ch <= 122 /* z */ || ch === 36 /* $ */ || ch === 95 /* _ */ || ch > 127 /* maxAsciiCharacter */ && isUnicodeIdentifierStart(ch, languageVersion); + } + function isIdentifierPart(ch) { + return ch >= 65 /* A */ && ch <= 90 /* Z */ || ch >= 97 /* a */ && ch <= 122 /* z */ || ch >= 48 /* _0 */ && ch <= 57 /* _9 */ || ch === 36 /* $ */ || ch === 95 /* _ */ || ch > 127 /* maxAsciiCharacter */ && isUnicodeIdentifierPart(ch, languageVersion); + } + function scanNumber() { + var start = pos; + while (isDigit(text.charCodeAt(pos))) + pos++; + if (text.charCodeAt(pos) === 46 /* dot */) { + pos++; + while (isDigit(text.charCodeAt(pos))) + pos++; + } + var end = pos; + if (text.charCodeAt(pos) === 69 /* E */ || text.charCodeAt(pos) === 101 /* e */) { + pos++; + if (text.charCodeAt(pos) === 43 /* plus */ || text.charCodeAt(pos) === 45 /* minus */) + pos++; + if (isDigit(text.charCodeAt(pos))) { + pos++; + while (isDigit(text.charCodeAt(pos))) + pos++; + end = pos; + } + else { + error(ts.Diagnostics.Digit_expected); + } + } + return +(text.substring(start, end)); + } + function scanOctalDigits() { + var start = pos; + while (isOctalDigit(text.charCodeAt(pos))) { + pos++; + } + return +(text.substring(start, pos)); + } + function scanHexDigits(count, mustMatchCount) { + var digits = 0; + var value = 0; + while (digits < count || !mustMatchCount) { + var ch = text.charCodeAt(pos); + if (ch >= 48 /* _0 */ && ch <= 57 /* _9 */) { + value = value * 16 + ch - 48 /* _0 */; + } + else if (ch >= 65 /* A */ && ch <= 70 /* F */) { + value = value * 16 + ch - 65 /* A */ + 10; + } + else if (ch >= 97 /* a */ && ch <= 102 /* f */) { + value = value * 16 + ch - 97 /* a */ + 10; + } + else { + break; + } + pos++; + digits++; + } + if (digits < count) { + value = -1; + } + return value; + } + function scanString() { + var quote = text.charCodeAt(pos++); + var result = ""; + var start = pos; + while (true) { + if (pos >= len) { + result += text.substring(start, pos); + error(ts.Diagnostics.Unterminated_string_literal); + break; + } + var ch = text.charCodeAt(pos); + if (ch === quote) { + result += text.substring(start, pos); + pos++; + break; + } + if (ch === 92 /* backslash */) { + result += text.substring(start, pos); + result += scanEscapeSequence(); + start = pos; + continue; + } + if (isLineBreak(ch)) { + result += text.substring(start, pos); + error(ts.Diagnostics.Unterminated_string_literal); + break; + } + pos++; + } + return result; + } + function scanTemplateAndSetTokenValue() { + var startedWithBacktick = text.charCodeAt(pos) === 96 /* backtick */; + pos++; + var start = pos; + var contents = ""; + var resultingToken; + while (true) { + if (pos >= len) { + contents += text.substring(start, pos); + error(ts.Diagnostics.Unterminated_template_literal); + resultingToken = startedWithBacktick ? 9 /* NoSubstitutionTemplateLiteral */ : 12 /* TemplateTail */; + break; + } + var currChar = text.charCodeAt(pos); + if (currChar === 96 /* backtick */) { + contents += text.substring(start, pos); + pos++; + resultingToken = startedWithBacktick ? 9 /* NoSubstitutionTemplateLiteral */ : 12 /* TemplateTail */; + break; + } + if (currChar === 36 /* $ */ && pos + 1 < len && text.charCodeAt(pos + 1) === 123 /* openBrace */) { + contents += text.substring(start, pos); + pos += 2; + resultingToken = startedWithBacktick ? 10 /* TemplateHead */ : 11 /* TemplateMiddle */; + break; + } + if (currChar === 92 /* backslash */) { + contents += text.substring(start, pos); + contents += scanEscapeSequence(); + start = pos; + continue; + } + if (currChar === 13 /* carriageReturn */) { + contents += text.substring(start, pos); + if (pos + 1 < len && text.charCodeAt(pos + 1) === 10 /* lineFeed */) { + pos++; + } + pos++; + contents += "\n"; + start = pos; + continue; + } + pos++; + } + ts.Debug.assert(resultingToken !== undefined); + tokenValue = contents; + return resultingToken; + } + function scanEscapeSequence() { + pos++; + if (pos >= len) { + error(ts.Diagnostics.Unexpected_end_of_text); + return ""; + } + var ch = text.charCodeAt(pos++); + switch (ch) { + case 48 /* _0 */: + return "\0"; + case 98 /* b */: + return "\b"; + case 116 /* t */: + return "\t"; + case 110 /* n */: + return "\n"; + case 118 /* v */: + return "\v"; + case 102 /* f */: + return "\f"; + case 114 /* r */: + return "\r"; + case 39 /* singleQuote */: + return "\'"; + case 34 /* doubleQuote */: + return "\""; + case 120 /* x */: + case 117 /* u */: + var ch = scanHexDigits(ch === 120 /* x */ ? 2 : 4, true); + if (ch >= 0) { + return String.fromCharCode(ch); + } + else { + error(ts.Diagnostics.Hexadecimal_digit_expected); + return ""; + } + case 13 /* carriageReturn */: + if (pos < len && text.charCodeAt(pos) === 10 /* lineFeed */) { + pos++; + } + case 10 /* lineFeed */: + case 8232 /* lineSeparator */: + case 8233 /* paragraphSeparator */: + return ""; + default: + return String.fromCharCode(ch); + } + } + function peekUnicodeEscape() { + if (pos + 5 < len && text.charCodeAt(pos + 1) === 117 /* u */) { + var start = pos; + pos += 2; + var value = scanHexDigits(4, true); + pos = start; + return value; + } + return -1; + } + function scanIdentifierParts() { + var result = ""; + var start = pos; + while (pos < len) { + var ch = text.charCodeAt(pos); + if (isIdentifierPart(ch)) { + pos++; + } + else if (ch === 92 /* backslash */) { + ch = peekUnicodeEscape(); + if (!(ch >= 0 && isIdentifierPart(ch))) { + break; + } + result += text.substring(start, pos); + result += String.fromCharCode(ch); + pos += 6; + start = pos; + } + else { + break; + } + } + result += text.substring(start, pos); + return result; + } + function getIdentifierToken() { + var len = tokenValue.length; + if (len >= 2 && len <= 11) { + var ch = tokenValue.charCodeAt(0); + if (ch >= 97 /* a */ && ch <= 122 /* z */ && hasOwnProperty.call(textToToken, tokenValue)) { + return token = textToToken[tokenValue]; + } + } + return token = 63 /* Identifier */; + } + function scan() { + startPos = pos; + precedingLineBreak = false; + while (true) { + tokenPos = pos; + if (pos >= len) { + return token = 1 /* EndOfFileToken */; + } + var ch = text.charCodeAt(pos); + switch (ch) { + case 10 /* lineFeed */: + case 13 /* carriageReturn */: + precedingLineBreak = true; + if (skipTrivia) { + pos++; + continue; + } + else { + if (ch === 13 /* carriageReturn */ && pos + 1 < len && text.charCodeAt(pos + 1) === 10 /* lineFeed */) { + pos += 2; + } + else { + pos++; + } + return token = 4 /* NewLineTrivia */; + } + case 9 /* tab */: + case 11 /* verticalTab */: + case 12 /* formFeed */: + case 32 /* space */: + if (skipTrivia) { + pos++; + continue; + } + else { + while (pos < len && isWhiteSpace(text.charCodeAt(pos))) { + pos++; + } + return token = 5 /* WhitespaceTrivia */; + } + case 33 /* exclamation */: + if (text.charCodeAt(pos + 1) === 61 /* equals */) { + if (text.charCodeAt(pos + 2) === 61 /* equals */) { + return pos += 3, token = 30 /* ExclamationEqualsEqualsToken */; + } + return pos += 2, token = 28 /* ExclamationEqualsToken */; + } + return pos++, token = 45 /* ExclamationToken */; + case 34 /* doubleQuote */: + case 39 /* singleQuote */: + tokenValue = scanString(); + return token = 7 /* StringLiteral */; + case 96 /* backtick */: + return token = scanTemplateAndSetTokenValue(); + case 37 /* percent */: + if (text.charCodeAt(pos + 1) === 61 /* equals */) { + return pos += 2, token = 56 /* PercentEqualsToken */; + } + return pos++, token = 36 /* PercentToken */; + case 38 /* ampersand */: + if (text.charCodeAt(pos + 1) === 38 /* ampersand */) { + return pos += 2, token = 47 /* AmpersandAmpersandToken */; + } + if (text.charCodeAt(pos + 1) === 61 /* equals */) { + return pos += 2, token = 60 /* AmpersandEqualsToken */; + } + return pos++, token = 42 /* AmpersandToken */; + case 40 /* openParen */: + return pos++, token = 15 /* OpenParenToken */; + case 41 /* closeParen */: + return pos++, token = 16 /* CloseParenToken */; + case 42 /* asterisk */: + if (text.charCodeAt(pos + 1) === 61 /* equals */) { + return pos += 2, token = 54 /* AsteriskEqualsToken */; + } + return pos++, token = 34 /* AsteriskToken */; + case 43 /* plus */: + if (text.charCodeAt(pos + 1) === 43 /* plus */) { + return pos += 2, token = 37 /* PlusPlusToken */; + } + if (text.charCodeAt(pos + 1) === 61 /* equals */) { + return pos += 2, token = 52 /* PlusEqualsToken */; + } + return pos++, token = 32 /* PlusToken */; + case 44 /* comma */: + return pos++, token = 22 /* CommaToken */; + case 45 /* minus */: + if (text.charCodeAt(pos + 1) === 45 /* minus */) { + return pos += 2, token = 38 /* MinusMinusToken */; + } + if (text.charCodeAt(pos + 1) === 61 /* equals */) { + return pos += 2, token = 53 /* MinusEqualsToken */; + } + return pos++, token = 33 /* MinusToken */; + case 46 /* dot */: + if (isDigit(text.charCodeAt(pos + 1))) { + tokenValue = "" + scanNumber(); + return token = 6 /* NumericLiteral */; + } + if (text.charCodeAt(pos + 1) === 46 /* dot */ && text.charCodeAt(pos + 2) === 46 /* dot */) { + return pos += 3, token = 20 /* DotDotDotToken */; + } + return pos++, token = 19 /* DotToken */; + case 47 /* slash */: + if (text.charCodeAt(pos + 1) === 47 /* slash */) { + pos += 2; + while (pos < len) { + if (isLineBreak(text.charCodeAt(pos))) { + break; + } + pos++; + } + if (onComment) { + onComment(tokenPos, pos); + } + if (skipTrivia) { + continue; + } + else { + return token = 2 /* SingleLineCommentTrivia */; + } + } + if (text.charCodeAt(pos + 1) === 42 /* asterisk */) { + pos += 2; + var commentClosed = false; + while (pos < len) { + var ch = text.charCodeAt(pos); + if (ch === 42 /* asterisk */ && text.charCodeAt(pos + 1) === 47 /* slash */) { + pos += 2; + commentClosed = true; + break; + } + if (isLineBreak(ch)) { + precedingLineBreak = true; + } + pos++; + } + if (!commentClosed) { + error(ts.Diagnostics.Asterisk_Slash_expected); + } + if (onComment) { + onComment(tokenPos, pos); + } + if (skipTrivia) { + continue; + } + else { + return token = 3 /* MultiLineCommentTrivia */; + } + } + if (text.charCodeAt(pos + 1) === 61 /* equals */) { + return pos += 2, token = 55 /* SlashEqualsToken */; + } + return pos++, token = 35 /* SlashToken */; + case 48 /* _0 */: + if (pos + 2 < len && (text.charCodeAt(pos + 1) === 88 /* X */ || text.charCodeAt(pos + 1) === 120 /* x */)) { + pos += 2; + var value = scanHexDigits(1, false); + if (value < 0) { + error(ts.Diagnostics.Hexadecimal_digit_expected); + value = 0; + } + tokenValue = "" + value; + return 6 /* NumericLiteral */; + } + if (pos + 1 < len && isOctalDigit(text.charCodeAt(pos + 1))) { + tokenValue = "" + scanOctalDigits(); + return 6 /* NumericLiteral */; + } + case 49 /* _1 */: + case 50 /* _2 */: + case 51 /* _3 */: + case 52 /* _4 */: + case 53 /* _5 */: + case 54 /* _6 */: + case 55 /* _7 */: + case 56 /* _8 */: + case 57 /* _9 */: + tokenValue = "" + scanNumber(); + return token = 6 /* NumericLiteral */; + case 58 /* colon */: + return pos++, token = 50 /* ColonToken */; + case 59 /* semicolon */: + return pos++, token = 21 /* SemicolonToken */; + case 60 /* lessThan */: + if (text.charCodeAt(pos + 1) === 60 /* lessThan */) { + if (text.charCodeAt(pos + 2) === 61 /* equals */) { + return pos += 3, token = 57 /* LessThanLessThanEqualsToken */; + } + return pos += 2, token = 39 /* LessThanLessThanToken */; + } + if (text.charCodeAt(pos + 1) === 61 /* equals */) { + return pos += 2, token = 25 /* LessThanEqualsToken */; + } + return pos++, token = 23 /* LessThanToken */; + case 61 /* equals */: + if (text.charCodeAt(pos + 1) === 61 /* equals */) { + if (text.charCodeAt(pos + 2) === 61 /* equals */) { + return pos += 3, token = 29 /* EqualsEqualsEqualsToken */; + } + return pos += 2, token = 27 /* EqualsEqualsToken */; + } + if (text.charCodeAt(pos + 1) === 62 /* greaterThan */) { + return pos += 2, token = 31 /* EqualsGreaterThanToken */; + } + return pos++, token = 51 /* EqualsToken */; + case 62 /* greaterThan */: + return pos++, token = 24 /* GreaterThanToken */; + case 63 /* question */: + return pos++, token = 49 /* QuestionToken */; + case 91 /* openBracket */: + return pos++, token = 17 /* OpenBracketToken */; + case 93 /* closeBracket */: + return pos++, token = 18 /* CloseBracketToken */; + case 94 /* caret */: + if (text.charCodeAt(pos + 1) === 61 /* equals */) { + return pos += 2, token = 62 /* CaretEqualsToken */; + } + return pos++, token = 44 /* CaretToken */; + case 123 /* openBrace */: + return pos++, token = 13 /* OpenBraceToken */; + case 124 /* bar */: + if (text.charCodeAt(pos + 1) === 124 /* bar */) { + return pos += 2, token = 48 /* BarBarToken */; + } + if (text.charCodeAt(pos + 1) === 61 /* equals */) { + return pos += 2, token = 61 /* BarEqualsToken */; + } + return pos++, token = 43 /* BarToken */; + case 125 /* closeBrace */: + return pos++, token = 14 /* CloseBraceToken */; + case 126 /* tilde */: + return pos++, token = 46 /* TildeToken */; + case 92 /* backslash */: + var ch = peekUnicodeEscape(); + if (ch >= 0 && isIdentifierStart(ch)) { + pos += 6; + tokenValue = String.fromCharCode(ch) + scanIdentifierParts(); + return token = getIdentifierToken(); + } + error(ts.Diagnostics.Invalid_character); + return pos++, token = 0 /* Unknown */; + default: + if (isIdentifierStart(ch)) { + pos++; + while (pos < len && isIdentifierPart(ch = text.charCodeAt(pos))) + pos++; + tokenValue = text.substring(tokenPos, pos); + if (ch === 92 /* backslash */) { + tokenValue += scanIdentifierParts(); + } + return token = getIdentifierToken(); + } + else if (isWhiteSpace(ch)) { + pos++; + continue; + } + else if (isLineBreak(ch)) { + precedingLineBreak = true; + pos++; + continue; + } + error(ts.Diagnostics.Invalid_character); + return pos++, token = 0 /* Unknown */; + } + } + } + function reScanGreaterToken() { + if (token === 24 /* GreaterThanToken */) { + if (text.charCodeAt(pos) === 62 /* greaterThan */) { + if (text.charCodeAt(pos + 1) === 62 /* greaterThan */) { + if (text.charCodeAt(pos + 2) === 61 /* equals */) { + return pos += 3, token = 59 /* GreaterThanGreaterThanGreaterThanEqualsToken */; + } + return pos += 2, token = 41 /* GreaterThanGreaterThanGreaterThanToken */; + } + if (text.charCodeAt(pos + 1) === 61 /* equals */) { + return pos += 2, token = 58 /* GreaterThanGreaterThanEqualsToken */; + } + return pos++, token = 40 /* GreaterThanGreaterThanToken */; + } + if (text.charCodeAt(pos) === 61 /* equals */) { + return pos++, token = 26 /* GreaterThanEqualsToken */; + } + } + return token; + } + function reScanSlashToken() { + if (token === 35 /* SlashToken */ || token === 55 /* SlashEqualsToken */) { + var p = tokenPos + 1; + var inEscape = false; + var inCharacterClass = false; + while (true) { + if (p >= len) { + error(ts.Diagnostics.Unterminated_regular_expression_literal); + break; + } + var ch = text.charCodeAt(p); + if (isLineBreak(ch)) { + error(ts.Diagnostics.Unterminated_regular_expression_literal); + break; + } + if (inEscape) { + inEscape = false; + } + else if (ch === 47 /* slash */ && !inCharacterClass) { + p++; + break; + } + else if (ch === 91 /* openBracket */) { + inCharacterClass = true; + } + else if (ch === 92 /* backslash */) { + inEscape = true; + } + else if (ch === 93 /* closeBracket */) { + inCharacterClass = false; + } + p++; + } + while (p < len && isIdentifierPart(text.charCodeAt(p))) { + p++; + } + pos = p; + tokenValue = text.substring(tokenPos, pos); + token = 8 /* RegularExpressionLiteral */; + } + return token; + } + function reScanTemplateToken() { + ts.Debug.assert(token === 14 /* CloseBraceToken */, "'reScanTemplateToken' should only be called on a '}'"); + pos = tokenPos; + return token = scanTemplateAndSetTokenValue(); + } + function tryScan(callback) { + var savePos = pos; + var saveStartPos = startPos; + var saveTokenPos = tokenPos; + var saveToken = token; + var saveTokenValue = tokenValue; + var savePrecedingLineBreak = precedingLineBreak; + var result = callback(); + if (!result) { + pos = savePos; + startPos = saveStartPos; + tokenPos = saveTokenPos; + token = saveToken; + tokenValue = saveTokenValue; + precedingLineBreak = savePrecedingLineBreak; + } + return result; + } + function setText(newText) { + text = newText || ""; + len = text.length; + setTextPos(0); + } + function setTextPos(textPos) { + pos = textPos; + startPos = textPos; + tokenPos = textPos; + token = 0 /* Unknown */; + precedingLineBreak = false; + } + setText(text); + return { + getStartPos: function () { return startPos; }, + getTextPos: function () { return pos; }, + getToken: function () { return token; }, + getTokenPos: function () { return tokenPos; }, + getTokenText: function () { return text.substring(tokenPos, pos); }, + getTokenValue: function () { return tokenValue; }, + hasPrecedingLineBreak: function () { return precedingLineBreak; }, + isIdentifier: function () { return token === 63 /* Identifier */ || token > 99 /* LastReservedWord */; }, + isReservedWord: function () { return token >= 64 /* FirstReservedWord */ && token <= 99 /* LastReservedWord */; }, + reScanGreaterToken: reScanGreaterToken, + reScanSlashToken: reScanSlashToken, + reScanTemplateToken: reScanTemplateToken, + scan: scan, + setText: setText, + setTextPos: setTextPos, + tryScan: tryScan + }; + } + ts.createScanner = createScanner; +})(ts || (ts = {})); +var ts; +(function (ts) { + var nodeConstructors = new Array(199 /* Count */); function getNodeConstructor(kind) { return nodeConstructors[kind] || (nodeConstructors[kind] = ts.objectAllocator.getNodeConstructor(kind)); } @@ -2205,7 +2219,7 @@ var ts; return node; } function getSourceFileOfNode(node) { - while (node && node.kind !== 193 /* SourceFile */) + while (node && node.kind !== 196 /* SourceFile */) node = node.parent; return node; } @@ -2221,6 +2235,9 @@ var ts; } ts.getStartPosOfNode = getStartPosOfNode; function getTokenPosOfNode(node, sourceFile) { + if (node.pos === node.end) { + return node.pos; + } return ts.skipTrivia((sourceFile || getSourceFileOfNode(node)).text, node.pos); } ts.getTokenPosOfNode = getTokenPosOfNode; @@ -2241,10 +2258,10 @@ var ts; return identifier.length >= 3 && identifier.charCodeAt(0) === 95 /* _ */ && identifier.charCodeAt(1) === 95 /* _ */ && identifier.charCodeAt(2) === 95 /* _ */ ? identifier.substr(1) : identifier; } ts.unescapeIdentifier = unescapeIdentifier; - function identifierToString(identifier) { - return identifier.kind === 120 /* Missing */ ? "(Missing)" : getTextOfNode(identifier); + function declarationNameToString(name) { + return name.kind === 120 /* Missing */ ? "(Missing)" : getTextOfNode(name); } - ts.identifierToString = identifierToString; + ts.declarationNameToString = declarationNameToString; function createDiagnosticForNode(node, message, arg0, arg1, arg2) { node = getErrorSpanForNode(node); var file = getSourceFileOfNode(node); @@ -2264,12 +2281,12 @@ var ts; function getErrorSpanForNode(node) { var errorSpan; switch (node.kind) { - case 181 /* VariableDeclaration */: - case 184 /* ClassDeclaration */: - case 185 /* InterfaceDeclaration */: - case 188 /* ModuleDeclaration */: - case 187 /* EnumDeclaration */: - case 192 /* EnumMember */: + case 184 /* VariableDeclaration */: + case 187 /* ClassDeclaration */: + case 188 /* InterfaceDeclaration */: + case 191 /* ModuleDeclaration */: + case 190 /* EnumDeclaration */: + case 195 /* EnumMember */: errorSpan = node.name; break; } @@ -2289,7 +2306,7 @@ var ts; } ts.isConstEnumDeclaration = isConstEnumDeclaration; function isPrologueDirective(node) { - return node.kind === 161 /* ExpressionStatement */ && node.expression.kind === 7 /* StringLiteral */; + return node.kind === 164 /* ExpressionStatement */ && node.expression.kind === 7 /* StringLiteral */; } ts.isPrologueDirective = isPrologueDirective; function isEvalOrArgumentsIdentifier(node) { @@ -2344,8 +2361,11 @@ var ts; case 123 /* Parameter */: return child(node.name) || child(node.type) || child(node.initializer); case 124 /* Property */: - case 141 /* PropertyAssignment */: + case 143 /* PropertyAssignment */: + case 144 /* ShorthandPropertyAssignment */: return child(node.name) || child(node.type) || child(node.initializer); + case 133 /* FunctionType */: + case 134 /* ConstructorType */: case 129 /* CallSignature */: case 130 /* ConstructSignature */: case 131 /* IndexSignature */: @@ -2354,110 +2374,110 @@ var ts; case 126 /* Constructor */: case 127 /* GetAccessor */: case 128 /* SetAccessor */: - case 149 /* FunctionExpression */: - case 182 /* FunctionDeclaration */: - case 150 /* ArrowFunction */: + case 152 /* FunctionExpression */: + case 185 /* FunctionDeclaration */: + case 153 /* ArrowFunction */: return child(node.name) || children(node.typeParameters) || children(node.parameters) || child(node.type) || child(node.body); case 132 /* TypeReference */: return child(node.typeName) || children(node.typeArguments); - case 133 /* TypeQuery */: + case 135 /* TypeQuery */: return child(node.exprName); - case 134 /* TypeLiteral */: + case 136 /* TypeLiteral */: return children(node.members); - case 135 /* ArrayType */: + case 137 /* ArrayType */: return child(node.elementType); - case 136 /* TupleType */: + case 138 /* TupleType */: return children(node.elementTypes); - case 137 /* UnionType */: + case 139 /* UnionType */: return children(node.types); - case 138 /* ParenType */: + case 140 /* ParenType */: return child(node.type); - case 139 /* ArrayLiteral */: + case 141 /* ArrayLiteral */: return children(node.elements); - case 140 /* ObjectLiteral */: + case 142 /* ObjectLiteral */: return children(node.properties); - case 142 /* PropertyAccess */: + case 145 /* PropertyAccess */: return child(node.left) || child(node.right); - case 143 /* IndexedAccess */: + case 146 /* IndexedAccess */: return child(node.object) || child(node.index); - case 144 /* CallExpression */: - case 145 /* NewExpression */: + case 147 /* CallExpression */: + case 148 /* NewExpression */: return child(node.func) || children(node.typeArguments) || children(node.arguments); - case 146 /* TaggedTemplateExpression */: + case 149 /* TaggedTemplateExpression */: return child(node.tag) || child(node.template); - case 147 /* TypeAssertion */: + case 150 /* TypeAssertion */: return child(node.type) || child(node.operand); - case 148 /* ParenExpression */: + case 151 /* ParenExpression */: return child(node.expression); - case 151 /* PrefixOperator */: - case 152 /* PostfixOperator */: + case 154 /* PrefixOperator */: + case 155 /* PostfixOperator */: return child(node.operand); - case 153 /* BinaryExpression */: + case 156 /* BinaryExpression */: return child(node.left) || child(node.right); - case 154 /* ConditionalExpression */: + case 157 /* ConditionalExpression */: return child(node.condition) || child(node.whenTrue) || child(node.whenFalse); - case 158 /* Block */: - case 177 /* TryBlock */: - case 179 /* FinallyBlock */: - case 183 /* FunctionBlock */: - case 189 /* ModuleBlock */: - case 193 /* SourceFile */: + case 161 /* Block */: + case 180 /* TryBlock */: + case 182 /* FinallyBlock */: + case 186 /* FunctionBlock */: + case 192 /* ModuleBlock */: + case 196 /* SourceFile */: return children(node.statements); - case 159 /* VariableStatement */: + case 162 /* VariableStatement */: return children(node.declarations); - case 161 /* ExpressionStatement */: + case 164 /* ExpressionStatement */: return child(node.expression); - case 162 /* IfStatement */: + case 165 /* IfStatement */: return child(node.expression) || child(node.thenStatement) || child(node.elseStatement); - case 163 /* DoStatement */: + case 166 /* DoStatement */: return child(node.statement) || child(node.expression); - case 164 /* WhileStatement */: + case 167 /* WhileStatement */: return child(node.expression) || child(node.statement); - case 165 /* ForStatement */: + case 168 /* ForStatement */: return children(node.declarations) || child(node.initializer) || child(node.condition) || child(node.iterator) || child(node.statement); - case 166 /* ForInStatement */: + case 169 /* ForInStatement */: return child(node.declaration) || child(node.variable) || child(node.expression) || child(node.statement); - case 167 /* ContinueStatement */: - case 168 /* BreakStatement */: + case 170 /* ContinueStatement */: + case 171 /* BreakStatement */: return child(node.label); - case 169 /* ReturnStatement */: + case 172 /* ReturnStatement */: return child(node.expression); - case 170 /* WithStatement */: + case 173 /* WithStatement */: return child(node.expression) || child(node.statement); - case 171 /* SwitchStatement */: + case 174 /* SwitchStatement */: return child(node.expression) || children(node.clauses); - case 172 /* CaseClause */: - case 173 /* DefaultClause */: + case 175 /* CaseClause */: + case 176 /* DefaultClause */: return child(node.expression) || children(node.statements); - case 174 /* LabeledStatement */: + case 177 /* LabeledStatement */: return child(node.label) || child(node.statement); - case 175 /* ThrowStatement */: + case 178 /* ThrowStatement */: return child(node.expression); - case 176 /* TryStatement */: + case 179 /* TryStatement */: return child(node.tryBlock) || child(node.catchBlock) || child(node.finallyBlock); - case 178 /* CatchBlock */: + case 181 /* CatchBlock */: return child(node.variable) || children(node.statements); - case 181 /* VariableDeclaration */: + case 184 /* VariableDeclaration */: return child(node.name) || child(node.type) || child(node.initializer); - case 184 /* ClassDeclaration */: + case 187 /* ClassDeclaration */: return child(node.name) || children(node.typeParameters) || child(node.baseType) || children(node.implementedTypes) || children(node.members); - case 185 /* InterfaceDeclaration */: + case 188 /* InterfaceDeclaration */: return child(node.name) || children(node.typeParameters) || children(node.baseTypes) || children(node.members); - case 186 /* TypeAliasDeclaration */: + case 189 /* TypeAliasDeclaration */: return child(node.name) || child(node.type); - case 187 /* EnumDeclaration */: + case 190 /* EnumDeclaration */: return child(node.name) || children(node.members); - case 192 /* EnumMember */: + case 195 /* EnumMember */: return child(node.name) || child(node.initializer); - case 188 /* ModuleDeclaration */: + case 191 /* ModuleDeclaration */: return child(node.name) || child(node.body); - case 190 /* ImportDeclaration */: + case 193 /* ImportDeclaration */: return child(node.name) || child(node.entityName) || child(node.externalModuleName); - case 191 /* ExportAssignment */: + case 194 /* ExportAssignment */: return child(node.exportName); - case 155 /* TemplateExpression */: + case 158 /* TemplateExpression */: return child(node.head) || children(node.templateSpans); - case 156 /* TemplateSpan */: + case 159 /* TemplateSpan */: return child(node.expression) || child(node.literal); } } @@ -2466,24 +2486,24 @@ var ts; return traverse(body); function traverse(node) { switch (node.kind) { - case 169 /* ReturnStatement */: + case 172 /* ReturnStatement */: return visitor(node); - case 158 /* Block */: - case 183 /* FunctionBlock */: - case 162 /* IfStatement */: - case 163 /* DoStatement */: - case 164 /* WhileStatement */: - case 165 /* ForStatement */: - case 166 /* ForInStatement */: - case 170 /* WithStatement */: - case 171 /* SwitchStatement */: - case 172 /* CaseClause */: - case 173 /* DefaultClause */: - case 174 /* LabeledStatement */: - case 176 /* TryStatement */: - case 177 /* TryBlock */: - case 178 /* CatchBlock */: - case 179 /* FinallyBlock */: + case 161 /* Block */: + case 186 /* FunctionBlock */: + case 165 /* IfStatement */: + case 166 /* DoStatement */: + case 167 /* WhileStatement */: + case 168 /* ForStatement */: + case 169 /* ForInStatement */: + case 173 /* WithStatement */: + case 174 /* SwitchStatement */: + case 175 /* CaseClause */: + case 176 /* DefaultClause */: + case 177 /* LabeledStatement */: + case 179 /* TryStatement */: + case 180 /* TryBlock */: + case 181 /* CatchBlock */: + case 182 /* FinallyBlock */: return forEachChild(node, traverse); } } @@ -2492,9 +2512,9 @@ var ts; function isAnyFunction(node) { if (node) { switch (node.kind) { - case 149 /* FunctionExpression */: - case 182 /* FunctionDeclaration */: - case 150 /* ArrowFunction */: + case 152 /* FunctionExpression */: + case 185 /* FunctionDeclaration */: + case 153 /* ArrowFunction */: case 125 /* Method */: case 127 /* GetAccessor */: case 128 /* SetAccessor */: @@ -2521,20 +2541,20 @@ var ts; return undefined; } switch (node.kind) { - case 150 /* ArrowFunction */: + case 153 /* ArrowFunction */: if (!includeArrowFunctions) { continue; } - case 182 /* FunctionDeclaration */: - case 149 /* FunctionExpression */: - case 188 /* ModuleDeclaration */: + case 185 /* FunctionDeclaration */: + case 152 /* FunctionExpression */: + case 191 /* ModuleDeclaration */: case 124 /* Property */: case 125 /* Method */: case 126 /* Constructor */: case 127 /* GetAccessor */: case 128 /* SetAccessor */: - case 187 /* EnumDeclaration */: - case 193 /* SourceFile */: + case 190 /* EnumDeclaration */: + case 196 /* SourceFile */: return node; } } @@ -2565,60 +2585,62 @@ var ts; case 93 /* TrueKeyword */: case 78 /* FalseKeyword */: case 8 /* RegularExpressionLiteral */: - case 139 /* ArrayLiteral */: - case 140 /* ObjectLiteral */: - case 142 /* PropertyAccess */: - case 143 /* IndexedAccess */: - case 144 /* CallExpression */: - case 145 /* NewExpression */: - case 146 /* TaggedTemplateExpression */: - case 147 /* TypeAssertion */: - case 148 /* ParenExpression */: - case 149 /* FunctionExpression */: - case 150 /* ArrowFunction */: - case 151 /* PrefixOperator */: - case 152 /* PostfixOperator */: - case 153 /* BinaryExpression */: - case 154 /* ConditionalExpression */: - case 155 /* TemplateExpression */: - case 157 /* OmittedExpression */: + case 141 /* ArrayLiteral */: + case 142 /* ObjectLiteral */: + case 145 /* PropertyAccess */: + case 146 /* IndexedAccess */: + case 147 /* CallExpression */: + case 148 /* NewExpression */: + case 149 /* TaggedTemplateExpression */: + case 150 /* TypeAssertion */: + case 151 /* ParenExpression */: + case 152 /* FunctionExpression */: + case 153 /* ArrowFunction */: + case 154 /* PrefixOperator */: + case 155 /* PostfixOperator */: + case 156 /* BinaryExpression */: + case 157 /* ConditionalExpression */: + case 158 /* TemplateExpression */: + case 9 /* NoSubstitutionTemplateLiteral */: + case 160 /* OmittedExpression */: return true; case 121 /* QualifiedName */: while (node.parent.kind === 121 /* QualifiedName */) node = node.parent; - return node.parent.kind === 133 /* TypeQuery */; + return node.parent.kind === 135 /* TypeQuery */; case 63 /* Identifier */: - if (node.parent.kind === 133 /* TypeQuery */) { + if (node.parent.kind === 135 /* TypeQuery */) { return true; } case 6 /* NumericLiteral */: case 7 /* StringLiteral */: - case 9 /* NoSubstitutionTemplateLiteral */: var parent = node.parent; switch (parent.kind) { - case 181 /* VariableDeclaration */: + case 184 /* VariableDeclaration */: case 123 /* Parameter */: case 124 /* Property */: - case 192 /* EnumMember */: - case 141 /* PropertyAssignment */: + case 195 /* EnumMember */: + case 143 /* PropertyAssignment */: return parent.initializer === node; - case 161 /* ExpressionStatement */: - case 162 /* IfStatement */: - case 163 /* DoStatement */: - case 164 /* WhileStatement */: - case 169 /* ReturnStatement */: - case 170 /* WithStatement */: - case 171 /* SwitchStatement */: - case 172 /* CaseClause */: - case 175 /* ThrowStatement */: - case 171 /* SwitchStatement */: + case 164 /* ExpressionStatement */: + case 165 /* IfStatement */: + case 166 /* DoStatement */: + case 167 /* WhileStatement */: + case 172 /* ReturnStatement */: + case 173 /* WithStatement */: + case 174 /* SwitchStatement */: + case 175 /* CaseClause */: + case 178 /* ThrowStatement */: + case 174 /* SwitchStatement */: return parent.expression === node; - case 165 /* ForStatement */: + case 168 /* ForStatement */: return parent.initializer === node || parent.condition === node || parent.iterator === node; - case 166 /* ForInStatement */: + case 169 /* ForInStatement */: return parent.variable === node || parent.expression === node; - case 147 /* TypeAssertion */: + case 150 /* TypeAssertion */: return node === parent.operand; + case 159 /* TemplateSpan */: + return node === parent.expression; default: if (isExpression(parent)) { return true; @@ -2657,20 +2679,21 @@ var ts; switch (node.kind) { case 122 /* TypeParameter */: case 123 /* Parameter */: - case 181 /* VariableDeclaration */: + case 184 /* VariableDeclaration */: case 124 /* Property */: - case 141 /* PropertyAssignment */: - case 192 /* EnumMember */: + case 143 /* PropertyAssignment */: + case 144 /* ShorthandPropertyAssignment */: + case 195 /* EnumMember */: case 125 /* Method */: - case 182 /* FunctionDeclaration */: + case 185 /* FunctionDeclaration */: case 127 /* GetAccessor */: case 128 /* SetAccessor */: - case 184 /* ClassDeclaration */: - case 185 /* InterfaceDeclaration */: - case 186 /* TypeAliasDeclaration */: - case 187 /* EnumDeclaration */: - case 188 /* ModuleDeclaration */: - case 190 /* ImportDeclaration */: + case 187 /* ClassDeclaration */: + case 188 /* InterfaceDeclaration */: + case 189 /* TypeAliasDeclaration */: + case 190 /* EnumDeclaration */: + case 191 /* ModuleDeclaration */: + case 193 /* ImportDeclaration */: return true; } return false; @@ -2678,24 +2701,24 @@ var ts; ts.isDeclaration = isDeclaration; function isStatement(n) { switch (n.kind) { - case 168 /* BreakStatement */: - case 167 /* ContinueStatement */: - case 180 /* DebuggerStatement */: - case 163 /* DoStatement */: - case 161 /* ExpressionStatement */: - case 160 /* EmptyStatement */: - case 166 /* ForInStatement */: - case 165 /* ForStatement */: - case 162 /* IfStatement */: - case 174 /* LabeledStatement */: - case 169 /* ReturnStatement */: - case 171 /* SwitchStatement */: + case 171 /* BreakStatement */: + case 170 /* ContinueStatement */: + case 183 /* DebuggerStatement */: + case 166 /* DoStatement */: + case 164 /* ExpressionStatement */: + case 163 /* EmptyStatement */: + case 169 /* ForInStatement */: + case 168 /* ForStatement */: + case 165 /* IfStatement */: + case 177 /* LabeledStatement */: + case 172 /* ReturnStatement */: + case 174 /* SwitchStatement */: case 92 /* ThrowKeyword */: - case 176 /* TryStatement */: - case 159 /* VariableStatement */: - case 164 /* WhileStatement */: - case 170 /* WithStatement */: - case 191 /* ExportAssignment */: + case 179 /* TryStatement */: + case 162 /* VariableStatement */: + case 167 /* WhileStatement */: + case 173 /* WithStatement */: + case 194 /* ExportAssignment */: return true; default: return false; @@ -2707,10 +2730,10 @@ var ts; return false; } var parent = name.parent; - if (isDeclaration(parent) || parent.kind === 149 /* FunctionExpression */) { + if (isDeclaration(parent) || parent.kind === 152 /* FunctionExpression */) { return parent.name === name; } - if (parent.kind === 178 /* CatchBlock */) { + if (parent.kind === 181 /* CatchBlock */) { return parent.variable === name; } return false; @@ -2718,16 +2741,16 @@ var ts; ts.isDeclarationOrFunctionExpressionOrCatchVariableName = isDeclarationOrFunctionExpressionOrCatchVariableName; function getAncestor(node, kind) { switch (kind) { - case 184 /* ClassDeclaration */: + case 187 /* ClassDeclaration */: while (node) { switch (node.kind) { - case 184 /* ClassDeclaration */: + case 187 /* ClassDeclaration */: return node; - case 187 /* EnumDeclaration */: - case 185 /* InterfaceDeclaration */: - case 186 /* TypeAliasDeclaration */: - case 188 /* ModuleDeclaration */: - case 190 /* ImportDeclaration */: + case 190 /* EnumDeclaration */: + case 188 /* InterfaceDeclaration */: + case 189 /* TypeAliasDeclaration */: + case 191 /* ModuleDeclaration */: + case 193 /* ImportDeclaration */: return undefined; default: node = node.parent; @@ -2769,6 +2792,40 @@ var ts; } } ; + function getFileReferenceFromReferencePath(comment, commentRange) { + var simpleReferenceRegEx = /^\/\/\/\s*/gim; + if (simpleReferenceRegEx.exec(comment)) { + if (isNoDefaultLibRegEx.exec(comment)) { + return { + isNoDefaultLib: true + }; + } + else { + var matchResult = ts.fullTripleSlashReferencePathRegEx.exec(comment); + if (matchResult) { + var start = commentRange.pos; + var end = commentRange.end; + return { + fileReference: { + pos: start, + end: end, + filename: matchResult[3] + }, + isNoDefaultLib: false + }; + } + else { + return { + diagnostic: ts.Diagnostics.Invalid_reference_directive_syntax, + isNoDefaultLib: false + }; + } + } + } + return undefined; + } + ts.getFileReferenceFromReferencePath = getFileReferenceFromReferencePath; function isKeyword(token) { return 64 /* FirstKeyword */ <= token && token <= 119 /* LastKeyword */; } @@ -2777,6 +2834,15 @@ var ts; return 2 /* FirstTriviaToken */ <= token && token <= 5 /* LastTriviaToken */; } ts.isTrivia = isTrivia; + function isUnterminatedTemplateEnd(node) { + ts.Debug.assert(node.kind === 9 /* NoSubstitutionTemplateLiteral */ || node.kind === 12 /* TemplateTail */); + var sourceText = getSourceFileOfNode(node).text; + if (node.end !== sourceText.length) { + return false; + } + return sourceText.charCodeAt(node.end - 1) !== 96 /* backtick */ || node.text.length === 0; + } + ts.isUnterminatedTemplateEnd = isUnterminatedTemplateEnd; function isModifier(token) { switch (token) { case 106 /* PublicKeyword */: @@ -2881,17 +2947,14 @@ var ts; nodeIsNestedInLabel: nodeIsNestedInLabel }; })(); - function getLineAndCharacterlFromSourcePosition(position) { - if (!lineStarts) { - lineStarts = ts.getLineStarts(sourceText); - } - return ts.getLineAndCharacterOfPosition(lineStarts, position); + function getLineStarts() { + return lineStarts || (lineStarts = ts.computeLineStarts(sourceText)); + } + function getLineAndCharacterFromSourcePosition(position) { + return ts.getLineAndCharacterOfPosition(getLineStarts(), position); } function getPositionFromSourceLineAndCharacter(line, character) { - if (!lineStarts) { - lineStarts = ts.getLineStarts(sourceText); - } - return ts.getPositionFromLineAndCharacter(lineStarts, line, character); + return ts.getPositionFromLineAndCharacter(getLineStarts(), line, character); } function error(message, arg0, arg1, arg2) { var start = scanner.getTokenPos(); @@ -2914,7 +2977,9 @@ var ts; function errorAtPos(start, length, message, arg0, arg1, arg2) { var lastErrorPos = file.syntacticErrors.length ? file.syntacticErrors[file.syntacticErrors.length - 1].start : -1; if (start !== lastErrorPos) { - file.syntacticErrors.push(ts.createFileDiagnostic(file, start, length, message, arg0, arg1, arg2)); + var diagnostic = ts.createFileDiagnostic(file, start, length, message, arg0, arg1, arg2); + diagnostic.isParseError = true; + file.syntacticErrors.push(diagnostic); } if (lookAheadMode === 1 /* NoErrorYet */) { lookAheadMode = 2 /* Error */; @@ -3028,14 +3093,14 @@ var ts; return createNode(120 /* Missing */); } function internIdentifier(text) { + text = escapeIdentifier(text); return ts.hasProperty(identifiers, text) ? identifiers[text] : (identifiers[text] = text); } function createIdentifier(isIdentifier) { identifierCount++; if (isIdentifier) { var node = createNode(63 /* Identifier */); - var text = escapeIdentifier(scanner.getTokenValue()); - node.text = internIdentifier(text); + node.text = internIdentifier(scanner.getTokenValue()); nextToken(); return finishNode(node); } @@ -3274,7 +3339,7 @@ var ts; return finishNode(node); } function parseTemplateExpression() { - var template = createNode(155 /* TemplateExpression */); + var template = createNode(158 /* TemplateExpression */); template.head = parseLiteralNode(); ts.Debug.assert(template.head.kind === 10 /* TemplateHead */, "Template head has wrong token kind"); var templateSpans = []; @@ -3287,7 +3352,7 @@ var ts; return finishNode(template); } function parseTemplateSpan() { - var span = createNode(156 /* TemplateSpan */); + var span = createNode(159 /* TemplateSpan */); span.expression = parseExpression(false); var literal; if (token === 14 /* CloseBraceToken */) { @@ -3335,7 +3400,7 @@ var ts; return finishNode(node); } function parseTypeQuery() { - var node = createNode(133 /* TypeQuery */); + var node = createNode(135 /* TypeQuery */); parseExpected(95 /* TypeOfKeyword */); node.exprName = parseEntityName(true); return finishNode(node); @@ -3566,7 +3631,7 @@ var ts; } } function parseTypeLiteral() { - var node = createNode(134 /* TypeLiteral */); + var node = createNode(136 /* TypeLiteral */); if (parseExpected(13 /* OpenBraceToken */)) { node.members = parseList(5 /* TypeMembers */, false, parseTypeMember); parseExpected(14 /* CloseBraceToken */); @@ -3577,7 +3642,7 @@ var ts; return finishNode(node); } function parseTupleType() { - var node = createNode(136 /* TupleType */); + var node = createNode(138 /* TupleType */); var startTokenPos = scanner.getTokenPos(); var startErrorCount = file.syntacticErrors.length; node.elementTypes = parseBracketedList(16 /* TupleElementTypes */, parseType, 17 /* OpenBracketToken */, 18 /* CloseBracketToken */); @@ -3587,22 +3652,20 @@ var ts; return finishNode(node); } function parseParenType() { - var node = createNode(138 /* ParenType */); + var node = createNode(140 /* ParenType */); parseExpected(15 /* OpenParenToken */); node.type = parseType(); parseExpected(16 /* CloseParenToken */); return finishNode(node); } - function parseFunctionType(signatureKind) { - var node = createNode(134 /* TypeLiteral */); - var member = createNode(signatureKind); - var sig = parseSignature(signatureKind, 31 /* EqualsGreaterThanToken */, true); + function parseFunctionType(typeKind) { + var member = createNode(typeKind); + var sig = parseSignature(typeKind === 133 /* FunctionType */ ? 129 /* CallSignature */ : 130 /* ConstructSignature */, 31 /* EqualsGreaterThanToken */, true); member.typeParameters = sig.typeParameters; member.parameters = sig.parameters; member.type = sig.type; finishNode(member); - node.members = createNodeArray(member); - return finishNode(node); + return member; } function parseKeywordAndNoDot() { var node = parseTokenNode(); @@ -3659,7 +3722,7 @@ var ts; var type = parseNonArrayType(); while (!scanner.hasPrecedingLineBreak() && parseOptional(17 /* OpenBracketToken */)) { parseExpected(18 /* CloseBracketToken */); - var node = createNode(135 /* ArrayType */, type.pos); + var node = createNode(137 /* ArrayType */, type.pos); node.elementType = type; type = finishNode(node); } @@ -3674,7 +3737,7 @@ var ts; types.push(parsePrimaryType()); } types.end = getNodeEnd(); - var node = createNode(137 /* UnionType */, type.pos); + var node = createNode(139 /* UnionType */, type.pos); node.types = types; type = finishNode(node); } @@ -3703,10 +3766,10 @@ var ts; } function parseType() { if (isStartOfFunctionType()) { - return parseFunctionType(129 /* CallSignature */); + return parseFunctionType(133 /* FunctionType */); } if (token === 86 /* NewKeyword */) { - return parseFunctionType(130 /* ConstructSignature */); + return parseFunctionType(134 /* ConstructorType */); } return parseUnionType(); } @@ -3788,22 +3851,22 @@ var ts; function isLeftHandSideExpression(expr) { if (expr) { switch (expr.kind) { - case 142 /* PropertyAccess */: - case 143 /* IndexedAccess */: - case 145 /* NewExpression */: - case 144 /* CallExpression */: - case 146 /* TaggedTemplateExpression */: - case 139 /* ArrayLiteral */: - case 148 /* ParenExpression */: - case 140 /* ObjectLiteral */: - case 149 /* FunctionExpression */: + case 145 /* PropertyAccess */: + case 146 /* IndexedAccess */: + case 148 /* NewExpression */: + case 147 /* CallExpression */: + case 149 /* TaggedTemplateExpression */: + case 141 /* ArrayLiteral */: + case 151 /* ParenExpression */: + case 142 /* ObjectLiteral */: + case 152 /* FunctionExpression */: case 63 /* Identifier */: case 120 /* Missing */: case 8 /* RegularExpressionLiteral */: case 6 /* NumericLiteral */: case 7 /* StringLiteral */: case 9 /* NoSubstitutionTemplateLiteral */: - case 155 /* TemplateExpression */: + case 158 /* TemplateExpression */: case 78 /* FalseKeyword */: case 87 /* NullKeyword */: case 91 /* ThisKeyword */: @@ -3839,7 +3902,7 @@ var ts; return parseArrowExpressionTail(pos, sig, false); } else { - return makeFunctionExpression(150 /* ArrowFunction */, pos, undefined, sig, createMissingNode()); + return makeFunctionExpression(153 /* ArrowFunction */, pos, undefined, sig, createMissingNode()); } } var sig = tryParseSignatureIfArrowOrBraceFollows(); @@ -3913,7 +3976,7 @@ var ts; else { body = parseAssignmentExpression(noIn); } - return makeFunctionExpression(150 /* ArrowFunction */, pos, undefined, sig, body); + return makeFunctionExpression(153 /* ArrowFunction */, pos, undefined, sig, body); } function isAssignmentOperator() { return token >= 51 /* FirstAssignment */ && token <= 62 /* LastAssignment */; @@ -3921,7 +3984,7 @@ var ts; function parseConditionalExpression(noIn) { var expr = parseBinaryExpression(noIn); while (parseOptional(49 /* QuestionToken */)) { - var node = createNode(154 /* ConditionalExpression */, expr.pos); + var node = createNode(157 /* ConditionalExpression */, expr.pos); node.condition = expr; node.whenTrue = parseAssignmentExpression(false); parseExpected(50 /* ColonToken */); @@ -3985,7 +4048,7 @@ var ts; return undefined; } function makeBinaryExpression(left, operator, right) { - var node = createNode(153 /* BinaryExpression */, left.pos); + var node = createNode(156 /* BinaryExpression */, left.pos); node.left = left; node.operator = operator; node.right = right; @@ -4014,7 +4077,7 @@ var ts; grammarErrorOnNode(operand, ts.Diagnostics.delete_cannot_be_called_on_an_identifier_in_strict_mode); } } - return makeUnaryExpression(151 /* PrefixOperator */, pos, operator, operand); + return makeUnaryExpression(154 /* PrefixOperator */, pos, operator, operand); case 23 /* LessThanToken */: return parseTypeAssertion(); } @@ -4031,12 +4094,12 @@ var ts; } var operator = token; nextToken(); - expr = makeUnaryExpression(152 /* PostfixOperator */, expr.pos, operator, expr); + expr = makeUnaryExpression(155 /* PostfixOperator */, expr.pos, operator, expr); } return expr; } function parseTypeAssertion() { - var node = createNode(147 /* TypeAssertion */); + var node = createNode(150 /* TypeAssertion */); parseExpected(23 /* LessThanToken */); node.type = parseType(); parseExpected(24 /* GreaterThanToken */); @@ -4053,7 +4116,7 @@ var ts; while (true) { var dotOrBracketStart = scanner.getTokenPos(); if (parseOptional(19 /* DotToken */)) { - var propertyAccess = createNode(142 /* PropertyAccess */, expr.pos); + var propertyAccess = createNode(145 /* PropertyAccess */, expr.pos); if (scanner.hasPrecedingLineBreak() && scanner.isReservedWord() && lookAhead(function () { return scanner.isReservedWord(); })) { grammarErrorAtPos(dotOrBracketStart, scanner.getStartPos() - dotOrBracketStart, ts.Diagnostics.Identifier_expected); var id = createMissingNode(); @@ -4067,7 +4130,7 @@ var ts; continue; } if (parseOptional(17 /* OpenBracketToken */)) { - var indexedAccess = createNode(143 /* IndexedAccess */, expr.pos); + var indexedAccess = createNode(146 /* IndexedAccess */, expr.pos); indexedAccess.object = expr; if (inNewExpression && parseOptional(18 /* CloseBracketToken */)) { indexedAccess.index = createMissingNode(); @@ -4085,7 +4148,7 @@ var ts; continue; } if ((token === 15 /* OpenParenToken */ || token === 23 /* LessThanToken */) && !inNewExpression) { - var callExpr = createNode(144 /* CallExpression */, expr.pos); + var callExpr = createNode(147 /* CallExpression */, expr.pos); callExpr.func = expr; if (token === 23 /* LessThanToken */) { if (!(callExpr.typeArguments = tryParse(parseTypeArgumentsAndOpenParen))) @@ -4100,7 +4163,7 @@ var ts; continue; } if (token === 9 /* NoSubstitutionTemplateLiteral */ || token === 10 /* TemplateHead */) { - var tagExpression = createNode(146 /* TaggedTemplateExpression */, expr.pos); + var tagExpression = createNode(149 /* TaggedTemplateExpression */, expr.pos); tagExpression.tag = expr; tagExpression.template = token === 9 /* NoSubstitutionTemplateLiteral */ ? parseLiteralNode() : parseTemplateExpression(); expr = finishNode(tagExpression); @@ -4174,7 +4237,7 @@ var ts; return createMissingNode(); } function parseParenExpression() { - var node = createNode(148 /* ParenExpression */); + var node = createNode(151 /* ParenExpression */); parseExpected(15 /* OpenParenToken */); node.expression = parseExpression(); parseExpected(16 /* CloseParenToken */); @@ -4187,7 +4250,7 @@ var ts; var errorLength = scanner.getTextPos() - errorStart; grammarErrorAtPos(errorStart, errorLength, omittedExpressionDiagnostic); } - return createNode(157 /* OmittedExpression */); + return createNode(160 /* OmittedExpression */); } return parseAssignmentExpression(); } @@ -4198,7 +4261,7 @@ var ts; return parseAssignmentExpressionOrOmittedExpression(ts.Diagnostics.Argument_expression_expected); } function parseArrayLiteral() { - var node = createNode(139 /* ArrayLiteral */); + var node = createNode(141 /* ArrayLiteral */); parseExpected(17 /* OpenBracketToken */); if (scanner.hasPrecedingLineBreak()) node.flags |= 256 /* MultiLine */; @@ -4207,14 +4270,30 @@ var ts; return finishNode(node); } function parsePropertyAssignment() { - var node = createNode(141 /* PropertyAssignment */); - node.name = parsePropertyName(); + var nodePos = scanner.getStartPos(); + var nameToken = token; + var propertyName = parsePropertyName(); + var node; if (token === 15 /* OpenParenToken */ || token === 23 /* LessThanToken */) { + node = createNode(143 /* PropertyAssignment */, nodePos); + node.name = propertyName; var sig = parseSignature(129 /* CallSignature */, 50 /* ColonToken */, false); var body = parseBody(false); - node.initializer = makeFunctionExpression(149 /* FunctionExpression */, node.pos, undefined, sig, body); + node.initializer = makeFunctionExpression(152 /* FunctionExpression */, node.pos, undefined, sig, body); + return finishNode(node); + } + if (token === 49 /* QuestionToken */) { + var questionStart = scanner.getTokenPos(); + grammarErrorAtPos(questionStart, scanner.getStartPos() - questionStart, ts.Diagnostics.A_object_member_cannot_be_declared_optional); + nextToken(); + } + if (token !== 50 /* ColonToken */ && nameToken === 63 /* Identifier */) { + node = createNode(144 /* ShorthandPropertyAssignment */, nodePos); + node.name = propertyName; } else { + node = createNode(143 /* PropertyAssignment */, nodePos); + node.name = propertyName; parseExpected(50 /* ColonToken */); node.initializer = parseAssignmentExpression(false); } @@ -4230,7 +4309,7 @@ var ts; return parsePropertyAssignment(); } function parseObjectLiteral() { - var node = createNode(140 /* ObjectLiteral */); + var node = createNode(142 /* ObjectLiteral */); parseExpected(13 /* OpenBraceToken */); if (scanner.hasPrecedingLineBreak()) { node.flags |= 256 /* MultiLine */; @@ -4243,11 +4322,15 @@ var ts; var SetAccesor = 4; var GetOrSetAccessor = GetAccessor | SetAccesor; ts.forEach(node.properties, function (p) { - if (p.kind === 157 /* OmittedExpression */) { + if (p.kind === 160 /* OmittedExpression */) { return; } + var name = p.name; var currentKind; - if (p.kind === 141 /* PropertyAssignment */) { + if (p.kind === 143 /* PropertyAssignment */) { + currentKind = Property; + } + else if (p.kind === 144 /* ShorthandPropertyAssignment */) { currentKind = Property; } else if (p.kind === 127 /* GetAccessor */) { @@ -4259,26 +4342,26 @@ var ts; else { ts.Debug.fail("Unexpected syntax kind:" + p.kind); } - if (!ts.hasProperty(seen, p.name.text)) { - seen[p.name.text] = currentKind; + if (!ts.hasProperty(seen, name.text)) { + seen[name.text] = currentKind; } else { - var existingKind = seen[p.name.text]; + var existingKind = seen[name.text]; if (currentKind === Property && existingKind === Property) { if (isInStrictMode) { - grammarErrorOnNode(p.name, ts.Diagnostics.An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode); + grammarErrorOnNode(name, ts.Diagnostics.An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode); } } else if ((currentKind & GetOrSetAccessor) && (existingKind & GetOrSetAccessor)) { if (existingKind !== GetOrSetAccessor && currentKind !== existingKind) { - seen[p.name.text] = currentKind | existingKind; + seen[name.text] = currentKind | existingKind; } else { - grammarErrorOnNode(p.name, ts.Diagnostics.An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name); + grammarErrorOnNode(name, ts.Diagnostics.An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name); } } else { - grammarErrorOnNode(p.name, ts.Diagnostics.An_object_literal_cannot_have_property_and_accessor_with_the_same_name); + grammarErrorOnNode(name, ts.Diagnostics.An_object_literal_cannot_have_property_and_accessor_with_the_same_name); } } }); @@ -4293,7 +4376,7 @@ var ts; if (name && isInStrictMode && isEvalOrArgumentsIdentifier(name)) { reportInvalidUseInStrictMode(name); } - return makeFunctionExpression(149 /* FunctionExpression */, pos, name, sig, body); + return makeFunctionExpression(152 /* FunctionExpression */, pos, name, sig, body); } function makeFunctionExpression(kind, pos, name, sig, body) { var node = createNode(kind, pos); @@ -4305,7 +4388,7 @@ var ts; return finishNode(node); } function parseNewExpression() { - var node = createNode(145 /* NewExpression */); + var node = createNode(148 /* NewExpression */); parseExpected(86 /* NewKeyword */); node.func = parseCallAndAccess(parsePrimaryExpression(), true); if (parseOptional(15 /* OpenParenToken */) || token === 23 /* LessThanToken */ && (node.typeArguments = tryParse(parseTypeArgumentsAndOpenParen))) { @@ -4318,7 +4401,7 @@ var ts; return parseStatement(true); } function parseBlock(ignoreMissingOpenBrace, checkForStrictMode) { - var node = createNode(158 /* Block */); + var node = createNode(161 /* Block */); if (parseExpected(13 /* OpenBraceToken */) || ignoreMissingOpenBrace) { node.statements = parseList(2 /* BlockStatements */, checkForStrictMode, parseStatementAllowingLetDeclaration); parseExpected(14 /* CloseBraceToken */); @@ -4341,7 +4424,7 @@ var ts; } labelledStatementInfo.pushFunctionBoundary(); var block = parseBlock(ignoreMissingOpenBrace, true); - block.kind = 183 /* FunctionBlock */; + block.kind = 186 /* FunctionBlock */; labelledStatementInfo.pop(); inFunctionBody = saveInFunctionBody; inSwitchStatement = saveInSwitchStatement; @@ -4349,12 +4432,12 @@ var ts; return block; } function parseEmptyStatement() { - var node = createNode(160 /* EmptyStatement */); + var node = createNode(163 /* EmptyStatement */); parseExpected(21 /* SemicolonToken */); return finishNode(node); } function parseIfStatement() { - var node = createNode(162 /* IfStatement */); + var node = createNode(165 /* IfStatement */); parseExpected(82 /* IfKeyword */); parseExpected(15 /* OpenParenToken */); node.expression = parseExpression(); @@ -4364,7 +4447,7 @@ var ts; return finishNode(node); } function parseDoStatement() { - var node = createNode(163 /* DoStatement */); + var node = createNode(166 /* DoStatement */); parseExpected(73 /* DoKeyword */); var saveInIterationStatement = inIterationStatement; inIterationStatement = 1 /* Nested */; @@ -4378,7 +4461,7 @@ var ts; return finishNode(node); } function parseWhileStatement() { - var node = createNode(164 /* WhileStatement */); + var node = createNode(167 /* WhileStatement */); parseExpected(98 /* WhileKeyword */); parseExpected(15 /* OpenParenToken */); node.expression = parseExpression(); @@ -4424,7 +4507,7 @@ var ts; } var forOrForInStatement; if (parseOptional(84 /* InKeyword */)) { - var forInStatement = createNode(166 /* ForInStatement */, pos); + var forInStatement = createNode(169 /* ForInStatement */, pos); if (declarations) { if (declarations.length > 1) { error(ts.Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement); @@ -4439,7 +4522,7 @@ var ts; forOrForInStatement = forInStatement; } else { - var forStatement = createNode(165 /* ForStatement */, pos); + var forStatement = createNode(168 /* ForStatement */, pos); if (declarations) forStatement.declarations = declarations; if (varOrInit) @@ -4464,7 +4547,7 @@ var ts; function parseBreakOrContinueStatement(kind) { var node = createNode(kind); var errorCountBeforeStatement = file.syntacticErrors.length; - parseExpected(kind === 168 /* BreakStatement */ ? 64 /* BreakKeyword */ : 69 /* ContinueKeyword */); + parseExpected(kind === 171 /* BreakStatement */ ? 64 /* BreakKeyword */ : 69 /* ContinueKeyword */); if (!canParseSemicolon()) node.label = parseIdentifier(); parseSemicolon(); @@ -4480,7 +4563,7 @@ var ts; return node; } function checkBareBreakOrContinueStatement(node) { - if (node.kind === 168 /* BreakStatement */) { + if (node.kind === 171 /* BreakStatement */) { if (inIterationStatement === 1 /* Nested */ || inSwitchStatement === 1 /* Nested */) { return; } @@ -4489,7 +4572,7 @@ var ts; return; } } - else if (node.kind === 167 /* ContinueStatement */) { + else if (node.kind === 170 /* ContinueStatement */) { if (inIterationStatement === 1 /* Nested */) { return; } @@ -4505,7 +4588,7 @@ var ts; grammarErrorOnNode(node, ts.Diagnostics.Jump_target_cannot_cross_function_boundary); } function checkBreakOrContinueStatementWithLabel(node) { - var nodeIsNestedInLabel = labelledStatementInfo.nodeIsNestedInLabel(node.label, node.kind === 167 /* ContinueStatement */, false); + var nodeIsNestedInLabel = labelledStatementInfo.nodeIsNestedInLabel(node.label, node.kind === 170 /* ContinueStatement */, false); if (nodeIsNestedInLabel === 1 /* Nested */) { return; } @@ -4513,10 +4596,10 @@ var ts; grammarErrorOnNode(node, ts.Diagnostics.Jump_target_cannot_cross_function_boundary); return; } - if (node.kind === 167 /* ContinueStatement */) { + if (node.kind === 170 /* ContinueStatement */) { grammarErrorOnNode(node, ts.Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement); } - else if (node.kind === 168 /* BreakStatement */) { + else if (node.kind === 171 /* BreakStatement */) { grammarErrorOnNode(node, ts.Diagnostics.A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement); } else { @@ -4524,7 +4607,7 @@ var ts; } } function parseReturnStatement() { - var node = createNode(169 /* ReturnStatement */); + var node = createNode(172 /* ReturnStatement */); var errorCountBeforeReturnStatement = file.syntacticErrors.length; var returnTokenStart = scanner.getTokenPos(); var returnTokenLength = scanner.getTextPos() - returnTokenStart; @@ -4538,7 +4621,7 @@ var ts; return finishNode(node); } function parseWithStatement() { - var node = createNode(170 /* WithStatement */); + var node = createNode(173 /* WithStatement */); var startPos = scanner.getTokenPos(); parseExpected(99 /* WithKeyword */); var endPos = scanner.getStartPos(); @@ -4553,7 +4636,7 @@ var ts; return node; } function parseCaseClause() { - var node = createNode(172 /* CaseClause */); + var node = createNode(175 /* CaseClause */); parseExpected(65 /* CaseKeyword */); node.expression = parseExpression(); parseExpected(50 /* ColonToken */); @@ -4561,7 +4644,7 @@ var ts; return finishNode(node); } function parseDefaultClause() { - var node = createNode(173 /* DefaultClause */); + var node = createNode(176 /* DefaultClause */); parseExpected(71 /* DefaultKeyword */); parseExpected(50 /* ColonToken */); node.statements = parseList(4 /* SwitchClauseStatements */, false, parseStatementAllowingLetDeclaration); @@ -4571,7 +4654,7 @@ var ts; return token === 65 /* CaseKeyword */ ? parseCaseClause() : parseDefaultClause(); } function parseSwitchStatement() { - var node = createNode(171 /* SwitchStatement */); + var node = createNode(174 /* SwitchStatement */); parseExpected(90 /* SwitchKeyword */); parseExpected(15 /* OpenParenToken */); node.expression = parseExpression(); @@ -4582,7 +4665,7 @@ var ts; node.clauses = parseList(3 /* SwitchClauses */, false, parseCaseOrDefaultClause); inSwitchStatement = saveInSwitchStatement; parseExpected(14 /* CloseBraceToken */); - var defaultClauses = ts.filter(node.clauses, function (clause) { return clause.kind === 173 /* DefaultClause */; }); + var defaultClauses = ts.filter(node.clauses, function (clause) { return clause.kind === 176 /* DefaultClause */; }); for (var i = 1, n = defaultClauses.length; i < n; i++) { var clause = defaultClauses[i]; var start = ts.skipTrivia(file.text, clause.pos); @@ -4592,7 +4675,7 @@ var ts; return finishNode(node); } function parseThrowStatement() { - var node = createNode(175 /* ThrowStatement */); + var node = createNode(178 /* ThrowStatement */); parseExpected(92 /* ThrowKeyword */); if (scanner.hasPrecedingLineBreak()) { error(ts.Diagnostics.Line_break_not_permitted_here); @@ -4602,13 +4685,13 @@ var ts; return finishNode(node); } function parseTryStatement() { - var node = createNode(176 /* TryStatement */); - node.tryBlock = parseTokenAndBlock(94 /* TryKeyword */, 177 /* TryBlock */); + var node = createNode(179 /* TryStatement */); + node.tryBlock = parseTokenAndBlock(94 /* TryKeyword */, 180 /* TryBlock */); if (token === 66 /* CatchKeyword */) { node.catchBlock = parseCatchBlock(); } if (token === 79 /* FinallyKeyword */) { - node.finallyBlock = parseTokenAndBlock(79 /* FinallyKeyword */, 179 /* FinallyBlock */); + node.finallyBlock = parseTokenAndBlock(79 /* FinallyKeyword */, 182 /* FinallyBlock */); } if (!(node.catchBlock || node.finallyBlock)) { error(ts.Diagnostics.catch_or_finally_expected); @@ -4633,7 +4716,7 @@ var ts; var typeAnnotation = parseTypeAnnotation(); parseExpected(16 /* CloseParenToken */); var result = parseBlock(false, false); - result.kind = 178 /* CatchBlock */; + result.kind = 181 /* CatchBlock */; result.pos = pos; result.variable = variable; if (typeAnnotation) { @@ -4645,7 +4728,7 @@ var ts; return result; } function parseDebuggerStatement() { - var node = createNode(180 /* DebuggerStatement */); + var node = createNode(183 /* DebuggerStatement */); parseExpected(70 /* DebuggerKeyword */); parseSemicolon(); return finishNode(node); @@ -4663,7 +4746,7 @@ var ts; return isIdentifier() && lookAhead(function () { return nextToken() === 50 /* ColonToken */; }); } function parseLabeledStatement(allowLetAndConstDeclarations) { - var node = createNode(174 /* LabeledStatement */); + var node = createNode(177 /* LabeledStatement */); node.label = parseIdentifier(); parseExpected(50 /* ColonToken */); if (labelledStatementInfo.nodeIsNestedInLabel(node.label, false, true)) { @@ -4674,7 +4757,7 @@ var ts; return finishNode(node); } function parseExpressionStatement() { - var node = createNode(161 /* ExpressionStatement */); + var node = createNode(164 /* ExpressionStatement */); node.expression = parseExpression(); parseSemicolon(); return finishNode(node); @@ -4745,9 +4828,9 @@ var ts; case 80 /* ForKeyword */: return parseForOrForInStatement(); case 69 /* ContinueKeyword */: - return parseBreakOrContinueStatement(167 /* ContinueStatement */); + return parseBreakOrContinueStatement(170 /* ContinueStatement */); case 64 /* BreakKeyword */: - return parseBreakOrContinueStatement(168 /* BreakStatement */); + return parseBreakOrContinueStatement(171 /* BreakStatement */); case 88 /* ReturnKeyword */: return parseReturnStatement(); case 99 /* WithKeyword */: @@ -4787,7 +4870,7 @@ var ts; error(ts.Diagnostics.Block_or_expected); } function parseVariableDeclaration(flags, noIn) { - var node = createNode(181 /* VariableDeclaration */); + var node = createNode(184 /* VariableDeclaration */); node.flags = flags; var errorCountBeforeVariableDeclaration = file.syntacticErrors.length; node.name = parseIdentifier(); @@ -4810,7 +4893,7 @@ var ts; return parseDelimitedList(9 /* VariableDeclarations */, function () { return parseVariableDeclaration(flags, noIn); }, false); } function parseVariableStatement(allowLetAndConstDeclarations, pos, flags) { - var node = createNode(159 /* VariableStatement */, pos); + var node = createNode(162 /* VariableStatement */, pos); if (flags) node.flags = flags; var errorCountBeforeVarStatement = file.syntacticErrors.length; @@ -4849,7 +4932,7 @@ var ts; return node; } function parseFunctionDeclaration(pos, flags) { - var node = createNode(182 /* FunctionDeclaration */, pos); + var node = createNode(185 /* FunctionDeclaration */, pos); if (flags) node.flags = flags; parseExpected(81 /* FunctionKeyword */); @@ -4859,7 +4942,7 @@ var ts; node.parameters = sig.parameters; node.type = sig.type; node.body = parseAndCheckFunctionBody(false); - if (isInStrictMode && isEvalOrArgumentsIdentifier(node.name)) { + if (isInStrictMode && isEvalOrArgumentsIdentifier(node.name) && node.name.kind === 63 /* Identifier */) { reportInvalidUseInStrictMode(node.name); } return finishNode(node); @@ -5160,7 +5243,7 @@ var ts; ts.Debug.fail("Should not have attempted to parse class member declaration."); } function parseClassDeclaration(pos, flags) { - var node = createNode(184 /* ClassDeclaration */, pos); + var node = createNode(187 /* ClassDeclaration */, pos); node.flags = flags; var errorCountBeforeClassDeclaration = file.syntacticErrors.length; parseExpected(67 /* ClassKeyword */); @@ -5187,7 +5270,7 @@ var ts; return finishNode(node); } function parseInterfaceDeclaration(pos, flags) { - var node = createNode(185 /* InterfaceDeclaration */, pos); + var node = createNode(188 /* InterfaceDeclaration */, pos); node.flags = flags; var errorCountBeforeInterfaceDeclaration = file.syntacticErrors.length; parseExpected(101 /* InterfaceKeyword */); @@ -5207,7 +5290,7 @@ var ts; return finishNode(node); } function parseTypeAliasDeclaration(pos, flags) { - var node = createNode(186 /* TypeAliasDeclaration */, pos); + var node = createNode(189 /* TypeAliasDeclaration */, pos); node.flags = flags; parseExpected(119 /* TypeKeyword */); node.name = parseIdentifier(); @@ -5222,7 +5305,7 @@ var ts; function isInteger(literalExpression) { return /^[0-9]+([eE]\+?[0-9]+)?$/.test(literalExpression.text); } - if (expression.kind === 151 /* PrefixOperator */) { + if (expression.kind === 154 /* PrefixOperator */) { var unaryExpression = expression; if (unaryExpression.operator === 32 /* PlusToken */ || unaryExpression.operator === 33 /* MinusToken */) { expression = unaryExpression.operand; @@ -5235,7 +5318,7 @@ var ts; } var inConstantEnumMemberSection = true; function parseAndCheckEnumMember() { - var node = createNode(192 /* EnumMember */); + var node = createNode(195 /* EnumMember */); var errorCountBeforeEnumMember = file.syntacticErrors.length; node.name = parsePropertyName(); node.initializer = parseInitializer(false); @@ -5254,7 +5337,7 @@ var ts; } return finishNode(node); } - var node = createNode(187 /* EnumDeclaration */, pos); + var node = createNode(190 /* EnumDeclaration */, pos); node.flags = flags; if (enumIsConst) { parseExpected(68 /* ConstKeyword */); @@ -5271,7 +5354,7 @@ var ts; return finishNode(node); } function parseModuleBody() { - var node = createNode(189 /* ModuleBlock */); + var node = createNode(192 /* ModuleBlock */); if (parseExpected(13 /* OpenBraceToken */)) { node.statements = parseList(1 /* ModuleElements */, false, parseModuleElement); parseExpected(14 /* CloseBraceToken */); @@ -5282,7 +5365,7 @@ var ts; return finishNode(node); } function parseInternalModuleTail(pos, flags) { - var node = createNode(188 /* ModuleDeclaration */, pos); + var node = createNode(191 /* ModuleDeclaration */, pos); node.flags = flags; node.name = parseIdentifier(); if (parseOptional(19 /* DotToken */)) { @@ -5291,10 +5374,10 @@ var ts; else { node.body = parseModuleBody(); ts.forEach(node.body.statements, function (s) { - if (s.kind === 191 /* ExportAssignment */) { + if (s.kind === 194 /* ExportAssignment */) { grammarErrorOnNode(s, ts.Diagnostics.An_export_assignment_cannot_be_used_in_an_internal_module); } - else if (s.kind === 190 /* ImportDeclaration */ && s.externalModuleName) { + else if (s.kind === 193 /* ImportDeclaration */ && s.externalModuleName) { grammarErrorOnNode(s, ts.Diagnostics.Import_declarations_in_an_internal_module_cannot_reference_an_external_module); } }); @@ -5302,7 +5385,7 @@ var ts; return finishNode(node); } function parseAmbientExternalModuleDeclaration(pos, flags) { - var node = createNode(188 /* ModuleDeclaration */, pos); + var node = createNode(191 /* ModuleDeclaration */, pos); node.flags = flags; node.name = parseStringLiteral(); if (!inAmbientContext) { @@ -5322,7 +5405,7 @@ var ts; return token === 7 /* StringLiteral */ ? parseAmbientExternalModuleDeclaration(pos, flags) : parseInternalModuleTail(pos, flags); } function parseImportDeclaration(pos, flags) { - var node = createNode(190 /* ImportDeclaration */, pos); + var node = createNode(193 /* ImportDeclaration */, pos); node.flags = flags; parseExpected(83 /* ImportKeyword */); node.name = parseIdentifier(); @@ -5339,7 +5422,7 @@ var ts; return finishNode(node); } function parseExportAssignmentTail(pos) { - var node = createNode(191 /* ExportAssignment */, pos); + var node = createNode(194 /* ExportAssignment */, pos); node.exportName = parseIdentifier(); parseSemicolon(); return finishNode(node); @@ -5459,35 +5542,33 @@ var ts; function processReferenceComments() { var referencedFiles = []; var amdDependencies = []; + var amdModuleName; commentRanges = []; token = scanner.scan(); for (var i = 0; i < commentRanges.length; i++) { var range = commentRanges[i]; var comment = sourceText.substring(range.pos, range.end); - var simpleReferenceRegEx = /^\/\/\/\s*/gim; - if (isNoDefaultLibRegEx.exec(comment)) { - file.hasNoDefaultLib = true; + var referencePathMatchResult = getFileReferenceFromReferencePath(comment, range); + if (referencePathMatchResult) { + var fileReference = referencePathMatchResult.fileReference; + file.hasNoDefaultLib = referencePathMatchResult.isNoDefaultLib; + var diagnostic = referencePathMatchResult.diagnostic; + if (fileReference) { + referencedFiles.push(fileReference); } - else { - var matchResult = ts.fullTripleSlashReferencePathRegEx.exec(comment); - var start = range.pos; - var end = range.end; - var length = end - start; - if (!matchResult) { - errorAtPos(start, length, ts.Diagnostics.Invalid_reference_directive_syntax); - } - else { - referencedFiles.push({ - pos: start, - end: end, - filename: matchResult[3] - }); - } + if (diagnostic) { + errorAtPos(range.pos, range.end - range.pos, diagnostic); } } else { + var amdModuleNameRegEx = /^\/\/\/\s* 1) { lineCount = lineCount + lineStartsOfS.length - 1; linePos = output.length - s.length + lineStartsOfS[lineStartsOfS.length - 1]; @@ -6505,7 +6612,7 @@ var ts; if (scopeName) { recordScopeNameStart(scopeName); } - else if (node.kind === 182 /* FunctionDeclaration */ || node.kind === 149 /* FunctionExpression */ || node.kind === 125 /* Method */ || node.kind === 127 /* GetAccessor */ || node.kind === 128 /* SetAccessor */ || node.kind === 188 /* ModuleDeclaration */ || node.kind === 184 /* ClassDeclaration */ || node.kind === 187 /* EnumDeclaration */) { + else if (node.kind === 185 /* FunctionDeclaration */ || node.kind === 152 /* FunctionExpression */ || node.kind === 125 /* Method */ || node.kind === 127 /* GetAccessor */ || node.kind === 128 /* SetAccessor */ || node.kind === 191 /* ModuleDeclaration */ || node.kind === 187 /* ClassDeclaration */ || node.kind === 190 /* EnumDeclaration */) { if (node.name) { scopeName = node.name.text; } @@ -6587,7 +6694,7 @@ var ts; } function emitNodeWithMap(node) { if (node) { - if (node.kind != 193 /* SourceFile */) { + if (node.kind != 196 /* SourceFile */) { recordEmitNodeStartSpan(node); emitNode(node); recordEmitNodeEndSpan(node); @@ -6696,14 +6803,14 @@ var ts; ts.forEachChild(node, emit); return; } - ts.Debug.assert(node.parent.kind !== 146 /* TaggedTemplateExpression */); - var templateNeedsParens = ts.isExpression(node.parent) && node.parent.kind !== 148 /* ParenExpression */ && comparePrecedenceToBinaryPlus(node.parent) !== -1 /* LessThan */; + ts.Debug.assert(node.parent.kind !== 149 /* TaggedTemplateExpression */); + var templateNeedsParens = ts.isExpression(node.parent) && node.parent.kind !== 151 /* ParenExpression */ && comparePrecedenceToBinaryPlus(node.parent) !== -1 /* LessThan */; if (templateNeedsParens) { write("("); } emitLiteral(node.head); ts.forEach(node.templateSpans, function (templateSpan) { - var needsParens = templateSpan.expression.kind !== 148 /* ParenExpression */ && comparePrecedenceToBinaryPlus(templateSpan.expression) !== 1 /* GreaterThan */; + var needsParens = templateSpan.expression.kind !== 151 /* ParenExpression */ && comparePrecedenceToBinaryPlus(templateSpan.expression) !== 1 /* GreaterThan */; write(" + "); if (needsParens) { write("("); @@ -6723,7 +6830,7 @@ var ts; function comparePrecedenceToBinaryPlus(expression) { ts.Debug.assert(compilerOptions.target <= 1 /* ES5 */); switch (expression.kind) { - case 153 /* BinaryExpression */: + case 156 /* BinaryExpression */: switch (expression.operator) { case 34 /* AsteriskToken */: case 35 /* SlashToken */: @@ -6734,7 +6841,7 @@ var ts; default: return -1 /* LessThan */; } - case 154 /* ConditionalExpression */: + case 157 /* ConditionalExpression */: return -1 /* LessThan */; default: return 1 /* GreaterThan */; @@ -6745,7 +6852,7 @@ var ts; emit(span.expression); emit(span.literal); } - function emitQuotedIdentifier(node) { + function emitExpressionForPropertyName(node) { if (node.kind === 7 /* StringLiteral */) { emitLiteral(node); } @@ -6760,45 +6867,52 @@ var ts; write("\""); } } - function isNonExpressionIdentifier(node) { + function isNotExpressionIdentifier(node) { var parent = node.parent; switch (parent.kind) { case 123 /* Parameter */: - case 181 /* VariableDeclaration */: + case 184 /* VariableDeclaration */: case 124 /* Property */: - case 141 /* PropertyAssignment */: - case 192 /* EnumMember */: + case 143 /* PropertyAssignment */: + case 144 /* ShorthandPropertyAssignment */: + case 195 /* EnumMember */: case 125 /* Method */: - case 182 /* FunctionDeclaration */: + case 185 /* FunctionDeclaration */: case 127 /* GetAccessor */: case 128 /* SetAccessor */: - case 149 /* FunctionExpression */: - case 184 /* ClassDeclaration */: - case 185 /* InterfaceDeclaration */: - case 187 /* EnumDeclaration */: - case 188 /* ModuleDeclaration */: - case 190 /* ImportDeclaration */: + case 152 /* FunctionExpression */: + case 187 /* ClassDeclaration */: + case 188 /* InterfaceDeclaration */: + case 190 /* EnumDeclaration */: + case 191 /* ModuleDeclaration */: + case 193 /* ImportDeclaration */: return parent.name === node; - case 168 /* BreakStatement */: - case 167 /* ContinueStatement */: - case 191 /* ExportAssignment */: + case 171 /* BreakStatement */: + case 170 /* ContinueStatement */: + case 194 /* ExportAssignment */: return false; - case 174 /* LabeledStatement */: + case 177 /* LabeledStatement */: return node.parent.label === node; - case 178 /* CatchBlock */: + case 181 /* CatchBlock */: return node.parent.variable === node; } } - function emitIdentifier(node) { - if (!isNonExpressionIdentifier(node)) { - var prefix = resolver.getExpressionNamePrefix(node); - if (prefix) { - write(prefix); - write("."); - } + function emitExpressionIdentifier(node) { + var prefix = resolver.getExpressionNamePrefix(node); + if (prefix) { + write(prefix); + write("."); } write(getSourceTextOfLocalNode(node)); } + function emitIdentifier(node) { + if (!isNotExpressionIdentifier(node)) { + emitExpressionIdentifier(node); + } + else { + write(getSourceTextOfLocalNode(node)); + } + } function emitThis(node) { if (resolver.getNodeCheckFlags(node) & 2 /* LexicalThis */) { write("_this"); @@ -6859,10 +6973,33 @@ var ts; emit(node.initializer); emitTrailingComments(node); } + function emitShortHandPropertyAssignment(node) { + function emitAsNormalPropertyAssignment() { + emitLeadingComments(node); + emit(node.name); + write(": "); + emitExpressionIdentifier(node.name); + emitTrailingComments(node); + } + if (compilerOptions.target < 2 /* ES6 */) { + emitAsNormalPropertyAssignment(); + } + else if (compilerOptions.target >= 2 /* ES6 */) { + var prefix = resolver.getExpressionNamePrefix(node.name); + if (prefix) { + emitAsNormalPropertyAssignment(); + } + else { + emitLeadingComments(node); + emit(node.name); + emitTrailingComments(node); + } + } + } function tryEmitConstantValue(node) { var constantValue = resolver.getConstantValue(node); if (constantValue !== undefined) { - var propertyName = node.kind === 142 /* PropertyAccess */ ? ts.identifierToString(node.right) : ts.getTextOfNode(node.index); + var propertyName = node.kind === 145 /* PropertyAccess */ ? ts.declarationNameToString(node.right) : ts.getTextOfNode(node.index); write(constantValue.toString() + " /* " + propertyName + " */"); return true; } @@ -6893,7 +7030,7 @@ var ts; } else { emit(node.func); - superCall = node.func.kind === 142 /* PropertyAccess */ && node.func.left.kind === 89 /* SuperKeyword */; + superCall = node.func.kind === 145 /* PropertyAccess */ && node.func.left.kind === 89 /* SuperKeyword */; } if (superCall) { write(".call("); @@ -6926,12 +7063,12 @@ var ts; emit(node.template); } function emitParenExpression(node) { - if (node.expression.kind === 147 /* TypeAssertion */) { + if (node.expression.kind === 150 /* TypeAssertion */) { var operand = node.expression.operand; - while (operand.kind == 147 /* TypeAssertion */) { + while (operand.kind == 150 /* TypeAssertion */) { operand = operand.operand; } - if (operand.kind !== 151 /* PrefixOperator */ && operand.kind !== 152 /* PostfixOperator */ && operand.kind !== 145 /* NewExpression */ && !(operand.kind === 144 /* CallExpression */ && node.parent.kind === 145 /* NewExpression */) && !(operand.kind === 149 /* FunctionExpression */ && node.parent.kind === 144 /* CallExpression */)) { + if (operand.kind !== 154 /* PrefixOperator */ && operand.kind !== 155 /* PostfixOperator */ && operand.kind !== 148 /* NewExpression */ && !(operand.kind === 147 /* CallExpression */ && node.parent.kind === 148 /* NewExpression */) && !(operand.kind === 152 /* FunctionExpression */ && node.parent.kind === 147 /* CallExpression */)) { emit(operand); return; } @@ -6941,13 +7078,13 @@ var ts; write(")"); } function emitUnaryExpression(node) { - if (node.kind === 151 /* PrefixOperator */) { + if (node.kind === 154 /* PrefixOperator */) { write(ts.tokenToString(node.operator)); } if (node.operator >= 63 /* Identifier */) { write(" "); } - else if (node.kind === 151 /* PrefixOperator */ && node.operand.kind === 151 /* PrefixOperator */) { + else if (node.kind === 154 /* PrefixOperator */ && node.operand.kind === 154 /* PrefixOperator */) { var operand = node.operand; if (node.operator === 32 /* PlusToken */ && (operand.operator === 32 /* PlusToken */ || operand.operator === 37 /* PlusPlusToken */)) { write(" "); @@ -6957,7 +7094,7 @@ var ts; } } emit(node.operand); - if (node.kind === 152 /* PostfixOperator */) { + if (node.kind === 155 /* PostfixOperator */) { write(ts.tokenToString(node.operator)); } } @@ -6980,8 +7117,8 @@ var ts; emitToken(13 /* OpenBraceToken */, node.pos); increaseIndent(); scopeEmitStart(node.parent); - if (node.kind === 189 /* ModuleBlock */) { - ts.Debug.assert(node.parent.kind === 188 /* ModuleDeclaration */); + if (node.kind === 192 /* ModuleBlock */) { + ts.Debug.assert(node.parent.kind === 191 /* ModuleDeclaration */); emitCaptureThisForNodeIfNecessary(node.parent); } emitLines(node.statements); @@ -6991,7 +7128,7 @@ var ts; scopeEmitEnd(); } function emitEmbeddedStatement(node) { - if (node.kind === 158 /* Block */) { + if (node.kind === 161 /* Block */) { write(" "); emit(node); } @@ -7003,7 +7140,7 @@ var ts; } } function emitExpressionStatement(node) { - var isArrowExpression = node.expression.kind === 150 /* ArrowFunction */; + var isArrowExpression = node.expression.kind === 153 /* ArrowFunction */; emitLeadingComments(node); if (isArrowExpression) write("("); @@ -7024,7 +7161,7 @@ var ts; if (node.elseStatement) { writeLine(); emitToken(74 /* ElseKeyword */, node.thenStatement.end); - if (node.elseStatement.kind === 162 /* IfStatement */) { + if (node.elseStatement.kind === 165 /* IfStatement */) { write(" "); emit(node.elseStatement); } @@ -7037,7 +7174,7 @@ var ts; function emitDoStatement(node) { write("do"); emitEmbeddedStatement(node.statement); - if (node.statement.kind === 158 /* Block */) { + if (node.statement.kind === 161 /* Block */) { write(" "); } else { @@ -7103,7 +7240,7 @@ var ts; emitEmbeddedStatement(node.statement); } function emitBreakOrContinueStatement(node) { - emitToken(node.kind === 168 /* BreakStatement */ ? 64 /* BreakKeyword */ : 69 /* ContinueKeyword */, node.pos); + emitToken(node.kind === 171 /* BreakStatement */ ? 64 /* BreakKeyword */ : 69 /* ContinueKeyword */, node.pos); emitOptional(" ", node.label); write(";"); } @@ -7138,7 +7275,7 @@ var ts; return getLineOfLocalPosition(ts.skipTrivia(currentSourceFile.text, node1.pos)) === getLineOfLocalPosition(ts.skipTrivia(currentSourceFile.text, node2.pos)); } function emitCaseOrDefaultClause(node) { - if (node.kind === 172 /* CaseClause */) { + if (node.kind === 175 /* CaseClause */) { write("case "); emit(node.expression); write(":"); @@ -7193,7 +7330,7 @@ var ts; function getContainingModule(node) { do { node = node.parent; - } while (node && node.kind !== 188 /* ModuleDeclaration */); + } while (node && node.kind !== 191 /* ModuleDeclaration */); return node; } function emitModuleMemberName(node) { @@ -7305,7 +7442,7 @@ var ts; emitLeadingComments(node); } write("function "); - if (node.kind === 182 /* FunctionDeclaration */ || (node.kind === 149 /* FunctionExpression */ && node.name)) { + if (node.kind === 185 /* FunctionDeclaration */ || (node.kind === 152 /* FunctionExpression */ && node.name)) { emit(node.name); } emitSignatureAndBody(node); @@ -7335,16 +7472,16 @@ var ts; write(" {"); scopeEmitStart(node); increaseIndent(); - emitDetachedComments(node.body.kind === 183 /* FunctionBlock */ ? node.body.statements : node.body); + emitDetachedComments(node.body.kind === 186 /* FunctionBlock */ ? node.body.statements : node.body); var startIndex = 0; - if (node.body.kind === 183 /* FunctionBlock */) { + if (node.body.kind === 186 /* FunctionBlock */) { startIndex = emitDirectivePrologues(node.body.statements, true); } var outPos = writer.getTextPos(); emitCaptureThisForNodeIfNecessary(node); emitDefaultValueAssignments(node); emitRestParameter(node); - if (node.body.kind !== 183 /* FunctionBlock */ && outPos === writer.getTextPos()) { + if (node.body.kind !== 186 /* FunctionBlock */ && outPos === writer.getTextPos()) { decreaseIndent(); write(" "); emitStart(node.body); @@ -7357,7 +7494,7 @@ var ts; emitEnd(node.body); } else { - if (node.body.kind === 183 /* FunctionBlock */) { + if (node.body.kind === 186 /* FunctionBlock */) { emitLinesStartingAt(node.body.statements, startIndex); } else { @@ -7369,7 +7506,7 @@ var ts; emitTrailingComments(node.body); } writeLine(); - if (node.body.kind === 183 /* FunctionBlock */) { + if (node.body.kind === 186 /* FunctionBlock */) { emitLeadingCommentsOfPosition(node.body.statements.end); decreaseIndent(); emitToken(14 /* CloseBraceToken */, node.body.statements.end); @@ -7395,9 +7532,9 @@ var ts; function findInitialSuperCall(ctor) { if (ctor.body) { var statement = ctor.body.statements[0]; - if (statement && statement.kind === 161 /* ExpressionStatement */) { + if (statement && statement.kind === 164 /* ExpressionStatement */) { var expr = statement.expression; - if (expr && expr.kind === 144 /* CallExpression */) { + if (expr && expr.kind === 147 /* CallExpression */) { var func = expr.func; if (func && func.kind === 89 /* SuperKeyword */) { return statement; @@ -7492,7 +7629,7 @@ var ts; write(".prototype"); } write(", "); - emitQuotedIdentifier(member.name); + emitExpressionForPropertyName(member.name); emitEnd(member.name); write(", {"); increaseIndent(); @@ -7698,7 +7835,7 @@ var ts; write("["); write(resolver.getLocalNameOfContainer(node)); write("["); - emitQuotedIdentifier(member.name); + emitExpressionForPropertyName(member.name); write("] = "); if (member.initializer && !isConstEnum) { emit(member.initializer); @@ -7707,7 +7844,7 @@ var ts; write(resolver.getEnumMemberValue(member).toString()); } write("] = "); - emitQuotedIdentifier(member.name); + emitExpressionForPropertyName(member.name); emitEnd(member); write(";"); emitTrailingComments(member); @@ -7715,7 +7852,7 @@ var ts; } } function getInnerMostModuleDeclarationFromDottedModule(moduleDeclaration) { - if (moduleDeclaration.body.kind === 188 /* ModuleDeclaration */) { + if (moduleDeclaration.body.kind === 191 /* ModuleDeclaration */) { var recursiveInnerModule = getInnerMostModuleDeclarationFromDottedModule(moduleDeclaration.body); return recursiveInnerModule || moduleDeclaration.body; } @@ -7737,7 +7874,7 @@ var ts; write(resolver.getLocalNameOfContainer(node)); emitEnd(node.name); write(") "); - if (node.body.kind === 189 /* ModuleBlock */) { + if (node.body.kind === 192 /* ModuleBlock */) { emit(node.body); } else { @@ -7771,7 +7908,7 @@ var ts; emitImportDeclaration = !ts.isExternalModule(currentSourceFile) && resolver.isTopLevelValueImportWithEntityName(node); } if (emitImportDeclaration) { - if (node.externalModuleName && node.parent.kind === 193 /* SourceFile */ && compilerOptions.module === 2 /* AMD */) { + if (node.externalModuleName && node.parent.kind === 196 /* SourceFile */ && compilerOptions.module === 2 /* AMD */) { if (node.flags & 1 /* Export */) { writeLine(); emitLeadingComments(node); @@ -7811,7 +7948,7 @@ var ts; function getExternalImportDeclarations(node) { var result = []; ts.forEach(node.statements, function (stat) { - if (stat.kind === 190 /* ImportDeclaration */ && stat.externalModuleName && resolver.isReferencedImportDeclaration(stat)) { + if (stat.kind === 193 /* ImportDeclaration */ && stat.externalModuleName && resolver.isReferencedImportDeclaration(stat)) { result.push(stat); } }); @@ -7819,7 +7956,7 @@ var ts; } function getFirstExportAssignment(sourceFile) { return ts.forEach(sourceFile.statements, function (node) { - if (node.kind === 191 /* ExportAssignment */) { + if (node.kind === 194 /* ExportAssignment */) { return node; } }); @@ -7827,7 +7964,11 @@ var ts; function emitAMDModule(node, startIndex) { var imports = getExternalImportDeclarations(node); writeLine(); - write("define([\"require\", \"exports\""); + write("define("); + if (node.amdModuleName) { + write("\"" + node.amdModuleName + "\", "); + } + write("[\"require\", \"exports\""); ts.forEach(imports, function (imp) { write(", "); emitLiteral(imp.externalModuleName); @@ -7960,102 +8101,104 @@ var ts; case 11 /* TemplateMiddle */: case 12 /* TemplateTail */: return emitLiteral(node); - case 155 /* TemplateExpression */: + case 158 /* TemplateExpression */: return emitTemplateExpression(node); - case 156 /* TemplateSpan */: + case 159 /* TemplateSpan */: return emitTemplateSpan(node); case 121 /* QualifiedName */: return emitPropertyAccess(node); - case 139 /* ArrayLiteral */: + case 141 /* ArrayLiteral */: return emitArrayLiteral(node); - case 140 /* ObjectLiteral */: + case 142 /* ObjectLiteral */: return emitObjectLiteral(node); - case 141 /* PropertyAssignment */: + case 143 /* PropertyAssignment */: return emitPropertyAssignment(node); - case 142 /* PropertyAccess */: + case 144 /* ShorthandPropertyAssignment */: + return emitShortHandPropertyAssignment(node); + case 145 /* PropertyAccess */: return emitPropertyAccess(node); - case 143 /* IndexedAccess */: + case 146 /* IndexedAccess */: return emitIndexedAccess(node); - case 144 /* CallExpression */: + case 147 /* CallExpression */: return emitCallExpression(node); - case 145 /* NewExpression */: + case 148 /* NewExpression */: return emitNewExpression(node); - case 146 /* TaggedTemplateExpression */: + case 149 /* TaggedTemplateExpression */: return emitTaggedTemplateExpression(node); - case 147 /* TypeAssertion */: + case 150 /* TypeAssertion */: return emit(node.operand); - case 148 /* ParenExpression */: + case 151 /* ParenExpression */: return emitParenExpression(node); - case 182 /* FunctionDeclaration */: - case 149 /* FunctionExpression */: - case 150 /* ArrowFunction */: + case 185 /* FunctionDeclaration */: + case 152 /* FunctionExpression */: + case 153 /* ArrowFunction */: return emitFunctionDeclaration(node); - case 151 /* PrefixOperator */: - case 152 /* PostfixOperator */: + case 154 /* PrefixOperator */: + case 155 /* PostfixOperator */: return emitUnaryExpression(node); - case 153 /* BinaryExpression */: + case 156 /* BinaryExpression */: return emitBinaryExpression(node); - case 154 /* ConditionalExpression */: + case 157 /* ConditionalExpression */: return emitConditionalExpression(node); - case 157 /* OmittedExpression */: + case 160 /* OmittedExpression */: return; - case 158 /* Block */: - case 177 /* TryBlock */: - case 179 /* FinallyBlock */: - case 183 /* FunctionBlock */: - case 189 /* ModuleBlock */: + case 161 /* Block */: + case 180 /* TryBlock */: + case 182 /* FinallyBlock */: + case 186 /* FunctionBlock */: + case 192 /* ModuleBlock */: return emitBlock(node); - case 159 /* VariableStatement */: + case 162 /* VariableStatement */: return emitVariableStatement(node); - case 160 /* EmptyStatement */: + case 163 /* EmptyStatement */: return write(";"); - case 161 /* ExpressionStatement */: + case 164 /* ExpressionStatement */: return emitExpressionStatement(node); - case 162 /* IfStatement */: + case 165 /* IfStatement */: return emitIfStatement(node); - case 163 /* DoStatement */: + case 166 /* DoStatement */: return emitDoStatement(node); - case 164 /* WhileStatement */: + case 167 /* WhileStatement */: return emitWhileStatement(node); - case 165 /* ForStatement */: + case 168 /* ForStatement */: return emitForStatement(node); - case 166 /* ForInStatement */: + case 169 /* ForInStatement */: return emitForInStatement(node); - case 167 /* ContinueStatement */: - case 168 /* BreakStatement */: + case 170 /* ContinueStatement */: + case 171 /* BreakStatement */: return emitBreakOrContinueStatement(node); - case 169 /* ReturnStatement */: + case 172 /* ReturnStatement */: return emitReturnStatement(node); - case 170 /* WithStatement */: + case 173 /* WithStatement */: return emitWithStatement(node); - case 171 /* SwitchStatement */: + case 174 /* SwitchStatement */: return emitSwitchStatement(node); - case 172 /* CaseClause */: - case 173 /* DefaultClause */: + case 175 /* CaseClause */: + case 176 /* DefaultClause */: return emitCaseOrDefaultClause(node); - case 174 /* LabeledStatement */: + case 177 /* LabeledStatement */: return emitLabelledStatement(node); - case 175 /* ThrowStatement */: + case 178 /* ThrowStatement */: return emitThrowStatement(node); - case 176 /* TryStatement */: + case 179 /* TryStatement */: return emitTryStatement(node); - case 178 /* CatchBlock */: + case 181 /* CatchBlock */: return emitCatchBlock(node); - case 180 /* DebuggerStatement */: + case 183 /* DebuggerStatement */: return emitDebuggerStatement(node); - case 181 /* VariableDeclaration */: + case 184 /* VariableDeclaration */: return emitVariableDeclaration(node); - case 184 /* ClassDeclaration */: + case 187 /* ClassDeclaration */: return emitClassDeclaration(node); - case 185 /* InterfaceDeclaration */: + case 188 /* InterfaceDeclaration */: return emitInterfaceDeclaration(node); - case 187 /* EnumDeclaration */: + case 190 /* EnumDeclaration */: return emitEnumDeclaration(node); - case 188 /* ModuleDeclaration */: + case 191 /* ModuleDeclaration */: return emitModuleDeclaration(node); - case 190 /* ImportDeclaration */: + case 193 /* ImportDeclaration */: return emitImportDeclaration(node); - case 193 /* SourceFile */: + case 196 /* SourceFile */: return emitSourceFile(node); } } @@ -8073,7 +8216,7 @@ var ts; return leadingComments; } function getLeadingCommentsToEmit(node) { - if (node.parent.kind === 193 /* SourceFile */ || node.pos !== node.parent.pos) { + if (node.parent.kind === 196 /* SourceFile */ || node.pos !== node.parent.pos) { var leadingComments; if (hasDetachedComments(node.pos)) { leadingComments = getLeadingCommentsWithoutDetachedComments(); @@ -8090,7 +8233,7 @@ var ts; emitComments(leadingComments, true, writer, writeComment); } function emitTrailingDeclarationComments(node) { - if (node.parent.kind === 193 /* SourceFile */ || node.end !== node.parent.end) { + if (node.parent.kind === 196 /* SourceFile */ || node.end !== node.parent.end) { var trailingComments = ts.getTrailingCommentRanges(currentSourceFile.text, node.end); emitComments(trailingComments, false, writer, writeComment); } @@ -8282,7 +8425,7 @@ var ts; if (node.flags & 1 /* Export */) { write("export "); } - if (node.kind !== 185 /* InterfaceDeclaration */) { + if (node.kind !== 188 /* InterfaceDeclaration */) { write("declare "); } } @@ -8338,7 +8481,7 @@ var ts; emitDeclarationFlags(node); write("module "); emitSourceTextOfNode(node.name); - while (node.body.kind !== 189 /* ModuleBlock */) { + while (node.body.kind !== 192 /* ModuleBlock */) { node = node.body; write("."); emitSourceTextOfNode(node.name); @@ -8410,10 +8553,10 @@ var ts; function getTypeParameterConstraintVisibilityError(symbolAccesibilityResult) { var diagnosticMessage; switch (node.parent.kind) { - case 184 /* ClassDeclaration */: + case 187 /* ClassDeclaration */: diagnosticMessage = symbolAccesibilityResult.errorModuleName ? ts.Diagnostics.Type_parameter_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Type_parameter_0_of_exported_class_has_or_is_using_private_name_1; break; - case 185 /* InterfaceDeclaration */: + case 188 /* InterfaceDeclaration */: diagnosticMessage = symbolAccesibilityResult.errorModuleName ? ts.Diagnostics.Type_parameter_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1; break; case 130 /* ConstructSignature */: @@ -8426,14 +8569,14 @@ var ts; if (node.parent.flags & 128 /* Static */) { diagnosticMessage = symbolAccesibilityResult.errorModuleName ? ts.Diagnostics.Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1; } - else if (node.parent.parent.kind === 184 /* ClassDeclaration */) { + else if (node.parent.parent.kind === 187 /* ClassDeclaration */) { diagnosticMessage = symbolAccesibilityResult.errorModuleName ? ts.Diagnostics.Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1; } else { diagnosticMessage = symbolAccesibilityResult.errorModuleName ? ts.Diagnostics.Type_parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1; } break; - case 182 /* FunctionDeclaration */: + case 185 /* FunctionDeclaration */: diagnosticMessage = symbolAccesibilityResult.errorModuleName ? ts.Diagnostics.Type_parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Type_parameter_0_of_exported_function_has_or_is_using_private_name_1; break; default: @@ -8471,7 +8614,7 @@ var ts; resolver.writeTypeAtLocation(node, enclosingDeclaration, 1 /* WriteArrayAsGenericType */ | 2 /* UseTypeOfFunction */, writer); function getHeritageClauseVisibilityError(symbolAccesibilityResult) { var diagnosticMessage; - if (node.parent.kind === 184 /* ClassDeclaration */) { + if (node.parent.kind === 187 /* ClassDeclaration */) { if (symbolAccesibilityResult.errorModuleName) { diagnosticMessage = isImplementsList ? ts.Diagnostics.Implements_clause_of_exported_class_0_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Extends_clause_of_exported_class_0_has_or_is_using_name_1_from_private_module_2; } @@ -8556,7 +8699,7 @@ var ts; writeLine(); } function emitVariableDeclaration(node) { - if (node.kind !== 181 /* VariableDeclaration */ || resolver.isDeclarationVisible(node)) { + if (node.kind !== 184 /* VariableDeclaration */ || resolver.isDeclarationVisible(node)) { emitSourceTextOfNode(node.name); if (node.kind === 124 /* Property */ && (node.flags & 4 /* QuestionMark */)) { write("?"); @@ -8569,14 +8712,14 @@ var ts; } function getVariableDeclarationTypeVisibilityError(symbolAccesibilityResult) { var diagnosticMessage; - if (node.kind === 181 /* VariableDeclaration */) { + if (node.kind === 184 /* VariableDeclaration */) { diagnosticMessage = symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 /* CannotBeNamed */ ? ts.Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : ts.Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Exported_variable_0_has_or_is_using_private_name_1; } else if (node.kind === 124 /* Property */) { if (node.flags & 128 /* Static */) { diagnosticMessage = symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 /* CannotBeNamed */ ? ts.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : ts.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1; } - else if (node.parent.kind === 184 /* ClassDeclaration */) { + else if (node.parent.kind === 187 /* ClassDeclaration */) { diagnosticMessage = symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 /* CannotBeNamed */ ? ts.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : ts.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_private_name_1; } else { @@ -8655,10 +8798,10 @@ var ts; } } function emitFunctionDeclaration(node) { - if ((node.kind !== 182 /* FunctionDeclaration */ || resolver.isDeclarationVisible(node)) && !resolver.isImplementationOfOverload(node)) { + if ((node.kind !== 185 /* FunctionDeclaration */ || resolver.isDeclarationVisible(node)) && !resolver.isImplementationOfOverload(node)) { emitJsDocComments(node); emitDeclarationFlags(node); - if (node.kind === 182 /* FunctionDeclaration */) { + if (node.kind === 185 /* FunctionDeclaration */) { write("function "); emitSourceTextOfNode(node.name); } @@ -8720,14 +8863,14 @@ var ts; if (node.flags & 128 /* Static */) { diagnosticMessage = symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 /* CannotBeNamed */ ? ts.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : ts.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0; } - else if (node.parent.kind === 184 /* ClassDeclaration */) { + else if (node.parent.kind === 187 /* ClassDeclaration */) { diagnosticMessage = symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 /* CannotBeNamed */ ? ts.Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : ts.Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0; } else { diagnosticMessage = symbolAccesibilityResult.errorModuleName ? ts.Diagnostics.Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0; } break; - case 182 /* FunctionDeclaration */: + case 185 /* FunctionDeclaration */: diagnosticMessage = symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 /* CannotBeNamed */ ? ts.Diagnostics.Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : ts.Diagnostics.Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_exported_function_has_or_is_using_private_name_0; break; default: @@ -8771,14 +8914,14 @@ var ts; if (node.parent.flags & 128 /* Static */) { diagnosticMessage = symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 /* CannotBeNamed */ ? ts.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : ts.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1; } - else if (node.parent.parent.kind === 184 /* ClassDeclaration */) { + else if (node.parent.parent.kind === 187 /* ClassDeclaration */) { diagnosticMessage = symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 /* CannotBeNamed */ ? ts.Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : ts.Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1; } else { diagnosticMessage = symbolAccesibilityResult.errorModuleName ? ts.Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1; } break; - case 182 /* FunctionDeclaration */: + case 185 /* FunctionDeclaration */: diagnosticMessage = symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 /* CannotBeNamed */ ? ts.Diagnostics.Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : ts.Diagnostics.Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_exported_function_has_or_is_using_private_name_1; break; default: @@ -8794,7 +8937,7 @@ var ts; function emitNode(node) { switch (node.kind) { case 126 /* Constructor */: - case 182 /* FunctionDeclaration */: + case 185 /* FunctionDeclaration */: case 125 /* Method */: return emitFunctionDeclaration(node); case 130 /* ConstructSignature */: @@ -8805,27 +8948,27 @@ var ts; case 127 /* GetAccessor */: case 128 /* SetAccessor */: return emitAccessorDeclaration(node); - case 159 /* VariableStatement */: + case 162 /* VariableStatement */: return emitVariableStatement(node); case 124 /* Property */: return emitPropertyDeclaration(node); - case 185 /* InterfaceDeclaration */: + case 188 /* InterfaceDeclaration */: return emitInterfaceDeclaration(node); - case 184 /* ClassDeclaration */: + case 187 /* ClassDeclaration */: return emitClassDeclaration(node); - case 186 /* TypeAliasDeclaration */: + case 189 /* TypeAliasDeclaration */: return emitTypeAliasDeclaration(node); - case 192 /* EnumMember */: + case 195 /* EnumMember */: return emitEnumMemberDeclaration(node); - case 187 /* EnumDeclaration */: + case 190 /* EnumDeclaration */: return emitEnumDeclaration(node); - case 188 /* ModuleDeclaration */: + case 191 /* ModuleDeclaration */: return emitModuleDeclaration(node); - case 190 /* ImportDeclaration */: + case 193 /* ImportDeclaration */: return emitImportDeclaration(node); - case 191 /* ExportAssignment */: + case 194 /* ExportAssignment */: return emitExportAssignment(node); - case 193 /* SourceFile */: + case 196 /* SourceFile */: return emitSourceFile(node); } } @@ -8887,9 +9030,9 @@ var ts; } } var hasSemanticErrors = resolver.hasSemanticErrors(); - var hasEarlyErrors = resolver.hasEarlyErrors(targetSourceFile); + var isEmitBlocked = resolver.isEmitBlocked(targetSourceFile); function emitFile(jsFilePath, sourceFile) { - if (!hasEarlyErrors) { + if (!isEmitBlocked) { emitJavaScript(jsFilePath, sourceFile); if (!hasSemanticErrors && compilerOptions.declaration) { emitDeclarations(jsFilePath, sourceFile); @@ -8919,25 +9062,25 @@ var ts; diagnostics.sort(ts.compareDiagnostics); diagnostics = ts.deduplicateSortedDiagnostics(diagnostics); var hasEmitterError = ts.forEach(diagnostics, function (diagnostic) { return diagnostic.category === 1 /* Error */; }); - var returnCode; - if (hasEarlyErrors) { - returnCode = 1 /* AllOutputGenerationSkipped */; + var emitResultStatus; + if (isEmitBlocked) { + emitResultStatus = 1 /* AllOutputGenerationSkipped */; } else if (hasEmitterError) { - returnCode = 4 /* EmitErrorsEncountered */; + emitResultStatus = 4 /* EmitErrorsEncountered */; } else if (hasSemanticErrors && compilerOptions.declaration) { - returnCode = 3 /* DeclarationGenerationSkipped */; + emitResultStatus = 3 /* DeclarationGenerationSkipped */; } else if (hasSemanticErrors && !compilerOptions.declaration) { - returnCode = 2 /* JSGeneratedWithSemanticErrors */; + emitResultStatus = 2 /* JSGeneratedWithSemanticErrors */; } else { - returnCode = 0 /* Succeeded */; + emitResultStatus = 0 /* Succeeded */; } return { - emitResultStatus: returnCode, - errors: diagnostics, + emitResultStatus: emitResultStatus, + diagnostics: diagnostics, sourceMaps: sourceMapDataList }; } @@ -8996,16 +9139,18 @@ var ts; var compilerOptions = program.getCompilerOptions(); var checker = { getProgram: function () { return program; }, - getDiagnostics: getDiagnostics, - getGlobalDiagnostics: getGlobalDiagnostics, getNodeCount: function () { return ts.sum(program.getSourceFiles(), "nodeCount"); }, getIdentifierCount: function () { return ts.sum(program.getSourceFiles(), "identifierCount"); }, getSymbolCount: function () { return ts.sum(program.getSourceFiles(), "symbolCount"); }, getTypeCount: function () { return typeCount; }, + isUndefinedSymbol: function (symbol) { return symbol === undefinedSymbol; }, + isArgumentsSymbol: function (symbol) { return symbol === argumentsSymbol; }, + getDiagnostics: getDiagnostics, + getGlobalDiagnostics: getGlobalDiagnostics, checkProgram: checkProgram, - emitFiles: invokeEmitter, + invokeEmitter: invokeEmitter, getParentOfSymbol: getParentOfSymbol, - getTypeOfSymbol: getTypeOfSymbol, + getNarrowedTypeOfSymbol: getNarrowedTypeOfSymbol, getDeclaredTypeOfSymbol: getDeclaredTypeOfSymbol, getPropertiesOfType: getPropertiesOfType, getPropertyOfType: getPropertyOfType, @@ -9014,6 +9159,7 @@ var ts; getReturnTypeOfSignature: getReturnTypeOfSignature, getSymbolsInScope: getSymbolsInScope, getSymbolInfo: getSymbolInfo, + getShorthandAssignmentValueSymbol: getShorthandAssignmentValueSymbol, getTypeOfNode: getTypeOfNode, typeToString: typeToString, getSymbolDisplayBuilder: getSymbolDisplayBuilder, @@ -9028,9 +9174,8 @@ var ts; getSignatureFromDeclaration: getSignatureFromDeclaration, isImplementationOfOverload: isImplementationOfOverload, getAliasedSymbol: resolveImport, - isUndefinedSymbol: function (symbol) { return symbol === undefinedSymbol; }, - isArgumentsSymbol: function (symbol) { return symbol === argumentsSymbol; }, - hasEarlyErrors: hasEarlyErrors + hasEarlyErrors: hasEarlyErrors, + isEmitBlocked: isEmitBlocked }; var undefinedSymbol = createSymbol(4 /* Property */ | 268435456 /* Transient */, "undefined"); var argumentsSymbol = createSymbol(4 /* Property */ | 268435456 /* Transient */, "arguments"); @@ -9060,6 +9205,7 @@ var ts; var globalNumberType; var globalBooleanType; var globalRegExpType; + var globalTemplateStringsArrayType; var tupleTypes = {}; var unionTypes = {}; var stringLiteralTypes = {}; @@ -9208,10 +9354,10 @@ var ts; return nodeLinks[node.id] || (nodeLinks[node.id] = {}); } function getSourceFile(node) { - return ts.getAncestor(node, 193 /* SourceFile */); + return ts.getAncestor(node, 196 /* SourceFile */); } function isGlobalSourceFile(node) { - return node.kind === 193 /* SourceFile */ && !ts.isExternalModule(node); + return node.kind === 196 /* SourceFile */ && !ts.isExternalModule(node); } function getSymbol(symbols, name, meaning) { if (meaning && ts.hasProperty(symbols, name)) { @@ -9252,21 +9398,21 @@ var ts; } } switch (location.kind) { - case 193 /* SourceFile */: + case 196 /* SourceFile */: if (!ts.isExternalModule(location)) break; - case 188 /* ModuleDeclaration */: + case 191 /* ModuleDeclaration */: if (result = getSymbol(getSymbolOfNode(location).exports, name, meaning & 35653619 /* ModuleMember */)) { break loop; } break; - case 187 /* EnumDeclaration */: + case 190 /* EnumDeclaration */: if (result = getSymbol(getSymbolOfNode(location).exports, name, meaning & 8 /* EnumMember */)) { break loop; } break; case 124 /* Property */: - if (location.parent.kind === 184 /* ClassDeclaration */ && !(location.flags & 128 /* Static */)) { + if (location.parent.kind === 187 /* ClassDeclaration */ && !(location.flags & 128 /* Static */)) { var ctor = findConstructorDeclaration(location.parent); if (ctor && ctor.locals) { if (getSymbol(ctor.locals, name, meaning & 107455 /* Value */)) { @@ -9275,8 +9421,8 @@ var ts; } } break; - case 184 /* ClassDeclaration */: - case 185 /* InterfaceDeclaration */: + case 187 /* ClassDeclaration */: + case 188 /* InterfaceDeclaration */: if (result = getSymbol(getSymbolOfNode(location).members, name, meaning & 3152352 /* Type */)) { if (lastLocation && lastLocation.flags & 128 /* Static */) { error(errorLocation, ts.Diagnostics.Static_members_cannot_reference_class_type_parameters); @@ -9289,14 +9435,14 @@ var ts; case 126 /* Constructor */: case 127 /* GetAccessor */: case 128 /* SetAccessor */: - case 182 /* FunctionDeclaration */: - case 150 /* ArrowFunction */: + case 185 /* FunctionDeclaration */: + case 153 /* ArrowFunction */: if (name === "arguments") { result = argumentsSymbol; break loop; } break; - case 149 /* FunctionExpression */: + case 152 /* FunctionExpression */: if (name === "arguments") { result = argumentsSymbol; break loop; @@ -9307,7 +9453,7 @@ var ts; break loop; } break; - case 178 /* CatchBlock */: + case 181 /* CatchBlock */: var id = location.variable; if (name === id.text) { result = location.symbol; @@ -9323,21 +9469,21 @@ var ts; } if (!result) { if (nameNotFoundMessage) { - error(errorLocation, nameNotFoundMessage, typeof nameArg === "string" ? nameArg : ts.identifierToString(nameArg)); + error(errorLocation, nameNotFoundMessage, typeof nameArg === "string" ? nameArg : ts.declarationNameToString(nameArg)); } return undefined; } if (nameNotFoundMessage) { if (propertyWithInvalidInitializer) { var propertyName = propertyWithInvalidInitializer.name; - error(errorLocation, ts.Diagnostics.Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor, ts.identifierToString(propertyName), typeof nameArg === "string" ? nameArg : ts.identifierToString(nameArg)); + error(errorLocation, ts.Diagnostics.Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor, ts.declarationNameToString(propertyName), typeof nameArg === "string" ? nameArg : ts.declarationNameToString(nameArg)); return undefined; } if (result.flags & 2 /* BlockScopedVariable */) { var declaration = ts.forEach(result.declarations, function (d) { return d.flags & 6144 /* BlockScoped */ ? d : undefined; }); ts.Debug.assert(declaration !== undefined, "Block-scoped variable declaration is undefined"); if (!isDefinedBefore(declaration, errorLocation)) { - error(errorLocation, ts.Diagnostics.Block_scoped_variable_0_used_before_its_declaration, ts.identifierToString(declaration.name)); + error(errorLocation, ts.Diagnostics.Block_scoped_variable_0_used_before_its_declaration, ts.declarationNameToString(declaration.name)); } } } @@ -9348,7 +9494,7 @@ var ts; var links = getSymbolLinks(symbol); if (!links.target) { links.target = resolvingSymbol; - var node = getDeclarationOfKind(symbol, 190 /* ImportDeclaration */); + var node = getDeclarationOfKind(symbol, 193 /* ImportDeclaration */); var target = node.externalModuleName ? resolveExternalModuleName(node, node.externalModuleName) : getSymbolOfPartOfRightHandSideOfImport(node.entityName, node); if (links.target === resolvingSymbol) { links.target = target || unknownSymbol; @@ -9364,7 +9510,7 @@ var ts; } function getSymbolOfPartOfRightHandSideOfImport(entityName, importDeclaration) { if (!importDeclaration) { - importDeclaration = ts.getAncestor(entityName, 190 /* ImportDeclaration */); + importDeclaration = ts.getAncestor(entityName, 193 /* ImportDeclaration */); ts.Debug.assert(importDeclaration !== undefined); } if (entityName.kind === 63 /* Identifier */ && isRightSideOfQualifiedNameOrPropertyAccess(entityName)) { @@ -9374,7 +9520,7 @@ var ts; return resolveEntityName(importDeclaration, entityName, 1536 /* Namespace */); } else { - ts.Debug.assert(entityName.parent.kind === 190 /* ImportDeclaration */); + ts.Debug.assert(entityName.parent.kind === 193 /* ImportDeclaration */); return resolveEntityName(importDeclaration, entityName, 107455 /* Value */ | 3152352 /* Type */ | 1536 /* Namespace */); } } @@ -9394,7 +9540,7 @@ var ts; return; var symbol = getSymbol(namespace.exports, name.right.text, meaning); if (!symbol) { - error(location, ts.Diagnostics.Module_0_has_no_exported_member_1, getFullyQualifiedName(namespace), ts.identifierToString(name.right)); + error(location, ts.Diagnostics.Module_0_has_no_exported_member_1, getFullyQualifiedName(namespace), ts.declarationNameToString(name.right)); return; } } @@ -9479,9 +9625,9 @@ var ts; var seenExportedMember = false; var result = []; ts.forEach(symbol.declarations, function (declaration) { - var block = (declaration.kind === 193 /* SourceFile */ ? declaration : declaration.body); + var block = (declaration.kind === 196 /* SourceFile */ ? declaration : declaration.body); ts.forEach(block.statements, function (node) { - if (node.kind === 191 /* ExportAssignment */) { + if (node.kind === 194 /* ExportAssignment */) { result.push(node); } else { @@ -9588,17 +9734,17 @@ var ts; } } switch (location.kind) { - case 193 /* SourceFile */: + case 196 /* SourceFile */: if (!ts.isExternalModule(location)) { break; } - case 188 /* ModuleDeclaration */: + case 191 /* ModuleDeclaration */: if (result = callback(getSymbolOfNode(location).exports)) { return result; } break; - case 184 /* ClassDeclaration */: - case 185 /* InterfaceDeclaration */: + case 187 /* ClassDeclaration */: + case 188 /* InterfaceDeclaration */: if (result = callback(getSymbolOfNode(location).members)) { return result; } @@ -9629,7 +9775,7 @@ var ts; } return ts.forEachValue(symbols, function (symbolFromSymbolTable) { if (symbolFromSymbolTable.flags & 33554432 /* Import */) { - if (!useOnlyExternalAliasing || ts.forEach(symbolFromSymbolTable.declarations, function (declaration) { return declaration.kind === 190 /* ImportDeclaration */ && declaration.externalModuleName; })) { + if (!useOnlyExternalAliasing || ts.forEach(symbolFromSymbolTable.declarations, function (declaration) { return declaration.kind === 193 /* ImportDeclaration */ && declaration.externalModuleName; })) { var resolvedImportedSymbol = resolveImport(symbolFromSymbolTable); if (isAccessible(symbolFromSymbolTable, resolveImport(symbolFromSymbolTable))) { return [symbolFromSymbolTable]; @@ -9711,7 +9857,7 @@ var ts; } } function hasExternalModuleSymbol(declaration) { - return (declaration.kind === 188 /* ModuleDeclaration */ && declaration.name.kind === 7 /* StringLiteral */) || (declaration.kind === 193 /* SourceFile */ && ts.isExternalModule(declaration)); + return (declaration.kind === 191 /* ModuleDeclaration */ && declaration.name.kind === 7 /* StringLiteral */) || (declaration.kind === 196 /* SourceFile */ && ts.isExternalModule(declaration)); } function hasVisibleDeclarations(symbol) { var aliasesToMakeVisible; @@ -9721,7 +9867,7 @@ var ts; return { aliasesToMakeVisible: aliasesToMakeVisible }; function getIsDeclarationVisible(declaration) { if (!isDeclarationVisible(declaration)) { - if (declaration.kind === 190 /* ImportDeclaration */ && !(declaration.flags & 1 /* Export */) && isDeclarationVisible(declaration.parent)) { + if (declaration.kind === 193 /* ImportDeclaration */ && !(declaration.flags & 1 /* Export */) && isDeclarationVisible(declaration.parent)) { getNodeLinks(declaration).isVisible = true; if (aliasesToMakeVisible) { if (!ts.contains(aliasesToMakeVisible, declaration)) { @@ -9742,7 +9888,7 @@ var ts; var firstIdentifier = getFirstIdentifier(entityName); var symbolOfNameSpace = resolveName(entityName.parent, firstIdentifier.text, 1536 /* Namespace */, ts.Diagnostics.Cannot_find_name_0, firstIdentifier); var hasNamespaceDeclarationsVisibile = hasVisibleDeclarations(symbolOfNameSpace); - return hasNamespaceDeclarationsVisibile ? { accessibility: 0 /* Accessible */, aliasesToMakeVisible: hasNamespaceDeclarationsVisibile.aliasesToMakeVisible } : { accessibility: 1 /* NotAccessible */, errorSymbolName: ts.identifierToString(firstIdentifier) }; + return hasNamespaceDeclarationsVisibile ? { accessibility: 0 /* Accessible */, aliasesToMakeVisible: hasNamespaceDeclarationsVisibile.aliasesToMakeVisible } : { accessibility: 1 /* NotAccessible */, errorSymbolName: ts.declarationNameToString(firstIdentifier) }; } function releaseStringWriter(writer) { writer.clear(); @@ -9781,10 +9927,10 @@ var ts; function getTypeAliasForTypeLiteral(type) { if (type.symbol && type.symbol.flags & 2048 /* TypeLiteral */) { var node = type.symbol.declarations[0].parent; - while (node.kind === 138 /* ParenType */) { + while (node.kind === 140 /* ParenType */) { node = node.parent; } - if (node.kind === 186 /* TypeAliasDeclaration */) { + if (node.kind === 189 /* TypeAliasDeclaration */) { return getSymbolOfNode(node); } } @@ -9796,7 +9942,7 @@ var ts; if (symbol.declarations && symbol.declarations.length > 0) { var declaration = symbol.declarations[0]; if (declaration.name) { - writer.writeSymbol(ts.identifierToString(declaration.name), symbol); + writer.writeSymbol(ts.declarationNameToString(declaration.name), symbol); return; } } @@ -9947,7 +10093,7 @@ var ts; function shouldWriteTypeOfFunctionSymbol() { if (type.symbol) { var isStaticMethodSymbol = !!(type.symbol.flags & 8192 /* Method */ && ts.forEach(type.symbol.declarations, function (declaration) { return declaration.flags & 128 /* Static */; })); - var isNonLocalFunctionSymbol = !!(type.symbol.flags & 16 /* Function */) && (type.symbol.parent || ts.forEach(type.symbol.declarations, function (declaration) { return declaration.parent.kind === 193 /* SourceFile */ || declaration.parent.kind === 189 /* ModuleBlock */; })); + var isNonLocalFunctionSymbol = !!(type.symbol.flags & 16 /* Function */) && (type.symbol.parent || ts.forEach(type.symbol.declarations, function (declaration) { return declaration.parent.kind === 196 /* SourceFile */ || declaration.parent.kind === 192 /* ModuleBlock */; })); if (isStaticMethodSymbol || isNonLocalFunctionSymbol) { return !!(flags & 2 /* UseTypeOfFunction */) || (typeStack && ts.contains(typeStack, type)); } @@ -10166,12 +10312,12 @@ var ts; function isDeclarationVisible(node) { function getContainingExternalModule(node) { for (; node; node = node.parent) { - if (node.kind === 188 /* ModuleDeclaration */) { + if (node.kind === 191 /* ModuleDeclaration */) { if (node.name.kind === 7 /* StringLiteral */) { return node; } } - else if (node.kind === 193 /* SourceFile */) { + else if (node.kind === 196 /* SourceFile */) { return ts.isExternalModule(node) ? node : undefined; } } @@ -10213,16 +10359,16 @@ var ts; } function determineIfDeclarationIsVisible() { switch (node.kind) { - case 181 /* VariableDeclaration */: - case 188 /* ModuleDeclaration */: - case 184 /* ClassDeclaration */: - case 185 /* InterfaceDeclaration */: - case 186 /* TypeAliasDeclaration */: - case 182 /* FunctionDeclaration */: - case 187 /* EnumDeclaration */: - case 190 /* ImportDeclaration */: - var parent = node.kind === 181 /* VariableDeclaration */ ? node.parent.parent : node.parent; - if (!(node.flags & 1 /* Export */) && !(node.kind !== 190 /* ImportDeclaration */ && parent.kind !== 193 /* SourceFile */ && ts.isInAmbientContext(parent))) { + case 184 /* VariableDeclaration */: + case 191 /* ModuleDeclaration */: + case 187 /* ClassDeclaration */: + case 188 /* InterfaceDeclaration */: + case 189 /* TypeAliasDeclaration */: + case 185 /* FunctionDeclaration */: + case 190 /* EnumDeclaration */: + case 193 /* ImportDeclaration */: + var parent = node.kind === 184 /* VariableDeclaration */ ? node.parent.parent : node.parent; + if (!(node.flags & 1 /* Export */) && !(node.kind !== 193 /* ImportDeclaration */ && parent.kind !== 196 /* SourceFile */ && ts.isInAmbientContext(parent))) { return isGlobalSourceFile(parent) || isUsedInExportAssignment(node); } return isDeclarationVisible(parent); @@ -10236,9 +10382,9 @@ var ts; case 129 /* CallSignature */: case 131 /* IndexSignature */: case 123 /* Parameter */: - case 189 /* ModuleBlock */: + case 192 /* ModuleBlock */: return isDeclarationVisible(node.parent); - case 193 /* SourceFile */: + case 196 /* SourceFile */: return true; default: ts.Debug.fail("isDeclarationVisible unknown: SyntaxKind: " + node.kind); @@ -10256,8 +10402,8 @@ var ts; var classType = getDeclaredTypeOfSymbol(prototype.parent); return classType.typeParameters ? createTypeReference(classType, ts.map(classType.typeParameters, function (_) { return anyType; })) : classType; } - function getTypeOfVariableDeclaration(declaration) { - if (declaration.parent.kind === 166 /* ForInStatement */) { + function getTypeOfVariableOrPropertyDeclaration(declaration) { + if (declaration.parent.kind === 169 /* ForInStatement */) { return anyType; } if (declaration.type) { @@ -10278,7 +10424,7 @@ var ts; } if (declaration.initializer) { var type = checkAndMarkExpression(declaration.initializer); - if (declaration.kind !== 141 /* PropertyAssignment */) { + if (declaration.kind !== 143 /* PropertyAssignment */) { var unwidenedType = type; type = getWidenedType(type); if (type !== unwidenedType) { @@ -10287,6 +10433,10 @@ var ts; } return type; } + if (declaration.kind === 144 /* ShorthandPropertyAssignment */) { + var type = checkIdentifier(declaration.name); + return type; + } var type = declaration.flags & 8 /* Rest */ ? createArrayType(anyType) : anyType; checkImplicitAny(type); return type; @@ -10310,7 +10460,7 @@ var ts; default: var diagnostic = ts.Diagnostics.Variable_0_implicitly_has_an_1_type; } - error(declaration, diagnostic, ts.identifierToString(declaration.name), typeToString(type)); + error(declaration, diagnostic, ts.declarationNameToString(declaration.name), typeToString(type)); } } function getTypeOfVariableOrParameterOrProperty(symbol) { @@ -10320,11 +10470,11 @@ var ts; return links.type = getTypeOfPrototypeProperty(symbol); } var declaration = symbol.valueDeclaration; - if (declaration.kind === 178 /* CatchBlock */) { + if (declaration.kind === 181 /* CatchBlock */) { return links.type = anyType; } links.type = resolvingType; - var type = getTypeOfVariableDeclaration(declaration); + var type = getTypeOfVariableOrPropertyDeclaration(declaration); if (links.type === resolvingType) { links.type = type; } @@ -10460,7 +10610,7 @@ var ts; function getTypeParametersOfClassOrInterface(symbol) { var result; ts.forEach(symbol.declarations, function (node) { - if (node.kind === 185 /* InterfaceDeclaration */ || node.kind === 184 /* ClassDeclaration */) { + if (node.kind === 188 /* InterfaceDeclaration */ || node.kind === 187 /* ClassDeclaration */) { var declaration = node; if (declaration.typeParameters && declaration.typeParameters.length) { ts.forEach(declaration.typeParameters, function (node) { @@ -10491,7 +10641,7 @@ var ts; type.typeArguments = type.typeParameters; } type.baseTypes = []; - var declaration = getDeclarationOfKind(symbol, 184 /* ClassDeclaration */); + var declaration = getDeclarationOfKind(symbol, 187 /* ClassDeclaration */); if (declaration.baseType) { var baseType = getTypeFromTypeReferenceNode(declaration.baseType); if (baseType !== unknownType) { @@ -10531,7 +10681,7 @@ var ts; } type.baseTypes = []; ts.forEach(symbol.declarations, function (declaration) { - if (declaration.kind === 185 /* InterfaceDeclaration */ && declaration.baseTypes) { + if (declaration.kind === 188 /* InterfaceDeclaration */ && declaration.baseTypes) { ts.forEach(declaration.baseTypes, function (node) { var baseType = getTypeFromTypeReferenceNode(node); if (baseType !== unknownType) { @@ -10562,7 +10712,7 @@ var ts; var links = getSymbolLinks(symbol); if (!links.declaredType) { links.declaredType = resolvingType; - var declaration = getDeclarationOfKind(symbol, 186 /* TypeAliasDeclaration */); + var declaration = getDeclarationOfKind(symbol, 189 /* TypeAliasDeclaration */); var type = getTypeFromTypeNode(declaration.type); if (links.declaredType === resolvingType) { links.declaredType = type; @@ -10570,7 +10720,7 @@ var ts; } else if (links.declaredType === resolvingType) { links.declaredType = unknownType; - var declaration = getDeclarationOfKind(symbol, 186 /* TypeAliasDeclaration */); + var declaration = getDeclarationOfKind(symbol, 189 /* TypeAliasDeclaration */); error(declaration.name, ts.Diagnostics.Type_alias_0_circularly_references_itself, symbolToString(symbol)); } return links.declaredType; @@ -11039,7 +11189,9 @@ var ts; for (var i = 0, len = symbol.declarations.length; i < len; i++) { var node = symbol.declarations[i]; switch (node.kind) { - case 182 /* FunctionDeclaration */: + case 133 /* FunctionType */: + case 134 /* ConstructorType */: + case 185 /* FunctionDeclaration */: case 125 /* Method */: case 126 /* Constructor */: case 129 /* CallSignature */: @@ -11047,8 +11199,8 @@ var ts; case 131 /* IndexSignature */: case 127 /* GetAccessor */: case 128 /* SetAccessor */: - case 149 /* FunctionExpression */: - case 150 /* ArrowFunction */: + case 152 /* FunctionExpression */: + case 153 /* ArrowFunction */: if (i > 0 && node.body) { var previous = symbol.declarations[i - 1]; if (node.parent === previous.parent && node.kind === previous.kind && node.pos === previous.end) { @@ -11081,7 +11233,7 @@ var ts; if (compilerOptions.noImplicitAny) { var declaration = signature.declaration; if (declaration.name) { - error(declaration.name, ts.Diagnostics._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions, ts.identifierToString(declaration.name)); + error(declaration.name, ts.Diagnostics._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions, ts.declarationNameToString(declaration.name)); } else { error(declaration, ts.Diagnostics.Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions); @@ -11269,9 +11421,9 @@ var ts; for (var i = 0; i < declarations.length; i++) { var declaration = declarations[i]; switch (declaration.kind) { - case 184 /* ClassDeclaration */: - case 185 /* InterfaceDeclaration */: - case 187 /* EnumDeclaration */: + case 187 /* ClassDeclaration */: + case 188 /* InterfaceDeclaration */: + case 190 /* EnumDeclaration */: return declaration; } } @@ -11411,7 +11563,7 @@ var ts; } return links.resolvedType; } - function getTypeFromTypeLiteralNode(node) { + function getTypeFromTypeLiteralOrFunctionOrConstructorTypeNode(node) { var links = getNodeLinks(node); if (!links.resolvedType) { links.resolvedType = createObjectType(32768 /* Anonymous */, node.symbol); @@ -11448,18 +11600,20 @@ var ts; return getTypeFromStringLiteral(node); case 132 /* TypeReference */: return getTypeFromTypeReferenceNode(node); - case 133 /* TypeQuery */: + case 135 /* TypeQuery */: return getTypeFromTypeQueryNode(node); - case 135 /* ArrayType */: + case 137 /* ArrayType */: return getTypeFromArrayTypeNode(node); - case 136 /* TupleType */: + case 138 /* TupleType */: return getTypeFromTupleTypeNode(node); - case 137 /* UnionType */: + case 139 /* UnionType */: return getTypeFromUnionTypeNode(node); - case 138 /* ParenType */: + case 140 /* ParenType */: return getTypeFromTypeNode(node.type); - case 134 /* TypeLiteral */: - return getTypeFromTypeLiteralNode(node); + case 133 /* FunctionType */: + case 134 /* ConstructorType */: + case 136 /* TypeLiteral */: + return getTypeFromTypeLiteralOrFunctionOrConstructorTypeNode(node); case 63 /* Identifier */: case 121 /* QualifiedName */: var symbol = getSymbolInfo(node); @@ -11606,16 +11760,16 @@ var ts; } function isContextSensitiveExpression(node) { switch (node.kind) { - case 149 /* FunctionExpression */: - case 150 /* ArrowFunction */: + case 152 /* FunctionExpression */: + case 153 /* ArrowFunction */: return !node.typeParameters && !ts.forEach(node.parameters, function (p) { return p.type; }); - case 140 /* ObjectLiteral */: - return ts.forEach(node.properties, function (p) { return p.kind === 141 /* PropertyAssignment */ && isContextSensitiveExpression(p.initializer); }); - case 139 /* ArrayLiteral */: + case 142 /* ObjectLiteral */: + return ts.forEach(node.properties, function (p) { return p.kind === 143 /* PropertyAssignment */ && isContextSensitiveExpression(p.initializer); }); + case 141 /* ArrayLiteral */: return ts.forEach(node.elements, function (e) { return isContextSensitiveExpression(e); }); - case 154 /* ConditionalExpression */: + case 157 /* ConditionalExpression */: return isContextSensitiveExpression(node.whenTrue) || isContextSensitiveExpression(node.whenFalse); - case 153 /* BinaryExpression */: + case 156 /* BinaryExpression */: return node.operator === 48 /* BarBarToken */ && (isContextSensitiveExpression(node.left) || isContextSensitiveExpression(node.right)); } return false; @@ -11664,6 +11818,7 @@ var ts; var errorInfo; var sourceStack; var targetStack; + var maybeStack; var expandingFlags; var depth = 0; var overflow = false; @@ -11808,11 +11963,11 @@ var ts; var id = source.id + "," + target.id; var related = relation[id]; if (related !== undefined) { - return related; + return related ? -1 /* True */ : 0 /* False */; } if (depth > 0) { for (var i = 0; i < depth; i++) { - if (source === sourceStack[i] && target === targetStack[i]) { + if (maybeStack[i][id]) { return 1 /* Maybe */; } } @@ -11824,10 +11979,13 @@ var ts; else { sourceStack = []; targetStack = []; + maybeStack = []; expandingFlags = 0; } sourceStack[depth] = source; targetStack[depth] = target; + maybeStack[depth] = {}; + maybeStack[depth][id] = true; depth++; var saveExpandingFlags = expandingFlags; if (!(expandingFlags & 1) && isDeeplyNestedGeneric(source, sourceStack)) @@ -11835,7 +11993,7 @@ var ts; if (!(expandingFlags & 2) && isDeeplyNestedGeneric(target, targetStack)) expandingFlags |= 2; if (expandingFlags === 3) { - var result = -1 /* True */; + var result = 1 /* Maybe */; } else { var result = propertiesRelatedTo(source, target, reportErrors); @@ -11854,8 +12012,15 @@ var ts; } expandingFlags = saveExpandingFlags; depth--; - if (result !== 1 /* Maybe */) { - relation[id] = result; + if (result) { + var maybeCache = maybeStack[depth]; + var destinationCache = result === -1 /* True */ || depth === 0 ? relation : maybeStack[depth - 1]; + for (var p in maybeCache) { + destinationCache[p] = maybeCache[p]; + } + } + else { + relation[id] = false; } return result; } @@ -12334,8 +12499,9 @@ var ts; } function createInferenceContext(typeParameters, inferUnionTypes) { var inferences = []; - for (var i = 0; i < typeParameters.length; i++) - inferences.push([]); + for (var i = 0; i < typeParameters.length; i++) { + inferences.push({ primary: undefined, secondary: undefined }); + } return { typeParameters: typeParameters, inferUnionTypes: inferUnionTypes, @@ -12348,6 +12514,7 @@ var ts; var sourceStack; var targetStack; var depth = 0; + var inferiority = 0; inferFromTypes(source, target); function isInProcess(source, target) { for (var i = 0; i < depth; i++) { @@ -12374,10 +12541,10 @@ var ts; var typeParameters = context.typeParameters; for (var i = 0; i < typeParameters.length; i++) { if (target === typeParameters[i]) { - context.inferenceCount++; var inferences = context.inferences[i]; - if (!ts.contains(inferences, source)) - inferences.push(source); + var candidates = inferiority ? inferences.secondary || (inferences.secondary = []) : inferences.primary || (inferences.primary = []); + if (!ts.contains(candidates, source)) + candidates.push(source); break; } } @@ -12391,7 +12558,6 @@ var ts; } else if (target.flags & 16384 /* Union */) { var targetTypes = target.types; - var startCount = context.inferenceCount; var typeParameterCount = 0; var typeParameter; for (var i = 0; i < targetTypes.length; i++) { @@ -12404,8 +12570,10 @@ var ts; inferFromTypes(source, t); } } - if (context.inferenceCount === startCount && typeParameterCount === 1) { + if (typeParameterCount === 1) { + inferiority++; inferFromTypes(source, typeParameter); + inferiority--; } } else if (source.flags & 16384 /* Union */) { @@ -12467,10 +12635,14 @@ var ts; } } } + function getInferenceCandidates(context, index) { + var inferences = context.inferences[index]; + return inferences.primary || inferences.secondary || emptyArray; + } function getInferredType(context, index) { var inferredType = context.inferredTypes[index]; if (!inferredType) { - var inferences = context.inferences[index]; + var inferences = getInferenceCandidates(context, index); if (inferences.length) { var unionOrSuperType = context.inferUnionTypes ? getUnionType(inferences) : getCommonSupertype(inferences); inferredType = unionOrSuperType ? getWidenedType(unionOrSuperType) : inferenceFailureType; @@ -12505,7 +12677,7 @@ var ts; function isInTypeQuery(node) { while (node) { switch (node.kind) { - case 133 /* TypeQuery */: + case 135 /* TypeQuery */: return true; case 63 /* Identifier */: case 121 /* QualifiedName */: @@ -12541,7 +12713,7 @@ var ts; function isAssignedInBinaryExpression(node) { if (node.operator >= 51 /* FirstAssignment */ && node.operator <= 62 /* LastAssignment */) { var n = node.left; - while (n.kind === 148 /* ParenExpression */) { + while (n.kind === 151 /* ParenExpression */) { n = n.expression; } if (n.kind === 63 /* Identifier */ && getResolvedSymbol(n) === symbol) { @@ -12558,40 +12730,40 @@ var ts; } function isAssignedIn(node) { switch (node.kind) { - case 153 /* BinaryExpression */: + case 156 /* BinaryExpression */: return isAssignedInBinaryExpression(node); - case 181 /* VariableDeclaration */: + case 184 /* VariableDeclaration */: return isAssignedInVariableDeclaration(node); - case 139 /* ArrayLiteral */: - case 140 /* ObjectLiteral */: - case 142 /* PropertyAccess */: - case 143 /* IndexedAccess */: - case 144 /* CallExpression */: - case 145 /* NewExpression */: - case 147 /* TypeAssertion */: - case 148 /* ParenExpression */: - case 151 /* PrefixOperator */: - case 152 /* PostfixOperator */: - case 154 /* ConditionalExpression */: - case 158 /* Block */: - case 159 /* VariableStatement */: - case 161 /* ExpressionStatement */: - case 162 /* IfStatement */: - case 163 /* DoStatement */: - case 164 /* WhileStatement */: - case 165 /* ForStatement */: - case 166 /* ForInStatement */: - case 169 /* ReturnStatement */: - case 170 /* WithStatement */: - case 171 /* SwitchStatement */: - case 172 /* CaseClause */: - case 173 /* DefaultClause */: - case 174 /* LabeledStatement */: - case 175 /* ThrowStatement */: - case 176 /* TryStatement */: - case 177 /* TryBlock */: - case 178 /* CatchBlock */: - case 179 /* FinallyBlock */: + case 141 /* ArrayLiteral */: + case 142 /* ObjectLiteral */: + case 145 /* PropertyAccess */: + case 146 /* IndexedAccess */: + case 147 /* CallExpression */: + case 148 /* NewExpression */: + case 150 /* TypeAssertion */: + case 151 /* ParenExpression */: + case 154 /* PrefixOperator */: + case 155 /* PostfixOperator */: + case 157 /* ConditionalExpression */: + case 161 /* Block */: + case 162 /* VariableStatement */: + case 164 /* ExpressionStatement */: + case 165 /* IfStatement */: + case 166 /* DoStatement */: + case 167 /* WhileStatement */: + case 168 /* ForStatement */: + case 169 /* ForInStatement */: + case 172 /* ReturnStatement */: + case 173 /* WithStatement */: + case 174 /* SwitchStatement */: + case 175 /* CaseClause */: + case 176 /* DefaultClause */: + case 177 /* LabeledStatement */: + case 178 /* ThrowStatement */: + case 179 /* TryStatement */: + case 180 /* TryBlock */: + case 181 /* CatchBlock */: + case 182 /* FinallyBlock */: return ts.forEachChild(node, isAssignedIn); } return false; @@ -12599,26 +12771,23 @@ var ts; } function getNarrowedTypeOfSymbol(symbol, node) { var type = getTypeOfSymbol(symbol); - if (symbol.flags & 3 /* Variable */ && type.flags & 65025 /* Structured */) { - while (true) { + if (node && (symbol.flags & 3 /* Variable */ && type.flags & 65025 /* Structured */)) { + loop: while (true) { var child = node; node = node.parent; - if (!node || node.kind === 183 /* FunctionBlock */ || node.kind === 189 /* ModuleBlock */) { - break; - } var narrowedType = type; switch (node.kind) { - case 162 /* IfStatement */: + case 165 /* IfStatement */: if (child !== node.expression) { narrowedType = narrowType(type, node.expression, child === node.thenStatement); } break; - case 154 /* ConditionalExpression */: + case 157 /* ConditionalExpression */: if (child !== node.condition) { narrowedType = narrowType(type, node.condition, child === node.whenTrue); } break; - case 153 /* BinaryExpression */: + case 156 /* BinaryExpression */: if (child === node.right) { if (node.operator === 47 /* AmpersandAmpersandToken */) { narrowedType = narrowType(type, node.left, true); @@ -12628,8 +12797,16 @@ var ts; } } break; + case 196 /* SourceFile */: + case 191 /* ModuleDeclaration */: + case 185 /* FunctionDeclaration */: + case 125 /* Method */: + case 127 /* GetAccessor */: + case 128 /* SetAccessor */: + case 126 /* Constructor */: + break loop; } - if (narrowedType !== type) { + if (narrowedType !== type && isTypeSubtypeOf(narrowedType, type)) { if (isVariableAssignedWithin(symbol, node)) { break; } @@ -12641,7 +12818,7 @@ var ts; function narrowTypeByEquality(type, expr, assumeTrue) { var left = expr.left; var right = expr.right; - if (left.kind !== 151 /* PrefixOperator */ || left.operator !== 95 /* TypeOfKeyword */ || left.operand.kind !== 63 /* Identifier */ || right.kind !== 7 /* StringLiteral */ || getResolvedSymbol(left.operand) !== symbol) { + if (left.kind !== 154 /* PrefixOperator */ || left.operator !== 95 /* TypeOfKeyword */ || left.operand.kind !== 63 /* Identifier */ || right.kind !== 7 /* StringLiteral */ || getResolvedSymbol(left.operand) !== symbol) { return type; } var t = right.text; @@ -12695,9 +12872,9 @@ var ts; } function narrowType(type, expr, assumeTrue) { switch (expr.kind) { - case 148 /* ParenExpression */: + case 151 /* ParenExpression */: return narrowType(type, expr.expression, assumeTrue); - case 153 /* BinaryExpression */: + case 156 /* BinaryExpression */: var operator = expr.operator; if (operator === 29 /* EqualsEqualsEqualsToken */ || operator === 30 /* ExclamationEqualsEqualsToken */) { return narrowTypeByEquality(type, expr, assumeTrue); @@ -12712,7 +12889,7 @@ var ts; return narrowTypeByInstanceof(type, expr, assumeTrue); } break; - case 151 /* PrefixOperator */: + case 154 /* PrefixOperator */: if (expr.operator === 45 /* ExclamationToken */) { return narrowType(type, expr.operand, !assumeTrue); } @@ -12724,7 +12901,7 @@ var ts; function checkIdentifier(node) { var symbol = getResolvedSymbol(node); if (symbol.flags & 33554432 /* Import */) { - getSymbolLinks(symbol).referenced = !isInTypeQuery(node) && !isConstEnumOrConstEnumOnlyModule(resolveImport(symbol)); + getSymbolLinks(symbol).referenced = getSymbolLinks(symbol).referenced || (!isInTypeQuery(node) && !isConstEnumOrConstEnumOnlyModule(resolveImport(symbol))); } checkCollisionWithCapturedSuperVariable(node, node); checkCollisionWithCapturedThisVariable(node, node); @@ -12732,7 +12909,7 @@ var ts; return getNarrowedTypeOfSymbol(getExportSymbolOfValueSymbolIfExported(symbol), node); } function captureLexicalThis(node, container) { - var classNode = container.parent && container.parent.kind === 184 /* ClassDeclaration */ ? container.parent : undefined; + var classNode = container.parent && container.parent.kind === 187 /* ClassDeclaration */ ? container.parent : undefined; getNodeLinks(node).flags |= 2 /* LexicalThis */; if (container.kind === 124 /* Property */ || container.kind === 126 /* Constructor */) { getNodeLinks(classNode).flags |= 4 /* CaptureThis */; @@ -12744,15 +12921,15 @@ var ts; function checkThisExpression(node) { var container = ts.getThisContainer(node, true); var needToCaptureLexicalThis = false; - if (container.kind === 150 /* ArrowFunction */) { + if (container.kind === 153 /* ArrowFunction */) { container = ts.getThisContainer(container, false); needToCaptureLexicalThis = true; } switch (container.kind) { - case 188 /* ModuleDeclaration */: + case 191 /* ModuleDeclaration */: error(node, ts.Diagnostics.this_cannot_be_referenced_in_a_module_body); break; - case 187 /* EnumDeclaration */: + case 190 /* EnumDeclaration */: error(node, ts.Diagnostics.this_cannot_be_referenced_in_current_location); break; case 126 /* Constructor */: @@ -12769,7 +12946,7 @@ var ts; if (needToCaptureLexicalThis) { captureLexicalThis(node, container); } - var classNode = container.parent && container.parent.kind === 184 /* ClassDeclaration */ ? container.parent : undefined; + var classNode = container.parent && container.parent.kind === 187 /* ClassDeclaration */ ? container.parent : undefined; if (classNode) { var symbol = getSymbolOfNode(classNode); return container.flags & 128 /* Static */ ? getTypeOfSymbol(symbol) : getDeclaredTypeOfSymbol(symbol); @@ -12782,9 +12959,9 @@ var ts; if (!node) return node; switch (node.kind) { - case 182 /* FunctionDeclaration */: - case 149 /* FunctionExpression */: - case 150 /* ArrowFunction */: + case 185 /* FunctionDeclaration */: + case 152 /* FunctionExpression */: + case 153 /* ArrowFunction */: case 124 /* Property */: case 125 /* Method */: case 126 /* Constructor */: @@ -12803,8 +12980,8 @@ var ts; return false; } function checkSuperExpression(node) { - var isCallExpression = node.parent.kind === 144 /* CallExpression */ && node.parent.func === node; - var enclosingClass = ts.getAncestor(node, 184 /* ClassDeclaration */); + var isCallExpression = node.parent.kind === 147 /* CallExpression */ && node.parent.func === node; + var enclosingClass = ts.getAncestor(node, 187 /* ClassDeclaration */); var baseClass; if (enclosingClass && enclosingClass.baseType) { var classType = getDeclaredTypeOfSymbol(getSymbolOfNode(enclosingClass)); @@ -12822,11 +12999,11 @@ var ts; } else { var needToCaptureLexicalThis = false; - while (container && container.kind === 150 /* ArrowFunction */) { + while (container && container.kind === 153 /* ArrowFunction */) { container = getSuperContainer(container); needToCaptureLexicalThis = true; } - if (container && container.parent && container.parent.kind === 184 /* ClassDeclaration */) { + if (container && container.parent && container.parent.kind === 187 /* ClassDeclaration */) { if (container.flags & 128 /* Static */) { canUseSuperExpression = container.kind === 125 /* Method */ || container.kind === 127 /* GetAccessor */ || container.kind === 128 /* SetAccessor */; } @@ -12865,7 +13042,7 @@ var ts; } function getContextuallyTypedParameterType(parameter) { var func = parameter.parent; - if (func.kind === 149 /* FunctionExpression */ || func.kind === 150 /* ArrowFunction */) { + if (func.kind === 152 /* FunctionExpression */ || func.kind === 153 /* ArrowFunction */) { if (isContextSensitiveExpression(func)) { var contextualSignature = getContextualSignature(func); if (contextualSignature) { @@ -13004,25 +13181,25 @@ var ts; } var parent = node.parent; switch (parent.kind) { - case 181 /* VariableDeclaration */: + case 184 /* VariableDeclaration */: case 123 /* Parameter */: case 124 /* Property */: return getContextualTypeForInitializerExpression(node); - case 150 /* ArrowFunction */: - case 169 /* ReturnStatement */: + case 153 /* ArrowFunction */: + case 172 /* ReturnStatement */: return getContextualTypeForReturnExpression(node); - case 144 /* CallExpression */: - case 145 /* NewExpression */: + case 147 /* CallExpression */: + case 148 /* NewExpression */: return getContextualTypeForArgument(node); - case 147 /* TypeAssertion */: + case 150 /* TypeAssertion */: return getTypeFromTypeNode(parent.type); - case 153 /* BinaryExpression */: + case 156 /* BinaryExpression */: return getContextualTypeForBinaryOperand(node); - case 141 /* PropertyAssignment */: + case 143 /* PropertyAssignment */: return getContextualTypeForPropertyExpression(node); - case 139 /* ArrayLiteral */: + case 141 /* ArrayLiteral */: return getContextualTypeForElementExpression(node); - case 154 /* ConditionalExpression */: + case 157 /* ConditionalExpression */: return getContextualTypeForConditionalOperand(node); } return undefined; @@ -13044,19 +13221,31 @@ var ts; if (!(type.flags & 16384 /* Union */)) { return getNonGenericSignature(type); } - var result; + var signatureList; var types = type.types; for (var i = 0; i < types.length; i++) { + if (signatureList && getSignaturesOfObjectOrUnionType(types[i], 0 /* Call */).length > 1) { + return undefined; + } var signature = getNonGenericSignature(types[i]); if (signature) { - if (!result) { - result = signature; + if (!signatureList) { + signatureList = [signature]; } - else if (!compareSignatures(result, signature, true, compareTypes)) { + else if (!compareSignatures(signatureList[0], signature, false, compareTypes)) { return undefined; } + else { + signatureList.push(signature); + } } } + var result; + if (signatureList) { + result = cloneSignature(signatureList[0]); + result.resolvedReturnType = undefined; + result.unionSignatures = signatureList; + } return result; } function isInferentialContext(mapper) { @@ -13085,7 +13274,15 @@ var ts; if (ts.hasProperty(members, id)) { var member = members[id]; if (member.flags & 4 /* Property */) { - var type = checkExpression(member.declarations[0].initializer, contextualMapper); + var memberDecl = member.declarations[0]; + var type; + if (memberDecl.kind === 143 /* PropertyAssignment */) { + type = checkExpression(memberDecl.initializer, contextualMapper); + } + else { + ts.Debug.assert(memberDecl.kind === 144 /* ShorthandPropertyAssignment */); + type = checkExpression(memberDecl.name, contextualMapper); + } var prop = createSymbol(4 /* Property */ | 268435456 /* Transient */ | member.flags, member.name); prop.declarations = member.declarations; prop.parent = member.parent; @@ -13140,7 +13337,7 @@ var ts; if (!(flags & (32 /* Private */ | 64 /* Protected */))) { return; } - var enclosingClassDeclaration = ts.getAncestor(node, 184 /* ClassDeclaration */); + var enclosingClassDeclaration = ts.getAncestor(node, 187 /* ClassDeclaration */); var enclosingClass = enclosingClassDeclaration ? getDeclaredTypeOfSymbol(getSymbolOfNode(enclosingClassDeclaration)) : undefined; var declaringClass = getDeclaredTypeOfSymbol(prop.parent); if (flags & 32 /* Private */) { @@ -13175,7 +13372,7 @@ var ts; var prop = getPropertyOfType(apparentType, node.right.text); if (!prop) { if (node.right.text) { - error(node.right, ts.Diagnostics.Property_0_does_not_exist_on_type_1, ts.identifierToString(node.right), typeToString(type)); + error(node.right, ts.Diagnostics.Property_0_does_not_exist_on_type_1, ts.declarationNameToString(node.right), typeToString(type)); } return unknownType; } @@ -13245,29 +13442,64 @@ var ts; return unknownType; } function resolveUntypedCall(node) { - ts.forEach(node.arguments, function (argument) { - checkExpression(argument); - }); + if (node.kind === 149 /* TaggedTemplateExpression */) { + checkExpression(node.template); + } + else { + ts.forEach(node.arguments, function (argument) { + checkExpression(argument); + }); + } return anySignature; } function resolveErrorCall(node) { resolveUntypedCall(node); return unknownSignature; } - function signatureHasCorrectArity(node, signature) { - if (!node.arguments) { - return signature.minArgumentCount === 0; + function hasCorrectArity(node, args, signature) { + var adjustedArgCount; + var typeArguments; + var callIsIncomplete; + if (node.kind === 149 /* TaggedTemplateExpression */) { + var tagExpression = node; + adjustedArgCount = args.length; + typeArguments = undefined; + if (tagExpression.template.kind === 158 /* TemplateExpression */) { + var templateExpression = tagExpression.template; + var lastSpan = ts.lastOrUndefined(templateExpression.templateSpans); + ts.Debug.assert(lastSpan !== undefined); + callIsIncomplete = lastSpan.literal.kind === 120 /* Missing */ || ts.isUnterminatedTemplateEnd(lastSpan.literal); + } + else { + var templateLiteral = tagExpression.template; + ts.Debug.assert(templateLiteral.kind === 9 /* NoSubstitutionTemplateLiteral */); + callIsIncomplete = ts.isUnterminatedTemplateEnd(templateLiteral); + } } - var args = node.arguments; - var numberOfArgs = args.hasTrailingComma ? args.length + 1 : args.length; - var hasTooManyArguments = !signature.hasRestParameter && numberOfArgs > signature.parameters.length; - var hasRightNumberOfTypeArguments = !node.typeArguments || (signature.typeParameters && node.typeArguments.length === signature.typeParameters.length); - if (hasTooManyArguments || !hasRightNumberOfTypeArguments) { - return false; + else { + var callExpression = node; + if (!callExpression.arguments) { + ts.Debug.assert(callExpression.kind === 148 /* NewExpression */); + return signature.minArgumentCount === 0; + } + adjustedArgCount = callExpression.arguments.hasTrailingComma ? args.length + 1 : args.length; + callIsIncomplete = callExpression.arguments.end === callExpression.end; + typeArguments = callExpression.typeArguments; + } + ts.Debug.assert(adjustedArgCount !== undefined, "'adjustedArgCount' undefined"); + ts.Debug.assert(callIsIncomplete !== undefined, "'callIsIncomplete' undefined"); + return checkArity(adjustedArgCount, typeArguments, callIsIncomplete, signature); + function checkArity(adjustedArgCount, typeArguments, callIsIncomplete, signature) { + if (!signature.hasRestParameter && adjustedArgCount > signature.parameters.length) { + return false; + } + var hasRightNumberOfTypeArgs = !typeArguments || (signature.typeParameters && typeArguments.length === signature.typeParameters.length); + if (!hasRightNumberOfTypeArgs) { + return false; + } + var hasEnoughArguments = adjustedArgCount >= signature.minArgumentCount; + return callIsIncomplete || hasEnoughArguments; } - var callIsIncomplete = args.end === node.end; - var hasEnoughArguments = numberOfArgs >= signature.minArgumentCount; - return callIsIncomplete || hasEnoughArguments; } function getSingleCallSignature(type) { if (type.flags & 48128 /* ObjectType */) { @@ -13290,17 +13522,21 @@ var ts; var context = createInferenceContext(typeParameters, false); var mapper = createInferenceMapper(context); for (var i = 0; i < args.length; i++) { - if (args[i].kind === 157 /* OmittedExpression */) { + if (args[i].kind === 160 /* OmittedExpression */) { continue; } if (!excludeArgument || excludeArgument[i] === undefined) { var parameterType = getTypeAtPosition(signature, i); + if (i === 0 && args[i].parent.kind === 149 /* TaggedTemplateExpression */) { + inferTypes(context, globalTemplateStringsArrayType, parameterType); + continue; + } inferTypes(context, checkExpressionWithContextualType(args[i], parameterType, mapper), parameterType); } } if (excludeArgument) { for (var i = 0; i < args.length; i++) { - if (args[i].kind === 157 /* OmittedExpression */) { + if (args[i].kind === 160 /* OmittedExpression */) { continue; } if (excludeArgument[i] === false) { @@ -13334,37 +13570,60 @@ var ts; } return typeArgumentsAreAssignable; } - function checkApplicableSignature(node, signature, relation, excludeArgument, reportErrors) { - if (node.arguments) { - for (var i = 0; i < node.arguments.length; i++) { - var arg = node.arguments[i]; - if (arg.kind === 157 /* OmittedExpression */) { - continue; - } - var paramType = getTypeAtPosition(signature, i); - var argType = arg.kind === 7 /* StringLiteral */ && !reportErrors ? getStringLiteralType(arg) : checkExpressionWithContextualType(arg, paramType, excludeArgument && excludeArgument[i] ? identityMapper : undefined); - var isValidArgument = checkTypeRelatedTo(argType, paramType, relation, reportErrors ? arg : undefined, ts.Diagnostics.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1); - if (!isValidArgument) { - return false; - } + function checkApplicableSignature(node, args, signature, relation, excludeArgument, reportErrors) { + for (var i = 0; i < args.length; i++) { + var arg = args[i]; + var argType; + if (arg.kind === 160 /* OmittedExpression */) { + continue; + } + var paramType = getTypeAtPosition(signature, i); + if (i === 0 && node.kind === 149 /* TaggedTemplateExpression */) { + argType = globalTemplateStringsArrayType; + } + else { + argType = arg.kind === 7 /* StringLiteral */ && !reportErrors ? getStringLiteralType(arg) : checkExpressionWithContextualType(arg, paramType, excludeArgument && excludeArgument[i] ? identityMapper : undefined); + } + var isValidArgument = checkTypeRelatedTo(argType, paramType, relation, reportErrors ? arg : undefined, ts.Diagnostics.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1); + if (!isValidArgument) { + return false; } } return true; } + function getEffectiveCallArguments(node) { + var args; + if (node.kind === 149 /* TaggedTemplateExpression */) { + var template = node.template; + args = [template]; + if (template.kind === 158 /* TemplateExpression */) { + ts.forEach(template.templateSpans, function (span) { + args.push(span.expression); + }); + } + } + else { + args = node.arguments || emptyArray; + } + return args; + } function resolveCall(node, signatures, candidatesOutArray) { - ts.forEach(node.typeArguments, checkSourceElement); + var isTaggedTemplate = node.kind === 149 /* TaggedTemplateExpression */; + var typeArguments = isTaggedTemplate ? undefined : node.typeArguments; + ts.forEach(typeArguments, checkSourceElement); var candidates = candidatesOutArray || []; collectCandidates(); if (!candidates.length) { error(node, ts.Diagnostics.Supplied_parameters_do_not_match_any_signature_of_call_target); return resolveErrorCall(node); } - var args = node.arguments || emptyArray; + var args = getEffectiveCallArguments(node); var excludeArgument; - for (var i = 0; i < args.length; i++) { + for (var i = isTaggedTemplate ? 1 : 0; i < args.length; i++) { if (isContextSensitiveExpression(args[i])) { - if (!excludeArgument) + if (!excludeArgument) { excludeArgument = new Array(args.length); + } excludeArgument[i] = true; } } @@ -13373,30 +13632,30 @@ var ts; var resultOfFailedInference; var result; if (candidates.length > 1) { - result = chooseOverload(candidates, subtypeRelation, excludeArgument); + result = chooseOverload(candidates, subtypeRelation); } if (!result) { candidateForArgumentError = undefined; candidateForTypeArgumentError = undefined; resultOfFailedInference = undefined; - result = chooseOverload(candidates, assignableRelation, excludeArgument); + result = chooseOverload(candidates, assignableRelation); } if (result) { return result; } if (candidateForArgumentError) { - checkApplicableSignature(node, candidateForArgumentError, assignableRelation, undefined, true); + checkApplicableSignature(node, args, candidateForArgumentError, assignableRelation, undefined, true); } else if (candidateForTypeArgumentError) { - if (node.typeArguments) { + if (!isTaggedTemplate && node.typeArguments) { checkTypeArguments(candidateForTypeArgumentError, node.typeArguments, [], true); } else { ts.Debug.assert(resultOfFailedInference.failedTypeParameterIndex >= 0); var failedTypeParameter = candidateForTypeArgumentError.typeParameters[resultOfFailedInference.failedTypeParameterIndex]; - var inferenceCandidates = resultOfFailedInference.inferences[resultOfFailedInference.failedTypeParameterIndex]; + var inferenceCandidates = getInferenceCandidates(resultOfFailedInference, resultOfFailedInference.failedTypeParameterIndex); var diagnosticChainHead = ts.chainDiagnosticMessages(undefined, ts.Diagnostics.The_type_argument_for_type_parameter_0_cannot_be_inferred_from_the_usage_Consider_specifying_the_type_arguments_explicitly, typeToString(failedTypeParameter)); - reportNoCommonSupertypeError(inferenceCandidates, node.func, diagnosticChainHead); + reportNoCommonSupertypeError(inferenceCandidates, node.func || node.tag, diagnosticChainHead); } } else { @@ -13404,15 +13663,15 @@ var ts; } if (!fullTypeCheck) { for (var i = 0, n = candidates.length; i < n; i++) { - if (signatureHasCorrectArity(node, candidates[i])) { + if (hasCorrectArity(node, args, candidates[i])) { return candidates[i]; } } } return resolveErrorCall(node); - function chooseOverload(candidates, relation, excludeArgument) { + function chooseOverload(candidates, relation) { for (var i = 0; i < candidates.length; i++) { - if (!signatureHasCorrectArity(node, candidates[i])) { + if (!hasCorrectArity(node, args, candidates[i])) { continue; } var originalCandidate = candidates[i]; @@ -13422,9 +13681,9 @@ var ts; if (candidate.typeParameters) { var typeArgumentTypes; var typeArgumentsAreValid; - if (node.typeArguments) { + if (typeArguments) { typeArgumentTypes = new Array(candidate.typeParameters.length); - typeArgumentsAreValid = checkTypeArguments(candidate, node.typeArguments, typeArgumentTypes, false); + typeArgumentsAreValid = checkTypeArguments(candidate, typeArguments, typeArgumentTypes, false); } else { inferenceResult = inferTypeArguments(candidate, args, excludeArgument); @@ -13436,7 +13695,7 @@ var ts; } candidate = getSignatureInstantiation(candidate, typeArgumentTypes); } - if (!checkApplicableSignature(node, candidate, relation, excludeArgument, false)) { + if (!checkApplicableSignature(node, args, candidate, relation, excludeArgument, false)) { break; } var index = excludeArgument ? ts.indexOf(excludeArgument, true) : -1; @@ -13452,7 +13711,7 @@ var ts; } else { candidateForTypeArgumentError = originalCandidate; - if (!node.typeArguments) { + if (!typeArguments) { resultOfFailedInference = inferenceResult; } } @@ -13555,11 +13814,38 @@ var ts; error(node, ts.Diagnostics.Cannot_use_new_with_an_expression_whose_type_lacks_a_call_or_construct_signature); return resolveErrorCall(node); } + function resolveTaggedTemplateExpression(node, candidatesOutArray) { + var tagType = checkExpression(node.tag); + var apparentType = getApparentType(tagType); + if (apparentType === unknownType) { + return resolveErrorCall(node); + } + var callSignatures = getSignaturesOfType(apparentType, 0 /* Call */); + if (tagType === anyType || (!callSignatures.length && !(tagType.flags & 16384 /* Union */) && isTypeAssignableTo(tagType, globalFunctionType))) { + return resolveUntypedCall(node); + } + if (!callSignatures.length) { + error(node, ts.Diagnostics.Cannot_invoke_an_expression_whose_type_lacks_a_call_signature); + return resolveErrorCall(node); + } + return resolveCall(node, callSignatures, candidatesOutArray); + } function getResolvedSignature(node, candidatesOutArray) { var links = getNodeLinks(node); if (!links.resolvedSignature || candidatesOutArray) { links.resolvedSignature = anySignature; - links.resolvedSignature = node.kind === 144 /* CallExpression */ ? resolveCallExpression(node, candidatesOutArray) : resolveNewExpression(node, candidatesOutArray); + if (node.kind === 147 /* CallExpression */) { + links.resolvedSignature = resolveCallExpression(node, candidatesOutArray); + } + else if (node.kind === 148 /* NewExpression */) { + links.resolvedSignature = resolveNewExpression(node, candidatesOutArray); + } + else if (node.kind === 149 /* TaggedTemplateExpression */) { + links.resolvedSignature = resolveTaggedTemplateExpression(node, candidatesOutArray); + } + else { + ts.Debug.fail("Branch in 'getResolvedSignature' should be unreachable."); + } } return links.resolvedSignature; } @@ -13568,9 +13854,9 @@ var ts; if (node.func.kind === 89 /* SuperKeyword */) { return voidType; } - if (node.kind === 145 /* NewExpression */) { + if (node.kind === 148 /* NewExpression */) { var declaration = signature.declaration; - if (declaration && (declaration.kind !== 126 /* Constructor */ && declaration.kind !== 130 /* ConstructSignature */)) { + if (declaration && declaration.kind !== 126 /* Constructor */ && declaration.kind !== 130 /* ConstructSignature */ && declaration.kind !== 134 /* ConstructorType */) { if (compilerOptions.noImplicitAny) { error(node, ts.Diagnostics.new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type); } @@ -13580,9 +13866,7 @@ var ts; return getReturnTypeOfSignature(signature); } function checkTaggedTemplateExpression(node) { - checkExpression(node.tag); - checkExpression(node.template); - return anyType; + return getReturnTypeOfSignature(getResolvedSignature(node)); } function checkTypeAssertion(node) { var exprType = checkExpression(node.operand); @@ -13613,7 +13897,7 @@ var ts; } function getReturnTypeFromBody(func, contextualMapper) { var contextualSignature = getContextualSignature(func); - if (func.body.kind !== 183 /* FunctionBlock */) { + if (func.body.kind !== 186 /* FunctionBlock */) { var unwidenedType = checkAndMarkExpression(func.body, contextualMapper); var widenedType = getWidenedType(unwidenedType); if (fullTypeCheck && compilerOptions.noImplicitAny && !contextualSignature && widenedType !== unwidenedType && getInnermostTypeOfNestedArrayTypes(widenedType) === anyType) { @@ -13632,7 +13916,7 @@ var ts; if (fullTypeCheck && compilerOptions.noImplicitAny && !contextualSignature && widenedType !== commonType && getInnermostTypeOfNestedArrayTypes(widenedType) === anyType) { var typeName = typeToString(widenedType); if (func.name) { - error(func, ts.Diagnostics._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type, ts.identifierToString(func.name), typeName); + error(func, ts.Diagnostics._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type, ts.declarationNameToString(func.name), typeName); } else { error(func, ts.Diagnostics.Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type, typeName); @@ -13661,7 +13945,7 @@ var ts; }); } function bodyContainsSingleThrowStatement(body) { - return (body.statements.length === 1) && (body.statements[0].kind === 175 /* ThrowStatement */); + return (body.statements.length === 1) && (body.statements[0].kind === 178 /* ThrowStatement */); } function checkIfNonVoidFunctionHasReturnExpressionsOrSingleThrowStatment(func, returnType) { if (!fullTypeCheck) { @@ -13670,7 +13954,7 @@ var ts; if (returnType === voidType || returnType === anyType) { return; } - if (!func.body || func.body.kind !== 183 /* FunctionBlock */) { + if (!func.body || func.body.kind !== 186 /* FunctionBlock */) { return; } var bodyBlock = func.body; @@ -13714,7 +13998,7 @@ var ts; if (node.type) { checkIfNonVoidFunctionHasReturnExpressionsOrSingleThrowStatment(node, getTypeFromTypeNode(node.type)); } - if (node.body.kind === 183 /* FunctionBlock */) { + if (node.body.kind === 186 /* FunctionBlock */) { checkSourceElement(node.body); } else { @@ -13742,12 +14026,12 @@ var ts; case 63 /* Identifier */: var symbol = findSymbol(n); return !symbol || symbol === unknownSymbol || symbol === argumentsSymbol || (symbol.flags & 3 /* Variable */) !== 0; - case 142 /* PropertyAccess */: + case 145 /* PropertyAccess */: var symbol = findSymbol(n); return !symbol || symbol === unknownSymbol || (symbol.flags & ~8 /* EnumMember */) !== 0; - case 143 /* IndexedAccess */: + case 146 /* IndexedAccess */: return true; - case 148 /* ParenExpression */: + case 151 /* ParenExpression */: return isReferenceOrErrorExpression(n.expression); default: return false; @@ -13756,10 +14040,10 @@ var ts; function isConstVariableReference(n) { switch (n.kind) { case 63 /* Identifier */: - case 142 /* PropertyAccess */: + case 145 /* PropertyAccess */: var symbol = findSymbol(n); return symbol && (symbol.flags & 3 /* Variable */) !== 0 && (getDeclarationFlagsFromSymbol(symbol) & 4096 /* Const */) !== 0; - case 143 /* IndexedAccess */: + case 146 /* IndexedAccess */: var index = n.index; var symbol = findSymbol(n.object); if (symbol && index.kind === 7 /* StringLiteral */) { @@ -13768,7 +14052,7 @@ var ts; return prop && (prop.flags & 3 /* Variable */) !== 0 && (getDeclarationFlagsFromSymbol(prop) & 4096 /* Const */) !== 0; } return false; - case 148 /* ParenExpression */: + case 151 /* ParenExpression */: return isConstVariableReference(n.expression); default: return false; @@ -14003,7 +14287,7 @@ var ts; } } if (isConstEnumObjectType(type)) { - var ok = (node.parent.kind === 142 /* PropertyAccess */ && node.parent.left === node) || (node.parent.kind === 143 /* IndexedAccess */ && node.parent.object === node) || ((node.kind === 63 /* Identifier */ || node.kind === 121 /* QualifiedName */) && isInRightSideOfImportOrExportAssignment(node)); + var ok = (node.parent.kind === 145 /* PropertyAccess */ && node.parent.left === node) || (node.parent.kind === 146 /* IndexedAccess */ && node.parent.object === node) || ((node.kind === 63 /* Identifier */ || node.kind === 121 /* QualifiedName */) && isInRightSideOfImportOrExportAssignment(node)); if (!ok) { error(node, ts.Diagnostics.const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment); } @@ -14025,7 +14309,7 @@ var ts; return booleanType; case 6 /* NumericLiteral */: return numberType; - case 155 /* TemplateExpression */: + case 158 /* TemplateExpression */: return checkTemplateExpression(node); case 7 /* StringLiteral */: case 9 /* NoSubstitutionTemplateLiteral */: @@ -14034,35 +14318,35 @@ var ts; return globalRegExpType; case 121 /* QualifiedName */: return checkPropertyAccess(node); - case 139 /* ArrayLiteral */: + case 141 /* ArrayLiteral */: return checkArrayLiteral(node, contextualMapper); - case 140 /* ObjectLiteral */: + case 142 /* ObjectLiteral */: return checkObjectLiteral(node, contextualMapper); - case 142 /* PropertyAccess */: + case 145 /* PropertyAccess */: return checkPropertyAccess(node); - case 143 /* IndexedAccess */: + case 146 /* IndexedAccess */: return checkIndexedAccess(node); - case 144 /* CallExpression */: - case 145 /* NewExpression */: + case 147 /* CallExpression */: + case 148 /* NewExpression */: return checkCallExpression(node); - case 146 /* TaggedTemplateExpression */: + case 149 /* TaggedTemplateExpression */: return checkTaggedTemplateExpression(node); - case 147 /* TypeAssertion */: + case 150 /* TypeAssertion */: return checkTypeAssertion(node); - case 148 /* ParenExpression */: + case 151 /* ParenExpression */: return checkExpression(node.expression); - case 149 /* FunctionExpression */: - case 150 /* ArrowFunction */: + case 152 /* FunctionExpression */: + case 153 /* ArrowFunction */: return checkFunctionExpression(node, contextualMapper); - case 151 /* PrefixOperator */: + case 154 /* PrefixOperator */: return checkPrefixExpression(node); - case 152 /* PostfixOperator */: + case 155 /* PostfixOperator */: return checkPostfixExpression(node); - case 153 /* BinaryExpression */: + case 156 /* BinaryExpression */: return checkBinaryExpression(node, contextualMapper); - case 154 /* ConditionalExpression */: + case 157 /* ConditionalExpression */: return checkConditionalExpression(node, contextualMapper); - case 157 /* OmittedExpression */: + case 160 /* OmittedExpression */: return undefinedType; } return unknownType; @@ -14098,7 +14382,7 @@ var ts; if (referencedSymbol && referencedSymbol !== unknownSymbol && getSymbol(parameterDeclaration.parent.locals, referencedSymbol.name, 107455 /* Value */) === referencedSymbol) { if (referencedSymbol.valueDeclaration.kind === 123 /* Parameter */) { if (referencedSymbol.valueDeclaration === parameterDeclaration) { - error(n, ts.Diagnostics.Parameter_0_cannot_be_referenced_in_its_initializer, ts.identifierToString(parameterDeclaration.name)); + error(n, ts.Diagnostics.Parameter_0_cannot_be_referenced_in_its_initializer, ts.declarationNameToString(parameterDeclaration.name)); return; } var enclosingOrReferencedParameter = ts.forEach(parameterDeclaration.parent.parameters, function (p) { return p === parameterDeclaration || p === referencedSymbol.valueDeclaration ? p : undefined; }); @@ -14106,7 +14390,7 @@ var ts; return; } } - error(n, ts.Diagnostics.Initializer_of_parameter_0_cannot_reference_identifier_1_declared_after_it, ts.identifierToString(parameterDeclaration.name), ts.identifierToString(n)); + error(n, ts.Diagnostics.Initializer_of_parameter_0_cannot_reference_identifier_1_declared_after_it, ts.declarationNameToString(parameterDeclaration.name), ts.declarationNameToString(n)); } } else { @@ -14142,7 +14426,7 @@ var ts; checkSpecializedSignatureDeclaration(node); } function checkTypeForDuplicateIndexSignatures(node) { - if (node.kind === 185 /* InterfaceDeclaration */) { + if (node.kind === 188 /* InterfaceDeclaration */) { var nodeSymbol = getSymbolOfNode(node); if (nodeSymbol.declarations.length > 0 && nodeSymbol.declarations[0] !== node) { return; @@ -14198,17 +14482,17 @@ var ts; return; } function isSuperCallExpression(n) { - return n.kind === 144 /* CallExpression */ && n.func.kind === 89 /* SuperKeyword */; + return n.kind === 147 /* CallExpression */ && n.func.kind === 89 /* SuperKeyword */; } function containsSuperCall(n) { if (isSuperCallExpression(n)) { return true; } switch (n.kind) { - case 149 /* FunctionExpression */: - case 182 /* FunctionDeclaration */: - case 150 /* ArrowFunction */: - case 140 /* ObjectLiteral */: return false; + case 152 /* FunctionExpression */: + case 185 /* FunctionDeclaration */: + case 153 /* ArrowFunction */: + case 142 /* ObjectLiteral */: return false; default: return ts.forEachChild(n, containsSuperCall); } } @@ -14216,7 +14500,7 @@ var ts; if (n.kind === 91 /* ThisKeyword */) { error(n, ts.Diagnostics.this_cannot_be_referenced_in_current_location); } - else if (n.kind !== 149 /* FunctionExpression */ && n.kind !== 182 /* FunctionDeclaration */) { + else if (n.kind !== 152 /* FunctionExpression */ && n.kind !== 185 /* FunctionDeclaration */) { ts.forEachChild(n, markThisReferencesAsErrors); } } @@ -14228,7 +14512,7 @@ var ts; var superCallShouldBeFirst = ts.forEach(node.parent.members, isInstancePropertyWithInitializer) || ts.forEach(node.parameters, function (p) { return p.flags & (16 /* Public */ | 32 /* Private */ | 64 /* Protected */); }); if (superCallShouldBeFirst) { var statements = node.body.statements; - if (!statements.length || statements[0].kind !== 161 /* ExpressionStatement */ || !isSuperCallExpression(statements[0].expression)) { + if (!statements.length || statements[0].kind !== 164 /* ExpressionStatement */ || !isSuperCallExpression(statements[0].expression)) { error(node, ts.Diagnostics.A_super_call_must_be_the_first_statement_in_the_constructor_when_a_class_contains_initialized_properties_or_has_parameter_properties); } else { @@ -14286,7 +14570,7 @@ var ts; function checkTypeLiteral(node) { ts.forEach(node.members, checkSourceElement); if (fullTypeCheck) { - var type = getTypeFromTypeLiteralNode(node); + var type = getTypeFromTypeLiteralOrFunctionOrConstructorTypeNode(node); checkIndexConstraints(type); checkTypeForDuplicateIndexSignatures(node); } @@ -14315,9 +14599,8 @@ var ts; error(signatureDeclarationNode, ts.Diagnostics.A_signature_with_an_implementation_cannot_use_a_string_literal_type); return; } - var symbol = getSymbolOfNode(signatureDeclarationNode); var signaturesToCheck; - if (!signatureDeclarationNode.name && signatureDeclarationNode.parent && signatureDeclarationNode.parent.kind === 185 /* InterfaceDeclaration */) { + if (!signatureDeclarationNode.name && signatureDeclarationNode.parent && signatureDeclarationNode.parent.kind === 188 /* InterfaceDeclaration */) { ts.Debug.assert(signatureDeclarationNode.kind === 129 /* CallSignature */ || signatureDeclarationNode.kind === 130 /* ConstructSignature */); var signatureKind = signatureDeclarationNode.kind === 129 /* CallSignature */ ? 0 /* Call */ : 1 /* Construct */; var containingSymbol = getSymbolOfNode(signatureDeclarationNode.parent); @@ -14337,7 +14620,7 @@ var ts; } function getEffectiveDeclarationFlags(n, flagsToCheck) { var flags = n.flags; - if (n.parent.kind !== 185 /* InterfaceDeclaration */ && ts.isInAmbientContext(n)) { + if (n.parent.kind !== 188 /* InterfaceDeclaration */ && ts.isInAmbientContext(n)) { if (!(flags & 2 /* Ambient */)) { flags |= 1 /* Export */; } @@ -14404,7 +14687,7 @@ var ts; return; } else if (subsequentNode.body) { - error(errorNode, ts.Diagnostics.Function_implementation_name_must_be_0, ts.identifierToString(node.name)); + error(errorNode, ts.Diagnostics.Function_implementation_name_must_be_0, ts.declarationNameToString(node.name)); return; } } @@ -14423,11 +14706,11 @@ var ts; for (var i = 0; i < declarations.length; i++) { var node = declarations[i]; var inAmbientContext = ts.isInAmbientContext(node); - var inAmbientContextOrInterface = node.parent.kind === 185 /* InterfaceDeclaration */ || node.parent.kind === 134 /* TypeLiteral */ || inAmbientContext; + var inAmbientContextOrInterface = node.parent.kind === 188 /* InterfaceDeclaration */ || node.parent.kind === 136 /* TypeLiteral */ || inAmbientContext; if (inAmbientContextOrInterface) { previousDeclaration = undefined; } - if (node.kind === 182 /* FunctionDeclaration */ || node.kind === 125 /* Method */ || node.kind === 126 /* Constructor */) { + if (node.kind === 185 /* FunctionDeclaration */ || node.kind === 125 /* Method */ || node.kind === 126 /* Constructor */) { var currentNodeFlags = getEffectiveDeclarationFlags(node, flagsToCheck); someNodeFlags |= currentNodeFlags; allNodeFlags &= currentNodeFlags; @@ -14515,20 +14798,20 @@ var ts; if (commonDeclarationSpace) { ts.forEach(symbol.declarations, function (d) { if (getDeclarationSpaces(d) & commonDeclarationSpace) { - error(d.name, ts.Diagnostics.Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local, ts.identifierToString(d.name)); + error(d.name, ts.Diagnostics.Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local, ts.declarationNameToString(d.name)); } }); } function getDeclarationSpaces(d) { switch (d.kind) { - case 185 /* InterfaceDeclaration */: + case 188 /* InterfaceDeclaration */: return 8388608 /* ExportType */; - case 188 /* ModuleDeclaration */: + case 191 /* ModuleDeclaration */: return d.name.kind === 7 /* StringLiteral */ || ts.getModuleInstanceState(d) !== 0 /* NonInstantiated */ ? 16777216 /* ExportNamespace */ | 4194304 /* ExportValue */ : 16777216 /* ExportNamespace */; - case 184 /* ClassDeclaration */: - case 187 /* EnumDeclaration */: + case 187 /* ClassDeclaration */: + case 190 /* EnumDeclaration */: return 8388608 /* ExportType */ | 4194304 /* ExportValue */; - case 190 /* ImportDeclaration */: + case 193 /* ImportDeclaration */: var result = 0; var target = resolveImport(getSymbolOfNode(d)); ts.forEach(target.declarations, function (d) { @@ -14561,7 +14844,7 @@ var ts; if (!isPrivateWithinAmbient(node)) { var typeName = typeToString(anyType); if (node.name) { - error(node, ts.Diagnostics._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type, ts.identifierToString(node.name), typeName); + error(node, ts.Diagnostics._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type, ts.declarationNameToString(node.name), typeName); } else { error(node, ts.Diagnostics.Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type, typeName); @@ -14603,10 +14886,10 @@ var ts; return; } switch (current.kind) { - case 182 /* FunctionDeclaration */: - case 149 /* FunctionExpression */: + case 185 /* FunctionDeclaration */: + case 152 /* FunctionExpression */: case 125 /* Method */: - case 150 /* ArrowFunction */: + case 153 /* ArrowFunction */: case 126 /* Constructor */: if (ts.hasRestParameters(current)) { error(node, ts.Diagnostics.Expression_resolves_to_variable_declaration_i_that_compiler_uses_to_initialize_rest_parameter); @@ -14658,7 +14941,7 @@ var ts; if (!needCollisionCheckForIdentifier(node, name, "_super")) { return; } - var enclosingClass = ts.getAncestor(node, 184 /* ClassDeclaration */); + var enclosingClass = ts.getAncestor(node, 187 /* ClassDeclaration */); if (!enclosingClass || ts.isInAmbientContext(enclosingClass)) { return; } @@ -14676,12 +14959,12 @@ var ts; if (!needCollisionCheckForIdentifier(node, name, "require") && !needCollisionCheckForIdentifier(node, name, "exports")) { return; } - if (node.kind === 188 /* ModuleDeclaration */ && ts.getModuleInstanceState(node) !== 1 /* Instantiated */) { + if (node.kind === 191 /* ModuleDeclaration */ && ts.getModuleInstanceState(node) !== 1 /* Instantiated */) { return; } - var parent = node.kind === 181 /* VariableDeclaration */ ? node.parent.parent : node.parent; - if (parent.kind === 193 /* SourceFile */ && ts.isExternalModule(parent)) { - error(name, ts.Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_an_external_module, name.text, name.text); + var parent = node.kind === 184 /* VariableDeclaration */ ? node.parent.parent : node.parent; + if (parent.kind === 196 /* SourceFile */ && ts.isExternalModule(parent)) { + error(name, ts.Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_an_external_module, ts.declarationNameToString(name), ts.declarationNameToString(name)); } } function checkCollisionWithConstDeclarations(node) { @@ -14709,7 +14992,7 @@ var ts; type = typeOfValueDeclaration; } else { - type = getTypeOfVariableDeclaration(node); + type = getTypeOfVariableOrPropertyDeclaration(node); } if (node.initializer) { if (!(getNodeLinks(node.initializer).flags & 1 /* TypeChecked */)) { @@ -14722,7 +15005,7 @@ var ts; checkCollisionWithRequireExportsInGeneratedCode(node, node.name); if (!useTypeFromValueDeclaration) { if (typeOfValueDeclaration !== unknownType && type !== unknownType && !isTypeIdenticalTo(typeOfValueDeclaration, type)) { - error(node.name, ts.Diagnostics.Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2, ts.identifierToString(node.name), typeToString(typeOfValueDeclaration), typeToString(type)); + error(node.name, ts.Diagnostics.Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2, ts.declarationNameToString(node.name), typeToString(typeOfValueDeclaration), typeToString(type)); } } } @@ -14899,7 +15182,7 @@ var ts; if (fullTypeCheck) { for (var j = 0; j < i; j++) { if (typeParameterDeclarations[j].symbol === node.symbol) { - error(node.name, ts.Diagnostics.Duplicate_identifier_0, ts.identifierToString(node.name)); + error(node.name, ts.Diagnostics.Duplicate_identifier_0, ts.declarationNameToString(node.name)); } } } @@ -15068,7 +15351,7 @@ var ts; checkTypeNameIsReserved(node.name, ts.Diagnostics.Interface_name_cannot_be_0); checkExportsOnMergedDeclarations(node); var symbol = getSymbolOfNode(node); - var firstInterfaceDecl = getDeclarationOfKind(symbol, 185 /* InterfaceDeclaration */); + var firstInterfaceDecl = getDeclarationOfKind(symbol, 188 /* InterfaceDeclaration */); if (symbol.declarations.length > 1) { if (node !== firstInterfaceDecl && !areTypeParametersIdentical(firstInterfaceDecl.typeParameters, node.typeParameters)) { error(node.name, ts.Diagnostics.All_declarations_of_an_interface_must_have_identical_type_parameters); @@ -15139,7 +15422,7 @@ var ts; return evalConstant(initializer); function evalConstant(e) { switch (e.kind) { - case 151 /* PrefixOperator */: + case 154 /* PrefixOperator */: var value = evalConstant(e.operand); if (value === undefined) { return undefined; @@ -15150,7 +15433,7 @@ var ts; case 46 /* TildeToken */: return enumIsConst ? ~value : undefined; } return undefined; - case 153 /* BinaryExpression */: + case 156 /* BinaryExpression */: if (!enumIsConst) { return undefined; } @@ -15178,11 +15461,11 @@ var ts; return undefined; case 6 /* NumericLiteral */: return +e.text; - case 148 /* ParenExpression */: + case 151 /* ParenExpression */: return enumIsConst ? evalConstant(e.expression) : undefined; case 63 /* Identifier */: - case 143 /* IndexedAccess */: - case 142 /* PropertyAccess */: + case 146 /* IndexedAccess */: + case 145 /* PropertyAccess */: if (!enumIsConst) { return undefined; } @@ -15195,7 +15478,7 @@ var ts; propertyName = e.text; } else { - if (e.kind === 143 /* IndexedAccess */) { + if (e.kind === 146 /* IndexedAccess */) { if (e.index.kind !== 7 /* StringLiteral */) { return undefined; } @@ -15251,7 +15534,7 @@ var ts; } var seenEnumMissingInitialInitializer = false; ts.forEach(enumSymbol.declarations, function (declaration) { - if (declaration.kind !== 187 /* EnumDeclaration */) { + if (declaration.kind !== 190 /* EnumDeclaration */) { return false; } var enumDeclaration = declaration; @@ -15274,7 +15557,7 @@ var ts; var declarations = symbol.declarations; for (var i = 0; i < declarations.length; i++) { var declaration = declarations[i]; - if ((declaration.kind === 184 /* ClassDeclaration */ || (declaration.kind === 182 /* FunctionDeclaration */ && declaration.body)) && !ts.isInAmbientContext(declaration)) { + if ((declaration.kind === 187 /* ClassDeclaration */ || (declaration.kind === 185 /* FunctionDeclaration */ && declaration.body)) && !ts.isInAmbientContext(declaration)) { return declaration; } } @@ -15328,7 +15611,7 @@ var ts; checkExpression(node.entityName); } else { - error(moduleName, ts.Diagnostics.Module_0_is_hidden_by_a_local_declaration_with_the_same_name, ts.identifierToString(moduleName)); + error(moduleName, ts.Diagnostics.Module_0_is_hidden_by_a_local_declaration_with_the_same_name, ts.declarationNameToString(moduleName)); } } if (target.flags & 3152352 /* Type */) { @@ -15337,10 +15620,10 @@ var ts; } } else { - if (node.parent.kind === 193 /* SourceFile */) { + if (node.parent.kind === 196 /* SourceFile */) { target = resolveImport(symbol); } - else if (node.parent.kind === 189 /* ModuleBlock */ && node.parent.parent.name.kind === 7 /* StringLiteral */) { + else if (node.parent.kind === 192 /* ModuleBlock */ && node.parent.parent.name.kind === 7 /* StringLiteral */) { if (isExternalModuleNameRelative(node.externalModuleName.text)) { error(node, ts.Diagnostics.Import_declaration_in_an_ambient_external_module_declaration_cannot_reference_external_module_through_relative_external_module_name); target = unknownSymbol; @@ -15362,7 +15645,7 @@ var ts; } function checkExportAssignment(node) { var container = node.parent; - if (container.kind !== 193 /* SourceFile */) { + if (container.kind !== 196 /* SourceFile */) { container = container.parent; } checkTypeOfExportAssignmentSymbol(getSymbolOfNode(container)); @@ -15377,6 +15660,8 @@ var ts; return checkParameter(node); case 124 /* Property */: return checkPropertyDeclaration(node); + case 133 /* FunctionType */: + case 134 /* ConstructorType */: case 129 /* CallSignature */: case 130 /* ConstructSignature */: case 131 /* IndexSignature */: @@ -15390,76 +15675,76 @@ var ts; return checkAccessorDeclaration(node); case 132 /* TypeReference */: return checkTypeReference(node); - case 133 /* TypeQuery */: + case 135 /* TypeQuery */: return checkTypeQuery(node); - case 134 /* TypeLiteral */: + case 136 /* TypeLiteral */: return checkTypeLiteral(node); - case 135 /* ArrayType */: + case 137 /* ArrayType */: return checkArrayType(node); - case 136 /* TupleType */: + case 138 /* TupleType */: return checkTupleType(node); - case 137 /* UnionType */: + case 139 /* UnionType */: return checkUnionType(node); - case 138 /* ParenType */: + case 140 /* ParenType */: return checkSourceElement(node.type); - case 182 /* FunctionDeclaration */: + case 185 /* FunctionDeclaration */: return checkFunctionDeclaration(node); - case 158 /* Block */: + case 161 /* Block */: return checkBlock(node); - case 183 /* FunctionBlock */: - case 189 /* ModuleBlock */: + case 186 /* FunctionBlock */: + case 192 /* ModuleBlock */: return checkBody(node); - case 159 /* VariableStatement */: + case 162 /* VariableStatement */: return checkVariableStatement(node); - case 161 /* ExpressionStatement */: + case 164 /* ExpressionStatement */: return checkExpressionStatement(node); - case 162 /* IfStatement */: + case 165 /* IfStatement */: return checkIfStatement(node); - case 163 /* DoStatement */: + case 166 /* DoStatement */: return checkDoStatement(node); - case 164 /* WhileStatement */: + case 167 /* WhileStatement */: return checkWhileStatement(node); - case 165 /* ForStatement */: + case 168 /* ForStatement */: return checkForStatement(node); - case 166 /* ForInStatement */: + case 169 /* ForInStatement */: return checkForInStatement(node); - case 167 /* ContinueStatement */: - case 168 /* BreakStatement */: + case 170 /* ContinueStatement */: + case 171 /* BreakStatement */: return checkBreakOrContinueStatement(node); - case 169 /* ReturnStatement */: + case 172 /* ReturnStatement */: return checkReturnStatement(node); - case 170 /* WithStatement */: + case 173 /* WithStatement */: return checkWithStatement(node); - case 171 /* SwitchStatement */: + case 174 /* SwitchStatement */: return checkSwitchStatement(node); - case 174 /* LabeledStatement */: + case 177 /* LabeledStatement */: return checkLabeledStatement(node); - case 175 /* ThrowStatement */: + case 178 /* ThrowStatement */: return checkThrowStatement(node); - case 176 /* TryStatement */: + case 179 /* TryStatement */: return checkTryStatement(node); - case 181 /* VariableDeclaration */: + case 184 /* VariableDeclaration */: return ts.Debug.fail("Checker encountered variable declaration"); - case 184 /* ClassDeclaration */: + case 187 /* ClassDeclaration */: return checkClassDeclaration(node); - case 185 /* InterfaceDeclaration */: + case 188 /* InterfaceDeclaration */: return checkInterfaceDeclaration(node); - case 186 /* TypeAliasDeclaration */: + case 189 /* TypeAliasDeclaration */: return checkTypeAliasDeclaration(node); - case 187 /* EnumDeclaration */: + case 190 /* EnumDeclaration */: return checkEnumDeclaration(node); - case 188 /* ModuleDeclaration */: + case 191 /* ModuleDeclaration */: return checkModuleDeclaration(node); - case 190 /* ImportDeclaration */: + case 193 /* ImportDeclaration */: return checkImportDeclaration(node); - case 191 /* ExportAssignment */: + case 194 /* ExportAssignment */: return checkExportAssignment(node); } } function checkFunctionExpressionBodies(node) { switch (node.kind) { - case 149 /* FunctionExpression */: - case 150 /* ArrowFunction */: + case 152 /* FunctionExpression */: + case 153 /* ArrowFunction */: ts.forEach(node.parameters, checkFunctionExpressionBodies); checkFunctionExpressionBody(node); break; @@ -15467,55 +15752,55 @@ var ts; case 126 /* Constructor */: case 127 /* GetAccessor */: case 128 /* SetAccessor */: - case 182 /* FunctionDeclaration */: + case 185 /* FunctionDeclaration */: ts.forEach(node.parameters, checkFunctionExpressionBodies); break; - case 170 /* WithStatement */: + case 173 /* WithStatement */: checkFunctionExpressionBodies(node.expression); break; case 123 /* Parameter */: case 124 /* Property */: - case 139 /* ArrayLiteral */: - case 140 /* ObjectLiteral */: - case 141 /* PropertyAssignment */: - case 142 /* PropertyAccess */: - case 143 /* IndexedAccess */: - case 144 /* CallExpression */: - case 145 /* NewExpression */: - case 146 /* TaggedTemplateExpression */: - case 147 /* TypeAssertion */: - case 148 /* ParenExpression */: - case 151 /* PrefixOperator */: - case 152 /* PostfixOperator */: - case 153 /* BinaryExpression */: - case 154 /* ConditionalExpression */: - case 158 /* Block */: - case 183 /* FunctionBlock */: - case 189 /* ModuleBlock */: - case 159 /* VariableStatement */: - case 161 /* ExpressionStatement */: - case 162 /* IfStatement */: - case 163 /* DoStatement */: - case 164 /* WhileStatement */: - case 165 /* ForStatement */: - case 166 /* ForInStatement */: - case 167 /* ContinueStatement */: - case 168 /* BreakStatement */: - case 169 /* ReturnStatement */: - case 171 /* SwitchStatement */: - case 172 /* CaseClause */: - case 173 /* DefaultClause */: - case 174 /* LabeledStatement */: - case 175 /* ThrowStatement */: - case 176 /* TryStatement */: - case 177 /* TryBlock */: - case 178 /* CatchBlock */: - case 179 /* FinallyBlock */: - case 181 /* VariableDeclaration */: - case 184 /* ClassDeclaration */: - case 187 /* EnumDeclaration */: - case 192 /* EnumMember */: - case 193 /* SourceFile */: + case 141 /* ArrayLiteral */: + case 142 /* ObjectLiteral */: + case 143 /* PropertyAssignment */: + case 145 /* PropertyAccess */: + case 146 /* IndexedAccess */: + case 147 /* CallExpression */: + case 148 /* NewExpression */: + case 149 /* TaggedTemplateExpression */: + case 150 /* TypeAssertion */: + case 151 /* ParenExpression */: + case 154 /* PrefixOperator */: + case 155 /* PostfixOperator */: + case 156 /* BinaryExpression */: + case 157 /* ConditionalExpression */: + case 161 /* Block */: + case 186 /* FunctionBlock */: + case 192 /* ModuleBlock */: + case 162 /* VariableStatement */: + case 164 /* ExpressionStatement */: + case 165 /* IfStatement */: + case 166 /* DoStatement */: + case 167 /* WhileStatement */: + case 168 /* ForStatement */: + case 169 /* ForInStatement */: + case 170 /* ContinueStatement */: + case 171 /* BreakStatement */: + case 172 /* ReturnStatement */: + case 174 /* SwitchStatement */: + case 175 /* CaseClause */: + case 176 /* DefaultClause */: + case 177 /* LabeledStatement */: + case 178 /* ThrowStatement */: + case 179 /* TryStatement */: + case 180 /* TryBlock */: + case 181 /* CatchBlock */: + case 182 /* FinallyBlock */: + case 184 /* VariableDeclaration */: + case 187 /* ClassDeclaration */: + case 190 /* EnumDeclaration */: + case 195 /* EnumMember */: + case 196 /* SourceFile */: ts.forEachChild(node, checkFunctionExpressionBodies); break; } @@ -15586,7 +15871,7 @@ var ts; function isInsideWithStatementBody(node) { if (node) { while (node.parent) { - if (node.parent.kind === 170 /* WithStatement */ && node.parent.statement === node) { + if (node.parent.kind === 173 /* WithStatement */ && node.parent.statement === node) { return true; } node = node.parent; @@ -15622,27 +15907,27 @@ var ts; copySymbols(location.locals, meaning); } switch (location.kind) { - case 193 /* SourceFile */: + case 196 /* SourceFile */: if (!ts.isExternalModule(location)) break; - case 188 /* ModuleDeclaration */: + case 191 /* ModuleDeclaration */: copySymbols(getSymbolOfNode(location).exports, meaning & 35653619 /* ModuleMember */); break; - case 187 /* EnumDeclaration */: + case 190 /* EnumDeclaration */: copySymbols(getSymbolOfNode(location).exports, meaning & 8 /* EnumMember */); break; - case 184 /* ClassDeclaration */: - case 185 /* InterfaceDeclaration */: + case 187 /* ClassDeclaration */: + case 188 /* InterfaceDeclaration */: if (!(memberFlags & 128 /* Static */)) { copySymbols(getSymbolOfNode(location).members, meaning & 3152352 /* Type */); } break; - case 149 /* FunctionExpression */: + case 152 /* FunctionExpression */: if (location.name) { copySymbol(location.symbol, meaning); } break; - case 178 /* CatchBlock */: + case 181 /* CatchBlock */: if (location.variable.text) { copySymbol(location.symbol, meaning); } @@ -15660,10 +15945,10 @@ var ts; function isTypeDeclaration(node) { switch (node.kind) { case 122 /* TypeParameter */: - case 184 /* ClassDeclaration */: - case 185 /* InterfaceDeclaration */: - case 186 /* TypeAliasDeclaration */: - case 187 /* EnumDeclaration */: + case 187 /* ClassDeclaration */: + case 188 /* InterfaceDeclaration */: + case 189 /* TypeAliasDeclaration */: + case 190 /* EnumDeclaration */: return true; } } @@ -15674,7 +15959,7 @@ var ts; return node.parent && node.parent.kind === 132 /* TypeReference */; } function isTypeNode(node) { - if (132 /* FirstTypeNode */ <= node.kind && node.kind <= 138 /* LastTypeNode */) { + if (132 /* FirstTypeNode */ <= node.kind && node.kind <= 140 /* LastTypeNode */) { return true; } switch (node.kind) { @@ -15684,20 +15969,20 @@ var ts; case 110 /* BooleanKeyword */: return true; case 97 /* VoidKeyword */: - return node.parent.kind !== 151 /* PrefixOperator */; + return node.parent.kind !== 154 /* PrefixOperator */; case 7 /* StringLiteral */: return node.parent.kind === 123 /* Parameter */; case 63 /* Identifier */: - if (node.parent.kind === 121 /* QualifiedName */) { + if (node.parent.kind === 121 /* QualifiedName */ && node.parent.right === node) { node = node.parent; } case 121 /* QualifiedName */: ts.Debug.assert(node.kind === 63 /* Identifier */ || node.kind === 121 /* QualifiedName */, "'node' was expected to be a qualified name or identifier in 'isTypeNode'."); var parent = node.parent; - if (parent.kind === 133 /* TypeQuery */) { + if (parent.kind === 135 /* TypeQuery */) { return false; } - if (132 /* FirstTypeNode */ <= parent.kind && parent.kind <= 138 /* LastTypeNode */) { + if (132 /* FirstTypeNode */ <= parent.kind && parent.kind <= 140 /* LastTypeNode */) { return true; } switch (parent.kind) { @@ -15705,11 +15990,11 @@ var ts; return node === parent.constraint; case 124 /* Property */: case 123 /* Parameter */: - case 181 /* VariableDeclaration */: + case 184 /* VariableDeclaration */: return node === parent.type; - case 182 /* FunctionDeclaration */: - case 149 /* FunctionExpression */: - case 150 /* ArrowFunction */: + case 185 /* FunctionDeclaration */: + case 152 /* FunctionExpression */: + case 153 /* ArrowFunction */: case 126 /* Constructor */: case 125 /* Method */: case 127 /* GetAccessor */: @@ -15719,12 +16004,12 @@ var ts; case 130 /* ConstructSignature */: case 131 /* IndexSignature */: return node === parent.type; - case 147 /* TypeAssertion */: + case 150 /* TypeAssertion */: return node === parent.type; - case 144 /* CallExpression */: - case 145 /* NewExpression */: + case 147 /* CallExpression */: + case 148 /* NewExpression */: return parent.typeArguments && parent.typeArguments.indexOf(node) >= 0; - case 146 /* TaggedTemplateExpression */: + case 149 /* TaggedTemplateExpression */: return false; } } @@ -15734,22 +16019,22 @@ var ts; while (node.parent.kind === 121 /* QualifiedName */) { node = node.parent; } - if (node.parent.kind === 190 /* ImportDeclaration */) { + if (node.parent.kind === 193 /* ImportDeclaration */) { return node.parent.entityName === node; } - if (node.parent.kind === 191 /* ExportAssignment */) { + if (node.parent.kind === 194 /* ExportAssignment */) { return node.parent.exportName === node; } return false; } function isRightSideOfQualifiedNameOrPropertyAccess(node) { - return (node.parent.kind === 121 /* QualifiedName */ || node.parent.kind === 142 /* PropertyAccess */) && node.parent.right === node; + return (node.parent.kind === 121 /* QualifiedName */ || node.parent.kind === 145 /* PropertyAccess */) && node.parent.right === node; } function getSymbolOfEntityName(entityName) { if (ts.isDeclarationOrFunctionExpressionOrCatchVariableName(entityName)) { return getSymbolOfNode(entityName.parent); } - if (entityName.parent.kind === 191 /* ExportAssignment */) { + if (entityName.parent.kind === 194 /* ExportAssignment */) { return resolveEntityName(entityName.parent.parent, entityName, 107455 /* Value */ | 3152352 /* Type */ | 1536 /* Namespace */ | 33554432 /* Import */); } if (isInRightSideOfImportOrExportAssignment(entityName)) { @@ -15763,7 +16048,7 @@ var ts; var meaning = 107455 /* Value */ | 33554432 /* Import */; return resolveEntityName(entityName, entityName, meaning); } - else if (entityName.kind === 121 /* QualifiedName */ || entityName.kind === 142 /* PropertyAccess */) { + else if (entityName.kind === 121 /* QualifiedName */ || entityName.kind === 145 /* PropertyAccess */) { var symbol = getNodeLinks(entityName).resolvedSymbol; if (!symbol) { checkPropertyAccess(entityName); @@ -15789,11 +16074,11 @@ var ts; return getSymbolOfNode(node.parent); } if (node.kind === 63 /* Identifier */ && isInRightSideOfImportOrExportAssignment(node)) { - return node.parent.kind === 191 /* ExportAssignment */ ? getSymbolOfEntityName(node) : getSymbolOfPartOfRightHandSideOfImport(node); + return node.parent.kind === 194 /* ExportAssignment */ ? getSymbolOfEntityName(node) : getSymbolOfPartOfRightHandSideOfImport(node); } switch (node.kind) { case 63 /* Identifier */: - case 142 /* PropertyAccess */: + case 145 /* PropertyAccess */: case 121 /* QualifiedName */: return getSymbolOfEntityName(node); case 91 /* ThisKeyword */: @@ -15807,13 +16092,13 @@ var ts; } return undefined; case 7 /* StringLiteral */: - if (node.parent.kind === 190 /* ImportDeclaration */ && node.parent.externalModuleName === node) { + if (node.parent.kind === 193 /* ImportDeclaration */ && node.parent.externalModuleName === node) { var importSymbol = getSymbolOfNode(node.parent); var moduleType = getTypeOfSymbol(importSymbol); return moduleType ? moduleType.symbol : undefined; } case 6 /* NumericLiteral */: - if (node.parent.kind == 143 /* IndexedAccess */ && node.parent.index === node) { + if (node.parent.kind == 146 /* IndexedAccess */ && node.parent.index === node) { var objectType = checkExpression(node.parent.object); if (objectType === unknownType) return undefined; @@ -15826,6 +16111,12 @@ var ts; } return undefined; } + function getShorthandAssignmentValueSymbol(location) { + if (location && location.kind === 144 /* ShorthandPropertyAssignment */) { + return resolveEntityName(location, location.name, 107455 /* Value */); + } + return undefined; + } function getTypeOfNode(node) { if (isInsideWithStatementBody(node)) { return unknownType; @@ -15895,7 +16186,7 @@ var ts; return [symbol]; } function isExternalModuleSymbol(symbol) { - return symbol.flags & 512 /* ValueModule */ && symbol.declarations.length === 1 && symbol.declarations[0].kind === 193 /* SourceFile */; + return symbol.flags & 512 /* ValueModule */ && symbol.declarations.length === 1 && symbol.declarations[0].kind === 196 /* SourceFile */; } function isNodeDescendentOf(node, ancestor) { while (node) { @@ -15928,7 +16219,7 @@ var ts; function getLocalNameForSymbol(symbol, location) { var node = location; while (node) { - if ((node.kind === 188 /* ModuleDeclaration */ || node.kind === 187 /* EnumDeclaration */) && getSymbolOfNode(node) === symbol) { + if ((node.kind === 191 /* ModuleDeclaration */ || node.kind === 190 /* EnumDeclaration */) && getSymbolOfNode(node) === symbol) { return getLocalNameOfContainer(node); } node = node.parent; @@ -15952,15 +16243,17 @@ var ts; return symbol && symbolIsValue(symbol) && !isConstEnumSymbol(symbol) ? symbolToString(symbol) : undefined; } function isTopLevelValueImportWithEntityName(node) { - if (node.parent.kind !== 193 /* SourceFile */ || !node.entityName) { + if (node.parent.kind !== 196 /* SourceFile */ || !node.entityName) { return false; } - var symbol = getSymbolOfNode(node); return isImportResolvedToValue(getSymbolOfNode(node)); } function hasSemanticErrors() { return getDiagnostics().length > 0 || getGlobalDiagnostics().length > 0; } + function isEmitBlocked(sourceFile) { + return program.getDiagnostics(sourceFile).length !== 0 || hasEarlyErrors(sourceFile) || (compilerOptions.noEmitOnError && getDiagnostics(sourceFile).length !== 0); + } function hasEarlyErrors(sourceFile) { return ts.forEach(getDiagnostics(sourceFile), function (d) { return d.isEarly; }); } @@ -16001,7 +16294,7 @@ var ts; if (symbol && (symbol.flags & 8 /* EnumMember */)) { var declaration = symbol.valueDeclaration; var constantValue; - if (declaration.kind === 192 /* EnumMember */ && (constantValue = getNodeLinks(declaration).enumMemberValue) !== undefined) { + if (declaration.kind === 195 /* EnumMember */ && (constantValue = getNodeLinks(declaration).enumMemberValue) !== undefined) { return constantValue; } } @@ -16009,7 +16302,7 @@ var ts; } function writeTypeAtLocation(location, enclosingDeclaration, flags, writer) { var symbol = getSymbolOfNode(location); - var type = symbol && !(symbol.flags & 2048 /* TypeLiteral */) ? getTypeOfSymbol(symbol) : getTypeFromTypeNode(location); + var type = symbol && !(symbol.flags & (2048 /* TypeLiteral */ | 131072 /* CallSignature */ | 262144 /* ConstructSignature */)) ? getTypeOfSymbol(symbol) : getTypeFromTypeNode(location); getSymbolDisplayBuilder().buildTypeDisplay(type, writer, enclosingDeclaration, flags); } function writeReturnTypeOfSignatureDeclaration(signatureDeclaration, enclosingDeclaration, flags, writer) { @@ -16027,7 +16320,7 @@ var ts; getEnumMemberValue: getEnumMemberValue, isTopLevelValueImportWithEntityName: isTopLevelValueImportWithEntityName, hasSemanticErrors: hasSemanticErrors, - hasEarlyErrors: hasEarlyErrors, + isEmitBlocked: isEmitBlocked, isDeclarationVisible: isDeclarationVisible, isImplementationOfOverload: isImplementationOfOverload, writeTypeAtLocation: writeTypeAtLocation, @@ -16061,6 +16354,7 @@ var ts; globalNumberType = getGlobalType("Number"); globalBooleanType = getGlobalType("Boolean"); globalRegExpType = getGlobalType("RegExp"); + globalTemplateStringsArrayType = compilerOptions.target >= 2 /* ES6 */ ? getGlobalType("TemplateStringsArray") : unknownType; } initializeTypeChecker(); return checker; @@ -16119,6 +16413,11 @@ var ts; paramType: ts.Diagnostics.KIND, error: ts.Diagnostics.Argument_for_module_option_must_be_commonjs_or_amd }, + { + name: "noEmitOnError", + type: "boolean", + description: ts.Diagnostics.Do_not_emit_outputs_if_any_type_checking_errors_were_reported + }, { name: "noImplicitAny", type: "boolean", @@ -16559,17 +16858,17 @@ var ts; var checker = program.getTypeChecker(true); var checkStart = new Date().getTime(); errors = checker.getDiagnostics(); - if (!checker.hasEarlyErrors()) { + if (checker.isEmitBlocked()) { + exitStatus = 1 /* AllOutputGenerationSkipped */; + } + else { var emitStart = new Date().getTime(); - var emitOutput = checker.emitFiles(); - var emitErrors = emitOutput.errors; + var emitOutput = checker.invokeEmitter(); + var emitErrors = emitOutput.diagnostics; exitStatus = emitOutput.emitResultStatus; var reportStart = new Date().getTime(); errors = ts.concatenate(errors, emitErrors); } - else { - exitStatus = 1 /* AllOutputGenerationSkipped */; - } } reportDiagnostics(errors); if (commandLine.options.diagnostics) { diff --git a/bin/typescriptServices.js b/bin/typescriptServices.js index ea97ea9ea75..ca2b7ec0318 100644 --- a/bin/typescriptServices.js +++ b/bin/typescriptServices.js @@ -13,1421 +13,6 @@ See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ -var ts; -(function (ts) { - ts.Diagnostics = { - Unterminated_string_literal: { code: 1002, category: 1 /* Error */, key: "Unterminated string literal." }, - Identifier_expected: { code: 1003, category: 1 /* Error */, key: "Identifier expected." }, - _0_expected: { code: 1005, category: 1 /* Error */, key: "'{0}' expected." }, - A_file_cannot_have_a_reference_to_itself: { code: 1006, category: 1 /* Error */, key: "A file cannot have a reference to itself." }, - Trailing_comma_not_allowed: { code: 1009, category: 1 /* Error */, key: "Trailing comma not allowed." }, - Asterisk_Slash_expected: { code: 1010, category: 1 /* Error */, key: "'*/' expected." }, - Unexpected_token: { code: 1012, category: 1 /* Error */, key: "Unexpected token." }, - Catch_clause_parameter_cannot_have_a_type_annotation: { code: 1013, category: 1 /* Error */, key: "Catch clause parameter cannot have a type annotation." }, - A_rest_parameter_must_be_last_in_a_parameter_list: { code: 1014, category: 1 /* Error */, key: "A rest parameter must be last in a parameter list." }, - Parameter_cannot_have_question_mark_and_initializer: { code: 1015, category: 1 /* Error */, key: "Parameter cannot have question mark and initializer." }, - A_required_parameter_cannot_follow_an_optional_parameter: { code: 1016, category: 1 /* Error */, key: "A required parameter cannot follow an optional parameter." }, - An_index_signature_cannot_have_a_rest_parameter: { code: 1017, category: 1 /* Error */, key: "An index signature cannot have a rest parameter." }, - An_index_signature_parameter_cannot_have_an_accessibility_modifier: { code: 1018, category: 1 /* Error */, key: "An index signature parameter cannot have an accessibility modifier." }, - An_index_signature_parameter_cannot_have_a_question_mark: { code: 1019, category: 1 /* Error */, key: "An index signature parameter cannot have a question mark." }, - An_index_signature_parameter_cannot_have_an_initializer: { code: 1020, category: 1 /* Error */, key: "An index signature parameter cannot have an initializer." }, - An_index_signature_must_have_a_type_annotation: { code: 1021, category: 1 /* Error */, key: "An index signature must have a type annotation." }, - An_index_signature_parameter_must_have_a_type_annotation: { code: 1022, category: 1 /* Error */, key: "An index signature parameter must have a type annotation." }, - An_index_signature_parameter_type_must_be_string_or_number: { code: 1023, category: 1 /* Error */, key: "An index signature parameter type must be 'string' or 'number'." }, - A_class_or_interface_declaration_can_only_have_one_extends_clause: { code: 1024, category: 1 /* Error */, key: "A class or interface declaration can only have one 'extends' clause." }, - An_extends_clause_must_precede_an_implements_clause: { code: 1025, category: 1 /* Error */, key: "An 'extends' clause must precede an 'implements' clause." }, - A_class_can_only_extend_a_single_class: { code: 1026, category: 1 /* Error */, key: "A class can only extend a single class." }, - A_class_declaration_can_only_have_one_implements_clause: { code: 1027, category: 1 /* Error */, key: "A class declaration can only have one 'implements' clause." }, - Accessibility_modifier_already_seen: { code: 1028, category: 1 /* Error */, key: "Accessibility modifier already seen." }, - _0_modifier_must_precede_1_modifier: { code: 1029, category: 1 /* Error */, key: "'{0}' modifier must precede '{1}' modifier." }, - _0_modifier_already_seen: { code: 1030, category: 1 /* Error */, key: "'{0}' modifier already seen." }, - _0_modifier_cannot_appear_on_a_class_element: { code: 1031, category: 1 /* Error */, key: "'{0}' modifier cannot appear on a class element." }, - An_interface_declaration_cannot_have_an_implements_clause: { code: 1032, category: 1 /* Error */, key: "An interface declaration cannot have an 'implements' clause." }, - super_must_be_followed_by_an_argument_list_or_member_access: { code: 1034, category: 1 /* Error */, key: "'super' must be followed by an argument list or member access." }, - Only_ambient_modules_can_use_quoted_names: { code: 1035, category: 1 /* Error */, key: "Only ambient modules can use quoted names." }, - Statements_are_not_allowed_in_ambient_contexts: { code: 1036, category: 1 /* Error */, key: "Statements are not allowed in ambient contexts." }, - A_function_implementation_cannot_be_declared_in_an_ambient_context: { code: 1037, category: 1 /* Error */, key: "A function implementation cannot be declared in an ambient context." }, - A_declare_modifier_cannot_be_used_in_an_already_ambient_context: { code: 1038, category: 1 /* Error */, key: "A 'declare' modifier cannot be used in an already ambient context." }, - Initializers_are_not_allowed_in_ambient_contexts: { code: 1039, category: 1 /* Error */, key: "Initializers are not allowed in ambient contexts." }, - _0_modifier_cannot_appear_on_a_module_element: { code: 1044, category: 1 /* Error */, key: "'{0}' modifier cannot appear on a module element." }, - A_declare_modifier_cannot_be_used_with_an_interface_declaration: { code: 1045, category: 1 /* Error */, key: "A 'declare' modifier cannot be used with an interface declaration." }, - A_declare_modifier_is_required_for_a_top_level_declaration_in_a_d_ts_file: { code: 1046, category: 1 /* Error */, key: "A 'declare' modifier is required for a top level declaration in a .d.ts file." }, - A_rest_parameter_cannot_be_optional: { code: 1047, category: 1 /* Error */, key: "A rest parameter cannot be optional." }, - A_rest_parameter_cannot_have_an_initializer: { code: 1048, category: 1 /* Error */, key: "A rest parameter cannot have an initializer." }, - A_set_accessor_must_have_exactly_one_parameter: { code: 1049, category: 1 /* Error */, key: "A 'set' accessor must have exactly one parameter." }, - A_set_accessor_cannot_have_an_optional_parameter: { code: 1051, category: 1 /* Error */, key: "A 'set' accessor cannot have an optional parameter." }, - A_set_accessor_parameter_cannot_have_an_initializer: { code: 1052, category: 1 /* Error */, key: "A 'set' accessor parameter cannot have an initializer." }, - A_set_accessor_cannot_have_rest_parameter: { code: 1053, category: 1 /* Error */, key: "A 'set' accessor cannot have rest parameter." }, - A_get_accessor_cannot_have_parameters: { code: 1054, category: 1 /* Error */, key: "A 'get' accessor cannot have parameters." }, - Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher: { code: 1056, category: 1 /* Error */, key: "Accessors are only available when targeting ECMAScript 5 and higher." }, - Enum_member_must_have_initializer: { code: 1061, category: 1 /* Error */, key: "Enum member must have initializer." }, - An_export_assignment_cannot_be_used_in_an_internal_module: { code: 1063, category: 1 /* Error */, key: "An export assignment cannot be used in an internal module." }, - Ambient_enum_elements_can_only_have_integer_literal_initializers: { code: 1066, category: 1 /* Error */, key: "Ambient enum elements can only have integer literal initializers." }, - Unexpected_token_A_constructor_method_accessor_or_property_was_expected: { code: 1068, category: 1 /* Error */, key: "Unexpected token. A constructor, method, accessor, or property was expected." }, - A_declare_modifier_cannot_be_used_with_an_import_declaration: { code: 1079, category: 1 /* Error */, key: "A 'declare' modifier cannot be used with an import declaration." }, - Invalid_reference_directive_syntax: { code: 1084, category: 1 /* Error */, key: "Invalid 'reference' directive syntax." }, - Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher: { code: 1085, category: 1 /* Error */, key: "Octal literals are not available when targeting ECMAScript 5 and higher." }, - An_accessor_cannot_be_declared_in_an_ambient_context: { code: 1086, category: 1 /* Error */, key: "An accessor cannot be declared in an ambient context." }, - _0_modifier_cannot_appear_on_a_constructor_declaration: { code: 1089, category: 1 /* Error */, key: "'{0}' modifier cannot appear on a constructor declaration." }, - _0_modifier_cannot_appear_on_a_parameter: { code: 1090, category: 1 /* Error */, key: "'{0}' modifier cannot appear on a parameter." }, - Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement: { code: 1091, category: 1 /* Error */, key: "Only a single variable declaration is allowed in a 'for...in' statement." }, - Type_parameters_cannot_appear_on_a_constructor_declaration: { code: 1092, category: 1 /* Error */, key: "Type parameters cannot appear on a constructor declaration." }, - Type_annotation_cannot_appear_on_a_constructor_declaration: { code: 1093, category: 1 /* Error */, key: "Type annotation cannot appear on a constructor declaration." }, - An_accessor_cannot_have_type_parameters: { code: 1094, category: 1 /* Error */, key: "An accessor cannot have type parameters." }, - A_set_accessor_cannot_have_a_return_type_annotation: { code: 1095, category: 1 /* Error */, key: "A 'set' accessor cannot have a return type annotation." }, - An_index_signature_must_have_exactly_one_parameter: { code: 1096, category: 1 /* Error */, key: "An index signature must have exactly one parameter." }, - _0_list_cannot_be_empty: { code: 1097, category: 1 /* Error */, key: "'{0}' list cannot be empty." }, - Type_parameter_list_cannot_be_empty: { code: 1098, category: 1 /* Error */, key: "Type parameter list cannot be empty." }, - Type_argument_list_cannot_be_empty: { code: 1099, category: 1 /* Error */, key: "Type argument list cannot be empty." }, - Invalid_use_of_0_in_strict_mode: { code: 1100, category: 1 /* Error */, key: "Invalid use of '{0}' in strict mode." }, - with_statements_are_not_allowed_in_strict_mode: { code: 1101, category: 1 /* Error */, key: "'with' statements are not allowed in strict mode." }, - delete_cannot_be_called_on_an_identifier_in_strict_mode: { code: 1102, category: 1 /* Error */, key: "'delete' cannot be called on an identifier in strict mode." }, - A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement: { code: 1104, category: 1 /* Error */, key: "A 'continue' statement can only be used within an enclosing iteration statement." }, - A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement: { code: 1105, category: 1 /* Error */, key: "A 'break' statement can only be used within an enclosing iteration or switch statement." }, - Jump_target_cannot_cross_function_boundary: { code: 1107, category: 1 /* Error */, key: "Jump target cannot cross function boundary." }, - A_return_statement_can_only_be_used_within_a_function_body: { code: 1108, category: 1 /* Error */, key: "A 'return' statement can only be used within a function body." }, - Expression_expected: { code: 1109, category: 1 /* Error */, key: "Expression expected." }, - Type_expected: { code: 1110, category: 1 /* Error */, key: "Type expected." }, - A_constructor_implementation_cannot_be_declared_in_an_ambient_context: { code: 1111, category: 1 /* Error */, key: "A constructor implementation cannot be declared in an ambient context." }, - A_class_member_cannot_be_declared_optional: { code: 1112, category: 1 /* Error */, key: "A class member cannot be declared optional." }, - A_default_clause_cannot_appear_more_than_once_in_a_switch_statement: { code: 1113, category: 1 /* Error */, key: "A 'default' clause cannot appear more than once in a 'switch' statement." }, - Duplicate_label_0: { code: 1114, category: 1 /* Error */, key: "Duplicate label '{0}'" }, - A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement: { code: 1115, category: 1 /* Error */, key: "A 'continue' statement can only jump to a label of an enclosing iteration statement." }, - A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement: { code: 1116, category: 1 /* Error */, key: "A 'break' statement can only jump to a label of an enclosing statement." }, - An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode: { code: 1117, category: 1 /* Error */, key: "An object literal cannot have multiple properties with the same name in strict mode." }, - An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name: { code: 1118, category: 1 /* Error */, key: "An object literal cannot have multiple get/set accessors with the same name." }, - An_object_literal_cannot_have_property_and_accessor_with_the_same_name: { code: 1119, category: 1 /* Error */, key: "An object literal cannot have property and accessor with the same name." }, - An_export_assignment_cannot_have_modifiers: { code: 1120, category: 1 /* Error */, key: "An export assignment cannot have modifiers." }, - Octal_literals_are_not_allowed_in_strict_mode: { code: 1121, category: 1 /* Error */, key: "Octal literals are not allowed in strict mode." }, - A_tuple_type_element_list_cannot_be_empty: { code: 1122, category: 1 /* Error */, key: "A tuple type element list cannot be empty." }, - Variable_declaration_list_cannot_be_empty: { code: 1123, category: 1 /* Error */, key: "Variable declaration list cannot be empty." }, - Digit_expected: { code: 1124, category: 1 /* Error */, key: "Digit expected." }, - Hexadecimal_digit_expected: { code: 1125, category: 1 /* Error */, key: "Hexadecimal digit expected." }, - Unexpected_end_of_text: { code: 1126, category: 1 /* Error */, key: "Unexpected end of text." }, - Invalid_character: { code: 1127, category: 1 /* Error */, key: "Invalid character." }, - Declaration_or_statement_expected: { code: 1128, category: 1 /* Error */, key: "Declaration or statement expected." }, - Statement_expected: { code: 1129, category: 1 /* Error */, key: "Statement expected." }, - case_or_default_expected: { code: 1130, category: 1 /* Error */, key: "'case' or 'default' expected." }, - Property_or_signature_expected: { code: 1131, category: 1 /* Error */, key: "Property or signature expected." }, - Enum_member_expected: { code: 1132, category: 1 /* Error */, key: "Enum member expected." }, - Type_reference_expected: { code: 1133, category: 1 /* Error */, key: "Type reference expected." }, - Variable_declaration_expected: { code: 1134, category: 1 /* Error */, key: "Variable declaration expected." }, - Argument_expression_expected: { code: 1135, category: 1 /* Error */, key: "Argument expression expected." }, - Property_assignment_expected: { code: 1136, category: 1 /* Error */, key: "Property assignment expected." }, - Expression_or_comma_expected: { code: 1137, category: 1 /* Error */, key: "Expression or comma expected." }, - Parameter_declaration_expected: { code: 1138, category: 1 /* Error */, key: "Parameter declaration expected." }, - Type_parameter_declaration_expected: { code: 1139, category: 1 /* Error */, key: "Type parameter declaration expected." }, - Type_argument_expected: { code: 1140, category: 1 /* Error */, key: "Type argument expected." }, - String_literal_expected: { code: 1141, category: 1 /* Error */, key: "String literal expected." }, - Line_break_not_permitted_here: { code: 1142, category: 1 /* Error */, key: "Line break not permitted here." }, - catch_or_finally_expected: { code: 1143, category: 1 /* Error */, key: "'catch' or 'finally' expected." }, - Block_or_expected: { code: 1144, category: 1 /* Error */, key: "Block or ';' expected." }, - Modifiers_not_permitted_on_index_signature_members: { code: 1145, category: 1 /* Error */, key: "Modifiers not permitted on index signature members." }, - Declaration_expected: { code: 1146, category: 1 /* Error */, key: "Declaration expected." }, - Import_declarations_in_an_internal_module_cannot_reference_an_external_module: { code: 1147, category: 1 /* Error */, key: "Import declarations in an internal module cannot reference an external module." }, - Cannot_compile_external_modules_unless_the_module_flag_is_provided: { code: 1148, category: 1 /* Error */, key: "Cannot compile external modules unless the '--module' flag is provided." }, - Filename_0_differs_from_already_included_filename_1_only_in_casing: { code: 1149, category: 1 /* Error */, key: "Filename '{0}' differs from already included filename '{1}' only in casing" }, - new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead: { code: 1150, category: 1 /* Error */, key: "'new T[]' cannot be used to create an array. Use 'new Array()' instead." }, - var_let_or_const_expected: { code: 1152, category: 1 /* Error */, key: "'var', 'let' or 'const' expected." }, - let_declarations_are_only_available_when_targeting_ECMAScript_6_and_higher: { code: 1153, category: 1 /* Error */, key: "'let' declarations are only available when targeting ECMAScript 6 and higher." }, - const_declarations_are_only_available_when_targeting_ECMAScript_6_and_higher: { code: 1154, category: 1 /* Error */, key: "'const' declarations are only available when targeting ECMAScript 6 and higher." }, - const_declarations_must_be_initialized: { code: 1155, category: 1 /* Error */, key: "'const' declarations must be initialized" }, - const_declarations_can_only_be_declared_inside_a_block: { code: 1156, category: 1 /* Error */, key: "'const' declarations can only be declared inside a block." }, - let_declarations_can_only_be_declared_inside_a_block: { code: 1157, category: 1 /* Error */, key: "'let' declarations can only be declared inside a block." }, - Invalid_template_literal_expected: { code: 1158, category: 1 /* Error */, key: "Invalid template literal; expected '}'" }, - Tagged_templates_are_only_available_when_targeting_ECMAScript_6_and_higher: { code: 1159, category: 1 /* Error */, key: "Tagged templates are only available when targeting ECMAScript 6 and higher." }, - Duplicate_identifier_0: { code: 2300, category: 1 /* Error */, key: "Duplicate identifier '{0}'." }, - Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor: { code: 2301, category: 1 /* Error */, key: "Initializer of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor." }, - Static_members_cannot_reference_class_type_parameters: { code: 2302, category: 1 /* Error */, key: "Static members cannot reference class type parameters." }, - Circular_definition_of_import_alias_0: { code: 2303, category: 1 /* Error */, key: "Circular definition of import alias '{0}'." }, - Cannot_find_name_0: { code: 2304, category: 1 /* Error */, key: "Cannot find name '{0}'." }, - Module_0_has_no_exported_member_1: { code: 2305, category: 1 /* Error */, key: "Module '{0}' has no exported member '{1}'." }, - File_0_is_not_an_external_module: { code: 2306, category: 1 /* Error */, key: "File '{0}' is not an external module." }, - Cannot_find_external_module_0: { code: 2307, category: 1 /* Error */, key: "Cannot find external module '{0}'." }, - A_module_cannot_have_more_than_one_export_assignment: { code: 2308, category: 1 /* Error */, key: "A module cannot have more than one export assignment." }, - An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements: { code: 2309, category: 1 /* Error */, key: "An export assignment cannot be used in a module with other exported elements." }, - Type_0_recursively_references_itself_as_a_base_type: { code: 2310, category: 1 /* Error */, key: "Type '{0}' recursively references itself as a base type." }, - A_class_may_only_extend_another_class: { code: 2311, category: 1 /* Error */, key: "A class may only extend another class." }, - An_interface_may_only_extend_a_class_or_another_interface: { code: 2312, category: 1 /* Error */, key: "An interface may only extend a class or another interface." }, - Constraint_of_a_type_parameter_cannot_reference_any_type_parameter_from_the_same_type_parameter_list: { code: 2313, category: 1 /* Error */, key: "Constraint of a type parameter cannot reference any type parameter from the same type parameter list." }, - Generic_type_0_requires_1_type_argument_s: { code: 2314, category: 1 /* Error */, key: "Generic type '{0}' requires {1} type argument(s)." }, - Type_0_is_not_generic: { code: 2315, category: 1 /* Error */, key: "Type '{0}' is not generic." }, - Global_type_0_must_be_a_class_or_interface_type: { code: 2316, category: 1 /* Error */, key: "Global type '{0}' must be a class or interface type." }, - Global_type_0_must_have_1_type_parameter_s: { code: 2317, category: 1 /* Error */, key: "Global type '{0}' must have {1} type parameter(s)." }, - Cannot_find_global_type_0: { code: 2318, category: 1 /* Error */, key: "Cannot find global type '{0}'." }, - Named_properties_0_of_types_1_and_2_are_not_identical: { code: 2319, category: 1 /* Error */, key: "Named properties '{0}' of types '{1}' and '{2}' are not identical." }, - Interface_0_cannot_simultaneously_extend_types_1_and_2: { code: 2320, category: 1 /* Error */, key: "Interface '{0}' cannot simultaneously extend types '{1}' and '{2}'." }, - Excessive_stack_depth_comparing_types_0_and_1: { code: 2321, category: 1 /* Error */, key: "Excessive stack depth comparing types '{0}' and '{1}'." }, - Type_0_is_not_assignable_to_type_1: { code: 2323, category: 1 /* Error */, key: "Type '{0}' is not assignable to type '{1}'." }, - Property_0_is_missing_in_type_1: { code: 2324, category: 1 /* Error */, key: "Property '{0}' is missing in type '{1}'." }, - Property_0_is_private_in_type_1_but_not_in_type_2: { code: 2325, category: 1 /* Error */, key: "Property '{0}' is private in type '{1}' but not in type '{2}'." }, - Types_of_property_0_are_incompatible: { code: 2326, category: 1 /* Error */, key: "Types of property '{0}' are incompatible." }, - Property_0_is_optional_in_type_1_but_required_in_type_2: { code: 2327, category: 1 /* Error */, key: "Property '{0}' is optional in type '{1}' but required in type '{2}'." }, - Types_of_parameters_0_and_1_are_incompatible: { code: 2328, category: 1 /* Error */, key: "Types of parameters '{0}' and '{1}' are incompatible." }, - Index_signature_is_missing_in_type_0: { code: 2329, category: 1 /* Error */, key: "Index signature is missing in type '{0}'." }, - Index_signatures_are_incompatible: { code: 2330, category: 1 /* Error */, key: "Index signatures are incompatible." }, - this_cannot_be_referenced_in_a_module_body: { code: 2331, category: 1 /* Error */, key: "'this' cannot be referenced in a module body." }, - this_cannot_be_referenced_in_current_location: { code: 2332, category: 1 /* Error */, key: "'this' cannot be referenced in current location." }, - this_cannot_be_referenced_in_constructor_arguments: { code: 2333, category: 1 /* Error */, key: "'this' cannot be referenced in constructor arguments." }, - this_cannot_be_referenced_in_a_static_property_initializer: { code: 2334, category: 1 /* Error */, key: "'this' cannot be referenced in a static property initializer." }, - super_can_only_be_referenced_in_a_derived_class: { code: 2335, category: 1 /* Error */, key: "'super' can only be referenced in a derived class." }, - super_cannot_be_referenced_in_constructor_arguments: { code: 2336, category: 1 /* Error */, key: "'super' cannot be referenced in constructor arguments." }, - Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors: { code: 2337, category: 1 /* Error */, key: "Super calls are not permitted outside constructors or in nested functions inside constructors" }, - super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_derived_class: { code: 2338, category: 1 /* Error */, key: "'super' property access is permitted only in a constructor, member function, or member accessor of a derived class" }, - Property_0_does_not_exist_on_type_1: { code: 2339, category: 1 /* Error */, key: "Property '{0}' does not exist on type '{1}'." }, - Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword: { code: 2340, category: 1 /* Error */, key: "Only public and protected methods of the base class are accessible via the 'super' keyword" }, - Property_0_is_private_and_only_accessible_within_class_1: { code: 2341, category: 1 /* Error */, key: "Property '{0}' is private and only accessible within class '{1}'." }, - An_index_expression_argument_must_be_of_type_string_number_or_any: { code: 2342, category: 1 /* Error */, key: "An index expression argument must be of type 'string', 'number', or 'any'." }, - Type_0_does_not_satisfy_the_constraint_1: { code: 2344, category: 1 /* Error */, key: "Type '{0}' does not satisfy the constraint '{1}'." }, - Argument_of_type_0_is_not_assignable_to_parameter_of_type_1: { code: 2345, category: 1 /* Error */, key: "Argument of type '{0}' is not assignable to parameter of type '{1}'." }, - Supplied_parameters_do_not_match_any_signature_of_call_target: { code: 2346, category: 1 /* Error */, key: "Supplied parameters do not match any signature of call target." }, - Untyped_function_calls_may_not_accept_type_arguments: { code: 2347, category: 1 /* Error */, key: "Untyped function calls may not accept type arguments." }, - Value_of_type_0_is_not_callable_Did_you_mean_to_include_new: { code: 2348, category: 1 /* Error */, key: "Value of type '{0}' is not callable. Did you mean to include 'new'?" }, - Cannot_invoke_an_expression_whose_type_lacks_a_call_signature: { code: 2349, category: 1 /* Error */, key: "Cannot invoke an expression whose type lacks a call signature." }, - Only_a_void_function_can_be_called_with_the_new_keyword: { code: 2350, category: 1 /* Error */, key: "Only a void function can be called with the 'new' keyword." }, - Cannot_use_new_with_an_expression_whose_type_lacks_a_call_or_construct_signature: { code: 2351, category: 1 /* Error */, key: "Cannot use 'new' with an expression whose type lacks a call or construct signature." }, - Neither_type_0_nor_type_1_is_assignable_to_the_other: { code: 2352, category: 1 /* Error */, key: "Neither type '{0}' nor type '{1}' is assignable to the other." }, - No_best_common_type_exists_among_return_expressions: { code: 2354, category: 1 /* Error */, key: "No best common type exists among return expressions." }, - A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value_or_consist_of_a_single_throw_statement: { code: 2355, category: 1 /* Error */, key: "A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement." }, - An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type: { code: 2356, category: 1 /* Error */, key: "An arithmetic operand must be of type 'any', 'number' or an enum type." }, - The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_property_or_indexer: { code: 2357, category: 1 /* Error */, key: "The operand of an increment or decrement operator must be a variable, property or indexer." }, - The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter: { code: 2358, category: 1 /* Error */, key: "The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter." }, - The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_Function_interface_type: { code: 2359, category: 1 /* Error */, key: "The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type." }, - The_left_hand_side_of_an_in_expression_must_be_of_types_any_string_or_number: { code: 2360, category: 1 /* Error */, key: "The left-hand side of an 'in' expression must be of types 'any', 'string' or 'number'." }, - The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter: { code: 2361, category: 1 /* Error */, key: "The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter" }, - The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type: { code: 2362, category: 1 /* Error */, key: "The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type." }, - The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type: { code: 2363, category: 1 /* Error */, key: "The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type." }, - Invalid_left_hand_side_of_assignment_expression: { code: 2364, category: 1 /* Error */, key: "Invalid left-hand side of assignment expression." }, - Operator_0_cannot_be_applied_to_types_1_and_2: { code: 2365, category: 1 /* Error */, key: "Operator '{0}' cannot be applied to types '{1}' and '{2}'." }, - Type_parameter_name_cannot_be_0: { code: 2368, category: 1 /* Error */, key: "Type parameter name cannot be '{0}'" }, - A_parameter_property_is_only_allowed_in_a_constructor_implementation: { code: 2369, category: 1 /* Error */, key: "A parameter property is only allowed in a constructor implementation." }, - A_rest_parameter_must_be_of_an_array_type: { code: 2370, category: 1 /* Error */, key: "A rest parameter must be of an array type." }, - A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation: { code: 2371, category: 1 /* Error */, key: "A parameter initializer is only allowed in a function or constructor implementation." }, - Parameter_0_cannot_be_referenced_in_its_initializer: { code: 2372, category: 1 /* Error */, key: "Parameter '{0}' cannot be referenced in its initializer." }, - Initializer_of_parameter_0_cannot_reference_identifier_1_declared_after_it: { code: 2373, category: 1 /* Error */, key: "Initializer of parameter '{0}' cannot reference identifier '{1}' declared after it." }, - Duplicate_string_index_signature: { code: 2374, category: 1 /* Error */, key: "Duplicate string index signature." }, - Duplicate_number_index_signature: { code: 2375, category: 1 /* Error */, key: "Duplicate number index signature." }, - A_super_call_must_be_the_first_statement_in_the_constructor_when_a_class_contains_initialized_properties_or_has_parameter_properties: { code: 2376, category: 1 /* Error */, key: "A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties." }, - Constructors_for_derived_classes_must_contain_a_super_call: { code: 2377, category: 1 /* Error */, key: "Constructors for derived classes must contain a 'super' call." }, - A_get_accessor_must_return_a_value_or_consist_of_a_single_throw_statement: { code: 2378, category: 1 /* Error */, key: "A 'get' accessor must return a value or consist of a single 'throw' statement." }, - Getter_and_setter_accessors_do_not_agree_in_visibility: { code: 2379, category: 1 /* Error */, key: "Getter and setter accessors do not agree in visibility." }, - get_and_set_accessor_must_have_the_same_type: { code: 2380, category: 1 /* Error */, key: "'get' and 'set' accessor must have the same type." }, - A_signature_with_an_implementation_cannot_use_a_string_literal_type: { code: 2381, category: 1 /* Error */, key: "A signature with an implementation cannot use a string literal type." }, - Specialized_overload_signature_is_not_assignable_to_any_non_specialized_signature: { code: 2382, category: 1 /* Error */, key: "Specialized overload signature is not assignable to any non-specialized signature." }, - Overload_signatures_must_all_be_exported_or_not_exported: { code: 2383, category: 1 /* Error */, key: "Overload signatures must all be exported or not exported." }, - Overload_signatures_must_all_be_ambient_or_non_ambient: { code: 2384, category: 1 /* Error */, key: "Overload signatures must all be ambient or non-ambient." }, - Overload_signatures_must_all_be_public_private_or_protected: { code: 2385, category: 1 /* Error */, key: "Overload signatures must all be public, private or protected." }, - Overload_signatures_must_all_be_optional_or_required: { code: 2386, category: 1 /* Error */, key: "Overload signatures must all be optional or required." }, - Function_overload_must_be_static: { code: 2387, category: 1 /* Error */, key: "Function overload must be static." }, - Function_overload_must_not_be_static: { code: 2388, category: 1 /* Error */, key: "Function overload must not be static." }, - Function_implementation_name_must_be_0: { code: 2389, category: 1 /* Error */, key: "Function implementation name must be '{0}'." }, - Constructor_implementation_is_missing: { code: 2390, category: 1 /* Error */, key: "Constructor implementation is missing." }, - Function_implementation_is_missing_or_not_immediately_following_the_declaration: { code: 2391, category: 1 /* Error */, key: "Function implementation is missing or not immediately following the declaration." }, - Multiple_constructor_implementations_are_not_allowed: { code: 2392, category: 1 /* Error */, key: "Multiple constructor implementations are not allowed." }, - Duplicate_function_implementation: { code: 2393, category: 1 /* Error */, key: "Duplicate function implementation." }, - Overload_signature_is_not_compatible_with_function_implementation: { code: 2394, category: 1 /* Error */, key: "Overload signature is not compatible with function implementation." }, - Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local: { code: 2395, category: 1 /* Error */, key: "Individual declarations in merged declaration {0} must be all exported or all local." }, - Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters: { code: 2396, category: 1 /* Error */, key: "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters." }, - Duplicate_identifier_i_Compiler_uses_i_to_initialize_rest_parameter: { code: 2397, category: 1 /* Error */, key: "Duplicate identifier '_i'. Compiler uses '_i' to initialize rest parameter." }, - Expression_resolves_to_variable_declaration_i_that_compiler_uses_to_initialize_rest_parameter: { code: 2398, category: 1 /* Error */, key: "Expression resolves to variable declaration '_i' that compiler uses to initialize rest parameter." }, - Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference: { code: 2399, category: 1 /* Error */, key: "Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference." }, - Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference: { code: 2400, category: 1 /* Error */, key: "Expression resolves to variable declaration '_this' that compiler uses to capture 'this' reference." }, - Duplicate_identifier_super_Compiler_uses_super_to_capture_base_class_reference: { code: 2401, category: 1 /* Error */, key: "Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference." }, - Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference: { code: 2402, category: 1 /* Error */, key: "Expression resolves to '_super' that compiler uses to capture base class reference." }, - Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2: { code: 2403, category: 1 /* Error */, key: "Subsequent variable declarations must have the same type. Variable '{0}' must be of type '{1}', but here has type '{2}'." }, - The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation: { code: 2404, category: 1 /* Error */, key: "The left-hand side of a 'for...in' statement cannot use a type annotation." }, - The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any: { code: 2405, category: 1 /* Error */, key: "The left-hand side of a 'for...in' statement must be of type 'string' or 'any'." }, - Invalid_left_hand_side_in_for_in_statement: { code: 2406, category: 1 /* Error */, key: "Invalid left-hand side in 'for...in' statement." }, - The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter: { code: 2407, category: 1 /* Error */, key: "The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter." }, - Setters_cannot_return_a_value: { code: 2408, category: 1 /* Error */, key: "Setters cannot return a value." }, - Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class: { code: 2409, category: 1 /* Error */, key: "Return type of constructor signature must be assignable to the instance type of the class" }, - All_symbols_within_a_with_block_will_be_resolved_to_any: { code: 2410, category: 1 /* Error */, key: "All symbols within a 'with' block will be resolved to 'any'." }, - Property_0_of_type_1_is_not_assignable_to_string_index_type_2: { code: 2411, category: 1 /* Error */, key: "Property '{0}' of type '{1}' is not assignable to string index type '{2}'." }, - Property_0_of_type_1_is_not_assignable_to_numeric_index_type_2: { code: 2412, category: 1 /* Error */, key: "Property '{0}' of type '{1}' is not assignable to numeric index type '{2}'." }, - Numeric_index_type_0_is_not_assignable_to_string_index_type_1: { code: 2413, category: 1 /* Error */, key: "Numeric index type '{0}' is not assignable to string index type '{1}'." }, - Class_name_cannot_be_0: { code: 2414, category: 1 /* Error */, key: "Class name cannot be '{0}'" }, - Class_0_incorrectly_extends_base_class_1: { code: 2415, category: 1 /* Error */, key: "Class '{0}' incorrectly extends base class '{1}'." }, - Class_static_side_0_incorrectly_extends_base_class_static_side_1: { code: 2417, category: 1 /* Error */, key: "Class static side '{0}' incorrectly extends base class static side '{1}'." }, - Type_name_0_in_extends_clause_does_not_reference_constructor_function_for_0: { code: 2419, category: 1 /* Error */, key: "Type name '{0}' in extends clause does not reference constructor function for '{0}'." }, - Class_0_incorrectly_implements_interface_1: { code: 2420, category: 1 /* Error */, key: "Class '{0}' incorrectly implements interface '{1}'." }, - A_class_may_only_implement_another_class_or_interface: { code: 2422, category: 1 /* Error */, key: "A class may only implement another class or interface." }, - Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor: { code: 2423, category: 1 /* Error */, key: "Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member accessor." }, - Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_property: { code: 2424, category: 1 /* Error */, key: "Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member property." }, - Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_function: { code: 2425, category: 1 /* Error */, key: "Class '{0}' defines instance member property '{1}', but extended class '{2}' defines it as instance member function." }, - Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_function: { code: 2426, category: 1 /* Error */, key: "Class '{0}' defines instance member accessor '{1}', but extended class '{2}' defines it as instance member function." }, - Interface_name_cannot_be_0: { code: 2427, category: 1 /* Error */, key: "Interface name cannot be '{0}'" }, - All_declarations_of_an_interface_must_have_identical_type_parameters: { code: 2428, category: 1 /* Error */, key: "All declarations of an interface must have identical type parameters." }, - Interface_0_incorrectly_extends_interface_1: { code: 2430, category: 1 /* Error */, key: "Interface '{0}' incorrectly extends interface '{1}'." }, - Enum_name_cannot_be_0: { code: 2431, category: 1 /* Error */, key: "Enum name cannot be '{0}'" }, - In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enum_element: { code: 2432, category: 1 /* Error */, key: "In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element." }, - A_module_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merged: { code: 2433, category: 1 /* Error */, key: "A module declaration cannot be in a different file from a class or function with which it is merged" }, - A_module_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged: { code: 2434, category: 1 /* Error */, key: "A module declaration cannot be located prior to a class or function with which it is merged" }, - Ambient_external_modules_cannot_be_nested_in_other_modules: { code: 2435, category: 1 /* Error */, key: "Ambient external modules cannot be nested in other modules." }, - Ambient_external_module_declaration_cannot_specify_relative_module_name: { code: 2436, category: 1 /* Error */, key: "Ambient external module declaration cannot specify relative module name." }, - Module_0_is_hidden_by_a_local_declaration_with_the_same_name: { code: 2437, category: 1 /* Error */, key: "Module '{0}' is hidden by a local declaration with the same name" }, - Import_name_cannot_be_0: { code: 2438, category: 1 /* Error */, key: "Import name cannot be '{0}'" }, - Import_declaration_in_an_ambient_external_module_declaration_cannot_reference_external_module_through_relative_external_module_name: { code: 2439, category: 1 /* Error */, key: "Import declaration in an ambient external module declaration cannot reference external module through relative external module name." }, - Import_declaration_conflicts_with_local_declaration_of_0: { code: 2440, category: 1 /* Error */, key: "Import declaration conflicts with local declaration of '{0}'" }, - Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_an_external_module: { code: 2441, category: 1 /* Error */, key: "Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of an external module." }, - Types_have_separate_declarations_of_a_private_property_0: { code: 2442, category: 1 /* Error */, key: "Types have separate declarations of a private property '{0}'." }, - Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2: { code: 2443, category: 1 /* Error */, key: "Property '{0}' is protected but type '{1}' is not a class derived from '{2}'." }, - Property_0_is_protected_in_type_1_but_public_in_type_2: { code: 2444, category: 1 /* Error */, key: "Property '{0}' is protected in type '{1}' but public in type '{2}'." }, - Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses: { code: 2445, category: 1 /* Error */, key: "Property '{0}' is protected and only accessible within class '{1}' and its subclasses." }, - Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1: { code: 2446, category: 1 /* Error */, key: "Property '{0}' is protected and only accessible through an instance of class '{1}'." }, - The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead: { code: 2447, category: 1 /* Error */, key: "The '{0}' operator is not allowed for boolean types. Consider using '{1}' instead." }, - Block_scoped_variable_0_used_before_its_declaration: { code: 2448, category: 1 /* Error */, key: "Block-scoped variable '{0}' used before its declaration.", isEarly: true }, - The_operand_of_an_increment_or_decrement_operator_cannot_be_a_constant: { code: 2449, category: 1 /* Error */, key: "The operand of an increment or decrement operator cannot be a constant.", isEarly: true }, - Left_hand_side_of_assignment_expression_cannot_be_a_constant: { code: 2450, category: 1 /* Error */, key: "Left-hand side of assignment expression cannot be a constant.", isEarly: true }, - Cannot_redeclare_block_scoped_variable_0: { code: 2451, category: 1 /* Error */, key: "Cannot redeclare block-scoped variable '{0}'.", isEarly: true }, - An_enum_member_cannot_have_a_numeric_name: { code: 2452, category: 1 /* Error */, key: "An enum member cannot have a numeric name." }, - The_type_argument_for_type_parameter_0_cannot_be_inferred_from_the_usage_Consider_specifying_the_type_arguments_explicitly: { code: 2453, category: 1 /* Error */, key: "The type argument for type parameter '{0}' cannot be inferred from the usage. Consider specifying the type arguments explicitly." }, - Type_argument_candidate_1_is_not_a_valid_type_argument_because_it_is_not_a_supertype_of_candidate_0: { code: 2455, category: 1 /* Error */, key: "Type argument candidate '{1}' is not a valid type argument because it is not a supertype of candidate '{0}'." }, - Type_alias_0_circularly_references_itself: { code: 2456, category: 1 /* Error */, key: "Type alias '{0}' circularly references itself." }, - Type_alias_name_cannot_be_0: { code: 2457, category: 1 /* Error */, key: "Type alias name cannot be '{0}'" }, - Import_declaration_0_is_using_private_name_1: { code: 4000, category: 1 /* Error */, key: "Import declaration '{0}' is using private name '{1}'." }, - Type_parameter_0_of_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 4001, category: 1 /* Error */, key: "Type parameter '{0}' of exported class has or is using name '{1}' from private module '{2}'." }, - Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: { code: 4002, category: 1 /* Error */, key: "Type parameter '{0}' of exported class has or is using private name '{1}'." }, - Type_parameter_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2: { code: 4003, category: 1 /* Error */, key: "Type parameter '{0}' of exported interface has or is using name '{1}' from private module '{2}'." }, - Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: { code: 4004, category: 1 /* Error */, key: "Type parameter '{0}' of exported interface has or is using private name '{1}'." }, - Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2: { code: 4005, category: 1 /* Error */, key: "Type parameter '{0}' of constructor signature from exported interface has or is using name '{1}' from private module '{2}'." }, - Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1: { code: 4006, category: 1 /* Error */, key: "Type parameter '{0}' of constructor signature from exported interface has or is using private name '{1}'." }, - Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2: { code: 4007, category: 1 /* Error */, key: "Type parameter '{0}' of call signature from exported interface has or is using name '{1}' from private module '{2}'." }, - Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1: { code: 4008, category: 1 /* Error */, key: "Type parameter '{0}' of call signature from exported interface has or is using private name '{1}'." }, - Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 4009, category: 1 /* Error */, key: "Type parameter '{0}' of public static method from exported class has or is using name '{1}' from private module '{2}'." }, - Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1: { code: 4010, category: 1 /* Error */, key: "Type parameter '{0}' of public static method from exported class has or is using private name '{1}'." }, - Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 4011, category: 1 /* Error */, key: "Type parameter '{0}' of public method from exported class has or is using name '{1}' from private module '{2}'." }, - Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1: { code: 4012, category: 1 /* Error */, key: "Type parameter '{0}' of public method from exported class has or is using private name '{1}'." }, - Type_parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2: { code: 4013, category: 1 /* Error */, key: "Type parameter '{0}' of method from exported interface has or is using name '{1}' from private module '{2}'." }, - Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1: { code: 4014, category: 1 /* Error */, key: "Type parameter '{0}' of method from exported interface has or is using private name '{1}'." }, - Type_parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2: { code: 4015, category: 1 /* Error */, key: "Type parameter '{0}' of exported function has or is using name '{1}' from private module '{2}'." }, - Type_parameter_0_of_exported_function_has_or_is_using_private_name_1: { code: 4016, category: 1 /* Error */, key: "Type parameter '{0}' of exported function has or is using private name '{1}'." }, - Implements_clause_of_exported_class_0_has_or_is_using_name_1_from_private_module_2: { code: 4017, category: 1 /* Error */, key: "Implements clause of exported class '{0}' has or is using name '{1}' from private module '{2}'." }, - Extends_clause_of_exported_class_0_has_or_is_using_name_1_from_private_module_2: { code: 4018, category: 1 /* Error */, key: "Extends clause of exported class '{0}' has or is using name '{1}' from private module '{2}'." }, - Implements_clause_of_exported_class_0_has_or_is_using_private_name_1: { code: 4019, category: 1 /* Error */, key: "Implements clause of exported class '{0}' has or is using private name '{1}'." }, - Extends_clause_of_exported_class_0_has_or_is_using_private_name_1: { code: 4020, category: 1 /* Error */, key: "Extends clause of exported class '{0}' has or is using private name '{1}'." }, - Extends_clause_of_exported_interface_0_has_or_is_using_name_1_from_private_module_2: { code: 4021, category: 1 /* Error */, key: "Extends clause of exported interface '{0}' has or is using name '{1}' from private module '{2}'." }, - Extends_clause_of_exported_interface_0_has_or_is_using_private_name_1: { code: 4022, category: 1 /* Error */, key: "Extends clause of exported interface '{0}' has or is using private name '{1}'." }, - Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: { code: 4023, category: 1 /* Error */, key: "Exported variable '{0}' has or is using name '{1}' from external module {2} but cannot be named." }, - Exported_variable_0_has_or_is_using_name_1_from_private_module_2: { code: 4024, category: 1 /* Error */, key: "Exported variable '{0}' has or is using name '{1}' from private module '{2}'." }, - Exported_variable_0_has_or_is_using_private_name_1: { code: 4025, category: 1 /* Error */, key: "Exported variable '{0}' has or is using private name '{1}'." }, - Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: { code: 4026, category: 1 /* Error */, key: "Public static property '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named." }, - Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 4027, category: 1 /* Error */, key: "Public static property '{0}' of exported class has or is using name '{1}' from private module '{2}'." }, - Public_static_property_0_of_exported_class_has_or_is_using_private_name_1: { code: 4028, category: 1 /* Error */, key: "Public static property '{0}' of exported class has or is using private name '{1}'." }, - Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: { code: 4029, category: 1 /* Error */, key: "Public property '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named." }, - Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 4030, category: 1 /* Error */, key: "Public property '{0}' of exported class has or is using name '{1}' from private module '{2}'." }, - Public_property_0_of_exported_class_has_or_is_using_private_name_1: { code: 4031, category: 1 /* Error */, key: "Public property '{0}' of exported class has or is using private name '{1}'." }, - Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2: { code: 4032, category: 1 /* Error */, key: "Property '{0}' of exported interface has or is using name '{1}' from private module '{2}'." }, - Property_0_of_exported_interface_has_or_is_using_private_name_1: { code: 4033, category: 1 /* Error */, key: "Property '{0}' of exported interface has or is using private name '{1}'." }, - Parameter_0_of_public_static_property_setter_from_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 4034, category: 1 /* Error */, key: "Parameter '{0}' of public static property setter from exported class has or is using name '{1}' from private module '{2}'." }, - Parameter_0_of_public_static_property_setter_from_exported_class_has_or_is_using_private_name_1: { code: 4035, category: 1 /* Error */, key: "Parameter '{0}' of public static property setter from exported class has or is using private name '{1}'." }, - Parameter_0_of_public_property_setter_from_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 4036, category: 1 /* Error */, key: "Parameter '{0}' of public property setter from exported class has or is using name '{1}' from private module '{2}'." }, - Parameter_0_of_public_property_setter_from_exported_class_has_or_is_using_private_name_1: { code: 4037, category: 1 /* Error */, key: "Parameter '{0}' of public property setter from exported class has or is using private name '{1}'." }, - Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: { code: 4038, category: 1 /* Error */, key: "Return type of public static property getter from exported class has or is using name '{0}' from external module {1} but cannot be named." }, - Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_name_0_from_private_module_1: { code: 4039, category: 1 /* Error */, key: "Return type of public static property getter from exported class has or is using name '{0}' from private module '{1}'." }, - Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_private_name_0: { code: 4040, category: 1 /* Error */, key: "Return type of public static property getter from exported class has or is using private name '{0}'." }, - Return_type_of_public_property_getter_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: { code: 4041, category: 1 /* Error */, key: "Return type of public property getter from exported class has or is using name '{0}' from external module {1} but cannot be named." }, - Return_type_of_public_property_getter_from_exported_class_has_or_is_using_name_0_from_private_module_1: { code: 4042, category: 1 /* Error */, key: "Return type of public property getter from exported class has or is using name '{0}' from private module '{1}'." }, - Return_type_of_public_property_getter_from_exported_class_has_or_is_using_private_name_0: { code: 4043, category: 1 /* Error */, key: "Return type of public property getter from exported class has or is using private name '{0}'." }, - Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1: { code: 4044, category: 1 /* Error */, key: "Return type of constructor signature from exported interface has or is using name '{0}' from private module '{1}'." }, - Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0: { code: 4045, category: 1 /* Error */, key: "Return type of constructor signature from exported interface has or is using private name '{0}'." }, - Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1: { code: 4046, category: 1 /* Error */, key: "Return type of call signature from exported interface has or is using name '{0}' from private module '{1}'." }, - Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0: { code: 4047, category: 1 /* Error */, key: "Return type of call signature from exported interface has or is using private name '{0}'." }, - Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1: { code: 4048, category: 1 /* Error */, key: "Return type of index signature from exported interface has or is using name '{0}' from private module '{1}'." }, - Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0: { code: 4049, category: 1 /* Error */, key: "Return type of index signature from exported interface has or is using private name '{0}'." }, - Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: { code: 4050, category: 1 /* Error */, key: "Return type of public static method from exported class has or is using name '{0}' from external module {1} but cannot be named." }, - Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1: { code: 4051, category: 1 /* Error */, key: "Return type of public static method from exported class has or is using name '{0}' from private module '{1}'." }, - Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0: { code: 4052, category: 1 /* Error */, key: "Return type of public static method from exported class has or is using private name '{0}'." }, - Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: { code: 4053, category: 1 /* Error */, key: "Return type of public method from exported class has or is using name '{0}' from external module {1} but cannot be named." }, - Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1: { code: 4054, category: 1 /* Error */, key: "Return type of public method from exported class has or is using name '{0}' from private module '{1}'." }, - Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0: { code: 4055, category: 1 /* Error */, key: "Return type of public method from exported class has or is using private name '{0}'." }, - Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1: { code: 4056, category: 1 /* Error */, key: "Return type of method from exported interface has or is using name '{0}' from private module '{1}'." }, - Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0: { code: 4057, category: 1 /* Error */, key: "Return type of method from exported interface has or is using private name '{0}'." }, - Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: { code: 4058, category: 1 /* Error */, key: "Return type of exported function has or is using name '{0}' from external module {1} but cannot be named." }, - Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1: { code: 4059, category: 1 /* Error */, key: "Return type of exported function has or is using name '{0}' from private module '{1}'." }, - Return_type_of_exported_function_has_or_is_using_private_name_0: { code: 4060, category: 1 /* Error */, key: "Return type of exported function has or is using private name '{0}'." }, - Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: { code: 4061, category: 1 /* Error */, key: "Parameter '{0}' of constructor from exported class has or is using name '{1}' from external module {2} but cannot be named." }, - Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 4062, category: 1 /* Error */, key: "Parameter '{0}' of constructor from exported class has or is using name '{1}' from private module '{2}'." }, - Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1: { code: 4063, category: 1 /* Error */, key: "Parameter '{0}' of constructor from exported class has or is using private name '{1}'." }, - Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2: { code: 4064, category: 1 /* Error */, key: "Parameter '{0}' of constructor signature from exported interface has or is using name '{1}' from private module '{2}'." }, - Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1: { code: 4065, category: 1 /* Error */, key: "Parameter '{0}' of constructor signature from exported interface has or is using private name '{1}'." }, - Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2: { code: 4066, category: 1 /* Error */, key: "Parameter '{0}' of call signature from exported interface has or is using name '{1}' from private module '{2}'." }, - Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1: { code: 4067, category: 1 /* Error */, key: "Parameter '{0}' of call signature from exported interface has or is using private name '{1}'." }, - Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: { code: 4068, category: 1 /* Error */, key: "Parameter '{0}' of public static method from exported class has or is using name '{1}' from external module {2} but cannot be named." }, - Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 4069, category: 1 /* Error */, key: "Parameter '{0}' of public static method from exported class has or is using name '{1}' from private module '{2}'." }, - Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1: { code: 4070, category: 1 /* Error */, key: "Parameter '{0}' of public static method from exported class has or is using private name '{1}'." }, - Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: { code: 4071, category: 1 /* Error */, key: "Parameter '{0}' of public method from exported class has or is using name '{1}' from external module {2} but cannot be named." }, - Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 4072, category: 1 /* Error */, key: "Parameter '{0}' of public method from exported class has or is using name '{1}' from private module '{2}'." }, - Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1: { code: 4073, category: 1 /* Error */, key: "Parameter '{0}' of public method from exported class has or is using private name '{1}'." }, - Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2: { code: 4074, category: 1 /* Error */, key: "Parameter '{0}' of method from exported interface has or is using name '{1}' from private module '{2}'." }, - Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1: { code: 4075, category: 1 /* Error */, key: "Parameter '{0}' of method from exported interface has or is using private name '{1}'." }, - Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: { code: 4076, category: 1 /* Error */, key: "Parameter '{0}' of exported function has or is using name '{1}' from external module {2} but cannot be named." }, - Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2: { code: 4077, category: 1 /* Error */, key: "Parameter '{0}' of exported function has or is using name '{1}' from private module '{2}'." }, - Parameter_0_of_exported_function_has_or_is_using_private_name_1: { code: 4078, category: 1 /* Error */, key: "Parameter '{0}' of exported function has or is using private name '{1}'." }, - Exported_type_alias_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: { code: 4079, category: 1 /* Error */, key: "Exported type alias '{0}' has or is using name '{1}' from external module {2} but cannot be named." }, - Exported_type_alias_0_has_or_is_using_name_1_from_private_module_2: { code: 4080, category: 1 /* Error */, key: "Exported type alias '{0}' has or is using name '{1}' from private module '{2}'." }, - Exported_type_alias_0_has_or_is_using_private_name_1: { code: 4081, category: 1 /* Error */, key: "Exported type alias '{0}' has or is using private name '{1}'." }, - Enum_declarations_must_all_be_const_or_non_const: { code: 4082, category: 1 /* Error */, key: "Enum declarations must all be const or non-const." }, - In_const_enum_declarations_member_initializer_must_be_constant_expression: { code: 4083, category: 1 /* Error */, key: "In 'const' enum declarations member initializer must be constant expression.", isEarly: true }, - const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment: { code: 4084, category: 1 /* Error */, key: "'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment." }, - Index_expression_arguments_in_const_enums_must_be_of_type_string: { code: 4085, category: 1 /* Error */, key: "Index expression arguments in 'const' enums must be of type 'string'." }, - const_enum_member_initializer_was_evaluated_to_a_non_finite_value: { code: 4086, category: 1 /* Error */, key: "'const' enum member initializer was evaluated to a non-finite value." }, - const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN: { code: 4087, category: 1 /* Error */, key: "'const' enum member initializer was evaluated to disallowed value 'NaN'." }, - The_current_host_does_not_support_the_0_option: { code: 5001, category: 1 /* Error */, key: "The current host does not support the '{0}' option." }, - Cannot_find_the_common_subdirectory_path_for_the_input_files: { code: 5009, category: 1 /* Error */, key: "Cannot find the common subdirectory path for the input files." }, - Cannot_read_file_0_Colon_1: { code: 5012, category: 1 /* Error */, key: "Cannot read file '{0}': {1}" }, - Unsupported_file_encoding: { code: 5013, category: 1 /* Error */, key: "Unsupported file encoding." }, - Unknown_compiler_option_0: { code: 5023, category: 1 /* Error */, key: "Unknown compiler option '{0}'." }, - Could_not_write_file_0_Colon_1: { code: 5033, category: 1 /* Error */, key: "Could not write file '{0}': {1}" }, - Option_mapRoot_cannot_be_specified_without_specifying_sourcemap_option: { code: 5038, category: 1 /* Error */, key: "Option mapRoot cannot be specified without specifying sourcemap option." }, - Option_sourceRoot_cannot_be_specified_without_specifying_sourcemap_option: { code: 5039, category: 1 /* Error */, key: "Option sourceRoot cannot be specified without specifying sourcemap option." }, - Concatenate_and_emit_output_to_single_file: { code: 6001, category: 2 /* Message */, key: "Concatenate and emit output to single file." }, - Generates_corresponding_d_ts_file: { code: 6002, category: 2 /* Message */, key: "Generates corresponding '.d.ts' file." }, - Specifies_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations: { code: 6003, category: 2 /* Message */, key: "Specifies the location where debugger should locate map files instead of generated locations." }, - Specifies_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations: { code: 6004, category: 2 /* Message */, key: "Specifies the location where debugger should locate TypeScript files instead of source locations." }, - Watch_input_files: { code: 6005, category: 2 /* Message */, key: "Watch input files." }, - Redirect_output_structure_to_the_directory: { code: 6006, category: 2 /* Message */, key: "Redirect output structure to the directory." }, - Do_not_erase_const_enum_declarations_in_generated_code: { code: 6007, category: 2 /* Message */, key: "Do not erase const enum declarations in generated code." }, - Do_not_emit_comments_to_output: { code: 6009, category: 2 /* Message */, key: "Do not emit comments to output." }, - Specify_ECMAScript_target_version_Colon_ES3_default_ES5_or_ES6_experimental: { code: 6015, category: 2 /* Message */, key: "Specify ECMAScript target version: 'ES3' (default), 'ES5', or 'ES6' (experimental)" }, - Specify_module_code_generation_Colon_commonjs_or_amd: { code: 6016, category: 2 /* Message */, key: "Specify module code generation: 'commonjs' or 'amd'" }, - Print_this_message: { code: 6017, category: 2 /* Message */, key: "Print this message." }, - Print_the_compiler_s_version: { code: 6019, category: 2 /* Message */, key: "Print the compiler's version." }, - Syntax_Colon_0: { code: 6023, category: 2 /* Message */, key: "Syntax: {0}" }, - options: { code: 6024, category: 2 /* Message */, key: "options" }, - file: { code: 6025, category: 2 /* Message */, key: "file" }, - Examples_Colon_0: { code: 6026, category: 2 /* Message */, key: "Examples: {0}" }, - Options_Colon: { code: 6027, category: 2 /* Message */, key: "Options:" }, - Version_0: { code: 6029, category: 2 /* Message */, key: "Version {0}" }, - Insert_command_line_options_and_files_from_a_file: { code: 6030, category: 2 /* Message */, key: "Insert command line options and files from a file." }, - File_change_detected_Compiling: { code: 6032, category: 2 /* Message */, key: "File change detected. Compiling..." }, - KIND: { code: 6034, category: 2 /* Message */, key: "KIND" }, - FILE: { code: 6035, category: 2 /* Message */, key: "FILE" }, - VERSION: { code: 6036, category: 2 /* Message */, key: "VERSION" }, - LOCATION: { code: 6037, category: 2 /* Message */, key: "LOCATION" }, - DIRECTORY: { code: 6038, category: 2 /* Message */, key: "DIRECTORY" }, - Compilation_complete_Watching_for_file_changes: { code: 6042, category: 2 /* Message */, key: "Compilation complete. Watching for file changes." }, - Generates_corresponding_map_file: { code: 6043, category: 2 /* Message */, key: "Generates corresponding '.map' file." }, - Compiler_option_0_expects_an_argument: { code: 6044, category: 1 /* Error */, key: "Compiler option '{0}' expects an argument." }, - Unterminated_quoted_string_in_response_file_0: { code: 6045, category: 1 /* Error */, key: "Unterminated quoted string in response file '{0}'." }, - Argument_for_module_option_must_be_commonjs_or_amd: { code: 6046, category: 1 /* Error */, key: "Argument for '--module' option must be 'commonjs' or 'amd'." }, - Argument_for_target_option_must_be_es3_es5_or_es6: { code: 6047, category: 1 /* Error */, key: "Argument for '--target' option must be 'es3', 'es5', or 'es6'." }, - Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1: { code: 6048, category: 1 /* Error */, key: "Locale must be of the form or -. For example '{0}' or '{1}'." }, - Unsupported_locale_0: { code: 6049, category: 1 /* Error */, key: "Unsupported locale '{0}'." }, - Unable_to_open_file_0: { code: 6050, category: 1 /* Error */, key: "Unable to open file '{0}'." }, - Corrupted_locale_file_0: { code: 6051, category: 1 /* Error */, key: "Corrupted locale file {0}." }, - Warn_on_expressions_and_declarations_with_an_implied_any_type: { code: 6052, category: 2 /* Message */, key: "Warn on expressions and declarations with an implied 'any' type." }, - File_0_not_found: { code: 6053, category: 1 /* Error */, key: "File '{0}' not found." }, - File_0_must_have_extension_ts_or_d_ts: { code: 6054, category: 1 /* Error */, key: "File '{0}' must have extension '.ts' or '.d.ts'." }, - Variable_0_implicitly_has_an_1_type: { code: 7005, category: 1 /* Error */, key: "Variable '{0}' implicitly has an '{1}' type." }, - Parameter_0_implicitly_has_an_1_type: { code: 7006, category: 1 /* Error */, key: "Parameter '{0}' implicitly has an '{1}' type." }, - Member_0_implicitly_has_an_1_type: { code: 7008, category: 1 /* Error */, key: "Member '{0}' implicitly has an '{1}' type." }, - new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type: { code: 7009, category: 1 /* Error */, key: "'new' expression, whose target lacks a construct signature, implicitly has an 'any' type." }, - _0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type: { code: 7010, category: 1 /* Error */, key: "'{0}', which lacks return-type annotation, implicitly has an '{1}' return type." }, - Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type: { code: 7011, category: 1 /* Error */, key: "Function expression, which lacks return-type annotation, implicitly has an '{0}' return type." }, - Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type: { code: 7013, category: 1 /* Error */, key: "Construct signature, which lacks return-type annotation, implicitly has an 'any' return type." }, - Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_type_annotation: { code: 7016, category: 1 /* Error */, key: "Property '{0}' implicitly has type 'any', because its 'set' accessor lacks a type annotation." }, - Index_signature_of_object_type_implicitly_has_an_any_type: { code: 7017, category: 1 /* Error */, key: "Index signature of object type implicitly has an 'any' type." }, - Object_literal_s_property_0_implicitly_has_an_1_type: { code: 7018, category: 1 /* Error */, key: "Object literal's property '{0}' implicitly has an '{1}' type." }, - Rest_parameter_0_implicitly_has_an_any_type: { code: 7019, category: 1 /* Error */, key: "Rest parameter '{0}' implicitly has an 'any[]' type." }, - Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type: { code: 7020, category: 1 /* Error */, key: "Call signature, which lacks return-type annotation, implicitly has an 'any' return type." }, - _0_implicitly_has_type_any_because_it_is_referenced_directly_or_indirectly_in_its_own_type_annotation: { code: 7021, category: 1 /* Error */, key: "'{0}' implicitly has type 'any' because it is referenced directly or indirectly in its own type annotation." }, - _0_implicitly_has_type_any_because_it_is_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer: { code: 7022, category: 1 /* Error */, key: "'{0}' implicitly has type 'any' because it is does not have a type annotation and is referenced directly or indirectly in its own initializer." }, - _0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions: { code: 7023, category: 1 /* Error */, key: "'{0}' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions." }, - Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions: { code: 7024, category: 1 /* Error */, key: "Function implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions." }, - You_cannot_rename_this_element: { code: 8000, category: 1 /* Error */, key: "You cannot rename this element." } - }; -})(ts || (ts = {})); -var ts; -(function (ts) { - var textToToken = { - "any": 109 /* AnyKeyword */, - "boolean": 110 /* BooleanKeyword */, - "break": 64 /* BreakKeyword */, - "case": 65 /* CaseKeyword */, - "catch": 66 /* CatchKeyword */, - "class": 67 /* ClassKeyword */, - "continue": 69 /* ContinueKeyword */, - "const": 68 /* ConstKeyword */, - "constructor": 111 /* ConstructorKeyword */, - "debugger": 70 /* DebuggerKeyword */, - "declare": 112 /* DeclareKeyword */, - "default": 71 /* DefaultKeyword */, - "delete": 72 /* DeleteKeyword */, - "do": 73 /* DoKeyword */, - "else": 74 /* ElseKeyword */, - "enum": 75 /* EnumKeyword */, - "export": 76 /* ExportKeyword */, - "extends": 77 /* ExtendsKeyword */, - "false": 78 /* FalseKeyword */, - "finally": 79 /* FinallyKeyword */, - "for": 80 /* ForKeyword */, - "function": 81 /* FunctionKeyword */, - "get": 113 /* GetKeyword */, - "if": 82 /* IfKeyword */, - "implements": 100 /* ImplementsKeyword */, - "import": 83 /* ImportKeyword */, - "in": 84 /* InKeyword */, - "instanceof": 85 /* InstanceOfKeyword */, - "interface": 101 /* InterfaceKeyword */, - "let": 102 /* LetKeyword */, - "module": 114 /* ModuleKeyword */, - "new": 86 /* NewKeyword */, - "null": 87 /* NullKeyword */, - "number": 116 /* NumberKeyword */, - "package": 103 /* PackageKeyword */, - "private": 104 /* PrivateKeyword */, - "protected": 105 /* ProtectedKeyword */, - "public": 106 /* PublicKeyword */, - "require": 115 /* RequireKeyword */, - "return": 88 /* ReturnKeyword */, - "set": 117 /* SetKeyword */, - "static": 107 /* StaticKeyword */, - "string": 118 /* StringKeyword */, - "super": 89 /* SuperKeyword */, - "switch": 90 /* SwitchKeyword */, - "this": 91 /* ThisKeyword */, - "throw": 92 /* ThrowKeyword */, - "true": 93 /* TrueKeyword */, - "try": 94 /* TryKeyword */, - "type": 119 /* TypeKeyword */, - "typeof": 95 /* TypeOfKeyword */, - "var": 96 /* VarKeyword */, - "void": 97 /* VoidKeyword */, - "while": 98 /* WhileKeyword */, - "with": 99 /* WithKeyword */, - "yield": 108 /* YieldKeyword */, - "{": 13 /* OpenBraceToken */, - "}": 14 /* CloseBraceToken */, - "(": 15 /* OpenParenToken */, - ")": 16 /* CloseParenToken */, - "[": 17 /* OpenBracketToken */, - "]": 18 /* CloseBracketToken */, - ".": 19 /* DotToken */, - "...": 20 /* DotDotDotToken */, - ";": 21 /* SemicolonToken */, - ",": 22 /* CommaToken */, - "<": 23 /* LessThanToken */, - ">": 24 /* GreaterThanToken */, - "<=": 25 /* LessThanEqualsToken */, - ">=": 26 /* GreaterThanEqualsToken */, - "==": 27 /* EqualsEqualsToken */, - "!=": 28 /* ExclamationEqualsToken */, - "===": 29 /* EqualsEqualsEqualsToken */, - "!==": 30 /* ExclamationEqualsEqualsToken */, - "=>": 31 /* EqualsGreaterThanToken */, - "+": 32 /* PlusToken */, - "-": 33 /* MinusToken */, - "*": 34 /* AsteriskToken */, - "/": 35 /* SlashToken */, - "%": 36 /* PercentToken */, - "++": 37 /* PlusPlusToken */, - "--": 38 /* MinusMinusToken */, - "<<": 39 /* LessThanLessThanToken */, - ">>": 40 /* GreaterThanGreaterThanToken */, - ">>>": 41 /* GreaterThanGreaterThanGreaterThanToken */, - "&": 42 /* AmpersandToken */, - "|": 43 /* BarToken */, - "^": 44 /* CaretToken */, - "!": 45 /* ExclamationToken */, - "~": 46 /* TildeToken */, - "&&": 47 /* AmpersandAmpersandToken */, - "||": 48 /* BarBarToken */, - "?": 49 /* QuestionToken */, - ":": 50 /* ColonToken */, - "=": 51 /* EqualsToken */, - "+=": 52 /* PlusEqualsToken */, - "-=": 53 /* MinusEqualsToken */, - "*=": 54 /* AsteriskEqualsToken */, - "/=": 55 /* SlashEqualsToken */, - "%=": 56 /* PercentEqualsToken */, - "<<=": 57 /* LessThanLessThanEqualsToken */, - ">>=": 58 /* GreaterThanGreaterThanEqualsToken */, - ">>>=": 59 /* GreaterThanGreaterThanGreaterThanEqualsToken */, - "&=": 60 /* AmpersandEqualsToken */, - "|=": 61 /* BarEqualsToken */, - "^=": 62 /* CaretEqualsToken */ - }; - var unicodeES3IdentifierStart = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 543, 546, 563, 592, 685, 688, 696, 699, 705, 720, 721, 736, 740, 750, 750, 890, 890, 902, 902, 904, 906, 908, 908, 910, 929, 931, 974, 976, 983, 986, 1011, 1024, 1153, 1164, 1220, 1223, 1224, 1227, 1228, 1232, 1269, 1272, 1273, 1329, 1366, 1369, 1369, 1377, 1415, 1488, 1514, 1520, 1522, 1569, 1594, 1600, 1610, 1649, 1747, 1749, 1749, 1765, 1766, 1786, 1788, 1808, 1808, 1810, 1836, 1920, 1957, 2309, 2361, 2365, 2365, 2384, 2384, 2392, 2401, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2524, 2525, 2527, 2529, 2544, 2545, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2649, 2652, 2654, 2654, 2674, 2676, 2693, 2699, 2701, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2749, 2749, 2768, 2768, 2784, 2784, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2870, 2873, 2877, 2877, 2908, 2909, 2911, 2913, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 2997, 2999, 3001, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3168, 3169, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3294, 3294, 3296, 3297, 3333, 3340, 3342, 3344, 3346, 3368, 3370, 3385, 3424, 3425, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3585, 3632, 3634, 3635, 3648, 3654, 3713, 3714, 3716, 3716, 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743, 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3760, 3762, 3763, 3773, 3773, 3776, 3780, 3782, 3782, 3804, 3805, 3840, 3840, 3904, 3911, 3913, 3946, 3976, 3979, 4096, 4129, 4131, 4135, 4137, 4138, 4176, 4181, 4256, 4293, 4304, 4342, 4352, 4441, 4447, 4514, 4520, 4601, 4608, 4614, 4616, 4678, 4680, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4742, 4744, 4744, 4746, 4749, 4752, 4782, 4784, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4814, 4816, 4822, 4824, 4846, 4848, 4878, 4880, 4880, 4882, 4885, 4888, 4894, 4896, 4934, 4936, 4954, 5024, 5108, 5121, 5740, 5743, 5750, 5761, 5786, 5792, 5866, 6016, 6067, 6176, 6263, 6272, 6312, 7680, 7835, 7840, 7929, 7936, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8319, 8319, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8497, 8499, 8505, 8544, 8579, 12293, 12295, 12321, 12329, 12337, 12341, 12344, 12346, 12353, 12436, 12445, 12446, 12449, 12538, 12540, 12542, 12549, 12588, 12593, 12686, 12704, 12727, 13312, 19893, 19968, 40869, 40960, 42124, 44032, 55203, 63744, 64045, 64256, 64262, 64275, 64279, 64285, 64285, 64287, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65136, 65138, 65140, 65140, 65142, 65276, 65313, 65338, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500,]; - var unicodeES3IdentifierPart = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 543, 546, 563, 592, 685, 688, 696, 699, 705, 720, 721, 736, 740, 750, 750, 768, 846, 864, 866, 890, 890, 902, 902, 904, 906, 908, 908, 910, 929, 931, 974, 976, 983, 986, 1011, 1024, 1153, 1155, 1158, 1164, 1220, 1223, 1224, 1227, 1228, 1232, 1269, 1272, 1273, 1329, 1366, 1369, 1369, 1377, 1415, 1425, 1441, 1443, 1465, 1467, 1469, 1471, 1471, 1473, 1474, 1476, 1476, 1488, 1514, 1520, 1522, 1569, 1594, 1600, 1621, 1632, 1641, 1648, 1747, 1749, 1756, 1759, 1768, 1770, 1773, 1776, 1788, 1808, 1836, 1840, 1866, 1920, 1968, 2305, 2307, 2309, 2361, 2364, 2381, 2384, 2388, 2392, 2403, 2406, 2415, 2433, 2435, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2492, 2492, 2494, 2500, 2503, 2504, 2507, 2509, 2519, 2519, 2524, 2525, 2527, 2531, 2534, 2545, 2562, 2562, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2620, 2620, 2622, 2626, 2631, 2632, 2635, 2637, 2649, 2652, 2654, 2654, 2662, 2676, 2689, 2691, 2693, 2699, 2701, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2748, 2757, 2759, 2761, 2763, 2765, 2768, 2768, 2784, 2784, 2790, 2799, 2817, 2819, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2870, 2873, 2876, 2883, 2887, 2888, 2891, 2893, 2902, 2903, 2908, 2909, 2911, 2913, 2918, 2927, 2946, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 2997, 2999, 3001, 3006, 3010, 3014, 3016, 3018, 3021, 3031, 3031, 3047, 3055, 3073, 3075, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3134, 3140, 3142, 3144, 3146, 3149, 3157, 3158, 3168, 3169, 3174, 3183, 3202, 3203, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3262, 3268, 3270, 3272, 3274, 3277, 3285, 3286, 3294, 3294, 3296, 3297, 3302, 3311, 3330, 3331, 3333, 3340, 3342, 3344, 3346, 3368, 3370, 3385, 3390, 3395, 3398, 3400, 3402, 3405, 3415, 3415, 3424, 3425, 3430, 3439, 3458, 3459, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3530, 3530, 3535, 3540, 3542, 3542, 3544, 3551, 3570, 3571, 3585, 3642, 3648, 3662, 3664, 3673, 3713, 3714, 3716, 3716, 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743, 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3769, 3771, 3773, 3776, 3780, 3782, 3782, 3784, 3789, 3792, 3801, 3804, 3805, 3840, 3840, 3864, 3865, 3872, 3881, 3893, 3893, 3895, 3895, 3897, 3897, 3902, 3911, 3913, 3946, 3953, 3972, 3974, 3979, 3984, 3991, 3993, 4028, 4038, 4038, 4096, 4129, 4131, 4135, 4137, 4138, 4140, 4146, 4150, 4153, 4160, 4169, 4176, 4185, 4256, 4293, 4304, 4342, 4352, 4441, 4447, 4514, 4520, 4601, 4608, 4614, 4616, 4678, 4680, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4742, 4744, 4744, 4746, 4749, 4752, 4782, 4784, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4814, 4816, 4822, 4824, 4846, 4848, 4878, 4880, 4880, 4882, 4885, 4888, 4894, 4896, 4934, 4936, 4954, 4969, 4977, 5024, 5108, 5121, 5740, 5743, 5750, 5761, 5786, 5792, 5866, 6016, 6099, 6112, 6121, 6160, 6169, 6176, 6263, 6272, 6313, 7680, 7835, 7840, 7929, 7936, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8255, 8256, 8319, 8319, 8400, 8412, 8417, 8417, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8497, 8499, 8505, 8544, 8579, 12293, 12295, 12321, 12335, 12337, 12341, 12344, 12346, 12353, 12436, 12441, 12442, 12445, 12446, 12449, 12542, 12549, 12588, 12593, 12686, 12704, 12727, 13312, 19893, 19968, 40869, 40960, 42124, 44032, 55203, 63744, 64045, 64256, 64262, 64275, 64279, 64285, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65056, 65059, 65075, 65076, 65101, 65103, 65136, 65138, 65140, 65140, 65142, 65276, 65296, 65305, 65313, 65338, 65343, 65343, 65345, 65370, 65381, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500,]; - var unicodeES5IdentifierStart = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 705, 710, 721, 736, 740, 748, 748, 750, 750, 880, 884, 886, 887, 890, 893, 902, 902, 904, 906, 908, 908, 910, 929, 931, 1013, 1015, 1153, 1162, 1319, 1329, 1366, 1369, 1369, 1377, 1415, 1488, 1514, 1520, 1522, 1568, 1610, 1646, 1647, 1649, 1747, 1749, 1749, 1765, 1766, 1774, 1775, 1786, 1788, 1791, 1791, 1808, 1808, 1810, 1839, 1869, 1957, 1969, 1969, 1994, 2026, 2036, 2037, 2042, 2042, 2048, 2069, 2074, 2074, 2084, 2084, 2088, 2088, 2112, 2136, 2208, 2208, 2210, 2220, 2308, 2361, 2365, 2365, 2384, 2384, 2392, 2401, 2417, 2423, 2425, 2431, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2493, 2493, 2510, 2510, 2524, 2525, 2527, 2529, 2544, 2545, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2649, 2652, 2654, 2654, 2674, 2676, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2749, 2749, 2768, 2768, 2784, 2785, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2869, 2873, 2877, 2877, 2908, 2909, 2911, 2913, 2929, 2929, 2947, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3024, 3024, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3133, 3133, 3160, 3161, 3168, 3169, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3261, 3261, 3294, 3294, 3296, 3297, 3313, 3314, 3333, 3340, 3342, 3344, 3346, 3386, 3389, 3389, 3406, 3406, 3424, 3425, 3450, 3455, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3585, 3632, 3634, 3635, 3648, 3654, 3713, 3714, 3716, 3716, 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743, 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3760, 3762, 3763, 3773, 3773, 3776, 3780, 3782, 3782, 3804, 3807, 3840, 3840, 3904, 3911, 3913, 3948, 3976, 3980, 4096, 4138, 4159, 4159, 4176, 4181, 4186, 4189, 4193, 4193, 4197, 4198, 4206, 4208, 4213, 4225, 4238, 4238, 4256, 4293, 4295, 4295, 4301, 4301, 4304, 4346, 4348, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4822, 4824, 4880, 4882, 4885, 4888, 4954, 4992, 5007, 5024, 5108, 5121, 5740, 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5872, 5888, 5900, 5902, 5905, 5920, 5937, 5952, 5969, 5984, 5996, 5998, 6000, 6016, 6067, 6103, 6103, 6108, 6108, 6176, 6263, 6272, 6312, 6314, 6314, 6320, 6389, 6400, 6428, 6480, 6509, 6512, 6516, 6528, 6571, 6593, 6599, 6656, 6678, 6688, 6740, 6823, 6823, 6917, 6963, 6981, 6987, 7043, 7072, 7086, 7087, 7098, 7141, 7168, 7203, 7245, 7247, 7258, 7293, 7401, 7404, 7406, 7409, 7413, 7414, 7424, 7615, 7680, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8305, 8305, 8319, 8319, 8336, 8348, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8505, 8508, 8511, 8517, 8521, 8526, 8526, 8544, 8584, 11264, 11310, 11312, 11358, 11360, 11492, 11499, 11502, 11506, 11507, 11520, 11557, 11559, 11559, 11565, 11565, 11568, 11623, 11631, 11631, 11648, 11670, 11680, 11686, 11688, 11694, 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726, 11728, 11734, 11736, 11742, 11823, 11823, 12293, 12295, 12321, 12329, 12337, 12341, 12344, 12348, 12353, 12438, 12445, 12447, 12449, 12538, 12540, 12543, 12549, 12589, 12593, 12686, 12704, 12730, 12784, 12799, 13312, 19893, 19968, 40908, 40960, 42124, 42192, 42237, 42240, 42508, 42512, 42527, 42538, 42539, 42560, 42606, 42623, 42647, 42656, 42735, 42775, 42783, 42786, 42888, 42891, 42894, 42896, 42899, 42912, 42922, 43000, 43009, 43011, 43013, 43015, 43018, 43020, 43042, 43072, 43123, 43138, 43187, 43250, 43255, 43259, 43259, 43274, 43301, 43312, 43334, 43360, 43388, 43396, 43442, 43471, 43471, 43520, 43560, 43584, 43586, 43588, 43595, 43616, 43638, 43642, 43642, 43648, 43695, 43697, 43697, 43701, 43702, 43705, 43709, 43712, 43712, 43714, 43714, 43739, 43741, 43744, 43754, 43762, 43764, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43814, 43816, 43822, 43968, 44002, 44032, 55203, 55216, 55238, 55243, 55291, 63744, 64109, 64112, 64217, 64256, 64262, 64275, 64279, 64285, 64285, 64287, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65136, 65140, 65142, 65276, 65313, 65338, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500,]; - var unicodeES5IdentifierPart = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 705, 710, 721, 736, 740, 748, 748, 750, 750, 768, 884, 886, 887, 890, 893, 902, 902, 904, 906, 908, 908, 910, 929, 931, 1013, 1015, 1153, 1155, 1159, 1162, 1319, 1329, 1366, 1369, 1369, 1377, 1415, 1425, 1469, 1471, 1471, 1473, 1474, 1476, 1477, 1479, 1479, 1488, 1514, 1520, 1522, 1552, 1562, 1568, 1641, 1646, 1747, 1749, 1756, 1759, 1768, 1770, 1788, 1791, 1791, 1808, 1866, 1869, 1969, 1984, 2037, 2042, 2042, 2048, 2093, 2112, 2139, 2208, 2208, 2210, 2220, 2276, 2302, 2304, 2403, 2406, 2415, 2417, 2423, 2425, 2431, 2433, 2435, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2492, 2500, 2503, 2504, 2507, 2510, 2519, 2519, 2524, 2525, 2527, 2531, 2534, 2545, 2561, 2563, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2620, 2620, 2622, 2626, 2631, 2632, 2635, 2637, 2641, 2641, 2649, 2652, 2654, 2654, 2662, 2677, 2689, 2691, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2748, 2757, 2759, 2761, 2763, 2765, 2768, 2768, 2784, 2787, 2790, 2799, 2817, 2819, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2869, 2873, 2876, 2884, 2887, 2888, 2891, 2893, 2902, 2903, 2908, 2909, 2911, 2915, 2918, 2927, 2929, 2929, 2946, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3006, 3010, 3014, 3016, 3018, 3021, 3024, 3024, 3031, 3031, 3046, 3055, 3073, 3075, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3133, 3140, 3142, 3144, 3146, 3149, 3157, 3158, 3160, 3161, 3168, 3171, 3174, 3183, 3202, 3203, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3260, 3268, 3270, 3272, 3274, 3277, 3285, 3286, 3294, 3294, 3296, 3299, 3302, 3311, 3313, 3314, 3330, 3331, 3333, 3340, 3342, 3344, 3346, 3386, 3389, 3396, 3398, 3400, 3402, 3406, 3415, 3415, 3424, 3427, 3430, 3439, 3450, 3455, 3458, 3459, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3530, 3530, 3535, 3540, 3542, 3542, 3544, 3551, 3570, 3571, 3585, 3642, 3648, 3662, 3664, 3673, 3713, 3714, 3716, 3716, 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743, 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3769, 3771, 3773, 3776, 3780, 3782, 3782, 3784, 3789, 3792, 3801, 3804, 3807, 3840, 3840, 3864, 3865, 3872, 3881, 3893, 3893, 3895, 3895, 3897, 3897, 3902, 3911, 3913, 3948, 3953, 3972, 3974, 3991, 3993, 4028, 4038, 4038, 4096, 4169, 4176, 4253, 4256, 4293, 4295, 4295, 4301, 4301, 4304, 4346, 4348, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4822, 4824, 4880, 4882, 4885, 4888, 4954, 4957, 4959, 4992, 5007, 5024, 5108, 5121, 5740, 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5872, 5888, 5900, 5902, 5908, 5920, 5940, 5952, 5971, 5984, 5996, 5998, 6000, 6002, 6003, 6016, 6099, 6103, 6103, 6108, 6109, 6112, 6121, 6155, 6157, 6160, 6169, 6176, 6263, 6272, 6314, 6320, 6389, 6400, 6428, 6432, 6443, 6448, 6459, 6470, 6509, 6512, 6516, 6528, 6571, 6576, 6601, 6608, 6617, 6656, 6683, 6688, 6750, 6752, 6780, 6783, 6793, 6800, 6809, 6823, 6823, 6912, 6987, 6992, 7001, 7019, 7027, 7040, 7155, 7168, 7223, 7232, 7241, 7245, 7293, 7376, 7378, 7380, 7414, 7424, 7654, 7676, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8204, 8205, 8255, 8256, 8276, 8276, 8305, 8305, 8319, 8319, 8336, 8348, 8400, 8412, 8417, 8417, 8421, 8432, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8505, 8508, 8511, 8517, 8521, 8526, 8526, 8544, 8584, 11264, 11310, 11312, 11358, 11360, 11492, 11499, 11507, 11520, 11557, 11559, 11559, 11565, 11565, 11568, 11623, 11631, 11631, 11647, 11670, 11680, 11686, 11688, 11694, 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726, 11728, 11734, 11736, 11742, 11744, 11775, 11823, 11823, 12293, 12295, 12321, 12335, 12337, 12341, 12344, 12348, 12353, 12438, 12441, 12442, 12445, 12447, 12449, 12538, 12540, 12543, 12549, 12589, 12593, 12686, 12704, 12730, 12784, 12799, 13312, 19893, 19968, 40908, 40960, 42124, 42192, 42237, 42240, 42508, 42512, 42539, 42560, 42607, 42612, 42621, 42623, 42647, 42655, 42737, 42775, 42783, 42786, 42888, 42891, 42894, 42896, 42899, 42912, 42922, 43000, 43047, 43072, 43123, 43136, 43204, 43216, 43225, 43232, 43255, 43259, 43259, 43264, 43309, 43312, 43347, 43360, 43388, 43392, 43456, 43471, 43481, 43520, 43574, 43584, 43597, 43600, 43609, 43616, 43638, 43642, 43643, 43648, 43714, 43739, 43741, 43744, 43759, 43762, 43766, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43814, 43816, 43822, 43968, 44010, 44012, 44013, 44016, 44025, 44032, 55203, 55216, 55238, 55243, 55291, 63744, 64109, 64112, 64217, 64256, 64262, 64275, 64279, 64285, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65024, 65039, 65056, 65062, 65075, 65076, 65101, 65103, 65136, 65140, 65142, 65276, 65296, 65305, 65313, 65338, 65343, 65343, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500,]; - function lookupInUnicodeMap(code, map) { - if (code < map[0]) { - return false; - } - var lo = 0; - var hi = map.length; - var mid; - while (lo + 1 < hi) { - mid = lo + (hi - lo) / 2; - mid -= mid % 2; - if (map[mid] <= code && code <= map[mid + 1]) { - return true; - } - if (code < map[mid]) { - hi = mid; - } - else { - lo = mid + 2; - } - } - return false; - } - function isUnicodeIdentifierStart(code, languageVersion) { - return languageVersion === 0 /* ES3 */ ? lookupInUnicodeMap(code, unicodeES3IdentifierStart) : lookupInUnicodeMap(code, unicodeES5IdentifierStart); - } - function isUnicodeIdentifierPart(code, languageVersion) { - return languageVersion === 0 /* ES3 */ ? lookupInUnicodeMap(code, unicodeES3IdentifierPart) : lookupInUnicodeMap(code, unicodeES5IdentifierPart); - } - function makeReverseMap(source) { - var result = []; - for (var name in source) { - if (source.hasOwnProperty(name)) { - result[source[name]] = name; - } - } - return result; - } - var tokenStrings = makeReverseMap(textToToken); - function tokenToString(t) { - return tokenStrings[t]; - } - ts.tokenToString = tokenToString; - function getLineStarts(text) { - var result = new Array(); - var pos = 0; - var lineStart = 0; - while (pos < text.length) { - var ch = text.charCodeAt(pos++); - switch (ch) { - case 13 /* carriageReturn */: - if (text.charCodeAt(pos) === 10 /* lineFeed */) { - pos++; - } - case 10 /* lineFeed */: - result.push(lineStart); - lineStart = pos; - break; - default: - if (ch > 127 /* maxAsciiCharacter */ && isLineBreak(ch)) { - result.push(lineStart); - lineStart = pos; - } - break; - } - } - result.push(lineStart); - return result; - } - ts.getLineStarts = getLineStarts; - function getPositionFromLineAndCharacter(lineStarts, line, character) { - ts.Debug.assert(line > 0); - return lineStarts[line - 1] + character - 1; - } - ts.getPositionFromLineAndCharacter = getPositionFromLineAndCharacter; - function getLineAndCharacterOfPosition(lineStarts, position) { - var lineNumber = ts.binarySearch(lineStarts, position); - if (lineNumber < 0) { - lineNumber = (~lineNumber) - 1; - } - return { - line: lineNumber + 1, - character: position - lineStarts[lineNumber] + 1 - }; - } - ts.getLineAndCharacterOfPosition = getLineAndCharacterOfPosition; - function positionToLineAndCharacter(text, pos) { - var lineStarts = getLineStarts(text); - return getLineAndCharacterOfPosition(lineStarts, pos); - } - ts.positionToLineAndCharacter = positionToLineAndCharacter; - var hasOwnProperty = Object.prototype.hasOwnProperty; - function isWhiteSpace(ch) { - return ch === 32 /* space */ || ch === 9 /* tab */ || ch === 11 /* verticalTab */ || ch === 12 /* formFeed */ || ch === 160 /* nonBreakingSpace */ || ch === 5760 /* ogham */ || ch >= 8192 /* enQuad */ && ch <= 8203 /* zeroWidthSpace */ || ch === 8239 /* narrowNoBreakSpace */ || ch === 8287 /* mathematicalSpace */ || ch === 12288 /* ideographicSpace */ || ch === 65279 /* byteOrderMark */; - } - ts.isWhiteSpace = isWhiteSpace; - function isLineBreak(ch) { - return ch === 10 /* lineFeed */ || ch === 13 /* carriageReturn */ || ch === 8232 /* lineSeparator */ || ch === 8233 /* paragraphSeparator */ || ch === 133 /* nextLine */; - } - ts.isLineBreak = isLineBreak; - function isDigit(ch) { - return ch >= 48 /* _0 */ && ch <= 57 /* _9 */; - } - function isOctalDigit(ch) { - return ch >= 48 /* _0 */ && ch <= 55 /* _7 */; - } - ts.isOctalDigit = isOctalDigit; - function skipTrivia(text, pos, stopAfterLineBreak) { - while (true) { - var ch = text.charCodeAt(pos); - switch (ch) { - case 13 /* carriageReturn */: - if (text.charCodeAt(pos + 1) === 10 /* lineFeed */) - pos++; - case 10 /* lineFeed */: - pos++; - if (stopAfterLineBreak) - return pos; - continue; - case 9 /* tab */: - case 11 /* verticalTab */: - case 12 /* formFeed */: - case 32 /* space */: - pos++; - continue; - case 47 /* slash */: - if (text.charCodeAt(pos + 1) === 47 /* slash */) { - pos += 2; - while (pos < text.length) { - if (isLineBreak(text.charCodeAt(pos))) { - break; - } - pos++; - } - continue; - } - if (text.charCodeAt(pos + 1) === 42 /* asterisk */) { - pos += 2; - while (pos < text.length) { - if (text.charCodeAt(pos) === 42 /* asterisk */ && text.charCodeAt(pos + 1) === 47 /* slash */) { - pos += 2; - break; - } - pos++; - } - continue; - } - break; - default: - if (ch > 127 /* maxAsciiCharacter */ && (isWhiteSpace(ch) || isLineBreak(ch))) { - pos++; - continue; - } - break; - } - return pos; - } - } - ts.skipTrivia = skipTrivia; - function getCommentRanges(text, pos, trailing) { - var result; - var collecting = trailing || pos === 0; - while (true) { - var ch = text.charCodeAt(pos); - switch (ch) { - case 13 /* carriageReturn */: - if (text.charCodeAt(pos + 1) === 10 /* lineFeed */) - pos++; - case 10 /* lineFeed */: - pos++; - if (trailing) { - return result; - } - collecting = true; - if (result && result.length) { - result[result.length - 1].hasTrailingNewLine = true; - } - continue; - case 9 /* tab */: - case 11 /* verticalTab */: - case 12 /* formFeed */: - case 32 /* space */: - pos++; - continue; - case 47 /* slash */: - var nextChar = text.charCodeAt(pos + 1); - var hasTrailingNewLine = false; - if (nextChar === 47 /* slash */ || nextChar === 42 /* asterisk */) { - var startPos = pos; - pos += 2; - if (nextChar === 47 /* slash */) { - while (pos < text.length) { - if (isLineBreak(text.charCodeAt(pos))) { - hasTrailingNewLine = true; - break; - } - pos++; - } - } - else { - while (pos < text.length) { - if (text.charCodeAt(pos) === 42 /* asterisk */ && text.charCodeAt(pos + 1) === 47 /* slash */) { - pos += 2; - break; - } - pos++; - } - } - if (collecting) { - if (!result) - result = []; - result.push({ pos: startPos, end: pos, hasTrailingNewLine: hasTrailingNewLine }); - } - continue; - } - break; - default: - if (ch > 127 /* maxAsciiCharacter */ && (isWhiteSpace(ch) || isLineBreak(ch))) { - if (result && result.length && isLineBreak(ch)) { - result[result.length - 1].hasTrailingNewLine = true; - } - pos++; - continue; - } - break; - } - return result; - } - } - function getLeadingCommentRanges(text, pos) { - return getCommentRanges(text, pos, false); - } - ts.getLeadingCommentRanges = getLeadingCommentRanges; - function getTrailingCommentRanges(text, pos) { - return getCommentRanges(text, pos, true); - } - ts.getTrailingCommentRanges = getTrailingCommentRanges; - function isIdentifierStart(ch, languageVersion) { - return ch >= 65 /* A */ && ch <= 90 /* Z */ || ch >= 97 /* a */ && ch <= 122 /* z */ || ch === 36 /* $ */ || ch === 95 /* _ */ || ch > 127 /* maxAsciiCharacter */ && isUnicodeIdentifierStart(ch, languageVersion); - } - ts.isIdentifierStart = isIdentifierStart; - function isIdentifierPart(ch, languageVersion) { - return ch >= 65 /* A */ && ch <= 90 /* Z */ || ch >= 97 /* a */ && ch <= 122 /* z */ || ch >= 48 /* _0 */ && ch <= 57 /* _9 */ || ch === 36 /* $ */ || ch === 95 /* _ */ || ch > 127 /* maxAsciiCharacter */ && isUnicodeIdentifierPart(ch, languageVersion); - } - ts.isIdentifierPart = isIdentifierPart; - function createScanner(languageVersion, skipTrivia, text, onError, onComment) { - var pos; - var len; - var startPos; - var tokenPos; - var token; - var tokenValue; - var precedingLineBreak; - function error(message) { - if (onError) { - onError(message); - } - } - function isIdentifierStart(ch) { - return ch >= 65 /* A */ && ch <= 90 /* Z */ || ch >= 97 /* a */ && ch <= 122 /* z */ || ch === 36 /* $ */ || ch === 95 /* _ */ || ch > 127 /* maxAsciiCharacter */ && isUnicodeIdentifierStart(ch, languageVersion); - } - function isIdentifierPart(ch) { - return ch >= 65 /* A */ && ch <= 90 /* Z */ || ch >= 97 /* a */ && ch <= 122 /* z */ || ch >= 48 /* _0 */ && ch <= 57 /* _9 */ || ch === 36 /* $ */ || ch === 95 /* _ */ || ch > 127 /* maxAsciiCharacter */ && isUnicodeIdentifierPart(ch, languageVersion); - } - function scanNumber() { - var start = pos; - while (isDigit(text.charCodeAt(pos))) - pos++; - if (text.charCodeAt(pos) === 46 /* dot */) { - pos++; - while (isDigit(text.charCodeAt(pos))) - pos++; - } - var end = pos; - if (text.charCodeAt(pos) === 69 /* E */ || text.charCodeAt(pos) === 101 /* e */) { - pos++; - if (text.charCodeAt(pos) === 43 /* plus */ || text.charCodeAt(pos) === 45 /* minus */) - pos++; - if (isDigit(text.charCodeAt(pos))) { - pos++; - while (isDigit(text.charCodeAt(pos))) - pos++; - end = pos; - } - else { - error(ts.Diagnostics.Digit_expected); - } - } - return +(text.substring(start, end)); - } - function scanOctalDigits() { - var start = pos; - while (isOctalDigit(text.charCodeAt(pos))) { - pos++; - } - return +(text.substring(start, pos)); - } - function scanHexDigits(count, mustMatchCount) { - var digits = 0; - var value = 0; - while (digits < count || !mustMatchCount) { - var ch = text.charCodeAt(pos); - if (ch >= 48 /* _0 */ && ch <= 57 /* _9 */) { - value = value * 16 + ch - 48 /* _0 */; - } - else if (ch >= 65 /* A */ && ch <= 70 /* F */) { - value = value * 16 + ch - 65 /* A */ + 10; - } - else if (ch >= 97 /* a */ && ch <= 102 /* f */) { - value = value * 16 + ch - 97 /* a */ + 10; - } - else { - break; - } - pos++; - digits++; - } - if (digits < count) { - value = -1; - } - return value; - } - function scanString() { - var quote = text.charCodeAt(pos++); - var result = ""; - var start = pos; - while (true) { - if (pos >= len) { - result += text.substring(start, pos); - error(ts.Diagnostics.Unexpected_end_of_text); - break; - } - var ch = text.charCodeAt(pos); - if (ch === quote) { - result += text.substring(start, pos); - pos++; - break; - } - if (ch === 92 /* backslash */) { - result += text.substring(start, pos); - result += scanEscapeSequence(); - start = pos; - continue; - } - if (isLineBreak(ch)) { - result += text.substring(start, pos); - error(ts.Diagnostics.Unterminated_string_literal); - break; - } - pos++; - } - return result; - } - function scanTemplateAndSetTokenValue() { - var startedWithBacktick = text.charCodeAt(pos) === 96 /* backtick */; - pos++; - var start = pos; - var contents = ""; - var resultingToken; - while (true) { - if (pos >= len) { - contents += text.substring(start, pos); - error(ts.Diagnostics.Unexpected_end_of_text); - resultingToken = startedWithBacktick ? 9 /* NoSubstitutionTemplateLiteral */ : 12 /* TemplateTail */; - break; - } - var currChar = text.charCodeAt(pos); - if (currChar === 96 /* backtick */) { - contents += text.substring(start, pos); - pos++; - resultingToken = startedWithBacktick ? 9 /* NoSubstitutionTemplateLiteral */ : 12 /* TemplateTail */; - break; - } - if (currChar === 36 /* $ */ && pos + 1 < len && text.charCodeAt(pos + 1) === 123 /* openBrace */) { - contents += text.substring(start, pos); - pos += 2; - resultingToken = startedWithBacktick ? 10 /* TemplateHead */ : 11 /* TemplateMiddle */; - break; - } - if (currChar === 92 /* backslash */) { - contents += text.substring(start, pos); - contents += scanEscapeSequence(); - start = pos; - continue; - } - if (currChar === 13 /* carriageReturn */) { - contents += text.substring(start, pos); - if (pos + 1 < len && text.charCodeAt(pos + 1) === 10 /* lineFeed */) { - pos++; - } - pos++; - contents += "\n"; - start = pos; - continue; - } - pos++; - } - ts.Debug.assert(resultingToken !== undefined); - tokenValue = contents; - return resultingToken; - } - function scanEscapeSequence() { - pos++; - if (pos >= len) { - error(ts.Diagnostics.Unexpected_end_of_text); - return ""; - } - var ch = text.charCodeAt(pos++); - switch (ch) { - case 48 /* _0 */: - return "\0"; - case 98 /* b */: - return "\b"; - case 116 /* t */: - return "\t"; - case 110 /* n */: - return "\n"; - case 118 /* v */: - return "\v"; - case 102 /* f */: - return "\f"; - case 114 /* r */: - return "\r"; - case 39 /* singleQuote */: - return "\'"; - case 34 /* doubleQuote */: - return "\""; - case 120 /* x */: - case 117 /* u */: - var ch = scanHexDigits(ch === 120 /* x */ ? 2 : 4, true); - if (ch >= 0) { - return String.fromCharCode(ch); - } - else { - error(ts.Diagnostics.Hexadecimal_digit_expected); - return ""; - } - case 13 /* carriageReturn */: - if (pos < len && text.charCodeAt(pos) === 10 /* lineFeed */) { - pos++; - } - case 10 /* lineFeed */: - case 8232 /* lineSeparator */: - case 8233 /* paragraphSeparator */: - return ""; - default: - return String.fromCharCode(ch); - } - } - function peekUnicodeEscape() { - if (pos + 5 < len && text.charCodeAt(pos + 1) === 117 /* u */) { - var start = pos; - pos += 2; - var value = scanHexDigits(4, true); - pos = start; - return value; - } - return -1; - } - function scanIdentifierParts() { - var result = ""; - var start = pos; - while (pos < len) { - var ch = text.charCodeAt(pos); - if (isIdentifierPart(ch)) { - pos++; - } - else if (ch === 92 /* backslash */) { - ch = peekUnicodeEscape(); - if (!(ch >= 0 && isIdentifierPart(ch))) { - break; - } - result += text.substring(start, pos); - result += String.fromCharCode(ch); - pos += 6; - start = pos; - } - else { - break; - } - } - result += text.substring(start, pos); - return result; - } - function getIdentifierToken() { - var len = tokenValue.length; - if (len >= 2 && len <= 11) { - var ch = tokenValue.charCodeAt(0); - if (ch >= 97 /* a */ && ch <= 122 /* z */ && hasOwnProperty.call(textToToken, tokenValue)) { - return token = textToToken[tokenValue]; - } - } - return token = 63 /* Identifier */; - } - function scan() { - startPos = pos; - precedingLineBreak = false; - while (true) { - tokenPos = pos; - if (pos >= len) { - return token = 1 /* EndOfFileToken */; - } - var ch = text.charCodeAt(pos); - switch (ch) { - case 10 /* lineFeed */: - case 13 /* carriageReturn */: - precedingLineBreak = true; - if (skipTrivia) { - pos++; - continue; - } - else { - if (ch === 13 /* carriageReturn */ && pos + 1 < len && text.charCodeAt(pos + 1) === 10 /* lineFeed */) { - pos += 2; - } - else { - pos++; - } - return token = 4 /* NewLineTrivia */; - } - case 9 /* tab */: - case 11 /* verticalTab */: - case 12 /* formFeed */: - case 32 /* space */: - if (skipTrivia) { - pos++; - continue; - } - else { - while (pos < len && isWhiteSpace(text.charCodeAt(pos))) { - pos++; - } - return token = 5 /* WhitespaceTrivia */; - } - case 33 /* exclamation */: - if (text.charCodeAt(pos + 1) === 61 /* equals */) { - if (text.charCodeAt(pos + 2) === 61 /* equals */) { - return pos += 3, token = 30 /* ExclamationEqualsEqualsToken */; - } - return pos += 2, token = 28 /* ExclamationEqualsToken */; - } - return pos++, token = 45 /* ExclamationToken */; - case 34 /* doubleQuote */: - case 39 /* singleQuote */: - tokenValue = scanString(); - return token = 7 /* StringLiteral */; - case 96 /* backtick */: - return token = scanTemplateAndSetTokenValue(); - case 37 /* percent */: - if (text.charCodeAt(pos + 1) === 61 /* equals */) { - return pos += 2, token = 56 /* PercentEqualsToken */; - } - return pos++, token = 36 /* PercentToken */; - case 38 /* ampersand */: - if (text.charCodeAt(pos + 1) === 38 /* ampersand */) { - return pos += 2, token = 47 /* AmpersandAmpersandToken */; - } - if (text.charCodeAt(pos + 1) === 61 /* equals */) { - return pos += 2, token = 60 /* AmpersandEqualsToken */; - } - return pos++, token = 42 /* AmpersandToken */; - case 40 /* openParen */: - return pos++, token = 15 /* OpenParenToken */; - case 41 /* closeParen */: - return pos++, token = 16 /* CloseParenToken */; - case 42 /* asterisk */: - if (text.charCodeAt(pos + 1) === 61 /* equals */) { - return pos += 2, token = 54 /* AsteriskEqualsToken */; - } - return pos++, token = 34 /* AsteriskToken */; - case 43 /* plus */: - if (text.charCodeAt(pos + 1) === 43 /* plus */) { - return pos += 2, token = 37 /* PlusPlusToken */; - } - if (text.charCodeAt(pos + 1) === 61 /* equals */) { - return pos += 2, token = 52 /* PlusEqualsToken */; - } - return pos++, token = 32 /* PlusToken */; - case 44 /* comma */: - return pos++, token = 22 /* CommaToken */; - case 45 /* minus */: - if (text.charCodeAt(pos + 1) === 45 /* minus */) { - return pos += 2, token = 38 /* MinusMinusToken */; - } - if (text.charCodeAt(pos + 1) === 61 /* equals */) { - return pos += 2, token = 53 /* MinusEqualsToken */; - } - return pos++, token = 33 /* MinusToken */; - case 46 /* dot */: - if (isDigit(text.charCodeAt(pos + 1))) { - tokenValue = "" + scanNumber(); - return token = 6 /* NumericLiteral */; - } - if (text.charCodeAt(pos + 1) === 46 /* dot */ && text.charCodeAt(pos + 2) === 46 /* dot */) { - return pos += 3, token = 20 /* DotDotDotToken */; - } - return pos++, token = 19 /* DotToken */; - case 47 /* slash */: - if (text.charCodeAt(pos + 1) === 47 /* slash */) { - pos += 2; - while (pos < len) { - if (isLineBreak(text.charCodeAt(pos))) { - break; - } - pos++; - } - if (onComment) { - onComment(tokenPos, pos); - } - if (skipTrivia) { - continue; - } - else { - return token = 2 /* SingleLineCommentTrivia */; - } - } - if (text.charCodeAt(pos + 1) === 42 /* asterisk */) { - pos += 2; - var commentClosed = false; - while (pos < len) { - var ch = text.charCodeAt(pos); - if (ch === 42 /* asterisk */ && text.charCodeAt(pos + 1) === 47 /* slash */) { - pos += 2; - commentClosed = true; - break; - } - if (isLineBreak(ch)) { - precedingLineBreak = true; - } - pos++; - } - if (!commentClosed) { - error(ts.Diagnostics.Asterisk_Slash_expected); - } - if (onComment) { - onComment(tokenPos, pos); - } - if (skipTrivia) { - continue; - } - else { - return token = 3 /* MultiLineCommentTrivia */; - } - } - if (text.charCodeAt(pos + 1) === 61 /* equals */) { - return pos += 2, token = 55 /* SlashEqualsToken */; - } - return pos++, token = 35 /* SlashToken */; - case 48 /* _0 */: - if (pos + 2 < len && (text.charCodeAt(pos + 1) === 88 /* X */ || text.charCodeAt(pos + 1) === 120 /* x */)) { - pos += 2; - var value = scanHexDigits(1, false); - if (value < 0) { - error(ts.Diagnostics.Hexadecimal_digit_expected); - value = 0; - } - tokenValue = "" + value; - return 6 /* NumericLiteral */; - } - if (pos + 1 < len && isOctalDigit(text.charCodeAt(pos + 1))) { - tokenValue = "" + scanOctalDigits(); - return 6 /* NumericLiteral */; - } - case 49 /* _1 */: - case 50 /* _2 */: - case 51 /* _3 */: - case 52 /* _4 */: - case 53 /* _5 */: - case 54 /* _6 */: - case 55 /* _7 */: - case 56 /* _8 */: - case 57 /* _9 */: - tokenValue = "" + scanNumber(); - return token = 6 /* NumericLiteral */; - case 58 /* colon */: - return pos++, token = 50 /* ColonToken */; - case 59 /* semicolon */: - return pos++, token = 21 /* SemicolonToken */; - case 60 /* lessThan */: - if (text.charCodeAt(pos + 1) === 60 /* lessThan */) { - if (text.charCodeAt(pos + 2) === 61 /* equals */) { - return pos += 3, token = 57 /* LessThanLessThanEqualsToken */; - } - return pos += 2, token = 39 /* LessThanLessThanToken */; - } - if (text.charCodeAt(pos + 1) === 61 /* equals */) { - return pos += 2, token = 25 /* LessThanEqualsToken */; - } - return pos++, token = 23 /* LessThanToken */; - case 61 /* equals */: - if (text.charCodeAt(pos + 1) === 61 /* equals */) { - if (text.charCodeAt(pos + 2) === 61 /* equals */) { - return pos += 3, token = 29 /* EqualsEqualsEqualsToken */; - } - return pos += 2, token = 27 /* EqualsEqualsToken */; - } - if (text.charCodeAt(pos + 1) === 62 /* greaterThan */) { - return pos += 2, token = 31 /* EqualsGreaterThanToken */; - } - return pos++, token = 51 /* EqualsToken */; - case 62 /* greaterThan */: - return pos++, token = 24 /* GreaterThanToken */; - case 63 /* question */: - return pos++, token = 49 /* QuestionToken */; - case 91 /* openBracket */: - return pos++, token = 17 /* OpenBracketToken */; - case 93 /* closeBracket */: - return pos++, token = 18 /* CloseBracketToken */; - case 94 /* caret */: - if (text.charCodeAt(pos + 1) === 61 /* equals */) { - return pos += 2, token = 62 /* CaretEqualsToken */; - } - return pos++, token = 44 /* CaretToken */; - case 123 /* openBrace */: - return pos++, token = 13 /* OpenBraceToken */; - case 124 /* bar */: - if (text.charCodeAt(pos + 1) === 124 /* bar */) { - return pos += 2, token = 48 /* BarBarToken */; - } - if (text.charCodeAt(pos + 1) === 61 /* equals */) { - return pos += 2, token = 61 /* BarEqualsToken */; - } - return pos++, token = 43 /* BarToken */; - case 125 /* closeBrace */: - return pos++, token = 14 /* CloseBraceToken */; - case 126 /* tilde */: - return pos++, token = 46 /* TildeToken */; - case 92 /* backslash */: - var ch = peekUnicodeEscape(); - if (ch >= 0 && isIdentifierStart(ch)) { - pos += 6; - tokenValue = String.fromCharCode(ch) + scanIdentifierParts(); - return token = getIdentifierToken(); - } - error(ts.Diagnostics.Invalid_character); - return pos++, token = 0 /* Unknown */; - default: - if (isIdentifierStart(ch)) { - pos++; - while (pos < len && isIdentifierPart(ch = text.charCodeAt(pos))) - pos++; - tokenValue = text.substring(tokenPos, pos); - if (ch === 92 /* backslash */) { - tokenValue += scanIdentifierParts(); - } - return token = getIdentifierToken(); - } - else if (isWhiteSpace(ch)) { - pos++; - continue; - } - else if (isLineBreak(ch)) { - precedingLineBreak = true; - pos++; - continue; - } - error(ts.Diagnostics.Invalid_character); - return pos++, token = 0 /* Unknown */; - } - } - } - function reScanGreaterToken() { - if (token === 24 /* GreaterThanToken */) { - if (text.charCodeAt(pos) === 62 /* greaterThan */) { - if (text.charCodeAt(pos + 1) === 62 /* greaterThan */) { - if (text.charCodeAt(pos + 2) === 61 /* equals */) { - return pos += 3, token = 59 /* GreaterThanGreaterThanGreaterThanEqualsToken */; - } - return pos += 2, token = 41 /* GreaterThanGreaterThanGreaterThanToken */; - } - if (text.charCodeAt(pos + 1) === 61 /* equals */) { - return pos += 2, token = 58 /* GreaterThanGreaterThanEqualsToken */; - } - return pos++, token = 40 /* GreaterThanGreaterThanToken */; - } - if (text.charCodeAt(pos) === 61 /* equals */) { - return pos++, token = 26 /* GreaterThanEqualsToken */; - } - } - return token; - } - function reScanSlashToken() { - if (token === 35 /* SlashToken */ || token === 55 /* SlashEqualsToken */) { - var p = tokenPos + 1; - var inEscape = false; - var inCharacterClass = false; - while (true) { - if (p >= len) { - return token; - } - var ch = text.charCodeAt(p); - if (isLineBreak(ch)) { - return token; - } - if (inEscape) { - inEscape = false; - } - else if (ch === 47 /* slash */ && !inCharacterClass) { - break; - } - else if (ch === 91 /* openBracket */) { - inCharacterClass = true; - } - else if (ch === 92 /* backslash */) { - inEscape = true; - } - else if (ch === 93 /* closeBracket */) { - inCharacterClass = false; - } - p++; - } - p++; - while (isIdentifierPart(text.charCodeAt(p))) { - p++; - } - pos = p; - tokenValue = text.substring(tokenPos, pos); - token = 8 /* RegularExpressionLiteral */; - } - return token; - } - function reScanTemplateToken() { - ts.Debug.assert(token === 14 /* CloseBraceToken */, "'reScanTemplateToken' should only be called on a '}'"); - pos = tokenPos; - return token = scanTemplateAndSetTokenValue(); - } - function tryScan(callback) { - var savePos = pos; - var saveStartPos = startPos; - var saveTokenPos = tokenPos; - var saveToken = token; - var saveTokenValue = tokenValue; - var savePrecedingLineBreak = precedingLineBreak; - var result = callback(); - if (!result) { - pos = savePos; - startPos = saveStartPos; - tokenPos = saveTokenPos; - token = saveToken; - tokenValue = saveTokenValue; - precedingLineBreak = savePrecedingLineBreak; - } - return result; - } - function setText(newText) { - text = newText || ""; - len = text.length; - setTextPos(0); - } - function setTextPos(textPos) { - pos = textPos; - startPos = textPos; - tokenPos = textPos; - token = 0 /* Unknown */; - precedingLineBreak = false; - } - setText(text); - return { - getStartPos: function () { return startPos; }, - getTextPos: function () { return pos; }, - getToken: function () { return token; }, - getTokenPos: function () { return tokenPos; }, - getTokenText: function () { return text.substring(tokenPos, pos); }, - getTokenValue: function () { return tokenValue; }, - hasPrecedingLineBreak: function () { return precedingLineBreak; }, - isIdentifier: function () { return token === 63 /* Identifier */ || token > 99 /* LastReservedWord */; }, - isReservedWord: function () { return token >= 64 /* FirstReservedWord */ && token <= 99 /* LastReservedWord */; }, - reScanGreaterToken: reScanGreaterToken, - reScanSlashToken: reScanSlashToken, - reScanTemplateToken: reScanTemplateToken, - scan: scan, - setText: setText, - setTextPos: setTextPos, - tryScan: tryScan - }; - } - ts.createScanner = createScanner; -})(ts || (ts = {})); var ts; (function (ts) { (function (EmitReturnStatus) { @@ -1545,6 +130,13 @@ var ts; return result; } ts.sum = sum; + function lastOrUndefined(array) { + if (array.length === 0) { + return undefined; + } + return array[array.length - 1]; + } + ts.lastOrUndefined = lastOrUndefined; function binarySearch(array, value) { var low = 0; var high = array.length - 1; @@ -1997,7 +589,1429 @@ var ts; })(ts || (ts = {})); var ts; (function (ts) { - var nodeConstructors = new Array(196 /* Count */); + ts.Diagnostics = { + Unterminated_string_literal: { code: 1002, category: 1 /* Error */, key: "Unterminated string literal." }, + Identifier_expected: { code: 1003, category: 1 /* Error */, key: "Identifier expected." }, + _0_expected: { code: 1005, category: 1 /* Error */, key: "'{0}' expected." }, + A_file_cannot_have_a_reference_to_itself: { code: 1006, category: 1 /* Error */, key: "A file cannot have a reference to itself." }, + Trailing_comma_not_allowed: { code: 1009, category: 1 /* Error */, key: "Trailing comma not allowed." }, + Asterisk_Slash_expected: { code: 1010, category: 1 /* Error */, key: "'*/' expected." }, + Unexpected_token: { code: 1012, category: 1 /* Error */, key: "Unexpected token." }, + Catch_clause_parameter_cannot_have_a_type_annotation: { code: 1013, category: 1 /* Error */, key: "Catch clause parameter cannot have a type annotation." }, + A_rest_parameter_must_be_last_in_a_parameter_list: { code: 1014, category: 1 /* Error */, key: "A rest parameter must be last in a parameter list." }, + Parameter_cannot_have_question_mark_and_initializer: { code: 1015, category: 1 /* Error */, key: "Parameter cannot have question mark and initializer." }, + A_required_parameter_cannot_follow_an_optional_parameter: { code: 1016, category: 1 /* Error */, key: "A required parameter cannot follow an optional parameter." }, + An_index_signature_cannot_have_a_rest_parameter: { code: 1017, category: 1 /* Error */, key: "An index signature cannot have a rest parameter." }, + An_index_signature_parameter_cannot_have_an_accessibility_modifier: { code: 1018, category: 1 /* Error */, key: "An index signature parameter cannot have an accessibility modifier." }, + An_index_signature_parameter_cannot_have_a_question_mark: { code: 1019, category: 1 /* Error */, key: "An index signature parameter cannot have a question mark." }, + An_index_signature_parameter_cannot_have_an_initializer: { code: 1020, category: 1 /* Error */, key: "An index signature parameter cannot have an initializer." }, + An_index_signature_must_have_a_type_annotation: { code: 1021, category: 1 /* Error */, key: "An index signature must have a type annotation." }, + An_index_signature_parameter_must_have_a_type_annotation: { code: 1022, category: 1 /* Error */, key: "An index signature parameter must have a type annotation." }, + An_index_signature_parameter_type_must_be_string_or_number: { code: 1023, category: 1 /* Error */, key: "An index signature parameter type must be 'string' or 'number'." }, + A_class_or_interface_declaration_can_only_have_one_extends_clause: { code: 1024, category: 1 /* Error */, key: "A class or interface declaration can only have one 'extends' clause." }, + An_extends_clause_must_precede_an_implements_clause: { code: 1025, category: 1 /* Error */, key: "An 'extends' clause must precede an 'implements' clause." }, + A_class_can_only_extend_a_single_class: { code: 1026, category: 1 /* Error */, key: "A class can only extend a single class." }, + A_class_declaration_can_only_have_one_implements_clause: { code: 1027, category: 1 /* Error */, key: "A class declaration can only have one 'implements' clause." }, + Accessibility_modifier_already_seen: { code: 1028, category: 1 /* Error */, key: "Accessibility modifier already seen." }, + _0_modifier_must_precede_1_modifier: { code: 1029, category: 1 /* Error */, key: "'{0}' modifier must precede '{1}' modifier." }, + _0_modifier_already_seen: { code: 1030, category: 1 /* Error */, key: "'{0}' modifier already seen." }, + _0_modifier_cannot_appear_on_a_class_element: { code: 1031, category: 1 /* Error */, key: "'{0}' modifier cannot appear on a class element." }, + An_interface_declaration_cannot_have_an_implements_clause: { code: 1032, category: 1 /* Error */, key: "An interface declaration cannot have an 'implements' clause." }, + super_must_be_followed_by_an_argument_list_or_member_access: { code: 1034, category: 1 /* Error */, key: "'super' must be followed by an argument list or member access." }, + Only_ambient_modules_can_use_quoted_names: { code: 1035, category: 1 /* Error */, key: "Only ambient modules can use quoted names." }, + Statements_are_not_allowed_in_ambient_contexts: { code: 1036, category: 1 /* Error */, key: "Statements are not allowed in ambient contexts." }, + A_function_implementation_cannot_be_declared_in_an_ambient_context: { code: 1037, category: 1 /* Error */, key: "A function implementation cannot be declared in an ambient context." }, + A_declare_modifier_cannot_be_used_in_an_already_ambient_context: { code: 1038, category: 1 /* Error */, key: "A 'declare' modifier cannot be used in an already ambient context." }, + Initializers_are_not_allowed_in_ambient_contexts: { code: 1039, category: 1 /* Error */, key: "Initializers are not allowed in ambient contexts." }, + _0_modifier_cannot_appear_on_a_module_element: { code: 1044, category: 1 /* Error */, key: "'{0}' modifier cannot appear on a module element." }, + A_declare_modifier_cannot_be_used_with_an_interface_declaration: { code: 1045, category: 1 /* Error */, key: "A 'declare' modifier cannot be used with an interface declaration." }, + A_declare_modifier_is_required_for_a_top_level_declaration_in_a_d_ts_file: { code: 1046, category: 1 /* Error */, key: "A 'declare' modifier is required for a top level declaration in a .d.ts file." }, + A_rest_parameter_cannot_be_optional: { code: 1047, category: 1 /* Error */, key: "A rest parameter cannot be optional." }, + A_rest_parameter_cannot_have_an_initializer: { code: 1048, category: 1 /* Error */, key: "A rest parameter cannot have an initializer." }, + A_set_accessor_must_have_exactly_one_parameter: { code: 1049, category: 1 /* Error */, key: "A 'set' accessor must have exactly one parameter." }, + A_set_accessor_cannot_have_an_optional_parameter: { code: 1051, category: 1 /* Error */, key: "A 'set' accessor cannot have an optional parameter." }, + A_set_accessor_parameter_cannot_have_an_initializer: { code: 1052, category: 1 /* Error */, key: "A 'set' accessor parameter cannot have an initializer." }, + A_set_accessor_cannot_have_rest_parameter: { code: 1053, category: 1 /* Error */, key: "A 'set' accessor cannot have rest parameter." }, + A_get_accessor_cannot_have_parameters: { code: 1054, category: 1 /* Error */, key: "A 'get' accessor cannot have parameters." }, + Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher: { code: 1056, category: 1 /* Error */, key: "Accessors are only available when targeting ECMAScript 5 and higher." }, + Enum_member_must_have_initializer: { code: 1061, category: 1 /* Error */, key: "Enum member must have initializer." }, + An_export_assignment_cannot_be_used_in_an_internal_module: { code: 1063, category: 1 /* Error */, key: "An export assignment cannot be used in an internal module." }, + Ambient_enum_elements_can_only_have_integer_literal_initializers: { code: 1066, category: 1 /* Error */, key: "Ambient enum elements can only have integer literal initializers." }, + Unexpected_token_A_constructor_method_accessor_or_property_was_expected: { code: 1068, category: 1 /* Error */, key: "Unexpected token. A constructor, method, accessor, or property was expected." }, + A_declare_modifier_cannot_be_used_with_an_import_declaration: { code: 1079, category: 1 /* Error */, key: "A 'declare' modifier cannot be used with an import declaration." }, + Invalid_reference_directive_syntax: { code: 1084, category: 1 /* Error */, key: "Invalid 'reference' directive syntax." }, + Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher: { code: 1085, category: 1 /* Error */, key: "Octal literals are not available when targeting ECMAScript 5 and higher." }, + An_accessor_cannot_be_declared_in_an_ambient_context: { code: 1086, category: 1 /* Error */, key: "An accessor cannot be declared in an ambient context." }, + _0_modifier_cannot_appear_on_a_constructor_declaration: { code: 1089, category: 1 /* Error */, key: "'{0}' modifier cannot appear on a constructor declaration." }, + _0_modifier_cannot_appear_on_a_parameter: { code: 1090, category: 1 /* Error */, key: "'{0}' modifier cannot appear on a parameter." }, + Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement: { code: 1091, category: 1 /* Error */, key: "Only a single variable declaration is allowed in a 'for...in' statement." }, + Type_parameters_cannot_appear_on_a_constructor_declaration: { code: 1092, category: 1 /* Error */, key: "Type parameters cannot appear on a constructor declaration." }, + Type_annotation_cannot_appear_on_a_constructor_declaration: { code: 1093, category: 1 /* Error */, key: "Type annotation cannot appear on a constructor declaration." }, + An_accessor_cannot_have_type_parameters: { code: 1094, category: 1 /* Error */, key: "An accessor cannot have type parameters." }, + A_set_accessor_cannot_have_a_return_type_annotation: { code: 1095, category: 1 /* Error */, key: "A 'set' accessor cannot have a return type annotation." }, + An_index_signature_must_have_exactly_one_parameter: { code: 1096, category: 1 /* Error */, key: "An index signature must have exactly one parameter." }, + _0_list_cannot_be_empty: { code: 1097, category: 1 /* Error */, key: "'{0}' list cannot be empty." }, + Type_parameter_list_cannot_be_empty: { code: 1098, category: 1 /* Error */, key: "Type parameter list cannot be empty." }, + Type_argument_list_cannot_be_empty: { code: 1099, category: 1 /* Error */, key: "Type argument list cannot be empty." }, + Invalid_use_of_0_in_strict_mode: { code: 1100, category: 1 /* Error */, key: "Invalid use of '{0}' in strict mode." }, + with_statements_are_not_allowed_in_strict_mode: { code: 1101, category: 1 /* Error */, key: "'with' statements are not allowed in strict mode." }, + delete_cannot_be_called_on_an_identifier_in_strict_mode: { code: 1102, category: 1 /* Error */, key: "'delete' cannot be called on an identifier in strict mode." }, + A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement: { code: 1104, category: 1 /* Error */, key: "A 'continue' statement can only be used within an enclosing iteration statement." }, + A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement: { code: 1105, category: 1 /* Error */, key: "A 'break' statement can only be used within an enclosing iteration or switch statement." }, + Jump_target_cannot_cross_function_boundary: { code: 1107, category: 1 /* Error */, key: "Jump target cannot cross function boundary." }, + A_return_statement_can_only_be_used_within_a_function_body: { code: 1108, category: 1 /* Error */, key: "A 'return' statement can only be used within a function body." }, + Expression_expected: { code: 1109, category: 1 /* Error */, key: "Expression expected." }, + Type_expected: { code: 1110, category: 1 /* Error */, key: "Type expected." }, + A_constructor_implementation_cannot_be_declared_in_an_ambient_context: { code: 1111, category: 1 /* Error */, key: "A constructor implementation cannot be declared in an ambient context." }, + A_class_member_cannot_be_declared_optional: { code: 1112, category: 1 /* Error */, key: "A class member cannot be declared optional." }, + A_default_clause_cannot_appear_more_than_once_in_a_switch_statement: { code: 1113, category: 1 /* Error */, key: "A 'default' clause cannot appear more than once in a 'switch' statement." }, + Duplicate_label_0: { code: 1114, category: 1 /* Error */, key: "Duplicate label '{0}'" }, + A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement: { code: 1115, category: 1 /* Error */, key: "A 'continue' statement can only jump to a label of an enclosing iteration statement." }, + A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement: { code: 1116, category: 1 /* Error */, key: "A 'break' statement can only jump to a label of an enclosing statement." }, + An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode: { code: 1117, category: 1 /* Error */, key: "An object literal cannot have multiple properties with the same name in strict mode." }, + An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name: { code: 1118, category: 1 /* Error */, key: "An object literal cannot have multiple get/set accessors with the same name." }, + An_object_literal_cannot_have_property_and_accessor_with_the_same_name: { code: 1119, category: 1 /* Error */, key: "An object literal cannot have property and accessor with the same name." }, + An_export_assignment_cannot_have_modifiers: { code: 1120, category: 1 /* Error */, key: "An export assignment cannot have modifiers." }, + Octal_literals_are_not_allowed_in_strict_mode: { code: 1121, category: 1 /* Error */, key: "Octal literals are not allowed in strict mode." }, + A_tuple_type_element_list_cannot_be_empty: { code: 1122, category: 1 /* Error */, key: "A tuple type element list cannot be empty." }, + Variable_declaration_list_cannot_be_empty: { code: 1123, category: 1 /* Error */, key: "Variable declaration list cannot be empty." }, + Digit_expected: { code: 1124, category: 1 /* Error */, key: "Digit expected." }, + Hexadecimal_digit_expected: { code: 1125, category: 1 /* Error */, key: "Hexadecimal digit expected." }, + Unexpected_end_of_text: { code: 1126, category: 1 /* Error */, key: "Unexpected end of text." }, + Invalid_character: { code: 1127, category: 1 /* Error */, key: "Invalid character." }, + Declaration_or_statement_expected: { code: 1128, category: 1 /* Error */, key: "Declaration or statement expected." }, + Statement_expected: { code: 1129, category: 1 /* Error */, key: "Statement expected." }, + case_or_default_expected: { code: 1130, category: 1 /* Error */, key: "'case' or 'default' expected." }, + Property_or_signature_expected: { code: 1131, category: 1 /* Error */, key: "Property or signature expected." }, + Enum_member_expected: { code: 1132, category: 1 /* Error */, key: "Enum member expected." }, + Type_reference_expected: { code: 1133, category: 1 /* Error */, key: "Type reference expected." }, + Variable_declaration_expected: { code: 1134, category: 1 /* Error */, key: "Variable declaration expected." }, + Argument_expression_expected: { code: 1135, category: 1 /* Error */, key: "Argument expression expected." }, + Property_assignment_expected: { code: 1136, category: 1 /* Error */, key: "Property assignment expected." }, + Expression_or_comma_expected: { code: 1137, category: 1 /* Error */, key: "Expression or comma expected." }, + Parameter_declaration_expected: { code: 1138, category: 1 /* Error */, key: "Parameter declaration expected." }, + Type_parameter_declaration_expected: { code: 1139, category: 1 /* Error */, key: "Type parameter declaration expected." }, + Type_argument_expected: { code: 1140, category: 1 /* Error */, key: "Type argument expected." }, + String_literal_expected: { code: 1141, category: 1 /* Error */, key: "String literal expected." }, + Line_break_not_permitted_here: { code: 1142, category: 1 /* Error */, key: "Line break not permitted here." }, + catch_or_finally_expected: { code: 1143, category: 1 /* Error */, key: "'catch' or 'finally' expected." }, + Block_or_expected: { code: 1144, category: 1 /* Error */, key: "Block or ';' expected." }, + Modifiers_not_permitted_on_index_signature_members: { code: 1145, category: 1 /* Error */, key: "Modifiers not permitted on index signature members." }, + Declaration_expected: { code: 1146, category: 1 /* Error */, key: "Declaration expected." }, + Import_declarations_in_an_internal_module_cannot_reference_an_external_module: { code: 1147, category: 1 /* Error */, key: "Import declarations in an internal module cannot reference an external module." }, + Cannot_compile_external_modules_unless_the_module_flag_is_provided: { code: 1148, category: 1 /* Error */, key: "Cannot compile external modules unless the '--module' flag is provided." }, + Filename_0_differs_from_already_included_filename_1_only_in_casing: { code: 1149, category: 1 /* Error */, key: "Filename '{0}' differs from already included filename '{1}' only in casing" }, + new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead: { code: 1150, category: 1 /* Error */, key: "'new T[]' cannot be used to create an array. Use 'new Array()' instead." }, + var_let_or_const_expected: { code: 1152, category: 1 /* Error */, key: "'var', 'let' or 'const' expected." }, + let_declarations_are_only_available_when_targeting_ECMAScript_6_and_higher: { code: 1153, category: 1 /* Error */, key: "'let' declarations are only available when targeting ECMAScript 6 and higher." }, + const_declarations_are_only_available_when_targeting_ECMAScript_6_and_higher: { code: 1154, category: 1 /* Error */, key: "'const' declarations are only available when targeting ECMAScript 6 and higher." }, + const_declarations_must_be_initialized: { code: 1155, category: 1 /* Error */, key: "'const' declarations must be initialized" }, + const_declarations_can_only_be_declared_inside_a_block: { code: 1156, category: 1 /* Error */, key: "'const' declarations can only be declared inside a block." }, + let_declarations_can_only_be_declared_inside_a_block: { code: 1157, category: 1 /* Error */, key: "'let' declarations can only be declared inside a block." }, + Invalid_template_literal_expected: { code: 1158, category: 1 /* Error */, key: "Invalid template literal; expected '}'" }, + Tagged_templates_are_only_available_when_targeting_ECMAScript_6_and_higher: { code: 1159, category: 1 /* Error */, key: "Tagged templates are only available when targeting ECMAScript 6 and higher." }, + Unterminated_template_literal: { code: 1160, category: 1 /* Error */, key: "Unterminated template literal." }, + Unterminated_regular_expression_literal: { code: 1161, category: 1 /* Error */, key: "Unterminated regular expression literal." }, + A_object_member_cannot_be_declared_optional: { code: 1160, category: 1 /* Error */, key: "A object member cannot be declared optional." }, + Duplicate_identifier_0: { code: 2300, category: 1 /* Error */, key: "Duplicate identifier '{0}'." }, + Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor: { code: 2301, category: 1 /* Error */, key: "Initializer of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor." }, + Static_members_cannot_reference_class_type_parameters: { code: 2302, category: 1 /* Error */, key: "Static members cannot reference class type parameters." }, + Circular_definition_of_import_alias_0: { code: 2303, category: 1 /* Error */, key: "Circular definition of import alias '{0}'." }, + Cannot_find_name_0: { code: 2304, category: 1 /* Error */, key: "Cannot find name '{0}'." }, + Module_0_has_no_exported_member_1: { code: 2305, category: 1 /* Error */, key: "Module '{0}' has no exported member '{1}'." }, + File_0_is_not_an_external_module: { code: 2306, category: 1 /* Error */, key: "File '{0}' is not an external module." }, + Cannot_find_external_module_0: { code: 2307, category: 1 /* Error */, key: "Cannot find external module '{0}'." }, + A_module_cannot_have_more_than_one_export_assignment: { code: 2308, category: 1 /* Error */, key: "A module cannot have more than one export assignment." }, + An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements: { code: 2309, category: 1 /* Error */, key: "An export assignment cannot be used in a module with other exported elements." }, + Type_0_recursively_references_itself_as_a_base_type: { code: 2310, category: 1 /* Error */, key: "Type '{0}' recursively references itself as a base type." }, + A_class_may_only_extend_another_class: { code: 2311, category: 1 /* Error */, key: "A class may only extend another class." }, + An_interface_may_only_extend_a_class_or_another_interface: { code: 2312, category: 1 /* Error */, key: "An interface may only extend a class or another interface." }, + Constraint_of_a_type_parameter_cannot_reference_any_type_parameter_from_the_same_type_parameter_list: { code: 2313, category: 1 /* Error */, key: "Constraint of a type parameter cannot reference any type parameter from the same type parameter list." }, + Generic_type_0_requires_1_type_argument_s: { code: 2314, category: 1 /* Error */, key: "Generic type '{0}' requires {1} type argument(s)." }, + Type_0_is_not_generic: { code: 2315, category: 1 /* Error */, key: "Type '{0}' is not generic." }, + Global_type_0_must_be_a_class_or_interface_type: { code: 2316, category: 1 /* Error */, key: "Global type '{0}' must be a class or interface type." }, + Global_type_0_must_have_1_type_parameter_s: { code: 2317, category: 1 /* Error */, key: "Global type '{0}' must have {1} type parameter(s)." }, + Cannot_find_global_type_0: { code: 2318, category: 1 /* Error */, key: "Cannot find global type '{0}'." }, + Named_properties_0_of_types_1_and_2_are_not_identical: { code: 2319, category: 1 /* Error */, key: "Named properties '{0}' of types '{1}' and '{2}' are not identical." }, + Interface_0_cannot_simultaneously_extend_types_1_and_2: { code: 2320, category: 1 /* Error */, key: "Interface '{0}' cannot simultaneously extend types '{1}' and '{2}'." }, + Excessive_stack_depth_comparing_types_0_and_1: { code: 2321, category: 1 /* Error */, key: "Excessive stack depth comparing types '{0}' and '{1}'." }, + Type_0_is_not_assignable_to_type_1: { code: 2322, category: 1 /* Error */, key: "Type '{0}' is not assignable to type '{1}'." }, + Property_0_is_missing_in_type_1: { code: 2324, category: 1 /* Error */, key: "Property '{0}' is missing in type '{1}'." }, + Property_0_is_private_in_type_1_but_not_in_type_2: { code: 2325, category: 1 /* Error */, key: "Property '{0}' is private in type '{1}' but not in type '{2}'." }, + Types_of_property_0_are_incompatible: { code: 2326, category: 1 /* Error */, key: "Types of property '{0}' are incompatible." }, + Property_0_is_optional_in_type_1_but_required_in_type_2: { code: 2327, category: 1 /* Error */, key: "Property '{0}' is optional in type '{1}' but required in type '{2}'." }, + Types_of_parameters_0_and_1_are_incompatible: { code: 2328, category: 1 /* Error */, key: "Types of parameters '{0}' and '{1}' are incompatible." }, + Index_signature_is_missing_in_type_0: { code: 2329, category: 1 /* Error */, key: "Index signature is missing in type '{0}'." }, + Index_signatures_are_incompatible: { code: 2330, category: 1 /* Error */, key: "Index signatures are incompatible." }, + this_cannot_be_referenced_in_a_module_body: { code: 2331, category: 1 /* Error */, key: "'this' cannot be referenced in a module body." }, + this_cannot_be_referenced_in_current_location: { code: 2332, category: 1 /* Error */, key: "'this' cannot be referenced in current location." }, + this_cannot_be_referenced_in_constructor_arguments: { code: 2333, category: 1 /* Error */, key: "'this' cannot be referenced in constructor arguments." }, + this_cannot_be_referenced_in_a_static_property_initializer: { code: 2334, category: 1 /* Error */, key: "'this' cannot be referenced in a static property initializer." }, + super_can_only_be_referenced_in_a_derived_class: { code: 2335, category: 1 /* Error */, key: "'super' can only be referenced in a derived class." }, + super_cannot_be_referenced_in_constructor_arguments: { code: 2336, category: 1 /* Error */, key: "'super' cannot be referenced in constructor arguments." }, + Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors: { code: 2337, category: 1 /* Error */, key: "Super calls are not permitted outside constructors or in nested functions inside constructors" }, + super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_derived_class: { code: 2338, category: 1 /* Error */, key: "'super' property access is permitted only in a constructor, member function, or member accessor of a derived class" }, + Property_0_does_not_exist_on_type_1: { code: 2339, category: 1 /* Error */, key: "Property '{0}' does not exist on type '{1}'." }, + Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword: { code: 2340, category: 1 /* Error */, key: "Only public and protected methods of the base class are accessible via the 'super' keyword" }, + Property_0_is_private_and_only_accessible_within_class_1: { code: 2341, category: 1 /* Error */, key: "Property '{0}' is private and only accessible within class '{1}'." }, + An_index_expression_argument_must_be_of_type_string_number_or_any: { code: 2342, category: 1 /* Error */, key: "An index expression argument must be of type 'string', 'number', or 'any'." }, + Type_0_does_not_satisfy_the_constraint_1: { code: 2344, category: 1 /* Error */, key: "Type '{0}' does not satisfy the constraint '{1}'." }, + Argument_of_type_0_is_not_assignable_to_parameter_of_type_1: { code: 2345, category: 1 /* Error */, key: "Argument of type '{0}' is not assignable to parameter of type '{1}'." }, + Supplied_parameters_do_not_match_any_signature_of_call_target: { code: 2346, category: 1 /* Error */, key: "Supplied parameters do not match any signature of call target." }, + Untyped_function_calls_may_not_accept_type_arguments: { code: 2347, category: 1 /* Error */, key: "Untyped function calls may not accept type arguments." }, + Value_of_type_0_is_not_callable_Did_you_mean_to_include_new: { code: 2348, category: 1 /* Error */, key: "Value of type '{0}' is not callable. Did you mean to include 'new'?" }, + Cannot_invoke_an_expression_whose_type_lacks_a_call_signature: { code: 2349, category: 1 /* Error */, key: "Cannot invoke an expression whose type lacks a call signature." }, + Only_a_void_function_can_be_called_with_the_new_keyword: { code: 2350, category: 1 /* Error */, key: "Only a void function can be called with the 'new' keyword." }, + Cannot_use_new_with_an_expression_whose_type_lacks_a_call_or_construct_signature: { code: 2351, category: 1 /* Error */, key: "Cannot use 'new' with an expression whose type lacks a call or construct signature." }, + Neither_type_0_nor_type_1_is_assignable_to_the_other: { code: 2352, category: 1 /* Error */, key: "Neither type '{0}' nor type '{1}' is assignable to the other." }, + No_best_common_type_exists_among_return_expressions: { code: 2354, category: 1 /* Error */, key: "No best common type exists among return expressions." }, + A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value_or_consist_of_a_single_throw_statement: { code: 2355, category: 1 /* Error */, key: "A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement." }, + An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type: { code: 2356, category: 1 /* Error */, key: "An arithmetic operand must be of type 'any', 'number' or an enum type." }, + The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_property_or_indexer: { code: 2357, category: 1 /* Error */, key: "The operand of an increment or decrement operator must be a variable, property or indexer." }, + The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter: { code: 2358, category: 1 /* Error */, key: "The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter." }, + The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_Function_interface_type: { code: 2359, category: 1 /* Error */, key: "The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type." }, + The_left_hand_side_of_an_in_expression_must_be_of_types_any_string_or_number: { code: 2360, category: 1 /* Error */, key: "The left-hand side of an 'in' expression must be of types 'any', 'string' or 'number'." }, + The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter: { code: 2361, category: 1 /* Error */, key: "The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter" }, + The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type: { code: 2362, category: 1 /* Error */, key: "The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type." }, + The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type: { code: 2363, category: 1 /* Error */, key: "The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type." }, + Invalid_left_hand_side_of_assignment_expression: { code: 2364, category: 1 /* Error */, key: "Invalid left-hand side of assignment expression." }, + Operator_0_cannot_be_applied_to_types_1_and_2: { code: 2365, category: 1 /* Error */, key: "Operator '{0}' cannot be applied to types '{1}' and '{2}'." }, + Type_parameter_name_cannot_be_0: { code: 2368, category: 1 /* Error */, key: "Type parameter name cannot be '{0}'" }, + A_parameter_property_is_only_allowed_in_a_constructor_implementation: { code: 2369, category: 1 /* Error */, key: "A parameter property is only allowed in a constructor implementation." }, + A_rest_parameter_must_be_of_an_array_type: { code: 2370, category: 1 /* Error */, key: "A rest parameter must be of an array type." }, + A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation: { code: 2371, category: 1 /* Error */, key: "A parameter initializer is only allowed in a function or constructor implementation." }, + Parameter_0_cannot_be_referenced_in_its_initializer: { code: 2372, category: 1 /* Error */, key: "Parameter '{0}' cannot be referenced in its initializer." }, + Initializer_of_parameter_0_cannot_reference_identifier_1_declared_after_it: { code: 2373, category: 1 /* Error */, key: "Initializer of parameter '{0}' cannot reference identifier '{1}' declared after it." }, + Duplicate_string_index_signature: { code: 2374, category: 1 /* Error */, key: "Duplicate string index signature." }, + Duplicate_number_index_signature: { code: 2375, category: 1 /* Error */, key: "Duplicate number index signature." }, + A_super_call_must_be_the_first_statement_in_the_constructor_when_a_class_contains_initialized_properties_or_has_parameter_properties: { code: 2376, category: 1 /* Error */, key: "A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties." }, + Constructors_for_derived_classes_must_contain_a_super_call: { code: 2377, category: 1 /* Error */, key: "Constructors for derived classes must contain a 'super' call." }, + A_get_accessor_must_return_a_value_or_consist_of_a_single_throw_statement: { code: 2378, category: 1 /* Error */, key: "A 'get' accessor must return a value or consist of a single 'throw' statement." }, + Getter_and_setter_accessors_do_not_agree_in_visibility: { code: 2379, category: 1 /* Error */, key: "Getter and setter accessors do not agree in visibility." }, + get_and_set_accessor_must_have_the_same_type: { code: 2380, category: 1 /* Error */, key: "'get' and 'set' accessor must have the same type." }, + A_signature_with_an_implementation_cannot_use_a_string_literal_type: { code: 2381, category: 1 /* Error */, key: "A signature with an implementation cannot use a string literal type." }, + Specialized_overload_signature_is_not_assignable_to_any_non_specialized_signature: { code: 2382, category: 1 /* Error */, key: "Specialized overload signature is not assignable to any non-specialized signature." }, + Overload_signatures_must_all_be_exported_or_not_exported: { code: 2383, category: 1 /* Error */, key: "Overload signatures must all be exported or not exported." }, + Overload_signatures_must_all_be_ambient_or_non_ambient: { code: 2384, category: 1 /* Error */, key: "Overload signatures must all be ambient or non-ambient." }, + Overload_signatures_must_all_be_public_private_or_protected: { code: 2385, category: 1 /* Error */, key: "Overload signatures must all be public, private or protected." }, + Overload_signatures_must_all_be_optional_or_required: { code: 2386, category: 1 /* Error */, key: "Overload signatures must all be optional or required." }, + Function_overload_must_be_static: { code: 2387, category: 1 /* Error */, key: "Function overload must be static." }, + Function_overload_must_not_be_static: { code: 2388, category: 1 /* Error */, key: "Function overload must not be static." }, + Function_implementation_name_must_be_0: { code: 2389, category: 1 /* Error */, key: "Function implementation name must be '{0}'." }, + Constructor_implementation_is_missing: { code: 2390, category: 1 /* Error */, key: "Constructor implementation is missing." }, + Function_implementation_is_missing_or_not_immediately_following_the_declaration: { code: 2391, category: 1 /* Error */, key: "Function implementation is missing or not immediately following the declaration." }, + Multiple_constructor_implementations_are_not_allowed: { code: 2392, category: 1 /* Error */, key: "Multiple constructor implementations are not allowed." }, + Duplicate_function_implementation: { code: 2393, category: 1 /* Error */, key: "Duplicate function implementation." }, + Overload_signature_is_not_compatible_with_function_implementation: { code: 2394, category: 1 /* Error */, key: "Overload signature is not compatible with function implementation." }, + Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local: { code: 2395, category: 1 /* Error */, key: "Individual declarations in merged declaration {0} must be all exported or all local." }, + Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters: { code: 2396, category: 1 /* Error */, key: "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters." }, + Duplicate_identifier_i_Compiler_uses_i_to_initialize_rest_parameter: { code: 2397, category: 1 /* Error */, key: "Duplicate identifier '_i'. Compiler uses '_i' to initialize rest parameter." }, + Expression_resolves_to_variable_declaration_i_that_compiler_uses_to_initialize_rest_parameter: { code: 2398, category: 1 /* Error */, key: "Expression resolves to variable declaration '_i' that compiler uses to initialize rest parameter." }, + Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference: { code: 2399, category: 1 /* Error */, key: "Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference." }, + Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference: { code: 2400, category: 1 /* Error */, key: "Expression resolves to variable declaration '_this' that compiler uses to capture 'this' reference." }, + Duplicate_identifier_super_Compiler_uses_super_to_capture_base_class_reference: { code: 2401, category: 1 /* Error */, key: "Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference." }, + Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference: { code: 2402, category: 1 /* Error */, key: "Expression resolves to '_super' that compiler uses to capture base class reference." }, + Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2: { code: 2403, category: 1 /* Error */, key: "Subsequent variable declarations must have the same type. Variable '{0}' must be of type '{1}', but here has type '{2}'." }, + The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation: { code: 2404, category: 1 /* Error */, key: "The left-hand side of a 'for...in' statement cannot use a type annotation." }, + The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any: { code: 2405, category: 1 /* Error */, key: "The left-hand side of a 'for...in' statement must be of type 'string' or 'any'." }, + Invalid_left_hand_side_in_for_in_statement: { code: 2406, category: 1 /* Error */, key: "Invalid left-hand side in 'for...in' statement." }, + The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter: { code: 2407, category: 1 /* Error */, key: "The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter." }, + Setters_cannot_return_a_value: { code: 2408, category: 1 /* Error */, key: "Setters cannot return a value." }, + Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class: { code: 2409, category: 1 /* Error */, key: "Return type of constructor signature must be assignable to the instance type of the class" }, + All_symbols_within_a_with_block_will_be_resolved_to_any: { code: 2410, category: 1 /* Error */, key: "All symbols within a 'with' block will be resolved to 'any'." }, + Property_0_of_type_1_is_not_assignable_to_string_index_type_2: { code: 2411, category: 1 /* Error */, key: "Property '{0}' of type '{1}' is not assignable to string index type '{2}'." }, + Property_0_of_type_1_is_not_assignable_to_numeric_index_type_2: { code: 2412, category: 1 /* Error */, key: "Property '{0}' of type '{1}' is not assignable to numeric index type '{2}'." }, + Numeric_index_type_0_is_not_assignable_to_string_index_type_1: { code: 2413, category: 1 /* Error */, key: "Numeric index type '{0}' is not assignable to string index type '{1}'." }, + Class_name_cannot_be_0: { code: 2414, category: 1 /* Error */, key: "Class name cannot be '{0}'" }, + Class_0_incorrectly_extends_base_class_1: { code: 2415, category: 1 /* Error */, key: "Class '{0}' incorrectly extends base class '{1}'." }, + Class_static_side_0_incorrectly_extends_base_class_static_side_1: { code: 2417, category: 1 /* Error */, key: "Class static side '{0}' incorrectly extends base class static side '{1}'." }, + Type_name_0_in_extends_clause_does_not_reference_constructor_function_for_0: { code: 2419, category: 1 /* Error */, key: "Type name '{0}' in extends clause does not reference constructor function for '{0}'." }, + Class_0_incorrectly_implements_interface_1: { code: 2420, category: 1 /* Error */, key: "Class '{0}' incorrectly implements interface '{1}'." }, + A_class_may_only_implement_another_class_or_interface: { code: 2422, category: 1 /* Error */, key: "A class may only implement another class or interface." }, + Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor: { code: 2423, category: 1 /* Error */, key: "Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member accessor." }, + Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_property: { code: 2424, category: 1 /* Error */, key: "Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member property." }, + Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_function: { code: 2425, category: 1 /* Error */, key: "Class '{0}' defines instance member property '{1}', but extended class '{2}' defines it as instance member function." }, + Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_function: { code: 2426, category: 1 /* Error */, key: "Class '{0}' defines instance member accessor '{1}', but extended class '{2}' defines it as instance member function." }, + Interface_name_cannot_be_0: { code: 2427, category: 1 /* Error */, key: "Interface name cannot be '{0}'" }, + All_declarations_of_an_interface_must_have_identical_type_parameters: { code: 2428, category: 1 /* Error */, key: "All declarations of an interface must have identical type parameters." }, + Interface_0_incorrectly_extends_interface_1: { code: 2430, category: 1 /* Error */, key: "Interface '{0}' incorrectly extends interface '{1}'." }, + Enum_name_cannot_be_0: { code: 2431, category: 1 /* Error */, key: "Enum name cannot be '{0}'" }, + In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enum_element: { code: 2432, category: 1 /* Error */, key: "In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element." }, + A_module_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merged: { code: 2433, category: 1 /* Error */, key: "A module declaration cannot be in a different file from a class or function with which it is merged" }, + A_module_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged: { code: 2434, category: 1 /* Error */, key: "A module declaration cannot be located prior to a class or function with which it is merged" }, + Ambient_external_modules_cannot_be_nested_in_other_modules: { code: 2435, category: 1 /* Error */, key: "Ambient external modules cannot be nested in other modules." }, + Ambient_external_module_declaration_cannot_specify_relative_module_name: { code: 2436, category: 1 /* Error */, key: "Ambient external module declaration cannot specify relative module name." }, + Module_0_is_hidden_by_a_local_declaration_with_the_same_name: { code: 2437, category: 1 /* Error */, key: "Module '{0}' is hidden by a local declaration with the same name" }, + Import_name_cannot_be_0: { code: 2438, category: 1 /* Error */, key: "Import name cannot be '{0}'" }, + Import_declaration_in_an_ambient_external_module_declaration_cannot_reference_external_module_through_relative_external_module_name: { code: 2439, category: 1 /* Error */, key: "Import declaration in an ambient external module declaration cannot reference external module through relative external module name." }, + Import_declaration_conflicts_with_local_declaration_of_0: { code: 2440, category: 1 /* Error */, key: "Import declaration conflicts with local declaration of '{0}'" }, + Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_an_external_module: { code: 2441, category: 1 /* Error */, key: "Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of an external module." }, + Types_have_separate_declarations_of_a_private_property_0: { code: 2442, category: 1 /* Error */, key: "Types have separate declarations of a private property '{0}'." }, + Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2: { code: 2443, category: 1 /* Error */, key: "Property '{0}' is protected but type '{1}' is not a class derived from '{2}'." }, + Property_0_is_protected_in_type_1_but_public_in_type_2: { code: 2444, category: 1 /* Error */, key: "Property '{0}' is protected in type '{1}' but public in type '{2}'." }, + Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses: { code: 2445, category: 1 /* Error */, key: "Property '{0}' is protected and only accessible within class '{1}' and its subclasses." }, + Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1: { code: 2446, category: 1 /* Error */, key: "Property '{0}' is protected and only accessible through an instance of class '{1}'." }, + The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead: { code: 2447, category: 1 /* Error */, key: "The '{0}' operator is not allowed for boolean types. Consider using '{1}' instead." }, + Block_scoped_variable_0_used_before_its_declaration: { code: 2448, category: 1 /* Error */, key: "Block-scoped variable '{0}' used before its declaration.", isEarly: true }, + The_operand_of_an_increment_or_decrement_operator_cannot_be_a_constant: { code: 2449, category: 1 /* Error */, key: "The operand of an increment or decrement operator cannot be a constant.", isEarly: true }, + Left_hand_side_of_assignment_expression_cannot_be_a_constant: { code: 2450, category: 1 /* Error */, key: "Left-hand side of assignment expression cannot be a constant.", isEarly: true }, + Cannot_redeclare_block_scoped_variable_0: { code: 2451, category: 1 /* Error */, key: "Cannot redeclare block-scoped variable '{0}'.", isEarly: true }, + An_enum_member_cannot_have_a_numeric_name: { code: 2452, category: 1 /* Error */, key: "An enum member cannot have a numeric name." }, + The_type_argument_for_type_parameter_0_cannot_be_inferred_from_the_usage_Consider_specifying_the_type_arguments_explicitly: { code: 2453, category: 1 /* Error */, key: "The type argument for type parameter '{0}' cannot be inferred from the usage. Consider specifying the type arguments explicitly." }, + Type_argument_candidate_1_is_not_a_valid_type_argument_because_it_is_not_a_supertype_of_candidate_0: { code: 2455, category: 1 /* Error */, key: "Type argument candidate '{1}' is not a valid type argument because it is not a supertype of candidate '{0}'." }, + Type_alias_0_circularly_references_itself: { code: 2456, category: 1 /* Error */, key: "Type alias '{0}' circularly references itself." }, + Type_alias_name_cannot_be_0: { code: 2457, category: 1 /* Error */, key: "Type alias name cannot be '{0}'" }, + An_AMD_module_cannot_have_multiple_name_assignments: { code: 2458, category: 1 /* Error */, key: "An AMD module cannot have multiple name assignments." }, + Import_declaration_0_is_using_private_name_1: { code: 4000, category: 1 /* Error */, key: "Import declaration '{0}' is using private name '{1}'." }, + Type_parameter_0_of_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 4001, category: 1 /* Error */, key: "Type parameter '{0}' of exported class has or is using name '{1}' from private module '{2}'." }, + Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: { code: 4002, category: 1 /* Error */, key: "Type parameter '{0}' of exported class has or is using private name '{1}'." }, + Type_parameter_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2: { code: 4003, category: 1 /* Error */, key: "Type parameter '{0}' of exported interface has or is using name '{1}' from private module '{2}'." }, + Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: { code: 4004, category: 1 /* Error */, key: "Type parameter '{0}' of exported interface has or is using private name '{1}'." }, + Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2: { code: 4005, category: 1 /* Error */, key: "Type parameter '{0}' of constructor signature from exported interface has or is using name '{1}' from private module '{2}'." }, + Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1: { code: 4006, category: 1 /* Error */, key: "Type parameter '{0}' of constructor signature from exported interface has or is using private name '{1}'." }, + Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2: { code: 4007, category: 1 /* Error */, key: "Type parameter '{0}' of call signature from exported interface has or is using name '{1}' from private module '{2}'." }, + Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1: { code: 4008, category: 1 /* Error */, key: "Type parameter '{0}' of call signature from exported interface has or is using private name '{1}'." }, + Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 4009, category: 1 /* Error */, key: "Type parameter '{0}' of public static method from exported class has or is using name '{1}' from private module '{2}'." }, + Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1: { code: 4010, category: 1 /* Error */, key: "Type parameter '{0}' of public static method from exported class has or is using private name '{1}'." }, + Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 4011, category: 1 /* Error */, key: "Type parameter '{0}' of public method from exported class has or is using name '{1}' from private module '{2}'." }, + Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1: { code: 4012, category: 1 /* Error */, key: "Type parameter '{0}' of public method from exported class has or is using private name '{1}'." }, + Type_parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2: { code: 4013, category: 1 /* Error */, key: "Type parameter '{0}' of method from exported interface has or is using name '{1}' from private module '{2}'." }, + Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1: { code: 4014, category: 1 /* Error */, key: "Type parameter '{0}' of method from exported interface has or is using private name '{1}'." }, + Type_parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2: { code: 4015, category: 1 /* Error */, key: "Type parameter '{0}' of exported function has or is using name '{1}' from private module '{2}'." }, + Type_parameter_0_of_exported_function_has_or_is_using_private_name_1: { code: 4016, category: 1 /* Error */, key: "Type parameter '{0}' of exported function has or is using private name '{1}'." }, + Implements_clause_of_exported_class_0_has_or_is_using_name_1_from_private_module_2: { code: 4017, category: 1 /* Error */, key: "Implements clause of exported class '{0}' has or is using name '{1}' from private module '{2}'." }, + Extends_clause_of_exported_class_0_has_or_is_using_name_1_from_private_module_2: { code: 4018, category: 1 /* Error */, key: "Extends clause of exported class '{0}' has or is using name '{1}' from private module '{2}'." }, + Implements_clause_of_exported_class_0_has_or_is_using_private_name_1: { code: 4019, category: 1 /* Error */, key: "Implements clause of exported class '{0}' has or is using private name '{1}'." }, + Extends_clause_of_exported_class_0_has_or_is_using_private_name_1: { code: 4020, category: 1 /* Error */, key: "Extends clause of exported class '{0}' has or is using private name '{1}'." }, + Extends_clause_of_exported_interface_0_has_or_is_using_name_1_from_private_module_2: { code: 4021, category: 1 /* Error */, key: "Extends clause of exported interface '{0}' has or is using name '{1}' from private module '{2}'." }, + Extends_clause_of_exported_interface_0_has_or_is_using_private_name_1: { code: 4022, category: 1 /* Error */, key: "Extends clause of exported interface '{0}' has or is using private name '{1}'." }, + Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: { code: 4023, category: 1 /* Error */, key: "Exported variable '{0}' has or is using name '{1}' from external module {2} but cannot be named." }, + Exported_variable_0_has_or_is_using_name_1_from_private_module_2: { code: 4024, category: 1 /* Error */, key: "Exported variable '{0}' has or is using name '{1}' from private module '{2}'." }, + Exported_variable_0_has_or_is_using_private_name_1: { code: 4025, category: 1 /* Error */, key: "Exported variable '{0}' has or is using private name '{1}'." }, + Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: { code: 4026, category: 1 /* Error */, key: "Public static property '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named." }, + Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 4027, category: 1 /* Error */, key: "Public static property '{0}' of exported class has or is using name '{1}' from private module '{2}'." }, + Public_static_property_0_of_exported_class_has_or_is_using_private_name_1: { code: 4028, category: 1 /* Error */, key: "Public static property '{0}' of exported class has or is using private name '{1}'." }, + Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: { code: 4029, category: 1 /* Error */, key: "Public property '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named." }, + Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 4030, category: 1 /* Error */, key: "Public property '{0}' of exported class has or is using name '{1}' from private module '{2}'." }, + Public_property_0_of_exported_class_has_or_is_using_private_name_1: { code: 4031, category: 1 /* Error */, key: "Public property '{0}' of exported class has or is using private name '{1}'." }, + Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2: { code: 4032, category: 1 /* Error */, key: "Property '{0}' of exported interface has or is using name '{1}' from private module '{2}'." }, + Property_0_of_exported_interface_has_or_is_using_private_name_1: { code: 4033, category: 1 /* Error */, key: "Property '{0}' of exported interface has or is using private name '{1}'." }, + Parameter_0_of_public_static_property_setter_from_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 4034, category: 1 /* Error */, key: "Parameter '{0}' of public static property setter from exported class has or is using name '{1}' from private module '{2}'." }, + Parameter_0_of_public_static_property_setter_from_exported_class_has_or_is_using_private_name_1: { code: 4035, category: 1 /* Error */, key: "Parameter '{0}' of public static property setter from exported class has or is using private name '{1}'." }, + Parameter_0_of_public_property_setter_from_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 4036, category: 1 /* Error */, key: "Parameter '{0}' of public property setter from exported class has or is using name '{1}' from private module '{2}'." }, + Parameter_0_of_public_property_setter_from_exported_class_has_or_is_using_private_name_1: { code: 4037, category: 1 /* Error */, key: "Parameter '{0}' of public property setter from exported class has or is using private name '{1}'." }, + Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: { code: 4038, category: 1 /* Error */, key: "Return type of public static property getter from exported class has or is using name '{0}' from external module {1} but cannot be named." }, + Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_name_0_from_private_module_1: { code: 4039, category: 1 /* Error */, key: "Return type of public static property getter from exported class has or is using name '{0}' from private module '{1}'." }, + Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_private_name_0: { code: 4040, category: 1 /* Error */, key: "Return type of public static property getter from exported class has or is using private name '{0}'." }, + Return_type_of_public_property_getter_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: { code: 4041, category: 1 /* Error */, key: "Return type of public property getter from exported class has or is using name '{0}' from external module {1} but cannot be named." }, + Return_type_of_public_property_getter_from_exported_class_has_or_is_using_name_0_from_private_module_1: { code: 4042, category: 1 /* Error */, key: "Return type of public property getter from exported class has or is using name '{0}' from private module '{1}'." }, + Return_type_of_public_property_getter_from_exported_class_has_or_is_using_private_name_0: { code: 4043, category: 1 /* Error */, key: "Return type of public property getter from exported class has or is using private name '{0}'." }, + Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1: { code: 4044, category: 1 /* Error */, key: "Return type of constructor signature from exported interface has or is using name '{0}' from private module '{1}'." }, + Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0: { code: 4045, category: 1 /* Error */, key: "Return type of constructor signature from exported interface has or is using private name '{0}'." }, + Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1: { code: 4046, category: 1 /* Error */, key: "Return type of call signature from exported interface has or is using name '{0}' from private module '{1}'." }, + Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0: { code: 4047, category: 1 /* Error */, key: "Return type of call signature from exported interface has or is using private name '{0}'." }, + Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1: { code: 4048, category: 1 /* Error */, key: "Return type of index signature from exported interface has or is using name '{0}' from private module '{1}'." }, + Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0: { code: 4049, category: 1 /* Error */, key: "Return type of index signature from exported interface has or is using private name '{0}'." }, + Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: { code: 4050, category: 1 /* Error */, key: "Return type of public static method from exported class has or is using name '{0}' from external module {1} but cannot be named." }, + Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1: { code: 4051, category: 1 /* Error */, key: "Return type of public static method from exported class has or is using name '{0}' from private module '{1}'." }, + Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0: { code: 4052, category: 1 /* Error */, key: "Return type of public static method from exported class has or is using private name '{0}'." }, + Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: { code: 4053, category: 1 /* Error */, key: "Return type of public method from exported class has or is using name '{0}' from external module {1} but cannot be named." }, + Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1: { code: 4054, category: 1 /* Error */, key: "Return type of public method from exported class has or is using name '{0}' from private module '{1}'." }, + Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0: { code: 4055, category: 1 /* Error */, key: "Return type of public method from exported class has or is using private name '{0}'." }, + Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1: { code: 4056, category: 1 /* Error */, key: "Return type of method from exported interface has or is using name '{0}' from private module '{1}'." }, + Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0: { code: 4057, category: 1 /* Error */, key: "Return type of method from exported interface has or is using private name '{0}'." }, + Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: { code: 4058, category: 1 /* Error */, key: "Return type of exported function has or is using name '{0}' from external module {1} but cannot be named." }, + Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1: { code: 4059, category: 1 /* Error */, key: "Return type of exported function has or is using name '{0}' from private module '{1}'." }, + Return_type_of_exported_function_has_or_is_using_private_name_0: { code: 4060, category: 1 /* Error */, key: "Return type of exported function has or is using private name '{0}'." }, + Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: { code: 4061, category: 1 /* Error */, key: "Parameter '{0}' of constructor from exported class has or is using name '{1}' from external module {2} but cannot be named." }, + Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 4062, category: 1 /* Error */, key: "Parameter '{0}' of constructor from exported class has or is using name '{1}' from private module '{2}'." }, + Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1: { code: 4063, category: 1 /* Error */, key: "Parameter '{0}' of constructor from exported class has or is using private name '{1}'." }, + Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2: { code: 4064, category: 1 /* Error */, key: "Parameter '{0}' of constructor signature from exported interface has or is using name '{1}' from private module '{2}'." }, + Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1: { code: 4065, category: 1 /* Error */, key: "Parameter '{0}' of constructor signature from exported interface has or is using private name '{1}'." }, + Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2: { code: 4066, category: 1 /* Error */, key: "Parameter '{0}' of call signature from exported interface has or is using name '{1}' from private module '{2}'." }, + Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1: { code: 4067, category: 1 /* Error */, key: "Parameter '{0}' of call signature from exported interface has or is using private name '{1}'." }, + Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: { code: 4068, category: 1 /* Error */, key: "Parameter '{0}' of public static method from exported class has or is using name '{1}' from external module {2} but cannot be named." }, + Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 4069, category: 1 /* Error */, key: "Parameter '{0}' of public static method from exported class has or is using name '{1}' from private module '{2}'." }, + Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1: { code: 4070, category: 1 /* Error */, key: "Parameter '{0}' of public static method from exported class has or is using private name '{1}'." }, + Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: { code: 4071, category: 1 /* Error */, key: "Parameter '{0}' of public method from exported class has or is using name '{1}' from external module {2} but cannot be named." }, + Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 4072, category: 1 /* Error */, key: "Parameter '{0}' of public method from exported class has or is using name '{1}' from private module '{2}'." }, + Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1: { code: 4073, category: 1 /* Error */, key: "Parameter '{0}' of public method from exported class has or is using private name '{1}'." }, + Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2: { code: 4074, category: 1 /* Error */, key: "Parameter '{0}' of method from exported interface has or is using name '{1}' from private module '{2}'." }, + Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1: { code: 4075, category: 1 /* Error */, key: "Parameter '{0}' of method from exported interface has or is using private name '{1}'." }, + Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: { code: 4076, category: 1 /* Error */, key: "Parameter '{0}' of exported function has or is using name '{1}' from external module {2} but cannot be named." }, + Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2: { code: 4077, category: 1 /* Error */, key: "Parameter '{0}' of exported function has or is using name '{1}' from private module '{2}'." }, + Parameter_0_of_exported_function_has_or_is_using_private_name_1: { code: 4078, category: 1 /* Error */, key: "Parameter '{0}' of exported function has or is using private name '{1}'." }, + Exported_type_alias_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: { code: 4079, category: 1 /* Error */, key: "Exported type alias '{0}' has or is using name '{1}' from external module {2} but cannot be named." }, + Exported_type_alias_0_has_or_is_using_name_1_from_private_module_2: { code: 4080, category: 1 /* Error */, key: "Exported type alias '{0}' has or is using name '{1}' from private module '{2}'." }, + Exported_type_alias_0_has_or_is_using_private_name_1: { code: 4081, category: 1 /* Error */, key: "Exported type alias '{0}' has or is using private name '{1}'." }, + Enum_declarations_must_all_be_const_or_non_const: { code: 4082, category: 1 /* Error */, key: "Enum declarations must all be const or non-const." }, + In_const_enum_declarations_member_initializer_must_be_constant_expression: { code: 4083, category: 1 /* Error */, key: "In 'const' enum declarations member initializer must be constant expression.", isEarly: true }, + const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment: { code: 4084, category: 1 /* Error */, key: "'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment." }, + Index_expression_arguments_in_const_enums_must_be_of_type_string: { code: 4085, category: 1 /* Error */, key: "Index expression arguments in 'const' enums must be of type 'string'." }, + const_enum_member_initializer_was_evaluated_to_a_non_finite_value: { code: 4086, category: 1 /* Error */, key: "'const' enum member initializer was evaluated to a non-finite value." }, + const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN: { code: 4087, category: 1 /* Error */, key: "'const' enum member initializer was evaluated to disallowed value 'NaN'." }, + The_current_host_does_not_support_the_0_option: { code: 5001, category: 1 /* Error */, key: "The current host does not support the '{0}' option." }, + Cannot_find_the_common_subdirectory_path_for_the_input_files: { code: 5009, category: 1 /* Error */, key: "Cannot find the common subdirectory path for the input files." }, + Cannot_read_file_0_Colon_1: { code: 5012, category: 1 /* Error */, key: "Cannot read file '{0}': {1}" }, + Unsupported_file_encoding: { code: 5013, category: 1 /* Error */, key: "Unsupported file encoding." }, + Unknown_compiler_option_0: { code: 5023, category: 1 /* Error */, key: "Unknown compiler option '{0}'." }, + Could_not_write_file_0_Colon_1: { code: 5033, category: 1 /* Error */, key: "Could not write file '{0}': {1}" }, + Option_mapRoot_cannot_be_specified_without_specifying_sourcemap_option: { code: 5038, category: 1 /* Error */, key: "Option mapRoot cannot be specified without specifying sourcemap option." }, + Option_sourceRoot_cannot_be_specified_without_specifying_sourcemap_option: { code: 5039, category: 1 /* Error */, key: "Option sourceRoot cannot be specified without specifying sourcemap option." }, + Concatenate_and_emit_output_to_single_file: { code: 6001, category: 2 /* Message */, key: "Concatenate and emit output to single file." }, + Generates_corresponding_d_ts_file: { code: 6002, category: 2 /* Message */, key: "Generates corresponding '.d.ts' file." }, + Specifies_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations: { code: 6003, category: 2 /* Message */, key: "Specifies the location where debugger should locate map files instead of generated locations." }, + Specifies_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations: { code: 6004, category: 2 /* Message */, key: "Specifies the location where debugger should locate TypeScript files instead of source locations." }, + Watch_input_files: { code: 6005, category: 2 /* Message */, key: "Watch input files." }, + Redirect_output_structure_to_the_directory: { code: 6006, category: 2 /* Message */, key: "Redirect output structure to the directory." }, + Do_not_erase_const_enum_declarations_in_generated_code: { code: 6007, category: 2 /* Message */, key: "Do not erase const enum declarations in generated code." }, + Do_not_emit_outputs_if_any_type_checking_errors_were_reported: { code: 6008, category: 2 /* Message */, key: "Do not emit outputs if any type checking errors were reported." }, + Do_not_emit_comments_to_output: { code: 6009, category: 2 /* Message */, key: "Do not emit comments to output." }, + Specify_ECMAScript_target_version_Colon_ES3_default_ES5_or_ES6_experimental: { code: 6015, category: 2 /* Message */, key: "Specify ECMAScript target version: 'ES3' (default), 'ES5', or 'ES6' (experimental)" }, + Specify_module_code_generation_Colon_commonjs_or_amd: { code: 6016, category: 2 /* Message */, key: "Specify module code generation: 'commonjs' or 'amd'" }, + Print_this_message: { code: 6017, category: 2 /* Message */, key: "Print this message." }, + Print_the_compiler_s_version: { code: 6019, category: 2 /* Message */, key: "Print the compiler's version." }, + Syntax_Colon_0: { code: 6023, category: 2 /* Message */, key: "Syntax: {0}" }, + options: { code: 6024, category: 2 /* Message */, key: "options" }, + file: { code: 6025, category: 2 /* Message */, key: "file" }, + Examples_Colon_0: { code: 6026, category: 2 /* Message */, key: "Examples: {0}" }, + Options_Colon: { code: 6027, category: 2 /* Message */, key: "Options:" }, + Version_0: { code: 6029, category: 2 /* Message */, key: "Version {0}" }, + Insert_command_line_options_and_files_from_a_file: { code: 6030, category: 2 /* Message */, key: "Insert command line options and files from a file." }, + File_change_detected_Compiling: { code: 6032, category: 2 /* Message */, key: "File change detected. Compiling..." }, + KIND: { code: 6034, category: 2 /* Message */, key: "KIND" }, + FILE: { code: 6035, category: 2 /* Message */, key: "FILE" }, + VERSION: { code: 6036, category: 2 /* Message */, key: "VERSION" }, + LOCATION: { code: 6037, category: 2 /* Message */, key: "LOCATION" }, + DIRECTORY: { code: 6038, category: 2 /* Message */, key: "DIRECTORY" }, + Compilation_complete_Watching_for_file_changes: { code: 6042, category: 2 /* Message */, key: "Compilation complete. Watching for file changes." }, + Generates_corresponding_map_file: { code: 6043, category: 2 /* Message */, key: "Generates corresponding '.map' file." }, + Compiler_option_0_expects_an_argument: { code: 6044, category: 1 /* Error */, key: "Compiler option '{0}' expects an argument." }, + Unterminated_quoted_string_in_response_file_0: { code: 6045, category: 1 /* Error */, key: "Unterminated quoted string in response file '{0}'." }, + Argument_for_module_option_must_be_commonjs_or_amd: { code: 6046, category: 1 /* Error */, key: "Argument for '--module' option must be 'commonjs' or 'amd'." }, + Argument_for_target_option_must_be_es3_es5_or_es6: { code: 6047, category: 1 /* Error */, key: "Argument for '--target' option must be 'es3', 'es5', or 'es6'." }, + Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1: { code: 6048, category: 1 /* Error */, key: "Locale must be of the form or -. For example '{0}' or '{1}'." }, + Unsupported_locale_0: { code: 6049, category: 1 /* Error */, key: "Unsupported locale '{0}'." }, + Unable_to_open_file_0: { code: 6050, category: 1 /* Error */, key: "Unable to open file '{0}'." }, + Corrupted_locale_file_0: { code: 6051, category: 1 /* Error */, key: "Corrupted locale file {0}." }, + Warn_on_expressions_and_declarations_with_an_implied_any_type: { code: 6052, category: 2 /* Message */, key: "Warn on expressions and declarations with an implied 'any' type." }, + File_0_not_found: { code: 6053, category: 1 /* Error */, key: "File '{0}' not found." }, + File_0_must_have_extension_ts_or_d_ts: { code: 6054, category: 1 /* Error */, key: "File '{0}' must have extension '.ts' or '.d.ts'." }, + Variable_0_implicitly_has_an_1_type: { code: 7005, category: 1 /* Error */, key: "Variable '{0}' implicitly has an '{1}' type." }, + Parameter_0_implicitly_has_an_1_type: { code: 7006, category: 1 /* Error */, key: "Parameter '{0}' implicitly has an '{1}' type." }, + Member_0_implicitly_has_an_1_type: { code: 7008, category: 1 /* Error */, key: "Member '{0}' implicitly has an '{1}' type." }, + new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type: { code: 7009, category: 1 /* Error */, key: "'new' expression, whose target lacks a construct signature, implicitly has an 'any' type." }, + _0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type: { code: 7010, category: 1 /* Error */, key: "'{0}', which lacks return-type annotation, implicitly has an '{1}' return type." }, + Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type: { code: 7011, category: 1 /* Error */, key: "Function expression, which lacks return-type annotation, implicitly has an '{0}' return type." }, + Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type: { code: 7013, category: 1 /* Error */, key: "Construct signature, which lacks return-type annotation, implicitly has an 'any' return type." }, + Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_type_annotation: { code: 7016, category: 1 /* Error */, key: "Property '{0}' implicitly has type 'any', because its 'set' accessor lacks a type annotation." }, + Index_signature_of_object_type_implicitly_has_an_any_type: { code: 7017, category: 1 /* Error */, key: "Index signature of object type implicitly has an 'any' type." }, + Object_literal_s_property_0_implicitly_has_an_1_type: { code: 7018, category: 1 /* Error */, key: "Object literal's property '{0}' implicitly has an '{1}' type." }, + Rest_parameter_0_implicitly_has_an_any_type: { code: 7019, category: 1 /* Error */, key: "Rest parameter '{0}' implicitly has an 'any[]' type." }, + Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type: { code: 7020, category: 1 /* Error */, key: "Call signature, which lacks return-type annotation, implicitly has an 'any' return type." }, + _0_implicitly_has_type_any_because_it_is_referenced_directly_or_indirectly_in_its_own_type_annotation: { code: 7021, category: 1 /* Error */, key: "'{0}' implicitly has type 'any' because it is referenced directly or indirectly in its own type annotation." }, + _0_implicitly_has_type_any_because_it_is_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer: { code: 7022, category: 1 /* Error */, key: "'{0}' implicitly has type 'any' because it is does not have a type annotation and is referenced directly or indirectly in its own initializer." }, + _0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions: { code: 7023, category: 1 /* Error */, key: "'{0}' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions." }, + Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions: { code: 7024, category: 1 /* Error */, key: "Function implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions." }, + You_cannot_rename_this_element: { code: 8000, category: 1 /* Error */, key: "You cannot rename this element." } + }; +})(ts || (ts = {})); +var ts; +(function (ts) { + var textToToken = { + "any": 109 /* AnyKeyword */, + "boolean": 110 /* BooleanKeyword */, + "break": 64 /* BreakKeyword */, + "case": 65 /* CaseKeyword */, + "catch": 66 /* CatchKeyword */, + "class": 67 /* ClassKeyword */, + "continue": 69 /* ContinueKeyword */, + "const": 68 /* ConstKeyword */, + "constructor": 111 /* ConstructorKeyword */, + "debugger": 70 /* DebuggerKeyword */, + "declare": 112 /* DeclareKeyword */, + "default": 71 /* DefaultKeyword */, + "delete": 72 /* DeleteKeyword */, + "do": 73 /* DoKeyword */, + "else": 74 /* ElseKeyword */, + "enum": 75 /* EnumKeyword */, + "export": 76 /* ExportKeyword */, + "extends": 77 /* ExtendsKeyword */, + "false": 78 /* FalseKeyword */, + "finally": 79 /* FinallyKeyword */, + "for": 80 /* ForKeyword */, + "function": 81 /* FunctionKeyword */, + "get": 113 /* GetKeyword */, + "if": 82 /* IfKeyword */, + "implements": 100 /* ImplementsKeyword */, + "import": 83 /* ImportKeyword */, + "in": 84 /* InKeyword */, + "instanceof": 85 /* InstanceOfKeyword */, + "interface": 101 /* InterfaceKeyword */, + "let": 102 /* LetKeyword */, + "module": 114 /* ModuleKeyword */, + "new": 86 /* NewKeyword */, + "null": 87 /* NullKeyword */, + "number": 116 /* NumberKeyword */, + "package": 103 /* PackageKeyword */, + "private": 104 /* PrivateKeyword */, + "protected": 105 /* ProtectedKeyword */, + "public": 106 /* PublicKeyword */, + "require": 115 /* RequireKeyword */, + "return": 88 /* ReturnKeyword */, + "set": 117 /* SetKeyword */, + "static": 107 /* StaticKeyword */, + "string": 118 /* StringKeyword */, + "super": 89 /* SuperKeyword */, + "switch": 90 /* SwitchKeyword */, + "this": 91 /* ThisKeyword */, + "throw": 92 /* ThrowKeyword */, + "true": 93 /* TrueKeyword */, + "try": 94 /* TryKeyword */, + "type": 119 /* TypeKeyword */, + "typeof": 95 /* TypeOfKeyword */, + "var": 96 /* VarKeyword */, + "void": 97 /* VoidKeyword */, + "while": 98 /* WhileKeyword */, + "with": 99 /* WithKeyword */, + "yield": 108 /* YieldKeyword */, + "{": 13 /* OpenBraceToken */, + "}": 14 /* CloseBraceToken */, + "(": 15 /* OpenParenToken */, + ")": 16 /* CloseParenToken */, + "[": 17 /* OpenBracketToken */, + "]": 18 /* CloseBracketToken */, + ".": 19 /* DotToken */, + "...": 20 /* DotDotDotToken */, + ";": 21 /* SemicolonToken */, + ",": 22 /* CommaToken */, + "<": 23 /* LessThanToken */, + ">": 24 /* GreaterThanToken */, + "<=": 25 /* LessThanEqualsToken */, + ">=": 26 /* GreaterThanEqualsToken */, + "==": 27 /* EqualsEqualsToken */, + "!=": 28 /* ExclamationEqualsToken */, + "===": 29 /* EqualsEqualsEqualsToken */, + "!==": 30 /* ExclamationEqualsEqualsToken */, + "=>": 31 /* EqualsGreaterThanToken */, + "+": 32 /* PlusToken */, + "-": 33 /* MinusToken */, + "*": 34 /* AsteriskToken */, + "/": 35 /* SlashToken */, + "%": 36 /* PercentToken */, + "++": 37 /* PlusPlusToken */, + "--": 38 /* MinusMinusToken */, + "<<": 39 /* LessThanLessThanToken */, + ">>": 40 /* GreaterThanGreaterThanToken */, + ">>>": 41 /* GreaterThanGreaterThanGreaterThanToken */, + "&": 42 /* AmpersandToken */, + "|": 43 /* BarToken */, + "^": 44 /* CaretToken */, + "!": 45 /* ExclamationToken */, + "~": 46 /* TildeToken */, + "&&": 47 /* AmpersandAmpersandToken */, + "||": 48 /* BarBarToken */, + "?": 49 /* QuestionToken */, + ":": 50 /* ColonToken */, + "=": 51 /* EqualsToken */, + "+=": 52 /* PlusEqualsToken */, + "-=": 53 /* MinusEqualsToken */, + "*=": 54 /* AsteriskEqualsToken */, + "/=": 55 /* SlashEqualsToken */, + "%=": 56 /* PercentEqualsToken */, + "<<=": 57 /* LessThanLessThanEqualsToken */, + ">>=": 58 /* GreaterThanGreaterThanEqualsToken */, + ">>>=": 59 /* GreaterThanGreaterThanGreaterThanEqualsToken */, + "&=": 60 /* AmpersandEqualsToken */, + "|=": 61 /* BarEqualsToken */, + "^=": 62 /* CaretEqualsToken */ + }; + var unicodeES3IdentifierStart = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 543, 546, 563, 592, 685, 688, 696, 699, 705, 720, 721, 736, 740, 750, 750, 890, 890, 902, 902, 904, 906, 908, 908, 910, 929, 931, 974, 976, 983, 986, 1011, 1024, 1153, 1164, 1220, 1223, 1224, 1227, 1228, 1232, 1269, 1272, 1273, 1329, 1366, 1369, 1369, 1377, 1415, 1488, 1514, 1520, 1522, 1569, 1594, 1600, 1610, 1649, 1747, 1749, 1749, 1765, 1766, 1786, 1788, 1808, 1808, 1810, 1836, 1920, 1957, 2309, 2361, 2365, 2365, 2384, 2384, 2392, 2401, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2524, 2525, 2527, 2529, 2544, 2545, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2649, 2652, 2654, 2654, 2674, 2676, 2693, 2699, 2701, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2749, 2749, 2768, 2768, 2784, 2784, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2870, 2873, 2877, 2877, 2908, 2909, 2911, 2913, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 2997, 2999, 3001, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3168, 3169, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3294, 3294, 3296, 3297, 3333, 3340, 3342, 3344, 3346, 3368, 3370, 3385, 3424, 3425, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3585, 3632, 3634, 3635, 3648, 3654, 3713, 3714, 3716, 3716, 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743, 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3760, 3762, 3763, 3773, 3773, 3776, 3780, 3782, 3782, 3804, 3805, 3840, 3840, 3904, 3911, 3913, 3946, 3976, 3979, 4096, 4129, 4131, 4135, 4137, 4138, 4176, 4181, 4256, 4293, 4304, 4342, 4352, 4441, 4447, 4514, 4520, 4601, 4608, 4614, 4616, 4678, 4680, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4742, 4744, 4744, 4746, 4749, 4752, 4782, 4784, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4814, 4816, 4822, 4824, 4846, 4848, 4878, 4880, 4880, 4882, 4885, 4888, 4894, 4896, 4934, 4936, 4954, 5024, 5108, 5121, 5740, 5743, 5750, 5761, 5786, 5792, 5866, 6016, 6067, 6176, 6263, 6272, 6312, 7680, 7835, 7840, 7929, 7936, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8319, 8319, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8497, 8499, 8505, 8544, 8579, 12293, 12295, 12321, 12329, 12337, 12341, 12344, 12346, 12353, 12436, 12445, 12446, 12449, 12538, 12540, 12542, 12549, 12588, 12593, 12686, 12704, 12727, 13312, 19893, 19968, 40869, 40960, 42124, 44032, 55203, 63744, 64045, 64256, 64262, 64275, 64279, 64285, 64285, 64287, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65136, 65138, 65140, 65140, 65142, 65276, 65313, 65338, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500,]; + var unicodeES3IdentifierPart = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 543, 546, 563, 592, 685, 688, 696, 699, 705, 720, 721, 736, 740, 750, 750, 768, 846, 864, 866, 890, 890, 902, 902, 904, 906, 908, 908, 910, 929, 931, 974, 976, 983, 986, 1011, 1024, 1153, 1155, 1158, 1164, 1220, 1223, 1224, 1227, 1228, 1232, 1269, 1272, 1273, 1329, 1366, 1369, 1369, 1377, 1415, 1425, 1441, 1443, 1465, 1467, 1469, 1471, 1471, 1473, 1474, 1476, 1476, 1488, 1514, 1520, 1522, 1569, 1594, 1600, 1621, 1632, 1641, 1648, 1747, 1749, 1756, 1759, 1768, 1770, 1773, 1776, 1788, 1808, 1836, 1840, 1866, 1920, 1968, 2305, 2307, 2309, 2361, 2364, 2381, 2384, 2388, 2392, 2403, 2406, 2415, 2433, 2435, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2492, 2492, 2494, 2500, 2503, 2504, 2507, 2509, 2519, 2519, 2524, 2525, 2527, 2531, 2534, 2545, 2562, 2562, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2620, 2620, 2622, 2626, 2631, 2632, 2635, 2637, 2649, 2652, 2654, 2654, 2662, 2676, 2689, 2691, 2693, 2699, 2701, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2748, 2757, 2759, 2761, 2763, 2765, 2768, 2768, 2784, 2784, 2790, 2799, 2817, 2819, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2870, 2873, 2876, 2883, 2887, 2888, 2891, 2893, 2902, 2903, 2908, 2909, 2911, 2913, 2918, 2927, 2946, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 2997, 2999, 3001, 3006, 3010, 3014, 3016, 3018, 3021, 3031, 3031, 3047, 3055, 3073, 3075, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3134, 3140, 3142, 3144, 3146, 3149, 3157, 3158, 3168, 3169, 3174, 3183, 3202, 3203, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3262, 3268, 3270, 3272, 3274, 3277, 3285, 3286, 3294, 3294, 3296, 3297, 3302, 3311, 3330, 3331, 3333, 3340, 3342, 3344, 3346, 3368, 3370, 3385, 3390, 3395, 3398, 3400, 3402, 3405, 3415, 3415, 3424, 3425, 3430, 3439, 3458, 3459, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3530, 3530, 3535, 3540, 3542, 3542, 3544, 3551, 3570, 3571, 3585, 3642, 3648, 3662, 3664, 3673, 3713, 3714, 3716, 3716, 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743, 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3769, 3771, 3773, 3776, 3780, 3782, 3782, 3784, 3789, 3792, 3801, 3804, 3805, 3840, 3840, 3864, 3865, 3872, 3881, 3893, 3893, 3895, 3895, 3897, 3897, 3902, 3911, 3913, 3946, 3953, 3972, 3974, 3979, 3984, 3991, 3993, 4028, 4038, 4038, 4096, 4129, 4131, 4135, 4137, 4138, 4140, 4146, 4150, 4153, 4160, 4169, 4176, 4185, 4256, 4293, 4304, 4342, 4352, 4441, 4447, 4514, 4520, 4601, 4608, 4614, 4616, 4678, 4680, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4742, 4744, 4744, 4746, 4749, 4752, 4782, 4784, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4814, 4816, 4822, 4824, 4846, 4848, 4878, 4880, 4880, 4882, 4885, 4888, 4894, 4896, 4934, 4936, 4954, 4969, 4977, 5024, 5108, 5121, 5740, 5743, 5750, 5761, 5786, 5792, 5866, 6016, 6099, 6112, 6121, 6160, 6169, 6176, 6263, 6272, 6313, 7680, 7835, 7840, 7929, 7936, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8255, 8256, 8319, 8319, 8400, 8412, 8417, 8417, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8497, 8499, 8505, 8544, 8579, 12293, 12295, 12321, 12335, 12337, 12341, 12344, 12346, 12353, 12436, 12441, 12442, 12445, 12446, 12449, 12542, 12549, 12588, 12593, 12686, 12704, 12727, 13312, 19893, 19968, 40869, 40960, 42124, 44032, 55203, 63744, 64045, 64256, 64262, 64275, 64279, 64285, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65056, 65059, 65075, 65076, 65101, 65103, 65136, 65138, 65140, 65140, 65142, 65276, 65296, 65305, 65313, 65338, 65343, 65343, 65345, 65370, 65381, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500,]; + var unicodeES5IdentifierStart = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 705, 710, 721, 736, 740, 748, 748, 750, 750, 880, 884, 886, 887, 890, 893, 902, 902, 904, 906, 908, 908, 910, 929, 931, 1013, 1015, 1153, 1162, 1319, 1329, 1366, 1369, 1369, 1377, 1415, 1488, 1514, 1520, 1522, 1568, 1610, 1646, 1647, 1649, 1747, 1749, 1749, 1765, 1766, 1774, 1775, 1786, 1788, 1791, 1791, 1808, 1808, 1810, 1839, 1869, 1957, 1969, 1969, 1994, 2026, 2036, 2037, 2042, 2042, 2048, 2069, 2074, 2074, 2084, 2084, 2088, 2088, 2112, 2136, 2208, 2208, 2210, 2220, 2308, 2361, 2365, 2365, 2384, 2384, 2392, 2401, 2417, 2423, 2425, 2431, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2493, 2493, 2510, 2510, 2524, 2525, 2527, 2529, 2544, 2545, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2649, 2652, 2654, 2654, 2674, 2676, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2749, 2749, 2768, 2768, 2784, 2785, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2869, 2873, 2877, 2877, 2908, 2909, 2911, 2913, 2929, 2929, 2947, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3024, 3024, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3133, 3133, 3160, 3161, 3168, 3169, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3261, 3261, 3294, 3294, 3296, 3297, 3313, 3314, 3333, 3340, 3342, 3344, 3346, 3386, 3389, 3389, 3406, 3406, 3424, 3425, 3450, 3455, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3585, 3632, 3634, 3635, 3648, 3654, 3713, 3714, 3716, 3716, 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743, 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3760, 3762, 3763, 3773, 3773, 3776, 3780, 3782, 3782, 3804, 3807, 3840, 3840, 3904, 3911, 3913, 3948, 3976, 3980, 4096, 4138, 4159, 4159, 4176, 4181, 4186, 4189, 4193, 4193, 4197, 4198, 4206, 4208, 4213, 4225, 4238, 4238, 4256, 4293, 4295, 4295, 4301, 4301, 4304, 4346, 4348, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4822, 4824, 4880, 4882, 4885, 4888, 4954, 4992, 5007, 5024, 5108, 5121, 5740, 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5872, 5888, 5900, 5902, 5905, 5920, 5937, 5952, 5969, 5984, 5996, 5998, 6000, 6016, 6067, 6103, 6103, 6108, 6108, 6176, 6263, 6272, 6312, 6314, 6314, 6320, 6389, 6400, 6428, 6480, 6509, 6512, 6516, 6528, 6571, 6593, 6599, 6656, 6678, 6688, 6740, 6823, 6823, 6917, 6963, 6981, 6987, 7043, 7072, 7086, 7087, 7098, 7141, 7168, 7203, 7245, 7247, 7258, 7293, 7401, 7404, 7406, 7409, 7413, 7414, 7424, 7615, 7680, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8305, 8305, 8319, 8319, 8336, 8348, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8505, 8508, 8511, 8517, 8521, 8526, 8526, 8544, 8584, 11264, 11310, 11312, 11358, 11360, 11492, 11499, 11502, 11506, 11507, 11520, 11557, 11559, 11559, 11565, 11565, 11568, 11623, 11631, 11631, 11648, 11670, 11680, 11686, 11688, 11694, 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726, 11728, 11734, 11736, 11742, 11823, 11823, 12293, 12295, 12321, 12329, 12337, 12341, 12344, 12348, 12353, 12438, 12445, 12447, 12449, 12538, 12540, 12543, 12549, 12589, 12593, 12686, 12704, 12730, 12784, 12799, 13312, 19893, 19968, 40908, 40960, 42124, 42192, 42237, 42240, 42508, 42512, 42527, 42538, 42539, 42560, 42606, 42623, 42647, 42656, 42735, 42775, 42783, 42786, 42888, 42891, 42894, 42896, 42899, 42912, 42922, 43000, 43009, 43011, 43013, 43015, 43018, 43020, 43042, 43072, 43123, 43138, 43187, 43250, 43255, 43259, 43259, 43274, 43301, 43312, 43334, 43360, 43388, 43396, 43442, 43471, 43471, 43520, 43560, 43584, 43586, 43588, 43595, 43616, 43638, 43642, 43642, 43648, 43695, 43697, 43697, 43701, 43702, 43705, 43709, 43712, 43712, 43714, 43714, 43739, 43741, 43744, 43754, 43762, 43764, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43814, 43816, 43822, 43968, 44002, 44032, 55203, 55216, 55238, 55243, 55291, 63744, 64109, 64112, 64217, 64256, 64262, 64275, 64279, 64285, 64285, 64287, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65136, 65140, 65142, 65276, 65313, 65338, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500,]; + var unicodeES5IdentifierPart = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 705, 710, 721, 736, 740, 748, 748, 750, 750, 768, 884, 886, 887, 890, 893, 902, 902, 904, 906, 908, 908, 910, 929, 931, 1013, 1015, 1153, 1155, 1159, 1162, 1319, 1329, 1366, 1369, 1369, 1377, 1415, 1425, 1469, 1471, 1471, 1473, 1474, 1476, 1477, 1479, 1479, 1488, 1514, 1520, 1522, 1552, 1562, 1568, 1641, 1646, 1747, 1749, 1756, 1759, 1768, 1770, 1788, 1791, 1791, 1808, 1866, 1869, 1969, 1984, 2037, 2042, 2042, 2048, 2093, 2112, 2139, 2208, 2208, 2210, 2220, 2276, 2302, 2304, 2403, 2406, 2415, 2417, 2423, 2425, 2431, 2433, 2435, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2492, 2500, 2503, 2504, 2507, 2510, 2519, 2519, 2524, 2525, 2527, 2531, 2534, 2545, 2561, 2563, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2620, 2620, 2622, 2626, 2631, 2632, 2635, 2637, 2641, 2641, 2649, 2652, 2654, 2654, 2662, 2677, 2689, 2691, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2748, 2757, 2759, 2761, 2763, 2765, 2768, 2768, 2784, 2787, 2790, 2799, 2817, 2819, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2869, 2873, 2876, 2884, 2887, 2888, 2891, 2893, 2902, 2903, 2908, 2909, 2911, 2915, 2918, 2927, 2929, 2929, 2946, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3006, 3010, 3014, 3016, 3018, 3021, 3024, 3024, 3031, 3031, 3046, 3055, 3073, 3075, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3133, 3140, 3142, 3144, 3146, 3149, 3157, 3158, 3160, 3161, 3168, 3171, 3174, 3183, 3202, 3203, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3260, 3268, 3270, 3272, 3274, 3277, 3285, 3286, 3294, 3294, 3296, 3299, 3302, 3311, 3313, 3314, 3330, 3331, 3333, 3340, 3342, 3344, 3346, 3386, 3389, 3396, 3398, 3400, 3402, 3406, 3415, 3415, 3424, 3427, 3430, 3439, 3450, 3455, 3458, 3459, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3530, 3530, 3535, 3540, 3542, 3542, 3544, 3551, 3570, 3571, 3585, 3642, 3648, 3662, 3664, 3673, 3713, 3714, 3716, 3716, 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743, 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3769, 3771, 3773, 3776, 3780, 3782, 3782, 3784, 3789, 3792, 3801, 3804, 3807, 3840, 3840, 3864, 3865, 3872, 3881, 3893, 3893, 3895, 3895, 3897, 3897, 3902, 3911, 3913, 3948, 3953, 3972, 3974, 3991, 3993, 4028, 4038, 4038, 4096, 4169, 4176, 4253, 4256, 4293, 4295, 4295, 4301, 4301, 4304, 4346, 4348, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4822, 4824, 4880, 4882, 4885, 4888, 4954, 4957, 4959, 4992, 5007, 5024, 5108, 5121, 5740, 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5872, 5888, 5900, 5902, 5908, 5920, 5940, 5952, 5971, 5984, 5996, 5998, 6000, 6002, 6003, 6016, 6099, 6103, 6103, 6108, 6109, 6112, 6121, 6155, 6157, 6160, 6169, 6176, 6263, 6272, 6314, 6320, 6389, 6400, 6428, 6432, 6443, 6448, 6459, 6470, 6509, 6512, 6516, 6528, 6571, 6576, 6601, 6608, 6617, 6656, 6683, 6688, 6750, 6752, 6780, 6783, 6793, 6800, 6809, 6823, 6823, 6912, 6987, 6992, 7001, 7019, 7027, 7040, 7155, 7168, 7223, 7232, 7241, 7245, 7293, 7376, 7378, 7380, 7414, 7424, 7654, 7676, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8204, 8205, 8255, 8256, 8276, 8276, 8305, 8305, 8319, 8319, 8336, 8348, 8400, 8412, 8417, 8417, 8421, 8432, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8505, 8508, 8511, 8517, 8521, 8526, 8526, 8544, 8584, 11264, 11310, 11312, 11358, 11360, 11492, 11499, 11507, 11520, 11557, 11559, 11559, 11565, 11565, 11568, 11623, 11631, 11631, 11647, 11670, 11680, 11686, 11688, 11694, 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726, 11728, 11734, 11736, 11742, 11744, 11775, 11823, 11823, 12293, 12295, 12321, 12335, 12337, 12341, 12344, 12348, 12353, 12438, 12441, 12442, 12445, 12447, 12449, 12538, 12540, 12543, 12549, 12589, 12593, 12686, 12704, 12730, 12784, 12799, 13312, 19893, 19968, 40908, 40960, 42124, 42192, 42237, 42240, 42508, 42512, 42539, 42560, 42607, 42612, 42621, 42623, 42647, 42655, 42737, 42775, 42783, 42786, 42888, 42891, 42894, 42896, 42899, 42912, 42922, 43000, 43047, 43072, 43123, 43136, 43204, 43216, 43225, 43232, 43255, 43259, 43259, 43264, 43309, 43312, 43347, 43360, 43388, 43392, 43456, 43471, 43481, 43520, 43574, 43584, 43597, 43600, 43609, 43616, 43638, 43642, 43643, 43648, 43714, 43739, 43741, 43744, 43759, 43762, 43766, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43814, 43816, 43822, 43968, 44010, 44012, 44013, 44016, 44025, 44032, 55203, 55216, 55238, 55243, 55291, 63744, 64109, 64112, 64217, 64256, 64262, 64275, 64279, 64285, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65024, 65039, 65056, 65062, 65075, 65076, 65101, 65103, 65136, 65140, 65142, 65276, 65296, 65305, 65313, 65338, 65343, 65343, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500,]; + function lookupInUnicodeMap(code, map) { + if (code < map[0]) { + return false; + } + var lo = 0; + var hi = map.length; + var mid; + while (lo + 1 < hi) { + mid = lo + (hi - lo) / 2; + mid -= mid % 2; + if (map[mid] <= code && code <= map[mid + 1]) { + return true; + } + if (code < map[mid]) { + hi = mid; + } + else { + lo = mid + 2; + } + } + return false; + } + function isUnicodeIdentifierStart(code, languageVersion) { + return languageVersion === 0 /* ES3 */ ? lookupInUnicodeMap(code, unicodeES3IdentifierStart) : lookupInUnicodeMap(code, unicodeES5IdentifierStart); + } + function isUnicodeIdentifierPart(code, languageVersion) { + return languageVersion === 0 /* ES3 */ ? lookupInUnicodeMap(code, unicodeES3IdentifierPart) : lookupInUnicodeMap(code, unicodeES5IdentifierPart); + } + function makeReverseMap(source) { + var result = []; + for (var name in source) { + if (source.hasOwnProperty(name)) { + result[source[name]] = name; + } + } + return result; + } + var tokenStrings = makeReverseMap(textToToken); + function tokenToString(t) { + return tokenStrings[t]; + } + ts.tokenToString = tokenToString; + function computeLineStarts(text) { + var result = new Array(); + var pos = 0; + var lineStart = 0; + while (pos < text.length) { + var ch = text.charCodeAt(pos++); + switch (ch) { + case 13 /* carriageReturn */: + if (text.charCodeAt(pos) === 10 /* lineFeed */) { + pos++; + } + case 10 /* lineFeed */: + result.push(lineStart); + lineStart = pos; + break; + default: + if (ch > 127 /* maxAsciiCharacter */ && isLineBreak(ch)) { + result.push(lineStart); + lineStart = pos; + } + break; + } + } + result.push(lineStart); + return result; + } + ts.computeLineStarts = computeLineStarts; + function getPositionFromLineAndCharacter(lineStarts, line, character) { + ts.Debug.assert(line > 0); + return lineStarts[line - 1] + character - 1; + } + ts.getPositionFromLineAndCharacter = getPositionFromLineAndCharacter; + function getLineAndCharacterOfPosition(lineStarts, position) { + var lineNumber = ts.binarySearch(lineStarts, position); + if (lineNumber < 0) { + lineNumber = (~lineNumber) - 1; + } + return { + line: lineNumber + 1, + character: position - lineStarts[lineNumber] + 1 + }; + } + ts.getLineAndCharacterOfPosition = getLineAndCharacterOfPosition; + function positionToLineAndCharacter(text, pos) { + var lineStarts = computeLineStarts(text); + return getLineAndCharacterOfPosition(lineStarts, pos); + } + ts.positionToLineAndCharacter = positionToLineAndCharacter; + var hasOwnProperty = Object.prototype.hasOwnProperty; + function isWhiteSpace(ch) { + return ch === 32 /* space */ || ch === 9 /* tab */ || ch === 11 /* verticalTab */ || ch === 12 /* formFeed */ || ch === 160 /* nonBreakingSpace */ || ch === 5760 /* ogham */ || ch >= 8192 /* enQuad */ && ch <= 8203 /* zeroWidthSpace */ || ch === 8239 /* narrowNoBreakSpace */ || ch === 8287 /* mathematicalSpace */ || ch === 12288 /* ideographicSpace */ || ch === 65279 /* byteOrderMark */; + } + ts.isWhiteSpace = isWhiteSpace; + function isLineBreak(ch) { + return ch === 10 /* lineFeed */ || ch === 13 /* carriageReturn */ || ch === 8232 /* lineSeparator */ || ch === 8233 /* paragraphSeparator */ || ch === 133 /* nextLine */; + } + ts.isLineBreak = isLineBreak; + function isDigit(ch) { + return ch >= 48 /* _0 */ && ch <= 57 /* _9 */; + } + function isOctalDigit(ch) { + return ch >= 48 /* _0 */ && ch <= 55 /* _7 */; + } + ts.isOctalDigit = isOctalDigit; + function skipTrivia(text, pos, stopAfterLineBreak) { + while (true) { + var ch = text.charCodeAt(pos); + switch (ch) { + case 13 /* carriageReturn */: + if (text.charCodeAt(pos + 1) === 10 /* lineFeed */) + pos++; + case 10 /* lineFeed */: + pos++; + if (stopAfterLineBreak) + return pos; + continue; + case 9 /* tab */: + case 11 /* verticalTab */: + case 12 /* formFeed */: + case 32 /* space */: + pos++; + continue; + case 47 /* slash */: + if (text.charCodeAt(pos + 1) === 47 /* slash */) { + pos += 2; + while (pos < text.length) { + if (isLineBreak(text.charCodeAt(pos))) { + break; + } + pos++; + } + continue; + } + if (text.charCodeAt(pos + 1) === 42 /* asterisk */) { + pos += 2; + while (pos < text.length) { + if (text.charCodeAt(pos) === 42 /* asterisk */ && text.charCodeAt(pos + 1) === 47 /* slash */) { + pos += 2; + break; + } + pos++; + } + continue; + } + break; + default: + if (ch > 127 /* maxAsciiCharacter */ && (isWhiteSpace(ch) || isLineBreak(ch))) { + pos++; + continue; + } + break; + } + return pos; + } + } + ts.skipTrivia = skipTrivia; + function getCommentRanges(text, pos, trailing) { + var result; + var collecting = trailing || pos === 0; + while (true) { + var ch = text.charCodeAt(pos); + switch (ch) { + case 13 /* carriageReturn */: + if (text.charCodeAt(pos + 1) === 10 /* lineFeed */) + pos++; + case 10 /* lineFeed */: + pos++; + if (trailing) { + return result; + } + collecting = true; + if (result && result.length) { + result[result.length - 1].hasTrailingNewLine = true; + } + continue; + case 9 /* tab */: + case 11 /* verticalTab */: + case 12 /* formFeed */: + case 32 /* space */: + pos++; + continue; + case 47 /* slash */: + var nextChar = text.charCodeAt(pos + 1); + var hasTrailingNewLine = false; + if (nextChar === 47 /* slash */ || nextChar === 42 /* asterisk */) { + var startPos = pos; + pos += 2; + if (nextChar === 47 /* slash */) { + while (pos < text.length) { + if (isLineBreak(text.charCodeAt(pos))) { + hasTrailingNewLine = true; + break; + } + pos++; + } + } + else { + while (pos < text.length) { + if (text.charCodeAt(pos) === 42 /* asterisk */ && text.charCodeAt(pos + 1) === 47 /* slash */) { + pos += 2; + break; + } + pos++; + } + } + if (collecting) { + if (!result) + result = []; + result.push({ pos: startPos, end: pos, hasTrailingNewLine: hasTrailingNewLine }); + } + continue; + } + break; + default: + if (ch > 127 /* maxAsciiCharacter */ && (isWhiteSpace(ch) || isLineBreak(ch))) { + if (result && result.length && isLineBreak(ch)) { + result[result.length - 1].hasTrailingNewLine = true; + } + pos++; + continue; + } + break; + } + return result; + } + } + function getLeadingCommentRanges(text, pos) { + return getCommentRanges(text, pos, false); + } + ts.getLeadingCommentRanges = getLeadingCommentRanges; + function getTrailingCommentRanges(text, pos) { + return getCommentRanges(text, pos, true); + } + ts.getTrailingCommentRanges = getTrailingCommentRanges; + function isIdentifierStart(ch, languageVersion) { + return ch >= 65 /* A */ && ch <= 90 /* Z */ || ch >= 97 /* a */ && ch <= 122 /* z */ || ch === 36 /* $ */ || ch === 95 /* _ */ || ch > 127 /* maxAsciiCharacter */ && isUnicodeIdentifierStart(ch, languageVersion); + } + ts.isIdentifierStart = isIdentifierStart; + function isIdentifierPart(ch, languageVersion) { + return ch >= 65 /* A */ && ch <= 90 /* Z */ || ch >= 97 /* a */ && ch <= 122 /* z */ || ch >= 48 /* _0 */ && ch <= 57 /* _9 */ || ch === 36 /* $ */ || ch === 95 /* _ */ || ch > 127 /* maxAsciiCharacter */ && isUnicodeIdentifierPart(ch, languageVersion); + } + ts.isIdentifierPart = isIdentifierPart; + function createScanner(languageVersion, skipTrivia, text, onError, onComment) { + var pos; + var len; + var startPos; + var tokenPos; + var token; + var tokenValue; + var precedingLineBreak; + function error(message) { + if (onError) { + onError(message); + } + } + function isIdentifierStart(ch) { + return ch >= 65 /* A */ && ch <= 90 /* Z */ || ch >= 97 /* a */ && ch <= 122 /* z */ || ch === 36 /* $ */ || ch === 95 /* _ */ || ch > 127 /* maxAsciiCharacter */ && isUnicodeIdentifierStart(ch, languageVersion); + } + function isIdentifierPart(ch) { + return ch >= 65 /* A */ && ch <= 90 /* Z */ || ch >= 97 /* a */ && ch <= 122 /* z */ || ch >= 48 /* _0 */ && ch <= 57 /* _9 */ || ch === 36 /* $ */ || ch === 95 /* _ */ || ch > 127 /* maxAsciiCharacter */ && isUnicodeIdentifierPart(ch, languageVersion); + } + function scanNumber() { + var start = pos; + while (isDigit(text.charCodeAt(pos))) + pos++; + if (text.charCodeAt(pos) === 46 /* dot */) { + pos++; + while (isDigit(text.charCodeAt(pos))) + pos++; + } + var end = pos; + if (text.charCodeAt(pos) === 69 /* E */ || text.charCodeAt(pos) === 101 /* e */) { + pos++; + if (text.charCodeAt(pos) === 43 /* plus */ || text.charCodeAt(pos) === 45 /* minus */) + pos++; + if (isDigit(text.charCodeAt(pos))) { + pos++; + while (isDigit(text.charCodeAt(pos))) + pos++; + end = pos; + } + else { + error(ts.Diagnostics.Digit_expected); + } + } + return +(text.substring(start, end)); + } + function scanOctalDigits() { + var start = pos; + while (isOctalDigit(text.charCodeAt(pos))) { + pos++; + } + return +(text.substring(start, pos)); + } + function scanHexDigits(count, mustMatchCount) { + var digits = 0; + var value = 0; + while (digits < count || !mustMatchCount) { + var ch = text.charCodeAt(pos); + if (ch >= 48 /* _0 */ && ch <= 57 /* _9 */) { + value = value * 16 + ch - 48 /* _0 */; + } + else if (ch >= 65 /* A */ && ch <= 70 /* F */) { + value = value * 16 + ch - 65 /* A */ + 10; + } + else if (ch >= 97 /* a */ && ch <= 102 /* f */) { + value = value * 16 + ch - 97 /* a */ + 10; + } + else { + break; + } + pos++; + digits++; + } + if (digits < count) { + value = -1; + } + return value; + } + function scanString() { + var quote = text.charCodeAt(pos++); + var result = ""; + var start = pos; + while (true) { + if (pos >= len) { + result += text.substring(start, pos); + error(ts.Diagnostics.Unterminated_string_literal); + break; + } + var ch = text.charCodeAt(pos); + if (ch === quote) { + result += text.substring(start, pos); + pos++; + break; + } + if (ch === 92 /* backslash */) { + result += text.substring(start, pos); + result += scanEscapeSequence(); + start = pos; + continue; + } + if (isLineBreak(ch)) { + result += text.substring(start, pos); + error(ts.Diagnostics.Unterminated_string_literal); + break; + } + pos++; + } + return result; + } + function scanTemplateAndSetTokenValue() { + var startedWithBacktick = text.charCodeAt(pos) === 96 /* backtick */; + pos++; + var start = pos; + var contents = ""; + var resultingToken; + while (true) { + if (pos >= len) { + contents += text.substring(start, pos); + error(ts.Diagnostics.Unterminated_template_literal); + resultingToken = startedWithBacktick ? 9 /* NoSubstitutionTemplateLiteral */ : 12 /* TemplateTail */; + break; + } + var currChar = text.charCodeAt(pos); + if (currChar === 96 /* backtick */) { + contents += text.substring(start, pos); + pos++; + resultingToken = startedWithBacktick ? 9 /* NoSubstitutionTemplateLiteral */ : 12 /* TemplateTail */; + break; + } + if (currChar === 36 /* $ */ && pos + 1 < len && text.charCodeAt(pos + 1) === 123 /* openBrace */) { + contents += text.substring(start, pos); + pos += 2; + resultingToken = startedWithBacktick ? 10 /* TemplateHead */ : 11 /* TemplateMiddle */; + break; + } + if (currChar === 92 /* backslash */) { + contents += text.substring(start, pos); + contents += scanEscapeSequence(); + start = pos; + continue; + } + if (currChar === 13 /* carriageReturn */) { + contents += text.substring(start, pos); + if (pos + 1 < len && text.charCodeAt(pos + 1) === 10 /* lineFeed */) { + pos++; + } + pos++; + contents += "\n"; + start = pos; + continue; + } + pos++; + } + ts.Debug.assert(resultingToken !== undefined); + tokenValue = contents; + return resultingToken; + } + function scanEscapeSequence() { + pos++; + if (pos >= len) { + error(ts.Diagnostics.Unexpected_end_of_text); + return ""; + } + var ch = text.charCodeAt(pos++); + switch (ch) { + case 48 /* _0 */: + return "\0"; + case 98 /* b */: + return "\b"; + case 116 /* t */: + return "\t"; + case 110 /* n */: + return "\n"; + case 118 /* v */: + return "\v"; + case 102 /* f */: + return "\f"; + case 114 /* r */: + return "\r"; + case 39 /* singleQuote */: + return "\'"; + case 34 /* doubleQuote */: + return "\""; + case 120 /* x */: + case 117 /* u */: + var ch = scanHexDigits(ch === 120 /* x */ ? 2 : 4, true); + if (ch >= 0) { + return String.fromCharCode(ch); + } + else { + error(ts.Diagnostics.Hexadecimal_digit_expected); + return ""; + } + case 13 /* carriageReturn */: + if (pos < len && text.charCodeAt(pos) === 10 /* lineFeed */) { + pos++; + } + case 10 /* lineFeed */: + case 8232 /* lineSeparator */: + case 8233 /* paragraphSeparator */: + return ""; + default: + return String.fromCharCode(ch); + } + } + function peekUnicodeEscape() { + if (pos + 5 < len && text.charCodeAt(pos + 1) === 117 /* u */) { + var start = pos; + pos += 2; + var value = scanHexDigits(4, true); + pos = start; + return value; + } + return -1; + } + function scanIdentifierParts() { + var result = ""; + var start = pos; + while (pos < len) { + var ch = text.charCodeAt(pos); + if (isIdentifierPart(ch)) { + pos++; + } + else if (ch === 92 /* backslash */) { + ch = peekUnicodeEscape(); + if (!(ch >= 0 && isIdentifierPart(ch))) { + break; + } + result += text.substring(start, pos); + result += String.fromCharCode(ch); + pos += 6; + start = pos; + } + else { + break; + } + } + result += text.substring(start, pos); + return result; + } + function getIdentifierToken() { + var len = tokenValue.length; + if (len >= 2 && len <= 11) { + var ch = tokenValue.charCodeAt(0); + if (ch >= 97 /* a */ && ch <= 122 /* z */ && hasOwnProperty.call(textToToken, tokenValue)) { + return token = textToToken[tokenValue]; + } + } + return token = 63 /* Identifier */; + } + function scan() { + startPos = pos; + precedingLineBreak = false; + while (true) { + tokenPos = pos; + if (pos >= len) { + return token = 1 /* EndOfFileToken */; + } + var ch = text.charCodeAt(pos); + switch (ch) { + case 10 /* lineFeed */: + case 13 /* carriageReturn */: + precedingLineBreak = true; + if (skipTrivia) { + pos++; + continue; + } + else { + if (ch === 13 /* carriageReturn */ && pos + 1 < len && text.charCodeAt(pos + 1) === 10 /* lineFeed */) { + pos += 2; + } + else { + pos++; + } + return token = 4 /* NewLineTrivia */; + } + case 9 /* tab */: + case 11 /* verticalTab */: + case 12 /* formFeed */: + case 32 /* space */: + if (skipTrivia) { + pos++; + continue; + } + else { + while (pos < len && isWhiteSpace(text.charCodeAt(pos))) { + pos++; + } + return token = 5 /* WhitespaceTrivia */; + } + case 33 /* exclamation */: + if (text.charCodeAt(pos + 1) === 61 /* equals */) { + if (text.charCodeAt(pos + 2) === 61 /* equals */) { + return pos += 3, token = 30 /* ExclamationEqualsEqualsToken */; + } + return pos += 2, token = 28 /* ExclamationEqualsToken */; + } + return pos++, token = 45 /* ExclamationToken */; + case 34 /* doubleQuote */: + case 39 /* singleQuote */: + tokenValue = scanString(); + return token = 7 /* StringLiteral */; + case 96 /* backtick */: + return token = scanTemplateAndSetTokenValue(); + case 37 /* percent */: + if (text.charCodeAt(pos + 1) === 61 /* equals */) { + return pos += 2, token = 56 /* PercentEqualsToken */; + } + return pos++, token = 36 /* PercentToken */; + case 38 /* ampersand */: + if (text.charCodeAt(pos + 1) === 38 /* ampersand */) { + return pos += 2, token = 47 /* AmpersandAmpersandToken */; + } + if (text.charCodeAt(pos + 1) === 61 /* equals */) { + return pos += 2, token = 60 /* AmpersandEqualsToken */; + } + return pos++, token = 42 /* AmpersandToken */; + case 40 /* openParen */: + return pos++, token = 15 /* OpenParenToken */; + case 41 /* closeParen */: + return pos++, token = 16 /* CloseParenToken */; + case 42 /* asterisk */: + if (text.charCodeAt(pos + 1) === 61 /* equals */) { + return pos += 2, token = 54 /* AsteriskEqualsToken */; + } + return pos++, token = 34 /* AsteriskToken */; + case 43 /* plus */: + if (text.charCodeAt(pos + 1) === 43 /* plus */) { + return pos += 2, token = 37 /* PlusPlusToken */; + } + if (text.charCodeAt(pos + 1) === 61 /* equals */) { + return pos += 2, token = 52 /* PlusEqualsToken */; + } + return pos++, token = 32 /* PlusToken */; + case 44 /* comma */: + return pos++, token = 22 /* CommaToken */; + case 45 /* minus */: + if (text.charCodeAt(pos + 1) === 45 /* minus */) { + return pos += 2, token = 38 /* MinusMinusToken */; + } + if (text.charCodeAt(pos + 1) === 61 /* equals */) { + return pos += 2, token = 53 /* MinusEqualsToken */; + } + return pos++, token = 33 /* MinusToken */; + case 46 /* dot */: + if (isDigit(text.charCodeAt(pos + 1))) { + tokenValue = "" + scanNumber(); + return token = 6 /* NumericLiteral */; + } + if (text.charCodeAt(pos + 1) === 46 /* dot */ && text.charCodeAt(pos + 2) === 46 /* dot */) { + return pos += 3, token = 20 /* DotDotDotToken */; + } + return pos++, token = 19 /* DotToken */; + case 47 /* slash */: + if (text.charCodeAt(pos + 1) === 47 /* slash */) { + pos += 2; + while (pos < len) { + if (isLineBreak(text.charCodeAt(pos))) { + break; + } + pos++; + } + if (onComment) { + onComment(tokenPos, pos); + } + if (skipTrivia) { + continue; + } + else { + return token = 2 /* SingleLineCommentTrivia */; + } + } + if (text.charCodeAt(pos + 1) === 42 /* asterisk */) { + pos += 2; + var commentClosed = false; + while (pos < len) { + var ch = text.charCodeAt(pos); + if (ch === 42 /* asterisk */ && text.charCodeAt(pos + 1) === 47 /* slash */) { + pos += 2; + commentClosed = true; + break; + } + if (isLineBreak(ch)) { + precedingLineBreak = true; + } + pos++; + } + if (!commentClosed) { + error(ts.Diagnostics.Asterisk_Slash_expected); + } + if (onComment) { + onComment(tokenPos, pos); + } + if (skipTrivia) { + continue; + } + else { + return token = 3 /* MultiLineCommentTrivia */; + } + } + if (text.charCodeAt(pos + 1) === 61 /* equals */) { + return pos += 2, token = 55 /* SlashEqualsToken */; + } + return pos++, token = 35 /* SlashToken */; + case 48 /* _0 */: + if (pos + 2 < len && (text.charCodeAt(pos + 1) === 88 /* X */ || text.charCodeAt(pos + 1) === 120 /* x */)) { + pos += 2; + var value = scanHexDigits(1, false); + if (value < 0) { + error(ts.Diagnostics.Hexadecimal_digit_expected); + value = 0; + } + tokenValue = "" + value; + return 6 /* NumericLiteral */; + } + if (pos + 1 < len && isOctalDigit(text.charCodeAt(pos + 1))) { + tokenValue = "" + scanOctalDigits(); + return 6 /* NumericLiteral */; + } + case 49 /* _1 */: + case 50 /* _2 */: + case 51 /* _3 */: + case 52 /* _4 */: + case 53 /* _5 */: + case 54 /* _6 */: + case 55 /* _7 */: + case 56 /* _8 */: + case 57 /* _9 */: + tokenValue = "" + scanNumber(); + return token = 6 /* NumericLiteral */; + case 58 /* colon */: + return pos++, token = 50 /* ColonToken */; + case 59 /* semicolon */: + return pos++, token = 21 /* SemicolonToken */; + case 60 /* lessThan */: + if (text.charCodeAt(pos + 1) === 60 /* lessThan */) { + if (text.charCodeAt(pos + 2) === 61 /* equals */) { + return pos += 3, token = 57 /* LessThanLessThanEqualsToken */; + } + return pos += 2, token = 39 /* LessThanLessThanToken */; + } + if (text.charCodeAt(pos + 1) === 61 /* equals */) { + return pos += 2, token = 25 /* LessThanEqualsToken */; + } + return pos++, token = 23 /* LessThanToken */; + case 61 /* equals */: + if (text.charCodeAt(pos + 1) === 61 /* equals */) { + if (text.charCodeAt(pos + 2) === 61 /* equals */) { + return pos += 3, token = 29 /* EqualsEqualsEqualsToken */; + } + return pos += 2, token = 27 /* EqualsEqualsToken */; + } + if (text.charCodeAt(pos + 1) === 62 /* greaterThan */) { + return pos += 2, token = 31 /* EqualsGreaterThanToken */; + } + return pos++, token = 51 /* EqualsToken */; + case 62 /* greaterThan */: + return pos++, token = 24 /* GreaterThanToken */; + case 63 /* question */: + return pos++, token = 49 /* QuestionToken */; + case 91 /* openBracket */: + return pos++, token = 17 /* OpenBracketToken */; + case 93 /* closeBracket */: + return pos++, token = 18 /* CloseBracketToken */; + case 94 /* caret */: + if (text.charCodeAt(pos + 1) === 61 /* equals */) { + return pos += 2, token = 62 /* CaretEqualsToken */; + } + return pos++, token = 44 /* CaretToken */; + case 123 /* openBrace */: + return pos++, token = 13 /* OpenBraceToken */; + case 124 /* bar */: + if (text.charCodeAt(pos + 1) === 124 /* bar */) { + return pos += 2, token = 48 /* BarBarToken */; + } + if (text.charCodeAt(pos + 1) === 61 /* equals */) { + return pos += 2, token = 61 /* BarEqualsToken */; + } + return pos++, token = 43 /* BarToken */; + case 125 /* closeBrace */: + return pos++, token = 14 /* CloseBraceToken */; + case 126 /* tilde */: + return pos++, token = 46 /* TildeToken */; + case 92 /* backslash */: + var ch = peekUnicodeEscape(); + if (ch >= 0 && isIdentifierStart(ch)) { + pos += 6; + tokenValue = String.fromCharCode(ch) + scanIdentifierParts(); + return token = getIdentifierToken(); + } + error(ts.Diagnostics.Invalid_character); + return pos++, token = 0 /* Unknown */; + default: + if (isIdentifierStart(ch)) { + pos++; + while (pos < len && isIdentifierPart(ch = text.charCodeAt(pos))) + pos++; + tokenValue = text.substring(tokenPos, pos); + if (ch === 92 /* backslash */) { + tokenValue += scanIdentifierParts(); + } + return token = getIdentifierToken(); + } + else if (isWhiteSpace(ch)) { + pos++; + continue; + } + else if (isLineBreak(ch)) { + precedingLineBreak = true; + pos++; + continue; + } + error(ts.Diagnostics.Invalid_character); + return pos++, token = 0 /* Unknown */; + } + } + } + function reScanGreaterToken() { + if (token === 24 /* GreaterThanToken */) { + if (text.charCodeAt(pos) === 62 /* greaterThan */) { + if (text.charCodeAt(pos + 1) === 62 /* greaterThan */) { + if (text.charCodeAt(pos + 2) === 61 /* equals */) { + return pos += 3, token = 59 /* GreaterThanGreaterThanGreaterThanEqualsToken */; + } + return pos += 2, token = 41 /* GreaterThanGreaterThanGreaterThanToken */; + } + if (text.charCodeAt(pos + 1) === 61 /* equals */) { + return pos += 2, token = 58 /* GreaterThanGreaterThanEqualsToken */; + } + return pos++, token = 40 /* GreaterThanGreaterThanToken */; + } + if (text.charCodeAt(pos) === 61 /* equals */) { + return pos++, token = 26 /* GreaterThanEqualsToken */; + } + } + return token; + } + function reScanSlashToken() { + if (token === 35 /* SlashToken */ || token === 55 /* SlashEqualsToken */) { + var p = tokenPos + 1; + var inEscape = false; + var inCharacterClass = false; + while (true) { + if (p >= len) { + error(ts.Diagnostics.Unterminated_regular_expression_literal); + break; + } + var ch = text.charCodeAt(p); + if (isLineBreak(ch)) { + error(ts.Diagnostics.Unterminated_regular_expression_literal); + break; + } + if (inEscape) { + inEscape = false; + } + else if (ch === 47 /* slash */ && !inCharacterClass) { + p++; + break; + } + else if (ch === 91 /* openBracket */) { + inCharacterClass = true; + } + else if (ch === 92 /* backslash */) { + inEscape = true; + } + else if (ch === 93 /* closeBracket */) { + inCharacterClass = false; + } + p++; + } + while (p < len && isIdentifierPart(text.charCodeAt(p))) { + p++; + } + pos = p; + tokenValue = text.substring(tokenPos, pos); + token = 8 /* RegularExpressionLiteral */; + } + return token; + } + function reScanTemplateToken() { + ts.Debug.assert(token === 14 /* CloseBraceToken */, "'reScanTemplateToken' should only be called on a '}'"); + pos = tokenPos; + return token = scanTemplateAndSetTokenValue(); + } + function tryScan(callback) { + var savePos = pos; + var saveStartPos = startPos; + var saveTokenPos = tokenPos; + var saveToken = token; + var saveTokenValue = tokenValue; + var savePrecedingLineBreak = precedingLineBreak; + var result = callback(); + if (!result) { + pos = savePos; + startPos = saveStartPos; + tokenPos = saveTokenPos; + token = saveToken; + tokenValue = saveTokenValue; + precedingLineBreak = savePrecedingLineBreak; + } + return result; + } + function setText(newText) { + text = newText || ""; + len = text.length; + setTextPos(0); + } + function setTextPos(textPos) { + pos = textPos; + startPos = textPos; + tokenPos = textPos; + token = 0 /* Unknown */; + precedingLineBreak = false; + } + setText(text); + return { + getStartPos: function () { return startPos; }, + getTextPos: function () { return pos; }, + getToken: function () { return token; }, + getTokenPos: function () { return tokenPos; }, + getTokenText: function () { return text.substring(tokenPos, pos); }, + getTokenValue: function () { return tokenValue; }, + hasPrecedingLineBreak: function () { return precedingLineBreak; }, + isIdentifier: function () { return token === 63 /* Identifier */ || token > 99 /* LastReservedWord */; }, + isReservedWord: function () { return token >= 64 /* FirstReservedWord */ && token <= 99 /* LastReservedWord */; }, + reScanGreaterToken: reScanGreaterToken, + reScanSlashToken: reScanSlashToken, + reScanTemplateToken: reScanTemplateToken, + scan: scan, + setText: setText, + setTextPos: setTextPos, + tryScan: tryScan + }; + } + ts.createScanner = createScanner; +})(ts || (ts = {})); +var ts; +(function (ts) { + var nodeConstructors = new Array(199 /* Count */); function getNodeConstructor(kind) { return nodeConstructors[kind] || (nodeConstructors[kind] = ts.objectAllocator.getNodeConstructor(kind)); } @@ -2010,7 +2024,7 @@ var ts; return node; } function getSourceFileOfNode(node) { - while (node && node.kind !== 193 /* SourceFile */) + while (node && node.kind !== 196 /* SourceFile */) node = node.parent; return node; } @@ -2026,6 +2040,9 @@ var ts; } ts.getStartPosOfNode = getStartPosOfNode; function getTokenPosOfNode(node, sourceFile) { + if (node.pos === node.end) { + return node.pos; + } return ts.skipTrivia((sourceFile || getSourceFileOfNode(node)).text, node.pos); } ts.getTokenPosOfNode = getTokenPosOfNode; @@ -2046,10 +2063,10 @@ var ts; return identifier.length >= 3 && identifier.charCodeAt(0) === 95 /* _ */ && identifier.charCodeAt(1) === 95 /* _ */ && identifier.charCodeAt(2) === 95 /* _ */ ? identifier.substr(1) : identifier; } ts.unescapeIdentifier = unescapeIdentifier; - function identifierToString(identifier) { - return identifier.kind === 120 /* Missing */ ? "(Missing)" : getTextOfNode(identifier); + function declarationNameToString(name) { + return name.kind === 120 /* Missing */ ? "(Missing)" : getTextOfNode(name); } - ts.identifierToString = identifierToString; + ts.declarationNameToString = declarationNameToString; function createDiagnosticForNode(node, message, arg0, arg1, arg2) { node = getErrorSpanForNode(node); var file = getSourceFileOfNode(node); @@ -2069,12 +2086,12 @@ var ts; function getErrorSpanForNode(node) { var errorSpan; switch (node.kind) { - case 181 /* VariableDeclaration */: - case 184 /* ClassDeclaration */: - case 185 /* InterfaceDeclaration */: - case 188 /* ModuleDeclaration */: - case 187 /* EnumDeclaration */: - case 192 /* EnumMember */: + case 184 /* VariableDeclaration */: + case 187 /* ClassDeclaration */: + case 188 /* InterfaceDeclaration */: + case 191 /* ModuleDeclaration */: + case 190 /* EnumDeclaration */: + case 195 /* EnumMember */: errorSpan = node.name; break; } @@ -2094,7 +2111,7 @@ var ts; } ts.isConstEnumDeclaration = isConstEnumDeclaration; function isPrologueDirective(node) { - return node.kind === 161 /* ExpressionStatement */ && node.expression.kind === 7 /* StringLiteral */; + return node.kind === 164 /* ExpressionStatement */ && node.expression.kind === 7 /* StringLiteral */; } ts.isPrologueDirective = isPrologueDirective; function isEvalOrArgumentsIdentifier(node) { @@ -2149,8 +2166,11 @@ var ts; case 123 /* Parameter */: return child(node.name) || child(node.type) || child(node.initializer); case 124 /* Property */: - case 141 /* PropertyAssignment */: + case 143 /* PropertyAssignment */: + case 144 /* ShorthandPropertyAssignment */: return child(node.name) || child(node.type) || child(node.initializer); + case 133 /* FunctionType */: + case 134 /* ConstructorType */: case 129 /* CallSignature */: case 130 /* ConstructSignature */: case 131 /* IndexSignature */: @@ -2159,110 +2179,110 @@ var ts; case 126 /* Constructor */: case 127 /* GetAccessor */: case 128 /* SetAccessor */: - case 149 /* FunctionExpression */: - case 182 /* FunctionDeclaration */: - case 150 /* ArrowFunction */: + case 152 /* FunctionExpression */: + case 185 /* FunctionDeclaration */: + case 153 /* ArrowFunction */: return child(node.name) || children(node.typeParameters) || children(node.parameters) || child(node.type) || child(node.body); case 132 /* TypeReference */: return child(node.typeName) || children(node.typeArguments); - case 133 /* TypeQuery */: + case 135 /* TypeQuery */: return child(node.exprName); - case 134 /* TypeLiteral */: + case 136 /* TypeLiteral */: return children(node.members); - case 135 /* ArrayType */: + case 137 /* ArrayType */: return child(node.elementType); - case 136 /* TupleType */: + case 138 /* TupleType */: return children(node.elementTypes); - case 137 /* UnionType */: + case 139 /* UnionType */: return children(node.types); - case 138 /* ParenType */: + case 140 /* ParenType */: return child(node.type); - case 139 /* ArrayLiteral */: + case 141 /* ArrayLiteral */: return children(node.elements); - case 140 /* ObjectLiteral */: + case 142 /* ObjectLiteral */: return children(node.properties); - case 142 /* PropertyAccess */: + case 145 /* PropertyAccess */: return child(node.left) || child(node.right); - case 143 /* IndexedAccess */: + case 146 /* IndexedAccess */: return child(node.object) || child(node.index); - case 144 /* CallExpression */: - case 145 /* NewExpression */: + case 147 /* CallExpression */: + case 148 /* NewExpression */: return child(node.func) || children(node.typeArguments) || children(node.arguments); - case 146 /* TaggedTemplateExpression */: + case 149 /* TaggedTemplateExpression */: return child(node.tag) || child(node.template); - case 147 /* TypeAssertion */: + case 150 /* TypeAssertion */: return child(node.type) || child(node.operand); - case 148 /* ParenExpression */: + case 151 /* ParenExpression */: return child(node.expression); - case 151 /* PrefixOperator */: - case 152 /* PostfixOperator */: + case 154 /* PrefixOperator */: + case 155 /* PostfixOperator */: return child(node.operand); - case 153 /* BinaryExpression */: + case 156 /* BinaryExpression */: return child(node.left) || child(node.right); - case 154 /* ConditionalExpression */: + case 157 /* ConditionalExpression */: return child(node.condition) || child(node.whenTrue) || child(node.whenFalse); - case 158 /* Block */: - case 177 /* TryBlock */: - case 179 /* FinallyBlock */: - case 183 /* FunctionBlock */: - case 189 /* ModuleBlock */: - case 193 /* SourceFile */: + case 161 /* Block */: + case 180 /* TryBlock */: + case 182 /* FinallyBlock */: + case 186 /* FunctionBlock */: + case 192 /* ModuleBlock */: + case 196 /* SourceFile */: return children(node.statements); - case 159 /* VariableStatement */: + case 162 /* VariableStatement */: return children(node.declarations); - case 161 /* ExpressionStatement */: + case 164 /* ExpressionStatement */: return child(node.expression); - case 162 /* IfStatement */: + case 165 /* IfStatement */: return child(node.expression) || child(node.thenStatement) || child(node.elseStatement); - case 163 /* DoStatement */: + case 166 /* DoStatement */: return child(node.statement) || child(node.expression); - case 164 /* WhileStatement */: + case 167 /* WhileStatement */: return child(node.expression) || child(node.statement); - case 165 /* ForStatement */: + case 168 /* ForStatement */: return children(node.declarations) || child(node.initializer) || child(node.condition) || child(node.iterator) || child(node.statement); - case 166 /* ForInStatement */: + case 169 /* ForInStatement */: return child(node.declaration) || child(node.variable) || child(node.expression) || child(node.statement); - case 167 /* ContinueStatement */: - case 168 /* BreakStatement */: + case 170 /* ContinueStatement */: + case 171 /* BreakStatement */: return child(node.label); - case 169 /* ReturnStatement */: + case 172 /* ReturnStatement */: return child(node.expression); - case 170 /* WithStatement */: + case 173 /* WithStatement */: return child(node.expression) || child(node.statement); - case 171 /* SwitchStatement */: + case 174 /* SwitchStatement */: return child(node.expression) || children(node.clauses); - case 172 /* CaseClause */: - case 173 /* DefaultClause */: + case 175 /* CaseClause */: + case 176 /* DefaultClause */: return child(node.expression) || children(node.statements); - case 174 /* LabeledStatement */: + case 177 /* LabeledStatement */: return child(node.label) || child(node.statement); - case 175 /* ThrowStatement */: + case 178 /* ThrowStatement */: return child(node.expression); - case 176 /* TryStatement */: + case 179 /* TryStatement */: return child(node.tryBlock) || child(node.catchBlock) || child(node.finallyBlock); - case 178 /* CatchBlock */: + case 181 /* CatchBlock */: return child(node.variable) || children(node.statements); - case 181 /* VariableDeclaration */: + case 184 /* VariableDeclaration */: return child(node.name) || child(node.type) || child(node.initializer); - case 184 /* ClassDeclaration */: + case 187 /* ClassDeclaration */: return child(node.name) || children(node.typeParameters) || child(node.baseType) || children(node.implementedTypes) || children(node.members); - case 185 /* InterfaceDeclaration */: + case 188 /* InterfaceDeclaration */: return child(node.name) || children(node.typeParameters) || children(node.baseTypes) || children(node.members); - case 186 /* TypeAliasDeclaration */: + case 189 /* TypeAliasDeclaration */: return child(node.name) || child(node.type); - case 187 /* EnumDeclaration */: + case 190 /* EnumDeclaration */: return child(node.name) || children(node.members); - case 192 /* EnumMember */: + case 195 /* EnumMember */: return child(node.name) || child(node.initializer); - case 188 /* ModuleDeclaration */: + case 191 /* ModuleDeclaration */: return child(node.name) || child(node.body); - case 190 /* ImportDeclaration */: + case 193 /* ImportDeclaration */: return child(node.name) || child(node.entityName) || child(node.externalModuleName); - case 191 /* ExportAssignment */: + case 194 /* ExportAssignment */: return child(node.exportName); - case 155 /* TemplateExpression */: + case 158 /* TemplateExpression */: return child(node.head) || children(node.templateSpans); - case 156 /* TemplateSpan */: + case 159 /* TemplateSpan */: return child(node.expression) || child(node.literal); } } @@ -2271,24 +2291,24 @@ var ts; return traverse(body); function traverse(node) { switch (node.kind) { - case 169 /* ReturnStatement */: + case 172 /* ReturnStatement */: return visitor(node); - case 158 /* Block */: - case 183 /* FunctionBlock */: - case 162 /* IfStatement */: - case 163 /* DoStatement */: - case 164 /* WhileStatement */: - case 165 /* ForStatement */: - case 166 /* ForInStatement */: - case 170 /* WithStatement */: - case 171 /* SwitchStatement */: - case 172 /* CaseClause */: - case 173 /* DefaultClause */: - case 174 /* LabeledStatement */: - case 176 /* TryStatement */: - case 177 /* TryBlock */: - case 178 /* CatchBlock */: - case 179 /* FinallyBlock */: + case 161 /* Block */: + case 186 /* FunctionBlock */: + case 165 /* IfStatement */: + case 166 /* DoStatement */: + case 167 /* WhileStatement */: + case 168 /* ForStatement */: + case 169 /* ForInStatement */: + case 173 /* WithStatement */: + case 174 /* SwitchStatement */: + case 175 /* CaseClause */: + case 176 /* DefaultClause */: + case 177 /* LabeledStatement */: + case 179 /* TryStatement */: + case 180 /* TryBlock */: + case 181 /* CatchBlock */: + case 182 /* FinallyBlock */: return forEachChild(node, traverse); } } @@ -2297,9 +2317,9 @@ var ts; function isAnyFunction(node) { if (node) { switch (node.kind) { - case 149 /* FunctionExpression */: - case 182 /* FunctionDeclaration */: - case 150 /* ArrowFunction */: + case 152 /* FunctionExpression */: + case 185 /* FunctionDeclaration */: + case 153 /* ArrowFunction */: case 125 /* Method */: case 127 /* GetAccessor */: case 128 /* SetAccessor */: @@ -2326,20 +2346,20 @@ var ts; return undefined; } switch (node.kind) { - case 150 /* ArrowFunction */: + case 153 /* ArrowFunction */: if (!includeArrowFunctions) { continue; } - case 182 /* FunctionDeclaration */: - case 149 /* FunctionExpression */: - case 188 /* ModuleDeclaration */: + case 185 /* FunctionDeclaration */: + case 152 /* FunctionExpression */: + case 191 /* ModuleDeclaration */: case 124 /* Property */: case 125 /* Method */: case 126 /* Constructor */: case 127 /* GetAccessor */: case 128 /* SetAccessor */: - case 187 /* EnumDeclaration */: - case 193 /* SourceFile */: + case 190 /* EnumDeclaration */: + case 196 /* SourceFile */: return node; } } @@ -2370,60 +2390,62 @@ var ts; case 93 /* TrueKeyword */: case 78 /* FalseKeyword */: case 8 /* RegularExpressionLiteral */: - case 139 /* ArrayLiteral */: - case 140 /* ObjectLiteral */: - case 142 /* PropertyAccess */: - case 143 /* IndexedAccess */: - case 144 /* CallExpression */: - case 145 /* NewExpression */: - case 146 /* TaggedTemplateExpression */: - case 147 /* TypeAssertion */: - case 148 /* ParenExpression */: - case 149 /* FunctionExpression */: - case 150 /* ArrowFunction */: - case 151 /* PrefixOperator */: - case 152 /* PostfixOperator */: - case 153 /* BinaryExpression */: - case 154 /* ConditionalExpression */: - case 155 /* TemplateExpression */: - case 157 /* OmittedExpression */: + case 141 /* ArrayLiteral */: + case 142 /* ObjectLiteral */: + case 145 /* PropertyAccess */: + case 146 /* IndexedAccess */: + case 147 /* CallExpression */: + case 148 /* NewExpression */: + case 149 /* TaggedTemplateExpression */: + case 150 /* TypeAssertion */: + case 151 /* ParenExpression */: + case 152 /* FunctionExpression */: + case 153 /* ArrowFunction */: + case 154 /* PrefixOperator */: + case 155 /* PostfixOperator */: + case 156 /* BinaryExpression */: + case 157 /* ConditionalExpression */: + case 158 /* TemplateExpression */: + case 9 /* NoSubstitutionTemplateLiteral */: + case 160 /* OmittedExpression */: return true; case 121 /* QualifiedName */: while (node.parent.kind === 121 /* QualifiedName */) node = node.parent; - return node.parent.kind === 133 /* TypeQuery */; + return node.parent.kind === 135 /* TypeQuery */; case 63 /* Identifier */: - if (node.parent.kind === 133 /* TypeQuery */) { + if (node.parent.kind === 135 /* TypeQuery */) { return true; } case 6 /* NumericLiteral */: case 7 /* StringLiteral */: - case 9 /* NoSubstitutionTemplateLiteral */: var parent = node.parent; switch (parent.kind) { - case 181 /* VariableDeclaration */: + case 184 /* VariableDeclaration */: case 123 /* Parameter */: case 124 /* Property */: - case 192 /* EnumMember */: - case 141 /* PropertyAssignment */: + case 195 /* EnumMember */: + case 143 /* PropertyAssignment */: return parent.initializer === node; - case 161 /* ExpressionStatement */: - case 162 /* IfStatement */: - case 163 /* DoStatement */: - case 164 /* WhileStatement */: - case 169 /* ReturnStatement */: - case 170 /* WithStatement */: - case 171 /* SwitchStatement */: - case 172 /* CaseClause */: - case 175 /* ThrowStatement */: - case 171 /* SwitchStatement */: + case 164 /* ExpressionStatement */: + case 165 /* IfStatement */: + case 166 /* DoStatement */: + case 167 /* WhileStatement */: + case 172 /* ReturnStatement */: + case 173 /* WithStatement */: + case 174 /* SwitchStatement */: + case 175 /* CaseClause */: + case 178 /* ThrowStatement */: + case 174 /* SwitchStatement */: return parent.expression === node; - case 165 /* ForStatement */: + case 168 /* ForStatement */: return parent.initializer === node || parent.condition === node || parent.iterator === node; - case 166 /* ForInStatement */: + case 169 /* ForInStatement */: return parent.variable === node || parent.expression === node; - case 147 /* TypeAssertion */: + case 150 /* TypeAssertion */: return node === parent.operand; + case 159 /* TemplateSpan */: + return node === parent.expression; default: if (isExpression(parent)) { return true; @@ -2462,20 +2484,21 @@ var ts; switch (node.kind) { case 122 /* TypeParameter */: case 123 /* Parameter */: - case 181 /* VariableDeclaration */: + case 184 /* VariableDeclaration */: case 124 /* Property */: - case 141 /* PropertyAssignment */: - case 192 /* EnumMember */: + case 143 /* PropertyAssignment */: + case 144 /* ShorthandPropertyAssignment */: + case 195 /* EnumMember */: case 125 /* Method */: - case 182 /* FunctionDeclaration */: + case 185 /* FunctionDeclaration */: case 127 /* GetAccessor */: case 128 /* SetAccessor */: - case 184 /* ClassDeclaration */: - case 185 /* InterfaceDeclaration */: - case 186 /* TypeAliasDeclaration */: - case 187 /* EnumDeclaration */: - case 188 /* ModuleDeclaration */: - case 190 /* ImportDeclaration */: + case 187 /* ClassDeclaration */: + case 188 /* InterfaceDeclaration */: + case 189 /* TypeAliasDeclaration */: + case 190 /* EnumDeclaration */: + case 191 /* ModuleDeclaration */: + case 193 /* ImportDeclaration */: return true; } return false; @@ -2483,24 +2506,24 @@ var ts; ts.isDeclaration = isDeclaration; function isStatement(n) { switch (n.kind) { - case 168 /* BreakStatement */: - case 167 /* ContinueStatement */: - case 180 /* DebuggerStatement */: - case 163 /* DoStatement */: - case 161 /* ExpressionStatement */: - case 160 /* EmptyStatement */: - case 166 /* ForInStatement */: - case 165 /* ForStatement */: - case 162 /* IfStatement */: - case 174 /* LabeledStatement */: - case 169 /* ReturnStatement */: - case 171 /* SwitchStatement */: + case 171 /* BreakStatement */: + case 170 /* ContinueStatement */: + case 183 /* DebuggerStatement */: + case 166 /* DoStatement */: + case 164 /* ExpressionStatement */: + case 163 /* EmptyStatement */: + case 169 /* ForInStatement */: + case 168 /* ForStatement */: + case 165 /* IfStatement */: + case 177 /* LabeledStatement */: + case 172 /* ReturnStatement */: + case 174 /* SwitchStatement */: case 92 /* ThrowKeyword */: - case 176 /* TryStatement */: - case 159 /* VariableStatement */: - case 164 /* WhileStatement */: - case 170 /* WithStatement */: - case 191 /* ExportAssignment */: + case 179 /* TryStatement */: + case 162 /* VariableStatement */: + case 167 /* WhileStatement */: + case 173 /* WithStatement */: + case 194 /* ExportAssignment */: return true; default: return false; @@ -2512,10 +2535,10 @@ var ts; return false; } var parent = name.parent; - if (isDeclaration(parent) || parent.kind === 149 /* FunctionExpression */) { + if (isDeclaration(parent) || parent.kind === 152 /* FunctionExpression */) { return parent.name === name; } - if (parent.kind === 178 /* CatchBlock */) { + if (parent.kind === 181 /* CatchBlock */) { return parent.variable === name; } return false; @@ -2523,16 +2546,16 @@ var ts; ts.isDeclarationOrFunctionExpressionOrCatchVariableName = isDeclarationOrFunctionExpressionOrCatchVariableName; function getAncestor(node, kind) { switch (kind) { - case 184 /* ClassDeclaration */: + case 187 /* ClassDeclaration */: while (node) { switch (node.kind) { - case 184 /* ClassDeclaration */: + case 187 /* ClassDeclaration */: return node; - case 187 /* EnumDeclaration */: - case 185 /* InterfaceDeclaration */: - case 186 /* TypeAliasDeclaration */: - case 188 /* ModuleDeclaration */: - case 190 /* ImportDeclaration */: + case 190 /* EnumDeclaration */: + case 188 /* InterfaceDeclaration */: + case 189 /* TypeAliasDeclaration */: + case 191 /* ModuleDeclaration */: + case 193 /* ImportDeclaration */: return undefined; default: node = node.parent; @@ -2574,6 +2597,40 @@ var ts; } } ; + function getFileReferenceFromReferencePath(comment, commentRange) { + var simpleReferenceRegEx = /^\/\/\/\s*/gim; + if (simpleReferenceRegEx.exec(comment)) { + if (isNoDefaultLibRegEx.exec(comment)) { + return { + isNoDefaultLib: true + }; + } + else { + var matchResult = ts.fullTripleSlashReferencePathRegEx.exec(comment); + if (matchResult) { + var start = commentRange.pos; + var end = commentRange.end; + return { + fileReference: { + pos: start, + end: end, + filename: matchResult[3] + }, + isNoDefaultLib: false + }; + } + else { + return { + diagnostic: ts.Diagnostics.Invalid_reference_directive_syntax, + isNoDefaultLib: false + }; + } + } + } + return undefined; + } + ts.getFileReferenceFromReferencePath = getFileReferenceFromReferencePath; function isKeyword(token) { return 64 /* FirstKeyword */ <= token && token <= 119 /* LastKeyword */; } @@ -2582,6 +2639,15 @@ var ts; return 2 /* FirstTriviaToken */ <= token && token <= 5 /* LastTriviaToken */; } ts.isTrivia = isTrivia; + function isUnterminatedTemplateEnd(node) { + ts.Debug.assert(node.kind === 9 /* NoSubstitutionTemplateLiteral */ || node.kind === 12 /* TemplateTail */); + var sourceText = getSourceFileOfNode(node).text; + if (node.end !== sourceText.length) { + return false; + } + return sourceText.charCodeAt(node.end - 1) !== 96 /* backtick */ || node.text.length === 0; + } + ts.isUnterminatedTemplateEnd = isUnterminatedTemplateEnd; function isModifier(token) { switch (token) { case 106 /* PublicKeyword */: @@ -2686,17 +2752,14 @@ var ts; nodeIsNestedInLabel: nodeIsNestedInLabel }; })(); - function getLineAndCharacterlFromSourcePosition(position) { - if (!lineStarts) { - lineStarts = ts.getLineStarts(sourceText); - } - return ts.getLineAndCharacterOfPosition(lineStarts, position); + function getLineStarts() { + return lineStarts || (lineStarts = ts.computeLineStarts(sourceText)); + } + function getLineAndCharacterFromSourcePosition(position) { + return ts.getLineAndCharacterOfPosition(getLineStarts(), position); } function getPositionFromSourceLineAndCharacter(line, character) { - if (!lineStarts) { - lineStarts = ts.getLineStarts(sourceText); - } - return ts.getPositionFromLineAndCharacter(lineStarts, line, character); + return ts.getPositionFromLineAndCharacter(getLineStarts(), line, character); } function error(message, arg0, arg1, arg2) { var start = scanner.getTokenPos(); @@ -2719,7 +2782,9 @@ var ts; function errorAtPos(start, length, message, arg0, arg1, arg2) { var lastErrorPos = file.syntacticErrors.length ? file.syntacticErrors[file.syntacticErrors.length - 1].start : -1; if (start !== lastErrorPos) { - file.syntacticErrors.push(ts.createFileDiagnostic(file, start, length, message, arg0, arg1, arg2)); + var diagnostic = ts.createFileDiagnostic(file, start, length, message, arg0, arg1, arg2); + diagnostic.isParseError = true; + file.syntacticErrors.push(diagnostic); } if (lookAheadMode === 1 /* NoErrorYet */) { lookAheadMode = 2 /* Error */; @@ -2833,14 +2898,14 @@ var ts; return createNode(120 /* Missing */); } function internIdentifier(text) { + text = escapeIdentifier(text); return ts.hasProperty(identifiers, text) ? identifiers[text] : (identifiers[text] = text); } function createIdentifier(isIdentifier) { identifierCount++; if (isIdentifier) { var node = createNode(63 /* Identifier */); - var text = escapeIdentifier(scanner.getTokenValue()); - node.text = internIdentifier(text); + node.text = internIdentifier(scanner.getTokenValue()); nextToken(); return finishNode(node); } @@ -3079,7 +3144,7 @@ var ts; return finishNode(node); } function parseTemplateExpression() { - var template = createNode(155 /* TemplateExpression */); + var template = createNode(158 /* TemplateExpression */); template.head = parseLiteralNode(); ts.Debug.assert(template.head.kind === 10 /* TemplateHead */, "Template head has wrong token kind"); var templateSpans = []; @@ -3092,7 +3157,7 @@ var ts; return finishNode(template); } function parseTemplateSpan() { - var span = createNode(156 /* TemplateSpan */); + var span = createNode(159 /* TemplateSpan */); span.expression = parseExpression(false); var literal; if (token === 14 /* CloseBraceToken */) { @@ -3140,7 +3205,7 @@ var ts; return finishNode(node); } function parseTypeQuery() { - var node = createNode(133 /* TypeQuery */); + var node = createNode(135 /* TypeQuery */); parseExpected(95 /* TypeOfKeyword */); node.exprName = parseEntityName(true); return finishNode(node); @@ -3371,7 +3436,7 @@ var ts; } } function parseTypeLiteral() { - var node = createNode(134 /* TypeLiteral */); + var node = createNode(136 /* TypeLiteral */); if (parseExpected(13 /* OpenBraceToken */)) { node.members = parseList(5 /* TypeMembers */, false, parseTypeMember); parseExpected(14 /* CloseBraceToken */); @@ -3382,7 +3447,7 @@ var ts; return finishNode(node); } function parseTupleType() { - var node = createNode(136 /* TupleType */); + var node = createNode(138 /* TupleType */); var startTokenPos = scanner.getTokenPos(); var startErrorCount = file.syntacticErrors.length; node.elementTypes = parseBracketedList(16 /* TupleElementTypes */, parseType, 17 /* OpenBracketToken */, 18 /* CloseBracketToken */); @@ -3392,22 +3457,20 @@ var ts; return finishNode(node); } function parseParenType() { - var node = createNode(138 /* ParenType */); + var node = createNode(140 /* ParenType */); parseExpected(15 /* OpenParenToken */); node.type = parseType(); parseExpected(16 /* CloseParenToken */); return finishNode(node); } - function parseFunctionType(signatureKind) { - var node = createNode(134 /* TypeLiteral */); - var member = createNode(signatureKind); - var sig = parseSignature(signatureKind, 31 /* EqualsGreaterThanToken */, true); + function parseFunctionType(typeKind) { + var member = createNode(typeKind); + var sig = parseSignature(typeKind === 133 /* FunctionType */ ? 129 /* CallSignature */ : 130 /* ConstructSignature */, 31 /* EqualsGreaterThanToken */, true); member.typeParameters = sig.typeParameters; member.parameters = sig.parameters; member.type = sig.type; finishNode(member); - node.members = createNodeArray(member); - return finishNode(node); + return member; } function parseKeywordAndNoDot() { var node = parseTokenNode(); @@ -3464,7 +3527,7 @@ var ts; var type = parseNonArrayType(); while (!scanner.hasPrecedingLineBreak() && parseOptional(17 /* OpenBracketToken */)) { parseExpected(18 /* CloseBracketToken */); - var node = createNode(135 /* ArrayType */, type.pos); + var node = createNode(137 /* ArrayType */, type.pos); node.elementType = type; type = finishNode(node); } @@ -3479,7 +3542,7 @@ var ts; types.push(parsePrimaryType()); } types.end = getNodeEnd(); - var node = createNode(137 /* UnionType */, type.pos); + var node = createNode(139 /* UnionType */, type.pos); node.types = types; type = finishNode(node); } @@ -3508,10 +3571,10 @@ var ts; } function parseType() { if (isStartOfFunctionType()) { - return parseFunctionType(129 /* CallSignature */); + return parseFunctionType(133 /* FunctionType */); } if (token === 86 /* NewKeyword */) { - return parseFunctionType(130 /* ConstructSignature */); + return parseFunctionType(134 /* ConstructorType */); } return parseUnionType(); } @@ -3593,22 +3656,22 @@ var ts; function isLeftHandSideExpression(expr) { if (expr) { switch (expr.kind) { - case 142 /* PropertyAccess */: - case 143 /* IndexedAccess */: - case 145 /* NewExpression */: - case 144 /* CallExpression */: - case 146 /* TaggedTemplateExpression */: - case 139 /* ArrayLiteral */: - case 148 /* ParenExpression */: - case 140 /* ObjectLiteral */: - case 149 /* FunctionExpression */: + case 145 /* PropertyAccess */: + case 146 /* IndexedAccess */: + case 148 /* NewExpression */: + case 147 /* CallExpression */: + case 149 /* TaggedTemplateExpression */: + case 141 /* ArrayLiteral */: + case 151 /* ParenExpression */: + case 142 /* ObjectLiteral */: + case 152 /* FunctionExpression */: case 63 /* Identifier */: case 120 /* Missing */: case 8 /* RegularExpressionLiteral */: case 6 /* NumericLiteral */: case 7 /* StringLiteral */: case 9 /* NoSubstitutionTemplateLiteral */: - case 155 /* TemplateExpression */: + case 158 /* TemplateExpression */: case 78 /* FalseKeyword */: case 87 /* NullKeyword */: case 91 /* ThisKeyword */: @@ -3644,7 +3707,7 @@ var ts; return parseArrowExpressionTail(pos, sig, false); } else { - return makeFunctionExpression(150 /* ArrowFunction */, pos, undefined, sig, createMissingNode()); + return makeFunctionExpression(153 /* ArrowFunction */, pos, undefined, sig, createMissingNode()); } } var sig = tryParseSignatureIfArrowOrBraceFollows(); @@ -3718,7 +3781,7 @@ var ts; else { body = parseAssignmentExpression(noIn); } - return makeFunctionExpression(150 /* ArrowFunction */, pos, undefined, sig, body); + return makeFunctionExpression(153 /* ArrowFunction */, pos, undefined, sig, body); } function isAssignmentOperator() { return token >= 51 /* FirstAssignment */ && token <= 62 /* LastAssignment */; @@ -3726,7 +3789,7 @@ var ts; function parseConditionalExpression(noIn) { var expr = parseBinaryExpression(noIn); while (parseOptional(49 /* QuestionToken */)) { - var node = createNode(154 /* ConditionalExpression */, expr.pos); + var node = createNode(157 /* ConditionalExpression */, expr.pos); node.condition = expr; node.whenTrue = parseAssignmentExpression(false); parseExpected(50 /* ColonToken */); @@ -3790,7 +3853,7 @@ var ts; return undefined; } function makeBinaryExpression(left, operator, right) { - var node = createNode(153 /* BinaryExpression */, left.pos); + var node = createNode(156 /* BinaryExpression */, left.pos); node.left = left; node.operator = operator; node.right = right; @@ -3819,7 +3882,7 @@ var ts; grammarErrorOnNode(operand, ts.Diagnostics.delete_cannot_be_called_on_an_identifier_in_strict_mode); } } - return makeUnaryExpression(151 /* PrefixOperator */, pos, operator, operand); + return makeUnaryExpression(154 /* PrefixOperator */, pos, operator, operand); case 23 /* LessThanToken */: return parseTypeAssertion(); } @@ -3836,12 +3899,12 @@ var ts; } var operator = token; nextToken(); - expr = makeUnaryExpression(152 /* PostfixOperator */, expr.pos, operator, expr); + expr = makeUnaryExpression(155 /* PostfixOperator */, expr.pos, operator, expr); } return expr; } function parseTypeAssertion() { - var node = createNode(147 /* TypeAssertion */); + var node = createNode(150 /* TypeAssertion */); parseExpected(23 /* LessThanToken */); node.type = parseType(); parseExpected(24 /* GreaterThanToken */); @@ -3858,7 +3921,7 @@ var ts; while (true) { var dotOrBracketStart = scanner.getTokenPos(); if (parseOptional(19 /* DotToken */)) { - var propertyAccess = createNode(142 /* PropertyAccess */, expr.pos); + var propertyAccess = createNode(145 /* PropertyAccess */, expr.pos); if (scanner.hasPrecedingLineBreak() && scanner.isReservedWord() && lookAhead(function () { return scanner.isReservedWord(); })) { grammarErrorAtPos(dotOrBracketStart, scanner.getStartPos() - dotOrBracketStart, ts.Diagnostics.Identifier_expected); var id = createMissingNode(); @@ -3872,7 +3935,7 @@ var ts; continue; } if (parseOptional(17 /* OpenBracketToken */)) { - var indexedAccess = createNode(143 /* IndexedAccess */, expr.pos); + var indexedAccess = createNode(146 /* IndexedAccess */, expr.pos); indexedAccess.object = expr; if (inNewExpression && parseOptional(18 /* CloseBracketToken */)) { indexedAccess.index = createMissingNode(); @@ -3890,7 +3953,7 @@ var ts; continue; } if ((token === 15 /* OpenParenToken */ || token === 23 /* LessThanToken */) && !inNewExpression) { - var callExpr = createNode(144 /* CallExpression */, expr.pos); + var callExpr = createNode(147 /* CallExpression */, expr.pos); callExpr.func = expr; if (token === 23 /* LessThanToken */) { if (!(callExpr.typeArguments = tryParse(parseTypeArgumentsAndOpenParen))) @@ -3905,7 +3968,7 @@ var ts; continue; } if (token === 9 /* NoSubstitutionTemplateLiteral */ || token === 10 /* TemplateHead */) { - var tagExpression = createNode(146 /* TaggedTemplateExpression */, expr.pos); + var tagExpression = createNode(149 /* TaggedTemplateExpression */, expr.pos); tagExpression.tag = expr; tagExpression.template = token === 9 /* NoSubstitutionTemplateLiteral */ ? parseLiteralNode() : parseTemplateExpression(); expr = finishNode(tagExpression); @@ -3979,7 +4042,7 @@ var ts; return createMissingNode(); } function parseParenExpression() { - var node = createNode(148 /* ParenExpression */); + var node = createNode(151 /* ParenExpression */); parseExpected(15 /* OpenParenToken */); node.expression = parseExpression(); parseExpected(16 /* CloseParenToken */); @@ -3992,7 +4055,7 @@ var ts; var errorLength = scanner.getTextPos() - errorStart; grammarErrorAtPos(errorStart, errorLength, omittedExpressionDiagnostic); } - return createNode(157 /* OmittedExpression */); + return createNode(160 /* OmittedExpression */); } return parseAssignmentExpression(); } @@ -4003,7 +4066,7 @@ var ts; return parseAssignmentExpressionOrOmittedExpression(ts.Diagnostics.Argument_expression_expected); } function parseArrayLiteral() { - var node = createNode(139 /* ArrayLiteral */); + var node = createNode(141 /* ArrayLiteral */); parseExpected(17 /* OpenBracketToken */); if (scanner.hasPrecedingLineBreak()) node.flags |= 256 /* MultiLine */; @@ -4012,14 +4075,30 @@ var ts; return finishNode(node); } function parsePropertyAssignment() { - var node = createNode(141 /* PropertyAssignment */); - node.name = parsePropertyName(); + var nodePos = scanner.getStartPos(); + var nameToken = token; + var propertyName = parsePropertyName(); + var node; if (token === 15 /* OpenParenToken */ || token === 23 /* LessThanToken */) { + node = createNode(143 /* PropertyAssignment */, nodePos); + node.name = propertyName; var sig = parseSignature(129 /* CallSignature */, 50 /* ColonToken */, false); var body = parseBody(false); - node.initializer = makeFunctionExpression(149 /* FunctionExpression */, node.pos, undefined, sig, body); + node.initializer = makeFunctionExpression(152 /* FunctionExpression */, node.pos, undefined, sig, body); + return finishNode(node); + } + if (token === 49 /* QuestionToken */) { + var questionStart = scanner.getTokenPos(); + grammarErrorAtPos(questionStart, scanner.getStartPos() - questionStart, ts.Diagnostics.A_object_member_cannot_be_declared_optional); + nextToken(); + } + if (token !== 50 /* ColonToken */ && nameToken === 63 /* Identifier */) { + node = createNode(144 /* ShorthandPropertyAssignment */, nodePos); + node.name = propertyName; } else { + node = createNode(143 /* PropertyAssignment */, nodePos); + node.name = propertyName; parseExpected(50 /* ColonToken */); node.initializer = parseAssignmentExpression(false); } @@ -4035,7 +4114,7 @@ var ts; return parsePropertyAssignment(); } function parseObjectLiteral() { - var node = createNode(140 /* ObjectLiteral */); + var node = createNode(142 /* ObjectLiteral */); parseExpected(13 /* OpenBraceToken */); if (scanner.hasPrecedingLineBreak()) { node.flags |= 256 /* MultiLine */; @@ -4048,11 +4127,15 @@ var ts; var SetAccesor = 4; var GetOrSetAccessor = GetAccessor | SetAccesor; ts.forEach(node.properties, function (p) { - if (p.kind === 157 /* OmittedExpression */) { + if (p.kind === 160 /* OmittedExpression */) { return; } + var name = p.name; var currentKind; - if (p.kind === 141 /* PropertyAssignment */) { + if (p.kind === 143 /* PropertyAssignment */) { + currentKind = Property; + } + else if (p.kind === 144 /* ShorthandPropertyAssignment */) { currentKind = Property; } else if (p.kind === 127 /* GetAccessor */) { @@ -4064,26 +4147,26 @@ var ts; else { ts.Debug.fail("Unexpected syntax kind:" + p.kind); } - if (!ts.hasProperty(seen, p.name.text)) { - seen[p.name.text] = currentKind; + if (!ts.hasProperty(seen, name.text)) { + seen[name.text] = currentKind; } else { - var existingKind = seen[p.name.text]; + var existingKind = seen[name.text]; if (currentKind === Property && existingKind === Property) { if (isInStrictMode) { - grammarErrorOnNode(p.name, ts.Diagnostics.An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode); + grammarErrorOnNode(name, ts.Diagnostics.An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode); } } else if ((currentKind & GetOrSetAccessor) && (existingKind & GetOrSetAccessor)) { if (existingKind !== GetOrSetAccessor && currentKind !== existingKind) { - seen[p.name.text] = currentKind | existingKind; + seen[name.text] = currentKind | existingKind; } else { - grammarErrorOnNode(p.name, ts.Diagnostics.An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name); + grammarErrorOnNode(name, ts.Diagnostics.An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name); } } else { - grammarErrorOnNode(p.name, ts.Diagnostics.An_object_literal_cannot_have_property_and_accessor_with_the_same_name); + grammarErrorOnNode(name, ts.Diagnostics.An_object_literal_cannot_have_property_and_accessor_with_the_same_name); } } }); @@ -4098,7 +4181,7 @@ var ts; if (name && isInStrictMode && isEvalOrArgumentsIdentifier(name)) { reportInvalidUseInStrictMode(name); } - return makeFunctionExpression(149 /* FunctionExpression */, pos, name, sig, body); + return makeFunctionExpression(152 /* FunctionExpression */, pos, name, sig, body); } function makeFunctionExpression(kind, pos, name, sig, body) { var node = createNode(kind, pos); @@ -4110,7 +4193,7 @@ var ts; return finishNode(node); } function parseNewExpression() { - var node = createNode(145 /* NewExpression */); + var node = createNode(148 /* NewExpression */); parseExpected(86 /* NewKeyword */); node.func = parseCallAndAccess(parsePrimaryExpression(), true); if (parseOptional(15 /* OpenParenToken */) || token === 23 /* LessThanToken */ && (node.typeArguments = tryParse(parseTypeArgumentsAndOpenParen))) { @@ -4123,7 +4206,7 @@ var ts; return parseStatement(true); } function parseBlock(ignoreMissingOpenBrace, checkForStrictMode) { - var node = createNode(158 /* Block */); + var node = createNode(161 /* Block */); if (parseExpected(13 /* OpenBraceToken */) || ignoreMissingOpenBrace) { node.statements = parseList(2 /* BlockStatements */, checkForStrictMode, parseStatementAllowingLetDeclaration); parseExpected(14 /* CloseBraceToken */); @@ -4146,7 +4229,7 @@ var ts; } labelledStatementInfo.pushFunctionBoundary(); var block = parseBlock(ignoreMissingOpenBrace, true); - block.kind = 183 /* FunctionBlock */; + block.kind = 186 /* FunctionBlock */; labelledStatementInfo.pop(); inFunctionBody = saveInFunctionBody; inSwitchStatement = saveInSwitchStatement; @@ -4154,12 +4237,12 @@ var ts; return block; } function parseEmptyStatement() { - var node = createNode(160 /* EmptyStatement */); + var node = createNode(163 /* EmptyStatement */); parseExpected(21 /* SemicolonToken */); return finishNode(node); } function parseIfStatement() { - var node = createNode(162 /* IfStatement */); + var node = createNode(165 /* IfStatement */); parseExpected(82 /* IfKeyword */); parseExpected(15 /* OpenParenToken */); node.expression = parseExpression(); @@ -4169,7 +4252,7 @@ var ts; return finishNode(node); } function parseDoStatement() { - var node = createNode(163 /* DoStatement */); + var node = createNode(166 /* DoStatement */); parseExpected(73 /* DoKeyword */); var saveInIterationStatement = inIterationStatement; inIterationStatement = 1 /* Nested */; @@ -4183,7 +4266,7 @@ var ts; return finishNode(node); } function parseWhileStatement() { - var node = createNode(164 /* WhileStatement */); + var node = createNode(167 /* WhileStatement */); parseExpected(98 /* WhileKeyword */); parseExpected(15 /* OpenParenToken */); node.expression = parseExpression(); @@ -4229,7 +4312,7 @@ var ts; } var forOrForInStatement; if (parseOptional(84 /* InKeyword */)) { - var forInStatement = createNode(166 /* ForInStatement */, pos); + var forInStatement = createNode(169 /* ForInStatement */, pos); if (declarations) { if (declarations.length > 1) { error(ts.Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement); @@ -4244,7 +4327,7 @@ var ts; forOrForInStatement = forInStatement; } else { - var forStatement = createNode(165 /* ForStatement */, pos); + var forStatement = createNode(168 /* ForStatement */, pos); if (declarations) forStatement.declarations = declarations; if (varOrInit) @@ -4269,7 +4352,7 @@ var ts; function parseBreakOrContinueStatement(kind) { var node = createNode(kind); var errorCountBeforeStatement = file.syntacticErrors.length; - parseExpected(kind === 168 /* BreakStatement */ ? 64 /* BreakKeyword */ : 69 /* ContinueKeyword */); + parseExpected(kind === 171 /* BreakStatement */ ? 64 /* BreakKeyword */ : 69 /* ContinueKeyword */); if (!canParseSemicolon()) node.label = parseIdentifier(); parseSemicolon(); @@ -4285,7 +4368,7 @@ var ts; return node; } function checkBareBreakOrContinueStatement(node) { - if (node.kind === 168 /* BreakStatement */) { + if (node.kind === 171 /* BreakStatement */) { if (inIterationStatement === 1 /* Nested */ || inSwitchStatement === 1 /* Nested */) { return; } @@ -4294,7 +4377,7 @@ var ts; return; } } - else if (node.kind === 167 /* ContinueStatement */) { + else if (node.kind === 170 /* ContinueStatement */) { if (inIterationStatement === 1 /* Nested */) { return; } @@ -4310,7 +4393,7 @@ var ts; grammarErrorOnNode(node, ts.Diagnostics.Jump_target_cannot_cross_function_boundary); } function checkBreakOrContinueStatementWithLabel(node) { - var nodeIsNestedInLabel = labelledStatementInfo.nodeIsNestedInLabel(node.label, node.kind === 167 /* ContinueStatement */, false); + var nodeIsNestedInLabel = labelledStatementInfo.nodeIsNestedInLabel(node.label, node.kind === 170 /* ContinueStatement */, false); if (nodeIsNestedInLabel === 1 /* Nested */) { return; } @@ -4318,10 +4401,10 @@ var ts; grammarErrorOnNode(node, ts.Diagnostics.Jump_target_cannot_cross_function_boundary); return; } - if (node.kind === 167 /* ContinueStatement */) { + if (node.kind === 170 /* ContinueStatement */) { grammarErrorOnNode(node, ts.Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement); } - else if (node.kind === 168 /* BreakStatement */) { + else if (node.kind === 171 /* BreakStatement */) { grammarErrorOnNode(node, ts.Diagnostics.A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement); } else { @@ -4329,7 +4412,7 @@ var ts; } } function parseReturnStatement() { - var node = createNode(169 /* ReturnStatement */); + var node = createNode(172 /* ReturnStatement */); var errorCountBeforeReturnStatement = file.syntacticErrors.length; var returnTokenStart = scanner.getTokenPos(); var returnTokenLength = scanner.getTextPos() - returnTokenStart; @@ -4343,7 +4426,7 @@ var ts; return finishNode(node); } function parseWithStatement() { - var node = createNode(170 /* WithStatement */); + var node = createNode(173 /* WithStatement */); var startPos = scanner.getTokenPos(); parseExpected(99 /* WithKeyword */); var endPos = scanner.getStartPos(); @@ -4358,7 +4441,7 @@ var ts; return node; } function parseCaseClause() { - var node = createNode(172 /* CaseClause */); + var node = createNode(175 /* CaseClause */); parseExpected(65 /* CaseKeyword */); node.expression = parseExpression(); parseExpected(50 /* ColonToken */); @@ -4366,7 +4449,7 @@ var ts; return finishNode(node); } function parseDefaultClause() { - var node = createNode(173 /* DefaultClause */); + var node = createNode(176 /* DefaultClause */); parseExpected(71 /* DefaultKeyword */); parseExpected(50 /* ColonToken */); node.statements = parseList(4 /* SwitchClauseStatements */, false, parseStatementAllowingLetDeclaration); @@ -4376,7 +4459,7 @@ var ts; return token === 65 /* CaseKeyword */ ? parseCaseClause() : parseDefaultClause(); } function parseSwitchStatement() { - var node = createNode(171 /* SwitchStatement */); + var node = createNode(174 /* SwitchStatement */); parseExpected(90 /* SwitchKeyword */); parseExpected(15 /* OpenParenToken */); node.expression = parseExpression(); @@ -4387,7 +4470,7 @@ var ts; node.clauses = parseList(3 /* SwitchClauses */, false, parseCaseOrDefaultClause); inSwitchStatement = saveInSwitchStatement; parseExpected(14 /* CloseBraceToken */); - var defaultClauses = ts.filter(node.clauses, function (clause) { return clause.kind === 173 /* DefaultClause */; }); + var defaultClauses = ts.filter(node.clauses, function (clause) { return clause.kind === 176 /* DefaultClause */; }); for (var i = 1, n = defaultClauses.length; i < n; i++) { var clause = defaultClauses[i]; var start = ts.skipTrivia(file.text, clause.pos); @@ -4397,7 +4480,7 @@ var ts; return finishNode(node); } function parseThrowStatement() { - var node = createNode(175 /* ThrowStatement */); + var node = createNode(178 /* ThrowStatement */); parseExpected(92 /* ThrowKeyword */); if (scanner.hasPrecedingLineBreak()) { error(ts.Diagnostics.Line_break_not_permitted_here); @@ -4407,13 +4490,13 @@ var ts; return finishNode(node); } function parseTryStatement() { - var node = createNode(176 /* TryStatement */); - node.tryBlock = parseTokenAndBlock(94 /* TryKeyword */, 177 /* TryBlock */); + var node = createNode(179 /* TryStatement */); + node.tryBlock = parseTokenAndBlock(94 /* TryKeyword */, 180 /* TryBlock */); if (token === 66 /* CatchKeyword */) { node.catchBlock = parseCatchBlock(); } if (token === 79 /* FinallyKeyword */) { - node.finallyBlock = parseTokenAndBlock(79 /* FinallyKeyword */, 179 /* FinallyBlock */); + node.finallyBlock = parseTokenAndBlock(79 /* FinallyKeyword */, 182 /* FinallyBlock */); } if (!(node.catchBlock || node.finallyBlock)) { error(ts.Diagnostics.catch_or_finally_expected); @@ -4438,7 +4521,7 @@ var ts; var typeAnnotation = parseTypeAnnotation(); parseExpected(16 /* CloseParenToken */); var result = parseBlock(false, false); - result.kind = 178 /* CatchBlock */; + result.kind = 181 /* CatchBlock */; result.pos = pos; result.variable = variable; if (typeAnnotation) { @@ -4450,7 +4533,7 @@ var ts; return result; } function parseDebuggerStatement() { - var node = createNode(180 /* DebuggerStatement */); + var node = createNode(183 /* DebuggerStatement */); parseExpected(70 /* DebuggerKeyword */); parseSemicolon(); return finishNode(node); @@ -4468,7 +4551,7 @@ var ts; return isIdentifier() && lookAhead(function () { return nextToken() === 50 /* ColonToken */; }); } function parseLabeledStatement(allowLetAndConstDeclarations) { - var node = createNode(174 /* LabeledStatement */); + var node = createNode(177 /* LabeledStatement */); node.label = parseIdentifier(); parseExpected(50 /* ColonToken */); if (labelledStatementInfo.nodeIsNestedInLabel(node.label, false, true)) { @@ -4479,7 +4562,7 @@ var ts; return finishNode(node); } function parseExpressionStatement() { - var node = createNode(161 /* ExpressionStatement */); + var node = createNode(164 /* ExpressionStatement */); node.expression = parseExpression(); parseSemicolon(); return finishNode(node); @@ -4550,9 +4633,9 @@ var ts; case 80 /* ForKeyword */: return parseForOrForInStatement(); case 69 /* ContinueKeyword */: - return parseBreakOrContinueStatement(167 /* ContinueStatement */); + return parseBreakOrContinueStatement(170 /* ContinueStatement */); case 64 /* BreakKeyword */: - return parseBreakOrContinueStatement(168 /* BreakStatement */); + return parseBreakOrContinueStatement(171 /* BreakStatement */); case 88 /* ReturnKeyword */: return parseReturnStatement(); case 99 /* WithKeyword */: @@ -4592,7 +4675,7 @@ var ts; error(ts.Diagnostics.Block_or_expected); } function parseVariableDeclaration(flags, noIn) { - var node = createNode(181 /* VariableDeclaration */); + var node = createNode(184 /* VariableDeclaration */); node.flags = flags; var errorCountBeforeVariableDeclaration = file.syntacticErrors.length; node.name = parseIdentifier(); @@ -4615,7 +4698,7 @@ var ts; return parseDelimitedList(9 /* VariableDeclarations */, function () { return parseVariableDeclaration(flags, noIn); }, false); } function parseVariableStatement(allowLetAndConstDeclarations, pos, flags) { - var node = createNode(159 /* VariableStatement */, pos); + var node = createNode(162 /* VariableStatement */, pos); if (flags) node.flags = flags; var errorCountBeforeVarStatement = file.syntacticErrors.length; @@ -4654,7 +4737,7 @@ var ts; return node; } function parseFunctionDeclaration(pos, flags) { - var node = createNode(182 /* FunctionDeclaration */, pos); + var node = createNode(185 /* FunctionDeclaration */, pos); if (flags) node.flags = flags; parseExpected(81 /* FunctionKeyword */); @@ -4664,7 +4747,7 @@ var ts; node.parameters = sig.parameters; node.type = sig.type; node.body = parseAndCheckFunctionBody(false); - if (isInStrictMode && isEvalOrArgumentsIdentifier(node.name)) { + if (isInStrictMode && isEvalOrArgumentsIdentifier(node.name) && node.name.kind === 63 /* Identifier */) { reportInvalidUseInStrictMode(node.name); } return finishNode(node); @@ -4965,7 +5048,7 @@ var ts; ts.Debug.fail("Should not have attempted to parse class member declaration."); } function parseClassDeclaration(pos, flags) { - var node = createNode(184 /* ClassDeclaration */, pos); + var node = createNode(187 /* ClassDeclaration */, pos); node.flags = flags; var errorCountBeforeClassDeclaration = file.syntacticErrors.length; parseExpected(67 /* ClassKeyword */); @@ -4992,7 +5075,7 @@ var ts; return finishNode(node); } function parseInterfaceDeclaration(pos, flags) { - var node = createNode(185 /* InterfaceDeclaration */, pos); + var node = createNode(188 /* InterfaceDeclaration */, pos); node.flags = flags; var errorCountBeforeInterfaceDeclaration = file.syntacticErrors.length; parseExpected(101 /* InterfaceKeyword */); @@ -5012,7 +5095,7 @@ var ts; return finishNode(node); } function parseTypeAliasDeclaration(pos, flags) { - var node = createNode(186 /* TypeAliasDeclaration */, pos); + var node = createNode(189 /* TypeAliasDeclaration */, pos); node.flags = flags; parseExpected(119 /* TypeKeyword */); node.name = parseIdentifier(); @@ -5027,7 +5110,7 @@ var ts; function isInteger(literalExpression) { return /^[0-9]+([eE]\+?[0-9]+)?$/.test(literalExpression.text); } - if (expression.kind === 151 /* PrefixOperator */) { + if (expression.kind === 154 /* PrefixOperator */) { var unaryExpression = expression; if (unaryExpression.operator === 32 /* PlusToken */ || unaryExpression.operator === 33 /* MinusToken */) { expression = unaryExpression.operand; @@ -5040,7 +5123,7 @@ var ts; } var inConstantEnumMemberSection = true; function parseAndCheckEnumMember() { - var node = createNode(192 /* EnumMember */); + var node = createNode(195 /* EnumMember */); var errorCountBeforeEnumMember = file.syntacticErrors.length; node.name = parsePropertyName(); node.initializer = parseInitializer(false); @@ -5059,7 +5142,7 @@ var ts; } return finishNode(node); } - var node = createNode(187 /* EnumDeclaration */, pos); + var node = createNode(190 /* EnumDeclaration */, pos); node.flags = flags; if (enumIsConst) { parseExpected(68 /* ConstKeyword */); @@ -5076,7 +5159,7 @@ var ts; return finishNode(node); } function parseModuleBody() { - var node = createNode(189 /* ModuleBlock */); + var node = createNode(192 /* ModuleBlock */); if (parseExpected(13 /* OpenBraceToken */)) { node.statements = parseList(1 /* ModuleElements */, false, parseModuleElement); parseExpected(14 /* CloseBraceToken */); @@ -5087,7 +5170,7 @@ var ts; return finishNode(node); } function parseInternalModuleTail(pos, flags) { - var node = createNode(188 /* ModuleDeclaration */, pos); + var node = createNode(191 /* ModuleDeclaration */, pos); node.flags = flags; node.name = parseIdentifier(); if (parseOptional(19 /* DotToken */)) { @@ -5096,10 +5179,10 @@ var ts; else { node.body = parseModuleBody(); ts.forEach(node.body.statements, function (s) { - if (s.kind === 191 /* ExportAssignment */) { + if (s.kind === 194 /* ExportAssignment */) { grammarErrorOnNode(s, ts.Diagnostics.An_export_assignment_cannot_be_used_in_an_internal_module); } - else if (s.kind === 190 /* ImportDeclaration */ && s.externalModuleName) { + else if (s.kind === 193 /* ImportDeclaration */ && s.externalModuleName) { grammarErrorOnNode(s, ts.Diagnostics.Import_declarations_in_an_internal_module_cannot_reference_an_external_module); } }); @@ -5107,7 +5190,7 @@ var ts; return finishNode(node); } function parseAmbientExternalModuleDeclaration(pos, flags) { - var node = createNode(188 /* ModuleDeclaration */, pos); + var node = createNode(191 /* ModuleDeclaration */, pos); node.flags = flags; node.name = parseStringLiteral(); if (!inAmbientContext) { @@ -5127,7 +5210,7 @@ var ts; return token === 7 /* StringLiteral */ ? parseAmbientExternalModuleDeclaration(pos, flags) : parseInternalModuleTail(pos, flags); } function parseImportDeclaration(pos, flags) { - var node = createNode(190 /* ImportDeclaration */, pos); + var node = createNode(193 /* ImportDeclaration */, pos); node.flags = flags; parseExpected(83 /* ImportKeyword */); node.name = parseIdentifier(); @@ -5144,7 +5227,7 @@ var ts; return finishNode(node); } function parseExportAssignmentTail(pos) { - var node = createNode(191 /* ExportAssignment */, pos); + var node = createNode(194 /* ExportAssignment */, pos); node.exportName = parseIdentifier(); parseSemicolon(); return finishNode(node); @@ -5264,35 +5347,33 @@ var ts; function processReferenceComments() { var referencedFiles = []; var amdDependencies = []; + var amdModuleName; commentRanges = []; token = scanner.scan(); for (var i = 0; i < commentRanges.length; i++) { var range = commentRanges[i]; var comment = sourceText.substring(range.pos, range.end); - var simpleReferenceRegEx = /^\/\/\/\s*/gim; - if (isNoDefaultLibRegEx.exec(comment)) { - file.hasNoDefaultLib = true; + var referencePathMatchResult = getFileReferenceFromReferencePath(comment, range); + if (referencePathMatchResult) { + var fileReference = referencePathMatchResult.fileReference; + file.hasNoDefaultLib = referencePathMatchResult.isNoDefaultLib; + var diagnostic = referencePathMatchResult.diagnostic; + if (fileReference) { + referencedFiles.push(fileReference); } - else { - var matchResult = ts.fullTripleSlashReferencePathRegEx.exec(comment); - var start = range.pos; - var end = range.end; - var length = end - start; - if (!matchResult) { - errorAtPos(start, length, ts.Diagnostics.Invalid_reference_directive_syntax); - } - else { - referencedFiles.push({ - pos: start, - end: end, - filename: matchResult[3] - }); - } + if (diagnostic) { + errorAtPos(range.pos, range.end - range.pos, diagnostic); } } else { + var amdModuleNameRegEx = /^\/\/\/\s* 1) { lineCount = lineCount + lineStartsOfS.length - 1; linePos = output.length - s.length + lineStartsOfS[lineStartsOfS.length - 1]; @@ -6310,7 +6417,7 @@ var ts; if (scopeName) { recordScopeNameStart(scopeName); } - else if (node.kind === 182 /* FunctionDeclaration */ || node.kind === 149 /* FunctionExpression */ || node.kind === 125 /* Method */ || node.kind === 127 /* GetAccessor */ || node.kind === 128 /* SetAccessor */ || node.kind === 188 /* ModuleDeclaration */ || node.kind === 184 /* ClassDeclaration */ || node.kind === 187 /* EnumDeclaration */) { + else if (node.kind === 185 /* FunctionDeclaration */ || node.kind === 152 /* FunctionExpression */ || node.kind === 125 /* Method */ || node.kind === 127 /* GetAccessor */ || node.kind === 128 /* SetAccessor */ || node.kind === 191 /* ModuleDeclaration */ || node.kind === 187 /* ClassDeclaration */ || node.kind === 190 /* EnumDeclaration */) { if (node.name) { scopeName = node.name.text; } @@ -6392,7 +6499,7 @@ var ts; } function emitNodeWithMap(node) { if (node) { - if (node.kind != 193 /* SourceFile */) { + if (node.kind != 196 /* SourceFile */) { recordEmitNodeStartSpan(node); emitNode(node); recordEmitNodeEndSpan(node); @@ -6501,14 +6608,14 @@ var ts; ts.forEachChild(node, emit); return; } - ts.Debug.assert(node.parent.kind !== 146 /* TaggedTemplateExpression */); - var templateNeedsParens = ts.isExpression(node.parent) && node.parent.kind !== 148 /* ParenExpression */ && comparePrecedenceToBinaryPlus(node.parent) !== -1 /* LessThan */; + ts.Debug.assert(node.parent.kind !== 149 /* TaggedTemplateExpression */); + var templateNeedsParens = ts.isExpression(node.parent) && node.parent.kind !== 151 /* ParenExpression */ && comparePrecedenceToBinaryPlus(node.parent) !== -1 /* LessThan */; if (templateNeedsParens) { write("("); } emitLiteral(node.head); ts.forEach(node.templateSpans, function (templateSpan) { - var needsParens = templateSpan.expression.kind !== 148 /* ParenExpression */ && comparePrecedenceToBinaryPlus(templateSpan.expression) !== 1 /* GreaterThan */; + var needsParens = templateSpan.expression.kind !== 151 /* ParenExpression */ && comparePrecedenceToBinaryPlus(templateSpan.expression) !== 1 /* GreaterThan */; write(" + "); if (needsParens) { write("("); @@ -6528,7 +6635,7 @@ var ts; function comparePrecedenceToBinaryPlus(expression) { ts.Debug.assert(compilerOptions.target <= 1 /* ES5 */); switch (expression.kind) { - case 153 /* BinaryExpression */: + case 156 /* BinaryExpression */: switch (expression.operator) { case 34 /* AsteriskToken */: case 35 /* SlashToken */: @@ -6539,7 +6646,7 @@ var ts; default: return -1 /* LessThan */; } - case 154 /* ConditionalExpression */: + case 157 /* ConditionalExpression */: return -1 /* LessThan */; default: return 1 /* GreaterThan */; @@ -6550,7 +6657,7 @@ var ts; emit(span.expression); emit(span.literal); } - function emitQuotedIdentifier(node) { + function emitExpressionForPropertyName(node) { if (node.kind === 7 /* StringLiteral */) { emitLiteral(node); } @@ -6565,45 +6672,52 @@ var ts; write("\""); } } - function isNonExpressionIdentifier(node) { + function isNotExpressionIdentifier(node) { var parent = node.parent; switch (parent.kind) { case 123 /* Parameter */: - case 181 /* VariableDeclaration */: + case 184 /* VariableDeclaration */: case 124 /* Property */: - case 141 /* PropertyAssignment */: - case 192 /* EnumMember */: + case 143 /* PropertyAssignment */: + case 144 /* ShorthandPropertyAssignment */: + case 195 /* EnumMember */: case 125 /* Method */: - case 182 /* FunctionDeclaration */: + case 185 /* FunctionDeclaration */: case 127 /* GetAccessor */: case 128 /* SetAccessor */: - case 149 /* FunctionExpression */: - case 184 /* ClassDeclaration */: - case 185 /* InterfaceDeclaration */: - case 187 /* EnumDeclaration */: - case 188 /* ModuleDeclaration */: - case 190 /* ImportDeclaration */: + case 152 /* FunctionExpression */: + case 187 /* ClassDeclaration */: + case 188 /* InterfaceDeclaration */: + case 190 /* EnumDeclaration */: + case 191 /* ModuleDeclaration */: + case 193 /* ImportDeclaration */: return parent.name === node; - case 168 /* BreakStatement */: - case 167 /* ContinueStatement */: - case 191 /* ExportAssignment */: + case 171 /* BreakStatement */: + case 170 /* ContinueStatement */: + case 194 /* ExportAssignment */: return false; - case 174 /* LabeledStatement */: + case 177 /* LabeledStatement */: return node.parent.label === node; - case 178 /* CatchBlock */: + case 181 /* CatchBlock */: return node.parent.variable === node; } } - function emitIdentifier(node) { - if (!isNonExpressionIdentifier(node)) { - var prefix = resolver.getExpressionNamePrefix(node); - if (prefix) { - write(prefix); - write("."); - } + function emitExpressionIdentifier(node) { + var prefix = resolver.getExpressionNamePrefix(node); + if (prefix) { + write(prefix); + write("."); } write(getSourceTextOfLocalNode(node)); } + function emitIdentifier(node) { + if (!isNotExpressionIdentifier(node)) { + emitExpressionIdentifier(node); + } + else { + write(getSourceTextOfLocalNode(node)); + } + } function emitThis(node) { if (resolver.getNodeCheckFlags(node) & 2 /* LexicalThis */) { write("_this"); @@ -6664,10 +6778,33 @@ var ts; emit(node.initializer); emitTrailingComments(node); } + function emitShortHandPropertyAssignment(node) { + function emitAsNormalPropertyAssignment() { + emitLeadingComments(node); + emit(node.name); + write(": "); + emitExpressionIdentifier(node.name); + emitTrailingComments(node); + } + if (compilerOptions.target < 2 /* ES6 */) { + emitAsNormalPropertyAssignment(); + } + else if (compilerOptions.target >= 2 /* ES6 */) { + var prefix = resolver.getExpressionNamePrefix(node.name); + if (prefix) { + emitAsNormalPropertyAssignment(); + } + else { + emitLeadingComments(node); + emit(node.name); + emitTrailingComments(node); + } + } + } function tryEmitConstantValue(node) { var constantValue = resolver.getConstantValue(node); if (constantValue !== undefined) { - var propertyName = node.kind === 142 /* PropertyAccess */ ? ts.identifierToString(node.right) : ts.getTextOfNode(node.index); + var propertyName = node.kind === 145 /* PropertyAccess */ ? ts.declarationNameToString(node.right) : ts.getTextOfNode(node.index); write(constantValue.toString() + " /* " + propertyName + " */"); return true; } @@ -6698,7 +6835,7 @@ var ts; } else { emit(node.func); - superCall = node.func.kind === 142 /* PropertyAccess */ && node.func.left.kind === 89 /* SuperKeyword */; + superCall = node.func.kind === 145 /* PropertyAccess */ && node.func.left.kind === 89 /* SuperKeyword */; } if (superCall) { write(".call("); @@ -6731,12 +6868,12 @@ var ts; emit(node.template); } function emitParenExpression(node) { - if (node.expression.kind === 147 /* TypeAssertion */) { + if (node.expression.kind === 150 /* TypeAssertion */) { var operand = node.expression.operand; - while (operand.kind == 147 /* TypeAssertion */) { + while (operand.kind == 150 /* TypeAssertion */) { operand = operand.operand; } - if (operand.kind !== 151 /* PrefixOperator */ && operand.kind !== 152 /* PostfixOperator */ && operand.kind !== 145 /* NewExpression */ && !(operand.kind === 144 /* CallExpression */ && node.parent.kind === 145 /* NewExpression */) && !(operand.kind === 149 /* FunctionExpression */ && node.parent.kind === 144 /* CallExpression */)) { + if (operand.kind !== 154 /* PrefixOperator */ && operand.kind !== 155 /* PostfixOperator */ && operand.kind !== 148 /* NewExpression */ && !(operand.kind === 147 /* CallExpression */ && node.parent.kind === 148 /* NewExpression */) && !(operand.kind === 152 /* FunctionExpression */ && node.parent.kind === 147 /* CallExpression */)) { emit(operand); return; } @@ -6746,13 +6883,13 @@ var ts; write(")"); } function emitUnaryExpression(node) { - if (node.kind === 151 /* PrefixOperator */) { + if (node.kind === 154 /* PrefixOperator */) { write(ts.tokenToString(node.operator)); } if (node.operator >= 63 /* Identifier */) { write(" "); } - else if (node.kind === 151 /* PrefixOperator */ && node.operand.kind === 151 /* PrefixOperator */) { + else if (node.kind === 154 /* PrefixOperator */ && node.operand.kind === 154 /* PrefixOperator */) { var operand = node.operand; if (node.operator === 32 /* PlusToken */ && (operand.operator === 32 /* PlusToken */ || operand.operator === 37 /* PlusPlusToken */)) { write(" "); @@ -6762,7 +6899,7 @@ var ts; } } emit(node.operand); - if (node.kind === 152 /* PostfixOperator */) { + if (node.kind === 155 /* PostfixOperator */) { write(ts.tokenToString(node.operator)); } } @@ -6785,8 +6922,8 @@ var ts; emitToken(13 /* OpenBraceToken */, node.pos); increaseIndent(); scopeEmitStart(node.parent); - if (node.kind === 189 /* ModuleBlock */) { - ts.Debug.assert(node.parent.kind === 188 /* ModuleDeclaration */); + if (node.kind === 192 /* ModuleBlock */) { + ts.Debug.assert(node.parent.kind === 191 /* ModuleDeclaration */); emitCaptureThisForNodeIfNecessary(node.parent); } emitLines(node.statements); @@ -6796,7 +6933,7 @@ var ts; scopeEmitEnd(); } function emitEmbeddedStatement(node) { - if (node.kind === 158 /* Block */) { + if (node.kind === 161 /* Block */) { write(" "); emit(node); } @@ -6808,7 +6945,7 @@ var ts; } } function emitExpressionStatement(node) { - var isArrowExpression = node.expression.kind === 150 /* ArrowFunction */; + var isArrowExpression = node.expression.kind === 153 /* ArrowFunction */; emitLeadingComments(node); if (isArrowExpression) write("("); @@ -6829,7 +6966,7 @@ var ts; if (node.elseStatement) { writeLine(); emitToken(74 /* ElseKeyword */, node.thenStatement.end); - if (node.elseStatement.kind === 162 /* IfStatement */) { + if (node.elseStatement.kind === 165 /* IfStatement */) { write(" "); emit(node.elseStatement); } @@ -6842,7 +6979,7 @@ var ts; function emitDoStatement(node) { write("do"); emitEmbeddedStatement(node.statement); - if (node.statement.kind === 158 /* Block */) { + if (node.statement.kind === 161 /* Block */) { write(" "); } else { @@ -6908,7 +7045,7 @@ var ts; emitEmbeddedStatement(node.statement); } function emitBreakOrContinueStatement(node) { - emitToken(node.kind === 168 /* BreakStatement */ ? 64 /* BreakKeyword */ : 69 /* ContinueKeyword */, node.pos); + emitToken(node.kind === 171 /* BreakStatement */ ? 64 /* BreakKeyword */ : 69 /* ContinueKeyword */, node.pos); emitOptional(" ", node.label); write(";"); } @@ -6943,7 +7080,7 @@ var ts; return getLineOfLocalPosition(ts.skipTrivia(currentSourceFile.text, node1.pos)) === getLineOfLocalPosition(ts.skipTrivia(currentSourceFile.text, node2.pos)); } function emitCaseOrDefaultClause(node) { - if (node.kind === 172 /* CaseClause */) { + if (node.kind === 175 /* CaseClause */) { write("case "); emit(node.expression); write(":"); @@ -6998,7 +7135,7 @@ var ts; function getContainingModule(node) { do { node = node.parent; - } while (node && node.kind !== 188 /* ModuleDeclaration */); + } while (node && node.kind !== 191 /* ModuleDeclaration */); return node; } function emitModuleMemberName(node) { @@ -7110,7 +7247,7 @@ var ts; emitLeadingComments(node); } write("function "); - if (node.kind === 182 /* FunctionDeclaration */ || (node.kind === 149 /* FunctionExpression */ && node.name)) { + if (node.kind === 185 /* FunctionDeclaration */ || (node.kind === 152 /* FunctionExpression */ && node.name)) { emit(node.name); } emitSignatureAndBody(node); @@ -7140,16 +7277,16 @@ var ts; write(" {"); scopeEmitStart(node); increaseIndent(); - emitDetachedComments(node.body.kind === 183 /* FunctionBlock */ ? node.body.statements : node.body); + emitDetachedComments(node.body.kind === 186 /* FunctionBlock */ ? node.body.statements : node.body); var startIndex = 0; - if (node.body.kind === 183 /* FunctionBlock */) { + if (node.body.kind === 186 /* FunctionBlock */) { startIndex = emitDirectivePrologues(node.body.statements, true); } var outPos = writer.getTextPos(); emitCaptureThisForNodeIfNecessary(node); emitDefaultValueAssignments(node); emitRestParameter(node); - if (node.body.kind !== 183 /* FunctionBlock */ && outPos === writer.getTextPos()) { + if (node.body.kind !== 186 /* FunctionBlock */ && outPos === writer.getTextPos()) { decreaseIndent(); write(" "); emitStart(node.body); @@ -7162,7 +7299,7 @@ var ts; emitEnd(node.body); } else { - if (node.body.kind === 183 /* FunctionBlock */) { + if (node.body.kind === 186 /* FunctionBlock */) { emitLinesStartingAt(node.body.statements, startIndex); } else { @@ -7174,7 +7311,7 @@ var ts; emitTrailingComments(node.body); } writeLine(); - if (node.body.kind === 183 /* FunctionBlock */) { + if (node.body.kind === 186 /* FunctionBlock */) { emitLeadingCommentsOfPosition(node.body.statements.end); decreaseIndent(); emitToken(14 /* CloseBraceToken */, node.body.statements.end); @@ -7200,9 +7337,9 @@ var ts; function findInitialSuperCall(ctor) { if (ctor.body) { var statement = ctor.body.statements[0]; - if (statement && statement.kind === 161 /* ExpressionStatement */) { + if (statement && statement.kind === 164 /* ExpressionStatement */) { var expr = statement.expression; - if (expr && expr.kind === 144 /* CallExpression */) { + if (expr && expr.kind === 147 /* CallExpression */) { var func = expr.func; if (func && func.kind === 89 /* SuperKeyword */) { return statement; @@ -7297,7 +7434,7 @@ var ts; write(".prototype"); } write(", "); - emitQuotedIdentifier(member.name); + emitExpressionForPropertyName(member.name); emitEnd(member.name); write(", {"); increaseIndent(); @@ -7503,7 +7640,7 @@ var ts; write("["); write(resolver.getLocalNameOfContainer(node)); write("["); - emitQuotedIdentifier(member.name); + emitExpressionForPropertyName(member.name); write("] = "); if (member.initializer && !isConstEnum) { emit(member.initializer); @@ -7512,7 +7649,7 @@ var ts; write(resolver.getEnumMemberValue(member).toString()); } write("] = "); - emitQuotedIdentifier(member.name); + emitExpressionForPropertyName(member.name); emitEnd(member); write(";"); emitTrailingComments(member); @@ -7520,7 +7657,7 @@ var ts; } } function getInnerMostModuleDeclarationFromDottedModule(moduleDeclaration) { - if (moduleDeclaration.body.kind === 188 /* ModuleDeclaration */) { + if (moduleDeclaration.body.kind === 191 /* ModuleDeclaration */) { var recursiveInnerModule = getInnerMostModuleDeclarationFromDottedModule(moduleDeclaration.body); return recursiveInnerModule || moduleDeclaration.body; } @@ -7542,7 +7679,7 @@ var ts; write(resolver.getLocalNameOfContainer(node)); emitEnd(node.name); write(") "); - if (node.body.kind === 189 /* ModuleBlock */) { + if (node.body.kind === 192 /* ModuleBlock */) { emit(node.body); } else { @@ -7576,7 +7713,7 @@ var ts; emitImportDeclaration = !ts.isExternalModule(currentSourceFile) && resolver.isTopLevelValueImportWithEntityName(node); } if (emitImportDeclaration) { - if (node.externalModuleName && node.parent.kind === 193 /* SourceFile */ && compilerOptions.module === 2 /* AMD */) { + if (node.externalModuleName && node.parent.kind === 196 /* SourceFile */ && compilerOptions.module === 2 /* AMD */) { if (node.flags & 1 /* Export */) { writeLine(); emitLeadingComments(node); @@ -7616,7 +7753,7 @@ var ts; function getExternalImportDeclarations(node) { var result = []; ts.forEach(node.statements, function (stat) { - if (stat.kind === 190 /* ImportDeclaration */ && stat.externalModuleName && resolver.isReferencedImportDeclaration(stat)) { + if (stat.kind === 193 /* ImportDeclaration */ && stat.externalModuleName && resolver.isReferencedImportDeclaration(stat)) { result.push(stat); } }); @@ -7624,7 +7761,7 @@ var ts; } function getFirstExportAssignment(sourceFile) { return ts.forEach(sourceFile.statements, function (node) { - if (node.kind === 191 /* ExportAssignment */) { + if (node.kind === 194 /* ExportAssignment */) { return node; } }); @@ -7632,7 +7769,11 @@ var ts; function emitAMDModule(node, startIndex) { var imports = getExternalImportDeclarations(node); writeLine(); - write("define([\"require\", \"exports\""); + write("define("); + if (node.amdModuleName) { + write("\"" + node.amdModuleName + "\", "); + } + write("[\"require\", \"exports\""); ts.forEach(imports, function (imp) { write(", "); emitLiteral(imp.externalModuleName); @@ -7765,102 +7906,104 @@ var ts; case 11 /* TemplateMiddle */: case 12 /* TemplateTail */: return emitLiteral(node); - case 155 /* TemplateExpression */: + case 158 /* TemplateExpression */: return emitTemplateExpression(node); - case 156 /* TemplateSpan */: + case 159 /* TemplateSpan */: return emitTemplateSpan(node); case 121 /* QualifiedName */: return emitPropertyAccess(node); - case 139 /* ArrayLiteral */: + case 141 /* ArrayLiteral */: return emitArrayLiteral(node); - case 140 /* ObjectLiteral */: + case 142 /* ObjectLiteral */: return emitObjectLiteral(node); - case 141 /* PropertyAssignment */: + case 143 /* PropertyAssignment */: return emitPropertyAssignment(node); - case 142 /* PropertyAccess */: + case 144 /* ShorthandPropertyAssignment */: + return emitShortHandPropertyAssignment(node); + case 145 /* PropertyAccess */: return emitPropertyAccess(node); - case 143 /* IndexedAccess */: + case 146 /* IndexedAccess */: return emitIndexedAccess(node); - case 144 /* CallExpression */: + case 147 /* CallExpression */: return emitCallExpression(node); - case 145 /* NewExpression */: + case 148 /* NewExpression */: return emitNewExpression(node); - case 146 /* TaggedTemplateExpression */: + case 149 /* TaggedTemplateExpression */: return emitTaggedTemplateExpression(node); - case 147 /* TypeAssertion */: + case 150 /* TypeAssertion */: return emit(node.operand); - case 148 /* ParenExpression */: + case 151 /* ParenExpression */: return emitParenExpression(node); - case 182 /* FunctionDeclaration */: - case 149 /* FunctionExpression */: - case 150 /* ArrowFunction */: + case 185 /* FunctionDeclaration */: + case 152 /* FunctionExpression */: + case 153 /* ArrowFunction */: return emitFunctionDeclaration(node); - case 151 /* PrefixOperator */: - case 152 /* PostfixOperator */: + case 154 /* PrefixOperator */: + case 155 /* PostfixOperator */: return emitUnaryExpression(node); - case 153 /* BinaryExpression */: + case 156 /* BinaryExpression */: return emitBinaryExpression(node); - case 154 /* ConditionalExpression */: + case 157 /* ConditionalExpression */: return emitConditionalExpression(node); - case 157 /* OmittedExpression */: + case 160 /* OmittedExpression */: return; - case 158 /* Block */: - case 177 /* TryBlock */: - case 179 /* FinallyBlock */: - case 183 /* FunctionBlock */: - case 189 /* ModuleBlock */: + case 161 /* Block */: + case 180 /* TryBlock */: + case 182 /* FinallyBlock */: + case 186 /* FunctionBlock */: + case 192 /* ModuleBlock */: return emitBlock(node); - case 159 /* VariableStatement */: + case 162 /* VariableStatement */: return emitVariableStatement(node); - case 160 /* EmptyStatement */: + case 163 /* EmptyStatement */: return write(";"); - case 161 /* ExpressionStatement */: + case 164 /* ExpressionStatement */: return emitExpressionStatement(node); - case 162 /* IfStatement */: + case 165 /* IfStatement */: return emitIfStatement(node); - case 163 /* DoStatement */: + case 166 /* DoStatement */: return emitDoStatement(node); - case 164 /* WhileStatement */: + case 167 /* WhileStatement */: return emitWhileStatement(node); - case 165 /* ForStatement */: + case 168 /* ForStatement */: return emitForStatement(node); - case 166 /* ForInStatement */: + case 169 /* ForInStatement */: return emitForInStatement(node); - case 167 /* ContinueStatement */: - case 168 /* BreakStatement */: + case 170 /* ContinueStatement */: + case 171 /* BreakStatement */: return emitBreakOrContinueStatement(node); - case 169 /* ReturnStatement */: + case 172 /* ReturnStatement */: return emitReturnStatement(node); - case 170 /* WithStatement */: + case 173 /* WithStatement */: return emitWithStatement(node); - case 171 /* SwitchStatement */: + case 174 /* SwitchStatement */: return emitSwitchStatement(node); - case 172 /* CaseClause */: - case 173 /* DefaultClause */: + case 175 /* CaseClause */: + case 176 /* DefaultClause */: return emitCaseOrDefaultClause(node); - case 174 /* LabeledStatement */: + case 177 /* LabeledStatement */: return emitLabelledStatement(node); - case 175 /* ThrowStatement */: + case 178 /* ThrowStatement */: return emitThrowStatement(node); - case 176 /* TryStatement */: + case 179 /* TryStatement */: return emitTryStatement(node); - case 178 /* CatchBlock */: + case 181 /* CatchBlock */: return emitCatchBlock(node); - case 180 /* DebuggerStatement */: + case 183 /* DebuggerStatement */: return emitDebuggerStatement(node); - case 181 /* VariableDeclaration */: + case 184 /* VariableDeclaration */: return emitVariableDeclaration(node); - case 184 /* ClassDeclaration */: + case 187 /* ClassDeclaration */: return emitClassDeclaration(node); - case 185 /* InterfaceDeclaration */: + case 188 /* InterfaceDeclaration */: return emitInterfaceDeclaration(node); - case 187 /* EnumDeclaration */: + case 190 /* EnumDeclaration */: return emitEnumDeclaration(node); - case 188 /* ModuleDeclaration */: + case 191 /* ModuleDeclaration */: return emitModuleDeclaration(node); - case 190 /* ImportDeclaration */: + case 193 /* ImportDeclaration */: return emitImportDeclaration(node); - case 193 /* SourceFile */: + case 196 /* SourceFile */: return emitSourceFile(node); } } @@ -7878,7 +8021,7 @@ var ts; return leadingComments; } function getLeadingCommentsToEmit(node) { - if (node.parent.kind === 193 /* SourceFile */ || node.pos !== node.parent.pos) { + if (node.parent.kind === 196 /* SourceFile */ || node.pos !== node.parent.pos) { var leadingComments; if (hasDetachedComments(node.pos)) { leadingComments = getLeadingCommentsWithoutDetachedComments(); @@ -7895,7 +8038,7 @@ var ts; emitComments(leadingComments, true, writer, writeComment); } function emitTrailingDeclarationComments(node) { - if (node.parent.kind === 193 /* SourceFile */ || node.end !== node.parent.end) { + if (node.parent.kind === 196 /* SourceFile */ || node.end !== node.parent.end) { var trailingComments = ts.getTrailingCommentRanges(currentSourceFile.text, node.end); emitComments(trailingComments, false, writer, writeComment); } @@ -8087,7 +8230,7 @@ var ts; if (node.flags & 1 /* Export */) { write("export "); } - if (node.kind !== 185 /* InterfaceDeclaration */) { + if (node.kind !== 188 /* InterfaceDeclaration */) { write("declare "); } } @@ -8143,7 +8286,7 @@ var ts; emitDeclarationFlags(node); write("module "); emitSourceTextOfNode(node.name); - while (node.body.kind !== 189 /* ModuleBlock */) { + while (node.body.kind !== 192 /* ModuleBlock */) { node = node.body; write("."); emitSourceTextOfNode(node.name); @@ -8215,10 +8358,10 @@ var ts; function getTypeParameterConstraintVisibilityError(symbolAccesibilityResult) { var diagnosticMessage; switch (node.parent.kind) { - case 184 /* ClassDeclaration */: + case 187 /* ClassDeclaration */: diagnosticMessage = symbolAccesibilityResult.errorModuleName ? ts.Diagnostics.Type_parameter_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Type_parameter_0_of_exported_class_has_or_is_using_private_name_1; break; - case 185 /* InterfaceDeclaration */: + case 188 /* InterfaceDeclaration */: diagnosticMessage = symbolAccesibilityResult.errorModuleName ? ts.Diagnostics.Type_parameter_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1; break; case 130 /* ConstructSignature */: @@ -8231,14 +8374,14 @@ var ts; if (node.parent.flags & 128 /* Static */) { diagnosticMessage = symbolAccesibilityResult.errorModuleName ? ts.Diagnostics.Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1; } - else if (node.parent.parent.kind === 184 /* ClassDeclaration */) { + else if (node.parent.parent.kind === 187 /* ClassDeclaration */) { diagnosticMessage = symbolAccesibilityResult.errorModuleName ? ts.Diagnostics.Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1; } else { diagnosticMessage = symbolAccesibilityResult.errorModuleName ? ts.Diagnostics.Type_parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1; } break; - case 182 /* FunctionDeclaration */: + case 185 /* FunctionDeclaration */: diagnosticMessage = symbolAccesibilityResult.errorModuleName ? ts.Diagnostics.Type_parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Type_parameter_0_of_exported_function_has_or_is_using_private_name_1; break; default: @@ -8276,7 +8419,7 @@ var ts; resolver.writeTypeAtLocation(node, enclosingDeclaration, 1 /* WriteArrayAsGenericType */ | 2 /* UseTypeOfFunction */, writer); function getHeritageClauseVisibilityError(symbolAccesibilityResult) { var diagnosticMessage; - if (node.parent.kind === 184 /* ClassDeclaration */) { + if (node.parent.kind === 187 /* ClassDeclaration */) { if (symbolAccesibilityResult.errorModuleName) { diagnosticMessage = isImplementsList ? ts.Diagnostics.Implements_clause_of_exported_class_0_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Extends_clause_of_exported_class_0_has_or_is_using_name_1_from_private_module_2; } @@ -8361,7 +8504,7 @@ var ts; writeLine(); } function emitVariableDeclaration(node) { - if (node.kind !== 181 /* VariableDeclaration */ || resolver.isDeclarationVisible(node)) { + if (node.kind !== 184 /* VariableDeclaration */ || resolver.isDeclarationVisible(node)) { emitSourceTextOfNode(node.name); if (node.kind === 124 /* Property */ && (node.flags & 4 /* QuestionMark */)) { write("?"); @@ -8374,14 +8517,14 @@ var ts; } function getVariableDeclarationTypeVisibilityError(symbolAccesibilityResult) { var diagnosticMessage; - if (node.kind === 181 /* VariableDeclaration */) { + if (node.kind === 184 /* VariableDeclaration */) { diagnosticMessage = symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 /* CannotBeNamed */ ? ts.Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : ts.Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Exported_variable_0_has_or_is_using_private_name_1; } else if (node.kind === 124 /* Property */) { if (node.flags & 128 /* Static */) { diagnosticMessage = symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 /* CannotBeNamed */ ? ts.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : ts.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1; } - else if (node.parent.kind === 184 /* ClassDeclaration */) { + else if (node.parent.kind === 187 /* ClassDeclaration */) { diagnosticMessage = symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 /* CannotBeNamed */ ? ts.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : ts.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_private_name_1; } else { @@ -8460,10 +8603,10 @@ var ts; } } function emitFunctionDeclaration(node) { - if ((node.kind !== 182 /* FunctionDeclaration */ || resolver.isDeclarationVisible(node)) && !resolver.isImplementationOfOverload(node)) { + if ((node.kind !== 185 /* FunctionDeclaration */ || resolver.isDeclarationVisible(node)) && !resolver.isImplementationOfOverload(node)) { emitJsDocComments(node); emitDeclarationFlags(node); - if (node.kind === 182 /* FunctionDeclaration */) { + if (node.kind === 185 /* FunctionDeclaration */) { write("function "); emitSourceTextOfNode(node.name); } @@ -8525,14 +8668,14 @@ var ts; if (node.flags & 128 /* Static */) { diagnosticMessage = symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 /* CannotBeNamed */ ? ts.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : ts.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0; } - else if (node.parent.kind === 184 /* ClassDeclaration */) { + else if (node.parent.kind === 187 /* ClassDeclaration */) { diagnosticMessage = symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 /* CannotBeNamed */ ? ts.Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : ts.Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0; } else { diagnosticMessage = symbolAccesibilityResult.errorModuleName ? ts.Diagnostics.Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0; } break; - case 182 /* FunctionDeclaration */: + case 185 /* FunctionDeclaration */: diagnosticMessage = symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 /* CannotBeNamed */ ? ts.Diagnostics.Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : ts.Diagnostics.Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_exported_function_has_or_is_using_private_name_0; break; default: @@ -8576,14 +8719,14 @@ var ts; if (node.parent.flags & 128 /* Static */) { diagnosticMessage = symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 /* CannotBeNamed */ ? ts.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : ts.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1; } - else if (node.parent.parent.kind === 184 /* ClassDeclaration */) { + else if (node.parent.parent.kind === 187 /* ClassDeclaration */) { diagnosticMessage = symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 /* CannotBeNamed */ ? ts.Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : ts.Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1; } else { diagnosticMessage = symbolAccesibilityResult.errorModuleName ? ts.Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1; } break; - case 182 /* FunctionDeclaration */: + case 185 /* FunctionDeclaration */: diagnosticMessage = symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 /* CannotBeNamed */ ? ts.Diagnostics.Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : ts.Diagnostics.Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_exported_function_has_or_is_using_private_name_1; break; default: @@ -8599,7 +8742,7 @@ var ts; function emitNode(node) { switch (node.kind) { case 126 /* Constructor */: - case 182 /* FunctionDeclaration */: + case 185 /* FunctionDeclaration */: case 125 /* Method */: return emitFunctionDeclaration(node); case 130 /* ConstructSignature */: @@ -8610,27 +8753,27 @@ var ts; case 127 /* GetAccessor */: case 128 /* SetAccessor */: return emitAccessorDeclaration(node); - case 159 /* VariableStatement */: + case 162 /* VariableStatement */: return emitVariableStatement(node); case 124 /* Property */: return emitPropertyDeclaration(node); - case 185 /* InterfaceDeclaration */: + case 188 /* InterfaceDeclaration */: return emitInterfaceDeclaration(node); - case 184 /* ClassDeclaration */: + case 187 /* ClassDeclaration */: return emitClassDeclaration(node); - case 186 /* TypeAliasDeclaration */: + case 189 /* TypeAliasDeclaration */: return emitTypeAliasDeclaration(node); - case 192 /* EnumMember */: + case 195 /* EnumMember */: return emitEnumMemberDeclaration(node); - case 187 /* EnumDeclaration */: + case 190 /* EnumDeclaration */: return emitEnumDeclaration(node); - case 188 /* ModuleDeclaration */: + case 191 /* ModuleDeclaration */: return emitModuleDeclaration(node); - case 190 /* ImportDeclaration */: + case 193 /* ImportDeclaration */: return emitImportDeclaration(node); - case 191 /* ExportAssignment */: + case 194 /* ExportAssignment */: return emitExportAssignment(node); - case 193 /* SourceFile */: + case 196 /* SourceFile */: return emitSourceFile(node); } } @@ -8692,9 +8835,9 @@ var ts; } } var hasSemanticErrors = resolver.hasSemanticErrors(); - var hasEarlyErrors = resolver.hasEarlyErrors(targetSourceFile); + var isEmitBlocked = resolver.isEmitBlocked(targetSourceFile); function emitFile(jsFilePath, sourceFile) { - if (!hasEarlyErrors) { + if (!isEmitBlocked) { emitJavaScript(jsFilePath, sourceFile); if (!hasSemanticErrors && compilerOptions.declaration) { emitDeclarations(jsFilePath, sourceFile); @@ -8724,25 +8867,25 @@ var ts; diagnostics.sort(ts.compareDiagnostics); diagnostics = ts.deduplicateSortedDiagnostics(diagnostics); var hasEmitterError = ts.forEach(diagnostics, function (diagnostic) { return diagnostic.category === 1 /* Error */; }); - var returnCode; - if (hasEarlyErrors) { - returnCode = 1 /* AllOutputGenerationSkipped */; + var emitResultStatus; + if (isEmitBlocked) { + emitResultStatus = 1 /* AllOutputGenerationSkipped */; } else if (hasEmitterError) { - returnCode = 4 /* EmitErrorsEncountered */; + emitResultStatus = 4 /* EmitErrorsEncountered */; } else if (hasSemanticErrors && compilerOptions.declaration) { - returnCode = 3 /* DeclarationGenerationSkipped */; + emitResultStatus = 3 /* DeclarationGenerationSkipped */; } else if (hasSemanticErrors && !compilerOptions.declaration) { - returnCode = 2 /* JSGeneratedWithSemanticErrors */; + emitResultStatus = 2 /* JSGeneratedWithSemanticErrors */; } else { - returnCode = 0 /* Succeeded */; + emitResultStatus = 0 /* Succeeded */; } return { - emitResultStatus: returnCode, - errors: diagnostics, + emitResultStatus: emitResultStatus, + diagnostics: diagnostics, sourceMaps: sourceMapDataList }; } @@ -8801,16 +8944,18 @@ var ts; var compilerOptions = program.getCompilerOptions(); var checker = { getProgram: function () { return program; }, - getDiagnostics: getDiagnostics, - getGlobalDiagnostics: getGlobalDiagnostics, getNodeCount: function () { return ts.sum(program.getSourceFiles(), "nodeCount"); }, getIdentifierCount: function () { return ts.sum(program.getSourceFiles(), "identifierCount"); }, getSymbolCount: function () { return ts.sum(program.getSourceFiles(), "symbolCount"); }, getTypeCount: function () { return typeCount; }, + isUndefinedSymbol: function (symbol) { return symbol === undefinedSymbol; }, + isArgumentsSymbol: function (symbol) { return symbol === argumentsSymbol; }, + getDiagnostics: getDiagnostics, + getGlobalDiagnostics: getGlobalDiagnostics, checkProgram: checkProgram, - emitFiles: invokeEmitter, + invokeEmitter: invokeEmitter, getParentOfSymbol: getParentOfSymbol, - getTypeOfSymbol: getTypeOfSymbol, + getNarrowedTypeOfSymbol: getNarrowedTypeOfSymbol, getDeclaredTypeOfSymbol: getDeclaredTypeOfSymbol, getPropertiesOfType: getPropertiesOfType, getPropertyOfType: getPropertyOfType, @@ -8819,6 +8964,7 @@ var ts; getReturnTypeOfSignature: getReturnTypeOfSignature, getSymbolsInScope: getSymbolsInScope, getSymbolInfo: getSymbolInfo, + getShorthandAssignmentValueSymbol: getShorthandAssignmentValueSymbol, getTypeOfNode: getTypeOfNode, typeToString: typeToString, getSymbolDisplayBuilder: getSymbolDisplayBuilder, @@ -8833,9 +8979,8 @@ var ts; getSignatureFromDeclaration: getSignatureFromDeclaration, isImplementationOfOverload: isImplementationOfOverload, getAliasedSymbol: resolveImport, - isUndefinedSymbol: function (symbol) { return symbol === undefinedSymbol; }, - isArgumentsSymbol: function (symbol) { return symbol === argumentsSymbol; }, - hasEarlyErrors: hasEarlyErrors + hasEarlyErrors: hasEarlyErrors, + isEmitBlocked: isEmitBlocked }; var undefinedSymbol = createSymbol(4 /* Property */ | 268435456 /* Transient */, "undefined"); var argumentsSymbol = createSymbol(4 /* Property */ | 268435456 /* Transient */, "arguments"); @@ -8865,6 +9010,7 @@ var ts; var globalNumberType; var globalBooleanType; var globalRegExpType; + var globalTemplateStringsArrayType; var tupleTypes = {}; var unionTypes = {}; var stringLiteralTypes = {}; @@ -9013,10 +9159,10 @@ var ts; return nodeLinks[node.id] || (nodeLinks[node.id] = {}); } function getSourceFile(node) { - return ts.getAncestor(node, 193 /* SourceFile */); + return ts.getAncestor(node, 196 /* SourceFile */); } function isGlobalSourceFile(node) { - return node.kind === 193 /* SourceFile */ && !ts.isExternalModule(node); + return node.kind === 196 /* SourceFile */ && !ts.isExternalModule(node); } function getSymbol(symbols, name, meaning) { if (meaning && ts.hasProperty(symbols, name)) { @@ -9057,21 +9203,21 @@ var ts; } } switch (location.kind) { - case 193 /* SourceFile */: + case 196 /* SourceFile */: if (!ts.isExternalModule(location)) break; - case 188 /* ModuleDeclaration */: + case 191 /* ModuleDeclaration */: if (result = getSymbol(getSymbolOfNode(location).exports, name, meaning & 35653619 /* ModuleMember */)) { break loop; } break; - case 187 /* EnumDeclaration */: + case 190 /* EnumDeclaration */: if (result = getSymbol(getSymbolOfNode(location).exports, name, meaning & 8 /* EnumMember */)) { break loop; } break; case 124 /* Property */: - if (location.parent.kind === 184 /* ClassDeclaration */ && !(location.flags & 128 /* Static */)) { + if (location.parent.kind === 187 /* ClassDeclaration */ && !(location.flags & 128 /* Static */)) { var ctor = findConstructorDeclaration(location.parent); if (ctor && ctor.locals) { if (getSymbol(ctor.locals, name, meaning & 107455 /* Value */)) { @@ -9080,8 +9226,8 @@ var ts; } } break; - case 184 /* ClassDeclaration */: - case 185 /* InterfaceDeclaration */: + case 187 /* ClassDeclaration */: + case 188 /* InterfaceDeclaration */: if (result = getSymbol(getSymbolOfNode(location).members, name, meaning & 3152352 /* Type */)) { if (lastLocation && lastLocation.flags & 128 /* Static */) { error(errorLocation, ts.Diagnostics.Static_members_cannot_reference_class_type_parameters); @@ -9094,14 +9240,14 @@ var ts; case 126 /* Constructor */: case 127 /* GetAccessor */: case 128 /* SetAccessor */: - case 182 /* FunctionDeclaration */: - case 150 /* ArrowFunction */: + case 185 /* FunctionDeclaration */: + case 153 /* ArrowFunction */: if (name === "arguments") { result = argumentsSymbol; break loop; } break; - case 149 /* FunctionExpression */: + case 152 /* FunctionExpression */: if (name === "arguments") { result = argumentsSymbol; break loop; @@ -9112,7 +9258,7 @@ var ts; break loop; } break; - case 178 /* CatchBlock */: + case 181 /* CatchBlock */: var id = location.variable; if (name === id.text) { result = location.symbol; @@ -9128,21 +9274,21 @@ var ts; } if (!result) { if (nameNotFoundMessage) { - error(errorLocation, nameNotFoundMessage, typeof nameArg === "string" ? nameArg : ts.identifierToString(nameArg)); + error(errorLocation, nameNotFoundMessage, typeof nameArg === "string" ? nameArg : ts.declarationNameToString(nameArg)); } return undefined; } if (nameNotFoundMessage) { if (propertyWithInvalidInitializer) { var propertyName = propertyWithInvalidInitializer.name; - error(errorLocation, ts.Diagnostics.Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor, ts.identifierToString(propertyName), typeof nameArg === "string" ? nameArg : ts.identifierToString(nameArg)); + error(errorLocation, ts.Diagnostics.Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor, ts.declarationNameToString(propertyName), typeof nameArg === "string" ? nameArg : ts.declarationNameToString(nameArg)); return undefined; } if (result.flags & 2 /* BlockScopedVariable */) { var declaration = ts.forEach(result.declarations, function (d) { return d.flags & 6144 /* BlockScoped */ ? d : undefined; }); ts.Debug.assert(declaration !== undefined, "Block-scoped variable declaration is undefined"); if (!isDefinedBefore(declaration, errorLocation)) { - error(errorLocation, ts.Diagnostics.Block_scoped_variable_0_used_before_its_declaration, ts.identifierToString(declaration.name)); + error(errorLocation, ts.Diagnostics.Block_scoped_variable_0_used_before_its_declaration, ts.declarationNameToString(declaration.name)); } } } @@ -9153,7 +9299,7 @@ var ts; var links = getSymbolLinks(symbol); if (!links.target) { links.target = resolvingSymbol; - var node = getDeclarationOfKind(symbol, 190 /* ImportDeclaration */); + var node = getDeclarationOfKind(symbol, 193 /* ImportDeclaration */); var target = node.externalModuleName ? resolveExternalModuleName(node, node.externalModuleName) : getSymbolOfPartOfRightHandSideOfImport(node.entityName, node); if (links.target === resolvingSymbol) { links.target = target || unknownSymbol; @@ -9169,7 +9315,7 @@ var ts; } function getSymbolOfPartOfRightHandSideOfImport(entityName, importDeclaration) { if (!importDeclaration) { - importDeclaration = ts.getAncestor(entityName, 190 /* ImportDeclaration */); + importDeclaration = ts.getAncestor(entityName, 193 /* ImportDeclaration */); ts.Debug.assert(importDeclaration !== undefined); } if (entityName.kind === 63 /* Identifier */ && isRightSideOfQualifiedNameOrPropertyAccess(entityName)) { @@ -9179,7 +9325,7 @@ var ts; return resolveEntityName(importDeclaration, entityName, 1536 /* Namespace */); } else { - ts.Debug.assert(entityName.parent.kind === 190 /* ImportDeclaration */); + ts.Debug.assert(entityName.parent.kind === 193 /* ImportDeclaration */); return resolveEntityName(importDeclaration, entityName, 107455 /* Value */ | 3152352 /* Type */ | 1536 /* Namespace */); } } @@ -9199,7 +9345,7 @@ var ts; return; var symbol = getSymbol(namespace.exports, name.right.text, meaning); if (!symbol) { - error(location, ts.Diagnostics.Module_0_has_no_exported_member_1, getFullyQualifiedName(namespace), ts.identifierToString(name.right)); + error(location, ts.Diagnostics.Module_0_has_no_exported_member_1, getFullyQualifiedName(namespace), ts.declarationNameToString(name.right)); return; } } @@ -9284,9 +9430,9 @@ var ts; var seenExportedMember = false; var result = []; ts.forEach(symbol.declarations, function (declaration) { - var block = (declaration.kind === 193 /* SourceFile */ ? declaration : declaration.body); + var block = (declaration.kind === 196 /* SourceFile */ ? declaration : declaration.body); ts.forEach(block.statements, function (node) { - if (node.kind === 191 /* ExportAssignment */) { + if (node.kind === 194 /* ExportAssignment */) { result.push(node); } else { @@ -9393,17 +9539,17 @@ var ts; } } switch (location.kind) { - case 193 /* SourceFile */: + case 196 /* SourceFile */: if (!ts.isExternalModule(location)) { break; } - case 188 /* ModuleDeclaration */: + case 191 /* ModuleDeclaration */: if (result = callback(getSymbolOfNode(location).exports)) { return result; } break; - case 184 /* ClassDeclaration */: - case 185 /* InterfaceDeclaration */: + case 187 /* ClassDeclaration */: + case 188 /* InterfaceDeclaration */: if (result = callback(getSymbolOfNode(location).members)) { return result; } @@ -9434,7 +9580,7 @@ var ts; } return ts.forEachValue(symbols, function (symbolFromSymbolTable) { if (symbolFromSymbolTable.flags & 33554432 /* Import */) { - if (!useOnlyExternalAliasing || ts.forEach(symbolFromSymbolTable.declarations, function (declaration) { return declaration.kind === 190 /* ImportDeclaration */ && declaration.externalModuleName; })) { + if (!useOnlyExternalAliasing || ts.forEach(symbolFromSymbolTable.declarations, function (declaration) { return declaration.kind === 193 /* ImportDeclaration */ && declaration.externalModuleName; })) { var resolvedImportedSymbol = resolveImport(symbolFromSymbolTable); if (isAccessible(symbolFromSymbolTable, resolveImport(symbolFromSymbolTable))) { return [symbolFromSymbolTable]; @@ -9516,7 +9662,7 @@ var ts; } } function hasExternalModuleSymbol(declaration) { - return (declaration.kind === 188 /* ModuleDeclaration */ && declaration.name.kind === 7 /* StringLiteral */) || (declaration.kind === 193 /* SourceFile */ && ts.isExternalModule(declaration)); + return (declaration.kind === 191 /* ModuleDeclaration */ && declaration.name.kind === 7 /* StringLiteral */) || (declaration.kind === 196 /* SourceFile */ && ts.isExternalModule(declaration)); } function hasVisibleDeclarations(symbol) { var aliasesToMakeVisible; @@ -9526,7 +9672,7 @@ var ts; return { aliasesToMakeVisible: aliasesToMakeVisible }; function getIsDeclarationVisible(declaration) { if (!isDeclarationVisible(declaration)) { - if (declaration.kind === 190 /* ImportDeclaration */ && !(declaration.flags & 1 /* Export */) && isDeclarationVisible(declaration.parent)) { + if (declaration.kind === 193 /* ImportDeclaration */ && !(declaration.flags & 1 /* Export */) && isDeclarationVisible(declaration.parent)) { getNodeLinks(declaration).isVisible = true; if (aliasesToMakeVisible) { if (!ts.contains(aliasesToMakeVisible, declaration)) { @@ -9547,7 +9693,7 @@ var ts; var firstIdentifier = getFirstIdentifier(entityName); var symbolOfNameSpace = resolveName(entityName.parent, firstIdentifier.text, 1536 /* Namespace */, ts.Diagnostics.Cannot_find_name_0, firstIdentifier); var hasNamespaceDeclarationsVisibile = hasVisibleDeclarations(symbolOfNameSpace); - return hasNamespaceDeclarationsVisibile ? { accessibility: 0 /* Accessible */, aliasesToMakeVisible: hasNamespaceDeclarationsVisibile.aliasesToMakeVisible } : { accessibility: 1 /* NotAccessible */, errorSymbolName: ts.identifierToString(firstIdentifier) }; + return hasNamespaceDeclarationsVisibile ? { accessibility: 0 /* Accessible */, aliasesToMakeVisible: hasNamespaceDeclarationsVisibile.aliasesToMakeVisible } : { accessibility: 1 /* NotAccessible */, errorSymbolName: ts.declarationNameToString(firstIdentifier) }; } function releaseStringWriter(writer) { writer.clear(); @@ -9586,10 +9732,10 @@ var ts; function getTypeAliasForTypeLiteral(type) { if (type.symbol && type.symbol.flags & 2048 /* TypeLiteral */) { var node = type.symbol.declarations[0].parent; - while (node.kind === 138 /* ParenType */) { + while (node.kind === 140 /* ParenType */) { node = node.parent; } - if (node.kind === 186 /* TypeAliasDeclaration */) { + if (node.kind === 189 /* TypeAliasDeclaration */) { return getSymbolOfNode(node); } } @@ -9601,7 +9747,7 @@ var ts; if (symbol.declarations && symbol.declarations.length > 0) { var declaration = symbol.declarations[0]; if (declaration.name) { - writer.writeSymbol(ts.identifierToString(declaration.name), symbol); + writer.writeSymbol(ts.declarationNameToString(declaration.name), symbol); return; } } @@ -9752,7 +9898,7 @@ var ts; function shouldWriteTypeOfFunctionSymbol() { if (type.symbol) { var isStaticMethodSymbol = !!(type.symbol.flags & 8192 /* Method */ && ts.forEach(type.symbol.declarations, function (declaration) { return declaration.flags & 128 /* Static */; })); - var isNonLocalFunctionSymbol = !!(type.symbol.flags & 16 /* Function */) && (type.symbol.parent || ts.forEach(type.symbol.declarations, function (declaration) { return declaration.parent.kind === 193 /* SourceFile */ || declaration.parent.kind === 189 /* ModuleBlock */; })); + var isNonLocalFunctionSymbol = !!(type.symbol.flags & 16 /* Function */) && (type.symbol.parent || ts.forEach(type.symbol.declarations, function (declaration) { return declaration.parent.kind === 196 /* SourceFile */ || declaration.parent.kind === 192 /* ModuleBlock */; })); if (isStaticMethodSymbol || isNonLocalFunctionSymbol) { return !!(flags & 2 /* UseTypeOfFunction */) || (typeStack && ts.contains(typeStack, type)); } @@ -9971,12 +10117,12 @@ var ts; function isDeclarationVisible(node) { function getContainingExternalModule(node) { for (; node; node = node.parent) { - if (node.kind === 188 /* ModuleDeclaration */) { + if (node.kind === 191 /* ModuleDeclaration */) { if (node.name.kind === 7 /* StringLiteral */) { return node; } } - else if (node.kind === 193 /* SourceFile */) { + else if (node.kind === 196 /* SourceFile */) { return ts.isExternalModule(node) ? node : undefined; } } @@ -10018,16 +10164,16 @@ var ts; } function determineIfDeclarationIsVisible() { switch (node.kind) { - case 181 /* VariableDeclaration */: - case 188 /* ModuleDeclaration */: - case 184 /* ClassDeclaration */: - case 185 /* InterfaceDeclaration */: - case 186 /* TypeAliasDeclaration */: - case 182 /* FunctionDeclaration */: - case 187 /* EnumDeclaration */: - case 190 /* ImportDeclaration */: - var parent = node.kind === 181 /* VariableDeclaration */ ? node.parent.parent : node.parent; - if (!(node.flags & 1 /* Export */) && !(node.kind !== 190 /* ImportDeclaration */ && parent.kind !== 193 /* SourceFile */ && ts.isInAmbientContext(parent))) { + case 184 /* VariableDeclaration */: + case 191 /* ModuleDeclaration */: + case 187 /* ClassDeclaration */: + case 188 /* InterfaceDeclaration */: + case 189 /* TypeAliasDeclaration */: + case 185 /* FunctionDeclaration */: + case 190 /* EnumDeclaration */: + case 193 /* ImportDeclaration */: + var parent = node.kind === 184 /* VariableDeclaration */ ? node.parent.parent : node.parent; + if (!(node.flags & 1 /* Export */) && !(node.kind !== 193 /* ImportDeclaration */ && parent.kind !== 196 /* SourceFile */ && ts.isInAmbientContext(parent))) { return isGlobalSourceFile(parent) || isUsedInExportAssignment(node); } return isDeclarationVisible(parent); @@ -10041,9 +10187,9 @@ var ts; case 129 /* CallSignature */: case 131 /* IndexSignature */: case 123 /* Parameter */: - case 189 /* ModuleBlock */: + case 192 /* ModuleBlock */: return isDeclarationVisible(node.parent); - case 193 /* SourceFile */: + case 196 /* SourceFile */: return true; default: ts.Debug.fail("isDeclarationVisible unknown: SyntaxKind: " + node.kind); @@ -10061,8 +10207,8 @@ var ts; var classType = getDeclaredTypeOfSymbol(prototype.parent); return classType.typeParameters ? createTypeReference(classType, ts.map(classType.typeParameters, function (_) { return anyType; })) : classType; } - function getTypeOfVariableDeclaration(declaration) { - if (declaration.parent.kind === 166 /* ForInStatement */) { + function getTypeOfVariableOrPropertyDeclaration(declaration) { + if (declaration.parent.kind === 169 /* ForInStatement */) { return anyType; } if (declaration.type) { @@ -10083,7 +10229,7 @@ var ts; } if (declaration.initializer) { var type = checkAndMarkExpression(declaration.initializer); - if (declaration.kind !== 141 /* PropertyAssignment */) { + if (declaration.kind !== 143 /* PropertyAssignment */) { var unwidenedType = type; type = getWidenedType(type); if (type !== unwidenedType) { @@ -10092,6 +10238,10 @@ var ts; } return type; } + if (declaration.kind === 144 /* ShorthandPropertyAssignment */) { + var type = checkIdentifier(declaration.name); + return type; + } var type = declaration.flags & 8 /* Rest */ ? createArrayType(anyType) : anyType; checkImplicitAny(type); return type; @@ -10115,7 +10265,7 @@ var ts; default: var diagnostic = ts.Diagnostics.Variable_0_implicitly_has_an_1_type; } - error(declaration, diagnostic, ts.identifierToString(declaration.name), typeToString(type)); + error(declaration, diagnostic, ts.declarationNameToString(declaration.name), typeToString(type)); } } function getTypeOfVariableOrParameterOrProperty(symbol) { @@ -10125,11 +10275,11 @@ var ts; return links.type = getTypeOfPrototypeProperty(symbol); } var declaration = symbol.valueDeclaration; - if (declaration.kind === 178 /* CatchBlock */) { + if (declaration.kind === 181 /* CatchBlock */) { return links.type = anyType; } links.type = resolvingType; - var type = getTypeOfVariableDeclaration(declaration); + var type = getTypeOfVariableOrPropertyDeclaration(declaration); if (links.type === resolvingType) { links.type = type; } @@ -10265,7 +10415,7 @@ var ts; function getTypeParametersOfClassOrInterface(symbol) { var result; ts.forEach(symbol.declarations, function (node) { - if (node.kind === 185 /* InterfaceDeclaration */ || node.kind === 184 /* ClassDeclaration */) { + if (node.kind === 188 /* InterfaceDeclaration */ || node.kind === 187 /* ClassDeclaration */) { var declaration = node; if (declaration.typeParameters && declaration.typeParameters.length) { ts.forEach(declaration.typeParameters, function (node) { @@ -10296,7 +10446,7 @@ var ts; type.typeArguments = type.typeParameters; } type.baseTypes = []; - var declaration = getDeclarationOfKind(symbol, 184 /* ClassDeclaration */); + var declaration = getDeclarationOfKind(symbol, 187 /* ClassDeclaration */); if (declaration.baseType) { var baseType = getTypeFromTypeReferenceNode(declaration.baseType); if (baseType !== unknownType) { @@ -10336,7 +10486,7 @@ var ts; } type.baseTypes = []; ts.forEach(symbol.declarations, function (declaration) { - if (declaration.kind === 185 /* InterfaceDeclaration */ && declaration.baseTypes) { + if (declaration.kind === 188 /* InterfaceDeclaration */ && declaration.baseTypes) { ts.forEach(declaration.baseTypes, function (node) { var baseType = getTypeFromTypeReferenceNode(node); if (baseType !== unknownType) { @@ -10367,7 +10517,7 @@ var ts; var links = getSymbolLinks(symbol); if (!links.declaredType) { links.declaredType = resolvingType; - var declaration = getDeclarationOfKind(symbol, 186 /* TypeAliasDeclaration */); + var declaration = getDeclarationOfKind(symbol, 189 /* TypeAliasDeclaration */); var type = getTypeFromTypeNode(declaration.type); if (links.declaredType === resolvingType) { links.declaredType = type; @@ -10375,7 +10525,7 @@ var ts; } else if (links.declaredType === resolvingType) { links.declaredType = unknownType; - var declaration = getDeclarationOfKind(symbol, 186 /* TypeAliasDeclaration */); + var declaration = getDeclarationOfKind(symbol, 189 /* TypeAliasDeclaration */); error(declaration.name, ts.Diagnostics.Type_alias_0_circularly_references_itself, symbolToString(symbol)); } return links.declaredType; @@ -10844,7 +10994,9 @@ var ts; for (var i = 0, len = symbol.declarations.length; i < len; i++) { var node = symbol.declarations[i]; switch (node.kind) { - case 182 /* FunctionDeclaration */: + case 133 /* FunctionType */: + case 134 /* ConstructorType */: + case 185 /* FunctionDeclaration */: case 125 /* Method */: case 126 /* Constructor */: case 129 /* CallSignature */: @@ -10852,8 +11004,8 @@ var ts; case 131 /* IndexSignature */: case 127 /* GetAccessor */: case 128 /* SetAccessor */: - case 149 /* FunctionExpression */: - case 150 /* ArrowFunction */: + case 152 /* FunctionExpression */: + case 153 /* ArrowFunction */: if (i > 0 && node.body) { var previous = symbol.declarations[i - 1]; if (node.parent === previous.parent && node.kind === previous.kind && node.pos === previous.end) { @@ -10886,7 +11038,7 @@ var ts; if (compilerOptions.noImplicitAny) { var declaration = signature.declaration; if (declaration.name) { - error(declaration.name, ts.Diagnostics._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions, ts.identifierToString(declaration.name)); + error(declaration.name, ts.Diagnostics._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions, ts.declarationNameToString(declaration.name)); } else { error(declaration, ts.Diagnostics.Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions); @@ -11074,9 +11226,9 @@ var ts; for (var i = 0; i < declarations.length; i++) { var declaration = declarations[i]; switch (declaration.kind) { - case 184 /* ClassDeclaration */: - case 185 /* InterfaceDeclaration */: - case 187 /* EnumDeclaration */: + case 187 /* ClassDeclaration */: + case 188 /* InterfaceDeclaration */: + case 190 /* EnumDeclaration */: return declaration; } } @@ -11216,7 +11368,7 @@ var ts; } return links.resolvedType; } - function getTypeFromTypeLiteralNode(node) { + function getTypeFromTypeLiteralOrFunctionOrConstructorTypeNode(node) { var links = getNodeLinks(node); if (!links.resolvedType) { links.resolvedType = createObjectType(32768 /* Anonymous */, node.symbol); @@ -11253,18 +11405,20 @@ var ts; return getTypeFromStringLiteral(node); case 132 /* TypeReference */: return getTypeFromTypeReferenceNode(node); - case 133 /* TypeQuery */: + case 135 /* TypeQuery */: return getTypeFromTypeQueryNode(node); - case 135 /* ArrayType */: + case 137 /* ArrayType */: return getTypeFromArrayTypeNode(node); - case 136 /* TupleType */: + case 138 /* TupleType */: return getTypeFromTupleTypeNode(node); - case 137 /* UnionType */: + case 139 /* UnionType */: return getTypeFromUnionTypeNode(node); - case 138 /* ParenType */: + case 140 /* ParenType */: return getTypeFromTypeNode(node.type); - case 134 /* TypeLiteral */: - return getTypeFromTypeLiteralNode(node); + case 133 /* FunctionType */: + case 134 /* ConstructorType */: + case 136 /* TypeLiteral */: + return getTypeFromTypeLiteralOrFunctionOrConstructorTypeNode(node); case 63 /* Identifier */: case 121 /* QualifiedName */: var symbol = getSymbolInfo(node); @@ -11411,16 +11565,16 @@ var ts; } function isContextSensitiveExpression(node) { switch (node.kind) { - case 149 /* FunctionExpression */: - case 150 /* ArrowFunction */: + case 152 /* FunctionExpression */: + case 153 /* ArrowFunction */: return !node.typeParameters && !ts.forEach(node.parameters, function (p) { return p.type; }); - case 140 /* ObjectLiteral */: - return ts.forEach(node.properties, function (p) { return p.kind === 141 /* PropertyAssignment */ && isContextSensitiveExpression(p.initializer); }); - case 139 /* ArrayLiteral */: + case 142 /* ObjectLiteral */: + return ts.forEach(node.properties, function (p) { return p.kind === 143 /* PropertyAssignment */ && isContextSensitiveExpression(p.initializer); }); + case 141 /* ArrayLiteral */: return ts.forEach(node.elements, function (e) { return isContextSensitiveExpression(e); }); - case 154 /* ConditionalExpression */: + case 157 /* ConditionalExpression */: return isContextSensitiveExpression(node.whenTrue) || isContextSensitiveExpression(node.whenFalse); - case 153 /* BinaryExpression */: + case 156 /* BinaryExpression */: return node.operator === 48 /* BarBarToken */ && (isContextSensitiveExpression(node.left) || isContextSensitiveExpression(node.right)); } return false; @@ -11469,6 +11623,7 @@ var ts; var errorInfo; var sourceStack; var targetStack; + var maybeStack; var expandingFlags; var depth = 0; var overflow = false; @@ -11613,11 +11768,11 @@ var ts; var id = source.id + "," + target.id; var related = relation[id]; if (related !== undefined) { - return related; + return related ? -1 /* True */ : 0 /* False */; } if (depth > 0) { for (var i = 0; i < depth; i++) { - if (source === sourceStack[i] && target === targetStack[i]) { + if (maybeStack[i][id]) { return 1 /* Maybe */; } } @@ -11629,10 +11784,13 @@ var ts; else { sourceStack = []; targetStack = []; + maybeStack = []; expandingFlags = 0; } sourceStack[depth] = source; targetStack[depth] = target; + maybeStack[depth] = {}; + maybeStack[depth][id] = true; depth++; var saveExpandingFlags = expandingFlags; if (!(expandingFlags & 1) && isDeeplyNestedGeneric(source, sourceStack)) @@ -11640,7 +11798,7 @@ var ts; if (!(expandingFlags & 2) && isDeeplyNestedGeneric(target, targetStack)) expandingFlags |= 2; if (expandingFlags === 3) { - var result = -1 /* True */; + var result = 1 /* Maybe */; } else { var result = propertiesRelatedTo(source, target, reportErrors); @@ -11659,8 +11817,15 @@ var ts; } expandingFlags = saveExpandingFlags; depth--; - if (result !== 1 /* Maybe */) { - relation[id] = result; + if (result) { + var maybeCache = maybeStack[depth]; + var destinationCache = result === -1 /* True */ || depth === 0 ? relation : maybeStack[depth - 1]; + for (var p in maybeCache) { + destinationCache[p] = maybeCache[p]; + } + } + else { + relation[id] = false; } return result; } @@ -12139,8 +12304,9 @@ var ts; } function createInferenceContext(typeParameters, inferUnionTypes) { var inferences = []; - for (var i = 0; i < typeParameters.length; i++) - inferences.push([]); + for (var i = 0; i < typeParameters.length; i++) { + inferences.push({ primary: undefined, secondary: undefined }); + } return { typeParameters: typeParameters, inferUnionTypes: inferUnionTypes, @@ -12153,6 +12319,7 @@ var ts; var sourceStack; var targetStack; var depth = 0; + var inferiority = 0; inferFromTypes(source, target); function isInProcess(source, target) { for (var i = 0; i < depth; i++) { @@ -12179,10 +12346,10 @@ var ts; var typeParameters = context.typeParameters; for (var i = 0; i < typeParameters.length; i++) { if (target === typeParameters[i]) { - context.inferenceCount++; var inferences = context.inferences[i]; - if (!ts.contains(inferences, source)) - inferences.push(source); + var candidates = inferiority ? inferences.secondary || (inferences.secondary = []) : inferences.primary || (inferences.primary = []); + if (!ts.contains(candidates, source)) + candidates.push(source); break; } } @@ -12196,7 +12363,6 @@ var ts; } else if (target.flags & 16384 /* Union */) { var targetTypes = target.types; - var startCount = context.inferenceCount; var typeParameterCount = 0; var typeParameter; for (var i = 0; i < targetTypes.length; i++) { @@ -12209,8 +12375,10 @@ var ts; inferFromTypes(source, t); } } - if (context.inferenceCount === startCount && typeParameterCount === 1) { + if (typeParameterCount === 1) { + inferiority++; inferFromTypes(source, typeParameter); + inferiority--; } } else if (source.flags & 16384 /* Union */) { @@ -12272,10 +12440,14 @@ var ts; } } } + function getInferenceCandidates(context, index) { + var inferences = context.inferences[index]; + return inferences.primary || inferences.secondary || emptyArray; + } function getInferredType(context, index) { var inferredType = context.inferredTypes[index]; if (!inferredType) { - var inferences = context.inferences[index]; + var inferences = getInferenceCandidates(context, index); if (inferences.length) { var unionOrSuperType = context.inferUnionTypes ? getUnionType(inferences) : getCommonSupertype(inferences); inferredType = unionOrSuperType ? getWidenedType(unionOrSuperType) : inferenceFailureType; @@ -12310,7 +12482,7 @@ var ts; function isInTypeQuery(node) { while (node) { switch (node.kind) { - case 133 /* TypeQuery */: + case 135 /* TypeQuery */: return true; case 63 /* Identifier */: case 121 /* QualifiedName */: @@ -12346,7 +12518,7 @@ var ts; function isAssignedInBinaryExpression(node) { if (node.operator >= 51 /* FirstAssignment */ && node.operator <= 62 /* LastAssignment */) { var n = node.left; - while (n.kind === 148 /* ParenExpression */) { + while (n.kind === 151 /* ParenExpression */) { n = n.expression; } if (n.kind === 63 /* Identifier */ && getResolvedSymbol(n) === symbol) { @@ -12363,40 +12535,40 @@ var ts; } function isAssignedIn(node) { switch (node.kind) { - case 153 /* BinaryExpression */: + case 156 /* BinaryExpression */: return isAssignedInBinaryExpression(node); - case 181 /* VariableDeclaration */: + case 184 /* VariableDeclaration */: return isAssignedInVariableDeclaration(node); - case 139 /* ArrayLiteral */: - case 140 /* ObjectLiteral */: - case 142 /* PropertyAccess */: - case 143 /* IndexedAccess */: - case 144 /* CallExpression */: - case 145 /* NewExpression */: - case 147 /* TypeAssertion */: - case 148 /* ParenExpression */: - case 151 /* PrefixOperator */: - case 152 /* PostfixOperator */: - case 154 /* ConditionalExpression */: - case 158 /* Block */: - case 159 /* VariableStatement */: - case 161 /* ExpressionStatement */: - case 162 /* IfStatement */: - case 163 /* DoStatement */: - case 164 /* WhileStatement */: - case 165 /* ForStatement */: - case 166 /* ForInStatement */: - case 169 /* ReturnStatement */: - case 170 /* WithStatement */: - case 171 /* SwitchStatement */: - case 172 /* CaseClause */: - case 173 /* DefaultClause */: - case 174 /* LabeledStatement */: - case 175 /* ThrowStatement */: - case 176 /* TryStatement */: - case 177 /* TryBlock */: - case 178 /* CatchBlock */: - case 179 /* FinallyBlock */: + case 141 /* ArrayLiteral */: + case 142 /* ObjectLiteral */: + case 145 /* PropertyAccess */: + case 146 /* IndexedAccess */: + case 147 /* CallExpression */: + case 148 /* NewExpression */: + case 150 /* TypeAssertion */: + case 151 /* ParenExpression */: + case 154 /* PrefixOperator */: + case 155 /* PostfixOperator */: + case 157 /* ConditionalExpression */: + case 161 /* Block */: + case 162 /* VariableStatement */: + case 164 /* ExpressionStatement */: + case 165 /* IfStatement */: + case 166 /* DoStatement */: + case 167 /* WhileStatement */: + case 168 /* ForStatement */: + case 169 /* ForInStatement */: + case 172 /* ReturnStatement */: + case 173 /* WithStatement */: + case 174 /* SwitchStatement */: + case 175 /* CaseClause */: + case 176 /* DefaultClause */: + case 177 /* LabeledStatement */: + case 178 /* ThrowStatement */: + case 179 /* TryStatement */: + case 180 /* TryBlock */: + case 181 /* CatchBlock */: + case 182 /* FinallyBlock */: return ts.forEachChild(node, isAssignedIn); } return false; @@ -12404,26 +12576,23 @@ var ts; } function getNarrowedTypeOfSymbol(symbol, node) { var type = getTypeOfSymbol(symbol); - if (symbol.flags & 3 /* Variable */ && type.flags & 65025 /* Structured */) { - while (true) { + if (node && (symbol.flags & 3 /* Variable */ && type.flags & 65025 /* Structured */)) { + loop: while (true) { var child = node; node = node.parent; - if (!node || node.kind === 183 /* FunctionBlock */ || node.kind === 189 /* ModuleBlock */) { - break; - } var narrowedType = type; switch (node.kind) { - case 162 /* IfStatement */: + case 165 /* IfStatement */: if (child !== node.expression) { narrowedType = narrowType(type, node.expression, child === node.thenStatement); } break; - case 154 /* ConditionalExpression */: + case 157 /* ConditionalExpression */: if (child !== node.condition) { narrowedType = narrowType(type, node.condition, child === node.whenTrue); } break; - case 153 /* BinaryExpression */: + case 156 /* BinaryExpression */: if (child === node.right) { if (node.operator === 47 /* AmpersandAmpersandToken */) { narrowedType = narrowType(type, node.left, true); @@ -12433,8 +12602,16 @@ var ts; } } break; + case 196 /* SourceFile */: + case 191 /* ModuleDeclaration */: + case 185 /* FunctionDeclaration */: + case 125 /* Method */: + case 127 /* GetAccessor */: + case 128 /* SetAccessor */: + case 126 /* Constructor */: + break loop; } - if (narrowedType !== type) { + if (narrowedType !== type && isTypeSubtypeOf(narrowedType, type)) { if (isVariableAssignedWithin(symbol, node)) { break; } @@ -12446,7 +12623,7 @@ var ts; function narrowTypeByEquality(type, expr, assumeTrue) { var left = expr.left; var right = expr.right; - if (left.kind !== 151 /* PrefixOperator */ || left.operator !== 95 /* TypeOfKeyword */ || left.operand.kind !== 63 /* Identifier */ || right.kind !== 7 /* StringLiteral */ || getResolvedSymbol(left.operand) !== symbol) { + if (left.kind !== 154 /* PrefixOperator */ || left.operator !== 95 /* TypeOfKeyword */ || left.operand.kind !== 63 /* Identifier */ || right.kind !== 7 /* StringLiteral */ || getResolvedSymbol(left.operand) !== symbol) { return type; } var t = right.text; @@ -12500,9 +12677,9 @@ var ts; } function narrowType(type, expr, assumeTrue) { switch (expr.kind) { - case 148 /* ParenExpression */: + case 151 /* ParenExpression */: return narrowType(type, expr.expression, assumeTrue); - case 153 /* BinaryExpression */: + case 156 /* BinaryExpression */: var operator = expr.operator; if (operator === 29 /* EqualsEqualsEqualsToken */ || operator === 30 /* ExclamationEqualsEqualsToken */) { return narrowTypeByEquality(type, expr, assumeTrue); @@ -12517,7 +12694,7 @@ var ts; return narrowTypeByInstanceof(type, expr, assumeTrue); } break; - case 151 /* PrefixOperator */: + case 154 /* PrefixOperator */: if (expr.operator === 45 /* ExclamationToken */) { return narrowType(type, expr.operand, !assumeTrue); } @@ -12529,7 +12706,7 @@ var ts; function checkIdentifier(node) { var symbol = getResolvedSymbol(node); if (symbol.flags & 33554432 /* Import */) { - getSymbolLinks(symbol).referenced = !isInTypeQuery(node) && !isConstEnumOrConstEnumOnlyModule(resolveImport(symbol)); + getSymbolLinks(symbol).referenced = getSymbolLinks(symbol).referenced || (!isInTypeQuery(node) && !isConstEnumOrConstEnumOnlyModule(resolveImport(symbol))); } checkCollisionWithCapturedSuperVariable(node, node); checkCollisionWithCapturedThisVariable(node, node); @@ -12537,7 +12714,7 @@ var ts; return getNarrowedTypeOfSymbol(getExportSymbolOfValueSymbolIfExported(symbol), node); } function captureLexicalThis(node, container) { - var classNode = container.parent && container.parent.kind === 184 /* ClassDeclaration */ ? container.parent : undefined; + var classNode = container.parent && container.parent.kind === 187 /* ClassDeclaration */ ? container.parent : undefined; getNodeLinks(node).flags |= 2 /* LexicalThis */; if (container.kind === 124 /* Property */ || container.kind === 126 /* Constructor */) { getNodeLinks(classNode).flags |= 4 /* CaptureThis */; @@ -12549,15 +12726,15 @@ var ts; function checkThisExpression(node) { var container = ts.getThisContainer(node, true); var needToCaptureLexicalThis = false; - if (container.kind === 150 /* ArrowFunction */) { + if (container.kind === 153 /* ArrowFunction */) { container = ts.getThisContainer(container, false); needToCaptureLexicalThis = true; } switch (container.kind) { - case 188 /* ModuleDeclaration */: + case 191 /* ModuleDeclaration */: error(node, ts.Diagnostics.this_cannot_be_referenced_in_a_module_body); break; - case 187 /* EnumDeclaration */: + case 190 /* EnumDeclaration */: error(node, ts.Diagnostics.this_cannot_be_referenced_in_current_location); break; case 126 /* Constructor */: @@ -12574,7 +12751,7 @@ var ts; if (needToCaptureLexicalThis) { captureLexicalThis(node, container); } - var classNode = container.parent && container.parent.kind === 184 /* ClassDeclaration */ ? container.parent : undefined; + var classNode = container.parent && container.parent.kind === 187 /* ClassDeclaration */ ? container.parent : undefined; if (classNode) { var symbol = getSymbolOfNode(classNode); return container.flags & 128 /* Static */ ? getTypeOfSymbol(symbol) : getDeclaredTypeOfSymbol(symbol); @@ -12587,9 +12764,9 @@ var ts; if (!node) return node; switch (node.kind) { - case 182 /* FunctionDeclaration */: - case 149 /* FunctionExpression */: - case 150 /* ArrowFunction */: + case 185 /* FunctionDeclaration */: + case 152 /* FunctionExpression */: + case 153 /* ArrowFunction */: case 124 /* Property */: case 125 /* Method */: case 126 /* Constructor */: @@ -12608,8 +12785,8 @@ var ts; return false; } function checkSuperExpression(node) { - var isCallExpression = node.parent.kind === 144 /* CallExpression */ && node.parent.func === node; - var enclosingClass = ts.getAncestor(node, 184 /* ClassDeclaration */); + var isCallExpression = node.parent.kind === 147 /* CallExpression */ && node.parent.func === node; + var enclosingClass = ts.getAncestor(node, 187 /* ClassDeclaration */); var baseClass; if (enclosingClass && enclosingClass.baseType) { var classType = getDeclaredTypeOfSymbol(getSymbolOfNode(enclosingClass)); @@ -12627,11 +12804,11 @@ var ts; } else { var needToCaptureLexicalThis = false; - while (container && container.kind === 150 /* ArrowFunction */) { + while (container && container.kind === 153 /* ArrowFunction */) { container = getSuperContainer(container); needToCaptureLexicalThis = true; } - if (container && container.parent && container.parent.kind === 184 /* ClassDeclaration */) { + if (container && container.parent && container.parent.kind === 187 /* ClassDeclaration */) { if (container.flags & 128 /* Static */) { canUseSuperExpression = container.kind === 125 /* Method */ || container.kind === 127 /* GetAccessor */ || container.kind === 128 /* SetAccessor */; } @@ -12670,7 +12847,7 @@ var ts; } function getContextuallyTypedParameterType(parameter) { var func = parameter.parent; - if (func.kind === 149 /* FunctionExpression */ || func.kind === 150 /* ArrowFunction */) { + if (func.kind === 152 /* FunctionExpression */ || func.kind === 153 /* ArrowFunction */) { if (isContextSensitiveExpression(func)) { var contextualSignature = getContextualSignature(func); if (contextualSignature) { @@ -12809,25 +12986,25 @@ var ts; } var parent = node.parent; switch (parent.kind) { - case 181 /* VariableDeclaration */: + case 184 /* VariableDeclaration */: case 123 /* Parameter */: case 124 /* Property */: return getContextualTypeForInitializerExpression(node); - case 150 /* ArrowFunction */: - case 169 /* ReturnStatement */: + case 153 /* ArrowFunction */: + case 172 /* ReturnStatement */: return getContextualTypeForReturnExpression(node); - case 144 /* CallExpression */: - case 145 /* NewExpression */: + case 147 /* CallExpression */: + case 148 /* NewExpression */: return getContextualTypeForArgument(node); - case 147 /* TypeAssertion */: + case 150 /* TypeAssertion */: return getTypeFromTypeNode(parent.type); - case 153 /* BinaryExpression */: + case 156 /* BinaryExpression */: return getContextualTypeForBinaryOperand(node); - case 141 /* PropertyAssignment */: + case 143 /* PropertyAssignment */: return getContextualTypeForPropertyExpression(node); - case 139 /* ArrayLiteral */: + case 141 /* ArrayLiteral */: return getContextualTypeForElementExpression(node); - case 154 /* ConditionalExpression */: + case 157 /* ConditionalExpression */: return getContextualTypeForConditionalOperand(node); } return undefined; @@ -12849,19 +13026,31 @@ var ts; if (!(type.flags & 16384 /* Union */)) { return getNonGenericSignature(type); } - var result; + var signatureList; var types = type.types; for (var i = 0; i < types.length; i++) { + if (signatureList && getSignaturesOfObjectOrUnionType(types[i], 0 /* Call */).length > 1) { + return undefined; + } var signature = getNonGenericSignature(types[i]); if (signature) { - if (!result) { - result = signature; + if (!signatureList) { + signatureList = [signature]; } - else if (!compareSignatures(result, signature, true, compareTypes)) { + else if (!compareSignatures(signatureList[0], signature, false, compareTypes)) { return undefined; } + else { + signatureList.push(signature); + } } } + var result; + if (signatureList) { + result = cloneSignature(signatureList[0]); + result.resolvedReturnType = undefined; + result.unionSignatures = signatureList; + } return result; } function isInferentialContext(mapper) { @@ -12890,7 +13079,15 @@ var ts; if (ts.hasProperty(members, id)) { var member = members[id]; if (member.flags & 4 /* Property */) { - var type = checkExpression(member.declarations[0].initializer, contextualMapper); + var memberDecl = member.declarations[0]; + var type; + if (memberDecl.kind === 143 /* PropertyAssignment */) { + type = checkExpression(memberDecl.initializer, contextualMapper); + } + else { + ts.Debug.assert(memberDecl.kind === 144 /* ShorthandPropertyAssignment */); + type = checkExpression(memberDecl.name, contextualMapper); + } var prop = createSymbol(4 /* Property */ | 268435456 /* Transient */ | member.flags, member.name); prop.declarations = member.declarations; prop.parent = member.parent; @@ -12945,7 +13142,7 @@ var ts; if (!(flags & (32 /* Private */ | 64 /* Protected */))) { return; } - var enclosingClassDeclaration = ts.getAncestor(node, 184 /* ClassDeclaration */); + var enclosingClassDeclaration = ts.getAncestor(node, 187 /* ClassDeclaration */); var enclosingClass = enclosingClassDeclaration ? getDeclaredTypeOfSymbol(getSymbolOfNode(enclosingClassDeclaration)) : undefined; var declaringClass = getDeclaredTypeOfSymbol(prop.parent); if (flags & 32 /* Private */) { @@ -12980,7 +13177,7 @@ var ts; var prop = getPropertyOfType(apparentType, node.right.text); if (!prop) { if (node.right.text) { - error(node.right, ts.Diagnostics.Property_0_does_not_exist_on_type_1, ts.identifierToString(node.right), typeToString(type)); + error(node.right, ts.Diagnostics.Property_0_does_not_exist_on_type_1, ts.declarationNameToString(node.right), typeToString(type)); } return unknownType; } @@ -13050,29 +13247,64 @@ var ts; return unknownType; } function resolveUntypedCall(node) { - ts.forEach(node.arguments, function (argument) { - checkExpression(argument); - }); + if (node.kind === 149 /* TaggedTemplateExpression */) { + checkExpression(node.template); + } + else { + ts.forEach(node.arguments, function (argument) { + checkExpression(argument); + }); + } return anySignature; } function resolveErrorCall(node) { resolveUntypedCall(node); return unknownSignature; } - function signatureHasCorrectArity(node, signature) { - if (!node.arguments) { - return signature.minArgumentCount === 0; + function hasCorrectArity(node, args, signature) { + var adjustedArgCount; + var typeArguments; + var callIsIncomplete; + if (node.kind === 149 /* TaggedTemplateExpression */) { + var tagExpression = node; + adjustedArgCount = args.length; + typeArguments = undefined; + if (tagExpression.template.kind === 158 /* TemplateExpression */) { + var templateExpression = tagExpression.template; + var lastSpan = ts.lastOrUndefined(templateExpression.templateSpans); + ts.Debug.assert(lastSpan !== undefined); + callIsIncomplete = lastSpan.literal.kind === 120 /* Missing */ || ts.isUnterminatedTemplateEnd(lastSpan.literal); + } + else { + var templateLiteral = tagExpression.template; + ts.Debug.assert(templateLiteral.kind === 9 /* NoSubstitutionTemplateLiteral */); + callIsIncomplete = ts.isUnterminatedTemplateEnd(templateLiteral); + } } - var args = node.arguments; - var numberOfArgs = args.hasTrailingComma ? args.length + 1 : args.length; - var hasTooManyArguments = !signature.hasRestParameter && numberOfArgs > signature.parameters.length; - var hasRightNumberOfTypeArguments = !node.typeArguments || (signature.typeParameters && node.typeArguments.length === signature.typeParameters.length); - if (hasTooManyArguments || !hasRightNumberOfTypeArguments) { - return false; + else { + var callExpression = node; + if (!callExpression.arguments) { + ts.Debug.assert(callExpression.kind === 148 /* NewExpression */); + return signature.minArgumentCount === 0; + } + adjustedArgCount = callExpression.arguments.hasTrailingComma ? args.length + 1 : args.length; + callIsIncomplete = callExpression.arguments.end === callExpression.end; + typeArguments = callExpression.typeArguments; + } + ts.Debug.assert(adjustedArgCount !== undefined, "'adjustedArgCount' undefined"); + ts.Debug.assert(callIsIncomplete !== undefined, "'callIsIncomplete' undefined"); + return checkArity(adjustedArgCount, typeArguments, callIsIncomplete, signature); + function checkArity(adjustedArgCount, typeArguments, callIsIncomplete, signature) { + if (!signature.hasRestParameter && adjustedArgCount > signature.parameters.length) { + return false; + } + var hasRightNumberOfTypeArgs = !typeArguments || (signature.typeParameters && typeArguments.length === signature.typeParameters.length); + if (!hasRightNumberOfTypeArgs) { + return false; + } + var hasEnoughArguments = adjustedArgCount >= signature.minArgumentCount; + return callIsIncomplete || hasEnoughArguments; } - var callIsIncomplete = args.end === node.end; - var hasEnoughArguments = numberOfArgs >= signature.minArgumentCount; - return callIsIncomplete || hasEnoughArguments; } function getSingleCallSignature(type) { if (type.flags & 48128 /* ObjectType */) { @@ -13095,17 +13327,21 @@ var ts; var context = createInferenceContext(typeParameters, false); var mapper = createInferenceMapper(context); for (var i = 0; i < args.length; i++) { - if (args[i].kind === 157 /* OmittedExpression */) { + if (args[i].kind === 160 /* OmittedExpression */) { continue; } if (!excludeArgument || excludeArgument[i] === undefined) { var parameterType = getTypeAtPosition(signature, i); + if (i === 0 && args[i].parent.kind === 149 /* TaggedTemplateExpression */) { + inferTypes(context, globalTemplateStringsArrayType, parameterType); + continue; + } inferTypes(context, checkExpressionWithContextualType(args[i], parameterType, mapper), parameterType); } } if (excludeArgument) { for (var i = 0; i < args.length; i++) { - if (args[i].kind === 157 /* OmittedExpression */) { + if (args[i].kind === 160 /* OmittedExpression */) { continue; } if (excludeArgument[i] === false) { @@ -13139,37 +13375,60 @@ var ts; } return typeArgumentsAreAssignable; } - function checkApplicableSignature(node, signature, relation, excludeArgument, reportErrors) { - if (node.arguments) { - for (var i = 0; i < node.arguments.length; i++) { - var arg = node.arguments[i]; - if (arg.kind === 157 /* OmittedExpression */) { - continue; - } - var paramType = getTypeAtPosition(signature, i); - var argType = arg.kind === 7 /* StringLiteral */ && !reportErrors ? getStringLiteralType(arg) : checkExpressionWithContextualType(arg, paramType, excludeArgument && excludeArgument[i] ? identityMapper : undefined); - var isValidArgument = checkTypeRelatedTo(argType, paramType, relation, reportErrors ? arg : undefined, ts.Diagnostics.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1); - if (!isValidArgument) { - return false; - } + function checkApplicableSignature(node, args, signature, relation, excludeArgument, reportErrors) { + for (var i = 0; i < args.length; i++) { + var arg = args[i]; + var argType; + if (arg.kind === 160 /* OmittedExpression */) { + continue; + } + var paramType = getTypeAtPosition(signature, i); + if (i === 0 && node.kind === 149 /* TaggedTemplateExpression */) { + argType = globalTemplateStringsArrayType; + } + else { + argType = arg.kind === 7 /* StringLiteral */ && !reportErrors ? getStringLiteralType(arg) : checkExpressionWithContextualType(arg, paramType, excludeArgument && excludeArgument[i] ? identityMapper : undefined); + } + var isValidArgument = checkTypeRelatedTo(argType, paramType, relation, reportErrors ? arg : undefined, ts.Diagnostics.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1); + if (!isValidArgument) { + return false; } } return true; } + function getEffectiveCallArguments(node) { + var args; + if (node.kind === 149 /* TaggedTemplateExpression */) { + var template = node.template; + args = [template]; + if (template.kind === 158 /* TemplateExpression */) { + ts.forEach(template.templateSpans, function (span) { + args.push(span.expression); + }); + } + } + else { + args = node.arguments || emptyArray; + } + return args; + } function resolveCall(node, signatures, candidatesOutArray) { - ts.forEach(node.typeArguments, checkSourceElement); + var isTaggedTemplate = node.kind === 149 /* TaggedTemplateExpression */; + var typeArguments = isTaggedTemplate ? undefined : node.typeArguments; + ts.forEach(typeArguments, checkSourceElement); var candidates = candidatesOutArray || []; collectCandidates(); if (!candidates.length) { error(node, ts.Diagnostics.Supplied_parameters_do_not_match_any_signature_of_call_target); return resolveErrorCall(node); } - var args = node.arguments || emptyArray; + var args = getEffectiveCallArguments(node); var excludeArgument; - for (var i = 0; i < args.length; i++) { + for (var i = isTaggedTemplate ? 1 : 0; i < args.length; i++) { if (isContextSensitiveExpression(args[i])) { - if (!excludeArgument) + if (!excludeArgument) { excludeArgument = new Array(args.length); + } excludeArgument[i] = true; } } @@ -13178,30 +13437,30 @@ var ts; var resultOfFailedInference; var result; if (candidates.length > 1) { - result = chooseOverload(candidates, subtypeRelation, excludeArgument); + result = chooseOverload(candidates, subtypeRelation); } if (!result) { candidateForArgumentError = undefined; candidateForTypeArgumentError = undefined; resultOfFailedInference = undefined; - result = chooseOverload(candidates, assignableRelation, excludeArgument); + result = chooseOverload(candidates, assignableRelation); } if (result) { return result; } if (candidateForArgumentError) { - checkApplicableSignature(node, candidateForArgumentError, assignableRelation, undefined, true); + checkApplicableSignature(node, args, candidateForArgumentError, assignableRelation, undefined, true); } else if (candidateForTypeArgumentError) { - if (node.typeArguments) { + if (!isTaggedTemplate && node.typeArguments) { checkTypeArguments(candidateForTypeArgumentError, node.typeArguments, [], true); } else { ts.Debug.assert(resultOfFailedInference.failedTypeParameterIndex >= 0); var failedTypeParameter = candidateForTypeArgumentError.typeParameters[resultOfFailedInference.failedTypeParameterIndex]; - var inferenceCandidates = resultOfFailedInference.inferences[resultOfFailedInference.failedTypeParameterIndex]; + var inferenceCandidates = getInferenceCandidates(resultOfFailedInference, resultOfFailedInference.failedTypeParameterIndex); var diagnosticChainHead = ts.chainDiagnosticMessages(undefined, ts.Diagnostics.The_type_argument_for_type_parameter_0_cannot_be_inferred_from_the_usage_Consider_specifying_the_type_arguments_explicitly, typeToString(failedTypeParameter)); - reportNoCommonSupertypeError(inferenceCandidates, node.func, diagnosticChainHead); + reportNoCommonSupertypeError(inferenceCandidates, node.func || node.tag, diagnosticChainHead); } } else { @@ -13209,15 +13468,15 @@ var ts; } if (!fullTypeCheck) { for (var i = 0, n = candidates.length; i < n; i++) { - if (signatureHasCorrectArity(node, candidates[i])) { + if (hasCorrectArity(node, args, candidates[i])) { return candidates[i]; } } } return resolveErrorCall(node); - function chooseOverload(candidates, relation, excludeArgument) { + function chooseOverload(candidates, relation) { for (var i = 0; i < candidates.length; i++) { - if (!signatureHasCorrectArity(node, candidates[i])) { + if (!hasCorrectArity(node, args, candidates[i])) { continue; } var originalCandidate = candidates[i]; @@ -13227,9 +13486,9 @@ var ts; if (candidate.typeParameters) { var typeArgumentTypes; var typeArgumentsAreValid; - if (node.typeArguments) { + if (typeArguments) { typeArgumentTypes = new Array(candidate.typeParameters.length); - typeArgumentsAreValid = checkTypeArguments(candidate, node.typeArguments, typeArgumentTypes, false); + typeArgumentsAreValid = checkTypeArguments(candidate, typeArguments, typeArgumentTypes, false); } else { inferenceResult = inferTypeArguments(candidate, args, excludeArgument); @@ -13241,7 +13500,7 @@ var ts; } candidate = getSignatureInstantiation(candidate, typeArgumentTypes); } - if (!checkApplicableSignature(node, candidate, relation, excludeArgument, false)) { + if (!checkApplicableSignature(node, args, candidate, relation, excludeArgument, false)) { break; } var index = excludeArgument ? ts.indexOf(excludeArgument, true) : -1; @@ -13257,7 +13516,7 @@ var ts; } else { candidateForTypeArgumentError = originalCandidate; - if (!node.typeArguments) { + if (!typeArguments) { resultOfFailedInference = inferenceResult; } } @@ -13360,11 +13619,38 @@ var ts; error(node, ts.Diagnostics.Cannot_use_new_with_an_expression_whose_type_lacks_a_call_or_construct_signature); return resolveErrorCall(node); } + function resolveTaggedTemplateExpression(node, candidatesOutArray) { + var tagType = checkExpression(node.tag); + var apparentType = getApparentType(tagType); + if (apparentType === unknownType) { + return resolveErrorCall(node); + } + var callSignatures = getSignaturesOfType(apparentType, 0 /* Call */); + if (tagType === anyType || (!callSignatures.length && !(tagType.flags & 16384 /* Union */) && isTypeAssignableTo(tagType, globalFunctionType))) { + return resolveUntypedCall(node); + } + if (!callSignatures.length) { + error(node, ts.Diagnostics.Cannot_invoke_an_expression_whose_type_lacks_a_call_signature); + return resolveErrorCall(node); + } + return resolveCall(node, callSignatures, candidatesOutArray); + } function getResolvedSignature(node, candidatesOutArray) { var links = getNodeLinks(node); if (!links.resolvedSignature || candidatesOutArray) { links.resolvedSignature = anySignature; - links.resolvedSignature = node.kind === 144 /* CallExpression */ ? resolveCallExpression(node, candidatesOutArray) : resolveNewExpression(node, candidatesOutArray); + if (node.kind === 147 /* CallExpression */) { + links.resolvedSignature = resolveCallExpression(node, candidatesOutArray); + } + else if (node.kind === 148 /* NewExpression */) { + links.resolvedSignature = resolveNewExpression(node, candidatesOutArray); + } + else if (node.kind === 149 /* TaggedTemplateExpression */) { + links.resolvedSignature = resolveTaggedTemplateExpression(node, candidatesOutArray); + } + else { + ts.Debug.fail("Branch in 'getResolvedSignature' should be unreachable."); + } } return links.resolvedSignature; } @@ -13373,9 +13659,9 @@ var ts; if (node.func.kind === 89 /* SuperKeyword */) { return voidType; } - if (node.kind === 145 /* NewExpression */) { + if (node.kind === 148 /* NewExpression */) { var declaration = signature.declaration; - if (declaration && (declaration.kind !== 126 /* Constructor */ && declaration.kind !== 130 /* ConstructSignature */)) { + if (declaration && declaration.kind !== 126 /* Constructor */ && declaration.kind !== 130 /* ConstructSignature */ && declaration.kind !== 134 /* ConstructorType */) { if (compilerOptions.noImplicitAny) { error(node, ts.Diagnostics.new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type); } @@ -13385,9 +13671,7 @@ var ts; return getReturnTypeOfSignature(signature); } function checkTaggedTemplateExpression(node) { - checkExpression(node.tag); - checkExpression(node.template); - return anyType; + return getReturnTypeOfSignature(getResolvedSignature(node)); } function checkTypeAssertion(node) { var exprType = checkExpression(node.operand); @@ -13418,7 +13702,7 @@ var ts; } function getReturnTypeFromBody(func, contextualMapper) { var contextualSignature = getContextualSignature(func); - if (func.body.kind !== 183 /* FunctionBlock */) { + if (func.body.kind !== 186 /* FunctionBlock */) { var unwidenedType = checkAndMarkExpression(func.body, contextualMapper); var widenedType = getWidenedType(unwidenedType); if (fullTypeCheck && compilerOptions.noImplicitAny && !contextualSignature && widenedType !== unwidenedType && getInnermostTypeOfNestedArrayTypes(widenedType) === anyType) { @@ -13437,7 +13721,7 @@ var ts; if (fullTypeCheck && compilerOptions.noImplicitAny && !contextualSignature && widenedType !== commonType && getInnermostTypeOfNestedArrayTypes(widenedType) === anyType) { var typeName = typeToString(widenedType); if (func.name) { - error(func, ts.Diagnostics._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type, ts.identifierToString(func.name), typeName); + error(func, ts.Diagnostics._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type, ts.declarationNameToString(func.name), typeName); } else { error(func, ts.Diagnostics.Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type, typeName); @@ -13466,7 +13750,7 @@ var ts; }); } function bodyContainsSingleThrowStatement(body) { - return (body.statements.length === 1) && (body.statements[0].kind === 175 /* ThrowStatement */); + return (body.statements.length === 1) && (body.statements[0].kind === 178 /* ThrowStatement */); } function checkIfNonVoidFunctionHasReturnExpressionsOrSingleThrowStatment(func, returnType) { if (!fullTypeCheck) { @@ -13475,7 +13759,7 @@ var ts; if (returnType === voidType || returnType === anyType) { return; } - if (!func.body || func.body.kind !== 183 /* FunctionBlock */) { + if (!func.body || func.body.kind !== 186 /* FunctionBlock */) { return; } var bodyBlock = func.body; @@ -13519,7 +13803,7 @@ var ts; if (node.type) { checkIfNonVoidFunctionHasReturnExpressionsOrSingleThrowStatment(node, getTypeFromTypeNode(node.type)); } - if (node.body.kind === 183 /* FunctionBlock */) { + if (node.body.kind === 186 /* FunctionBlock */) { checkSourceElement(node.body); } else { @@ -13547,12 +13831,12 @@ var ts; case 63 /* Identifier */: var symbol = findSymbol(n); return !symbol || symbol === unknownSymbol || symbol === argumentsSymbol || (symbol.flags & 3 /* Variable */) !== 0; - case 142 /* PropertyAccess */: + case 145 /* PropertyAccess */: var symbol = findSymbol(n); return !symbol || symbol === unknownSymbol || (symbol.flags & ~8 /* EnumMember */) !== 0; - case 143 /* IndexedAccess */: + case 146 /* IndexedAccess */: return true; - case 148 /* ParenExpression */: + case 151 /* ParenExpression */: return isReferenceOrErrorExpression(n.expression); default: return false; @@ -13561,10 +13845,10 @@ var ts; function isConstVariableReference(n) { switch (n.kind) { case 63 /* Identifier */: - case 142 /* PropertyAccess */: + case 145 /* PropertyAccess */: var symbol = findSymbol(n); return symbol && (symbol.flags & 3 /* Variable */) !== 0 && (getDeclarationFlagsFromSymbol(symbol) & 4096 /* Const */) !== 0; - case 143 /* IndexedAccess */: + case 146 /* IndexedAccess */: var index = n.index; var symbol = findSymbol(n.object); if (symbol && index.kind === 7 /* StringLiteral */) { @@ -13573,7 +13857,7 @@ var ts; return prop && (prop.flags & 3 /* Variable */) !== 0 && (getDeclarationFlagsFromSymbol(prop) & 4096 /* Const */) !== 0; } return false; - case 148 /* ParenExpression */: + case 151 /* ParenExpression */: return isConstVariableReference(n.expression); default: return false; @@ -13808,7 +14092,7 @@ var ts; } } if (isConstEnumObjectType(type)) { - var ok = (node.parent.kind === 142 /* PropertyAccess */ && node.parent.left === node) || (node.parent.kind === 143 /* IndexedAccess */ && node.parent.object === node) || ((node.kind === 63 /* Identifier */ || node.kind === 121 /* QualifiedName */) && isInRightSideOfImportOrExportAssignment(node)); + var ok = (node.parent.kind === 145 /* PropertyAccess */ && node.parent.left === node) || (node.parent.kind === 146 /* IndexedAccess */ && node.parent.object === node) || ((node.kind === 63 /* Identifier */ || node.kind === 121 /* QualifiedName */) && isInRightSideOfImportOrExportAssignment(node)); if (!ok) { error(node, ts.Diagnostics.const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment); } @@ -13830,7 +14114,7 @@ var ts; return booleanType; case 6 /* NumericLiteral */: return numberType; - case 155 /* TemplateExpression */: + case 158 /* TemplateExpression */: return checkTemplateExpression(node); case 7 /* StringLiteral */: case 9 /* NoSubstitutionTemplateLiteral */: @@ -13839,35 +14123,35 @@ var ts; return globalRegExpType; case 121 /* QualifiedName */: return checkPropertyAccess(node); - case 139 /* ArrayLiteral */: + case 141 /* ArrayLiteral */: return checkArrayLiteral(node, contextualMapper); - case 140 /* ObjectLiteral */: + case 142 /* ObjectLiteral */: return checkObjectLiteral(node, contextualMapper); - case 142 /* PropertyAccess */: + case 145 /* PropertyAccess */: return checkPropertyAccess(node); - case 143 /* IndexedAccess */: + case 146 /* IndexedAccess */: return checkIndexedAccess(node); - case 144 /* CallExpression */: - case 145 /* NewExpression */: + case 147 /* CallExpression */: + case 148 /* NewExpression */: return checkCallExpression(node); - case 146 /* TaggedTemplateExpression */: + case 149 /* TaggedTemplateExpression */: return checkTaggedTemplateExpression(node); - case 147 /* TypeAssertion */: + case 150 /* TypeAssertion */: return checkTypeAssertion(node); - case 148 /* ParenExpression */: + case 151 /* ParenExpression */: return checkExpression(node.expression); - case 149 /* FunctionExpression */: - case 150 /* ArrowFunction */: + case 152 /* FunctionExpression */: + case 153 /* ArrowFunction */: return checkFunctionExpression(node, contextualMapper); - case 151 /* PrefixOperator */: + case 154 /* PrefixOperator */: return checkPrefixExpression(node); - case 152 /* PostfixOperator */: + case 155 /* PostfixOperator */: return checkPostfixExpression(node); - case 153 /* BinaryExpression */: + case 156 /* BinaryExpression */: return checkBinaryExpression(node, contextualMapper); - case 154 /* ConditionalExpression */: + case 157 /* ConditionalExpression */: return checkConditionalExpression(node, contextualMapper); - case 157 /* OmittedExpression */: + case 160 /* OmittedExpression */: return undefinedType; } return unknownType; @@ -13903,7 +14187,7 @@ var ts; if (referencedSymbol && referencedSymbol !== unknownSymbol && getSymbol(parameterDeclaration.parent.locals, referencedSymbol.name, 107455 /* Value */) === referencedSymbol) { if (referencedSymbol.valueDeclaration.kind === 123 /* Parameter */) { if (referencedSymbol.valueDeclaration === parameterDeclaration) { - error(n, ts.Diagnostics.Parameter_0_cannot_be_referenced_in_its_initializer, ts.identifierToString(parameterDeclaration.name)); + error(n, ts.Diagnostics.Parameter_0_cannot_be_referenced_in_its_initializer, ts.declarationNameToString(parameterDeclaration.name)); return; } var enclosingOrReferencedParameter = ts.forEach(parameterDeclaration.parent.parameters, function (p) { return p === parameterDeclaration || p === referencedSymbol.valueDeclaration ? p : undefined; }); @@ -13911,7 +14195,7 @@ var ts; return; } } - error(n, ts.Diagnostics.Initializer_of_parameter_0_cannot_reference_identifier_1_declared_after_it, ts.identifierToString(parameterDeclaration.name), ts.identifierToString(n)); + error(n, ts.Diagnostics.Initializer_of_parameter_0_cannot_reference_identifier_1_declared_after_it, ts.declarationNameToString(parameterDeclaration.name), ts.declarationNameToString(n)); } } else { @@ -13947,7 +14231,7 @@ var ts; checkSpecializedSignatureDeclaration(node); } function checkTypeForDuplicateIndexSignatures(node) { - if (node.kind === 185 /* InterfaceDeclaration */) { + if (node.kind === 188 /* InterfaceDeclaration */) { var nodeSymbol = getSymbolOfNode(node); if (nodeSymbol.declarations.length > 0 && nodeSymbol.declarations[0] !== node) { return; @@ -14003,17 +14287,17 @@ var ts; return; } function isSuperCallExpression(n) { - return n.kind === 144 /* CallExpression */ && n.func.kind === 89 /* SuperKeyword */; + return n.kind === 147 /* CallExpression */ && n.func.kind === 89 /* SuperKeyword */; } function containsSuperCall(n) { if (isSuperCallExpression(n)) { return true; } switch (n.kind) { - case 149 /* FunctionExpression */: - case 182 /* FunctionDeclaration */: - case 150 /* ArrowFunction */: - case 140 /* ObjectLiteral */: return false; + case 152 /* FunctionExpression */: + case 185 /* FunctionDeclaration */: + case 153 /* ArrowFunction */: + case 142 /* ObjectLiteral */: return false; default: return ts.forEachChild(n, containsSuperCall); } } @@ -14021,7 +14305,7 @@ var ts; if (n.kind === 91 /* ThisKeyword */) { error(n, ts.Diagnostics.this_cannot_be_referenced_in_current_location); } - else if (n.kind !== 149 /* FunctionExpression */ && n.kind !== 182 /* FunctionDeclaration */) { + else if (n.kind !== 152 /* FunctionExpression */ && n.kind !== 185 /* FunctionDeclaration */) { ts.forEachChild(n, markThisReferencesAsErrors); } } @@ -14033,7 +14317,7 @@ var ts; var superCallShouldBeFirst = ts.forEach(node.parent.members, isInstancePropertyWithInitializer) || ts.forEach(node.parameters, function (p) { return p.flags & (16 /* Public */ | 32 /* Private */ | 64 /* Protected */); }); if (superCallShouldBeFirst) { var statements = node.body.statements; - if (!statements.length || statements[0].kind !== 161 /* ExpressionStatement */ || !isSuperCallExpression(statements[0].expression)) { + if (!statements.length || statements[0].kind !== 164 /* ExpressionStatement */ || !isSuperCallExpression(statements[0].expression)) { error(node, ts.Diagnostics.A_super_call_must_be_the_first_statement_in_the_constructor_when_a_class_contains_initialized_properties_or_has_parameter_properties); } else { @@ -14091,7 +14375,7 @@ var ts; function checkTypeLiteral(node) { ts.forEach(node.members, checkSourceElement); if (fullTypeCheck) { - var type = getTypeFromTypeLiteralNode(node); + var type = getTypeFromTypeLiteralOrFunctionOrConstructorTypeNode(node); checkIndexConstraints(type); checkTypeForDuplicateIndexSignatures(node); } @@ -14120,9 +14404,8 @@ var ts; error(signatureDeclarationNode, ts.Diagnostics.A_signature_with_an_implementation_cannot_use_a_string_literal_type); return; } - var symbol = getSymbolOfNode(signatureDeclarationNode); var signaturesToCheck; - if (!signatureDeclarationNode.name && signatureDeclarationNode.parent && signatureDeclarationNode.parent.kind === 185 /* InterfaceDeclaration */) { + if (!signatureDeclarationNode.name && signatureDeclarationNode.parent && signatureDeclarationNode.parent.kind === 188 /* InterfaceDeclaration */) { ts.Debug.assert(signatureDeclarationNode.kind === 129 /* CallSignature */ || signatureDeclarationNode.kind === 130 /* ConstructSignature */); var signatureKind = signatureDeclarationNode.kind === 129 /* CallSignature */ ? 0 /* Call */ : 1 /* Construct */; var containingSymbol = getSymbolOfNode(signatureDeclarationNode.parent); @@ -14142,7 +14425,7 @@ var ts; } function getEffectiveDeclarationFlags(n, flagsToCheck) { var flags = n.flags; - if (n.parent.kind !== 185 /* InterfaceDeclaration */ && ts.isInAmbientContext(n)) { + if (n.parent.kind !== 188 /* InterfaceDeclaration */ && ts.isInAmbientContext(n)) { if (!(flags & 2 /* Ambient */)) { flags |= 1 /* Export */; } @@ -14209,7 +14492,7 @@ var ts; return; } else if (subsequentNode.body) { - error(errorNode, ts.Diagnostics.Function_implementation_name_must_be_0, ts.identifierToString(node.name)); + error(errorNode, ts.Diagnostics.Function_implementation_name_must_be_0, ts.declarationNameToString(node.name)); return; } } @@ -14228,11 +14511,11 @@ var ts; for (var i = 0; i < declarations.length; i++) { var node = declarations[i]; var inAmbientContext = ts.isInAmbientContext(node); - var inAmbientContextOrInterface = node.parent.kind === 185 /* InterfaceDeclaration */ || node.parent.kind === 134 /* TypeLiteral */ || inAmbientContext; + var inAmbientContextOrInterface = node.parent.kind === 188 /* InterfaceDeclaration */ || node.parent.kind === 136 /* TypeLiteral */ || inAmbientContext; if (inAmbientContextOrInterface) { previousDeclaration = undefined; } - if (node.kind === 182 /* FunctionDeclaration */ || node.kind === 125 /* Method */ || node.kind === 126 /* Constructor */) { + if (node.kind === 185 /* FunctionDeclaration */ || node.kind === 125 /* Method */ || node.kind === 126 /* Constructor */) { var currentNodeFlags = getEffectiveDeclarationFlags(node, flagsToCheck); someNodeFlags |= currentNodeFlags; allNodeFlags &= currentNodeFlags; @@ -14320,20 +14603,20 @@ var ts; if (commonDeclarationSpace) { ts.forEach(symbol.declarations, function (d) { if (getDeclarationSpaces(d) & commonDeclarationSpace) { - error(d.name, ts.Diagnostics.Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local, ts.identifierToString(d.name)); + error(d.name, ts.Diagnostics.Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local, ts.declarationNameToString(d.name)); } }); } function getDeclarationSpaces(d) { switch (d.kind) { - case 185 /* InterfaceDeclaration */: + case 188 /* InterfaceDeclaration */: return 8388608 /* ExportType */; - case 188 /* ModuleDeclaration */: + case 191 /* ModuleDeclaration */: return d.name.kind === 7 /* StringLiteral */ || ts.getModuleInstanceState(d) !== 0 /* NonInstantiated */ ? 16777216 /* ExportNamespace */ | 4194304 /* ExportValue */ : 16777216 /* ExportNamespace */; - case 184 /* ClassDeclaration */: - case 187 /* EnumDeclaration */: + case 187 /* ClassDeclaration */: + case 190 /* EnumDeclaration */: return 8388608 /* ExportType */ | 4194304 /* ExportValue */; - case 190 /* ImportDeclaration */: + case 193 /* ImportDeclaration */: var result = 0; var target = resolveImport(getSymbolOfNode(d)); ts.forEach(target.declarations, function (d) { @@ -14366,7 +14649,7 @@ var ts; if (!isPrivateWithinAmbient(node)) { var typeName = typeToString(anyType); if (node.name) { - error(node, ts.Diagnostics._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type, ts.identifierToString(node.name), typeName); + error(node, ts.Diagnostics._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type, ts.declarationNameToString(node.name), typeName); } else { error(node, ts.Diagnostics.Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type, typeName); @@ -14408,10 +14691,10 @@ var ts; return; } switch (current.kind) { - case 182 /* FunctionDeclaration */: - case 149 /* FunctionExpression */: + case 185 /* FunctionDeclaration */: + case 152 /* FunctionExpression */: case 125 /* Method */: - case 150 /* ArrowFunction */: + case 153 /* ArrowFunction */: case 126 /* Constructor */: if (ts.hasRestParameters(current)) { error(node, ts.Diagnostics.Expression_resolves_to_variable_declaration_i_that_compiler_uses_to_initialize_rest_parameter); @@ -14463,7 +14746,7 @@ var ts; if (!needCollisionCheckForIdentifier(node, name, "_super")) { return; } - var enclosingClass = ts.getAncestor(node, 184 /* ClassDeclaration */); + var enclosingClass = ts.getAncestor(node, 187 /* ClassDeclaration */); if (!enclosingClass || ts.isInAmbientContext(enclosingClass)) { return; } @@ -14481,12 +14764,12 @@ var ts; if (!needCollisionCheckForIdentifier(node, name, "require") && !needCollisionCheckForIdentifier(node, name, "exports")) { return; } - if (node.kind === 188 /* ModuleDeclaration */ && ts.getModuleInstanceState(node) !== 1 /* Instantiated */) { + if (node.kind === 191 /* ModuleDeclaration */ && ts.getModuleInstanceState(node) !== 1 /* Instantiated */) { return; } - var parent = node.kind === 181 /* VariableDeclaration */ ? node.parent.parent : node.parent; - if (parent.kind === 193 /* SourceFile */ && ts.isExternalModule(parent)) { - error(name, ts.Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_an_external_module, name.text, name.text); + var parent = node.kind === 184 /* VariableDeclaration */ ? node.parent.parent : node.parent; + if (parent.kind === 196 /* SourceFile */ && ts.isExternalModule(parent)) { + error(name, ts.Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_an_external_module, ts.declarationNameToString(name), ts.declarationNameToString(name)); } } function checkCollisionWithConstDeclarations(node) { @@ -14514,7 +14797,7 @@ var ts; type = typeOfValueDeclaration; } else { - type = getTypeOfVariableDeclaration(node); + type = getTypeOfVariableOrPropertyDeclaration(node); } if (node.initializer) { if (!(getNodeLinks(node.initializer).flags & 1 /* TypeChecked */)) { @@ -14527,7 +14810,7 @@ var ts; checkCollisionWithRequireExportsInGeneratedCode(node, node.name); if (!useTypeFromValueDeclaration) { if (typeOfValueDeclaration !== unknownType && type !== unknownType && !isTypeIdenticalTo(typeOfValueDeclaration, type)) { - error(node.name, ts.Diagnostics.Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2, ts.identifierToString(node.name), typeToString(typeOfValueDeclaration), typeToString(type)); + error(node.name, ts.Diagnostics.Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2, ts.declarationNameToString(node.name), typeToString(typeOfValueDeclaration), typeToString(type)); } } } @@ -14704,7 +14987,7 @@ var ts; if (fullTypeCheck) { for (var j = 0; j < i; j++) { if (typeParameterDeclarations[j].symbol === node.symbol) { - error(node.name, ts.Diagnostics.Duplicate_identifier_0, ts.identifierToString(node.name)); + error(node.name, ts.Diagnostics.Duplicate_identifier_0, ts.declarationNameToString(node.name)); } } } @@ -14873,7 +15156,7 @@ var ts; checkTypeNameIsReserved(node.name, ts.Diagnostics.Interface_name_cannot_be_0); checkExportsOnMergedDeclarations(node); var symbol = getSymbolOfNode(node); - var firstInterfaceDecl = getDeclarationOfKind(symbol, 185 /* InterfaceDeclaration */); + var firstInterfaceDecl = getDeclarationOfKind(symbol, 188 /* InterfaceDeclaration */); if (symbol.declarations.length > 1) { if (node !== firstInterfaceDecl && !areTypeParametersIdentical(firstInterfaceDecl.typeParameters, node.typeParameters)) { error(node.name, ts.Diagnostics.All_declarations_of_an_interface_must_have_identical_type_parameters); @@ -14944,7 +15227,7 @@ var ts; return evalConstant(initializer); function evalConstant(e) { switch (e.kind) { - case 151 /* PrefixOperator */: + case 154 /* PrefixOperator */: var value = evalConstant(e.operand); if (value === undefined) { return undefined; @@ -14955,7 +15238,7 @@ var ts; case 46 /* TildeToken */: return enumIsConst ? ~value : undefined; } return undefined; - case 153 /* BinaryExpression */: + case 156 /* BinaryExpression */: if (!enumIsConst) { return undefined; } @@ -14983,11 +15266,11 @@ var ts; return undefined; case 6 /* NumericLiteral */: return +e.text; - case 148 /* ParenExpression */: + case 151 /* ParenExpression */: return enumIsConst ? evalConstant(e.expression) : undefined; case 63 /* Identifier */: - case 143 /* IndexedAccess */: - case 142 /* PropertyAccess */: + case 146 /* IndexedAccess */: + case 145 /* PropertyAccess */: if (!enumIsConst) { return undefined; } @@ -15000,7 +15283,7 @@ var ts; propertyName = e.text; } else { - if (e.kind === 143 /* IndexedAccess */) { + if (e.kind === 146 /* IndexedAccess */) { if (e.index.kind !== 7 /* StringLiteral */) { return undefined; } @@ -15056,7 +15339,7 @@ var ts; } var seenEnumMissingInitialInitializer = false; ts.forEach(enumSymbol.declarations, function (declaration) { - if (declaration.kind !== 187 /* EnumDeclaration */) { + if (declaration.kind !== 190 /* EnumDeclaration */) { return false; } var enumDeclaration = declaration; @@ -15079,7 +15362,7 @@ var ts; var declarations = symbol.declarations; for (var i = 0; i < declarations.length; i++) { var declaration = declarations[i]; - if ((declaration.kind === 184 /* ClassDeclaration */ || (declaration.kind === 182 /* FunctionDeclaration */ && declaration.body)) && !ts.isInAmbientContext(declaration)) { + if ((declaration.kind === 187 /* ClassDeclaration */ || (declaration.kind === 185 /* FunctionDeclaration */ && declaration.body)) && !ts.isInAmbientContext(declaration)) { return declaration; } } @@ -15133,7 +15416,7 @@ var ts; checkExpression(node.entityName); } else { - error(moduleName, ts.Diagnostics.Module_0_is_hidden_by_a_local_declaration_with_the_same_name, ts.identifierToString(moduleName)); + error(moduleName, ts.Diagnostics.Module_0_is_hidden_by_a_local_declaration_with_the_same_name, ts.declarationNameToString(moduleName)); } } if (target.flags & 3152352 /* Type */) { @@ -15142,10 +15425,10 @@ var ts; } } else { - if (node.parent.kind === 193 /* SourceFile */) { + if (node.parent.kind === 196 /* SourceFile */) { target = resolveImport(symbol); } - else if (node.parent.kind === 189 /* ModuleBlock */ && node.parent.parent.name.kind === 7 /* StringLiteral */) { + else if (node.parent.kind === 192 /* ModuleBlock */ && node.parent.parent.name.kind === 7 /* StringLiteral */) { if (isExternalModuleNameRelative(node.externalModuleName.text)) { error(node, ts.Diagnostics.Import_declaration_in_an_ambient_external_module_declaration_cannot_reference_external_module_through_relative_external_module_name); target = unknownSymbol; @@ -15167,7 +15450,7 @@ var ts; } function checkExportAssignment(node) { var container = node.parent; - if (container.kind !== 193 /* SourceFile */) { + if (container.kind !== 196 /* SourceFile */) { container = container.parent; } checkTypeOfExportAssignmentSymbol(getSymbolOfNode(container)); @@ -15182,6 +15465,8 @@ var ts; return checkParameter(node); case 124 /* Property */: return checkPropertyDeclaration(node); + case 133 /* FunctionType */: + case 134 /* ConstructorType */: case 129 /* CallSignature */: case 130 /* ConstructSignature */: case 131 /* IndexSignature */: @@ -15195,76 +15480,76 @@ var ts; return checkAccessorDeclaration(node); case 132 /* TypeReference */: return checkTypeReference(node); - case 133 /* TypeQuery */: + case 135 /* TypeQuery */: return checkTypeQuery(node); - case 134 /* TypeLiteral */: + case 136 /* TypeLiteral */: return checkTypeLiteral(node); - case 135 /* ArrayType */: + case 137 /* ArrayType */: return checkArrayType(node); - case 136 /* TupleType */: + case 138 /* TupleType */: return checkTupleType(node); - case 137 /* UnionType */: + case 139 /* UnionType */: return checkUnionType(node); - case 138 /* ParenType */: + case 140 /* ParenType */: return checkSourceElement(node.type); - case 182 /* FunctionDeclaration */: + case 185 /* FunctionDeclaration */: return checkFunctionDeclaration(node); - case 158 /* Block */: + case 161 /* Block */: return checkBlock(node); - case 183 /* FunctionBlock */: - case 189 /* ModuleBlock */: + case 186 /* FunctionBlock */: + case 192 /* ModuleBlock */: return checkBody(node); - case 159 /* VariableStatement */: + case 162 /* VariableStatement */: return checkVariableStatement(node); - case 161 /* ExpressionStatement */: + case 164 /* ExpressionStatement */: return checkExpressionStatement(node); - case 162 /* IfStatement */: + case 165 /* IfStatement */: return checkIfStatement(node); - case 163 /* DoStatement */: + case 166 /* DoStatement */: return checkDoStatement(node); - case 164 /* WhileStatement */: + case 167 /* WhileStatement */: return checkWhileStatement(node); - case 165 /* ForStatement */: + case 168 /* ForStatement */: return checkForStatement(node); - case 166 /* ForInStatement */: + case 169 /* ForInStatement */: return checkForInStatement(node); - case 167 /* ContinueStatement */: - case 168 /* BreakStatement */: + case 170 /* ContinueStatement */: + case 171 /* BreakStatement */: return checkBreakOrContinueStatement(node); - case 169 /* ReturnStatement */: + case 172 /* ReturnStatement */: return checkReturnStatement(node); - case 170 /* WithStatement */: + case 173 /* WithStatement */: return checkWithStatement(node); - case 171 /* SwitchStatement */: + case 174 /* SwitchStatement */: return checkSwitchStatement(node); - case 174 /* LabeledStatement */: + case 177 /* LabeledStatement */: return checkLabeledStatement(node); - case 175 /* ThrowStatement */: + case 178 /* ThrowStatement */: return checkThrowStatement(node); - case 176 /* TryStatement */: + case 179 /* TryStatement */: return checkTryStatement(node); - case 181 /* VariableDeclaration */: + case 184 /* VariableDeclaration */: return ts.Debug.fail("Checker encountered variable declaration"); - case 184 /* ClassDeclaration */: + case 187 /* ClassDeclaration */: return checkClassDeclaration(node); - case 185 /* InterfaceDeclaration */: + case 188 /* InterfaceDeclaration */: return checkInterfaceDeclaration(node); - case 186 /* TypeAliasDeclaration */: + case 189 /* TypeAliasDeclaration */: return checkTypeAliasDeclaration(node); - case 187 /* EnumDeclaration */: + case 190 /* EnumDeclaration */: return checkEnumDeclaration(node); - case 188 /* ModuleDeclaration */: + case 191 /* ModuleDeclaration */: return checkModuleDeclaration(node); - case 190 /* ImportDeclaration */: + case 193 /* ImportDeclaration */: return checkImportDeclaration(node); - case 191 /* ExportAssignment */: + case 194 /* ExportAssignment */: return checkExportAssignment(node); } } function checkFunctionExpressionBodies(node) { switch (node.kind) { - case 149 /* FunctionExpression */: - case 150 /* ArrowFunction */: + case 152 /* FunctionExpression */: + case 153 /* ArrowFunction */: ts.forEach(node.parameters, checkFunctionExpressionBodies); checkFunctionExpressionBody(node); break; @@ -15272,55 +15557,55 @@ var ts; case 126 /* Constructor */: case 127 /* GetAccessor */: case 128 /* SetAccessor */: - case 182 /* FunctionDeclaration */: + case 185 /* FunctionDeclaration */: ts.forEach(node.parameters, checkFunctionExpressionBodies); break; - case 170 /* WithStatement */: + case 173 /* WithStatement */: checkFunctionExpressionBodies(node.expression); break; case 123 /* Parameter */: case 124 /* Property */: - case 139 /* ArrayLiteral */: - case 140 /* ObjectLiteral */: - case 141 /* PropertyAssignment */: - case 142 /* PropertyAccess */: - case 143 /* IndexedAccess */: - case 144 /* CallExpression */: - case 145 /* NewExpression */: - case 146 /* TaggedTemplateExpression */: - case 147 /* TypeAssertion */: - case 148 /* ParenExpression */: - case 151 /* PrefixOperator */: - case 152 /* PostfixOperator */: - case 153 /* BinaryExpression */: - case 154 /* ConditionalExpression */: - case 158 /* Block */: - case 183 /* FunctionBlock */: - case 189 /* ModuleBlock */: - case 159 /* VariableStatement */: - case 161 /* ExpressionStatement */: - case 162 /* IfStatement */: - case 163 /* DoStatement */: - case 164 /* WhileStatement */: - case 165 /* ForStatement */: - case 166 /* ForInStatement */: - case 167 /* ContinueStatement */: - case 168 /* BreakStatement */: - case 169 /* ReturnStatement */: - case 171 /* SwitchStatement */: - case 172 /* CaseClause */: - case 173 /* DefaultClause */: - case 174 /* LabeledStatement */: - case 175 /* ThrowStatement */: - case 176 /* TryStatement */: - case 177 /* TryBlock */: - case 178 /* CatchBlock */: - case 179 /* FinallyBlock */: - case 181 /* VariableDeclaration */: - case 184 /* ClassDeclaration */: - case 187 /* EnumDeclaration */: - case 192 /* EnumMember */: - case 193 /* SourceFile */: + case 141 /* ArrayLiteral */: + case 142 /* ObjectLiteral */: + case 143 /* PropertyAssignment */: + case 145 /* PropertyAccess */: + case 146 /* IndexedAccess */: + case 147 /* CallExpression */: + case 148 /* NewExpression */: + case 149 /* TaggedTemplateExpression */: + case 150 /* TypeAssertion */: + case 151 /* ParenExpression */: + case 154 /* PrefixOperator */: + case 155 /* PostfixOperator */: + case 156 /* BinaryExpression */: + case 157 /* ConditionalExpression */: + case 161 /* Block */: + case 186 /* FunctionBlock */: + case 192 /* ModuleBlock */: + case 162 /* VariableStatement */: + case 164 /* ExpressionStatement */: + case 165 /* IfStatement */: + case 166 /* DoStatement */: + case 167 /* WhileStatement */: + case 168 /* ForStatement */: + case 169 /* ForInStatement */: + case 170 /* ContinueStatement */: + case 171 /* BreakStatement */: + case 172 /* ReturnStatement */: + case 174 /* SwitchStatement */: + case 175 /* CaseClause */: + case 176 /* DefaultClause */: + case 177 /* LabeledStatement */: + case 178 /* ThrowStatement */: + case 179 /* TryStatement */: + case 180 /* TryBlock */: + case 181 /* CatchBlock */: + case 182 /* FinallyBlock */: + case 184 /* VariableDeclaration */: + case 187 /* ClassDeclaration */: + case 190 /* EnumDeclaration */: + case 195 /* EnumMember */: + case 196 /* SourceFile */: ts.forEachChild(node, checkFunctionExpressionBodies); break; } @@ -15391,7 +15676,7 @@ var ts; function isInsideWithStatementBody(node) { if (node) { while (node.parent) { - if (node.parent.kind === 170 /* WithStatement */ && node.parent.statement === node) { + if (node.parent.kind === 173 /* WithStatement */ && node.parent.statement === node) { return true; } node = node.parent; @@ -15427,27 +15712,27 @@ var ts; copySymbols(location.locals, meaning); } switch (location.kind) { - case 193 /* SourceFile */: + case 196 /* SourceFile */: if (!ts.isExternalModule(location)) break; - case 188 /* ModuleDeclaration */: + case 191 /* ModuleDeclaration */: copySymbols(getSymbolOfNode(location).exports, meaning & 35653619 /* ModuleMember */); break; - case 187 /* EnumDeclaration */: + case 190 /* EnumDeclaration */: copySymbols(getSymbolOfNode(location).exports, meaning & 8 /* EnumMember */); break; - case 184 /* ClassDeclaration */: - case 185 /* InterfaceDeclaration */: + case 187 /* ClassDeclaration */: + case 188 /* InterfaceDeclaration */: if (!(memberFlags & 128 /* Static */)) { copySymbols(getSymbolOfNode(location).members, meaning & 3152352 /* Type */); } break; - case 149 /* FunctionExpression */: + case 152 /* FunctionExpression */: if (location.name) { copySymbol(location.symbol, meaning); } break; - case 178 /* CatchBlock */: + case 181 /* CatchBlock */: if (location.variable.text) { copySymbol(location.symbol, meaning); } @@ -15465,10 +15750,10 @@ var ts; function isTypeDeclaration(node) { switch (node.kind) { case 122 /* TypeParameter */: - case 184 /* ClassDeclaration */: - case 185 /* InterfaceDeclaration */: - case 186 /* TypeAliasDeclaration */: - case 187 /* EnumDeclaration */: + case 187 /* ClassDeclaration */: + case 188 /* InterfaceDeclaration */: + case 189 /* TypeAliasDeclaration */: + case 190 /* EnumDeclaration */: return true; } } @@ -15479,7 +15764,7 @@ var ts; return node.parent && node.parent.kind === 132 /* TypeReference */; } function isTypeNode(node) { - if (132 /* FirstTypeNode */ <= node.kind && node.kind <= 138 /* LastTypeNode */) { + if (132 /* FirstTypeNode */ <= node.kind && node.kind <= 140 /* LastTypeNode */) { return true; } switch (node.kind) { @@ -15489,20 +15774,20 @@ var ts; case 110 /* BooleanKeyword */: return true; case 97 /* VoidKeyword */: - return node.parent.kind !== 151 /* PrefixOperator */; + return node.parent.kind !== 154 /* PrefixOperator */; case 7 /* StringLiteral */: return node.parent.kind === 123 /* Parameter */; case 63 /* Identifier */: - if (node.parent.kind === 121 /* QualifiedName */) { + if (node.parent.kind === 121 /* QualifiedName */ && node.parent.right === node) { node = node.parent; } case 121 /* QualifiedName */: ts.Debug.assert(node.kind === 63 /* Identifier */ || node.kind === 121 /* QualifiedName */, "'node' was expected to be a qualified name or identifier in 'isTypeNode'."); var parent = node.parent; - if (parent.kind === 133 /* TypeQuery */) { + if (parent.kind === 135 /* TypeQuery */) { return false; } - if (132 /* FirstTypeNode */ <= parent.kind && parent.kind <= 138 /* LastTypeNode */) { + if (132 /* FirstTypeNode */ <= parent.kind && parent.kind <= 140 /* LastTypeNode */) { return true; } switch (parent.kind) { @@ -15510,11 +15795,11 @@ var ts; return node === parent.constraint; case 124 /* Property */: case 123 /* Parameter */: - case 181 /* VariableDeclaration */: + case 184 /* VariableDeclaration */: return node === parent.type; - case 182 /* FunctionDeclaration */: - case 149 /* FunctionExpression */: - case 150 /* ArrowFunction */: + case 185 /* FunctionDeclaration */: + case 152 /* FunctionExpression */: + case 153 /* ArrowFunction */: case 126 /* Constructor */: case 125 /* Method */: case 127 /* GetAccessor */: @@ -15524,12 +15809,12 @@ var ts; case 130 /* ConstructSignature */: case 131 /* IndexSignature */: return node === parent.type; - case 147 /* TypeAssertion */: + case 150 /* TypeAssertion */: return node === parent.type; - case 144 /* CallExpression */: - case 145 /* NewExpression */: + case 147 /* CallExpression */: + case 148 /* NewExpression */: return parent.typeArguments && parent.typeArguments.indexOf(node) >= 0; - case 146 /* TaggedTemplateExpression */: + case 149 /* TaggedTemplateExpression */: return false; } } @@ -15539,22 +15824,22 @@ var ts; while (node.parent.kind === 121 /* QualifiedName */) { node = node.parent; } - if (node.parent.kind === 190 /* ImportDeclaration */) { + if (node.parent.kind === 193 /* ImportDeclaration */) { return node.parent.entityName === node; } - if (node.parent.kind === 191 /* ExportAssignment */) { + if (node.parent.kind === 194 /* ExportAssignment */) { return node.parent.exportName === node; } return false; } function isRightSideOfQualifiedNameOrPropertyAccess(node) { - return (node.parent.kind === 121 /* QualifiedName */ || node.parent.kind === 142 /* PropertyAccess */) && node.parent.right === node; + return (node.parent.kind === 121 /* QualifiedName */ || node.parent.kind === 145 /* PropertyAccess */) && node.parent.right === node; } function getSymbolOfEntityName(entityName) { if (ts.isDeclarationOrFunctionExpressionOrCatchVariableName(entityName)) { return getSymbolOfNode(entityName.parent); } - if (entityName.parent.kind === 191 /* ExportAssignment */) { + if (entityName.parent.kind === 194 /* ExportAssignment */) { return resolveEntityName(entityName.parent.parent, entityName, 107455 /* Value */ | 3152352 /* Type */ | 1536 /* Namespace */ | 33554432 /* Import */); } if (isInRightSideOfImportOrExportAssignment(entityName)) { @@ -15568,7 +15853,7 @@ var ts; var meaning = 107455 /* Value */ | 33554432 /* Import */; return resolveEntityName(entityName, entityName, meaning); } - else if (entityName.kind === 121 /* QualifiedName */ || entityName.kind === 142 /* PropertyAccess */) { + else if (entityName.kind === 121 /* QualifiedName */ || entityName.kind === 145 /* PropertyAccess */) { var symbol = getNodeLinks(entityName).resolvedSymbol; if (!symbol) { checkPropertyAccess(entityName); @@ -15594,11 +15879,11 @@ var ts; return getSymbolOfNode(node.parent); } if (node.kind === 63 /* Identifier */ && isInRightSideOfImportOrExportAssignment(node)) { - return node.parent.kind === 191 /* ExportAssignment */ ? getSymbolOfEntityName(node) : getSymbolOfPartOfRightHandSideOfImport(node); + return node.parent.kind === 194 /* ExportAssignment */ ? getSymbolOfEntityName(node) : getSymbolOfPartOfRightHandSideOfImport(node); } switch (node.kind) { case 63 /* Identifier */: - case 142 /* PropertyAccess */: + case 145 /* PropertyAccess */: case 121 /* QualifiedName */: return getSymbolOfEntityName(node); case 91 /* ThisKeyword */: @@ -15612,13 +15897,13 @@ var ts; } return undefined; case 7 /* StringLiteral */: - if (node.parent.kind === 190 /* ImportDeclaration */ && node.parent.externalModuleName === node) { + if (node.parent.kind === 193 /* ImportDeclaration */ && node.parent.externalModuleName === node) { var importSymbol = getSymbolOfNode(node.parent); var moduleType = getTypeOfSymbol(importSymbol); return moduleType ? moduleType.symbol : undefined; } case 6 /* NumericLiteral */: - if (node.parent.kind == 143 /* IndexedAccess */ && node.parent.index === node) { + if (node.parent.kind == 146 /* IndexedAccess */ && node.parent.index === node) { var objectType = checkExpression(node.parent.object); if (objectType === unknownType) return undefined; @@ -15631,6 +15916,12 @@ var ts; } return undefined; } + function getShorthandAssignmentValueSymbol(location) { + if (location && location.kind === 144 /* ShorthandPropertyAssignment */) { + return resolveEntityName(location, location.name, 107455 /* Value */); + } + return undefined; + } function getTypeOfNode(node) { if (isInsideWithStatementBody(node)) { return unknownType; @@ -15700,7 +15991,7 @@ var ts; return [symbol]; } function isExternalModuleSymbol(symbol) { - return symbol.flags & 512 /* ValueModule */ && symbol.declarations.length === 1 && symbol.declarations[0].kind === 193 /* SourceFile */; + return symbol.flags & 512 /* ValueModule */ && symbol.declarations.length === 1 && symbol.declarations[0].kind === 196 /* SourceFile */; } function isNodeDescendentOf(node, ancestor) { while (node) { @@ -15733,7 +16024,7 @@ var ts; function getLocalNameForSymbol(symbol, location) { var node = location; while (node) { - if ((node.kind === 188 /* ModuleDeclaration */ || node.kind === 187 /* EnumDeclaration */) && getSymbolOfNode(node) === symbol) { + if ((node.kind === 191 /* ModuleDeclaration */ || node.kind === 190 /* EnumDeclaration */) && getSymbolOfNode(node) === symbol) { return getLocalNameOfContainer(node); } node = node.parent; @@ -15757,15 +16048,17 @@ var ts; return symbol && symbolIsValue(symbol) && !isConstEnumSymbol(symbol) ? symbolToString(symbol) : undefined; } function isTopLevelValueImportWithEntityName(node) { - if (node.parent.kind !== 193 /* SourceFile */ || !node.entityName) { + if (node.parent.kind !== 196 /* SourceFile */ || !node.entityName) { return false; } - var symbol = getSymbolOfNode(node); return isImportResolvedToValue(getSymbolOfNode(node)); } function hasSemanticErrors() { return getDiagnostics().length > 0 || getGlobalDiagnostics().length > 0; } + function isEmitBlocked(sourceFile) { + return program.getDiagnostics(sourceFile).length !== 0 || hasEarlyErrors(sourceFile) || (compilerOptions.noEmitOnError && getDiagnostics(sourceFile).length !== 0); + } function hasEarlyErrors(sourceFile) { return ts.forEach(getDiagnostics(sourceFile), function (d) { return d.isEarly; }); } @@ -15806,7 +16099,7 @@ var ts; if (symbol && (symbol.flags & 8 /* EnumMember */)) { var declaration = symbol.valueDeclaration; var constantValue; - if (declaration.kind === 192 /* EnumMember */ && (constantValue = getNodeLinks(declaration).enumMemberValue) !== undefined) { + if (declaration.kind === 195 /* EnumMember */ && (constantValue = getNodeLinks(declaration).enumMemberValue) !== undefined) { return constantValue; } } @@ -15814,7 +16107,7 @@ var ts; } function writeTypeAtLocation(location, enclosingDeclaration, flags, writer) { var symbol = getSymbolOfNode(location); - var type = symbol && !(symbol.flags & 2048 /* TypeLiteral */) ? getTypeOfSymbol(symbol) : getTypeFromTypeNode(location); + var type = symbol && !(symbol.flags & (2048 /* TypeLiteral */ | 131072 /* CallSignature */ | 262144 /* ConstructSignature */)) ? getTypeOfSymbol(symbol) : getTypeFromTypeNode(location); getSymbolDisplayBuilder().buildTypeDisplay(type, writer, enclosingDeclaration, flags); } function writeReturnTypeOfSignatureDeclaration(signatureDeclaration, enclosingDeclaration, flags, writer) { @@ -15832,7 +16125,7 @@ var ts; getEnumMemberValue: getEnumMemberValue, isTopLevelValueImportWithEntityName: isTopLevelValueImportWithEntityName, hasSemanticErrors: hasSemanticErrors, - hasEarlyErrors: hasEarlyErrors, + isEmitBlocked: isEmitBlocked, isDeclarationVisible: isDeclarationVisible, isImplementationOfOverload: isImplementationOfOverload, writeTypeAtLocation: writeTypeAtLocation, @@ -15866,1729 +16159,19 @@ var ts; globalNumberType = getGlobalType("Number"); globalBooleanType = getGlobalType("Boolean"); globalRegExpType = getGlobalType("RegExp"); + globalTemplateStringsArrayType = compilerOptions.target >= 2 /* ES6 */ ? getGlobalType("TemplateStringsArray") : unknownType; } initializeTypeChecker(); return checker; } ts.createTypeChecker = createTypeChecker; })(ts || (ts = {})); -var TypeScript; -(function (TypeScript) { - TypeScript.DiagnosticCode = { - error_TS_0_1: "error TS{0}: {1}", - warning_TS_0_1: "warning TS{0}: {1}", - Unrecognized_escape_sequence: "Unrecognized escape sequence.", - Unexpected_character_0: "Unexpected character {0}.", - Missing_close_quote_character: "Missing close quote character.", - Identifier_expected: "Identifier expected.", - _0_keyword_expected: "'{0}' keyword expected.", - _0_expected: "'{0}' expected.", - Identifier_expected_0_is_a_keyword: "Identifier expected; '{0}' is a keyword.", - Automatic_semicolon_insertion_not_allowed: "Automatic semicolon insertion not allowed.", - Unexpected_token_0_expected: "Unexpected token; '{0}' expected.", - Trailing_comma_not_allowed: "Trailing comma not allowed.", - public_or_private_modifier_must_precede_static: "'public' or 'private' modifier must precede 'static'.", - Unexpected_token: "Unexpected token.", - Catch_clause_parameter_cannot_have_a_type_annotation: "Catch clause parameter cannot have a type annotation.", - A_rest_parameter_must_be_last_in_a_parameter_list: "A rest parameter must be last in a parameter list.", - Parameter_cannot_have_question_mark_and_initializer: "Parameter cannot have question mark and initializer.", - A_required_parameter_cannot_follow_an_optional_parameter: "A required parameter cannot follow an optional parameter.", - Index_signatures_cannot_have_rest_parameters: "Index signatures cannot have rest parameters.", - Index_signature_parameter_cannot_have_accessibility_modifiers: "Index signature parameter cannot have accessibility modifiers.", - Index_signature_parameter_cannot_have_a_question_mark: "Index signature parameter cannot have a question mark.", - Index_signature_parameter_cannot_have_an_initializer: "Index signature parameter cannot have an initializer.", - Index_signature_must_have_a_type_annotation: "Index signature must have a type annotation.", - Index_signature_parameter_must_have_a_type_annotation: "Index signature parameter must have a type annotation.", - Index_signature_parameter_type_must_be_string_or_number: "Index signature parameter type must be 'string' or 'number'.", - extends_clause_already_seen: "'extends' clause already seen.", - extends_clause_must_precede_implements_clause: "'extends' clause must precede 'implements' clause.", - Classes_can_only_extend_a_single_class: "Classes can only extend a single class.", - implements_clause_already_seen: "'implements' clause already seen.", - Accessibility_modifier_already_seen: "Accessibility modifier already seen.", - _0_modifier_must_precede_1_modifier: "'{0}' modifier must precede '{1}' modifier.", - _0_modifier_already_seen: "'{0}' modifier already seen.", - _0_modifier_cannot_appear_on_a_class_element: "'{0}' modifier cannot appear on a class element.", - Interface_declaration_cannot_have_implements_clause: "Interface declaration cannot have 'implements' clause.", - super_invocation_cannot_have_type_arguments: "'super' invocation cannot have type arguments.", - Only_ambient_modules_can_use_quoted_names: "Only ambient modules can use quoted names.", - Statements_are_not_allowed_in_ambient_contexts: "Statements are not allowed in ambient contexts.", - A_function_implementation_cannot_be_declared_in_an_ambient_context: "A function implementation cannot be declared in an ambient context.", - A_declare_modifier_cannot_be_used_in_an_already_ambient_context: "A 'declare' modifier cannot be used in an already ambient context.", - Initializers_are_not_allowed_in_ambient_contexts: "Initializers are not allowed in ambient contexts.", - _0_modifier_cannot_appear_on_a_module_element: "'{0}' modifier cannot appear on a module element.", - A_declare_modifier_cannot_be_used_with_an_interface_declaration: "A 'declare' modifier cannot be used with an interface declaration.", - A_declare_modifier_is_required_for_a_top_level_declaration_in_a_d_ts_file: "A 'declare' modifier is required for a top level declaration in a .d.ts file.", - A_rest_parameter_cannot_be_optional: "A rest parameter cannot be optional.", - A_rest_parameter_cannot_have_an_initializer: "A rest parameter cannot have an initializer.", - set_accessor_must_have_exactly_one_parameter: "'set' accessor must have exactly one parameter.", - set_accessor_parameter_cannot_be_optional: "'set' accessor parameter cannot be optional.", - set_accessor_parameter_cannot_have_an_initializer: "'set' accessor parameter cannot have an initializer.", - set_accessor_cannot_have_rest_parameter: "'set' accessor cannot have rest parameter.", - get_accessor_cannot_have_parameters: "'get' accessor cannot have parameters.", - Modifiers_cannot_appear_here: "Modifiers cannot appear here.", - Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher: "Accessors are only available when targeting ECMAScript 5 and higher.", - Enum_member_must_have_initializer: "Enum member must have initializer.", - Export_assignment_cannot_be_used_in_internal_modules: "Export assignment cannot be used in internal modules.", - Ambient_enum_elements_can_only_have_integer_literal_initializers: "Ambient enum elements can only have integer literal initializers.", - module_class_interface_enum_import_or_statement: "module, class, interface, enum, import or statement", - constructor_function_accessor_or_variable: "constructor, function, accessor or variable", - statement: "statement", - case_or_default_clause: "case or default clause", - identifier: "identifier", - call_construct_index_property_or_function_signature: "call, construct, index, property or function signature", - expression: "expression", - type_name: "type name", - property_or_accessor: "property or accessor", - parameter: "parameter", - type: "type", - type_parameter: "type parameter", - A_declare_modifier_cannot_be_used_with_an_import_declaration: "A 'declare' modifier cannot be used with an import declaration.", - Invalid_reference_directive_syntax: "Invalid 'reference' directive syntax.", - Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher: "Octal literals are not available when targeting ECMAScript 5 and higher.", - Accessors_are_not_allowed_in_ambient_contexts: "Accessors are not allowed in ambient contexts.", - _0_modifier_cannot_appear_on_a_constructor_declaration: "'{0}' modifier cannot appear on a constructor declaration.", - _0_modifier_cannot_appear_on_a_parameter: "'{0}' modifier cannot appear on a parameter.", - Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement: "Only a single variable declaration is allowed in a 'for...in' statement.", - Type_parameters_cannot_appear_on_a_constructor_declaration: "Type parameters cannot appear on a constructor declaration.", - Type_annotation_cannot_appear_on_a_constructor_declaration: "Type annotation cannot appear on a constructor declaration.", - Type_parameters_cannot_appear_on_an_accessor: "Type parameters cannot appear on an accessor.", - Type_annotation_cannot_appear_on_a_set_accessor: "Type annotation cannot appear on a 'set' accessor.", - Index_signature_must_have_exactly_one_parameter: "Index signature must have exactly one parameter.", - _0_list_cannot_be_empty: "'{0}' list cannot be empty.", - variable_declaration: "variable declaration", - type_argument: "type argument", - Invalid_use_of_0_in_strict_mode: "Invalid use of '{0}' in strict mode.", - with_statements_are_not_allowed_in_strict_mode: "'with' statements are not allowed in strict mode.", - delete_cannot_be_called_on_an_identifier_in_strict_mode: "'delete' cannot be called on an identifier in strict mode.", - Invalid_left_hand_side_in_for_in_statement: "Invalid left-hand side in 'for...in' statement.", - continue_statement_can_only_be_used_within_an_enclosing_iteration_statement: "'continue' statement can only be used within an enclosing iteration statement.", - break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement: "'break' statement can only be used within an enclosing iteration or switch statement.", - Jump_target_not_found: "Jump target not found.", - Jump_target_cannot_cross_function_boundary: "Jump target cannot cross function boundary.", - return_statement_must_be_contained_within_a_function_body: "'return' statement must be contained within a function body.", - Expression_expected: "Expression expected.", - Type_expected: "Type expected.", - Template_literal_cannot_be_used_as_an_element_name: "Template literal cannot be used as an element name.", - Duplicate_identifier_0: "Duplicate identifier '{0}'.", - The_name_0_does_not_exist_in_the_current_scope: "The name '{0}' does not exist in the current scope.", - The_name_0_does_not_refer_to_a_value: "The name '{0}' does not refer to a value.", - super_can_only_be_used_inside_a_class_instance_method: "'super' can only be used inside a class instance method.", - The_left_hand_side_of_an_assignment_expression_must_be_a_variable_property_or_indexer: "The left-hand side of an assignment expression must be a variable, property or indexer.", - Value_of_type_0_is_not_callable_Did_you_mean_to_include_new: "Value of type '{0}' is not callable. Did you mean to include 'new'?", - Value_of_type_0_is_not_callable: "Value of type '{0}' is not callable.", - Value_of_type_0_is_not_newable: "Value of type '{0}' is not newable.", - An_index_expression_argument_must_be_string_number_or_any: "An index expression argument must be 'string', 'number', or 'any'.", - Operator_0_cannot_be_applied_to_types_1_and_2: "Operator '{0}' cannot be applied to types '{1}' and '{2}'.", - Type_0_is_not_assignable_to_type_1: "Type '{0}' is not assignable to type '{1}'.", - Type_0_is_not_assignable_to_type_1_NL_2: "Type '{0}' is not assignable to type '{1}':{NL}{2}", - Expected_var_class_interface_or_module: "Expected var, class, interface, or module.", - Getter_0_already_declared: "Getter '{0}' already declared.", - Setter_0_already_declared: "Setter '{0}' already declared.", - Exported_class_0_extends_private_class_1: "Exported class '{0}' extends private class '{1}'.", - Exported_class_0_implements_private_interface_1: "Exported class '{0}' implements private interface '{1}'.", - Exported_interface_0_extends_private_interface_1: "Exported interface '{0}' extends private interface '{1}'.", - Exported_class_0_extends_class_from_inaccessible_module_1: "Exported class '{0}' extends class from inaccessible module {1}.", - Exported_class_0_implements_interface_from_inaccessible_module_1: "Exported class '{0}' implements interface from inaccessible module {1}.", - Exported_interface_0_extends_interface_from_inaccessible_module_1: "Exported interface '{0}' extends interface from inaccessible module {1}.", - Public_static_property_0_of_exported_class_has_or_is_using_private_type_1: "Public static property '{0}' of exported class has or is using private type '{1}'.", - Public_property_0_of_exported_class_has_or_is_using_private_type_1: "Public property '{0}' of exported class has or is using private type '{1}'.", - Property_0_of_exported_interface_has_or_is_using_private_type_1: "Property '{0}' of exported interface has or is using private type '{1}'.", - Exported_variable_0_has_or_is_using_private_type_1: "Exported variable '{0}' has or is using private type '{1}'.", - Public_static_property_0_of_exported_class_is_using_inaccessible_module_1: "Public static property '{0}' of exported class is using inaccessible module {1}.", - Public_property_0_of_exported_class_is_using_inaccessible_module_1: "Public property '{0}' of exported class is using inaccessible module {1}.", - Property_0_of_exported_interface_is_using_inaccessible_module_1: "Property '{0}' of exported interface is using inaccessible module {1}.", - Exported_variable_0_is_using_inaccessible_module_1: "Exported variable '{0}' is using inaccessible module {1}.", - Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_type_1: "Parameter '{0}' of constructor from exported class has or is using private type '{1}'.", - Parameter_0_of_public_static_property_setter_from_exported_class_has_or_is_using_private_type_1: "Parameter '{0}' of public static property setter from exported class has or is using private type '{1}'.", - Parameter_0_of_public_property_setter_from_exported_class_has_or_is_using_private_type_1: "Parameter '{0}' of public property setter from exported class has or is using private type '{1}'.", - Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_type_1: "Parameter '{0}' of constructor signature from exported interface has or is using private type '{1}'.", - Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_type_1: "Parameter '{0}' of call signature from exported interface has or is using private type '{1}'.", - Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_type_1: "Parameter '{0}' of public static method from exported class has or is using private type '{1}'.", - Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_type_1: "Parameter '{0}' of public method from exported class has or is using private type '{1}'.", - Parameter_0_of_method_from_exported_interface_has_or_is_using_private_type_1: "Parameter '{0}' of method from exported interface has or is using private type '{1}'.", - Parameter_0_of_exported_function_has_or_is_using_private_type_1: "Parameter '{0}' of exported function has or is using private type '{1}'.", - Parameter_0_of_constructor_from_exported_class_is_using_inaccessible_module_1: "Parameter '{0}' of constructor from exported class is using inaccessible module {1}.", - Parameter_0_of_public_static_property_setter_from_exported_class_is_using_inaccessible_module_1: "Parameter '{0}' of public static property setter from exported class is using inaccessible module {1}.", - Parameter_0_of_public_property_setter_from_exported_class_is_using_inaccessible_module_1: "Parameter '{0}' of public property setter from exported class is using inaccessible module {1}.", - Parameter_0_of_constructor_signature_from_exported_interface_is_using_inaccessible_module_1: "Parameter '{0}' of constructor signature from exported interface is using inaccessible module {1}.", - Parameter_0_of_call_signature_from_exported_interface_is_using_inaccessible_module_1: "Parameter '{0}' of call signature from exported interface is using inaccessible module {1}", - Parameter_0_of_public_static_method_from_exported_class_is_using_inaccessible_module_1: "Parameter '{0}' of public static method from exported class is using inaccessible module {1}.", - Parameter_0_of_public_method_from_exported_class_is_using_inaccessible_module_1: "Parameter '{0}' of public method from exported class is using inaccessible module {1}.", - Parameter_0_of_method_from_exported_interface_is_using_inaccessible_module_1: "Parameter '{0}' of method from exported interface is using inaccessible module {1}.", - Parameter_0_of_exported_function_is_using_inaccessible_module_1: "Parameter '{0}' of exported function is using inaccessible module {1}.", - Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_private_type_0: "Return type of public static property getter from exported class has or is using private type '{0}'.", - Return_type_of_public_property_getter_from_exported_class_has_or_is_using_private_type_0: "Return type of public property getter from exported class has or is using private type '{0}'.", - Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_type_0: "Return type of constructor signature from exported interface has or is using private type '{0}'.", - Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_type_0: "Return type of call signature from exported interface has or is using private type '{0}'.", - Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_type_0: "Return type of index signature from exported interface has or is using private type '{0}'.", - Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_type_0: "Return type of public static method from exported class has or is using private type '{0}'.", - Return_type_of_public_method_from_exported_class_has_or_is_using_private_type_0: "Return type of public method from exported class has or is using private type '{0}'.", - Return_type_of_method_from_exported_interface_has_or_is_using_private_type_0: "Return type of method from exported interface has or is using private type '{0}'.", - Return_type_of_exported_function_has_or_is_using_private_type_0: "Return type of exported function has or is using private type '{0}'.", - Return_type_of_public_static_property_getter_from_exported_class_is_using_inaccessible_module_0: "Return type of public static property getter from exported class is using inaccessible module {0}.", - Return_type_of_public_property_getter_from_exported_class_is_using_inaccessible_module_0: "Return type of public property getter from exported class is using inaccessible module {0}.", - Return_type_of_constructor_signature_from_exported_interface_is_using_inaccessible_module_0: "Return type of constructor signature from exported interface is using inaccessible module {0}.", - Return_type_of_call_signature_from_exported_interface_is_using_inaccessible_module_0: "Return type of call signature from exported interface is using inaccessible module {0}.", - Return_type_of_index_signature_from_exported_interface_is_using_inaccessible_module_0: "Return type of index signature from exported interface is using inaccessible module {0}.", - Return_type_of_public_static_method_from_exported_class_is_using_inaccessible_module_0: "Return type of public static method from exported class is using inaccessible module {0}.", - Return_type_of_public_method_from_exported_class_is_using_inaccessible_module_0: "Return type of public method from exported class is using inaccessible module {0}.", - Return_type_of_method_from_exported_interface_is_using_inaccessible_module_0: "Return type of method from exported interface is using inaccessible module {0}.", - Return_type_of_exported_function_is_using_inaccessible_module_0: "Return type of exported function is using inaccessible module {0}.", - new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead: "'new T[]' cannot be used to create an array. Use 'new Array()' instead.", - A_parameter_list_must_follow_a_generic_type_argument_list_expected: "A parameter list must follow a generic type argument list. '(' expected.", - Multiple_constructor_implementations_are_not_allowed: "Multiple constructor implementations are not allowed.", - Cannot_find_external_module_0: "Cannot find external module '{0}'.", - Module_cannot_be_aliased_to_a_non_module_type: "Module cannot be aliased to a non-module type.", - A_class_may_only_extend_another_class: "A class may only extend another class.", - A_class_may_only_implement_another_class_or_interface: "A class may only implement another class or interface.", - An_interface_may_only_extend_a_class_or_another_interface: "An interface may only extend a class or another interface.", - Unable_to_resolve_type: "Unable to resolve type.", - Unable_to_resolve_type_of_0: "Unable to resolve type of '{0}'.", - Unable_to_resolve_type_parameter_constraint: "Unable to resolve type parameter constraint.", - Type_parameter_constraint_cannot_be_a_primitive_type: "Type parameter constraint cannot be a primitive type.", - Supplied_parameters_do_not_match_any_signature_of_call_target: "Supplied parameters do not match any signature of call target.", - Supplied_parameters_do_not_match_any_signature_of_call_target_NL_0: "Supplied parameters do not match any signature of call target:{NL}{0}", - Cannot_use_new_with_an_expression_whose_type_lacks_a_signature: "Cannot use 'new' with an expression whose type lacks a signature.", - Only_a_void_function_can_be_called_with_the_new_keyword: "Only a void function can be called with the 'new' keyword.", - Could_not_select_overload_for_new_expression: "Could not select overload for 'new' expression.", - Type_0_does_not_satisfy_the_constraint_1: "Type '{0}' does not satisfy the constraint '{1}'.", - Could_not_select_overload_for_call_expression: "Could not select overload for 'call' expression.", - Cannot_invoke_an_expression_whose_type_lacks_a_call_signature: "Cannot invoke an expression whose type lacks a call signature.", - Calls_to_super_are_only_valid_inside_a_class: "Calls to 'super' are only valid inside a class.", - Generic_type_0_requires_1_type_argument_s: "Generic type '{0}' requires {1} type argument(s).", - Type_of_array_literal_cannot_be_determined_Best_common_type_could_not_be_found_for_array_elements: "Type of array literal cannot be determined. Best common type could not be found for array elements.", - Could_not_find_enclosing_symbol_for_dotted_name_0: "Could not find enclosing symbol for dotted name '{0}'.", - Property_0_does_not_exist_on_value_of_type_1: "Property '{0}' does not exist on value of type '{1}'.", - Cannot_find_name_0: "Cannot find name '{0}'.", - get_and_set_accessor_must_have_the_same_type: "'get' and 'set' accessor must have the same type.", - this_cannot_be_referenced_in_current_location: "'this' cannot be referenced in current location.", - Static_members_cannot_reference_class_type_parameters: "Static members cannot reference class type parameters.", - Type_0_recursively_references_itself_as_a_base_type: "Type '{0}' recursively references itself as a base type.", - super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_derived_class: "'super' property access is permitted only in a constructor, member function, or member accessor of a derived class.", - super_can_only_be_referenced_in_a_derived_class: "'super' can only be referenced in a derived class.", - A_super_call_must_be_the_first_statement_in_the_constructor_when_a_class_contains_initialized_properties_or_has_parameter_properties: "A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties.", - Constructors_for_derived_classes_must_contain_a_super_call: "Constructors for derived classes must contain a 'super' call.", - Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors: "Super calls are not permitted outside constructors or in nested functions inside constructors.", - _0_1_is_inaccessible: "'{0}.{1}' is inaccessible.", - this_cannot_be_referenced_in_a_module_body: "'this' cannot be referenced in a module body.", - Invalid_expression_types_not_known_to_support_the_addition_operator: "Invalid '+' expression - types not known to support the addition operator.", - The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type: "The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.", - The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type: "The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.", - An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type: "An arithmetic operand must be of type 'any', 'number' or an enum type.", - Variable_declarations_of_a_for_statement_cannot_use_a_type_annotation: "Variable declarations of a 'for' statement cannot use a type annotation.", - Variable_declarations_of_a_for_statement_must_be_of_types_string_or_any: "Variable declarations of a 'for' statement must be of types 'string' or 'any'.", - The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter: "The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter.", - The_left_hand_side_of_an_in_expression_must_be_of_types_any_string_or_number: "The left-hand side of an 'in' expression must be of types 'any', 'string' or 'number'.", - The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter: "The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter.", - The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter: "The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter.", - The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_Function_interface_type: "The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type.", - Setters_cannot_return_a_value: "Setters cannot return a value.", - Tried_to_query_type_of_uninitialized_module_0: "Tried to query type of uninitialized module '{0}'.", - Tried_to_set_variable_type_to_uninitialized_module_type_0: "Tried to set variable type to uninitialized module type '{0}'.", - Type_0_is_not_generic: "Type '{0}' is not generic.", - Getters_must_return_a_value: "Getters must return a value.", - Getter_and_setter_accessors_do_not_agree_in_visibility: "Getter and setter accessors do not agree in visibility.", - Invalid_left_hand_side_of_assignment_expression: "Invalid left-hand side of assignment expression.", - Function_declared_a_non_void_return_type_but_has_no_return_expression: "Function declared a non-void return type, but has no return expression.", - Cannot_resolve_return_type_reference: "Cannot resolve return type reference.", - Constructors_cannot_have_a_return_type_of_void: "Constructors cannot have a return type of 'void'.", - Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2: "Subsequent variable declarations must have the same type. Variable '{0}' must be of type '{1}', but here has type '{2}'.", - All_symbols_within_a_with_block_will_be_resolved_to_any: "All symbols within a with block will be resolved to 'any'.", - Import_declarations_in_an_internal_module_cannot_reference_an_external_module: "Import declarations in an internal module cannot reference an external module.", - Class_0_declares_interface_1_but_does_not_implement_it_NL_2: "Class {0} declares interface {1} but does not implement it:{NL}{2}", - Class_0_declares_class_1_as_an_interface_but_does_not_implement_it_NL_2: "Class {0} declares class {1} as an interface but does not implement it:{NL}{2}", - The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_property_or_indexer: "The operand of an increment or decrement operator must be a variable, property or indexer.", - this_cannot_be_referenced_in_a_static_property_initializer: "'this' cannot be referenced in a static property initializer.", - Class_0_cannot_extend_class_1_NL_2: "Class '{0}' cannot extend class '{1}':{NL}{2}", - Interface_0_cannot_extend_class_1_NL_2: "Interface '{0}' cannot extend class '{1}':{NL}{2}", - Interface_0_cannot_extend_interface_1_NL_2: "Interface '{0}' cannot extend interface '{1}':{NL}{2}", - Overload_signature_is_not_compatible_with_function_definition: "Overload signature is not compatible with function definition.", - Overload_signature_is_not_compatible_with_function_definition_NL_0: "Overload signature is not compatible with function definition:{NL}{0}", - Overload_signatures_must_all_be_public_or_private: "Overload signatures must all be public or private.", - Overload_signatures_must_all_be_exported_or_not_exported: "Overload signatures must all be exported or not exported.", - Overload_signatures_must_all_be_ambient_or_non_ambient: "Overload signatures must all be ambient or non-ambient.", - Overload_signatures_must_all_be_optional_or_required: "Overload signatures must all be optional or required.", - Specialized_overload_signature_is_not_assignable_to_any_non_specialized_signature: "Specialized overload signature is not assignable to any non-specialized signature.", - this_cannot_be_referenced_in_constructor_arguments: "'this' cannot be referenced in constructor arguments.", - Instance_member_cannot_be_accessed_off_a_class: "Instance member cannot be accessed off a class.", - Untyped_function_calls_may_not_accept_type_arguments: "Untyped function calls may not accept type arguments.", - Non_generic_functions_may_not_accept_type_arguments: "Non-generic functions may not accept type arguments.", - A_generic_type_may_not_reference_itself_with_a_wrapped_form_of_its_own_type_parameters: "A generic type may not reference itself with a wrapped form of its own type parameters.", - A_rest_parameter_must_be_of_an_array_type: "A rest parameter must be of an array type.", - Overload_signature_implementation_cannot_use_specialized_type: "Overload signature implementation cannot use specialized type.", - Export_assignments_may_only_be_used_at_the_top_level_of_external_modules: "Export assignments may only be used at the top-level of external modules.", - Export_assignments_may_only_be_made_with_variables_functions_classes_interfaces_enums_and_internal_modules: "Export assignments may only be made with variables, functions, classes, interfaces, enums and internal modules.", - Only_public_methods_of_the_base_class_are_accessible_via_the_super_keyword: "Only public methods of the base class are accessible via the 'super' keyword.", - Numeric_indexer_type_0_must_be_assignable_to_string_indexer_type_1: "Numeric indexer type '{0}' must be assignable to string indexer type '{1}'.", - Numeric_indexer_type_0_must_be_assignable_to_string_indexer_type_1_NL_2: "Numeric indexer type '{0}' must be assignable to string indexer type '{1}':{NL}{2}", - All_numerically_named_properties_must_be_assignable_to_numeric_indexer_type_0: "All numerically named properties must be assignable to numeric indexer type '{0}'.", - All_numerically_named_properties_must_be_assignable_to_numeric_indexer_type_0_NL_1: "All numerically named properties must be assignable to numeric indexer type '{0}':{NL}{1}", - All_named_properties_must_be_assignable_to_string_indexer_type_0: "All named properties must be assignable to string indexer type '{0}'.", - All_named_properties_must_be_assignable_to_string_indexer_type_0_NL_1: "All named properties must be assignable to string indexer type '{0}':{NL}{1}", - A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation: "A parameter initializer is only allowed in a function or constructor implementation.", - Function_expression_declared_a_non_void_return_type_but_has_no_return_expression: "Function expression declared a non-void return type, but has no return expression.", - Import_declaration_referencing_identifier_from_internal_module_can_only_be_made_with_variables_functions_classes_interfaces_enums_and_internal_modules: "Import declaration referencing identifier from internal module can only be made with variables, functions, classes, interfaces, enums and internal modules.", - Module_0_has_no_exported_member_1: "Module '{0}' has no exported member '{1}'.", - Unable_to_resolve_module_reference_0: "Unable to resolve module reference '{0}'.", - Could_not_find_module_0_in_module_1: "Could not find module '{0}' in module '{1}'.", - Exported_import_declaration_0_is_assigned_value_with_type_that_has_or_is_using_private_type_1: "Exported import declaration '{0}' is assigned value with type that has or is using private type '{1}'.", - Exported_import_declaration_0_is_assigned_value_with_type_that_is_using_inaccessible_module_1: "Exported import declaration '{0}' is assigned value with type that is using inaccessible module '{1}'.", - Exported_import_declaration_0_is_assigned_type_that_has_or_is_using_private_type_1: "Exported import declaration '{0}' is assigned type that has or is using private type '{1}'.", - Exported_import_declaration_0_is_assigned_type_that_is_using_inaccessible_module_1: "Exported import declaration '{0}' is assigned type that is using inaccessible module '{1}'.", - Exported_import_declaration_0_is_assigned_container_that_is_or_is_using_inaccessible_module_1: "Exported import declaration '{0}' is assigned container that is or is using inaccessible module '{1}'.", - Type_name_0_in_extends_clause_does_not_reference_constructor_function_for_1: "Type name '{0}' in extends clause does not reference constructor function for '{1}'.", - Internal_module_reference_0_in_import_declaration_does_not_reference_module_instance_for_1: "Internal module reference '{0}' in import declaration does not reference module instance for '{1}'.", - Module_0_cannot_merge_with_previous_declaration_of_1_in_a_different_file_2: "Module '{0}' cannot merge with previous declaration of '{1}' in a different file '{2}'.", - Interface_0_cannot_simultaneously_extend_types_1_and_2_NL_3: "Interface '{0}' cannot simultaneously extend types '{1}' and '{2}':{NL}{3}", - Initializer_of_parameter_0_cannot_reference_identifier_1_declared_after_it: "Initializer of parameter '{0}' cannot reference identifier '{1}' declared after it.", - Ambient_external_module_declaration_cannot_be_reopened: "Ambient external module declaration cannot be reopened.", - All_declarations_of_merged_declaration_0_must_be_exported_or_not_exported: "All declarations of merged declaration '{0}' must be exported or not exported.", - super_cannot_be_referenced_in_constructor_arguments: "'super' cannot be referenced in constructor arguments.", - Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class: "Return type of constructor signature must be assignable to the instance type of the class.", - Ambient_external_module_declaration_must_be_defined_in_global_context: "Ambient external module declaration must be defined in global context.", - Ambient_external_module_declaration_cannot_specify_relative_module_name: "Ambient external module declaration cannot specify relative module name.", - Import_declaration_in_an_ambient_external_module_declaration_cannot_reference_external_module_through_relative_external_module_name: "Import declaration in an ambient external module declaration cannot reference external module through relative external module name.", - No_best_common_type_exists_among_return_expressions: "No best common type exists among return expressions.", - Import_declaration_cannot_refer_to_external_module_reference_when_noResolve_option_is_set: "Import declaration cannot refer to external module reference when --noResolve option is set.", - Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference: "Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference.", - Duplicate_identifier_super_Compiler_uses_super_to_capture_base_class_reference: "Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference.", - Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference: "Expression resolves to variable declaration '_this' that compiler uses to capture 'this' reference.", - Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference: "Expression resolves to '_super' that compiler uses to capture base class reference.", - TypeParameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_type_1: "TypeParameter '{0}' of constructor signature from exported interface has or is using private type '{1}'.", - TypeParameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_type_1: "TypeParameter '{0}' of call signature from exported interface has or is using private type '{1}'.", - TypeParameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_type_1: "TypeParameter '{0}' of public static method from exported class has or is using private type '{1}'.", - TypeParameter_0_of_public_method_from_exported_class_has_or_is_using_private_type_1: "TypeParameter '{0}' of public method from exported class has or is using private type '{1}'.", - TypeParameter_0_of_method_from_exported_interface_has_or_is_using_private_type_1: "TypeParameter '{0}' of method from exported interface has or is using private type '{1}'.", - TypeParameter_0_of_exported_function_has_or_is_using_private_type_1: "TypeParameter '{0}' of exported function has or is using private type '{1}'.", - TypeParameter_0_of_constructor_signature_from_exported_interface_is_using_inaccessible_module_1: "TypeParameter '{0}' of constructor signature from exported interface is using inaccessible module {1}.", - TypeParameter_0_of_call_signature_from_exported_interface_is_using_inaccessible_module_1: "TypeParameter '{0}' of call signature from exported interface is using inaccessible module {1}", - TypeParameter_0_of_public_static_method_from_exported_class_is_using_inaccessible_module_1: "TypeParameter '{0}' of public static method from exported class is using inaccessible module {1}.", - TypeParameter_0_of_public_method_from_exported_class_is_using_inaccessible_module_1: "TypeParameter '{0}' of public method from exported class is using inaccessible module {1}.", - TypeParameter_0_of_method_from_exported_interface_is_using_inaccessible_module_1: "TypeParameter '{0}' of method from exported interface is using inaccessible module {1}.", - TypeParameter_0_of_exported_function_is_using_inaccessible_module_1: "TypeParameter '{0}' of exported function is using inaccessible module {1}.", - TypeParameter_0_of_exported_class_has_or_is_using_private_type_1: "TypeParameter '{0}' of exported class has or is using private type '{1}'.", - TypeParameter_0_of_exported_interface_has_or_is_using_private_type_1: "TypeParameter '{0}' of exported interface has or is using private type '{1}'.", - TypeParameter_0_of_exported_class_is_using_inaccessible_module_1: "TypeParameter '{0}' of exported class is using inaccessible module {1}.", - TypeParameter_0_of_exported_interface_is_using_inaccessible_module_1: "TypeParameter '{0}' of exported interface is using inaccessible module {1}.", - Duplicate_identifier_i_Compiler_uses_i_to_initialize_rest_parameter: "Duplicate identifier '_i'. Compiler uses '_i' to initialize rest parameter.", - Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters: "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", - No_best_common_type_exists_between_0_and_1: "No best common type exists between '{0}' and '{1}'.", - No_best_common_type_exists_between_0_1_and_2: "No best common type exists between '{0}', '{1}', and '{2}'.", - Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_an_external_module: "Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of an external module.", - Constraint_of_a_type_parameter_cannot_reference_any_type_parameter_from_the_same_type_parameter_list: "Constraint of a type parameter cannot reference any type parameter from the same type parameter list.", - Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor: "Initializer of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor.", - Parameter_0_cannot_be_referenced_in_its_initializer: "Parameter '{0}' cannot be referenced in its initializer.", - Duplicate_string_index_signature: "Duplicate string index signature.", - Duplicate_number_index_signature: "Duplicate number index signature.", - All_declarations_of_an_interface_must_have_identical_type_parameters: "All declarations of an interface must have identical type parameters.", - Expression_resolves_to_variable_declaration_i_that_compiler_uses_to_initialize_rest_parameter: "Expression resolves to variable declaration '_i' that compiler uses to initialize rest parameter.", - Neither_type_0_nor_type_1_is_assignable_to_the_other: "Neither type '{0}' nor type '{1}' is assignable to the other.", - Neither_type_0_nor_type_1_is_assignable_to_the_other_NL_2: "Neither type '{0}' nor type '{1}' is assignable to the other:{NL}{2}", - Duplicate_function_implementation: "Duplicate function implementation.", - Function_implementation_expected: "Function implementation expected.", - Function_overload_name_must_be_0: "Function overload name must be '{0}'.", - Constructor_implementation_expected: "Constructor implementation expected.", - Class_name_cannot_be_0: "Class name cannot be '{0}'.", - Interface_name_cannot_be_0: "Interface name cannot be '{0}'.", - Enum_name_cannot_be_0: "Enum name cannot be '{0}'.", - A_module_cannot_have_multiple_export_assignments: "A module cannot have multiple export assignments.", - Export_assignment_not_allowed_in_module_with_exported_element: "Export assignment not allowed in module with exported element.", - A_parameter_property_is_only_allowed_in_a_constructor_implementation: "A parameter property is only allowed in a constructor implementation.", - Function_overload_must_be_static: "Function overload must be static.", - Function_overload_must_not_be_static: "Function overload must not be static.", - Type_0_is_missing_property_1_from_type_2: "Type '{0}' is missing property '{1}' from type '{2}'.", - Types_of_property_0_of_types_1_and_2_are_incompatible: "Types of property '{0}' of types '{1}' and '{2}' are incompatible.", - Types_of_property_0_of_types_1_and_2_are_incompatible_NL_3: "Types of property '{0}' of types '{1}' and '{2}' are incompatible:{NL}{3}", - Property_0_defined_as_private_in_type_1_is_defined_as_public_in_type_2: "Property '{0}' defined as private in type '{1}' is defined as public in type '{2}'.", - Property_0_defined_as_public_in_type_1_is_defined_as_private_in_type_2: "Property '{0}' defined as public in type '{1}' is defined as private in type '{2}'.", - Types_0_and_1_define_property_2_as_private: "Types '{0}' and '{1}' define property '{2}' as private.", - Call_signatures_of_types_0_and_1_are_incompatible: "Call signatures of types '{0}' and '{1}' are incompatible.", - Call_signatures_of_types_0_and_1_are_incompatible_NL_2: "Call signatures of types '{0}' and '{1}' are incompatible:{NL}{2}", - Type_0_requires_a_call_signature_but_type_1_lacks_one: "Type '{0}' requires a call signature, but type '{1}' lacks one.", - Construct_signatures_of_types_0_and_1_are_incompatible: "Construct signatures of types '{0}' and '{1}' are incompatible.", - Construct_signatures_of_types_0_and_1_are_incompatible_NL_2: "Construct signatures of types '{0}' and '{1}' are incompatible:{NL}{2}", - Type_0_requires_a_construct_signature_but_type_1_lacks_one: "Type '{0}' requires a construct signature, but type '{1}' lacks one.", - Index_signatures_of_types_0_and_1_are_incompatible: "Index signatures of types '{0}' and '{1}' are incompatible.", - Index_signatures_of_types_0_and_1_are_incompatible_NL_2: "Index signatures of types '{0}' and '{1}' are incompatible:{NL}{2}", - Call_signature_expects_0_or_fewer_parameters: "Call signature expects {0} or fewer parameters.", - Could_not_apply_type_0_to_argument_1_which_is_of_type_2: "Could not apply type '{0}' to argument {1} which is of type '{2}'.", - Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_function: "Class '{0}' defines instance member accessor '{1}', but extended class '{2}' defines it as instance member function.", - Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_function: "Class '{0}' defines instance member property '{1}', but extended class '{2}' defines it as instance member function.", - Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor: "Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member accessor.", - Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_property: "Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member property.", - Types_of_static_property_0_of_class_1_and_class_2_are_incompatible: "Types of static property '{0}' of class '{1}' and class '{2}' are incompatible.", - Types_of_static_property_0_of_class_1_and_class_2_are_incompatible_NL_3: "Types of static property '{0}' of class '{1}' and class '{2}' are incompatible:{NL}{3}", - Type_reference_cannot_refer_to_container_0: "Type reference cannot refer to container '{0}'.", - Type_reference_must_refer_to_type: "Type reference must refer to type.", - In_enums_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_the_first_enum_element: "In enums with multiple declarations only one declaration can omit an initializer for the first enum element.", - _0_overload_s: " (+ {0} overload(s))", - Variable_declaration_cannot_have_the_same_name_as_an_import_declaration: "Variable declaration cannot have the same name as an import declaration.", - Signature_expected_0_type_arguments_got_1_instead: "Signature expected {0} type arguments, got {1} instead.", - Property_0_defined_as_optional_in_type_1_but_is_required_in_type_2: "Property '{0}' defined as optional in type '{1}', but is required in type '{2}'.", - Types_0_and_1_originating_in_infinitely_expanding_type_reference_do_not_refer_to_same_named_type: "Types '{0}' and '{1}' originating in infinitely expanding type reference do not refer to same named type.", - Types_0_and_1_originating_in_infinitely_expanding_type_reference_have_incompatible_type_arguments: "Types '{0}' and '{1}' originating in infinitely expanding type reference have incompatible type arguments.", - Types_0_and_1_originating_in_infinitely_expanding_type_reference_have_incompatible_type_arguments_NL_2: "Types '{0}' and '{1}' originating in infinitely expanding type reference have incompatible type arguments:{NL}{2}", - Named_properties_0_of_types_1_and_2_are_not_identical: "Named properties '{0}' of types '{1}' and '{2}' are not identical.", - Types_of_string_indexer_of_types_0_and_1_are_not_identical: "Types of string indexer of types '{0}' and '{1}' are not identical.", - Types_of_number_indexer_of_types_0_and_1_are_not_identical: "Types of number indexer of types '{0}' and '{1}' are not identical.", - Type_of_number_indexer_in_type_0_is_not_assignable_to_string_indexer_type_in_type_1_NL_2: "Type of number indexer in type '{0}' is not assignable to string indexer type in type '{1}'.{NL}{2}", - Type_of_property_0_in_type_1_is_not_assignable_to_string_indexer_type_in_type_2_NL_3: "Type of property '{0}' in type '{1}' is not assignable to string indexer type in type '{2}'.{NL}{3}", - Type_of_property_0_in_type_1_is_not_assignable_to_number_indexer_type_in_type_2_NL_3: "Type of property '{0}' in type '{1}' is not assignable to number indexer type in type '{2}'.{NL}{3}", - Static_property_0_defined_as_private_in_type_1_is_defined_as_public_in_type_2: "Static property '{0}' defined as private in type '{1}' is defined as public in type '{2}'.", - Static_property_0_defined_as_public_in_type_1_is_defined_as_private_in_type_2: "Static property '{0}' defined as public in type '{1}' is defined as private in type '{2}'.", - Types_0_and_1_define_static_property_2_as_private: "Types '{0}' and '{1}' define static property '{2}' as private.", - Current_host_does_not_support_0_option: "Current host does not support '{0}' option.", - ECMAScript_target_version_0_not_supported_Specify_a_valid_target_version_1_default_or_2: "ECMAScript target version '{0}' not supported. Specify a valid target version: '{1}' (default), or '{2}'", - Argument_for_0_option_must_be_1_or_2: "Argument for '{0}' option must be '{1}' or '{2}'", - Could_not_find_file_0: "Could not find file: '{0}'.", - A_file_cannot_have_a_reference_to_itself: "A file cannot have a reference to itself.", - Cannot_resolve_referenced_file_0: "Cannot resolve referenced file: '{0}'.", - Cannot_find_the_common_subdirectory_path_for_the_input_files: "Cannot find the common subdirectory path for the input files.", - Emit_Error_0: "Emit Error: {0}.", - Cannot_read_file_0_1: "Cannot read file '{0}': {1}", - Unsupported_file_encoding: "Unsupported file encoding.", - Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1: "Locale must be of the form or -. For example '{0}' or '{1}'.", - Unsupported_locale_0: "Unsupported locale: '{0}'.", - Execution_Failed_NL: "Execution Failed.{NL}", - Invalid_call_to_up: "Invalid call to 'up'", - Invalid_call_to_down: "Invalid call to 'down'", - Base64_value_0_finished_with_a_continuation_bit: "Base64 value '{0}' finished with a continuation bit.", - Unknown_compiler_option_0: "Unknown compiler option '{0}'", - Expected_0_arguments_to_message_got_1_instead: "Expected {0} arguments to message, got {1} instead.", - Expected_the_message_0_to_have_1_arguments_but_it_had_2: "Expected the message '{0}' to have {1} arguments, but it had {2}", - Could_not_delete_file_0: "Could not delete file '{0}'", - Could_not_create_directory_0: "Could not create directory '{0}'", - Error_while_executing_file_0: "Error while executing file '{0}': ", - Cannot_compile_external_modules_unless_the_module_flag_is_provided: "Cannot compile external modules unless the '--module' flag is provided.", - Option_mapRoot_cannot_be_specified_without_specifying_sourcemap_option: "Option mapRoot cannot be specified without specifying sourcemap option.", - Option_sourceRoot_cannot_be_specified_without_specifying_sourcemap_option: "Option sourceRoot cannot be specified without specifying sourcemap option.", - Options_mapRoot_and_sourceRoot_cannot_be_specified_without_specifying_sourcemap_option: "Options mapRoot and sourceRoot cannot be specified without specifying sourcemap option.", - Option_0_specified_without_1: "Option '{0}' specified without '{1}'", - codepage_option_not_supported_on_current_platform: "'codepage' option not supported on current platform.", - Concatenate_and_emit_output_to_single_file: "Concatenate and emit output to single file.", - Generates_corresponding_0_file: "Generates corresponding {0} file.", - Specifies_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations: "Specifies the location where debugger should locate map files instead of generated locations.", - Specifies_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations: "Specifies the location where debugger should locate TypeScript files instead of source locations.", - Watch_input_files: "Watch input files.", - Redirect_output_structure_to_the_directory: "Redirect output structure to the directory.", - Do_not_emit_comments_to_output: "Do not emit comments to output.", - Skip_resolution_and_preprocessing: "Skip resolution and preprocessing.", - Specify_ECMAScript_target_version_0_default_or_1: "Specify ECMAScript target version: '{0}' (default), or '{1}'", - Specify_module_code_generation_0_or_1: "Specify module code generation: '{0}' or '{1}'", - Print_this_message: "Print this message.", - Print_the_compiler_s_version_0: "Print the compiler's version: {0}", - Allow_use_of_deprecated_0_keyword_when_referencing_an_external_module: "Allow use of deprecated '{0}' keyword when referencing an external module.", - Specify_locale_for_errors_and_messages_For_example_0_or_1: "Specify locale for errors and messages. For example '{0}' or '{1}'", - Syntax_0: "Syntax: {0}", - options: "options", - file1: "file", - Examples: "Examples:", - Options: "Options:", - Insert_command_line_options_and_files_from_a_file: "Insert command line options and files from a file.", - Version_0: "Version {0}", - Use_the_0_flag_to_see_options: "Use the '{0}' flag to see options.", - NL_Recompiling_0: "{NL}Recompiling ({0}):", - STRING: "STRING", - KIND: "KIND", - file2: "FILE", - VERSION: "VERSION", - LOCATION: "LOCATION", - DIRECTORY: "DIRECTORY", - NUMBER: "NUMBER", - Specify_the_codepage_to_use_when_opening_source_files: "Specify the codepage to use when opening source files.", - Additional_locations: "Additional locations:", - This_version_of_the_Javascript_runtime_does_not_support_the_0_function: "This version of the Javascript runtime does not support the '{0}' function.", - Unknown_rule: "Unknown rule.", - Invalid_line_number_0: "Invalid line number ({0})", - Warn_on_expressions_and_declarations_with_an_implied_any_type: "Warn on expressions and declarations with an implied 'any' type.", - Variable_0_implicitly_has_an_any_type: "Variable '{0}' implicitly has an 'any' type.", - Parameter_0_of_1_implicitly_has_an_any_type: "Parameter '{0}' of '{1}' implicitly has an 'any' type.", - Parameter_0_of_function_type_implicitly_has_an_any_type: "Parameter '{0}' of function type implicitly has an 'any' type.", - Member_0_of_object_type_implicitly_has_an_any_type: "Member '{0}' of object type implicitly has an 'any' type.", - new_expression_which_lacks_a_constructor_signature_implicitly_has_an_any_type: "'new' expression, which lacks a constructor signature, implicitly has an 'any' type.", - _0_which_lacks_return_type_annotation_implicitly_has_an_any_return_type: "'{0}', which lacks return-type annotation, implicitly has an 'any' return type.", - Function_expression_which_lacks_return_type_annotation_implicitly_has_an_any_return_type: "Function expression, which lacks return-type annotation, implicitly has an 'any' return type.", - Parameter_0_of_lambda_function_implicitly_has_an_any_type: "Parameter '{0}' of lambda function implicitly has an 'any' type.", - Constructor_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type: "Constructor signature, which lacks return-type annotation, implicitly has an 'any' return type.", - Lambda_Function_which_lacks_return_type_annotation_implicitly_has_an_any_return_type: "Lambda Function, which lacks return-type annotation, implicitly has an 'any' return type.", - Array_Literal_implicitly_has_an_any_type_from_widening: "Array Literal implicitly has an 'any' type from widening.", - _0_which_lacks_get_accessor_and_parameter_type_annotation_on_set_accessor_implicitly_has_an_any_type: "'{0}', which lacks 'get' accessor and parameter type annotation on 'set' accessor, implicitly has an 'any' type.", - Index_signature_of_object_type_implicitly_has_an_any_type: "Index signature of object type implicitly has an 'any' type.", - Object_literal_s_property_0_implicitly_has_an_any_type_from_widening: "Object literal's property '{0}' implicitly has an 'any' type from widening." - }; -})(TypeScript || (TypeScript = {})); -var TypeScript; -(function (TypeScript) { - (function (DiagnosticCategory) { - DiagnosticCategory[DiagnosticCategory["Warning"] = 0] = "Warning"; - DiagnosticCategory[DiagnosticCategory["Error"] = 1] = "Error"; - DiagnosticCategory[DiagnosticCategory["Message"] = 2] = "Message"; - DiagnosticCategory[DiagnosticCategory["NoPrefix"] = 3] = "NoPrefix"; - })(TypeScript.DiagnosticCategory || (TypeScript.DiagnosticCategory = {})); - var DiagnosticCategory = TypeScript.DiagnosticCategory; -})(TypeScript || (TypeScript = {})); -var TypeScript; -(function (TypeScript) { - TypeScript.diagnosticInformationMap = { - "error TS{0}: {1}": { "code": 0, "category": 3 /* NoPrefix */ }, - "warning TS{0}: {1}": { "code": 1, "category": 3 /* NoPrefix */ }, - "Unrecognized escape sequence.": { "code": 1000, "category": 1 /* Error */ }, - "Unexpected character {0}.": { "code": 1001, "category": 1 /* Error */ }, - "Missing close quote character.": { "code": 1002, "category": 1 /* Error */ }, - "Identifier expected.": { "code": 1003, "category": 1 /* Error */ }, - "'{0}' keyword expected.": { "code": 1004, "category": 1 /* Error */ }, - "'{0}' expected.": { "code": 1005, "category": 1 /* Error */ }, - "Identifier expected; '{0}' is a keyword.": { "code": 1006, "category": 1 /* Error */ }, - "Automatic semicolon insertion not allowed.": { "code": 1007, "category": 1 /* Error */ }, - "Unexpected token; '{0}' expected.": { "code": 1008, "category": 1 /* Error */ }, - "Trailing comma not allowed.": { "code": 1009, "category": 1 /* Error */ }, - "'*/' expected.": { "code": 1010, "category": 1 /* Error */ }, - "'public' or 'private' modifier must precede 'static'.": { "code": 1011, "category": 1 /* Error */ }, - "Unexpected token.": { "code": 1012, "category": 1 /* Error */ }, - "Catch clause parameter cannot have a type annotation.": { "code": 1013, "category": 1 /* Error */ }, - "A rest parameter must be last in a parameter list.": { "code": 1014, "category": 1 /* Error */ }, - "Parameter cannot have question mark and initializer.": { "code": 1015, "category": 1 /* Error */ }, - "A required parameter cannot follow an optional parameter.": { "code": 1016, "category": 1 /* Error */ }, - "Index signatures cannot have rest parameters.": { "code": 1017, "category": 1 /* Error */ }, - "Index signature parameter cannot have accessibility modifiers.": { "code": 1018, "category": 1 /* Error */ }, - "Index signature parameter cannot have a question mark.": { "code": 1019, "category": 1 /* Error */ }, - "Index signature parameter cannot have an initializer.": { "code": 1020, "category": 1 /* Error */ }, - "Index signature must have a type annotation.": { "code": 1021, "category": 1 /* Error */ }, - "Index signature parameter must have a type annotation.": { "code": 1022, "category": 1 /* Error */ }, - "Index signature parameter type must be 'string' or 'number'.": { "code": 1023, "category": 1 /* Error */ }, - "'extends' clause already seen.": { "code": 1024, "category": 1 /* Error */ }, - "'extends' clause must precede 'implements' clause.": { "code": 1025, "category": 1 /* Error */ }, - "Classes can only extend a single class.": { "code": 1026, "category": 1 /* Error */ }, - "'implements' clause already seen.": { "code": 1027, "category": 1 /* Error */ }, - "Accessibility modifier already seen.": { "code": 1028, "category": 1 /* Error */ }, - "'{0}' modifier must precede '{1}' modifier.": { "code": 1029, "category": 1 /* Error */ }, - "'{0}' modifier already seen.": { "code": 1030, "category": 1 /* Error */ }, - "'{0}' modifier cannot appear on a class element.": { "code": 1031, "category": 1 /* Error */ }, - "Interface declaration cannot have 'implements' clause.": { "code": 1032, "category": 1 /* Error */ }, - "'super' invocation cannot have type arguments.": { "code": 1034, "category": 1 /* Error */ }, - "Only ambient modules can use quoted names.": { "code": 1035, "category": 1 /* Error */ }, - "Statements are not allowed in ambient contexts.": { "code": 1036, "category": 1 /* Error */ }, - "A function implementation cannot be declared in an ambient context.": { "code": 1037, "category": 1 /* Error */ }, - "A 'declare' modifier cannot be used in an already ambient context.": { "code": 1038, "category": 1 /* Error */ }, - "Initializers are not allowed in ambient contexts.": { "code": 1039, "category": 1 /* Error */ }, - "'{0}' modifier cannot appear on a module element.": { "code": 1044, "category": 1 /* Error */ }, - "A 'declare' modifier cannot be used with an interface declaration.": { "code": 1045, "category": 1 /* Error */ }, - "A 'declare' modifier is required for a top level declaration in a .d.ts file.": { "code": 1046, "category": 1 /* Error */ }, - "A rest parameter cannot be optional.": { "code": 1047, "category": 1 /* Error */ }, - "A rest parameter cannot have an initializer.": { "code": 1048, "category": 1 /* Error */ }, - "'set' accessor must have exactly one parameter.": { "code": 1049, "category": 1 /* Error */ }, - "'set' accessor parameter cannot be optional.": { "code": 1051, "category": 1 /* Error */ }, - "'set' accessor parameter cannot have an initializer.": { "code": 1052, "category": 1 /* Error */ }, - "'set' accessor cannot have rest parameter.": { "code": 1053, "category": 1 /* Error */ }, - "'get' accessor cannot have parameters.": { "code": 1054, "category": 1 /* Error */ }, - "Modifiers cannot appear here.": { "code": 1055, "category": 1 /* Error */ }, - "Accessors are only available when targeting ECMAScript 5 and higher.": { "code": 1056, "category": 1 /* Error */ }, - "Enum member must have initializer.": { "code": 1061, "category": 1 /* Error */ }, - "Export assignment cannot be used in internal modules.": { "code": 1063, "category": 1 /* Error */ }, - "Ambient enum elements can only have integer literal initializers.": { "code": 1066, "category": 1 /* Error */ }, - "module, class, interface, enum, import or statement": { "code": 1067, "category": 3 /* NoPrefix */ }, - "constructor, function, accessor or variable": { "code": 1068, "category": 3 /* NoPrefix */ }, - "statement": { "code": 1069, "category": 3 /* NoPrefix */ }, - "case or default clause": { "code": 1070, "category": 3 /* NoPrefix */ }, - "identifier": { "code": 1071, "category": 3 /* NoPrefix */ }, - "call, construct, index, property or function signature": { "code": 1072, "category": 3 /* NoPrefix */ }, - "expression": { "code": 1073, "category": 3 /* NoPrefix */ }, - "type name": { "code": 1074, "category": 3 /* NoPrefix */ }, - "property or accessor": { "code": 1075, "category": 3 /* NoPrefix */ }, - "parameter": { "code": 1076, "category": 3 /* NoPrefix */ }, - "type": { "code": 1077, "category": 3 /* NoPrefix */ }, - "type parameter": { "code": 1078, "category": 3 /* NoPrefix */ }, - "A 'declare' modifier cannot be used with an import declaration.": { "code": 1079, "category": 1 /* Error */ }, - "Invalid 'reference' directive syntax.": { "code": 1084, "category": 1 /* Error */ }, - "Octal literals are not available when targeting ECMAScript 5 and higher.": { "code": 1085, "category": 1 /* Error */ }, - "Accessors are not allowed in ambient contexts.": { "code": 1086, "category": 1 /* Error */ }, - "'{0}' modifier cannot appear on a constructor declaration.": { "code": 1089, "category": 1 /* Error */ }, - "'{0}' modifier cannot appear on a parameter.": { "code": 1090, "category": 1 /* Error */ }, - "Only a single variable declaration is allowed in a 'for...in' statement.": { "code": 1091, "category": 1 /* Error */ }, - "Type parameters cannot appear on a constructor declaration.": { "code": 1092, "category": 1 /* Error */ }, - "Type annotation cannot appear on a constructor declaration.": { "code": 1093, "category": 1 /* Error */ }, - "Type parameters cannot appear on an accessor.": { "code": 1094, "category": 1 /* Error */ }, - "Type annotation cannot appear on a 'set' accessor.": { "code": 1095, "category": 1 /* Error */ }, - "Index signature must have exactly one parameter.": { "code": 1096, "category": 1 /* Error */ }, - "'{0}' list cannot be empty.": { "code": 1097, "category": 1 /* Error */ }, - "variable declaration": { "code": 1098, "category": 3 /* NoPrefix */ }, - "type argument": { "code": 1099, "category": 3 /* NoPrefix */ }, - "Invalid use of '{0}' in strict mode.": { "code": 1100, "category": 1 /* Error */ }, - "'with' statements are not allowed in strict mode.": { "code": 1101, "category": 1 /* Error */ }, - "'delete' cannot be called on an identifier in strict mode.": { "code": 1102, "category": 1 /* Error */ }, - "Invalid left-hand side in 'for...in' statement.": { "code": 1103, "category": 1 /* Error */ }, - "'continue' statement can only be used within an enclosing iteration statement.": { "code": 1104, "category": 1 /* Error */ }, - "'break' statement can only be used within an enclosing iteration or switch statement.": { "code": 1105, "category": 1 /* Error */ }, - "Jump target not found.": { "code": 1106, "category": 1 /* Error */ }, - "Jump target cannot cross function boundary.": { "code": 1107, "category": 1 /* Error */ }, - "'return' statement must be contained within a function body.": { "code": 1108, "category": 1 /* Error */ }, - "Expression expected.": { "code": 1109, "category": 1 /* Error */ }, - "Type expected.": { "code": 1110, "category": 1 /* Error */ }, - "Template literal cannot be used as an element name.": { "code": 1111, "category": 1 /* Error */ }, - "Duplicate identifier '{0}'.": { "code": 2000, "category": 1 /* Error */ }, - "The name '{0}' does not exist in the current scope.": { "code": 2001, "category": 1 /* Error */ }, - "The name '{0}' does not refer to a value.": { "code": 2002, "category": 1 /* Error */ }, - "'super' can only be used inside a class instance method.": { "code": 2003, "category": 1 /* Error */ }, - "The left-hand side of an assignment expression must be a variable, property or indexer.": { "code": 2004, "category": 1 /* Error */ }, - "Value of type '{0}' is not callable. Did you mean to include 'new'?": { "code": 2161, "category": 1 /* Error */ }, - "Value of type '{0}' is not callable.": { "code": 2006, "category": 1 /* Error */ }, - "Value of type '{0}' is not newable.": { "code": 2007, "category": 1 /* Error */ }, - "An index expression argument must be 'string', 'number', or 'any'.": { "code": 2008, "category": 1 /* Error */ }, - "Operator '{0}' cannot be applied to types '{1}' and '{2}'.": { "code": 2009, "category": 1 /* Error */ }, - "Type '{0}' is not assignable to type '{1}'.": { "code": 2011, "category": 1 /* Error */ }, - "Type '{0}' is not assignable to type '{1}':{NL}{2}": { "code": 2012, "category": 1 /* Error */ }, - "Expected var, class, interface, or module.": { "code": 2013, "category": 1 /* Error */ }, - "Getter '{0}' already declared.": { "code": 2015, "category": 1 /* Error */ }, - "Setter '{0}' already declared.": { "code": 2016, "category": 1 /* Error */ }, - "Exported class '{0}' extends private class '{1}'.": { "code": 2018, "category": 1 /* Error */ }, - "Exported class '{0}' implements private interface '{1}'.": { "code": 2019, "category": 1 /* Error */ }, - "Exported interface '{0}' extends private interface '{1}'.": { "code": 2020, "category": 1 /* Error */ }, - "Exported class '{0}' extends class from inaccessible module {1}.": { "code": 2021, "category": 1 /* Error */ }, - "Exported class '{0}' implements interface from inaccessible module {1}.": { "code": 2022, "category": 1 /* Error */ }, - "Exported interface '{0}' extends interface from inaccessible module {1}.": { "code": 2023, "category": 1 /* Error */ }, - "Public static property '{0}' of exported class has or is using private type '{1}'.": { "code": 2024, "category": 1 /* Error */ }, - "Public property '{0}' of exported class has or is using private type '{1}'.": { "code": 2025, "category": 1 /* Error */ }, - "Property '{0}' of exported interface has or is using private type '{1}'.": { "code": 2026, "category": 1 /* Error */ }, - "Exported variable '{0}' has or is using private type '{1}'.": { "code": 2027, "category": 1 /* Error */ }, - "Public static property '{0}' of exported class is using inaccessible module {1}.": { "code": 2028, "category": 1 /* Error */ }, - "Public property '{0}' of exported class is using inaccessible module {1}.": { "code": 2029, "category": 1 /* Error */ }, - "Property '{0}' of exported interface is using inaccessible module {1}.": { "code": 2030, "category": 1 /* Error */ }, - "Exported variable '{0}' is using inaccessible module {1}.": { "code": 2031, "category": 1 /* Error */ }, - "Parameter '{0}' of constructor from exported class has or is using private type '{1}'.": { "code": 2032, "category": 1 /* Error */ }, - "Parameter '{0}' of public static property setter from exported class has or is using private type '{1}'.": { "code": 2033, "category": 1 /* Error */ }, - "Parameter '{0}' of public property setter from exported class has or is using private type '{1}'.": { "code": 2034, "category": 1 /* Error */ }, - "Parameter '{0}' of constructor signature from exported interface has or is using private type '{1}'.": { "code": 2035, "category": 1 /* Error */ }, - "Parameter '{0}' of call signature from exported interface has or is using private type '{1}'.": { "code": 2036, "category": 1 /* Error */ }, - "Parameter '{0}' of public static method from exported class has or is using private type '{1}'.": { "code": 2037, "category": 1 /* Error */ }, - "Parameter '{0}' of public method from exported class has or is using private type '{1}'.": { "code": 2038, "category": 1 /* Error */ }, - "Parameter '{0}' of method from exported interface has or is using private type '{1}'.": { "code": 2039, "category": 1 /* Error */ }, - "Parameter '{0}' of exported function has or is using private type '{1}'.": { "code": 2040, "category": 1 /* Error */ }, - "Parameter '{0}' of constructor from exported class is using inaccessible module {1}.": { "code": 2041, "category": 1 /* Error */ }, - "Parameter '{0}' of public static property setter from exported class is using inaccessible module {1}.": { "code": 2042, "category": 1 /* Error */ }, - "Parameter '{0}' of public property setter from exported class is using inaccessible module {1}.": { "code": 2043, "category": 1 /* Error */ }, - "Parameter '{0}' of constructor signature from exported interface is using inaccessible module {1}.": { "code": 2044, "category": 1 /* Error */ }, - "Parameter '{0}' of call signature from exported interface is using inaccessible module {1}": { "code": 2045, "category": 1 /* Error */ }, - "Parameter '{0}' of public static method from exported class is using inaccessible module {1}.": { "code": 2046, "category": 1 /* Error */ }, - "Parameter '{0}' of public method from exported class is using inaccessible module {1}.": { "code": 2047, "category": 1 /* Error */ }, - "Parameter '{0}' of method from exported interface is using inaccessible module {1}.": { "code": 2048, "category": 1 /* Error */ }, - "Parameter '{0}' of exported function is using inaccessible module {1}.": { "code": 2049, "category": 1 /* Error */ }, - "Return type of public static property getter from exported class has or is using private type '{0}'.": { "code": 2050, "category": 1 /* Error */ }, - "Return type of public property getter from exported class has or is using private type '{0}'.": { "code": 2051, "category": 1 /* Error */ }, - "Return type of constructor signature from exported interface has or is using private type '{0}'.": { "code": 2052, "category": 1 /* Error */ }, - "Return type of call signature from exported interface has or is using private type '{0}'.": { "code": 2053, "category": 1 /* Error */ }, - "Return type of index signature from exported interface has or is using private type '{0}'.": { "code": 2054, "category": 1 /* Error */ }, - "Return type of public static method from exported class has or is using private type '{0}'.": { "code": 2055, "category": 1 /* Error */ }, - "Return type of public method from exported class has or is using private type '{0}'.": { "code": 2056, "category": 1 /* Error */ }, - "Return type of method from exported interface has or is using private type '{0}'.": { "code": 2057, "category": 1 /* Error */ }, - "Return type of exported function has or is using private type '{0}'.": { "code": 2058, "category": 1 /* Error */ }, - "Return type of public static property getter from exported class is using inaccessible module {0}.": { "code": 2059, "category": 1 /* Error */ }, - "Return type of public property getter from exported class is using inaccessible module {0}.": { "code": 2060, "category": 1 /* Error */ }, - "Return type of constructor signature from exported interface is using inaccessible module {0}.": { "code": 2061, "category": 1 /* Error */ }, - "Return type of call signature from exported interface is using inaccessible module {0}.": { "code": 2062, "category": 1 /* Error */ }, - "Return type of index signature from exported interface is using inaccessible module {0}.": { "code": 2063, "category": 1 /* Error */ }, - "Return type of public static method from exported class is using inaccessible module {0}.": { "code": 2064, "category": 1 /* Error */ }, - "Return type of public method from exported class is using inaccessible module {0}.": { "code": 2065, "category": 1 /* Error */ }, - "Return type of method from exported interface is using inaccessible module {0}.": { "code": 2066, "category": 1 /* Error */ }, - "Return type of exported function is using inaccessible module {0}.": { "code": 2067, "category": 1 /* Error */ }, - "'new T[]' cannot be used to create an array. Use 'new Array()' instead.": { "code": 2068, "category": 1 /* Error */ }, - "A parameter list must follow a generic type argument list. '(' expected.": { "code": 2069, "category": 1 /* Error */ }, - "Multiple constructor implementations are not allowed.": { "code": 2070, "category": 1 /* Error */ }, - "Cannot find external module '{0}'.": { "code": 2071, "category": 1 /* Error */ }, - "Module cannot be aliased to a non-module type.": { "code": 2072, "category": 1 /* Error */ }, - "A class may only extend another class.": { "code": 2073, "category": 1 /* Error */ }, - "A class may only implement another class or interface.": { "code": 2074, "category": 1 /* Error */ }, - "An interface may only extend a class or another interface.": { "code": 2075, "category": 1 /* Error */ }, - "Unable to resolve type.": { "code": 2077, "category": 1 /* Error */ }, - "Unable to resolve type of '{0}'.": { "code": 2078, "category": 1 /* Error */ }, - "Unable to resolve type parameter constraint.": { "code": 2079, "category": 1 /* Error */ }, - "Type parameter constraint cannot be a primitive type.": { "code": 2080, "category": 1 /* Error */ }, - "Supplied parameters do not match any signature of call target.": { "code": 2081, "category": 1 /* Error */ }, - "Supplied parameters do not match any signature of call target:{NL}{0}": { "code": 2082, "category": 1 /* Error */ }, - "Cannot use 'new' with an expression whose type lacks a signature.": { "code": 2083, "category": 1 /* Error */ }, - "Only a void function can be called with the 'new' keyword.": { "code": 2084, "category": 1 /* Error */ }, - "Could not select overload for 'new' expression.": { "code": 2085, "category": 1 /* Error */ }, - "Type '{0}' does not satisfy the constraint '{1}'.": { "code": 2086, "category": 1 /* Error */ }, - "Could not select overload for 'call' expression.": { "code": 2087, "category": 1 /* Error */ }, - "Cannot invoke an expression whose type lacks a call signature.": { "code": 2088, "category": 1 /* Error */ }, - "Calls to 'super' are only valid inside a class.": { "code": 2089, "category": 1 /* Error */ }, - "Generic type '{0}' requires {1} type argument(s).": { "code": 2090, "category": 1 /* Error */ }, - "Type of array literal cannot be determined. Best common type could not be found for array elements.": { "code": 2092, "category": 1 /* Error */ }, - "Could not find enclosing symbol for dotted name '{0}'.": { "code": 2093, "category": 1 /* Error */ }, - "Property '{0}' does not exist on value of type '{1}'.": { "code": 2094, "category": 1 /* Error */ }, - "Cannot find name '{0}'.": { "code": 2095, "category": 1 /* Error */ }, - "'get' and 'set' accessor must have the same type.": { "code": 2096, "category": 1 /* Error */ }, - "'this' cannot be referenced in current location.": { "code": 2097, "category": 1 /* Error */ }, - "Static members cannot reference class type parameters.": { "code": 2099, "category": 1 /* Error */ }, - "Type '{0}' recursively references itself as a base type.": { "code": 2100, "category": 1 /* Error */ }, - "'super' property access is permitted only in a constructor, member function, or member accessor of a derived class.": { "code": 2102, "category": 1 /* Error */ }, - "'super' can only be referenced in a derived class.": { "code": 2103, "category": 1 /* Error */ }, - "A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties.": { "code": 2104, "category": 1 /* Error */ }, - "Constructors for derived classes must contain a 'super' call.": { "code": 2105, "category": 1 /* Error */ }, - "Super calls are not permitted outside constructors or in nested functions inside constructors.": { "code": 2106, "category": 1 /* Error */ }, - "'{0}.{1}' is inaccessible.": { "code": 2107, "category": 1 /* Error */ }, - "'this' cannot be referenced in a module body.": { "code": 2108, "category": 1 /* Error */ }, - "Invalid '+' expression - types not known to support the addition operator.": { "code": 2111, "category": 1 /* Error */ }, - "The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.": { "code": 2112, "category": 1 /* Error */ }, - "The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.": { "code": 2113, "category": 1 /* Error */ }, - "An arithmetic operand must be of type 'any', 'number' or an enum type.": { "code": 2114, "category": 1 /* Error */ }, - "Variable declarations of a 'for' statement cannot use a type annotation.": { "code": 2115, "category": 1 /* Error */ }, - "Variable declarations of a 'for' statement must be of types 'string' or 'any'.": { "code": 2116, "category": 1 /* Error */ }, - "The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter.": { "code": 2117, "category": 1 /* Error */ }, - "The left-hand side of an 'in' expression must be of types 'any', 'string' or 'number'.": { "code": 2118, "category": 1 /* Error */ }, - "The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter.": { "code": 2119, "category": 1 /* Error */ }, - "The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter.": { "code": 2120, "category": 1 /* Error */ }, - "The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type.": { "code": 2121, "category": 1 /* Error */ }, - "Setters cannot return a value.": { "code": 2122, "category": 1 /* Error */ }, - "Tried to query type of uninitialized module '{0}'.": { "code": 2123, "category": 1 /* Error */ }, - "Tried to set variable type to uninitialized module type '{0}'.": { "code": 2124, "category": 1 /* Error */ }, - "Type '{0}' is not generic.": { "code": 2125, "category": 1 /* Error */ }, - "Getters must return a value.": { "code": 2126, "category": 1 /* Error */ }, - "Getter and setter accessors do not agree in visibility.": { "code": 2127, "category": 1 /* Error */ }, - "Invalid left-hand side of assignment expression.": { "code": 2130, "category": 1 /* Error */ }, - "Function declared a non-void return type, but has no return expression.": { "code": 2131, "category": 1 /* Error */ }, - "Cannot resolve return type reference.": { "code": 2132, "category": 1 /* Error */ }, - "Constructors cannot have a return type of 'void'.": { "code": 2133, "category": 1 /* Error */ }, - "Subsequent variable declarations must have the same type. Variable '{0}' must be of type '{1}', but here has type '{2}'.": { "code": 2134, "category": 1 /* Error */ }, - "All symbols within a with block will be resolved to 'any'.": { "code": 2135, "category": 1 /* Error */ }, - "Import declarations in an internal module cannot reference an external module.": { "code": 2136, "category": 1 /* Error */ }, - "Class {0} declares interface {1} but does not implement it:{NL}{2}": { "code": 2137, "category": 1 /* Error */ }, - "Class {0} declares class {1} as an interface but does not implement it:{NL}{2}": { "code": 2138, "category": 1 /* Error */ }, - "The operand of an increment or decrement operator must be a variable, property or indexer.": { "code": 2139, "category": 1 /* Error */ }, - "'this' cannot be referenced in a static property initializer.": { "code": 2140, "category": 1 /* Error */ }, - "Class '{0}' cannot extend class '{1}':{NL}{2}": { "code": 2141, "category": 1 /* Error */ }, - "Interface '{0}' cannot extend class '{1}':{NL}{2}": { "code": 2142, "category": 1 /* Error */ }, - "Interface '{0}' cannot extend interface '{1}':{NL}{2}": { "code": 2143, "category": 1 /* Error */ }, - "Overload signature is not compatible with function definition.": { "code": 2148, "category": 1 /* Error */ }, - "Overload signature is not compatible with function definition:{NL}{0}": { "code": 2149, "category": 1 /* Error */ }, - "Overload signatures must all be public or private.": { "code": 2150, "category": 1 /* Error */ }, - "Overload signatures must all be exported or not exported.": { "code": 2151, "category": 1 /* Error */ }, - "Overload signatures must all be ambient or non-ambient.": { "code": 2152, "category": 1 /* Error */ }, - "Overload signatures must all be optional or required.": { "code": 2153, "category": 1 /* Error */ }, - "Specialized overload signature is not assignable to any non-specialized signature.": { "code": 2154, "category": 1 /* Error */ }, - "'this' cannot be referenced in constructor arguments.": { "code": 2155, "category": 1 /* Error */ }, - "Instance member cannot be accessed off a class.": { "code": 2157, "category": 1 /* Error */ }, - "Untyped function calls may not accept type arguments.": { "code": 2158, "category": 1 /* Error */ }, - "Non-generic functions may not accept type arguments.": { "code": 2159, "category": 1 /* Error */ }, - "A generic type may not reference itself with a wrapped form of its own type parameters.": { "code": 2160, "category": 1 /* Error */ }, - "A rest parameter must be of an array type.": { "code": 2162, "category": 1 /* Error */ }, - "Overload signature implementation cannot use specialized type.": { "code": 2163, "category": 1 /* Error */ }, - "Export assignments may only be used at the top-level of external modules.": { "code": 2164, "category": 1 /* Error */ }, - "Export assignments may only be made with variables, functions, classes, interfaces, enums and internal modules.": { "code": 2165, "category": 1 /* Error */ }, - "Only public methods of the base class are accessible via the 'super' keyword.": { "code": 2166, "category": 1 /* Error */ }, - "Numeric indexer type '{0}' must be assignable to string indexer type '{1}'.": { "code": 2167, "category": 1 /* Error */ }, - "Numeric indexer type '{0}' must be assignable to string indexer type '{1}':{NL}{2}": { "code": 2168, "category": 1 /* Error */ }, - "All numerically named properties must be assignable to numeric indexer type '{0}'.": { "code": 2169, "category": 1 /* Error */ }, - "All numerically named properties must be assignable to numeric indexer type '{0}':{NL}{1}": { "code": 2170, "category": 1 /* Error */ }, - "All named properties must be assignable to string indexer type '{0}'.": { "code": 2171, "category": 1 /* Error */ }, - "All named properties must be assignable to string indexer type '{0}':{NL}{1}": { "code": 2172, "category": 1 /* Error */ }, - "A parameter initializer is only allowed in a function or constructor implementation.": { "code": 2174, "category": 1 /* Error */ }, - "Function expression declared a non-void return type, but has no return expression.": { "code": 2176, "category": 1 /* Error */ }, - "Import declaration referencing identifier from internal module can only be made with variables, functions, classes, interfaces, enums and internal modules.": { "code": 2177, "category": 1 /* Error */ }, - "Module '{0}' has no exported member '{1}'.": { "code": 2178, "category": 1 /* Error */ }, - "Unable to resolve module reference '{0}'.": { "code": 2179, "category": 1 /* Error */ }, - "Could not find module '{0}' in module '{1}'.": { "code": 2180, "category": 1 /* Error */ }, - "Exported import declaration '{0}' is assigned value with type that has or is using private type '{1}'.": { "code": 2181, "category": 1 /* Error */ }, - "Exported import declaration '{0}' is assigned value with type that is using inaccessible module '{1}'.": { "code": 2182, "category": 1 /* Error */ }, - "Exported import declaration '{0}' is assigned type that has or is using private type '{1}'.": { "code": 2183, "category": 1 /* Error */ }, - "Exported import declaration '{0}' is assigned type that is using inaccessible module '{1}'.": { "code": 2184, "category": 1 /* Error */ }, - "Exported import declaration '{0}' is assigned container that is or is using inaccessible module '{1}'.": { "code": 2185, "category": 1 /* Error */ }, - "Type name '{0}' in extends clause does not reference constructor function for '{1}'.": { "code": 2186, "category": 1 /* Error */ }, - "Internal module reference '{0}' in import declaration does not reference module instance for '{1}'.": { "code": 2187, "category": 1 /* Error */ }, - "Module '{0}' cannot merge with previous declaration of '{1}' in a different file '{2}'.": { "code": 2188, "category": 1 /* Error */ }, - "Interface '{0}' cannot simultaneously extend types '{1}' and '{2}':{NL}{3}": { "code": 2189, "category": 1 /* Error */ }, - "Initializer of parameter '{0}' cannot reference identifier '{1}' declared after it.": { "code": 2190, "category": 1 /* Error */ }, - "Ambient external module declaration cannot be reopened.": { "code": 2191, "category": 1 /* Error */ }, - "All declarations of merged declaration '{0}' must be exported or not exported.": { "code": 2192, "category": 1 /* Error */ }, - "'super' cannot be referenced in constructor arguments.": { "code": 2193, "category": 1 /* Error */ }, - "Return type of constructor signature must be assignable to the instance type of the class.": { "code": 2194, "category": 1 /* Error */ }, - "Ambient external module declaration must be defined in global context.": { "code": 2195, "category": 1 /* Error */ }, - "Ambient external module declaration cannot specify relative module name.": { "code": 2196, "category": 1 /* Error */ }, - "Import declaration in an ambient external module declaration cannot reference external module through relative external module name.": { "code": 2197, "category": 1 /* Error */ }, - "No best common type exists among return expressions.": { "code": 2198, "category": 1 /* Error */ }, - "Import declaration cannot refer to external module reference when --noResolve option is set.": { "code": 2199, "category": 1 /* Error */ }, - "Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference.": { "code": 2200, "category": 1 /* Error */ }, - "Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference.": { "code": 2205, "category": 1 /* Error */ }, - "Expression resolves to variable declaration '_this' that compiler uses to capture 'this' reference.": { "code": 2206, "category": 1 /* Error */ }, - "Expression resolves to '_super' that compiler uses to capture base class reference.": { "code": 2207, "category": 1 /* Error */ }, - "TypeParameter '{0}' of constructor signature from exported interface has or is using private type '{1}'.": { "code": 2208, "category": 1 /* Error */ }, - "TypeParameter '{0}' of call signature from exported interface has or is using private type '{1}'.": { "code": 2209, "category": 1 /* Error */ }, - "TypeParameter '{0}' of public static method from exported class has or is using private type '{1}'.": { "code": 2210, "category": 1 /* Error */ }, - "TypeParameter '{0}' of public method from exported class has or is using private type '{1}'.": { "code": 2211, "category": 1 /* Error */ }, - "TypeParameter '{0}' of method from exported interface has or is using private type '{1}'.": { "code": 2212, "category": 1 /* Error */ }, - "TypeParameter '{0}' of exported function has or is using private type '{1}'.": { "code": 2213, "category": 1 /* Error */ }, - "TypeParameter '{0}' of constructor signature from exported interface is using inaccessible module {1}.": { "code": 2214, "category": 1 /* Error */ }, - "TypeParameter '{0}' of call signature from exported interface is using inaccessible module {1}": { "code": 2215, "category": 1 /* Error */ }, - "TypeParameter '{0}' of public static method from exported class is using inaccessible module {1}.": { "code": 2216, "category": 1 /* Error */ }, - "TypeParameter '{0}' of public method from exported class is using inaccessible module {1}.": { "code": 2217, "category": 1 /* Error */ }, - "TypeParameter '{0}' of method from exported interface is using inaccessible module {1}.": { "code": 2218, "category": 1 /* Error */ }, - "TypeParameter '{0}' of exported function is using inaccessible module {1}.": { "code": 2219, "category": 1 /* Error */ }, - "TypeParameter '{0}' of exported class has or is using private type '{1}'.": { "code": 2220, "category": 1 /* Error */ }, - "TypeParameter '{0}' of exported interface has or is using private type '{1}'.": { "code": 2221, "category": 1 /* Error */ }, - "TypeParameter '{0}' of exported class is using inaccessible module {1}.": { "code": 2222, "category": 1 /* Error */ }, - "TypeParameter '{0}' of exported interface is using inaccessible module {1}.": { "code": 2223, "category": 1 /* Error */ }, - "Duplicate identifier '_i'. Compiler uses '_i' to initialize rest parameter.": { "code": 2224, "category": 1 /* Error */ }, - "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.": { "code": 2225, "category": 1 /* Error */ }, - "No best common type exists between '{0}' and '{1}'.": { "code": 2226, "category": 1 /* Error */ }, - "No best common type exists between '{0}', '{1}', and '{2}'.": { "code": 2227, "category": 1 /* Error */ }, - "Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of an external module.": { "code": 2228, "category": 1 /* Error */ }, - "Constraint of a type parameter cannot reference any type parameter from the same type parameter list.": { "code": 2229, "category": 1 /* Error */ }, - "Initializer of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor.": { "code": 2230, "category": 1 /* Error */ }, - "Parameter '{0}' cannot be referenced in its initializer.": { "code": 2231, "category": 1 /* Error */ }, - "Duplicate string index signature.": { "code": 2232, "category": 1 /* Error */ }, - "Duplicate number index signature.": { "code": 2233, "category": 1 /* Error */ }, - "All declarations of an interface must have identical type parameters.": { "code": 2234, "category": 1 /* Error */ }, - "Expression resolves to variable declaration '_i' that compiler uses to initialize rest parameter.": { "code": 2235, "category": 1 /* Error */ }, - "Neither type '{0}' nor type '{1}' is assignable to the other.": { "code": 2236, "category": 1 /* Error */ }, - "Neither type '{0}' nor type '{1}' is assignable to the other:{NL}{2}": { "code": 2237, "category": 1 /* Error */ }, - "Duplicate function implementation.": { "code": 2237, "category": 1 /* Error */ }, - "Function implementation expected.": { "code": 2238, "category": 1 /* Error */ }, - "Function overload name must be '{0}'.": { "code": 2239, "category": 1 /* Error */ }, - "Constructor implementation expected.": { "code": 2240, "category": 1 /* Error */ }, - "Class name cannot be '{0}'.": { "code": 2241, "category": 1 /* Error */ }, - "Interface name cannot be '{0}'.": { "code": 2242, "category": 1 /* Error */ }, - "Enum name cannot be '{0}'.": { "code": 2243, "category": 1 /* Error */ }, - "A module cannot have multiple export assignments.": { "code": 2244, "category": 1 /* Error */ }, - "Export assignment not allowed in module with exported element.": { "code": 2245, "category": 1 /* Error */ }, - "A parameter property is only allowed in a constructor implementation.": { "code": 2246, "category": 1 /* Error */ }, - "Function overload must be static.": { "code": 2247, "category": 1 /* Error */ }, - "Function overload must not be static.": { "code": 2248, "category": 1 /* Error */ }, - "Type '{0}' is missing property '{1}' from type '{2}'.": { "code": 4000, "category": 3 /* NoPrefix */ }, - "Types of property '{0}' of types '{1}' and '{2}' are incompatible.": { "code": 4001, "category": 3 /* NoPrefix */ }, - "Types of property '{0}' of types '{1}' and '{2}' are incompatible:{NL}{3}": { "code": 4002, "category": 3 /* NoPrefix */ }, - "Property '{0}' defined as private in type '{1}' is defined as public in type '{2}'.": { "code": 4003, "category": 3 /* NoPrefix */ }, - "Property '{0}' defined as public in type '{1}' is defined as private in type '{2}'.": { "code": 4004, "category": 3 /* NoPrefix */ }, - "Types '{0}' and '{1}' define property '{2}' as private.": { "code": 4005, "category": 3 /* NoPrefix */ }, - "Call signatures of types '{0}' and '{1}' are incompatible.": { "code": 4006, "category": 3 /* NoPrefix */ }, - "Call signatures of types '{0}' and '{1}' are incompatible:{NL}{2}": { "code": 4007, "category": 3 /* NoPrefix */ }, - "Type '{0}' requires a call signature, but type '{1}' lacks one.": { "code": 4008, "category": 3 /* NoPrefix */ }, - "Construct signatures of types '{0}' and '{1}' are incompatible.": { "code": 4009, "category": 3 /* NoPrefix */ }, - "Construct signatures of types '{0}' and '{1}' are incompatible:{NL}{2}": { "code": 4010, "category": 3 /* NoPrefix */ }, - "Type '{0}' requires a construct signature, but type '{1}' lacks one.": { "code": 4011, "category": 3 /* NoPrefix */ }, - "Index signatures of types '{0}' and '{1}' are incompatible.": { "code": 4012, "category": 3 /* NoPrefix */ }, - "Index signatures of types '{0}' and '{1}' are incompatible:{NL}{2}": { "code": 4013, "category": 3 /* NoPrefix */ }, - "Call signature expects {0} or fewer parameters.": { "code": 4014, "category": 3 /* NoPrefix */ }, - "Could not apply type '{0}' to argument {1} which is of type '{2}'.": { "code": 4015, "category": 3 /* NoPrefix */ }, - "Class '{0}' defines instance member accessor '{1}', but extended class '{2}' defines it as instance member function.": { "code": 4016, "category": 3 /* NoPrefix */ }, - "Class '{0}' defines instance member property '{1}', but extended class '{2}' defines it as instance member function.": { "code": 4017, "category": 3 /* NoPrefix */ }, - "Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member accessor.": { "code": 4018, "category": 3 /* NoPrefix */ }, - "Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member property.": { "code": 4019, "category": 3 /* NoPrefix */ }, - "Types of static property '{0}' of class '{1}' and class '{2}' are incompatible.": { "code": 4020, "category": 3 /* NoPrefix */ }, - "Types of static property '{0}' of class '{1}' and class '{2}' are incompatible:{NL}{3}": { "code": 4021, "category": 3 /* NoPrefix */ }, - "Type reference cannot refer to container '{0}'.": { "code": 4022, "category": 1 /* Error */ }, - "Type reference must refer to type.": { "code": 4023, "category": 1 /* Error */ }, - "In enums with multiple declarations only one declaration can omit an initializer for the first enum element.": { "code": 4024, "category": 1 /* Error */ }, - " (+ {0} overload(s))": { "code": 4025, "category": 2 /* Message */ }, - "Variable declaration cannot have the same name as an import declaration.": { "code": 4026, "category": 1 /* Error */ }, - "Signature expected {0} type arguments, got {1} instead.": { "code": 4027, "category": 1 /* Error */ }, - "Property '{0}' defined as optional in type '{1}', but is required in type '{2}'.": { "code": 4028, "category": 3 /* NoPrefix */ }, - "Types '{0}' and '{1}' originating in infinitely expanding type reference do not refer to same named type.": { "code": 4029, "category": 3 /* NoPrefix */ }, - "Types '{0}' and '{1}' originating in infinitely expanding type reference have incompatible type arguments.": { "code": 4030, "category": 3 /* NoPrefix */ }, - "Types '{0}' and '{1}' originating in infinitely expanding type reference have incompatible type arguments:{NL}{2}": { "code": 4031, "category": 3 /* NoPrefix */ }, - "Named properties '{0}' of types '{1}' and '{2}' are not identical.": { "code": 4032, "category": 3 /* NoPrefix */ }, - "Types of string indexer of types '{0}' and '{1}' are not identical.": { "code": 4033, "category": 3 /* NoPrefix */ }, - "Types of number indexer of types '{0}' and '{1}' are not identical.": { "code": 4034, "category": 3 /* NoPrefix */ }, - "Type of number indexer in type '{0}' is not assignable to string indexer type in type '{1}'.{NL}{2}": { "code": 4035, "category": 3 /* NoPrefix */ }, - "Type of property '{0}' in type '{1}' is not assignable to string indexer type in type '{2}'.{NL}{3}": { "code": 4036, "category": 3 /* NoPrefix */ }, - "Type of property '{0}' in type '{1}' is not assignable to number indexer type in type '{2}'.{NL}{3}": { "code": 4037, "category": 3 /* NoPrefix */ }, - "Static property '{0}' defined as private in type '{1}' is defined as public in type '{2}'.": { "code": 4038, "category": 3 /* NoPrefix */ }, - "Static property '{0}' defined as public in type '{1}' is defined as private in type '{2}'.": { "code": 4039, "category": 3 /* NoPrefix */ }, - "Types '{0}' and '{1}' define static property '{2}' as private.": { "code": 4040, "category": 3 /* NoPrefix */ }, - "Current host does not support '{0}' option.": { "code": 5001, "category": 1 /* Error */ }, - "ECMAScript target version '{0}' not supported. Specify a valid target version: '{1}' (default), or '{2}'": { "code": 5002, "category": 1 /* Error */ }, - "Argument for '{0}' option must be '{1}' or '{2}'": { "code": 5003, "category": 1 /* Error */ }, - "Could not find file: '{0}'.": { "code": 5004, "category": 1 /* Error */ }, - "A file cannot have a reference to itself.": { "code": 5006, "category": 1 /* Error */ }, - "Cannot resolve referenced file: '{0}'.": { "code": 5007, "category": 1 /* Error */ }, - "Cannot find the common subdirectory path for the input files.": { "code": 5009, "category": 1 /* Error */ }, - "Emit Error: {0}.": { "code": 5011, "category": 1 /* Error */ }, - "Cannot read file '{0}': {1}": { "code": 5012, "category": 1 /* Error */ }, - "Unsupported file encoding.": { "code": 5013, "category": 3 /* NoPrefix */ }, - "Locale must be of the form or -. For example '{0}' or '{1}'.": { "code": 5014, "category": 1 /* Error */ }, - "Unsupported locale: '{0}'.": { "code": 5015, "category": 1 /* Error */ }, - "Execution Failed.{NL}": { "code": 5016, "category": 1 /* Error */ }, - "Invalid call to 'up'": { "code": 5019, "category": 1 /* Error */ }, - "Invalid call to 'down'": { "code": 5020, "category": 1 /* Error */ }, - "Base64 value '{0}' finished with a continuation bit.": { "code": 5021, "category": 1 /* Error */ }, - "Unknown compiler option '{0}'": { "code": 5023, "category": 1 /* Error */ }, - "Expected {0} arguments to message, got {1} instead.": { "code": 5024, "category": 1 /* Error */ }, - "Expected the message '{0}' to have {1} arguments, but it had {2}": { "code": 5025, "category": 1 /* Error */ }, - "Could not delete file '{0}'": { "code": 5034, "category": 1 /* Error */ }, - "Could not create directory '{0}'": { "code": 5035, "category": 1 /* Error */ }, - "Error while executing file '{0}': ": { "code": 5036, "category": 1 /* Error */ }, - "Cannot compile external modules unless the '--module' flag is provided.": { "code": 5037, "category": 1 /* Error */ }, - "Option mapRoot cannot be specified without specifying sourcemap option.": { "code": 5038, "category": 1 /* Error */ }, - "Option sourceRoot cannot be specified without specifying sourcemap option.": { "code": 5039, "category": 1 /* Error */ }, - "Options mapRoot and sourceRoot cannot be specified without specifying sourcemap option.": { "code": 5040, "category": 1 /* Error */ }, - "Option '{0}' specified without '{1}'": { "code": 5041, "category": 1 /* Error */ }, - "'codepage' option not supported on current platform.": { "code": 5042, "category": 1 /* Error */ }, - "Concatenate and emit output to single file.": { "code": 6001, "category": 2 /* Message */ }, - "Generates corresponding {0} file.": { "code": 6002, "category": 2 /* Message */ }, - "Specifies the location where debugger should locate map files instead of generated locations.": { "code": 6003, "category": 2 /* Message */ }, - "Specifies the location where debugger should locate TypeScript files instead of source locations.": { "code": 6004, "category": 2 /* Message */ }, - "Watch input files.": { "code": 6005, "category": 2 /* Message */ }, - "Redirect output structure to the directory.": { "code": 6006, "category": 2 /* Message */ }, - "Do not emit comments to output.": { "code": 6009, "category": 2 /* Message */ }, - "Skip resolution and preprocessing.": { "code": 6010, "category": 2 /* Message */ }, - "Specify ECMAScript target version: '{0}' (default), or '{1}'": { "code": 6015, "category": 2 /* Message */ }, - "Specify module code generation: '{0}' or '{1}'": { "code": 6016, "category": 2 /* Message */ }, - "Print this message.": { "code": 6017, "category": 2 /* Message */ }, - "Print the compiler's version: {0}": { "code": 6019, "category": 2 /* Message */ }, - "Allow use of deprecated '{0}' keyword when referencing an external module.": { "code": 6021, "category": 2 /* Message */ }, - "Specify locale for errors and messages. For example '{0}' or '{1}'": { "code": 6022, "category": 2 /* Message */ }, - "Syntax: {0}": { "code": 6023, "category": 2 /* Message */ }, - "options": { "code": 6024, "category": 2 /* Message */ }, - "file1": { "code": 6025, "category": 2 /* Message */ }, - "Examples:": { "code": 6026, "category": 2 /* Message */ }, - "Options:": { "code": 6027, "category": 2 /* Message */ }, - "Insert command line options and files from a file.": { "code": 6030, "category": 2 /* Message */ }, - "Version {0}": { "code": 6029, "category": 2 /* Message */ }, - "Use the '{0}' flag to see options.": { "code": 6031, "category": 2 /* Message */ }, - "{NL}Recompiling ({0}):": { "code": 6032, "category": 2 /* Message */ }, - "STRING": { "code": 6033, "category": 2 /* Message */ }, - "KIND": { "code": 6034, "category": 2 /* Message */ }, - "file2": { "code": 6035, "category": 2 /* Message */ }, - "VERSION": { "code": 6036, "category": 2 /* Message */ }, - "LOCATION": { "code": 6037, "category": 2 /* Message */ }, - "DIRECTORY": { "code": 6038, "category": 2 /* Message */ }, - "NUMBER": { "code": 6039, "category": 2 /* Message */ }, - "Specify the codepage to use when opening source files.": { "code": 6040, "category": 2 /* Message */ }, - "Additional locations:": { "code": 6041, "category": 2 /* Message */ }, - "This version of the Javascript runtime does not support the '{0}' function.": { "code": 7000, "category": 1 /* Error */ }, - "Unknown rule.": { "code": 7002, "category": 1 /* Error */ }, - "Invalid line number ({0})": { "code": 7003, "category": 1 /* Error */ }, - "Warn on expressions and declarations with an implied 'any' type.": { "code": 7004, "category": 2 /* Message */ }, - "Variable '{0}' implicitly has an 'any' type.": { "code": 7005, "category": 1 /* Error */ }, - "Parameter '{0}' of '{1}' implicitly has an 'any' type.": { "code": 7006, "category": 1 /* Error */ }, - "Parameter '{0}' of function type implicitly has an 'any' type.": { "code": 7007, "category": 1 /* Error */ }, - "Member '{0}' of object type implicitly has an 'any' type.": { "code": 7008, "category": 1 /* Error */ }, - "'new' expression, which lacks a constructor signature, implicitly has an 'any' type.": { "code": 7009, "category": 1 /* Error */ }, - "'{0}', which lacks return-type annotation, implicitly has an 'any' return type.": { "code": 7010, "category": 1 /* Error */ }, - "Function expression, which lacks return-type annotation, implicitly has an 'any' return type.": { "code": 7011, "category": 1 /* Error */ }, - "Parameter '{0}' of lambda function implicitly has an 'any' type.": { "code": 7012, "category": 1 /* Error */ }, - "Constructor signature, which lacks return-type annotation, implicitly has an 'any' return type.": { "code": 7013, "category": 1 /* Error */ }, - "Lambda Function, which lacks return-type annotation, implicitly has an 'any' return type.": { "code": 7014, "category": 1 /* Error */ }, - "Array Literal implicitly has an 'any' type from widening.": { "code": 7015, "category": 1 /* Error */ }, - "'{0}', which lacks 'get' accessor and parameter type annotation on 'set' accessor, implicitly has an 'any' type.": { "code": 7016, "category": 1 /* Error */ }, - "Index signature of object type implicitly has an 'any' type.": { "code": 7017, "category": 1 /* Error */ }, - "Object literal's property '{0}' implicitly has an 'any' type from widening.": { "code": 7018, "category": 1 /* Error */ } - }; -})(TypeScript || (TypeScript = {})); -var TypeScript; -(function (TypeScript) { - var ArrayUtilities = (function () { - function ArrayUtilities() { - } - ArrayUtilities.sequenceEquals = function (array1, array2, equals) { - if (array1 === array2) { - return true; - } - if (!array1 || !array2) { - return false; - } - if (array1.length !== array2.length) { - return false; - } - for (var i = 0, n = array1.length; i < n; i++) { - if (!equals(array1[i], array2[i])) { - return false; - } - } - return true; - }; - ArrayUtilities.contains = function (array, value) { - for (var i = 0; i < array.length; i++) { - if (array[i] === value) { - return true; - } - } - return false; - }; - ArrayUtilities.distinct = function (array, equalsFn) { - var result = []; - for (var i = 0, n = array.length; i < n; i++) { - var current = array[i]; - for (var j = 0; j < result.length; j++) { - if (equalsFn(result[j], current)) { - break; - } - } - if (j === result.length) { - result.push(current); - } - } - return result; - }; - ArrayUtilities.last = function (array) { - if (array.length === 0) { - throw TypeScript.Errors.argumentOutOfRange('array'); - } - return array[array.length - 1]; - }; - ArrayUtilities.lastOrDefault = function (array, predicate) { - for (var i = array.length - 1; i >= 0; i--) { - var v = array[i]; - if (predicate(v, i)) { - return v; - } - } - return undefined; - }; - ArrayUtilities.firstOrDefault = function (array, func) { - for (var i = 0, n = array.length; i < n; i++) { - var value = array[i]; - if (func(value, i)) { - return value; - } - } - return undefined; - }; - ArrayUtilities.first = function (array, func) { - for (var i = 0, n = array.length; i < n; i++) { - var value = array[i]; - if (!func || func(value, i)) { - return value; - } - } - throw TypeScript.Errors.invalidOperation(); - }; - ArrayUtilities.sum = function (array, func) { - var result = 0; - for (var i = 0, n = array.length; i < n; i++) { - result += func(array[i]); - } - return result; - }; - ArrayUtilities.select = function (values, func) { - var result = new Array(values.length); - for (var i = 0; i < values.length; i++) { - result[i] = func(values[i]); - } - return result; - }; - ArrayUtilities.where = function (values, func) { - var result = new Array(); - for (var i = 0; i < values.length; i++) { - if (func(values[i])) { - result.push(values[i]); - } - } - return result; - }; - ArrayUtilities.any = function (array, func) { - for (var i = 0, n = array.length; i < n; i++) { - if (func(array[i])) { - return true; - } - } - return false; - }; - ArrayUtilities.all = function (array, func) { - for (var i = 0, n = array.length; i < n; i++) { - if (!func(array[i])) { - return false; - } - } - return true; - }; - ArrayUtilities.binarySearch = function (array, value) { - var low = 0; - var high = array.length - 1; - while (low <= high) { - var middle = low + ((high - low) >> 1); - var midValue = array[middle]; - if (midValue === value) { - return middle; - } - else if (midValue > value) { - high = middle - 1; - } - else { - low = middle + 1; - } - } - return ~low; - }; - ArrayUtilities.createArray = function (length, defaultValue) { - var result = new Array(length); - for (var i = 0; i < length; i++) { - result[i] = defaultValue; - } - return result; - }; - ArrayUtilities.grow = function (array, length, defaultValue) { - var count = length - array.length; - for (var i = 0; i < count; i++) { - array.push(defaultValue); - } - }; - ArrayUtilities.copy = function (sourceArray, sourceIndex, destinationArray, destinationIndex, length) { - for (var i = 0; i < length; i++) { - destinationArray[destinationIndex + i] = sourceArray[sourceIndex + i]; - } - }; - ArrayUtilities.indexOf = function (array, predicate) { - for (var i = 0, n = array.length; i < n; i++) { - if (predicate(array[i])) { - return i; - } - } - return -1; - }; - return ArrayUtilities; - })(); - TypeScript.ArrayUtilities = ArrayUtilities; -})(TypeScript || (TypeScript = {})); -var TypeScript; -(function (TypeScript) { - (function (AssertionLevel) { - AssertionLevel[AssertionLevel["None"] = 0] = "None"; - AssertionLevel[AssertionLevel["Normal"] = 1] = "Normal"; - AssertionLevel[AssertionLevel["Aggressive"] = 2] = "Aggressive"; - AssertionLevel[AssertionLevel["VeryAggressive"] = 3] = "VeryAggressive"; - })(TypeScript.AssertionLevel || (TypeScript.AssertionLevel = {})); - var AssertionLevel = TypeScript.AssertionLevel; - var Debug = (function () { - function Debug() { - } - Debug.shouldAssert = function (level) { - return this.currentAssertionLevel >= level; - }; - Debug.assert = function (expression, message, verboseDebugInfo) { - if (!expression) { - var verboseDebugString = ""; - if (verboseDebugInfo) { - verboseDebugString = "\r\nVerbose Debug Information:" + verboseDebugInfo(); - } - message = message || ""; - throw new Error("Debug Failure. False expression: " + message + verboseDebugString); - } - }; - Debug.fail = function (message) { - Debug.assert(false, message); - }; - Debug.currentAssertionLevel = 0 /* None */; - return Debug; - })(); - TypeScript.Debug = Debug; -})(TypeScript || (TypeScript = {})); -var __extends = this.__extends || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; - function __() { this.constructor = d; } - __.prototype = b.prototype; - d.prototype = new __(); -}; -var TypeScript; -(function (TypeScript) { - var Location = (function () { - function Location(fileName, lineMap, start, length) { - this._fileName = fileName; - this._lineMap = lineMap; - this._start = start; - this._length = length; - } - Location.prototype.fileName = function () { - return this._fileName; - }; - Location.prototype.lineMap = function () { - return this._lineMap; - }; - Location.prototype.line = function () { - return this._lineMap ? this._lineMap.getLineNumberFromPosition(this.start()) : 0; - }; - Location.prototype.character = function () { - return this._lineMap ? this._lineMap.getLineAndCharacterFromPosition(this.start()).character() : 0; - }; - Location.prototype.start = function () { - return this._start; - }; - Location.prototype.length = function () { - return this._length; - }; - Location.equals = function (location1, location2) { - return location1._fileName === location2._fileName && location1._start === location2._start && location1._length === location2._length; - }; - return Location; - })(); - TypeScript.Location = Location; - var Diagnostic = (function (_super) { - __extends(Diagnostic, _super); - function Diagnostic(fileName, lineMap, start, length, diagnosticKey, _arguments, additionalLocations) { - _super.call(this, fileName, lineMap, start, length); - this._diagnosticKey = diagnosticKey; - this._arguments = (_arguments && _arguments.length > 0) ? _arguments : undefined; - this._additionalLocations = (additionalLocations && additionalLocations.length > 0) ? additionalLocations : undefined; - } - Diagnostic.prototype.toJSON = function (key) { - var result = {}; - result.start = this.start(); - result.length = this.length(); - result.diagnosticCode = this._diagnosticKey; - var _arguments = this.arguments(); - if (_arguments && _arguments.length > 0) { - result.arguments = _arguments; - } - return result; - }; - Diagnostic.prototype.diagnosticKey = function () { - return this._diagnosticKey; - }; - Diagnostic.prototype.arguments = function () { - return this._arguments; - }; - Diagnostic.prototype.text = function () { - return TypeScript.getLocalizedText(this._diagnosticKey, this._arguments); - }; - Diagnostic.prototype.message = function () { - return TypeScript.getDiagnosticMessage(this._diagnosticKey, this._arguments); - }; - Diagnostic.prototype.additionalLocations = function () { - return this._additionalLocations || []; - }; - Diagnostic.equals = function (diagnostic1, diagnostic2) { - return Location.equals(diagnostic1, diagnostic2) && diagnostic1._diagnosticKey === diagnostic2._diagnosticKey && TypeScript.ArrayUtilities.sequenceEquals(diagnostic1._arguments, diagnostic2._arguments, function (v1, v2) { return v1 === v2; }); - }; - Diagnostic.prototype.info = function () { - return getDiagnosticInfoFromKey(this.diagnosticKey()); - }; - return Diagnostic; - })(Location); - TypeScript.Diagnostic = Diagnostic; - function newLine() { - return "\r\n"; - } - TypeScript.newLine = newLine; - function getLargestIndex(diagnostic) { - var largest = -1; - var regex = /\{(\d+)\}/g; - var match; - while (match = regex.exec(diagnostic)) { - var val = parseInt(match[1]); - if (!isNaN(val) && val > largest) { - largest = val; - } - } - return largest; - } - function getDiagnosticInfoFromKey(diagnosticKey) { - var result = TypeScript.diagnosticInformationMap[diagnosticKey]; - TypeScript.Debug.assert(result); - return result; - } - function getLocalizedText(diagnosticKey, args) { - var diagnosticMessageText = diagnosticKey; - TypeScript.Debug.assert(diagnosticMessageText !== undefined && diagnosticMessageText !== null); - var actualCount = args ? args.length : 0; - var expectedCount = 1 + getLargestIndex(diagnosticKey); - if (expectedCount !== actualCount) { - throw new Error(getLocalizedText(TypeScript.DiagnosticCode.Expected_0_arguments_to_message_got_1_instead, [expectedCount, actualCount])); - } - var valueCount = 1 + getLargestIndex(diagnosticMessageText); - if (valueCount !== expectedCount) { - throw new Error(getLocalizedText(TypeScript.DiagnosticCode.Expected_the_message_0_to_have_1_arguments_but_it_had_2, [diagnosticMessageText, expectedCount, valueCount])); - } - diagnosticMessageText = diagnosticMessageText.replace(/{(\d+)}/g, function (match, num) { - return typeof args[num] !== 'undefined' ? args[num] : match; - }); - diagnosticMessageText = diagnosticMessageText.replace(/{(NL)}/g, function (match) { - return TypeScript.newLine(); - }); - return diagnosticMessageText; - } - TypeScript.getLocalizedText = getLocalizedText; - function getDiagnosticMessage(diagnosticKey, args) { - var diagnostic = getDiagnosticInfoFromKey(diagnosticKey); - var diagnosticMessageText = getLocalizedText(diagnosticKey, args); - var message; - if (diagnostic.category === 1 /* Error */) { - message = getLocalizedText(TypeScript.DiagnosticCode.error_TS_0_1, [diagnostic.code, diagnosticMessageText]); - } - else if (diagnostic.category === 0 /* Warning */) { - message = getLocalizedText(TypeScript.DiagnosticCode.warning_TS_0_1, [diagnostic.code, diagnosticMessageText]); - } - else { - message = diagnosticMessageText; - } - return message; - } - TypeScript.getDiagnosticMessage = getDiagnosticMessage; -})(TypeScript || (TypeScript = {})); -var TypeScript; -(function (TypeScript) { - var Errors = (function () { - function Errors() { - } - Errors.argument = function (argument, message) { - return new Error("Invalid argument: " + argument + ". " + message); - }; - Errors.argumentOutOfRange = function (argument) { - return new Error("Argument out of range: " + argument); - }; - Errors.argumentNull = function (argument) { - return new Error("Argument null: " + argument); - }; - Errors.abstract = function () { - return new Error("Operation not implemented properly by subclass."); - }; - Errors.notYetImplemented = function () { - return new Error("Not yet implemented."); - }; - Errors.invalidOperation = function (message) { - return new Error("Invalid operation: " + message); - }; - return Errors; - })(); - TypeScript.Errors = Errors; -})(TypeScript || (TypeScript = {})); -var TypeScript; -(function (TypeScript) { - var IntegerUtilities; - (function (IntegerUtilities) { - function integerDivide(numerator, denominator) { - return (numerator / denominator) >> 0; - } - IntegerUtilities.integerDivide = integerDivide; - function integerMultiplyLow32Bits(n1, n2) { - var resultLow32 = (((n1 & 0xffff0000) * n2) >>> 0) + (((n1 & 0x0000ffff) * n2) >>> 0) >>> 0; - return resultLow32; - } - IntegerUtilities.integerMultiplyLow32Bits = integerMultiplyLow32Bits; - function isInteger(text) { - return /^[0-9]+$/.test(text); - } - IntegerUtilities.isInteger = isInteger; - function isHexInteger(text) { - return /^0(x|X)[0-9a-fA-F]+$/.test(text); - } - IntegerUtilities.isHexInteger = isHexInteger; - })(IntegerUtilities = TypeScript.IntegerUtilities || (TypeScript.IntegerUtilities = {})); -})(TypeScript || (TypeScript = {})); -var TypeScript; -(function (TypeScript) { - var LineMap = (function () { - function LineMap(_computeLineStarts, length) { - this._computeLineStarts = _computeLineStarts; - this.length = length; - this._lineStarts = undefined; - } - LineMap.prototype.toJSON = function (key) { - return { lineStarts: this.lineStarts(), length: this.length }; - }; - LineMap.prototype.equals = function (other) { - return this.length === other.length && TypeScript.ArrayUtilities.sequenceEquals(this.lineStarts(), other.lineStarts(), function (v1, v2) { return v1 === v2; }); - }; - LineMap.prototype.lineStarts = function () { - if (!this._lineStarts) { - this._lineStarts = this._computeLineStarts(); - } - return this._lineStarts; - }; - LineMap.prototype.lineCount = function () { - return this.lineStarts().length; - }; - LineMap.prototype.getPosition = function (line, character) { - return this.lineStarts()[line] + character; - }; - LineMap.prototype.getLineNumberFromPosition = function (position) { - if (position < 0 || position > this.length) { - throw TypeScript.Errors.argumentOutOfRange("position"); - } - if (position === this.length) { - return this.lineCount() - 1; - } - var lineNumber = TypeScript.ArrayUtilities.binarySearch(this.lineStarts(), position); - if (lineNumber < 0) { - lineNumber = (~lineNumber) - 1; - } - return lineNumber; - }; - LineMap.prototype.getLineStartPosition = function (lineNumber) { - return this.lineStarts()[lineNumber]; - }; - LineMap.prototype.fillLineAndCharacterFromPosition = function (position, lineAndCharacter) { - if (position < 0 || position > this.length) { - throw TypeScript.Errors.argumentOutOfRange("position"); - } - var lineNumber = this.getLineNumberFromPosition(position); - lineAndCharacter.line = lineNumber; - lineAndCharacter.character = position - this.lineStarts()[lineNumber]; - }; - LineMap.prototype.getLineAndCharacterFromPosition = function (position) { - if (position < 0 || position > this.length) { - throw TypeScript.Errors.argumentOutOfRange("position"); - } - var lineNumber = this.getLineNumberFromPosition(position); - return new TypeScript.LineAndCharacter(lineNumber, position - this.lineStarts()[lineNumber]); - }; - LineMap.empty = new LineMap(function () { return [0]; }, 0); - return LineMap; - })(); - TypeScript.LineMap = LineMap; -})(TypeScript || (TypeScript = {})); -var TypeScript; -(function (TypeScript) { - var LineAndCharacter = (function () { - function LineAndCharacter(line, character) { - this._line = 0; - this._character = 0; - if (line < 0) { - throw TypeScript.Errors.argumentOutOfRange("line"); - } - if (character < 0) { - throw TypeScript.Errors.argumentOutOfRange("character"); - } - this._line = line; - this._character = character; - } - LineAndCharacter.prototype.line = function () { - return this._line; - }; - LineAndCharacter.prototype.character = function () { - return this._character; - }; - return LineAndCharacter; - })(); - TypeScript.LineAndCharacter = LineAndCharacter; -})(TypeScript || (TypeScript = {})); -var TypeScript; -(function (TypeScript) { - var StringUtilities = (function () { - function StringUtilities() { - } - StringUtilities.isString = function (value) { - return Object.prototype.toString.apply(value, []) === '[object String]'; - }; - StringUtilities.endsWith = function (string, value) { - return string.substring(string.length - value.length, string.length) === value; - }; - StringUtilities.startsWith = function (string, value) { - return string.substr(0, value.length) === value; - }; - StringUtilities.repeat = function (value, count) { - return Array(count + 1).join(value); - }; - return StringUtilities; - })(); - TypeScript.StringUtilities = StringUtilities; -})(TypeScript || (TypeScript = {})); -var TypeScript; -(function (TypeScript) { - (function (CharacterCodes) { - CharacterCodes[CharacterCodes["nullCharacter"] = 0] = "nullCharacter"; - CharacterCodes[CharacterCodes["maxAsciiCharacter"] = 127] = "maxAsciiCharacter"; - CharacterCodes[CharacterCodes["lineFeed"] = 10] = "lineFeed"; - CharacterCodes[CharacterCodes["carriageReturn"] = 13] = "carriageReturn"; - CharacterCodes[CharacterCodes["lineSeparator"] = 0x2028] = "lineSeparator"; - CharacterCodes[CharacterCodes["paragraphSeparator"] = 0x2029] = "paragraphSeparator"; - CharacterCodes[CharacterCodes["nextLine"] = 0x0085] = "nextLine"; - CharacterCodes[CharacterCodes["space"] = 0x0020] = "space"; - CharacterCodes[CharacterCodes["nonBreakingSpace"] = 0x00A0] = "nonBreakingSpace"; - CharacterCodes[CharacterCodes["enQuad"] = 0x2000] = "enQuad"; - CharacterCodes[CharacterCodes["emQuad"] = 0x2001] = "emQuad"; - CharacterCodes[CharacterCodes["enSpace"] = 0x2002] = "enSpace"; - CharacterCodes[CharacterCodes["emSpace"] = 0x2003] = "emSpace"; - CharacterCodes[CharacterCodes["threePerEmSpace"] = 0x2004] = "threePerEmSpace"; - CharacterCodes[CharacterCodes["fourPerEmSpace"] = 0x2005] = "fourPerEmSpace"; - CharacterCodes[CharacterCodes["sixPerEmSpace"] = 0x2006] = "sixPerEmSpace"; - CharacterCodes[CharacterCodes["figureSpace"] = 0x2007] = "figureSpace"; - CharacterCodes[CharacterCodes["punctuationSpace"] = 0x2008] = "punctuationSpace"; - CharacterCodes[CharacterCodes["thinSpace"] = 0x2009] = "thinSpace"; - CharacterCodes[CharacterCodes["hairSpace"] = 0x200A] = "hairSpace"; - CharacterCodes[CharacterCodes["zeroWidthSpace"] = 0x200B] = "zeroWidthSpace"; - CharacterCodes[CharacterCodes["narrowNoBreakSpace"] = 0x202F] = "narrowNoBreakSpace"; - CharacterCodes[CharacterCodes["ideographicSpace"] = 0x3000] = "ideographicSpace"; - CharacterCodes[CharacterCodes["_"] = 95] = "_"; - CharacterCodes[CharacterCodes["$"] = 36] = "$"; - CharacterCodes[CharacterCodes["_0"] = 48] = "_0"; - CharacterCodes[CharacterCodes["_1"] = 49] = "_1"; - CharacterCodes[CharacterCodes["_2"] = 50] = "_2"; - CharacterCodes[CharacterCodes["_3"] = 51] = "_3"; - CharacterCodes[CharacterCodes["_4"] = 52] = "_4"; - CharacterCodes[CharacterCodes["_5"] = 53] = "_5"; - CharacterCodes[CharacterCodes["_6"] = 54] = "_6"; - CharacterCodes[CharacterCodes["_7"] = 55] = "_7"; - CharacterCodes[CharacterCodes["_8"] = 56] = "_8"; - CharacterCodes[CharacterCodes["_9"] = 57] = "_9"; - CharacterCodes[CharacterCodes["a"] = 97] = "a"; - CharacterCodes[CharacterCodes["b"] = 98] = "b"; - CharacterCodes[CharacterCodes["c"] = 99] = "c"; - CharacterCodes[CharacterCodes["d"] = 100] = "d"; - CharacterCodes[CharacterCodes["e"] = 101] = "e"; - CharacterCodes[CharacterCodes["f"] = 102] = "f"; - CharacterCodes[CharacterCodes["g"] = 103] = "g"; - CharacterCodes[CharacterCodes["h"] = 104] = "h"; - CharacterCodes[CharacterCodes["i"] = 105] = "i"; - CharacterCodes[CharacterCodes["j"] = 106] = "j"; - CharacterCodes[CharacterCodes["k"] = 107] = "k"; - CharacterCodes[CharacterCodes["l"] = 108] = "l"; - CharacterCodes[CharacterCodes["m"] = 109] = "m"; - CharacterCodes[CharacterCodes["n"] = 110] = "n"; - CharacterCodes[CharacterCodes["o"] = 111] = "o"; - CharacterCodes[CharacterCodes["p"] = 112] = "p"; - CharacterCodes[CharacterCodes["q"] = 113] = "q"; - CharacterCodes[CharacterCodes["r"] = 114] = "r"; - CharacterCodes[CharacterCodes["s"] = 115] = "s"; - CharacterCodes[CharacterCodes["t"] = 116] = "t"; - CharacterCodes[CharacterCodes["u"] = 117] = "u"; - CharacterCodes[CharacterCodes["v"] = 118] = "v"; - CharacterCodes[CharacterCodes["w"] = 119] = "w"; - CharacterCodes[CharacterCodes["x"] = 120] = "x"; - CharacterCodes[CharacterCodes["y"] = 121] = "y"; - CharacterCodes[CharacterCodes["z"] = 122] = "z"; - CharacterCodes[CharacterCodes["A"] = 65] = "A"; - CharacterCodes[CharacterCodes["B"] = 66] = "B"; - CharacterCodes[CharacterCodes["C"] = 67] = "C"; - CharacterCodes[CharacterCodes["D"] = 68] = "D"; - CharacterCodes[CharacterCodes["E"] = 69] = "E"; - CharacterCodes[CharacterCodes["F"] = 70] = "F"; - CharacterCodes[CharacterCodes["G"] = 71] = "G"; - CharacterCodes[CharacterCodes["H"] = 72] = "H"; - CharacterCodes[CharacterCodes["I"] = 73] = "I"; - CharacterCodes[CharacterCodes["J"] = 74] = "J"; - CharacterCodes[CharacterCodes["K"] = 75] = "K"; - CharacterCodes[CharacterCodes["L"] = 76] = "L"; - CharacterCodes[CharacterCodes["M"] = 77] = "M"; - CharacterCodes[CharacterCodes["N"] = 78] = "N"; - CharacterCodes[CharacterCodes["O"] = 79] = "O"; - CharacterCodes[CharacterCodes["P"] = 80] = "P"; - CharacterCodes[CharacterCodes["Q"] = 81] = "Q"; - CharacterCodes[CharacterCodes["R"] = 82] = "R"; - CharacterCodes[CharacterCodes["S"] = 83] = "S"; - CharacterCodes[CharacterCodes["T"] = 84] = "T"; - CharacterCodes[CharacterCodes["U"] = 85] = "U"; - CharacterCodes[CharacterCodes["V"] = 86] = "V"; - CharacterCodes[CharacterCodes["W"] = 87] = "W"; - CharacterCodes[CharacterCodes["X"] = 88] = "X"; - CharacterCodes[CharacterCodes["Y"] = 89] = "Y"; - CharacterCodes[CharacterCodes["Z"] = 90] = "Z"; - CharacterCodes[CharacterCodes["ampersand"] = 38] = "ampersand"; - CharacterCodes[CharacterCodes["asterisk"] = 42] = "asterisk"; - CharacterCodes[CharacterCodes["at"] = 64] = "at"; - CharacterCodes[CharacterCodes["backslash"] = 92] = "backslash"; - CharacterCodes[CharacterCodes["backtick"] = 96] = "backtick"; - CharacterCodes[CharacterCodes["bar"] = 124] = "bar"; - CharacterCodes[CharacterCodes["caret"] = 94] = "caret"; - CharacterCodes[CharacterCodes["closeBrace"] = 125] = "closeBrace"; - CharacterCodes[CharacterCodes["closeBracket"] = 93] = "closeBracket"; - CharacterCodes[CharacterCodes["closeParen"] = 41] = "closeParen"; - CharacterCodes[CharacterCodes["colon"] = 58] = "colon"; - CharacterCodes[CharacterCodes["comma"] = 44] = "comma"; - CharacterCodes[CharacterCodes["dot"] = 46] = "dot"; - CharacterCodes[CharacterCodes["doubleQuote"] = 34] = "doubleQuote"; - CharacterCodes[CharacterCodes["equals"] = 61] = "equals"; - CharacterCodes[CharacterCodes["exclamation"] = 33] = "exclamation"; - CharacterCodes[CharacterCodes["greaterThan"] = 62] = "greaterThan"; - CharacterCodes[CharacterCodes["lessThan"] = 60] = "lessThan"; - CharacterCodes[CharacterCodes["minus"] = 45] = "minus"; - CharacterCodes[CharacterCodes["openBrace"] = 123] = "openBrace"; - CharacterCodes[CharacterCodes["openBracket"] = 91] = "openBracket"; - CharacterCodes[CharacterCodes["openParen"] = 40] = "openParen"; - CharacterCodes[CharacterCodes["percent"] = 37] = "percent"; - CharacterCodes[CharacterCodes["plus"] = 43] = "plus"; - CharacterCodes[CharacterCodes["question"] = 63] = "question"; - CharacterCodes[CharacterCodes["semicolon"] = 59] = "semicolon"; - CharacterCodes[CharacterCodes["singleQuote"] = 39] = "singleQuote"; - CharacterCodes[CharacterCodes["slash"] = 47] = "slash"; - CharacterCodes[CharacterCodes["tilde"] = 126] = "tilde"; - CharacterCodes[CharacterCodes["backspace"] = 8] = "backspace"; - CharacterCodes[CharacterCodes["formFeed"] = 12] = "formFeed"; - CharacterCodes[CharacterCodes["byteOrderMark"] = 0xFEFF] = "byteOrderMark"; - CharacterCodes[CharacterCodes["tab"] = 9] = "tab"; - CharacterCodes[CharacterCodes["verticalTab"] = 11] = "verticalTab"; - })(TypeScript.CharacterCodes || (TypeScript.CharacterCodes = {})); - var CharacterCodes = TypeScript.CharacterCodes; -})(TypeScript || (TypeScript = {})); -var TypeScript; -(function (TypeScript) { - var ScriptSnapshot; - (function (ScriptSnapshot) { - var StringScriptSnapshot = (function () { - function StringScriptSnapshot(text) { - this.text = text; - this._lineStartPositions = undefined; - } - StringScriptSnapshot.prototype.getText = function (start, end) { - return this.text.substring(start, end); - }; - StringScriptSnapshot.prototype.getLength = function () { - return this.text.length; - }; - StringScriptSnapshot.prototype.getLineStartPositions = function () { - if (!this._lineStartPositions) { - this._lineStartPositions = TypeScript.TextUtilities.parseLineStarts(this.text); - } - return this._lineStartPositions; - }; - StringScriptSnapshot.prototype.getChangeRange = function (oldSnapshot) { - throw TypeScript.Errors.notYetImplemented(); - }; - return StringScriptSnapshot; - })(); - function fromString(text) { - return new StringScriptSnapshot(text); - } - ScriptSnapshot.fromString = fromString; - })(ScriptSnapshot = TypeScript.ScriptSnapshot || (TypeScript.ScriptSnapshot = {})); -})(TypeScript || (TypeScript = {})); -var TypeScript; -(function (TypeScript) { - var LineMap1; - (function (LineMap1) { - function fromSimpleText(text) { - return new TypeScript.LineMap(function () { return TypeScript.TextUtilities.parseLineStarts({ charCodeAt: function (index) { return text.charCodeAt(index); }, length: text.length() }); }, text.length()); - } - LineMap1.fromSimpleText = fromSimpleText; - function fromScriptSnapshot(scriptSnapshot) { - return new TypeScript.LineMap(function () { return scriptSnapshot.getLineStartPositions(); }, scriptSnapshot.getLength()); - } - LineMap1.fromScriptSnapshot = fromScriptSnapshot; - function fromString(text) { - return new TypeScript.LineMap(function () { return TypeScript.TextUtilities.parseLineStarts(text); }, text.length); - } - LineMap1.fromString = fromString; - })(LineMap1 = TypeScript.LineMap1 || (TypeScript.LineMap1 = {})); -})(TypeScript || (TypeScript = {})); -var TypeScript; -(function (TypeScript) { - var SimpleText; - (function (SimpleText) { - var SimpleStringText = (function () { - function SimpleStringText(value) { - this.value = value; - this._lineMap = undefined; - } - SimpleStringText.prototype.length = function () { - return this.value.length; - }; - SimpleStringText.prototype.substr = function (start, length) { - var val = this.value; - return start === 0 && length == val.length ? val : val.substr(start, length); - }; - SimpleStringText.prototype.charCodeAt = function (index) { - return this.value.charCodeAt(index); - }; - SimpleStringText.prototype.lineMap = function () { - if (!this._lineMap) { - this._lineMap = TypeScript.LineMap1.fromString(this.value); - } - return this._lineMap; - }; - return SimpleStringText; - })(); - var SimpleScriptSnapshotText = (function () { - function SimpleScriptSnapshotText(scriptSnapshot) { - this.scriptSnapshot = scriptSnapshot; - this._lineMap = undefined; - } - SimpleScriptSnapshotText.prototype.charCodeAt = function (index) { - return this.scriptSnapshot.getText(index, index + 1).charCodeAt(0); - }; - SimpleScriptSnapshotText.prototype.length = function () { - return this.scriptSnapshot.getLength(); - }; - SimpleScriptSnapshotText.prototype.substr = function (start, length) { - return this.scriptSnapshot.getText(start, start + length); - }; - SimpleScriptSnapshotText.prototype.lineMap = function () { - var _this = this; - if (!this._lineMap) { - this._lineMap = new TypeScript.LineMap(function () { return _this.scriptSnapshot.getLineStartPositions(); }, this.length()); - } - return this._lineMap; - }; - return SimpleScriptSnapshotText; - })(); - function fromString(value) { - return new SimpleStringText(value); - } - SimpleText.fromString = fromString; - function fromScriptSnapshot(scriptSnapshot) { - return new SimpleScriptSnapshotText(scriptSnapshot); - } - SimpleText.fromScriptSnapshot = fromScriptSnapshot; - })(SimpleText = TypeScript.SimpleText || (TypeScript.SimpleText = {})); -})(TypeScript || (TypeScript = {})); -var TypeScript; -(function (TypeScript) { - var TextUtilities; - (function (TextUtilities) { - function parseLineStarts(text) { - var length = text.length; - if (0 === length) { - var result = new Array(); - result.push(0); - return result; - } - var position = 0; - var index = 0; - var arrayBuilder = new Array(); - var lineNumber = 0; - while (index < length) { - var c = text.charCodeAt(index); - var lineBreakLength; - if (c > 13 /* carriageReturn */ && c <= 127) { - index++; - continue; - } - else if (c === 13 /* carriageReturn */ && index + 1 < length && text.charCodeAt(index + 1) === 10 /* lineFeed */) { - lineBreakLength = 2; - } - else if (c === 10 /* lineFeed */) { - lineBreakLength = 1; - } - else { - lineBreakLength = TextUtilities.getLengthOfLineBreak(text, index); - } - if (0 === lineBreakLength) { - index++; - } - else { - arrayBuilder.push(position); - index += lineBreakLength; - position = index; - lineNumber++; - } - } - arrayBuilder.push(position); - return arrayBuilder; - } - TextUtilities.parseLineStarts = parseLineStarts; - function getLengthOfLineBreakSlow(text, index, c) { - if (c === 13 /* carriageReturn */) { - var next = index + 1; - return (next < text.length) && 10 /* lineFeed */ === text.charCodeAt(next) ? 2 : 1; - } - else if (isAnyLineBreakCharacter(c)) { - return 1; - } - else { - return 0; - } - } - TextUtilities.getLengthOfLineBreakSlow = getLengthOfLineBreakSlow; - function getLengthOfLineBreak(text, index) { - var c = text.charCodeAt(index); - if (c > 13 /* carriageReturn */ && c <= 127) { - return 0; - } - return getLengthOfLineBreakSlow(text, index, c); - } - TextUtilities.getLengthOfLineBreak = getLengthOfLineBreak; - function isAnyLineBreakCharacter(c) { - return c === 10 /* lineFeed */ || c === 13 /* carriageReturn */ || c === 133 /* nextLine */ || c === 8232 /* lineSeparator */ || c === 8233 /* paragraphSeparator */; - } - TextUtilities.isAnyLineBreakCharacter = isAnyLineBreakCharacter; - })(TextUtilities = TypeScript.TextUtilities || (TypeScript.TextUtilities = {})); -})(TypeScript || (TypeScript = {})); -var TypeScript; -(function (TypeScript) { +var ts; +(function (ts) { var TextSpan = (function () { function TextSpan(start, length) { - if (start < 0) { - TypeScript.Errors.argument("start"); - } - if (length < 0) { - TypeScript.Errors.argument("length"); - } + ts.Debug.assert(start >= 0, "start"); + ts.Debug.assert(length >= 0, "length"); this._start = start; this._length = length; } @@ -17645,21 +16228,16 @@ var TypeScript; return undefined; }; TextSpan.fromBounds = function (start, end) { - TypeScript.Debug.assert(start >= 0); - TypeScript.Debug.assert(end - start >= 0); + ts.Debug.assert(start >= 0); + ts.Debug.assert(end - start >= 0); return new TextSpan(start, end - start); }; return TextSpan; })(); - TypeScript.TextSpan = TextSpan; -})(TypeScript || (TypeScript = {})); -var TypeScript; -(function (TypeScript) { + ts.TextSpan = TextSpan; var TextChangeRange = (function () { function TextChangeRange(span, newLength) { - if (newLength < 0) { - throw TypeScript.Errors.argumentOutOfRange("newLength"); - } + ts.Debug.assert(newLength >= 0, "newLength"); this._span = span; this._newLength = newLength; } @@ -17670,7 +16248,7 @@ var TypeScript; return this._newLength; }; TextChangeRange.prototype.newSpan = function () { - return new TypeScript.TextSpan(this.span().start(), this.newLength()); + return new TextSpan(this.span().start(), this.newLength()); }; TextChangeRange.prototype.isUnchanged = function () { return this.span().isEmpty() && this.newLength() === 0; @@ -17698,10417 +16276,13 @@ var TypeScript; oldEndN = Math.max(oldEnd1, oldEnd1 + (oldEnd2 - newEnd1)); newEndN = Math.max(newEnd2, newEnd2 + (newEnd1 - oldEnd2)); } - return new TextChangeRange(TypeScript.TextSpan.fromBounds(oldStartN, oldEndN), newEndN - oldStartN); + return new TextChangeRange(TextSpan.fromBounds(oldStartN, oldEndN), newEndN - oldStartN); }; - TextChangeRange.unchanged = new TextChangeRange(new TypeScript.TextSpan(0, 0), 0); + TextChangeRange.unchanged = new TextChangeRange(new TextSpan(0, 0), 0); return TextChangeRange; })(); - TypeScript.TextChangeRange = TextChangeRange; -})(TypeScript || (TypeScript = {})); -var TypeScript; -(function (TypeScript) { - var CharacterInfo; - (function (CharacterInfo) { - function isDecimalDigit(c) { - return c >= 48 /* _0 */ && c <= 57 /* _9 */; - } - CharacterInfo.isDecimalDigit = isDecimalDigit; - function isOctalDigit(c) { - return c >= 48 /* _0 */ && c <= 55 /* _7 */; - } - CharacterInfo.isOctalDigit = isOctalDigit; - function isHexDigit(c) { - return CharacterInfo.isDecimalDigit(c) || (c >= 65 /* A */ && c <= 70 /* F */) || (c >= 97 /* a */ && c <= 102 /* f */); - } - CharacterInfo.isHexDigit = isHexDigit; - function hexValue(c) { - return CharacterInfo.isDecimalDigit(c) ? (c - 48 /* _0 */) : (c >= 65 /* A */ && c <= 70 /* F */) ? c - 65 /* A */ + 10 : c - 97 /* a */ + 10; - } - CharacterInfo.hexValue = hexValue; - function isWhitespace(ch) { - switch (ch) { - case 32 /* space */: - case 160 /* nonBreakingSpace */: - case 8192 /* enQuad */: - case 8193 /* emQuad */: - case 8194 /* enSpace */: - case 8195 /* emSpace */: - case 8196 /* threePerEmSpace */: - case 8197 /* fourPerEmSpace */: - case 8198 /* sixPerEmSpace */: - case 8199 /* figureSpace */: - case 8200 /* punctuationSpace */: - case 8201 /* thinSpace */: - case 8202 /* hairSpace */: - case 8203 /* zeroWidthSpace */: - case 8239 /* narrowNoBreakSpace */: - case 12288 /* ideographicSpace */: - case 9 /* tab */: - case 11 /* verticalTab */: - case 12 /* formFeed */: - case 65279 /* byteOrderMark */: - return true; - } - return false; - } - CharacterInfo.isWhitespace = isWhitespace; - function isLineTerminator(ch) { - switch (ch) { - case 13 /* carriageReturn */: - case 10 /* lineFeed */: - case 8233 /* paragraphSeparator */: - case 8232 /* lineSeparator */: - return true; - } - return false; - } - CharacterInfo.isLineTerminator = isLineTerminator; - })(CharacterInfo = TypeScript.CharacterInfo || (TypeScript.CharacterInfo = {})); -})(TypeScript || (TypeScript = {})); -var TypeScript; -(function (TypeScript) { - (function (SyntaxConstants) { - SyntaxConstants[SyntaxConstants["None"] = 0] = "None"; - SyntaxConstants[SyntaxConstants["NodeDataComputed"] = 0x00000001] = "NodeDataComputed"; - SyntaxConstants[SyntaxConstants["NodeIncrementallyUnusableMask"] = 0x00000002] = "NodeIncrementallyUnusableMask"; - SyntaxConstants[SyntaxConstants["NodeParsedInStrictModeMask"] = 0x00000004] = "NodeParsedInStrictModeMask"; - SyntaxConstants[SyntaxConstants["NodeFullWidthShift"] = 3] = "NodeFullWidthShift"; - })(TypeScript.SyntaxConstants || (TypeScript.SyntaxConstants = {})); - var SyntaxConstants = TypeScript.SyntaxConstants; -})(TypeScript || (TypeScript = {})); -var TypeScript; -(function (TypeScript) { - var FormattingOptions = (function () { - function FormattingOptions(useTabs, spacesPerTab, indentSpaces, newLineCharacter) { - this.useTabs = useTabs; - this.spacesPerTab = spacesPerTab; - this.indentSpaces = indentSpaces; - this.newLineCharacter = newLineCharacter; - } - FormattingOptions.defaultOptions = new FormattingOptions(false, 4, 4, "\r\n"); - return FormattingOptions; - })(); - TypeScript.FormattingOptions = FormattingOptions; -})(TypeScript || (TypeScript = {})); -var TypeScript; -(function (TypeScript) { - (function (SyntaxKind) { - SyntaxKind[SyntaxKind["None"] = 0] = "None"; - SyntaxKind[SyntaxKind["List"] = 1] = "List"; - SyntaxKind[SyntaxKind["WhitespaceTrivia"] = 2] = "WhitespaceTrivia"; - SyntaxKind[SyntaxKind["NewLineTrivia"] = 3] = "NewLineTrivia"; - SyntaxKind[SyntaxKind["MultiLineCommentTrivia"] = 4] = "MultiLineCommentTrivia"; - SyntaxKind[SyntaxKind["SingleLineCommentTrivia"] = 5] = "SingleLineCommentTrivia"; - SyntaxKind[SyntaxKind["SkippedTokenTrivia"] = 6] = "SkippedTokenTrivia"; - SyntaxKind[SyntaxKind["ErrorToken"] = 7] = "ErrorToken"; - SyntaxKind[SyntaxKind["EndOfFileToken"] = 8] = "EndOfFileToken"; - SyntaxKind[SyntaxKind["IdentifierName"] = 9] = "IdentifierName"; - SyntaxKind[SyntaxKind["RegularExpressionLiteral"] = 10] = "RegularExpressionLiteral"; - SyntaxKind[SyntaxKind["NumericLiteral"] = 11] = "NumericLiteral"; - SyntaxKind[SyntaxKind["StringLiteral"] = 12] = "StringLiteral"; - SyntaxKind[SyntaxKind["NoSubstitutionTemplateToken"] = 13] = "NoSubstitutionTemplateToken"; - SyntaxKind[SyntaxKind["TemplateStartToken"] = 14] = "TemplateStartToken"; - SyntaxKind[SyntaxKind["TemplateMiddleToken"] = 15] = "TemplateMiddleToken"; - SyntaxKind[SyntaxKind["TemplateEndToken"] = 16] = "TemplateEndToken"; - SyntaxKind[SyntaxKind["BreakKeyword"] = 17] = "BreakKeyword"; - SyntaxKind[SyntaxKind["CaseKeyword"] = 18] = "CaseKeyword"; - SyntaxKind[SyntaxKind["CatchKeyword"] = 19] = "CatchKeyword"; - SyntaxKind[SyntaxKind["ContinueKeyword"] = 20] = "ContinueKeyword"; - SyntaxKind[SyntaxKind["DebuggerKeyword"] = 21] = "DebuggerKeyword"; - SyntaxKind[SyntaxKind["DefaultKeyword"] = 22] = "DefaultKeyword"; - SyntaxKind[SyntaxKind["DeleteKeyword"] = 23] = "DeleteKeyword"; - SyntaxKind[SyntaxKind["DoKeyword"] = 24] = "DoKeyword"; - SyntaxKind[SyntaxKind["ElseKeyword"] = 25] = "ElseKeyword"; - SyntaxKind[SyntaxKind["FalseKeyword"] = 26] = "FalseKeyword"; - SyntaxKind[SyntaxKind["FinallyKeyword"] = 27] = "FinallyKeyword"; - SyntaxKind[SyntaxKind["ForKeyword"] = 28] = "ForKeyword"; - SyntaxKind[SyntaxKind["FunctionKeyword"] = 29] = "FunctionKeyword"; - SyntaxKind[SyntaxKind["IfKeyword"] = 30] = "IfKeyword"; - SyntaxKind[SyntaxKind["InKeyword"] = 31] = "InKeyword"; - SyntaxKind[SyntaxKind["InstanceOfKeyword"] = 32] = "InstanceOfKeyword"; - SyntaxKind[SyntaxKind["NewKeyword"] = 33] = "NewKeyword"; - SyntaxKind[SyntaxKind["NullKeyword"] = 34] = "NullKeyword"; - SyntaxKind[SyntaxKind["ReturnKeyword"] = 35] = "ReturnKeyword"; - SyntaxKind[SyntaxKind["SwitchKeyword"] = 36] = "SwitchKeyword"; - SyntaxKind[SyntaxKind["ThisKeyword"] = 37] = "ThisKeyword"; - SyntaxKind[SyntaxKind["ThrowKeyword"] = 38] = "ThrowKeyword"; - SyntaxKind[SyntaxKind["TrueKeyword"] = 39] = "TrueKeyword"; - SyntaxKind[SyntaxKind["TryKeyword"] = 40] = "TryKeyword"; - SyntaxKind[SyntaxKind["TypeOfKeyword"] = 41] = "TypeOfKeyword"; - SyntaxKind[SyntaxKind["VarKeyword"] = 42] = "VarKeyword"; - SyntaxKind[SyntaxKind["VoidKeyword"] = 43] = "VoidKeyword"; - SyntaxKind[SyntaxKind["WhileKeyword"] = 44] = "WhileKeyword"; - SyntaxKind[SyntaxKind["WithKeyword"] = 45] = "WithKeyword"; - SyntaxKind[SyntaxKind["ClassKeyword"] = 46] = "ClassKeyword"; - SyntaxKind[SyntaxKind["ConstKeyword"] = 47] = "ConstKeyword"; - SyntaxKind[SyntaxKind["EnumKeyword"] = 48] = "EnumKeyword"; - SyntaxKind[SyntaxKind["ExportKeyword"] = 49] = "ExportKeyword"; - SyntaxKind[SyntaxKind["ExtendsKeyword"] = 50] = "ExtendsKeyword"; - SyntaxKind[SyntaxKind["ImportKeyword"] = 51] = "ImportKeyword"; - SyntaxKind[SyntaxKind["SuperKeyword"] = 52] = "SuperKeyword"; - SyntaxKind[SyntaxKind["ImplementsKeyword"] = 53] = "ImplementsKeyword"; - SyntaxKind[SyntaxKind["InterfaceKeyword"] = 54] = "InterfaceKeyword"; - SyntaxKind[SyntaxKind["LetKeyword"] = 55] = "LetKeyword"; - SyntaxKind[SyntaxKind["PackageKeyword"] = 56] = "PackageKeyword"; - SyntaxKind[SyntaxKind["PrivateKeyword"] = 57] = "PrivateKeyword"; - SyntaxKind[SyntaxKind["ProtectedKeyword"] = 58] = "ProtectedKeyword"; - SyntaxKind[SyntaxKind["PublicKeyword"] = 59] = "PublicKeyword"; - SyntaxKind[SyntaxKind["StaticKeyword"] = 60] = "StaticKeyword"; - SyntaxKind[SyntaxKind["YieldKeyword"] = 61] = "YieldKeyword"; - SyntaxKind[SyntaxKind["AnyKeyword"] = 62] = "AnyKeyword"; - SyntaxKind[SyntaxKind["BooleanKeyword"] = 63] = "BooleanKeyword"; - SyntaxKind[SyntaxKind["ConstructorKeyword"] = 64] = "ConstructorKeyword"; - SyntaxKind[SyntaxKind["DeclareKeyword"] = 65] = "DeclareKeyword"; - SyntaxKind[SyntaxKind["GetKeyword"] = 66] = "GetKeyword"; - SyntaxKind[SyntaxKind["ModuleKeyword"] = 67] = "ModuleKeyword"; - SyntaxKind[SyntaxKind["RequireKeyword"] = 68] = "RequireKeyword"; - SyntaxKind[SyntaxKind["NumberKeyword"] = 69] = "NumberKeyword"; - SyntaxKind[SyntaxKind["SetKeyword"] = 70] = "SetKeyword"; - SyntaxKind[SyntaxKind["StringKeyword"] = 71] = "StringKeyword"; - SyntaxKind[SyntaxKind["OpenBraceToken"] = 72] = "OpenBraceToken"; - SyntaxKind[SyntaxKind["CloseBraceToken"] = 73] = "CloseBraceToken"; - SyntaxKind[SyntaxKind["OpenParenToken"] = 74] = "OpenParenToken"; - SyntaxKind[SyntaxKind["CloseParenToken"] = 75] = "CloseParenToken"; - SyntaxKind[SyntaxKind["OpenBracketToken"] = 76] = "OpenBracketToken"; - SyntaxKind[SyntaxKind["CloseBracketToken"] = 77] = "CloseBracketToken"; - SyntaxKind[SyntaxKind["DotToken"] = 78] = "DotToken"; - SyntaxKind[SyntaxKind["DotDotDotToken"] = 79] = "DotDotDotToken"; - SyntaxKind[SyntaxKind["SemicolonToken"] = 80] = "SemicolonToken"; - SyntaxKind[SyntaxKind["CommaToken"] = 81] = "CommaToken"; - SyntaxKind[SyntaxKind["LessThanToken"] = 82] = "LessThanToken"; - SyntaxKind[SyntaxKind["GreaterThanToken"] = 83] = "GreaterThanToken"; - SyntaxKind[SyntaxKind["LessThanEqualsToken"] = 84] = "LessThanEqualsToken"; - SyntaxKind[SyntaxKind["GreaterThanEqualsToken"] = 85] = "GreaterThanEqualsToken"; - SyntaxKind[SyntaxKind["EqualsEqualsToken"] = 86] = "EqualsEqualsToken"; - SyntaxKind[SyntaxKind["EqualsGreaterThanToken"] = 87] = "EqualsGreaterThanToken"; - SyntaxKind[SyntaxKind["ExclamationEqualsToken"] = 88] = "ExclamationEqualsToken"; - SyntaxKind[SyntaxKind["EqualsEqualsEqualsToken"] = 89] = "EqualsEqualsEqualsToken"; - SyntaxKind[SyntaxKind["ExclamationEqualsEqualsToken"] = 90] = "ExclamationEqualsEqualsToken"; - SyntaxKind[SyntaxKind["PlusToken"] = 91] = "PlusToken"; - SyntaxKind[SyntaxKind["MinusToken"] = 92] = "MinusToken"; - SyntaxKind[SyntaxKind["AsteriskToken"] = 93] = "AsteriskToken"; - SyntaxKind[SyntaxKind["PercentToken"] = 94] = "PercentToken"; - SyntaxKind[SyntaxKind["PlusPlusToken"] = 95] = "PlusPlusToken"; - SyntaxKind[SyntaxKind["MinusMinusToken"] = 96] = "MinusMinusToken"; - SyntaxKind[SyntaxKind["LessThanLessThanToken"] = 97] = "LessThanLessThanToken"; - SyntaxKind[SyntaxKind["GreaterThanGreaterThanToken"] = 98] = "GreaterThanGreaterThanToken"; - SyntaxKind[SyntaxKind["GreaterThanGreaterThanGreaterThanToken"] = 99] = "GreaterThanGreaterThanGreaterThanToken"; - SyntaxKind[SyntaxKind["AmpersandToken"] = 100] = "AmpersandToken"; - SyntaxKind[SyntaxKind["BarToken"] = 101] = "BarToken"; - SyntaxKind[SyntaxKind["CaretToken"] = 102] = "CaretToken"; - SyntaxKind[SyntaxKind["ExclamationToken"] = 103] = "ExclamationToken"; - SyntaxKind[SyntaxKind["TildeToken"] = 104] = "TildeToken"; - SyntaxKind[SyntaxKind["AmpersandAmpersandToken"] = 105] = "AmpersandAmpersandToken"; - SyntaxKind[SyntaxKind["BarBarToken"] = 106] = "BarBarToken"; - SyntaxKind[SyntaxKind["QuestionToken"] = 107] = "QuestionToken"; - SyntaxKind[SyntaxKind["ColonToken"] = 108] = "ColonToken"; - SyntaxKind[SyntaxKind["EqualsToken"] = 109] = "EqualsToken"; - SyntaxKind[SyntaxKind["PlusEqualsToken"] = 110] = "PlusEqualsToken"; - SyntaxKind[SyntaxKind["MinusEqualsToken"] = 111] = "MinusEqualsToken"; - SyntaxKind[SyntaxKind["AsteriskEqualsToken"] = 112] = "AsteriskEqualsToken"; - SyntaxKind[SyntaxKind["PercentEqualsToken"] = 113] = "PercentEqualsToken"; - SyntaxKind[SyntaxKind["LessThanLessThanEqualsToken"] = 114] = "LessThanLessThanEqualsToken"; - SyntaxKind[SyntaxKind["GreaterThanGreaterThanEqualsToken"] = 115] = "GreaterThanGreaterThanEqualsToken"; - SyntaxKind[SyntaxKind["GreaterThanGreaterThanGreaterThanEqualsToken"] = 116] = "GreaterThanGreaterThanGreaterThanEqualsToken"; - SyntaxKind[SyntaxKind["AmpersandEqualsToken"] = 117] = "AmpersandEqualsToken"; - SyntaxKind[SyntaxKind["BarEqualsToken"] = 118] = "BarEqualsToken"; - SyntaxKind[SyntaxKind["CaretEqualsToken"] = 119] = "CaretEqualsToken"; - SyntaxKind[SyntaxKind["SlashToken"] = 120] = "SlashToken"; - SyntaxKind[SyntaxKind["SlashEqualsToken"] = 121] = "SlashEqualsToken"; - SyntaxKind[SyntaxKind["SourceUnit"] = 122] = "SourceUnit"; - SyntaxKind[SyntaxKind["QualifiedName"] = 123] = "QualifiedName"; - SyntaxKind[SyntaxKind["ObjectType"] = 124] = "ObjectType"; - SyntaxKind[SyntaxKind["FunctionType"] = 125] = "FunctionType"; - SyntaxKind[SyntaxKind["ArrayType"] = 126] = "ArrayType"; - SyntaxKind[SyntaxKind["ConstructorType"] = 127] = "ConstructorType"; - SyntaxKind[SyntaxKind["GenericType"] = 128] = "GenericType"; - SyntaxKind[SyntaxKind["TypeQuery"] = 129] = "TypeQuery"; - SyntaxKind[SyntaxKind["TupleType"] = 130] = "TupleType"; - SyntaxKind[SyntaxKind["UnionType"] = 131] = "UnionType"; - SyntaxKind[SyntaxKind["ParenthesizedType"] = 132] = "ParenthesizedType"; - SyntaxKind[SyntaxKind["InterfaceDeclaration"] = 133] = "InterfaceDeclaration"; - SyntaxKind[SyntaxKind["FunctionDeclaration"] = 134] = "FunctionDeclaration"; - SyntaxKind[SyntaxKind["ModuleDeclaration"] = 135] = "ModuleDeclaration"; - SyntaxKind[SyntaxKind["ClassDeclaration"] = 136] = "ClassDeclaration"; - SyntaxKind[SyntaxKind["EnumDeclaration"] = 137] = "EnumDeclaration"; - SyntaxKind[SyntaxKind["ImportDeclaration"] = 138] = "ImportDeclaration"; - SyntaxKind[SyntaxKind["ExportAssignment"] = 139] = "ExportAssignment"; - SyntaxKind[SyntaxKind["MemberFunctionDeclaration"] = 140] = "MemberFunctionDeclaration"; - SyntaxKind[SyntaxKind["MemberVariableDeclaration"] = 141] = "MemberVariableDeclaration"; - SyntaxKind[SyntaxKind["ConstructorDeclaration"] = 142] = "ConstructorDeclaration"; - SyntaxKind[SyntaxKind["IndexMemberDeclaration"] = 143] = "IndexMemberDeclaration"; - SyntaxKind[SyntaxKind["GetAccessor"] = 144] = "GetAccessor"; - SyntaxKind[SyntaxKind["SetAccessor"] = 145] = "SetAccessor"; - SyntaxKind[SyntaxKind["PropertySignature"] = 146] = "PropertySignature"; - SyntaxKind[SyntaxKind["CallSignature"] = 147] = "CallSignature"; - SyntaxKind[SyntaxKind["ConstructSignature"] = 148] = "ConstructSignature"; - SyntaxKind[SyntaxKind["IndexSignature"] = 149] = "IndexSignature"; - SyntaxKind[SyntaxKind["MethodSignature"] = 150] = "MethodSignature"; - SyntaxKind[SyntaxKind["Block"] = 151] = "Block"; - SyntaxKind[SyntaxKind["IfStatement"] = 152] = "IfStatement"; - SyntaxKind[SyntaxKind["VariableStatement"] = 153] = "VariableStatement"; - SyntaxKind[SyntaxKind["ExpressionStatement"] = 154] = "ExpressionStatement"; - SyntaxKind[SyntaxKind["ReturnStatement"] = 155] = "ReturnStatement"; - SyntaxKind[SyntaxKind["SwitchStatement"] = 156] = "SwitchStatement"; - SyntaxKind[SyntaxKind["BreakStatement"] = 157] = "BreakStatement"; - SyntaxKind[SyntaxKind["ContinueStatement"] = 158] = "ContinueStatement"; - SyntaxKind[SyntaxKind["ForStatement"] = 159] = "ForStatement"; - SyntaxKind[SyntaxKind["ForInStatement"] = 160] = "ForInStatement"; - SyntaxKind[SyntaxKind["EmptyStatement"] = 161] = "EmptyStatement"; - SyntaxKind[SyntaxKind["ThrowStatement"] = 162] = "ThrowStatement"; - SyntaxKind[SyntaxKind["WhileStatement"] = 163] = "WhileStatement"; - SyntaxKind[SyntaxKind["TryStatement"] = 164] = "TryStatement"; - SyntaxKind[SyntaxKind["LabeledStatement"] = 165] = "LabeledStatement"; - SyntaxKind[SyntaxKind["DoStatement"] = 166] = "DoStatement"; - SyntaxKind[SyntaxKind["DebuggerStatement"] = 167] = "DebuggerStatement"; - SyntaxKind[SyntaxKind["WithStatement"] = 168] = "WithStatement"; - SyntaxKind[SyntaxKind["PrefixUnaryExpression"] = 169] = "PrefixUnaryExpression"; - SyntaxKind[SyntaxKind["DeleteExpression"] = 170] = "DeleteExpression"; - SyntaxKind[SyntaxKind["TypeOfExpression"] = 171] = "TypeOfExpression"; - SyntaxKind[SyntaxKind["VoidExpression"] = 172] = "VoidExpression"; - SyntaxKind[SyntaxKind["ConditionalExpression"] = 173] = "ConditionalExpression"; - SyntaxKind[SyntaxKind["BinaryExpression"] = 174] = "BinaryExpression"; - SyntaxKind[SyntaxKind["PostfixUnaryExpression"] = 175] = "PostfixUnaryExpression"; - SyntaxKind[SyntaxKind["MemberAccessExpression"] = 176] = "MemberAccessExpression"; - SyntaxKind[SyntaxKind["InvocationExpression"] = 177] = "InvocationExpression"; - SyntaxKind[SyntaxKind["ArrayLiteralExpression"] = 178] = "ArrayLiteralExpression"; - SyntaxKind[SyntaxKind["ObjectLiteralExpression"] = 179] = "ObjectLiteralExpression"; - SyntaxKind[SyntaxKind["ObjectCreationExpression"] = 180] = "ObjectCreationExpression"; - SyntaxKind[SyntaxKind["ParenthesizedExpression"] = 181] = "ParenthesizedExpression"; - SyntaxKind[SyntaxKind["ParenthesizedArrowFunctionExpression"] = 182] = "ParenthesizedArrowFunctionExpression"; - SyntaxKind[SyntaxKind["SimpleArrowFunctionExpression"] = 183] = "SimpleArrowFunctionExpression"; - SyntaxKind[SyntaxKind["CastExpression"] = 184] = "CastExpression"; - SyntaxKind[SyntaxKind["ElementAccessExpression"] = 185] = "ElementAccessExpression"; - SyntaxKind[SyntaxKind["FunctionExpression"] = 186] = "FunctionExpression"; - SyntaxKind[SyntaxKind["OmittedExpression"] = 187] = "OmittedExpression"; - SyntaxKind[SyntaxKind["TemplateExpression"] = 188] = "TemplateExpression"; - SyntaxKind[SyntaxKind["TemplateAccessExpression"] = 189] = "TemplateAccessExpression"; - SyntaxKind[SyntaxKind["VariableDeclaration"] = 190] = "VariableDeclaration"; - SyntaxKind[SyntaxKind["VariableDeclarator"] = 191] = "VariableDeclarator"; - SyntaxKind[SyntaxKind["ArgumentList"] = 192] = "ArgumentList"; - SyntaxKind[SyntaxKind["ParameterList"] = 193] = "ParameterList"; - SyntaxKind[SyntaxKind["TypeArgumentList"] = 194] = "TypeArgumentList"; - SyntaxKind[SyntaxKind["TypeParameterList"] = 195] = "TypeParameterList"; - SyntaxKind[SyntaxKind["HeritageClause"] = 196] = "HeritageClause"; - SyntaxKind[SyntaxKind["EqualsValueClause"] = 197] = "EqualsValueClause"; - SyntaxKind[SyntaxKind["CaseSwitchClause"] = 198] = "CaseSwitchClause"; - SyntaxKind[SyntaxKind["DefaultSwitchClause"] = 199] = "DefaultSwitchClause"; - SyntaxKind[SyntaxKind["ElseClause"] = 200] = "ElseClause"; - SyntaxKind[SyntaxKind["CatchClause"] = 201] = "CatchClause"; - SyntaxKind[SyntaxKind["FinallyClause"] = 202] = "FinallyClause"; - SyntaxKind[SyntaxKind["TemplateClause"] = 203] = "TemplateClause"; - SyntaxKind[SyntaxKind["TypeParameter"] = 204] = "TypeParameter"; - SyntaxKind[SyntaxKind["Constraint"] = 205] = "Constraint"; - SyntaxKind[SyntaxKind["SimplePropertyAssignment"] = 206] = "SimplePropertyAssignment"; - SyntaxKind[SyntaxKind["FunctionPropertyAssignment"] = 207] = "FunctionPropertyAssignment"; - SyntaxKind[SyntaxKind["Parameter"] = 208] = "Parameter"; - SyntaxKind[SyntaxKind["EnumElement"] = 209] = "EnumElement"; - SyntaxKind[SyntaxKind["TypeAnnotation"] = 210] = "TypeAnnotation"; - SyntaxKind[SyntaxKind["ExternalModuleReference"] = 211] = "ExternalModuleReference"; - SyntaxKind[SyntaxKind["ModuleNameModuleReference"] = 212] = "ModuleNameModuleReference"; - SyntaxKind[SyntaxKind["FirstStandardKeyword"] = SyntaxKind.BreakKeyword] = "FirstStandardKeyword"; - SyntaxKind[SyntaxKind["LastStandardKeyword"] = SyntaxKind.WithKeyword] = "LastStandardKeyword"; - SyntaxKind[SyntaxKind["FirstFutureReservedKeyword"] = SyntaxKind.ClassKeyword] = "FirstFutureReservedKeyword"; - SyntaxKind[SyntaxKind["LastFutureReservedKeyword"] = SyntaxKind.SuperKeyword] = "LastFutureReservedKeyword"; - SyntaxKind[SyntaxKind["FirstFutureReservedStrictKeyword"] = SyntaxKind.ImplementsKeyword] = "FirstFutureReservedStrictKeyword"; - SyntaxKind[SyntaxKind["LastFutureReservedStrictKeyword"] = SyntaxKind.YieldKeyword] = "LastFutureReservedStrictKeyword"; - SyntaxKind[SyntaxKind["FirstTypeScriptKeyword"] = SyntaxKind.AnyKeyword] = "FirstTypeScriptKeyword"; - SyntaxKind[SyntaxKind["LastTypeScriptKeyword"] = SyntaxKind.StringKeyword] = "LastTypeScriptKeyword"; - SyntaxKind[SyntaxKind["FirstKeyword"] = SyntaxKind.FirstStandardKeyword] = "FirstKeyword"; - SyntaxKind[SyntaxKind["LastKeyword"] = SyntaxKind.LastTypeScriptKeyword] = "LastKeyword"; - SyntaxKind[SyntaxKind["FirstToken"] = SyntaxKind.ErrorToken] = "FirstToken"; - SyntaxKind[SyntaxKind["LastToken"] = SyntaxKind.SlashEqualsToken] = "LastToken"; - SyntaxKind[SyntaxKind["FirstPunctuation"] = SyntaxKind.OpenBraceToken] = "FirstPunctuation"; - SyntaxKind[SyntaxKind["LastPunctuation"] = SyntaxKind.SlashEqualsToken] = "LastPunctuation"; - SyntaxKind[SyntaxKind["FirstFixedWidth"] = SyntaxKind.FirstKeyword] = "FirstFixedWidth"; - SyntaxKind[SyntaxKind["LastFixedWidth"] = SyntaxKind.LastPunctuation] = "LastFixedWidth"; - SyntaxKind[SyntaxKind["FirstTrivia"] = SyntaxKind.WhitespaceTrivia] = "FirstTrivia"; - SyntaxKind[SyntaxKind["LastTrivia"] = SyntaxKind.SkippedTokenTrivia] = "LastTrivia"; - SyntaxKind[SyntaxKind["FirstNode"] = SyntaxKind.SourceUnit] = "FirstNode"; - SyntaxKind[SyntaxKind["LastNode"] = SyntaxKind.ModuleNameModuleReference] = "LastNode"; - })(TypeScript.SyntaxKind || (TypeScript.SyntaxKind = {})); - var SyntaxKind = TypeScript.SyntaxKind; -})(TypeScript || (TypeScript = {})); -var TypeScript; -(function (TypeScript) { - var SyntaxFacts; - (function (SyntaxFacts) { - var textToKeywordKind = { - "any": 62 /* AnyKeyword */, - "boolean": 63 /* BooleanKeyword */, - "break": 17 /* BreakKeyword */, - "case": 18 /* CaseKeyword */, - "catch": 19 /* CatchKeyword */, - "class": 46 /* ClassKeyword */, - "continue": 20 /* ContinueKeyword */, - "const": 47 /* ConstKeyword */, - "constructor": 64 /* ConstructorKeyword */, - "debugger": 21 /* DebuggerKeyword */, - "declare": 65 /* DeclareKeyword */, - "default": 22 /* DefaultKeyword */, - "delete": 23 /* DeleteKeyword */, - "do": 24 /* DoKeyword */, - "else": 25 /* ElseKeyword */, - "enum": 48 /* EnumKeyword */, - "export": 49 /* ExportKeyword */, - "extends": 50 /* ExtendsKeyword */, - "false": 26 /* FalseKeyword */, - "finally": 27 /* FinallyKeyword */, - "for": 28 /* ForKeyword */, - "function": 29 /* FunctionKeyword */, - "get": 66 /* GetKeyword */, - "if": 30 /* IfKeyword */, - "implements": 53 /* ImplementsKeyword */, - "import": 51 /* ImportKeyword */, - "in": 31 /* InKeyword */, - "instanceof": 32 /* InstanceOfKeyword */, - "interface": 54 /* InterfaceKeyword */, - "let": 55 /* LetKeyword */, - "module": 67 /* ModuleKeyword */, - "new": 33 /* NewKeyword */, - "null": 34 /* NullKeyword */, - "number": 69 /* NumberKeyword */, - "package": 56 /* PackageKeyword */, - "private": 57 /* PrivateKeyword */, - "protected": 58 /* ProtectedKeyword */, - "public": 59 /* PublicKeyword */, - "require": 68 /* RequireKeyword */, - "return": 35 /* ReturnKeyword */, - "set": 70 /* SetKeyword */, - "static": 60 /* StaticKeyword */, - "string": 71 /* StringKeyword */, - "super": 52 /* SuperKeyword */, - "switch": 36 /* SwitchKeyword */, - "this": 37 /* ThisKeyword */, - "throw": 38 /* ThrowKeyword */, - "true": 39 /* TrueKeyword */, - "try": 40 /* TryKeyword */, - "typeof": 41 /* TypeOfKeyword */, - "var": 42 /* VarKeyword */, - "void": 43 /* VoidKeyword */, - "while": 44 /* WhileKeyword */, - "with": 45 /* WithKeyword */, - "yield": 61 /* YieldKeyword */, - "{": 72 /* OpenBraceToken */, - "}": 73 /* CloseBraceToken */, - "(": 74 /* OpenParenToken */, - ")": 75 /* CloseParenToken */, - "[": 76 /* OpenBracketToken */, - "]": 77 /* CloseBracketToken */, - ".": 78 /* DotToken */, - "...": 79 /* DotDotDotToken */, - ";": 80 /* SemicolonToken */, - ",": 81 /* CommaToken */, - "<": 82 /* LessThanToken */, - ">": 83 /* GreaterThanToken */, - "<=": 84 /* LessThanEqualsToken */, - ">=": 85 /* GreaterThanEqualsToken */, - "==": 86 /* EqualsEqualsToken */, - "=>": 87 /* EqualsGreaterThanToken */, - "!=": 88 /* ExclamationEqualsToken */, - "===": 89 /* EqualsEqualsEqualsToken */, - "!==": 90 /* ExclamationEqualsEqualsToken */, - "+": 91 /* PlusToken */, - "-": 92 /* MinusToken */, - "*": 93 /* AsteriskToken */, - "%": 94 /* PercentToken */, - "++": 95 /* PlusPlusToken */, - "--": 96 /* MinusMinusToken */, - "<<": 97 /* LessThanLessThanToken */, - ">>": 98 /* GreaterThanGreaterThanToken */, - ">>>": 99 /* GreaterThanGreaterThanGreaterThanToken */, - "&": 100 /* AmpersandToken */, - "|": 101 /* BarToken */, - "^": 102 /* CaretToken */, - "!": 103 /* ExclamationToken */, - "~": 104 /* TildeToken */, - "&&": 105 /* AmpersandAmpersandToken */, - "||": 106 /* BarBarToken */, - "?": 107 /* QuestionToken */, - ":": 108 /* ColonToken */, - "=": 109 /* EqualsToken */, - "+=": 110 /* PlusEqualsToken */, - "-=": 111 /* MinusEqualsToken */, - "*=": 112 /* AsteriskEqualsToken */, - "%=": 113 /* PercentEqualsToken */, - "<<=": 114 /* LessThanLessThanEqualsToken */, - ">>=": 115 /* GreaterThanGreaterThanEqualsToken */, - ">>>=": 116 /* GreaterThanGreaterThanGreaterThanEqualsToken */, - "&=": 117 /* AmpersandEqualsToken */, - "|=": 118 /* BarEqualsToken */, - "^=": 119 /* CaretEqualsToken */, - "/": 120 /* SlashToken */, - "/=": 121 /* SlashEqualsToken */ - }; - var kindToText = new Array(); - for (var name in textToKeywordKind) { - if (textToKeywordKind.hasOwnProperty(name)) { - kindToText[textToKeywordKind[name]] = name; - } - } - kindToText[64 /* ConstructorKeyword */] = "constructor"; - function getTokenKind(text) { - if (textToKeywordKind.hasOwnProperty(text)) { - return textToKeywordKind[text]; - } - return 0 /* None */; - } - SyntaxFacts.getTokenKind = getTokenKind; - function getText(kind) { - var result = kindToText[kind]; - return result; - } - SyntaxFacts.getText = getText; - function isAnyKeyword(kind) { - return kind >= TypeScript.SyntaxKind.FirstKeyword && kind <= TypeScript.SyntaxKind.LastKeyword; - } - SyntaxFacts.isAnyKeyword = isAnyKeyword; - function isAnyPunctuation(kind) { - return kind >= TypeScript.SyntaxKind.FirstPunctuation && kind <= TypeScript.SyntaxKind.LastPunctuation; - } - SyntaxFacts.isAnyPunctuation = isAnyPunctuation; - function isPrefixUnaryExpressionOperatorToken(tokenKind) { - switch (tokenKind) { - case 91 /* PlusToken */: - case 92 /* MinusToken */: - case 104 /* TildeToken */: - case 103 /* ExclamationToken */: - case 95 /* PlusPlusToken */: - case 96 /* MinusMinusToken */: - return true; - default: - return false; - } - } - SyntaxFacts.isPrefixUnaryExpressionOperatorToken = isPrefixUnaryExpressionOperatorToken; - function isBinaryExpressionOperatorToken(tokenKind) { - switch (tokenKind) { - case 93 /* AsteriskToken */: - case 120 /* SlashToken */: - case 94 /* PercentToken */: - case 91 /* PlusToken */: - case 92 /* MinusToken */: - case 97 /* LessThanLessThanToken */: - case 98 /* GreaterThanGreaterThanToken */: - case 99 /* GreaterThanGreaterThanGreaterThanToken */: - case 82 /* LessThanToken */: - case 83 /* GreaterThanToken */: - case 84 /* LessThanEqualsToken */: - case 85 /* GreaterThanEqualsToken */: - case 32 /* InstanceOfKeyword */: - case 31 /* InKeyword */: - case 86 /* EqualsEqualsToken */: - case 88 /* ExclamationEqualsToken */: - case 89 /* EqualsEqualsEqualsToken */: - case 90 /* ExclamationEqualsEqualsToken */: - case 100 /* AmpersandToken */: - case 102 /* CaretToken */: - case 101 /* BarToken */: - case 105 /* AmpersandAmpersandToken */: - case 106 /* BarBarToken */: - case 118 /* BarEqualsToken */: - case 117 /* AmpersandEqualsToken */: - case 119 /* CaretEqualsToken */: - case 114 /* LessThanLessThanEqualsToken */: - case 115 /* GreaterThanGreaterThanEqualsToken */: - case 116 /* GreaterThanGreaterThanGreaterThanEqualsToken */: - case 110 /* PlusEqualsToken */: - case 111 /* MinusEqualsToken */: - case 112 /* AsteriskEqualsToken */: - case 121 /* SlashEqualsToken */: - case 113 /* PercentEqualsToken */: - case 109 /* EqualsToken */: - case 81 /* CommaToken */: - return true; - default: - return false; - } - } - SyntaxFacts.isBinaryExpressionOperatorToken = isBinaryExpressionOperatorToken; - function isAssignmentOperatorToken(tokenKind) { - switch (tokenKind) { - case 118 /* BarEqualsToken */: - case 117 /* AmpersandEqualsToken */: - case 119 /* CaretEqualsToken */: - case 114 /* LessThanLessThanEqualsToken */: - case 115 /* GreaterThanGreaterThanEqualsToken */: - case 116 /* GreaterThanGreaterThanGreaterThanEqualsToken */: - case 110 /* PlusEqualsToken */: - case 111 /* MinusEqualsToken */: - case 112 /* AsteriskEqualsToken */: - case 121 /* SlashEqualsToken */: - case 113 /* PercentEqualsToken */: - case 109 /* EqualsToken */: - return true; - default: - return false; - } - } - SyntaxFacts.isAssignmentOperatorToken = isAssignmentOperatorToken; - function isType(kind) { - switch (kind) { - case 126 /* ArrayType */: - case 62 /* AnyKeyword */: - case 69 /* NumberKeyword */: - case 63 /* BooleanKeyword */: - case 71 /* StringKeyword */: - case 43 /* VoidKeyword */: - case 125 /* FunctionType */: - case 124 /* ObjectType */: - case 127 /* ConstructorType */: - case 129 /* TypeQuery */: - case 128 /* GenericType */: - case 123 /* QualifiedName */: - case 9 /* IdentifierName */: - return true; - } - return false; - } - SyntaxFacts.isType = isType; - })(SyntaxFacts = TypeScript.SyntaxFacts || (TypeScript.SyntaxFacts = {})); -})(TypeScript || (TypeScript = {})); -var TypeScript; -(function (TypeScript) { - var Scanner; - (function (Scanner) { - TypeScript.Debug.assert(TypeScript.SyntaxKind.LastToken <= 127); - var ScannerConstants; - (function (ScannerConstants) { - ScannerConstants[ScannerConstants["LargeTokenFullStartShift"] = 4] = "LargeTokenFullStartShift"; - ScannerConstants[ScannerConstants["LargeTokenFullWidthShift"] = 7] = "LargeTokenFullWidthShift"; - ScannerConstants[ScannerConstants["LargeTokenLeadingTriviaBitMask"] = 0x01] = "LargeTokenLeadingTriviaBitMask"; - ScannerConstants[ScannerConstants["LargeTokenLeadingCommentBitMask"] = 0x02] = "LargeTokenLeadingCommentBitMask"; - ScannerConstants[ScannerConstants["LargeTokenTrailingTriviaBitMask"] = 0x04] = "LargeTokenTrailingTriviaBitMask"; - ScannerConstants[ScannerConstants["LargeTokenTrailingCommentBitMask"] = 0x08] = "LargeTokenTrailingCommentBitMask"; - ScannerConstants[ScannerConstants["LargeTokenTriviaBitMask"] = 0x0F] = "LargeTokenTriviaBitMask"; - ScannerConstants[ScannerConstants["FixedWidthTokenFullStartShift"] = 7] = "FixedWidthTokenFullStartShift"; - ScannerConstants[ScannerConstants["FixedWidthTokenMaxFullStart"] = 0x7FFFFF] = "FixedWidthTokenMaxFullStart"; - ScannerConstants[ScannerConstants["SmallTokenFullWidthShift"] = 7] = "SmallTokenFullWidthShift"; - ScannerConstants[ScannerConstants["SmallTokenFullStartShift"] = 12] = "SmallTokenFullStartShift"; - ScannerConstants[ScannerConstants["SmallTokenMaxFullStart"] = 0x3FFFF] = "SmallTokenMaxFullStart"; - ScannerConstants[ScannerConstants["SmallTokenMaxFullWidth"] = 0x1F] = "SmallTokenMaxFullWidth"; - ScannerConstants[ScannerConstants["SmallTokenFullWidthMask"] = 0x1F] = "SmallTokenFullWidthMask"; - ScannerConstants[ScannerConstants["KindMask"] = 0x7F] = "KindMask"; - ScannerConstants[ScannerConstants["IsVariableWidthMask"] = 0x80] = "IsVariableWidthMask"; - })(ScannerConstants || (ScannerConstants = {})); - TypeScript.Debug.assert(largeTokenUnpackFullStart(largeTokenPackFullStartAndInfo(1 << 26, 3)) === (1 << 26)); - TypeScript.Debug.assert(largeTokenUnpackFullStart(largeTokenPackFullStartAndInfo(3 << 25, 1)) === (3 << 25)); - TypeScript.Debug.assert(largeTokenUnpackFullStart(largeTokenPackFullStartAndInfo(10 << 23, 2)) === (10 << 23)); - function fixedWidthTokenPackData(fullStart, kind) { - return (fullStart << 7 /* FixedWidthTokenFullStartShift */) | kind; - } - function fixedWidthTokenUnpackFullStart(packedData) { - return packedData >> 7 /* FixedWidthTokenFullStartShift */; - } - function smallTokenPackData(fullStart, fullWidth, kind) { - return (fullStart << 12 /* SmallTokenFullStartShift */) | (fullWidth << 7 /* SmallTokenFullWidthShift */) | kind; - } - function smallTokenUnpackFullWidth(packedData) { - return (packedData >> 7 /* SmallTokenFullWidthShift */) & 31 /* SmallTokenFullWidthMask */; - } - function smallTokenUnpackFullStart(packedData) { - return packedData >> 12 /* SmallTokenFullStartShift */; - } - function largeTokenPackFullStartAndInfo(fullStart, triviaInfo) { - return (fullStart << 4 /* LargeTokenFullStartShift */) | triviaInfo; - } - function largeTokenUnpackFullWidth(packedFullWidthAndKind) { - return packedFullWidthAndKind >> 7 /* LargeTokenFullWidthShift */; - } - function largeTokenUnpackFullStart(packedFullStartAndInfo) { - return packedFullStartAndInfo >> 4 /* LargeTokenFullStartShift */; - } - function largeTokenUnpackHasLeadingTrivia(packed) { - return (packed & 1 /* LargeTokenLeadingTriviaBitMask */) !== 0; - } - function largeTokenUnpackHasTrailingTrivia(packed) { - return (packed & 4 /* LargeTokenTrailingTriviaBitMask */) !== 0; - } - function largeTokenUnpackHasLeadingComment(packed) { - return (packed & 2 /* LargeTokenLeadingCommentBitMask */) !== 0; - } - function largeTokenUnpackHasTrailingComment(packed) { - return (packed & 8 /* LargeTokenTrailingCommentBitMask */) !== 0; - } - function largeTokenUnpackTriviaInfo(packed) { - return packed & 15 /* LargeTokenTriviaBitMask */; - } - var isKeywordStartCharacter = TypeScript.ArrayUtilities.createArray(127 /* maxAsciiCharacter */, 0); - var isIdentifierStartCharacter = TypeScript.ArrayUtilities.createArray(127 /* maxAsciiCharacter */, false); - var isIdentifierPartCharacter = TypeScript.ArrayUtilities.createArray(127 /* maxAsciiCharacter */, false); - for (var character = 0; character < 127 /* maxAsciiCharacter */; character++) { - if ((character >= 97 /* a */ && character <= 122 /* z */) || (character >= 65 /* A */ && character <= 90 /* Z */) || character === 95 /* _ */ || character === 36 /* $ */) { - isIdentifierStartCharacter[character] = true; - isIdentifierPartCharacter[character] = true; - } - else if (character >= 48 /* _0 */ && character <= 57 /* _9 */) { - isIdentifierPartCharacter[character] = true; - } - } - for (var keywordKind = TypeScript.SyntaxKind.FirstKeyword; keywordKind <= TypeScript.SyntaxKind.LastKeyword; keywordKind++) { - var keyword = TypeScript.SyntaxFacts.getText(keywordKind); - isKeywordStartCharacter[keyword.charCodeAt(0)] = 1; - } - function isContextualToken(token) { - switch (token.kind()) { - case 10 /* RegularExpressionLiteral */: - case 98 /* GreaterThanGreaterThanToken */: - case 99 /* GreaterThanGreaterThanGreaterThanToken */: - case 85 /* GreaterThanEqualsToken */: - case 115 /* GreaterThanGreaterThanEqualsToken */: - case 116 /* GreaterThanGreaterThanGreaterThanEqualsToken */: - return true; - case 15 /* TemplateMiddleToken */: - case 16 /* TemplateEndToken */: - return true; - default: - return token.isKeywordConvertedToIdentifier(); - } - } - Scanner.isContextualToken = isContextualToken; - var lastTokenInfo = { leadingTriviaWidth: -1, width: -1 }; - var lastTokenInfoTokenID = -1; - var triviaScanner = createScannerInternal(2 /* Latest */, TypeScript.SimpleText.fromString(""), function () { - }); - function fillSizeInfo(token, text) { - if (lastTokenInfoTokenID !== TypeScript.syntaxID(token)) { - triviaScanner.fillTokenInfo(token, text, lastTokenInfo); - lastTokenInfoTokenID = TypeScript.syntaxID(token); - } - } - function fullText(token, text) { - return text.substr(token.fullStart(), token.fullWidth()); - } - function leadingTrivia(token, text) { - if (!token.hasLeadingTrivia()) { - return TypeScript.Syntax.emptyTriviaList; - } - return triviaScanner.scanTrivia(token, text, false); - } - function trailingTrivia(token, text) { - if (!token.hasTrailingTrivia()) { - return TypeScript.Syntax.emptyTriviaList; - } - return triviaScanner.scanTrivia(token, text, true); - } - function leadingTriviaWidth(token, text) { - if (!token.hasLeadingTrivia()) { - return 0; - } - fillSizeInfo(token, text); - return lastTokenInfo.leadingTriviaWidth; - } - function trailingTriviaWidth(token, text) { - if (!token.hasTrailingTrivia()) { - return 0; - } - fillSizeInfo(token, text); - return token.fullWidth() - lastTokenInfo.leadingTriviaWidth - lastTokenInfo.width; - } - function tokenIsIncrementallyUnusable(token) { - return false; - } - var FixedWidthTokenWithNoTrivia = (function () { - function FixedWidthTokenWithNoTrivia(_packedData) { - this._packedData = _packedData; - } - FixedWidthTokenWithNoTrivia.prototype.setFullStart = function (fullStart) { - this._packedData = fixedWidthTokenPackData(fullStart, this.kind()); - }; - FixedWidthTokenWithNoTrivia.prototype.childCount = function () { - return 0; - }; - FixedWidthTokenWithNoTrivia.prototype.childAt = function (index) { - throw TypeScript.Errors.invalidOperation(); - }; - FixedWidthTokenWithNoTrivia.prototype.accept = function (visitor) { - return visitor.visitToken(this); - }; - FixedWidthTokenWithNoTrivia.prototype.isIncrementallyUnusable = function () { - return false; - }; - FixedWidthTokenWithNoTrivia.prototype.isKeywordConvertedToIdentifier = function () { - return false; - }; - FixedWidthTokenWithNoTrivia.prototype.hasSkippedToken = function () { - return false; - }; - FixedWidthTokenWithNoTrivia.prototype.fullText = function () { - return TypeScript.SyntaxFacts.getText(this.kind()); - }; - FixedWidthTokenWithNoTrivia.prototype.text = function () { - return this.fullText(); - }; - FixedWidthTokenWithNoTrivia.prototype.leadingTrivia = function () { - return TypeScript.Syntax.emptyTriviaList; - }; - FixedWidthTokenWithNoTrivia.prototype.trailingTrivia = function () { - return TypeScript.Syntax.emptyTriviaList; - }; - FixedWidthTokenWithNoTrivia.prototype.leadingTriviaWidth = function () { - return 0; - }; - FixedWidthTokenWithNoTrivia.prototype.trailingTriviaWidth = function () { - return 0; - }; - FixedWidthTokenWithNoTrivia.prototype.kind = function () { - return this._packedData & 127 /* KindMask */; - }; - FixedWidthTokenWithNoTrivia.prototype.fullWidth = function () { - return fixedWidthTokenLength(this._packedData & 127 /* KindMask */); - }; - FixedWidthTokenWithNoTrivia.prototype.fullStart = function () { - return fixedWidthTokenUnpackFullStart(this._packedData); - }; - FixedWidthTokenWithNoTrivia.prototype.hasLeadingTrivia = function () { - return false; - }; - FixedWidthTokenWithNoTrivia.prototype.hasTrailingTrivia = function () { - return false; - }; - FixedWidthTokenWithNoTrivia.prototype.hasLeadingComment = function () { - return false; - }; - FixedWidthTokenWithNoTrivia.prototype.hasTrailingComment = function () { - return false; - }; - FixedWidthTokenWithNoTrivia.prototype.clone = function () { - return new FixedWidthTokenWithNoTrivia(this._packedData); - }; - return FixedWidthTokenWithNoTrivia; - })(); - var LargeScannerToken = (function () { - function LargeScannerToken(_packedFullStartAndInfo, _packedFullWidthAndKind, cachedText) { - this._packedFullStartAndInfo = _packedFullStartAndInfo; - this._packedFullWidthAndKind = _packedFullWidthAndKind; - if (cachedText !== undefined) { - this.cachedText = cachedText; - } - } - LargeScannerToken.prototype.setFullStart = function (fullStart) { - this._packedFullStartAndInfo = largeTokenPackFullStartAndInfo(fullStart, largeTokenUnpackTriviaInfo(this._packedFullStartAndInfo)); - }; - LargeScannerToken.prototype.childCount = function () { - return 0; - }; - LargeScannerToken.prototype.childAt = function (index) { - throw TypeScript.Errors.invalidOperation(); - }; - LargeScannerToken.prototype.accept = function (visitor) { - return visitor.visitToken(this); - }; - LargeScannerToken.prototype.syntaxTreeText = function (text) { - var result = text || TypeScript.syntaxTree(this).text; - TypeScript.Debug.assert(result); - return result; - }; - LargeScannerToken.prototype.isIncrementallyUnusable = function () { - return tokenIsIncrementallyUnusable(this); - }; - LargeScannerToken.prototype.isKeywordConvertedToIdentifier = function () { - return false; - }; - LargeScannerToken.prototype.hasSkippedToken = function () { - return false; - }; - LargeScannerToken.prototype.fullText = function (text) { - return fullText(this, this.syntaxTreeText(text)); - }; - LargeScannerToken.prototype.text = function () { - var cachedText = this.cachedText; - return cachedText !== undefined ? cachedText : TypeScript.SyntaxFacts.getText(this.kind()); - }; - LargeScannerToken.prototype.leadingTrivia = function (text) { - return leadingTrivia(this, this.syntaxTreeText(text)); - }; - LargeScannerToken.prototype.trailingTrivia = function (text) { - return trailingTrivia(this, this.syntaxTreeText(text)); - }; - LargeScannerToken.prototype.leadingTriviaWidth = function (text) { - return leadingTriviaWidth(this, this.syntaxTreeText(text)); - }; - LargeScannerToken.prototype.trailingTriviaWidth = function (text) { - return trailingTriviaWidth(this, this.syntaxTreeText(text)); - }; - LargeScannerToken.prototype.kind = function () { - return this._packedFullWidthAndKind & 127 /* KindMask */; - }; - LargeScannerToken.prototype.fullWidth = function () { - return largeTokenUnpackFullWidth(this._packedFullWidthAndKind); - }; - LargeScannerToken.prototype.fullStart = function () { - return largeTokenUnpackFullStart(this._packedFullStartAndInfo); - }; - LargeScannerToken.prototype.hasLeadingTrivia = function () { - return largeTokenUnpackHasLeadingTrivia(this._packedFullStartAndInfo); - }; - LargeScannerToken.prototype.hasTrailingTrivia = function () { - return largeTokenUnpackHasTrailingTrivia(this._packedFullStartAndInfo); - }; - LargeScannerToken.prototype.hasLeadingComment = function () { - return largeTokenUnpackHasLeadingComment(this._packedFullStartAndInfo); - }; - LargeScannerToken.prototype.hasTrailingComment = function () { - return largeTokenUnpackHasTrailingComment(this._packedFullStartAndInfo); - }; - LargeScannerToken.prototype.clone = function () { - return new LargeScannerToken(this._packedFullStartAndInfo, this._packedFullWidthAndKind, this.cachedText); - }; - return LargeScannerToken; - })(); - function createScanner(languageVersion, text, reportDiagnostic) { - var scanner = createScannerInternal(languageVersion, text, reportDiagnostic); - return { - setIndex: scanner.setIndex, - scan: scanner.scan - }; - } - Scanner.createScanner = createScanner; - function createScannerInternal(languageVersion, text, reportDiagnostic) { - var str; - var index; - var start; - var end; - function setIndex(_index) { - index = _index; - } - function reset(_text, _start, _end) { - TypeScript.Debug.assert(_start <= _text.length(), "Token's start was not within the bounds of text: " + _start + " - [0, " + _text.length() + ")"); - TypeScript.Debug.assert(_end <= _text.length(), "Token's end was not within the bounds of text: " + _end + " - [0, " + _text.length() + ")"); - if (!str || text !== _text) { - text = _text; - str = _text.substr(0, _text.length()); - } - start = _start; - end = _end; - index = _start; - } - function scan(allowContextualToken) { - var fullStart = index; - var leadingTriviaInfo = scanTriviaInfo(false); - var start = index; - var kindAndIsVariableWidth = scanSyntaxKind(allowContextualToken); - var end = index; - var trailingTriviaInfo = scanTriviaInfo(true); - var fullWidth = index - fullStart; - var kind = kindAndIsVariableWidth & 127 /* KindMask */; - var isFixedWidth = kind >= TypeScript.SyntaxKind.FirstFixedWidth && kind <= TypeScript.SyntaxKind.LastFixedWidth && ((kindAndIsVariableWidth & 128 /* IsVariableWidthMask */) === 0); - if (isFixedWidth && leadingTriviaInfo === 0 && trailingTriviaInfo === 0 && fullStart <= 8388607 /* FixedWidthTokenMaxFullStart */ && (kindAndIsVariableWidth & 128 /* IsVariableWidthMask */) === 0) { - return new FixedWidthTokenWithNoTrivia((fullStart << 7 /* FixedWidthTokenFullStartShift */) | kind); - } - else { - var packedFullStartAndTriviaInfo = (fullStart << 4 /* LargeTokenFullStartShift */) | leadingTriviaInfo | (trailingTriviaInfo << 2); - var packedFullWidthAndKind = (fullWidth << 7 /* LargeTokenFullWidthShift */) | kind; - var cachedText = isFixedWidth ? undefined : text.substr(start, end - start); - return new LargeScannerToken(packedFullStartAndTriviaInfo, packedFullWidthAndKind, cachedText); - } - } - function scanTrivia(parent, text, isTrailing) { - var tokenFullStart = parent.fullStart(); - var tokenStart = tokenFullStart + leadingTriviaWidth(parent, text); - if (isTrailing) { - reset(text, tokenStart + parent.text().length, tokenFullStart + parent.fullWidth()); - } - else { - reset(text, tokenFullStart, tokenStart); - } - var trivia = []; - while (true) { - if (index < end) { - var ch = str.charCodeAt(index); - switch (ch) { - case 32 /* space */: - case 160 /* nonBreakingSpace */: - case 8192 /* enQuad */: - case 8193 /* emQuad */: - case 8194 /* enSpace */: - case 8195 /* emSpace */: - case 8196 /* threePerEmSpace */: - case 8197 /* fourPerEmSpace */: - case 8198 /* sixPerEmSpace */: - case 8199 /* figureSpace */: - case 8200 /* punctuationSpace */: - case 8201 /* thinSpace */: - case 8202 /* hairSpace */: - case 8203 /* zeroWidthSpace */: - case 8239 /* narrowNoBreakSpace */: - case 12288 /* ideographicSpace */: - case 9 /* tab */: - case 11 /* verticalTab */: - case 12 /* formFeed */: - case 65279 /* byteOrderMark */: - trivia.push(scanWhitespaceTrivia()); - continue; - case 47 /* slash */: - var ch2 = str.charCodeAt(index + 1); - if (ch2 === 47 /* slash */) { - trivia.push(scanSingleLineCommentTrivia()); - continue; - } - if (ch2 === 42 /* asterisk */) { - trivia.push(scanMultiLineCommentTrivia()); - continue; - } - throw TypeScript.Errors.invalidOperation(); - case 13 /* carriageReturn */: - case 10 /* lineFeed */: - case 8233 /* paragraphSeparator */: - case 8232 /* lineSeparator */: - trivia.push(scanLineTerminatorSequenceTrivia(ch)); - if (!isTrailing) { - continue; - } - break; - default: - throw TypeScript.Errors.invalidOperation(); - } - } - var triviaList = TypeScript.Syntax.triviaList(trivia); - triviaList.parent = parent; - return triviaList; - } - } - function scanTriviaInfo(isTrailing) { - var result = 0; - var _end = end; - while (index < _end) { - var ch = str.charCodeAt(index); - switch (ch) { - case 9 /* tab */: - case 32 /* space */: - case 11 /* verticalTab */: - case 12 /* formFeed */: - index++; - result |= 1; - continue; - case 13 /* carriageReturn */: - if ((index + 1) < end && str.charCodeAt(index + 1) === 10 /* lineFeed */) { - index++; - } - case 10 /* lineFeed */: - index++; - result |= 1; - if (isTrailing) { - return result; - } - continue; - case 47 /* slash */: - if ((index + 1) < _end) { - var ch2 = str.charCodeAt(index + 1); - if (ch2 === 47 /* slash */) { - result |= 3; - skipSingleLineCommentTrivia(); - continue; - } - if (ch2 === 42 /* asterisk */) { - result |= 3; - skipMultiLineCommentTrivia(); - continue; - } - } - return result; - default: - if (ch > 127 /* maxAsciiCharacter */ && slowScanTriviaInfo(ch)) { - result |= 1; - continue; - } - return result; - } - } - return result; - } - function slowScanTriviaInfo(ch) { - switch (ch) { - case 160 /* nonBreakingSpace */: - case 8192 /* enQuad */: - case 8193 /* emQuad */: - case 8194 /* enSpace */: - case 8195 /* emSpace */: - case 8196 /* threePerEmSpace */: - case 8197 /* fourPerEmSpace */: - case 8198 /* sixPerEmSpace */: - case 8199 /* figureSpace */: - case 8200 /* punctuationSpace */: - case 8201 /* thinSpace */: - case 8202 /* hairSpace */: - case 8203 /* zeroWidthSpace */: - case 8239 /* narrowNoBreakSpace */: - case 12288 /* ideographicSpace */: - case 65279 /* byteOrderMark */: - case 8233 /* paragraphSeparator */: - case 8232 /* lineSeparator */: - index++; - return true; - default: - return false; - } - } - function isNewLineCharacter(ch) { - switch (ch) { - case 13 /* carriageReturn */: - case 10 /* lineFeed */: - case 8233 /* paragraphSeparator */: - case 8232 /* lineSeparator */: - return true; - default: - return false; - } - } - function scanWhitespaceTrivia() { - var absoluteStartIndex = index; - while (true) { - var ch = str.charCodeAt(index); - switch (ch) { - case 32 /* space */: - case 160 /* nonBreakingSpace */: - case 8192 /* enQuad */: - case 8193 /* emQuad */: - case 8194 /* enSpace */: - case 8195 /* emSpace */: - case 8196 /* threePerEmSpace */: - case 8197 /* fourPerEmSpace */: - case 8198 /* sixPerEmSpace */: - case 8199 /* figureSpace */: - case 8200 /* punctuationSpace */: - case 8201 /* thinSpace */: - case 8202 /* hairSpace */: - case 8203 /* zeroWidthSpace */: - case 8239 /* narrowNoBreakSpace */: - case 12288 /* ideographicSpace */: - case 9 /* tab */: - case 11 /* verticalTab */: - case 12 /* formFeed */: - case 65279 /* byteOrderMark */: - index++; - continue; - } - break; - } - return createTrivia(2 /* WhitespaceTrivia */, absoluteStartIndex); - } - function createTrivia(kind, absoluteStartIndex) { - var fullWidth = index - absoluteStartIndex; - return TypeScript.Syntax.deferredTrivia(kind, text, absoluteStartIndex, fullWidth); - } - function scanSingleLineCommentTrivia() { - var absoluteStartIndex = index; - skipSingleLineCommentTrivia(); - return createTrivia(5 /* SingleLineCommentTrivia */, absoluteStartIndex); - } - function skipSingleLineCommentTrivia() { - index += 2; - while (index < end) { - if (isNewLineCharacter(str.charCodeAt(index))) { - return; - } - index++; - } - } - function scanMultiLineCommentTrivia() { - var absoluteStartIndex = index; - skipMultiLineCommentTrivia(); - return createTrivia(4 /* MultiLineCommentTrivia */, absoluteStartIndex); - } - function skipMultiLineCommentTrivia() { - index += 2; - while (true) { - if (index === end) { - reportDiagnostic(end, 0, TypeScript.DiagnosticCode._0_expected, ["*/"]); - return; - } - if ((index + 1) < end && str.charCodeAt(index) === 42 /* asterisk */ && str.charCodeAt(index + 1) === 47 /* slash */) { - index += 2; - return; - } - index++; - } - } - function scanLineTerminatorSequenceTrivia(ch) { - var absoluteStartIndex = index; - skipLineTerminatorSequence(ch); - return createTrivia(3 /* NewLineTrivia */, absoluteStartIndex); - } - function skipLineTerminatorSequence(ch) { - index++; - if (ch === 13 /* carriageReturn */ && str.charCodeAt(index) === 10 /* lineFeed */) { - index++; - } - } - function scanSyntaxKind(allowContextualToken) { - if (index >= end) { - return 8 /* EndOfFileToken */; - } - var character = str.charCodeAt(index); - index++; - switch (character) { - case 33 /* exclamation */: return scanExclamationToken(); - case 34 /* doubleQuote */: return scanStringLiteral(character); - case 37 /* percent */: return scanPercentToken(); - case 38 /* ampersand */: return scanAmpersandToken(); - case 39 /* singleQuote */: return scanStringLiteral(character); - case 40 /* openParen */: return 74 /* OpenParenToken */; - case 41 /* closeParen */: return 75 /* CloseParenToken */; - case 42 /* asterisk */: return scanAsteriskToken(); - case 43 /* plus */: return scanPlusToken(); - case 44 /* comma */: return 81 /* CommaToken */; - case 45 /* minus */: return scanMinusToken(); - case 46 /* dot */: return scanDotToken(); - case 47 /* slash */: return scanSlashToken(allowContextualToken); - case 48 /* _0 */: - case 49 /* _1 */: - case 50 /* _2 */: - case 51 /* _3 */: - case 52 /* _4 */: - case 53 /* _5 */: - case 54 /* _6 */: - case 55 /* _7 */: - case 56 /* _8 */: - case 57 /* _9 */: - return scanNumericLiteral(character); - case 58 /* colon */: return 108 /* ColonToken */; - case 59 /* semicolon */: return 80 /* SemicolonToken */; - case 60 /* lessThan */: return scanLessThanToken(); - case 61 /* equals */: return scanEqualsToken(); - case 62 /* greaterThan */: return scanGreaterThanToken(allowContextualToken); - case 63 /* question */: return 107 /* QuestionToken */; - case 91 /* openBracket */: return 76 /* OpenBracketToken */; - case 93 /* closeBracket */: return 77 /* CloseBracketToken */; - case 94 /* caret */: return scanCaretToken(); - case 96 /* backtick */: return scanTemplateToken(character); - case 123 /* openBrace */: return 72 /* OpenBraceToken */; - case 124 /* bar */: return scanBarToken(); - case 125 /* closeBrace */: return scanCloseBraceToken(allowContextualToken, character); - case 126 /* tilde */: return 104 /* TildeToken */; - } - if (isIdentifierStartCharacter[character]) { - var result = tryFastScanIdentifierOrKeyword(character); - if (result !== 0 /* None */) { - return result; - } - } - index--; - if (isIdentifierStart(peekCharOrUnicodeEscape())) { - return slowScanIdentifierOrKeyword(); - } - var text = String.fromCharCode(character); - var messageText = getErrorMessageText(text); - reportDiagnostic(index, 1, TypeScript.DiagnosticCode.Unexpected_character_0, [messageText]); - index++; - return 7 /* ErrorToken */; - } - function isIdentifierStart(interpretedChar) { - if (isIdentifierStartCharacter[interpretedChar]) { - return true; - } - return interpretedChar > 127 /* maxAsciiCharacter */ && TypeScript.Unicode.isIdentifierStart(interpretedChar, languageVersion); - } - function isIdentifierPart(interpretedChar) { - if (isIdentifierPartCharacter[interpretedChar]) { - return true; - } - return interpretedChar > 127 /* maxAsciiCharacter */ && TypeScript.Unicode.isIdentifierPart(interpretedChar, languageVersion); - } - function tryFastScanIdentifierOrKeyword(firstCharacter) { - var startIndex = index; - var character = firstCharacter; - while (index < end) { - character = str.charCodeAt(index); - if (!isIdentifierPartCharacter[character]) { - break; - } - index++; - } - if (index < end && (character === 92 /* backslash */ || character > 127 /* maxAsciiCharacter */)) { - index = startIndex; - return 0 /* None */; - } - else { - if (isKeywordStartCharacter[firstCharacter]) { - return TypeScript.ScannerUtilities.identifierKind(str, startIndex - 1, index - startIndex + 1); - } - else { - return 9 /* IdentifierName */; - } - } - } - function slowScanIdentifierOrKeyword() { - var startIndex = index; - do { - scanCharOrUnicodeEscape(); - } while (isIdentifierPart(peekCharOrUnicodeEscape())); - var length = index - startIndex; - var text = str.substr(startIndex, length); - var valueText = TypeScript.massageEscapes(text); - var keywordKind = TypeScript.SyntaxFacts.getTokenKind(valueText); - if (keywordKind >= TypeScript.SyntaxKind.FirstKeyword && keywordKind <= TypeScript.SyntaxKind.LastKeyword) { - return keywordKind | 128 /* IsVariableWidthMask */; - } - return 9 /* IdentifierName */; - } - function scanNumericLiteral(ch) { - if (isHexNumericLiteral(ch)) { - scanHexNumericLiteral(); - } - else if (isOctalNumericLiteral(ch)) { - scanOctalNumericLiteral(); - } - else { - scanDecimalNumericLiteral(); - } - return 11 /* NumericLiteral */; - } - function isOctalNumericLiteral(ch) { - return ch === 48 /* _0 */ && TypeScript.CharacterInfo.isOctalDigit(str.charCodeAt(index)); - } - function scanOctalNumericLiteral() { - var start = index - 1; - while (TypeScript.CharacterInfo.isOctalDigit(str.charCodeAt(index))) { - index++; - } - if (languageVersion >= 1 /* ES5 */) { - reportDiagnostic(start, index - start, TypeScript.DiagnosticCode.Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher, undefined); - } - } - function scanDecimalDigits() { - while (TypeScript.CharacterInfo.isDecimalDigit(str.charCodeAt(index))) { - index++; - } - } - function scanDecimalNumericLiteral() { - scanDecimalDigits(); - if (str.charCodeAt(index) === 46 /* dot */) { - index++; - } - scanDecimalNumericLiteralAfterDot(); - } - function scanDecimalNumericLiteralAfterDot() { - scanDecimalDigits(); - var ch = str.charCodeAt(index); - if (ch === 101 /* e */ || ch === 69 /* E */) { - var nextChar1 = str.charCodeAt(index + 1); - if (TypeScript.CharacterInfo.isDecimalDigit(nextChar1)) { - index++; - scanDecimalDigits(); - } - else if (nextChar1 === 45 /* minus */ || nextChar1 === 43 /* plus */) { - var nextChar2 = str.charCodeAt(index + 2); - if (TypeScript.CharacterInfo.isDecimalDigit(nextChar2)) { - index += 2; - scanDecimalDigits(); - } - } - } - } - function scanHexNumericLiteral() { - index++; - while (TypeScript.CharacterInfo.isHexDigit(str.charCodeAt(index))) { - index++; - } - } - function isHexNumericLiteral(ch) { - if (ch === 48 /* _0 */) { - var ch = str.charCodeAt(index); - if (ch === 120 /* x */ || ch === 88 /* X */) { - return TypeScript.CharacterInfo.isHexDigit(str.charCodeAt(index + 1)); - } - } - return false; - } - function scanLessThanToken() { - var ch0 = str.charCodeAt(index); - if (ch0 === 61 /* equals */) { - index++; - return 84 /* LessThanEqualsToken */; - } - else if (ch0 === 60 /* lessThan */) { - index++; - if (str.charCodeAt(index) === 61 /* equals */) { - index++; - return 114 /* LessThanLessThanEqualsToken */; - } - else { - return 97 /* LessThanLessThanToken */; - } - } - else { - return 82 /* LessThanToken */; - } - } - function scanGreaterThanToken(allowContextualToken) { - if (allowContextualToken) { - var ch0 = str.charCodeAt(index); - if (ch0 === 62 /* greaterThan */) { - index++; - var ch1 = str.charCodeAt(index); - if (ch1 === 62 /* greaterThan */) { - index++; - var ch2 = str.charCodeAt(index); - if (ch2 === 61 /* equals */) { - index++; - return 116 /* GreaterThanGreaterThanGreaterThanEqualsToken */; - } - else { - return 99 /* GreaterThanGreaterThanGreaterThanToken */; - } - } - else if (ch1 === 61 /* equals */) { - index++; - return 115 /* GreaterThanGreaterThanEqualsToken */; - } - else { - return 98 /* GreaterThanGreaterThanToken */; - } - } - else if (ch0 === 61 /* equals */) { - index++; - return 85 /* GreaterThanEqualsToken */; - } - } - return 83 /* GreaterThanToken */; - } - function scanBarToken() { - var ch = str.charCodeAt(index); - if (ch === 61 /* equals */) { - index++; - return 118 /* BarEqualsToken */; - } - else if (ch === 124 /* bar */) { - index++; - return 106 /* BarBarToken */; - } - else { - return 101 /* BarToken */; - } - } - function scanCaretToken() { - if (str.charCodeAt(index) === 61 /* equals */) { - index++; - return 119 /* CaretEqualsToken */; - } - else { - return 102 /* CaretToken */; - } - } - function scanCloseBraceToken(allowContextualToken, startChar) { - return allowContextualToken ? scanTemplateToken(startChar) : 73 /* CloseBraceToken */; - } - function scanTemplateToken(startChar) { - var startedWithBacktick = startChar === 96 /* backtick */; - while (true) { - if (index === end) { - reportDiagnostic(end, 0, TypeScript.DiagnosticCode._0_expected, ["`"]); - break; - } - var ch = str.charCodeAt(index); - index++; - if (ch === 96 /* backtick */) { - break; - } - if (ch === 36 /* $ */ && index < end && str.charCodeAt(index) === 123 /* openBrace */) { - index++; - return startedWithBacktick ? 14 /* TemplateStartToken */ : 15 /* TemplateMiddleToken */; - } - } - return startedWithBacktick ? 13 /* NoSubstitutionTemplateToken */ : 16 /* TemplateEndToken */; - } - function scanAmpersandToken() { - var character = str.charCodeAt(index); - if (character === 61 /* equals */) { - index++; - return 117 /* AmpersandEqualsToken */; - } - else if (character === 38 /* ampersand */) { - index++; - return 105 /* AmpersandAmpersandToken */; - } - else { - return 100 /* AmpersandToken */; - } - } - function scanPercentToken() { - if (str.charCodeAt(index) === 61 /* equals */) { - index++; - return 113 /* PercentEqualsToken */; - } - else { - return 94 /* PercentToken */; - } - } - function scanMinusToken() { - var character = str.charCodeAt(index); - if (character === 61 /* equals */) { - index++; - return 111 /* MinusEqualsToken */; - } - else if (character === 45 /* minus */) { - index++; - return 96 /* MinusMinusToken */; - } - else { - return 92 /* MinusToken */; - } - } - function scanPlusToken() { - var character = str.charCodeAt(index); - if (character === 61 /* equals */) { - index++; - return 110 /* PlusEqualsToken */; - } - else if (character === 43 /* plus */) { - index++; - return 95 /* PlusPlusToken */; - } - else { - return 91 /* PlusToken */; - } - } - function scanAsteriskToken() { - if (str.charCodeAt(index) === 61 /* equals */) { - index++; - return 112 /* AsteriskEqualsToken */; - } - else { - return 93 /* AsteriskToken */; - } - } - function scanEqualsToken() { - var character = str.charCodeAt(index); - if (character === 61 /* equals */) { - index++; - if (str.charCodeAt(index) === 61 /* equals */) { - index++; - return 89 /* EqualsEqualsEqualsToken */; - } - else { - return 86 /* EqualsEqualsToken */; - } - } - else if (character === 62 /* greaterThan */) { - index++; - return 87 /* EqualsGreaterThanToken */; - } - else { - return 109 /* EqualsToken */; - } - } - function scanDotToken() { - var nextChar = str.charCodeAt(index); - if (TypeScript.CharacterInfo.isDecimalDigit(nextChar)) { - scanDecimalNumericLiteralAfterDot(); - return 11 /* NumericLiteral */; - } - if (nextChar === 46 /* dot */ && str.charCodeAt(index + 1) === 46 /* dot */) { - index += 2; - return 79 /* DotDotDotToken */; - } - else { - return 78 /* DotToken */; - } - } - function scanSlashToken(allowContextualToken) { - if (allowContextualToken) { - var result = tryScanRegularExpressionToken(); - if (result !== 0 /* None */) { - return result; - } - } - if (str.charCodeAt(index) === 61 /* equals */) { - index++; - return 121 /* SlashEqualsToken */; - } - else { - return 120 /* SlashToken */; - } - } - function tryScanRegularExpressionToken() { - var startIndex = index; - var inEscape = false; - var inCharacterClass = false; - while (true) { - var ch = str.charCodeAt(index); - if (isNaN(ch) || isNewLineCharacter(ch)) { - index = startIndex; - return 0 /* None */; - } - index++; - if (inEscape) { - inEscape = false; - continue; - } - switch (ch) { - case 92 /* backslash */: - inEscape = true; - continue; - case 91 /* openBracket */: - inCharacterClass = true; - continue; - case 93 /* closeBracket */: - inCharacterClass = false; - continue; - case 47 /* slash */: - if (inCharacterClass) { - continue; - } - break; - default: - continue; - } - break; - } - while (isIdentifierPartCharacter[str.charCodeAt(index)]) { - index++; - } - return 10 /* RegularExpressionLiteral */; - } - function scanExclamationToken() { - if (str.charCodeAt(index) === 61 /* equals */) { - index++; - if (str.charCodeAt(index) === 61 /* equals */) { - index++; - return 90 /* ExclamationEqualsEqualsToken */; - } - else { - return 88 /* ExclamationEqualsToken */; - } - } - else { - return 103 /* ExclamationToken */; - } - } - function getErrorMessageText(text) { - if (text === "\\") { - return '"\\"'; - } - return JSON.stringify(text); - } - function skipEscapeSequence() { - var rewindPoint = index; - index++; - var ch = str.charCodeAt(index); - if (isNaN(ch)) { - return; - } - index++; - switch (ch) { - case 120 /* x */: - case 117 /* u */: - index = rewindPoint; - var value = scanUnicodeOrHexEscape(true); - break; - case 13 /* carriageReturn */: - if (str.charCodeAt(index) === 10 /* lineFeed */) { - index++; - } - break; - default: - break; - } - } - function scanStringLiteral(quoteCharacter) { - while (true) { - var ch = str.charCodeAt(index); - if (ch === 92 /* backslash */) { - skipEscapeSequence(); - } - else if (ch === quoteCharacter) { - index++; - break; - } - else if (isNaN(ch) || isNewLineCharacter(ch)) { - reportDiagnostic(Math.min(index, end), 1, TypeScript.DiagnosticCode.Missing_close_quote_character, undefined); - break; - } - else { - index++; - } - } - return 12 /* StringLiteral */; - } - function isUnicodeEscape(character) { - return character === 92 /* backslash */ && str.charCodeAt(index + 1) === 117 /* u */; - } - function peekCharOrUnicodeEscape() { - var character = str.charCodeAt(index); - if (isUnicodeEscape(character)) { - return peekUnicodeOrHexEscape(); - } - else { - return character; - } - } - function peekUnicodeOrHexEscape() { - var startIndex = index; - var ch = scanUnicodeOrHexEscape(false); - index = startIndex; - return ch; - } - function scanCharOrUnicodeEscape() { - if (str.charCodeAt(index) === 92 /* backslash */ && str.charCodeAt(index + 1) === 117 /* u */) { - scanUnicodeOrHexEscape(true); - } - else { - index++; - } - } - function scanUnicodeOrHexEscape(report) { - var start = index; - var character = str.charCodeAt(index); - index++; - character = str.charCodeAt(index); - var intChar = 0; - index++; - var count = character === 117 /* u */ ? 4 : 2; - for (var i = 0; i < count; i++) { - var ch2 = str.charCodeAt(index); - if (!TypeScript.CharacterInfo.isHexDigit(ch2)) { - if (report) { - reportDiagnostic(start, index - start, TypeScript.DiagnosticCode.Unrecognized_escape_sequence, undefined); - } - break; - } - intChar = (intChar << 4) + TypeScript.CharacterInfo.hexValue(ch2); - index++; - } - return intChar; - } - function fillTokenInfo(token, text, tokenInfo) { - var fullStart = token.fullStart(); - var fullEnd = fullStart + token.fullWidth(); - reset(text, fullStart, fullEnd); - scanTriviaInfo(false); - var start = index; - scanSyntaxKind(isContextualToken(token)); - var end = index; - tokenInfo.leadingTriviaWidth = start - fullStart; - tokenInfo.width = end - start; - } - reset(text, 0, text.length()); - return { - setIndex: setIndex, - scan: scan, - fillTokenInfo: fillTokenInfo, - scanTrivia: scanTrivia - }; - } - function isValidIdentifier(text, languageVersion) { - var hadError = false; - var scanner = createScanner(languageVersion, text, function () { return hadError = true; }); - var token = scanner.scan(false); - return !hadError && TypeScript.SyntaxFacts.isIdentifierNameOrAnyKeyword(token) && TypeScript.width(token) === text.length(); - } - Scanner.isValidIdentifier = isValidIdentifier; - function createParserSource(fileName, text, languageVersion) { - var _absolutePosition = 0; - var _tokenDiagnostics = []; - var rewindPointPool = []; - var rewindPointPoolCount = 0; - var lastDiagnostic = undefined; - var reportDiagnostic = function (position, fullWidth, diagnosticKey, args) { - lastDiagnostic = new TypeScript.Diagnostic(fileName, text.lineMap(), position, fullWidth, diagnosticKey, args); - }; - var slidingWindow = new TypeScript.SlidingWindow(fetchNextItem, TypeScript.ArrayUtilities.createArray(1024, undefined), undefined); - var scanner = createScanner(languageVersion, text, reportDiagnostic); - function release() { - slidingWindow = undefined; - scanner = undefined; - _tokenDiagnostics = []; - rewindPointPool = []; - lastDiagnostic = undefined; - reportDiagnostic = undefined; - } - function currentNode() { - return undefined; - } - function consumeNode(node) { - throw TypeScript.Errors.invalidOperation(); - } - function absolutePosition() { - return _absolutePosition; - } - function tokenDiagnostics() { - return _tokenDiagnostics; - } - function getOrCreateRewindPoint() { - if (rewindPointPoolCount === 0) { - return {}; - } - rewindPointPoolCount--; - var result = rewindPointPool[rewindPointPoolCount]; - rewindPointPool[rewindPointPoolCount] = undefined; - return result; - } - function getRewindPoint() { - var slidingWindowIndex = slidingWindow.getAndPinAbsoluteIndex(); - var rewindPoint = getOrCreateRewindPoint(); - rewindPoint.slidingWindowIndex = slidingWindowIndex; - rewindPoint.absolutePosition = _absolutePosition; - return rewindPoint; - } - function rewind(rewindPoint) { - slidingWindow.rewindToPinnedIndex(rewindPoint.slidingWindowIndex); - _absolutePosition = rewindPoint.absolutePosition; - } - function releaseRewindPoint(rewindPoint) { - slidingWindow.releaseAndUnpinAbsoluteIndex(rewindPoint.absoluteIndex); - rewindPointPool[rewindPointPoolCount] = rewindPoint; - rewindPointPoolCount++; - } - function fetchNextItem(allowContextualToken) { - var token = scanner.scan(allowContextualToken); - if (lastDiagnostic === undefined) { - return token; - } - _tokenDiagnostics.push(lastDiagnostic); - lastDiagnostic = undefined; - return TypeScript.Syntax.realizeToken(token, text); - } - function peekToken(n) { - return slidingWindow.peekItemN(n); - } - function consumeToken(token) { - _absolutePosition += token.fullWidth(); - slidingWindow.moveToNextItem(); - } - function currentToken() { - return slidingWindow.currentItem(false); - } - function removeDiagnosticsOnOrAfterPosition(position) { - var tokenDiagnosticsLength = _tokenDiagnostics.length; - while (tokenDiagnosticsLength > 0) { - var diagnostic = _tokenDiagnostics[tokenDiagnosticsLength - 1]; - if (diagnostic.start() >= position) { - tokenDiagnosticsLength--; - _tokenDiagnostics.pop(); - } - else { - break; - } - } - } - function resetToPosition(absolutePosition) { - TypeScript.Debug.assert(absolutePosition <= text.length(), "Trying to set the position outside the bounds of the text!"); - _absolutePosition = absolutePosition; - removeDiagnosticsOnOrAfterPosition(absolutePosition); - slidingWindow.disgardAllItemsFromCurrentIndexOnwards(); - scanner.setIndex(absolutePosition); - } - function currentContextualToken() { - resetToPosition(_absolutePosition); - var token = slidingWindow.currentItem(true); - return token; - } - return { - text: text, - fileName: fileName, - languageVersion: languageVersion, - currentNode: currentNode, - currentToken: currentToken, - currentContextualToken: currentContextualToken, - peekToken: peekToken, - consumeNode: consumeNode, - consumeToken: consumeToken, - getRewindPoint: getRewindPoint, - rewind: rewind, - releaseRewindPoint: releaseRewindPoint, - tokenDiagnostics: tokenDiagnostics, - release: release, - absolutePosition: absolutePosition, - resetToPosition: resetToPosition - }; - } - Scanner.createParserSource = createParserSource; - function fixedWidthTokenLength(kind) { - switch (kind) { - case 17 /* BreakKeyword */: return 5; - case 18 /* CaseKeyword */: return 4; - case 19 /* CatchKeyword */: return 5; - case 20 /* ContinueKeyword */: return 8; - case 21 /* DebuggerKeyword */: return 8; - case 22 /* DefaultKeyword */: return 7; - case 23 /* DeleteKeyword */: return 6; - case 24 /* DoKeyword */: return 2; - case 25 /* ElseKeyword */: return 4; - case 26 /* FalseKeyword */: return 5; - case 27 /* FinallyKeyword */: return 7; - case 28 /* ForKeyword */: return 3; - case 29 /* FunctionKeyword */: return 8; - case 30 /* IfKeyword */: return 2; - case 31 /* InKeyword */: return 2; - case 32 /* InstanceOfKeyword */: return 10; - case 33 /* NewKeyword */: return 3; - case 34 /* NullKeyword */: return 4; - case 35 /* ReturnKeyword */: return 6; - case 36 /* SwitchKeyword */: return 6; - case 37 /* ThisKeyword */: return 4; - case 38 /* ThrowKeyword */: return 5; - case 39 /* TrueKeyword */: return 4; - case 40 /* TryKeyword */: return 3; - case 41 /* TypeOfKeyword */: return 6; - case 42 /* VarKeyword */: return 3; - case 43 /* VoidKeyword */: return 4; - case 44 /* WhileKeyword */: return 5; - case 45 /* WithKeyword */: return 4; - case 46 /* ClassKeyword */: return 5; - case 47 /* ConstKeyword */: return 5; - case 48 /* EnumKeyword */: return 4; - case 49 /* ExportKeyword */: return 6; - case 50 /* ExtendsKeyword */: return 7; - case 51 /* ImportKeyword */: return 6; - case 52 /* SuperKeyword */: return 5; - case 53 /* ImplementsKeyword */: return 10; - case 54 /* InterfaceKeyword */: return 9; - case 55 /* LetKeyword */: return 3; - case 56 /* PackageKeyword */: return 7; - case 57 /* PrivateKeyword */: return 7; - case 58 /* ProtectedKeyword */: return 9; - case 59 /* PublicKeyword */: return 6; - case 60 /* StaticKeyword */: return 6; - case 61 /* YieldKeyword */: return 5; - case 62 /* AnyKeyword */: return 3; - case 63 /* BooleanKeyword */: return 7; - case 64 /* ConstructorKeyword */: return 11; - case 65 /* DeclareKeyword */: return 7; - case 66 /* GetKeyword */: return 3; - case 67 /* ModuleKeyword */: return 6; - case 68 /* RequireKeyword */: return 7; - case 69 /* NumberKeyword */: return 6; - case 70 /* SetKeyword */: return 3; - case 71 /* StringKeyword */: return 6; - case 72 /* OpenBraceToken */: return 1; - case 73 /* CloseBraceToken */: return 1; - case 74 /* OpenParenToken */: return 1; - case 75 /* CloseParenToken */: return 1; - case 76 /* OpenBracketToken */: return 1; - case 77 /* CloseBracketToken */: return 1; - case 78 /* DotToken */: return 1; - case 79 /* DotDotDotToken */: return 3; - case 80 /* SemicolonToken */: return 1; - case 81 /* CommaToken */: return 1; - case 82 /* LessThanToken */: return 1; - case 83 /* GreaterThanToken */: return 1; - case 84 /* LessThanEqualsToken */: return 2; - case 85 /* GreaterThanEqualsToken */: return 2; - case 86 /* EqualsEqualsToken */: return 2; - case 87 /* EqualsGreaterThanToken */: return 2; - case 88 /* ExclamationEqualsToken */: return 2; - case 89 /* EqualsEqualsEqualsToken */: return 3; - case 90 /* ExclamationEqualsEqualsToken */: return 3; - case 91 /* PlusToken */: return 1; - case 92 /* MinusToken */: return 1; - case 93 /* AsteriskToken */: return 1; - case 94 /* PercentToken */: return 1; - case 95 /* PlusPlusToken */: return 2; - case 96 /* MinusMinusToken */: return 2; - case 97 /* LessThanLessThanToken */: return 2; - case 98 /* GreaterThanGreaterThanToken */: return 2; - case 99 /* GreaterThanGreaterThanGreaterThanToken */: return 3; - case 100 /* AmpersandToken */: return 1; - case 101 /* BarToken */: return 1; - case 102 /* CaretToken */: return 1; - case 103 /* ExclamationToken */: return 1; - case 104 /* TildeToken */: return 1; - case 105 /* AmpersandAmpersandToken */: return 2; - case 106 /* BarBarToken */: return 2; - case 107 /* QuestionToken */: return 1; - case 108 /* ColonToken */: return 1; - case 109 /* EqualsToken */: return 1; - case 110 /* PlusEqualsToken */: return 2; - case 111 /* MinusEqualsToken */: return 2; - case 112 /* AsteriskEqualsToken */: return 2; - case 113 /* PercentEqualsToken */: return 2; - case 114 /* LessThanLessThanEqualsToken */: return 3; - case 115 /* GreaterThanGreaterThanEqualsToken */: return 3; - case 116 /* GreaterThanGreaterThanGreaterThanEqualsToken */: return 4; - case 117 /* AmpersandEqualsToken */: return 2; - case 118 /* BarEqualsToken */: return 2; - case 119 /* CaretEqualsToken */: return 2; - case 120 /* SlashToken */: return 1; - case 121 /* SlashEqualsToken */: return 2; - default: throw new Error(); - } - } - })(Scanner = TypeScript.Scanner || (TypeScript.Scanner = {})); -})(TypeScript || (TypeScript = {})); -var TypeScript; -(function (TypeScript) { - var ScannerUtilities; - (function (ScannerUtilities) { - function fixedWidthTokenLength(kind) { - switch (kind) { - case 17 /* BreakKeyword */: return 5; - case 18 /* CaseKeyword */: return 4; - case 19 /* CatchKeyword */: return 5; - case 20 /* ContinueKeyword */: return 8; - case 21 /* DebuggerKeyword */: return 8; - case 22 /* DefaultKeyword */: return 7; - case 23 /* DeleteKeyword */: return 6; - case 24 /* DoKeyword */: return 2; - case 25 /* ElseKeyword */: return 4; - case 26 /* FalseKeyword */: return 5; - case 27 /* FinallyKeyword */: return 7; - case 28 /* ForKeyword */: return 3; - case 29 /* FunctionKeyword */: return 8; - case 30 /* IfKeyword */: return 2; - case 31 /* InKeyword */: return 2; - case 32 /* InstanceOfKeyword */: return 10; - case 33 /* NewKeyword */: return 3; - case 34 /* NullKeyword */: return 4; - case 35 /* ReturnKeyword */: return 6; - case 36 /* SwitchKeyword */: return 6; - case 37 /* ThisKeyword */: return 4; - case 38 /* ThrowKeyword */: return 5; - case 39 /* TrueKeyword */: return 4; - case 40 /* TryKeyword */: return 3; - case 41 /* TypeOfKeyword */: return 6; - case 42 /* VarKeyword */: return 3; - case 43 /* VoidKeyword */: return 4; - case 44 /* WhileKeyword */: return 5; - case 45 /* WithKeyword */: return 4; - case 46 /* ClassKeyword */: return 5; - case 47 /* ConstKeyword */: return 5; - case 48 /* EnumKeyword */: return 4; - case 49 /* ExportKeyword */: return 6; - case 50 /* ExtendsKeyword */: return 7; - case 51 /* ImportKeyword */: return 6; - case 52 /* SuperKeyword */: return 5; - case 53 /* ImplementsKeyword */: return 10; - case 54 /* InterfaceKeyword */: return 9; - case 55 /* LetKeyword */: return 3; - case 56 /* PackageKeyword */: return 7; - case 57 /* PrivateKeyword */: return 7; - case 58 /* ProtectedKeyword */: return 9; - case 59 /* PublicKeyword */: return 6; - case 60 /* StaticKeyword */: return 6; - case 61 /* YieldKeyword */: return 5; - case 62 /* AnyKeyword */: return 3; - case 63 /* BooleanKeyword */: return 7; - case 64 /* ConstructorKeyword */: return 11; - case 65 /* DeclareKeyword */: return 7; - case 66 /* GetKeyword */: return 3; - case 67 /* ModuleKeyword */: return 6; - case 68 /* RequireKeyword */: return 7; - case 69 /* NumberKeyword */: return 6; - case 70 /* SetKeyword */: return 3; - case 71 /* StringKeyword */: return 6; - case 72 /* OpenBraceToken */: return 1; - case 73 /* CloseBraceToken */: return 1; - case 74 /* OpenParenToken */: return 1; - case 75 /* CloseParenToken */: return 1; - case 76 /* OpenBracketToken */: return 1; - case 77 /* CloseBracketToken */: return 1; - case 78 /* DotToken */: return 1; - case 79 /* DotDotDotToken */: return 3; - case 80 /* SemicolonToken */: return 1; - case 81 /* CommaToken */: return 1; - case 82 /* LessThanToken */: return 1; - case 83 /* GreaterThanToken */: return 1; - case 84 /* LessThanEqualsToken */: return 2; - case 85 /* GreaterThanEqualsToken */: return 2; - case 86 /* EqualsEqualsToken */: return 2; - case 87 /* EqualsGreaterThanToken */: return 2; - case 88 /* ExclamationEqualsToken */: return 2; - case 89 /* EqualsEqualsEqualsToken */: return 3; - case 90 /* ExclamationEqualsEqualsToken */: return 3; - case 91 /* PlusToken */: return 1; - case 92 /* MinusToken */: return 1; - case 93 /* AsteriskToken */: return 1; - case 94 /* PercentToken */: return 1; - case 95 /* PlusPlusToken */: return 2; - case 96 /* MinusMinusToken */: return 2; - case 97 /* LessThanLessThanToken */: return 2; - case 98 /* GreaterThanGreaterThanToken */: return 2; - case 99 /* GreaterThanGreaterThanGreaterThanToken */: return 3; - case 100 /* AmpersandToken */: return 1; - case 101 /* BarToken */: return 1; - case 102 /* CaretToken */: return 1; - case 103 /* ExclamationToken */: return 1; - case 104 /* TildeToken */: return 1; - case 105 /* AmpersandAmpersandToken */: return 2; - case 106 /* BarBarToken */: return 2; - case 107 /* QuestionToken */: return 1; - case 108 /* ColonToken */: return 1; - case 109 /* EqualsToken */: return 1; - case 110 /* PlusEqualsToken */: return 2; - case 111 /* MinusEqualsToken */: return 2; - case 112 /* AsteriskEqualsToken */: return 2; - case 113 /* PercentEqualsToken */: return 2; - case 114 /* LessThanLessThanEqualsToken */: return 3; - case 115 /* GreaterThanGreaterThanEqualsToken */: return 3; - case 116 /* GreaterThanGreaterThanGreaterThanEqualsToken */: return 4; - case 117 /* AmpersandEqualsToken */: return 2; - case 118 /* BarEqualsToken */: return 2; - case 119 /* CaretEqualsToken */: return 2; - case 120 /* SlashToken */: return 1; - case 121 /* SlashEqualsToken */: return 2; - default: throw new Error(); - } - } - ScannerUtilities.fixedWidthTokenLength = fixedWidthTokenLength; - function identifierKind(str, start, length) { - switch (length) { - case 2: - switch (str.charCodeAt(start)) { - case 100 /* d */: return (str.charCodeAt(start + 1) === 111 /* o */) ? 24 /* DoKeyword */ : 9 /* IdentifierName */; - case 105 /* i */: - switch (str.charCodeAt(start + 1)) { - case 102 /* f */: return 30 /* IfKeyword */; - case 110 /* n */: return 31 /* InKeyword */; - default: return 9 /* IdentifierName */; - } - default: return 9 /* IdentifierName */; - } - case 3: - switch (str.charCodeAt(start)) { - case 97 /* a */: return (str.charCodeAt(start + 1) === 110 /* n */ && str.charCodeAt(start + 2) === 121 /* y */) ? 62 /* AnyKeyword */ : 9 /* IdentifierName */; - case 102 /* f */: return (str.charCodeAt(start + 1) === 111 /* o */ && str.charCodeAt(start + 2) === 114 /* r */) ? 28 /* ForKeyword */ : 9 /* IdentifierName */; - case 103 /* g */: return (str.charCodeAt(start + 1) === 101 /* e */ && str.charCodeAt(start + 2) === 116 /* t */) ? 66 /* GetKeyword */ : 9 /* IdentifierName */; - case 108 /* l */: return (str.charCodeAt(start + 1) === 101 /* e */ && str.charCodeAt(start + 2) === 116 /* t */) ? 55 /* LetKeyword */ : 9 /* IdentifierName */; - case 110 /* n */: return (str.charCodeAt(start + 1) === 101 /* e */ && str.charCodeAt(start + 2) === 119 /* w */) ? 33 /* NewKeyword */ : 9 /* IdentifierName */; - case 115 /* s */: return (str.charCodeAt(start + 1) === 101 /* e */ && str.charCodeAt(start + 2) === 116 /* t */) ? 70 /* SetKeyword */ : 9 /* IdentifierName */; - case 116 /* t */: return (str.charCodeAt(start + 1) === 114 /* r */ && str.charCodeAt(start + 2) === 121 /* y */) ? 40 /* TryKeyword */ : 9 /* IdentifierName */; - case 118 /* v */: return (str.charCodeAt(start + 1) === 97 /* a */ && str.charCodeAt(start + 2) === 114 /* r */) ? 42 /* VarKeyword */ : 9 /* IdentifierName */; - default: return 9 /* IdentifierName */; - } - case 4: - switch (str.charCodeAt(start)) { - case 99 /* c */: return (str.charCodeAt(start + 1) === 97 /* a */ && str.charCodeAt(start + 2) === 115 /* s */ && str.charCodeAt(start + 3) === 101 /* e */) ? 18 /* CaseKeyword */ : 9 /* IdentifierName */; - case 101 /* e */: - switch (str.charCodeAt(start + 1)) { - case 108 /* l */: return (str.charCodeAt(start + 2) === 115 /* s */ && str.charCodeAt(start + 3) === 101 /* e */) ? 25 /* ElseKeyword */ : 9 /* IdentifierName */; - case 110 /* n */: return (str.charCodeAt(start + 2) === 117 /* u */ && str.charCodeAt(start + 3) === 109 /* m */) ? 48 /* EnumKeyword */ : 9 /* IdentifierName */; - default: return 9 /* IdentifierName */; - } - case 110 /* n */: return (str.charCodeAt(start + 1) === 117 /* u */ && str.charCodeAt(start + 2) === 108 /* l */ && str.charCodeAt(start + 3) === 108 /* l */) ? 34 /* NullKeyword */ : 9 /* IdentifierName */; - case 116 /* t */: - switch (str.charCodeAt(start + 1)) { - case 104 /* h */: return (str.charCodeAt(start + 2) === 105 /* i */ && str.charCodeAt(start + 3) === 115 /* s */) ? 37 /* ThisKeyword */ : 9 /* IdentifierName */; - case 114 /* r */: return (str.charCodeAt(start + 2) === 117 /* u */ && str.charCodeAt(start + 3) === 101 /* e */) ? 39 /* TrueKeyword */ : 9 /* IdentifierName */; - default: return 9 /* IdentifierName */; - } - case 118 /* v */: return (str.charCodeAt(start + 1) === 111 /* o */ && str.charCodeAt(start + 2) === 105 /* i */ && str.charCodeAt(start + 3) === 100 /* d */) ? 43 /* VoidKeyword */ : 9 /* IdentifierName */; - case 119 /* w */: return (str.charCodeAt(start + 1) === 105 /* i */ && str.charCodeAt(start + 2) === 116 /* t */ && str.charCodeAt(start + 3) === 104 /* h */) ? 45 /* WithKeyword */ : 9 /* IdentifierName */; - default: return 9 /* IdentifierName */; - } - case 5: - switch (str.charCodeAt(start)) { - case 98 /* b */: return (str.charCodeAt(start + 1) === 114 /* r */ && str.charCodeAt(start + 2) === 101 /* e */ && str.charCodeAt(start + 3) === 97 /* a */ && str.charCodeAt(start + 4) === 107 /* k */) ? 17 /* BreakKeyword */ : 9 /* IdentifierName */; - case 99 /* c */: - switch (str.charCodeAt(start + 1)) { - case 97 /* a */: return (str.charCodeAt(start + 2) === 116 /* t */ && str.charCodeAt(start + 3) === 99 /* c */ && str.charCodeAt(start + 4) === 104 /* h */) ? 19 /* CatchKeyword */ : 9 /* IdentifierName */; - case 108 /* l */: return (str.charCodeAt(start + 2) === 97 /* a */ && str.charCodeAt(start + 3) === 115 /* s */ && str.charCodeAt(start + 4) === 115 /* s */) ? 46 /* ClassKeyword */ : 9 /* IdentifierName */; - case 111 /* o */: return (str.charCodeAt(start + 2) === 110 /* n */ && str.charCodeAt(start + 3) === 115 /* s */ && str.charCodeAt(start + 4) === 116 /* t */) ? 47 /* ConstKeyword */ : 9 /* IdentifierName */; - default: return 9 /* IdentifierName */; - } - case 102 /* f */: return (str.charCodeAt(start + 1) === 97 /* a */ && str.charCodeAt(start + 2) === 108 /* l */ && str.charCodeAt(start + 3) === 115 /* s */ && str.charCodeAt(start + 4) === 101 /* e */) ? 26 /* FalseKeyword */ : 9 /* IdentifierName */; - case 115 /* s */: return (str.charCodeAt(start + 1) === 117 /* u */ && str.charCodeAt(start + 2) === 112 /* p */ && str.charCodeAt(start + 3) === 101 /* e */ && str.charCodeAt(start + 4) === 114 /* r */) ? 52 /* SuperKeyword */ : 9 /* IdentifierName */; - case 116 /* t */: return (str.charCodeAt(start + 1) === 104 /* h */ && str.charCodeAt(start + 2) === 114 /* r */ && str.charCodeAt(start + 3) === 111 /* o */ && str.charCodeAt(start + 4) === 119 /* w */) ? 38 /* ThrowKeyword */ : 9 /* IdentifierName */; - case 119 /* w */: return (str.charCodeAt(start + 1) === 104 /* h */ && str.charCodeAt(start + 2) === 105 /* i */ && str.charCodeAt(start + 3) === 108 /* l */ && str.charCodeAt(start + 4) === 101 /* e */) ? 44 /* WhileKeyword */ : 9 /* IdentifierName */; - case 121 /* y */: return (str.charCodeAt(start + 1) === 105 /* i */ && str.charCodeAt(start + 2) === 101 /* e */ && str.charCodeAt(start + 3) === 108 /* l */ && str.charCodeAt(start + 4) === 100 /* d */) ? 61 /* YieldKeyword */ : 9 /* IdentifierName */; - default: return 9 /* IdentifierName */; - } - case 6: - switch (str.charCodeAt(start)) { - case 100 /* d */: return (str.charCodeAt(start + 1) === 101 /* e */ && str.charCodeAt(start + 2) === 108 /* l */ && str.charCodeAt(start + 3) === 101 /* e */ && str.charCodeAt(start + 4) === 116 /* t */ && str.charCodeAt(start + 5) === 101 /* e */) ? 23 /* DeleteKeyword */ : 9 /* IdentifierName */; - case 101 /* e */: return (str.charCodeAt(start + 1) === 120 /* x */ && str.charCodeAt(start + 2) === 112 /* p */ && str.charCodeAt(start + 3) === 111 /* o */ && str.charCodeAt(start + 4) === 114 /* r */ && str.charCodeAt(start + 5) === 116 /* t */) ? 49 /* ExportKeyword */ : 9 /* IdentifierName */; - case 105 /* i */: return (str.charCodeAt(start + 1) === 109 /* m */ && str.charCodeAt(start + 2) === 112 /* p */ && str.charCodeAt(start + 3) === 111 /* o */ && str.charCodeAt(start + 4) === 114 /* r */ && str.charCodeAt(start + 5) === 116 /* t */) ? 51 /* ImportKeyword */ : 9 /* IdentifierName */; - case 109 /* m */: return (str.charCodeAt(start + 1) === 111 /* o */ && str.charCodeAt(start + 2) === 100 /* d */ && str.charCodeAt(start + 3) === 117 /* u */ && str.charCodeAt(start + 4) === 108 /* l */ && str.charCodeAt(start + 5) === 101 /* e */) ? 67 /* ModuleKeyword */ : 9 /* IdentifierName */; - case 110 /* n */: return (str.charCodeAt(start + 1) === 117 /* u */ && str.charCodeAt(start + 2) === 109 /* m */ && str.charCodeAt(start + 3) === 98 /* b */ && str.charCodeAt(start + 4) === 101 /* e */ && str.charCodeAt(start + 5) === 114 /* r */) ? 69 /* NumberKeyword */ : 9 /* IdentifierName */; - case 112 /* p */: return (str.charCodeAt(start + 1) === 117 /* u */ && str.charCodeAt(start + 2) === 98 /* b */ && str.charCodeAt(start + 3) === 108 /* l */ && str.charCodeAt(start + 4) === 105 /* i */ && str.charCodeAt(start + 5) === 99 /* c */) ? 59 /* PublicKeyword */ : 9 /* IdentifierName */; - case 114 /* r */: return (str.charCodeAt(start + 1) === 101 /* e */ && str.charCodeAt(start + 2) === 116 /* t */ && str.charCodeAt(start + 3) === 117 /* u */ && str.charCodeAt(start + 4) === 114 /* r */ && str.charCodeAt(start + 5) === 110 /* n */) ? 35 /* ReturnKeyword */ : 9 /* IdentifierName */; - case 115 /* s */: - switch (str.charCodeAt(start + 1)) { - case 116 /* t */: - switch (str.charCodeAt(start + 2)) { - case 97 /* a */: return (str.charCodeAt(start + 3) === 116 /* t */ && str.charCodeAt(start + 4) === 105 /* i */ && str.charCodeAt(start + 5) === 99 /* c */) ? 60 /* StaticKeyword */ : 9 /* IdentifierName */; - case 114 /* r */: return (str.charCodeAt(start + 3) === 105 /* i */ && str.charCodeAt(start + 4) === 110 /* n */ && str.charCodeAt(start + 5) === 103 /* g */) ? 71 /* StringKeyword */ : 9 /* IdentifierName */; - default: return 9 /* IdentifierName */; - } - case 119 /* w */: return (str.charCodeAt(start + 2) === 105 /* i */ && str.charCodeAt(start + 3) === 116 /* t */ && str.charCodeAt(start + 4) === 99 /* c */ && str.charCodeAt(start + 5) === 104 /* h */) ? 36 /* SwitchKeyword */ : 9 /* IdentifierName */; - default: return 9 /* IdentifierName */; - } - case 116 /* t */: return (str.charCodeAt(start + 1) === 121 /* y */ && str.charCodeAt(start + 2) === 112 /* p */ && str.charCodeAt(start + 3) === 101 /* e */ && str.charCodeAt(start + 4) === 111 /* o */ && str.charCodeAt(start + 5) === 102 /* f */) ? 41 /* TypeOfKeyword */ : 9 /* IdentifierName */; - default: return 9 /* IdentifierName */; - } - case 7: - switch (str.charCodeAt(start)) { - case 98 /* b */: return (str.charCodeAt(start + 1) === 111 /* o */ && str.charCodeAt(start + 2) === 111 /* o */ && str.charCodeAt(start + 3) === 108 /* l */ && str.charCodeAt(start + 4) === 101 /* e */ && str.charCodeAt(start + 5) === 97 /* a */ && str.charCodeAt(start + 6) === 110 /* n */) ? 63 /* BooleanKeyword */ : 9 /* IdentifierName */; - case 100 /* d */: - switch (str.charCodeAt(start + 1)) { - case 101 /* e */: - switch (str.charCodeAt(start + 2)) { - case 99 /* c */: return (str.charCodeAt(start + 3) === 108 /* l */ && str.charCodeAt(start + 4) === 97 /* a */ && str.charCodeAt(start + 5) === 114 /* r */ && str.charCodeAt(start + 6) === 101 /* e */) ? 65 /* DeclareKeyword */ : 9 /* IdentifierName */; - case 102 /* f */: return (str.charCodeAt(start + 3) === 97 /* a */ && str.charCodeAt(start + 4) === 117 /* u */ && str.charCodeAt(start + 5) === 108 /* l */ && str.charCodeAt(start + 6) === 116 /* t */) ? 22 /* DefaultKeyword */ : 9 /* IdentifierName */; - default: return 9 /* IdentifierName */; - } - default: return 9 /* IdentifierName */; - } - case 101 /* e */: return (str.charCodeAt(start + 1) === 120 /* x */ && str.charCodeAt(start + 2) === 116 /* t */ && str.charCodeAt(start + 3) === 101 /* e */ && str.charCodeAt(start + 4) === 110 /* n */ && str.charCodeAt(start + 5) === 100 /* d */ && str.charCodeAt(start + 6) === 115 /* s */) ? 50 /* ExtendsKeyword */ : 9 /* IdentifierName */; - case 102 /* f */: return (str.charCodeAt(start + 1) === 105 /* i */ && str.charCodeAt(start + 2) === 110 /* n */ && str.charCodeAt(start + 3) === 97 /* a */ && str.charCodeAt(start + 4) === 108 /* l */ && str.charCodeAt(start + 5) === 108 /* l */ && str.charCodeAt(start + 6) === 121 /* y */) ? 27 /* FinallyKeyword */ : 9 /* IdentifierName */; - case 112 /* p */: - switch (str.charCodeAt(start + 1)) { - case 97 /* a */: return (str.charCodeAt(start + 2) === 99 /* c */ && str.charCodeAt(start + 3) === 107 /* k */ && str.charCodeAt(start + 4) === 97 /* a */ && str.charCodeAt(start + 5) === 103 /* g */ && str.charCodeAt(start + 6) === 101 /* e */) ? 56 /* PackageKeyword */ : 9 /* IdentifierName */; - case 114 /* r */: return (str.charCodeAt(start + 2) === 105 /* i */ && str.charCodeAt(start + 3) === 118 /* v */ && str.charCodeAt(start + 4) === 97 /* a */ && str.charCodeAt(start + 5) === 116 /* t */ && str.charCodeAt(start + 6) === 101 /* e */) ? 57 /* PrivateKeyword */ : 9 /* IdentifierName */; - default: return 9 /* IdentifierName */; - } - case 114 /* r */: return (str.charCodeAt(start + 1) === 101 /* e */ && str.charCodeAt(start + 2) === 113 /* q */ && str.charCodeAt(start + 3) === 117 /* u */ && str.charCodeAt(start + 4) === 105 /* i */ && str.charCodeAt(start + 5) === 114 /* r */ && str.charCodeAt(start + 6) === 101 /* e */) ? 68 /* RequireKeyword */ : 9 /* IdentifierName */; - default: return 9 /* IdentifierName */; - } - case 8: - switch (str.charCodeAt(start)) { - case 99 /* c */: return (str.charCodeAt(start + 1) === 111 /* o */ && str.charCodeAt(start + 2) === 110 /* n */ && str.charCodeAt(start + 3) === 116 /* t */ && str.charCodeAt(start + 4) === 105 /* i */ && str.charCodeAt(start + 5) === 110 /* n */ && str.charCodeAt(start + 6) === 117 /* u */ && str.charCodeAt(start + 7) === 101 /* e */) ? 20 /* ContinueKeyword */ : 9 /* IdentifierName */; - case 100 /* d */: return (str.charCodeAt(start + 1) === 101 /* e */ && str.charCodeAt(start + 2) === 98 /* b */ && str.charCodeAt(start + 3) === 117 /* u */ && str.charCodeAt(start + 4) === 103 /* g */ && str.charCodeAt(start + 5) === 103 /* g */ && str.charCodeAt(start + 6) === 101 /* e */ && str.charCodeAt(start + 7) === 114 /* r */) ? 21 /* DebuggerKeyword */ : 9 /* IdentifierName */; - case 102 /* f */: return (str.charCodeAt(start + 1) === 117 /* u */ && str.charCodeAt(start + 2) === 110 /* n */ && str.charCodeAt(start + 3) === 99 /* c */ && str.charCodeAt(start + 4) === 116 /* t */ && str.charCodeAt(start + 5) === 105 /* i */ && str.charCodeAt(start + 6) === 111 /* o */ && str.charCodeAt(start + 7) === 110 /* n */) ? 29 /* FunctionKeyword */ : 9 /* IdentifierName */; - default: return 9 /* IdentifierName */; - } - case 9: - switch (str.charCodeAt(start)) { - case 105 /* i */: return (str.charCodeAt(start + 1) === 110 /* n */ && str.charCodeAt(start + 2) === 116 /* t */ && str.charCodeAt(start + 3) === 101 /* e */ && str.charCodeAt(start + 4) === 114 /* r */ && str.charCodeAt(start + 5) === 102 /* f */ && str.charCodeAt(start + 6) === 97 /* a */ && str.charCodeAt(start + 7) === 99 /* c */ && str.charCodeAt(start + 8) === 101 /* e */) ? 54 /* InterfaceKeyword */ : 9 /* IdentifierName */; - case 112 /* p */: return (str.charCodeAt(start + 1) === 114 /* r */ && str.charCodeAt(start + 2) === 111 /* o */ && str.charCodeAt(start + 3) === 116 /* t */ && str.charCodeAt(start + 4) === 101 /* e */ && str.charCodeAt(start + 5) === 99 /* c */ && str.charCodeAt(start + 6) === 116 /* t */ && str.charCodeAt(start + 7) === 101 /* e */ && str.charCodeAt(start + 8) === 100 /* d */) ? 58 /* ProtectedKeyword */ : 9 /* IdentifierName */; - default: return 9 /* IdentifierName */; - } - case 10: - switch (str.charCodeAt(start)) { - case 105 /* i */: - switch (str.charCodeAt(start + 1)) { - case 109 /* m */: return (str.charCodeAt(start + 2) === 112 /* p */ && str.charCodeAt(start + 3) === 108 /* l */ && str.charCodeAt(start + 4) === 101 /* e */ && str.charCodeAt(start + 5) === 109 /* m */ && str.charCodeAt(start + 6) === 101 /* e */ && str.charCodeAt(start + 7) === 110 /* n */ && str.charCodeAt(start + 8) === 116 /* t */ && str.charCodeAt(start + 9) === 115 /* s */) ? 53 /* ImplementsKeyword */ : 9 /* IdentifierName */; - case 110 /* n */: return (str.charCodeAt(start + 2) === 115 /* s */ && str.charCodeAt(start + 3) === 116 /* t */ && str.charCodeAt(start + 4) === 97 /* a */ && str.charCodeAt(start + 5) === 110 /* n */ && str.charCodeAt(start + 6) === 99 /* c */ && str.charCodeAt(start + 7) === 101 /* e */ && str.charCodeAt(start + 8) === 111 /* o */ && str.charCodeAt(start + 9) === 102 /* f */) ? 32 /* InstanceOfKeyword */ : 9 /* IdentifierName */; - default: return 9 /* IdentifierName */; - } - default: return 9 /* IdentifierName */; - } - case 11: return (str.charCodeAt(start) === 99 /* c */ && str.charCodeAt(start + 1) === 111 /* o */ && str.charCodeAt(start + 2) === 110 /* n */ && str.charCodeAt(start + 3) === 115 /* s */ && str.charCodeAt(start + 4) === 116 /* t */ && str.charCodeAt(start + 5) === 114 /* r */ && str.charCodeAt(start + 6) === 117 /* u */ && str.charCodeAt(start + 7) === 99 /* c */ && str.charCodeAt(start + 8) === 116 /* t */ && str.charCodeAt(start + 9) === 111 /* o */ && str.charCodeAt(start + 10) === 114 /* r */) ? 64 /* ConstructorKeyword */ : 9 /* IdentifierName */; - default: return 9 /* IdentifierName */; - } - } - ScannerUtilities.identifierKind = identifierKind; - })(ScannerUtilities = TypeScript.ScannerUtilities || (TypeScript.ScannerUtilities = {})); -})(TypeScript || (TypeScript = {})); -var TypeScript; -(function (TypeScript) { - var SlidingWindow = (function () { - function SlidingWindow(fetchNextItem, window, defaultValue, sourceLength) { - if (sourceLength === void 0) { sourceLength = -1; } - this.fetchNextItem = fetchNextItem; - this.window = window; - this.defaultValue = defaultValue; - this.sourceLength = sourceLength; - this.windowCount = 0; - this.windowAbsoluteStartIndex = 0; - this.currentRelativeItemIndex = 0; - this._pinCount = 0; - this.firstPinnedAbsoluteIndex = -1; - } - SlidingWindow.prototype.addMoreItemsToWindow = function (argument) { - var sourceLength = this.sourceLength; - if (sourceLength >= 0 && this.absoluteIndex() >= sourceLength) { - return false; - } - if (this.windowCount >= this.window.length) { - this.tryShiftOrGrowWindow(); - } - var item = this.fetchNextItem(argument); - this.window[this.windowCount] = item; - this.windowCount++; - return true; - }; - SlidingWindow.prototype.tryShiftOrGrowWindow = function () { - var currentIndexIsPastWindowHalfwayPoint = this.currentRelativeItemIndex > (this.window.length >>> 1); - var isAllowedToShift = this.firstPinnedAbsoluteIndex === -1 || this.firstPinnedAbsoluteIndex > this.windowAbsoluteStartIndex; - if (currentIndexIsPastWindowHalfwayPoint && isAllowedToShift) { - var shiftStartIndex = this.firstPinnedAbsoluteIndex === -1 ? this.currentRelativeItemIndex : this.firstPinnedAbsoluteIndex - this.windowAbsoluteStartIndex; - var shiftCount = this.windowCount - shiftStartIndex; - if (shiftCount > 0) { - TypeScript.ArrayUtilities.copy(this.window, shiftStartIndex, this.window, 0, shiftCount); - } - this.windowAbsoluteStartIndex += shiftStartIndex; - this.windowCount -= shiftStartIndex; - this.currentRelativeItemIndex -= shiftStartIndex; - } - else { - TypeScript.ArrayUtilities.grow(this.window, this.window.length * 2, this.defaultValue); - } - }; - SlidingWindow.prototype.absoluteIndex = function () { - return this.windowAbsoluteStartIndex + this.currentRelativeItemIndex; - }; - SlidingWindow.prototype.isAtEndOfSource = function () { - return this.absoluteIndex() >= this.sourceLength; - }; - SlidingWindow.prototype.getAndPinAbsoluteIndex = function () { - var absoluteIndex = this.absoluteIndex(); - var pinCount = this._pinCount++; - if (pinCount === 0) { - this.firstPinnedAbsoluteIndex = absoluteIndex; - } - return absoluteIndex; - }; - SlidingWindow.prototype.releaseAndUnpinAbsoluteIndex = function (absoluteIndex) { - this._pinCount--; - if (this._pinCount === 0) { - this.firstPinnedAbsoluteIndex = -1; - } - }; - SlidingWindow.prototype.rewindToPinnedIndex = function (absoluteIndex) { - var relativeIndex = absoluteIndex - this.windowAbsoluteStartIndex; - this.currentRelativeItemIndex = relativeIndex; - }; - SlidingWindow.prototype.currentItem = function (argument) { - if (this.currentRelativeItemIndex >= this.windowCount) { - if (!this.addMoreItemsToWindow(argument)) { - return this.defaultValue; - } - } - return this.window[this.currentRelativeItemIndex]; - }; - SlidingWindow.prototype.peekItemN = function (n) { - while (this.currentRelativeItemIndex + n >= this.windowCount) { - if (!this.addMoreItemsToWindow(undefined)) { - return this.defaultValue; - } - } - return this.window[this.currentRelativeItemIndex + n]; - }; - SlidingWindow.prototype.moveToNextItem = function () { - this.currentRelativeItemIndex++; - }; - SlidingWindow.prototype.disgardAllItemsFromCurrentIndexOnwards = function () { - this.windowCount = this.currentRelativeItemIndex; - }; - return SlidingWindow; - })(); - TypeScript.SlidingWindow = SlidingWindow; -})(TypeScript || (TypeScript = {})); -var TypeScript; -(function (TypeScript) { - var Syntax; - (function (Syntax) { - Syntax._nextSyntaxID = 1; - function nodeHasSkippedOrMissingTokens(node) { - for (var i = 0; i < TypeScript.childCount(node); i++) { - var child = TypeScript.childAt(node, i); - if (TypeScript.isToken(child)) { - var token = child; - if (token.hasSkippedToken() || (TypeScript.width(token) === 0 && token.kind() !== 8 /* EndOfFileToken */)) { - return true; - } - } - } - return false; - } - Syntax.nodeHasSkippedOrMissingTokens = nodeHasSkippedOrMissingTokens; - function isUnterminatedStringLiteral(token) { - if (token && token.kind() === 12 /* StringLiteral */) { - var text = token.text(); - return text.length < 2 || text.charCodeAt(text.length - 1) !== text.charCodeAt(0); - } - return false; - } - Syntax.isUnterminatedStringLiteral = isUnterminatedStringLiteral; - function isUnterminatedMultilineCommentTrivia(trivia) { - if (trivia && trivia.kind() === 4 /* MultiLineCommentTrivia */) { - var text = trivia.fullText(); - return text.length < 4 || text.substring(text.length - 2) !== "*/"; - } - return false; - } - Syntax.isUnterminatedMultilineCommentTrivia = isUnterminatedMultilineCommentTrivia; - function isEntirelyInsideCommentTrivia(trivia, fullStart, position) { - if (trivia && trivia.isComment() && position > fullStart) { - var end = fullStart + trivia.fullWidth(); - if (position < end) { - return true; - } - else if (position === end) { - return trivia.kind() === 5 /* SingleLineCommentTrivia */ || isUnterminatedMultilineCommentTrivia(trivia); - } - } - return false; - } - Syntax.isEntirelyInsideCommentTrivia = isEntirelyInsideCommentTrivia; - function isEntirelyInsideComment(sourceUnit, position) { - var positionedToken = TypeScript.findToken(sourceUnit, position); - var fullStart = positionedToken.fullStart(); - var triviaList = undefined; - var lastTriviaBeforeToken = undefined; - if (positionedToken.kind() === 8 /* EndOfFileToken */) { - if (positionedToken.hasLeadingTrivia()) { - triviaList = positionedToken.leadingTrivia(); - } - else { - positionedToken = TypeScript.previousToken(positionedToken); - if (positionedToken) { - if (positionedToken && positionedToken.hasTrailingTrivia()) { - triviaList = positionedToken.trailingTrivia(); - fullStart = TypeScript.end(positionedToken); - } - } - } - } - else { - if (position <= (fullStart + positionedToken.leadingTriviaWidth())) { - triviaList = positionedToken.leadingTrivia(); - } - else if (position >= (fullStart + TypeScript.width(positionedToken))) { - triviaList = positionedToken.trailingTrivia(); - fullStart = TypeScript.end(positionedToken); - } - } - if (triviaList) { - for (var i = 0, n = triviaList.count(); i < n; i++) { - var trivia = triviaList.syntaxTriviaAt(i); - if (position <= fullStart) { - break; - } - else if (position <= fullStart + trivia.fullWidth() && trivia.isComment()) { - lastTriviaBeforeToken = trivia; - break; - } - fullStart += trivia.fullWidth(); - } - } - return lastTriviaBeforeToken && isEntirelyInsideCommentTrivia(lastTriviaBeforeToken, fullStart, position); - } - Syntax.isEntirelyInsideComment = isEntirelyInsideComment; - function isEntirelyInStringOrRegularExpressionLiteral(sourceUnit, position) { - var positionedToken = TypeScript.findToken(sourceUnit, position); - if (positionedToken) { - if (positionedToken.kind() === 8 /* EndOfFileToken */) { - positionedToken = TypeScript.previousToken(positionedToken); - return positionedToken && positionedToken.trailingTriviaWidth() === 0 && isUnterminatedStringLiteral(positionedToken); - } - else if (position > TypeScript.start(positionedToken)) { - return (position < TypeScript.end(positionedToken) && (positionedToken.kind() === 12 /* StringLiteral */ || positionedToken.kind() === 10 /* RegularExpressionLiteral */)) || (position <= TypeScript.end(positionedToken) && isUnterminatedStringLiteral(positionedToken)); - } - } - return false; - } - Syntax.isEntirelyInStringOrRegularExpressionLiteral = isEntirelyInStringOrRegularExpressionLiteral; - function getAncestorOfKind(positionedToken, kind) { - while (positionedToken && positionedToken.parent) { - if (positionedToken.parent.kind() === kind) { - return positionedToken.parent; - } - positionedToken = positionedToken.parent; - } - return undefined; - } - Syntax.getAncestorOfKind = getAncestorOfKind; - function hasAncestorOfKind(positionedToken, kind) { - return !!getAncestorOfKind(positionedToken, kind); - } - Syntax.hasAncestorOfKind = hasAncestorOfKind; - function isIntegerLiteral(expression) { - if (expression) { - switch (expression.kind()) { - case 169 /* PrefixUnaryExpression */: - var prefixExpr = expression; - if (prefixExpr.operatorToken.kind() == 91 /* PlusToken */ || prefixExpr.operatorToken.kind() === 92 /* MinusToken */) { - expression = prefixExpr.operand; - return TypeScript.isToken(expression) && TypeScript.IntegerUtilities.isInteger(expression.text()); - } - return false; - case 11 /* NumericLiteral */: - var text = expression.text(); - return TypeScript.IntegerUtilities.isInteger(text) || TypeScript.IntegerUtilities.isHexInteger(text); - } - } - return false; - } - Syntax.isIntegerLiteral = isIntegerLiteral; - function containingNode(element) { - var current = element.parent; - while (current && !TypeScript.isNode(current)) { - current = current.parent; - } - return current; - } - Syntax.containingNode = containingNode; - function findTokenOnLeft(sourceUnit, position) { - var positionedToken = TypeScript.findToken(sourceUnit, position); - var _start = TypeScript.start(positionedToken); - if (position > _start) { - return positionedToken; - } - if (positionedToken.fullStart() === 0) { - return undefined; - } - return TypeScript.previousToken(positionedToken); - } - Syntax.findTokenOnLeft = findTokenOnLeft; - function findCompleteTokenOnLeft(sourceUnit, position) { - var positionedToken = TypeScript.findToken(sourceUnit, position); - if (TypeScript.width(positionedToken) > 0 && position >= TypeScript.end(positionedToken)) { - return positionedToken; - } - return TypeScript.previousToken(positionedToken); - } - Syntax.findCompleteTokenOnLeft = findCompleteTokenOnLeft; - function firstTokenInLineContainingPosition(syntaxTree, position) { - var current = TypeScript.findToken(syntaxTree.sourceUnit(), position); - while (true) { - if (isFirstTokenInLine(current, syntaxTree.lineMap())) { - break; - } - current = TypeScript.previousToken(current); - } - return current; - } - Syntax.firstTokenInLineContainingPosition = firstTokenInLineContainingPosition; - function isFirstTokenInLine(token, lineMap) { - var _previousToken = TypeScript.previousToken(token); - if (_previousToken === undefined) { - return true; - } - return lineMap.getLineNumberFromPosition(TypeScript.end(_previousToken)) !== lineMap.getLineNumberFromPosition(TypeScript.start(token)); - } - })(Syntax = TypeScript.Syntax || (TypeScript.Syntax = {})); -})(TypeScript || (TypeScript = {})); -var TypeScript; -(function (TypeScript) { - function syntaxTree(element) { - if (element) { - while (element) { - if (element.kind() === 122 /* SourceUnit */) { - return element.syntaxTree; - } - element = element.parent; - } - } - return undefined; - } - TypeScript.syntaxTree = syntaxTree; - function parsedInStrictMode(node) { - var info = node.__data; - if (info === undefined) { - return false; - } - return (info & 4 /* NodeParsedInStrictModeMask */) !== 0; - } - TypeScript.parsedInStrictMode = parsedInStrictMode; - function previousToken(token) { - var start = token.fullStart(); - if (start === 0) { - return undefined; - } - return findToken(syntaxTree(token).sourceUnit(), start - 1); - } - TypeScript.previousToken = previousToken; - function findToken(sourceUnit, position) { - if (position < 0) { - throw TypeScript.Errors.argumentOutOfRange("position"); - } - var token = findTokenWorker(sourceUnit, 0, position); - if (token) { - TypeScript.Debug.assert(token.fullWidth() > 0); - return token; - } - if (position === fullWidth(sourceUnit)) { - return sourceUnit.endOfFileToken; - } - if (position > fullWidth(sourceUnit)) { - throw TypeScript.Errors.argumentOutOfRange("position"); - } - throw TypeScript.Errors.invalidOperation(); - } - TypeScript.findToken = findToken; - function findSkippedTokenInPositionedToken(positionedToken, position) { - var positionInLeadingTriviaList = (position < start(positionedToken)); - return findSkippedTokenInTriviaList(positionedToken, position, positionInLeadingTriviaList); - } - TypeScript.findSkippedTokenInPositionedToken = findSkippedTokenInPositionedToken; - function findSkippedTokenInLeadingTriviaList(positionedToken, position) { - return findSkippedTokenInTriviaList(positionedToken, position, true); - } - TypeScript.findSkippedTokenInLeadingTriviaList = findSkippedTokenInLeadingTriviaList; - function findSkippedTokenInTrailingTriviaList(positionedToken, position) { - return findSkippedTokenInTriviaList(positionedToken, position, false); - } - TypeScript.findSkippedTokenInTrailingTriviaList = findSkippedTokenInTrailingTriviaList; - function findSkippedTokenInTriviaList(positionedToken, position, lookInLeadingTriviaList) { - var triviaList = undefined; - var fullStart; - if (lookInLeadingTriviaList) { - triviaList = positionedToken.leadingTrivia(); - fullStart = positionedToken.fullStart(); - } - else { - triviaList = positionedToken.trailingTrivia(); - fullStart = end(positionedToken); - } - if (triviaList && triviaList.hasSkippedToken()) { - for (var i = 0, n = triviaList.count(); i < n; i++) { - var trivia = triviaList.syntaxTriviaAt(i); - var triviaWidth = trivia.fullWidth(); - if (trivia.isSkippedToken() && position >= fullStart && position <= fullStart + triviaWidth) { - return trivia.skippedToken(); - } - fullStart += triviaWidth; - } - } - return undefined; - } - function findTokenWorker(element, elementPosition, position) { - if (isToken(element)) { - return element; - } - for (var i = 0, n = TypeScript.childCount(element); i < n; i++) { - var child = TypeScript.childAt(element, i); - if (child) { - var childFullWidth = fullWidth(child); - var elementEndPosition = elementPosition + childFullWidth; - if (position < elementEndPosition) { - return findTokenWorker(child, elementPosition, position); - } - elementPosition = elementEndPosition; - } - } - return undefined; - } - function tryGetEndOfFileAt(element, position) { - if (element.kind() === 122 /* SourceUnit */ && position === fullWidth(element)) { - var sourceUnit = element; - return sourceUnit.endOfFileToken; - } - return undefined; - } - function nextToken(token, text) { - if (token.kind() === 8 /* EndOfFileToken */) { - return undefined; - } - return findToken(syntaxTree(token).sourceUnit(), fullEnd(token)); - } - TypeScript.nextToken = nextToken; - function isNode(element) { - if (element) { - var kind = element.kind(); - return kind >= TypeScript.SyntaxKind.FirstNode && kind <= TypeScript.SyntaxKind.LastNode; - } - return false; - } - TypeScript.isNode = isNode; - function isTokenKind(kind) { - return kind >= TypeScript.SyntaxKind.FirstToken && kind <= TypeScript.SyntaxKind.LastToken; - } - function isToken(element) { - if (element) { - return isTokenKind(element.kind()); - } - return false; - } - TypeScript.isToken = isToken; - function isList(element) { - return element instanceof Array; - } - TypeScript.isList = isList; - function syntaxID(element) { - var obj = element; - if (obj._syntaxID === undefined) { - obj._syntaxID = TypeScript.Syntax._nextSyntaxID++; - } - return obj._syntaxID; - } - TypeScript.syntaxID = syntaxID; - function collectTextElements(element, elements, text) { - if (element) { - if (isToken(element)) { - elements.push(element.fullText(text)); - } - else { - for (var i = 0, n = TypeScript.childCount(element); i < n; i++) { - collectTextElements(TypeScript.childAt(element, i), elements, text); - } - } - } - } - function fullText(element, text) { - if (isToken(element)) { - return element.fullText(text); - } - var elements = []; - collectTextElements(element, elements, text); - return elements.join(""); - } - TypeScript.fullText = fullText; - function leadingTriviaWidth(element, text) { - var token = firstToken(element); - return token ? token.leadingTriviaWidth(text) : 0; - } - TypeScript.leadingTriviaWidth = leadingTriviaWidth; - function trailingTriviaWidth(element, text) { - var token = lastToken(element); - return token ? token.trailingTriviaWidth(text) : 0; - } - TypeScript.trailingTriviaWidth = trailingTriviaWidth; - function firstToken(element) { - if (element) { - var kind = element.kind(); - if (isTokenKind(kind)) { - return element.fullWidth() > 0 || kind === 8 /* EndOfFileToken */ ? element : undefined; - } - for (var i = 0, n = TypeScript.childCount(element); i < n; i++) { - var token = firstToken(TypeScript.childAt(element, i)); - if (token) { - return token; - } - } - } - return undefined; - } - TypeScript.firstToken = firstToken; - function lastToken(element) { - if (isToken(element)) { - return fullWidth(element) > 0 || element.kind() === 8 /* EndOfFileToken */ ? element : undefined; - } - if (element.kind() === 122 /* SourceUnit */) { - return element.endOfFileToken; - } - for (var i = TypeScript.childCount(element) - 1; i >= 0; i--) { - var child = TypeScript.childAt(element, i); - if (child) { - var token = lastToken(child); - if (token) { - return token; - } - } - } - return undefined; - } - TypeScript.lastToken = lastToken; - function fullStart(element) { - var token = isToken(element) ? element : firstToken(element); - return token ? token.fullStart() : -1; - } - TypeScript.fullStart = fullStart; - function fullWidth(element) { - if (isToken(element)) { - return element.fullWidth(); - } - var info = data(element); - return info >>> 3 /* NodeFullWidthShift */; - } - TypeScript.fullWidth = fullWidth; - function isIncrementallyUnusable(element) { - if (isToken(element)) { - return element.isIncrementallyUnusable(); - } - return (data(element) & 2 /* NodeIncrementallyUnusableMask */) !== 0; - } - TypeScript.isIncrementallyUnusable = isIncrementallyUnusable; - function data(element) { - var dataElement = element; - var info = dataElement.__data; - if (info === undefined) { - info = 0; - } - if ((info & 1 /* NodeDataComputed */) === 0) { - info |= computeData(element); - dataElement.__data = info; - } - return info; - } - function computeData(element) { - var slotCount = TypeScript.childCount(element); - var fullWidth = 0; - var isIncrementallyUnusable = slotCount === 0 && !isList(element); - for (var i = 0, n = slotCount; i < n; i++) { - var child = TypeScript.childAt(element, i); - if (child) { - fullWidth += TypeScript.fullWidth(child); - isIncrementallyUnusable = isIncrementallyUnusable || TypeScript.isIncrementallyUnusable(child); - } - } - return (fullWidth << 3 /* NodeFullWidthShift */) | (isIncrementallyUnusable ? 2 /* NodeIncrementallyUnusableMask */ : 0) | 1 /* NodeDataComputed */; - } - function start(element, text) { - var token = isToken(element) ? element : firstToken(element); - return token ? token.fullStart() + token.leadingTriviaWidth(text) : -1; - } - TypeScript.start = start; - function end(element, text) { - var token = isToken(element) ? element : lastToken(element); - return token ? fullEnd(token) - token.trailingTriviaWidth(text) : -1; - } - TypeScript.end = end; - function width(element, text) { - if (isToken(element)) { - return element.text().length; - } - return fullWidth(element) - leadingTriviaWidth(element, text) - trailingTriviaWidth(element, text); - } - TypeScript.width = width; - function fullEnd(element) { - return fullStart(element) + fullWidth(element); - } - TypeScript.fullEnd = fullEnd; - function existsNewLineBetweenTokens(token1, token2, text) { - if (token1 === token2) { - return false; - } - if (!token1 || !token2) { - return true; - } - var lineMap = text.lineMap(); - return lineMap.getLineNumberFromPosition(end(token1, text)) !== lineMap.getLineNumberFromPosition(start(token2, text)); - } - TypeScript.existsNewLineBetweenTokens = existsNewLineBetweenTokens; -})(TypeScript || (TypeScript = {})); -var TypeScript; -(function (TypeScript) { - var SyntaxFacts; - (function (SyntaxFacts) { - function isDirectivePrologueElement(node) { - if (node.kind() === 154 /* ExpressionStatement */) { - var expressionStatement = node; - var expression = expressionStatement.expression; - if (expression.kind() === 12 /* StringLiteral */) { - return true; - } - } - return false; - } - SyntaxFacts.isDirectivePrologueElement = isDirectivePrologueElement; - function isUseStrictDirective(node) { - var expressionStatement = node; - var stringLiteral = expressionStatement.expression; - var text = stringLiteral.text(); - return text === '"use strict"' || text === "'use strict'"; - } - SyntaxFacts.isUseStrictDirective = isUseStrictDirective; - function isIdentifierNameOrAnyKeyword(token) { - var tokenKind = token.kind(); - return tokenKind === 9 /* IdentifierName */ || SyntaxFacts.isAnyKeyword(tokenKind); - } - SyntaxFacts.isIdentifierNameOrAnyKeyword = isIdentifierNameOrAnyKeyword; - function isAccessibilityModifier(kind) { - switch (kind) { - case 59 /* PublicKeyword */: - case 57 /* PrivateKeyword */: - case 58 /* ProtectedKeyword */: - return true; - } - return false; - } - SyntaxFacts.isAccessibilityModifier = isAccessibilityModifier; - })(SyntaxFacts = TypeScript.SyntaxFacts || (TypeScript.SyntaxFacts = {})); -})(TypeScript || (TypeScript = {})); -var TypeScript; -(function (TypeScript) { - function separatorCount(list) { - return list.length >> 1; - } - TypeScript.separatorCount = separatorCount; - function nonSeparatorCount(list) { - return (list.length + 1) >> 1; - } - TypeScript.nonSeparatorCount = nonSeparatorCount; - function separatorAt(list, index) { - return list[(index << 1) + 1]; - } - TypeScript.separatorAt = separatorAt; - function nonSeparatorAt(list, index) { - return list[index << 1]; - } - TypeScript.nonSeparatorAt = nonSeparatorAt; -})(TypeScript || (TypeScript = {})); -var TypeScript; -(function (TypeScript) { - var Syntax; - (function (Syntax) { - function addArrayFunction(name, func) { - if (Object.defineProperty) { - Object.defineProperty(Array.prototype, name, { value: func, writable: true }); - } - else { - Array.prototype[name] = func; - } - } - addArrayFunction("kind", function () { - return 1 /* List */; - }); - function list(nodes) { - for (var i = 0, n = nodes.length; i < n; i++) { - nodes[i].parent = nodes; - } - return nodes; - } - Syntax.list = list; - function separatedList(nodesAndTokens) { - for (var i = 0, n = nodesAndTokens.length; i < n; i++) { - nodesAndTokens[i].parent = nodesAndTokens; - } - return nodesAndTokens; - } - Syntax.separatedList = separatedList; - })(Syntax = TypeScript.Syntax || (TypeScript.Syntax = {})); -})(TypeScript || (TypeScript = {})); -var TypeScript; -(function (TypeScript) { - function tokenValue(token) { - if (token.fullWidth() === 0) { - return undefined; - } - var kind = token.kind(); - var text = token.text(); - if (kind === 9 /* IdentifierName */) { - return massageEscapes(text); - } - switch (kind) { - case 39 /* TrueKeyword */: - return true; - case 26 /* FalseKeyword */: - return false; - case 34 /* NullKeyword */: - return undefined; - } - if (TypeScript.SyntaxFacts.isAnyKeyword(kind) || TypeScript.SyntaxFacts.isAnyPunctuation(kind)) { - return TypeScript.SyntaxFacts.getText(kind); - } - if (kind === 11 /* NumericLiteral */) { - return TypeScript.IntegerUtilities.isHexInteger(text) ? parseInt(text, 16) : parseFloat(text); - } - else if (kind === 12 /* StringLiteral */) { - return (text.length > 1 && text.charCodeAt(text.length - 1) === text.charCodeAt(0)) ? massageEscapes(text.substr(1, text.length - "''".length)) : massageEscapes(text.substr(1)); - } - else if (kind === 13 /* NoSubstitutionTemplateToken */ || kind === 16 /* TemplateEndToken */) { - return (text.length > 1 && text.charCodeAt(text.length - 1) === 96 /* backtick */) ? massageTemplate(text.substr(1, text.length - "``".length)) : massageTemplate(text.substr(1)); - } - else if (kind === 14 /* TemplateStartToken */ || kind === 15 /* TemplateMiddleToken */) { - return massageTemplate(text.substr(1, text.length - "`${".length)); - } - else if (kind === 10 /* RegularExpressionLiteral */) { - return regularExpressionValue(text); - } - else if (kind === 8 /* EndOfFileToken */ || kind === 7 /* ErrorToken */) { - return undefined; - } - else { - throw TypeScript.Errors.invalidOperation(); - } - } - TypeScript.tokenValue = tokenValue; - function tokenValueText(token) { - var value = tokenValue(token); - return value === undefined ? "" : massageDisallowedIdentifiers(value.toString()); - } - TypeScript.tokenValueText = tokenValueText; - function massageTemplate(text) { - text = text.replace("\r\n", "\n").replace("\r", "\n"); - return massageEscapes(text); - } - function massageEscapes(text) { - return text.indexOf("\\") >= 0 ? convertEscapes(text) : text; - } - TypeScript.massageEscapes = massageEscapes; - function regularExpressionValue(text) { - try { - var lastSlash = text.lastIndexOf("/"); - var body = text.substring(1, lastSlash); - var flags = text.substring(lastSlash + 1); - return new RegExp(body, flags); - } - catch (e) { - return undefined; - } - } - function massageDisallowedIdentifiers(text) { - if (text.charCodeAt(0) === 95 /* _ */ && text.charCodeAt(1) === 95 /* _ */) { - return "_" + text; - } - return text; - } - var characterArray = []; - function convertEscapes(text) { - characterArray.length = 0; - var result = ""; - for (var i = 0, n = text.length; i < n; i++) { - var ch = text.charCodeAt(i); - if (ch === 92 /* backslash */) { - i++; - if (i < n) { - ch = text.charCodeAt(i); - switch (ch) { - case 48 /* _0 */: - characterArray.push(0 /* nullCharacter */); - continue; - case 98 /* b */: - characterArray.push(8 /* backspace */); - continue; - case 102 /* f */: - characterArray.push(12 /* formFeed */); - continue; - case 110 /* n */: - characterArray.push(10 /* lineFeed */); - continue; - case 114 /* r */: - characterArray.push(13 /* carriageReturn */); - continue; - case 116 /* t */: - characterArray.push(9 /* tab */); - continue; - case 118 /* v */: - characterArray.push(11 /* verticalTab */); - continue; - case 120 /* x */: - characterArray.push(hexValue(text, i + 1, 2)); - i += 2; - continue; - case 117 /* u */: - characterArray.push(hexValue(text, i + 1, 4)); - i += 4; - continue; - case 13 /* carriageReturn */: - var nextIndex = i + 1; - if (nextIndex < text.length && text.charCodeAt(nextIndex) === 10 /* lineFeed */) { - i++; - } - continue; - case 10 /* lineFeed */: - case 8233 /* paragraphSeparator */: - case 8232 /* lineSeparator */: - continue; - default: - } - } - } - characterArray.push(ch); - if (i && !(i % 1024)) { - result = result.concat(String.fromCharCode.apply(undefined, characterArray)); - characterArray.length = 0; - } - } - if (characterArray.length) { - result = result.concat(String.fromCharCode.apply(undefined, characterArray)); - } - return result; - } - function hexValue(text, start, length) { - var intChar = 0; - for (var i = 0; i < length; i++) { - var ch2 = text.charCodeAt(start + i); - if (!TypeScript.CharacterInfo.isHexDigit(ch2)) { - break; - } - intChar = (intChar << 4) + TypeScript.CharacterInfo.hexValue(ch2); - } - return intChar; - } -})(TypeScript || (TypeScript = {})); -var TypeScript; -(function (TypeScript) { - var Syntax; - (function (Syntax) { - function realizeToken(token, text) { - return new RealizedToken(token.fullStart(), token.kind(), token.isKeywordConvertedToIdentifier(), token.leadingTrivia(text), token.text(), token.trailingTrivia(text)); - } - Syntax.realizeToken = realizeToken; - function convertKeywordToIdentifier(token) { - return new ConvertedKeywordToken(token); - } - Syntax.convertKeywordToIdentifier = convertKeywordToIdentifier; - function withLeadingTrivia(token, leadingTrivia, text) { - return new RealizedToken(token.fullStart(), token.kind(), token.isKeywordConvertedToIdentifier(), leadingTrivia, token.text(), token.trailingTrivia(text)); - } - Syntax.withLeadingTrivia = withLeadingTrivia; - function withTrailingTrivia(token, trailingTrivia, text) { - return new RealizedToken(token.fullStart(), token.kind(), token.isKeywordConvertedToIdentifier(), token.leadingTrivia(text), token.text(), trailingTrivia); - } - Syntax.withTrailingTrivia = withTrailingTrivia; - function emptyToken(kind) { - return new EmptyToken(kind); - } - Syntax.emptyToken = emptyToken; - var EmptyToken = (function () { - function EmptyToken(_kind) { - this._kind = _kind; - } - EmptyToken.prototype.setFullStart = function (fullStart) { - }; - EmptyToken.prototype.kind = function () { - return this._kind; - }; - EmptyToken.prototype.childCount = function () { - return 0; - }; - EmptyToken.prototype.childAt = function (index) { - throw TypeScript.Errors.invalidOperation(); - }; - EmptyToken.prototype.accept = function (visitor) { - return visitor.visitToken(this); - }; - EmptyToken.prototype.clone = function () { - return new EmptyToken(this.kind()); - }; - EmptyToken.prototype.isIncrementallyUnusable = function () { - return true; - }; - EmptyToken.prototype.isKeywordConvertedToIdentifier = function () { - return false; - }; - EmptyToken.prototype.fullWidth = function () { - return 0; - }; - EmptyToken.prototype.position = function () { - var previousElement = this.previousNonZeroWidthElement(); - return !previousElement ? 0 : TypeScript.fullStart(previousElement) + TypeScript.fullWidth(previousElement); - }; - EmptyToken.prototype.previousNonZeroWidthElement = function () { - var current = this; - while (true) { - var parent = current.parent; - if (parent === undefined) { - TypeScript.Debug.assert(current.kind() === 122 /* SourceUnit */, "We had a node without a parent that was not the root node!"); - return undefined; - } - for (var i = 0, n = TypeScript.childCount(parent); i < n; i++) { - if (TypeScript.childAt(parent, i) === current) { - break; - } - } - TypeScript.Debug.assert(i !== n, "Could not find current element in parent's child list!"); - for (var j = i - 1; j >= 0; j--) { - var sibling = TypeScript.childAt(parent, j); - if (sibling && TypeScript.fullWidth(sibling) > 0) { - return sibling; - } - } - current = current.parent; - } - }; - EmptyToken.prototype.fullStart = function () { - return this.position(); - }; - EmptyToken.prototype.text = function () { - return ""; - }; - EmptyToken.prototype.fullText = function () { - return ""; - }; - EmptyToken.prototype.hasLeadingTrivia = function () { - return false; - }; - EmptyToken.prototype.hasTrailingTrivia = function () { - return false; - }; - EmptyToken.prototype.hasLeadingComment = function () { - return false; - }; - EmptyToken.prototype.hasTrailingComment = function () { - return false; - }; - EmptyToken.prototype.hasSkippedToken = function () { - return false; - }; - EmptyToken.prototype.leadingTriviaWidth = function () { - return 0; - }; - EmptyToken.prototype.trailingTriviaWidth = function () { - return 0; - }; - EmptyToken.prototype.leadingTrivia = function () { - return Syntax.emptyTriviaList; - }; - EmptyToken.prototype.trailingTrivia = function () { - return Syntax.emptyTriviaList; - }; - return EmptyToken; - })(); - var RealizedToken = (function () { - function RealizedToken(fullStart, kind, isKeywordConvertedToIdentifier, leadingTrivia, text, trailingTrivia) { - this._fullStart = fullStart; - this._kind = kind; - this._isKeywordConvertedToIdentifier = isKeywordConvertedToIdentifier; - this._text = text; - this._leadingTrivia = leadingTrivia.clone(); - this._trailingTrivia = trailingTrivia.clone(); - if (!this._leadingTrivia.isShared()) { - this._leadingTrivia.parent = this; - } - if (!this._trailingTrivia.isShared()) { - this._trailingTrivia.parent = this; - } - } - RealizedToken.prototype.setFullStart = function (fullStart) { - this._fullStart = fullStart; - }; - RealizedToken.prototype.kind = function () { - return this._kind; - }; - RealizedToken.prototype.childCount = function () { - return 0; - }; - RealizedToken.prototype.childAt = function (index) { - throw TypeScript.Errors.invalidOperation(); - }; - RealizedToken.prototype.accept = function (visitor) { - return visitor.visitToken(this); - }; - RealizedToken.prototype.clone = function () { - return new RealizedToken(this._fullStart, this.kind(), this._isKeywordConvertedToIdentifier, this._leadingTrivia, this._text, this._trailingTrivia); - }; - RealizedToken.prototype.isIncrementallyUnusable = function () { - return true; - }; - RealizedToken.prototype.isKeywordConvertedToIdentifier = function () { - return this._isKeywordConvertedToIdentifier; - }; - RealizedToken.prototype.fullStart = function () { - return this._fullStart; - }; - RealizedToken.prototype.fullWidth = function () { - return this._leadingTrivia.fullWidth() + this._text.length + this._trailingTrivia.fullWidth(); - }; - RealizedToken.prototype.text = function () { - return this._text; - }; - RealizedToken.prototype.fullText = function () { - return this._leadingTrivia.fullText() + this.text() + this._trailingTrivia.fullText(); - }; - RealizedToken.prototype.hasLeadingTrivia = function () { - return this._leadingTrivia.count() > 0; - }; - RealizedToken.prototype.hasTrailingTrivia = function () { - return this._trailingTrivia.count() > 0; - }; - RealizedToken.prototype.hasLeadingComment = function () { - return this._leadingTrivia.hasComment(); - }; - RealizedToken.prototype.hasTrailingComment = function () { - return this._trailingTrivia.hasComment(); - }; - RealizedToken.prototype.leadingTriviaWidth = function () { - return this._leadingTrivia.fullWidth(); - }; - RealizedToken.prototype.trailingTriviaWidth = function () { - return this._trailingTrivia.fullWidth(); - }; - RealizedToken.prototype.hasSkippedToken = function () { - return this._leadingTrivia.hasSkippedToken() || this._trailingTrivia.hasSkippedToken(); - }; - RealizedToken.prototype.leadingTrivia = function () { - return this._leadingTrivia; - }; - RealizedToken.prototype.trailingTrivia = function () { - return this._trailingTrivia; - }; - return RealizedToken; - })(); - var ConvertedKeywordToken = (function () { - function ConvertedKeywordToken(underlyingToken) { - this.underlyingToken = underlyingToken; - } - ConvertedKeywordToken.prototype.kind = function () { - return 9 /* IdentifierName */; - }; - ConvertedKeywordToken.prototype.setFullStart = function (fullStart) { - this.underlyingToken.setFullStart(fullStart); - }; - ConvertedKeywordToken.prototype.childCount = function () { - return 0; - }; - ConvertedKeywordToken.prototype.childAt = function (index) { - throw TypeScript.Errors.invalidOperation(); - }; - ConvertedKeywordToken.prototype.accept = function (visitor) { - return visitor.visitToken(this); - }; - ConvertedKeywordToken.prototype.fullStart = function () { - return this.underlyingToken.fullStart(); - }; - ConvertedKeywordToken.prototype.fullWidth = function () { - return this.underlyingToken.fullWidth(); - }; - ConvertedKeywordToken.prototype.text = function () { - return this.underlyingToken.text(); - }; - ConvertedKeywordToken.prototype.syntaxTreeText = function (text) { - var result = text || TypeScript.syntaxTree(this).text; - TypeScript.Debug.assert(result); - return result; - }; - ConvertedKeywordToken.prototype.fullText = function (text) { - return this.underlyingToken.fullText(this.syntaxTreeText(text)); - }; - ConvertedKeywordToken.prototype.hasLeadingTrivia = function () { - return this.underlyingToken.hasLeadingTrivia(); - }; - ConvertedKeywordToken.prototype.hasTrailingTrivia = function () { - return this.underlyingToken.hasTrailingTrivia(); - }; - ConvertedKeywordToken.prototype.hasLeadingComment = function () { - return this.underlyingToken.hasLeadingComment(); - }; - ConvertedKeywordToken.prototype.hasTrailingComment = function () { - return this.underlyingToken.hasTrailingComment(); - }; - ConvertedKeywordToken.prototype.hasSkippedToken = function () { - return this.underlyingToken.hasSkippedToken(); - }; - ConvertedKeywordToken.prototype.leadingTrivia = function (text) { - var result = this.underlyingToken.leadingTrivia(this.syntaxTreeText(text)); - result.parent = this; - return result; - }; - ConvertedKeywordToken.prototype.trailingTrivia = function (text) { - var result = this.underlyingToken.trailingTrivia(this.syntaxTreeText(text)); - result.parent = this; - return result; - }; - ConvertedKeywordToken.prototype.leadingTriviaWidth = function (text) { - return this.underlyingToken.leadingTriviaWidth(this.syntaxTreeText(text)); - }; - ConvertedKeywordToken.prototype.trailingTriviaWidth = function (text) { - return this.underlyingToken.trailingTriviaWidth(this.syntaxTreeText(text)); - }; - ConvertedKeywordToken.prototype.isKeywordConvertedToIdentifier = function () { - return true; - }; - ConvertedKeywordToken.prototype.isIncrementallyUnusable = function () { - return this.underlyingToken.isIncrementallyUnusable(); - }; - ConvertedKeywordToken.prototype.clone = function () { - return new ConvertedKeywordToken(this.underlyingToken); - }; - return ConvertedKeywordToken; - })(); - })(Syntax = TypeScript.Syntax || (TypeScript.Syntax = {})); -})(TypeScript || (TypeScript = {})); -var TypeScript; -(function (TypeScript) { - var Syntax; - (function (Syntax) { - var AbstractTrivia = (function () { - function AbstractTrivia(_kind) { - this._kind = _kind; - } - AbstractTrivia.prototype.kind = function () { - return this._kind; - }; - AbstractTrivia.prototype.clone = function () { - throw TypeScript.Errors.abstract(); - }; - AbstractTrivia.prototype.fullStart = function () { - throw TypeScript.Errors.abstract(); - }; - AbstractTrivia.prototype.fullWidth = function () { - throw TypeScript.Errors.abstract(); - }; - AbstractTrivia.prototype.fullText = function () { - throw TypeScript.Errors.abstract(); - }; - AbstractTrivia.prototype.skippedToken = function () { - throw TypeScript.Errors.abstract(); - }; - AbstractTrivia.prototype.isWhitespace = function () { - return this.kind() === 2 /* WhitespaceTrivia */; - }; - AbstractTrivia.prototype.isComment = function () { - return this.kind() === 5 /* SingleLineCommentTrivia */ || this.kind() === 4 /* MultiLineCommentTrivia */; - }; - AbstractTrivia.prototype.isNewLine = function () { - return this.kind() === 3 /* NewLineTrivia */; - }; - AbstractTrivia.prototype.isSkippedToken = function () { - return this.kind() === 6 /* SkippedTokenTrivia */; - }; - return AbstractTrivia; - })(); - var SkippedTokenTrivia = (function (_super) { - __extends(SkippedTokenTrivia, _super); - function SkippedTokenTrivia(_skippedToken, _fullText) { - _super.call(this, 6 /* SkippedTokenTrivia */); - this._skippedToken = _skippedToken; - this._fullText = _fullText; - _skippedToken.parent = this; - } - SkippedTokenTrivia.prototype.clone = function () { - return new SkippedTokenTrivia(this._skippedToken.clone(), this._fullText); - }; - SkippedTokenTrivia.prototype.fullStart = function () { - return this._skippedToken.fullStart(); - }; - SkippedTokenTrivia.prototype.fullWidth = function () { - return this.fullText().length; - }; - SkippedTokenTrivia.prototype.fullText = function () { - return this._fullText; - }; - SkippedTokenTrivia.prototype.skippedToken = function () { - return this._skippedToken; - }; - return SkippedTokenTrivia; - })(AbstractTrivia); - var DeferredTrivia = (function (_super) { - __extends(DeferredTrivia, _super); - function DeferredTrivia(kind, _text, _fullStart, _fullWidth) { - _super.call(this, kind); - this._text = _text; - this._fullStart = _fullStart; - this._fullWidth = _fullWidth; - } - DeferredTrivia.prototype.clone = function () { - return new DeferredTrivia(this.kind(), this._text, this._fullStart, this._fullWidth); - }; - DeferredTrivia.prototype.fullStart = function () { - return this._fullStart; - }; - DeferredTrivia.prototype.fullWidth = function () { - return this._fullWidth; - }; - DeferredTrivia.prototype.fullText = function () { - return this._text.substr(this._fullStart, this._fullWidth); - }; - DeferredTrivia.prototype.skippedToken = function () { - throw TypeScript.Errors.invalidOperation(); - }; - return DeferredTrivia; - })(AbstractTrivia); - function deferredTrivia(kind, text, fullStart, fullWidth) { - return new DeferredTrivia(kind, text, fullStart, fullWidth); - } - Syntax.deferredTrivia = deferredTrivia; - function skippedTokenTrivia(token, text) { - TypeScript.Debug.assert(!token.hasLeadingTrivia()); - TypeScript.Debug.assert(!token.hasTrailingTrivia()); - TypeScript.Debug.assert(token.fullWidth() > 0); - return new SkippedTokenTrivia(token, token.fullText(text)); - } - Syntax.skippedTokenTrivia = skippedTokenTrivia; - function splitMultiLineCommentTriviaIntoMultipleLines(trivia) { - var result = []; - var triviaText = trivia.fullText(); - var currentIndex = 0; - for (var i = 0; i < triviaText.length; i++) { - var ch = triviaText.charCodeAt(i); - switch (ch) { - case 13 /* carriageReturn */: - if (i < triviaText.length - 1 && triviaText.charCodeAt(i + 1) === 10 /* lineFeed */) { - i++; - } - case 10 /* lineFeed */: - case 8233 /* paragraphSeparator */: - case 8232 /* lineSeparator */: - result.push(triviaText.substring(currentIndex, i + 1)); - currentIndex = i + 1; - continue; - } - } - result.push(triviaText.substring(currentIndex)); - return result; - } - Syntax.splitMultiLineCommentTriviaIntoMultipleLines = splitMultiLineCommentTriviaIntoMultipleLines; - })(Syntax = TypeScript.Syntax || (TypeScript.Syntax = {})); -})(TypeScript || (TypeScript = {})); -var TypeScript; -(function (TypeScript) { - var Syntax; - (function (Syntax) { - var EmptyTriviaList = (function () { - function EmptyTriviaList() { - } - EmptyTriviaList.prototype.isShared = function () { - return true; - }; - EmptyTriviaList.prototype.count = function () { - return 0; - }; - EmptyTriviaList.prototype.syntaxTriviaAt = function (index) { - throw TypeScript.Errors.argumentOutOfRange("index"); - }; - EmptyTriviaList.prototype.last = function () { - throw TypeScript.Errors.argumentOutOfRange("index"); - }; - EmptyTriviaList.prototype.fullWidth = function () { - return 0; - }; - EmptyTriviaList.prototype.fullText = function () { - return ""; - }; - EmptyTriviaList.prototype.hasComment = function () { - return false; - }; - EmptyTriviaList.prototype.hasNewLine = function () { - return false; - }; - EmptyTriviaList.prototype.hasSkippedToken = function () { - return false; - }; - EmptyTriviaList.prototype.toArray = function () { - return []; - }; - EmptyTriviaList.prototype.clone = function () { - return this; - }; - return EmptyTriviaList; - })(); - ; - Syntax.emptyTriviaList = new EmptyTriviaList(); - function isComment(trivia) { - return trivia.kind() === 4 /* MultiLineCommentTrivia */ || trivia.kind() === 5 /* SingleLineCommentTrivia */; - } - var SingletonSyntaxTriviaList = (function () { - function SingletonSyntaxTriviaList(item) { - this.item = item.clone(); - this.item.parent = this; - } - SingletonSyntaxTriviaList.prototype.isShared = function () { - return false; - }; - SingletonSyntaxTriviaList.prototype.count = function () { - return 1; - }; - SingletonSyntaxTriviaList.prototype.syntaxTriviaAt = function (index) { - if (index !== 0) { - throw TypeScript.Errors.argumentOutOfRange("index"); - } - return this.item; - }; - SingletonSyntaxTriviaList.prototype.last = function () { - return this.item; - }; - SingletonSyntaxTriviaList.prototype.fullWidth = function () { - return this.item.fullWidth(); - }; - SingletonSyntaxTriviaList.prototype.fullText = function () { - return this.item.fullText(); - }; - SingletonSyntaxTriviaList.prototype.hasComment = function () { - return isComment(this.item); - }; - SingletonSyntaxTriviaList.prototype.hasNewLine = function () { - return this.item.kind() === 3 /* NewLineTrivia */; - }; - SingletonSyntaxTriviaList.prototype.hasSkippedToken = function () { - return this.item.kind() === 6 /* SkippedTokenTrivia */; - }; - SingletonSyntaxTriviaList.prototype.toArray = function () { - return [this.item]; - }; - SingletonSyntaxTriviaList.prototype.clone = function () { - return new SingletonSyntaxTriviaList(this.item.clone()); - }; - return SingletonSyntaxTriviaList; - })(); - var NormalSyntaxTriviaList = (function () { - function NormalSyntaxTriviaList(trivia) { - var _this = this; - this.trivia = trivia.map(function (t) { - var cloned = t.clone(); - cloned.parent = _this; - return cloned; - }); - } - NormalSyntaxTriviaList.prototype.isShared = function () { - return false; - }; - NormalSyntaxTriviaList.prototype.count = function () { - return this.trivia.length; - }; - NormalSyntaxTriviaList.prototype.syntaxTriviaAt = function (index) { - if (index < 0 || index >= this.trivia.length) { - throw TypeScript.Errors.argumentOutOfRange("index"); - } - return this.trivia[index]; - }; - NormalSyntaxTriviaList.prototype.last = function () { - return this.trivia[this.trivia.length - 1]; - }; - NormalSyntaxTriviaList.prototype.fullWidth = function () { - return TypeScript.ArrayUtilities.sum(this.trivia, function (t) { return t.fullWidth(); }); - }; - NormalSyntaxTriviaList.prototype.fullText = function () { - var result = []; - for (var i = 0, n = this.trivia.length; i < n; i++) { - result.push(this.trivia[i].fullText()); - } - return result.join(""); - }; - NormalSyntaxTriviaList.prototype.hasComment = function () { - for (var i = 0; i < this.trivia.length; i++) { - if (isComment(this.trivia[i])) { - return true; - } - } - return false; - }; - NormalSyntaxTriviaList.prototype.hasNewLine = function () { - for (var i = 0; i < this.trivia.length; i++) { - if (this.trivia[i].kind() === 3 /* NewLineTrivia */) { - return true; - } - } - return false; - }; - NormalSyntaxTriviaList.prototype.hasSkippedToken = function () { - for (var i = 0; i < this.trivia.length; i++) { - if (this.trivia[i].kind() === 6 /* SkippedTokenTrivia */) { - return true; - } - } - return false; - }; - NormalSyntaxTriviaList.prototype.toArray = function () { - return this.trivia.slice(0); - }; - NormalSyntaxTriviaList.prototype.clone = function () { - return new NormalSyntaxTriviaList(this.trivia.map(function (t) { return t.clone(); })); - }; - return NormalSyntaxTriviaList; - })(); - function triviaList(trivia) { - if (!trivia || trivia.length === 0) { - return Syntax.emptyTriviaList; - } - if (trivia.length === 1) { - return new SingletonSyntaxTriviaList(trivia[0]); - } - return new NormalSyntaxTriviaList(trivia); - } - Syntax.triviaList = triviaList; - })(Syntax = TypeScript.Syntax || (TypeScript.Syntax = {})); -})(TypeScript || (TypeScript = {})); -var TypeScript; -(function (TypeScript) { - var SyntaxUtilities = (function () { - function SyntaxUtilities() { - } - SyntaxUtilities.isAnyFunctionExpressionOrDeclaration = function (ast) { - switch (ast.kind()) { - case 183 /* SimpleArrowFunctionExpression */: - case 182 /* ParenthesizedArrowFunctionExpression */: - case 186 /* FunctionExpression */: - case 134 /* FunctionDeclaration */: - case 140 /* MemberFunctionDeclaration */: - case 207 /* FunctionPropertyAssignment */: - case 142 /* ConstructorDeclaration */: - case 144 /* GetAccessor */: - case 145 /* SetAccessor */: - return true; - } - return false; - }; - SyntaxUtilities.isLastTokenOnLine = function (token, text) { - var _nextToken = TypeScript.nextToken(token, text); - if (_nextToken === undefined) { - return true; - } - var lineMap = text.lineMap(); - var tokenLine = lineMap.getLineNumberFromPosition(TypeScript.end(token, text)); - var nextTokenLine = lineMap.getLineNumberFromPosition(TypeScript.start(_nextToken, text)); - return tokenLine !== nextTokenLine; - }; - SyntaxUtilities.isLeftHandSizeExpression = function (element) { - if (element) { - switch (element.kind()) { - case 176 /* MemberAccessExpression */: - case 185 /* ElementAccessExpression */: - case 189 /* TemplateAccessExpression */: - case 180 /* ObjectCreationExpression */: - case 177 /* InvocationExpression */: - case 178 /* ArrayLiteralExpression */: - case 181 /* ParenthesizedExpression */: - case 179 /* ObjectLiteralExpression */: - case 186 /* FunctionExpression */: - case 9 /* IdentifierName */: - case 10 /* RegularExpressionLiteral */: - case 11 /* NumericLiteral */: - case 12 /* StringLiteral */: - case 26 /* FalseKeyword */: - case 34 /* NullKeyword */: - case 37 /* ThisKeyword */: - case 39 /* TrueKeyword */: - case 52 /* SuperKeyword */: - return true; - } - } - return false; - }; - SyntaxUtilities.isSwitchClause = function (element) { - if (element) { - switch (element.kind()) { - case 198 /* CaseSwitchClause */: - case 199 /* DefaultSwitchClause */: - return true; - } - } - return false; - }; - SyntaxUtilities.isTypeMember = function (element) { - if (element) { - switch (element.kind()) { - case 148 /* ConstructSignature */: - case 150 /* MethodSignature */: - case 149 /* IndexSignature */: - case 146 /* PropertySignature */: - case 147 /* CallSignature */: - return true; - } - } - return false; - }; - SyntaxUtilities.isClassElement = function (element) { - if (element) { - switch (element.kind()) { - case 142 /* ConstructorDeclaration */: - case 143 /* IndexMemberDeclaration */: - case 140 /* MemberFunctionDeclaration */: - case 144 /* GetAccessor */: - case 145 /* SetAccessor */: - case 140 /* MemberFunctionDeclaration */: - case 141 /* MemberVariableDeclaration */: - return true; - } - } - return false; - }; - SyntaxUtilities.isModuleElement = function (element) { - if (element) { - switch (element.kind()) { - case 138 /* ImportDeclaration */: - case 139 /* ExportAssignment */: - case 136 /* ClassDeclaration */: - case 133 /* InterfaceDeclaration */: - case 135 /* ModuleDeclaration */: - case 137 /* EnumDeclaration */: - case 134 /* FunctionDeclaration */: - case 153 /* VariableStatement */: - case 151 /* Block */: - case 152 /* IfStatement */: - case 154 /* ExpressionStatement */: - case 162 /* ThrowStatement */: - case 155 /* ReturnStatement */: - case 156 /* SwitchStatement */: - case 157 /* BreakStatement */: - case 158 /* ContinueStatement */: - case 160 /* ForInStatement */: - case 159 /* ForStatement */: - case 163 /* WhileStatement */: - case 168 /* WithStatement */: - case 161 /* EmptyStatement */: - case 164 /* TryStatement */: - case 165 /* LabeledStatement */: - case 166 /* DoStatement */: - case 167 /* DebuggerStatement */: - return true; - } - } - return false; - }; - SyntaxUtilities.isStatement = function (element) { - if (element) { - switch (element.kind()) { - case 134 /* FunctionDeclaration */: - case 153 /* VariableStatement */: - case 151 /* Block */: - case 152 /* IfStatement */: - case 154 /* ExpressionStatement */: - case 162 /* ThrowStatement */: - case 155 /* ReturnStatement */: - case 156 /* SwitchStatement */: - case 157 /* BreakStatement */: - case 158 /* ContinueStatement */: - case 160 /* ForInStatement */: - case 159 /* ForStatement */: - case 163 /* WhileStatement */: - case 168 /* WithStatement */: - case 161 /* EmptyStatement */: - case 164 /* TryStatement */: - case 165 /* LabeledStatement */: - case 166 /* DoStatement */: - case 167 /* DebuggerStatement */: - return true; - } - } - return false; - }; - SyntaxUtilities.isAngleBracket = function (positionedElement) { - var element = positionedElement; - var parent = positionedElement.parent; - if (parent && (element.kind() === 82 /* LessThanToken */ || element.kind() === 83 /* GreaterThanToken */)) { - switch (parent.kind()) { - case 194 /* TypeArgumentList */: - case 195 /* TypeParameterList */: - case 184 /* CastExpression */: - return true; - } - } - return false; - }; - SyntaxUtilities.getToken = function (list, kind) { - for (var i = 0, n = list.length; i < n; i++) { - var token = list[i]; - if (token.kind() === kind) { - return token; - } - } - return undefined; - }; - SyntaxUtilities.containsToken = function (list, kind) { - return !!SyntaxUtilities.getToken(list, kind); - }; - SyntaxUtilities.hasExportKeyword = function (moduleElement) { - return !!SyntaxUtilities.getExportKeyword(moduleElement); - }; - SyntaxUtilities.getExportKeyword = function (moduleElement) { - switch (moduleElement.kind()) { - case 135 /* ModuleDeclaration */: - case 136 /* ClassDeclaration */: - case 134 /* FunctionDeclaration */: - case 153 /* VariableStatement */: - case 137 /* EnumDeclaration */: - case 133 /* InterfaceDeclaration */: - case 138 /* ImportDeclaration */: - return SyntaxUtilities.getToken(moduleElement.modifiers, 49 /* ExportKeyword */); - default: - return undefined; - } - }; - SyntaxUtilities.isAmbientDeclarationSyntax = function (positionNode) { - if (!positionNode) { - return false; - } - var node = positionNode; - switch (node.kind()) { - case 135 /* ModuleDeclaration */: - case 136 /* ClassDeclaration */: - case 134 /* FunctionDeclaration */: - case 153 /* VariableStatement */: - case 137 /* EnumDeclaration */: - if (SyntaxUtilities.containsToken(node.modifiers, 65 /* DeclareKeyword */)) { - return true; - } - case 138 /* ImportDeclaration */: - case 142 /* ConstructorDeclaration */: - case 140 /* MemberFunctionDeclaration */: - case 144 /* GetAccessor */: - case 145 /* SetAccessor */: - case 141 /* MemberVariableDeclaration */: - if (SyntaxUtilities.isClassElement(node) || SyntaxUtilities.isModuleElement(node)) { - return SyntaxUtilities.isAmbientDeclarationSyntax(TypeScript.Syntax.containingNode(positionNode)); - } - case 209 /* EnumElement */: - return SyntaxUtilities.isAmbientDeclarationSyntax(TypeScript.Syntax.containingNode(TypeScript.Syntax.containingNode(positionNode))); - default: - return SyntaxUtilities.isAmbientDeclarationSyntax(TypeScript.Syntax.containingNode(positionNode)); - } - }; - return SyntaxUtilities; - })(); - TypeScript.SyntaxUtilities = SyntaxUtilities; -})(TypeScript || (TypeScript = {})); -var TypeScript; -(function (TypeScript) { - var childCountArray = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 3, 4, 3, 5, 2, 2, 3, 3, 3, 6, 6, 7, 8, 6, 6, 4, 5, 3, 5, 3, 5, 5, 3, 3, 2, 4, 3, 3, 6, 3, 2, 3, 7, 3, 3, 10, 8, 1, 3, 5, 4, 3, 7, 2, 5, 2, 2, 2, 2, 5, 3, 2, 3, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 0, 2, 2, 2, 3, 4, 3, 3, 3, 2, 2, 4, 3, 2, 6, 2, 2, 2, 2, 3, 3, 6, 2, 2, 4, 1]; - function childCount(element) { - if (TypeScript.isList(element)) { - return element.length; - } - return childCountArray[element.kind()]; - } - TypeScript.childCount = childCount; - function sourceUnitChildAt(node, index) { - switch (index) { - case 0: return node.moduleElements; - case 1: return node.endOfFileToken; - } - } - function qualifiedNameChildAt(node, index) { - switch (index) { - case 0: return node.left; - case 1: return node.dotToken; - case 2: return node.right; - } - } - function objectTypeChildAt(node, index) { - switch (index) { - case 0: return node.openBraceToken; - case 1: return node.typeMembers; - case 2: return node.closeBraceToken; - } - } - function functionTypeChildAt(node, index) { - switch (index) { - case 0: return node.typeParameterList; - case 1: return node.parameterList; - case 2: return node.equalsGreaterThanToken; - case 3: return node.type; - } - } - function arrayTypeChildAt(node, index) { - switch (index) { - case 0: return node.type; - case 1: return node.openBracketToken; - case 2: return node.closeBracketToken; - } - } - function constructorTypeChildAt(node, index) { - switch (index) { - case 0: return node.newKeyword; - case 1: return node.typeParameterList; - case 2: return node.parameterList; - case 3: return node.equalsGreaterThanToken; - case 4: return node.type; - } - } - function genericTypeChildAt(node, index) { - switch (index) { - case 0: return node.name; - case 1: return node.typeArgumentList; - } - } - function typeQueryChildAt(node, index) { - switch (index) { - case 0: return node.typeOfKeyword; - case 1: return node.name; - } - } - function tupleTypeChildAt(node, index) { - switch (index) { - case 0: return node.openBracketToken; - case 1: return node.types; - case 2: return node.closeBracketToken; - } - } - function unionTypeChildAt(node, index) { - switch (index) { - case 0: return node.left; - case 1: return node.barToken; - case 2: return node.right; - } - } - function parenthesizedTypeChildAt(node, index) { - switch (index) { - case 0: return node.openParenToken; - case 1: return node.type; - case 2: return node.closeParenToken; - } - } - function interfaceDeclarationChildAt(node, index) { - switch (index) { - case 0: return node.modifiers; - case 1: return node.interfaceKeyword; - case 2: return node.identifier; - case 3: return node.typeParameterList; - case 4: return node.heritageClauses; - case 5: return node.body; - } - } - function functionDeclarationChildAt(node, index) { - switch (index) { - case 0: return node.modifiers; - case 1: return node.functionKeyword; - case 2: return node.identifier; - case 3: return node.callSignature; - case 4: return node.block; - case 5: return node.semicolonToken; - } - } - function moduleDeclarationChildAt(node, index) { - switch (index) { - case 0: return node.modifiers; - case 1: return node.moduleKeyword; - case 2: return node.name; - case 3: return node.stringLiteral; - case 4: return node.openBraceToken; - case 5: return node.moduleElements; - case 6: return node.closeBraceToken; - } - } - function classDeclarationChildAt(node, index) { - switch (index) { - case 0: return node.modifiers; - case 1: return node.classKeyword; - case 2: return node.identifier; - case 3: return node.typeParameterList; - case 4: return node.heritageClauses; - case 5: return node.openBraceToken; - case 6: return node.classElements; - case 7: return node.closeBraceToken; - } - } - function enumDeclarationChildAt(node, index) { - switch (index) { - case 0: return node.modifiers; - case 1: return node.enumKeyword; - case 2: return node.identifier; - case 3: return node.openBraceToken; - case 4: return node.enumElements; - case 5: return node.closeBraceToken; - } - } - function importDeclarationChildAt(node, index) { - switch (index) { - case 0: return node.modifiers; - case 1: return node.importKeyword; - case 2: return node.identifier; - case 3: return node.equalsToken; - case 4: return node.moduleReference; - case 5: return node.semicolonToken; - } - } - function exportAssignmentChildAt(node, index) { - switch (index) { - case 0: return node.exportKeyword; - case 1: return node.equalsToken; - case 2: return node.identifier; - case 3: return node.semicolonToken; - } - } - function memberFunctionDeclarationChildAt(node, index) { - switch (index) { - case 0: return node.modifiers; - case 1: return node.propertyName; - case 2: return node.callSignature; - case 3: return node.block; - case 4: return node.semicolonToken; - } - } - function memberVariableDeclarationChildAt(node, index) { - switch (index) { - case 0: return node.modifiers; - case 1: return node.variableDeclarator; - case 2: return node.semicolonToken; - } - } - function constructorDeclarationChildAt(node, index) { - switch (index) { - case 0: return node.modifiers; - case 1: return node.constructorKeyword; - case 2: return node.callSignature; - case 3: return node.block; - case 4: return node.semicolonToken; - } - } - function indexMemberDeclarationChildAt(node, index) { - switch (index) { - case 0: return node.modifiers; - case 1: return node.indexSignature; - case 2: return node.semicolonToken; - } - } - function getAccessorChildAt(node, index) { - switch (index) { - case 0: return node.modifiers; - case 1: return node.getKeyword; - case 2: return node.propertyName; - case 3: return node.callSignature; - case 4: return node.block; - } - } - function setAccessorChildAt(node, index) { - switch (index) { - case 0: return node.modifiers; - case 1: return node.setKeyword; - case 2: return node.propertyName; - case 3: return node.callSignature; - case 4: return node.block; - } - } - function propertySignatureChildAt(node, index) { - switch (index) { - case 0: return node.propertyName; - case 1: return node.questionToken; - case 2: return node.typeAnnotation; - } - } - function callSignatureChildAt(node, index) { - switch (index) { - case 0: return node.typeParameterList; - case 1: return node.parameterList; - case 2: return node.typeAnnotation; - } - } - function constructSignatureChildAt(node, index) { - switch (index) { - case 0: return node.newKeyword; - case 1: return node.callSignature; - } - } - function indexSignatureChildAt(node, index) { - switch (index) { - case 0: return node.openBracketToken; - case 1: return node.parameters; - case 2: return node.closeBracketToken; - case 3: return node.typeAnnotation; - } - } - function methodSignatureChildAt(node, index) { - switch (index) { - case 0: return node.propertyName; - case 1: return node.questionToken; - case 2: return node.callSignature; - } - } - function blockChildAt(node, index) { - switch (index) { - case 0: return node.openBraceToken; - case 1: return node.statements; - case 2: return node.closeBraceToken; - } - } - function ifStatementChildAt(node, index) { - switch (index) { - case 0: return node.ifKeyword; - case 1: return node.openParenToken; - case 2: return node.condition; - case 3: return node.closeParenToken; - case 4: return node.statement; - case 5: return node.elseClause; - } - } - function variableStatementChildAt(node, index) { - switch (index) { - case 0: return node.modifiers; - case 1: return node.variableDeclaration; - case 2: return node.semicolonToken; - } - } - function expressionStatementChildAt(node, index) { - switch (index) { - case 0: return node.expression; - case 1: return node.semicolonToken; - } - } - function returnStatementChildAt(node, index) { - switch (index) { - case 0: return node.returnKeyword; - case 1: return node.expression; - case 2: return node.semicolonToken; - } - } - function switchStatementChildAt(node, index) { - switch (index) { - case 0: return node.switchKeyword; - case 1: return node.openParenToken; - case 2: return node.expression; - case 3: return node.closeParenToken; - case 4: return node.openBraceToken; - case 5: return node.switchClauses; - case 6: return node.closeBraceToken; - } - } - function breakStatementChildAt(node, index) { - switch (index) { - case 0: return node.breakKeyword; - case 1: return node.identifier; - case 2: return node.semicolonToken; - } - } - function continueStatementChildAt(node, index) { - switch (index) { - case 0: return node.continueKeyword; - case 1: return node.identifier; - case 2: return node.semicolonToken; - } - } - function forStatementChildAt(node, index) { - switch (index) { - case 0: return node.forKeyword; - case 1: return node.openParenToken; - case 2: return node.variableDeclaration; - case 3: return node.initializer; - case 4: return node.firstSemicolonToken; - case 5: return node.condition; - case 6: return node.secondSemicolonToken; - case 7: return node.incrementor; - case 8: return node.closeParenToken; - case 9: return node.statement; - } - } - function forInStatementChildAt(node, index) { - switch (index) { - case 0: return node.forKeyword; - case 1: return node.openParenToken; - case 2: return node.variableDeclaration; - case 3: return node.left; - case 4: return node.inKeyword; - case 5: return node.expression; - case 6: return node.closeParenToken; - case 7: return node.statement; - } - } - function emptyStatementChildAt(node, index) { - switch (index) { - case 0: return node.semicolonToken; - } - } - function throwStatementChildAt(node, index) { - switch (index) { - case 0: return node.throwKeyword; - case 1: return node.expression; - case 2: return node.semicolonToken; - } - } - function whileStatementChildAt(node, index) { - switch (index) { - case 0: return node.whileKeyword; - case 1: return node.openParenToken; - case 2: return node.condition; - case 3: return node.closeParenToken; - case 4: return node.statement; - } - } - function tryStatementChildAt(node, index) { - switch (index) { - case 0: return node.tryKeyword; - case 1: return node.block; - case 2: return node.catchClause; - case 3: return node.finallyClause; - } - } - function labeledStatementChildAt(node, index) { - switch (index) { - case 0: return node.identifier; - case 1: return node.colonToken; - case 2: return node.statement; - } - } - function doStatementChildAt(node, index) { - switch (index) { - case 0: return node.doKeyword; - case 1: return node.statement; - case 2: return node.whileKeyword; - case 3: return node.openParenToken; - case 4: return node.condition; - case 5: return node.closeParenToken; - case 6: return node.semicolonToken; - } - } - function debuggerStatementChildAt(node, index) { - switch (index) { - case 0: return node.debuggerKeyword; - case 1: return node.semicolonToken; - } - } - function withStatementChildAt(node, index) { - switch (index) { - case 0: return node.withKeyword; - case 1: return node.openParenToken; - case 2: return node.condition; - case 3: return node.closeParenToken; - case 4: return node.statement; - } - } - function prefixUnaryExpressionChildAt(node, index) { - switch (index) { - case 0: return node.operatorToken; - case 1: return node.operand; - } - } - function deleteExpressionChildAt(node, index) { - switch (index) { - case 0: return node.deleteKeyword; - case 1: return node.expression; - } - } - function typeOfExpressionChildAt(node, index) { - switch (index) { - case 0: return node.typeOfKeyword; - case 1: return node.expression; - } - } - function voidExpressionChildAt(node, index) { - switch (index) { - case 0: return node.voidKeyword; - case 1: return node.expression; - } - } - function conditionalExpressionChildAt(node, index) { - switch (index) { - case 0: return node.condition; - case 1: return node.questionToken; - case 2: return node.whenTrue; - case 3: return node.colonToken; - case 4: return node.whenFalse; - } - } - function binaryExpressionChildAt(node, index) { - switch (index) { - case 0: return node.left; - case 1: return node.operatorToken; - case 2: return node.right; - } - } - function postfixUnaryExpressionChildAt(node, index) { - switch (index) { - case 0: return node.operand; - case 1: return node.operatorToken; - } - } - function memberAccessExpressionChildAt(node, index) { - switch (index) { - case 0: return node.expression; - case 1: return node.dotToken; - case 2: return node.name; - } - } - function invocationExpressionChildAt(node, index) { - switch (index) { - case 0: return node.expression; - case 1: return node.argumentList; - } - } - function arrayLiteralExpressionChildAt(node, index) { - switch (index) { - case 0: return node.openBracketToken; - case 1: return node.expressions; - case 2: return node.closeBracketToken; - } - } - function objectLiteralExpressionChildAt(node, index) { - switch (index) { - case 0: return node.openBraceToken; - case 1: return node.propertyAssignments; - case 2: return node.closeBraceToken; - } - } - function objectCreationExpressionChildAt(node, index) { - switch (index) { - case 0: return node.newKeyword; - case 1: return node.expression; - case 2: return node.argumentList; - } - } - function parenthesizedExpressionChildAt(node, index) { - switch (index) { - case 0: return node.openParenToken; - case 1: return node.expression; - case 2: return node.closeParenToken; - } - } - function parenthesizedArrowFunctionExpressionChildAt(node, index) { - switch (index) { - case 0: return node.callSignature; - case 1: return node.equalsGreaterThanToken; - case 2: return node.block; - case 3: return node.expression; - } - } - function simpleArrowFunctionExpressionChildAt(node, index) { - switch (index) { - case 0: return node.parameter; - case 1: return node.equalsGreaterThanToken; - case 2: return node.block; - case 3: return node.expression; - } - } - function castExpressionChildAt(node, index) { - switch (index) { - case 0: return node.lessThanToken; - case 1: return node.type; - case 2: return node.greaterThanToken; - case 3: return node.expression; - } - } - function elementAccessExpressionChildAt(node, index) { - switch (index) { - case 0: return node.expression; - case 1: return node.openBracketToken; - case 2: return node.argumentExpression; - case 3: return node.closeBracketToken; - } - } - function functionExpressionChildAt(node, index) { - switch (index) { - case 0: return node.functionKeyword; - case 1: return node.identifier; - case 2: return node.callSignature; - case 3: return node.block; - } - } - function omittedExpressionChildAt(node, index) { - throw TypeScript.Errors.invalidOperation(); - } - function templateExpressionChildAt(node, index) { - switch (index) { - case 0: return node.templateStartToken; - case 1: return node.templateClauses; - } - } - function templateAccessExpressionChildAt(node, index) { - switch (index) { - case 0: return node.expression; - case 1: return node.templateExpression; - } - } - function variableDeclarationChildAt(node, index) { - switch (index) { - case 0: return node.varKeyword; - case 1: return node.variableDeclarators; - } - } - function variableDeclaratorChildAt(node, index) { - switch (index) { - case 0: return node.propertyName; - case 1: return node.typeAnnotation; - case 2: return node.equalsValueClause; - } - } - function argumentListChildAt(node, index) { - switch (index) { - case 0: return node.typeArgumentList; - case 1: return node.openParenToken; - case 2: return node.arguments; - case 3: return node.closeParenToken; - } - } - function parameterListChildAt(node, index) { - switch (index) { - case 0: return node.openParenToken; - case 1: return node.parameters; - case 2: return node.closeParenToken; - } - } - function typeArgumentListChildAt(node, index) { - switch (index) { - case 0: return node.lessThanToken; - case 1: return node.typeArguments; - case 2: return node.greaterThanToken; - } - } - function typeParameterListChildAt(node, index) { - switch (index) { - case 0: return node.lessThanToken; - case 1: return node.typeParameters; - case 2: return node.greaterThanToken; - } - } - function heritageClauseChildAt(node, index) { - switch (index) { - case 0: return node.extendsOrImplementsKeyword; - case 1: return node.typeNames; - } - } - function equalsValueClauseChildAt(node, index) { - switch (index) { - case 0: return node.equalsToken; - case 1: return node.value; - } - } - function caseSwitchClauseChildAt(node, index) { - switch (index) { - case 0: return node.caseKeyword; - case 1: return node.expression; - case 2: return node.colonToken; - case 3: return node.statements; - } - } - function defaultSwitchClauseChildAt(node, index) { - switch (index) { - case 0: return node.defaultKeyword; - case 1: return node.colonToken; - case 2: return node.statements; - } - } - function elseClauseChildAt(node, index) { - switch (index) { - case 0: return node.elseKeyword; - case 1: return node.statement; - } - } - function catchClauseChildAt(node, index) { - switch (index) { - case 0: return node.catchKeyword; - case 1: return node.openParenToken; - case 2: return node.identifier; - case 3: return node.typeAnnotation; - case 4: return node.closeParenToken; - case 5: return node.block; - } - } - function finallyClauseChildAt(node, index) { - switch (index) { - case 0: return node.finallyKeyword; - case 1: return node.block; - } - } - function templateClauseChildAt(node, index) { - switch (index) { - case 0: return node.expression; - case 1: return node.templateMiddleOrEndToken; - } - } - function typeParameterChildAt(node, index) { - switch (index) { - case 0: return node.identifier; - case 1: return node.constraint; - } - } - function constraintChildAt(node, index) { - switch (index) { - case 0: return node.extendsKeyword; - case 1: return node.typeOrExpression; - } - } - function simplePropertyAssignmentChildAt(node, index) { - switch (index) { - case 0: return node.propertyName; - case 1: return node.colonToken; - case 2: return node.expression; - } - } - function functionPropertyAssignmentChildAt(node, index) { - switch (index) { - case 0: return node.propertyName; - case 1: return node.callSignature; - case 2: return node.block; - } - } - function parameterChildAt(node, index) { - switch (index) { - case 0: return node.dotDotDotToken; - case 1: return node.modifiers; - case 2: return node.identifier; - case 3: return node.questionToken; - case 4: return node.typeAnnotation; - case 5: return node.equalsValueClause; - } - } - function enumElementChildAt(node, index) { - switch (index) { - case 0: return node.propertyName; - case 1: return node.equalsValueClause; - } - } - function typeAnnotationChildAt(node, index) { - switch (index) { - case 0: return node.colonToken; - case 1: return node.type; - } - } - function externalModuleReferenceChildAt(node, index) { - switch (index) { - case 0: return node.requireKeyword; - case 1: return node.openParenToken; - case 2: return node.stringLiteral; - case 3: return node.closeParenToken; - } - } - function moduleNameModuleReferenceChildAt(node, index) { - switch (index) { - case 0: return node.moduleName; - } - } - function childAt(element, index) { - if (TypeScript.isList(element)) { - return element[index]; - } - switch (element.kind()) { - case 122 /* SourceUnit */: return sourceUnitChildAt(element, index); - case 123 /* QualifiedName */: return qualifiedNameChildAt(element, index); - case 124 /* ObjectType */: return objectTypeChildAt(element, index); - case 125 /* FunctionType */: return functionTypeChildAt(element, index); - case 126 /* ArrayType */: return arrayTypeChildAt(element, index); - case 127 /* ConstructorType */: return constructorTypeChildAt(element, index); - case 128 /* GenericType */: return genericTypeChildAt(element, index); - case 129 /* TypeQuery */: return typeQueryChildAt(element, index); - case 130 /* TupleType */: return tupleTypeChildAt(element, index); - case 131 /* UnionType */: return unionTypeChildAt(element, index); - case 132 /* ParenthesizedType */: return parenthesizedTypeChildAt(element, index); - case 133 /* InterfaceDeclaration */: return interfaceDeclarationChildAt(element, index); - case 134 /* FunctionDeclaration */: return functionDeclarationChildAt(element, index); - case 135 /* ModuleDeclaration */: return moduleDeclarationChildAt(element, index); - case 136 /* ClassDeclaration */: return classDeclarationChildAt(element, index); - case 137 /* EnumDeclaration */: return enumDeclarationChildAt(element, index); - case 138 /* ImportDeclaration */: return importDeclarationChildAt(element, index); - case 139 /* ExportAssignment */: return exportAssignmentChildAt(element, index); - case 140 /* MemberFunctionDeclaration */: return memberFunctionDeclarationChildAt(element, index); - case 141 /* MemberVariableDeclaration */: return memberVariableDeclarationChildAt(element, index); - case 142 /* ConstructorDeclaration */: return constructorDeclarationChildAt(element, index); - case 143 /* IndexMemberDeclaration */: return indexMemberDeclarationChildAt(element, index); - case 144 /* GetAccessor */: return getAccessorChildAt(element, index); - case 145 /* SetAccessor */: return setAccessorChildAt(element, index); - case 146 /* PropertySignature */: return propertySignatureChildAt(element, index); - case 147 /* CallSignature */: return callSignatureChildAt(element, index); - case 148 /* ConstructSignature */: return constructSignatureChildAt(element, index); - case 149 /* IndexSignature */: return indexSignatureChildAt(element, index); - case 150 /* MethodSignature */: return methodSignatureChildAt(element, index); - case 151 /* Block */: return blockChildAt(element, index); - case 152 /* IfStatement */: return ifStatementChildAt(element, index); - case 153 /* VariableStatement */: return variableStatementChildAt(element, index); - case 154 /* ExpressionStatement */: return expressionStatementChildAt(element, index); - case 155 /* ReturnStatement */: return returnStatementChildAt(element, index); - case 156 /* SwitchStatement */: return switchStatementChildAt(element, index); - case 157 /* BreakStatement */: return breakStatementChildAt(element, index); - case 158 /* ContinueStatement */: return continueStatementChildAt(element, index); - case 159 /* ForStatement */: return forStatementChildAt(element, index); - case 160 /* ForInStatement */: return forInStatementChildAt(element, index); - case 161 /* EmptyStatement */: return emptyStatementChildAt(element, index); - case 162 /* ThrowStatement */: return throwStatementChildAt(element, index); - case 163 /* WhileStatement */: return whileStatementChildAt(element, index); - case 164 /* TryStatement */: return tryStatementChildAt(element, index); - case 165 /* LabeledStatement */: return labeledStatementChildAt(element, index); - case 166 /* DoStatement */: return doStatementChildAt(element, index); - case 167 /* DebuggerStatement */: return debuggerStatementChildAt(element, index); - case 168 /* WithStatement */: return withStatementChildAt(element, index); - case 169 /* PrefixUnaryExpression */: return prefixUnaryExpressionChildAt(element, index); - case 170 /* DeleteExpression */: return deleteExpressionChildAt(element, index); - case 171 /* TypeOfExpression */: return typeOfExpressionChildAt(element, index); - case 172 /* VoidExpression */: return voidExpressionChildAt(element, index); - case 173 /* ConditionalExpression */: return conditionalExpressionChildAt(element, index); - case 174 /* BinaryExpression */: return binaryExpressionChildAt(element, index); - case 175 /* PostfixUnaryExpression */: return postfixUnaryExpressionChildAt(element, index); - case 176 /* MemberAccessExpression */: return memberAccessExpressionChildAt(element, index); - case 177 /* InvocationExpression */: return invocationExpressionChildAt(element, index); - case 178 /* ArrayLiteralExpression */: return arrayLiteralExpressionChildAt(element, index); - case 179 /* ObjectLiteralExpression */: return objectLiteralExpressionChildAt(element, index); - case 180 /* ObjectCreationExpression */: return objectCreationExpressionChildAt(element, index); - case 181 /* ParenthesizedExpression */: return parenthesizedExpressionChildAt(element, index); - case 182 /* ParenthesizedArrowFunctionExpression */: return parenthesizedArrowFunctionExpressionChildAt(element, index); - case 183 /* SimpleArrowFunctionExpression */: return simpleArrowFunctionExpressionChildAt(element, index); - case 184 /* CastExpression */: return castExpressionChildAt(element, index); - case 185 /* ElementAccessExpression */: return elementAccessExpressionChildAt(element, index); - case 186 /* FunctionExpression */: return functionExpressionChildAt(element, index); - case 187 /* OmittedExpression */: return omittedExpressionChildAt(element, index); - case 188 /* TemplateExpression */: return templateExpressionChildAt(element, index); - case 189 /* TemplateAccessExpression */: return templateAccessExpressionChildAt(element, index); - case 190 /* VariableDeclaration */: return variableDeclarationChildAt(element, index); - case 191 /* VariableDeclarator */: return variableDeclaratorChildAt(element, index); - case 192 /* ArgumentList */: return argumentListChildAt(element, index); - case 193 /* ParameterList */: return parameterListChildAt(element, index); - case 194 /* TypeArgumentList */: return typeArgumentListChildAt(element, index); - case 195 /* TypeParameterList */: return typeParameterListChildAt(element, index); - case 196 /* HeritageClause */: return heritageClauseChildAt(element, index); - case 197 /* EqualsValueClause */: return equalsValueClauseChildAt(element, index); - case 198 /* CaseSwitchClause */: return caseSwitchClauseChildAt(element, index); - case 199 /* DefaultSwitchClause */: return defaultSwitchClauseChildAt(element, index); - case 200 /* ElseClause */: return elseClauseChildAt(element, index); - case 201 /* CatchClause */: return catchClauseChildAt(element, index); - case 202 /* FinallyClause */: return finallyClauseChildAt(element, index); - case 203 /* TemplateClause */: return templateClauseChildAt(element, index); - case 204 /* TypeParameter */: return typeParameterChildAt(element, index); - case 205 /* Constraint */: return constraintChildAt(element, index); - case 206 /* SimplePropertyAssignment */: return simplePropertyAssignmentChildAt(element, index); - case 207 /* FunctionPropertyAssignment */: return functionPropertyAssignmentChildAt(element, index); - case 208 /* Parameter */: return parameterChildAt(element, index); - case 209 /* EnumElement */: return enumElementChildAt(element, index); - case 210 /* TypeAnnotation */: return typeAnnotationChildAt(element, index); - case 211 /* ExternalModuleReference */: return externalModuleReferenceChildAt(element, index); - case 212 /* ModuleNameModuleReference */: return moduleNameModuleReferenceChildAt(element, index); - } - } - TypeScript.childAt = childAt; -})(TypeScript || (TypeScript = {})); -var TypeScript; -(function (TypeScript) { - function visitNodeOrToken(visitor, element) { - if (element === undefined) { - return undefined; - } - switch (element.kind()) { - case 122 /* SourceUnit */: return visitor.visitSourceUnit(element); - case 123 /* QualifiedName */: return visitor.visitQualifiedName(element); - case 124 /* ObjectType */: return visitor.visitObjectType(element); - case 125 /* FunctionType */: return visitor.visitFunctionType(element); - case 126 /* ArrayType */: return visitor.visitArrayType(element); - case 127 /* ConstructorType */: return visitor.visitConstructorType(element); - case 128 /* GenericType */: return visitor.visitGenericType(element); - case 129 /* TypeQuery */: return visitor.visitTypeQuery(element); - case 130 /* TupleType */: return visitor.visitTupleType(element); - case 131 /* UnionType */: return visitor.visitUnionType(element); - case 132 /* ParenthesizedType */: return visitor.visitParenthesizedType(element); - case 133 /* InterfaceDeclaration */: return visitor.visitInterfaceDeclaration(element); - case 134 /* FunctionDeclaration */: return visitor.visitFunctionDeclaration(element); - case 135 /* ModuleDeclaration */: return visitor.visitModuleDeclaration(element); - case 136 /* ClassDeclaration */: return visitor.visitClassDeclaration(element); - case 137 /* EnumDeclaration */: return visitor.visitEnumDeclaration(element); - case 138 /* ImportDeclaration */: return visitor.visitImportDeclaration(element); - case 139 /* ExportAssignment */: return visitor.visitExportAssignment(element); - case 140 /* MemberFunctionDeclaration */: return visitor.visitMemberFunctionDeclaration(element); - case 141 /* MemberVariableDeclaration */: return visitor.visitMemberVariableDeclaration(element); - case 142 /* ConstructorDeclaration */: return visitor.visitConstructorDeclaration(element); - case 143 /* IndexMemberDeclaration */: return visitor.visitIndexMemberDeclaration(element); - case 144 /* GetAccessor */: return visitor.visitGetAccessor(element); - case 145 /* SetAccessor */: return visitor.visitSetAccessor(element); - case 146 /* PropertySignature */: return visitor.visitPropertySignature(element); - case 147 /* CallSignature */: return visitor.visitCallSignature(element); - case 148 /* ConstructSignature */: return visitor.visitConstructSignature(element); - case 149 /* IndexSignature */: return visitor.visitIndexSignature(element); - case 150 /* MethodSignature */: return visitor.visitMethodSignature(element); - case 151 /* Block */: return visitor.visitBlock(element); - case 152 /* IfStatement */: return visitor.visitIfStatement(element); - case 153 /* VariableStatement */: return visitor.visitVariableStatement(element); - case 154 /* ExpressionStatement */: return visitor.visitExpressionStatement(element); - case 155 /* ReturnStatement */: return visitor.visitReturnStatement(element); - case 156 /* SwitchStatement */: return visitor.visitSwitchStatement(element); - case 157 /* BreakStatement */: return visitor.visitBreakStatement(element); - case 158 /* ContinueStatement */: return visitor.visitContinueStatement(element); - case 159 /* ForStatement */: return visitor.visitForStatement(element); - case 160 /* ForInStatement */: return visitor.visitForInStatement(element); - case 161 /* EmptyStatement */: return visitor.visitEmptyStatement(element); - case 162 /* ThrowStatement */: return visitor.visitThrowStatement(element); - case 163 /* WhileStatement */: return visitor.visitWhileStatement(element); - case 164 /* TryStatement */: return visitor.visitTryStatement(element); - case 165 /* LabeledStatement */: return visitor.visitLabeledStatement(element); - case 166 /* DoStatement */: return visitor.visitDoStatement(element); - case 167 /* DebuggerStatement */: return visitor.visitDebuggerStatement(element); - case 168 /* WithStatement */: return visitor.visitWithStatement(element); - case 169 /* PrefixUnaryExpression */: return visitor.visitPrefixUnaryExpression(element); - case 170 /* DeleteExpression */: return visitor.visitDeleteExpression(element); - case 171 /* TypeOfExpression */: return visitor.visitTypeOfExpression(element); - case 172 /* VoidExpression */: return visitor.visitVoidExpression(element); - case 173 /* ConditionalExpression */: return visitor.visitConditionalExpression(element); - case 174 /* BinaryExpression */: return visitor.visitBinaryExpression(element); - case 175 /* PostfixUnaryExpression */: return visitor.visitPostfixUnaryExpression(element); - case 176 /* MemberAccessExpression */: return visitor.visitMemberAccessExpression(element); - case 177 /* InvocationExpression */: return visitor.visitInvocationExpression(element); - case 178 /* ArrayLiteralExpression */: return visitor.visitArrayLiteralExpression(element); - case 179 /* ObjectLiteralExpression */: return visitor.visitObjectLiteralExpression(element); - case 180 /* ObjectCreationExpression */: return visitor.visitObjectCreationExpression(element); - case 181 /* ParenthesizedExpression */: return visitor.visitParenthesizedExpression(element); - case 182 /* ParenthesizedArrowFunctionExpression */: return visitor.visitParenthesizedArrowFunctionExpression(element); - case 183 /* SimpleArrowFunctionExpression */: return visitor.visitSimpleArrowFunctionExpression(element); - case 184 /* CastExpression */: return visitor.visitCastExpression(element); - case 185 /* ElementAccessExpression */: return visitor.visitElementAccessExpression(element); - case 186 /* FunctionExpression */: return visitor.visitFunctionExpression(element); - case 187 /* OmittedExpression */: return visitor.visitOmittedExpression(element); - case 188 /* TemplateExpression */: return visitor.visitTemplateExpression(element); - case 189 /* TemplateAccessExpression */: return visitor.visitTemplateAccessExpression(element); - case 190 /* VariableDeclaration */: return visitor.visitVariableDeclaration(element); - case 191 /* VariableDeclarator */: return visitor.visitVariableDeclarator(element); - case 192 /* ArgumentList */: return visitor.visitArgumentList(element); - case 193 /* ParameterList */: return visitor.visitParameterList(element); - case 194 /* TypeArgumentList */: return visitor.visitTypeArgumentList(element); - case 195 /* TypeParameterList */: return visitor.visitTypeParameterList(element); - case 196 /* HeritageClause */: return visitor.visitHeritageClause(element); - case 197 /* EqualsValueClause */: return visitor.visitEqualsValueClause(element); - case 198 /* CaseSwitchClause */: return visitor.visitCaseSwitchClause(element); - case 199 /* DefaultSwitchClause */: return visitor.visitDefaultSwitchClause(element); - case 200 /* ElseClause */: return visitor.visitElseClause(element); - case 201 /* CatchClause */: return visitor.visitCatchClause(element); - case 202 /* FinallyClause */: return visitor.visitFinallyClause(element); - case 203 /* TemplateClause */: return visitor.visitTemplateClause(element); - case 204 /* TypeParameter */: return visitor.visitTypeParameter(element); - case 205 /* Constraint */: return visitor.visitConstraint(element); - case 206 /* SimplePropertyAssignment */: return visitor.visitSimplePropertyAssignment(element); - case 207 /* FunctionPropertyAssignment */: return visitor.visitFunctionPropertyAssignment(element); - case 208 /* Parameter */: return visitor.visitParameter(element); - case 209 /* EnumElement */: return visitor.visitEnumElement(element); - case 210 /* TypeAnnotation */: return visitor.visitTypeAnnotation(element); - case 211 /* ExternalModuleReference */: return visitor.visitExternalModuleReference(element); - case 212 /* ModuleNameModuleReference */: return visitor.visitModuleNameModuleReference(element); - default: return visitor.visitToken(element); - } - } - TypeScript.visitNodeOrToken = visitNodeOrToken; -})(TypeScript || (TypeScript = {})); -var TypeScript; -(function (TypeScript) { - var SyntaxWalker = (function () { - function SyntaxWalker() { - } - SyntaxWalker.prototype.visitToken = function (token) { - }; - SyntaxWalker.prototype.visitOptionalToken = function (token) { - if (token === undefined) { - return; - } - this.visitToken(token); - }; - SyntaxWalker.prototype.visitList = function (list) { - for (var i = 0, n = list.length; i < n; i++) { - TypeScript.visitNodeOrToken(this, list[i]); - } - }; - SyntaxWalker.prototype.visitSourceUnit = function (node) { - this.visitList(node.moduleElements); - this.visitToken(node.endOfFileToken); - }; - SyntaxWalker.prototype.visitQualifiedName = function (node) { - TypeScript.visitNodeOrToken(this, node.left); - this.visitToken(node.dotToken); - this.visitToken(node.right); - }; - SyntaxWalker.prototype.visitObjectType = function (node) { - this.visitToken(node.openBraceToken); - this.visitList(node.typeMembers); - this.visitToken(node.closeBraceToken); - }; - SyntaxWalker.prototype.visitFunctionType = function (node) { - TypeScript.visitNodeOrToken(this, node.typeParameterList); - TypeScript.visitNodeOrToken(this, node.parameterList); - this.visitToken(node.equalsGreaterThanToken); - TypeScript.visitNodeOrToken(this, node.type); - }; - SyntaxWalker.prototype.visitArrayType = function (node) { - TypeScript.visitNodeOrToken(this, node.type); - this.visitToken(node.openBracketToken); - this.visitToken(node.closeBracketToken); - }; - SyntaxWalker.prototype.visitConstructorType = function (node) { - this.visitToken(node.newKeyword); - TypeScript.visitNodeOrToken(this, node.typeParameterList); - TypeScript.visitNodeOrToken(this, node.parameterList); - this.visitToken(node.equalsGreaterThanToken); - TypeScript.visitNodeOrToken(this, node.type); - }; - SyntaxWalker.prototype.visitGenericType = function (node) { - TypeScript.visitNodeOrToken(this, node.name); - TypeScript.visitNodeOrToken(this, node.typeArgumentList); - }; - SyntaxWalker.prototype.visitTypeQuery = function (node) { - this.visitToken(node.typeOfKeyword); - TypeScript.visitNodeOrToken(this, node.name); - }; - SyntaxWalker.prototype.visitTupleType = function (node) { - this.visitToken(node.openBracketToken); - this.visitList(node.types); - this.visitToken(node.closeBracketToken); - }; - SyntaxWalker.prototype.visitUnionType = function (node) { - TypeScript.visitNodeOrToken(this, node.left); - this.visitToken(node.barToken); - TypeScript.visitNodeOrToken(this, node.right); - }; - SyntaxWalker.prototype.visitParenthesizedType = function (node) { - this.visitToken(node.openParenToken); - TypeScript.visitNodeOrToken(this, node.type); - this.visitToken(node.closeParenToken); - }; - SyntaxWalker.prototype.visitInterfaceDeclaration = function (node) { - this.visitList(node.modifiers); - this.visitToken(node.interfaceKeyword); - this.visitToken(node.identifier); - TypeScript.visitNodeOrToken(this, node.typeParameterList); - this.visitList(node.heritageClauses); - TypeScript.visitNodeOrToken(this, node.body); - }; - SyntaxWalker.prototype.visitFunctionDeclaration = function (node) { - this.visitList(node.modifiers); - this.visitToken(node.functionKeyword); - this.visitToken(node.identifier); - TypeScript.visitNodeOrToken(this, node.callSignature); - TypeScript.visitNodeOrToken(this, node.block); - this.visitOptionalToken(node.semicolonToken); - }; - SyntaxWalker.prototype.visitModuleDeclaration = function (node) { - this.visitList(node.modifiers); - this.visitToken(node.moduleKeyword); - TypeScript.visitNodeOrToken(this, node.name); - this.visitOptionalToken(node.stringLiteral); - this.visitToken(node.openBraceToken); - this.visitList(node.moduleElements); - this.visitToken(node.closeBraceToken); - }; - SyntaxWalker.prototype.visitClassDeclaration = function (node) { - this.visitList(node.modifiers); - this.visitToken(node.classKeyword); - this.visitToken(node.identifier); - TypeScript.visitNodeOrToken(this, node.typeParameterList); - this.visitList(node.heritageClauses); - this.visitToken(node.openBraceToken); - this.visitList(node.classElements); - this.visitToken(node.closeBraceToken); - }; - SyntaxWalker.prototype.visitEnumDeclaration = function (node) { - this.visitList(node.modifiers); - this.visitToken(node.enumKeyword); - this.visitToken(node.identifier); - this.visitToken(node.openBraceToken); - this.visitList(node.enumElements); - this.visitToken(node.closeBraceToken); - }; - SyntaxWalker.prototype.visitImportDeclaration = function (node) { - this.visitList(node.modifiers); - this.visitToken(node.importKeyword); - this.visitToken(node.identifier); - this.visitToken(node.equalsToken); - TypeScript.visitNodeOrToken(this, node.moduleReference); - this.visitOptionalToken(node.semicolonToken); - }; - SyntaxWalker.prototype.visitExportAssignment = function (node) { - this.visitToken(node.exportKeyword); - this.visitToken(node.equalsToken); - this.visitToken(node.identifier); - this.visitOptionalToken(node.semicolonToken); - }; - SyntaxWalker.prototype.visitMemberFunctionDeclaration = function (node) { - this.visitList(node.modifiers); - this.visitToken(node.propertyName); - TypeScript.visitNodeOrToken(this, node.callSignature); - TypeScript.visitNodeOrToken(this, node.block); - this.visitOptionalToken(node.semicolonToken); - }; - SyntaxWalker.prototype.visitMemberVariableDeclaration = function (node) { - this.visitList(node.modifiers); - TypeScript.visitNodeOrToken(this, node.variableDeclarator); - this.visitOptionalToken(node.semicolonToken); - }; - SyntaxWalker.prototype.visitConstructorDeclaration = function (node) { - this.visitList(node.modifiers); - this.visitToken(node.constructorKeyword); - TypeScript.visitNodeOrToken(this, node.callSignature); - TypeScript.visitNodeOrToken(this, node.block); - this.visitOptionalToken(node.semicolonToken); - }; - SyntaxWalker.prototype.visitIndexMemberDeclaration = function (node) { - this.visitList(node.modifiers); - TypeScript.visitNodeOrToken(this, node.indexSignature); - this.visitOptionalToken(node.semicolonToken); - }; - SyntaxWalker.prototype.visitGetAccessor = function (node) { - this.visitList(node.modifiers); - this.visitToken(node.getKeyword); - this.visitToken(node.propertyName); - TypeScript.visitNodeOrToken(this, node.callSignature); - TypeScript.visitNodeOrToken(this, node.block); - }; - SyntaxWalker.prototype.visitSetAccessor = function (node) { - this.visitList(node.modifiers); - this.visitToken(node.setKeyword); - this.visitToken(node.propertyName); - TypeScript.visitNodeOrToken(this, node.callSignature); - TypeScript.visitNodeOrToken(this, node.block); - }; - SyntaxWalker.prototype.visitPropertySignature = function (node) { - this.visitToken(node.propertyName); - this.visitOptionalToken(node.questionToken); - TypeScript.visitNodeOrToken(this, node.typeAnnotation); - }; - SyntaxWalker.prototype.visitCallSignature = function (node) { - TypeScript.visitNodeOrToken(this, node.typeParameterList); - TypeScript.visitNodeOrToken(this, node.parameterList); - TypeScript.visitNodeOrToken(this, node.typeAnnotation); - }; - SyntaxWalker.prototype.visitConstructSignature = function (node) { - this.visitToken(node.newKeyword); - TypeScript.visitNodeOrToken(this, node.callSignature); - }; - SyntaxWalker.prototype.visitIndexSignature = function (node) { - this.visitToken(node.openBracketToken); - this.visitList(node.parameters); - this.visitToken(node.closeBracketToken); - TypeScript.visitNodeOrToken(this, node.typeAnnotation); - }; - SyntaxWalker.prototype.visitMethodSignature = function (node) { - this.visitToken(node.propertyName); - this.visitOptionalToken(node.questionToken); - TypeScript.visitNodeOrToken(this, node.callSignature); - }; - SyntaxWalker.prototype.visitBlock = function (node) { - this.visitToken(node.openBraceToken); - this.visitList(node.statements); - this.visitToken(node.closeBraceToken); - }; - SyntaxWalker.prototype.visitIfStatement = function (node) { - this.visitToken(node.ifKeyword); - this.visitToken(node.openParenToken); - TypeScript.visitNodeOrToken(this, node.condition); - this.visitToken(node.closeParenToken); - TypeScript.visitNodeOrToken(this, node.statement); - TypeScript.visitNodeOrToken(this, node.elseClause); - }; - SyntaxWalker.prototype.visitVariableStatement = function (node) { - this.visitList(node.modifiers); - TypeScript.visitNodeOrToken(this, node.variableDeclaration); - this.visitOptionalToken(node.semicolonToken); - }; - SyntaxWalker.prototype.visitExpressionStatement = function (node) { - TypeScript.visitNodeOrToken(this, node.expression); - this.visitOptionalToken(node.semicolonToken); - }; - SyntaxWalker.prototype.visitReturnStatement = function (node) { - this.visitToken(node.returnKeyword); - TypeScript.visitNodeOrToken(this, node.expression); - this.visitOptionalToken(node.semicolonToken); - }; - SyntaxWalker.prototype.visitSwitchStatement = function (node) { - this.visitToken(node.switchKeyword); - this.visitToken(node.openParenToken); - TypeScript.visitNodeOrToken(this, node.expression); - this.visitToken(node.closeParenToken); - this.visitToken(node.openBraceToken); - this.visitList(node.switchClauses); - this.visitToken(node.closeBraceToken); - }; - SyntaxWalker.prototype.visitBreakStatement = function (node) { - this.visitToken(node.breakKeyword); - this.visitOptionalToken(node.identifier); - this.visitOptionalToken(node.semicolonToken); - }; - SyntaxWalker.prototype.visitContinueStatement = function (node) { - this.visitToken(node.continueKeyword); - this.visitOptionalToken(node.identifier); - this.visitOptionalToken(node.semicolonToken); - }; - SyntaxWalker.prototype.visitForStatement = function (node) { - this.visitToken(node.forKeyword); - this.visitToken(node.openParenToken); - TypeScript.visitNodeOrToken(this, node.variableDeclaration); - TypeScript.visitNodeOrToken(this, node.initializer); - this.visitToken(node.firstSemicolonToken); - TypeScript.visitNodeOrToken(this, node.condition); - this.visitToken(node.secondSemicolonToken); - TypeScript.visitNodeOrToken(this, node.incrementor); - this.visitToken(node.closeParenToken); - TypeScript.visitNodeOrToken(this, node.statement); - }; - SyntaxWalker.prototype.visitForInStatement = function (node) { - this.visitToken(node.forKeyword); - this.visitToken(node.openParenToken); - TypeScript.visitNodeOrToken(this, node.variableDeclaration); - TypeScript.visitNodeOrToken(this, node.left); - this.visitToken(node.inKeyword); - TypeScript.visitNodeOrToken(this, node.expression); - this.visitToken(node.closeParenToken); - TypeScript.visitNodeOrToken(this, node.statement); - }; - SyntaxWalker.prototype.visitEmptyStatement = function (node) { - this.visitToken(node.semicolonToken); - }; - SyntaxWalker.prototype.visitThrowStatement = function (node) { - this.visitToken(node.throwKeyword); - TypeScript.visitNodeOrToken(this, node.expression); - this.visitOptionalToken(node.semicolonToken); - }; - SyntaxWalker.prototype.visitWhileStatement = function (node) { - this.visitToken(node.whileKeyword); - this.visitToken(node.openParenToken); - TypeScript.visitNodeOrToken(this, node.condition); - this.visitToken(node.closeParenToken); - TypeScript.visitNodeOrToken(this, node.statement); - }; - SyntaxWalker.prototype.visitTryStatement = function (node) { - this.visitToken(node.tryKeyword); - TypeScript.visitNodeOrToken(this, node.block); - TypeScript.visitNodeOrToken(this, node.catchClause); - TypeScript.visitNodeOrToken(this, node.finallyClause); - }; - SyntaxWalker.prototype.visitLabeledStatement = function (node) { - this.visitToken(node.identifier); - this.visitToken(node.colonToken); - TypeScript.visitNodeOrToken(this, node.statement); - }; - SyntaxWalker.prototype.visitDoStatement = function (node) { - this.visitToken(node.doKeyword); - TypeScript.visitNodeOrToken(this, node.statement); - this.visitToken(node.whileKeyword); - this.visitToken(node.openParenToken); - TypeScript.visitNodeOrToken(this, node.condition); - this.visitToken(node.closeParenToken); - this.visitOptionalToken(node.semicolonToken); - }; - SyntaxWalker.prototype.visitDebuggerStatement = function (node) { - this.visitToken(node.debuggerKeyword); - this.visitOptionalToken(node.semicolonToken); - }; - SyntaxWalker.prototype.visitWithStatement = function (node) { - this.visitToken(node.withKeyword); - this.visitToken(node.openParenToken); - TypeScript.visitNodeOrToken(this, node.condition); - this.visitToken(node.closeParenToken); - TypeScript.visitNodeOrToken(this, node.statement); - }; - SyntaxWalker.prototype.visitPrefixUnaryExpression = function (node) { - this.visitToken(node.operatorToken); - TypeScript.visitNodeOrToken(this, node.operand); - }; - SyntaxWalker.prototype.visitDeleteExpression = function (node) { - this.visitToken(node.deleteKeyword); - TypeScript.visitNodeOrToken(this, node.expression); - }; - SyntaxWalker.prototype.visitTypeOfExpression = function (node) { - this.visitToken(node.typeOfKeyword); - TypeScript.visitNodeOrToken(this, node.expression); - }; - SyntaxWalker.prototype.visitVoidExpression = function (node) { - this.visitToken(node.voidKeyword); - TypeScript.visitNodeOrToken(this, node.expression); - }; - SyntaxWalker.prototype.visitConditionalExpression = function (node) { - TypeScript.visitNodeOrToken(this, node.condition); - this.visitToken(node.questionToken); - TypeScript.visitNodeOrToken(this, node.whenTrue); - this.visitToken(node.colonToken); - TypeScript.visitNodeOrToken(this, node.whenFalse); - }; - SyntaxWalker.prototype.visitBinaryExpression = function (node) { - TypeScript.visitNodeOrToken(this, node.left); - this.visitToken(node.operatorToken); - TypeScript.visitNodeOrToken(this, node.right); - }; - SyntaxWalker.prototype.visitPostfixUnaryExpression = function (node) { - TypeScript.visitNodeOrToken(this, node.operand); - this.visitToken(node.operatorToken); - }; - SyntaxWalker.prototype.visitMemberAccessExpression = function (node) { - TypeScript.visitNodeOrToken(this, node.expression); - this.visitToken(node.dotToken); - this.visitToken(node.name); - }; - SyntaxWalker.prototype.visitInvocationExpression = function (node) { - TypeScript.visitNodeOrToken(this, node.expression); - TypeScript.visitNodeOrToken(this, node.argumentList); - }; - SyntaxWalker.prototype.visitArrayLiteralExpression = function (node) { - this.visitToken(node.openBracketToken); - this.visitList(node.expressions); - this.visitToken(node.closeBracketToken); - }; - SyntaxWalker.prototype.visitObjectLiteralExpression = function (node) { - this.visitToken(node.openBraceToken); - this.visitList(node.propertyAssignments); - this.visitToken(node.closeBraceToken); - }; - SyntaxWalker.prototype.visitObjectCreationExpression = function (node) { - this.visitToken(node.newKeyword); - TypeScript.visitNodeOrToken(this, node.expression); - TypeScript.visitNodeOrToken(this, node.argumentList); - }; - SyntaxWalker.prototype.visitParenthesizedExpression = function (node) { - this.visitToken(node.openParenToken); - TypeScript.visitNodeOrToken(this, node.expression); - this.visitToken(node.closeParenToken); - }; - SyntaxWalker.prototype.visitParenthesizedArrowFunctionExpression = function (node) { - TypeScript.visitNodeOrToken(this, node.callSignature); - this.visitToken(node.equalsGreaterThanToken); - TypeScript.visitNodeOrToken(this, node.block); - TypeScript.visitNodeOrToken(this, node.expression); - }; - SyntaxWalker.prototype.visitSimpleArrowFunctionExpression = function (node) { - TypeScript.visitNodeOrToken(this, node.parameter); - this.visitToken(node.equalsGreaterThanToken); - TypeScript.visitNodeOrToken(this, node.block); - TypeScript.visitNodeOrToken(this, node.expression); - }; - SyntaxWalker.prototype.visitCastExpression = function (node) { - this.visitToken(node.lessThanToken); - TypeScript.visitNodeOrToken(this, node.type); - this.visitToken(node.greaterThanToken); - TypeScript.visitNodeOrToken(this, node.expression); - }; - SyntaxWalker.prototype.visitElementAccessExpression = function (node) { - TypeScript.visitNodeOrToken(this, node.expression); - this.visitToken(node.openBracketToken); - TypeScript.visitNodeOrToken(this, node.argumentExpression); - this.visitToken(node.closeBracketToken); - }; - SyntaxWalker.prototype.visitFunctionExpression = function (node) { - this.visitToken(node.functionKeyword); - this.visitOptionalToken(node.identifier); - TypeScript.visitNodeOrToken(this, node.callSignature); - TypeScript.visitNodeOrToken(this, node.block); - }; - SyntaxWalker.prototype.visitOmittedExpression = function (node) { - }; - SyntaxWalker.prototype.visitTemplateExpression = function (node) { - this.visitToken(node.templateStartToken); - this.visitList(node.templateClauses); - }; - SyntaxWalker.prototype.visitTemplateAccessExpression = function (node) { - TypeScript.visitNodeOrToken(this, node.expression); - TypeScript.visitNodeOrToken(this, node.templateExpression); - }; - SyntaxWalker.prototype.visitVariableDeclaration = function (node) { - this.visitToken(node.varKeyword); - this.visitList(node.variableDeclarators); - }; - SyntaxWalker.prototype.visitVariableDeclarator = function (node) { - this.visitToken(node.propertyName); - TypeScript.visitNodeOrToken(this, node.typeAnnotation); - TypeScript.visitNodeOrToken(this, node.equalsValueClause); - }; - SyntaxWalker.prototype.visitArgumentList = function (node) { - TypeScript.visitNodeOrToken(this, node.typeArgumentList); - this.visitToken(node.openParenToken); - this.visitList(node.arguments); - this.visitToken(node.closeParenToken); - }; - SyntaxWalker.prototype.visitParameterList = function (node) { - this.visitToken(node.openParenToken); - this.visitList(node.parameters); - this.visitToken(node.closeParenToken); - }; - SyntaxWalker.prototype.visitTypeArgumentList = function (node) { - this.visitToken(node.lessThanToken); - this.visitList(node.typeArguments); - this.visitToken(node.greaterThanToken); - }; - SyntaxWalker.prototype.visitTypeParameterList = function (node) { - this.visitToken(node.lessThanToken); - this.visitList(node.typeParameters); - this.visitToken(node.greaterThanToken); - }; - SyntaxWalker.prototype.visitHeritageClause = function (node) { - this.visitToken(node.extendsOrImplementsKeyword); - this.visitList(node.typeNames); - }; - SyntaxWalker.prototype.visitEqualsValueClause = function (node) { - this.visitToken(node.equalsToken); - TypeScript.visitNodeOrToken(this, node.value); - }; - SyntaxWalker.prototype.visitCaseSwitchClause = function (node) { - this.visitToken(node.caseKeyword); - TypeScript.visitNodeOrToken(this, node.expression); - this.visitToken(node.colonToken); - this.visitList(node.statements); - }; - SyntaxWalker.prototype.visitDefaultSwitchClause = function (node) { - this.visitToken(node.defaultKeyword); - this.visitToken(node.colonToken); - this.visitList(node.statements); - }; - SyntaxWalker.prototype.visitElseClause = function (node) { - this.visitToken(node.elseKeyword); - TypeScript.visitNodeOrToken(this, node.statement); - }; - SyntaxWalker.prototype.visitCatchClause = function (node) { - this.visitToken(node.catchKeyword); - this.visitToken(node.openParenToken); - this.visitToken(node.identifier); - TypeScript.visitNodeOrToken(this, node.typeAnnotation); - this.visitToken(node.closeParenToken); - TypeScript.visitNodeOrToken(this, node.block); - }; - SyntaxWalker.prototype.visitFinallyClause = function (node) { - this.visitToken(node.finallyKeyword); - TypeScript.visitNodeOrToken(this, node.block); - }; - SyntaxWalker.prototype.visitTemplateClause = function (node) { - TypeScript.visitNodeOrToken(this, node.expression); - this.visitToken(node.templateMiddleOrEndToken); - }; - SyntaxWalker.prototype.visitTypeParameter = function (node) { - this.visitToken(node.identifier); - TypeScript.visitNodeOrToken(this, node.constraint); - }; - SyntaxWalker.prototype.visitConstraint = function (node) { - this.visitToken(node.extendsKeyword); - TypeScript.visitNodeOrToken(this, node.typeOrExpression); - }; - SyntaxWalker.prototype.visitSimplePropertyAssignment = function (node) { - this.visitToken(node.propertyName); - this.visitToken(node.colonToken); - TypeScript.visitNodeOrToken(this, node.expression); - }; - SyntaxWalker.prototype.visitFunctionPropertyAssignment = function (node) { - this.visitToken(node.propertyName); - TypeScript.visitNodeOrToken(this, node.callSignature); - TypeScript.visitNodeOrToken(this, node.block); - }; - SyntaxWalker.prototype.visitParameter = function (node) { - this.visitOptionalToken(node.dotDotDotToken); - this.visitList(node.modifiers); - this.visitToken(node.identifier); - this.visitOptionalToken(node.questionToken); - TypeScript.visitNodeOrToken(this, node.typeAnnotation); - TypeScript.visitNodeOrToken(this, node.equalsValueClause); - }; - SyntaxWalker.prototype.visitEnumElement = function (node) { - this.visitToken(node.propertyName); - TypeScript.visitNodeOrToken(this, node.equalsValueClause); - }; - SyntaxWalker.prototype.visitTypeAnnotation = function (node) { - this.visitToken(node.colonToken); - TypeScript.visitNodeOrToken(this, node.type); - }; - SyntaxWalker.prototype.visitExternalModuleReference = function (node) { - this.visitToken(node.requireKeyword); - this.visitToken(node.openParenToken); - this.visitToken(node.stringLiteral); - this.visitToken(node.closeParenToken); - }; - SyntaxWalker.prototype.visitModuleNameModuleReference = function (node) { - TypeScript.visitNodeOrToken(this, node.moduleName); - }; - return SyntaxWalker; - })(); - TypeScript.SyntaxWalker = SyntaxWalker; -})(TypeScript || (TypeScript = {})); -var TypeScript; -(function (TypeScript) { - var Parser; - (function (Parser) { - var arrayPool = []; - var arrayPoolCount = 0; - function getArray() { - if (arrayPoolCount === 0) { - return []; - } - arrayPoolCount--; - var result = arrayPool[arrayPoolCount]; - arrayPool[arrayPoolCount] = undefined; - return result; - } - function returnArray(array) { - array.length = 0; - arrayPool[arrayPoolCount] = array; - arrayPoolCount++; - } - function createParseSyntaxTree() { - var fileName; - var source; - var languageVersion; - var listParsingState = 0; - var isInStrictMode = false; - var diagnostics = []; - var parseNodeData = 0; - function parseSyntaxTree(_source, isDeclaration) { - fileName = _source.fileName; - source = _source; - languageVersion = source.languageVersion; - var result = parseSyntaxTreeWorker(isDeclaration); - diagnostics = []; - parseNodeData = 0 /* None */; - fileName = undefined; - source.release(); - source = undefined; - _source = undefined; - return result; - } - function parseSyntaxTreeWorker(isDeclaration) { - var sourceUnit = parseSourceUnit(); - var allDiagnostics = source.tokenDiagnostics().concat(diagnostics); - allDiagnostics.sort(function (a, b) { return a.start() - b.start(); }); - return new TypeScript.SyntaxTree(sourceUnit, isDeclaration, allDiagnostics, fileName, source.text, languageVersion); - } - function getRewindPoint() { - var rewindPoint = source.getRewindPoint(); - rewindPoint.diagnosticsCount = diagnostics.length; - rewindPoint.isInStrictMode = isInStrictMode; - rewindPoint.listParsingState = listParsingState; - return rewindPoint; - } - function rewind(rewindPoint) { - source.rewind(rewindPoint); - diagnostics.length = rewindPoint.diagnosticsCount; - } - function releaseRewindPoint(rewindPoint) { - source.releaseRewindPoint(rewindPoint); - } - function currentNode() { - var node = source.currentNode(); - if (!node || TypeScript.parsedInStrictMode(node) !== isInStrictMode) { - return undefined; - } - return node; - } - function currentToken() { - return source.currentToken(); - } - function currentContextualToken() { - return source.currentContextualToken(); - } - function peekToken(n) { - return source.peekToken(n); - } - function consumeToken(token) { - source.consumeToken(token); - return token; - } - function consumeNode(node) { - source.consumeNode(node); - } - function eatToken(kind) { - var token = currentToken(); - if (token.kind() === kind) { - return consumeToken(token); - } - return createMissingToken(kind, token); - } - function tryEatToken(kind) { - var _currentToken = currentToken(); - if (_currentToken.kind() === kind) { - return consumeToken(_currentToken); - } - return undefined; - } - function isIdentifier(token) { - var tokenKind = token.kind(); - if (tokenKind === 9 /* IdentifierName */) { - return true; - } - if (tokenKind >= TypeScript.SyntaxKind.FirstFutureReservedStrictKeyword) { - if (tokenKind <= TypeScript.SyntaxKind.LastFutureReservedStrictKeyword) { - return !isInStrictMode; - } - return tokenKind <= TypeScript.SyntaxKind.LastTypeScriptKeyword; - } - return false; - } - function eatIdentifierNameToken() { - var token = currentToken(); - var tokenKind = token.kind(); - if (tokenKind === 9 /* IdentifierName */) { - return consumeToken(token); - } - if (TypeScript.SyntaxFacts.isAnyKeyword(tokenKind)) { - return TypeScript.Syntax.convertKeywordToIdentifier(consumeToken(token)); - } - return createMissingToken(9 /* IdentifierName */, token); - } - function eatOptionalIdentifierToken() { - return isIdentifier(currentToken()) ? eatIdentifierToken() : undefined; - } - function eatIdentifierToken(diagnosticCode) { - var token = currentToken(); - if (isIdentifier(token)) { - consumeToken(token); - if (token.kind() === 9 /* IdentifierName */) { - return token; - } - return TypeScript.Syntax.convertKeywordToIdentifier(token); - } - return createMissingToken(9 /* IdentifierName */, token, diagnosticCode); - } - function previousTokenHasTrailingNewLine(token) { - var tokenFullStart = token.fullStart(); - if (tokenFullStart === 0) { - return false; - } - var lineNumber = source.text.lineMap().getLineNumberFromPosition(tokenFullStart); - var lineStart = source.text.lineMap().getLineStartPosition(lineNumber); - return lineStart == tokenFullStart; - } - function canEatAutomaticSemicolon(allowWithoutNewLine) { - var token = currentToken(); - var tokenKind = token.kind(); - if (tokenKind === 8 /* EndOfFileToken */) { - return true; - } - if (tokenKind === 73 /* CloseBraceToken */) { - return true; - } - if (allowWithoutNewLine) { - return true; - } - if (previousTokenHasTrailingNewLine(token)) { - return true; - } - return false; - } - function canEatExplicitOrAutomaticSemicolon(allowWithoutNewline) { - var token = currentToken(); - if (token.kind() === 80 /* SemicolonToken */) { - return true; - } - return canEatAutomaticSemicolon(allowWithoutNewline); - } - function eatExplicitOrAutomaticSemicolon(allowWithoutNewline) { - var token = currentToken(); - if (token.kind() === 80 /* SemicolonToken */) { - return consumeToken(token); - } - if (canEatAutomaticSemicolon(allowWithoutNewline)) { - return undefined; - } - return eatToken(80 /* SemicolonToken */); - } - function createMissingToken(expectedKind, actual, diagnosticCode) { - var diagnostic = getExpectedTokenDiagnostic(expectedKind, actual, diagnosticCode); - addDiagnostic(diagnostic); - return TypeScript.Syntax.emptyToken(expectedKind); - } - function getExpectedTokenDiagnostic(expectedKind, actual, diagnosticCode) { - var token = currentToken(); - var args = undefined; - if (!diagnosticCode) { - if (TypeScript.SyntaxFacts.isAnyKeyword(expectedKind) || TypeScript.SyntaxFacts.isAnyPunctuation(expectedKind)) { - diagnosticCode = TypeScript.DiagnosticCode._0_expected; - args = [TypeScript.SyntaxFacts.getText(expectedKind)]; - } - else { - if (actual && TypeScript.SyntaxFacts.isAnyKeyword(actual.kind())) { - diagnosticCode = TypeScript.DiagnosticCode.Identifier_expected_0_is_a_keyword; - args = [TypeScript.SyntaxFacts.getText(actual.kind())]; - } - else { - diagnosticCode = TypeScript.DiagnosticCode.Identifier_expected; - } - } - } - return new TypeScript.Diagnostic(fileName, source.text.lineMap(), TypeScript.start(token, source.text), TypeScript.width(token), diagnosticCode, args); - } - function getBinaryExpressionPrecedence(tokenKind) { - switch (tokenKind) { - case 106 /* BarBarToken */: return 2 /* LogicalOrExpressionPrecedence */; - case 105 /* AmpersandAmpersandToken */: return 3 /* LogicalAndExpressionPrecedence */; - case 101 /* BarToken */: return 4 /* BitwiseOrExpressionPrecedence */; - case 102 /* CaretToken */: return 5 /* BitwiseExclusiveOrExpressionPrecedence */; - case 100 /* AmpersandToken */: return 6 /* BitwiseAndExpressionPrecedence */; - case 86 /* EqualsEqualsToken */: - case 88 /* ExclamationEqualsToken */: - case 89 /* EqualsEqualsEqualsToken */: - case 90 /* ExclamationEqualsEqualsToken */: - return 7 /* EqualityExpressionPrecedence */; - case 82 /* LessThanToken */: - case 83 /* GreaterThanToken */: - case 84 /* LessThanEqualsToken */: - case 85 /* GreaterThanEqualsToken */: - case 32 /* InstanceOfKeyword */: - case 31 /* InKeyword */: - return 8 /* RelationalExpressionPrecedence */; - case 97 /* LessThanLessThanToken */: - case 98 /* GreaterThanGreaterThanToken */: - case 99 /* GreaterThanGreaterThanGreaterThanToken */: - return 9 /* ShiftExpressionPrecdence */; - case 91 /* PlusToken */: - case 92 /* MinusToken */: - return 10 /* AdditiveExpressionPrecedence */; - case 93 /* AsteriskToken */: - case 120 /* SlashToken */: - case 94 /* PercentToken */: - return 11 /* MultiplicativeExpressionPrecedence */; - } - throw TypeScript.Errors.invalidOperation(); - } - function addSkippedTokenAfterNodeOrToken(nodeOrToken, skippedToken) { - if (TypeScript.isToken(nodeOrToken)) { - return addSkippedTokenAfterToken(nodeOrToken, skippedToken); - } - else if (TypeScript.isNode(nodeOrToken)) { - return addSkippedTokenAfterNode(nodeOrToken, skippedToken); - } - else { - throw TypeScript.Errors.invalidOperation(); - } - } - function replaceTokenInParent(node, oldToken, newToken) { - replaceTokenInParentWorker(oldToken, newToken); - var parent = oldToken.parent; - newToken.parent = parent; - while (true) { - TypeScript.Debug.assert(TypeScript.isNode(parent) || TypeScript.isList(parent)); - var dataElement = parent; - if (dataElement.__data) { - dataElement.__data &= 4 /* NodeParsedInStrictModeMask */; - } - dataElement.__cachedTokens = undefined; - if (parent === node) { - break; - } - parent = parent.parent; - } - } - function replaceTokenInParentWorker(oldToken, newToken) { - var parent = oldToken.parent; - if (TypeScript.isNode(parent)) { - var node = parent; - for (var key in node) { - if (node[key] === oldToken) { - node[key] = newToken; - return; - } - } - } - else if (TypeScript.isList(parent)) { - var list1 = parent; - for (var i = 0, n = list1.length; i < n; i++) { - if (list1[i] === oldToken) { - list1[i] = newToken; - return; - } - } - } - throw TypeScript.Errors.invalidOperation(); - } - function addSkippedTokenAfterNode(node, skippedToken) { - var oldToken = TypeScript.lastToken(node); - var newToken = addSkippedTokenAfterToken(oldToken, skippedToken); - replaceTokenInParent(node, oldToken, newToken); - return node; - } - function addSkippedTokensBeforeNode(node, skippedTokens) { - if (skippedTokens.length > 0) { - var oldToken = TypeScript.firstToken(node); - var newToken = addSkippedTokensBeforeToken(oldToken, skippedTokens); - replaceTokenInParent(node, oldToken, newToken); - } - return node; - } - function addSkippedTokensBeforeToken(token, skippedTokens) { - var leadingTrivia = []; - for (var i = 0, n = skippedTokens.length; i < n; i++) { - var skippedToken = skippedTokens[i]; - addSkippedTokenToTriviaArray(leadingTrivia, skippedToken); - } - addTriviaTo(token.leadingTrivia(source.text), leadingTrivia); - var updatedToken = TypeScript.Syntax.withLeadingTrivia(token, TypeScript.Syntax.triviaList(leadingTrivia), source.text); - updatedToken.setFullStart(skippedTokens[0].fullStart()); - returnArray(skippedTokens); - return updatedToken; - } - function addSkippedTokensAfterToken(token, skippedTokens) { - if (skippedTokens.length === 0) { - returnArray(skippedTokens); - return token; - } - var trailingTrivia = token.trailingTrivia(source.text).toArray(); - for (var i = 0, n = skippedTokens.length; i < n; i++) { - addSkippedTokenToTriviaArray(trailingTrivia, skippedTokens[i]); - } - returnArray(skippedTokens); - return TypeScript.Syntax.withTrailingTrivia(token, TypeScript.Syntax.triviaList(trailingTrivia), source.text); - } - function addSkippedTokenAfterToken(token, skippedToken) { - var trailingTrivia = token.trailingTrivia(source.text).toArray(); - addSkippedTokenToTriviaArray(trailingTrivia, skippedToken); - return TypeScript.Syntax.withTrailingTrivia(token, TypeScript.Syntax.triviaList(trailingTrivia), source.text); - } - function addSkippedTokenToTriviaArray(array, skippedToken) { - addTriviaTo(skippedToken.leadingTrivia(source.text), array); - var trimmedToken = TypeScript.Syntax.withTrailingTrivia(TypeScript.Syntax.withLeadingTrivia(skippedToken, TypeScript.Syntax.emptyTriviaList, source.text), TypeScript.Syntax.emptyTriviaList, source.text); - trimmedToken.setFullStart(TypeScript.start(skippedToken, source.text)); - array.push(TypeScript.Syntax.skippedTokenTrivia(trimmedToken, source.text)); - addTriviaTo(skippedToken.trailingTrivia(source.text), array); - } - function addTriviaTo(list, array) { - for (var i = 0, n = list.count(); i < n; i++) { - array.push(list.syntaxTriviaAt(i)); - } - } - function setStrictMode(_isInStrictMode) { - isInStrictMode = _isInStrictMode; - parseNodeData = _isInStrictMode ? 4 /* NodeParsedInStrictModeMask */ : 0; - } - function parseSourceUnit() { - var savedIsInStrictMode = isInStrictMode; - var skippedTokens = getArray(); - var moduleElements = parseSyntaxList(0 /* SourceUnit_ModuleElements */, skippedTokens, updateStrictModeState); - setStrictMode(savedIsInStrictMode); - var sourceUnit = new TypeScript.SourceUnitSyntax(parseNodeData, moduleElements, currentToken()); - sourceUnit = addSkippedTokensBeforeNode(sourceUnit, skippedTokens); - if (TypeScript.Debug.shouldAssert(2 /* Aggressive */)) { - TypeScript.Debug.assert(TypeScript.fullWidth(sourceUnit) === source.text.length()); - if (TypeScript.Debug.shouldAssert(3 /* VeryAggressive */)) { - TypeScript.Debug.assert(TypeScript.fullText(sourceUnit) === source.text.substr(0, source.text.length())); - } - } - return sourceUnit; - } - function updateStrictModeState(items) { - if (!isInStrictMode) { - for (var i = 0; i < items.length; i++) { - var item = items[i]; - if (!TypeScript.SyntaxFacts.isDirectivePrologueElement(item)) { - return; - } - } - setStrictMode(TypeScript.SyntaxFacts.isUseStrictDirective(items[items.length - 1])); - } - } - function isModuleElement(inErrorRecovery) { - if (TypeScript.SyntaxUtilities.isModuleElement(currentNode())) { - return true; - } - var _modifierCount = modifierCount(); - return isInterfaceEnumClassModuleImportOrExport(_modifierCount) || isStatement(_modifierCount, inErrorRecovery); - } - function tryParseModuleElement(inErrorRecovery) { - var node = currentNode(); - if (TypeScript.SyntaxUtilities.isModuleElement(node)) { - consumeNode(node); - return node; - } - var _currentToken = currentToken(); - var _modifierCount = modifierCount(); - if (_modifierCount) { - switch (peekToken(_modifierCount).kind()) { - case 51 /* ImportKeyword */: return parseImportDeclaration(); - case 67 /* ModuleKeyword */: return parseModuleDeclaration(); - case 54 /* InterfaceKeyword */: return parseInterfaceDeclaration(); - case 46 /* ClassKeyword */: return parseClassDeclaration(); - case 48 /* EnumKeyword */: return parseEnumDeclaration(); - } - } - var nextToken = peekToken(1); - var currentTokenKind = _currentToken.kind(); - switch (currentTokenKind) { - case 67 /* ModuleKeyword */: - if (isIdentifier(nextToken) || nextToken.kind() === 12 /* StringLiteral */) { - return parseModuleDeclaration(); - } - break; - case 51 /* ImportKeyword */: - if (isIdentifier(nextToken)) { - return parseImportDeclaration(); - } - break; - case 46 /* ClassKeyword */: - if (isIdentifier(nextToken)) { - return parseClassDeclaration(); - } - break; - case 48 /* EnumKeyword */: - if (isIdentifier(nextToken)) { - return parseEnumDeclaration(); - } - break; - case 54 /* InterfaceKeyword */: - if (isIdentifier(nextToken)) { - return parseInterfaceDeclaration(); - } - break; - case 49 /* ExportKeyword */: - if (nextToken.kind() === 109 /* EqualsToken */) { - return parseExportAssignment(); - } - break; - } - return tryParseStatementWorker(_currentToken, currentTokenKind, _modifierCount, inErrorRecovery); - } - function parseImportDeclaration() { - return new TypeScript.ImportDeclarationSyntax(parseNodeData, parseModifiers(), eatToken(51 /* ImportKeyword */), eatIdentifierToken(), eatToken(109 /* EqualsToken */), parseModuleReference(), eatExplicitOrAutomaticSemicolon(false)); - } - function parseExportAssignment() { - return new TypeScript.ExportAssignmentSyntax(parseNodeData, eatToken(49 /* ExportKeyword */), eatToken(109 /* EqualsToken */), eatIdentifierToken(), eatExplicitOrAutomaticSemicolon(false)); - } - function parseModuleReference() { - return isExternalModuleReference() ? parseExternalModuleReference() : parseModuleNameModuleReference(); - } - function isExternalModuleReference() { - return currentToken().kind() === 68 /* RequireKeyword */ && peekToken(1).kind() === 74 /* OpenParenToken */; - } - function parseExternalModuleReference() { - return new TypeScript.ExternalModuleReferenceSyntax(parseNodeData, eatToken(68 /* RequireKeyword */), eatToken(74 /* OpenParenToken */), eatToken(12 /* StringLiteral */), eatToken(75 /* CloseParenToken */)); - } - function parseModuleNameModuleReference() { - return new TypeScript.ModuleNameModuleReferenceSyntax(parseNodeData, parseName(false)); - } - function tryParseTypeArgumentList(inExpression) { - var _currentToken = currentToken(); - if (_currentToken.kind() !== 82 /* LessThanToken */) { - return undefined; - } - if (!inExpression) { - var lessThanToken = consumeToken(_currentToken); - var skippedTokens = getArray(); - var typeArguments = parseSeparatedSyntaxList(19 /* TypeArgumentList_Types */, skippedTokens); - lessThanToken = addSkippedTokensAfterToken(lessThanToken, skippedTokens); - return new TypeScript.TypeArgumentListSyntax(parseNodeData, lessThanToken, typeArguments, eatToken(83 /* GreaterThanToken */)); - } - var rewindPoint = getRewindPoint(); - var lessThanToken = consumeToken(_currentToken); - var skippedTokens = getArray(); - var typeArguments = parseSeparatedSyntaxList(19 /* TypeArgumentList_Types */, skippedTokens); - var lessThanToken = addSkippedTokensAfterToken(lessThanToken, skippedTokens); - var greaterThanToken = eatToken(83 /* GreaterThanToken */); - if (greaterThanToken.fullWidth() === 0 || !canFollowTypeArgumentListInExpression(currentToken().kind())) { - rewind(rewindPoint); - releaseRewindPoint(rewindPoint); - return undefined; - } - else { - releaseRewindPoint(rewindPoint); - return new TypeScript.TypeArgumentListSyntax(parseNodeData, lessThanToken, typeArguments, greaterThanToken); - } - } - function canFollowTypeArgumentListInExpression(kind) { - switch (kind) { - case 74 /* OpenParenToken */: - case 78 /* DotToken */: - case 75 /* CloseParenToken */: - case 77 /* CloseBracketToken */: - case 108 /* ColonToken */: - case 80 /* SemicolonToken */: - case 81 /* CommaToken */: - case 107 /* QuestionToken */: - case 86 /* EqualsEqualsToken */: - case 89 /* EqualsEqualsEqualsToken */: - case 88 /* ExclamationEqualsToken */: - case 90 /* ExclamationEqualsEqualsToken */: - case 105 /* AmpersandAmpersandToken */: - case 106 /* BarBarToken */: - case 102 /* CaretToken */: - case 100 /* AmpersandToken */: - case 101 /* BarToken */: - case 73 /* CloseBraceToken */: - case 8 /* EndOfFileToken */: - return true; - default: - return false; - } - } - function parseName(allowIdentifierName) { - return tryParseName(allowIdentifierName) || eatIdentifierToken(); - } - function eatRightSideOfName(allowIdentifierNames) { - var _currentToken = currentToken(); - if (TypeScript.SyntaxFacts.isAnyKeyword(_currentToken.kind()) && previousTokenHasTrailingNewLine(_currentToken)) { - var token1 = peekToken(1); - if (!TypeScript.existsNewLineBetweenTokens(_currentToken, token1, source.text) && TypeScript.SyntaxFacts.isIdentifierNameOrAnyKeyword(token1)) { - return createMissingToken(9 /* IdentifierName */, _currentToken); - } - } - return allowIdentifierNames ? eatIdentifierNameToken() : eatIdentifierToken(); - } - function tryParseName(allowIdentifierNames) { - var token0 = currentToken(); - var shouldContinue = isIdentifier(token0); - if (!shouldContinue) { - return undefined; - } - var current = eatIdentifierToken(); - while (shouldContinue && currentToken().kind() === 78 /* DotToken */) { - var dotToken = consumeToken(currentToken()); - var identifierName = eatRightSideOfName(allowIdentifierNames); - current = new TypeScript.QualifiedNameSyntax(parseNodeData, current, dotToken, identifierName); - shouldContinue = identifierName.fullWidth() > 0; - } - return current; - } - function parseEnumDeclaration() { - var modifiers = parseModifiers(); - var enumKeyword = eatToken(48 /* EnumKeyword */); - var identifier = eatIdentifierToken(); - var openBraceToken = eatToken(72 /* OpenBraceToken */); - var enumElements; - if (openBraceToken.fullWidth() > 0) { - var skippedTokens = getArray(); - enumElements = parseSeparatedSyntaxList(8 /* EnumDeclaration_EnumElements */, skippedTokens); - openBraceToken = addSkippedTokensAfterToken(openBraceToken, skippedTokens); - } - return new TypeScript.EnumDeclarationSyntax(parseNodeData, modifiers, enumKeyword, identifier, openBraceToken, enumElements || [], eatToken(73 /* CloseBraceToken */)); - } - function isEnumElement(inErrorRecovery) { - var node = currentNode(); - if (node && node.kind() === 209 /* EnumElement */) { - return true; - } - return isPropertyName(currentToken(), inErrorRecovery); - } - function tryParseEnumElementEqualsValueClause() { - return isEqualsValueClause(false) ? parseEqualsValueClause(true) : undefined; - } - function tryParseEnumElement(inErrorRecovery) { - var node = currentNode(); - if (node && node.kind() === 209 /* EnumElement */) { - consumeNode(node); - return node; - } - if (!isPropertyName(currentToken(), inErrorRecovery)) { - return undefined; - } - return new TypeScript.EnumElementSyntax(parseNodeData, eatPropertyName(), tryParseEnumElementEqualsValueClause()); - } - function isModifierKind(kind) { - switch (kind) { - case 49 /* ExportKeyword */: - case 59 /* PublicKeyword */: - case 57 /* PrivateKeyword */: - case 58 /* ProtectedKeyword */: - case 60 /* StaticKeyword */: - case 65 /* DeclareKeyword */: - return true; - } - return false; - } - function isModifier(token, index) { - if (isModifierKind(token.kind())) { - var nextToken = peekToken(index + 1); - var nextTokenKind = nextToken.kind(); - switch (nextTokenKind) { - case 9 /* IdentifierName */: - case 76 /* OpenBracketToken */: - case 11 /* NumericLiteral */: - case 12 /* StringLiteral */: - return true; - default: - return TypeScript.SyntaxFacts.isAnyKeyword(nextTokenKind); - } - } - return false; - } - function modifierCount() { - var modifierCount = 0; - while (isModifier(peekToken(modifierCount), modifierCount)) { - modifierCount++; - } - return modifierCount; - } - function parseModifiers() { - var tokens = getArray(); - while (true) { - var token = currentToken(); - if (isModifier(token, 0)) { - tokens.push(consumeToken(token)); - continue; - } - break; - } - return TypeScript.Syntax.list(tokens); - } - function parseHeritageClauses() { - var heritageClauses; - if (isHeritageClause()) { - heritageClauses = parseSyntaxList(10 /* ClassOrInterfaceDeclaration_HeritageClauses */, undefined); - } - return heritageClauses || []; - } - function tryParseHeritageClauseTypeName() { - return isHeritageClauseTypeName() ? tryParseNameOrGenericType() : undefined; - } - function parseClassDeclaration() { - var modifiers = parseModifiers(); - var classKeyword = eatToken(46 /* ClassKeyword */); - var identifier = eatIdentifierToken(); - var typeParameterList = tryParseTypeParameterList(false); - var heritageClauses = parseHeritageClauses(); - var openBraceToken = eatToken(72 /* OpenBraceToken */); - var classElements; - if (openBraceToken.fullWidth() > 0) { - var skippedTokens = getArray(); - classElements = parseSyntaxList(1 /* ClassDeclaration_ClassElements */, skippedTokens); - openBraceToken = addSkippedTokensAfterToken(openBraceToken, skippedTokens); - } - ; - return new TypeScript.ClassDeclarationSyntax(parseNodeData, modifiers, classKeyword, identifier, typeParameterList, heritageClauses, openBraceToken, classElements || [], eatToken(73 /* CloseBraceToken */)); - } - function isAccessor(modifierCount, inErrorRecovery) { - var tokenKind = peekToken(modifierCount).kind(); - if (tokenKind !== 66 /* GetKeyword */ && tokenKind !== 70 /* SetKeyword */) { - return false; - } - return isPropertyName(peekToken(modifierCount + 1), inErrorRecovery); - } - function parseAccessor(checkForStrictMode) { - var modifiers = parseModifiers(); - var _currenToken = currentToken(); - var tokenKind = _currenToken.kind(); - if (tokenKind === 66 /* GetKeyword */) { - return parseGetMemberAccessorDeclaration(modifiers, _currenToken, checkForStrictMode); - } - else if (tokenKind === 70 /* SetKeyword */) { - return parseSetMemberAccessorDeclaration(modifiers, _currenToken, checkForStrictMode); - } - else { - throw TypeScript.Errors.invalidOperation(); - } - } - function parseGetMemberAccessorDeclaration(modifiers, getKeyword, checkForStrictMode) { - return new TypeScript.GetAccessorSyntax(parseNodeData, modifiers, consumeToken(getKeyword), eatPropertyName(), parseCallSignature(false), parseBlock(false, checkForStrictMode)); - } - function parseSetMemberAccessorDeclaration(modifiers, setKeyword, checkForStrictMode) { - return new TypeScript.SetAccessorSyntax(parseNodeData, modifiers, consumeToken(setKeyword), eatPropertyName(), parseCallSignature(false), parseBlock(false, checkForStrictMode)); - } - function isClassElement(inErrorRecovery) { - if (TypeScript.SyntaxUtilities.isClassElement(currentNode())) { - return true; - } - var _modifierCount = modifierCount(); - return isConstructorDeclaration(_modifierCount) || isMemberFunctionDeclaration(_modifierCount, inErrorRecovery) || isAccessor(_modifierCount, inErrorRecovery) || isMemberVariableDeclaration(_modifierCount, inErrorRecovery) || isIndexMemberDeclaration(_modifierCount); - } - function tryParseClassElement(inErrorRecovery) { - var node = currentNode(); - if (TypeScript.SyntaxUtilities.isClassElement(node)) { - consumeNode(node); - return node; - } - var _modifierCount = modifierCount(); - if (isConstructorDeclaration(_modifierCount)) { - return parseConstructorDeclaration(); - } - else if (isMemberFunctionDeclaration(_modifierCount, inErrorRecovery)) { - return parseMemberFunctionDeclaration(); - } - else if (isAccessor(_modifierCount, inErrorRecovery)) { - return parseAccessor(false); - } - else if (isMemberVariableDeclaration(_modifierCount, inErrorRecovery)) { - return parseMemberVariableDeclaration(); - } - else if (isIndexMemberDeclaration(_modifierCount)) { - return parseIndexMemberDeclaration(); - } - else { - return undefined; - } - } - function isConstructorDeclaration(modifierCount) { - return peekToken(modifierCount).kind() === 64 /* ConstructorKeyword */; - } - function parseConstructorDeclaration() { - var modifiers = parseModifiers(); - var constructorKeyword = eatToken(64 /* ConstructorKeyword */); - var callSignature = parseCallSignature(false); - var semicolonToken = undefined; - var block = undefined; - if (isBlock()) { - block = parseBlock(false, true); - } - else { - semicolonToken = eatExplicitOrAutomaticSemicolon(false); - } - return new TypeScript.ConstructorDeclarationSyntax(parseNodeData, modifiers, constructorKeyword, callSignature, block, semicolonToken); - } - function isMemberFunctionDeclaration(modifierCount, inErrorRecovery) { - return isPropertyName(peekToken(modifierCount), inErrorRecovery) && isCallSignature(modifierCount + 1); - } - function parseMemberFunctionDeclaration() { - var modifiers = parseModifiers(); - var propertyName = eatPropertyName(); - var callSignature = parseCallSignature(false); - var parseBlockEvenWithNoOpenBrace = tryAddUnexpectedEqualsGreaterThanToken(callSignature); - var block = undefined; - var semicolon = undefined; - if (parseBlockEvenWithNoOpenBrace || isBlock()) { - block = parseBlock(parseBlockEvenWithNoOpenBrace, true); - } - else { - semicolon = eatExplicitOrAutomaticSemicolon(false); - } - return new TypeScript.MemberFunctionDeclarationSyntax(parseNodeData, modifiers, propertyName, callSignature, block, semicolon); - } - function isDefinitelyMemberVariablePropertyName(index) { - if (TypeScript.SyntaxFacts.isAnyKeyword(peekToken(index).kind())) { - var nextToken = peekToken(index + 1); - switch (nextToken.kind()) { - case 80 /* SemicolonToken */: - case 109 /* EqualsToken */: - case 108 /* ColonToken */: - case 73 /* CloseBraceToken */: - case 8 /* EndOfFileToken */: - return true; - default: - return previousTokenHasTrailingNewLine(nextToken); - } - } - else { - return true; - } - } - function isMemberVariableDeclaration(modifierCount, inErrorRecover) { - return isPropertyName(peekToken(modifierCount), inErrorRecover) && isDefinitelyMemberVariablePropertyName(modifierCount); - } - function parseMemberVariableDeclaration() { - return new TypeScript.MemberVariableDeclarationSyntax(parseNodeData, parseModifiers(), tryParseVariableDeclarator(true, true), eatExplicitOrAutomaticSemicolon(false)); - } - function isIndexMemberDeclaration(modifierCount) { - return isIndexSignature(modifierCount); - } - function parseIndexMemberDeclaration() { - return new TypeScript.IndexMemberDeclarationSyntax(parseNodeData, parseModifiers(), parseIndexSignature(), eatExplicitOrAutomaticSemicolon(false)); - } - function tryAddUnexpectedEqualsGreaterThanToken(callSignature) { - var token0 = currentToken(); - var hasEqualsGreaterThanToken = token0.kind() === 87 /* EqualsGreaterThanToken */; - if (hasEqualsGreaterThanToken) { - var _lastToken = TypeScript.lastToken(callSignature); - if (_lastToken && _lastToken.fullWidth() > 0) { - var diagnostic = new TypeScript.Diagnostic(fileName, source.text.lineMap(), TypeScript.start(token0, source.text), TypeScript.width(token0), TypeScript.DiagnosticCode.Unexpected_token_0_expected, [TypeScript.SyntaxFacts.getText(72 /* OpenBraceToken */)]); - addDiagnostic(diagnostic); - consumeToken(token0); - addSkippedTokenAfterNode(callSignature, token0); - return true; - } - } - return false; - } - function isFunctionDeclaration(modifierCount) { - return peekToken(modifierCount).kind() === 29 /* FunctionKeyword */; - } - function parseFunctionDeclaration() { - var modifiers = parseModifiers(); - var functionKeyword = eatToken(29 /* FunctionKeyword */); - var identifier = eatIdentifierToken(); - var callSignature = parseCallSignature(false); - var parseBlockEvenWithNoOpenBrace = tryAddUnexpectedEqualsGreaterThanToken(callSignature); - var semicolonToken = undefined; - var block = undefined; - if (parseBlockEvenWithNoOpenBrace || isBlock()) { - block = parseBlock(parseBlockEvenWithNoOpenBrace, true); - } - else { - semicolonToken = eatExplicitOrAutomaticSemicolon(false); - } - return new TypeScript.FunctionDeclarationSyntax(parseNodeData, modifiers, functionKeyword, identifier, callSignature, block, semicolonToken); - } - function parseModuleDeclaration() { - var modifiers = parseModifiers(); - var moduleKeyword = eatToken(67 /* ModuleKeyword */); - var moduleName = undefined; - var stringLiteral = undefined; - if (currentToken().kind() === 12 /* StringLiteral */) { - stringLiteral = eatToken(12 /* StringLiteral */); - } - else { - moduleName = parseName(false); - } - var openBraceToken = eatToken(72 /* OpenBraceToken */); - var moduleElements; - if (openBraceToken.fullWidth() > 0) { - var skippedTokens = getArray(); - moduleElements = parseSyntaxList(2 /* ModuleDeclaration_ModuleElements */, skippedTokens); - openBraceToken = addSkippedTokensAfterToken(openBraceToken, skippedTokens); - } - return new TypeScript.ModuleDeclarationSyntax(parseNodeData, modifiers, moduleKeyword, moduleName, stringLiteral, openBraceToken, moduleElements || [], eatToken(73 /* CloseBraceToken */)); - } - function parseInterfaceDeclaration() { - return new TypeScript.InterfaceDeclarationSyntax(parseNodeData, parseModifiers(), eatToken(54 /* InterfaceKeyword */), eatIdentifierToken(), tryParseTypeParameterList(false), parseHeritageClauses(), parseObjectType()); - } - function parseObjectType() { - var openBraceToken = eatToken(72 /* OpenBraceToken */); - var typeMembers; - if (openBraceToken.fullWidth() > 0) { - var skippedTokens = getArray(); - typeMembers = parseSeparatedSyntaxList(9 /* ObjectType_TypeMembers */, skippedTokens); - openBraceToken = addSkippedTokensAfterToken(openBraceToken, skippedTokens); - } - return new TypeScript.ObjectTypeSyntax(parseNodeData, openBraceToken, typeMembers || [], eatToken(73 /* CloseBraceToken */)); - } - function parseTupleType(currentToken) { - var openBracket = consumeToken(currentToken); - var types; - if (openBracket.fullWidth() > 0) { - var skippedTokens = getArray(); - types = parseSeparatedSyntaxList(21 /* TupleType_Types */, skippedTokens); - openBracket = addSkippedTokensAfterToken(openBracket, skippedTokens); - } - return new TypeScript.TupleTypeSyntax(parseNodeData, openBracket, types || [], eatToken(77 /* CloseBracketToken */)); - } - function isTypeMember(inErrorRecovery) { - if (TypeScript.SyntaxUtilities.isTypeMember(currentNode())) { - return true; - } - return isCallSignature(0) || isConstructSignature() || isIndexSignature(0) || isMethodSignature(inErrorRecovery) || isPropertySignature(inErrorRecovery); - } - function tryParseTypeMember(inErrorRecovery) { - var node = currentNode(); - if (TypeScript.SyntaxUtilities.isTypeMember(node)) { - consumeNode(node); - return node; - } - if (isCallSignature(0)) { - return parseCallSignature(false); - } - else if (isConstructSignature()) { - return parseConstructSignature(); - } - else if (isIndexSignature(0)) { - return parseIndexSignature(); - } - else if (isMethodSignature(inErrorRecovery)) { - return parseMethodSignature(); - } - else if (isPropertySignature(inErrorRecovery)) { - return parsePropertySignature(); - } - else { - return undefined; - } - } - function parseConstructSignature() { - return new TypeScript.ConstructSignatureSyntax(parseNodeData, eatToken(33 /* NewKeyword */), parseCallSignature(false)); - } - function parseIndexSignature() { - var openBracketToken = eatToken(76 /* OpenBracketToken */); - var skippedTokens = getArray(); - var parameters = parseSeparatedSyntaxList(18 /* IndexSignature_Parameters */, skippedTokens); - openBracketToken = addSkippedTokensAfterToken(openBracketToken, skippedTokens); - return new TypeScript.IndexSignatureSyntax(parseNodeData, openBracketToken, parameters, eatToken(77 /* CloseBracketToken */), parseOptionalTypeAnnotation(false)); - } - function parseMethodSignature() { - return new TypeScript.MethodSignatureSyntax(parseNodeData, eatPropertyName(), tryEatToken(107 /* QuestionToken */), parseCallSignature(false)); - } - function parsePropertySignature() { - return new TypeScript.PropertySignatureSyntax(parseNodeData, eatPropertyName(), tryEatToken(107 /* QuestionToken */), parseOptionalTypeAnnotation(false)); - } - function isCallSignature(peekIndex) { - var tokenKind = peekToken(peekIndex).kind(); - return tokenKind === 74 /* OpenParenToken */ || tokenKind === 82 /* LessThanToken */; - } - function isConstructSignature() { - if (currentToken().kind() !== 33 /* NewKeyword */) { - return false; - } - return isCallSignature(1); - } - function isIndexSignature(peekIndex) { - return peekToken(peekIndex).kind() === 76 /* OpenBracketToken */; - } - function isMethodSignature(inErrorRecovery) { - if (isPropertyName(currentToken(), inErrorRecovery)) { - if (isCallSignature(1)) { - return true; - } - if (peekToken(1).kind() === 107 /* QuestionToken */ && isCallSignature(2)) { - return true; - } - } - return false; - } - function isPropertySignature(inErrorRecovery) { - var _currentToken = currentToken(); - if (isModifier(_currentToken, 0)) { - if (!TypeScript.existsNewLineBetweenTokens(_currentToken, peekToken(1), source.text) && isPropertyName(peekToken(1), inErrorRecovery)) { - return false; - } - } - return isPropertyName(_currentToken, inErrorRecovery); - } - function isHeritageClause() { - var tokenKind = currentToken().kind(); - return tokenKind === 50 /* ExtendsKeyword */ || tokenKind === 53 /* ImplementsKeyword */; - } - function isNotHeritageClauseTypeName() { - var tokenKind = currentToken().kind(); - if (tokenKind === 53 /* ImplementsKeyword */ || tokenKind === 50 /* ExtendsKeyword */) { - return isIdentifier(peekToken(1)); - } - return false; - } - function isHeritageClauseTypeName() { - if (isIdentifier(currentToken())) { - return !isNotHeritageClauseTypeName(); - } - return false; - } - function tryParseHeritageClause() { - var extendsOrImplementsKeyword = currentToken(); - var tokenKind = extendsOrImplementsKeyword.kind(); - if (tokenKind !== 50 /* ExtendsKeyword */ && tokenKind !== 53 /* ImplementsKeyword */) { - return undefined; - } - consumeToken(extendsOrImplementsKeyword); - var skippedTokens = getArray(); - var typeNames = parseSeparatedSyntaxList(11 /* HeritageClause_TypeNameList */, skippedTokens); - extendsOrImplementsKeyword = addSkippedTokensAfterToken(extendsOrImplementsKeyword, skippedTokens); - return new TypeScript.HeritageClauseSyntax(parseNodeData, extendsOrImplementsKeyword, typeNames); - } - function isInterfaceEnumClassModuleImportOrExport(modifierCount, _currentToken) { - if (modifierCount) { - switch (peekToken(modifierCount).kind()) { - case 51 /* ImportKeyword */: - case 67 /* ModuleKeyword */: - case 54 /* InterfaceKeyword */: - case 46 /* ClassKeyword */: - case 48 /* EnumKeyword */: - return true; - } - } - _currentToken = _currentToken || currentToken(); - var nextToken = peekToken(1); - switch (_currentToken.kind()) { - case 67 /* ModuleKeyword */: - return isIdentifier(nextToken) || nextToken.kind() === 12 /* StringLiteral */; - case 51 /* ImportKeyword */: - case 46 /* ClassKeyword */: - case 48 /* EnumKeyword */: - case 54 /* InterfaceKeyword */: - return isIdentifier(nextToken); - case 49 /* ExportKeyword */: - return nextToken.kind() === 109 /* EqualsToken */; - } - return false; - } - function isStatement(modifierCount, inErrorRecovery) { - if (TypeScript.SyntaxUtilities.isStatement(currentNode())) { - return true; - } - var _currentToken = currentToken(); - var currentTokenKind = _currentToken.kind(); - switch (currentTokenKind) { - case 59 /* PublicKeyword */: - case 57 /* PrivateKeyword */: - case 58 /* ProtectedKeyword */: - case 60 /* StaticKeyword */: - var token1 = peekToken(1); - if (TypeScript.SyntaxFacts.isIdentifierNameOrAnyKeyword(token1)) { - return false; - } - break; - case 30 /* IfKeyword */: - case 72 /* OpenBraceToken */: - case 35 /* ReturnKeyword */: - case 36 /* SwitchKeyword */: - case 38 /* ThrowKeyword */: - case 17 /* BreakKeyword */: - case 20 /* ContinueKeyword */: - case 28 /* ForKeyword */: - case 44 /* WhileKeyword */: - case 45 /* WithKeyword */: - case 24 /* DoKeyword */: - case 40 /* TryKeyword */: - case 21 /* DebuggerKeyword */: - return true; - } - if (isInterfaceEnumClassModuleImportOrExport(modifierCount, _currentToken)) { - return false; - } - return isLabeledStatement(_currentToken) || isVariableStatement(modifierCount) || isFunctionDeclaration(modifierCount) || isEmptyStatement(_currentToken, inErrorRecovery) || isExpressionStatement(_currentToken); - } - function parseStatement(inErrorRecovery) { - return tryParseStatement(inErrorRecovery) || parseExpressionStatement(); - } - function tryParseStatement(inErrorRecovery) { - var node = currentNode(); - if (TypeScript.SyntaxUtilities.isStatement(node)) { - consumeNode(node); - return node; - } - var _currentToken = currentToken(); - var currentTokenKind = _currentToken.kind(); - return tryParseStatementWorker(_currentToken, currentTokenKind, modifierCount(), inErrorRecovery); - } - function tryParseStatementWorker(_currentToken, currentTokenKind, modifierCount, inErrorRecovery) { - switch (currentTokenKind) { - case 59 /* PublicKeyword */: - case 57 /* PrivateKeyword */: - case 58 /* ProtectedKeyword */: - case 60 /* StaticKeyword */: - if (TypeScript.SyntaxFacts.isIdentifierNameOrAnyKeyword(peekToken(1))) { - return undefined; - } - else { - break; - } - case 30 /* IfKeyword */: return parseIfStatement(_currentToken); - case 72 /* OpenBraceToken */: return parseBlock(false, false); - case 35 /* ReturnKeyword */: return parseReturnStatement(_currentToken); - case 36 /* SwitchKeyword */: return parseSwitchStatement(_currentToken); - case 38 /* ThrowKeyword */: return parseThrowStatement(_currentToken); - case 17 /* BreakKeyword */: return parseBreakStatement(_currentToken); - case 20 /* ContinueKeyword */: return parseContinueStatement(_currentToken); - case 28 /* ForKeyword */: return parseForOrForInStatement(_currentToken); - case 44 /* WhileKeyword */: return parseWhileStatement(_currentToken); - case 45 /* WithKeyword */: return parseWithStatement(_currentToken); - case 24 /* DoKeyword */: return parseDoStatement(_currentToken); - case 40 /* TryKeyword */: return parseTryStatement(_currentToken); - case 21 /* DebuggerKeyword */: return parseDebuggerStatement(_currentToken); - } - if (isInterfaceEnumClassModuleImportOrExport(modifierCount, _currentToken)) { - return undefined; - } - else if (isVariableStatement(modifierCount)) { - return parseVariableStatement(); - } - else if (isLabeledStatement(_currentToken)) { - return parseLabeledStatement(_currentToken); - } - else if (isFunctionDeclaration(modifierCount)) { - return parseFunctionDeclaration(); - } - else if (isEmptyStatement(_currentToken, inErrorRecovery)) { - return parseEmptyStatement(_currentToken); - } - else if (isExpressionStatement(_currentToken)) { - return parseExpressionStatement(); - } - else { - return undefined; - } - } - function parseDebuggerStatement(debuggerKeyword) { - return new TypeScript.DebuggerStatementSyntax(parseNodeData, consumeToken(debuggerKeyword), eatExplicitOrAutomaticSemicolon(false)); - } - function parseDoStatement(doKeyword) { - return new TypeScript.DoStatementSyntax(parseNodeData, consumeToken(doKeyword), parseStatement(false), eatToken(44 /* WhileKeyword */), eatToken(74 /* OpenParenToken */), parseExpression(true), eatToken(75 /* CloseParenToken */), eatExplicitOrAutomaticSemicolon(true)); - } - function isLabeledStatement(currentToken) { - return isIdentifier(currentToken) && peekToken(1).kind() === 108 /* ColonToken */; - } - function parseLabeledStatement(identifierToken) { - return new TypeScript.LabeledStatementSyntax(parseNodeData, consumeToken(identifierToken), eatToken(108 /* ColonToken */), parseStatement(false)); - } - function parseTryStatement(tryKeyword) { - var tryKeyword = consumeToken(tryKeyword); - var savedListParsingState = listParsingState; - listParsingState |= (1 << 6 /* TryBlock_Statements */); - var block = parseBlock(false, false); - listParsingState = savedListParsingState; - var catchClause = undefined; - if (currentToken().kind() === 19 /* CatchKeyword */) { - catchClause = parseCatchClause(); - } - var finallyClause = undefined; - if (!catchClause || currentToken().kind() === 27 /* FinallyKeyword */) { - finallyClause = parseFinallyClause(); - } - return new TypeScript.TryStatementSyntax(parseNodeData, tryKeyword, block, catchClause, finallyClause); - } - function parseCatchClauseBlock() { - var savedListParsingState = listParsingState; - listParsingState |= (1 << 7 /* CatchBlock_Statements */); - var block = parseBlock(false, false); - listParsingState = savedListParsingState; - return block; - } - function parseCatchClause() { - return new TypeScript.CatchClauseSyntax(parseNodeData, eatToken(19 /* CatchKeyword */), eatToken(74 /* OpenParenToken */), eatIdentifierToken(), parseOptionalTypeAnnotation(false), eatToken(75 /* CloseParenToken */), parseCatchClauseBlock()); - } - function parseFinallyClause() { - return new TypeScript.FinallyClauseSyntax(parseNodeData, eatToken(27 /* FinallyKeyword */), parseBlock(false, false)); - } - function parseWithStatement(withKeyword) { - return new TypeScript.WithStatementSyntax(parseNodeData, consumeToken(withKeyword), eatToken(74 /* OpenParenToken */), parseExpression(true), eatToken(75 /* CloseParenToken */), parseStatement(false)); - } - function parseWhileStatement(whileKeyword) { - return new TypeScript.WhileStatementSyntax(parseNodeData, consumeToken(whileKeyword), eatToken(74 /* OpenParenToken */), parseExpression(true), eatToken(75 /* CloseParenToken */), parseStatement(false)); - } - function isEmptyStatement(currentToken, inErrorRecovery) { - if (inErrorRecovery) { - return false; - } - return currentToken.kind() === 80 /* SemicolonToken */; - } - function parseEmptyStatement(semicolonToken) { - return new TypeScript.EmptyStatementSyntax(parseNodeData, consumeToken(semicolonToken)); - } - function parseForOrForInStatement(forKeyword) { - consumeToken(forKeyword); - var openParenToken = eatToken(74 /* OpenParenToken */); - var _currentToken = currentToken(); - var tokenKind = _currentToken.kind(); - if (tokenKind === 42 /* VarKeyword */) { - return parseForOrForInStatementWithVariableDeclaration(forKeyword, openParenToken); - } - else if (tokenKind === 80 /* SemicolonToken */) { - return parseForStatementWithNoVariableDeclarationOrInitializer(forKeyword, openParenToken); - } - else { - return parseForOrForInStatementWithInitializer(forKeyword, openParenToken); - } - } - function parseForOrForInStatementWithVariableDeclaration(forKeyword, openParenToken) { - var variableDeclaration = parseVariableDeclaration(false); - return currentToken().kind() === 31 /* InKeyword */ ? parseForInStatementWithVariableDeclarationOrInitializer(forKeyword, openParenToken, variableDeclaration, undefined) : parseForStatementWithVariableDeclarationOrInitializer(forKeyword, openParenToken, variableDeclaration, undefined); - } - function parseForInStatementWithVariableDeclarationOrInitializer(forKeyword, openParenToken, variableDeclaration, initializer) { - return new TypeScript.ForInStatementSyntax(parseNodeData, forKeyword, openParenToken, variableDeclaration, initializer, eatToken(31 /* InKeyword */), parseExpression(true), eatToken(75 /* CloseParenToken */), parseStatement(false)); - } - function parseForOrForInStatementWithInitializer(forKeyword, openParenToken) { - var initializer = parseExpression(false); - return currentToken().kind() === 31 /* InKeyword */ ? parseForInStatementWithVariableDeclarationOrInitializer(forKeyword, openParenToken, undefined, initializer) : parseForStatementWithVariableDeclarationOrInitializer(forKeyword, openParenToken, undefined, initializer); - } - function parseForStatementWithNoVariableDeclarationOrInitializer(forKeyword, openParenToken) { - return parseForStatementWithVariableDeclarationOrInitializer(forKeyword, openParenToken, undefined, undefined); - } - function tryParseForStatementCondition() { - var tokenKind = currentToken().kind(); - if (tokenKind !== 80 /* SemicolonToken */ && tokenKind !== 75 /* CloseParenToken */ && tokenKind !== 8 /* EndOfFileToken */) { - return parseExpression(true); - } - return undefined; - } - function tryParseForStatementIncrementor() { - var tokenKind = currentToken().kind(); - if (tokenKind !== 75 /* CloseParenToken */ && tokenKind !== 8 /* EndOfFileToken */) { - return parseExpression(true); - } - return undefined; - } - function parseForStatementWithVariableDeclarationOrInitializer(forKeyword, openParenToken, variableDeclaration, initializer) { - return new TypeScript.ForStatementSyntax(parseNodeData, forKeyword, openParenToken, variableDeclaration, initializer, eatToken(80 /* SemicolonToken */), tryParseForStatementCondition(), eatToken(80 /* SemicolonToken */), tryParseForStatementIncrementor(), eatToken(75 /* CloseParenToken */), parseStatement(false)); - } - function tryEatBreakOrContinueLabel() { - var identifier = undefined; - if (!canEatExplicitOrAutomaticSemicolon(false)) { - if (isIdentifier(currentToken())) { - return eatIdentifierToken(); - } - } - return undefined; - } - function parseBreakStatement(breakKeyword) { - return new TypeScript.BreakStatementSyntax(parseNodeData, consumeToken(breakKeyword), tryEatBreakOrContinueLabel(), eatExplicitOrAutomaticSemicolon(false)); - } - function parseContinueStatement(continueKeyword) { - return new TypeScript.ContinueStatementSyntax(parseNodeData, consumeToken(continueKeyword), tryEatBreakOrContinueLabel(), eatExplicitOrAutomaticSemicolon(false)); - } - function parseSwitchStatement(switchKeyword) { - consumeToken(switchKeyword); - var openParenToken = eatToken(74 /* OpenParenToken */); - var expression = parseExpression(true); - var closeParenToken = eatToken(75 /* CloseParenToken */); - var openBraceToken = eatToken(72 /* OpenBraceToken */); - var switchClauses; - if (openBraceToken.fullWidth() > 0) { - var skippedTokens = getArray(); - switchClauses = parseSyntaxList(3 /* SwitchStatement_SwitchClauses */, skippedTokens); - openBraceToken = addSkippedTokensAfterToken(openBraceToken, skippedTokens); - } - return new TypeScript.SwitchStatementSyntax(parseNodeData, switchKeyword, openParenToken, expression, closeParenToken, openBraceToken, switchClauses || [], eatToken(73 /* CloseBraceToken */)); - } - function isSwitchClause() { - if (TypeScript.SyntaxUtilities.isSwitchClause(currentNode())) { - return true; - } - var currentTokenKind = currentToken().kind(); - return currentTokenKind === 18 /* CaseKeyword */ || currentTokenKind === 22 /* DefaultKeyword */; - } - function tryParseSwitchClause() { - var node = currentNode(); - if (TypeScript.SyntaxUtilities.isSwitchClause(node)) { - consumeNode(node); - return node; - } - var _currentToken = currentToken(); - var kind = _currentToken.kind(); - if (kind === 18 /* CaseKeyword */) { - return parseCaseSwitchClause(_currentToken); - } - else if (kind === 22 /* DefaultKeyword */) { - return parseDefaultSwitchClause(_currentToken); - } - else { - return undefined; - } - } - function parseCaseSwitchClause(caseKeyword) { - consumeToken(caseKeyword); - var expression = parseExpression(true); - var colonToken = eatToken(108 /* ColonToken */); - var statements; - if (colonToken.fullWidth() > 0) { - var skippedTokens = getArray(); - statements = parseSyntaxList(4 /* SwitchClause_Statements */, skippedTokens); - colonToken = addSkippedTokensAfterToken(colonToken, skippedTokens); - } - return new TypeScript.CaseSwitchClauseSyntax(parseNodeData, caseKeyword, expression, colonToken, statements || []); - } - function parseDefaultSwitchClause(defaultKeyword) { - consumeToken(defaultKeyword); - var colonToken = eatToken(108 /* ColonToken */); - var statements; - if (colonToken.fullWidth() > 0) { - var skippedTokens = getArray(); - statements = parseSyntaxList(4 /* SwitchClause_Statements */, skippedTokens); - colonToken = addSkippedTokensAfterToken(colonToken, skippedTokens); - } - return new TypeScript.DefaultSwitchClauseSyntax(parseNodeData, defaultKeyword, colonToken, statements || []); - } - function parseThrowStatementExpression() { - return canEatExplicitOrAutomaticSemicolon(false) ? createMissingToken(9 /* IdentifierName */, undefined) : parseExpression(true); - } - function parseThrowStatement(throwKeyword) { - return new TypeScript.ThrowStatementSyntax(parseNodeData, consumeToken(throwKeyword), parseThrowStatementExpression(), eatExplicitOrAutomaticSemicolon(false)); - } - function tryParseReturnStatementExpression() { - return !canEatExplicitOrAutomaticSemicolon(false) ? parseExpression(true) : undefined; - } - function parseReturnStatement(returnKeyword) { - return new TypeScript.ReturnStatementSyntax(parseNodeData, consumeToken(returnKeyword), tryParseReturnStatementExpression(), eatExplicitOrAutomaticSemicolon(false)); - } - function isExpressionStatement(currentToken) { - var tokenKind = currentToken.kind(); - return tokenKind !== 72 /* OpenBraceToken */ && tokenKind !== 29 /* FunctionKeyword */ && isExpression(currentToken); - } - function isAssignmentOrOmittedExpression() { - var _currentToken = currentToken(); - return _currentToken.kind() === 81 /* CommaToken */ || isExpression(_currentToken); - } - function tryParseAssignmentOrOmittedExpression() { - if (currentToken().kind() === 81 /* CommaToken */) { - return new TypeScript.OmittedExpressionSyntax(parseNodeData); - } - return tryParseAssignmentExpressionOrHigher(false, true); - } - function isExpression(currentToken) { - switch (currentToken.kind()) { - case 11 /* NumericLiteral */: - case 12 /* StringLiteral */: - case 10 /* RegularExpressionLiteral */: - case 13 /* NoSubstitutionTemplateToken */: - case 14 /* TemplateStartToken */: - case 76 /* OpenBracketToken */: - case 74 /* OpenParenToken */: - case 82 /* LessThanToken */: - case 95 /* PlusPlusToken */: - case 96 /* MinusMinusToken */: - case 91 /* PlusToken */: - case 92 /* MinusToken */: - case 104 /* TildeToken */: - case 103 /* ExclamationToken */: - case 72 /* OpenBraceToken */: - case 87 /* EqualsGreaterThanToken */: - case 120 /* SlashToken */: - case 121 /* SlashEqualsToken */: - case 52 /* SuperKeyword */: - case 37 /* ThisKeyword */: - case 39 /* TrueKeyword */: - case 26 /* FalseKeyword */: - case 34 /* NullKeyword */: - case 33 /* NewKeyword */: - case 23 /* DeleteKeyword */: - case 43 /* VoidKeyword */: - case 41 /* TypeOfKeyword */: - case 29 /* FunctionKeyword */: - return true; - } - return isIdentifier(currentToken); - } - function parseExpressionStatement() { - return new TypeScript.ExpressionStatementSyntax(parseNodeData, parseExpression(true), eatExplicitOrAutomaticSemicolon(false)); - } - function parseIfStatement(ifKeyword) { - return new TypeScript.IfStatementSyntax(parseNodeData, consumeToken(ifKeyword), eatToken(74 /* OpenParenToken */), parseExpression(true), eatToken(75 /* CloseParenToken */), parseStatement(false), parseOptionalElseClause()); - } - function parseOptionalElseClause() { - return currentToken().kind() === 25 /* ElseKeyword */ ? parseElseClause() : undefined; - } - function parseElseClause() { - return new TypeScript.ElseClauseSyntax(parseNodeData, eatToken(25 /* ElseKeyword */), parseStatement(false)); - } - function isVariableStatement(modifierCount) { - return peekToken(modifierCount).kind() === 42 /* VarKeyword */; - } - function parseVariableStatement() { - return new TypeScript.VariableStatementSyntax(parseNodeData, parseModifiers(), parseVariableDeclaration(true), eatExplicitOrAutomaticSemicolon(false)); - } - function parseVariableDeclaration(allowIn) { - var varKeyword = eatToken(42 /* VarKeyword */); - var listParsingState = allowIn ? 12 /* VariableDeclaration_VariableDeclarators_AllowIn */ : 13 /* VariableDeclaration_VariableDeclarators_DisallowIn */; - var skippedTokens = getArray(); - var variableDeclarators = parseSeparatedSyntaxList(listParsingState, skippedTokens); - varKeyword = addSkippedTokensAfterToken(varKeyword, skippedTokens); - return new TypeScript.VariableDeclarationSyntax(parseNodeData, varKeyword, variableDeclarators); - } - function isVariableDeclarator() { - var node = currentNode(); - if (node && node.kind() === 191 /* VariableDeclarator */) { - return true; - } - return isIdentifier(currentToken()); - } - function canReuseVariableDeclaratorNode(node) { - if (!node || node.kind() !== 191 /* VariableDeclarator */) { - return false; - } - var variableDeclarator = node; - return variableDeclarator.equalsValueClause === undefined; - } - function tryParseVariableDeclarator(allowIn, allowPropertyName) { - var node = currentNode(); - if (canReuseVariableDeclaratorNode(node)) { - consumeNode(node); - return node; - } - if (allowPropertyName) { - } - if (!allowPropertyName && !isIdentifier(currentToken())) { - return undefined; - } - var propertyName = allowPropertyName ? eatPropertyName() : eatIdentifierToken(); - var equalsValueClause = undefined; - var typeAnnotation = undefined; - if (propertyName.fullWidth() > 0) { - typeAnnotation = parseOptionalTypeAnnotation(false); - if (isEqualsValueClause(false)) { - equalsValueClause = parseEqualsValueClause(allowIn); - } - } - return new TypeScript.VariableDeclaratorSyntax(parseNodeData, propertyName, typeAnnotation, equalsValueClause); - } - function isEqualsValueClause(inParameter) { - var token0 = currentToken(); - if (token0.kind() === 109 /* EqualsToken */) { - return true; - } - if (!previousTokenHasTrailingNewLine(token0)) { - var tokenKind = token0.kind(); - if (tokenKind === 87 /* EqualsGreaterThanToken */) { - return false; - } - if (tokenKind === 72 /* OpenBraceToken */ && inParameter) { - return false; - } - return isExpression(token0); - } - return false; - } - function parseEqualsValueClause(allowIn) { - return new TypeScript.EqualsValueClauseSyntax(parseNodeData, eatToken(109 /* EqualsToken */), tryParseAssignmentExpressionOrHigher(true, allowIn)); - } - function parseExpression(allowIn) { - var leftOperand = tryParseAssignmentExpressionOrHigher(true, allowIn); - while (true) { - var _currentToken = currentToken(); - if (_currentToken.kind() !== 81 /* CommaToken */) { - break; - } - leftOperand = new TypeScript.BinaryExpressionSyntax(parseNodeData, leftOperand, consumeToken(_currentToken), tryParseAssignmentExpressionOrHigher(true, allowIn)); - } - return leftOperand; - } - function tryParseAssignmentExpressionOrHigher(force, allowIn) { - var _currentToken = currentToken(); - var arrowFunction = tryParseAnyArrowFunctionExpression(_currentToken); - if (arrowFunction) { - return arrowFunction; - } - var leftOperand = tryParseBinaryExpressionOrHigher(_currentToken, force, 1 /* Lowest */, allowIn); - if (leftOperand === undefined) { - return undefined; - } - if (TypeScript.SyntaxUtilities.isLeftHandSizeExpression(leftOperand)) { - var operatorToken = currentOperatorToken(); - if (TypeScript.SyntaxFacts.isAssignmentOperatorToken(operatorToken.kind())) { - return new TypeScript.BinaryExpressionSyntax(parseNodeData, leftOperand, consumeToken(operatorToken), tryParseAssignmentExpressionOrHigher(true, allowIn)); - } - } - return parseConditionalExpressionRest(allowIn, leftOperand); - } - function tryParseAnyArrowFunctionExpression(_currentToken) { - return isSimpleArrowFunctionExpression(_currentToken) ? parseSimpleArrowFunctionExpression() : tryParseParenthesizedArrowFunctionExpression(); - } - function tryParseUnaryExpressionOrHigher(_currentToken, force) { - var currentTokenKind = _currentToken.kind(); - switch (currentTokenKind) { - case 91 /* PlusToken */: - case 92 /* MinusToken */: - case 104 /* TildeToken */: - case 103 /* ExclamationToken */: - case 95 /* PlusPlusToken */: - case 96 /* MinusMinusToken */: - return new TypeScript.PrefixUnaryExpressionSyntax(parseNodeData, consumeToken(_currentToken), tryParseUnaryExpressionOrHigher(currentToken(), true)); - case 41 /* TypeOfKeyword */: return parseTypeOfExpression(_currentToken); - case 43 /* VoidKeyword */: return parseVoidExpression(_currentToken); - case 23 /* DeleteKeyword */: return parseDeleteExpression(_currentToken); - case 82 /* LessThanToken */: return parseCastExpression(_currentToken); - default: - return tryParsePostfixExpressionOrHigher(_currentToken, force); - } - } - function tryParseBinaryExpressionOrHigher(_currentToken, force, precedence, allowIn) { - var leftOperand = tryParseUnaryExpressionOrHigher(_currentToken, force); - if (leftOperand === undefined) { - return undefined; - } - return parseBinaryExpressionRest(precedence, allowIn, leftOperand); - } - function parseConditionalExpressionRest(allowIn, leftOperand) { - var _currentToken = currentToken(); - if (_currentToken.kind() !== 107 /* QuestionToken */) { - return leftOperand; - } - return new TypeScript.ConditionalExpressionSyntax(parseNodeData, leftOperand, consumeToken(_currentToken), tryParseAssignmentExpressionOrHigher(true, true), eatToken(108 /* ColonToken */), tryParseAssignmentExpressionOrHigher(true, allowIn)); - } - function parseBinaryExpressionRest(precedence, allowIn, leftOperand) { - while (true) { - var operatorToken = currentOperatorToken(); - var tokenKind = operatorToken.kind(); - if (!TypeScript.SyntaxFacts.isBinaryExpressionOperatorToken(tokenKind) || tokenKind === 81 /* CommaToken */ || TypeScript.SyntaxFacts.isAssignmentOperatorToken(tokenKind)) { - break; - } - if (tokenKind === 31 /* InKeyword */ && !allowIn) { - break; - } - var newPrecedence = getBinaryExpressionPrecedence(tokenKind); - if (newPrecedence <= precedence) { - break; - } - leftOperand = new TypeScript.BinaryExpressionSyntax(parseNodeData, leftOperand, consumeToken(operatorToken), tryParseBinaryExpressionOrHigher(currentToken(), true, newPrecedence, allowIn)); - } - return leftOperand; - } - function currentOperatorToken() { - var token0 = currentToken(); - if (token0.kind() === 83 /* GreaterThanToken */) { - return currentContextualToken(); - } - return token0; - } - function tryParseMemberExpressionOrHigher(_currentToken, force, inObjectCreation) { - var expression = tryParsePrimaryExpression(_currentToken, force); - if (expression === undefined) { - return undefined; - } - return parseMemberExpressionRest(expression, inObjectCreation); - } - function parseCallExpressionRest(expression) { - while (true) { - var _currentToken = currentToken(); - var currentTokenKind = _currentToken.kind(); - switch (currentTokenKind) { - case 74 /* OpenParenToken */: - expression = new TypeScript.InvocationExpressionSyntax(parseNodeData, expression, parseArgumentList(undefined)); - continue; - case 82 /* LessThanToken */: - var argumentList = tryParseArgumentList(); - if (argumentList === undefined) { - break; - } - expression = new TypeScript.InvocationExpressionSyntax(parseNodeData, expression, argumentList); - continue; - case 76 /* OpenBracketToken */: - expression = parseElementAccessExpression(expression, _currentToken, false); - continue; - case 78 /* DotToken */: - expression = new TypeScript.MemberAccessExpressionSyntax(parseNodeData, expression, consumeToken(_currentToken), eatIdentifierNameToken()); - continue; - case 13 /* NoSubstitutionTemplateToken */: - case 14 /* TemplateStartToken */: - expression = new TypeScript.TemplateAccessExpressionSyntax(parseNodeData, expression, parseTemplateExpression(_currentToken)); - continue; - } - return expression; - } - } - function parseMemberExpressionRest(expression, inObjectCreation) { - while (true) { - var _currentToken = currentToken(); - var currentTokenKind = _currentToken.kind(); - switch (currentTokenKind) { - case 76 /* OpenBracketToken */: - expression = parseElementAccessExpression(expression, _currentToken, inObjectCreation); - continue; - case 78 /* DotToken */: - expression = new TypeScript.MemberAccessExpressionSyntax(parseNodeData, expression, consumeToken(_currentToken), eatIdentifierNameToken()); - continue; - case 13 /* NoSubstitutionTemplateToken */: - case 14 /* TemplateStartToken */: - expression = new TypeScript.TemplateAccessExpressionSyntax(parseNodeData, expression, parseTemplateExpression(_currentToken)); - continue; - } - return expression; - } - } - function tryParseLeftHandSideExpressionOrHigher(_currentToken, force) { - var expression = undefined; - if (_currentToken.kind() === 52 /* SuperKeyword */) { - expression = parseSuperExpression(_currentToken); - } - else { - expression = tryParseMemberExpressionOrHigher(_currentToken, force, false); - if (expression === undefined) { - return undefined; - } - } - return parseCallExpressionRest(expression); - } - function parseSuperExpression(superToken) { - var expression = consumeToken(superToken); - var currentTokenKind = currentToken().kind(); - return currentTokenKind === 74 /* OpenParenToken */ || currentTokenKind === 78 /* DotToken */ ? expression : new TypeScript.MemberAccessExpressionSyntax(parseNodeData, expression, eatToken(78 /* DotToken */), eatIdentifierNameToken()); - } - function tryParsePostfixExpressionOrHigher(_currentToken, force) { - var expression = tryParseLeftHandSideExpressionOrHigher(_currentToken, force); - if (expression === undefined) { - return undefined; - } - var _currentToken = currentToken(); - var currentTokenKind = _currentToken.kind(); - switch (currentTokenKind) { - case 95 /* PlusPlusToken */: - case 96 /* MinusMinusToken */: - if (previousTokenHasTrailingNewLine(_currentToken)) { - break; - } - return new TypeScript.PostfixUnaryExpressionSyntax(parseNodeData, expression, consumeToken(_currentToken)); - } - return expression; - } - function tryParseGenericArgumentList() { - var rewindPoint = getRewindPoint(); - var typeArgumentList = tryParseTypeArgumentList(true); - var token0 = currentToken(); - var tokenKind = token0.kind(); - var isOpenParen = tokenKind === 74 /* OpenParenToken */; - var isDot = tokenKind === 78 /* DotToken */; - var isOpenParenOrDot = isOpenParen || isDot; - var argumentList = undefined; - if (!typeArgumentList || !isOpenParenOrDot) { - rewind(rewindPoint); - releaseRewindPoint(rewindPoint); - return undefined; - } - else { - releaseRewindPoint(rewindPoint); - if (isDot) { - var diagnostic = new TypeScript.Diagnostic(fileName, source.text.lineMap(), TypeScript.start(token0, source.text), TypeScript.width(token0), TypeScript.DiagnosticCode.A_parameter_list_must_follow_a_generic_type_argument_list_expected, undefined); - addDiagnostic(diagnostic); - return new TypeScript.ArgumentListSyntax(parseNodeData, typeArgumentList, TypeScript.Syntax.emptyToken(74 /* OpenParenToken */), [], TypeScript.Syntax.emptyToken(75 /* CloseParenToken */)); - } - else { - return parseArgumentList(typeArgumentList); - } - } - } - function tryParseArgumentList() { - var tokenKind = currentToken().kind(); - if (tokenKind === 82 /* LessThanToken */) { - return tryParseGenericArgumentList(); - } - if (tokenKind === 74 /* OpenParenToken */) { - return parseArgumentList(undefined); - } - return undefined; - } - function parseArgumentList(typeArgumentList) { - var openParenToken = eatToken(74 /* OpenParenToken */); - var _arguments; - if (openParenToken.fullWidth() > 0) { - var skippedTokens = getArray(); - _arguments = parseSeparatedSyntaxList(14 /* ArgumentList_AssignmentExpressions */, skippedTokens); - openParenToken = addSkippedTokensAfterToken(openParenToken, skippedTokens); - } - return new TypeScript.ArgumentListSyntax(parseNodeData, typeArgumentList, openParenToken, _arguments || [], eatToken(75 /* CloseParenToken */)); - } - function tryParseArgumentListExpression() { - var force = currentToken().kind() === 81 /* CommaToken */; - return tryParseAssignmentExpressionOrHigher(force, true); - } - function parseElementAccessArgumentExpression(openBracketToken, inObjectCreation) { - if (inObjectCreation && currentToken().kind() === 77 /* CloseBracketToken */) { - var errorStart = TypeScript.start(openBracketToken, source.text); - var errorEnd = TypeScript.end(currentToken(), source.text); - var diagnostic = new TypeScript.Diagnostic(fileName, source.text.lineMap(), errorStart, errorEnd - errorStart, TypeScript.DiagnosticCode.new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead, undefined); - addDiagnostic(diagnostic); - return TypeScript.Syntax.emptyToken(9 /* IdentifierName */); - } - else { - return parseExpression(true); - } - } - function parseElementAccessExpression(expression, openBracketToken, inObjectCreation) { - return new TypeScript.ElementAccessExpressionSyntax(parseNodeData, expression, consumeToken(openBracketToken), parseElementAccessArgumentExpression(openBracketToken, inObjectCreation), eatToken(77 /* CloseBracketToken */)); - } - function tryParsePrimaryExpression(_currentToken, force) { - if (isIdentifier(_currentToken)) { - return eatIdentifierToken(); - } - var currentTokenKind = _currentToken.kind(); - switch (currentTokenKind) { - case 37 /* ThisKeyword */: - case 39 /* TrueKeyword */: - case 26 /* FalseKeyword */: - case 34 /* NullKeyword */: - case 11 /* NumericLiteral */: - case 10 /* RegularExpressionLiteral */: - case 12 /* StringLiteral */: - return consumeToken(_currentToken); - case 29 /* FunctionKeyword */: return parseFunctionExpression(_currentToken); - case 76 /* OpenBracketToken */: return parseArrayLiteralExpression(_currentToken); - case 72 /* OpenBraceToken */: return parseObjectLiteralExpression(_currentToken); - case 74 /* OpenParenToken */: return parseParenthesizedExpression(_currentToken); - case 33 /* NewKeyword */: return parseObjectCreationExpression(_currentToken); - case 13 /* NoSubstitutionTemplateToken */: - case 14 /* TemplateStartToken */: - return parseTemplateExpression(_currentToken); - case 120 /* SlashToken */: - case 121 /* SlashEqualsToken */: - var result = tryReparseDivideAsRegularExpression(); - return result || eatIdentifierToken(TypeScript.DiagnosticCode.Expression_expected); - } - if (!force) { - return undefined; - } - return eatIdentifierToken(TypeScript.DiagnosticCode.Expression_expected); - } - function tryReparseDivideAsRegularExpression() { - var currentToken = currentContextualToken(); - var tokenKind = currentToken.kind(); - if (tokenKind === 120 /* SlashToken */ || tokenKind === 121 /* SlashEqualsToken */) { - return undefined; - } - else if (tokenKind === 10 /* RegularExpressionLiteral */) { - return consumeToken(currentToken); - } - else { - throw TypeScript.Errors.invalidOperation(); - } - } - function parseTypeOfExpression(typeOfKeyword) { - return new TypeScript.TypeOfExpressionSyntax(parseNodeData, consumeToken(typeOfKeyword), tryParseUnaryExpressionOrHigher(currentToken(), true)); - } - function parseDeleteExpression(deleteKeyword) { - return new TypeScript.DeleteExpressionSyntax(parseNodeData, consumeToken(deleteKeyword), tryParseUnaryExpressionOrHigher(currentToken(), true)); - } - function parseVoidExpression(voidKeyword) { - return new TypeScript.VoidExpressionSyntax(parseNodeData, consumeToken(voidKeyword), tryParseUnaryExpressionOrHigher(currentToken(), true)); - } - function parseFunctionExpression(functionKeyword) { - return new TypeScript.FunctionExpressionSyntax(parseNodeData, consumeToken(functionKeyword), eatOptionalIdentifierToken(), parseCallSignature(false), parseBlock(false, true)); - } - function parseObjectCreationExpression(newKeyword) { - return new TypeScript.ObjectCreationExpressionSyntax(parseNodeData, consumeToken(newKeyword), tryParseMemberExpressionOrHigher(currentToken(), true, true), tryParseArgumentList()); - } - function parseTemplateExpression(startToken) { - consumeToken(startToken); - if (startToken.kind() === 13 /* NoSubstitutionTemplateToken */) { - return startToken; - } - var templateClauses = getArray(); - do { - templateClauses.push(parseTemplateClause()); - } while (templateClauses[templateClauses.length - 1].templateMiddleOrEndToken.kind() === 15 /* TemplateMiddleToken */); - return new TypeScript.TemplateExpressionSyntax(parseNodeData, startToken, TypeScript.Syntax.list(templateClauses)); - } - function parseTemplateClause() { - var expression = parseExpression(true); - var token = currentToken(); - if (token.kind() === 73 /* CloseBraceToken */) { - token = currentContextualToken(); - TypeScript.Debug.assert(token.kind() === 15 /* TemplateMiddleToken */ || token.kind() === 16 /* TemplateEndToken */); - consumeToken(token); - } - else { - var diagnostic = getExpectedTokenDiagnostic(73 /* CloseBraceToken */); - addDiagnostic(diagnostic); - token = TypeScript.Syntax.emptyToken(16 /* TemplateEndToken */); - } - return new TypeScript.TemplateClauseSyntax(parseNodeData, expression, token); - } - function parseCastExpression(lessThanToken) { - return new TypeScript.CastExpressionSyntax(parseNodeData, consumeToken(lessThanToken), parseType(), eatToken(83 /* GreaterThanToken */), tryParseUnaryExpressionOrHigher(currentToken(), true)); - } - function parseParenthesizedExpression(openParenToken) { - return new TypeScript.ParenthesizedExpressionSyntax(parseNodeData, consumeToken(openParenToken), parseExpression(true), eatToken(75 /* CloseParenToken */)); - } - function tryParseParenthesizedArrowFunctionExpression() { - var tokenKind = currentToken().kind(); - if (tokenKind !== 74 /* OpenParenToken */ && tokenKind !== 82 /* LessThanToken */) { - return undefined; - } - if (isDefinitelyArrowFunctionExpression()) { - return tryParseParenthesizedArrowFunctionExpressionWorker(false); - } - if (!isPossiblyArrowFunctionExpression()) { - return undefined; - } - var rewindPoint = getRewindPoint(); - var arrowFunction = tryParseParenthesizedArrowFunctionExpressionWorker(true); - if (arrowFunction === undefined) { - rewind(rewindPoint); - } - releaseRewindPoint(rewindPoint); - return arrowFunction; - } - function tryParseParenthesizedArrowFunctionExpressionWorker(requireArrow) { - var _currentToken = currentToken(); - var callSignature = parseCallSignature(true); - if (requireArrow && currentToken().kind() !== 87 /* EqualsGreaterThanToken */) { - return undefined; - } - var equalsGreaterThanToken = eatToken(87 /* EqualsGreaterThanToken */); - var block = tryParseArrowFunctionBlock(); - var expression = undefined; - if (block === undefined) { - expression = tryParseAssignmentExpressionOrHigher(true, true); - } - return new TypeScript.ParenthesizedArrowFunctionExpressionSyntax(parseNodeData, callSignature, equalsGreaterThanToken, block, expression); - } - function tryParseArrowFunctionBlock() { - if (isBlock()) { - return parseBlock(false, false); - } - else { - var _modifierCount = modifierCount(); - if (isStatement(_modifierCount, false) && !isExpressionStatement(currentToken()) && !isFunctionDeclaration(_modifierCount)) { - return parseBlock(true, false); - } - else { - return undefined; - } - } - } - function isSimpleArrowFunctionExpression(_currentToken) { - if (_currentToken.kind() === 87 /* EqualsGreaterThanToken */) { - return true; - } - return isIdentifier(_currentToken) && peekToken(1).kind() === 87 /* EqualsGreaterThanToken */; - } - function parseSimpleArrowFunctionExpression() { - var parameter = eatSimpleParameter(); - var equalsGreaterThanToken = eatToken(87 /* EqualsGreaterThanToken */); - var block = tryParseArrowFunctionBlock(); - var expression = undefined; - if (block === undefined) { - expression = tryParseAssignmentExpressionOrHigher(true, true); - } - return new TypeScript.SimpleArrowFunctionExpressionSyntax(parseNodeData, parameter, equalsGreaterThanToken, block, expression); - } - function isBlock() { - return currentToken().kind() === 72 /* OpenBraceToken */; - } - function isDefinitelyArrowFunctionExpression() { - var token0 = currentToken(); - if (token0.kind() !== 74 /* OpenParenToken */) { - return false; - } - var token1 = peekToken(1); - var token1Kind = token1.kind(); - var token2; - if (token1Kind === 75 /* CloseParenToken */) { - token2 = peekToken(2); - var token2Kind = token2.kind(); - return token2Kind === 108 /* ColonToken */ || token2Kind === 87 /* EqualsGreaterThanToken */ || token2Kind === 72 /* OpenBraceToken */; - } - if (token1Kind === 79 /* DotDotDotToken */) { - return true; - } - token2 = peekToken(2); - token2Kind = token2.kind(); - if (TypeScript.SyntaxFacts.isAccessibilityModifier(token1Kind)) { - if (isIdentifier(token2)) { - return true; - } - } - if (!isIdentifier(token1)) { - return false; - } - if (token2Kind === 108 /* ColonToken */) { - return true; - } - var token3 = peekToken(3); - var token3Kind = token3.kind(); - if (token2Kind === 107 /* QuestionToken */) { - if (token3Kind === 108 /* ColonToken */ || token3Kind === 75 /* CloseParenToken */ || token3Kind === 81 /* CommaToken */) { - return true; - } - } - if (token2Kind === 75 /* CloseParenToken */) { - if (token3Kind === 87 /* EqualsGreaterThanToken */) { - return true; - } - } - return false; - } - function isPossiblyArrowFunctionExpression() { - var token0 = currentToken(); - if (token0.kind() !== 74 /* OpenParenToken */) { - return true; - } - var token1 = peekToken(1); - if (!isIdentifier(token1)) { - return false; - } - var token2 = peekToken(2); - var token2Kind = token2.kind(); - if (token2Kind === 109 /* EqualsToken */) { - return true; - } - if (token2Kind === 81 /* CommaToken */) { - return true; - } - if (token2Kind === 75 /* CloseParenToken */) { - var token3 = peekToken(3); - if (token3.kind() === 108 /* ColonToken */) { - return true; - } - } - return false; - } - function parseObjectLiteralExpression(openBraceToken) { - consumeToken(openBraceToken); - var skippedTokens = getArray(); - var propertyAssignments = parseSeparatedSyntaxList(15 /* ObjectLiteralExpression_PropertyAssignments */, skippedTokens); - openBraceToken = addSkippedTokensAfterToken(openBraceToken, skippedTokens); - return new TypeScript.ObjectLiteralExpressionSyntax(parseNodeData, openBraceToken, propertyAssignments, eatToken(73 /* CloseBraceToken */)); - } - function tryParsePropertyAssignment(inErrorRecovery) { - if (isAccessor(modifierCount(), inErrorRecovery)) { - return parseAccessor(true); - } - else if (isFunctionPropertyAssignment(inErrorRecovery)) { - return parseFunctionPropertyAssignment(); - } - else if (isSimplePropertyAssignment(inErrorRecovery)) { - return parseSimplePropertyAssignment(); - } - else { - return undefined; - } - } - function isPropertyAssignment(inErrorRecovery) { - return isAccessor(modifierCount(), inErrorRecovery) || isFunctionPropertyAssignment(inErrorRecovery) || isSimplePropertyAssignment(inErrorRecovery); - } - function eatPropertyName() { - var _currentToken = currentToken(); - return TypeScript.SyntaxFacts.isIdentifierNameOrAnyKeyword(_currentToken) ? eatIdentifierNameToken() : consumeToken(_currentToken); - } - function isFunctionPropertyAssignment(inErrorRecovery) { - return isPropertyName(currentToken(), inErrorRecovery) && isCallSignature(1); - } - function parseFunctionPropertyAssignment() { - return new TypeScript.FunctionPropertyAssignmentSyntax(parseNodeData, eatPropertyName(), parseCallSignature(false), parseBlock(false, true)); - } - function isSimplePropertyAssignment(inErrorRecovery) { - return isPropertyName(currentToken(), inErrorRecovery); - } - function parseSimplePropertyAssignment() { - return new TypeScript.SimplePropertyAssignmentSyntax(parseNodeData, eatPropertyName(), eatToken(108 /* ColonToken */), tryParseAssignmentExpressionOrHigher(true, true)); - } - function isPropertyName(token, inErrorRecovery) { - if (TypeScript.SyntaxFacts.isIdentifierNameOrAnyKeyword(token)) { - if (inErrorRecovery) { - return isIdentifier(token); - } - else { - return true; - } - } - var kind = token.kind(); - return kind === 12 /* StringLiteral */ || kind === 11 /* NumericLiteral */ || kind === 13 /* NoSubstitutionTemplateToken */; - } - function parseArrayLiteralExpression(openBracketToken) { - consumeToken(openBracketToken); - var skippedTokens = getArray(); - var expressions = parseSeparatedSyntaxList(16 /* ArrayLiteralExpression_AssignmentExpressions */, skippedTokens); - openBracketToken = addSkippedTokensAfterToken(openBracketToken, skippedTokens); - return new TypeScript.ArrayLiteralExpressionSyntax(parseNodeData, openBracketToken, expressions, eatToken(77 /* CloseBracketToken */)); - } - function parseBlock(parseBlockEvenWithNoOpenBrace, checkForStrictMode) { - var openBraceToken = eatToken(72 /* OpenBraceToken */); - var statements; - if (parseBlockEvenWithNoOpenBrace || openBraceToken.fullWidth() > 0) { - var savedIsInStrictMode = isInStrictMode; - var processItems = checkForStrictMode ? updateStrictModeState : undefined; - var skippedTokens = getArray(); - var statements = parseSyntaxList(5 /* Block_Statements */, skippedTokens, processItems); - openBraceToken = addSkippedTokensAfterToken(openBraceToken, skippedTokens); - setStrictMode(savedIsInStrictMode); - } - return new TypeScript.BlockSyntax(parseNodeData, openBraceToken, statements || [], eatToken(73 /* CloseBraceToken */)); - } - function parseCallSignature(requireCompleteTypeParameterList) { - return new TypeScript.CallSignatureSyntax(parseNodeData, tryParseTypeParameterList(requireCompleteTypeParameterList), parseParameterList(), parseOptionalTypeAnnotation(false)); - } - function tryParseTypeParameterList(requireCompleteTypeParameterList) { - var _currentToken = currentToken(); - if (_currentToken.kind() !== 82 /* LessThanToken */) { - return undefined; - } - var rewindPoint = getRewindPoint(); - var lessThanToken = consumeToken(_currentToken); - var skippedTokens = getArray(); - var typeParameters = parseSeparatedSyntaxList(20 /* TypeParameterList_TypeParameters */, skippedTokens); - lessThanToken = addSkippedTokensAfterToken(lessThanToken, skippedTokens); - var greaterThanToken = eatToken(83 /* GreaterThanToken */); - if (requireCompleteTypeParameterList && greaterThanToken.fullWidth() === 0) { - rewind(rewindPoint); - releaseRewindPoint(rewindPoint); - return undefined; - } - else { - releaseRewindPoint(rewindPoint); - return new TypeScript.TypeParameterListSyntax(parseNodeData, lessThanToken, typeParameters, greaterThanToken); - } - } - function isTypeParameter() { - return isIdentifier(currentToken()); - } - function tryParseTypeParameter() { - if (!isIdentifier(currentToken())) { - return undefined; - } - return new TypeScript.TypeParameterSyntax(parseNodeData, eatIdentifierToken(), tryParseConstraint()); - } - function tryParseConstraint() { - if (currentToken().kind() !== 50 /* ExtendsKeyword */) { - return undefined; - } - return new TypeScript.ConstraintSyntax(parseNodeData, eatToken(50 /* ExtendsKeyword */), parseTypeOrExpression()); - } - function tryParseParameterList() { - if (currentToken().kind() === 74 /* OpenParenToken */) { - var token1 = peekToken(1); - if (token1.kind() === 75 /* CloseParenToken */ || isParameterHelper(token1)) { - return parseParameterList(); - } - } - return undefined; - } - function parseParameterList() { - var openParenToken = eatToken(74 /* OpenParenToken */); - var parameters; - if (openParenToken.fullWidth() > 0) { - var skippedTokens = getArray(); - parameters = parseSeparatedSyntaxList(17 /* ParameterList_Parameters */, skippedTokens); - openParenToken = addSkippedTokensAfterToken(openParenToken, skippedTokens); - } - return new TypeScript.ParameterListSyntax(parseNodeData, openParenToken, parameters || [], eatToken(75 /* CloseParenToken */)); - } - function parseOptionalTypeAnnotation(allowStringLiteral) { - return currentToken().kind() === 108 /* ColonToken */ ? parseTypeAnnotation(allowStringLiteral) : undefined; - } - function parseTypeAnnotationType(allowStringLiteral) { - if (allowStringLiteral) { - var _currentToken = currentToken(); - if (_currentToken.kind() === 12 /* StringLiteral */) { - return consumeToken(_currentToken); - } - } - return parseType(); - } - function parseTypeAnnotation(allowStringLiteral) { - return new TypeScript.TypeAnnotationSyntax(parseNodeData, consumeToken(currentToken()), parseTypeAnnotationType(allowStringLiteral)); - } - function isType() { - var _currentToken = currentToken(); - switch (_currentToken.kind()) { - case 41 /* TypeOfKeyword */: - case 62 /* AnyKeyword */: - case 69 /* NumberKeyword */: - case 63 /* BooleanKeyword */: - case 71 /* StringKeyword */: - case 43 /* VoidKeyword */: - case 72 /* OpenBraceToken */: - case 74 /* OpenParenToken */: - case 82 /* LessThanToken */: - case 33 /* NewKeyword */: - return true; - default: - return isIdentifier(_currentToken); - } - } - function parseTypeOrExpression() { - var result = tryParseType(); - if (result) { - return result; - } - var _currentToken = currentToken(); - if (isExpression(_currentToken)) { - return tryParseUnaryExpressionOrHigher(_currentToken, true); - } - return eatIdentifierToken(TypeScript.DiagnosticCode.Type_expected); - } - function parseType() { - return tryParseType() || eatIdentifierToken(TypeScript.DiagnosticCode.Type_expected); - } - function tryParseType() { - if (isFunctionType()) { - return parseFunctionType(); - } - if (currentToken().kind() === 33 /* NewKeyword */) { - return parseConstructorType(); - } - return tryParseUnionTypeOrHigher(); - } - function tryParseUnionTypeOrHigher() { - var type = tryParsePrimaryType(); - if (type) { - var barToken; - while ((barToken = currentToken()).kind() === 101 /* BarToken */) { - consumeToken(barToken); - var right = parsePrimaryType(); - type = new TypeScript.UnionTypeSyntax(parseNodeData, type, barToken, right); - } - } - return type; - } - function parsePrimaryType() { - return tryParsePrimaryType() || eatIdentifierToken(TypeScript.DiagnosticCode.Type_expected); - } - function tryParsePrimaryType() { - var type = tryParseNonArrayType(); - while (type) { - var _currentToken = currentToken(); - if (previousTokenHasTrailingNewLine(_currentToken) || _currentToken.kind() !== 76 /* OpenBracketToken */) { - break; - } - type = new TypeScript.ArrayTypeSyntax(parseNodeData, type, consumeToken(_currentToken), eatToken(77 /* CloseBracketToken */)); - } - return type; - } - function parseTypeQuery(typeOfKeyword) { - return new TypeScript.TypeQuerySyntax(parseNodeData, consumeToken(typeOfKeyword), parseName(true)); - } - function tryParseNonArrayType() { - var _currentToken = currentToken(); - switch (_currentToken.kind()) { - case 62 /* AnyKeyword */: - case 69 /* NumberKeyword */: - case 63 /* BooleanKeyword */: - case 71 /* StringKeyword */: - if (peekToken(1).kind() === 78 /* DotToken */) { - break; - } - return consumeToken(_currentToken); - case 43 /* VoidKeyword */: return consumeToken(_currentToken); - case 74 /* OpenParenToken */: return parseParenthesizedType(_currentToken); - case 72 /* OpenBraceToken */: return parseObjectType(); - case 41 /* TypeOfKeyword */: return parseTypeQuery(_currentToken); - case 76 /* OpenBracketToken */: return parseTupleType(_currentToken); - } - return tryParseNameOrGenericType(); - } - function parseParenthesizedType(openParenToken) { - return new TypeScript.ParenthesizedTypeSyntax(parseNodeData, consumeToken(openParenToken), parseType(), eatToken(75 /* CloseParenToken */)); - } - function tryParseNameOrGenericType() { - var name = tryParseName(false); - if (name === undefined) { - return undefined; - } - if (previousTokenHasTrailingNewLine(currentToken())) { - return name; - } - var typeArgumentList = tryParseTypeArgumentList(false); - return !typeArgumentList ? name : new TypeScript.GenericTypeSyntax(parseNodeData, name, typeArgumentList); - } - function isFunctionType() { - var token0 = currentToken(); - var token0Kind = token0.kind(); - if (token0Kind === 82 /* LessThanToken */) { - return true; - } - if (token0Kind === 74 /* OpenParenToken */) { - var token1 = peekToken(1); - var token1Kind = token1.kind(); - if (token1Kind === 75 /* CloseParenToken */ || token1Kind === 79 /* DotDotDotToken */) { - return true; - } - if (isModifierKind(token1Kind) || isIdentifier(token1)) { - var token2 = peekToken(2); - var token2Kind = token2.kind(); - if (token2Kind === 108 /* ColonToken */ || token2Kind === 81 /* CommaToken */ || token2Kind === 107 /* QuestionToken */ || token2Kind === 109 /* EqualsToken */ || isIdentifier(token2) || isModifierKind(token2Kind)) { - return true; - } - if (token2Kind === 75 /* CloseParenToken */) { - return peekToken(3).kind() === 87 /* EqualsGreaterThanToken */; - } - } - } - return false; - } - function parseFunctionType() { - var typeParameterList = tryParseTypeParameterList(false); - var parameterList = parseParameterList(); - return new TypeScript.FunctionTypeSyntax(parseNodeData, typeParameterList, parameterList, eatToken(87 /* EqualsGreaterThanToken */), parseType()); - } - function parseConstructorType() { - return new TypeScript.ConstructorTypeSyntax(parseNodeData, eatToken(33 /* NewKeyword */), tryParseTypeParameterList(false), parseParameterList(), eatToken(87 /* EqualsGreaterThanToken */), parseType()); - } - function isParameter() { - if (currentNode() && currentNode().kind() === 208 /* Parameter */) { - return true; - } - return isParameterHelper(currentToken()); - } - function isParameterHelper(token) { - var tokenKind = token.kind(); - return tokenKind === 79 /* DotDotDotToken */ || isModifierKind(tokenKind) || isIdentifier(token); - } - function eatSimpleParameter() { - return new TypeScript.ParameterSyntax(parseNodeData, undefined, [], eatIdentifierToken(), undefined, undefined, undefined); - } - function tryParseParameter() { - var node = currentNode(); - if (node && node.kind() === 208 /* Parameter */) { - consumeNode(node); - return node; - } - var dotDotDotToken = tryEatToken(79 /* DotDotDotToken */); - var modifiers = parseModifiers(); - var _currentToken = currentToken(); - if (!isIdentifier(_currentToken) && !dotDotDotToken && modifiers.length === 0) { - if (isModifierKind(_currentToken.kind())) { - modifiers = TypeScript.Syntax.list([consumeToken(_currentToken)]); - } - else { - return undefined; - } - } - var identifier = eatIdentifierToken(); - var questionToken = tryEatToken(107 /* QuestionToken */); - var typeAnnotation = parseOptionalTypeAnnotation(true); - var equalsValueClause = undefined; - if (isEqualsValueClause(true)) { - equalsValueClause = parseEqualsValueClause(true); - } - return new TypeScript.ParameterSyntax(parseNodeData, dotDotDotToken, modifiers, identifier, questionToken, typeAnnotation, equalsValueClause); - } - function parseSyntaxList(currentListType, skippedTokens, processItems) { - var savedListParsingState = listParsingState; - listParsingState |= (1 << currentListType); - var result = parseSyntaxListWorker(currentListType, skippedTokens, processItems); - listParsingState = savedListParsingState; - return result; - } - function parseSeparatedSyntaxList(currentListType, skippedTokens) { - var savedListParsingState = listParsingState; - listParsingState |= (1 << currentListType); - var result = parseSeparatedSyntaxListWorker(currentListType, skippedTokens); - listParsingState = savedListParsingState; - return result; - } - function abortParsingListOrMoveToNextToken(currentListType, nodeAndSeparators, skippedTokens) { - reportUnexpectedTokenDiagnostic(currentListType); - for (var state = ListParsingState.LastListParsingState; state >= ListParsingState.FirstListParsingState; state--) { - if ((listParsingState & (1 << state)) !== 0) { - if (isExpectedListTerminator(state) || isExpectedListItem(state, true)) { - return true; - } - } - } - addSkippedTokenToList(nodeAndSeparators, skippedTokens, consumeToken(currentToken())); - return false; - } - function addSkippedTokenToList(nodesAndSeparators, skippedTokens, skippedToken) { - var length = nodesAndSeparators.length; - for (var i = length - 1; i >= 0; i--) { - var item = nodesAndSeparators[i]; - var _lastToken = TypeScript.lastToken(item); - if (_lastToken && _lastToken.fullWidth() > 0) { - nodesAndSeparators[i] = addSkippedTokenAfterNodeOrToken(item, skippedToken); - return; - } - } - skippedTokens.push(skippedToken); - } - function tryParseExpectedListItem(currentListType, inErrorRecovery, items, processItems) { - var item = tryParseExpectedListItemWorker(currentListType, inErrorRecovery); - if (item === undefined) { - return false; - } - items.push(item); - if (processItems) { - processItems(items); - } - return true; - } - function listIsTerminated(currentListType) { - return isExpectedListTerminator(currentListType) || currentToken().kind() === 8 /* EndOfFileToken */; - } - function parseSyntaxListWorker(currentListType, skippedTokens, processItems) { - var items = []; - while (true) { - var succeeded = tryParseExpectedListItem(currentListType, false, items, processItems); - if (!succeeded) { - if (listIsTerminated(currentListType)) { - break; - } - var abort = abortParsingListOrMoveToNextToken(currentListType, items, skippedTokens); - if (abort) { - break; - } - } - } - return TypeScript.Syntax.list(items); - } - function parseSeparatedSyntaxListWorker(currentListType, skippedTokens) { - var nodesAndSeparators = []; - var _separatorKind = currentListType === 9 /* ObjectType_TypeMembers */ ? 80 /* SemicolonToken */ : 81 /* CommaToken */; - var allowAutomaticSemicolonInsertion = _separatorKind === 80 /* SemicolonToken */; - var inErrorRecovery = false; - while (true) { - var succeeded = tryParseExpectedListItem(currentListType, inErrorRecovery, nodesAndSeparators, undefined); - if (!succeeded) { - if (listIsTerminated(currentListType)) { - break; - } - var abort = abortParsingListOrMoveToNextToken(currentListType, nodesAndSeparators, skippedTokens); - if (abort) { - break; - } - else { - inErrorRecovery = true; - continue; - } - } - inErrorRecovery = false; - var _currentToken = currentToken(); - var tokenKind = _currentToken.kind(); - if (tokenKind === _separatorKind || tokenKind === 81 /* CommaToken */) { - nodesAndSeparators.push(consumeToken(_currentToken)); - continue; - } - if (listIsTerminated(currentListType)) { - break; - } - if (allowAutomaticSemicolonInsertion && canEatAutomaticSemicolon(false)) { - var semicolonToken = eatExplicitOrAutomaticSemicolon(false) || TypeScript.Syntax.emptyToken(80 /* SemicolonToken */); - nodesAndSeparators.push(semicolonToken); - continue; - } - nodesAndSeparators.push(eatToken(_separatorKind)); - inErrorRecovery = true; - } - return TypeScript.Syntax.separatedList(nodesAndSeparators); - } - function reportUnexpectedTokenDiagnostic(listType) { - var token = currentToken(); - var diagnostic = new TypeScript.Diagnostic(fileName, source.text.lineMap(), TypeScript.start(token, source.text), TypeScript.width(token), TypeScript.DiagnosticCode.Unexpected_token_0_expected, [getExpectedListElementType(listType)]); - addDiagnostic(diagnostic); - } - function addDiagnostic(diagnostic) { - if (diagnostics.length > 0 && diagnostics[diagnostics.length - 1].start() === diagnostic.start()) { - return; - } - diagnostics.push(diagnostic); - } - function isExpectedListTerminator(currentListType) { - switch (currentListType) { - case 0 /* SourceUnit_ModuleElements */: return isExpectedSourceUnit_ModuleElementsTerminator(); - case 1 /* ClassDeclaration_ClassElements */: return isExpectedClassDeclaration_ClassElementsTerminator(); - case 2 /* ModuleDeclaration_ModuleElements */: return isExpectedModuleDeclaration_ModuleElementsTerminator(); - case 3 /* SwitchStatement_SwitchClauses */: return isExpectedSwitchStatement_SwitchClausesTerminator(); - case 4 /* SwitchClause_Statements */: return isExpectedSwitchClause_StatementsTerminator(); - case 5 /* Block_Statements */: return isExpectedBlock_StatementsTerminator(); - case 6 /* TryBlock_Statements */: return isExpectedTryBlock_StatementsTerminator(); - case 7 /* CatchBlock_Statements */: return isExpectedCatchBlock_StatementsTerminator(); - case 8 /* EnumDeclaration_EnumElements */: return isExpectedEnumDeclaration_EnumElementsTerminator(); - case 9 /* ObjectType_TypeMembers */: return isExpectedObjectType_TypeMembersTerminator(); - case 10 /* ClassOrInterfaceDeclaration_HeritageClauses */: return isExpectedClassOrInterfaceDeclaration_HeritageClausesTerminator(); - case 11 /* HeritageClause_TypeNameList */: return isExpectedHeritageClause_TypeNameListTerminator(); - case 12 /* VariableDeclaration_VariableDeclarators_AllowIn */: return isExpectedVariableDeclaration_VariableDeclarators_AllowInTerminator(); - case 13 /* VariableDeclaration_VariableDeclarators_DisallowIn */: return isExpectedVariableDeclaration_VariableDeclarators_DisallowInTerminator(); - case 14 /* ArgumentList_AssignmentExpressions */: return isExpectedArgumentList_AssignmentExpressionsTerminator(); - case 15 /* ObjectLiteralExpression_PropertyAssignments */: return isExpectedObjectLiteralExpression_PropertyAssignmentsTerminator(); - case 16 /* ArrayLiteralExpression_AssignmentExpressions */: return isExpectedLiteralExpression_AssignmentExpressionsTerminator(); - case 17 /* ParameterList_Parameters */: return isExpectedParameterList_ParametersTerminator(); - case 18 /* IndexSignature_Parameters */: return isExpectedIndexSignature_ParametersTerminator(); - case 19 /* TypeArgumentList_Types */: return isExpectedTypeArgumentList_TypesTerminator(); - case 20 /* TypeParameterList_TypeParameters */: return isExpectedTypeParameterList_TypeParametersTerminator(); - case 21 /* TupleType_Types */: return isExpectedTupleType_TypesTerminator(); - default: - throw TypeScript.Errors.invalidOperation(); - } - } - function isExpectedSourceUnit_ModuleElementsTerminator() { - return currentToken().kind() === 8 /* EndOfFileToken */; - } - function isExpectedEnumDeclaration_EnumElementsTerminator() { - return currentToken().kind() === 73 /* CloseBraceToken */; - } - function isExpectedModuleDeclaration_ModuleElementsTerminator() { - return currentToken().kind() === 73 /* CloseBraceToken */; - } - function isExpectedObjectType_TypeMembersTerminator() { - return currentToken().kind() === 73 /* CloseBraceToken */; - } - function isExpectedObjectLiteralExpression_PropertyAssignmentsTerminator() { - return currentToken().kind() === 73 /* CloseBraceToken */; - } - function isExpectedLiteralExpression_AssignmentExpressionsTerminator() { - return currentToken().kind() === 77 /* CloseBracketToken */; - } - function isExpectedTypeArgumentList_TypesTerminator() { - var token = currentToken(); - var tokenKind = token.kind(); - if (tokenKind === 83 /* GreaterThanToken */) { - return true; - } - if (canFollowTypeArgumentListInExpression(tokenKind)) { - return true; - } - return false; - } - function isExpectedTupleType_TypesTerminator() { - var token = currentToken(); - var tokenKind = token.kind(); - if (tokenKind === 77 /* CloseBracketToken */) { - return true; - } - return false; - } - function isExpectedTypeParameterList_TypeParametersTerminator() { - var tokenKind = currentToken().kind(); - if (tokenKind === 83 /* GreaterThanToken */) { - return true; - } - if (tokenKind === 74 /* OpenParenToken */ || tokenKind === 72 /* OpenBraceToken */ || tokenKind === 50 /* ExtendsKeyword */ || tokenKind === 53 /* ImplementsKeyword */) { - return true; - } - return false; - } - function isExpectedParameterList_ParametersTerminator() { - var tokenKind = currentToken().kind(); - if (tokenKind === 75 /* CloseParenToken */) { - return true; - } - if (tokenKind === 72 /* OpenBraceToken */) { - return true; - } - if (tokenKind === 87 /* EqualsGreaterThanToken */) { - return true; - } - return false; - } - function isExpectedIndexSignature_ParametersTerminator() { - var tokenKind = currentToken().kind(); - if (tokenKind === 77 /* CloseBracketToken */) { - return true; - } - if (tokenKind === 72 /* OpenBraceToken */) { - return true; - } - return false; - } - function isExpectedVariableDeclaration_VariableDeclarators_DisallowInTerminator() { - var tokenKind = currentToken().kind(); - if (tokenKind === 80 /* SemicolonToken */ || tokenKind === 75 /* CloseParenToken */) { - return true; - } - if (tokenKind === 31 /* InKeyword */) { - return true; - } - return false; - } - function isExpectedVariableDeclaration_VariableDeclarators_AllowInTerminator() { - if (currentToken().kind() === 87 /* EqualsGreaterThanToken */) { - return true; - } - return canEatExplicitOrAutomaticSemicolon(false); - } - function isExpectedClassOrInterfaceDeclaration_HeritageClausesTerminator() { - var tokenKind = currentToken().kind(); - if (tokenKind === 72 /* OpenBraceToken */ || tokenKind === 73 /* CloseBraceToken */) { - return true; - } - return false; - } - function isExpectedHeritageClause_TypeNameListTerminator() { - var tokenKind = currentToken().kind(); - if (tokenKind === 50 /* ExtendsKeyword */ || tokenKind === 53 /* ImplementsKeyword */) { - return true; - } - if (isExpectedClassOrInterfaceDeclaration_HeritageClausesTerminator()) { - return true; - } - return false; - } - function isExpectedArgumentList_AssignmentExpressionsTerminator() { - var token0 = currentToken(); - var tokenKind = token0.kind(); - return tokenKind === 75 /* CloseParenToken */ || tokenKind === 80 /* SemicolonToken */; - } - function isExpectedClassDeclaration_ClassElementsTerminator() { - return currentToken().kind() === 73 /* CloseBraceToken */; - } - function isExpectedSwitchStatement_SwitchClausesTerminator() { - return currentToken().kind() === 73 /* CloseBraceToken */; - } - function isExpectedSwitchClause_StatementsTerminator() { - return currentToken().kind() === 73 /* CloseBraceToken */ || isSwitchClause(); - } - function isExpectedBlock_StatementsTerminator() { - return currentToken().kind() === 73 /* CloseBraceToken */; - } - function isExpectedTryBlock_StatementsTerminator() { - var tokenKind = currentToken().kind(); - return tokenKind === 19 /* CatchKeyword */ || tokenKind === 27 /* FinallyKeyword */; - } - function isExpectedCatchBlock_StatementsTerminator() { - return currentToken().kind() === 27 /* FinallyKeyword */; - } - function isExpectedListItem(currentListType, inErrorRecovery) { - switch (currentListType) { - case 0 /* SourceUnit_ModuleElements */: return isModuleElement(inErrorRecovery); - case 1 /* ClassDeclaration_ClassElements */: return isClassElement(inErrorRecovery); - case 2 /* ModuleDeclaration_ModuleElements */: return isModuleElement(inErrorRecovery); - case 3 /* SwitchStatement_SwitchClauses */: return isSwitchClause(); - case 4 /* SwitchClause_Statements */: return isStatement(modifierCount(), inErrorRecovery); - case 5 /* Block_Statements */: return isStatement(modifierCount(), inErrorRecovery); - case 6 /* TryBlock_Statements */: return false; - case 7 /* CatchBlock_Statements */: return false; - case 8 /* EnumDeclaration_EnumElements */: return isEnumElement(inErrorRecovery); - case 9 /* ObjectType_TypeMembers */: return isTypeMember(inErrorRecovery); - case 10 /* ClassOrInterfaceDeclaration_HeritageClauses */: return isHeritageClause(); - case 11 /* HeritageClause_TypeNameList */: return isHeritageClauseTypeName(); - case 12 /* VariableDeclaration_VariableDeclarators_AllowIn */: return isVariableDeclarator(); - case 13 /* VariableDeclaration_VariableDeclarators_DisallowIn */: return isVariableDeclarator(); - case 14 /* ArgumentList_AssignmentExpressions */: return isExpectedArgumentList_AssignmentExpression(); - case 15 /* ObjectLiteralExpression_PropertyAssignments */: return isPropertyAssignment(inErrorRecovery); - case 16 /* ArrayLiteralExpression_AssignmentExpressions */: return isAssignmentOrOmittedExpression(); - case 17 /* ParameterList_Parameters */: return isParameter(); - case 18 /* IndexSignature_Parameters */: return isParameter(); - case 19 /* TypeArgumentList_Types */: return isType(); - case 20 /* TypeParameterList_TypeParameters */: return isTypeParameter(); - case 21 /* TupleType_Types */: return isType(); - default: throw TypeScript.Errors.invalidOperation(); - } - } - function isExpectedArgumentList_AssignmentExpression() { - var _currentToken = currentToken(); - if (isExpression(_currentToken)) { - return true; - } - if (_currentToken.kind() === 81 /* CommaToken */) { - return true; - } - return false; - } - function tryParseExpectedListItemWorker(currentListType, inErrorRecovery) { - switch (currentListType) { - case 0 /* SourceUnit_ModuleElements */: return tryParseModuleElement(inErrorRecovery); - case 1 /* ClassDeclaration_ClassElements */: return tryParseClassElement(inErrorRecovery); - case 2 /* ModuleDeclaration_ModuleElements */: return tryParseModuleElement(inErrorRecovery); - case 3 /* SwitchStatement_SwitchClauses */: return tryParseSwitchClause(); - case 4 /* SwitchClause_Statements */: return tryParseStatement(inErrorRecovery); - case 5 /* Block_Statements */: return tryParseStatement(inErrorRecovery); - case 6 /* TryBlock_Statements */: return tryParseStatement(inErrorRecovery); - case 7 /* CatchBlock_Statements */: return tryParseStatement(inErrorRecovery); - case 8 /* EnumDeclaration_EnumElements */: return tryParseEnumElement(inErrorRecovery); - case 9 /* ObjectType_TypeMembers */: return tryParseTypeMember(inErrorRecovery); - case 10 /* ClassOrInterfaceDeclaration_HeritageClauses */: return tryParseHeritageClause(); - case 11 /* HeritageClause_TypeNameList */: return tryParseHeritageClauseTypeName(); - case 12 /* VariableDeclaration_VariableDeclarators_AllowIn */: return tryParseVariableDeclarator(true, false); - case 13 /* VariableDeclaration_VariableDeclarators_DisallowIn */: return tryParseVariableDeclarator(false, false); - case 14 /* ArgumentList_AssignmentExpressions */: return tryParseArgumentListExpression(); - case 15 /* ObjectLiteralExpression_PropertyAssignments */: return tryParsePropertyAssignment(inErrorRecovery); - case 16 /* ArrayLiteralExpression_AssignmentExpressions */: return tryParseAssignmentOrOmittedExpression(); - case 17 /* ParameterList_Parameters */: return tryParseParameter(); - case 18 /* IndexSignature_Parameters */: return tryParseParameter(); - case 19 /* TypeArgumentList_Types */: return tryParseType(); - case 20 /* TypeParameterList_TypeParameters */: return tryParseTypeParameter(); - case 21 /* TupleType_Types */: return tryParseType(); - default: throw TypeScript.Errors.invalidOperation(); - } - } - function getExpectedListElementType(currentListType) { - switch (currentListType) { - case 0 /* SourceUnit_ModuleElements */: return TypeScript.getLocalizedText(TypeScript.DiagnosticCode.module_class_interface_enum_import_or_statement, undefined); - case 10 /* ClassOrInterfaceDeclaration_HeritageClauses */: return '{'; - case 1 /* ClassDeclaration_ClassElements */: return TypeScript.getLocalizedText(TypeScript.DiagnosticCode.constructor_function_accessor_or_variable, undefined); - case 2 /* ModuleDeclaration_ModuleElements */: return TypeScript.getLocalizedText(TypeScript.DiagnosticCode.module_class_interface_enum_import_or_statement, undefined); - case 3 /* SwitchStatement_SwitchClauses */: return TypeScript.getLocalizedText(TypeScript.DiagnosticCode.case_or_default_clause, undefined); - case 4 /* SwitchClause_Statements */: return TypeScript.getLocalizedText(TypeScript.DiagnosticCode.statement, undefined); - case 5 /* Block_Statements */: return TypeScript.getLocalizedText(TypeScript.DiagnosticCode.statement, undefined); - case 12 /* VariableDeclaration_VariableDeclarators_AllowIn */: return TypeScript.getLocalizedText(TypeScript.DiagnosticCode.identifier, undefined); - case 13 /* VariableDeclaration_VariableDeclarators_DisallowIn */: return TypeScript.getLocalizedText(TypeScript.DiagnosticCode.identifier, undefined); - case 8 /* EnumDeclaration_EnumElements */: return TypeScript.getLocalizedText(TypeScript.DiagnosticCode.identifier, undefined); - case 9 /* ObjectType_TypeMembers */: return TypeScript.getLocalizedText(TypeScript.DiagnosticCode.call_construct_index_property_or_function_signature, undefined); - case 14 /* ArgumentList_AssignmentExpressions */: return TypeScript.getLocalizedText(TypeScript.DiagnosticCode.expression, undefined); - case 11 /* HeritageClause_TypeNameList */: return TypeScript.getLocalizedText(TypeScript.DiagnosticCode.type_name, undefined); - case 15 /* ObjectLiteralExpression_PropertyAssignments */: return TypeScript.getLocalizedText(TypeScript.DiagnosticCode.property_or_accessor, undefined); - case 17 /* ParameterList_Parameters */: return TypeScript.getLocalizedText(TypeScript.DiagnosticCode.parameter, undefined); - case 18 /* IndexSignature_Parameters */: return TypeScript.getLocalizedText(TypeScript.DiagnosticCode.parameter, undefined); - case 19 /* TypeArgumentList_Types */: return TypeScript.getLocalizedText(TypeScript.DiagnosticCode.type, undefined); - case 20 /* TypeParameterList_TypeParameters */: return TypeScript.getLocalizedText(TypeScript.DiagnosticCode.type_parameter, undefined); - case 21 /* TupleType_Types */: return TypeScript.getLocalizedText(TypeScript.DiagnosticCode.type, undefined); - case 16 /* ArrayLiteralExpression_AssignmentExpressions */: return TypeScript.getLocalizedText(TypeScript.DiagnosticCode.expression, undefined); - default: throw TypeScript.Errors.invalidOperation(); - } - } - return parseSyntaxTree; - } - var BinaryExpressionPrecedence; - (function (BinaryExpressionPrecedence) { - BinaryExpressionPrecedence[BinaryExpressionPrecedence["Lowest"] = 1] = "Lowest"; - BinaryExpressionPrecedence[BinaryExpressionPrecedence["LogicalOrExpressionPrecedence"] = 2] = "LogicalOrExpressionPrecedence"; - BinaryExpressionPrecedence[BinaryExpressionPrecedence["LogicalAndExpressionPrecedence"] = 3] = "LogicalAndExpressionPrecedence"; - BinaryExpressionPrecedence[BinaryExpressionPrecedence["BitwiseOrExpressionPrecedence"] = 4] = "BitwiseOrExpressionPrecedence"; - BinaryExpressionPrecedence[BinaryExpressionPrecedence["BitwiseExclusiveOrExpressionPrecedence"] = 5] = "BitwiseExclusiveOrExpressionPrecedence"; - BinaryExpressionPrecedence[BinaryExpressionPrecedence["BitwiseAndExpressionPrecedence"] = 6] = "BitwiseAndExpressionPrecedence"; - BinaryExpressionPrecedence[BinaryExpressionPrecedence["EqualityExpressionPrecedence"] = 7] = "EqualityExpressionPrecedence"; - BinaryExpressionPrecedence[BinaryExpressionPrecedence["RelationalExpressionPrecedence"] = 8] = "RelationalExpressionPrecedence"; - BinaryExpressionPrecedence[BinaryExpressionPrecedence["ShiftExpressionPrecdence"] = 9] = "ShiftExpressionPrecdence"; - BinaryExpressionPrecedence[BinaryExpressionPrecedence["AdditiveExpressionPrecedence"] = 10] = "AdditiveExpressionPrecedence"; - BinaryExpressionPrecedence[BinaryExpressionPrecedence["MultiplicativeExpressionPrecedence"] = 11] = "MultiplicativeExpressionPrecedence"; - })(BinaryExpressionPrecedence || (BinaryExpressionPrecedence = {})); - var ListParsingState; - (function (ListParsingState) { - ListParsingState[ListParsingState["SourceUnit_ModuleElements"] = 0] = "SourceUnit_ModuleElements"; - ListParsingState[ListParsingState["ClassDeclaration_ClassElements"] = 1] = "ClassDeclaration_ClassElements"; - ListParsingState[ListParsingState["ModuleDeclaration_ModuleElements"] = 2] = "ModuleDeclaration_ModuleElements"; - ListParsingState[ListParsingState["SwitchStatement_SwitchClauses"] = 3] = "SwitchStatement_SwitchClauses"; - ListParsingState[ListParsingState["SwitchClause_Statements"] = 4] = "SwitchClause_Statements"; - ListParsingState[ListParsingState["Block_Statements"] = 5] = "Block_Statements"; - ListParsingState[ListParsingState["TryBlock_Statements"] = 6] = "TryBlock_Statements"; - ListParsingState[ListParsingState["CatchBlock_Statements"] = 7] = "CatchBlock_Statements"; - ListParsingState[ListParsingState["EnumDeclaration_EnumElements"] = 8] = "EnumDeclaration_EnumElements"; - ListParsingState[ListParsingState["ObjectType_TypeMembers"] = 9] = "ObjectType_TypeMembers"; - ListParsingState[ListParsingState["ClassOrInterfaceDeclaration_HeritageClauses"] = 10] = "ClassOrInterfaceDeclaration_HeritageClauses"; - ListParsingState[ListParsingState["HeritageClause_TypeNameList"] = 11] = "HeritageClause_TypeNameList"; - ListParsingState[ListParsingState["VariableDeclaration_VariableDeclarators_AllowIn"] = 12] = "VariableDeclaration_VariableDeclarators_AllowIn"; - ListParsingState[ListParsingState["VariableDeclaration_VariableDeclarators_DisallowIn"] = 13] = "VariableDeclaration_VariableDeclarators_DisallowIn"; - ListParsingState[ListParsingState["ArgumentList_AssignmentExpressions"] = 14] = "ArgumentList_AssignmentExpressions"; - ListParsingState[ListParsingState["ObjectLiteralExpression_PropertyAssignments"] = 15] = "ObjectLiteralExpression_PropertyAssignments"; - ListParsingState[ListParsingState["ArrayLiteralExpression_AssignmentExpressions"] = 16] = "ArrayLiteralExpression_AssignmentExpressions"; - ListParsingState[ListParsingState["ParameterList_Parameters"] = 17] = "ParameterList_Parameters"; - ListParsingState[ListParsingState["IndexSignature_Parameters"] = 18] = "IndexSignature_Parameters"; - ListParsingState[ListParsingState["TypeArgumentList_Types"] = 19] = "TypeArgumentList_Types"; - ListParsingState[ListParsingState["TypeParameterList_TypeParameters"] = 20] = "TypeParameterList_TypeParameters"; - ListParsingState[ListParsingState["TupleType_Types"] = 21] = "TupleType_Types"; - ListParsingState[ListParsingState["FirstListParsingState"] = ListParsingState.SourceUnit_ModuleElements] = "FirstListParsingState"; - ListParsingState[ListParsingState["LastListParsingState"] = ListParsingState.TupleType_Types] = "LastListParsingState"; - })(ListParsingState || (ListParsingState = {})); - var parseSyntaxTree = createParseSyntaxTree(); - function parse(fileName, text, languageVersion, isDeclaration) { - return parseSource(TypeScript.Scanner.createParserSource(fileName, text, languageVersion), isDeclaration); - } - Parser.parse = parse; - function parseSource(source, isDeclaration) { - return parseSyntaxTree(source, isDeclaration); - } - Parser.parseSource = parseSource; - })(Parser = TypeScript.Parser || (TypeScript.Parser = {})); -})(TypeScript || (TypeScript = {})); -var TypeScript; -(function (TypeScript) { - TypeScript.SourceUnitSyntax = function (data, moduleElements, endOfFileToken) { - if (data) { - this.__data = data; - } - this.moduleElements = moduleElements, this.endOfFileToken = endOfFileToken; - moduleElements.parent = this, endOfFileToken.parent = this; - }; - TypeScript.SourceUnitSyntax.prototype.kind = function () { - return 122 /* SourceUnit */; - }; - TypeScript.QualifiedNameSyntax = function (data, left, dotToken, right) { - if (data) { - this.__data = data; - } - this.left = left, this.dotToken = dotToken, this.right = right; - left.parent = this, dotToken.parent = this, right.parent = this; - }; - TypeScript.QualifiedNameSyntax.prototype.kind = function () { - return 123 /* QualifiedName */; - }; - TypeScript.ObjectTypeSyntax = function (data, openBraceToken, typeMembers, closeBraceToken) { - if (data) { - this.__data = data; - } - this.openBraceToken = openBraceToken, this.typeMembers = typeMembers, this.closeBraceToken = closeBraceToken; - openBraceToken.parent = this, typeMembers.parent = this, closeBraceToken.parent = this; - }; - TypeScript.ObjectTypeSyntax.prototype.kind = function () { - return 124 /* ObjectType */; - }; - TypeScript.FunctionTypeSyntax = function (data, typeParameterList, parameterList, equalsGreaterThanToken, type) { - if (data) { - this.__data = data; - } - this.typeParameterList = typeParameterList, this.parameterList = parameterList, this.equalsGreaterThanToken = equalsGreaterThanToken, this.type = type; - typeParameterList && (typeParameterList.parent = this), parameterList.parent = this, equalsGreaterThanToken.parent = this, type.parent = this; - }; - TypeScript.FunctionTypeSyntax.prototype.kind = function () { - return 125 /* FunctionType */; - }; - TypeScript.ArrayTypeSyntax = function (data, type, openBracketToken, closeBracketToken) { - if (data) { - this.__data = data; - } - this.type = type, this.openBracketToken = openBracketToken, this.closeBracketToken = closeBracketToken; - type.parent = this, openBracketToken.parent = this, closeBracketToken.parent = this; - }; - TypeScript.ArrayTypeSyntax.prototype.kind = function () { - return 126 /* ArrayType */; - }; - TypeScript.ConstructorTypeSyntax = function (data, newKeyword, typeParameterList, parameterList, equalsGreaterThanToken, type) { - if (data) { - this.__data = data; - } - this.newKeyword = newKeyword, this.typeParameterList = typeParameterList, this.parameterList = parameterList, this.equalsGreaterThanToken = equalsGreaterThanToken, this.type = type; - newKeyword.parent = this, typeParameterList && (typeParameterList.parent = this), parameterList.parent = this, equalsGreaterThanToken.parent = this, type.parent = this; - }; - TypeScript.ConstructorTypeSyntax.prototype.kind = function () { - return 127 /* ConstructorType */; - }; - TypeScript.GenericTypeSyntax = function (data, name, typeArgumentList) { - if (data) { - this.__data = data; - } - this.name = name, this.typeArgumentList = typeArgumentList; - name.parent = this, typeArgumentList.parent = this; - }; - TypeScript.GenericTypeSyntax.prototype.kind = function () { - return 128 /* GenericType */; - }; - TypeScript.TypeQuerySyntax = function (data, typeOfKeyword, name) { - if (data) { - this.__data = data; - } - this.typeOfKeyword = typeOfKeyword, this.name = name; - typeOfKeyword.parent = this, name.parent = this; - }; - TypeScript.TypeQuerySyntax.prototype.kind = function () { - return 129 /* TypeQuery */; - }; - TypeScript.TupleTypeSyntax = function (data, openBracketToken, types, closeBracketToken) { - if (data) { - this.__data = data; - } - this.openBracketToken = openBracketToken, this.types = types, this.closeBracketToken = closeBracketToken; - openBracketToken.parent = this, types.parent = this, closeBracketToken.parent = this; - }; - TypeScript.TupleTypeSyntax.prototype.kind = function () { - return 130 /* TupleType */; - }; - TypeScript.UnionTypeSyntax = function (data, left, barToken, right) { - if (data) { - this.__data = data; - } - this.left = left, this.barToken = barToken, this.right = right; - left.parent = this, barToken.parent = this, right.parent = this; - }; - TypeScript.UnionTypeSyntax.prototype.kind = function () { - return 131 /* UnionType */; - }; - TypeScript.ParenthesizedTypeSyntax = function (data, openParenToken, type, closeParenToken) { - if (data) { - this.__data = data; - } - this.openParenToken = openParenToken, this.type = type, this.closeParenToken = closeParenToken; - openParenToken.parent = this, type.parent = this, closeParenToken.parent = this; - }; - TypeScript.ParenthesizedTypeSyntax.prototype.kind = function () { - return 132 /* ParenthesizedType */; - }; - TypeScript.InterfaceDeclarationSyntax = function (data, modifiers, interfaceKeyword, identifier, typeParameterList, heritageClauses, body) { - if (data) { - this.__data = data; - } - this.modifiers = modifiers, this.interfaceKeyword = interfaceKeyword, this.identifier = identifier, this.typeParameterList = typeParameterList, this.heritageClauses = heritageClauses, this.body = body; - modifiers.parent = this, interfaceKeyword.parent = this, identifier.parent = this, typeParameterList && (typeParameterList.parent = this), heritageClauses.parent = this, body.parent = this; - }; - TypeScript.InterfaceDeclarationSyntax.prototype.kind = function () { - return 133 /* InterfaceDeclaration */; - }; - TypeScript.FunctionDeclarationSyntax = function (data, modifiers, functionKeyword, identifier, callSignature, block, semicolonToken) { - if (data) { - this.__data = data; - } - this.modifiers = modifiers, this.functionKeyword = functionKeyword, this.identifier = identifier, this.callSignature = callSignature, this.block = block, this.semicolonToken = semicolonToken; - modifiers.parent = this, functionKeyword.parent = this, identifier.parent = this, callSignature.parent = this, block && (block.parent = this), semicolonToken && (semicolonToken.parent = this); - }; - TypeScript.FunctionDeclarationSyntax.prototype.kind = function () { - return 134 /* FunctionDeclaration */; - }; - TypeScript.ModuleDeclarationSyntax = function (data, modifiers, moduleKeyword, name, stringLiteral, openBraceToken, moduleElements, closeBraceToken) { - if (data) { - this.__data = data; - } - this.modifiers = modifiers, this.moduleKeyword = moduleKeyword, this.name = name, this.stringLiteral = stringLiteral, this.openBraceToken = openBraceToken, this.moduleElements = moduleElements, this.closeBraceToken = closeBraceToken; - modifiers.parent = this, moduleKeyword.parent = this, name && (name.parent = this), stringLiteral && (stringLiteral.parent = this), openBraceToken.parent = this, moduleElements.parent = this, closeBraceToken.parent = this; - }; - TypeScript.ModuleDeclarationSyntax.prototype.kind = function () { - return 135 /* ModuleDeclaration */; - }; - TypeScript.ClassDeclarationSyntax = function (data, modifiers, classKeyword, identifier, typeParameterList, heritageClauses, openBraceToken, classElements, closeBraceToken) { - if (data) { - this.__data = data; - } - this.modifiers = modifiers, this.classKeyword = classKeyword, this.identifier = identifier, this.typeParameterList = typeParameterList, this.heritageClauses = heritageClauses, this.openBraceToken = openBraceToken, this.classElements = classElements, this.closeBraceToken = closeBraceToken; - modifiers.parent = this, classKeyword.parent = this, identifier.parent = this, typeParameterList && (typeParameterList.parent = this), heritageClauses.parent = this, openBraceToken.parent = this, classElements.parent = this, closeBraceToken.parent = this; - }; - TypeScript.ClassDeclarationSyntax.prototype.kind = function () { - return 136 /* ClassDeclaration */; - }; - TypeScript.EnumDeclarationSyntax = function (data, modifiers, enumKeyword, identifier, openBraceToken, enumElements, closeBraceToken) { - if (data) { - this.__data = data; - } - this.modifiers = modifiers, this.enumKeyword = enumKeyword, this.identifier = identifier, this.openBraceToken = openBraceToken, this.enumElements = enumElements, this.closeBraceToken = closeBraceToken; - modifiers.parent = this, enumKeyword.parent = this, identifier.parent = this, openBraceToken.parent = this, enumElements.parent = this, closeBraceToken.parent = this; - }; - TypeScript.EnumDeclarationSyntax.prototype.kind = function () { - return 137 /* EnumDeclaration */; - }; - TypeScript.ImportDeclarationSyntax = function (data, modifiers, importKeyword, identifier, equalsToken, moduleReference, semicolonToken) { - if (data) { - this.__data = data; - } - this.modifiers = modifiers, this.importKeyword = importKeyword, this.identifier = identifier, this.equalsToken = equalsToken, this.moduleReference = moduleReference, this.semicolonToken = semicolonToken; - modifiers.parent = this, importKeyword.parent = this, identifier.parent = this, equalsToken.parent = this, moduleReference.parent = this, semicolonToken && (semicolonToken.parent = this); - }; - TypeScript.ImportDeclarationSyntax.prototype.kind = function () { - return 138 /* ImportDeclaration */; - }; - TypeScript.ExportAssignmentSyntax = function (data, exportKeyword, equalsToken, identifier, semicolonToken) { - if (data) { - this.__data = data; - } - this.exportKeyword = exportKeyword, this.equalsToken = equalsToken, this.identifier = identifier, this.semicolonToken = semicolonToken; - exportKeyword.parent = this, equalsToken.parent = this, identifier.parent = this, semicolonToken && (semicolonToken.parent = this); - }; - TypeScript.ExportAssignmentSyntax.prototype.kind = function () { - return 139 /* ExportAssignment */; - }; - TypeScript.MemberFunctionDeclarationSyntax = function (data, modifiers, propertyName, callSignature, block, semicolonToken) { - if (data) { - this.__data = data; - } - this.modifiers = modifiers, this.propertyName = propertyName, this.callSignature = callSignature, this.block = block, this.semicolonToken = semicolonToken; - modifiers.parent = this, propertyName.parent = this, callSignature.parent = this, block && (block.parent = this), semicolonToken && (semicolonToken.parent = this); - }; - TypeScript.MemberFunctionDeclarationSyntax.prototype.kind = function () { - return 140 /* MemberFunctionDeclaration */; - }; - TypeScript.MemberVariableDeclarationSyntax = function (data, modifiers, variableDeclarator, semicolonToken) { - if (data) { - this.__data = data; - } - this.modifiers = modifiers, this.variableDeclarator = variableDeclarator, this.semicolonToken = semicolonToken; - modifiers.parent = this, variableDeclarator.parent = this, semicolonToken && (semicolonToken.parent = this); - }; - TypeScript.MemberVariableDeclarationSyntax.prototype.kind = function () { - return 141 /* MemberVariableDeclaration */; - }; - TypeScript.ConstructorDeclarationSyntax = function (data, modifiers, constructorKeyword, callSignature, block, semicolonToken) { - if (data) { - this.__data = data; - } - this.modifiers = modifiers, this.constructorKeyword = constructorKeyword, this.callSignature = callSignature, this.block = block, this.semicolonToken = semicolonToken; - modifiers.parent = this, constructorKeyword.parent = this, callSignature.parent = this, block && (block.parent = this), semicolonToken && (semicolonToken.parent = this); - }; - TypeScript.ConstructorDeclarationSyntax.prototype.kind = function () { - return 142 /* ConstructorDeclaration */; - }; - TypeScript.IndexMemberDeclarationSyntax = function (data, modifiers, indexSignature, semicolonToken) { - if (data) { - this.__data = data; - } - this.modifiers = modifiers, this.indexSignature = indexSignature, this.semicolonToken = semicolonToken; - modifiers.parent = this, indexSignature.parent = this, semicolonToken && (semicolonToken.parent = this); - }; - TypeScript.IndexMemberDeclarationSyntax.prototype.kind = function () { - return 143 /* IndexMemberDeclaration */; - }; - TypeScript.GetAccessorSyntax = function (data, modifiers, getKeyword, propertyName, callSignature, block) { - if (data) { - this.__data = data; - } - this.modifiers = modifiers, this.getKeyword = getKeyword, this.propertyName = propertyName, this.callSignature = callSignature, this.block = block; - modifiers.parent = this, getKeyword.parent = this, propertyName.parent = this, callSignature.parent = this, block.parent = this; - }; - TypeScript.GetAccessorSyntax.prototype.kind = function () { - return 144 /* GetAccessor */; - }; - TypeScript.SetAccessorSyntax = function (data, modifiers, setKeyword, propertyName, callSignature, block) { - if (data) { - this.__data = data; - } - this.modifiers = modifiers, this.setKeyword = setKeyword, this.propertyName = propertyName, this.callSignature = callSignature, this.block = block; - modifiers.parent = this, setKeyword.parent = this, propertyName.parent = this, callSignature.parent = this, block.parent = this; - }; - TypeScript.SetAccessorSyntax.prototype.kind = function () { - return 145 /* SetAccessor */; - }; - TypeScript.PropertySignatureSyntax = function (data, propertyName, questionToken, typeAnnotation) { - if (data) { - this.__data = data; - } - this.propertyName = propertyName, this.questionToken = questionToken, this.typeAnnotation = typeAnnotation; - propertyName.parent = this, questionToken && (questionToken.parent = this), typeAnnotation && (typeAnnotation.parent = this); - }; - TypeScript.PropertySignatureSyntax.prototype.kind = function () { - return 146 /* PropertySignature */; - }; - TypeScript.CallSignatureSyntax = function (data, typeParameterList, parameterList, typeAnnotation) { - if (data) { - this.__data = data; - } - this.typeParameterList = typeParameterList, this.parameterList = parameterList, this.typeAnnotation = typeAnnotation; - typeParameterList && (typeParameterList.parent = this), parameterList.parent = this, typeAnnotation && (typeAnnotation.parent = this); - }; - TypeScript.CallSignatureSyntax.prototype.kind = function () { - return 147 /* CallSignature */; - }; - TypeScript.ConstructSignatureSyntax = function (data, newKeyword, callSignature) { - if (data) { - this.__data = data; - } - this.newKeyword = newKeyword, this.callSignature = callSignature; - newKeyword.parent = this, callSignature.parent = this; - }; - TypeScript.ConstructSignatureSyntax.prototype.kind = function () { - return 148 /* ConstructSignature */; - }; - TypeScript.IndexSignatureSyntax = function (data, openBracketToken, parameters, closeBracketToken, typeAnnotation) { - if (data) { - this.__data = data; - } - this.openBracketToken = openBracketToken, this.parameters = parameters, this.closeBracketToken = closeBracketToken, this.typeAnnotation = typeAnnotation; - openBracketToken.parent = this, parameters.parent = this, closeBracketToken.parent = this, typeAnnotation && (typeAnnotation.parent = this); - }; - TypeScript.IndexSignatureSyntax.prototype.kind = function () { - return 149 /* IndexSignature */; - }; - TypeScript.MethodSignatureSyntax = function (data, propertyName, questionToken, callSignature) { - if (data) { - this.__data = data; - } - this.propertyName = propertyName, this.questionToken = questionToken, this.callSignature = callSignature; - propertyName.parent = this, questionToken && (questionToken.parent = this), callSignature.parent = this; - }; - TypeScript.MethodSignatureSyntax.prototype.kind = function () { - return 150 /* MethodSignature */; - }; - TypeScript.BlockSyntax = function (data, openBraceToken, statements, closeBraceToken) { - if (data) { - this.__data = data; - } - this.openBraceToken = openBraceToken, this.statements = statements, this.closeBraceToken = closeBraceToken; - openBraceToken.parent = this, statements.parent = this, closeBraceToken.parent = this; - }; - TypeScript.BlockSyntax.prototype.kind = function () { - return 151 /* Block */; - }; - TypeScript.IfStatementSyntax = function (data, ifKeyword, openParenToken, condition, closeParenToken, statement, elseClause) { - if (data) { - this.__data = data; - } - this.ifKeyword = ifKeyword, this.openParenToken = openParenToken, this.condition = condition, this.closeParenToken = closeParenToken, this.statement = statement, this.elseClause = elseClause; - ifKeyword.parent = this, openParenToken.parent = this, condition.parent = this, closeParenToken.parent = this, statement.parent = this, elseClause && (elseClause.parent = this); - }; - TypeScript.IfStatementSyntax.prototype.kind = function () { - return 152 /* IfStatement */; - }; - TypeScript.VariableStatementSyntax = function (data, modifiers, variableDeclaration, semicolonToken) { - if (data) { - this.__data = data; - } - this.modifiers = modifiers, this.variableDeclaration = variableDeclaration, this.semicolonToken = semicolonToken; - modifiers.parent = this, variableDeclaration.parent = this, semicolonToken && (semicolonToken.parent = this); - }; - TypeScript.VariableStatementSyntax.prototype.kind = function () { - return 153 /* VariableStatement */; - }; - TypeScript.ExpressionStatementSyntax = function (data, expression, semicolonToken) { - if (data) { - this.__data = data; - } - this.expression = expression, this.semicolonToken = semicolonToken; - expression.parent = this, semicolonToken && (semicolonToken.parent = this); - }; - TypeScript.ExpressionStatementSyntax.prototype.kind = function () { - return 154 /* ExpressionStatement */; - }; - TypeScript.ReturnStatementSyntax = function (data, returnKeyword, expression, semicolonToken) { - if (data) { - this.__data = data; - } - this.returnKeyword = returnKeyword, this.expression = expression, this.semicolonToken = semicolonToken; - returnKeyword.parent = this, expression && (expression.parent = this), semicolonToken && (semicolonToken.parent = this); - }; - TypeScript.ReturnStatementSyntax.prototype.kind = function () { - return 155 /* ReturnStatement */; - }; - TypeScript.SwitchStatementSyntax = function (data, switchKeyword, openParenToken, expression, closeParenToken, openBraceToken, switchClauses, closeBraceToken) { - if (data) { - this.__data = data; - } - this.switchKeyword = switchKeyword, this.openParenToken = openParenToken, this.expression = expression, this.closeParenToken = closeParenToken, this.openBraceToken = openBraceToken, this.switchClauses = switchClauses, this.closeBraceToken = closeBraceToken; - switchKeyword.parent = this, openParenToken.parent = this, expression.parent = this, closeParenToken.parent = this, openBraceToken.parent = this, switchClauses.parent = this, closeBraceToken.parent = this; - }; - TypeScript.SwitchStatementSyntax.prototype.kind = function () { - return 156 /* SwitchStatement */; - }; - TypeScript.BreakStatementSyntax = function (data, breakKeyword, identifier, semicolonToken) { - if (data) { - this.__data = data; - } - this.breakKeyword = breakKeyword, this.identifier = identifier, this.semicolonToken = semicolonToken; - breakKeyword.parent = this, identifier && (identifier.parent = this), semicolonToken && (semicolonToken.parent = this); - }; - TypeScript.BreakStatementSyntax.prototype.kind = function () { - return 157 /* BreakStatement */; - }; - TypeScript.ContinueStatementSyntax = function (data, continueKeyword, identifier, semicolonToken) { - if (data) { - this.__data = data; - } - this.continueKeyword = continueKeyword, this.identifier = identifier, this.semicolonToken = semicolonToken; - continueKeyword.parent = this, identifier && (identifier.parent = this), semicolonToken && (semicolonToken.parent = this); - }; - TypeScript.ContinueStatementSyntax.prototype.kind = function () { - return 158 /* ContinueStatement */; - }; - TypeScript.ForStatementSyntax = function (data, forKeyword, openParenToken, variableDeclaration, initializer, firstSemicolonToken, condition, secondSemicolonToken, incrementor, closeParenToken, statement) { - if (data) { - this.__data = data; - } - this.forKeyword = forKeyword, this.openParenToken = openParenToken, this.variableDeclaration = variableDeclaration, this.initializer = initializer, this.firstSemicolonToken = firstSemicolonToken, this.condition = condition, this.secondSemicolonToken = secondSemicolonToken, this.incrementor = incrementor, this.closeParenToken = closeParenToken, this.statement = statement; - forKeyword.parent = this, openParenToken.parent = this, variableDeclaration && (variableDeclaration.parent = this), initializer && (initializer.parent = this), firstSemicolonToken.parent = this, condition && (condition.parent = this), secondSemicolonToken.parent = this, incrementor && (incrementor.parent = this), closeParenToken.parent = this, statement.parent = this; - }; - TypeScript.ForStatementSyntax.prototype.kind = function () { - return 159 /* ForStatement */; - }; - TypeScript.ForInStatementSyntax = function (data, forKeyword, openParenToken, variableDeclaration, left, inKeyword, expression, closeParenToken, statement) { - if (data) { - this.__data = data; - } - this.forKeyword = forKeyword, this.openParenToken = openParenToken, this.variableDeclaration = variableDeclaration, this.left = left, this.inKeyword = inKeyword, this.expression = expression, this.closeParenToken = closeParenToken, this.statement = statement; - forKeyword.parent = this, openParenToken.parent = this, variableDeclaration && (variableDeclaration.parent = this), left && (left.parent = this), inKeyword.parent = this, expression.parent = this, closeParenToken.parent = this, statement.parent = this; - }; - TypeScript.ForInStatementSyntax.prototype.kind = function () { - return 160 /* ForInStatement */; - }; - TypeScript.EmptyStatementSyntax = function (data, semicolonToken) { - if (data) { - this.__data = data; - } - this.semicolonToken = semicolonToken; - semicolonToken.parent = this; - }; - TypeScript.EmptyStatementSyntax.prototype.kind = function () { - return 161 /* EmptyStatement */; - }; - TypeScript.ThrowStatementSyntax = function (data, throwKeyword, expression, semicolonToken) { - if (data) { - this.__data = data; - } - this.throwKeyword = throwKeyword, this.expression = expression, this.semicolonToken = semicolonToken; - throwKeyword.parent = this, expression.parent = this, semicolonToken && (semicolonToken.parent = this); - }; - TypeScript.ThrowStatementSyntax.prototype.kind = function () { - return 162 /* ThrowStatement */; - }; - TypeScript.WhileStatementSyntax = function (data, whileKeyword, openParenToken, condition, closeParenToken, statement) { - if (data) { - this.__data = data; - } - this.whileKeyword = whileKeyword, this.openParenToken = openParenToken, this.condition = condition, this.closeParenToken = closeParenToken, this.statement = statement; - whileKeyword.parent = this, openParenToken.parent = this, condition.parent = this, closeParenToken.parent = this, statement.parent = this; - }; - TypeScript.WhileStatementSyntax.prototype.kind = function () { - return 163 /* WhileStatement */; - }; - TypeScript.TryStatementSyntax = function (data, tryKeyword, block, catchClause, finallyClause) { - if (data) { - this.__data = data; - } - this.tryKeyword = tryKeyword, this.block = block, this.catchClause = catchClause, this.finallyClause = finallyClause; - tryKeyword.parent = this, block.parent = this, catchClause && (catchClause.parent = this), finallyClause && (finallyClause.parent = this); - }; - TypeScript.TryStatementSyntax.prototype.kind = function () { - return 164 /* TryStatement */; - }; - TypeScript.LabeledStatementSyntax = function (data, identifier, colonToken, statement) { - if (data) { - this.__data = data; - } - this.identifier = identifier, this.colonToken = colonToken, this.statement = statement; - identifier.parent = this, colonToken.parent = this, statement.parent = this; - }; - TypeScript.LabeledStatementSyntax.prototype.kind = function () { - return 165 /* LabeledStatement */; - }; - TypeScript.DoStatementSyntax = function (data, doKeyword, statement, whileKeyword, openParenToken, condition, closeParenToken, semicolonToken) { - if (data) { - this.__data = data; - } - this.doKeyword = doKeyword, this.statement = statement, this.whileKeyword = whileKeyword, this.openParenToken = openParenToken, this.condition = condition, this.closeParenToken = closeParenToken, this.semicolonToken = semicolonToken; - doKeyword.parent = this, statement.parent = this, whileKeyword.parent = this, openParenToken.parent = this, condition.parent = this, closeParenToken.parent = this, semicolonToken && (semicolonToken.parent = this); - }; - TypeScript.DoStatementSyntax.prototype.kind = function () { - return 166 /* DoStatement */; - }; - TypeScript.DebuggerStatementSyntax = function (data, debuggerKeyword, semicolonToken) { - if (data) { - this.__data = data; - } - this.debuggerKeyword = debuggerKeyword, this.semicolonToken = semicolonToken; - debuggerKeyword.parent = this, semicolonToken && (semicolonToken.parent = this); - }; - TypeScript.DebuggerStatementSyntax.prototype.kind = function () { - return 167 /* DebuggerStatement */; - }; - TypeScript.WithStatementSyntax = function (data, withKeyword, openParenToken, condition, closeParenToken, statement) { - if (data) { - this.__data = data; - } - this.withKeyword = withKeyword, this.openParenToken = openParenToken, this.condition = condition, this.closeParenToken = closeParenToken, this.statement = statement; - withKeyword.parent = this, openParenToken.parent = this, condition.parent = this, closeParenToken.parent = this, statement.parent = this; - }; - TypeScript.WithStatementSyntax.prototype.kind = function () { - return 168 /* WithStatement */; - }; - TypeScript.PrefixUnaryExpressionSyntax = function (data, operatorToken, operand) { - if (data) { - this.__data = data; - } - this.operatorToken = operatorToken, this.operand = operand; - operatorToken.parent = this, operand.parent = this; - }; - TypeScript.PrefixUnaryExpressionSyntax.prototype.kind = function () { - return 169 /* PrefixUnaryExpression */; - }; - TypeScript.DeleteExpressionSyntax = function (data, deleteKeyword, expression) { - if (data) { - this.__data = data; - } - this.deleteKeyword = deleteKeyword, this.expression = expression; - deleteKeyword.parent = this, expression.parent = this; - }; - TypeScript.DeleteExpressionSyntax.prototype.kind = function () { - return 170 /* DeleteExpression */; - }; - TypeScript.TypeOfExpressionSyntax = function (data, typeOfKeyword, expression) { - if (data) { - this.__data = data; - } - this.typeOfKeyword = typeOfKeyword, this.expression = expression; - typeOfKeyword.parent = this, expression.parent = this; - }; - TypeScript.TypeOfExpressionSyntax.prototype.kind = function () { - return 171 /* TypeOfExpression */; - }; - TypeScript.VoidExpressionSyntax = function (data, voidKeyword, expression) { - if (data) { - this.__data = data; - } - this.voidKeyword = voidKeyword, this.expression = expression; - voidKeyword.parent = this, expression.parent = this; - }; - TypeScript.VoidExpressionSyntax.prototype.kind = function () { - return 172 /* VoidExpression */; - }; - TypeScript.ConditionalExpressionSyntax = function (data, condition, questionToken, whenTrue, colonToken, whenFalse) { - if (data) { - this.__data = data; - } - this.condition = condition, this.questionToken = questionToken, this.whenTrue = whenTrue, this.colonToken = colonToken, this.whenFalse = whenFalse; - condition.parent = this, questionToken.parent = this, whenTrue.parent = this, colonToken.parent = this, whenFalse.parent = this; - }; - TypeScript.ConditionalExpressionSyntax.prototype.kind = function () { - return 173 /* ConditionalExpression */; - }; - TypeScript.BinaryExpressionSyntax = function (data, left, operatorToken, right) { - if (data) { - this.__data = data; - } - this.left = left, this.operatorToken = operatorToken, this.right = right; - left.parent = this, operatorToken.parent = this, right.parent = this; - }; - TypeScript.BinaryExpressionSyntax.prototype.kind = function () { - return 174 /* BinaryExpression */; - }; - TypeScript.PostfixUnaryExpressionSyntax = function (data, operand, operatorToken) { - if (data) { - this.__data = data; - } - this.operand = operand, this.operatorToken = operatorToken; - operand.parent = this, operatorToken.parent = this; - }; - TypeScript.PostfixUnaryExpressionSyntax.prototype.kind = function () { - return 175 /* PostfixUnaryExpression */; - }; - TypeScript.MemberAccessExpressionSyntax = function (data, expression, dotToken, name) { - if (data) { - this.__data = data; - } - this.expression = expression, this.dotToken = dotToken, this.name = name; - expression.parent = this, dotToken.parent = this, name.parent = this; - }; - TypeScript.MemberAccessExpressionSyntax.prototype.kind = function () { - return 176 /* MemberAccessExpression */; - }; - TypeScript.InvocationExpressionSyntax = function (data, expression, argumentList) { - if (data) { - this.__data = data; - } - this.expression = expression, this.argumentList = argumentList; - expression.parent = this, argumentList.parent = this; - }; - TypeScript.InvocationExpressionSyntax.prototype.kind = function () { - return 177 /* InvocationExpression */; - }; - TypeScript.ArrayLiteralExpressionSyntax = function (data, openBracketToken, expressions, closeBracketToken) { - if (data) { - this.__data = data; - } - this.openBracketToken = openBracketToken, this.expressions = expressions, this.closeBracketToken = closeBracketToken; - openBracketToken.parent = this, expressions.parent = this, closeBracketToken.parent = this; - }; - TypeScript.ArrayLiteralExpressionSyntax.prototype.kind = function () { - return 178 /* ArrayLiteralExpression */; - }; - TypeScript.ObjectLiteralExpressionSyntax = function (data, openBraceToken, propertyAssignments, closeBraceToken) { - if (data) { - this.__data = data; - } - this.openBraceToken = openBraceToken, this.propertyAssignments = propertyAssignments, this.closeBraceToken = closeBraceToken; - openBraceToken.parent = this, propertyAssignments.parent = this, closeBraceToken.parent = this; - }; - TypeScript.ObjectLiteralExpressionSyntax.prototype.kind = function () { - return 179 /* ObjectLiteralExpression */; - }; - TypeScript.ObjectCreationExpressionSyntax = function (data, newKeyword, expression, argumentList) { - if (data) { - this.__data = data; - } - this.newKeyword = newKeyword, this.expression = expression, this.argumentList = argumentList; - newKeyword.parent = this, expression.parent = this, argumentList && (argumentList.parent = this); - }; - TypeScript.ObjectCreationExpressionSyntax.prototype.kind = function () { - return 180 /* ObjectCreationExpression */; - }; - TypeScript.ParenthesizedExpressionSyntax = function (data, openParenToken, expression, closeParenToken) { - if (data) { - this.__data = data; - } - this.openParenToken = openParenToken, this.expression = expression, this.closeParenToken = closeParenToken; - openParenToken.parent = this, expression.parent = this, closeParenToken.parent = this; - }; - TypeScript.ParenthesizedExpressionSyntax.prototype.kind = function () { - return 181 /* ParenthesizedExpression */; - }; - TypeScript.ParenthesizedArrowFunctionExpressionSyntax = function (data, callSignature, equalsGreaterThanToken, block, expression) { - if (data) { - this.__data = data; - } - this.callSignature = callSignature, this.equalsGreaterThanToken = equalsGreaterThanToken, this.block = block, this.expression = expression; - callSignature.parent = this, equalsGreaterThanToken.parent = this, block && (block.parent = this), expression && (expression.parent = this); - }; - TypeScript.ParenthesizedArrowFunctionExpressionSyntax.prototype.kind = function () { - return 182 /* ParenthesizedArrowFunctionExpression */; - }; - TypeScript.SimpleArrowFunctionExpressionSyntax = function (data, parameter, equalsGreaterThanToken, block, expression) { - if (data) { - this.__data = data; - } - this.parameter = parameter, this.equalsGreaterThanToken = equalsGreaterThanToken, this.block = block, this.expression = expression; - parameter.parent = this, equalsGreaterThanToken.parent = this, block && (block.parent = this), expression && (expression.parent = this); - }; - TypeScript.SimpleArrowFunctionExpressionSyntax.prototype.kind = function () { - return 183 /* SimpleArrowFunctionExpression */; - }; - TypeScript.CastExpressionSyntax = function (data, lessThanToken, type, greaterThanToken, expression) { - if (data) { - this.__data = data; - } - this.lessThanToken = lessThanToken, this.type = type, this.greaterThanToken = greaterThanToken, this.expression = expression; - lessThanToken.parent = this, type.parent = this, greaterThanToken.parent = this, expression.parent = this; - }; - TypeScript.CastExpressionSyntax.prototype.kind = function () { - return 184 /* CastExpression */; - }; - TypeScript.ElementAccessExpressionSyntax = function (data, expression, openBracketToken, argumentExpression, closeBracketToken) { - if (data) { - this.__data = data; - } - this.expression = expression, this.openBracketToken = openBracketToken, this.argumentExpression = argumentExpression, this.closeBracketToken = closeBracketToken; - expression.parent = this, openBracketToken.parent = this, argumentExpression.parent = this, closeBracketToken.parent = this; - }; - TypeScript.ElementAccessExpressionSyntax.prototype.kind = function () { - return 185 /* ElementAccessExpression */; - }; - TypeScript.FunctionExpressionSyntax = function (data, functionKeyword, identifier, callSignature, block) { - if (data) { - this.__data = data; - } - this.functionKeyword = functionKeyword, this.identifier = identifier, this.callSignature = callSignature, this.block = block; - functionKeyword.parent = this, identifier && (identifier.parent = this), callSignature.parent = this, block.parent = this; - }; - TypeScript.FunctionExpressionSyntax.prototype.kind = function () { - return 186 /* FunctionExpression */; - }; - TypeScript.OmittedExpressionSyntax = function (data) { - if (data) { - this.__data = data; - } - }; - TypeScript.OmittedExpressionSyntax.prototype.kind = function () { - return 187 /* OmittedExpression */; - }; - TypeScript.TemplateExpressionSyntax = function (data, templateStartToken, templateClauses) { - if (data) { - this.__data = data; - } - this.templateStartToken = templateStartToken, this.templateClauses = templateClauses; - templateStartToken.parent = this, templateClauses.parent = this; - }; - TypeScript.TemplateExpressionSyntax.prototype.kind = function () { - return 188 /* TemplateExpression */; - }; - TypeScript.TemplateAccessExpressionSyntax = function (data, expression, templateExpression) { - if (data) { - this.__data = data; - } - this.expression = expression, this.templateExpression = templateExpression; - expression.parent = this, templateExpression.parent = this; - }; - TypeScript.TemplateAccessExpressionSyntax.prototype.kind = function () { - return 189 /* TemplateAccessExpression */; - }; - TypeScript.VariableDeclarationSyntax = function (data, varKeyword, variableDeclarators) { - if (data) { - this.__data = data; - } - this.varKeyword = varKeyword, this.variableDeclarators = variableDeclarators; - varKeyword.parent = this, variableDeclarators.parent = this; - }; - TypeScript.VariableDeclarationSyntax.prototype.kind = function () { - return 190 /* VariableDeclaration */; - }; - TypeScript.VariableDeclaratorSyntax = function (data, propertyName, typeAnnotation, equalsValueClause) { - if (data) { - this.__data = data; - } - this.propertyName = propertyName, this.typeAnnotation = typeAnnotation, this.equalsValueClause = equalsValueClause; - propertyName.parent = this, typeAnnotation && (typeAnnotation.parent = this), equalsValueClause && (equalsValueClause.parent = this); - }; - TypeScript.VariableDeclaratorSyntax.prototype.kind = function () { - return 191 /* VariableDeclarator */; - }; - TypeScript.ArgumentListSyntax = function (data, typeArgumentList, openParenToken, _arguments, closeParenToken) { - if (data) { - this.__data = data; - } - this.typeArgumentList = typeArgumentList, this.openParenToken = openParenToken, this.arguments = _arguments, this.closeParenToken = closeParenToken; - typeArgumentList && (typeArgumentList.parent = this), openParenToken.parent = this, _arguments.parent = this, closeParenToken.parent = this; - }; - TypeScript.ArgumentListSyntax.prototype.kind = function () { - return 192 /* ArgumentList */; - }; - TypeScript.ParameterListSyntax = function (data, openParenToken, parameters, closeParenToken) { - if (data) { - this.__data = data; - } - this.openParenToken = openParenToken, this.parameters = parameters, this.closeParenToken = closeParenToken; - openParenToken.parent = this, parameters.parent = this, closeParenToken.parent = this; - }; - TypeScript.ParameterListSyntax.prototype.kind = function () { - return 193 /* ParameterList */; - }; - TypeScript.TypeArgumentListSyntax = function (data, lessThanToken, typeArguments, greaterThanToken) { - if (data) { - this.__data = data; - } - this.lessThanToken = lessThanToken, this.typeArguments = typeArguments, this.greaterThanToken = greaterThanToken; - lessThanToken.parent = this, typeArguments.parent = this, greaterThanToken.parent = this; - }; - TypeScript.TypeArgumentListSyntax.prototype.kind = function () { - return 194 /* TypeArgumentList */; - }; - TypeScript.TypeParameterListSyntax = function (data, lessThanToken, typeParameters, greaterThanToken) { - if (data) { - this.__data = data; - } - this.lessThanToken = lessThanToken, this.typeParameters = typeParameters, this.greaterThanToken = greaterThanToken; - lessThanToken.parent = this, typeParameters.parent = this, greaterThanToken.parent = this; - }; - TypeScript.TypeParameterListSyntax.prototype.kind = function () { - return 195 /* TypeParameterList */; - }; - TypeScript.HeritageClauseSyntax = function (data, extendsOrImplementsKeyword, typeNames) { - if (data) { - this.__data = data; - } - this.extendsOrImplementsKeyword = extendsOrImplementsKeyword, this.typeNames = typeNames; - extendsOrImplementsKeyword.parent = this, typeNames.parent = this; - }; - TypeScript.HeritageClauseSyntax.prototype.kind = function () { - return 196 /* HeritageClause */; - }; - TypeScript.EqualsValueClauseSyntax = function (data, equalsToken, value) { - if (data) { - this.__data = data; - } - this.equalsToken = equalsToken, this.value = value; - equalsToken.parent = this, value.parent = this; - }; - TypeScript.EqualsValueClauseSyntax.prototype.kind = function () { - return 197 /* EqualsValueClause */; - }; - TypeScript.CaseSwitchClauseSyntax = function (data, caseKeyword, expression, colonToken, statements) { - if (data) { - this.__data = data; - } - this.caseKeyword = caseKeyword, this.expression = expression, this.colonToken = colonToken, this.statements = statements; - caseKeyword.parent = this, expression.parent = this, colonToken.parent = this, statements.parent = this; - }; - TypeScript.CaseSwitchClauseSyntax.prototype.kind = function () { - return 198 /* CaseSwitchClause */; - }; - TypeScript.DefaultSwitchClauseSyntax = function (data, defaultKeyword, colonToken, statements) { - if (data) { - this.__data = data; - } - this.defaultKeyword = defaultKeyword, this.colonToken = colonToken, this.statements = statements; - defaultKeyword.parent = this, colonToken.parent = this, statements.parent = this; - }; - TypeScript.DefaultSwitchClauseSyntax.prototype.kind = function () { - return 199 /* DefaultSwitchClause */; - }; - TypeScript.ElseClauseSyntax = function (data, elseKeyword, statement) { - if (data) { - this.__data = data; - } - this.elseKeyword = elseKeyword, this.statement = statement; - elseKeyword.parent = this, statement.parent = this; - }; - TypeScript.ElseClauseSyntax.prototype.kind = function () { - return 200 /* ElseClause */; - }; - TypeScript.CatchClauseSyntax = function (data, catchKeyword, openParenToken, identifier, typeAnnotation, closeParenToken, block) { - if (data) { - this.__data = data; - } - this.catchKeyword = catchKeyword, this.openParenToken = openParenToken, this.identifier = identifier, this.typeAnnotation = typeAnnotation, this.closeParenToken = closeParenToken, this.block = block; - catchKeyword.parent = this, openParenToken.parent = this, identifier.parent = this, typeAnnotation && (typeAnnotation.parent = this), closeParenToken.parent = this, block.parent = this; - }; - TypeScript.CatchClauseSyntax.prototype.kind = function () { - return 201 /* CatchClause */; - }; - TypeScript.FinallyClauseSyntax = function (data, finallyKeyword, block) { - if (data) { - this.__data = data; - } - this.finallyKeyword = finallyKeyword, this.block = block; - finallyKeyword.parent = this, block.parent = this; - }; - TypeScript.FinallyClauseSyntax.prototype.kind = function () { - return 202 /* FinallyClause */; - }; - TypeScript.TemplateClauseSyntax = function (data, expression, templateMiddleOrEndToken) { - if (data) { - this.__data = data; - } - this.expression = expression, this.templateMiddleOrEndToken = templateMiddleOrEndToken; - expression.parent = this, templateMiddleOrEndToken.parent = this; - }; - TypeScript.TemplateClauseSyntax.prototype.kind = function () { - return 203 /* TemplateClause */; - }; - TypeScript.TypeParameterSyntax = function (data, identifier, constraint) { - if (data) { - this.__data = data; - } - this.identifier = identifier, this.constraint = constraint; - identifier.parent = this, constraint && (constraint.parent = this); - }; - TypeScript.TypeParameterSyntax.prototype.kind = function () { - return 204 /* TypeParameter */; - }; - TypeScript.ConstraintSyntax = function (data, extendsKeyword, typeOrExpression) { - if (data) { - this.__data = data; - } - this.extendsKeyword = extendsKeyword, this.typeOrExpression = typeOrExpression; - extendsKeyword.parent = this, typeOrExpression.parent = this; - }; - TypeScript.ConstraintSyntax.prototype.kind = function () { - return 205 /* Constraint */; - }; - TypeScript.SimplePropertyAssignmentSyntax = function (data, propertyName, colonToken, expression) { - if (data) { - this.__data = data; - } - this.propertyName = propertyName, this.colonToken = colonToken, this.expression = expression; - propertyName.parent = this, colonToken.parent = this, expression.parent = this; - }; - TypeScript.SimplePropertyAssignmentSyntax.prototype.kind = function () { - return 206 /* SimplePropertyAssignment */; - }; - TypeScript.FunctionPropertyAssignmentSyntax = function (data, propertyName, callSignature, block) { - if (data) { - this.__data = data; - } - this.propertyName = propertyName, this.callSignature = callSignature, this.block = block; - propertyName.parent = this, callSignature.parent = this, block.parent = this; - }; - TypeScript.FunctionPropertyAssignmentSyntax.prototype.kind = function () { - return 207 /* FunctionPropertyAssignment */; - }; - TypeScript.ParameterSyntax = function (data, dotDotDotToken, modifiers, identifier, questionToken, typeAnnotation, equalsValueClause) { - if (data) { - this.__data = data; - } - this.dotDotDotToken = dotDotDotToken, this.modifiers = modifiers, this.identifier = identifier, this.questionToken = questionToken, this.typeAnnotation = typeAnnotation, this.equalsValueClause = equalsValueClause; - dotDotDotToken && (dotDotDotToken.parent = this), modifiers.parent = this, identifier.parent = this, questionToken && (questionToken.parent = this), typeAnnotation && (typeAnnotation.parent = this), equalsValueClause && (equalsValueClause.parent = this); - }; - TypeScript.ParameterSyntax.prototype.kind = function () { - return 208 /* Parameter */; - }; - TypeScript.EnumElementSyntax = function (data, propertyName, equalsValueClause) { - if (data) { - this.__data = data; - } - this.propertyName = propertyName, this.equalsValueClause = equalsValueClause; - propertyName.parent = this, equalsValueClause && (equalsValueClause.parent = this); - }; - TypeScript.EnumElementSyntax.prototype.kind = function () { - return 209 /* EnumElement */; - }; - TypeScript.TypeAnnotationSyntax = function (data, colonToken, type) { - if (data) { - this.__data = data; - } - this.colonToken = colonToken, this.type = type; - colonToken.parent = this, type.parent = this; - }; - TypeScript.TypeAnnotationSyntax.prototype.kind = function () { - return 210 /* TypeAnnotation */; - }; - TypeScript.ExternalModuleReferenceSyntax = function (data, requireKeyword, openParenToken, stringLiteral, closeParenToken) { - if (data) { - this.__data = data; - } - this.requireKeyword = requireKeyword, this.openParenToken = openParenToken, this.stringLiteral = stringLiteral, this.closeParenToken = closeParenToken; - requireKeyword.parent = this, openParenToken.parent = this, stringLiteral.parent = this, closeParenToken.parent = this; - }; - TypeScript.ExternalModuleReferenceSyntax.prototype.kind = function () { - return 211 /* ExternalModuleReference */; - }; - TypeScript.ModuleNameModuleReferenceSyntax = function (data, moduleName) { - if (data) { - this.__data = data; - } - this.moduleName = moduleName; - moduleName.parent = this; - }; - TypeScript.ModuleNameModuleReferenceSyntax.prototype.kind = function () { - return 212 /* ModuleNameModuleReference */; - }; -})(TypeScript || (TypeScript = {})); -var TypeScript; -(function (TypeScript) { - TypeScript.syntaxDiagnosticsTime = 0; - var SyntaxTree = (function () { - function SyntaxTree(sourceUnit, isDeclaration, diagnostics, fileName, text, languageVersion) { - this.text = text; - this._allDiagnostics = undefined; - this._sourceUnit = sourceUnit; - this._isDeclaration = isDeclaration; - this._parserDiagnostics = diagnostics; - this._fileName = fileName; - this._lineMap = text.lineMap(); - this._languageVersion = languageVersion; - sourceUnit.syntaxTree = this; - } - SyntaxTree.prototype.sourceUnit = function () { - return this._sourceUnit; - }; - SyntaxTree.prototype.isDeclaration = function () { - return this._isDeclaration; - }; - SyntaxTree.prototype.computeDiagnostics = function () { - if (this._parserDiagnostics.length > 0) { - return this._parserDiagnostics; - } - var diagnostics = []; - TypeScript.visitNodeOrToken(new GrammarCheckerWalker(this, diagnostics), this.sourceUnit()); - return diagnostics; - }; - SyntaxTree.prototype.diagnostics = function () { - if (!this._allDiagnostics) { - var start = new Date().getTime(); - this._allDiagnostics = this.computeDiagnostics(); - TypeScript.syntaxDiagnosticsTime += new Date().getTime() - start; - } - return this._allDiagnostics; - }; - SyntaxTree.prototype.fileName = function () { - return this._fileName; - }; - SyntaxTree.prototype.lineMap = function () { - return this._lineMap; - }; - SyntaxTree.prototype.languageVersion = function () { - return this._languageVersion; - }; - SyntaxTree.prototype.cacheSyntaxTreeInfo = function () { - var firstToken = firstSyntaxTreeToken(this); - var leadingTrivia = firstToken.leadingTrivia(this.text); - this._isExternalModule = !!externalModuleIndicatorSpanWorker(this, firstToken); - var amdDependencies = []; - for (var i = 0, n = leadingTrivia.count(); i < n; i++) { - var trivia = leadingTrivia.syntaxTriviaAt(i); - if (trivia.isComment()) { - var amdDependency = this.getAmdDependency(trivia.fullText()); - if (amdDependency) { - amdDependencies.push(amdDependency); - } - } - } - this._amdDependencies = amdDependencies; - }; - SyntaxTree.prototype.getAmdDependency = function (comment) { - var amdDependencyRegEx = /^\/\/\/\s* 0) { - var modifiers = parameter.modifiers; - for (var i = 0, n = modifiers.length; i < n; i++) { - var modifier = modifiers[i]; - if (this.checkParameterAccessibilityModifier(parameterList, modifier, i)) { - return true; - } - } - } - return false; - }; - GrammarCheckerWalker.prototype.checkParameterAccessibilityModifier = function (parameterList, modifier, modifierIndex) { - if (!TypeScript.SyntaxFacts.isAccessibilityModifier(modifier.kind())) { - this.pushDiagnostic(modifier, TypeScript.DiagnosticCode._0_modifier_cannot_appear_on_a_parameter, [modifier.text()]); - return true; - } - else { - if (modifierIndex > 0) { - this.pushDiagnostic(modifier, TypeScript.DiagnosticCode.Accessibility_modifier_already_seen); - return true; - } - } - return false; - }; - GrammarCheckerWalker.prototype.checkForTrailingComma = function (list) { - if (list.length === 0 || list.length % 2 === 1) { - return false; - } - var child = list[list.length - 1]; - this.pushDiagnostic(child, TypeScript.DiagnosticCode.Trailing_comma_not_allowed); - return true; - }; - GrammarCheckerWalker.prototype.checkForAtLeastOneElement = function (list, reportToken, listKind) { - if (TypeScript.childCount(list) > 0) { - return false; - } - this.pushDiagnostic(reportToken, TypeScript.DiagnosticCode._0_list_cannot_be_empty, [listKind]); - return true; - }; - GrammarCheckerWalker.prototype.visitParameterList = function (node) { - if (this.checkParameterListAcessibilityModifiers(node) || this.checkParameterListOrder(node) || this.checkForTrailingComma(node.parameters)) { - return; - } - _super.prototype.visitParameterList.call(this, node); - }; - GrammarCheckerWalker.prototype.visitHeritageClause = function (node) { - if (this.checkForTrailingComma(node.typeNames) || this.checkForAtLeastOneElement(node.typeNames, node.extendsOrImplementsKeyword, TypeScript.SyntaxFacts.getText(node.extendsOrImplementsKeyword.kind()))) { - return; - } - _super.prototype.visitHeritageClause.call(this, node); - }; - GrammarCheckerWalker.prototype.visitArgumentList = function (node) { - if (this.checkForTrailingComma(node.arguments)) { - return; - } - _super.prototype.visitArgumentList.call(this, node); - }; - GrammarCheckerWalker.prototype.visitVariableDeclaration = function (node) { - if (this.checkForAtLeastOneElement(node.variableDeclarators, node.varKeyword, TypeScript.getLocalizedText(TypeScript.DiagnosticCode.variable_declaration, undefined)) || this.checkForTrailingComma(node.variableDeclarators)) { - return; - } - _super.prototype.visitVariableDeclaration.call(this, node); - }; - GrammarCheckerWalker.prototype.visitTypeArgumentList = function (node) { - if (this.checkForTrailingComma(node.typeArguments) || this.checkForAtLeastOneElement(node.typeArguments, node.lessThanToken, TypeScript.getLocalizedText(TypeScript.DiagnosticCode.type_argument, undefined))) { - return; - } - _super.prototype.visitTypeArgumentList.call(this, node); - }; - GrammarCheckerWalker.prototype.visitTupleType = function (node) { - if (this.checkForTrailingComma(node.types) || this.checkForAtLeastOneElement(node.types, node.openBracketToken, TypeScript.getLocalizedText(TypeScript.DiagnosticCode.type, undefined))) { - return; - } - _super.prototype.visitTupleType.call(this, node); - }; - GrammarCheckerWalker.prototype.visitTypeParameterList = function (node) { - if (this.checkForTrailingComma(node.typeParameters) || this.checkForAtLeastOneElement(node.typeParameters, node.lessThanToken, TypeScript.getLocalizedText(TypeScript.DiagnosticCode.type_parameter, undefined))) { - return; - } - _super.prototype.visitTypeParameterList.call(this, node); - }; - GrammarCheckerWalker.prototype.checkIndexSignatureParameter = function (node) { - if (node.parameters.length !== 1) { - this.pushDiagnostic(node.openBracketToken, TypeScript.DiagnosticCode.Index_signature_must_have_exactly_one_parameter); - return true; - } - var parameter = TypeScript.nonSeparatorAt(node.parameters, 0); - if (parameter.dotDotDotToken) { - this.pushDiagnostic(parameter, TypeScript.DiagnosticCode.Index_signatures_cannot_have_rest_parameters); - return true; - } - else if (parameter.modifiers.length > 0) { - this.pushDiagnostic(parameter, TypeScript.DiagnosticCode.Index_signature_parameter_cannot_have_accessibility_modifiers); - return true; - } - else if (parameter.questionToken) { - this.pushDiagnostic(parameter, TypeScript.DiagnosticCode.Index_signature_parameter_cannot_have_a_question_mark); - return true; - } - else if (parameter.equalsValueClause) { - this.pushDiagnostic(parameter, TypeScript.DiagnosticCode.Index_signature_parameter_cannot_have_an_initializer); - return true; - } - else if (!parameter.typeAnnotation) { - this.pushDiagnostic(parameter, TypeScript.DiagnosticCode.Index_signature_parameter_must_have_a_type_annotation); - return true; - } - else if (parameter.typeAnnotation.type.kind() !== 71 /* StringKeyword */ && parameter.typeAnnotation.type.kind() !== 69 /* NumberKeyword */) { - this.pushDiagnostic(parameter, TypeScript.DiagnosticCode.Index_signature_parameter_type_must_be_string_or_number); - return true; - } - return false; - }; - GrammarCheckerWalker.prototype.visitIndexSignature = function (node) { - if (this.checkIndexSignatureParameter(node)) { - return; - } - if (!node.typeAnnotation) { - this.pushDiagnostic(node, TypeScript.DiagnosticCode.Index_signature_must_have_a_type_annotation); - return; - } - _super.prototype.visitIndexSignature.call(this, node); - }; - GrammarCheckerWalker.prototype.checkClassDeclarationHeritageClauses = function (node) { - var seenExtendsClause = false; - var seenImplementsClause = false; - for (var i = 0, n = node.heritageClauses.length; i < n; i++) { - TypeScript.Debug.assert(i <= 2); - var heritageClause = node.heritageClauses[i]; - if (heritageClause.extendsOrImplementsKeyword.kind() === 50 /* ExtendsKeyword */) { - if (seenExtendsClause) { - this.pushDiagnostic(heritageClause, TypeScript.DiagnosticCode.extends_clause_already_seen); - return true; - } - if (seenImplementsClause) { - this.pushDiagnostic(heritageClause, TypeScript.DiagnosticCode.extends_clause_must_precede_implements_clause); - return true; - } - if (TypeScript.nonSeparatorCount(heritageClause.typeNames) > 1) { - this.pushDiagnostic(heritageClause, TypeScript.DiagnosticCode.Classes_can_only_extend_a_single_class); - return true; - } - seenExtendsClause = true; - } - else { - TypeScript.Debug.assert(heritageClause.extendsOrImplementsKeyword.kind() === 53 /* ImplementsKeyword */); - if (seenImplementsClause) { - this.pushDiagnostic(heritageClause, TypeScript.DiagnosticCode.implements_clause_already_seen); - return true; - } - seenImplementsClause = true; - } - } - return false; - }; - GrammarCheckerWalker.prototype.checkForDisallowedDeclareModifier = function (modifiers) { - if (this.inAmbientDeclaration) { - var declareToken = TypeScript.SyntaxUtilities.getToken(modifiers, 65 /* DeclareKeyword */); - if (declareToken) { - this.pushDiagnostic(declareToken, TypeScript.DiagnosticCode.A_declare_modifier_cannot_be_used_in_an_already_ambient_context); - return true; - } - } - return false; - }; - GrammarCheckerWalker.prototype.checkForRequiredDeclareModifier = function (moduleElement, reportToken, modifiers) { - if (!this.inAmbientDeclaration && this.syntaxTree.isDeclaration()) { - if (!TypeScript.SyntaxUtilities.containsToken(modifiers, 65 /* DeclareKeyword */)) { - this.pushDiagnostic(reportToken, TypeScript.DiagnosticCode.A_declare_modifier_is_required_for_a_top_level_declaration_in_a_d_ts_file); - return true; - } - } - }; - GrammarCheckerWalker.prototype.visitClassDeclaration = function (node) { - if (this.checkForDisallowedDeclareModifier(node.modifiers) || this.checkForRequiredDeclareModifier(node, node.identifier, node.modifiers) || this.checkModuleElementModifiers(node.modifiers) || this.checkClassDeclarationHeritageClauses(node)) { - return; - } - var savedInAmbientDeclaration = this.inAmbientDeclaration; - this.inAmbientDeclaration = this.inAmbientDeclaration || this.syntaxTree.isDeclaration() || TypeScript.SyntaxUtilities.containsToken(node.modifiers, 65 /* DeclareKeyword */); - _super.prototype.visitClassDeclaration.call(this, node); - this.inAmbientDeclaration = savedInAmbientDeclaration; - }; - GrammarCheckerWalker.prototype.checkInterfaceDeclarationHeritageClauses = function (node) { - var seenExtendsClause = false; - for (var i = 0, n = node.heritageClauses.length; i < n; i++) { - TypeScript.Debug.assert(i <= 1); - var heritageClause = node.heritageClauses[i]; - if (heritageClause.extendsOrImplementsKeyword.kind() === 50 /* ExtendsKeyword */) { - if (seenExtendsClause) { - this.pushDiagnostic(heritageClause, TypeScript.DiagnosticCode.extends_clause_already_seen); - return true; - } - seenExtendsClause = true; - } - else { - TypeScript.Debug.assert(heritageClause.extendsOrImplementsKeyword.kind() === 53 /* ImplementsKeyword */); - this.pushDiagnostic(heritageClause, TypeScript.DiagnosticCode.Interface_declaration_cannot_have_implements_clause); - return true; - } - } - return false; - }; - GrammarCheckerWalker.prototype.checkInterfaceModifiers = function (modifiers) { - for (var i = 0, n = modifiers.length; i < n; i++) { - var modifier = modifiers[i]; - if (modifier.kind() === 65 /* DeclareKeyword */) { - this.pushDiagnostic(modifier, TypeScript.DiagnosticCode.A_declare_modifier_cannot_be_used_with_an_interface_declaration); - return true; - } - } - return false; - }; - GrammarCheckerWalker.prototype.visitInterfaceDeclaration = function (node) { - if (this.checkInterfaceModifiers(node.modifiers) || this.checkModuleElementModifiers(node.modifiers) || this.checkInterfaceDeclarationHeritageClauses(node)) { - return; - } - _super.prototype.visitInterfaceDeclaration.call(this, node); - }; - GrammarCheckerWalker.prototype.checkClassElementModifiers = function (list) { - var seenAccessibilityModifier = false; - var seenStaticModifier = false; - for (var i = 0, n = list.length; i < n; i++) { - var modifier = list[i]; - if (TypeScript.SyntaxFacts.isAccessibilityModifier(modifier.kind())) { - if (seenAccessibilityModifier) { - this.pushDiagnostic(modifier, TypeScript.DiagnosticCode.Accessibility_modifier_already_seen); - return true; - } - if (seenStaticModifier) { - var previousToken = list[i - 1]; - this.pushDiagnostic(modifier, TypeScript.DiagnosticCode._0_modifier_must_precede_1_modifier, [modifier.text(), previousToken.text()]); - return true; - } - seenAccessibilityModifier = true; - } - else if (modifier.kind() === 60 /* StaticKeyword */) { - if (seenStaticModifier) { - this.pushDiagnostic(modifier, TypeScript.DiagnosticCode._0_modifier_already_seen, [modifier.text()]); - return true; - } - seenStaticModifier = true; - } - else { - this.pushDiagnostic(modifier, TypeScript.DiagnosticCode._0_modifier_cannot_appear_on_a_class_element, [modifier.text()]); - return true; - } - } - return false; - }; - GrammarCheckerWalker.prototype.visitMemberVariableDeclaration = function (node) { - if (this.checkClassElementModifiers(node.modifiers)) { - return; - } - _super.prototype.visitMemberVariableDeclaration.call(this, node); - }; - GrammarCheckerWalker.prototype.visitMethodSignature = function (node) { - if (this.checkForTemplatePropertyName(node.propertyName)) { - return; - } - _super.prototype.visitMethodSignature.call(this, node); - }; - GrammarCheckerWalker.prototype.visitPropertySignature = function (node) { - if (this.checkForTemplatePropertyName(node.propertyName)) { - return; - } - _super.prototype.visitPropertySignature.call(this, node); - }; - GrammarCheckerWalker.prototype.visitMemberFunctionDeclaration = function (node) { - if (this.checkClassElementModifiers(node.modifiers) || this.checkForTemplatePropertyName(node.propertyName)) { - return; - } - _super.prototype.visitMemberFunctionDeclaration.call(this, node); - }; - GrammarCheckerWalker.prototype.checkGetAccessorParameter = function (node) { - if (node.callSignature.parameterList.parameters.length !== 0) { - this.pushDiagnostic(node.propertyName, TypeScript.DiagnosticCode.get_accessor_cannot_have_parameters); - return true; - } - return false; - }; - GrammarCheckerWalker.prototype.visitIndexMemberDeclaration = function (node) { - if (this.checkIndexMemberModifiers(node)) { - return; - } - _super.prototype.visitIndexMemberDeclaration.call(this, node); - }; - GrammarCheckerWalker.prototype.checkIndexMemberModifiers = function (node) { - if (node.modifiers.length > 0) { - this.pushDiagnostic(node.modifiers[0], TypeScript.DiagnosticCode.Modifiers_cannot_appear_here); - return true; - } - return false; - }; - GrammarCheckerWalker.prototype.checkEcmaScriptVersionIsAtLeast = function (reportToken, languageVersion, diagnosticKey) { - if (this.syntaxTree.languageVersion() < languageVersion) { - this.pushDiagnostic(reportToken, diagnosticKey); - return true; - } - return false; - }; - GrammarCheckerWalker.prototype.visitObjectLiteralExpression = function (node) { - var savedInObjectLiteralExpression = this.inObjectLiteralExpression; - this.inObjectLiteralExpression = true; - _super.prototype.visitObjectLiteralExpression.call(this, node); - this.inObjectLiteralExpression = savedInObjectLiteralExpression; - }; - GrammarCheckerWalker.prototype.visitGetAccessor = function (node) { - if (this.checkForAccessorDeclarationInAmbientContext(node) || this.checkEcmaScriptVersionIsAtLeast(node.propertyName, 1 /* ES5 */, TypeScript.DiagnosticCode.Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher) || this.checkForDisallowedModifiers(node.modifiers) || this.checkClassElementModifiers(node.modifiers) || this.checkForDisallowedAccessorTypeParameters(node.callSignature) || this.checkGetAccessorParameter(node) || this.checkForTemplatePropertyName(node.propertyName)) { - return; - } - _super.prototype.visitGetAccessor.call(this, node); - }; - GrammarCheckerWalker.prototype.checkForDisallowedSetAccessorTypeAnnotation = function (accessor) { - if (accessor.callSignature.typeAnnotation) { - this.pushDiagnostic(accessor.callSignature.typeAnnotation, TypeScript.DiagnosticCode.Type_annotation_cannot_appear_on_a_set_accessor); - return true; - } - return false; - }; - GrammarCheckerWalker.prototype.checkForDisallowedAccessorTypeParameters = function (callSignature) { - if (callSignature.typeParameterList) { - this.pushDiagnostic(callSignature.typeParameterList, TypeScript.DiagnosticCode.Type_parameters_cannot_appear_on_an_accessor); - return true; - } - return false; - }; - GrammarCheckerWalker.prototype.checkForAccessorDeclarationInAmbientContext = function (accessor) { - if (this.inAmbientDeclaration) { - this.pushDiagnostic(accessor, TypeScript.DiagnosticCode.Accessors_are_not_allowed_in_ambient_contexts); - return true; - } - return false; - }; - GrammarCheckerWalker.prototype.checkSetAccessorParameter = function (node) { - var parameters = node.callSignature.parameterList.parameters; - if (TypeScript.nonSeparatorCount(parameters) !== 1) { - this.pushDiagnostic(node.propertyName, TypeScript.DiagnosticCode.set_accessor_must_have_exactly_one_parameter); - return true; - } - var parameter = TypeScript.nonSeparatorAt(parameters, 0); - if (parameter.questionToken) { - this.pushDiagnostic(parameter, TypeScript.DiagnosticCode.set_accessor_parameter_cannot_be_optional); - return true; - } - if (parameter.equalsValueClause) { - this.pushDiagnostic(parameter, TypeScript.DiagnosticCode.set_accessor_parameter_cannot_have_an_initializer); - return true; - } - if (parameter.dotDotDotToken) { - this.pushDiagnostic(parameter, TypeScript.DiagnosticCode.set_accessor_cannot_have_rest_parameter); - return true; - } - return false; - }; - GrammarCheckerWalker.prototype.visitSimplePropertyAssignment = function (node) { - if (this.checkForTemplatePropertyName(node.propertyName)) { - return; - } - _super.prototype.visitSimplePropertyAssignment.call(this, node); - }; - GrammarCheckerWalker.prototype.visitSetAccessor = function (node) { - if (this.checkForAccessorDeclarationInAmbientContext(node) || this.checkEcmaScriptVersionIsAtLeast(node.propertyName, 1 /* ES5 */, TypeScript.DiagnosticCode.Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher) || this.checkForDisallowedModifiers(node.modifiers) || this.checkClassElementModifiers(node.modifiers) || this.checkForDisallowedAccessorTypeParameters(node.callSignature) || this.checkForDisallowedSetAccessorTypeAnnotation(node) || this.checkSetAccessorParameter(node) || this.checkForTemplatePropertyName(node.propertyName)) { - return; - } - _super.prototype.visitSetAccessor.call(this, node); - }; - GrammarCheckerWalker.prototype.visitEnumDeclaration = function (node) { - if (this.checkForDisallowedDeclareModifier(node.modifiers) || this.checkForRequiredDeclareModifier(node, node.identifier, node.modifiers) || this.checkModuleElementModifiers(node.modifiers), this.checkEnumElements(node)) { - return; - } - var savedInAmbientDeclaration = this.inAmbientDeclaration; - this.inAmbientDeclaration = this.inAmbientDeclaration || this.syntaxTree.isDeclaration() || TypeScript.SyntaxUtilities.containsToken(node.modifiers, 65 /* DeclareKeyword */); - _super.prototype.visitEnumDeclaration.call(this, node); - this.inAmbientDeclaration = savedInAmbientDeclaration; - }; - GrammarCheckerWalker.prototype.checkEnumElements = function (node) { - var previousValueWasComputed = false; - for (var i = 0, n = TypeScript.nonSeparatorCount(node.enumElements); i < n; i++) { - var enumElement = TypeScript.nonSeparatorAt(node.enumElements, i); - if (!enumElement.equalsValueClause && previousValueWasComputed) { - this.pushDiagnostic(enumElement, TypeScript.DiagnosticCode.Enum_member_must_have_initializer); - return true; - } - if (enumElement.equalsValueClause) { - var value = enumElement.equalsValueClause.value; - previousValueWasComputed = !TypeScript.Syntax.isIntegerLiteral(value); - } - } - return false; - }; - GrammarCheckerWalker.prototype.visitEnumElement = function (node) { - if (this.checkForTemplatePropertyName(node.propertyName)) { - return; - } - if (this.inAmbientDeclaration && node.equalsValueClause) { - var expression = node.equalsValueClause.value; - if (!TypeScript.Syntax.isIntegerLiteral(expression)) { - this.pushDiagnostic(node.equalsValueClause.value, TypeScript.DiagnosticCode.Ambient_enum_elements_can_only_have_integer_literal_initializers); - return; - } - } - _super.prototype.visitEnumElement.call(this, node); - }; - GrammarCheckerWalker.prototype.visitInvocationExpression = function (node) { - if (node.expression.kind() === 52 /* SuperKeyword */ && node.argumentList.typeArgumentList) { - this.pushDiagnostic(node, TypeScript.DiagnosticCode.super_invocation_cannot_have_type_arguments); - } - _super.prototype.visitInvocationExpression.call(this, node); - }; - GrammarCheckerWalker.prototype.checkModuleElementModifiers = function (modifiers) { - var seenExportModifier = false; - var seenDeclareModifier = false; - for (var i = 0, n = modifiers.length; i < n; i++) { - var modifier = modifiers[i]; - if (TypeScript.SyntaxFacts.isAccessibilityModifier(modifier.kind()) || modifier.kind() === 60 /* StaticKeyword */) { - this.pushDiagnostic(modifier, TypeScript.DiagnosticCode._0_modifier_cannot_appear_on_a_module_element, [modifier.text()]); - return true; - } - if (modifier.kind() === 65 /* DeclareKeyword */) { - if (seenDeclareModifier) { - this.pushDiagnostic(modifier, TypeScript.DiagnosticCode.Accessibility_modifier_already_seen); - return; - } - seenDeclareModifier = true; - } - else if (modifier.kind() === 49 /* ExportKeyword */) { - if (seenExportModifier) { - this.pushDiagnostic(modifier, TypeScript.DiagnosticCode._0_modifier_already_seen, [modifier.text()]); - return; - } - if (seenDeclareModifier) { - this.pushDiagnostic(modifier, TypeScript.DiagnosticCode._0_modifier_must_precede_1_modifier, [TypeScript.SyntaxFacts.getText(49 /* ExportKeyword */), TypeScript.SyntaxFacts.getText(65 /* DeclareKeyword */)]); - return; - } - seenExportModifier = true; - } - } - return false; - }; - GrammarCheckerWalker.prototype.checkForDisallowedImportDeclaration = function (node) { - if (!node.stringLiteral) { - for (var i = 0, n = node.moduleElements.length; i < n; i++) { - var child = node.moduleElements[i]; - if (child.kind() === 138 /* ImportDeclaration */) { - var importDeclaration = child; - if (importDeclaration.moduleReference.kind() === 211 /* ExternalModuleReference */) { - this.pushDiagnostic(importDeclaration, TypeScript.DiagnosticCode.Import_declarations_in_an_internal_module_cannot_reference_an_external_module); - } - } - } - } - return false; - }; - GrammarCheckerWalker.prototype.checkForDisallowedDeclareModifierOnImportDeclaration = function (modifiers) { - var declareToken = TypeScript.SyntaxUtilities.getToken(modifiers, 65 /* DeclareKeyword */); - if (declareToken) { - this.pushDiagnostic(declareToken, TypeScript.DiagnosticCode.A_declare_modifier_cannot_be_used_with_an_import_declaration); - return true; - } - }; - GrammarCheckerWalker.prototype.visitImportDeclaration = function (node) { - if (this.checkForDisallowedDeclareModifierOnImportDeclaration(node.modifiers) || this.checkModuleElementModifiers(node.modifiers)) { - return; - } - _super.prototype.visitImportDeclaration.call(this, node); - }; - GrammarCheckerWalker.prototype.visitModuleDeclaration = function (node) { - if (this.checkForDisallowedDeclareModifier(node.modifiers) || this.checkForRequiredDeclareModifier(node, node.stringLiteral ? node.stringLiteral : TypeScript.firstToken(node.name), node.modifiers) || this.checkModuleElementModifiers(node.modifiers) || this.checkForDisallowedImportDeclaration(node)) { - return; - } - if (node.stringLiteral) { - if (!this.inAmbientDeclaration && !TypeScript.SyntaxUtilities.containsToken(node.modifiers, 65 /* DeclareKeyword */)) { - this.pushDiagnostic(node.stringLiteral, TypeScript.DiagnosticCode.Only_ambient_modules_can_use_quoted_names); - return; - } - } - if (!node.stringLiteral && this.checkForDisallowedExportAssignment(node)) { - return; - } - var savedInAmbientDeclaration = this.inAmbientDeclaration; - this.inAmbientDeclaration = this.inAmbientDeclaration || this.syntaxTree.isDeclaration() || TypeScript.SyntaxUtilities.containsToken(node.modifiers, 65 /* DeclareKeyword */); - _super.prototype.visitModuleDeclaration.call(this, node); - this.inAmbientDeclaration = savedInAmbientDeclaration; - }; - GrammarCheckerWalker.prototype.checkForDisallowedExportAssignment = function (node) { - for (var i = 0, n = node.moduleElements.length; i < n; i++) { - var child = node.moduleElements[i]; - if (child.kind() === 139 /* ExportAssignment */) { - this.pushDiagnostic(child, TypeScript.DiagnosticCode.Export_assignment_cannot_be_used_in_internal_modules); - return true; - } - } - return false; - }; - GrammarCheckerWalker.prototype.visitBlock = function (node) { - if (this.checkForBlockInAmbientContext(node)) { - return; - } - var savedInBlock = this.inBlock; - this.inBlock = true; - _super.prototype.visitBlock.call(this, node); - this.inBlock = savedInBlock; - }; - GrammarCheckerWalker.prototype.checkForBlockInAmbientContext = function (node) { - if (this.inAmbientDeclaration || this.syntaxTree.isDeclaration()) { - if (node.parent.kind() === 1 /* List */) { - this.pushDiagnostic(TypeScript.firstToken(node), TypeScript.DiagnosticCode.Statements_are_not_allowed_in_ambient_contexts); - } - else { - this.pushDiagnostic(TypeScript.firstToken(node), TypeScript.DiagnosticCode.A_function_implementation_cannot_be_declared_in_an_ambient_context); - } - return true; - } - return false; - }; - GrammarCheckerWalker.prototype.checkForStatementInAmbientContxt = function (node) { - if (this.inAmbientDeclaration || this.syntaxTree.isDeclaration()) { - this.pushDiagnostic(TypeScript.firstToken(node), TypeScript.DiagnosticCode.Statements_are_not_allowed_in_ambient_contexts); - return true; - } - return false; - }; - GrammarCheckerWalker.prototype.visitBreakStatement = function (node) { - if (this.checkForStatementInAmbientContxt(node) || this.checkBreakStatementTarget(node)) { - return; - } - _super.prototype.visitBreakStatement.call(this, node); - }; - GrammarCheckerWalker.prototype.visitContinueStatement = function (node) { - if (this.checkForStatementInAmbientContxt(node) || this.checkContinueStatementTarget(node)) { - return; - } - _super.prototype.visitContinueStatement.call(this, node); - }; - GrammarCheckerWalker.prototype.checkBreakStatementTarget = function (node) { - if (node.identifier) { - var breakableLabels = this.getEnclosingLabels(node, true, false); - if (!TypeScript.ArrayUtilities.any(breakableLabels, function (s) { return TypeScript.tokenValueText(s.identifier) === TypeScript.tokenValueText(node.identifier); })) { - var breakableLabels = this.getEnclosingLabels(node, true, true); - if (TypeScript.ArrayUtilities.any(breakableLabels, function (s) { return TypeScript.tokenValueText(s.identifier) === TypeScript.tokenValueText(node.identifier); })) { - this.pushDiagnostic(node, TypeScript.DiagnosticCode.Jump_target_cannot_cross_function_boundary); - } - else { - this.pushDiagnostic(node, TypeScript.DiagnosticCode.Jump_target_not_found); - } - return true; - } - } - else if (!this.inIterationStatement(node, false) && !this.inSwitchStatement(node)) { - if (this.inIterationStatement(node, true)) { - this.pushDiagnostic(node, TypeScript.DiagnosticCode.Jump_target_cannot_cross_function_boundary); - } - else { - this.pushDiagnostic(node, TypeScript.DiagnosticCode.break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement); - } - return true; - } - return false; - }; - GrammarCheckerWalker.prototype.inSwitchStatement = function (ast) { - while (ast) { - if (ast.kind() === 156 /* SwitchStatement */) { - return true; - } - if (TypeScript.SyntaxUtilities.isAnyFunctionExpressionOrDeclaration(ast)) { - return false; - } - ast = ast.parent; - } - return false; - }; - GrammarCheckerWalker.prototype.isIterationStatement = function (ast) { - switch (ast.kind()) { - case 159 /* ForStatement */: - case 160 /* ForInStatement */: - case 163 /* WhileStatement */: - case 166 /* DoStatement */: - return true; - } - return false; - }; - GrammarCheckerWalker.prototype.inIterationStatement = function (element, crossFunctions) { - while (element) { - if (this.isIterationStatement(element)) { - return true; - } - if (!crossFunctions && TypeScript.SyntaxUtilities.isAnyFunctionExpressionOrDeclaration(element)) { - return false; - } - element = element.parent; - } - return false; - }; - GrammarCheckerWalker.prototype.getEnclosingLabels = function (element, breakable, crossFunctions) { - var result = []; - element = element.parent; - while (element) { - if (element.kind() === 165 /* LabeledStatement */) { - var labeledStatement = element; - if (breakable) { - result.push(labeledStatement); - } - else { - if (this.labelIsOnContinuableConstruct(labeledStatement.statement)) { - result.push(labeledStatement); - } - } - } - if (!crossFunctions && TypeScript.SyntaxUtilities.isAnyFunctionExpressionOrDeclaration(element)) { - break; - } - element = element.parent; - } - return result; - }; - GrammarCheckerWalker.prototype.labelIsOnContinuableConstruct = function (statement) { - switch (statement.kind()) { - case 165 /* LabeledStatement */: - return this.labelIsOnContinuableConstruct(statement.statement); - case 163 /* WhileStatement */: - case 159 /* ForStatement */: - case 160 /* ForInStatement */: - case 166 /* DoStatement */: - return true; - default: - return false; - } - }; - GrammarCheckerWalker.prototype.checkContinueStatementTarget = function (node) { - if (!this.inIterationStatement(node, false)) { - if (this.inIterationStatement(node, true)) { - this.pushDiagnostic(node, TypeScript.DiagnosticCode.Jump_target_cannot_cross_function_boundary); - } - else { - this.pushDiagnostic(node, TypeScript.DiagnosticCode.continue_statement_can_only_be_used_within_an_enclosing_iteration_statement); - } - return true; - } - else if (node.identifier) { - var continuableLabels = this.getEnclosingLabels(node, false, false); - if (!TypeScript.ArrayUtilities.any(continuableLabels, function (s) { return TypeScript.tokenValueText(s.identifier) === TypeScript.tokenValueText(node.identifier); })) { - var continuableLabels = this.getEnclosingLabels(node, false, true); - if (TypeScript.ArrayUtilities.any(continuableLabels, function (s) { return TypeScript.tokenValueText(s.identifier) === TypeScript.tokenValueText(node.identifier); })) { - this.pushDiagnostic(node, TypeScript.DiagnosticCode.Jump_target_cannot_cross_function_boundary); - } - else { - this.pushDiagnostic(node, TypeScript.DiagnosticCode.Jump_target_not_found); - } - return true; - } - } - return false; - }; - GrammarCheckerWalker.prototype.visitDebuggerStatement = function (node) { - if (this.checkForStatementInAmbientContxt(node)) { - return; - } - _super.prototype.visitDebuggerStatement.call(this, node); - }; - GrammarCheckerWalker.prototype.visitDoStatement = function (node) { - if (this.checkForStatementInAmbientContxt(node)) { - return; - } - _super.prototype.visitDoStatement.call(this, node); - }; - GrammarCheckerWalker.prototype.visitEmptyStatement = function (node) { - if (this.checkForStatementInAmbientContxt(node)) { - return; - } - _super.prototype.visitEmptyStatement.call(this, node); - }; - GrammarCheckerWalker.prototype.visitExpressionStatement = function (node) { - if (this.checkForStatementInAmbientContxt(node)) { - return; - } - _super.prototype.visitExpressionStatement.call(this, node); - }; - GrammarCheckerWalker.prototype.visitForInStatement = function (node) { - if (this.checkForStatementInAmbientContxt(node) || this.checkForInStatementVariableDeclaration(node) || this.checkForInLeftHandSideExpression(node)) { - return; - } - _super.prototype.visitForInStatement.call(this, node); - }; - GrammarCheckerWalker.prototype.checkForInLeftHandSideExpression = function (node) { - if (node.left && !TypeScript.SyntaxUtilities.isLeftHandSizeExpression(node.left)) { - this.pushDiagnostic(node.left, TypeScript.DiagnosticCode.Invalid_left_hand_side_in_for_in_statement); - return true; - } - return false; - }; - GrammarCheckerWalker.prototype.checkForInStatementVariableDeclaration = function (node) { - if (node.variableDeclaration && node.variableDeclaration.variableDeclarators.length > 1) { - this.pushDiagnostic(node.variableDeclaration, TypeScript.DiagnosticCode.Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement); - return true; - } - return false; - }; - GrammarCheckerWalker.prototype.visitForStatement = function (node) { - if (this.checkForStatementInAmbientContxt(node)) { - return; - } - _super.prototype.visitForStatement.call(this, node); - }; - GrammarCheckerWalker.prototype.visitIfStatement = function (node) { - if (this.checkForStatementInAmbientContxt(node)) { - return; - } - _super.prototype.visitIfStatement.call(this, node); - }; - GrammarCheckerWalker.prototype.visitLabeledStatement = function (node) { - if (this.checkForStatementInAmbientContxt(node) || this.checkForInvalidLabelIdentifier(node)) { - return; - } - _super.prototype.visitLabeledStatement.call(this, node); - }; - GrammarCheckerWalker.prototype.checkForInvalidLabelIdentifier = function (node) { - var labelIdentifier = TypeScript.tokenValueText(node.identifier); - var breakableLabels = this.getEnclosingLabels(node, true, false); - var matchingLabel = TypeScript.ArrayUtilities.firstOrDefault(breakableLabels, function (s) { return TypeScript.tokenValueText(s.identifier) === labelIdentifier; }); - if (matchingLabel) { - this.pushDiagnostic(node.identifier, TypeScript.DiagnosticCode.Duplicate_identifier_0, [labelIdentifier]); - return true; - } - return false; - }; - GrammarCheckerWalker.prototype.visitReturnStatement = function (node) { - if (this.checkForStatementInAmbientContxt(node) || this.checkForReturnStatementNotInFunctionBody(node)) { - return; - } - _super.prototype.visitReturnStatement.call(this, node); - }; - GrammarCheckerWalker.prototype.checkForReturnStatementNotInFunctionBody = function (node) { - for (var element = node; element; element = element.parent) { - if (TypeScript.SyntaxUtilities.isAnyFunctionExpressionOrDeclaration(element)) { - return false; - } - } - this.pushDiagnostic(TypeScript.firstToken(node), TypeScript.DiagnosticCode.return_statement_must_be_contained_within_a_function_body); - return true; - }; - GrammarCheckerWalker.prototype.visitSwitchStatement = function (node) { - if (this.checkForStatementInAmbientContxt(node)) { - return; - } - _super.prototype.visitSwitchStatement.call(this, node); - }; - GrammarCheckerWalker.prototype.visitThrowStatement = function (node) { - if (this.checkForStatementInAmbientContxt(node)) { - return; - } - _super.prototype.visitThrowStatement.call(this, node); - }; - GrammarCheckerWalker.prototype.visitTryStatement = function (node) { - if (this.checkForStatementInAmbientContxt(node)) { - return; - } - _super.prototype.visitTryStatement.call(this, node); - }; - GrammarCheckerWalker.prototype.visitWhileStatement = function (node) { - if (this.checkForStatementInAmbientContxt(node)) { - return; - } - _super.prototype.visitWhileStatement.call(this, node); - }; - GrammarCheckerWalker.prototype.visitWithStatement = function (node) { - if (this.checkForStatementInAmbientContxt(node) || this.checkForWithInStrictMode(node)) { - return; - } - _super.prototype.visitWithStatement.call(this, node); - }; - GrammarCheckerWalker.prototype.checkForWithInStrictMode = function (node) { - if (TypeScript.parsedInStrictMode(node)) { - this.pushDiagnostic(TypeScript.firstToken(node), TypeScript.DiagnosticCode.with_statements_are_not_allowed_in_strict_mode); - return true; - } - return false; - }; - GrammarCheckerWalker.prototype.checkForDisallowedModifiers = function (modifiers) { - if (this.inBlock || this.inObjectLiteralExpression) { - if (modifiers.length > 0) { - this.pushDiagnostic(modifiers[0], TypeScript.DiagnosticCode.Modifiers_cannot_appear_here); - return true; - } - } - return false; - }; - GrammarCheckerWalker.prototype.visitFunctionDeclaration = function (node) { - if (this.checkForDisallowedDeclareModifier(node.modifiers) || this.checkForDisallowedModifiers(node.modifiers) || this.checkForRequiredDeclareModifier(node, node.identifier, node.modifiers) || this.checkModuleElementModifiers(node.modifiers) || this.checkForDisallowedEvalOrArguments(node, node.identifier)) { - return; - } - var savedInAmbientDeclaration = this.inAmbientDeclaration; - this.inAmbientDeclaration = this.inAmbientDeclaration || this.syntaxTree.isDeclaration() || TypeScript.SyntaxUtilities.containsToken(node.modifiers, 65 /* DeclareKeyword */); - _super.prototype.visitFunctionDeclaration.call(this, node); - this.inAmbientDeclaration = savedInAmbientDeclaration; - }; - GrammarCheckerWalker.prototype.visitFunctionExpression = function (node) { - if (this.checkForDisallowedEvalOrArguments(node, node.identifier)) { - return; - } - _super.prototype.visitFunctionExpression.call(this, node); - }; - GrammarCheckerWalker.prototype.visitFunctionPropertyAssignment = function (node) { - if (this.checkForTemplatePropertyName(node.propertyName)) { - return; - } - _super.prototype.visitFunctionPropertyAssignment.call(this, node); - }; - GrammarCheckerWalker.prototype.visitVariableStatement = function (node) { - if (this.checkForDisallowedDeclareModifier(node.modifiers) || this.checkForDisallowedModifiers(node.modifiers) || this.checkForRequiredDeclareModifier(node, node.variableDeclaration.varKeyword, node.modifiers) || this.checkModuleElementModifiers(node.modifiers)) { - return; - } - var savedInAmbientDeclaration = this.inAmbientDeclaration; - this.inAmbientDeclaration = this.inAmbientDeclaration || this.syntaxTree.isDeclaration() || TypeScript.SyntaxUtilities.containsToken(node.modifiers, 65 /* DeclareKeyword */); - _super.prototype.visitVariableStatement.call(this, node); - this.inAmbientDeclaration = savedInAmbientDeclaration; - }; - GrammarCheckerWalker.prototype.checkListSeparators = function (list, kind) { - for (var i = 0, n = TypeScript.separatorCount(list); i < n; i++) { - var child = TypeScript.separatorAt(list, i); - if (child.kind() !== kind) { - this.pushDiagnostic(child, TypeScript.DiagnosticCode._0_expected, [TypeScript.SyntaxFacts.getText(kind)]); - } - } - return false; - }; - GrammarCheckerWalker.prototype.visitObjectType = function (node) { - if (this.checkListSeparators(node.typeMembers, 80 /* SemicolonToken */)) { - return; - } - var savedInAmbientDeclaration = this.inAmbientDeclaration; - this.inAmbientDeclaration = true; - _super.prototype.visitObjectType.call(this, node); - this.inAmbientDeclaration = savedInAmbientDeclaration; - }; - GrammarCheckerWalker.prototype.visitArrayType = function (node) { - var savedInAmbientDeclaration = this.inAmbientDeclaration; - this.inAmbientDeclaration = true; - _super.prototype.visitArrayType.call(this, node); - this.inAmbientDeclaration = savedInAmbientDeclaration; - }; - GrammarCheckerWalker.prototype.visitFunctionType = function (node) { - var savedInAmbientDeclaration = this.inAmbientDeclaration; - this.inAmbientDeclaration = true; - _super.prototype.visitFunctionType.call(this, node); - this.inAmbientDeclaration = savedInAmbientDeclaration; - }; - GrammarCheckerWalker.prototype.visitConstructorType = function (node) { - var savedInAmbientDeclaration = this.inAmbientDeclaration; - this.inAmbientDeclaration = true; - _super.prototype.visitConstructorType.call(this, node); - this.inAmbientDeclaration = savedInAmbientDeclaration; - }; - GrammarCheckerWalker.prototype.visitVariableDeclarator = function (node) { - if (this.checkVariableDeclaratorInitializer(node) || this.checkVariableDeclaratorIdentifier(node) || this.checkForTemplatePropertyName(node.propertyName)) { - return; - } - _super.prototype.visitVariableDeclarator.call(this, node); - }; - GrammarCheckerWalker.prototype.checkForTemplatePropertyName = function (token) { - if (token.kind() === 13 /* NoSubstitutionTemplateToken */) { - this.pushDiagnostic(token, TypeScript.DiagnosticCode.Template_literal_cannot_be_used_as_an_element_name); - return true; - } - return false; - }; - GrammarCheckerWalker.prototype.checkVariableDeclaratorIdentifier = function (node) { - if (node.parent.kind() !== 141 /* MemberVariableDeclaration */) { - if (this.checkForDisallowedEvalOrArguments(node, node.propertyName)) { - return true; - } - } - return false; - }; - GrammarCheckerWalker.prototype.checkVariableDeclaratorInitializer = function (node) { - if (this.inAmbientDeclaration && node.equalsValueClause) { - this.pushDiagnostic(TypeScript.firstToken(node.equalsValueClause.value), TypeScript.DiagnosticCode.Initializers_are_not_allowed_in_ambient_contexts); - return true; - } - return false; - }; - GrammarCheckerWalker.prototype.visitConstructorDeclaration = function (node) { - if (this.checkClassElementModifiers(node.modifiers) || this.checkConstructorModifiers(node.modifiers) || this.checkConstructorTypeParameterList(node) || this.checkConstructorTypeAnnotation(node)) { - return; - } - _super.prototype.visitConstructorDeclaration.call(this, node); - }; - GrammarCheckerWalker.prototype.checkConstructorModifiers = function (modifiers) { - for (var i = 0, n = modifiers.length; i < n; i++) { - var child = modifiers[i]; - if (child.kind() !== 59 /* PublicKeyword */) { - this.pushDiagnostic(child, TypeScript.DiagnosticCode._0_modifier_cannot_appear_on_a_constructor_declaration, [TypeScript.SyntaxFacts.getText(child.kind())]); - return true; - } - } - return false; - }; - GrammarCheckerWalker.prototype.checkConstructorTypeParameterList = function (node) { - if (node.callSignature.typeParameterList) { - this.pushDiagnostic(node.callSignature.typeParameterList, TypeScript.DiagnosticCode.Type_parameters_cannot_appear_on_a_constructor_declaration); - return true; - } - return false; - }; - GrammarCheckerWalker.prototype.checkConstructorTypeAnnotation = function (node) { - if (node.callSignature.typeAnnotation) { - this.pushDiagnostic(node.callSignature.typeAnnotation, TypeScript.DiagnosticCode.Type_annotation_cannot_appear_on_a_constructor_declaration); - return true; - } - return false; - }; - GrammarCheckerWalker.prototype.visitBinaryExpression = function (node) { - if (this.checkIllegalAssignment(node)) { - return; - } - _super.prototype.visitBinaryExpression.call(this, node); - }; - GrammarCheckerWalker.prototype.visitPrefixUnaryExpression = function (node) { - if (TypeScript.parsedInStrictMode(node) && this.isPreIncrementOrDecrementExpression(node) && this.isEvalOrArguments(node.operand)) { - this.pushDiagnostic(node.operatorToken, TypeScript.DiagnosticCode.Invalid_use_of_0_in_strict_mode, [this.getEvalOrArguments(node.operand)]); - } - _super.prototype.visitPrefixUnaryExpression.call(this, node); - }; - GrammarCheckerWalker.prototype.visitPostfixUnaryExpression = function (node) { - if (TypeScript.parsedInStrictMode(node) && this.isEvalOrArguments(node.operand)) { - this.pushDiagnostic(node.operatorToken, TypeScript.DiagnosticCode.Invalid_use_of_0_in_strict_mode, [this.getEvalOrArguments(node.operand)]); - } - _super.prototype.visitPostfixUnaryExpression.call(this, node); - }; - GrammarCheckerWalker.prototype.visitParameter = function (node) { - if (this.checkForDisallowedEvalOrArguments(node, node.identifier)) { - return; - } - _super.prototype.visitParameter.call(this, node); - }; - GrammarCheckerWalker.prototype.checkForDisallowedEvalOrArguments = function (node, token) { - if (token) { - if (TypeScript.parsedInStrictMode(node) && this.isEvalOrArguments(token)) { - this.pushDiagnostic(token, TypeScript.DiagnosticCode.Invalid_use_of_0_in_strict_mode, [this.getEvalOrArguments(token)]); - return true; - } - } - return false; - }; - GrammarCheckerWalker.prototype.isPreIncrementOrDecrementExpression = function (node) { - switch (node.operatorToken.kind()) { - case 96 /* MinusMinusToken */: - case 95 /* PlusPlusToken */: - return true; - } - return false; - }; - GrammarCheckerWalker.prototype.visitDeleteExpression = function (node) { - if (TypeScript.parsedInStrictMode(node) && node.expression.kind() === 9 /* IdentifierName */) { - this.pushDiagnostic(TypeScript.firstToken(node), TypeScript.DiagnosticCode.delete_cannot_be_called_on_an_identifier_in_strict_mode); - return; - } - _super.prototype.visitDeleteExpression.call(this, node); - }; - GrammarCheckerWalker.prototype.checkIllegalAssignment = function (node) { - if (TypeScript.parsedInStrictMode(node) && TypeScript.SyntaxFacts.isAssignmentOperatorToken(node.operatorToken.kind()) && this.isEvalOrArguments(node.left)) { - this.pushDiagnostic(node.operatorToken, TypeScript.DiagnosticCode.Invalid_use_of_0_in_strict_mode, [this.getEvalOrArguments(node.left)]); - return true; - } - return false; - }; - GrammarCheckerWalker.prototype.getEvalOrArguments = function (expr) { - if (expr.kind() === 9 /* IdentifierName */) { - var text = TypeScript.tokenValueText(expr); - if (text === "eval" || text === "arguments") { - return text; - } - } - return undefined; - }; - GrammarCheckerWalker.prototype.isEvalOrArguments = function (expr) { - return !!this.getEvalOrArguments(expr); - }; - GrammarCheckerWalker.prototype.visitConstraint = function (node) { - if (this.checkConstraintType(node)) { - return; - } - _super.prototype.visitConstraint.call(this, node); - }; - GrammarCheckerWalker.prototype.checkConstraintType = function (node) { - if (!TypeScript.SyntaxFacts.isType(node.typeOrExpression.kind())) { - this.pushDiagnostic(node.typeOrExpression, TypeScript.DiagnosticCode.Type_expected); - return true; - } - return false; - }; - return GrammarCheckerWalker; - })(TypeScript.SyntaxWalker); - function firstSyntaxTreeToken(syntaxTree) { - var scanner = TypeScript.Scanner.createScanner(syntaxTree.languageVersion(), syntaxTree.text, function () { - }); - return scanner.scan(false); - } - function externalModuleIndicatorSpan(syntaxTree) { - var firstToken = firstSyntaxTreeToken(syntaxTree); - return externalModuleIndicatorSpanWorker(syntaxTree, firstToken); - } - TypeScript.externalModuleIndicatorSpan = externalModuleIndicatorSpan; - function externalModuleIndicatorSpanWorker(syntaxTree, firstToken) { - var leadingTrivia = firstToken.leadingTrivia(syntaxTree.text); - return implicitImportSpan(leadingTrivia) || topLevelImportOrExportSpan(syntaxTree.sourceUnit()); - } - TypeScript.externalModuleIndicatorSpanWorker = externalModuleIndicatorSpanWorker; - function implicitImportSpan(sourceUnitLeadingTrivia) { - for (var i = 0, n = sourceUnitLeadingTrivia.count(); i < n; i++) { - var trivia = sourceUnitLeadingTrivia.syntaxTriviaAt(i); - if (trivia.isComment()) { - var span = implicitImportSpanWorker(trivia); - if (span) { - return span; - } - } - } - return undefined; - } - function implicitImportSpanWorker(trivia) { - var implicitImportRegEx = /^(\/\/\/\s*/gim; - var match = implicitImportRegEx.exec(trivia.fullText()); - if (match) { - return new TypeScript.TextSpan(trivia.fullStart(), trivia.fullWidth()); - } - return undefined; - } - function topLevelImportOrExportSpan(node) { - for (var i = 0, n = node.moduleElements.length; i < n; i++) { - var moduleElement = node.moduleElements[i]; - var _firstToken = TypeScript.firstToken(moduleElement); - if (_firstToken && _firstToken.kind() === 49 /* ExportKeyword */) { - return new TypeScript.TextSpan(TypeScript.start(_firstToken), TypeScript.width(_firstToken)); - } - if (moduleElement.kind() === 138 /* ImportDeclaration */) { - var importDecl = moduleElement; - if (importDecl.moduleReference.kind() === 211 /* ExternalModuleReference */) { - var literal = importDecl.moduleReference.stringLiteral; - return new TypeScript.TextSpan(TypeScript.start(literal), TypeScript.width(literal)); - } - } - } - return undefined; - } -})(TypeScript || (TypeScript = {})); -var TypeScript; -(function (TypeScript) { - var Unicode = (function () { - function Unicode() { - } - Unicode.lookupInUnicodeMap = function (code, map) { - if (code < map[0]) { - return false; - } - var lo = 0; - var hi = map.length; - var mid; - while (lo + 1 < hi) { - mid = lo + (hi - lo) / 2; - mid -= mid % 2; - if (map[mid] <= code && code <= map[mid + 1]) { - return true; - } - if (code < map[mid]) { - hi = mid; - } - else { - lo = mid + 2; - } - } - return false; - }; - Unicode.isIdentifierStart = function (code, languageVersion) { - if (languageVersion === 0 /* ES3 */) { - return Unicode.lookupInUnicodeMap(code, Unicode.unicodeES3IdentifierStart); - } - else if (languageVersion >= 1 /* ES5 */) { - return Unicode.lookupInUnicodeMap(code, Unicode.unicodeES5IdentifierStart); - } - else { - throw TypeScript.Errors.argumentOutOfRange("languageVersion"); - } - }; - Unicode.isIdentifierPart = function (code, languageVersion) { - if (languageVersion === 0 /* ES3 */) { - return Unicode.lookupInUnicodeMap(code, Unicode.unicodeES3IdentifierPart); - } - else if (languageVersion >= 1 /* ES5 */) { - return Unicode.lookupInUnicodeMap(code, Unicode.unicodeES5IdentifierPart); - } - else { - throw TypeScript.Errors.argumentOutOfRange("languageVersion"); - } - }; - Unicode.unicodeES3IdentifierStart = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 543, 546, 563, 592, 685, 688, 696, 699, 705, 720, 721, 736, 740, 750, 750, 890, 890, 902, 902, 904, 906, 908, 908, 910, 929, 931, 974, 976, 983, 986, 1011, 1024, 1153, 1164, 1220, 1223, 1224, 1227, 1228, 1232, 1269, 1272, 1273, 1329, 1366, 1369, 1369, 1377, 1415, 1488, 1514, 1520, 1522, 1569, 1594, 1600, 1610, 1649, 1747, 1749, 1749, 1765, 1766, 1786, 1788, 1808, 1808, 1810, 1836, 1920, 1957, 2309, 2361, 2365, 2365, 2384, 2384, 2392, 2401, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2524, 2525, 2527, 2529, 2544, 2545, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2649, 2652, 2654, 2654, 2674, 2676, 2693, 2699, 2701, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2749, 2749, 2768, 2768, 2784, 2784, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2870, 2873, 2877, 2877, 2908, 2909, 2911, 2913, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 2997, 2999, 3001, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3168, 3169, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3294, 3294, 3296, 3297, 3333, 3340, 3342, 3344, 3346, 3368, 3370, 3385, 3424, 3425, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3585, 3632, 3634, 3635, 3648, 3654, 3713, 3714, 3716, 3716, 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743, 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3760, 3762, 3763, 3773, 3773, 3776, 3780, 3782, 3782, 3804, 3805, 3840, 3840, 3904, 3911, 3913, 3946, 3976, 3979, 4096, 4129, 4131, 4135, 4137, 4138, 4176, 4181, 4256, 4293, 4304, 4342, 4352, 4441, 4447, 4514, 4520, 4601, 4608, 4614, 4616, 4678, 4680, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4742, 4744, 4744, 4746, 4749, 4752, 4782, 4784, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4814, 4816, 4822, 4824, 4846, 4848, 4878, 4880, 4880, 4882, 4885, 4888, 4894, 4896, 4934, 4936, 4954, 5024, 5108, 5121, 5740, 5743, 5750, 5761, 5786, 5792, 5866, 6016, 6067, 6176, 6263, 6272, 6312, 7680, 7835, 7840, 7929, 7936, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8319, 8319, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8497, 8499, 8505, 8544, 8579, 12293, 12295, 12321, 12329, 12337, 12341, 12344, 12346, 12353, 12436, 12445, 12446, 12449, 12538, 12540, 12542, 12549, 12588, 12593, 12686, 12704, 12727, 13312, 19893, 19968, 40869, 40960, 42124, 44032, 55203, 63744, 64045, 64256, 64262, 64275, 64279, 64285, 64285, 64287, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65136, 65138, 65140, 65140, 65142, 65276, 65313, 65338, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500,]; - Unicode.unicodeES3IdentifierPart = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 543, 546, 563, 592, 685, 688, 696, 699, 705, 720, 721, 736, 740, 750, 750, 768, 846, 864, 866, 890, 890, 902, 902, 904, 906, 908, 908, 910, 929, 931, 974, 976, 983, 986, 1011, 1024, 1153, 1155, 1158, 1164, 1220, 1223, 1224, 1227, 1228, 1232, 1269, 1272, 1273, 1329, 1366, 1369, 1369, 1377, 1415, 1425, 1441, 1443, 1465, 1467, 1469, 1471, 1471, 1473, 1474, 1476, 1476, 1488, 1514, 1520, 1522, 1569, 1594, 1600, 1621, 1632, 1641, 1648, 1747, 1749, 1756, 1759, 1768, 1770, 1773, 1776, 1788, 1808, 1836, 1840, 1866, 1920, 1968, 2305, 2307, 2309, 2361, 2364, 2381, 2384, 2388, 2392, 2403, 2406, 2415, 2433, 2435, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2492, 2492, 2494, 2500, 2503, 2504, 2507, 2509, 2519, 2519, 2524, 2525, 2527, 2531, 2534, 2545, 2562, 2562, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2620, 2620, 2622, 2626, 2631, 2632, 2635, 2637, 2649, 2652, 2654, 2654, 2662, 2676, 2689, 2691, 2693, 2699, 2701, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2748, 2757, 2759, 2761, 2763, 2765, 2768, 2768, 2784, 2784, 2790, 2799, 2817, 2819, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2870, 2873, 2876, 2883, 2887, 2888, 2891, 2893, 2902, 2903, 2908, 2909, 2911, 2913, 2918, 2927, 2946, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 2997, 2999, 3001, 3006, 3010, 3014, 3016, 3018, 3021, 3031, 3031, 3047, 3055, 3073, 3075, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3134, 3140, 3142, 3144, 3146, 3149, 3157, 3158, 3168, 3169, 3174, 3183, 3202, 3203, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3262, 3268, 3270, 3272, 3274, 3277, 3285, 3286, 3294, 3294, 3296, 3297, 3302, 3311, 3330, 3331, 3333, 3340, 3342, 3344, 3346, 3368, 3370, 3385, 3390, 3395, 3398, 3400, 3402, 3405, 3415, 3415, 3424, 3425, 3430, 3439, 3458, 3459, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3530, 3530, 3535, 3540, 3542, 3542, 3544, 3551, 3570, 3571, 3585, 3642, 3648, 3662, 3664, 3673, 3713, 3714, 3716, 3716, 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743, 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3769, 3771, 3773, 3776, 3780, 3782, 3782, 3784, 3789, 3792, 3801, 3804, 3805, 3840, 3840, 3864, 3865, 3872, 3881, 3893, 3893, 3895, 3895, 3897, 3897, 3902, 3911, 3913, 3946, 3953, 3972, 3974, 3979, 3984, 3991, 3993, 4028, 4038, 4038, 4096, 4129, 4131, 4135, 4137, 4138, 4140, 4146, 4150, 4153, 4160, 4169, 4176, 4185, 4256, 4293, 4304, 4342, 4352, 4441, 4447, 4514, 4520, 4601, 4608, 4614, 4616, 4678, 4680, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4742, 4744, 4744, 4746, 4749, 4752, 4782, 4784, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4814, 4816, 4822, 4824, 4846, 4848, 4878, 4880, 4880, 4882, 4885, 4888, 4894, 4896, 4934, 4936, 4954, 4969, 4977, 5024, 5108, 5121, 5740, 5743, 5750, 5761, 5786, 5792, 5866, 6016, 6099, 6112, 6121, 6160, 6169, 6176, 6263, 6272, 6313, 7680, 7835, 7840, 7929, 7936, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8255, 8256, 8319, 8319, 8400, 8412, 8417, 8417, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8497, 8499, 8505, 8544, 8579, 12293, 12295, 12321, 12335, 12337, 12341, 12344, 12346, 12353, 12436, 12441, 12442, 12445, 12446, 12449, 12542, 12549, 12588, 12593, 12686, 12704, 12727, 13312, 19893, 19968, 40869, 40960, 42124, 44032, 55203, 63744, 64045, 64256, 64262, 64275, 64279, 64285, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65056, 65059, 65075, 65076, 65101, 65103, 65136, 65138, 65140, 65140, 65142, 65276, 65296, 65305, 65313, 65338, 65343, 65343, 65345, 65370, 65381, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500,]; - Unicode.unicodeES5IdentifierStart = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 705, 710, 721, 736, 740, 748, 748, 750, 750, 880, 884, 886, 887, 890, 893, 902, 902, 904, 906, 908, 908, 910, 929, 931, 1013, 1015, 1153, 1162, 1319, 1329, 1366, 1369, 1369, 1377, 1415, 1488, 1514, 1520, 1522, 1568, 1610, 1646, 1647, 1649, 1747, 1749, 1749, 1765, 1766, 1774, 1775, 1786, 1788, 1791, 1791, 1808, 1808, 1810, 1839, 1869, 1957, 1969, 1969, 1994, 2026, 2036, 2037, 2042, 2042, 2048, 2069, 2074, 2074, 2084, 2084, 2088, 2088, 2112, 2136, 2208, 2208, 2210, 2220, 2308, 2361, 2365, 2365, 2384, 2384, 2392, 2401, 2417, 2423, 2425, 2431, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2493, 2493, 2510, 2510, 2524, 2525, 2527, 2529, 2544, 2545, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2649, 2652, 2654, 2654, 2674, 2676, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2749, 2749, 2768, 2768, 2784, 2785, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2869, 2873, 2877, 2877, 2908, 2909, 2911, 2913, 2929, 2929, 2947, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3024, 3024, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3133, 3133, 3160, 3161, 3168, 3169, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3261, 3261, 3294, 3294, 3296, 3297, 3313, 3314, 3333, 3340, 3342, 3344, 3346, 3386, 3389, 3389, 3406, 3406, 3424, 3425, 3450, 3455, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3585, 3632, 3634, 3635, 3648, 3654, 3713, 3714, 3716, 3716, 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743, 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3760, 3762, 3763, 3773, 3773, 3776, 3780, 3782, 3782, 3804, 3807, 3840, 3840, 3904, 3911, 3913, 3948, 3976, 3980, 4096, 4138, 4159, 4159, 4176, 4181, 4186, 4189, 4193, 4193, 4197, 4198, 4206, 4208, 4213, 4225, 4238, 4238, 4256, 4293, 4295, 4295, 4301, 4301, 4304, 4346, 4348, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4822, 4824, 4880, 4882, 4885, 4888, 4954, 4992, 5007, 5024, 5108, 5121, 5740, 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5872, 5888, 5900, 5902, 5905, 5920, 5937, 5952, 5969, 5984, 5996, 5998, 6000, 6016, 6067, 6103, 6103, 6108, 6108, 6176, 6263, 6272, 6312, 6314, 6314, 6320, 6389, 6400, 6428, 6480, 6509, 6512, 6516, 6528, 6571, 6593, 6599, 6656, 6678, 6688, 6740, 6823, 6823, 6917, 6963, 6981, 6987, 7043, 7072, 7086, 7087, 7098, 7141, 7168, 7203, 7245, 7247, 7258, 7293, 7401, 7404, 7406, 7409, 7413, 7414, 7424, 7615, 7680, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8305, 8305, 8319, 8319, 8336, 8348, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8505, 8508, 8511, 8517, 8521, 8526, 8526, 8544, 8584, 11264, 11310, 11312, 11358, 11360, 11492, 11499, 11502, 11506, 11507, 11520, 11557, 11559, 11559, 11565, 11565, 11568, 11623, 11631, 11631, 11648, 11670, 11680, 11686, 11688, 11694, 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726, 11728, 11734, 11736, 11742, 11823, 11823, 12293, 12295, 12321, 12329, 12337, 12341, 12344, 12348, 12353, 12438, 12445, 12447, 12449, 12538, 12540, 12543, 12549, 12589, 12593, 12686, 12704, 12730, 12784, 12799, 13312, 19893, 19968, 40908, 40960, 42124, 42192, 42237, 42240, 42508, 42512, 42527, 42538, 42539, 42560, 42606, 42623, 42647, 42656, 42735, 42775, 42783, 42786, 42888, 42891, 42894, 42896, 42899, 42912, 42922, 43000, 43009, 43011, 43013, 43015, 43018, 43020, 43042, 43072, 43123, 43138, 43187, 43250, 43255, 43259, 43259, 43274, 43301, 43312, 43334, 43360, 43388, 43396, 43442, 43471, 43471, 43520, 43560, 43584, 43586, 43588, 43595, 43616, 43638, 43642, 43642, 43648, 43695, 43697, 43697, 43701, 43702, 43705, 43709, 43712, 43712, 43714, 43714, 43739, 43741, 43744, 43754, 43762, 43764, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43814, 43816, 43822, 43968, 44002, 44032, 55203, 55216, 55238, 55243, 55291, 63744, 64109, 64112, 64217, 64256, 64262, 64275, 64279, 64285, 64285, 64287, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65136, 65140, 65142, 65276, 65313, 65338, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500,]; - Unicode.unicodeES5IdentifierPart = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 705, 710, 721, 736, 740, 748, 748, 750, 750, 768, 884, 886, 887, 890, 893, 902, 902, 904, 906, 908, 908, 910, 929, 931, 1013, 1015, 1153, 1155, 1159, 1162, 1319, 1329, 1366, 1369, 1369, 1377, 1415, 1425, 1469, 1471, 1471, 1473, 1474, 1476, 1477, 1479, 1479, 1488, 1514, 1520, 1522, 1552, 1562, 1568, 1641, 1646, 1747, 1749, 1756, 1759, 1768, 1770, 1788, 1791, 1791, 1808, 1866, 1869, 1969, 1984, 2037, 2042, 2042, 2048, 2093, 2112, 2139, 2208, 2208, 2210, 2220, 2276, 2302, 2304, 2403, 2406, 2415, 2417, 2423, 2425, 2431, 2433, 2435, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2492, 2500, 2503, 2504, 2507, 2510, 2519, 2519, 2524, 2525, 2527, 2531, 2534, 2545, 2561, 2563, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2620, 2620, 2622, 2626, 2631, 2632, 2635, 2637, 2641, 2641, 2649, 2652, 2654, 2654, 2662, 2677, 2689, 2691, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2748, 2757, 2759, 2761, 2763, 2765, 2768, 2768, 2784, 2787, 2790, 2799, 2817, 2819, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2869, 2873, 2876, 2884, 2887, 2888, 2891, 2893, 2902, 2903, 2908, 2909, 2911, 2915, 2918, 2927, 2929, 2929, 2946, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3006, 3010, 3014, 3016, 3018, 3021, 3024, 3024, 3031, 3031, 3046, 3055, 3073, 3075, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3133, 3140, 3142, 3144, 3146, 3149, 3157, 3158, 3160, 3161, 3168, 3171, 3174, 3183, 3202, 3203, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3260, 3268, 3270, 3272, 3274, 3277, 3285, 3286, 3294, 3294, 3296, 3299, 3302, 3311, 3313, 3314, 3330, 3331, 3333, 3340, 3342, 3344, 3346, 3386, 3389, 3396, 3398, 3400, 3402, 3406, 3415, 3415, 3424, 3427, 3430, 3439, 3450, 3455, 3458, 3459, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3530, 3530, 3535, 3540, 3542, 3542, 3544, 3551, 3570, 3571, 3585, 3642, 3648, 3662, 3664, 3673, 3713, 3714, 3716, 3716, 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743, 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3769, 3771, 3773, 3776, 3780, 3782, 3782, 3784, 3789, 3792, 3801, 3804, 3807, 3840, 3840, 3864, 3865, 3872, 3881, 3893, 3893, 3895, 3895, 3897, 3897, 3902, 3911, 3913, 3948, 3953, 3972, 3974, 3991, 3993, 4028, 4038, 4038, 4096, 4169, 4176, 4253, 4256, 4293, 4295, 4295, 4301, 4301, 4304, 4346, 4348, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4822, 4824, 4880, 4882, 4885, 4888, 4954, 4957, 4959, 4992, 5007, 5024, 5108, 5121, 5740, 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5872, 5888, 5900, 5902, 5908, 5920, 5940, 5952, 5971, 5984, 5996, 5998, 6000, 6002, 6003, 6016, 6099, 6103, 6103, 6108, 6109, 6112, 6121, 6155, 6157, 6160, 6169, 6176, 6263, 6272, 6314, 6320, 6389, 6400, 6428, 6432, 6443, 6448, 6459, 6470, 6509, 6512, 6516, 6528, 6571, 6576, 6601, 6608, 6617, 6656, 6683, 6688, 6750, 6752, 6780, 6783, 6793, 6800, 6809, 6823, 6823, 6912, 6987, 6992, 7001, 7019, 7027, 7040, 7155, 7168, 7223, 7232, 7241, 7245, 7293, 7376, 7378, 7380, 7414, 7424, 7654, 7676, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8204, 8205, 8255, 8256, 8276, 8276, 8305, 8305, 8319, 8319, 8336, 8348, 8400, 8412, 8417, 8417, 8421, 8432, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8505, 8508, 8511, 8517, 8521, 8526, 8526, 8544, 8584, 11264, 11310, 11312, 11358, 11360, 11492, 11499, 11507, 11520, 11557, 11559, 11559, 11565, 11565, 11568, 11623, 11631, 11631, 11647, 11670, 11680, 11686, 11688, 11694, 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726, 11728, 11734, 11736, 11742, 11744, 11775, 11823, 11823, 12293, 12295, 12321, 12335, 12337, 12341, 12344, 12348, 12353, 12438, 12441, 12442, 12445, 12447, 12449, 12538, 12540, 12543, 12549, 12589, 12593, 12686, 12704, 12730, 12784, 12799, 13312, 19893, 19968, 40908, 40960, 42124, 42192, 42237, 42240, 42508, 42512, 42539, 42560, 42607, 42612, 42621, 42623, 42647, 42655, 42737, 42775, 42783, 42786, 42888, 42891, 42894, 42896, 42899, 42912, 42922, 43000, 43047, 43072, 43123, 43136, 43204, 43216, 43225, 43232, 43255, 43259, 43259, 43264, 43309, 43312, 43347, 43360, 43388, 43392, 43456, 43471, 43481, 43520, 43574, 43584, 43597, 43600, 43609, 43616, 43638, 43642, 43643, 43648, 43714, 43739, 43741, 43744, 43759, 43762, 43766, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43814, 43816, 43822, 43968, 44010, 44012, 44013, 44016, 44025, 44032, 55203, 55216, 55238, 55243, 55291, 63744, 64109, 64112, 64217, 64256, 64262, 64275, 64279, 64285, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65024, 65039, 65056, 65062, 65075, 65076, 65101, 65103, 65136, 65140, 65142, 65276, 65296, 65305, 65313, 65338, 65343, 65343, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500,]; - return Unicode; - })(); - TypeScript.Unicode = Unicode; -})(TypeScript || (TypeScript = {})); -var TypeScript; -(function (TypeScript) { - var IncrementalParser; - (function (IncrementalParser) { - function createParserSource(oldSyntaxTree, textChangeRange, text) { - var fileName = oldSyntaxTree.fileName(); - var languageVersion = oldSyntaxTree.languageVersion(); - var _scannerParserSource; - var _changeRange; - var _changeRangeNewSpan; - var _changeDelta = 0; - var _oldSourceUnitCursor = getSyntaxCursor(); - var oldSourceUnit = oldSyntaxTree.sourceUnit(); - var _outstandingRewindPointCount = 0; - if (oldSourceUnit.moduleElements.length > 0) { - _oldSourceUnitCursor.pushElement(TypeScript.childAt(oldSourceUnit.moduleElements, 0), 0); - } - _changeRange = extendToAffectedRange(textChangeRange, oldSourceUnit); - _changeRangeNewSpan = _changeRange.newSpan(); - if (TypeScript.Debug.shouldAssert(2 /* Aggressive */)) { - TypeScript.Debug.assert((TypeScript.fullWidth(oldSourceUnit) - _changeRange.span().length() + _changeRange.newLength()) === text.length()); - } - _scannerParserSource = TypeScript.Scanner.createParserSource(oldSyntaxTree.fileName(), text, oldSyntaxTree.languageVersion()); - function release() { - _scannerParserSource.release(); - _scannerParserSource = undefined; - _oldSourceUnitCursor = undefined; - _outstandingRewindPointCount = 0; - } - function extendToAffectedRange(changeRange, sourceUnit) { - var maxLookahead = 1; - var start = changeRange.span().start(); - for (var i = 0; start > 0 && i <= maxLookahead; i++) { - var token = TypeScript.findToken(sourceUnit, start); - var position = token.fullStart(); - start = Math.max(0, position - 1); - } - var finalSpan = TypeScript.TextSpan.fromBounds(start, changeRange.span().end()); - var finalLength = changeRange.newLength() + (changeRange.span().start() - start); - return new TypeScript.TextChangeRange(finalSpan, finalLength); - } - function absolutePosition() { - return _scannerParserSource.absolutePosition(); - } - function tokenDiagnostics() { - return _scannerParserSource.tokenDiagnostics(); - } - function getRewindPoint() { - var rewindPoint = _scannerParserSource.getRewindPoint(); - var oldSourceUnitCursorClone = cloneSyntaxCursor(_oldSourceUnitCursor); - rewindPoint.changeDelta = _changeDelta; - rewindPoint.changeRange = _changeRange; - rewindPoint.oldSourceUnitCursor = _oldSourceUnitCursor; - _oldSourceUnitCursor = oldSourceUnitCursorClone; - _outstandingRewindPointCount++; - return rewindPoint; - } - function rewind(rewindPoint) { - _changeRange = rewindPoint.changeRange; - _changeDelta = rewindPoint.changeDelta; - returnSyntaxCursor(_oldSourceUnitCursor); - _oldSourceUnitCursor = rewindPoint.oldSourceUnitCursor; - rewindPoint.oldSourceUnitCursor = undefined; - _scannerParserSource.rewind(rewindPoint); - } - function releaseRewindPoint(rewindPoint) { - if (rewindPoint.oldSourceUnitCursor) { - returnSyntaxCursor(rewindPoint.oldSourceUnitCursor); - } - _scannerParserSource.releaseRewindPoint(rewindPoint); - _outstandingRewindPointCount--; - TypeScript.Debug.assert(_outstandingRewindPointCount >= 0); - } - function isPinned() { - return _outstandingRewindPointCount > 0; - } - function canReadFromOldSourceUnit() { - if (isPinned()) { - return false; - } - if (_changeRange && _changeRangeNewSpan.intersectsWithPosition(absolutePosition())) { - return false; - } - syncCursorToNewTextIfBehind(); - return _changeDelta === 0 && !_oldSourceUnitCursor.isFinished(); - } - function updateTokens(nodeOrToken) { - if (isPastChangeRange()) { - var position = absolutePosition(); - if (TypeScript.isToken(nodeOrToken)) { - nodeOrToken.setFullStart(position); - } - else { - var tokens = getTokens(nodeOrToken); - for (var i = 0, n = tokens.length; i < n; i++) { - var token = tokens[i]; - token.setFullStart(position); - position += token.fullWidth(); - } - } - } - } - function getTokens(node) { - var tokens = node.__cachedTokens; - if (!tokens) { - tokens = []; - tokenCollectorWalker.tokens = tokens; - TypeScript.visitNodeOrToken(tokenCollectorWalker, node); - node.__cachedTokens = tokens; - tokenCollectorWalker.tokens = undefined; - } - return tokens; - } - function currentNode() { - if (canReadFromOldSourceUnit()) { - var node = tryGetNodeFromOldSourceUnit(); - if (node) { - updateTokens(node); - return node; - } - } - return undefined; - } - function currentToken() { - if (canReadFromOldSourceUnit()) { - var token = tryGetTokenFromOldSourceUnit(); - if (token) { - updateTokens(token); - return token; - } - } - return _scannerParserSource.currentToken(); - } - function currentContextualToken() { - return _scannerParserSource.currentContextualToken(); - } - function syncCursorToNewTextIfBehind() { - while (true) { - if (_oldSourceUnitCursor.isFinished()) { - break; - } - if (_changeDelta >= 0) { - break; - } - var currentNodeOrToken = _oldSourceUnitCursor.currentNodeOrToken(); - if (TypeScript.isNode(currentNodeOrToken) && (TypeScript.fullWidth(currentNodeOrToken) > Math.abs(_changeDelta))) { - _oldSourceUnitCursor.moveToFirstChild(); - } - else { - _oldSourceUnitCursor.moveToNextSibling(); - _changeDelta += TypeScript.fullWidth(currentNodeOrToken); - } - } - } - function intersectsWithChangeRangeSpanInOriginalText(start, length) { - return !isPastChangeRange() && _changeRange.span().intersectsWith(start, length); - } - function tryGetNodeFromOldSourceUnit() { - while (true) { - var node = _oldSourceUnitCursor.currentNode(); - if (node === undefined) { - return undefined; - } - if (!intersectsWithChangeRangeSpanInOriginalText(absolutePosition(), TypeScript.fullWidth(node))) { - var isIncrementallyUnusuable = TypeScript.isIncrementallyUnusable(node); - if (!isIncrementallyUnusuable) { - return node; - } - } - _oldSourceUnitCursor.moveToFirstChild(); - } - } - function canReuseTokenFromOldSourceUnit(position, token) { - if (token) { - if (!intersectsWithChangeRangeSpanInOriginalText(position, token.fullWidth())) { - if (!token.isIncrementallyUnusable() && !TypeScript.Scanner.isContextualToken(token)) { - return true; - } - } - } - return false; - } - function tryGetTokenFromOldSourceUnit() { - var token = _oldSourceUnitCursor.currentToken(); - return canReuseTokenFromOldSourceUnit(absolutePosition(), token) ? token : undefined; - } - function peekToken(n) { - if (canReadFromOldSourceUnit()) { - var token = tryPeekTokenFromOldSourceUnit(n); - if (token) { - return token; - } - } - return _scannerParserSource.peekToken(n); - } - function tryPeekTokenFromOldSourceUnit(n) { - var cursorClone = cloneSyntaxCursor(_oldSourceUnitCursor); - var token = tryPeekTokenFromOldSourceUnitWorker(n); - returnSyntaxCursor(_oldSourceUnitCursor); - _oldSourceUnitCursor = cursorClone; - return token; - } - function tryPeekTokenFromOldSourceUnitWorker(n) { - var currentPosition = absolutePosition(); - _oldSourceUnitCursor.moveToFirstToken(); - for (var i = 0; i < n; i++) { - var interimToken = _oldSourceUnitCursor.currentToken(); - if (!canReuseTokenFromOldSourceUnit(currentPosition, interimToken)) { - return undefined; - } - currentPosition += interimToken.fullWidth(); - _oldSourceUnitCursor.moveToNextSibling(); - } - var token = _oldSourceUnitCursor.currentToken(); - return canReuseTokenFromOldSourceUnit(currentPosition, token) ? token : undefined; - } - function consumeNode(node) { - _oldSourceUnitCursor.moveToNextSibling(); - var _absolutePosition = absolutePosition() + TypeScript.fullWidth(node); - _scannerParserSource.resetToPosition(_absolutePosition); - } - function consumeToken(currentToken) { - if (_oldSourceUnitCursor.currentToken() === currentToken) { - _oldSourceUnitCursor.moveToNextSibling(); - var _absolutePosition = absolutePosition() + currentToken.fullWidth(); - _scannerParserSource.resetToPosition(_absolutePosition); - } - else { - _changeDelta -= currentToken.fullWidth(); - _scannerParserSource.consumeToken(currentToken); - if (!isPastChangeRange()) { - if (absolutePosition() >= _changeRangeNewSpan.end()) { - _changeDelta += _changeRange.newLength() - _changeRange.span().length(); - _changeRange = undefined; - } - } - } - } - function isPastChangeRange() { - return _changeRange === undefined; - } - return { - text: text, - fileName: fileName, - languageVersion: languageVersion, - currentNode: currentNode, - currentToken: currentToken, - currentContextualToken: currentContextualToken, - peekToken: peekToken, - consumeNode: consumeNode, - consumeToken: consumeToken, - getRewindPoint: getRewindPoint, - rewind: rewind, - releaseRewindPoint: releaseRewindPoint, - tokenDiagnostics: tokenDiagnostics, - release: release - }; - } - function createSyntaxCursorPiece(element, indexInParent) { - return { element: element, indexInParent: indexInParent }; - } - var syntaxCursorPool = []; - var syntaxCursorPoolCount = 0; - function returnSyntaxCursor(cursor) { - cursor.clean(); - syntaxCursorPool[syntaxCursorPoolCount] = cursor; - syntaxCursorPoolCount++; - } - function getSyntaxCursor() { - var cursor = syntaxCursorPoolCount > 0 ? syntaxCursorPool[syntaxCursorPoolCount - 1] : createSyntaxCursor(); - if (syntaxCursorPoolCount > 0) { - syntaxCursorPoolCount--; - syntaxCursorPool[syntaxCursorPoolCount] = undefined; - } - return cursor; - } - function cloneSyntaxCursor(cursor) { - var newCursor = getSyntaxCursor(); - newCursor.deepCopyFrom(cursor); - return newCursor; - } - function createSyntaxCursor() { - var pieces = []; - var currentPieceIndex = -1; - function clean() { - for (var i = 0, n = pieces.length; i < n; i++) { - var piece = pieces[i]; - if (piece.element === undefined) { - break; - } - piece.element = undefined; - piece.indexInParent = -1; - } - currentPieceIndex = -1; - } - function deepCopyFrom(other) { - for (var i = 0, n = other.pieces.length; i < n; i++) { - var piece = other.pieces[i]; - if (piece.element === undefined) { - break; - } - pushElement(piece.element, piece.indexInParent); - } - } - function isFinished() { - return currentPieceIndex < 0; - } - function currentNodeOrToken() { - if (isFinished()) { - return undefined; - } - var result = pieces[currentPieceIndex].element; - return result; - } - function currentNode() { - var element = currentNodeOrToken(); - return TypeScript.isNode(element) ? element : undefined; - } - function isEmptyList(element) { - return TypeScript.isList(element) && element.length === 0; - } - function moveToFirstChild() { - var nodeOrToken = currentNodeOrToken(); - if (nodeOrToken === undefined) { - return; - } - if (TypeScript.isToken(nodeOrToken)) { - return; - } - for (var i = 0, n = TypeScript.childCount(nodeOrToken); i < n; i++) { - var child = TypeScript.childAt(nodeOrToken, i); - if (child && !isEmptyList(child)) { - pushElement(child, i); - moveToFirstChildIfList(); - return; - } - } - moveToNextSibling(); - } - function moveToNextSibling() { - while (!isFinished()) { - var currentPiece = pieces[currentPieceIndex]; - var parent = currentPiece.element.parent; - for (var i = currentPiece.indexInParent + 1, n = TypeScript.childCount(parent); i < n; i++) { - var sibling = TypeScript.childAt(parent, i); - if (sibling && !isEmptyList(sibling)) { - currentPiece.element = sibling; - currentPiece.indexInParent = i; - moveToFirstChildIfList(); - return; - } - } - currentPiece.element = undefined; - currentPiece.indexInParent = -1; - currentPieceIndex--; - } - } - function moveToFirstChildIfList() { - var element = pieces[currentPieceIndex].element; - if (TypeScript.isList(element)) { - pushElement(TypeScript.childAt(element, 0), 0); - } - } - function pushElement(element, indexInParent) { - currentPieceIndex++; - if (currentPieceIndex === pieces.length) { - pieces.push(createSyntaxCursorPiece(element, indexInParent)); - } - else { - var piece = pieces[currentPieceIndex]; - piece.element = element; - piece.indexInParent = indexInParent; - } - } - function moveToFirstToken() { - while (!isFinished()) { - var element = pieces[currentPieceIndex].element; - if (TypeScript.isNode(element)) { - moveToFirstChild(); - continue; - } - return; - } - } - function currentToken() { - moveToFirstToken(); - var element = currentNodeOrToken(); - return element; - } - return { - pieces: pieces, - clean: clean, - isFinished: isFinished, - moveToFirstChild: moveToFirstChild, - moveToFirstToken: moveToFirstToken, - moveToNextSibling: moveToNextSibling, - currentNodeOrToken: currentNodeOrToken, - currentNode: currentNode, - currentToken: currentToken, - pushElement: pushElement, - deepCopyFrom: deepCopyFrom - }; - } - var TokenCollectorWalker = (function (_super) { - __extends(TokenCollectorWalker, _super); - function TokenCollectorWalker() { - _super.apply(this, arguments); - this.tokens = []; - } - TokenCollectorWalker.prototype.visitToken = function (token) { - this.tokens.push(token); - }; - return TokenCollectorWalker; - })(TypeScript.SyntaxWalker); - var tokenCollectorWalker = new TokenCollectorWalker(); - function parse(oldSyntaxTree, textChangeRange, newText) { - if (textChangeRange.isUnchanged()) { - return oldSyntaxTree; - } - return TypeScript.Parser.parseSource(createParserSource(oldSyntaxTree, textChangeRange, newText), oldSyntaxTree.isDeclaration()); - } - IncrementalParser.parse = parse; - })(IncrementalParser = TypeScript.IncrementalParser || (TypeScript.IncrementalParser = {})); -})(TypeScript || (TypeScript = {})); + ts.TextChangeRange = TextChangeRange; +})(ts || (ts = {})); var ts; (function (ts) { var OutliningElementsCollector; @@ -28119,8 +16293,8 @@ var ts; function addOutliningSpan(hintSpanNode, startElement, endElement, autoCollapse) { if (hintSpanNode && startElement && endElement) { var span = { - textSpan: TypeScript.TextSpan.fromBounds(startElement.pos, endElement.end), - hintSpan: TypeScript.TextSpan.fromBounds(hintSpanNode.getStart(), hintSpanNode.end), + textSpan: ts.TextSpan.fromBounds(startElement.pos, endElement.end), + hintSpan: ts.TextSpan.fromBounds(hintSpanNode.getStart(), hintSpanNode.end), bannerText: collapseText, autoCollapse: autoCollapse }; @@ -28129,10 +16303,10 @@ var ts; } function autoCollapse(node) { switch (node.kind) { - case 189 /* ModuleBlock */: - case 184 /* ClassDeclaration */: - case 185 /* InterfaceDeclaration */: - case 187 /* EnumDeclaration */: + case 192 /* ModuleBlock */: + case 187 /* ClassDeclaration */: + case 188 /* InterfaceDeclaration */: + case 190 /* EnumDeclaration */: return false; } return true; @@ -28144,15 +16318,15 @@ var ts; return; } switch (n.kind) { - case 158 /* Block */: + case 161 /* Block */: var parent = n.parent; var openBrace = ts.findChildOfKind(n, 13 /* OpenBraceToken */, sourceFile); var closeBrace = ts.findChildOfKind(n, 14 /* CloseBraceToken */, sourceFile); - if (parent.kind === 163 /* DoStatement */ || parent.kind === 166 /* ForInStatement */ || parent.kind === 165 /* ForStatement */ || parent.kind === 162 /* IfStatement */ || parent.kind === 164 /* WhileStatement */ || parent.kind === 170 /* WithStatement */) { + if (parent.kind === 166 /* DoStatement */ || parent.kind === 169 /* ForInStatement */ || parent.kind === 168 /* ForStatement */ || parent.kind === 165 /* IfStatement */ || parent.kind === 167 /* WhileStatement */ || parent.kind === 173 /* WithStatement */) { addOutliningSpan(parent, openBrace, closeBrace, autoCollapse(n)); } else { - var span = TypeScript.TextSpan.fromBounds(n.getStart(), n.end); + var span = ts.TextSpan.fromBounds(n.getStart(), n.end); elements.push({ textSpan: span, hintSpan: span, @@ -28161,25 +16335,25 @@ var ts; }); } break; - case 183 /* FunctionBlock */: - case 189 /* ModuleBlock */: - case 177 /* TryBlock */: - case 178 /* CatchBlock */: - case 179 /* FinallyBlock */: + case 186 /* FunctionBlock */: + case 192 /* ModuleBlock */: + case 180 /* TryBlock */: + case 181 /* CatchBlock */: + case 182 /* FinallyBlock */: var openBrace = ts.findChildOfKind(n, 13 /* OpenBraceToken */, sourceFile); var closeBrace = ts.findChildOfKind(n, 14 /* CloseBraceToken */, sourceFile); addOutliningSpan(n.parent, openBrace, closeBrace, autoCollapse(n)); break; - case 184 /* ClassDeclaration */: - case 185 /* InterfaceDeclaration */: - case 187 /* EnumDeclaration */: - case 140 /* ObjectLiteral */: - case 171 /* SwitchStatement */: + case 187 /* ClassDeclaration */: + case 188 /* InterfaceDeclaration */: + case 190 /* EnumDeclaration */: + case 142 /* ObjectLiteral */: + case 174 /* SwitchStatement */: var openBrace = ts.findChildOfKind(n, 13 /* OpenBraceToken */, sourceFile); var closeBrace = ts.findChildOfKind(n, 14 /* CloseBraceToken */, sourceFile); addOutliningSpan(n, openBrace, closeBrace, autoCollapse(n)); break; - case 139 /* ArrayLiteral */: + case 141 /* ArrayLiteral */: var openBracket = ts.findChildOfKind(n, 17 /* OpenBracketToken */, sourceFile); var closeBracket = ts.findChildOfKind(n, 18 /* CloseBracketToken */, sourceFile); addOutliningSpan(n, openBracket, closeBracket, autoCollapse(n)); @@ -28207,14 +16381,14 @@ var ts; var current = node.parent; while (current) { switch (current.kind) { - case 188 /* ModuleDeclaration */: + case 191 /* ModuleDeclaration */: do { current = current.parent; - } while (current.kind === 188 /* ModuleDeclaration */); - case 184 /* ClassDeclaration */: - case 187 /* EnumDeclaration */: - case 185 /* InterfaceDeclaration */: - case 182 /* FunctionDeclaration */: + } while (current.kind === 191 /* ModuleDeclaration */); + case 187 /* ClassDeclaration */: + case 190 /* EnumDeclaration */: + case 188 /* InterfaceDeclaration */: + case 185 /* FunctionDeclaration */: indent++; } current = current.parent; @@ -28225,10 +16399,10 @@ var ts; var childNodes = []; for (var i = 0, n = nodes.length; i < n; i++) { var node = nodes[i]; - if (node.kind === 184 /* ClassDeclaration */ || node.kind === 187 /* EnumDeclaration */ || node.kind === 185 /* InterfaceDeclaration */ || node.kind === 188 /* ModuleDeclaration */ || node.kind === 182 /* FunctionDeclaration */) { + if (node.kind === 187 /* ClassDeclaration */ || node.kind === 190 /* EnumDeclaration */ || node.kind === 188 /* InterfaceDeclaration */ || node.kind === 191 /* ModuleDeclaration */ || node.kind === 185 /* FunctionDeclaration */) { childNodes.push(node); } - else if (node.kind === 159 /* VariableStatement */) { + else if (node.kind === 162 /* VariableStatement */) { childNodes.push.apply(childNodes, node.declarations); } } @@ -28249,7 +16423,7 @@ var ts; return 1; } else if (n2.name) { - -1; + return -1; } else { return n1.kind - n2.kind; @@ -28261,17 +16435,17 @@ var ts; for (var i = 0, n = nodes.length; i < n; i++) { var node = nodes[i]; switch (node.kind) { - case 184 /* ClassDeclaration */: - case 187 /* EnumDeclaration */: - case 185 /* InterfaceDeclaration */: + case 187 /* ClassDeclaration */: + case 190 /* EnumDeclaration */: + case 188 /* InterfaceDeclaration */: topLevelNodes.push(node); break; - case 188 /* ModuleDeclaration */: + case 191 /* ModuleDeclaration */: var moduleDeclaration = node; topLevelNodes.push(node); addTopLevelNodes(getInnermostModule(moduleDeclaration).body.statements, topLevelNodes); break; - case 182 /* FunctionDeclaration */: + case 185 /* FunctionDeclaration */: var functionDeclaration = node; if (isTopLevelFunctionDeclaration(functionDeclaration)) { topLevelNodes.push(node); @@ -28282,12 +16456,12 @@ var ts; } } function isTopLevelFunctionDeclaration(functionDeclaration) { - if (functionDeclaration.kind === 182 /* FunctionDeclaration */) { - if (functionDeclaration.body && functionDeclaration.body.kind === 183 /* FunctionBlock */) { - if (ts.forEach(functionDeclaration.body.statements, function (s) { return s.kind === 182 /* FunctionDeclaration */ && !isEmpty(s.name.text); })) { + if (functionDeclaration.kind === 185 /* FunctionDeclaration */) { + if (functionDeclaration.body && functionDeclaration.body.kind === 186 /* FunctionBlock */) { + if (ts.forEach(functionDeclaration.body.statements, function (s) { return s.kind === 185 /* FunctionDeclaration */ && !isEmpty(s.name.text); })) { return true; } - if (functionDeclaration.parent.kind !== 183 /* FunctionBlock */) { + if (functionDeclaration.parent.kind !== 186 /* FunctionBlock */) { return true; } } @@ -28350,7 +16524,7 @@ var ts; return createItem(node, getTextOfNode(node.name), ts.ScriptElementKind.memberSetAccessorElement); case 131 /* IndexSignature */: return createItem(node, "[]", ts.ScriptElementKind.indexSignatureElement); - case 192 /* EnumMember */: + case 195 /* EnumMember */: return createItem(node, getTextOfNode(node.name), ts.ScriptElementKind.memberVariableElement); case 129 /* CallSignature */: return createItem(node, "()", ts.ScriptElementKind.callSignatureElement); @@ -28358,9 +16532,9 @@ var ts; return createItem(node, "new()", ts.ScriptElementKind.constructSignatureElement); case 124 /* Property */: return createItem(node, getTextOfNode(node.name), ts.ScriptElementKind.memberVariableElement); - case 182 /* FunctionDeclaration */: + case 185 /* FunctionDeclaration */: return createItem(node, getTextOfNode(node.name), ts.ScriptElementKind.functionElement); - case 181 /* VariableDeclaration */: + case 184 /* VariableDeclaration */: if (node.flags & 4096 /* Const */) { return createItem(node, getTextOfNode(node.name), ts.ScriptElementKind.constantElement); } @@ -28397,17 +16571,17 @@ var ts; } function createTopLevelItem(node) { switch (node.kind) { - case 193 /* SourceFile */: + case 196 /* SourceFile */: return createSourceFileItem(node); - case 184 /* ClassDeclaration */: + case 187 /* ClassDeclaration */: return createClassItem(node); - case 187 /* EnumDeclaration */: + case 190 /* EnumDeclaration */: return createEnumItem(node); - case 185 /* InterfaceDeclaration */: + case 188 /* InterfaceDeclaration */: return createIterfaceItem(node); - case 188 /* ModuleDeclaration */: + case 191 /* ModuleDeclaration */: return createModuleItem(node); - case 182 /* FunctionDeclaration */: + case 185 /* FunctionDeclaration */: return createFunctionItem(node); } return undefined; @@ -28417,7 +16591,7 @@ var ts; } var result = []; result.push(moduleDeclaration.name.text); - while (moduleDeclaration.body && moduleDeclaration.body.kind === 188 /* ModuleDeclaration */) { + while (moduleDeclaration.body && moduleDeclaration.body.kind === 191 /* ModuleDeclaration */) { moduleDeclaration = moduleDeclaration.body; result.push(moduleDeclaration.name.text); } @@ -28429,7 +16603,7 @@ var ts; return getNavigationBarItem(moduleName, ts.ScriptElementKind.moduleElement, ts.getNodeModifiers(node), [getNodeSpan(node)], childItems, getIndent(node)); } function createFunctionItem(node) { - if (node.name && node.body && node.body.kind === 183 /* FunctionBlock */) { + if (node.name && node.body && node.body.kind === 186 /* FunctionBlock */) { var childItems = getItemsWorker(sortNodes(node.body.statements), createChildItem); return getNavigationBarItem(node.name.text, ts.ScriptElementKind.functionElement, ts.getNodeModifiers(node), [getNodeSpan(node)], childItems, getIndent(node)); } @@ -28450,7 +16624,7 @@ var ts; var constructor = ts.forEach(node.members, function (member) { return member.kind === 126 /* Constructor */ && member; }); - var nodes = constructor ? constructor.parameters.concat(node.members) : node.members; + var nodes = constructor ? node.members.concat(constructor.parameters) : node.members; var childItems = getItemsWorker(sortNodes(nodes), createChildItem); } return getNavigationBarItem(node.name.text, ts.ScriptElementKind.classElement, ts.getNodeModifiers(node), [getNodeSpan(node)], childItems, getIndent(node)); @@ -28465,13 +16639,13 @@ var ts; } } function getInnermostModule(node) { - while (node.body.kind === 188 /* ModuleDeclaration */) { + while (node.body.kind === 191 /* ModuleDeclaration */) { node = node.body; } return node; } function getNodeSpan(node) { - return node.kind === 193 /* SourceFile */ ? TypeScript.TextSpan.fromBounds(node.getFullStart(), node.getEnd()) : TypeScript.TextSpan.fromBounds(node.getStart(), node.getEnd()); + return node.kind === 196 /* SourceFile */ ? ts.TextSpan.fromBounds(node.getFullStart(), node.getEnd()) : ts.TextSpan.fromBounds(node.getStart(), node.getEnd()); } function getTextOfNode(node) { return ts.getTextOfNodeFromSourceText(sourceFile.text, node); @@ -28480,106 +16654,6 @@ var ts; NavigationBar.getNavigationBarItems = getNavigationBarItems; })(NavigationBar = ts.NavigationBar || (ts.NavigationBar = {})); })(ts || (ts = {})); -var TypeScript; -(function (TypeScript) { - var Indentation; - (function (Indentation) { - function columnForEndOfTokenAtPosition(syntaxTree, position, options) { - var token = TypeScript.findToken(syntaxTree.sourceUnit(), position); - return columnForStartOfTokenAtPosition(syntaxTree, position, options) + TypeScript.width(token); - } - Indentation.columnForEndOfTokenAtPosition = columnForEndOfTokenAtPosition; - function columnForStartOfTokenAtPosition(syntaxTree, position, options) { - var token = TypeScript.findToken(syntaxTree.sourceUnit(), position); - var firstTokenInLine = TypeScript.Syntax.firstTokenInLineContainingPosition(syntaxTree, token.fullStart()); - var leadingTextInReverse = []; - var current = token; - while (current !== firstTokenInLine) { - current = TypeScript.previousToken(current); - if (current === firstTokenInLine) { - leadingTextInReverse.push(current.trailingTrivia().fullText()); - leadingTextInReverse.push(current.text()); - } - else { - leadingTextInReverse.push(current.fullText()); - } - } - collectLeadingTriviaTextToStartOfLine(firstTokenInLine, leadingTextInReverse); - return columnForLeadingTextInReverse(leadingTextInReverse, options); - } - Indentation.columnForStartOfTokenAtPosition = columnForStartOfTokenAtPosition; - function columnForStartOfFirstTokenInLineContainingPosition(syntaxTree, position, options) { - var firstTokenInLine = TypeScript.Syntax.firstTokenInLineContainingPosition(syntaxTree, position); - var leadingTextInReverse = []; - collectLeadingTriviaTextToStartOfLine(firstTokenInLine, leadingTextInReverse); - return columnForLeadingTextInReverse(leadingTextInReverse, options); - } - Indentation.columnForStartOfFirstTokenInLineContainingPosition = columnForStartOfFirstTokenInLineContainingPosition; - function collectLeadingTriviaTextToStartOfLine(firstTokenInLine, leadingTextInReverse) { - var leadingTrivia = firstTokenInLine.leadingTrivia(); - for (var i = leadingTrivia.count() - 1; i >= 0; i--) { - var trivia = leadingTrivia.syntaxTriviaAt(i); - if (trivia.kind() === 3 /* NewLineTrivia */) { - break; - } - if (trivia.kind() === 4 /* MultiLineCommentTrivia */) { - var lineSegments = TypeScript.Syntax.splitMultiLineCommentTriviaIntoMultipleLines(trivia); - leadingTextInReverse.push(TypeScript.ArrayUtilities.last(lineSegments)); - if (lineSegments.length > 0) { - break; - } - } - leadingTextInReverse.push(trivia.fullText()); - } - } - function columnForLeadingTextInReverse(leadingTextInReverse, options) { - var column = 0; - for (var i = leadingTextInReverse.length - 1; i >= 0; i--) { - var text = leadingTextInReverse[i]; - column = columnForPositionInStringWorker(text, text.length, column, options); - } - return column; - } - function columnForPositionInString(input, position, options) { - return columnForPositionInStringWorker(input, position, 0, options); - } - Indentation.columnForPositionInString = columnForPositionInString; - function columnForPositionInStringWorker(input, position, startColumn, options) { - var column = startColumn; - var spacesPerTab = options.spacesPerTab; - for (var j = 0; j < position; j++) { - var ch = input.charCodeAt(j); - if (ch === 9 /* tab */) { - column += spacesPerTab - column % spacesPerTab; - } - else { - column++; - } - } - return column; - } - function indentationString(column, options) { - var numberOfTabs = 0; - var numberOfSpaces = Math.max(0, column); - if (options.useTabs) { - numberOfTabs = Math.floor(column / options.spacesPerTab); - numberOfSpaces -= numberOfTabs * options.spacesPerTab; - } - return TypeScript.StringUtilities.repeat('\t', numberOfTabs) + TypeScript.StringUtilities.repeat(' ', numberOfSpaces); - } - Indentation.indentationString = indentationString; - function firstNonWhitespacePosition(value) { - for (var i = 0; i < value.length; i++) { - var ch = value.charCodeAt(i); - if (!TypeScript.CharacterInfo.isWhitespace(ch)) { - return i; - } - } - return value.length; - } - Indentation.firstNonWhitespacePosition = firstNonWhitespacePosition; - })(Indentation = TypeScript.Indentation || (TypeScript.Indentation = {})); -})(TypeScript || (TypeScript = {})); var ts; (function (ts) { var SignatureHelp; @@ -28604,7 +16678,7 @@ var ts; } return createSignatureHelpItems(candidates, resolvedSignature, argumentInfo); function getImmediatelyContainingArgumentInfo(node) { - if (node.parent.kind !== 144 /* CallExpression */ && node.parent.kind !== 145 /* NewExpression */) { + if (node.parent.kind !== 147 /* CallExpression */ && node.parent.kind !== 148 /* NewExpression */) { return undefined; } var parent = node.parent; @@ -28619,8 +16693,8 @@ var ts; return ts.findListItemInfo(node); } function getContainingArgumentInfo(node) { - for (var n = node; n.kind !== 193 /* SourceFile */; n = n.parent) { - if (n.kind === 183 /* FunctionBlock */) { + for (var n = node; n.kind !== 196 /* SourceFile */; n = n.parent) { + if (n.kind === 186 /* FunctionBlock */) { return undefined; } if (n.pos < n.parent.pos || n.end > n.parent.end) { @@ -28664,33 +16738,33 @@ var ts; var callTargetDisplayParts = callTargetSymbol && ts.symbolToDisplayParts(typeInfoResolver, callTargetSymbol, undefined, undefined); var items = ts.map(candidates, function (candidateSignature) { var signatureHelpParameters; - var prefixParts = []; - var suffixParts = []; + var prefixDisplayParts = []; + var suffixDisplayParts = []; if (callTargetDisplayParts) { - prefixParts.push.apply(prefixParts, callTargetDisplayParts); + prefixDisplayParts.push.apply(prefixDisplayParts, callTargetDisplayParts); } if (isTypeParameterHelp) { - prefixParts.push(ts.punctuationPart(23 /* LessThanToken */)); + prefixDisplayParts.push(ts.punctuationPart(23 /* LessThanToken */)); var typeParameters = candidateSignature.typeParameters; signatureHelpParameters = typeParameters && typeParameters.length > 0 ? ts.map(typeParameters, createSignatureHelpParameterForTypeParameter) : emptyArray; - suffixParts.push(ts.punctuationPart(24 /* GreaterThanToken */)); + suffixDisplayParts.push(ts.punctuationPart(24 /* GreaterThanToken */)); var parameterParts = ts.mapToDisplayParts(function (writer) { return typeInfoResolver.getSymbolDisplayBuilder().buildDisplayForParametersAndDelimiters(candidateSignature.parameters, writer, argumentListOrTypeArgumentList); }); - suffixParts.push.apply(suffixParts, parameterParts); + suffixDisplayParts.push.apply(suffixDisplayParts, parameterParts); } else { var typeParameterParts = ts.mapToDisplayParts(function (writer) { return typeInfoResolver.getSymbolDisplayBuilder().buildDisplayForTypeParametersAndDelimiters(candidateSignature.typeParameters, writer, argumentListOrTypeArgumentList); }); - prefixParts.push.apply(prefixParts, typeParameterParts); - prefixParts.push(ts.punctuationPart(15 /* OpenParenToken */)); + prefixDisplayParts.push.apply(prefixDisplayParts, typeParameterParts); + prefixDisplayParts.push(ts.punctuationPart(15 /* OpenParenToken */)); var parameters = candidateSignature.parameters; signatureHelpParameters = parameters.length > 0 ? ts.map(parameters, createSignatureHelpParameterForParameter) : emptyArray; - suffixParts.push(ts.punctuationPart(16 /* CloseParenToken */)); + suffixDisplayParts.push(ts.punctuationPart(16 /* CloseParenToken */)); } var returnTypeParts = ts.mapToDisplayParts(function (writer) { return typeInfoResolver.getSymbolDisplayBuilder().buildReturnTypeDisplay(candidateSignature, writer, argumentListOrTypeArgumentList); }); - suffixParts.push.apply(suffixParts, returnTypeParts); + suffixDisplayParts.push.apply(suffixDisplayParts, returnTypeParts); return { isVariadic: candidateSignature.hasRestParameter, - prefixDisplayParts: prefixParts, - suffixDisplayParts: suffixParts, + prefixDisplayParts: prefixDisplayParts, + suffixDisplayParts: suffixDisplayParts, separatorDisplayParts: [ts.punctuationPart(22 /* CommaToken */), ts.spacePart()], parameters: signatureHelpParameters, documentation: candidateSignature.getDocumentationComment() @@ -28698,7 +16772,7 @@ var ts; }); var applicableSpanStart = argumentListOrTypeArgumentList.getFullStart(); var applicableSpanEnd = ts.skipTrivia(sourceFile.text, argumentListOrTypeArgumentList.end, false); - var applicableSpan = new TypeScript.TextSpan(applicableSpanStart, applicableSpanEnd - applicableSpanStart); + var applicableSpan = new ts.TextSpan(applicableSpanStart, applicableSpanEnd - applicableSpanStart); var argumentIndex = (argumentInfoOrTypeArgumentInfo.listItemIndex + 1) >> 1; var argumentCount = argumentListOrTypeArgumentList.getChildCount() === 0 ? 0 : 1 + ts.countWhere(argumentListOrTypeArgumentList.getChildren(), function (arg) { return arg.kind === 22 /* CommaToken */; }); var selectedItemIndex = candidates.indexOf(bestSignature); @@ -28738,16 +16812,67 @@ var ts; })(ts || (ts = {})); var ts; (function (ts) { + function getEndLinePosition(line, sourceFile) { + ts.Debug.assert(line >= 1); + var lineStarts = sourceFile.getLineStarts(); + var lineIndex = line - 1; + if (lineIndex === lineStarts.length - 1) { + return sourceFile.text.length - 1; + } + else { + var start = lineStarts[lineIndex]; + var pos = lineStarts[lineIndex + 1] - 1; + ts.Debug.assert(ts.isLineBreak(sourceFile.text.charCodeAt(pos))); + while (start <= pos && ts.isLineBreak(sourceFile.text.charCodeAt(pos))) { + pos--; + } + return pos; + } + } + ts.getEndLinePosition = getEndLinePosition; + function getStartPositionOfLine(line, sourceFile) { + ts.Debug.assert(line >= 1); + return sourceFile.getLineStarts()[line - 1]; + } + ts.getStartPositionOfLine = getStartPositionOfLine; + function getStartLinePositionForPosition(position, sourceFile) { + var lineStarts = sourceFile.getLineStarts(); + var line = sourceFile.getLineAndCharacterFromPosition(position).line; + return lineStarts[line - 1]; + } + ts.getStartLinePositionForPosition = getStartLinePositionForPosition; + function rangeContainsRange(r1, r2) { + return startEndContainsRange(r1.pos, r1.end, r2); + } + ts.rangeContainsRange = rangeContainsRange; + function startEndContainsRange(start, end, range) { + return start <= range.pos && end >= range.end; + } + ts.startEndContainsRange = startEndContainsRange; + function rangeContainsStartEnd(range, start, end) { + return range.pos <= start && range.end >= end; + } + ts.rangeContainsStartEnd = rangeContainsStartEnd; + function rangeOverlapsWithStartEnd(r1, start, end) { + return startEndOverlapsWithStartEnd(r1.pos, r1.end, start, end); + } + ts.rangeOverlapsWithStartEnd = rangeOverlapsWithStartEnd; + function startEndOverlapsWithStartEnd(start1, end1, start2, end2) { + var start = Math.max(start1, start2); + var end = Math.min(end1, end2); + return start < end; + } + ts.startEndOverlapsWithStartEnd = startEndOverlapsWithStartEnd; function findListItemInfo(node) { - var syntaxList = findContainingList(node); - if (!syntaxList) { + var list = findContainingList(node); + if (!list) { return undefined; } - var children = syntaxList.getChildren(); - var index = ts.indexOf(children, node); + var children = list.getChildren(); + var listItemIndex = ts.indexOf(children, node); return { - listItemIndex: index, - list: syntaxList + listItemIndex: listItemIndex, + list: list }; } ts.findListItemInfo = findListItemInfo; @@ -28757,7 +16882,7 @@ var ts; ts.findChildOfKind = findChildOfKind; function findContainingList(node) { var syntaxList = ts.forEach(node.parent.getChildren(), function (c) { - if (c.kind === 195 /* SyntaxList */ && c.pos <= node.pos && c.end >= node.end) { + if (c.kind === 198 /* SyntaxList */ && c.pos <= node.pos && c.end >= node.end) { return c; } }); @@ -28765,7 +16890,7 @@ var ts; } ts.findContainingList = findContainingList; function findListItemIndexContainingPosition(list, position) { - ts.Debug.assert(list.kind === 195 /* SyntaxList */); + ts.Debug.assert(list.kind === 198 /* SyntaxList */); var children = list.getChildren(); for (var i = 0; i < children.length; i++) { if (children[i].pos <= position && children[i].end > position) { @@ -28776,11 +16901,11 @@ var ts; } ts.findListItemIndexContainingPosition = findListItemIndexContainingPosition; function getTouchingWord(sourceFile, position) { - return getTouchingToken(sourceFile, position, isWord); + return getTouchingToken(sourceFile, position, function (n) { return isWord(n.kind); }); } ts.getTouchingWord = getTouchingWord; function getTouchingPropertyName(sourceFile, position) { - return getTouchingToken(sourceFile, position, isPropertyName); + return getTouchingToken(sourceFile, position, function (n) { return isPropertyName(n.kind); }); } ts.getTouchingPropertyName = getTouchingPropertyName; function getTouchingToken(sourceFile, position, includeItemAtEndPosition) { @@ -28872,7 +16997,7 @@ var ts; } } } - ts.Debug.assert(startNode !== undefined || n.kind === 193 /* SourceFile */); + ts.Debug.assert(startNode !== undefined || n.kind === 196 /* SourceFile */); if (children.length) { var candidate = findRightmostChildNodeWithTokens(children, children.length); return candidate && findRightmostToken(candidate); @@ -28888,19 +17013,16 @@ var ts; } ts.findPrecedingToken = findPrecedingToken; function nodeHasTokens(n) { - if (n.kind === 161 /* ExpressionStatement */) { - return nodeHasTokens(n.expression); - } - if (n.kind === 1 /* EndOfFileToken */ || n.kind === 157 /* OmittedExpression */ || n.kind === 120 /* Missing */) { + if (n.kind === 0 /* Unknown */) { return false; } - return n.kind !== 195 /* SyntaxList */ || n.getChildCount() !== 0; + return n.getWidth() !== 0; } function getTypeArgumentOrTypeParameterList(node) { - if (node.kind === 132 /* TypeReference */ || node.kind === 144 /* CallExpression */) { + if (node.kind === 132 /* TypeReference */ || node.kind === 147 /* CallExpression */) { return node.typeArguments; } - if (ts.isAnyFunction(node) || node.kind === 184 /* ClassDeclaration */ || node.kind === 185 /* InterfaceDeclaration */) { + if (ts.isAnyFunction(node) || node.kind === 187 /* ClassDeclaration */ || node.kind === 188 /* InterfaceDeclaration */) { return node.typeParameters; } return undefined; @@ -28910,1885 +17032,21 @@ var ts; return n.kind >= 1 /* FirstToken */ && n.kind <= 119 /* LastToken */; } ts.isToken = isToken; - function isWord(n) { - return n.kind === 63 /* Identifier */ || ts.isKeyword(n.kind); + function isWord(kind) { + return kind === 63 /* Identifier */ || ts.isKeyword(kind); } - function isPropertyName(n) { - return n.kind === 7 /* StringLiteral */ || n.kind === 6 /* NumericLiteral */ || isWord(n); + function isPropertyName(kind) { + return kind === 7 /* StringLiteral */ || kind === 6 /* NumericLiteral */ || isWord(kind); } - function isComment(n) { - return n.kind === 2 /* SingleLineCommentTrivia */ || n.kind === 3 /* MultiLineCommentTrivia */; + function isComment(kind) { + return kind === 2 /* SingleLineCommentTrivia */ || kind === 3 /* MultiLineCommentTrivia */; } ts.isComment = isComment; - function isPunctuation(n) { - return 13 /* FirstPunctuation */ <= n.kind && n.kind <= 62 /* LastPunctuation */; + function isPunctuation(kind) { + return 13 /* FirstPunctuation */ <= kind && kind <= 62 /* LastPunctuation */; } ts.isPunctuation = isPunctuation; })(ts || (ts = {})); -var TypeScript; -(function (TypeScript) { - var Services; - (function (Services) { - var Formatting; - (function (Formatting) { - var TextSnapshot = (function () { - function TextSnapshot(snapshot) { - this.snapshot = snapshot; - this.lines = []; - } - TextSnapshot.prototype.getLength = function () { - return this.snapshot.length(); - }; - TextSnapshot.prototype.getText = function (span) { - return this.snapshot.substr(span.start(), span.length()); - }; - TextSnapshot.prototype.getLineNumberFromPosition = function (position) { - return this.snapshot.lineMap().getLineNumberFromPosition(position); - }; - TextSnapshot.prototype.getLineFromPosition = function (position) { - var lineNumber = this.getLineNumberFromPosition(position); - return this.getLineFromLineNumber(lineNumber); - }; - TextSnapshot.prototype.getLineFromLineNumber = function (lineNumber) { - var line = this.lines[lineNumber]; - if (line === undefined) { - line = this.getLineFromLineNumberWorker(lineNumber); - this.lines[lineNumber] = line; - } - return line; - }; - TextSnapshot.prototype.getLineFromLineNumberWorker = function (lineNumber) { - var lineMap = this.snapshot.lineMap().lineStarts(); - var lineMapIndex = lineNumber; - if (lineMapIndex < 0 || lineMapIndex >= lineMap.length) - throw new Error(TypeScript.getDiagnosticMessage(TypeScript.DiagnosticCode.Invalid_line_number_0, [lineMapIndex])); - var start = lineMap[lineMapIndex]; - var end; - var endIncludingLineBreak; - var lineBreak = ""; - if (lineMapIndex == lineMap.length) { - end = endIncludingLineBreak = this.snapshot.length(); - } - else { - endIncludingLineBreak = (lineMapIndex >= lineMap.length - 1 ? this.snapshot.length() : lineMap[lineMapIndex + 1]); - for (var p = endIncludingLineBreak - 1; p >= start; p--) { - var c = this.snapshot.substr(p, 1); - if (c != "\r" && c != "\n") { - break; - } - } - end = p + 1; - lineBreak = this.snapshot.substr(end, endIncludingLineBreak - end); - } - var result = new Formatting.TextSnapshotLine(this, lineNumber, start, end, lineBreak); - return result; - }; - return TextSnapshot; - })(); - Formatting.TextSnapshot = TextSnapshot; - })(Formatting = Services.Formatting || (Services.Formatting = {})); - })(Services = TypeScript.Services || (TypeScript.Services = {})); -})(TypeScript || (TypeScript = {})); -var TypeScript; -(function (TypeScript) { - var Services; - (function (Services) { - var Formatting; - (function (Formatting) { - var TextSnapshotLine = (function () { - function TextSnapshotLine(_snapshot, _lineNumber, _start, _end, _lineBreak) { - this._snapshot = _snapshot; - this._lineNumber = _lineNumber; - this._start = _start; - this._end = _end; - this._lineBreak = _lineBreak; - } - TextSnapshotLine.prototype.snapshot = function () { - return this._snapshot; - }; - TextSnapshotLine.prototype.start = function () { - return new Formatting.SnapshotPoint(this._snapshot, this._start); - }; - TextSnapshotLine.prototype.startPosition = function () { - return this._start; - }; - TextSnapshotLine.prototype.end = function () { - return new Formatting.SnapshotPoint(this._snapshot, this._end); - }; - TextSnapshotLine.prototype.endPosition = function () { - return this._end; - }; - TextSnapshotLine.prototype.endIncludingLineBreak = function () { - return new Formatting.SnapshotPoint(this._snapshot, this._end + this._lineBreak.length); - }; - TextSnapshotLine.prototype.endIncludingLineBreakPosition = function () { - return this._end + this._lineBreak.length; - }; - TextSnapshotLine.prototype.length = function () { - return this._end - this._start; - }; - TextSnapshotLine.prototype.lineNumber = function () { - return this._lineNumber; - }; - TextSnapshotLine.prototype.getText = function () { - return this._snapshot.getText(TypeScript.TextSpan.fromBounds(this._start, this._end)); - }; - return TextSnapshotLine; - })(); - Formatting.TextSnapshotLine = TextSnapshotLine; - })(Formatting = Services.Formatting || (Services.Formatting = {})); - })(Services = TypeScript.Services || (TypeScript.Services = {})); -})(TypeScript || (TypeScript = {})); -var TypeScript; -(function (TypeScript) { - var Services; - (function (Services) { - var Formatting; - (function (Formatting) { - var SnapshotPoint = (function () { - function SnapshotPoint(snapshot, position) { - this.snapshot = snapshot; - this.position = position; - } - SnapshotPoint.prototype.getContainingLine = function () { - return this.snapshot.getLineFromPosition(this.position); - }; - SnapshotPoint.prototype.add = function (offset) { - return new SnapshotPoint(this.snapshot, this.position + offset); - }; - return SnapshotPoint; - })(); - Formatting.SnapshotPoint = SnapshotPoint; - })(Formatting = Services.Formatting || (Services.Formatting = {})); - })(Services = TypeScript.Services || (TypeScript.Services = {})); -})(TypeScript || (TypeScript = {})); -var TypeScript; -(function (TypeScript) { - var Services; - (function (Services) { - var Formatting; - (function (Formatting) { - var FormattingContext = (function () { - function FormattingContext(snapshot, formattingRequestKind) { - this.snapshot = snapshot; - this.formattingRequestKind = formattingRequestKind; - this.currentTokenSpan = null; - this.nextTokenSpan = null; - this.contextNode = null; - this.currentTokenParent = null; - this.nextTokenParent = null; - this.contextNodeAllOnSameLine = null; - this.nextNodeAllOnSameLine = null; - this.tokensAreOnSameLine = null; - this.contextNodeBlockIsOnOneLine = null; - this.nextNodeBlockIsOnOneLine = null; - TypeScript.Debug.assert(this.snapshot != null, "snapshot is null"); - } - FormattingContext.prototype.updateContext = function (currentTokenSpan, currentTokenParent, nextTokenSpan, nextTokenParent, commonParent) { - TypeScript.Debug.assert(currentTokenSpan != null, "currentTokenSpan is null"); - TypeScript.Debug.assert(currentTokenParent != null, "currentTokenParent is null"); - TypeScript.Debug.assert(nextTokenSpan != null, "nextTokenSpan is null"); - TypeScript.Debug.assert(nextTokenParent != null, "nextTokenParent is null"); - TypeScript.Debug.assert(commonParent != null, "commonParent is null"); - this.currentTokenSpan = currentTokenSpan; - this.currentTokenParent = currentTokenParent; - this.nextTokenSpan = nextTokenSpan; - this.nextTokenParent = nextTokenParent; - this.contextNode = commonParent; - this.contextNodeAllOnSameLine = null; - this.nextNodeAllOnSameLine = null; - this.tokensAreOnSameLine = null; - this.contextNodeBlockIsOnOneLine = null; - this.nextNodeBlockIsOnOneLine = null; - }; - FormattingContext.prototype.ContextNodeAllOnSameLine = function () { - if (this.contextNodeAllOnSameLine === null) { - this.contextNodeAllOnSameLine = this.NodeIsOnOneLine(this.contextNode); - } - return this.contextNodeAllOnSameLine; - }; - FormattingContext.prototype.NextNodeAllOnSameLine = function () { - if (this.nextNodeAllOnSameLine === null) { - this.nextNodeAllOnSameLine = this.NodeIsOnOneLine(this.nextTokenParent); - } - return this.nextNodeAllOnSameLine; - }; - FormattingContext.prototype.TokensAreOnSameLine = function () { - if (this.tokensAreOnSameLine === null) { - var startLine = this.snapshot.getLineNumberFromPosition(this.currentTokenSpan.start()); - var endLine = this.snapshot.getLineNumberFromPosition(this.nextTokenSpan.start()); - this.tokensAreOnSameLine = (startLine == endLine); - } - return this.tokensAreOnSameLine; - }; - FormattingContext.prototype.ContextNodeBlockIsOnOneLine = function () { - if (this.contextNodeBlockIsOnOneLine === null) { - this.contextNodeBlockIsOnOneLine = this.BlockIsOnOneLine(this.contextNode); - } - return this.contextNodeBlockIsOnOneLine; - }; - FormattingContext.prototype.NextNodeBlockIsOnOneLine = function () { - if (this.nextNodeBlockIsOnOneLine === null) { - this.nextNodeBlockIsOnOneLine = this.BlockIsOnOneLine(this.nextTokenParent); - } - return this.nextNodeBlockIsOnOneLine; - }; - FormattingContext.prototype.NodeIsOnOneLine = function (node) { - var startLine = this.snapshot.getLineNumberFromPosition(node.start()); - var endLine = this.snapshot.getLineNumberFromPosition(node.end()); - return startLine == endLine; - }; - FormattingContext.prototype.BlockIsOnOneLine = function (node) { - var block = node.node(); - return this.snapshot.getLineNumberFromPosition(TypeScript.end(block.openBraceToken)) === this.snapshot.getLineNumberFromPosition(TypeScript.start(block.closeBraceToken)); - }; - return FormattingContext; - })(); - Formatting.FormattingContext = FormattingContext; - })(Formatting = Services.Formatting || (Services.Formatting = {})); - })(Services = TypeScript.Services || (TypeScript.Services = {})); -})(TypeScript || (TypeScript = {})); -var TypeScript; -(function (TypeScript) { - var Services; - (function (Services) { - var Formatting; - (function (Formatting) { - var FormattingManager = (function () { - function FormattingManager(syntaxTree, snapshot, rulesProvider, editorOptions) { - this.syntaxTree = syntaxTree; - this.snapshot = snapshot; - this.rulesProvider = rulesProvider; - this.options = new TypeScript.FormattingOptions(!editorOptions.ConvertTabsToSpaces, editorOptions.TabSize, editorOptions.IndentSize, editorOptions.NewLineCharacter); - } - FormattingManager.prototype.formatSelection = function (minChar, limChar) { - var span = TypeScript.TextSpan.fromBounds(minChar, limChar); - return this.formatSpan(span, 1 /* FormatSelection */); - }; - FormattingManager.prototype.formatDocument = function () { - var span = TypeScript.TextSpan.fromBounds(0, this.snapshot.getLength()); - return this.formatSpan(span, 0 /* FormatDocument */); - }; - FormattingManager.prototype.formatOnSemicolon = function (caretPosition) { - var sourceUnit = this.syntaxTree.sourceUnit(); - var semicolonPositionedToken = TypeScript.findToken(sourceUnit, caretPosition - 1); - if (semicolonPositionedToken.kind() === 80 /* SemicolonToken */) { - var current = semicolonPositionedToken; - while (current.parent !== null && TypeScript.end(current.parent) === TypeScript.end(semicolonPositionedToken) && current.parent.kind() !== 1 /* List */) { - current = current.parent; - } - var span = new TypeScript.TextSpan(TypeScript.fullStart(current), TypeScript.fullWidth(current)); - return this.formatSpan(span, 3 /* FormatOnSemicolon */); - } - return []; - }; - FormattingManager.prototype.formatOnClosingCurlyBrace = function (caretPosition) { - var sourceUnit = this.syntaxTree.sourceUnit(); - var closeBracePositionedToken = TypeScript.findToken(sourceUnit, caretPosition - 1); - if (closeBracePositionedToken.kind() === 73 /* CloseBraceToken */) { - var current = closeBracePositionedToken; - while (current.parent !== null && TypeScript.end(current.parent) === TypeScript.end(closeBracePositionedToken) && current.parent.kind() !== 1 /* List */) { - current = current.parent; - } - var span = new TypeScript.TextSpan(TypeScript.fullStart(current), TypeScript.fullWidth(current)); - return this.formatSpan(span, 4 /* FormatOnClosingCurlyBrace */); - } - return []; - }; - FormattingManager.prototype.formatOnEnter = function (caretPosition) { - var lineNumber = this.snapshot.getLineNumberFromPosition(caretPosition); - if (lineNumber > 0) { - var prevLine = this.snapshot.getLineFromLineNumber(lineNumber - 1); - var currentLine = this.snapshot.getLineFromLineNumber(lineNumber); - var span = TypeScript.TextSpan.fromBounds(prevLine.startPosition(), currentLine.endPosition()); - return this.formatSpan(span, 2 /* FormatOnEnter */); - } - return []; - }; - FormattingManager.prototype.formatSpan = function (span, formattingRequestKind) { - var startLine = this.snapshot.getLineFromPosition(span.start()); - span = TypeScript.TextSpan.fromBounds(startLine.startPosition(), span.end()); - var result = []; - var formattingEdits = Formatting.Formatter.getEdits(span, this.syntaxTree.sourceUnit(), this.options, true, this.snapshot, this.rulesProvider, formattingRequestKind); - formattingEdits.forEach(function (item) { - result.push({ - span: new TypeScript.TextSpan(item.position, item.length), - newText: item.replaceWith - }); - }); - return result; - }; - return FormattingManager; - })(); - Formatting.FormattingManager = FormattingManager; - })(Formatting = Services.Formatting || (Services.Formatting = {})); - })(Services = TypeScript.Services || (TypeScript.Services = {})); -})(TypeScript || (TypeScript = {})); -var TypeScript; -(function (TypeScript) { - var Services; - (function (Services) { - var Formatting; - (function (Formatting) { - (function (FormattingRequestKind) { - FormattingRequestKind[FormattingRequestKind["FormatDocument"] = 0] = "FormatDocument"; - FormattingRequestKind[FormattingRequestKind["FormatSelection"] = 1] = "FormatSelection"; - FormattingRequestKind[FormattingRequestKind["FormatOnEnter"] = 2] = "FormatOnEnter"; - FormattingRequestKind[FormattingRequestKind["FormatOnSemicolon"] = 3] = "FormatOnSemicolon"; - FormattingRequestKind[FormattingRequestKind["FormatOnClosingCurlyBrace"] = 4] = "FormatOnClosingCurlyBrace"; - FormattingRequestKind[FormattingRequestKind["FormatOnPaste"] = 5] = "FormatOnPaste"; - })(Formatting.FormattingRequestKind || (Formatting.FormattingRequestKind = {})); - var FormattingRequestKind = Formatting.FormattingRequestKind; - })(Formatting = Services.Formatting || (Services.Formatting = {})); - })(Services = TypeScript.Services || (TypeScript.Services = {})); -})(TypeScript || (TypeScript = {})); -var TypeScript; -(function (TypeScript) { - var Services; - (function (Services) { - var Formatting; - (function (Formatting) { - var Rule = (function () { - function Rule(Descriptor, Operation, Flag) { - if (Flag === void 0) { Flag = 0 /* None */; } - this.Descriptor = Descriptor; - this.Operation = Operation; - this.Flag = Flag; - } - Rule.prototype.toString = function () { - return "[desc=" + this.Descriptor + "," + "operation=" + this.Operation + "," + "flag=" + this.Flag + "]"; - }; - return Rule; - })(); - Formatting.Rule = Rule; - })(Formatting = Services.Formatting || (Services.Formatting = {})); - })(Services = TypeScript.Services || (TypeScript.Services = {})); -})(TypeScript || (TypeScript = {})); -var TypeScript; -(function (TypeScript) { - var Services; - (function (Services) { - var Formatting; - (function (Formatting) { - (function (RuleAction) { - RuleAction[RuleAction["Ignore"] = 0] = "Ignore"; - RuleAction[RuleAction["Space"] = 1] = "Space"; - RuleAction[RuleAction["NewLine"] = 2] = "NewLine"; - RuleAction[RuleAction["Delete"] = 3] = "Delete"; - })(Formatting.RuleAction || (Formatting.RuleAction = {})); - var RuleAction = Formatting.RuleAction; - })(Formatting = Services.Formatting || (Services.Formatting = {})); - })(Services = TypeScript.Services || (TypeScript.Services = {})); -})(TypeScript || (TypeScript = {})); -var TypeScript; -(function (TypeScript) { - var Services; - (function (Services) { - var Formatting; - (function (Formatting) { - var RuleDescriptor = (function () { - function RuleDescriptor(LeftTokenRange, RightTokenRange) { - this.LeftTokenRange = LeftTokenRange; - this.RightTokenRange = RightTokenRange; - } - RuleDescriptor.prototype.toString = function () { - return "[leftRange=" + this.LeftTokenRange + "," + "rightRange=" + this.RightTokenRange + "]"; - }; - RuleDescriptor.create1 = function (left, right) { - return RuleDescriptor.create4(Formatting.Shared.TokenRange.FromToken(left), Formatting.Shared.TokenRange.FromToken(right)); - }; - RuleDescriptor.create2 = function (left, right) { - return RuleDescriptor.create4(left, Formatting.Shared.TokenRange.FromToken(right)); - }; - RuleDescriptor.create3 = function (left, right) { - return RuleDescriptor.create4(Formatting.Shared.TokenRange.FromToken(left), right); - }; - RuleDescriptor.create4 = function (left, right) { - return new RuleDescriptor(left, right); - }; - return RuleDescriptor; - })(); - Formatting.RuleDescriptor = RuleDescriptor; - })(Formatting = Services.Formatting || (Services.Formatting = {})); - })(Services = TypeScript.Services || (TypeScript.Services = {})); -})(TypeScript || (TypeScript = {})); -var TypeScript; -(function (TypeScript) { - var Services; - (function (Services) { - var Formatting; - (function (Formatting) { - (function (RuleFlags) { - RuleFlags[RuleFlags["None"] = 0] = "None"; - RuleFlags[RuleFlags["CanDeleteNewLines"] = 1] = "CanDeleteNewLines"; - })(Formatting.RuleFlags || (Formatting.RuleFlags = {})); - var RuleFlags = Formatting.RuleFlags; - })(Formatting = Services.Formatting || (Services.Formatting = {})); - })(Services = TypeScript.Services || (TypeScript.Services = {})); -})(TypeScript || (TypeScript = {})); -var TypeScript; -(function (TypeScript) { - var Services; - (function (Services) { - var Formatting; - (function (Formatting) { - var RuleOperation = (function () { - function RuleOperation() { - this.Context = null; - this.Action = null; - } - RuleOperation.prototype.toString = function () { - return "[context=" + this.Context + "," + "action=" + this.Action + "]"; - }; - RuleOperation.create1 = function (action) { - return RuleOperation.create2(Formatting.RuleOperationContext.Any, action); - }; - RuleOperation.create2 = function (context, action) { - var result = new RuleOperation(); - result.Context = context; - result.Action = action; - return result; - }; - return RuleOperation; - })(); - Formatting.RuleOperation = RuleOperation; - })(Formatting = Services.Formatting || (Services.Formatting = {})); - })(Services = TypeScript.Services || (TypeScript.Services = {})); -})(TypeScript || (TypeScript = {})); -var TypeScript; -(function (TypeScript) { - var Services; - (function (Services) { - var Formatting; - (function (Formatting) { - var RuleOperationContext = (function () { - function RuleOperationContext() { - var funcs = []; - for (var _i = 0; _i < arguments.length; _i++) { - funcs[_i - 0] = arguments[_i]; - } - this.customContextChecks = funcs; - } - RuleOperationContext.prototype.IsAny = function () { - return this == RuleOperationContext.Any; - }; - RuleOperationContext.prototype.InContext = function (context) { - if (this.IsAny()) { - return true; - } - for (var i = 0, len = this.customContextChecks.length; i < len; i++) { - if (!this.customContextChecks[i](context)) { - return false; - } - } - return true; - }; - RuleOperationContext.Any = new RuleOperationContext(); - return RuleOperationContext; - })(); - Formatting.RuleOperationContext = RuleOperationContext; - })(Formatting = Services.Formatting || (Services.Formatting = {})); - })(Services = TypeScript.Services || (TypeScript.Services = {})); -})(TypeScript || (TypeScript = {})); -var TypeScript; -(function (TypeScript) { - var Services; - (function (Services) { - var Formatting; - (function (Formatting) { - var Rules = (function () { - function Rules() { - this.IgnoreBeforeComment = new Formatting.Rule(Formatting.RuleDescriptor.create4(Formatting.Shared.TokenRange.Any, Formatting.Shared.TokenRange.Comments), Formatting.RuleOperation.create1(0 /* Ignore */)); - this.IgnoreAfterLineComment = new Formatting.Rule(Formatting.RuleDescriptor.create3(5 /* SingleLineCommentTrivia */, Formatting.Shared.TokenRange.Any), Formatting.RuleOperation.create1(0 /* Ignore */)); - this.NoSpaceBeforeSemicolon = new Formatting.Rule(Formatting.RuleDescriptor.create2(Formatting.Shared.TokenRange.Any, 80 /* SemicolonToken */), Formatting.RuleOperation.create2(new Formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 3 /* Delete */)); - this.NoSpaceBeforeColon = new Formatting.Rule(Formatting.RuleDescriptor.create2(Formatting.Shared.TokenRange.Any, 108 /* ColonToken */), Formatting.RuleOperation.create2(new Formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsNotBinaryOpContext), 3 /* Delete */)); - this.NoSpaceBeforeQMark = new Formatting.Rule(Formatting.RuleDescriptor.create2(Formatting.Shared.TokenRange.Any, 107 /* QuestionToken */), Formatting.RuleOperation.create2(new Formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsNotBinaryOpContext), 3 /* Delete */)); - this.SpaceAfterColon = new Formatting.Rule(Formatting.RuleDescriptor.create3(108 /* ColonToken */, Formatting.Shared.TokenRange.Any), Formatting.RuleOperation.create2(new Formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsNotBinaryOpContext), 1 /* Space */)); - this.SpaceAfterQMark = new Formatting.Rule(Formatting.RuleDescriptor.create3(107 /* QuestionToken */, Formatting.Shared.TokenRange.Any), Formatting.RuleOperation.create2(new Formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsNotBinaryOpContext), 1 /* Space */)); - this.SpaceAfterSemicolon = new Formatting.Rule(Formatting.RuleDescriptor.create3(80 /* SemicolonToken */, Formatting.Shared.TokenRange.Any), Formatting.RuleOperation.create2(new Formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 1 /* Space */)); - this.SpaceAfterCloseBrace = new Formatting.Rule(Formatting.RuleDescriptor.create3(73 /* CloseBraceToken */, Formatting.Shared.TokenRange.Any), Formatting.RuleOperation.create2(new Formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsAfterCodeBlockContext), 1 /* Space */)); - this.SpaceBetweenCloseBraceAndElse = new Formatting.Rule(Formatting.RuleDescriptor.create1(73 /* CloseBraceToken */, 25 /* ElseKeyword */), Formatting.RuleOperation.create2(new Formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 1 /* Space */)); - this.SpaceBetweenCloseBraceAndWhile = new Formatting.Rule(Formatting.RuleDescriptor.create1(73 /* CloseBraceToken */, 44 /* WhileKeyword */), Formatting.RuleOperation.create2(new Formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 1 /* Space */)); - this.NoSpaceAfterCloseBrace = new Formatting.Rule(Formatting.RuleDescriptor.create3(73 /* CloseBraceToken */, Formatting.Shared.TokenRange.FromTokens([75 /* CloseParenToken */, 77 /* CloseBracketToken */, 81 /* CommaToken */, 80 /* SemicolonToken */])), Formatting.RuleOperation.create2(new Formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 3 /* Delete */)); - this.NoSpaceBeforeDot = new Formatting.Rule(Formatting.RuleDescriptor.create2(Formatting.Shared.TokenRange.Any, 78 /* DotToken */), Formatting.RuleOperation.create2(new Formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 3 /* Delete */)); - this.NoSpaceAfterDot = new Formatting.Rule(Formatting.RuleDescriptor.create3(78 /* DotToken */, Formatting.Shared.TokenRange.Any), Formatting.RuleOperation.create2(new Formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 3 /* Delete */)); - this.NoSpaceBeforeOpenBracket = new Formatting.Rule(Formatting.RuleDescriptor.create2(Formatting.Shared.TokenRange.Any, 76 /* OpenBracketToken */), Formatting.RuleOperation.create2(new Formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 3 /* Delete */)); - this.NoSpaceAfterOpenBracket = new Formatting.Rule(Formatting.RuleDescriptor.create3(76 /* OpenBracketToken */, Formatting.Shared.TokenRange.Any), Formatting.RuleOperation.create2(new Formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 3 /* Delete */)); - this.NoSpaceBeforeCloseBracket = new Formatting.Rule(Formatting.RuleDescriptor.create2(Formatting.Shared.TokenRange.Any, 77 /* CloseBracketToken */), Formatting.RuleOperation.create2(new Formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 3 /* Delete */)); - this.NoSpaceAfterCloseBracket = new Formatting.Rule(Formatting.RuleDescriptor.create3(77 /* CloseBracketToken */, Formatting.Shared.TokenRange.Any), Formatting.RuleOperation.create2(new Formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 3 /* Delete */)); - this.FunctionOpenBraceLeftTokenRange = Formatting.Shared.TokenRange.AnyIncludingMultilineComments; - this.SpaceBeforeOpenBraceInFunction = new Formatting.Rule(Formatting.RuleDescriptor.create2(this.FunctionOpenBraceLeftTokenRange, 72 /* OpenBraceToken */), Formatting.RuleOperation.create2(new Formatting.RuleOperationContext(Rules.IsFunctionDeclContext, Rules.IsNotFormatOnEnter, Rules.IsSameLineTokenOrBeforeMultilineBlockContext), 1 /* Space */), 1 /* CanDeleteNewLines */); - this.TypeScriptOpenBraceLeftTokenRange = Formatting.Shared.TokenRange.FromTokens([9 /* IdentifierName */, 4 /* MultiLineCommentTrivia */]); - this.SpaceBeforeOpenBraceInTypeScriptDeclWithBlock = new Formatting.Rule(Formatting.RuleDescriptor.create2(this.TypeScriptOpenBraceLeftTokenRange, 72 /* OpenBraceToken */), Formatting.RuleOperation.create2(new Formatting.RuleOperationContext(Rules.IsTypeScriptDeclWithBlockContext, Rules.IsNotFormatOnEnter, Rules.IsSameLineTokenOrBeforeMultilineBlockContext), 1 /* Space */), 1 /* CanDeleteNewLines */); - this.ControlOpenBraceLeftTokenRange = Formatting.Shared.TokenRange.FromTokens([75 /* CloseParenToken */, 4 /* MultiLineCommentTrivia */, 24 /* DoKeyword */, 40 /* TryKeyword */, 27 /* FinallyKeyword */, 25 /* ElseKeyword */]); - this.SpaceBeforeOpenBraceInControl = new Formatting.Rule(Formatting.RuleDescriptor.create2(this.ControlOpenBraceLeftTokenRange, 72 /* OpenBraceToken */), Formatting.RuleOperation.create2(new Formatting.RuleOperationContext(Rules.IsControlDeclContext, Rules.IsNotFormatOnEnter, Rules.IsSameLineTokenOrBeforeMultilineBlockContext), 1 /* Space */), 1 /* CanDeleteNewLines */); - this.SpaceAfterOpenBrace = new Formatting.Rule(Formatting.RuleDescriptor.create3(72 /* OpenBraceToken */, Formatting.Shared.TokenRange.Any), Formatting.RuleOperation.create2(new Formatting.RuleOperationContext(Rules.IsSingleLineBlockContext), 1 /* Space */)); - this.SpaceBeforeCloseBrace = new Formatting.Rule(Formatting.RuleDescriptor.create2(Formatting.Shared.TokenRange.Any, 73 /* CloseBraceToken */), Formatting.RuleOperation.create2(new Formatting.RuleOperationContext(Rules.IsSingleLineBlockContext), 1 /* Space */)); - this.NoSpaceBetweenEmptyBraceBrackets = new Formatting.Rule(Formatting.RuleDescriptor.create1(72 /* OpenBraceToken */, 73 /* CloseBraceToken */), Formatting.RuleOperation.create2(new Formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsObjectContext), 3 /* Delete */)); - this.NewLineAfterOpenBraceInBlockContext = new Formatting.Rule(Formatting.RuleDescriptor.create3(72 /* OpenBraceToken */, Formatting.Shared.TokenRange.Any), Formatting.RuleOperation.create2(new Formatting.RuleOperationContext(Rules.IsMultilineBlockContext), 2 /* NewLine */)); - this.NewLineBeforeCloseBraceInBlockContext = new Formatting.Rule(Formatting.RuleDescriptor.create2(Formatting.Shared.TokenRange.AnyIncludingMultilineComments, 73 /* CloseBraceToken */), Formatting.RuleOperation.create2(new Formatting.RuleOperationContext(Rules.IsMultilineBlockContext), 2 /* NewLine */)); - this.NoSpaceAfterUnaryPrefixOperator = new Formatting.Rule(Formatting.RuleDescriptor.create4(Formatting.Shared.TokenRange.UnaryPrefixOperators, Formatting.Shared.TokenRange.UnaryPrefixExpressions), Formatting.RuleOperation.create2(new Formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsNotBinaryOpContext), 3 /* Delete */)); - this.NoSpaceAfterUnaryPreincrementOperator = new Formatting.Rule(Formatting.RuleDescriptor.create3(95 /* PlusPlusToken */, Formatting.Shared.TokenRange.UnaryPreincrementExpressions), Formatting.RuleOperation.create2(new Formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 3 /* Delete */)); - this.NoSpaceAfterUnaryPredecrementOperator = new Formatting.Rule(Formatting.RuleDescriptor.create3(96 /* MinusMinusToken */, Formatting.Shared.TokenRange.UnaryPredecrementExpressions), Formatting.RuleOperation.create2(new Formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 3 /* Delete */)); - this.NoSpaceBeforeUnaryPostincrementOperator = new Formatting.Rule(Formatting.RuleDescriptor.create2(Formatting.Shared.TokenRange.UnaryPostincrementExpressions, 95 /* PlusPlusToken */), Formatting.RuleOperation.create2(new Formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 3 /* Delete */)); - this.NoSpaceBeforeUnaryPostdecrementOperator = new Formatting.Rule(Formatting.RuleDescriptor.create2(Formatting.Shared.TokenRange.UnaryPostdecrementExpressions, 96 /* MinusMinusToken */), Formatting.RuleOperation.create2(new Formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 3 /* Delete */)); - this.SpaceAfterPostincrementWhenFollowedByAdd = new Formatting.Rule(Formatting.RuleDescriptor.create1(95 /* PlusPlusToken */, 91 /* PlusToken */), Formatting.RuleOperation.create2(new Formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), 1 /* Space */)); - this.SpaceAfterAddWhenFollowedByUnaryPlus = new Formatting.Rule(Formatting.RuleDescriptor.create1(91 /* PlusToken */, 91 /* PlusToken */), Formatting.RuleOperation.create2(new Formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), 1 /* Space */)); - this.SpaceAfterAddWhenFollowedByPreincrement = new Formatting.Rule(Formatting.RuleDescriptor.create1(91 /* PlusToken */, 95 /* PlusPlusToken */), Formatting.RuleOperation.create2(new Formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), 1 /* Space */)); - this.SpaceAfterPostdecrementWhenFollowedBySubtract = new Formatting.Rule(Formatting.RuleDescriptor.create1(96 /* MinusMinusToken */, 92 /* MinusToken */), Formatting.RuleOperation.create2(new Formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), 1 /* Space */)); - this.SpaceAfterSubtractWhenFollowedByUnaryMinus = new Formatting.Rule(Formatting.RuleDescriptor.create1(92 /* MinusToken */, 92 /* MinusToken */), Formatting.RuleOperation.create2(new Formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), 1 /* Space */)); - this.SpaceAfterSubtractWhenFollowedByPredecrement = new Formatting.Rule(Formatting.RuleDescriptor.create1(92 /* MinusToken */, 96 /* MinusMinusToken */), Formatting.RuleOperation.create2(new Formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), 1 /* Space */)); - this.NoSpaceBeforeComma = new Formatting.Rule(Formatting.RuleDescriptor.create2(Formatting.Shared.TokenRange.Any, 81 /* CommaToken */), Formatting.RuleOperation.create2(new Formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 3 /* Delete */)); - this.SpaceAfterCertainKeywords = new Formatting.Rule(Formatting.RuleDescriptor.create4(Formatting.Shared.TokenRange.FromTokens([42 /* VarKeyword */, 38 /* ThrowKeyword */, 33 /* NewKeyword */, 23 /* DeleteKeyword */, 35 /* ReturnKeyword */, 41 /* TypeOfKeyword */]), Formatting.Shared.TokenRange.Any), Formatting.RuleOperation.create2(new Formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 1 /* Space */)); - this.NoSpaceBeforeOpenParenInFuncCall = new Formatting.Rule(Formatting.RuleDescriptor.create2(Formatting.Shared.TokenRange.Any, 74 /* OpenParenToken */), Formatting.RuleOperation.create2(new Formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsFunctionCallOrNewContext), 3 /* Delete */)); - this.SpaceAfterFunctionInFuncDecl = new Formatting.Rule(Formatting.RuleDescriptor.create3(29 /* FunctionKeyword */, Formatting.Shared.TokenRange.Any), Formatting.RuleOperation.create2(new Formatting.RuleOperationContext(Rules.IsFunctionDeclContext), 1 /* Space */)); - this.NoSpaceBeforeOpenParenInFuncDecl = new Formatting.Rule(Formatting.RuleDescriptor.create2(Formatting.Shared.TokenRange.Any, 74 /* OpenParenToken */), Formatting.RuleOperation.create2(new Formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsFunctionDeclContext), 3 /* Delete */)); - this.SpaceAfterVoidOperator = new Formatting.Rule(Formatting.RuleDescriptor.create3(43 /* VoidKeyword */, Formatting.Shared.TokenRange.Any), Formatting.RuleOperation.create2(new Formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsVoidOpContext), 1 /* Space */)); - this.NoSpaceBetweenReturnAndSemicolon = new Formatting.Rule(Formatting.RuleDescriptor.create1(35 /* ReturnKeyword */, 80 /* SemicolonToken */), Formatting.RuleOperation.create2(new Formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 3 /* Delete */)); - this.SpaceBetweenStatements = new Formatting.Rule(Formatting.RuleDescriptor.create4(Formatting.Shared.TokenRange.FromTokens([75 /* CloseParenToken */, 24 /* DoKeyword */, 25 /* ElseKeyword */, 18 /* CaseKeyword */]), Formatting.Shared.TokenRange.Any), Formatting.RuleOperation.create2(new Formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsNotForContext), 1 /* Space */)); - this.SpaceAfterTryFinally = new Formatting.Rule(Formatting.RuleDescriptor.create2(Formatting.Shared.TokenRange.FromTokens([40 /* TryKeyword */, 27 /* FinallyKeyword */]), 72 /* OpenBraceToken */), Formatting.RuleOperation.create2(new Formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 1 /* Space */)); - this.SpaceAfterGetSetInMember = new Formatting.Rule(Formatting.RuleDescriptor.create2(Formatting.Shared.TokenRange.FromTokens([66 /* GetKeyword */, 70 /* SetKeyword */]), 9 /* IdentifierName */), Formatting.RuleOperation.create2(new Formatting.RuleOperationContext(Rules.IsFunctionDeclContext), 1 /* Space */)); - this.SpaceBeforeBinaryKeywordOperator = new Formatting.Rule(Formatting.RuleDescriptor.create4(Formatting.Shared.TokenRange.Any, Formatting.Shared.TokenRange.BinaryKeywordOperators), Formatting.RuleOperation.create2(new Formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), 1 /* Space */)); - this.SpaceAfterBinaryKeywordOperator = new Formatting.Rule(Formatting.RuleDescriptor.create4(Formatting.Shared.TokenRange.BinaryKeywordOperators, Formatting.Shared.TokenRange.Any), Formatting.RuleOperation.create2(new Formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), 1 /* Space */)); - this.NoSpaceAfterConstructor = new Formatting.Rule(Formatting.RuleDescriptor.create1(64 /* ConstructorKeyword */, 74 /* OpenParenToken */), Formatting.RuleOperation.create2(new Formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 3 /* Delete */)); - this.NoSpaceAfterModuleImport = new Formatting.Rule(Formatting.RuleDescriptor.create2(Formatting.Shared.TokenRange.FromTokens([67 /* ModuleKeyword */, 68 /* RequireKeyword */]), 74 /* OpenParenToken */), Formatting.RuleOperation.create2(new Formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 3 /* Delete */)); - this.SpaceAfterCertainTypeScriptKeywords = new Formatting.Rule(Formatting.RuleDescriptor.create4(Formatting.Shared.TokenRange.FromTokens([46 /* ClassKeyword */, 65 /* DeclareKeyword */, 48 /* EnumKeyword */, 49 /* ExportKeyword */, 50 /* ExtendsKeyword */, 66 /* GetKeyword */, 53 /* ImplementsKeyword */, 51 /* ImportKeyword */, 54 /* InterfaceKeyword */, 67 /* ModuleKeyword */, 57 /* PrivateKeyword */, 59 /* PublicKeyword */, 70 /* SetKeyword */, 60 /* StaticKeyword */]), Formatting.Shared.TokenRange.Any), Formatting.RuleOperation.create2(new Formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 1 /* Space */)); - this.SpaceBeforeCertainTypeScriptKeywords = new Formatting.Rule(Formatting.RuleDescriptor.create4(Formatting.Shared.TokenRange.Any, Formatting.Shared.TokenRange.FromTokens([50 /* ExtendsKeyword */, 53 /* ImplementsKeyword */])), Formatting.RuleOperation.create2(new Formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 1 /* Space */)); - this.SpaceAfterModuleName = new Formatting.Rule(Formatting.RuleDescriptor.create1(12 /* StringLiteral */, 72 /* OpenBraceToken */), Formatting.RuleOperation.create2(new Formatting.RuleOperationContext(Rules.IsModuleDeclContext), 1 /* Space */)); - this.SpaceAfterArrow = new Formatting.Rule(Formatting.RuleDescriptor.create3(87 /* EqualsGreaterThanToken */, Formatting.Shared.TokenRange.Any), Formatting.RuleOperation.create2(new Formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 1 /* Space */)); - this.NoSpaceAfterEllipsis = new Formatting.Rule(Formatting.RuleDescriptor.create1(79 /* DotDotDotToken */, 9 /* IdentifierName */), Formatting.RuleOperation.create2(new Formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 3 /* Delete */)); - this.NoSpaceAfterOptionalParameters = new Formatting.Rule(Formatting.RuleDescriptor.create3(107 /* QuestionToken */, Formatting.Shared.TokenRange.FromTokens([75 /* CloseParenToken */, 81 /* CommaToken */])), Formatting.RuleOperation.create2(new Formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsNotBinaryOpContext), 3 /* Delete */)); - this.NoSpaceBeforeOpenAngularBracket = new Formatting.Rule(Formatting.RuleDescriptor.create2(Formatting.Shared.TokenRange.TypeNames, 82 /* LessThanToken */), Formatting.RuleOperation.create2(new Formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsTypeArgumentOrParameterContext), 3 /* Delete */)); - this.NoSpaceBetweenCloseParenAndAngularBracket = new Formatting.Rule(Formatting.RuleDescriptor.create1(75 /* CloseParenToken */, 82 /* LessThanToken */), Formatting.RuleOperation.create2(new Formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsTypeArgumentOrParameterContext), 3 /* Delete */)); - this.NoSpaceAfterOpenAngularBracket = new Formatting.Rule(Formatting.RuleDescriptor.create3(82 /* LessThanToken */, Formatting.Shared.TokenRange.TypeNames), Formatting.RuleOperation.create2(new Formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsTypeArgumentOrParameterContext), 3 /* Delete */)); - this.NoSpaceBeforeCloseAngularBracket = new Formatting.Rule(Formatting.RuleDescriptor.create2(Formatting.Shared.TokenRange.Any, 83 /* GreaterThanToken */), Formatting.RuleOperation.create2(new Formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsTypeArgumentOrParameterContext), 3 /* Delete */)); - this.NoSpaceAfterCloseAngularBracket = new Formatting.Rule(Formatting.RuleDescriptor.create3(83 /* GreaterThanToken */, Formatting.Shared.TokenRange.FromTokens([74 /* OpenParenToken */, 76 /* OpenBracketToken */, 83 /* GreaterThanToken */, 81 /* CommaToken */])), Formatting.RuleOperation.create2(new Formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsTypeArgumentOrParameterContext), 3 /* Delete */)); - this.NoSpaceBetweenEmptyInterfaceBraceBrackets = new Formatting.Rule(Formatting.RuleDescriptor.create1(72 /* OpenBraceToken */, 73 /* CloseBraceToken */), Formatting.RuleOperation.create2(new Formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsObjectTypeContext), 3 /* Delete */)); - this.HighPriorityCommonRules = [ - this.IgnoreBeforeComment, - this.IgnoreAfterLineComment, - this.NoSpaceBeforeColon, - this.SpaceAfterColon, - this.NoSpaceBeforeQMark, - this.SpaceAfterQMark, - this.NoSpaceBeforeDot, - this.NoSpaceAfterDot, - this.NoSpaceAfterUnaryPrefixOperator, - this.NoSpaceAfterUnaryPreincrementOperator, - this.NoSpaceAfterUnaryPredecrementOperator, - this.NoSpaceBeforeUnaryPostincrementOperator, - this.NoSpaceBeforeUnaryPostdecrementOperator, - this.SpaceAfterPostincrementWhenFollowedByAdd, - this.SpaceAfterAddWhenFollowedByUnaryPlus, - this.SpaceAfterAddWhenFollowedByPreincrement, - this.SpaceAfterPostdecrementWhenFollowedBySubtract, - this.SpaceAfterSubtractWhenFollowedByUnaryMinus, - this.SpaceAfterSubtractWhenFollowedByPredecrement, - this.NoSpaceAfterCloseBrace, - this.SpaceAfterOpenBrace, - this.SpaceBeforeCloseBrace, - this.NewLineBeforeCloseBraceInBlockContext, - this.SpaceAfterCloseBrace, - this.SpaceBetweenCloseBraceAndElse, - this.SpaceBetweenCloseBraceAndWhile, - this.NoSpaceBetweenEmptyBraceBrackets, - this.SpaceAfterFunctionInFuncDecl, - this.NewLineAfterOpenBraceInBlockContext, - this.SpaceAfterGetSetInMember, - this.NoSpaceBetweenReturnAndSemicolon, - this.SpaceAfterCertainKeywords, - this.NoSpaceBeforeOpenParenInFuncCall, - this.SpaceBeforeBinaryKeywordOperator, - this.SpaceAfterBinaryKeywordOperator, - this.SpaceAfterVoidOperator, - this.NoSpaceAfterConstructor, - this.NoSpaceAfterModuleImport, - this.SpaceAfterCertainTypeScriptKeywords, - this.SpaceBeforeCertainTypeScriptKeywords, - this.SpaceAfterModuleName, - this.SpaceAfterArrow, - this.NoSpaceAfterEllipsis, - this.NoSpaceAfterOptionalParameters, - this.NoSpaceBetweenEmptyInterfaceBraceBrackets, - this.NoSpaceBeforeOpenAngularBracket, - this.NoSpaceBetweenCloseParenAndAngularBracket, - this.NoSpaceAfterOpenAngularBracket, - this.NoSpaceBeforeCloseAngularBracket, - this.NoSpaceAfterCloseAngularBracket - ]; - this.LowPriorityCommonRules = [ - this.NoSpaceBeforeSemicolon, - this.SpaceBeforeOpenBraceInControl, - this.SpaceBeforeOpenBraceInFunction, - this.SpaceBeforeOpenBraceInTypeScriptDeclWithBlock, - this.NoSpaceBeforeComma, - this.NoSpaceBeforeOpenBracket, - this.NoSpaceAfterOpenBracket, - this.NoSpaceBeforeCloseBracket, - this.NoSpaceAfterCloseBracket, - this.SpaceAfterSemicolon, - this.NoSpaceBeforeOpenParenInFuncDecl, - this.SpaceBetweenStatements, - this.SpaceAfterTryFinally - ]; - this.SpaceAfterComma = new Formatting.Rule(Formatting.RuleDescriptor.create3(81 /* CommaToken */, Formatting.Shared.TokenRange.Any), Formatting.RuleOperation.create2(new Formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 1 /* Space */)); - this.NoSpaceAfterComma = new Formatting.Rule(Formatting.RuleDescriptor.create3(81 /* CommaToken */, Formatting.Shared.TokenRange.Any), Formatting.RuleOperation.create2(new Formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 3 /* Delete */)); - this.SpaceBeforeBinaryOperator = new Formatting.Rule(Formatting.RuleDescriptor.create4(Formatting.Shared.TokenRange.Any, Formatting.Shared.TokenRange.BinaryOperators), Formatting.RuleOperation.create2(new Formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), 1 /* Space */)); - this.SpaceAfterBinaryOperator = new Formatting.Rule(Formatting.RuleDescriptor.create4(Formatting.Shared.TokenRange.BinaryOperators, Formatting.Shared.TokenRange.Any), Formatting.RuleOperation.create2(new Formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), 1 /* Space */)); - this.NoSpaceBeforeBinaryOperator = new Formatting.Rule(Formatting.RuleDescriptor.create4(Formatting.Shared.TokenRange.Any, Formatting.Shared.TokenRange.BinaryOperators), Formatting.RuleOperation.create2(new Formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), 3 /* Delete */)); - this.NoSpaceAfterBinaryOperator = new Formatting.Rule(Formatting.RuleDescriptor.create4(Formatting.Shared.TokenRange.BinaryOperators, Formatting.Shared.TokenRange.Any), Formatting.RuleOperation.create2(new Formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), 3 /* Delete */)); - this.SpaceAfterKeywordInControl = new Formatting.Rule(Formatting.RuleDescriptor.create2(Formatting.Shared.TokenRange.Keywords, 74 /* OpenParenToken */), Formatting.RuleOperation.create2(new Formatting.RuleOperationContext(Rules.IsControlDeclContext), 1 /* Space */)); - this.NoSpaceAfterKeywordInControl = new Formatting.Rule(Formatting.RuleDescriptor.create2(Formatting.Shared.TokenRange.Keywords, 74 /* OpenParenToken */), Formatting.RuleOperation.create2(new Formatting.RuleOperationContext(Rules.IsControlDeclContext), 3 /* Delete */)); - this.NewLineBeforeOpenBraceInFunction = new Formatting.Rule(Formatting.RuleDescriptor.create2(this.FunctionOpenBraceLeftTokenRange, 72 /* OpenBraceToken */), Formatting.RuleOperation.create2(new Formatting.RuleOperationContext(Rules.IsFunctionDeclContext, Rules.IsBeforeMultilineBlockContext), 2 /* NewLine */), 1 /* CanDeleteNewLines */); - this.NewLineBeforeOpenBraceInTypeScriptDeclWithBlock = new Formatting.Rule(Formatting.RuleDescriptor.create2(this.TypeScriptOpenBraceLeftTokenRange, 72 /* OpenBraceToken */), Formatting.RuleOperation.create2(new Formatting.RuleOperationContext(Rules.IsTypeScriptDeclWithBlockContext, Rules.IsBeforeMultilineBlockContext), 2 /* NewLine */), 1 /* CanDeleteNewLines */); - this.NewLineBeforeOpenBraceInControl = new Formatting.Rule(Formatting.RuleDescriptor.create2(this.ControlOpenBraceLeftTokenRange, 72 /* OpenBraceToken */), Formatting.RuleOperation.create2(new Formatting.RuleOperationContext(Rules.IsControlDeclContext, Rules.IsBeforeMultilineBlockContext), 2 /* NewLine */), 1 /* CanDeleteNewLines */); - this.SpaceAfterSemicolonInFor = new Formatting.Rule(Formatting.RuleDescriptor.create3(80 /* SemicolonToken */, Formatting.Shared.TokenRange.Any), Formatting.RuleOperation.create2(new Formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsForContext), 1 /* Space */)); - this.NoSpaceAfterSemicolonInFor = new Formatting.Rule(Formatting.RuleDescriptor.create3(80 /* SemicolonToken */, Formatting.Shared.TokenRange.Any), Formatting.RuleOperation.create2(new Formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsForContext), 3 /* Delete */)); - this.SpaceAfterOpenParen = new Formatting.Rule(Formatting.RuleDescriptor.create3(74 /* OpenParenToken */, Formatting.Shared.TokenRange.Any), Formatting.RuleOperation.create2(new Formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 1 /* Space */)); - this.SpaceBeforeCloseParen = new Formatting.Rule(Formatting.RuleDescriptor.create2(Formatting.Shared.TokenRange.Any, 75 /* CloseParenToken */), Formatting.RuleOperation.create2(new Formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 1 /* Space */)); - this.NoSpaceBetweenParens = new Formatting.Rule(Formatting.RuleDescriptor.create1(74 /* OpenParenToken */, 75 /* CloseParenToken */), Formatting.RuleOperation.create2(new Formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 3 /* Delete */)); - this.NoSpaceAfterOpenParen = new Formatting.Rule(Formatting.RuleDescriptor.create3(74 /* OpenParenToken */, Formatting.Shared.TokenRange.Any), Formatting.RuleOperation.create2(new Formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 3 /* Delete */)); - this.NoSpaceBeforeCloseParen = new Formatting.Rule(Formatting.RuleDescriptor.create2(Formatting.Shared.TokenRange.Any, 75 /* CloseParenToken */), Formatting.RuleOperation.create2(new Formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 3 /* Delete */)); - this.SpaceAfterAnonymousFunctionKeyword = new Formatting.Rule(Formatting.RuleDescriptor.create1(29 /* FunctionKeyword */, 74 /* OpenParenToken */), Formatting.RuleOperation.create2(new Formatting.RuleOperationContext(Rules.IsFunctionDeclContext), 1 /* Space */)); - this.NoSpaceAfterAnonymousFunctionKeyword = new Formatting.Rule(Formatting.RuleDescriptor.create1(29 /* FunctionKeyword */, 74 /* OpenParenToken */), Formatting.RuleOperation.create2(new Formatting.RuleOperationContext(Rules.IsFunctionDeclContext), 3 /* Delete */)); - } - Rules.prototype.getRuleName = function (rule) { - var o = this; - for (var name in o) { - if (o[name] === rule) { - return name; - } - } - throw new Error(TypeScript.getDiagnosticMessage(TypeScript.DiagnosticCode.Unknown_rule, null)); - }; - Rules.IsForContext = function (context) { - return context.contextNode.kind() === 159 /* ForStatement */; - }; - Rules.IsNotForContext = function (context) { - return !Rules.IsForContext(context); - }; - Rules.IsBinaryOpContext = function (context) { - switch (context.contextNode.kind()) { - case 174 /* BinaryExpression */: - case 173 /* ConditionalExpression */: - return true; - case 138 /* ImportDeclaration */: - case 191 /* VariableDeclarator */: - case 197 /* EqualsValueClause */: - return context.currentTokenSpan.kind === 109 /* EqualsToken */ || context.nextTokenSpan.kind === 109 /* EqualsToken */; - case 160 /* ForInStatement */: - return context.currentTokenSpan.kind === 31 /* InKeyword */ || context.nextTokenSpan.kind === 31 /* InKeyword */; - } - return false; - }; - Rules.IsNotBinaryOpContext = function (context) { - return !Rules.IsBinaryOpContext(context); - }; - Rules.IsSameLineTokenOrBeforeMultilineBlockContext = function (context) { - return context.TokensAreOnSameLine() || Rules.IsBeforeMultilineBlockContext(context); - }; - Rules.IsBeforeMultilineBlockContext = function (context) { - return Rules.IsBeforeBlockContext(context) && !(context.NextNodeAllOnSameLine() || context.NextNodeBlockIsOnOneLine()); - }; - Rules.IsMultilineBlockContext = function (context) { - return Rules.IsBlockContext(context) && !(context.ContextNodeAllOnSameLine() || context.ContextNodeBlockIsOnOneLine()); - }; - Rules.IsSingleLineBlockContext = function (context) { - return Rules.IsBlockContext(context) && (context.ContextNodeAllOnSameLine() || context.ContextNodeBlockIsOnOneLine()); - }; - Rules.IsBlockContext = function (context) { - return Rules.NodeIsBlockContext(context.contextNode); - }; - Rules.IsBeforeBlockContext = function (context) { - return Rules.NodeIsBlockContext(context.nextTokenParent); - }; - Rules.NodeIsBlockContext = function (node) { - if (Rules.NodeIsTypeScriptDeclWithBlockContext(node)) { - return true; - } - switch (node.kind()) { - case 151 /* Block */: - case 156 /* SwitchStatement */: - case 179 /* ObjectLiteralExpression */: - return true; - } - return false; - }; - Rules.IsFunctionDeclContext = function (context) { - switch (context.contextNode.kind()) { - case 134 /* FunctionDeclaration */: - case 140 /* MemberFunctionDeclaration */: - case 144 /* GetAccessor */: - case 145 /* SetAccessor */: - case 150 /* MethodSignature */: - case 147 /* CallSignature */: - case 186 /* FunctionExpression */: - case 142 /* ConstructorDeclaration */: - case 183 /* SimpleArrowFunctionExpression */: - case 182 /* ParenthesizedArrowFunctionExpression */: - case 133 /* InterfaceDeclaration */: - return true; - } - return false; - }; - Rules.IsTypeScriptDeclWithBlockContext = function (context) { - return Rules.NodeIsTypeScriptDeclWithBlockContext(context.contextNode); - }; - Rules.NodeIsTypeScriptDeclWithBlockContext = function (node) { - switch (node.kind()) { - case 136 /* ClassDeclaration */: - case 137 /* EnumDeclaration */: - case 124 /* ObjectType */: - case 135 /* ModuleDeclaration */: - return true; - } - return false; - }; - Rules.IsAfterCodeBlockContext = function (context) { - switch (context.currentTokenParent.kind()) { - case 136 /* ClassDeclaration */: - case 135 /* ModuleDeclaration */: - case 137 /* EnumDeclaration */: - case 151 /* Block */: - case 156 /* SwitchStatement */: - return true; - } - return false; - }; - Rules.IsControlDeclContext = function (context) { - switch (context.contextNode.kind()) { - case 152 /* IfStatement */: - case 156 /* SwitchStatement */: - case 159 /* ForStatement */: - case 160 /* ForInStatement */: - case 163 /* WhileStatement */: - case 164 /* TryStatement */: - case 166 /* DoStatement */: - case 168 /* WithStatement */: - case 200 /* ElseClause */: - case 201 /* CatchClause */: - case 202 /* FinallyClause */: - return true; - default: - return false; - } - }; - Rules.IsObjectContext = function (context) { - return context.contextNode.kind() === 179 /* ObjectLiteralExpression */; - }; - Rules.IsFunctionCallContext = function (context) { - return context.contextNode.kind() === 177 /* InvocationExpression */; - }; - Rules.IsNewContext = function (context) { - return context.contextNode.kind() === 180 /* ObjectCreationExpression */; - }; - Rules.IsFunctionCallOrNewContext = function (context) { - return Rules.IsFunctionCallContext(context) || Rules.IsNewContext(context); - }; - Rules.IsSameLineTokenContext = function (context) { - return context.TokensAreOnSameLine(); - }; - Rules.IsNotFormatOnEnter = function (context) { - return context.formattingRequestKind != 2 /* FormatOnEnter */; - }; - Rules.IsModuleDeclContext = function (context) { - return context.contextNode.kind() === 135 /* ModuleDeclaration */; - }; - Rules.IsObjectTypeContext = function (context) { - return context.contextNode.kind() === 124 /* ObjectType */ && context.contextNode.parent().kind() !== 133 /* InterfaceDeclaration */; - }; - Rules.IsTypeArgumentOrParameter = function (tokenKind, parentKind) { - return ((tokenKind === 82 /* LessThanToken */ || tokenKind === 83 /* GreaterThanToken */) && (parentKind === 195 /* TypeParameterList */ || parentKind === 194 /* TypeArgumentList */)); - }; - Rules.IsTypeArgumentOrParameterContext = function (context) { - return Rules.IsTypeArgumentOrParameter(context.currentTokenSpan.kind, context.currentTokenParent.kind()) || Rules.IsTypeArgumentOrParameter(context.nextTokenSpan.kind, context.nextTokenParent.kind()); - }; - Rules.IsVoidOpContext = function (context) { - return context.currentTokenSpan.kind === 43 /* VoidKeyword */ && context.currentTokenParent.kind() === 172 /* VoidExpression */; - }; - return Rules; - })(); - Formatting.Rules = Rules; - })(Formatting = Services.Formatting || (Services.Formatting = {})); - })(Services = TypeScript.Services || (TypeScript.Services = {})); -})(TypeScript || (TypeScript = {})); -var TypeScript; -(function (TypeScript) { - var Services; - (function (Services) { - var Formatting; - (function (Formatting) { - var RulesMap = (function () { - function RulesMap() { - this.map = []; - this.mapRowLength = 0; - } - RulesMap.create = function (rules) { - var result = new RulesMap(); - result.Initialize(rules); - return result; - }; - RulesMap.prototype.Initialize = function (rules) { - this.mapRowLength = TypeScript.SyntaxKind.LastToken + 1; - this.map = new Array(this.mapRowLength * this.mapRowLength); - var rulesBucketConstructionStateList = new Array(this.map.length); - this.FillRules(rules, rulesBucketConstructionStateList); - return this.map; - }; - RulesMap.prototype.FillRules = function (rules, rulesBucketConstructionStateList) { - var _this = this; - rules.forEach(function (rule) { - _this.FillRule(rule, rulesBucketConstructionStateList); - }); - }; - RulesMap.prototype.GetRuleBucketIndex = function (row, column) { - var rulesBucketIndex = (row * this.mapRowLength) + column; - return rulesBucketIndex; - }; - RulesMap.prototype.FillRule = function (rule, rulesBucketConstructionStateList) { - var _this = this; - var specificRule = rule.Descriptor.LeftTokenRange != Formatting.Shared.TokenRange.Any && rule.Descriptor.RightTokenRange != Formatting.Shared.TokenRange.Any; - rule.Descriptor.LeftTokenRange.GetTokens().forEach(function (left) { - rule.Descriptor.RightTokenRange.GetTokens().forEach(function (right) { - var rulesBucketIndex = _this.GetRuleBucketIndex(left, right); - var rulesBucket = _this.map[rulesBucketIndex]; - if (rulesBucket == undefined) { - rulesBucket = _this.map[rulesBucketIndex] = new RulesBucket(); - } - rulesBucket.AddRule(rule, specificRule, rulesBucketConstructionStateList, rulesBucketIndex); - }); - }); - }; - RulesMap.prototype.GetRule = function (context) { - var bucketIndex = this.GetRuleBucketIndex(context.currentTokenSpan.kind, context.nextTokenSpan.kind); - var bucket = this.map[bucketIndex]; - if (bucket != null) { - for (var i = 0, len = bucket.Rules().length; i < len; i++) { - var rule = bucket.Rules()[i]; - if (rule.Operation.Context.InContext(context)) - return rule; - } - } - return null; - }; - return RulesMap; - })(); - Formatting.RulesMap = RulesMap; - var MaskBitSize = 5; - var Mask = 0x1f; - (function (RulesPosition) { - RulesPosition[RulesPosition["IgnoreRulesSpecific"] = 0] = "IgnoreRulesSpecific"; - RulesPosition[RulesPosition["IgnoreRulesAny"] = MaskBitSize * 1] = "IgnoreRulesAny"; - RulesPosition[RulesPosition["ContextRulesSpecific"] = MaskBitSize * 2] = "ContextRulesSpecific"; - RulesPosition[RulesPosition["ContextRulesAny"] = MaskBitSize * 3] = "ContextRulesAny"; - RulesPosition[RulesPosition["NoContextRulesSpecific"] = MaskBitSize * 4] = "NoContextRulesSpecific"; - RulesPosition[RulesPosition["NoContextRulesAny"] = MaskBitSize * 5] = "NoContextRulesAny"; - })(Formatting.RulesPosition || (Formatting.RulesPosition = {})); - var RulesPosition = Formatting.RulesPosition; - var RulesBucketConstructionState = (function () { - function RulesBucketConstructionState() { - this.rulesInsertionIndexBitmap = 0; - } - RulesBucketConstructionState.prototype.GetInsertionIndex = function (maskPosition) { - var index = 0; - var pos = 0; - var indexBitmap = this.rulesInsertionIndexBitmap; - while (pos <= maskPosition) { - index += (indexBitmap & Mask); - indexBitmap >>= MaskBitSize; - pos += MaskBitSize; - } - return index; - }; - RulesBucketConstructionState.prototype.IncreaseInsertionIndex = function (maskPosition) { - var value = (this.rulesInsertionIndexBitmap >> maskPosition) & Mask; - value++; - TypeScript.Debug.assert((value & Mask) == value, "Adding more rules into the sub-bucket than allowed. Maximum allowed is 32 rules."); - var temp = this.rulesInsertionIndexBitmap & ~(Mask << maskPosition); - temp |= value << maskPosition; - this.rulesInsertionIndexBitmap = temp; - }; - return RulesBucketConstructionState; - })(); - Formatting.RulesBucketConstructionState = RulesBucketConstructionState; - var RulesBucket = (function () { - function RulesBucket() { - this.rules = []; - } - RulesBucket.prototype.Rules = function () { - return this.rules; - }; - RulesBucket.prototype.AddRule = function (rule, specificTokens, constructionState, rulesBucketIndex) { - var position; - if (rule.Operation.Action == 0 /* Ignore */) { - position = specificTokens ? 0 /* IgnoreRulesSpecific */ : RulesPosition.IgnoreRulesAny; - } - else if (!rule.Operation.Context.IsAny()) { - position = specificTokens ? RulesPosition.ContextRulesSpecific : RulesPosition.ContextRulesAny; - } - else { - position = specificTokens ? RulesPosition.NoContextRulesSpecific : RulesPosition.NoContextRulesAny; - } - var state = constructionState[rulesBucketIndex]; - if (state === undefined) { - state = constructionState[rulesBucketIndex] = new RulesBucketConstructionState(); - } - var index = state.GetInsertionIndex(position); - this.rules.splice(index, 0, rule); - state.IncreaseInsertionIndex(position); - }; - return RulesBucket; - })(); - Formatting.RulesBucket = RulesBucket; - })(Formatting = Services.Formatting || (Services.Formatting = {})); - })(Services = TypeScript.Services || (TypeScript.Services = {})); -})(TypeScript || (TypeScript = {})); -var TypeScript; -(function (TypeScript) { - var Services; - (function (Services) { - var Formatting; - (function (Formatting) { - var RulesProvider = (function () { - function RulesProvider(logger) { - this.logger = logger; - this.globalRules = new Formatting.Rules(); - } - RulesProvider.prototype.getRuleName = function (rule) { - return this.globalRules.getRuleName(rule); - }; - RulesProvider.prototype.getRuleByName = function (name) { - return this.globalRules[name]; - }; - RulesProvider.prototype.getRulesMap = function () { - return this.rulesMap; - }; - RulesProvider.prototype.ensureUpToDate = function (options) { - if (this.options == null || !ts.compareDataObjects(this.options, options)) { - var activeRules = this.createActiveRules(options); - var rulesMap = Formatting.RulesMap.create(activeRules); - this.activeRules = activeRules; - this.rulesMap = rulesMap; - this.options = ts.clone(options); - } - }; - RulesProvider.prototype.createActiveRules = function (options) { - var rules = this.globalRules.HighPriorityCommonRules.slice(0); - if (options.InsertSpaceAfterCommaDelimiter) { - rules.push(this.globalRules.SpaceAfterComma); - } - else { - rules.push(this.globalRules.NoSpaceAfterComma); - } - if (options.InsertSpaceAfterFunctionKeywordForAnonymousFunctions) { - rules.push(this.globalRules.SpaceAfterAnonymousFunctionKeyword); - } - else { - rules.push(this.globalRules.NoSpaceAfterAnonymousFunctionKeyword); - } - if (options.InsertSpaceAfterKeywordsInControlFlowStatements) { - rules.push(this.globalRules.SpaceAfterKeywordInControl); - } - else { - rules.push(this.globalRules.NoSpaceAfterKeywordInControl); - } - if (options.InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis) { - rules.push(this.globalRules.SpaceAfterOpenParen); - rules.push(this.globalRules.SpaceBeforeCloseParen); - rules.push(this.globalRules.NoSpaceBetweenParens); - } - else { - rules.push(this.globalRules.NoSpaceAfterOpenParen); - rules.push(this.globalRules.NoSpaceBeforeCloseParen); - rules.push(this.globalRules.NoSpaceBetweenParens); - } - if (options.InsertSpaceAfterSemicolonInForStatements) { - rules.push(this.globalRules.SpaceAfterSemicolonInFor); - } - else { - rules.push(this.globalRules.NoSpaceAfterSemicolonInFor); - } - if (options.InsertSpaceBeforeAndAfterBinaryOperators) { - rules.push(this.globalRules.SpaceBeforeBinaryOperator); - rules.push(this.globalRules.SpaceAfterBinaryOperator); - } - else { - rules.push(this.globalRules.NoSpaceBeforeBinaryOperator); - rules.push(this.globalRules.NoSpaceAfterBinaryOperator); - } - if (options.PlaceOpenBraceOnNewLineForControlBlocks) { - rules.push(this.globalRules.NewLineBeforeOpenBraceInControl); - } - if (options.PlaceOpenBraceOnNewLineForFunctions) { - rules.push(this.globalRules.NewLineBeforeOpenBraceInFunction); - rules.push(this.globalRules.NewLineBeforeOpenBraceInTypeScriptDeclWithBlock); - } - rules = rules.concat(this.globalRules.LowPriorityCommonRules); - return rules; - }; - return RulesProvider; - })(); - Formatting.RulesProvider = RulesProvider; - })(Formatting = Services.Formatting || (Services.Formatting = {})); - })(Services = TypeScript.Services || (TypeScript.Services = {})); -})(TypeScript || (TypeScript = {})); -var TypeScript; -(function (TypeScript) { - var Services; - (function (Services) { - var Formatting; - (function (Formatting) { - var TextEditInfo = (function () { - function TextEditInfo(position, length, replaceWith) { - this.position = position; - this.length = length; - this.replaceWith = replaceWith; - } - TextEditInfo.prototype.toString = function () { - return "[ position: " + this.position + ", length: " + this.length + ", replaceWith: '" + this.replaceWith + "' ]"; - }; - return TextEditInfo; - })(); - Formatting.TextEditInfo = TextEditInfo; - })(Formatting = Services.Formatting || (Services.Formatting = {})); - })(Services = TypeScript.Services || (TypeScript.Services = {})); -})(TypeScript || (TypeScript = {})); -var TypeScript; -(function (TypeScript) { - var Services; - (function (Services) { - var Formatting; - (function (Formatting) { - var Shared; - (function (Shared) { - var TokenRangeAccess = (function () { - function TokenRangeAccess(from, to, except) { - this.tokens = []; - for (var token = from; token <= to; token++) { - if (except.indexOf(token) < 0) { - this.tokens.push(token); - } - } - } - TokenRangeAccess.prototype.GetTokens = function () { - return this.tokens; - }; - TokenRangeAccess.prototype.Contains = function (token) { - return this.tokens.indexOf(token) >= 0; - }; - TokenRangeAccess.prototype.toString = function () { - return "[tokenRangeStart=" + TypeScript.SyntaxKind[this.tokens[0]] + "," + "tokenRangeEnd=" + TypeScript.SyntaxKind[this.tokens[this.tokens.length - 1]] + "]"; - }; - return TokenRangeAccess; - })(); - Shared.TokenRangeAccess = TokenRangeAccess; - var TokenValuesAccess = (function () { - function TokenValuesAccess(tks) { - this.tokens = tks && tks.length ? tks : []; - } - TokenValuesAccess.prototype.GetTokens = function () { - return this.tokens; - }; - TokenValuesAccess.prototype.Contains = function (token) { - return this.tokens.indexOf(token) >= 0; - }; - return TokenValuesAccess; - })(); - Shared.TokenValuesAccess = TokenValuesAccess; - var TokenSingleValueAccess = (function () { - function TokenSingleValueAccess(token) { - this.token = token; - } - TokenSingleValueAccess.prototype.GetTokens = function () { - return [this.token]; - }; - TokenSingleValueAccess.prototype.Contains = function (tokenValue) { - return tokenValue == this.token; - }; - TokenSingleValueAccess.prototype.toString = function () { - return "[singleTokenKind=" + TypeScript.SyntaxKind[this.token] + "]"; - }; - return TokenSingleValueAccess; - })(); - Shared.TokenSingleValueAccess = TokenSingleValueAccess; - var TokenAllAccess = (function () { - function TokenAllAccess() { - } - TokenAllAccess.prototype.GetTokens = function () { - var result = []; - for (var token = TypeScript.SyntaxKind.FirstToken; token <= TypeScript.SyntaxKind.LastToken; token++) { - result.push(token); - } - return result; - }; - TokenAllAccess.prototype.Contains = function (tokenValue) { - return true; - }; - TokenAllAccess.prototype.toString = function () { - return "[allTokens]"; - }; - return TokenAllAccess; - })(); - Shared.TokenAllAccess = TokenAllAccess; - var TokenRange = (function () { - function TokenRange(tokenAccess) { - this.tokenAccess = tokenAccess; - } - TokenRange.FromToken = function (token) { - return new TokenRange(new TokenSingleValueAccess(token)); - }; - TokenRange.FromTokens = function (tokens) { - return new TokenRange(new TokenValuesAccess(tokens)); - }; - TokenRange.FromRange = function (f, to, except) { - if (except === void 0) { except = []; } - return new TokenRange(new TokenRangeAccess(f, to, except)); - }; - TokenRange.AllTokens = function () { - return new TokenRange(new TokenAllAccess()); - }; - TokenRange.prototype.GetTokens = function () { - return this.tokenAccess.GetTokens(); - }; - TokenRange.prototype.Contains = function (token) { - return this.tokenAccess.Contains(token); - }; - TokenRange.prototype.toString = function () { - return this.tokenAccess.toString(); - }; - TokenRange.Any = TokenRange.AllTokens(); - TokenRange.AnyIncludingMultilineComments = TokenRange.FromTokens(TokenRange.Any.GetTokens().concat([4 /* MultiLineCommentTrivia */])); - TokenRange.Keywords = TokenRange.FromRange(TypeScript.SyntaxKind.FirstKeyword, TypeScript.SyntaxKind.LastKeyword); - TokenRange.Operators = TokenRange.FromRange(80 /* SemicolonToken */, 121 /* SlashEqualsToken */); - TokenRange.BinaryOperators = TokenRange.FromRange(82 /* LessThanToken */, 121 /* SlashEqualsToken */); - TokenRange.BinaryKeywordOperators = TokenRange.FromTokens([31 /* InKeyword */, 32 /* InstanceOfKeyword */]); - TokenRange.ReservedKeywords = TokenRange.FromRange(TypeScript.SyntaxKind.FirstFutureReservedStrictKeyword, TypeScript.SyntaxKind.LastFutureReservedStrictKeyword); - TokenRange.UnaryPrefixOperators = TokenRange.FromTokens([95 /* PlusPlusToken */, 96 /* MinusMinusToken */, 104 /* TildeToken */, 103 /* ExclamationToken */]); - TokenRange.UnaryPrefixExpressions = TokenRange.FromTokens([11 /* NumericLiteral */, 9 /* IdentifierName */, 74 /* OpenParenToken */, 76 /* OpenBracketToken */, 72 /* OpenBraceToken */, 37 /* ThisKeyword */, 33 /* NewKeyword */]); - TokenRange.UnaryPreincrementExpressions = TokenRange.FromTokens([9 /* IdentifierName */, 74 /* OpenParenToken */, 37 /* ThisKeyword */, 33 /* NewKeyword */]); - TokenRange.UnaryPostincrementExpressions = TokenRange.FromTokens([9 /* IdentifierName */, 75 /* CloseParenToken */, 77 /* CloseBracketToken */, 33 /* NewKeyword */]); - TokenRange.UnaryPredecrementExpressions = TokenRange.FromTokens([9 /* IdentifierName */, 74 /* OpenParenToken */, 37 /* ThisKeyword */, 33 /* NewKeyword */]); - TokenRange.UnaryPostdecrementExpressions = TokenRange.FromTokens([9 /* IdentifierName */, 75 /* CloseParenToken */, 77 /* CloseBracketToken */, 33 /* NewKeyword */]); - TokenRange.Comments = TokenRange.FromTokens([5 /* SingleLineCommentTrivia */, 4 /* MultiLineCommentTrivia */]); - TokenRange.TypeNames = TokenRange.FromTokens([9 /* IdentifierName */, 69 /* NumberKeyword */, 71 /* StringKeyword */, 63 /* BooleanKeyword */, 43 /* VoidKeyword */, 62 /* AnyKeyword */]); - return TokenRange; - })(); - Shared.TokenRange = TokenRange; - })(Shared = Formatting.Shared || (Formatting.Shared = {})); - })(Formatting = Services.Formatting || (Services.Formatting = {})); - })(Services = TypeScript.Services || (TypeScript.Services = {})); -})(TypeScript || (TypeScript = {})); -var TypeScript; -(function (TypeScript) { - var Services; - (function (Services) { - var Formatting; - (function (Formatting) { - var TokenSpan = (function (_super) { - __extends(TokenSpan, _super); - function TokenSpan(kind, start, length) { - _super.call(this, start, length); - this.kind = kind; - } - return TokenSpan; - })(TypeScript.TextSpan); - Formatting.TokenSpan = TokenSpan; - })(Formatting = Services.Formatting || (Services.Formatting = {})); - })(Services = TypeScript.Services || (TypeScript.Services = {})); -})(TypeScript || (TypeScript = {})); -var TypeScript; -(function (TypeScript) { - var Services; - (function (Services) { - var Formatting; - (function (Formatting) { - var IndentationNodeContext = (function () { - function IndentationNodeContext(parent, node, fullStart, indentationAmount, childIndentationAmountDelta) { - this.update(parent, node, fullStart, indentationAmount, childIndentationAmountDelta); - } - IndentationNodeContext.prototype.parent = function () { - return this._parent; - }; - IndentationNodeContext.prototype.node = function () { - return this._node; - }; - IndentationNodeContext.prototype.fullStart = function () { - return this._fullStart; - }; - IndentationNodeContext.prototype.fullWidth = function () { - return TypeScript.fullWidth(this._node); - }; - IndentationNodeContext.prototype.start = function () { - return this._fullStart + TypeScript.leadingTriviaWidth(this._node); - }; - IndentationNodeContext.prototype.end = function () { - return this._fullStart + TypeScript.leadingTriviaWidth(this._node) + TypeScript.width(this._node); - }; - IndentationNodeContext.prototype.indentationAmount = function () { - return this._indentationAmount; - }; - IndentationNodeContext.prototype.childIndentationAmountDelta = function () { - return this._childIndentationAmountDelta; - }; - IndentationNodeContext.prototype.depth = function () { - return this._depth; - }; - IndentationNodeContext.prototype.kind = function () { - return this._node.kind(); - }; - IndentationNodeContext.prototype.hasSkippedOrMissingTokenChild = function () { - if (this._hasSkippedOrMissingTokenChild === null) { - this._hasSkippedOrMissingTokenChild = TypeScript.Syntax.nodeHasSkippedOrMissingTokens(this._node); - } - return this._hasSkippedOrMissingTokenChild; - }; - IndentationNodeContext.prototype.clone = function (pool) { - var parent = null; - if (this._parent) { - parent = this._parent.clone(pool); - } - return pool.getNode(parent, this._node, this._fullStart, this._indentationAmount, this._childIndentationAmountDelta); - }; - IndentationNodeContext.prototype.update = function (parent, node, fullStart, indentationAmount, childIndentationAmountDelta) { - this._parent = parent; - this._node = node; - this._fullStart = fullStart; - this._indentationAmount = indentationAmount; - this._childIndentationAmountDelta = childIndentationAmountDelta; - this._hasSkippedOrMissingTokenChild = null; - if (parent) { - this._depth = parent.depth() + 1; - } - else { - this._depth = 0; - } - }; - return IndentationNodeContext; - })(); - Formatting.IndentationNodeContext = IndentationNodeContext; - })(Formatting = Services.Formatting || (Services.Formatting = {})); - })(Services = TypeScript.Services || (TypeScript.Services = {})); -})(TypeScript || (TypeScript = {})); -var TypeScript; -(function (TypeScript) { - var Services; - (function (Services) { - var Formatting; - (function (Formatting) { - var IndentationNodeContextPool = (function () { - function IndentationNodeContextPool() { - this.nodes = []; - } - IndentationNodeContextPool.prototype.getNode = function (parent, node, fullStart, indentationLevel, childIndentationLevelDelta) { - if (this.nodes.length > 0) { - var cachedNode = this.nodes.pop(); - cachedNode.update(parent, node, fullStart, indentationLevel, childIndentationLevelDelta); - return cachedNode; - } - return new Formatting.IndentationNodeContext(parent, node, fullStart, indentationLevel, childIndentationLevelDelta); - }; - IndentationNodeContextPool.prototype.releaseNode = function (node, recursive) { - if (recursive === void 0) { recursive = false; } - this.nodes.push(node); - if (recursive) { - var parent = node.parent(); - if (parent) { - this.releaseNode(parent, recursive); - } - } - }; - return IndentationNodeContextPool; - })(); - Formatting.IndentationNodeContextPool = IndentationNodeContextPool; - })(Formatting = Services.Formatting || (Services.Formatting = {})); - })(Services = TypeScript.Services || (TypeScript.Services = {})); -})(TypeScript || (TypeScript = {})); -var TypeScript; -(function (TypeScript) { - var Services; - (function (Services) { - var Formatting; - (function (Formatting) { - var IndentationTrackingWalker = (function () { - function IndentationTrackingWalker(textSpan, sourceUnit, snapshot, indentFirstToken, options) { - this.options = options; - this._position = 0; - this._parent = null; - this._indentationNodeContextPool = new Formatting.IndentationNodeContextPool(); - this._textSpan = textSpan; - this._text = sourceUnit.syntaxTree.text; - this._snapshot = snapshot; - this._parent = this._indentationNodeContextPool.getNode(null, sourceUnit, 0, 0, 0); - this._lastTriviaWasNewLine = indentFirstToken; - } - IndentationTrackingWalker.prototype.position = function () { - return this._position; - }; - IndentationTrackingWalker.prototype.parent = function () { - return this._parent; - }; - IndentationTrackingWalker.prototype.textSpan = function () { - return this._textSpan; - }; - IndentationTrackingWalker.prototype.snapshot = function () { - return this._snapshot; - }; - IndentationTrackingWalker.prototype.indentationNodeContextPool = function () { - return this._indentationNodeContextPool; - }; - IndentationTrackingWalker.prototype.forceIndentNextToken = function (tokenStart) { - this._lastTriviaWasNewLine = true; - this.forceRecomputeIndentationOfParent(tokenStart, true); - }; - IndentationTrackingWalker.prototype.forceSkipIndentingNextToken = function (tokenStart) { - this._lastTriviaWasNewLine = false; - this.forceRecomputeIndentationOfParent(tokenStart, false); - }; - IndentationTrackingWalker.prototype.indentToken = function (token, indentationAmount, commentIndentationAmount) { - throw TypeScript.Errors.abstract(); - }; - IndentationTrackingWalker.prototype.visitTokenInSpan = function (token) { - if (this._lastTriviaWasNewLine) { - var indentationAmount = this.getTokenIndentationAmount(token); - var commentIndentationAmount = this.getCommentIndentationAmount(token); - this.indentToken(token, indentationAmount, commentIndentationAmount); - } - }; - IndentationTrackingWalker.prototype.visitToken = function (token) { - var tokenSpan = new TypeScript.TextSpan(this._position, token.fullWidth()); - if (tokenSpan.intersectsWithTextSpan(this._textSpan)) { - this.visitTokenInSpan(token); - var trivia = token.trailingTrivia(); - this._lastTriviaWasNewLine = trivia.hasNewLine() && trivia.syntaxTriviaAt(trivia.count() - 1).kind() == 3 /* NewLineTrivia */; - } - this._position += token.fullWidth(); - }; - IndentationTrackingWalker.prototype.walk = function (element) { - if (element) { - if (TypeScript.isToken(element)) { - this.visitToken(element); - } - else if (element.kind() === 1 /* List */) { - for (var i = 0, n = TypeScript.childCount(element); i < n; i++) { - this.walk(TypeScript.childAt(element, i)); - } - } - else { - this.visitNode(element); - } - } - }; - IndentationTrackingWalker.prototype.visitNode = function (node) { - var nodeSpan = new TypeScript.TextSpan(this._position, TypeScript.fullWidth(node)); - if (nodeSpan.intersectsWithTextSpan(this._textSpan)) { - var indentation = this.getNodeIndentation(node); - var currentParent = this._parent; - this._parent = this._indentationNodeContextPool.getNode(currentParent, node, this._position, indentation.indentationAmount, indentation.indentationAmountDelta); - for (var i = 0, n = TypeScript.childCount(node); i < n; i++) { - this.walk(TypeScript.childAt(node, i)); - } - this._indentationNodeContextPool.releaseNode(this._parent); - this._parent = currentParent; - } - else { - this._position += TypeScript.fullWidth(node); - } - }; - IndentationTrackingWalker.prototype.getTokenIndentationAmount = function (token) { - if (TypeScript.firstToken(this._parent.node()) === token || token.kind() === 72 /* OpenBraceToken */ || token.kind() === 73 /* CloseBraceToken */ || token.kind() === 76 /* OpenBracketToken */ || token.kind() === 77 /* CloseBracketToken */ || (token.kind() === 44 /* WhileKeyword */ && this._parent.node().kind() == 166 /* DoStatement */)) { - return this._parent.indentationAmount(); - } - return (this._parent.indentationAmount() + this._parent.childIndentationAmountDelta()); - }; - IndentationTrackingWalker.prototype.getCommentIndentationAmount = function (token) { - if (token.kind() === 73 /* CloseBraceToken */ || token.kind() === 77 /* CloseBracketToken */) { - return (this._parent.indentationAmount() + this._parent.childIndentationAmountDelta()); - } - return this._parent.indentationAmount(); - }; - IndentationTrackingWalker.prototype.getNodeIndentation = function (node, newLineInsertedByFormatting) { - var parent = this._parent; - var parentIndentationAmount; - if (this._textSpan.containsPosition(parent.start())) { - parentIndentationAmount = parent.indentationAmount(); - } - else { - if (parent.kind() === 151 /* Block */ && !this.shouldIndentBlockInParent(this._parent.parent())) { - parent = this._parent.parent(); - } - var line = this._snapshot.getLineFromPosition(parent.start()).getText(); - var firstNonWhiteSpacePosition = TypeScript.Indentation.firstNonWhitespacePosition(line); - parentIndentationAmount = TypeScript.Indentation.columnForPositionInString(line, firstNonWhiteSpacePosition, this.options); - } - var parentIndentationAmountDelta = parent.childIndentationAmountDelta(); - var indentationAmount; - var indentationAmountDelta; - var parentNode = parent.node(); - switch (node.kind()) { - default: - indentationAmount = (parentIndentationAmount + parentIndentationAmountDelta); - indentationAmountDelta = 0; - break; - case 136 /* ClassDeclaration */: - case 135 /* ModuleDeclaration */: - case 124 /* ObjectType */: - case 137 /* EnumDeclaration */: - case 156 /* SwitchStatement */: - case 179 /* ObjectLiteralExpression */: - case 142 /* ConstructorDeclaration */: - case 134 /* FunctionDeclaration */: - case 186 /* FunctionExpression */: - case 140 /* MemberFunctionDeclaration */: - case 144 /* GetAccessor */: - case 145 /* SetAccessor */: - case 143 /* IndexMemberDeclaration */: - case 201 /* CatchClause */: - case 178 /* ArrayLiteralExpression */: - case 126 /* ArrayType */: - case 185 /* ElementAccessExpression */: - case 149 /* IndexSignature */: - case 159 /* ForStatement */: - case 160 /* ForInStatement */: - case 163 /* WhileStatement */: - case 166 /* DoStatement */: - case 168 /* WithStatement */: - case 198 /* CaseSwitchClause */: - case 199 /* DefaultSwitchClause */: - case 155 /* ReturnStatement */: - case 162 /* ThrowStatement */: - case 183 /* SimpleArrowFunctionExpression */: - case 182 /* ParenthesizedArrowFunctionExpression */: - case 190 /* VariableDeclaration */: - case 139 /* ExportAssignment */: - case 177 /* InvocationExpression */: - case 180 /* ObjectCreationExpression */: - case 147 /* CallSignature */: - case 148 /* ConstructSignature */: - indentationAmount = (parentIndentationAmount + parentIndentationAmountDelta); - indentationAmountDelta = this.options.indentSpaces; - break; - case 152 /* IfStatement */: - if (parent.kind() === 200 /* ElseClause */ && !TypeScript.SyntaxUtilities.isLastTokenOnLine(parentNode.elseKeyword, this._text)) { - indentationAmount = parentIndentationAmount; - } - else { - indentationAmount = (parentIndentationAmount + parentIndentationAmountDelta); - } - indentationAmountDelta = this.options.indentSpaces; - break; - case 200 /* ElseClause */: - indentationAmount = parentIndentationAmount; - indentationAmountDelta = this.options.indentSpaces; - break; - case 151 /* Block */: - if (this.shouldIndentBlockInParent(parent)) { - indentationAmount = parentIndentationAmount + parentIndentationAmountDelta; - } - else { - indentationAmount = parentIndentationAmount; - } - indentationAmountDelta = this.options.indentSpaces; - break; - } - if (parentNode) { - if (!newLineInsertedByFormatting) { - var parentStartLine = this._snapshot.getLineNumberFromPosition(parent.start()); - var currentNodeStartLine = this._snapshot.getLineNumberFromPosition(this._position + TypeScript.leadingTriviaWidth(node)); - if (parentStartLine === currentNodeStartLine || newLineInsertedByFormatting === false) { - indentationAmount = parentIndentationAmount; - indentationAmountDelta = Math.min(this.options.indentSpaces, parentIndentationAmountDelta + indentationAmountDelta); - } - } - } - return { - indentationAmount: indentationAmount, - indentationAmountDelta: indentationAmountDelta - }; - }; - IndentationTrackingWalker.prototype.shouldIndentBlockInParent = function (parent) { - switch (parent.kind()) { - case 122 /* SourceUnit */: - case 135 /* ModuleDeclaration */: - case 151 /* Block */: - case 198 /* CaseSwitchClause */: - case 199 /* DefaultSwitchClause */: - return true; - default: - return false; - } - }; - IndentationTrackingWalker.prototype.forceRecomputeIndentationOfParent = function (tokenStart, newLineAdded) { - var parent = this._parent; - if (parent.fullStart() === tokenStart) { - this._parent = parent.parent(); - var indentation = this.getNodeIndentation(parent.node(), newLineAdded); - parent.update(parent.parent(), parent.node(), parent.fullStart(), indentation.indentationAmount, indentation.indentationAmountDelta); - this._parent = parent; - } - }; - return IndentationTrackingWalker; - })(); - Formatting.IndentationTrackingWalker = IndentationTrackingWalker; - })(Formatting = Services.Formatting || (Services.Formatting = {})); - })(Services = TypeScript.Services || (TypeScript.Services = {})); -})(TypeScript || (TypeScript = {})); -var TypeScript; -(function (TypeScript) { - var Services; - (function (Services) { - var Formatting; - (function (Formatting) { - var MultipleTokenIndenter = (function (_super) { - __extends(MultipleTokenIndenter, _super); - function MultipleTokenIndenter(textSpan, sourceUnit, snapshot, indentFirstToken, options) { - _super.call(this, textSpan, sourceUnit, snapshot, indentFirstToken, options); - this._edits = []; - } - MultipleTokenIndenter.prototype.indentToken = function (token, indentationAmount, commentIndentationAmount) { - if (token.fullWidth() === 0) { - return; - } - if (this.parent().hasSkippedOrMissingTokenChild()) { - return; - } - var tokenSpan = new TypeScript.TextSpan(this.position() + token.leadingTriviaWidth(), TypeScript.width(token)); - if (!this.textSpan().containsTextSpan(tokenSpan)) { - return; - } - var indentationString = TypeScript.Indentation.indentationString(indentationAmount, this.options); - var commentIndentationString = TypeScript.Indentation.indentationString(commentIndentationAmount, this.options); - this.recordIndentationEditsForToken(token, indentationString, commentIndentationString); - }; - MultipleTokenIndenter.prototype.edits = function () { - return this._edits; - }; - MultipleTokenIndenter.prototype.recordEdit = function (position, length, replaceWith) { - this._edits.push(new Formatting.TextEditInfo(position, length, replaceWith)); - }; - MultipleTokenIndenter.prototype.recordIndentationEditsForToken = function (token, indentationString, commentIndentationString) { - var position = this.position(); - var indentNextTokenOrTrivia = true; - var leadingWhiteSpace = ""; - var triviaList = token.leadingTrivia(); - if (triviaList) { - for (var i = 0, length = triviaList.count(); i < length; i++, position += trivia.fullWidth()) { - var trivia = triviaList.syntaxTriviaAt(i); - if (!this.textSpan().containsTextSpan(new TypeScript.TextSpan(position, trivia.fullWidth()))) { - continue; - } - switch (trivia.kind()) { - case 4 /* MultiLineCommentTrivia */: - this.recordIndentationEditsForMultiLineComment(trivia, position, commentIndentationString, leadingWhiteSpace, !indentNextTokenOrTrivia); - indentNextTokenOrTrivia = false; - leadingWhiteSpace = ""; - break; - case 5 /* SingleLineCommentTrivia */: - case 6 /* SkippedTokenTrivia */: - if (indentNextTokenOrTrivia) { - this.recordIndentationEditsForSingleLineOrSkippedText(trivia, position, commentIndentationString); - indentNextTokenOrTrivia = false; - } - break; - case 2 /* WhitespaceTrivia */: - var nextTrivia = length > i + 1 && triviaList.syntaxTriviaAt(i + 1); - var whiteSpaceIndentationString = nextTrivia && nextTrivia.isComment() ? commentIndentationString : indentationString; - if (indentNextTokenOrTrivia) { - if (!(nextTrivia && nextTrivia.isNewLine())) { - this.recordIndentationEditsForWhitespace(trivia, position, whiteSpaceIndentationString); - } - indentNextTokenOrTrivia = false; - } - leadingWhiteSpace += trivia.fullText(); - break; - case 3 /* NewLineTrivia */: - indentNextTokenOrTrivia = true; - leadingWhiteSpace = ""; - break; - default: - throw TypeScript.Errors.invalidOperation(); - } - } - } - if (token.kind() !== 8 /* EndOfFileToken */ && indentNextTokenOrTrivia) { - if (indentationString.length > 0) { - this.recordEdit(position, 0, indentationString); - } - } - }; - MultipleTokenIndenter.prototype.recordIndentationEditsForSingleLineOrSkippedText = function (trivia, fullStart, indentationString) { - if (indentationString.length > 0) { - this.recordEdit(fullStart, 0, indentationString); - } - }; - MultipleTokenIndenter.prototype.recordIndentationEditsForWhitespace = function (trivia, fullStart, indentationString) { - var text = trivia.fullText(); - if (indentationString === text) { - return; - } - this.recordEdit(fullStart, text.length, indentationString); - }; - MultipleTokenIndenter.prototype.recordIndentationEditsForMultiLineComment = function (trivia, fullStart, indentationString, leadingWhiteSpace, firstLineAlreadyIndented) { - var position = fullStart; - var segments = TypeScript.Syntax.splitMultiLineCommentTriviaIntoMultipleLines(trivia); - if (segments.length <= 1) { - if (!firstLineAlreadyIndented) { - this.recordIndentationEditsForSingleLineOrSkippedText(trivia, fullStart, indentationString); - } - return; - } - var whiteSpaceColumnsInFirstSegment = TypeScript.Indentation.columnForPositionInString(leadingWhiteSpace, leadingWhiteSpace.length, this.options); - var indentationColumns = TypeScript.Indentation.columnForPositionInString(indentationString, indentationString.length, this.options); - var startIndex = 0; - if (firstLineAlreadyIndented) { - startIndex = 1; - position += segments[0].length; - } - for (var i = startIndex; i < segments.length; i++) { - var segment = segments[i]; - this.recordIndentationEditsForSegment(segment, position, indentationColumns, whiteSpaceColumnsInFirstSegment); - position += segment.length; - } - }; - MultipleTokenIndenter.prototype.recordIndentationEditsForSegment = function (segment, fullStart, indentationColumns, whiteSpaceColumnsInFirstSegment) { - var firstNonWhitespacePosition = TypeScript.Indentation.firstNonWhitespacePosition(segment); - var leadingWhiteSpaceColumns = TypeScript.Indentation.columnForPositionInString(segment, firstNonWhitespacePosition, this.options); - var deltaFromFirstSegment = leadingWhiteSpaceColumns - whiteSpaceColumnsInFirstSegment; - var finalColumns = indentationColumns + deltaFromFirstSegment; - if (finalColumns < 0) { - finalColumns = 0; - } - var indentationString = TypeScript.Indentation.indentationString(finalColumns, this.options); - if (firstNonWhitespacePosition < segment.length && TypeScript.CharacterInfo.isLineTerminator(segment.charCodeAt(firstNonWhitespacePosition))) { - return; - } - if (indentationString === segment.substring(0, firstNonWhitespacePosition)) { - return; - } - this.recordEdit(fullStart, firstNonWhitespacePosition, indentationString); - }; - return MultipleTokenIndenter; - })(Formatting.IndentationTrackingWalker); - Formatting.MultipleTokenIndenter = MultipleTokenIndenter; - })(Formatting = Services.Formatting || (Services.Formatting = {})); - })(Services = TypeScript.Services || (TypeScript.Services = {})); -})(TypeScript || (TypeScript = {})); -var TypeScript; -(function (TypeScript) { - var Services; - (function (Services) { - var Formatting; - (function (Formatting) { - var Formatter = (function (_super) { - __extends(Formatter, _super); - function Formatter(textSpan, sourceUnit, indentFirstToken, options, snapshot, rulesProvider, formattingRequestKind) { - _super.call(this, textSpan, sourceUnit, snapshot, indentFirstToken, options); - this.previousTokenSpan = null; - this.previousTokenParent = null; - this.scriptHasErrors = false; - this.previousTokenParent = this.parent().clone(this.indentationNodeContextPool()); - this.rulesProvider = rulesProvider; - this.formattingRequestKind = formattingRequestKind; - this.formattingContext = new Formatting.FormattingContext(this.snapshot(), this.formattingRequestKind); - } - Formatter.getEdits = function (textSpan, sourceUnit, options, indentFirstToken, snapshot, rulesProvider, formattingRequestKind) { - var walker = new Formatter(textSpan, sourceUnit, indentFirstToken, options, snapshot, rulesProvider, formattingRequestKind); - walker.walk(sourceUnit); - return walker.edits(); - }; - Formatter.prototype.visitTokenInSpan = function (token) { - if (token.fullWidth() !== 0) { - var tokenSpan = new TypeScript.TextSpan(this.position() + token.leadingTriviaWidth(), TypeScript.width(token)); - if (this.textSpan().containsTextSpan(tokenSpan)) { - this.processToken(token); - } - } - _super.prototype.visitTokenInSpan.call(this, token); - }; - Formatter.prototype.processToken = function (token) { - var position = this.position(); - if (token.leadingTriviaWidth() !== 0) { - this.processTrivia(token.leadingTrivia(), position); - position += token.leadingTriviaWidth(); - } - var currentTokenSpan = new Formatting.TokenSpan(token.kind(), position, TypeScript.width(token)); - if (!this.parent().hasSkippedOrMissingTokenChild()) { - if (this.previousTokenSpan) { - this.formatPair(this.previousTokenSpan, this.previousTokenParent, currentTokenSpan, this.parent()); - } - else { - this.trimWhitespaceInLineRange(this.getLineNumber(this.textSpan()), this.getLineNumber(currentTokenSpan)); - } - } - this.previousTokenSpan = currentTokenSpan; - if (this.previousTokenParent) { - this.indentationNodeContextPool().releaseNode(this.previousTokenParent, true); - } - this.previousTokenParent = this.parent().clone(this.indentationNodeContextPool()); - position += TypeScript.width(token); - if (token.trailingTriviaWidth() !== 0) { - this.processTrivia(token.trailingTrivia(), position); - } - }; - Formatter.prototype.processTrivia = function (triviaList, fullStart) { - var position = fullStart; - for (var i = 0, n = triviaList.count(); i < n; i++) { - var trivia = triviaList.syntaxTriviaAt(i); - if (trivia.isComment() || trivia.isSkippedToken()) { - var currentTokenSpan = new Formatting.TokenSpan(trivia.kind(), position, trivia.fullWidth()); - if (this.textSpan().containsTextSpan(currentTokenSpan)) { - if (trivia.isComment() && this.previousTokenSpan) { - this.formatPair(this.previousTokenSpan, this.previousTokenParent, currentTokenSpan, this.parent()); - } - else { - var startLine = this.getLineNumber(this.previousTokenSpan || this.textSpan()); - this.trimWhitespaceInLineRange(startLine, this.getLineNumber(currentTokenSpan)); - } - this.previousTokenSpan = currentTokenSpan; - if (this.previousTokenParent) { - this.indentationNodeContextPool().releaseNode(this.previousTokenParent, true); - } - this.previousTokenParent = this.parent().clone(this.indentationNodeContextPool()); - } - } - position += trivia.fullWidth(); - } - }; - Formatter.prototype.findCommonParents = function (parent1, parent2) { - var shallowParent; - var shallowParentDepth; - var deepParent; - var deepParentDepth; - if (parent1.depth() < parent2.depth()) { - shallowParent = parent1; - shallowParentDepth = parent1.depth(); - deepParent = parent2; - deepParentDepth = parent2.depth(); - } - else { - shallowParent = parent2; - shallowParentDepth = parent2.depth(); - deepParent = parent1; - deepParentDepth = parent1.depth(); - } - TypeScript.Debug.assert(shallowParentDepth >= 0, "Expected shallowParentDepth >= 0"); - TypeScript.Debug.assert(deepParentDepth >= 0, "Expected deepParentDepth >= 0"); - TypeScript.Debug.assert(deepParentDepth >= shallowParentDepth, "Expected deepParentDepth >= shallowParentDepth"); - while (deepParentDepth > shallowParentDepth) { - deepParent = deepParent.parent(); - deepParentDepth--; - } - TypeScript.Debug.assert(deepParentDepth === shallowParentDepth, "Expected deepParentDepth === shallowParentDepth"); - while (deepParent.node() && shallowParent.node()) { - if (deepParent.node() === shallowParent.node()) { - return deepParent; - } - deepParent = deepParent.parent(); - shallowParent = shallowParent.parent(); - } - throw TypeScript.Errors.invalidOperation(); - }; - Formatter.prototype.formatPair = function (t1, t1Parent, t2, t2Parent) { - var token1Line = this.getLineNumber(t1); - var token2Line = this.getLineNumber(t2); - var commonParent = this.findCommonParents(t1Parent, t2Parent); - this.formattingContext.updateContext(t1, t1Parent, t2, t2Parent, commonParent); - var rule = this.rulesProvider.getRulesMap().GetRule(this.formattingContext); - if (rule != null) { - this.RecordRuleEdits(rule, t1, t2); - if ((rule.Operation.Action == 1 /* Space */ || rule.Operation.Action == 3 /* Delete */) && token1Line != token2Line) { - this.forceSkipIndentingNextToken(t2.start()); - } - if (rule.Operation.Action == 2 /* NewLine */ && token1Line == token2Line) { - this.forceIndentNextToken(t2.start()); - } - } - if (token1Line != token2Line && (!rule || (rule.Operation.Action != 3 /* Delete */ && rule.Flag != 1 /* CanDeleteNewLines */))) { - this.trimWhitespaceInLineRange(token1Line, token2Line, t1); - } - }; - Formatter.prototype.getLineNumber = function (span) { - return this.snapshot().getLineNumberFromPosition(span.start()); - }; - Formatter.prototype.trimWhitespaceInLineRange = function (startLine, endLine, token) { - for (var lineNumber = startLine; lineNumber < endLine; ++lineNumber) { - var line = this.snapshot().getLineFromLineNumber(lineNumber); - this.trimWhitespace(line, token); - } - }; - Formatter.prototype.trimWhitespace = function (line, token) { - if (token && (token.kind == 4 /* MultiLineCommentTrivia */ || token.kind == 5 /* SingleLineCommentTrivia */) && token.start() <= line.endPosition() && token.end() >= line.endPosition()) - return; - var text = line.getText(); - var index = 0; - for (index = text.length - 1; index >= 0; --index) { - if (!TypeScript.CharacterInfo.isWhitespace(text.charCodeAt(index))) { - break; - } - } - ++index; - if (index < text.length) { - this.recordEdit(line.startPosition() + index, line.length() - index, ""); - } - }; - Formatter.prototype.RecordRuleEdits = function (rule, t1, t2) { - if (rule.Operation.Action == 0 /* Ignore */) { - return; - } - var betweenSpan; - switch (rule.Operation.Action) { - case 3 /* Delete */: - { - betweenSpan = new TypeScript.TextSpan(t1.end(), t2.start() - t1.end()); - if (betweenSpan.length() > 0) { - this.recordEdit(betweenSpan.start(), betweenSpan.length(), ""); - return; - } - } - break; - case 2 /* NewLine */: - { - if (!(rule.Flag == 1 /* CanDeleteNewLines */ || this.getLineNumber(t1) == this.getLineNumber(t2))) { - return; - } - betweenSpan = new TypeScript.TextSpan(t1.end(), t2.start() - t1.end()); - var doEdit = false; - var betweenText = this.snapshot().getText(betweenSpan); - var lineFeedLoc = betweenText.indexOf(this.options.newLineCharacter); - if (lineFeedLoc < 0) { - doEdit = true; - } - else { - lineFeedLoc = betweenText.indexOf(this.options.newLineCharacter, lineFeedLoc + 1); - if (lineFeedLoc >= 0) { - doEdit = true; - } - } - if (doEdit) { - this.recordEdit(betweenSpan.start(), betweenSpan.length(), this.options.newLineCharacter); - return; - } - } - break; - case 1 /* Space */: - { - if (!(rule.Flag == 1 /* CanDeleteNewLines */ || this.getLineNumber(t1) == this.getLineNumber(t2))) { - return; - } - betweenSpan = new TypeScript.TextSpan(t1.end(), t2.start() - t1.end()); - if (betweenSpan.length() > 1 || this.snapshot().getText(betweenSpan) != " ") { - this.recordEdit(betweenSpan.start(), betweenSpan.length(), " "); - return; - } - } - break; - } - }; - return Formatter; - })(Formatting.MultipleTokenIndenter); - Formatting.Formatter = Formatter; - })(Formatting = Services.Formatting || (Services.Formatting = {})); - })(Services = TypeScript.Services || (TypeScript.Services = {})); -})(TypeScript || (TypeScript = {})); var ts; (function (ts) { var formatting; @@ -30807,7 +17065,7 @@ var ts; return 0; } var lineAtPosition = sourceFile.getLineAndCharacterFromPosition(position).line; - if (precedingToken.kind === 22 /* CommaToken */ && precedingToken.parent.kind !== 153 /* BinaryExpression */) { + if (precedingToken.kind === 22 /* CommaToken */ && precedingToken.parent.kind !== 156 /* BinaryExpression */) { var actualIndentation = getActualIndentationForListItemBeforeComma(precedingToken, sourceFile, options); if (actualIndentation !== -1) { return actualIndentation; @@ -30818,13 +17076,13 @@ var ts; var currentStart; var indentationDelta; while (current) { - if (positionBelongsToNode(current, position, sourceFile) && nodeContentIsIndented(current, previous)) { + if (positionBelongsToNode(current, position, sourceFile) && shouldIndentChildNode(current.kind, previous ? previous.kind : 0 /* Unknown */)) { currentStart = getStartLineAndCharacterForNode(current, sourceFile); if (nextTokenIsCurlyBraceOnSameLineAsCursor(precedingToken, current, lineAtPosition, sourceFile)) { indentationDelta = 0; } else { - indentationDelta = lineAtPosition !== currentStart.line ? options.indentSpaces : 0; + indentationDelta = lineAtPosition !== currentStart.line ? options.IndentSize : 0; } break; } @@ -30838,21 +17096,39 @@ var ts; if (!current) { return 0; } + return getIndentationForNodeWorker(current, currentStart, undefined, indentationDelta, sourceFile, options); + } + SmartIndenter.getIndentation = getIndentation; + function getIndentationForNode(n, ignoreActualIndentationRange, sourceFile, options) { + var start = sourceFile.getLineAndCharacterFromPosition(n.getStart(sourceFile)); + return getIndentationForNodeWorker(n, start, ignoreActualIndentationRange, 0, sourceFile, options); + } + SmartIndenter.getIndentationForNode = getIndentationForNode; + function getIndentationForNodeWorker(current, currentStart, ignoreActualIndentationRange, indentationDelta, sourceFile, options) { var parent = current.parent; var parentStart; while (parent) { - var actualIndentation = getActualIndentationForListItem(current, sourceFile, options); - if (actualIndentation !== -1) { - return actualIndentation + indentationDelta; + var useActualIndentation = true; + if (ignoreActualIndentationRange) { + var start = current.getStart(sourceFile); + useActualIndentation = start < ignoreActualIndentationRange.pos || start > ignoreActualIndentationRange.end; } - parentStart = sourceFile.getLineAndCharacterFromPosition(parent.getStart(sourceFile)); + if (useActualIndentation) { + var actualIndentation = getActualIndentationForListItem(current, sourceFile, options); + if (actualIndentation !== -1) { + return actualIndentation + indentationDelta; + } + } + parentStart = getParentStart(parent, current, sourceFile); var parentAndChildShareLine = parentStart.line === currentStart.line || childStartsOnTheSameLineWithElseInIfStatement(parent, current, currentStart.line, sourceFile); - var actualIndentation = getActualIndentationForNode(current, parent, currentStart, parentAndChildShareLine, sourceFile, options); - if (actualIndentation !== -1) { - return actualIndentation + indentationDelta; + if (useActualIndentation) { + var actualIndentation = getActualIndentationForNode(current, parent, currentStart, parentAndChildShareLine, sourceFile, options); + if (actualIndentation !== -1) { + return actualIndentation + indentationDelta; + } } - if (nodeContentIsIndented(parent, current) && !parentAndChildShareLine) { - indentationDelta += options.indentSpaces; + if (shouldIndentChildNode(parent.kind, current.kind) && !parentAndChildShareLine) { + indentationDelta += options.IndentSize; } current = parent; currentStart = parentStart; @@ -30860,14 +17136,20 @@ var ts; } return indentationDelta; } - SmartIndenter.getIndentation = getIndentation; + function getParentStart(parent, child, sourceFile) { + var containingList = getContainingList(child, sourceFile); + if (containingList) { + return sourceFile.getLineAndCharacterFromPosition(containingList.pos); + } + return sourceFile.getLineAndCharacterFromPosition(parent.getStart(sourceFile)); + } function getActualIndentationForListItemBeforeComma(commaToken, sourceFile, options) { var commaItemInfo = ts.findListItemInfo(commaToken); ts.Debug.assert(commaItemInfo && commaItemInfo.listItemIndex > 0); return deriveActualIndentationFromList(commaItemInfo.list.getChildren(), commaItemInfo.listItemIndex - 1, sourceFile, options); } function getActualIndentationForNode(current, parent, currentLineAndChar, parentAndChildShareLine, sourceFile, options) { - var useActualIndentation = (ts.isDeclaration(current) || ts.isStatement(current)) && (parent.kind === 193 /* SourceFile */ || !parentAndChildShareLine); + var useActualIndentation = (ts.isDeclaration(current) || ts.isStatement(current)) && (parent.kind === 196 /* SourceFile */ || !parentAndChildShareLine); if (!useActualIndentation) { return -1; } @@ -30894,46 +17176,50 @@ var ts; return candidate.end > position || !isCompletedNode(candidate, sourceFile); } function childStartsOnTheSameLineWithElseInIfStatement(parent, child, childStartLine, sourceFile) { - if (parent.kind === 162 /* IfStatement */ && parent.elseStatement === child) { + if (parent.kind === 165 /* IfStatement */ && parent.elseStatement === child) { var elseKeyword = ts.findChildOfKind(parent, 74 /* ElseKeyword */, sourceFile); ts.Debug.assert(elseKeyword !== undefined); var elseKeywordStartLine = getStartLineAndCharacterForNode(elseKeyword, sourceFile).line; return elseKeywordStartLine === childStartLine; } + return false; } - function getActualIndentationForListItem(node, sourceFile, options) { + SmartIndenter.childStartsOnTheSameLineWithElseInIfStatement = childStartsOnTheSameLineWithElseInIfStatement; + function getContainingList(node, sourceFile) { if (node.parent) { switch (node.parent.kind) { case 132 /* TypeReference */: if (node.parent.typeArguments) { - return getActualIndentationFromList(node.parent.typeArguments); + return node.parent.typeArguments; } break; - case 140 /* ObjectLiteral */: - return getActualIndentationFromList(node.parent.properties); - case 134 /* TypeLiteral */: - return getActualIndentationFromList(node.parent.members); - case 139 /* ArrayLiteral */: - return getActualIndentationFromList(node.parent.elements); - case 182 /* FunctionDeclaration */: - case 149 /* FunctionExpression */: - case 150 /* ArrowFunction */: + case 142 /* ObjectLiteral */: + return node.parent.properties; + case 141 /* ArrayLiteral */: + return node.parent.elements; + case 185 /* FunctionDeclaration */: + case 152 /* FunctionExpression */: + case 153 /* ArrowFunction */: case 125 /* Method */: case 129 /* CallSignature */: case 130 /* ConstructSignature */: if (node.parent.typeParameters && node.end < node.parent.typeParameters.end) { - return getActualIndentationFromList(node.parent.typeParameters); + return node.parent.typeParameters; } - return getActualIndentationFromList(node.parent.parameters); - case 145 /* NewExpression */: - case 144 /* CallExpression */: + return node.parent.parameters; + case 148 /* NewExpression */: + case 147 /* CallExpression */: if (node.parent.typeArguments && node.end < node.parent.typeArguments.end) { - return getActualIndentationFromList(node.parent.typeArguments); + return node.parent.typeArguments; } - return getActualIndentationFromList(node.parent.arguments); + return node.parent.arguments; } } - return -1; + return undefined; + } + function getActualIndentationForListItem(node, sourceFile, options) { + var containingList = getContainingList(node, sourceFile); + return containingList ? getActualIndentationFromList(containingList) : -1; function getActualIndentationFromList(list) { var index = ts.indexOf(list, node); return index !== -1 ? deriveActualIndentationFromList(list, index, sourceFile, options) : -1; @@ -30957,14 +17243,17 @@ var ts; } function findColumnForFirstNonWhitespaceCharacterInLine(lineAndCharacter, sourceFile, options) { var lineStart = sourceFile.getPositionFromLineAndCharacter(lineAndCharacter.line, 1); + return findFirstNonWhitespaceColumn(lineStart, lineStart + lineAndCharacter.character, sourceFile, options); + } + function findFirstNonWhitespaceColumn(startPos, endPos, sourceFile, options) { var column = 0; - for (var i = 0; i < lineAndCharacter.character; ++i) { - var charCode = sourceFile.text.charCodeAt(lineStart + i); - if (!ts.isWhiteSpace(charCode)) { + for (var pos = startPos; pos < endPos; ++pos) { + var ch = sourceFile.text.charCodeAt(pos); + if (!ts.isWhiteSpace(ch)) { return column; } - if (charCode === 9 /* tab */) { - column += options.spacesPerTab; + if (ch === 9 /* tab */) { + column += options.TabSize + (column % options.TabSize); } else { column++; @@ -30972,52 +17261,59 @@ var ts; } return column; } - function nodeContentIsIndented(parent, child) { - switch (parent.kind) { - case 184 /* ClassDeclaration */: - case 185 /* InterfaceDeclaration */: - case 187 /* EnumDeclaration */: + SmartIndenter.findFirstNonWhitespaceColumn = findFirstNonWhitespaceColumn; + function nodeContentIsAlwaysIndented(kind) { + switch (kind) { + case 187 /* ClassDeclaration */: + case 188 /* InterfaceDeclaration */: + case 190 /* EnumDeclaration */: + case 141 /* ArrayLiteral */: + case 161 /* Block */: + case 186 /* FunctionBlock */: + case 180 /* TryBlock */: + case 181 /* CatchBlock */: + case 182 /* FinallyBlock */: + case 192 /* ModuleBlock */: + case 142 /* ObjectLiteral */: + case 136 /* TypeLiteral */: + case 174 /* SwitchStatement */: + case 176 /* DefaultClause */: + case 175 /* CaseClause */: + case 151 /* ParenExpression */: + case 147 /* CallExpression */: + case 148 /* NewExpression */: + case 162 /* VariableStatement */: + case 184 /* VariableDeclaration */: + case 194 /* ExportAssignment */: + case 172 /* ReturnStatement */: return true; - case 188 /* ModuleDeclaration */: - return false; - case 182 /* FunctionDeclaration */: + } + return false; + } + function shouldIndentChildNode(parent, child) { + if (nodeContentIsAlwaysIndented(parent)) { + return true; + } + switch (parent) { + case 166 /* DoStatement */: + case 167 /* WhileStatement */: + case 169 /* ForInStatement */: + case 168 /* ForStatement */: + case 165 /* IfStatement */: + return child !== 161 /* Block */; + case 185 /* FunctionDeclaration */: + case 152 /* FunctionExpression */: case 125 /* Method */: - case 149 /* FunctionExpression */: + case 153 /* ArrowFunction */: + case 126 /* Constructor */: case 127 /* GetAccessor */: case 128 /* SetAccessor */: - case 126 /* Constructor */: - return false; - case 163 /* DoStatement */: - case 164 /* WhileStatement */: - case 166 /* ForInStatement */: - case 165 /* ForStatement */: - return child && child.kind !== 158 /* Block */; - case 162 /* IfStatement */: - return child && child.kind !== 158 /* Block */; - case 176 /* TryStatement */: - return false; - case 139 /* ArrayLiteral */: - case 158 /* Block */: - case 183 /* FunctionBlock */: - case 177 /* TryBlock */: - case 178 /* CatchBlock */: - case 179 /* FinallyBlock */: - case 189 /* ModuleBlock */: - case 140 /* ObjectLiteral */: - case 134 /* TypeLiteral */: - case 171 /* SwitchStatement */: - case 173 /* DefaultClause */: - case 172 /* CaseClause */: - case 148 /* ParenExpression */: - case 144 /* CallExpression */: - case 145 /* NewExpression */: - case 159 /* VariableStatement */: - case 181 /* VariableDeclaration */: - return true; + return child !== 186 /* FunctionBlock */; default: return false; } } + SmartIndenter.shouldIndentChildNode = shouldIndentChildNode; function nodeEndsWith(n, expectedLastToken, sourceFile) { var children = n.getChildren(sourceFile); if (children.length) { @@ -31033,46 +17329,46 @@ var ts; } function isCompletedNode(n, sourceFile) { switch (n.kind) { - case 184 /* ClassDeclaration */: - case 185 /* InterfaceDeclaration */: - case 187 /* EnumDeclaration */: - case 140 /* ObjectLiteral */: - case 158 /* Block */: - case 178 /* CatchBlock */: - case 179 /* FinallyBlock */: - case 183 /* FunctionBlock */: - case 189 /* ModuleBlock */: - case 171 /* SwitchStatement */: + case 187 /* ClassDeclaration */: + case 188 /* InterfaceDeclaration */: + case 190 /* EnumDeclaration */: + case 142 /* ObjectLiteral */: + case 161 /* Block */: + case 181 /* CatchBlock */: + case 182 /* FinallyBlock */: + case 186 /* FunctionBlock */: + case 192 /* ModuleBlock */: + case 174 /* SwitchStatement */: return nodeEndsWith(n, 14 /* CloseBraceToken */, sourceFile); - case 148 /* ParenExpression */: + case 151 /* ParenExpression */: case 129 /* CallSignature */: - case 144 /* CallExpression */: + case 147 /* CallExpression */: case 130 /* ConstructSignature */: return nodeEndsWith(n, 16 /* CloseParenToken */, sourceFile); - case 182 /* FunctionDeclaration */: - case 149 /* FunctionExpression */: + case 185 /* FunctionDeclaration */: + case 152 /* FunctionExpression */: case 125 /* Method */: - case 150 /* ArrowFunction */: + case 153 /* ArrowFunction */: return !n.body || isCompletedNode(n.body, sourceFile); - case 188 /* ModuleDeclaration */: + case 191 /* ModuleDeclaration */: return n.body && isCompletedNode(n.body, sourceFile); - case 162 /* IfStatement */: + case 165 /* IfStatement */: if (n.elseStatement) { return isCompletedNode(n.elseStatement, sourceFile); } return isCompletedNode(n.thenStatement, sourceFile); - case 161 /* ExpressionStatement */: + case 164 /* ExpressionStatement */: return isCompletedNode(n.expression, sourceFile); - case 139 /* ArrayLiteral */: + case 141 /* ArrayLiteral */: return nodeEndsWith(n, 18 /* CloseBracketToken */, sourceFile); case 120 /* Missing */: return false; - case 172 /* CaseClause */: - case 173 /* DefaultClause */: + case 175 /* CaseClause */: + case 176 /* DefaultClause */: return false; - case 164 /* WhileStatement */: + case 167 /* WhileStatement */: return isCompletedNode(n.statement, sourceFile); - case 163 /* DoStatement */: + case 166 /* DoStatement */: var hasWhileKeyword = ts.findChildOfKind(n, 98 /* WhileKeyword */, sourceFile); if (hasWhileKeyword) { return nodeEndsWith(n, 16 /* CloseParenToken */, sourceFile); @@ -31085,93 +17381,1739 @@ var ts; })(SmartIndenter = formatting.SmartIndenter || (formatting.SmartIndenter = {})); })(formatting = ts.formatting || (ts.formatting = {})); })(ts || (ts = {})); -var TypeScript; -(function (TypeScript) { - var NullLogger = (function () { - function NullLogger() { - } - NullLogger.prototype.log = function (s) { - }; - return NullLogger; - })(); - TypeScript.NullLogger = NullLogger; -})(TypeScript || (TypeScript = {})); -var TypeScript; -(function (TypeScript) { - var proto = "__proto__"; - var BlockIntrinsics = (function () { - function BlockIntrinsics() { - this.prototype = undefined; - this.toString = undefined; - this.toLocaleString = undefined; - this.valueOf = undefined; - this.hasOwnProperty = undefined; - this.propertyIsEnumerable = undefined; - this.isPrototypeOf = undefined; - this["constructor"] = undefined; - this[proto] = null; - this[proto] = undefined; - } - return BlockIntrinsics; - })(); - function createIntrinsicsObject() { - return new BlockIntrinsics(); - } - TypeScript.createIntrinsicsObject = createIntrinsicsObject; -})(TypeScript || (TypeScript = {})); -var TypeScript; -(function (TypeScript) { - function stripStartAndEndQuotes(str) { - var firstCharCode = str && str.charCodeAt(0); - if (str && str.length >= 2 && firstCharCode === str.charCodeAt(str.length - 1) && (firstCharCode === 39 /* singleQuote */ || firstCharCode === 34 /* doubleQuote */)) { - return str.substring(1, str.length - 1); - } - return str; - } - TypeScript.stripStartAndEndQuotes = stripStartAndEndQuotes; - var switchToForwardSlashesRegEx = /\\/g; - function switchToForwardSlashes(path) { - return path.replace(switchToForwardSlashesRegEx, "/"); - } - TypeScript.switchToForwardSlashes = switchToForwardSlashes; - function isFileOfExtension(fname, ext) { - var invariantFname = fname.toLocaleUpperCase(); - var invariantExt = ext.toLocaleUpperCase(); - var extLength = invariantExt.length; - return invariantFname.length > extLength && invariantFname.substring(invariantFname.length - extLength, invariantFname.length) === invariantExt; - } - function isDTSFile(fname) { - return isFileOfExtension(fname, ".d.ts"); - } - TypeScript.isDTSFile = isDTSFile; - function getPathComponents(path) { - return path.split("/"); - } - TypeScript.getPathComponents = getPathComponents; - var normalizePathRegEx = /^\\\\[^\\]/; - function normalizePath(path) { - if (normalizePathRegEx.test(path)) { - path = "file:" + path; - } - var parts = getPathComponents(switchToForwardSlashes(path)); - var normalizedParts = []; - for (var i = 0; i < parts.length; i++) { - var part = parts[i]; - if (part === ".") { - continue; - } - if (normalizedParts.length > 0 && TypeScript.ArrayUtilities.last(normalizedParts) !== ".." && part === "..") { - normalizedParts.pop(); - continue; - } - normalizedParts.push(part); - } - return normalizedParts.join("/"); - } - TypeScript.normalizePath = normalizePath; -})(TypeScript || (TypeScript = {})); var ts; (function (ts) { + var formatting; + (function (formatting) { + var internedTabsIndentation; + var internedSpacesIndentation; + function getIndentationString(indentation, options) { + if (!options.ConvertTabsToSpaces) { + var tabs = Math.floor(indentation / options.TabSize); + var spaces = indentation - tabs * options.TabSize; + var tabString; + if (!internedTabsIndentation) { + internedTabsIndentation = []; + } + if (internedTabsIndentation[tabs] === undefined) { + internedTabsIndentation[tabs] = tabString = repeat('\t', tabs); + } + else { + tabString = internedTabsIndentation[tabs]; + } + return spaces ? tabString + repeat(" ", spaces) : tabString; + } + else { + var spacesString; + var quotient = Math.floor(indentation / options.IndentSize); + var remainder = indentation % options.IndentSize; + if (!internedSpacesIndentation) { + internedSpacesIndentation = []; + } + if (internedSpacesIndentation[quotient] === undefined) { + spacesString = repeat(" ", options.IndentSize * quotient); + internedSpacesIndentation[quotient] = spacesString; + } + else { + spacesString = internedSpacesIndentation[quotient]; + } + return remainder ? spacesString + repeat(" ", remainder) : spacesString; + } + function repeat(value, count) { + var s = ""; + for (var i = 0; i < count; ++i) { + s += value; + } + return s; + } + } + formatting.getIndentationString = getIndentationString; + })(formatting = ts.formatting || (ts.formatting = {})); +})(ts || (ts = {})); +var ts; +(function (ts) { + var formatting; + (function (formatting) { + var scanner = ts.createScanner(2 /* Latest */, false); + function getFormattingScanner(sourceFile, startPos, endPos) { + scanner.setText(sourceFile.text); + scanner.setTextPos(startPos); + var wasNewLine = true; + var leadingTrivia; + var trailingTrivia; + var savedPos; + var lastScanAction; + var lastTokenInfo; + return { + advance: advance, + readTokenInfo: readTokenInfo, + isOnToken: isOnToken, + lastTrailingTriviaWasNewLine: function () { return wasNewLine; }, + close: function () { + lastTokenInfo = undefined; + scanner.setText(undefined); + } + }; + function advance() { + lastTokenInfo = undefined; + var isStarted = scanner.getStartPos() !== startPos; + if (isStarted) { + if (trailingTrivia) { + ts.Debug.assert(trailingTrivia.length !== 0); + wasNewLine = trailingTrivia[trailingTrivia.length - 1].kind === 4 /* NewLineTrivia */; + } + else { + wasNewLine = false; + } + } + leadingTrivia = undefined; + trailingTrivia = undefined; + if (!isStarted) { + scanner.scan(); + } + var t; + var pos = scanner.getStartPos(); + while (pos < endPos) { + var t = scanner.getToken(); + if (!ts.isTrivia(t)) { + break; + } + scanner.scan(); + var item = { + pos: pos, + end: scanner.getStartPos(), + kind: t + }; + pos = scanner.getStartPos(); + if (!leadingTrivia) { + leadingTrivia = []; + } + leadingTrivia.push(item); + } + savedPos = scanner.getStartPos(); + } + function shouldRescanGreaterThanToken(container) { + if (container.kind !== 156 /* BinaryExpression */) { + return false; + } + switch (container.operator) { + case 26 /* GreaterThanEqualsToken */: + case 58 /* GreaterThanGreaterThanEqualsToken */: + case 59 /* GreaterThanGreaterThanGreaterThanEqualsToken */: + case 41 /* GreaterThanGreaterThanGreaterThanToken */: + case 40 /* GreaterThanGreaterThanToken */: + return true; + } + return false; + } + function shouldRescanSlashToken(container) { + return container.kind === 8 /* RegularExpressionLiteral */; + } + function shouldRescanTemplateToken(container) { + return container.kind === 159 /* TemplateSpan */; + } + function startsWithSlashToken(t) { + return t === 35 /* SlashToken */ || t === 55 /* SlashEqualsToken */; + } + function readTokenInfo(n) { + if (!isOnToken()) { + return { + leadingTrivia: leadingTrivia, + trailingTrivia: undefined, + token: undefined + }; + } + var expectedScanAction = shouldRescanGreaterThanToken(n) ? 1 /* RescanGreaterThanToken */ : shouldRescanSlashToken(n) ? 2 /* RescanSlashToken */ : shouldRescanTemplateToken(n) ? 3 /* RescanTemplateToken */ : 0 /* Scan */; + if (lastTokenInfo && expectedScanAction === lastScanAction) { + return lastTokenInfo; + } + if (scanner.getStartPos() !== savedPos) { + ts.Debug.assert(lastTokenInfo !== undefined); + scanner.setTextPos(savedPos); + scanner.scan(); + } + var currentToken = scanner.getToken(); + if (expectedScanAction === 1 /* RescanGreaterThanToken */ && currentToken === 24 /* GreaterThanToken */) { + currentToken = scanner.reScanGreaterToken(); + ts.Debug.assert(n.operator === currentToken); + lastScanAction = 1 /* RescanGreaterThanToken */; + } + else if (expectedScanAction === 2 /* RescanSlashToken */ && startsWithSlashToken(currentToken)) { + currentToken = scanner.reScanSlashToken(); + ts.Debug.assert(n.kind === currentToken); + lastScanAction = 2 /* RescanSlashToken */; + } + else if (expectedScanAction === 3 /* RescanTemplateToken */ && currentToken === 14 /* CloseBraceToken */) { + currentToken = scanner.reScanTemplateToken(); + lastScanAction = 3 /* RescanTemplateToken */; + } + else { + lastScanAction = 0 /* Scan */; + } + var token = { + pos: scanner.getStartPos(), + end: scanner.getTextPos(), + kind: currentToken + }; + while (scanner.getStartPos() < endPos) { + currentToken = scanner.scan(); + if (!ts.isTrivia(currentToken)) { + break; + } + var trivia = { + pos: scanner.getStartPos(), + end: scanner.getTextPos(), + kind: currentToken + }; + if (!trailingTrivia) { + trailingTrivia = []; + } + trailingTrivia.push(trivia); + if (currentToken === 4 /* NewLineTrivia */) { + scanner.scan(); + break; + } + } + return lastTokenInfo = { + leadingTrivia: leadingTrivia, + trailingTrivia: trailingTrivia, + token: token + }; + } + function isOnToken() { + var current = (lastTokenInfo && lastTokenInfo.token.kind) || scanner.getToken(); + var startPos = (lastTokenInfo && lastTokenInfo.token.pos) || scanner.getStartPos(); + return startPos < endPos && current !== 1 /* EndOfFileToken */ && !ts.isTrivia(current); + } + } + formatting.getFormattingScanner = getFormattingScanner; + })(formatting = ts.formatting || (ts.formatting = {})); +})(ts || (ts = {})); +var ts; +(function (ts) { + var formatting; + (function (formatting) { + var FormattingContext = (function () { + function FormattingContext(sourceFile, formattingRequestKind) { + this.sourceFile = sourceFile; + this.formattingRequestKind = formattingRequestKind; + } + FormattingContext.prototype.updateContext = function (currentRange, currentTokenParent, nextRange, nextTokenParent, commonParent) { + ts.Debug.assert(currentRange !== undefined, "currentTokenSpan is null"); + ts.Debug.assert(currentTokenParent !== undefined, "currentTokenParent is null"); + ts.Debug.assert(nextRange !== undefined, "nextTokenSpan is null"); + ts.Debug.assert(nextTokenParent !== undefined, "nextTokenParent is null"); + ts.Debug.assert(commonParent !== undefined, "commonParent is null"); + this.currentTokenSpan = currentRange; + this.currentTokenParent = currentTokenParent; + this.nextTokenSpan = nextRange; + this.nextTokenParent = nextTokenParent; + this.contextNode = commonParent; + this.contextNodeAllOnSameLine = undefined; + this.nextNodeAllOnSameLine = undefined; + this.tokensAreOnSameLine = undefined; + this.contextNodeBlockIsOnOneLine = undefined; + this.nextNodeBlockIsOnOneLine = undefined; + }; + FormattingContext.prototype.ContextNodeAllOnSameLine = function () { + if (this.contextNodeAllOnSameLine === undefined) { + this.contextNodeAllOnSameLine = this.NodeIsOnOneLine(this.contextNode); + } + return this.contextNodeAllOnSameLine; + }; + FormattingContext.prototype.NextNodeAllOnSameLine = function () { + if (this.nextNodeAllOnSameLine === undefined) { + this.nextNodeAllOnSameLine = this.NodeIsOnOneLine(this.nextTokenParent); + } + return this.nextNodeAllOnSameLine; + }; + FormattingContext.prototype.TokensAreOnSameLine = function () { + if (this.tokensAreOnSameLine === undefined) { + var startLine = this.sourceFile.getLineAndCharacterFromPosition(this.currentTokenSpan.pos).line; + var endLine = this.sourceFile.getLineAndCharacterFromPosition(this.nextTokenSpan.pos).line; + this.tokensAreOnSameLine = (startLine == endLine); + } + return this.tokensAreOnSameLine; + }; + FormattingContext.prototype.ContextNodeBlockIsOnOneLine = function () { + if (this.contextNodeBlockIsOnOneLine === undefined) { + this.contextNodeBlockIsOnOneLine = this.BlockIsOnOneLine(this.contextNode); + } + return this.contextNodeBlockIsOnOneLine; + }; + FormattingContext.prototype.NextNodeBlockIsOnOneLine = function () { + if (this.nextNodeBlockIsOnOneLine === undefined) { + this.nextNodeBlockIsOnOneLine = this.BlockIsOnOneLine(this.nextTokenParent); + } + return this.nextNodeBlockIsOnOneLine; + }; + FormattingContext.prototype.NodeIsOnOneLine = function (node) { + var startLine = this.sourceFile.getLineAndCharacterFromPosition(node.getStart(this.sourceFile)).line; + var endLine = this.sourceFile.getLineAndCharacterFromPosition(node.getEnd()).line; + return startLine == endLine; + }; + FormattingContext.prototype.BlockIsOnOneLine = function (node) { + var openBrace = ts.findChildOfKind(node, 13 /* OpenBraceToken */, this.sourceFile); + var closeBrace = ts.findChildOfKind(node, 14 /* CloseBraceToken */, this.sourceFile); + if (openBrace && closeBrace) { + var startLine = this.sourceFile.getLineAndCharacterFromPosition(openBrace.getEnd()).line; + var endLine = this.sourceFile.getLineAndCharacterFromPosition(closeBrace.getStart(this.sourceFile)).line; + return startLine === endLine; + } + return false; + }; + return FormattingContext; + })(); + formatting.FormattingContext = FormattingContext; + })(formatting = ts.formatting || (ts.formatting = {})); +})(ts || (ts = {})); +var ts; +(function (ts) { + var formatting; + (function (formatting) { + var Rule = (function () { + function Rule(Descriptor, Operation, Flag) { + if (Flag === void 0) { Flag = 0 /* None */; } + this.Descriptor = Descriptor; + this.Operation = Operation; + this.Flag = Flag; + } + Rule.prototype.toString = function () { + return "[desc=" + this.Descriptor + "," + "operation=" + this.Operation + "," + "flag=" + this.Flag + "]"; + }; + return Rule; + })(); + formatting.Rule = Rule; + })(formatting = ts.formatting || (ts.formatting = {})); +})(ts || (ts = {})); +var ts; +(function (ts) { + var formatting; + (function (formatting) { + var RuleDescriptor = (function () { + function RuleDescriptor(LeftTokenRange, RightTokenRange) { + this.LeftTokenRange = LeftTokenRange; + this.RightTokenRange = RightTokenRange; + } + RuleDescriptor.prototype.toString = function () { + return "[leftRange=" + this.LeftTokenRange + "," + "rightRange=" + this.RightTokenRange + "]"; + }; + RuleDescriptor.create1 = function (left, right) { + return RuleDescriptor.create4(formatting.Shared.TokenRange.FromToken(left), formatting.Shared.TokenRange.FromToken(right)); + }; + RuleDescriptor.create2 = function (left, right) { + return RuleDescriptor.create4(left, formatting.Shared.TokenRange.FromToken(right)); + }; + RuleDescriptor.create3 = function (left, right) { + return RuleDescriptor.create4(formatting.Shared.TokenRange.FromToken(left), right); + }; + RuleDescriptor.create4 = function (left, right) { + return new RuleDescriptor(left, right); + }; + return RuleDescriptor; + })(); + formatting.RuleDescriptor = RuleDescriptor; + })(formatting = ts.formatting || (ts.formatting = {})); +})(ts || (ts = {})); +var ts; +(function (ts) { + var formatting; + (function (formatting) { + var RuleOperation = (function () { + function RuleOperation() { + this.Context = null; + this.Action = null; + } + RuleOperation.prototype.toString = function () { + return "[context=" + this.Context + "," + "action=" + this.Action + "]"; + }; + RuleOperation.create1 = function (action) { + return RuleOperation.create2(formatting.RuleOperationContext.Any, action); + }; + RuleOperation.create2 = function (context, action) { + var result = new RuleOperation(); + result.Context = context; + result.Action = action; + return result; + }; + return RuleOperation; + })(); + formatting.RuleOperation = RuleOperation; + })(formatting = ts.formatting || (ts.formatting = {})); +})(ts || (ts = {})); +var ts; +(function (ts) { + var formatting; + (function (formatting) { + var RuleOperationContext = (function () { + function RuleOperationContext() { + var funcs = []; + for (var _i = 0; _i < arguments.length; _i++) { + funcs[_i - 0] = arguments[_i]; + } + this.customContextChecks = funcs; + } + RuleOperationContext.prototype.IsAny = function () { + return this == RuleOperationContext.Any; + }; + RuleOperationContext.prototype.InContext = function (context) { + if (this.IsAny()) { + return true; + } + for (var i = 0, len = this.customContextChecks.length; i < len; i++) { + if (!this.customContextChecks[i](context)) { + return false; + } + } + return true; + }; + RuleOperationContext.Any = new RuleOperationContext(); + return RuleOperationContext; + })(); + formatting.RuleOperationContext = RuleOperationContext; + })(formatting = ts.formatting || (ts.formatting = {})); +})(ts || (ts = {})); +var ts; +(function (ts) { + var formatting; + (function (formatting) { + var Rules = (function () { + function Rules() { + this.IgnoreBeforeComment = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.Comments), formatting.RuleOperation.create1(1 /* Ignore */)); + this.IgnoreAfterLineComment = new formatting.Rule(formatting.RuleDescriptor.create3(2 /* SingleLineCommentTrivia */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create1(1 /* Ignore */)); + this.NoSpaceBeforeSemicolon = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 21 /* SemicolonToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); + this.NoSpaceBeforeColon = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 50 /* ColonToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsNotBinaryOpContext), 8 /* Delete */)); + this.NoSpaceBeforeQMark = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 49 /* QuestionToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsNotBinaryOpContext), 8 /* Delete */)); + this.SpaceAfterColon = new formatting.Rule(formatting.RuleDescriptor.create3(50 /* ColonToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsNotBinaryOpContext), 2 /* Space */)); + this.SpaceAfterQMark = new formatting.Rule(formatting.RuleDescriptor.create3(49 /* QuestionToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsNotBinaryOpContext), 2 /* Space */)); + this.SpaceAfterSemicolon = new formatting.Rule(formatting.RuleDescriptor.create3(21 /* SemicolonToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 2 /* Space */)); + this.SpaceAfterCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create3(14 /* CloseBraceToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsAfterCodeBlockContext), 2 /* Space */)); + this.SpaceBetweenCloseBraceAndElse = new formatting.Rule(formatting.RuleDescriptor.create1(14 /* CloseBraceToken */, 74 /* ElseKeyword */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 2 /* Space */)); + this.SpaceBetweenCloseBraceAndWhile = new formatting.Rule(formatting.RuleDescriptor.create1(14 /* CloseBraceToken */, 98 /* WhileKeyword */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 2 /* Space */)); + this.NoSpaceAfterCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create3(14 /* CloseBraceToken */, formatting.Shared.TokenRange.FromTokens([16 /* CloseParenToken */, 18 /* CloseBracketToken */, 22 /* CommaToken */, 21 /* SemicolonToken */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); + this.NoSpaceBeforeDot = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 19 /* DotToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); + this.NoSpaceAfterDot = new formatting.Rule(formatting.RuleDescriptor.create3(19 /* DotToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); + this.NoSpaceBeforeOpenBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 17 /* OpenBracketToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); + this.NoSpaceAfterOpenBracket = new formatting.Rule(formatting.RuleDescriptor.create3(17 /* OpenBracketToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); + this.NoSpaceBeforeCloseBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 18 /* CloseBracketToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); + this.NoSpaceAfterCloseBracket = new formatting.Rule(formatting.RuleDescriptor.create3(18 /* CloseBracketToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); + this.FunctionOpenBraceLeftTokenRange = formatting.Shared.TokenRange.AnyIncludingMultilineComments; + this.SpaceBeforeOpenBraceInFunction = new formatting.Rule(formatting.RuleDescriptor.create2(this.FunctionOpenBraceLeftTokenRange, 13 /* OpenBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext, Rules.IsNotFormatOnEnter, Rules.IsSameLineTokenOrBeforeMultilineBlockContext), 2 /* Space */), 1 /* CanDeleteNewLines */); + this.TypeScriptOpenBraceLeftTokenRange = formatting.Shared.TokenRange.FromTokens([63 /* Identifier */, 3 /* MultiLineCommentTrivia */]); + this.SpaceBeforeOpenBraceInTypeScriptDeclWithBlock = new formatting.Rule(formatting.RuleDescriptor.create2(this.TypeScriptOpenBraceLeftTokenRange, 13 /* OpenBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsTypeScriptDeclWithBlockContext, Rules.IsNotFormatOnEnter, Rules.IsSameLineTokenOrBeforeMultilineBlockContext), 2 /* Space */), 1 /* CanDeleteNewLines */); + this.ControlOpenBraceLeftTokenRange = formatting.Shared.TokenRange.FromTokens([16 /* CloseParenToken */, 3 /* MultiLineCommentTrivia */, 73 /* DoKeyword */, 94 /* TryKeyword */, 79 /* FinallyKeyword */, 74 /* ElseKeyword */]); + this.SpaceBeforeOpenBraceInControl = new formatting.Rule(formatting.RuleDescriptor.create2(this.ControlOpenBraceLeftTokenRange, 13 /* OpenBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsControlDeclContext, Rules.IsNotFormatOnEnter, Rules.IsSameLineTokenOrBeforeMultilineBlockContext), 2 /* Space */), 1 /* CanDeleteNewLines */); + this.SpaceAfterOpenBrace = new formatting.Rule(formatting.RuleDescriptor.create3(13 /* OpenBraceToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSingleLineBlockContext), 2 /* Space */)); + this.SpaceBeforeCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 14 /* CloseBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSingleLineBlockContext), 2 /* Space */)); + this.NoSpaceBetweenEmptyBraceBrackets = new formatting.Rule(formatting.RuleDescriptor.create1(13 /* OpenBraceToken */, 14 /* CloseBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsObjectContext), 8 /* Delete */)); + this.NewLineAfterOpenBraceInBlockContext = new formatting.Rule(formatting.RuleDescriptor.create3(13 /* OpenBraceToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsMultilineBlockContext), 4 /* NewLine */)); + this.NewLineBeforeCloseBraceInBlockContext = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.AnyIncludingMultilineComments, 14 /* CloseBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsMultilineBlockContext), 4 /* NewLine */)); + this.NoSpaceAfterUnaryPrefixOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.UnaryPrefixOperators, formatting.Shared.TokenRange.UnaryPrefixExpressions), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsNotBinaryOpContext), 8 /* Delete */)); + this.NoSpaceAfterUnaryPreincrementOperator = new formatting.Rule(formatting.RuleDescriptor.create3(37 /* PlusPlusToken */, formatting.Shared.TokenRange.UnaryPreincrementExpressions), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); + this.NoSpaceAfterUnaryPredecrementOperator = new formatting.Rule(formatting.RuleDescriptor.create3(38 /* MinusMinusToken */, formatting.Shared.TokenRange.UnaryPredecrementExpressions), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); + this.NoSpaceBeforeUnaryPostincrementOperator = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.UnaryPostincrementExpressions, 37 /* PlusPlusToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); + this.NoSpaceBeforeUnaryPostdecrementOperator = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.UnaryPostdecrementExpressions, 38 /* MinusMinusToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); + this.SpaceAfterPostincrementWhenFollowedByAdd = new formatting.Rule(formatting.RuleDescriptor.create1(37 /* PlusPlusToken */, 32 /* PlusToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */)); + this.SpaceAfterAddWhenFollowedByUnaryPlus = new formatting.Rule(formatting.RuleDescriptor.create1(32 /* PlusToken */, 32 /* PlusToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */)); + this.SpaceAfterAddWhenFollowedByPreincrement = new formatting.Rule(formatting.RuleDescriptor.create1(32 /* PlusToken */, 37 /* PlusPlusToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */)); + this.SpaceAfterPostdecrementWhenFollowedBySubtract = new formatting.Rule(formatting.RuleDescriptor.create1(38 /* MinusMinusToken */, 33 /* MinusToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */)); + this.SpaceAfterSubtractWhenFollowedByUnaryMinus = new formatting.Rule(formatting.RuleDescriptor.create1(33 /* MinusToken */, 33 /* MinusToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */)); + this.SpaceAfterSubtractWhenFollowedByPredecrement = new formatting.Rule(formatting.RuleDescriptor.create1(33 /* MinusToken */, 38 /* MinusMinusToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */)); + this.NoSpaceBeforeComma = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 22 /* CommaToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); + this.SpaceAfterCertainKeywords = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([96 /* VarKeyword */, 92 /* ThrowKeyword */, 86 /* NewKeyword */, 72 /* DeleteKeyword */, 88 /* ReturnKeyword */, 95 /* TypeOfKeyword */]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 2 /* Space */)); + this.NoSpaceBeforeOpenParenInFuncCall = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 15 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsFunctionCallOrNewContext), 8 /* Delete */)); + this.SpaceAfterFunctionInFuncDecl = new formatting.Rule(formatting.RuleDescriptor.create3(81 /* FunctionKeyword */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext), 2 /* Space */)); + this.NoSpaceBeforeOpenParenInFuncDecl = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 15 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsFunctionDeclContext), 8 /* Delete */)); + this.SpaceAfterVoidOperator = new formatting.Rule(formatting.RuleDescriptor.create3(97 /* VoidKeyword */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsVoidOpContext), 2 /* Space */)); + this.NoSpaceBetweenReturnAndSemicolon = new formatting.Rule(formatting.RuleDescriptor.create1(88 /* ReturnKeyword */, 21 /* SemicolonToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); + this.SpaceBetweenStatements = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([16 /* CloseParenToken */, 73 /* DoKeyword */, 74 /* ElseKeyword */, 65 /* CaseKeyword */]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsNotForContext), 2 /* Space */)); + this.SpaceAfterTryFinally = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.FromTokens([94 /* TryKeyword */, 79 /* FinallyKeyword */]), 13 /* OpenBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 2 /* Space */)); + this.SpaceAfterGetSetInMember = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.FromTokens([113 /* GetKeyword */, 117 /* SetKeyword */]), 63 /* Identifier */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext), 2 /* Space */)); + this.SpaceBeforeBinaryKeywordOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.BinaryKeywordOperators), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */)); + this.SpaceAfterBinaryKeywordOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.BinaryKeywordOperators, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */)); + this.NoSpaceAfterConstructor = new formatting.Rule(formatting.RuleDescriptor.create1(111 /* ConstructorKeyword */, 15 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); + this.NoSpaceAfterModuleImport = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.FromTokens([114 /* ModuleKeyword */, 115 /* RequireKeyword */]), 15 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); + this.SpaceAfterCertainTypeScriptKeywords = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([67 /* ClassKeyword */, 112 /* DeclareKeyword */, 75 /* EnumKeyword */, 76 /* ExportKeyword */, 77 /* ExtendsKeyword */, 113 /* GetKeyword */, 100 /* ImplementsKeyword */, 83 /* ImportKeyword */, 101 /* InterfaceKeyword */, 114 /* ModuleKeyword */, 104 /* PrivateKeyword */, 106 /* PublicKeyword */, 117 /* SetKeyword */, 107 /* StaticKeyword */]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 2 /* Space */)); + this.SpaceBeforeCertainTypeScriptKeywords = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.FromTokens([77 /* ExtendsKeyword */, 100 /* ImplementsKeyword */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 2 /* Space */)); + this.SpaceAfterModuleName = new formatting.Rule(formatting.RuleDescriptor.create1(7 /* StringLiteral */, 13 /* OpenBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsModuleDeclContext), 2 /* Space */)); + this.SpaceAfterArrow = new formatting.Rule(formatting.RuleDescriptor.create3(31 /* EqualsGreaterThanToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 2 /* Space */)); + this.NoSpaceAfterEllipsis = new formatting.Rule(formatting.RuleDescriptor.create1(20 /* DotDotDotToken */, 63 /* Identifier */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); + this.NoSpaceAfterOptionalParameters = new formatting.Rule(formatting.RuleDescriptor.create3(49 /* QuestionToken */, formatting.Shared.TokenRange.FromTokens([16 /* CloseParenToken */, 22 /* CommaToken */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsNotBinaryOpContext), 8 /* Delete */)); + this.NoSpaceBeforeOpenAngularBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.TypeNames, 23 /* LessThanToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsTypeArgumentOrParameterContext), 8 /* Delete */)); + this.NoSpaceBetweenCloseParenAndAngularBracket = new formatting.Rule(formatting.RuleDescriptor.create1(16 /* CloseParenToken */, 23 /* LessThanToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsTypeArgumentOrParameterContext), 8 /* Delete */)); + this.NoSpaceAfterOpenAngularBracket = new formatting.Rule(formatting.RuleDescriptor.create3(23 /* LessThanToken */, formatting.Shared.TokenRange.TypeNames), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsTypeArgumentOrParameterContext), 8 /* Delete */)); + this.NoSpaceBeforeCloseAngularBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 24 /* GreaterThanToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsTypeArgumentOrParameterContext), 8 /* Delete */)); + this.NoSpaceAfterCloseAngularBracket = new formatting.Rule(formatting.RuleDescriptor.create3(24 /* GreaterThanToken */, formatting.Shared.TokenRange.FromTokens([15 /* OpenParenToken */, 17 /* OpenBracketToken */, 24 /* GreaterThanToken */, 22 /* CommaToken */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsTypeArgumentOrParameterContext), 8 /* Delete */)); + this.NoSpaceBetweenEmptyInterfaceBraceBrackets = new formatting.Rule(formatting.RuleDescriptor.create1(13 /* OpenBraceToken */, 14 /* CloseBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsObjectTypeContext), 8 /* Delete */)); + this.HighPriorityCommonRules = [ + this.IgnoreBeforeComment, + this.IgnoreAfterLineComment, + this.NoSpaceBeforeColon, + this.SpaceAfterColon, + this.NoSpaceBeforeQMark, + this.SpaceAfterQMark, + this.NoSpaceBeforeDot, + this.NoSpaceAfterDot, + this.NoSpaceAfterUnaryPrefixOperator, + this.NoSpaceAfterUnaryPreincrementOperator, + this.NoSpaceAfterUnaryPredecrementOperator, + this.NoSpaceBeforeUnaryPostincrementOperator, + this.NoSpaceBeforeUnaryPostdecrementOperator, + this.SpaceAfterPostincrementWhenFollowedByAdd, + this.SpaceAfterAddWhenFollowedByUnaryPlus, + this.SpaceAfterAddWhenFollowedByPreincrement, + this.SpaceAfterPostdecrementWhenFollowedBySubtract, + this.SpaceAfterSubtractWhenFollowedByUnaryMinus, + this.SpaceAfterSubtractWhenFollowedByPredecrement, + this.NoSpaceAfterCloseBrace, + this.SpaceAfterOpenBrace, + this.SpaceBeforeCloseBrace, + this.NewLineBeforeCloseBraceInBlockContext, + this.SpaceAfterCloseBrace, + this.SpaceBetweenCloseBraceAndElse, + this.SpaceBetweenCloseBraceAndWhile, + this.NoSpaceBetweenEmptyBraceBrackets, + this.SpaceAfterFunctionInFuncDecl, + this.NewLineAfterOpenBraceInBlockContext, + this.SpaceAfterGetSetInMember, + this.NoSpaceBetweenReturnAndSemicolon, + this.SpaceAfterCertainKeywords, + this.NoSpaceBeforeOpenParenInFuncCall, + this.SpaceBeforeBinaryKeywordOperator, + this.SpaceAfterBinaryKeywordOperator, + this.SpaceAfterVoidOperator, + this.NoSpaceAfterConstructor, + this.NoSpaceAfterModuleImport, + this.SpaceAfterCertainTypeScriptKeywords, + this.SpaceBeforeCertainTypeScriptKeywords, + this.SpaceAfterModuleName, + this.SpaceAfterArrow, + this.NoSpaceAfterEllipsis, + this.NoSpaceAfterOptionalParameters, + this.NoSpaceBetweenEmptyInterfaceBraceBrackets, + this.NoSpaceBeforeOpenAngularBracket, + this.NoSpaceBetweenCloseParenAndAngularBracket, + this.NoSpaceAfterOpenAngularBracket, + this.NoSpaceBeforeCloseAngularBracket, + this.NoSpaceAfterCloseAngularBracket + ]; + this.LowPriorityCommonRules = [ + this.NoSpaceBeforeSemicolon, + this.SpaceBeforeOpenBraceInControl, + this.SpaceBeforeOpenBraceInFunction, + this.SpaceBeforeOpenBraceInTypeScriptDeclWithBlock, + this.NoSpaceBeforeComma, + this.NoSpaceBeforeOpenBracket, + this.NoSpaceAfterOpenBracket, + this.NoSpaceBeforeCloseBracket, + this.NoSpaceAfterCloseBracket, + this.SpaceAfterSemicolon, + this.NoSpaceBeforeOpenParenInFuncDecl, + this.SpaceBetweenStatements, + this.SpaceAfterTryFinally + ]; + this.SpaceAfterComma = new formatting.Rule(formatting.RuleDescriptor.create3(22 /* CommaToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 2 /* Space */)); + this.NoSpaceAfterComma = new formatting.Rule(formatting.RuleDescriptor.create3(22 /* CommaToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); + this.SpaceBeforeBinaryOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.BinaryOperators), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */)); + this.SpaceAfterBinaryOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.BinaryOperators, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */)); + this.NoSpaceBeforeBinaryOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.BinaryOperators), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), 8 /* Delete */)); + this.NoSpaceAfterBinaryOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.BinaryOperators, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), 8 /* Delete */)); + this.SpaceAfterKeywordInControl = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Keywords, 15 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsControlDeclContext), 2 /* Space */)); + this.NoSpaceAfterKeywordInControl = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Keywords, 15 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsControlDeclContext), 8 /* Delete */)); + this.NewLineBeforeOpenBraceInFunction = new formatting.Rule(formatting.RuleDescriptor.create2(this.FunctionOpenBraceLeftTokenRange, 13 /* OpenBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext, Rules.IsBeforeMultilineBlockContext), 4 /* NewLine */), 1 /* CanDeleteNewLines */); + this.NewLineBeforeOpenBraceInTypeScriptDeclWithBlock = new formatting.Rule(formatting.RuleDescriptor.create2(this.TypeScriptOpenBraceLeftTokenRange, 13 /* OpenBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsTypeScriptDeclWithBlockContext, Rules.IsBeforeMultilineBlockContext), 4 /* NewLine */), 1 /* CanDeleteNewLines */); + this.NewLineBeforeOpenBraceInControl = new formatting.Rule(formatting.RuleDescriptor.create2(this.ControlOpenBraceLeftTokenRange, 13 /* OpenBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsControlDeclContext, Rules.IsBeforeMultilineBlockContext), 4 /* NewLine */), 1 /* CanDeleteNewLines */); + this.SpaceAfterSemicolonInFor = new formatting.Rule(formatting.RuleDescriptor.create3(21 /* SemicolonToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsForContext), 2 /* Space */)); + this.NoSpaceAfterSemicolonInFor = new formatting.Rule(formatting.RuleDescriptor.create3(21 /* SemicolonToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsForContext), 8 /* Delete */)); + this.SpaceAfterOpenParen = new formatting.Rule(formatting.RuleDescriptor.create3(15 /* OpenParenToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 2 /* Space */)); + this.SpaceBeforeCloseParen = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 16 /* CloseParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 2 /* Space */)); + this.NoSpaceBetweenParens = new formatting.Rule(formatting.RuleDescriptor.create1(15 /* OpenParenToken */, 16 /* CloseParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); + this.NoSpaceAfterOpenParen = new formatting.Rule(formatting.RuleDescriptor.create3(15 /* OpenParenToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); + this.NoSpaceBeforeCloseParen = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 16 /* CloseParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); + this.SpaceAfterAnonymousFunctionKeyword = new formatting.Rule(formatting.RuleDescriptor.create1(81 /* FunctionKeyword */, 15 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext), 2 /* Space */)); + this.NoSpaceAfterAnonymousFunctionKeyword = new formatting.Rule(formatting.RuleDescriptor.create1(81 /* FunctionKeyword */, 15 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext), 8 /* Delete */)); + } + Rules.prototype.getRuleName = function (rule) { + var o = this; + for (var name in o) { + if (o[name] === rule) { + return name; + } + } + throw new Error("Unknown rule"); + }; + Rules.IsForContext = function (context) { + return context.contextNode.kind === 168 /* ForStatement */; + }; + Rules.IsNotForContext = function (context) { + return !Rules.IsForContext(context); + }; + Rules.IsBinaryOpContext = function (context) { + switch (context.contextNode.kind) { + case 156 /* BinaryExpression */: + case 157 /* ConditionalExpression */: + return true; + case 193 /* ImportDeclaration */: + case 184 /* VariableDeclaration */: + case 123 /* Parameter */: + case 195 /* EnumMember */: + case 124 /* Property */: + return context.currentTokenSpan.kind === 51 /* EqualsToken */ || context.nextTokenSpan.kind === 51 /* EqualsToken */; + case 169 /* ForInStatement */: + return context.currentTokenSpan.kind === 84 /* InKeyword */ || context.nextTokenSpan.kind === 84 /* InKeyword */; + } + return false; + }; + Rules.IsNotBinaryOpContext = function (context) { + return !Rules.IsBinaryOpContext(context); + }; + Rules.IsSameLineTokenOrBeforeMultilineBlockContext = function (context) { + return context.TokensAreOnSameLine() || Rules.IsBeforeMultilineBlockContext(context); + }; + Rules.IsBeforeMultilineBlockContext = function (context) { + return Rules.IsBeforeBlockContext(context) && !(context.NextNodeAllOnSameLine() || context.NextNodeBlockIsOnOneLine()); + }; + Rules.IsMultilineBlockContext = function (context) { + return Rules.IsBlockContext(context) && !(context.ContextNodeAllOnSameLine() || context.ContextNodeBlockIsOnOneLine()); + }; + Rules.IsSingleLineBlockContext = function (context) { + return Rules.IsBlockContext(context) && (context.ContextNodeAllOnSameLine() || context.ContextNodeBlockIsOnOneLine()); + }; + Rules.IsBlockContext = function (context) { + return Rules.NodeIsBlockContext(context.contextNode); + }; + Rules.IsBeforeBlockContext = function (context) { + return Rules.NodeIsBlockContext(context.nextTokenParent); + }; + Rules.NodeIsBlockContext = function (node) { + if (Rules.NodeIsTypeScriptDeclWithBlockContext(node)) { + return true; + } + switch (node.kind) { + case 161 /* Block */: + case 174 /* SwitchStatement */: + case 142 /* ObjectLiteral */: + case 180 /* TryBlock */: + case 181 /* CatchBlock */: + case 182 /* FinallyBlock */: + case 186 /* FunctionBlock */: + case 192 /* ModuleBlock */: + return true; + } + return false; + }; + Rules.IsFunctionDeclContext = function (context) { + switch (context.contextNode.kind) { + case 185 /* FunctionDeclaration */: + case 125 /* Method */: + case 127 /* GetAccessor */: + case 128 /* SetAccessor */: + case 129 /* CallSignature */: + case 152 /* FunctionExpression */: + case 126 /* Constructor */: + case 153 /* ArrowFunction */: + case 188 /* InterfaceDeclaration */: + return true; + } + return false; + }; + Rules.IsTypeScriptDeclWithBlockContext = function (context) { + return Rules.NodeIsTypeScriptDeclWithBlockContext(context.contextNode); + }; + Rules.NodeIsTypeScriptDeclWithBlockContext = function (node) { + switch (node.kind) { + case 187 /* ClassDeclaration */: + case 188 /* InterfaceDeclaration */: + case 190 /* EnumDeclaration */: + case 136 /* TypeLiteral */: + case 191 /* ModuleDeclaration */: + return true; + } + return false; + }; + Rules.IsAfterCodeBlockContext = function (context) { + switch (context.currentTokenParent.kind) { + case 187 /* ClassDeclaration */: + case 191 /* ModuleDeclaration */: + case 190 /* EnumDeclaration */: + case 161 /* Block */: + case 180 /* TryBlock */: + case 181 /* CatchBlock */: + case 182 /* FinallyBlock */: + case 186 /* FunctionBlock */: + case 192 /* ModuleBlock */: + case 174 /* SwitchStatement */: + return true; + } + return false; + }; + Rules.IsControlDeclContext = function (context) { + switch (context.contextNode.kind) { + case 165 /* IfStatement */: + case 174 /* SwitchStatement */: + case 168 /* ForStatement */: + case 169 /* ForInStatement */: + case 167 /* WhileStatement */: + case 179 /* TryStatement */: + case 166 /* DoStatement */: + case 173 /* WithStatement */: + case 181 /* CatchBlock */: + case 182 /* FinallyBlock */: + return true; + default: + return false; + } + }; + Rules.IsObjectContext = function (context) { + return context.contextNode.kind === 142 /* ObjectLiteral */; + }; + Rules.IsFunctionCallContext = function (context) { + return context.contextNode.kind === 147 /* CallExpression */; + }; + Rules.IsNewContext = function (context) { + return context.contextNode.kind === 148 /* NewExpression */; + }; + Rules.IsFunctionCallOrNewContext = function (context) { + return Rules.IsFunctionCallContext(context) || Rules.IsNewContext(context); + }; + Rules.IsSameLineTokenContext = function (context) { + return context.TokensAreOnSameLine(); + }; + Rules.IsNotFormatOnEnter = function (context) { + return context.formattingRequestKind != 2 /* FormatOnEnter */; + }; + Rules.IsModuleDeclContext = function (context) { + return context.contextNode.kind === 191 /* ModuleDeclaration */; + }; + Rules.IsObjectTypeContext = function (context) { + return context.contextNode.kind === 136 /* TypeLiteral */; + }; + Rules.IsTypeArgumentOrParameter = function (token, parent) { + if (token.kind !== 23 /* LessThanToken */ && token.kind !== 24 /* GreaterThanToken */) { + return false; + } + switch (parent.kind) { + case 132 /* TypeReference */: + case 187 /* ClassDeclaration */: + case 188 /* InterfaceDeclaration */: + case 185 /* FunctionDeclaration */: + case 152 /* FunctionExpression */: + case 153 /* ArrowFunction */: + case 125 /* Method */: + case 129 /* CallSignature */: + case 130 /* ConstructSignature */: + case 147 /* CallExpression */: + case 148 /* NewExpression */: + return true; + default: + return false; + } + }; + Rules.IsTypeArgumentOrParameterContext = function (context) { + return Rules.IsTypeArgumentOrParameter(context.currentTokenSpan, context.currentTokenParent) || Rules.IsTypeArgumentOrParameter(context.nextTokenSpan, context.nextTokenParent); + }; + Rules.IsVoidOpContext = function (context) { + return context.currentTokenSpan.kind === 97 /* VoidKeyword */ && context.currentTokenParent.kind === 154 /* PrefixOperator */; + }; + return Rules; + })(); + formatting.Rules = Rules; + })(formatting = ts.formatting || (ts.formatting = {})); +})(ts || (ts = {})); +var ts; +(function (ts) { + var formatting; + (function (formatting) { + var RulesMap = (function () { + function RulesMap() { + this.map = []; + this.mapRowLength = 0; + } + RulesMap.create = function (rules) { + var result = new RulesMap(); + result.Initialize(rules); + return result; + }; + RulesMap.prototype.Initialize = function (rules) { + this.mapRowLength = 119 /* LastToken */ + 1; + this.map = new Array(this.mapRowLength * this.mapRowLength); + var rulesBucketConstructionStateList = new Array(this.map.length); + this.FillRules(rules, rulesBucketConstructionStateList); + return this.map; + }; + RulesMap.prototype.FillRules = function (rules, rulesBucketConstructionStateList) { + var _this = this; + rules.forEach(function (rule) { + _this.FillRule(rule, rulesBucketConstructionStateList); + }); + }; + RulesMap.prototype.GetRuleBucketIndex = function (row, column) { + var rulesBucketIndex = (row * this.mapRowLength) + column; + return rulesBucketIndex; + }; + RulesMap.prototype.FillRule = function (rule, rulesBucketConstructionStateList) { + var _this = this; + var specificRule = rule.Descriptor.LeftTokenRange != formatting.Shared.TokenRange.Any && rule.Descriptor.RightTokenRange != formatting.Shared.TokenRange.Any; + rule.Descriptor.LeftTokenRange.GetTokens().forEach(function (left) { + rule.Descriptor.RightTokenRange.GetTokens().forEach(function (right) { + var rulesBucketIndex = _this.GetRuleBucketIndex(left, right); + var rulesBucket = _this.map[rulesBucketIndex]; + if (rulesBucket == undefined) { + rulesBucket = _this.map[rulesBucketIndex] = new RulesBucket(); + } + rulesBucket.AddRule(rule, specificRule, rulesBucketConstructionStateList, rulesBucketIndex); + }); + }); + }; + RulesMap.prototype.GetRule = function (context) { + var bucketIndex = this.GetRuleBucketIndex(context.currentTokenSpan.kind, context.nextTokenSpan.kind); + var bucket = this.map[bucketIndex]; + if (bucket != null) { + for (var i = 0, len = bucket.Rules().length; i < len; i++) { + var rule = bucket.Rules()[i]; + if (rule.Operation.Context.InContext(context)) + return rule; + } + } + return null; + }; + return RulesMap; + })(); + formatting.RulesMap = RulesMap; + var MaskBitSize = 5; + var Mask = 0x1f; + (function (RulesPosition) { + RulesPosition[RulesPosition["IgnoreRulesSpecific"] = 0] = "IgnoreRulesSpecific"; + RulesPosition[RulesPosition["IgnoreRulesAny"] = MaskBitSize * 1] = "IgnoreRulesAny"; + RulesPosition[RulesPosition["ContextRulesSpecific"] = MaskBitSize * 2] = "ContextRulesSpecific"; + RulesPosition[RulesPosition["ContextRulesAny"] = MaskBitSize * 3] = "ContextRulesAny"; + RulesPosition[RulesPosition["NoContextRulesSpecific"] = MaskBitSize * 4] = "NoContextRulesSpecific"; + RulesPosition[RulesPosition["NoContextRulesAny"] = MaskBitSize * 5] = "NoContextRulesAny"; + })(formatting.RulesPosition || (formatting.RulesPosition = {})); + var RulesPosition = formatting.RulesPosition; + var RulesBucketConstructionState = (function () { + function RulesBucketConstructionState() { + this.rulesInsertionIndexBitmap = 0; + } + RulesBucketConstructionState.prototype.GetInsertionIndex = function (maskPosition) { + var index = 0; + var pos = 0; + var indexBitmap = this.rulesInsertionIndexBitmap; + while (pos <= maskPosition) { + index += (indexBitmap & Mask); + indexBitmap >>= MaskBitSize; + pos += MaskBitSize; + } + return index; + }; + RulesBucketConstructionState.prototype.IncreaseInsertionIndex = function (maskPosition) { + var value = (this.rulesInsertionIndexBitmap >> maskPosition) & Mask; + value++; + ts.Debug.assert((value & Mask) == value, "Adding more rules into the sub-bucket than allowed. Maximum allowed is 32 rules."); + var temp = this.rulesInsertionIndexBitmap & ~(Mask << maskPosition); + temp |= value << maskPosition; + this.rulesInsertionIndexBitmap = temp; + }; + return RulesBucketConstructionState; + })(); + formatting.RulesBucketConstructionState = RulesBucketConstructionState; + var RulesBucket = (function () { + function RulesBucket() { + this.rules = []; + } + RulesBucket.prototype.Rules = function () { + return this.rules; + }; + RulesBucket.prototype.AddRule = function (rule, specificTokens, constructionState, rulesBucketIndex) { + var position; + if (rule.Operation.Action == 1 /* Ignore */) { + position = specificTokens ? 0 /* IgnoreRulesSpecific */ : RulesPosition.IgnoreRulesAny; + } + else if (!rule.Operation.Context.IsAny()) { + position = specificTokens ? RulesPosition.ContextRulesSpecific : RulesPosition.ContextRulesAny; + } + else { + position = specificTokens ? RulesPosition.NoContextRulesSpecific : RulesPosition.NoContextRulesAny; + } + var state = constructionState[rulesBucketIndex]; + if (state === undefined) { + state = constructionState[rulesBucketIndex] = new RulesBucketConstructionState(); + } + var index = state.GetInsertionIndex(position); + this.rules.splice(index, 0, rule); + state.IncreaseInsertionIndex(position); + }; + return RulesBucket; + })(); + formatting.RulesBucket = RulesBucket; + })(formatting = ts.formatting || (ts.formatting = {})); +})(ts || (ts = {})); +var ts; +(function (ts) { + var formatting; + (function (formatting) { + var Shared; + (function (Shared) { + var TokenRangeAccess = (function () { + function TokenRangeAccess(from, to, except) { + this.tokens = []; + for (var token = from; token <= to; token++) { + if (except.indexOf(token) < 0) { + this.tokens.push(token); + } + } + } + TokenRangeAccess.prototype.GetTokens = function () { + return this.tokens; + }; + TokenRangeAccess.prototype.Contains = function (token) { + return this.tokens.indexOf(token) >= 0; + }; + return TokenRangeAccess; + })(); + Shared.TokenRangeAccess = TokenRangeAccess; + var TokenValuesAccess = (function () { + function TokenValuesAccess(tks) { + this.tokens = tks && tks.length ? tks : []; + } + TokenValuesAccess.prototype.GetTokens = function () { + return this.tokens; + }; + TokenValuesAccess.prototype.Contains = function (token) { + return this.tokens.indexOf(token) >= 0; + }; + return TokenValuesAccess; + })(); + Shared.TokenValuesAccess = TokenValuesAccess; + var TokenSingleValueAccess = (function () { + function TokenSingleValueAccess(token) { + this.token = token; + } + TokenSingleValueAccess.prototype.GetTokens = function () { + return [this.token]; + }; + TokenSingleValueAccess.prototype.Contains = function (tokenValue) { + return tokenValue == this.token; + }; + return TokenSingleValueAccess; + })(); + Shared.TokenSingleValueAccess = TokenSingleValueAccess; + var TokenAllAccess = (function () { + function TokenAllAccess() { + } + TokenAllAccess.prototype.GetTokens = function () { + var result = []; + for (var token = 1 /* FirstToken */; token <= 119 /* LastToken */; token++) { + result.push(token); + } + return result; + }; + TokenAllAccess.prototype.Contains = function (tokenValue) { + return true; + }; + TokenAllAccess.prototype.toString = function () { + return "[allTokens]"; + }; + return TokenAllAccess; + })(); + Shared.TokenAllAccess = TokenAllAccess; + var TokenRange = (function () { + function TokenRange(tokenAccess) { + this.tokenAccess = tokenAccess; + } + TokenRange.FromToken = function (token) { + return new TokenRange(new TokenSingleValueAccess(token)); + }; + TokenRange.FromTokens = function (tokens) { + return new TokenRange(new TokenValuesAccess(tokens)); + }; + TokenRange.FromRange = function (f, to, except) { + if (except === void 0) { except = []; } + return new TokenRange(new TokenRangeAccess(f, to, except)); + }; + TokenRange.AllTokens = function () { + return new TokenRange(new TokenAllAccess()); + }; + TokenRange.prototype.GetTokens = function () { + return this.tokenAccess.GetTokens(); + }; + TokenRange.prototype.Contains = function (token) { + return this.tokenAccess.Contains(token); + }; + TokenRange.prototype.toString = function () { + return this.tokenAccess.toString(); + }; + TokenRange.Any = TokenRange.AllTokens(); + TokenRange.AnyIncludingMultilineComments = TokenRange.FromTokens(TokenRange.Any.GetTokens().concat([3 /* MultiLineCommentTrivia */])); + TokenRange.Keywords = TokenRange.FromRange(64 /* FirstKeyword */, 119 /* LastKeyword */); + TokenRange.Operators = TokenRange.FromRange(21 /* FirstOperator */, 62 /* LastOperator */); + TokenRange.BinaryOperators = TokenRange.FromRange(23 /* FirstBinaryOperator */, 62 /* LastBinaryOperator */); + TokenRange.BinaryKeywordOperators = TokenRange.FromTokens([84 /* InKeyword */, 85 /* InstanceOfKeyword */]); + TokenRange.ReservedKeywords = TokenRange.FromRange(100 /* FirstFutureReservedWord */, 108 /* LastFutureReservedWord */); + TokenRange.UnaryPrefixOperators = TokenRange.FromTokens([37 /* PlusPlusToken */, 38 /* MinusMinusToken */, 46 /* TildeToken */, 45 /* ExclamationToken */]); + TokenRange.UnaryPrefixExpressions = TokenRange.FromTokens([6 /* NumericLiteral */, 63 /* Identifier */, 15 /* OpenParenToken */, 17 /* OpenBracketToken */, 13 /* OpenBraceToken */, 91 /* ThisKeyword */, 86 /* NewKeyword */]); + TokenRange.UnaryPreincrementExpressions = TokenRange.FromTokens([63 /* Identifier */, 15 /* OpenParenToken */, 91 /* ThisKeyword */, 86 /* NewKeyword */]); + TokenRange.UnaryPostincrementExpressions = TokenRange.FromTokens([63 /* Identifier */, 16 /* CloseParenToken */, 18 /* CloseBracketToken */, 86 /* NewKeyword */]); + TokenRange.UnaryPredecrementExpressions = TokenRange.FromTokens([63 /* Identifier */, 15 /* OpenParenToken */, 91 /* ThisKeyword */, 86 /* NewKeyword */]); + TokenRange.UnaryPostdecrementExpressions = TokenRange.FromTokens([63 /* Identifier */, 16 /* CloseParenToken */, 18 /* CloseBracketToken */, 86 /* NewKeyword */]); + TokenRange.Comments = TokenRange.FromTokens([2 /* SingleLineCommentTrivia */, 3 /* MultiLineCommentTrivia */]); + TokenRange.TypeNames = TokenRange.FromTokens([63 /* Identifier */, 116 /* NumberKeyword */, 118 /* StringKeyword */, 110 /* BooleanKeyword */, 97 /* VoidKeyword */, 109 /* AnyKeyword */]); + return TokenRange; + })(); + Shared.TokenRange = TokenRange; + })(Shared = formatting.Shared || (formatting.Shared = {})); + })(formatting = ts.formatting || (ts.formatting = {})); +})(ts || (ts = {})); +var __extends = this.__extends || function (d, b) { + for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + function __() { this.constructor = d; } + __.prototype = b.prototype; + d.prototype = new __(); +}; +var ts; +(function (ts) { + var formatting; + (function (formatting) { + var TokenSpan = (function (_super) { + __extends(TokenSpan, _super); + function TokenSpan(kind, start, length) { + _super.call(this, start, length); + this.kind = kind; + } + return TokenSpan; + })(ts.TextSpan); + formatting.TokenSpan = TokenSpan; + })(formatting = ts.formatting || (ts.formatting = {})); +})(ts || (ts = {})); +var ts; +(function (ts) { + var formatting; + (function (formatting) { + var RulesProvider = (function () { + function RulesProvider(logger) { + this.logger = logger; + this.globalRules = new formatting.Rules(); + } + RulesProvider.prototype.getRuleName = function (rule) { + return this.globalRules.getRuleName(rule); + }; + RulesProvider.prototype.getRuleByName = function (name) { + return this.globalRules[name]; + }; + RulesProvider.prototype.getRulesMap = function () { + return this.rulesMap; + }; + RulesProvider.prototype.ensureUpToDate = function (options) { + if (this.options == null || !ts.compareDataObjects(this.options, options)) { + var activeRules = this.createActiveRules(options); + var rulesMap = formatting.RulesMap.create(activeRules); + this.activeRules = activeRules; + this.rulesMap = rulesMap; + this.options = ts.clone(options); + } + }; + RulesProvider.prototype.createActiveRules = function (options) { + var rules = this.globalRules.HighPriorityCommonRules.slice(0); + if (options.InsertSpaceAfterCommaDelimiter) { + rules.push(this.globalRules.SpaceAfterComma); + } + else { + rules.push(this.globalRules.NoSpaceAfterComma); + } + if (options.InsertSpaceAfterFunctionKeywordForAnonymousFunctions) { + rules.push(this.globalRules.SpaceAfterAnonymousFunctionKeyword); + } + else { + rules.push(this.globalRules.NoSpaceAfterAnonymousFunctionKeyword); + } + if (options.InsertSpaceAfterKeywordsInControlFlowStatements) { + rules.push(this.globalRules.SpaceAfterKeywordInControl); + } + else { + rules.push(this.globalRules.NoSpaceAfterKeywordInControl); + } + if (options.InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis) { + rules.push(this.globalRules.SpaceAfterOpenParen); + rules.push(this.globalRules.SpaceBeforeCloseParen); + rules.push(this.globalRules.NoSpaceBetweenParens); + } + else { + rules.push(this.globalRules.NoSpaceAfterOpenParen); + rules.push(this.globalRules.NoSpaceBeforeCloseParen); + rules.push(this.globalRules.NoSpaceBetweenParens); + } + if (options.InsertSpaceAfterSemicolonInForStatements) { + rules.push(this.globalRules.SpaceAfterSemicolonInFor); + } + else { + rules.push(this.globalRules.NoSpaceAfterSemicolonInFor); + } + if (options.InsertSpaceBeforeAndAfterBinaryOperators) { + rules.push(this.globalRules.SpaceBeforeBinaryOperator); + rules.push(this.globalRules.SpaceAfterBinaryOperator); + } + else { + rules.push(this.globalRules.NoSpaceBeforeBinaryOperator); + rules.push(this.globalRules.NoSpaceAfterBinaryOperator); + } + if (options.PlaceOpenBraceOnNewLineForControlBlocks) { + rules.push(this.globalRules.NewLineBeforeOpenBraceInControl); + } + if (options.PlaceOpenBraceOnNewLineForFunctions) { + rules.push(this.globalRules.NewLineBeforeOpenBraceInFunction); + rules.push(this.globalRules.NewLineBeforeOpenBraceInTypeScriptDeclWithBlock); + } + rules = rules.concat(this.globalRules.LowPriorityCommonRules); + return rules; + }; + return RulesProvider; + })(); + formatting.RulesProvider = RulesProvider; + })(formatting = ts.formatting || (ts.formatting = {})); +})(ts || (ts = {})); +var ts; +(function (ts) { + var formatting; + (function (formatting) { + function formatOnEnter(position, sourceFile, rulesProvider, options) { + var line = sourceFile.getLineAndCharacterFromPosition(position).line; + ts.Debug.assert(line >= 2); + var span = { + pos: ts.getStartPositionOfLine(line - 1, sourceFile), + end: ts.getEndLinePosition(line, sourceFile) + 1 + }; + return formatSpan(span, sourceFile, options, rulesProvider, 2 /* FormatOnEnter */); + } + formatting.formatOnEnter = formatOnEnter; + function formatOnSemicolon(position, sourceFile, rulesProvider, options) { + return formatOutermostParent(position, 21 /* SemicolonToken */, sourceFile, options, rulesProvider, 3 /* FormatOnSemicolon */); + } + formatting.formatOnSemicolon = formatOnSemicolon; + function formatOnClosingCurly(position, sourceFile, rulesProvider, options) { + return formatOutermostParent(position, 14 /* CloseBraceToken */, sourceFile, options, rulesProvider, 4 /* FormatOnClosingCurlyBrace */); + } + formatting.formatOnClosingCurly = formatOnClosingCurly; + function formatDocument(sourceFile, rulesProvider, options) { + var span = { + pos: 0, + end: sourceFile.text.length + }; + return formatSpan(span, sourceFile, options, rulesProvider, 0 /* FormatDocument */); + } + formatting.formatDocument = formatDocument; + function formatSelection(start, end, sourceFile, rulesProvider, options) { + var span = { + pos: ts.getStartLinePositionForPosition(start, sourceFile), + end: end + }; + return formatSpan(span, sourceFile, options, rulesProvider, 1 /* FormatSelection */); + } + formatting.formatSelection = formatSelection; + function formatOutermostParent(position, expectedLastToken, sourceFile, options, rulesProvider, requestKind) { + var parent = findOutermostParent(position, expectedLastToken, sourceFile); + if (!parent) { + return []; + } + var span = { + pos: ts.getStartLinePositionForPosition(parent.getStart(sourceFile), sourceFile), + end: parent.end + }; + return formatSpan(span, sourceFile, options, rulesProvider, requestKind); + } + function findOutermostParent(position, expectedTokenKind, sourceFile) { + var precedingToken = ts.findPrecedingToken(position, sourceFile); + if (!precedingToken || precedingToken.kind !== expectedTokenKind) { + return undefined; + } + var current = precedingToken; + while (current && current.parent && current.parent.end === precedingToken.end && !isListElement(current.parent, current)) { + current = current.parent; + } + return current; + } + function isListElement(parent, node) { + switch (parent.kind) { + case 187 /* ClassDeclaration */: + case 188 /* InterfaceDeclaration */: + return ts.rangeContainsRange(parent.members, node); + case 191 /* ModuleDeclaration */: + var body = parent.body; + return body && body.kind === 161 /* Block */ && ts.rangeContainsRange(body.statements, node); + case 196 /* SourceFile */: + case 161 /* Block */: + case 180 /* TryBlock */: + case 181 /* CatchBlock */: + case 182 /* FinallyBlock */: + case 192 /* ModuleBlock */: + return ts.rangeContainsRange(parent.statements, node); + } + return false; + } + function findEnclosingNode(range, sourceFile) { + return find(sourceFile); + function find(n) { + var candidate = ts.forEachChild(n, function (c) { return ts.startEndContainsRange(c.getStart(sourceFile), c.end, range) && c; }); + if (candidate) { + var result = find(candidate); + if (result) { + return result; + } + } + return n; + } + } + function prepareRangeContainsErrorFunction(errors, originalRange) { + if (!errors.length) { + return rangeHasNoErrors; + } + var sorted = errors.filter(function (d) { return d.isParseError && ts.rangeOverlapsWithStartEnd(originalRange, d.start, d.start + d.length); }).sort(function (e1, e2) { return e1.start - e2.start; }); + if (!sorted.length) { + return rangeHasNoErrors; + } + var index = 0; + return function (r) { + while (true) { + if (index >= sorted.length) { + return false; + } + var error = sorted[index]; + if (r.end <= error.start) { + return false; + } + if (ts.startEndOverlapsWithStartEnd(r.pos, r.end, error.start, error.start + error.length)) { + return true; + } + index++; + } + }; + function rangeHasNoErrors(r) { + return false; + } + } + function getScanStartPosition(enclosingNode, originalRange, sourceFile) { + var start = enclosingNode.getStart(sourceFile); + if (start === originalRange.pos && enclosingNode.end === originalRange.end) { + return start; + } + var precedingToken = ts.findPrecedingToken(originalRange.pos, sourceFile); + return precedingToken ? precedingToken.end : enclosingNode.pos; + } + function formatSpan(originalRange, sourceFile, options, rulesProvider, requestKind) { + var rangeContainsError = prepareRangeContainsErrorFunction(sourceFile.syntacticErrors, originalRange); + var formattingContext = new formatting.FormattingContext(sourceFile, requestKind); + var enclosingNode = findEnclosingNode(originalRange, sourceFile); + var formattingScanner = formatting.getFormattingScanner(sourceFile, getScanStartPosition(enclosingNode, originalRange, sourceFile), originalRange.end); + var initialIndentation = formatting.SmartIndenter.getIndentationForNode(enclosingNode, originalRange, sourceFile, options); + var previousRangeHasError; + var previousRange; + var previousParent; + var previousRangeStartLine; + var edits = []; + formattingScanner.advance(); + if (formattingScanner.isOnToken()) { + var startLine = sourceFile.getLineAndCharacterFromPosition(enclosingNode.getStart(sourceFile)).line; + var delta = formatting.SmartIndenter.shouldIndentChildNode(enclosingNode.kind, 0 /* Unknown */) ? options.IndentSize : 0; + processNode(enclosingNode, enclosingNode, startLine, initialIndentation, delta); + } + formattingScanner.close(); + return edits; + function tryComputeIndentationForListItem(startPos, endPos, parentStartLine, range, inheritedIndentation) { + if (ts.rangeOverlapsWithStartEnd(range, startPos, endPos)) { + if (inheritedIndentation !== -1 /* Unknown */) { + return inheritedIndentation; + } + } + else { + var startLine = sourceFile.getLineAndCharacterFromPosition(startPos).line; + var startLinePosition = ts.getStartLinePositionForPosition(startPos, sourceFile); + var column = formatting.SmartIndenter.findFirstNonWhitespaceColumn(startLinePosition, startPos, sourceFile, options); + if (startLine !== parentStartLine || startPos === column) { + return column; + } + } + return -1 /* Unknown */; + } + function computeIndentation(node, startLine, inheritedIndentation, parent, parentDynamicIndentation, effectiveParentStartLine) { + var indentation = inheritedIndentation; + if (indentation === -1 /* Unknown */) { + if (isSomeBlock(node.kind)) { + if (isSomeBlock(parent.kind) || parent.kind === 196 /* SourceFile */ || parent.kind === 175 /* CaseClause */ || parent.kind === 176 /* DefaultClause */) { + indentation = parentDynamicIndentation.getIndentation() + parentDynamicIndentation.getDelta(); + } + else { + indentation = parentDynamicIndentation.getIndentation(); + } + } + else { + if (formatting.SmartIndenter.childStartsOnTheSameLineWithElseInIfStatement(parent, node, startLine, sourceFile)) { + indentation = parentDynamicIndentation.getIndentation(); + } + else { + indentation = parentDynamicIndentation.getIndentation() + parentDynamicIndentation.getDelta(); + } + } + } + var delta = formatting.SmartIndenter.shouldIndentChildNode(node.kind, 0 /* Unknown */) ? options.IndentSize : 0; + if (effectiveParentStartLine === startLine) { + indentation = parentDynamicIndentation.getIndentation(); + delta = Math.min(options.IndentSize, parentDynamicIndentation.getDelta() + delta); + } + return { + indentation: indentation, + delta: delta + }; + } + function getDynamicIndentation(node, nodeStartLine, indentation, delta) { + return { + getIndentationForComment: function (kind) { + switch (kind) { + case 14 /* CloseBraceToken */: + case 18 /* CloseBracketToken */: + return indentation + delta; + } + return indentation; + }, + getIndentationForToken: function (line, kind) { + switch (kind) { + case 13 /* OpenBraceToken */: + case 14 /* CloseBraceToken */: + case 17 /* OpenBracketToken */: + case 18 /* CloseBracketToken */: + case 74 /* ElseKeyword */: + case 98 /* WhileKeyword */: + return indentation; + default: + return nodeStartLine !== line ? indentation + delta : indentation; + } + }, + getIndentation: function () { return indentation; }, + getDelta: function () { return delta; }, + recomputeIndentation: function (lineAdded) { + if (node.parent && formatting.SmartIndenter.shouldIndentChildNode(node.parent.kind, node.kind)) { + if (lineAdded) { + indentation += options.IndentSize; + } + else { + indentation -= options.IndentSize; + } + if (formatting.SmartIndenter.shouldIndentChildNode(node.kind, 0 /* Unknown */)) { + delta = options.IndentSize; + } + else { + delta = 0; + } + } + } + }; + } + function processNode(node, contextNode, nodeStartLine, indentation, delta) { + if (!ts.rangeOverlapsWithStartEnd(originalRange, node.getStart(sourceFile), node.getEnd())) { + return; + } + var nodeDynamicIndentation = getDynamicIndentation(node, nodeStartLine, indentation, delta); + var childContextNode = contextNode; + ts.forEachChild(node, function (child) { + processChildNode(child, -1 /* Unknown */, node, nodeDynamicIndentation, nodeStartLine, false); + }, function (nodes) { + processChildNodes(nodes, node, nodeStartLine, nodeDynamicIndentation); + }); + while (formattingScanner.isOnToken()) { + var tokenInfo = formattingScanner.readTokenInfo(node); + if (tokenInfo.token.end > node.end) { + break; + } + consumeTokenAndAdvanceScanner(tokenInfo, node, nodeDynamicIndentation); + } + function processChildNode(child, inheritedIndentation, parent, parentDynamicIndentation, parentStartLine, isListItem) { + var childStartPos = child.getStart(sourceFile); + var childStart = sourceFile.getLineAndCharacterFromPosition(childStartPos); + var childIndentationAmount = -1 /* Unknown */; + if (isListItem) { + childIndentationAmount = tryComputeIndentationForListItem(childStartPos, child.end, parentStartLine, originalRange, inheritedIndentation); + if (childIndentationAmount !== -1 /* Unknown */) { + inheritedIndentation = childIndentationAmount; + } + } + if (!ts.rangeOverlapsWithStartEnd(originalRange, child.pos, child.end)) { + return inheritedIndentation; + } + if (child.kind === 120 /* Missing */) { + return inheritedIndentation; + } + while (formattingScanner.isOnToken()) { + var tokenInfo = formattingScanner.readTokenInfo(node); + if (tokenInfo.token.end > childStartPos) { + break; + } + consumeTokenAndAdvanceScanner(tokenInfo, node, parentDynamicIndentation); + } + if (!formattingScanner.isOnToken()) { + return inheritedIndentation; + } + if (ts.isToken(child)) { + var tokenInfo = formattingScanner.readTokenInfo(node); + ts.Debug.assert(tokenInfo.token.end === child.end); + consumeTokenAndAdvanceScanner(tokenInfo, node, parentDynamicIndentation); + return inheritedIndentation; + } + var childIndentation = computeIndentation(child, childStart.line, childIndentationAmount, node, parentDynamicIndentation, parentStartLine); + processNode(child, childContextNode, childStart.line, childIndentation.indentation, childIndentation.delta); + childContextNode = node; + return inheritedIndentation; + } + function processChildNodes(nodes, parent, parentStartLine, parentDynamicIndentation) { + var listStartToken = getOpenTokenForList(parent, nodes); + var listEndToken = getCloseTokenForOpenToken(listStartToken); + var listDynamicIndentation = parentDynamicIndentation; + var startLine = parentStartLine; + if (listStartToken !== 0 /* Unknown */) { + while (formattingScanner.isOnToken()) { + var tokenInfo = formattingScanner.readTokenInfo(parent); + if (tokenInfo.token.end > nodes.pos) { + break; + } + else if (tokenInfo.token.kind === listStartToken) { + startLine = sourceFile.getLineAndCharacterFromPosition(tokenInfo.token.pos).line; + var indentation = computeIndentation(tokenInfo.token, startLine, -1 /* Unknown */, parent, parentDynamicIndentation, startLine); + listDynamicIndentation = getDynamicIndentation(parent, parentStartLine, indentation.indentation, indentation.delta); + consumeTokenAndAdvanceScanner(tokenInfo, parent, listDynamicIndentation); + } + else { + consumeTokenAndAdvanceScanner(tokenInfo, parent, parentDynamicIndentation); + } + } + } + var inheritedIndentation = -1 /* Unknown */; + for (var i = 0, len = nodes.length; i < len; ++i) { + inheritedIndentation = processChildNode(nodes[i], inheritedIndentation, node, listDynamicIndentation, startLine, true); + } + if (listEndToken !== 0 /* Unknown */) { + if (formattingScanner.isOnToken()) { + var tokenInfo = formattingScanner.readTokenInfo(parent); + if (tokenInfo.token.kind === listEndToken) { + consumeTokenAndAdvanceScanner(tokenInfo, parent, listDynamicIndentation); + } + } + } + } + function consumeTokenAndAdvanceScanner(currentTokenInfo, parent, dynamicIndentation) { + ts.Debug.assert(ts.rangeContainsRange(parent, currentTokenInfo.token)); + var lastTriviaWasNewLine = formattingScanner.lastTrailingTriviaWasNewLine(); + var indentToken = false; + if (currentTokenInfo.leadingTrivia) { + processTrivia(currentTokenInfo.leadingTrivia, parent, childContextNode, dynamicIndentation); + } + var lineAdded; + var isTokenInRange = ts.rangeContainsRange(originalRange, currentTokenInfo.token); + var tokenStart = sourceFile.getLineAndCharacterFromPosition(currentTokenInfo.token.pos); + if (isTokenInRange) { + var prevStartLine = previousRangeStartLine; + lineAdded = processRange(currentTokenInfo.token, tokenStart, parent, childContextNode, dynamicIndentation); + if (lineAdded !== undefined) { + indentToken = lineAdded; + } + else { + indentToken = lastTriviaWasNewLine && tokenStart.line !== prevStartLine; + } + } + if (currentTokenInfo.trailingTrivia) { + processTrivia(currentTokenInfo.trailingTrivia, parent, childContextNode, dynamicIndentation); + } + if (indentToken) { + var indentNextTokenOrTrivia = true; + if (currentTokenInfo.leadingTrivia) { + for (var i = 0, len = currentTokenInfo.leadingTrivia.length; i < len; ++i) { + var triviaItem = currentTokenInfo.leadingTrivia[i]; + if (!ts.rangeContainsRange(originalRange, triviaItem)) { + continue; + } + var triviaStartLine = sourceFile.getLineAndCharacterFromPosition(triviaItem.pos).line; + switch (triviaItem.kind) { + case 3 /* MultiLineCommentTrivia */: + var commentIndentation = dynamicIndentation.getIndentationForComment(currentTokenInfo.token.kind); + indentMultilineComment(triviaItem, commentIndentation, !indentNextTokenOrTrivia); + indentNextTokenOrTrivia = false; + break; + case 2 /* SingleLineCommentTrivia */: + if (indentNextTokenOrTrivia) { + var commentIndentation = dynamicIndentation.getIndentationForComment(currentTokenInfo.token.kind); + insertIndentation(triviaItem.pos, commentIndentation, false); + indentNextTokenOrTrivia = false; + } + break; + case 4 /* NewLineTrivia */: + indentNextTokenOrTrivia = true; + break; + } + } + } + if (isTokenInRange && !rangeContainsError(currentTokenInfo.token)) { + var tokenIndentation = dynamicIndentation.getIndentationForToken(tokenStart.line, currentTokenInfo.token.kind); + insertIndentation(currentTokenInfo.token.pos, tokenIndentation, lineAdded); + } + } + formattingScanner.advance(); + childContextNode = parent; + } + } + function processTrivia(trivia, parent, contextNode, dynamicIndentation) { + for (var i = 0, len = trivia.length; i < len; ++i) { + var triviaItem = trivia[i]; + if (ts.isComment(triviaItem.kind) && ts.rangeContainsRange(originalRange, triviaItem)) { + var triviaItemStart = sourceFile.getLineAndCharacterFromPosition(triviaItem.pos); + processRange(triviaItem, triviaItemStart, parent, contextNode, dynamicIndentation); + } + } + } + function processRange(range, rangeStart, parent, contextNode, dynamicIndentation) { + var rangeHasError = rangeContainsError(range); + var lineAdded; + if (!rangeHasError && !previousRangeHasError) { + if (!previousRange) { + var originalStart = sourceFile.getLineAndCharacterFromPosition(originalRange.pos); + trimTrailingWhitespacesForLines(originalStart.line, rangeStart.line); + } + else { + lineAdded = processPair(range, rangeStart.line, parent, previousRange, previousRangeStartLine, previousParent, contextNode, dynamicIndentation); + } + } + previousRange = range; + previousParent = parent; + previousRangeStartLine = rangeStart.line; + previousRangeHasError = rangeHasError; + return lineAdded; + } + function processPair(currentItem, currentStartLine, currentParent, previousItem, previousStartLine, previousParent, contextNode, dynamicIndentation) { + formattingContext.updateContext(previousItem, previousParent, currentItem, currentParent, contextNode); + var rule = rulesProvider.getRulesMap().GetRule(formattingContext); + var trimTrailingWhitespaces; + var lineAdded; + if (rule) { + applyRuleEdits(rule, previousItem, previousStartLine, currentItem, currentStartLine); + if (rule.Operation.Action & (2 /* Space */ | 8 /* Delete */) && currentStartLine !== previousStartLine) { + if (currentParent.getStart(sourceFile) === currentItem.pos) { + lineAdded = false; + } + } + else if (rule.Operation.Action & 4 /* NewLine */ && currentStartLine === previousStartLine) { + if (currentParent.getStart(sourceFile) === currentItem.pos) { + lineAdded = true; + } + } + if (lineAdded !== undefined) { + dynamicIndentation.recomputeIndentation(lineAdded); + } + trimTrailingWhitespaces = (rule.Operation.Action & (4 /* NewLine */ | 2 /* Space */)) && rule.Flag !== 1 /* CanDeleteNewLines */; + } + else { + trimTrailingWhitespaces = true; + } + if (currentStartLine !== previousStartLine && trimTrailingWhitespaces) { + trimTrailingWhitespacesForLines(previousStartLine, currentStartLine, previousItem); + } + return lineAdded; + } + function insertIndentation(pos, indentation, lineAdded) { + var indentationString = formatting.getIndentationString(indentation, options); + if (lineAdded) { + recordReplace(pos, 0, indentationString); + } + else { + var tokenStart = sourceFile.getLineAndCharacterFromPosition(pos); + if (indentation !== tokenStart.character - 1) { + var startLinePosition = ts.getStartPositionOfLine(tokenStart.line, sourceFile); + recordReplace(startLinePosition, tokenStart.character - 1, indentationString); + } + } + } + function indentMultilineComment(commentRange, indentation, firstLineIsIndented) { + var startLine = sourceFile.getLineAndCharacterFromPosition(commentRange.pos).line; + var endLine = sourceFile.getLineAndCharacterFromPosition(commentRange.end).line; + if (startLine === endLine) { + if (!firstLineIsIndented) { + insertIndentation(commentRange.pos, indentation, false); + } + return; + } + else { + var parts = []; + var startPos = commentRange.pos; + for (var line = startLine; line < endLine; ++line) { + var endOfLine = ts.getEndLinePosition(line, sourceFile); + parts.push({ pos: startPos, end: endOfLine }); + startPos = ts.getStartPositionOfLine(line + 1, sourceFile); + } + parts.push({ pos: startPos, end: commentRange.end }); + } + var startLinePos = ts.getStartPositionOfLine(startLine, sourceFile); + var nonWhitespaceColumnInFirstPart = formatting.SmartIndenter.findFirstNonWhitespaceColumn(startLinePos, parts[0].pos, sourceFile, options); + if (indentation === nonWhitespaceColumnInFirstPart) { + return; + } + var startIndex = 0; + if (firstLineIsIndented) { + startIndex = 1; + startLine++; + } + var delta = indentation - nonWhitespaceColumnInFirstPart; + for (var i = startIndex, len = parts.length; i < len; ++i, ++startLine) { + var startLinePos = ts.getStartPositionOfLine(startLine, sourceFile); + var nonWhitespaceColumn = i === 0 ? nonWhitespaceColumnInFirstPart : formatting.SmartIndenter.findFirstNonWhitespaceColumn(parts[i].pos, parts[i].end, sourceFile, options); + var newIndentation = nonWhitespaceColumn + delta; + if (newIndentation > 0) { + var indentationString = formatting.getIndentationString(newIndentation, options); + recordReplace(startLinePos, nonWhitespaceColumn, indentationString); + } + else { + recordDelete(startLinePos, nonWhitespaceColumn); + } + } + } + function trimTrailingWhitespacesForLines(line1, line2, range) { + for (var line = line1; line < line2; ++line) { + var lineStartPosition = ts.getStartPositionOfLine(line, sourceFile); + var lineEndPosition = ts.getEndLinePosition(line, sourceFile); + if (range && ts.isComment(range.kind) && range.pos <= lineEndPosition && range.end > lineEndPosition) { + continue; + } + var pos = lineEndPosition; + while (pos >= lineStartPosition && ts.isWhiteSpace(sourceFile.text.charCodeAt(pos))) { + pos--; + } + if (pos !== lineEndPosition) { + ts.Debug.assert(pos === lineStartPosition || !ts.isWhiteSpace(sourceFile.text.charCodeAt(pos))); + recordDelete(pos + 1, lineEndPosition - pos); + } + } + } + function newTextChange(start, len, newText) { + return { span: new ts.TextSpan(start, len), newText: newText }; + } + function recordDelete(start, len) { + if (len) { + edits.push(newTextChange(start, len, "")); + } + } + function recordReplace(start, len, newText) { + if (len || newText) { + edits.push(newTextChange(start, len, newText)); + } + } + function applyRuleEdits(rule, previousRange, previousStartLine, currentRange, currentStartLine) { + var between; + switch (rule.Operation.Action) { + case 1 /* Ignore */: + return; + case 8 /* Delete */: + if (previousRange.end !== currentRange.pos) { + recordDelete(previousRange.end, currentRange.pos - previousRange.end); + } + break; + case 4 /* NewLine */: + if (rule.Flag !== 1 /* CanDeleteNewLines */ && previousStartLine !== currentStartLine) { + return; + } + var lineDelta = currentStartLine - previousStartLine; + if (lineDelta !== 1) { + recordReplace(previousRange.end, currentRange.pos - previousRange.end, options.NewLineCharacter); + } + break; + case 2 /* Space */: + if (rule.Flag !== 1 /* CanDeleteNewLines */ && previousStartLine !== currentStartLine) { + return; + } + var posDelta = currentRange.pos - previousRange.end; + if (posDelta !== 1 || sourceFile.text.charCodeAt(previousRange.end) !== 32 /* space */) { + recordReplace(previousRange.end, currentRange.pos - previousRange.end, " "); + } + break; + } + } + } + function isSomeBlock(kind) { + switch (kind) { + case 161 /* Block */: + case 186 /* FunctionBlock */: + case 180 /* TryBlock */: + case 181 /* CatchBlock */: + case 182 /* FinallyBlock */: + case 192 /* ModuleBlock */: + return true; + } + return false; + } + function getOpenTokenForList(node, list) { + switch (node.kind) { + case 126 /* Constructor */: + case 185 /* FunctionDeclaration */: + case 152 /* FunctionExpression */: + case 125 /* Method */: + case 153 /* ArrowFunction */: + if (node.typeParameters === list) { + return 23 /* LessThanToken */; + } + else if (node.parameters === list) { + return 15 /* OpenParenToken */; + } + break; + case 147 /* CallExpression */: + case 148 /* NewExpression */: + if (node.typeArguments === list) { + return 23 /* LessThanToken */; + } + else if (node.arguments === list) { + return 15 /* OpenParenToken */; + } + break; + case 132 /* TypeReference */: + if (node.typeArguments === list) { + return 23 /* LessThanToken */; + } + } + return 0 /* Unknown */; + } + function getCloseTokenForOpenToken(kind) { + switch (kind) { + case 15 /* OpenParenToken */: + return 16 /* CloseParenToken */; + case 23 /* LessThanToken */: + return 24 /* GreaterThanToken */; + } + return 0 /* Unknown */; + } + })(formatting = ts.formatting || (ts.formatting = {})); +})(ts || (ts = {})); +var ts; +(function (ts) { + var ScriptSnapshot; + (function (ScriptSnapshot) { + var StringScriptSnapshot = (function () { + function StringScriptSnapshot(text) { + this.text = text; + this._lineStartPositions = undefined; + } + StringScriptSnapshot.prototype.getText = function (start, end) { + return this.text.substring(start, end); + }; + StringScriptSnapshot.prototype.getLength = function () { + return this.text.length; + }; + StringScriptSnapshot.prototype.getLineStartPositions = function () { + if (!this._lineStartPositions) { + this._lineStartPositions = ts.computeLineStarts(this.text); + } + return this._lineStartPositions; + }; + StringScriptSnapshot.prototype.getChangeRange = function (oldSnapshot) { + throw new Error("not yet implemented"); + }; + return StringScriptSnapshot; + })(); + function fromString(text) { + return new StringScriptSnapshot(text); + } + ScriptSnapshot.fromString = fromString; + })(ScriptSnapshot = ts.ScriptSnapshot || (ts.ScriptSnapshot = {})); var scanner = ts.createScanner(2 /* Latest */, true); var emptyArray = []; function createNode(kind, pos, end, flags, parent) { @@ -31217,13 +19159,13 @@ var ts; while (pos < end) { var token = scanner.scan(); var textPos = scanner.getTextPos(); - var node = nodes.push(createNode(token, pos, textPos, 512 /* Synthetic */, this)); + nodes.push(createNode(token, pos, textPos, 512 /* Synthetic */, this)); pos = textPos; } return pos; }; NodeObject.prototype.createSyntaxList = function (nodes) { - var list = createNode(195 /* SyntaxList */, nodes.pos, nodes.end, 512 /* Synthetic */, this); + var list = createNode(198 /* SyntaxList */, nodes.pos, nodes.end, 512 /* Synthetic */, this); list._children = []; var pos = nodes.pos; for (var i = 0, len = nodes.length; i < len; i++) { @@ -31349,13 +19291,13 @@ var ts; } }); } - if (declaration.kind === 188 /* ModuleDeclaration */ && declaration.body.kind === 188 /* ModuleDeclaration */) { + if (declaration.kind === 191 /* ModuleDeclaration */ && declaration.body.kind === 191 /* ModuleDeclaration */) { return; } - while (declaration.kind === 188 /* ModuleDeclaration */ && declaration.parent.kind === 188 /* ModuleDeclaration */) { + while (declaration.kind === 191 /* ModuleDeclaration */ && declaration.parent.kind === 191 /* ModuleDeclaration */) { declaration = declaration.parent; } - ts.forEach(getJsDocCommentTextRange(declaration.kind === 181 /* VariableDeclaration */ ? declaration.parent : declaration, sourceFileOfDeclaration), function (jsDocCommentTextRange) { + ts.forEach(getJsDocCommentTextRange(declaration.kind === 184 /* VariableDeclaration */ ? declaration.parent : declaration, sourceFileOfDeclaration), function (jsDocCommentTextRange) { var cleanedJsDocComment = getCleanedJsDocComment(jsDocCommentTextRange.pos, jsDocCommentTextRange.end, sourceFileOfDeclaration); if (cleanedJsDocComment) { jsDocCommentParts.push.apply(jsDocCommentParts, cleanedJsDocComment); @@ -31390,14 +19332,20 @@ var ts; return pos; } function isName(pos, end, sourceFile, name) { - return pos + name.length < end && sourceFile.text.substr(pos, name.length) === name && ts.isWhiteSpace(sourceFile.text.charCodeAt(pos + name.length)); + return pos + name.length < end && sourceFile.text.substr(pos, name.length) === name && (ts.isWhiteSpace(sourceFile.text.charCodeAt(pos + name.length)) || ts.isLineBreak(sourceFile.text.charCodeAt(pos + name.length))); } function isParamTag(pos, end, sourceFile) { return isName(pos, end, sourceFile, paramTag); } + function pushDocCommentLineText(docComments, text, blankLineCount) { + while (blankLineCount--) + docComments.push(textPart("")); + docComments.push(textPart(text)); + } function getCleanedJsDocComment(pos, end, sourceFile) { var spacesToRemoveAfterAsterisk; var docComments = []; + var blankLineCount = 0; var isInParamTag = false; while (pos < end) { var docCommentTextOfLine = ""; @@ -31431,7 +19379,11 @@ var ts; } pos = consumeLineBreaks(pos, end, sourceFile); if (docCommentTextOfLine) { - docComments.push(textPart(docCommentTextOfLine)); + pushDocCommentLineText(docComments, docCommentTextOfLine, blankLineCount); + blankLineCount = 0; + } + else if (!isInParamTag && docComments.length) { + blankLineCount++; } } return docComments; @@ -31441,6 +19393,8 @@ var ts; var paramDocComments = []; while (pos < end) { if (isParamTag(pos, end, sourceFile)) { + var blankLineCount = 0; + var recordedParamTag = false; pos = consumeWhiteSpaces(pos + paramTag.length); if (pos >= end) { break; @@ -31483,8 +19437,13 @@ var ts; var ch = sourceFile.text.charCodeAt(pos); if (ts.isLineBreak(ch)) { if (paramHelpString) { - paramDocComments.push(textPart(paramHelpString)); + pushDocCommentLineText(paramDocComments, paramHelpString, blankLineCount); paramHelpString = ""; + blankLineCount = 0; + recordedParamTag = true; + } + else if (recordedParamTag) { + blankLineCount++; } setPosForParamHelpStringOnNextLine(firstLineParamHelpStringPos); continue; @@ -31496,7 +19455,7 @@ var ts; pos++; } if (paramHelpString) { - paramDocComments.push(textPart(paramHelpString)); + pushDocCommentLineText(paramDocComments, paramHelpString, blankLineCount); } paramHelpStringMargin = undefined; } @@ -31589,13 +19548,12 @@ var ts; }; SignatureObject.prototype.getDocumentationComment = function () { if (this.documentationComment === undefined) { - this.documentationComment = this.declaration ? getJsDocCommentsFromDeclarations([this.declaration], this.declaration.name ? this.declaration.name.text : "", false) : []; + this.documentationComment = this.declaration ? getJsDocCommentsFromDeclarations([this.declaration], undefined, false) : []; } return this.documentationComment; }; return SignatureObject; })(); - var incrementalParse = TypeScript.IncrementalParser.parse; var SourceFileObject = (function (_super) { __extends(SourceFileObject, _super); function SourceFileObject() { @@ -31607,6 +19565,9 @@ var ts; SourceFileObject.prototype.getPositionFromLineAndCharacter = function (line, character) { return -1; }; + SourceFileObject.prototype.getLineStarts = function () { + return undefined; + }; SourceFileObject.prototype.getScriptSnapshot = function () { return this.scriptSnapshot; }; @@ -31616,7 +19577,7 @@ var ts; var namedDeclarations = []; ts.forEachChild(sourceFile, function visit(node) { switch (node.kind) { - case 182 /* FunctionDeclaration */: + case 185 /* FunctionDeclaration */: case 125 /* Method */: var functionDeclaration = node; if (functionDeclaration.name && functionDeclaration.name.kind !== 120 /* Missing */) { @@ -31632,30 +19593,30 @@ var ts; ts.forEachChild(node, visit); } break; - case 184 /* ClassDeclaration */: - case 185 /* InterfaceDeclaration */: - case 186 /* TypeAliasDeclaration */: - case 187 /* EnumDeclaration */: - case 188 /* ModuleDeclaration */: - case 190 /* ImportDeclaration */: + case 187 /* ClassDeclaration */: + case 188 /* InterfaceDeclaration */: + case 189 /* TypeAliasDeclaration */: + case 190 /* EnumDeclaration */: + case 191 /* ModuleDeclaration */: + case 193 /* ImportDeclaration */: case 127 /* GetAccessor */: case 128 /* SetAccessor */: - case 134 /* TypeLiteral */: + case 136 /* TypeLiteral */: if (node.name) { namedDeclarations.push(node); } case 126 /* Constructor */: - case 159 /* VariableStatement */: - case 189 /* ModuleBlock */: - case 183 /* FunctionBlock */: + case 162 /* VariableStatement */: + case 192 /* ModuleBlock */: + case 186 /* FunctionBlock */: ts.forEachChild(node, visit); break; case 123 /* Parameter */: if (!(node.flags & 112 /* AccessibilityModifier */)) { break; } - case 181 /* VariableDeclaration */: - case 192 /* EnumMember */: + case 184 /* VariableDeclaration */: + case 195 /* EnumMember */: case 124 /* Property */: namedDeclarations.push(node); break; @@ -31665,21 +19626,18 @@ var ts; } return this.namedDeclarations; }; - SourceFileObject.prototype.isDeclareFile = function () { - return TypeScript.isDTSFile(this.filename); - }; SourceFileObject.prototype.update = function (scriptSnapshot, version, isOpen, textChangeRange) { if (textChangeRange && ts.Debug.shouldAssert(1 /* Normal */)) { var oldText = this.scriptSnapshot; var newText = scriptSnapshot; - TypeScript.Debug.assert((oldText.getLength() - textChangeRange.span().length() + textChangeRange.newLength()) === newText.getLength()); + ts.Debug.assert((oldText.getLength() - textChangeRange.span().length() + textChangeRange.newLength()) === newText.getLength()); if (ts.Debug.shouldAssert(3 /* VeryAggressive */)) { var oldTextPrefix = oldText.getText(0, textChangeRange.span().start()); var newTextPrefix = newText.getText(0, textChangeRange.span().start()); - TypeScript.Debug.assert(oldTextPrefix === newTextPrefix); + ts.Debug.assert(oldTextPrefix === newTextPrefix); var oldTextSuffix = oldText.getText(textChangeRange.span().end(), oldText.getLength()); var newTextSuffix = newText.getText(textChangeRange.newSpan().end(), newText.getLength()); - TypeScript.Debug.assert(oldTextSuffix === newTextSuffix); + ts.Debug.assert(oldTextSuffix === newTextSuffix); } } return SourceFileObject.createSourceFileObject(this.filename, scriptSnapshot, this.languageVersion, version, isOpen); @@ -31901,14 +19859,14 @@ var ts; return false; } return ts.forEach(symbol.declarations, function (declaration) { - if (declaration.kind === 149 /* FunctionExpression */) { + if (declaration.kind === 152 /* FunctionExpression */) { return true; } - if (declaration.kind !== 181 /* VariableDeclaration */ && declaration.kind !== 182 /* FunctionDeclaration */) { + if (declaration.kind !== 184 /* VariableDeclaration */ && declaration.kind !== 185 /* FunctionDeclaration */) { return false; } - for (var parent = declaration.parent; parent.kind !== 183 /* FunctionBlock */; parent = parent.parent) { - if (parent.kind === 193 /* SourceFile */ || parent.kind === 189 /* ModuleBlock */) { + for (var parent = declaration.parent; parent.kind !== 186 /* FunctionBlock */; parent = parent.parent) { + if (parent.kind === 196 /* SourceFile */ || parent.kind === 192 /* ModuleBlock */) { return false; } } @@ -32027,7 +19985,7 @@ var ts; var filenames = host.getScriptFileNames(); for (var i = 0, n = filenames.length; i < n; i++) { var filename = filenames[i]; - this.filenameToEntry[TypeScript.switchToForwardSlashes(filename)] = { + this.filenameToEntry[ts.normalizeSlashes(filename)] = { filename: filename, version: host.getScriptVersion(filename), isOpen: host.getScriptIsOpen(filename) @@ -32039,7 +19997,7 @@ var ts; return this._compilationSettings; }; HostCache.prototype.getEntry = function (filename) { - filename = TypeScript.switchToForwardSlashes(filename); + filename = ts.normalizeSlashes(filename); return ts.lookUp(this.filenameToEntry, filename); }; HostCache.prototype.contains = function (filename) { @@ -32077,7 +20035,7 @@ var ts; HostCache.prototype.getChangeRange = function (filename, lastKnownVersion, oldScriptSnapshot) { var currentVersion = this.getVersion(filename); if (lastKnownVersion === currentVersion) { - return TypeScript.TextChangeRange.unchanged; + return ts.TextChangeRange.unchanged; } var scriptSnapshot = this.getScriptSnapshot(filename); return scriptSnapshot.getChangeRange(oldScriptSnapshot); @@ -32090,23 +20048,17 @@ var ts; this.currentFilename = ""; this.currentFileVersion = null; this.currentSourceFile = null; - this.currentFileSyntaxTree = null; this.hostCache = new HostCache(host); } SyntaxTreeCache.prototype.initialize = function (filename) { - ts.Debug.assert(!!this.currentFileSyntaxTree === !!this.currentSourceFile); var start = new Date().getTime(); this.hostCache = new HostCache(this.host); this.host.log("SyntaxTreeCache.Initialize: new HostCache: " + (new Date().getTime() - start)); var version = this.hostCache.getVersion(filename); - var syntaxTree = null; var sourceFile; - if (this.currentFileSyntaxTree === null || this.currentFilename !== filename) { + if (this.currentFilename !== filename) { var scriptSnapshot = this.hostCache.getScriptSnapshot(filename); var start = new Date().getTime(); - syntaxTree = this.createSyntaxTree(filename, scriptSnapshot); - this.host.log("SyntaxTreeCache.Initialize: createSyntaxTree: " + (new Date().getTime() - start)); - var start = new Date().getTime(); sourceFile = createSourceFileFromScriptSnapshot(filename, scriptSnapshot, getDefaultCompilerOptions(), version, true); this.host.log("SyntaxTreeCache.Initialize: createSourceFile: " + (new Date().getTime() - start)); var start = new Date().getTime(); @@ -32115,9 +20067,6 @@ var ts; } else if (this.currentFileVersion !== version) { var scriptSnapshot = this.hostCache.getScriptSnapshot(filename); - var start = new Date().getTime(); - syntaxTree = this.updateSyntaxTree(filename, scriptSnapshot, this.currentSourceFile.getScriptSnapshot(), this.currentFileSyntaxTree, this.currentFileVersion); - this.host.log("SyntaxTreeCache.Initialize: updateSyntaxTree: " + (new Date().getTime() - start)); var editRange = this.hostCache.getChangeRange(filename, this.currentFileVersion, this.currentSourceFile.getScriptSnapshot()); var start = new Date().getTime(); sourceFile = !editRange ? createSourceFileFromScriptSnapshot(filename, scriptSnapshot, getDefaultCompilerOptions(), version, true) : this.currentSourceFile.update(scriptSnapshot, version, true, editRange); @@ -32126,11 +20075,9 @@ var ts; fixupParentReferences(sourceFile); this.host.log("SyntaxTreeCache.Initialize: fixupParentRefs : " + (new Date().getTime() - start)); } - if (syntaxTree !== null) { - ts.Debug.assert(sourceFile !== undefined); + if (sourceFile) { this.currentFileVersion = version; this.currentFilename = filename; - this.currentFileSyntaxTree = syntaxTree; this.currentSourceFile = sourceFile; } function fixupParentReferences(sourceFile) { @@ -32145,61 +20092,13 @@ var ts; ts.forEachChild(sourceFile, walk); } }; - SyntaxTreeCache.prototype.getCurrentFileSyntaxTree = function (filename) { - this.initialize(filename); - return this.currentFileSyntaxTree; - }; SyntaxTreeCache.prototype.getCurrentSourceFile = function (filename) { this.initialize(filename); return this.currentSourceFile; }; SyntaxTreeCache.prototype.getCurrentScriptSnapshot = function (filename) { - this.getCurrentFileSyntaxTree(filename); return this.getCurrentSourceFile(filename).getScriptSnapshot(); }; - SyntaxTreeCache.prototype.createSyntaxTree = function (filename, scriptSnapshot) { - var text = TypeScript.SimpleText.fromScriptSnapshot(scriptSnapshot); - var syntaxTree = TypeScript.Parser.parse(filename, text, getDefaultCompilerOptions().target, TypeScript.isDTSFile(filename)); - return syntaxTree; - }; - SyntaxTreeCache.prototype.updateSyntaxTree = function (filename, scriptSnapshot, previousScriptSnapshot, previousSyntaxTree, previousFileVersion) { - var editRange = this.hostCache.getChangeRange(filename, previousFileVersion, previousScriptSnapshot); - if (editRange === null) { - return this.createSyntaxTree(filename, scriptSnapshot); - } - var nextSyntaxTree = TypeScript.IncrementalParser.parse(previousSyntaxTree, editRange, TypeScript.SimpleText.fromScriptSnapshot(scriptSnapshot)); - this.ensureInvariants(filename, editRange, nextSyntaxTree, previousScriptSnapshot, scriptSnapshot); - return nextSyntaxTree; - }; - SyntaxTreeCache.prototype.ensureInvariants = function (filename, editRange, incrementalTree, oldScriptSnapshot, newScriptSnapshot) { - var expectedNewLength = oldScriptSnapshot.getLength() - editRange.span().length() + editRange.newLength(); - var actualNewLength = newScriptSnapshot.getLength(); - function provideMoreDebugInfo() { - var debugInformation = ["expected length:", expectedNewLength, "and actual length:", actualNewLength, "are not equal\r\n"]; - var oldSpan = editRange.span(); - function prettyPrintString(s) { - return '"' + s.replace(/\r/g, '\\r').replace(/\n/g, '\\n') + '"'; - } - debugInformation.push('Edit range (old text) (start: ' + oldSpan.start() + ', end: ' + oldSpan.end() + ') \r\n'); - debugInformation.push('Old text edit range contents: ' + prettyPrintString(oldScriptSnapshot.getText(oldSpan.start(), oldSpan.end()))); - var newSpan = editRange.newSpan(); - debugInformation.push('Edit range (new text) (start: ' + newSpan.start() + ', end: ' + newSpan.end() + ') \r\n'); - debugInformation.push('New text edit range contents: ' + prettyPrintString(newScriptSnapshot.getText(newSpan.start(), newSpan.end()))); - return debugInformation.join(' '); - } - ts.Debug.assert(expectedNewLength === actualNewLength, "Expected length is different from actual!", provideMoreDebugInfo); - if (ts.Debug.shouldAssert(3 /* VeryAggressive */)) { - var oldPrefixText = oldScriptSnapshot.getText(0, editRange.span().start()); - var newPrefixText = newScriptSnapshot.getText(0, editRange.span().start()); - ts.Debug.assert(oldPrefixText === newPrefixText, 'Expected equal prefix texts!'); - var oldSuffixText = oldScriptSnapshot.getText(editRange.span().end(), oldScriptSnapshot.getLength()); - var newSuffixText = newScriptSnapshot.getText(editRange.newSpan().end(), newScriptSnapshot.getLength()); - ts.Debug.assert(oldSuffixText === newSuffixText, 'Expected equal suffix texts!'); - var incrementalTreeText = TypeScript.fullText(incrementalTree.sourceUnit()); - var actualSnapshotText = newScriptSnapshot.getText(0, newScriptSnapshot.getLength()); - ts.Debug.assert(incrementalTreeText === actualSnapshotText, 'Expected full texts to be equal'); - } - }; return SyntaxTreeCache; })(); function createSourceFileFromScriptSnapshot(filename, scriptSnapshot, settings, version, isOpen) { @@ -32281,6 +20180,64 @@ var ts; }; } ts.createDocumentRegistry = createDocumentRegistry; + function preProcessFile(sourceText, readImportFiles) { + if (readImportFiles === void 0) { readImportFiles = true; } + var referencedFiles = []; + var importedFiles = []; + var isNoDefaultLib = false; + function processTripleSlashDirectives() { + var commentRanges = ts.getLeadingCommentRanges(sourceText, 0); + ts.forEach(commentRanges, function (commentRange) { + var comment = sourceText.substring(commentRange.pos, commentRange.end); + var referencePathMatchResult = ts.getFileReferenceFromReferencePath(comment, commentRange); + if (referencePathMatchResult) { + isNoDefaultLib = referencePathMatchResult.isNoDefaultLib; + var fileReference = referencePathMatchResult.fileReference; + if (fileReference) { + referencedFiles.push(fileReference); + } + } + }); + } + function processImport() { + scanner.setText(sourceText); + var token = scanner.scan(); + while (token !== 1 /* EndOfFileToken */) { + if (token === 83 /* ImportKeyword */) { + token = scanner.scan(); + if (token === 63 /* Identifier */) { + token = scanner.scan(); + if (token === 51 /* EqualsToken */) { + token = scanner.scan(); + if (token === 115 /* RequireKeyword */) { + token = scanner.scan(); + if (token === 15 /* OpenParenToken */) { + token = scanner.scan(); + if (token === 7 /* StringLiteral */) { + var importPath = scanner.getTokenValue(); + var pos = scanner.getTokenPos(); + importedFiles.push({ + filename: importPath, + pos: pos, + end: pos + importPath.length + }); + } + } + } + } + } + } + token = scanner.scan(); + } + scanner.setText(undefined); + } + if (readImportFiles) { + processImport(); + } + processTripleSlashDirectives(); + return { referencedFiles: referencedFiles, importedFiles: importedFiles, isLibFile: isNoDefaultLib }; + } + ts.preProcessFile = preProcessFile; function getNodeModifiers(node) { var flags = node.flags; var result = []; @@ -32301,7 +20258,7 @@ var ts; ts.getNodeModifiers = getNodeModifiers; function getTargetLabel(referenceNode, labelName) { while (referenceNode) { - if (referenceNode.kind === 174 /* LabeledStatement */ && referenceNode.label.text === labelName) { + if (referenceNode.kind === 177 /* LabeledStatement */ && referenceNode.label.text === labelName) { return referenceNode.label; } referenceNode = referenceNode.parent; @@ -32309,13 +20266,13 @@ var ts; return undefined; } function isJumpStatementTarget(node) { - return node.kind === 63 /* Identifier */ && (node.parent.kind === 168 /* BreakStatement */ || node.parent.kind === 167 /* ContinueStatement */) && node.parent.label === node; + return node.kind === 63 /* Identifier */ && (node.parent.kind === 171 /* BreakStatement */ || node.parent.kind === 170 /* ContinueStatement */) && node.parent.label === node; } function isLabelOfLabeledStatement(node) { - return node.kind === 63 /* Identifier */ && node.parent.kind === 174 /* LabeledStatement */ && node.parent.label === node; + return node.kind === 63 /* Identifier */ && node.parent.kind === 177 /* LabeledStatement */ && node.parent.label === node; } function isLabeledBy(node, labelName) { - for (var owner = node.parent; owner.kind === 174 /* LabeledStatement */; owner = owner.parent) { + for (var owner = node.parent; owner.kind === 177 /* LabeledStatement */; owner = owner.parent) { if (owner.label.text === labelName) { return true; } @@ -32329,48 +20286,48 @@ var ts; return node.parent.kind === 121 /* QualifiedName */ && node.parent.right === node; } function isRightSideOfPropertyAccess(node) { - return node && node.parent && node.parent.kind === 142 /* PropertyAccess */ && node.parent.right === node; + return node && node.parent && node.parent.kind === 145 /* PropertyAccess */ && node.parent.right === node; } function isCallExpressionTarget(node) { if (isRightSideOfPropertyAccess(node)) { node = node.parent; } - return node && node.parent && node.parent.kind === 144 /* CallExpression */ && node.parent.func === node; + return node && node.parent && node.parent.kind === 147 /* CallExpression */ && node.parent.func === node; } function isNewExpressionTarget(node) { if (isRightSideOfPropertyAccess(node)) { node = node.parent; } - return node && node.parent && node.parent.kind === 145 /* NewExpression */ && node.parent.func === node; + return node && node.parent && node.parent.kind === 148 /* NewExpression */ && node.parent.func === node; } function isNameOfModuleDeclaration(node) { - return node.parent.kind === 188 /* ModuleDeclaration */ && node.parent.name === node; + return node.parent.kind === 191 /* ModuleDeclaration */ && node.parent.name === node; } function isNameOfFunctionDeclaration(node) { return node.kind === 63 /* Identifier */ && ts.isAnyFunction(node.parent) && node.parent.name === node; } function isNameOfPropertyAssignment(node) { - return (node.kind === 63 /* Identifier */ || node.kind === 7 /* StringLiteral */ || node.kind === 6 /* NumericLiteral */) && node.parent.kind === 141 /* PropertyAssignment */ && node.parent.name === node; + return (node.kind === 63 /* Identifier */ || node.kind === 7 /* StringLiteral */ || node.kind === 6 /* NumericLiteral */) && (node.parent.kind === 143 /* PropertyAssignment */ || node.parent.kind === 144 /* ShorthandPropertyAssignment */) && node.parent.name === node; } function isLiteralNameOfPropertyDeclarationOrIndexAccess(node) { if (node.kind === 7 /* StringLiteral */ || node.kind === 6 /* NumericLiteral */) { switch (node.parent.kind) { case 124 /* Property */: - case 141 /* PropertyAssignment */: - case 192 /* EnumMember */: + case 143 /* PropertyAssignment */: + case 195 /* EnumMember */: case 125 /* Method */: case 127 /* GetAccessor */: case 128 /* SetAccessor */: - case 188 /* ModuleDeclaration */: + case 191 /* ModuleDeclaration */: return node.parent.name === node; - case 143 /* IndexedAccess */: + case 146 /* IndexedAccess */: return node.parent.index === node; } } return false; } function isNameOfExternalModuleImportOrDeclaration(node) { - return node.kind === 7 /* StringLiteral */ && (isNameOfModuleDeclaration(node) || (node.parent.kind === 190 /* ImportDeclaration */ && node.parent.externalModuleName === node)); + return node.kind === 7 /* StringLiteral */ && (isNameOfModuleDeclaration(node) || (node.parent.kind === 193 /* ImportDeclaration */ && node.parent.externalModuleName === node)); } function isInsideComment(sourceFile, token, position) { return position <= token.getStart(sourceFile) && (isInsideCommentRange(ts.getTrailingCommentRanges(sourceFile.text, token.getFullStart())) || isInsideCommentRange(ts.getLeadingCommentRanges(sourceFile.text, token.getFullStart()))); @@ -32403,7 +20360,7 @@ var ts; } function createLanguageService(host, documentRegistry) { var syntaxTreeCache = new SyntaxTreeCache(host); - var formattingRulesProvider; + var ruleProvider; var hostCache; var program; var typeInfoResolver; @@ -32423,6 +20380,13 @@ var ts; function getFullTypeCheckChecker() { return fullTypeCheckChecker_doNotAccessDirectly || (fullTypeCheckChecker_doNotAccessDirectly = program.getTypeChecker(true)); } + function getRuleProvider(options) { + if (!ruleProvider) { + ruleProvider = new ts.formatting.RulesProvider(host); + } + ruleProvider.ensureUpToDate(options); + return ruleProvider; + } function createCompilerHost() { return { getSourceFile: function (filename, languageVersion) { @@ -32524,12 +20488,12 @@ var ts; } function getSyntacticDiagnostics(filename) { synchronizeHostData(); - filename = TypeScript.switchToForwardSlashes(filename); + filename = ts.normalizeSlashes(filename); return program.getDiagnostics(getSourceFile(filename).getSourceFile()); } function getSemanticDiagnostics(filename) { synchronizeHostData(); - filename = TypeScript.switchToForwardSlashes(filename); + filename = ts.normalizeSlashes(filename); var compilerOptions = program.getCompilerOptions(); var checker = getFullTypeCheckChecker(); var targetSourceFile = getSourceFile(filename); @@ -32538,7 +20502,7 @@ var ts; var savedWriter = writer; writer = function (filename, data, writeByteOrderMark) { }; - allDiagnostics = allDiagnostics.concat(checker.emitFiles(targetSourceFile).errors); + allDiagnostics = allDiagnostics.concat(checker.invokeEmitter(targetSourceFile).diagnostics); writer = savedWriter; } return allDiagnostics; @@ -32562,25 +20526,25 @@ var ts; isValid = ts.isIdentifierPart(displayName.charCodeAt(i), target); } if (isValid) { - return displayName; + return ts.unescapeIdentifier(displayName); } } return undefined; } - function createCompletionEntry(symbol, typeChecker) { + function createCompletionEntry(symbol, typeChecker, location) { var displayName = getValidCompletionEntryDisplayName(symbol, program.getCompilerOptions().target); if (!displayName) { return undefined; } return { name: displayName, - kind: getSymbolKind(symbol, typeChecker), + kind: getSymbolKind(symbol, typeChecker, location), kindModifiers: getSymbolModifiers(symbol) }; } function getCompletionsAtPosition(filename, position, isMemberCompletion) { synchronizeHostData(); - filename = TypeScript.switchToForwardSlashes(filename); + filename = ts.normalizeSlashes(filename); var syntacticStart = new Date().getTime(); var sourceFile = getSourceFile(filename); var start = new Date().getTime(); @@ -32607,7 +20571,7 @@ var ts; } var node; var isRightOfDot; - if (previousToken && previousToken.kind === 19 /* DotToken */ && (previousToken.parent.kind === 142 /* PropertyAccess */ || previousToken.parent.kind === 121 /* QualifiedName */)) { + if (previousToken && previousToken.kind === 19 /* DotToken */ && (previousToken.parent.kind === 145 /* PropertyAccess */ || previousToken.parent.kind === 121 /* QualifiedName */)) { node = previousToken.parent.left; isRightOfDot = true; } @@ -32623,11 +20587,12 @@ var ts; typeChecker: typeInfoResolver }; host.log("getCompletionsAtPosition: Syntactic work: " + (new Date().getTime() - syntacticStart)); + var location = ts.getTouchingPropertyName(sourceFile, position); var semanticStart = new Date().getTime(); if (isRightOfDot) { var symbols = []; isMemberCompletion = true; - if (node.kind === 63 /* Identifier */ || node.kind === 121 /* QualifiedName */ || node.kind === 142 /* PropertyAccess */) { + if (node.kind === 63 /* Identifier */ || node.kind === 121 /* QualifiedName */ || node.kind === 145 /* PropertyAccess */) { var symbol = typeInfoResolver.getSymbolInfo(node); if (symbol && symbol.flags & 33554432 /* Import */) { symbol = typeInfoResolver.getAliasedSymbol(symbol); @@ -32682,18 +20647,21 @@ var ts; function getCompletionEntriesFromSymbols(symbols, session) { var start = new Date().getTime(); ts.forEach(symbols, function (symbol) { - var entry = createCompletionEntry(symbol, session.typeChecker); - if (entry && !ts.lookUp(session.symbols, entry.name)) { - session.entries.push(entry); - session.symbols[entry.name] = symbol; + var entry = createCompletionEntry(symbol, session.typeChecker, location); + if (entry) { + var id = ts.escapeIdentifier(entry.name); + if (!ts.lookUp(session.symbols, id)) { + session.entries.push(entry); + session.symbols[id] = symbol; + } } }); - host.log("getCompletionsAtPosition: getCompletionEntriesFromSymbols: " + (new Date().getTime() - semanticStart)); + host.log("getCompletionsAtPosition: getCompletionEntriesFromSymbols: " + (new Date().getTime() - start)); } function isCompletionListBlocker(previousToken) { var start = new Date().getTime(); var result = isInStringOrRegularExpressionOrTemplateLiteral(previousToken) || isIdentifierDefinitionLocation(previousToken) || isRightOfIllegalDot(previousToken); - host.log("getCompletionsAtPosition: isCompletionListBlocker: " + (new Date().getTime() - semanticStart)); + host.log("getCompletionsAtPosition: isCompletionListBlocker: " + (new Date().getTime() - start)); return result; } function isInStringOrRegularExpressionOrTemplateLiteral(previousToken) { @@ -32733,7 +20701,7 @@ var ts; switch (previousToken.kind) { case 13 /* OpenBraceToken */: case 22 /* CommaToken */: - if (parent && parent.kind === 140 /* ObjectLiteral */) { + if (parent && parent.kind === 142 /* ObjectLiteral */) { return parent; } break; @@ -32743,9 +20711,9 @@ var ts; } function isFunction(kind) { switch (kind) { - case 149 /* FunctionExpression */: - case 150 /* ArrowFunction */: - case 182 /* FunctionDeclaration */: + case 152 /* FunctionExpression */: + case 153 /* ArrowFunction */: + case 185 /* FunctionDeclaration */: case 125 /* Method */: case 126 /* Constructor */: case 127 /* GetAccessor */: @@ -32762,13 +20730,13 @@ var ts; var containingNodeKind = previousToken.parent.kind; switch (previousToken.kind) { case 22 /* CommaToken */: - return containingNodeKind === 181 /* VariableDeclaration */ || containingNodeKind === 159 /* VariableStatement */ || containingNodeKind === 187 /* EnumDeclaration */ || isFunction(containingNodeKind); + return containingNodeKind === 184 /* VariableDeclaration */ || containingNodeKind === 162 /* VariableStatement */ || containingNodeKind === 190 /* EnumDeclaration */ || isFunction(containingNodeKind); case 15 /* OpenParenToken */: - return containingNodeKind === 178 /* CatchBlock */ || isFunction(containingNodeKind); + return containingNodeKind === 181 /* CatchBlock */ || isFunction(containingNodeKind); case 13 /* OpenBraceToken */: - return containingNodeKind === 187 /* EnumDeclaration */ || containingNodeKind === 185 /* InterfaceDeclaration */; + return containingNodeKind === 190 /* EnumDeclaration */ || containingNodeKind === 188 /* InterfaceDeclaration */; case 21 /* SemicolonToken */: - return containingNodeKind === 124 /* Property */ && previousToken.parent.parent.kind === 185 /* InterfaceDeclaration */; + return containingNodeKind === 124 /* Property */ && previousToken.parent.parent.kind === 188 /* InterfaceDeclaration */; case 106 /* PublicKeyword */: case 104 /* PrivateKeyword */: case 107 /* StaticKeyword */: @@ -32782,6 +20750,7 @@ var ts; case 96 /* VarKeyword */: case 113 /* GetKeyword */: case 117 /* SetKeyword */: + case 83 /* ImportKeyword */: return true; } switch (previousToken.getText()) { @@ -32809,7 +20778,7 @@ var ts; } var existingMemberNames = {}; ts.forEach(existingMembers, function (m) { - if (m.kind !== 141 /* PropertyAssignment */) { + if (m.kind !== 143 /* PropertyAssignment */ && m.kind !== 144 /* ShorthandPropertyAssignment */) { return; } if (m.getStart() <= position && position <= m.getEnd()) { @@ -32827,18 +20796,17 @@ var ts; } } function getCompletionEntryDetails(filename, position, entryName) { - filename = TypeScript.switchToForwardSlashes(filename); + filename = ts.normalizeSlashes(filename); var sourceFile = getSourceFile(filename); var session = activeCompletionSession; if (!session || session.filename !== filename || session.position !== position) { return undefined; } - var symbol = ts.lookUp(activeCompletionSession.symbols, entryName); + var symbol = ts.lookUp(activeCompletionSession.symbols, ts.escapeIdentifier(entryName)); if (symbol) { - var type = session.typeChecker.getTypeOfSymbol(symbol); - ts.Debug.assert(type !== undefined, "Could not find type for symbol"); - var completionEntry = createCompletionEntry(symbol, session.typeChecker); var location = ts.getTouchingPropertyName(sourceFile, position); + var completionEntry = createCompletionEntry(symbol, session.typeChecker, location); + ts.Debug.assert(session.typeChecker.getNarrowedTypeOfSymbol(symbol, location) !== undefined, "Could not find type for symbol"); var displayPartsDocumentationsAndSymbolKind = getSymbolDisplayPartsDocumentationAndSymbolKind(symbol, getSourceFile(filename), location, session.typeChecker, location, 7 /* All */); return { name: entryName, @@ -32865,21 +20833,21 @@ var ts; return node; } switch (node.kind) { - case 193 /* SourceFile */: + case 196 /* SourceFile */: case 125 /* Method */: - case 182 /* FunctionDeclaration */: - case 149 /* FunctionExpression */: + case 185 /* FunctionDeclaration */: + case 152 /* FunctionExpression */: case 127 /* GetAccessor */: case 128 /* SetAccessor */: - case 184 /* ClassDeclaration */: - case 185 /* InterfaceDeclaration */: - case 187 /* EnumDeclaration */: - case 188 /* ModuleDeclaration */: + case 187 /* ClassDeclaration */: + case 188 /* InterfaceDeclaration */: + case 190 /* EnumDeclaration */: + case 191 /* ModuleDeclaration */: return node; } } } - function getSymbolKind(symbol, typeResolver) { + function getSymbolKind(symbol, typeResolver, location) { var flags = symbol.getFlags(); if (flags & 32 /* Class */) return ScriptElementKind.classElement; @@ -32891,7 +20859,7 @@ var ts; return ScriptElementKind.interfaceElement; if (flags & 1048576 /* TypeParameter */) return ScriptElementKind.typeParameterElement; - var result = getSymbolKindOfConstructorPropertyMethodAccessorFunctionOrVar(symbol, flags, typeResolver); + var result = getSymbolKindOfConstructorPropertyMethodAccessorFunctionOrVar(symbol, flags, typeResolver, location); if (result === ScriptElementKind.unknown) { if (flags & 1048576 /* TypeParameter */) return ScriptElementKind.typeParameterElement; @@ -32902,7 +20870,7 @@ var ts; } return result; } - function getSymbolKindOfConstructorPropertyMethodAccessorFunctionOrVar(symbol, flags, typeResolver) { + function getSymbolKindOfConstructorPropertyMethodAccessorFunctionOrVar(symbol, flags, typeResolver, location) { if (typeResolver.isUndefinedSymbol(symbol)) { return ScriptElementKind.variableElement; } @@ -32930,17 +20898,21 @@ var ts; return ScriptElementKind.constructorImplementationElement; if (flags & 4 /* Property */) { if (flags & 1073741824 /* UnionProperty */) { - return ts.forEach(typeInfoResolver.getRootSymbols(symbol), function (rootSymbol) { + var unionPropertyKind = ts.forEach(typeInfoResolver.getRootSymbols(symbol), function (rootSymbol) { var rootSymbolFlags = rootSymbol.getFlags(); - if (rootSymbolFlags & 4 /* Property */) { + if (rootSymbolFlags & (98308 /* PropertyOrAccessor */ | 3 /* Variable */)) { return ScriptElementKind.memberVariableElement; } - if (rootSymbolFlags & 32768 /* GetAccessor */) - return ScriptElementKind.memberVariableElement; - if (rootSymbolFlags & 65536 /* SetAccessor */) - return ScriptElementKind.memberVariableElement; - ts.Debug.assert((rootSymbolFlags & 8192 /* Method */) !== undefined); - }) || ScriptElementKind.memberFunctionElement; + ts.Debug.assert(!!(rootSymbolFlags & 8192 /* Method */)); + }); + if (!unionPropertyKind) { + var typeOfUnionProperty = typeInfoResolver.getNarrowedTypeOfSymbol(symbol, location); + if (typeOfUnionProperty.getCallSignatures().length) { + return ScriptElementKind.memberFunctionElement; + } + return ScriptElementKind.memberVariableElement; + } + return unionPropertyKind; } return ScriptElementKind.memberVariableElement; } @@ -32964,13 +20936,13 @@ var ts; } function getNodeKind(node) { switch (node.kind) { - case 188 /* ModuleDeclaration */: return ScriptElementKind.moduleElement; - case 184 /* ClassDeclaration */: return ScriptElementKind.classElement; - case 185 /* InterfaceDeclaration */: return ScriptElementKind.interfaceElement; - case 186 /* TypeAliasDeclaration */: return ScriptElementKind.typeElement; - case 187 /* EnumDeclaration */: return ScriptElementKind.enumElement; - case 181 /* VariableDeclaration */: return node.flags & 4096 /* Const */ ? ScriptElementKind.constantElement : ScriptElementKind.variableElement; - case 182 /* FunctionDeclaration */: return ScriptElementKind.functionElement; + case 191 /* ModuleDeclaration */: return ScriptElementKind.moduleElement; + case 187 /* ClassDeclaration */: return ScriptElementKind.classElement; + case 188 /* InterfaceDeclaration */: return ScriptElementKind.interfaceElement; + case 189 /* TypeAliasDeclaration */: return ScriptElementKind.typeElement; + case 190 /* EnumDeclaration */: return ScriptElementKind.enumElement; + case 184 /* VariableDeclaration */: return node.flags & 4096 /* Const */ ? ScriptElementKind.constantElement : ScriptElementKind.variableElement; + case 185 /* FunctionDeclaration */: return ScriptElementKind.functionElement; case 127 /* GetAccessor */: return ScriptElementKind.memberGetAccessorElement; case 128 /* SetAccessor */: return ScriptElementKind.memberSetAccessorElement; case 125 /* Method */: return ScriptElementKind.memberFunctionElement; @@ -32980,7 +20952,7 @@ var ts; case 129 /* CallSignature */: return ScriptElementKind.callSignatureElement; case 126 /* Constructor */: return ScriptElementKind.constructorImplementationElement; case 122 /* TypeParameter */: return ScriptElementKind.typeParameterElement; - case 192 /* EnumMember */: return ScriptElementKind.variableElement; + case 195 /* EnumMember */: return ScriptElementKind.variableElement; case 123 /* Parameter */: return (node.flags & 112 /* AccessibilityModifier */) ? ScriptElementKind.memberVariableElement : ScriptElementKind.parameterElement; } return ScriptElementKind.unknown; @@ -32993,22 +20965,22 @@ var ts; var displayParts = []; var documentation; var symbolFlags = symbol.flags; - var symbolKind = getSymbolKindOfConstructorPropertyMethodAccessorFunctionOrVar(symbol, symbolFlags, typeResolver); + var symbolKind = getSymbolKindOfConstructorPropertyMethodAccessorFunctionOrVar(symbol, symbolFlags, typeResolver, location); var hasAddedSymbolInfo; if (symbolKind !== ScriptElementKind.unknown || symbolFlags & 32 /* Class */ || symbolFlags & 33554432 /* Import */) { if (symbolKind === ScriptElementKind.memberGetAccessorElement || symbolKind === ScriptElementKind.memberSetAccessorElement) { symbolKind = ScriptElementKind.memberVariableElement; } - var type = typeResolver.getTypeOfSymbol(symbol); + var type = typeResolver.getNarrowedTypeOfSymbol(symbol, location); if (type) { - if (location.parent && location.parent.kind === 142 /* PropertyAccess */) { + if (location.parent && location.parent.kind === 145 /* PropertyAccess */) { var right = location.parent.right; if (right === location || (right && right.kind === 120 /* Missing */)) { location = location.parent; } } var callExpression; - if (location.kind === 144 /* CallExpression */ || location.kind === 145 /* NewExpression */) { + if (location.kind === 147 /* CallExpression */ || location.kind === 148 /* NewExpression */) { callExpression = location; } else if (isCallExpressionTarget(location) || isNewExpressionTarget(location)) { @@ -33020,7 +20992,7 @@ var ts; if (!signature && candidateSignatures.length) { signature = candidateSignatures[0]; } - var useConstructSignatures = callExpression.kind === 145 /* NewExpression */ || callExpression.func.kind === 89 /* SuperKeyword */; + var useConstructSignatures = callExpression.kind === 148 /* NewExpression */ || callExpression.func.kind === 89 /* SuperKeyword */; var allSignatures = useConstructSignatures ? type.getConstructSignatures() : type.getCallSignatures(); if (!ts.contains(allSignatures, signature.target || signature)) { signature = allSignatures.length ? allSignatures[0] : undefined; @@ -33154,7 +21126,7 @@ var ts; if (symbolFlags & 8 /* EnumMember */) { addPrefixForAnyFunctionOrVar(symbol, "enum member"); var declaration = symbol.declarations[0]; - if (declaration.kind === 192 /* EnumMember */) { + if (declaration.kind === 195 /* EnumMember */) { var constantValue = typeResolver.getEnumMemberValue(declaration); if (constantValue !== undefined) { displayParts.push(spacePart()); @@ -33169,13 +21141,13 @@ var ts; displayParts.push(keywordPart(83 /* ImportKeyword */)); displayParts.push(spacePart()); addFullSymbolName(symbol); - displayParts.push(spacePart()); - displayParts.push(punctuationPart(51 /* EqualsToken */)); - displayParts.push(spacePart()); ts.forEach(symbol.declarations, function (declaration) { - if (declaration.kind === 190 /* ImportDeclaration */) { + if (declaration.kind === 193 /* ImportDeclaration */) { var importDeclaration = declaration; if (importDeclaration.externalModuleName) { + displayParts.push(spacePart()); + displayParts.push(punctuationPart(51 /* EqualsToken */)); + displayParts.push(spacePart()); displayParts.push(keywordPart(115 /* RequireKeyword */)); displayParts.push(punctuationPart(15 /* OpenParenToken */)); displayParts.push(displayPart(ts.getTextOfNode(importDeclaration.externalModuleName), 8 /* stringLiteral */)); @@ -33183,7 +21155,12 @@ var ts; } else { var internalAliasSymbol = typeResolver.getSymbolInfo(importDeclaration.entityName); - addFullSymbolName(internalAliasSymbol, enclosingDeclaration); + if (internalAliasSymbol) { + displayParts.push(spacePart()); + displayParts.push(punctuationPart(51 /* EqualsToken */)); + displayParts.push(spacePart()); + addFullSymbolName(internalAliasSymbol, enclosingDeclaration); + } } return true; } @@ -33213,7 +21190,7 @@ var ts; } } else { - symbolKind = getSymbolKind(symbol, typeResolver); + symbolKind = getSymbolKind(symbol, typeResolver, location); } } if (!documentation) { @@ -33261,7 +21238,7 @@ var ts; } function getQuickInfoAtPosition(fileName, position) { synchronizeHostData(); - fileName = TypeScript.switchToForwardSlashes(fileName); + fileName = ts.normalizeSlashes(fileName); var sourceFile = getSourceFile(fileName); var node = ts.getTouchingPropertyName(sourceFile, position); if (!node) { @@ -33271,7 +21248,7 @@ var ts; if (!symbol) { switch (node.kind) { case 63 /* Identifier */: - case 142 /* PropertyAccess */: + case 145 /* PropertyAccess */: case 121 /* QualifiedName */: case 91 /* ThisKeyword */: case 89 /* SuperKeyword */: @@ -33280,7 +21257,7 @@ var ts; return { kind: ScriptElementKind.unknown, kindModifiers: ScriptElementKindModifier.none, - textSpan: new TypeScript.TextSpan(node.getStart(), node.getWidth()), + textSpan: new ts.TextSpan(node.getStart(), node.getWidth()), displayParts: typeToDisplayParts(typeInfoResolver, type, getContainerNode(node)), documentation: type.symbol ? type.symbol.getDocumentationComment() : undefined }; @@ -33292,7 +21269,7 @@ var ts; return { kind: displayPartsDocumentationsAndKind.symbolKind, kindModifiers: getSymbolModifiers(symbol), - textSpan: new TypeScript.TextSpan(node.getStart(), node.getWidth()), + textSpan: new ts.TextSpan(node.getStart(), node.getWidth()), displayParts: displayPartsDocumentationsAndKind.displayParts, documentation: displayPartsDocumentationsAndKind.documentation }; @@ -33301,7 +21278,7 @@ var ts; function getDefinitionInfo(node, symbolKind, symbolName, containerName) { return { fileName: node.getSourceFile().filename, - textSpan: TypeScript.TextSpan.fromBounds(node.getStart(), node.getEnd()), + textSpan: ts.TextSpan.fromBounds(node.getStart(), node.getEnd()), kind: symbolKind, name: symbolName, containerKind: undefined, @@ -33312,7 +21289,7 @@ var ts; var declarations = []; var definition; ts.forEach(signatureDeclarations, function (d) { - if ((selectConstructors && d.kind === 126 /* Constructor */) || (!selectConstructors && (d.kind === 182 /* FunctionDeclaration */ || d.kind === 125 /* Method */))) { + if ((selectConstructors && d.kind === 126 /* Constructor */) || (!selectConstructors && (d.kind === 185 /* FunctionDeclaration */ || d.kind === 125 /* Method */))) { declarations.push(d); if (d.body) definition = d; @@ -33332,7 +21309,7 @@ var ts; if (isNewExpressionTarget(location) || location.kind === 111 /* ConstructorKeyword */) { if (symbol.flags & 32 /* Class */) { var classDeclaration = symbol.getDeclarations()[0]; - ts.Debug.assert(classDeclaration && classDeclaration.kind === 184 /* ClassDeclaration */); + ts.Debug.assert(classDeclaration && classDeclaration.kind === 187 /* ClassDeclaration */); return tryAddSignature(classDeclaration.members, true, symbolKind, symbolName, containerName, result); } } @@ -33345,7 +21322,7 @@ var ts; return false; } synchronizeHostData(); - filename = TypeScript.switchToForwardSlashes(filename); + filename = ts.normalizeSlashes(filename); var sourceFile = getSourceFile(filename); var node = ts.getTouchingPropertyName(sourceFile, position); if (!node) { @@ -33363,7 +21340,7 @@ var ts; if (program.getSourceFile(targetFilename)) { return [{ fileName: targetFilename, - textSpan: TypeScript.TextSpan.fromBounds(0, 0), + textSpan: ts.TextSpan.fromBounds(0, 0), kind: ScriptElementKind.scriptElement, name: comment.filename, containerName: undefined, @@ -33377,6 +21354,17 @@ var ts; return undefined; } var result = []; + if (node.parent.kind === 144 /* ShorthandPropertyAssignment */) { + var shorthandSymbol = typeInfoResolver.getShorthandAssignmentValueSymbol(symbol.valueDeclaration); + var shorthandDeclarations = shorthandSymbol.getDeclarations(); + var shorthandSymbolKind = getSymbolKind(shorthandSymbol, typeInfoResolver); + var shorthandSymbolName = typeInfoResolver.symbolToString(shorthandSymbol); + var shorthandContainerName = typeInfoResolver.symbolToString(symbol.parent, node); + ts.forEach(shorthandDeclarations, function (declaration) { + result.push(getDefinitionInfo(declaration, shorthandSymbolKind, shorthandSymbolName, shorthandContainerName)); + }); + return result; + } var declarations = symbol.getDeclarations(); var symbolName = typeInfoResolver.symbolToString(symbol); var symbolKind = getSymbolKind(symbol, typeInfoResolver); @@ -33391,7 +21379,7 @@ var ts; } function getOccurrencesAtPosition(filename, position) { synchronizeHostData(); - filename = TypeScript.switchToForwardSlashes(filename); + filename = ts.normalizeSlashes(filename); var sourceFile = getSourceFile(filename); var node = ts.getTouchingWord(sourceFile, position); if (!node) { @@ -33403,52 +21391,52 @@ var ts; switch (node.kind) { case 82 /* IfKeyword */: case 74 /* ElseKeyword */: - if (hasKind(node.parent, 162 /* IfStatement */)) { + if (hasKind(node.parent, 165 /* IfStatement */)) { return getIfElseOccurrences(node.parent); } break; case 88 /* ReturnKeyword */: - if (hasKind(node.parent, 169 /* ReturnStatement */)) { + if (hasKind(node.parent, 172 /* ReturnStatement */)) { return getReturnOccurrences(node.parent); } break; case 92 /* ThrowKeyword */: - if (hasKind(node.parent, 175 /* ThrowStatement */)) { + if (hasKind(node.parent, 178 /* ThrowStatement */)) { return getThrowOccurrences(node.parent); } break; case 94 /* TryKeyword */: case 66 /* CatchKeyword */: case 79 /* FinallyKeyword */: - if (hasKind(parent(parent(node)), 176 /* TryStatement */)) { + if (hasKind(parent(parent(node)), 179 /* TryStatement */)) { return getTryCatchFinallyOccurrences(node.parent.parent); } break; case 90 /* SwitchKeyword */: - if (hasKind(node.parent, 171 /* SwitchStatement */)) { + if (hasKind(node.parent, 174 /* SwitchStatement */)) { return getSwitchCaseDefaultOccurrences(node.parent); } break; case 65 /* CaseKeyword */: case 71 /* DefaultKeyword */: - if (hasKind(parent(parent(node)), 171 /* SwitchStatement */)) { + if (hasKind(parent(parent(node)), 174 /* SwitchStatement */)) { return getSwitchCaseDefaultOccurrences(node.parent.parent); } break; case 64 /* BreakKeyword */: case 69 /* ContinueKeyword */: - if (hasKind(node.parent, 168 /* BreakStatement */) || hasKind(node.parent, 167 /* ContinueStatement */)) { + if (hasKind(node.parent, 171 /* BreakStatement */) || hasKind(node.parent, 170 /* ContinueStatement */)) { return getBreakOrContinueStatementOccurences(node.parent); } break; case 80 /* ForKeyword */: - if (hasKind(node.parent, 165 /* ForStatement */) || hasKind(node.parent, 166 /* ForInStatement */)) { + if (hasKind(node.parent, 168 /* ForStatement */) || hasKind(node.parent, 169 /* ForInStatement */)) { return getLoopBreakContinueOccurrences(node.parent); } break; case 98 /* WhileKeyword */: case 73 /* DoKeyword */: - if (hasKind(node.parent, 164 /* WhileStatement */) || hasKind(node.parent, 163 /* DoStatement */)) { + if (hasKind(node.parent, 167 /* WhileStatement */) || hasKind(node.parent, 166 /* DoStatement */)) { return getLoopBreakContinueOccurrences(node.parent); } break; @@ -33466,7 +21454,7 @@ var ts; return undefined; function getIfElseOccurrences(ifStatement) { var keywords = []; - while (hasKind(ifStatement.parent, 162 /* IfStatement */) && ifStatement.parent.elseStatement === ifStatement) { + while (hasKind(ifStatement.parent, 165 /* IfStatement */) && ifStatement.parent.elseStatement === ifStatement) { ifStatement = ifStatement.parent; } while (ifStatement) { @@ -33477,7 +21465,7 @@ var ts; break; } } - if (!hasKind(ifStatement.elseStatement, 162 /* IfStatement */)) { + if (!hasKind(ifStatement.elseStatement, 165 /* IfStatement */)) { break; } ifStatement = ifStatement.elseStatement; @@ -33497,7 +21485,7 @@ var ts; if (shouldHighlightNextKeyword) { result.push({ fileName: filename, - textSpan: TypeScript.TextSpan.fromBounds(elseKeyword.getStart(), ifKeyword.end), + textSpan: ts.TextSpan.fromBounds(elseKeyword.getStart(), ifKeyword.end), isWriteAccess: false }); i++; @@ -33510,7 +21498,7 @@ var ts; } function getReturnOccurrences(returnStatement) { var func = ts.getContainingFunction(returnStatement); - if (!(func && hasKind(func.body, 183 /* FunctionBlock */))) { + if (!(func && hasKind(func.body, 186 /* FunctionBlock */))) { return undefined; } var keywords = []; @@ -33531,7 +21519,7 @@ var ts; ts.forEach(aggregateOwnedThrowStatements(owner), function (throwStatement) { pushKeywordIf(keywords, throwStatement.getFirstToken(), 92 /* ThrowKeyword */); }); - if (owner.kind === 183 /* FunctionBlock */) { + if (owner.kind === 186 /* FunctionBlock */) { ts.forEachReturnStatement(owner, function (returnStatement) { pushKeywordIf(keywords, returnStatement.getFirstToken(), 88 /* ReturnKeyword */); }); @@ -33543,10 +21531,10 @@ var ts; aggregate(node); return statementAccumulator; function aggregate(node) { - if (node.kind === 175 /* ThrowStatement */) { + if (node.kind === 178 /* ThrowStatement */) { statementAccumulator.push(node); } - else if (node.kind === 176 /* TryStatement */) { + else if (node.kind === 179 /* TryStatement */) { var tryStatement = node; if (tryStatement.catchBlock) { aggregate(tryStatement.catchBlock); @@ -33568,10 +21556,10 @@ var ts; var child = throwStatement; while (child.parent) { var parent = child.parent; - if (parent.kind === 183 /* FunctionBlock */ || parent.kind === 193 /* SourceFile */) { + if (parent.kind === 186 /* FunctionBlock */ || parent.kind === 196 /* SourceFile */) { return parent; } - if (parent.kind === 176 /* TryStatement */) { + if (parent.kind === 179 /* TryStatement */) { var tryStatement = parent; if (tryStatement.tryBlock === child && tryStatement.catchBlock) { return child; @@ -33595,7 +21583,7 @@ var ts; function getLoopBreakContinueOccurrences(loopNode) { var keywords = []; if (pushKeywordIf(keywords, loopNode.getFirstToken(), 80 /* ForKeyword */, 98 /* WhileKeyword */, 73 /* DoKeyword */)) { - if (loopNode.kind === 163 /* DoStatement */) { + if (loopNode.kind === 166 /* DoStatement */) { var loopTokens = loopNode.getChildren(); for (var i = loopTokens.length - 1; i >= 0; i--) { if (pushKeywordIf(keywords, loopTokens[i], 98 /* WhileKeyword */)) { @@ -33615,7 +21603,6 @@ var ts; function getSwitchCaseDefaultOccurrences(switchStatement) { var keywords = []; pushKeywordIf(keywords, switchStatement.getFirstToken(), 90 /* SwitchKeyword */); - var breakSearchType = 3 /* All */; ts.forEach(switchStatement.clauses, function (clause) { pushKeywordIf(keywords, clause.getFirstToken(), 65 /* CaseKeyword */, 71 /* DefaultKeyword */); var breaksAndContinues = aggregateAllBreakAndContinueStatements(clause); @@ -33631,12 +21618,12 @@ var ts; var owner = getBreakOrContinueOwner(breakOrContinueStatement); if (owner) { switch (owner.kind) { - case 165 /* ForStatement */: - case 166 /* ForInStatement */: - case 163 /* DoStatement */: - case 164 /* WhileStatement */: + case 168 /* ForStatement */: + case 169 /* ForInStatement */: + case 166 /* DoStatement */: + case 167 /* WhileStatement */: return getLoopBreakContinueOccurrences(owner); - case 171 /* SwitchStatement */: + case 174 /* SwitchStatement */: return getSwitchCaseDefaultOccurrences(owner); } } @@ -33647,7 +21634,7 @@ var ts; aggregate(node); return statementAccumulator; function aggregate(node) { - if (node.kind === 168 /* BreakStatement */ || node.kind === 167 /* ContinueStatement */) { + if (node.kind === 171 /* BreakStatement */ || node.kind === 170 /* ContinueStatement */) { statementAccumulator.push(node); } else if (!ts.isAnyFunction(node)) { @@ -33663,14 +21650,14 @@ var ts; function getBreakOrContinueOwner(statement) { for (var node = statement.parent; node; node = node.parent) { switch (node.kind) { - case 171 /* SwitchStatement */: - if (statement.kind === 167 /* ContinueStatement */) { + case 174 /* SwitchStatement */: + if (statement.kind === 170 /* ContinueStatement */) { continue; } - case 165 /* ForStatement */: - case 166 /* ForInStatement */: - case 164 /* WhileStatement */: - case 163 /* DoStatement */: + case 168 /* ForStatement */: + case 169 /* ForInStatement */: + case 167 /* WhileStatement */: + case 166 /* DoStatement */: if (!statement.label || isLabeledBy(node, statement.label.text)) { return node; } @@ -33732,7 +21719,7 @@ var ts; } function findReferences(fileName, position, findInStrings, findInComments) { synchronizeHostData(); - fileName = TypeScript.switchToForwardSlashes(fileName); + fileName = ts.normalizeSlashes(fileName); var sourceFile = getSourceFile(fileName); var node = ts.getTouchingPropertyName(sourceFile, position); if (!node) { @@ -33787,7 +21774,7 @@ var ts; } return result; function getNormalizedSymbolName(symbolName, declarations) { - var functionExpression = ts.forEach(declarations, function (d) { return d.kind === 149 /* FunctionExpression */ ? d : undefined; }); + var functionExpression = ts.forEach(declarations, function (d) { return d.kind === 152 /* FunctionExpression */ ? d : undefined; }); if (functionExpression && functionExpression.name) { var name = functionExpression.name.text; } @@ -33805,7 +21792,7 @@ var ts; if (symbol.getFlags() && (4 /* Property */ | 8192 /* Method */)) { var privateDeclaration = ts.forEach(symbol.getDeclarations(), function (d) { return (d.flags & 32 /* Private */) ? d : undefined; }); if (privateDeclaration) { - return ts.getAncestor(privateDeclaration, 184 /* ClassDeclaration */); + return ts.getAncestor(privateDeclaration, 187 /* ClassDeclaration */); } } if (symbol.parent) { @@ -33819,7 +21806,7 @@ var ts; if (scope && scope !== container) { return undefined; } - if (container.kind === 193 /* SourceFile */ && !ts.isExternalModule(container)) { + if (container.kind === 196 /* SourceFile */ && !ts.isExternalModule(container)) { return undefined; } scope = container; @@ -33897,7 +21884,7 @@ var ts; if ((findInStrings && isInString(position)) || (findInComments && isInComment(position))) { result.push({ fileName: sourceFile.filename, - textSpan: new TypeScript.TextSpan(position, searchText.length), + textSpan: new ts.TextSpan(position, searchText.length), isWriteAccess: false }); } @@ -33907,8 +21894,15 @@ var ts; return; } var referenceSymbol = typeInfoResolver.getSymbolInfo(referenceLocation); - if (referenceSymbol && isRelatableToSearchSet(searchSymbols, referenceSymbol, referenceLocation)) { - result.push(getReferenceEntryFromNode(referenceLocation)); + if (referenceSymbol) { + var referenceSymbolDeclaration = referenceSymbol.valueDeclaration; + var shorthandValueSymbol = typeInfoResolver.getShorthandAssignmentValueSymbol(referenceSymbolDeclaration); + if (isRelatableToSearchSet(searchSymbols, referenceSymbol, referenceLocation)) { + result.push(getReferenceEntryFromNode(referenceLocation)); + } + else if (!(referenceSymbol.flags & 268435456 /* Transient */) && searchSymbols.indexOf(shorthandValueSymbol) >= 0) { + result.push(getReferenceEntryFromNode(referenceSymbolDeclaration.name)); + } } }); } @@ -33978,18 +21972,18 @@ var ts; staticFlag &= searchSpaceNode.flags; searchSpaceNode = searchSpaceNode.parent; break; - case 193 /* SourceFile */: + case 196 /* SourceFile */: if (ts.isExternalModule(searchSpaceNode)) { return undefined; } - case 182 /* FunctionDeclaration */: - case 149 /* FunctionExpression */: + case 185 /* FunctionDeclaration */: + case 152 /* FunctionExpression */: break; default: return undefined; } var result = []; - if (searchSpaceNode.kind === 193 /* SourceFile */) { + if (searchSpaceNode.kind === 196 /* SourceFile */) { ts.forEach(sourceFiles, function (sourceFile) { var possiblePositions = getPossibleSymbolReferencePositions(sourceFile, "this", sourceFile.getStart(), sourceFile.getEnd()); getThisReferencesInFile(sourceFile, sourceFile, possiblePositions, result); @@ -34010,19 +22004,19 @@ var ts; } var container = ts.getThisContainer(node, false); switch (searchSpaceNode.kind) { - case 149 /* FunctionExpression */: - case 182 /* FunctionDeclaration */: + case 152 /* FunctionExpression */: + case 185 /* FunctionDeclaration */: if (searchSpaceNode.symbol === container.symbol) { result.push(getReferenceEntryFromNode(node)); } break; - case 184 /* ClassDeclaration */: + case 187 /* ClassDeclaration */: if (container.parent && searchSpaceNode.symbol === container.parent.symbol && (container.flags & 128 /* Static */) === staticFlag) { result.push(getReferenceEntryFromNode(node)); } break; - case 193 /* SourceFile */: - if (container.kind === 193 /* SourceFile */ && !ts.isExternalModule(container)) { + case 196 /* SourceFile */: + if (container.kind === 196 /* SourceFile */ && !ts.isExternalModule(container)) { result.push(getReferenceEntryFromNode(node)); } break; @@ -34036,6 +22030,10 @@ var ts; ts.forEach(getPropertySymbolsFromContextualType(location), function (contextualSymbol) { result.push.apply(result, typeInfoResolver.getRootSymbols(contextualSymbol)); }); + var shorthandValueSymbol = typeInfoResolver.getShorthandAssignmentValueSymbol(location.parent); + if (shorthandValueSymbol) { + result.push(shorthandValueSymbol); + } } ts.forEach(typeInfoResolver.getRootSymbols(symbol), function (rootSymbol) { if (rootSymbol !== symbol) { @@ -34050,11 +22048,11 @@ var ts; function getPropertySymbolsFromBaseTypes(symbol, propertyName, result) { if (symbol && symbol.flags & (32 /* Class */ | 64 /* Interface */)) { ts.forEach(symbol.getDeclarations(), function (declaration) { - if (declaration.kind === 184 /* ClassDeclaration */) { + if (declaration.kind === 187 /* ClassDeclaration */) { getPropertySymbolFromTypeReference(declaration.baseType); ts.forEach(declaration.implementedTypes, getPropertySymbolFromTypeReference); } - else if (declaration.kind === 185 /* InterfaceDeclaration */) { + else if (declaration.kind === 188 /* InterfaceDeclaration */) { ts.forEach(declaration.baseTypes, getPropertySymbolFromTypeReference); } }); @@ -34150,7 +22148,7 @@ var ts; } return { fileName: node.getSourceFile().filename, - textSpan: TypeScript.TextSpan.fromBounds(start, end), + textSpan: ts.TextSpan.fromBounds(start, end), isWriteAccess: isWriteAccess(node) }; } @@ -34160,10 +22158,10 @@ var ts; } var parent = node.parent; if (parent) { - if (parent.kind === 152 /* PostfixOperator */ || parent.kind === 151 /* PrefixOperator */) { + if (parent.kind === 155 /* PostfixOperator */ || parent.kind === 154 /* PrefixOperator */) { return true; } - else if (parent.kind === 153 /* BinaryExpression */ && parent.left === node) { + else if (parent.kind === 156 /* BinaryExpression */ && parent.left === node) { var operator = parent.operator; return 51 /* FirstAssignment */ <= operator && operator <= 62 /* LastAssignment */; } @@ -34191,7 +22189,7 @@ var ts; kindModifiers: getNodeModifiers(declaration), matchKind: MatchKind[matchKind], fileName: filename, - textSpan: TypeScript.TextSpan.fromBounds(declaration.getStart(), declaration.getEnd()), + textSpan: ts.TextSpan.fromBounds(declaration.getStart(), declaration.getEnd()), containerName: container.name ? container.name.text : "", containerKind: container.name ? getNodeKind(container) : "" }); @@ -34235,11 +22233,10 @@ var ts; } function getEmitOutput(filename) { synchronizeHostData(); - filename = TypeScript.switchToForwardSlashes(filename); + filename = ts.normalizeSlashes(filename); var compilerOptions = program.getCompilerOptions(); var targetSourceFile = program.getSourceFile(filename); var shouldEmitToOwnFile = ts.shouldEmitToOwnFile(targetSourceFile, compilerOptions); - var emitDeclaration = compilerOptions.declaration; var emitOutput = { outputFiles: [], emitOutputStatus: undefined @@ -34252,7 +22249,6 @@ var ts; }); } writer = getEmitOutputWriter; - var syntacticDiagnostics = []; var containSyntacticErrors = false; if (shouldEmitToOwnFile) { containSyntacticErrors = containErrors(program.getDiagnostics(targetSourceFile)); @@ -34270,7 +22266,7 @@ var ts; writer = undefined; return emitOutput; } - var emitFilesResult = getFullTypeCheckChecker().emitFiles(targetSourceFile); + var emitFilesResult = getFullTypeCheckChecker().invokeEmitter(targetSourceFile); emitOutput.emitOutputStatus = emitFilesResult.emitResultStatus; writer = undefined; return emitOutput; @@ -34278,28 +22274,29 @@ var ts; function getMeaningFromDeclaration(node) { switch (node.kind) { case 123 /* Parameter */: - case 181 /* VariableDeclaration */: + case 184 /* VariableDeclaration */: case 124 /* Property */: - case 141 /* PropertyAssignment */: - case 192 /* EnumMember */: + case 143 /* PropertyAssignment */: + case 144 /* ShorthandPropertyAssignment */: + case 195 /* EnumMember */: case 125 /* Method */: case 126 /* Constructor */: case 127 /* GetAccessor */: case 128 /* SetAccessor */: - case 182 /* FunctionDeclaration */: - case 149 /* FunctionExpression */: - case 150 /* ArrowFunction */: - case 178 /* CatchBlock */: + case 185 /* FunctionDeclaration */: + case 152 /* FunctionExpression */: + case 153 /* ArrowFunction */: + case 181 /* CatchBlock */: return 1 /* Value */; case 122 /* TypeParameter */: - case 185 /* InterfaceDeclaration */: - case 186 /* TypeAliasDeclaration */: - case 134 /* TypeLiteral */: + case 188 /* InterfaceDeclaration */: + case 189 /* TypeAliasDeclaration */: + case 136 /* TypeLiteral */: return 2 /* Type */; - case 184 /* ClassDeclaration */: - case 187 /* EnumDeclaration */: + case 187 /* ClassDeclaration */: + case 190 /* EnumDeclaration */: return 1 /* Value */ | 2 /* Type */; - case 188 /* ModuleDeclaration */: + case 191 /* ModuleDeclaration */: if (node.name.kind === 7 /* StringLiteral */) { return 4 /* Namespace */ | 1 /* Value */; } @@ -34310,7 +22307,7 @@ var ts; return 4 /* Namespace */; } break; - case 190 /* ImportDeclaration */: + case 193 /* ImportDeclaration */: return 1 /* Value */ | 2 /* Type */ | 4 /* Namespace */; } ts.Debug.fail("Unknown declaration type"); @@ -34335,17 +22332,17 @@ var ts; while (node.parent.kind === 121 /* QualifiedName */) { node = node.parent; } - return node.parent.kind === 190 /* ImportDeclaration */ && node.parent.entityName === node; + return node.parent.kind === 193 /* ImportDeclaration */ && node.parent.entityName === node; } function getMeaningFromRightHandSideOfImport(node) { ts.Debug.assert(node.kind === 63 /* Identifier */); - if (node.parent.kind === 121 /* QualifiedName */ && node.parent.right === node && node.parent.parent.kind === 190 /* ImportDeclaration */) { + if (node.parent.kind === 121 /* QualifiedName */ && node.parent.right === node && node.parent.parent.kind === 193 /* ImportDeclaration */) { return 1 /* Value */ | 2 /* Type */ | 4 /* Namespace */; } return 4 /* Namespace */; } function getMeaningFromLocation(node) { - if (node.parent.kind === 191 /* ExportAssignment */) { + if (node.parent.kind === 194 /* ExportAssignment */) { return 1 /* Value */ | 2 /* Type */ | 4 /* Namespace */; } else if (isInRightSideOfImport(node)) { @@ -34366,7 +22363,7 @@ var ts; } function getSignatureHelpItems(fileName, position) { synchronizeHostData(); - fileName = TypeScript.switchToForwardSlashes(fileName); + fileName = ts.normalizeSlashes(fileName); var sourceFile = getSourceFile(fileName); return ts.SignatureHelp.getSignatureHelpItems(sourceFile, position, typeInfoResolver, cancellationToken); } @@ -34388,7 +22385,7 @@ var ts; } var start = signatureInfoString.length; signatureInfoString += displayPartsToString(parameter.displayParts); - var end = signatureInfoString.length - 1; + var end = signatureInfoString.length; parameters.push({ name: parameter.name, isVariable: i === n - 1 && signature.isVariadic, @@ -34418,12 +22415,8 @@ var ts; activeFormal: 0 }; } - function getSyntaxTree(filename) { - filename = TypeScript.switchToForwardSlashes(filename); - return syntaxTreeCache.getCurrentFileSyntaxTree(filename); - } function getCurrentSourceFile(filename) { - filename = TypeScript.switchToForwardSlashes(filename); + filename = ts.normalizeSlashes(filename); var currentSourceFile = syntaxTreeCache.getCurrentSourceFile(filename); return currentSourceFile; } @@ -34434,7 +22427,7 @@ var ts; return; } switch (node.kind) { - case 142 /* PropertyAccess */: + case 145 /* PropertyAccess */: case 121 /* QualifiedName */: case 7 /* StringLiteral */: case 78 /* FalseKeyword */: @@ -34453,7 +22446,7 @@ var ts; nodeForStartPos = nodeForStartPos.parent; } else if (isNameOfModuleDeclaration(nodeForStartPos)) { - if (nodeForStartPos.parent.parent.kind === 188 /* ModuleDeclaration */ && nodeForStartPos.parent.parent.body === nodeForStartPos.parent) { + if (nodeForStartPos.parent.parent.kind === 191 /* ModuleDeclaration */ && nodeForStartPos.parent.parent.body === nodeForStartPos.parent) { nodeForStartPos = nodeForStartPos.parent.parent.name; } else { @@ -34464,19 +22457,19 @@ var ts; break; } } - return TypeScript.TextSpan.fromBounds(nodeForStartPos.getStart(), node.getEnd()); + return ts.TextSpan.fromBounds(nodeForStartPos.getStart(), node.getEnd()); } function getBreakpointStatementAtPosition(filename, position) { filename = ts.normalizeSlashes(filename); return ts.BreakpointResolver.spanInSourceFileAtLocation(getCurrentSourceFile(filename), position); } function getNavigationBarItems(filename) { - filename = TypeScript.switchToForwardSlashes(filename); + filename = ts.normalizeSlashes(filename); return ts.NavigationBar.getNavigationBarItems(getCurrentSourceFile(filename)); } function getSemanticClassifications(fileName, span) { synchronizeHostData(); - fileName = TypeScript.switchToForwardSlashes(fileName); + fileName = ts.normalizeSlashes(fileName); var sourceFile = getSourceFile(fileName); var result = []; processNode(sourceFile); @@ -34505,7 +22498,7 @@ var ts; return undefined; function hasValueSideModule(symbol) { return ts.forEach(symbol.declarations, function (declaration) { - return declaration.kind === 188 /* ModuleDeclaration */ && ts.getModuleInstanceState(declaration) == 1 /* Instantiated */; + return declaration.kind === 191 /* ModuleDeclaration */ && ts.getModuleInstanceState(declaration) == 1 /* Instantiated */; }); } } @@ -34517,7 +22510,7 @@ var ts; var type = classifySymbol(symbol, getMeaningFromLocation(node)); if (type) { result.push({ - textSpan: new TypeScript.TextSpan(node.getStart(), node.getWidth()), + textSpan: new ts.TextSpan(node.getStart(), node.getWidth()), classificationType: type }); } @@ -34528,7 +22521,7 @@ var ts; } } function getSyntacticClassifications(fileName, span) { - fileName = TypeScript.switchToForwardSlashes(fileName); + fileName = ts.normalizeSlashes(fileName); var sourceFile = getCurrentSourceFile(fileName); var result = []; processElement(sourceFile); @@ -34537,7 +22530,7 @@ var ts; var width = comment.end - comment.pos; if (span.intersectsWith(comment.pos, width)) { result.push({ - textSpan: new TypeScript.TextSpan(comment.pos, width), + textSpan: new ts.TextSpan(comment.pos, width), classificationType: ClassificationTypeNames.comment }); } @@ -34548,7 +22541,7 @@ var ts; var type = classifyTokenType(token); if (type) { result.push({ - textSpan: new TypeScript.TextSpan(token.getStart(), token.getWidth()), + textSpan: new ts.TextSpan(token.getStart(), token.getWidth()), classificationType: type }); } @@ -34565,8 +22558,8 @@ var ts; return ClassificationTypeNames.punctuation; } } - if (ts.isPunctuation(token)) { - if (token.parent.kind === 153 /* BinaryExpression */ || token.parent.kind === 181 /* VariableDeclaration */ || token.parent.kind === 151 /* PrefixOperator */ || token.parent.kind === 152 /* PostfixOperator */ || token.parent.kind === 154 /* ConditionalExpression */) { + if (ts.isPunctuation(token.kind)) { + if (token.parent.kind === 156 /* BinaryExpression */ || token.parent.kind === 184 /* VariableDeclaration */ || token.parent.kind === 154 /* PrefixOperator */ || token.parent.kind === 155 /* PostfixOperator */ || token.parent.kind === 157 /* ConditionalExpression */) { return ClassificationTypeNames.operator; } else { @@ -34587,7 +22580,7 @@ var ts; } else if (tokenKind === 63 /* Identifier */) { switch (token.parent.kind) { - case 184 /* ClassDeclaration */: + case 187 /* ClassDeclaration */: if (token.parent.name === token) { return ClassificationTypeNames.className; } @@ -34597,17 +22590,17 @@ var ts; return ClassificationTypeNames.typeParameterName; } return; - case 185 /* InterfaceDeclaration */: + case 188 /* InterfaceDeclaration */: if (token.parent.name === token) { return ClassificationTypeNames.interfaceName; } return; - case 187 /* EnumDeclaration */: + case 190 /* EnumDeclaration */: if (token.parent.name === token) { return ClassificationTypeNames.enumName; } return; - case 188 /* ModuleDeclaration */: + case 191 /* ModuleDeclaration */: if (token.parent.name === token) { return ClassificationTypeNames.moduleName; } @@ -34633,7 +22626,7 @@ var ts; } } function getOutliningSpans(filename) { - filename = TypeScript.switchToForwardSlashes(filename); + filename = ts.normalizeSlashes(filename); var sourceFile = getCurrentSourceFile(filename); return ts.OutliningElementsCollector.collectElements(sourceFile); } @@ -34647,10 +22640,11 @@ var ts; var parentElement = token.parent; var childNodes = parentElement.getChildren(sourceFile); for (var i = 0, n = childNodes.length; i < n; i++) { + 33; var current = childNodes[i]; if (current.kind === matchKind) { - var range1 = new TypeScript.TextSpan(token.getStart(sourceFile), token.getWidth(sourceFile)); - var range2 = new TypeScript.TextSpan(current.getStart(sourceFile), current.getWidth(sourceFile)); + var range1 = new ts.TextSpan(token.getStart(sourceFile), token.getWidth(sourceFile)); + var range2 = new ts.TextSpan(current.getStart(sourceFile), current.getWidth(sourceFile)); if (range1.start() < range2.start()) { result.push(range1, range2); } @@ -34678,55 +22672,42 @@ var ts; } } function getIndentationAtPosition(filename, position, editorOptions) { - filename = TypeScript.switchToForwardSlashes(filename); + filename = ts.normalizeSlashes(filename); var start = new Date().getTime(); var sourceFile = getCurrentSourceFile(filename); host.log("getIndentationAtPosition: getCurrentSourceFile: " + (new Date().getTime() - start)); var start = new Date().getTime(); - var options = new TypeScript.FormattingOptions(!editorOptions.ConvertTabsToSpaces, editorOptions.TabSize, editorOptions.IndentSize, editorOptions.NewLineCharacter); - var result = ts.formatting.SmartIndenter.getIndentation(position, sourceFile, options); + var result = ts.formatting.SmartIndenter.getIndentation(position, sourceFile, editorOptions); host.log("getIndentationAtPosition: computeIndentation : " + (new Date().getTime() - start)); return result; } - function getFormattingManager(filename, options) { - if (formattingRulesProvider == null) { - formattingRulesProvider = new TypeScript.Services.Formatting.RulesProvider(host); - } - formattingRulesProvider.ensureUpToDate(options); - var syntaxTree = getSyntaxTree(filename); - var scriptSnapshot = syntaxTreeCache.getCurrentScriptSnapshot(filename); - var scriptText = TypeScript.SimpleText.fromScriptSnapshot(scriptSnapshot); - var textSnapshot = new TypeScript.Services.Formatting.TextSnapshot(scriptText); - var manager = new TypeScript.Services.Formatting.FormattingManager(syntaxTree, textSnapshot, formattingRulesProvider, options); - return manager; - } function getFormattingEditsForRange(fileName, start, end, options) { - fileName = TypeScript.switchToForwardSlashes(fileName); - var manager = getFormattingManager(fileName, options); - return manager.formatSelection(start, end); + fileName = ts.normalizeSlashes(fileName); + var sourceFile = getCurrentSourceFile(fileName); + return ts.formatting.formatSelection(start, end, sourceFile, getRuleProvider(options), options); } function getFormattingEditsForDocument(fileName, options) { - fileName = TypeScript.switchToForwardSlashes(fileName); - var manager = getFormattingManager(fileName, options); - return manager.formatDocument(); + fileName = ts.normalizeSlashes(fileName); + var sourceFile = getCurrentSourceFile(fileName); + return ts.formatting.formatDocument(sourceFile, getRuleProvider(options), options); } function getFormattingEditsAfterKeystroke(fileName, position, key, options) { - fileName = TypeScript.switchToForwardSlashes(fileName); - var manager = getFormattingManager(fileName, options); + fileName = ts.normalizeSlashes(fileName); + var sourceFile = getCurrentSourceFile(fileName); if (key === "}") { - return manager.formatOnClosingCurlyBrace(position); + return ts.formatting.formatOnClosingCurly(position, sourceFile, getRuleProvider(options), options); } else if (key === ";") { - return manager.formatOnSemicolon(position); + return ts.formatting.formatOnSemicolon(position, sourceFile, getRuleProvider(options), options); } else if (key === "\n") { - return manager.formatOnEnter(position); + return ts.formatting.formatOnEnter(position, sourceFile, getRuleProvider(options), options); } return []; } function getTodoComments(filename, descriptors) { synchronizeHostData(); - filename = TypeScript.switchToForwardSlashes(filename); + filename = ts.normalizeSlashes(filename); var sourceFile = getSourceFile(filename); cancellationToken.throwIfCancellationRequested(); var fileContents = sourceFile.text; @@ -34796,7 +22777,7 @@ var ts; } function getRenameInfo(fileName, position) { synchronizeHostData(); - fileName = TypeScript.switchToForwardSlashes(fileName); + fileName = ts.normalizeSlashes(fileName); var sourceFile = getSourceFile(fileName); var node = ts.getTouchingWord(sourceFile, position); if (node && node.kind === 63 /* Identifier */) { @@ -34804,7 +22785,7 @@ var ts; if (symbol && symbol.getDeclarations() && symbol.getDeclarations().length > 0) { var kind = getSymbolKind(symbol, typeInfoResolver); if (kind) { - return getRenameInfo(symbol.name, typeInfoResolver.getFullyQualifiedName(symbol), kind, getSymbolModifiers(symbol), new TypeScript.TextSpan(node.getStart(), node.getWidth())); + return getRenameInfo(symbol.name, typeInfoResolver.getFullyQualifiedName(symbol), kind, getSymbolModifiers(symbol), new ts.TextSpan(node.getStart(), node.getWidth())); } } } @@ -34847,7 +22828,6 @@ var ts; getDefinitionAtPosition: getDefinitionAtPosition, getReferencesAtPosition: getReferencesAtPosition, getOccurrencesAtPosition: getOccurrencesAtPosition, - getImplementorsAtPosition: function (filename, position) { return []; }, getNameOrDottedNameSpan: getNameOrDottedNameSpan, getBreakpointStatementAtPosition: getBreakpointStatementAtPosition, getNavigateToItems: getNavigateToItems, @@ -34901,7 +22881,6 @@ var ts; } function getClassificationsForLine(text, lexState) { var offset = 0; - var lastTokenOrCommentEnd = 0; var token = 0 /* Unknown */; var lastNonTriviaToken = 0 /* Unknown */; switch (lexState) { @@ -35068,9 +23047,7 @@ var ts; return 5 /* Identifier */; } } - return { - getClassificationsForLine: getClassificationsForLine - }; + return { getClassificationsForLine: getClassificationsForLine }; } ts.createClassifier = createClassifier; function initializeServices() { @@ -35078,7 +23055,7 @@ var ts; getNodeConstructor: function (kind) { function Node() { } - var proto = kind === 193 /* SourceFile */ ? new SourceFileObject() : new NodeObject(); + var proto = kind === 196 /* SourceFile */ ? new SourceFileObject() : new NodeObject(); proto.kind = kind; proto.pos = 0; proto.end = 0; @@ -35115,7 +23092,7 @@ var ts; } return spanInNode(tokenAtLocation); function textSpan(startNode, endNode) { - return TypeScript.TextSpan.fromBounds(startNode.getStart(), (endNode || startNode).getEnd()); + return ts.TextSpan.fromBounds(startNode.getStart(), (endNode || startNode).getEnd()); } function spanInNodeIfStartsOnSameLine(node, otherwiseOnNode) { if (node && lineOfPosition === sourceFile.getLineAndCharacterFromPosition(node.getStart()).line) { @@ -35132,90 +23109,91 @@ var ts; function spanInNode(node) { if (node) { if (ts.isExpression(node)) { - if (node.parent.kind === 163 /* DoStatement */) { + if (node.parent.kind === 166 /* DoStatement */) { return spanInPreviousNode(node); } - if (node.parent.kind === 165 /* ForStatement */) { + if (node.parent.kind === 168 /* ForStatement */) { return textSpan(node); } - if (node.parent.kind === 153 /* BinaryExpression */ && node.parent.operator === 22 /* CommaToken */) { + if (node.parent.kind === 156 /* BinaryExpression */ && node.parent.operator === 22 /* CommaToken */) { return textSpan(node); } - if (node.parent.kind == 150 /* ArrowFunction */ && node.parent.body == node) { + if (node.parent.kind == 153 /* ArrowFunction */ && node.parent.body == node) { return textSpan(node); } } switch (node.kind) { - case 159 /* VariableStatement */: + case 162 /* VariableStatement */: return spanInVariableDeclaration(node.declarations[0]); - case 181 /* VariableDeclaration */: + case 184 /* VariableDeclaration */: case 124 /* Property */: return spanInVariableDeclaration(node); case 123 /* Parameter */: return spanInParameterDeclaration(node); - case 182 /* FunctionDeclaration */: + case 185 /* FunctionDeclaration */: case 125 /* Method */: case 127 /* GetAccessor */: case 128 /* SetAccessor */: case 126 /* Constructor */: - case 149 /* FunctionExpression */: - case 150 /* ArrowFunction */: + case 152 /* FunctionExpression */: + case 153 /* ArrowFunction */: return spanInFunctionDeclaration(node); - case 183 /* FunctionBlock */: + case 186 /* FunctionBlock */: return spanInFunctionBlock(node); - case 158 /* Block */: - case 177 /* TryBlock */: - case 178 /* CatchBlock */: - case 179 /* FinallyBlock */: - case 189 /* ModuleBlock */: + case 161 /* Block */: + case 180 /* TryBlock */: + case 181 /* CatchBlock */: + case 182 /* FinallyBlock */: + case 192 /* ModuleBlock */: return spanInBlock(node); - case 161 /* ExpressionStatement */: + case 164 /* ExpressionStatement */: return textSpan(node.expression); - case 169 /* ReturnStatement */: + case 172 /* ReturnStatement */: return textSpan(node.getChildAt(0), node.expression); - case 164 /* WhileStatement */: + case 167 /* WhileStatement */: return textSpan(node, ts.findNextToken(node.expression, node)); - case 163 /* DoStatement */: + case 166 /* DoStatement */: return spanInNode(node.statement); - case 180 /* DebuggerStatement */: + case 183 /* DebuggerStatement */: return textSpan(node.getChildAt(0)); - case 162 /* IfStatement */: + case 165 /* IfStatement */: return textSpan(node, ts.findNextToken(node.expression, node)); - case 174 /* LabeledStatement */: + case 177 /* LabeledStatement */: return spanInNode(node.statement); - case 168 /* BreakStatement */: - case 167 /* ContinueStatement */: + case 171 /* BreakStatement */: + case 170 /* ContinueStatement */: return textSpan(node.getChildAt(0), node.label); - case 165 /* ForStatement */: + case 168 /* ForStatement */: return spanInForStatement(node); - case 166 /* ForInStatement */: + case 169 /* ForInStatement */: return textSpan(node, ts.findNextToken(node.expression, node)); - case 171 /* SwitchStatement */: + case 174 /* SwitchStatement */: return textSpan(node, ts.findNextToken(node.expression, node)); - case 172 /* CaseClause */: - case 173 /* DefaultClause */: + case 175 /* CaseClause */: + case 176 /* DefaultClause */: return spanInNode(node.statements[0]); - case 176 /* TryStatement */: + case 179 /* TryStatement */: return spanInBlock(node.tryBlock); - case 175 /* ThrowStatement */: + case 178 /* ThrowStatement */: return textSpan(node, node.expression); - case 191 /* ExportAssignment */: + case 194 /* ExportAssignment */: return textSpan(node, node.exportName); - case 190 /* ImportDeclaration */: + case 193 /* ImportDeclaration */: return textSpan(node, node.entityName || node.externalModuleName); - case 188 /* ModuleDeclaration */: + case 191 /* ModuleDeclaration */: if (ts.getModuleInstanceState(node) !== 1 /* Instantiated */) { return undefined; } - case 184 /* ClassDeclaration */: - case 187 /* EnumDeclaration */: - case 192 /* EnumMember */: - case 144 /* CallExpression */: - case 145 /* NewExpression */: + case 187 /* ClassDeclaration */: + case 190 /* EnumDeclaration */: + case 195 /* EnumMember */: + case 147 /* CallExpression */: + case 148 /* NewExpression */: return textSpan(node); - case 170 /* WithStatement */: + case 173 /* WithStatement */: return spanInNode(node.statement); - case 185 /* InterfaceDeclaration */: + case 188 /* InterfaceDeclaration */: + case 189 /* TypeAliasDeclaration */: return undefined; case 21 /* SemicolonToken */: case 1 /* EndOfFileToken */: @@ -35242,10 +23220,10 @@ var ts; case 79 /* FinallyKeyword */: return spanInNextNode(node); default: - if (node.parent.kind === 141 /* PropertyAssignment */ && node.parent.name === node) { + if (node.parent.kind === 143 /* PropertyAssignment */ && node.parent.name === node) { return spanInNode(node.parent.initializer); } - if (node.parent.kind === 147 /* TypeAssertion */ && node.parent.type === node) { + if (node.parent.kind === 150 /* TypeAssertion */ && node.parent.type === node) { return spanInNode(node.parent.operand); } if (ts.isAnyFunction(node.parent) && node.parent.type === node) { @@ -35255,11 +23233,11 @@ var ts; } } function spanInVariableDeclaration(variableDeclaration) { - if (variableDeclaration.parent.kind === 166 /* ForInStatement */) { + if (variableDeclaration.parent.kind === 169 /* ForInStatement */) { return spanInNode(variableDeclaration.parent); } - var isParentVariableStatement = variableDeclaration.parent.kind === 159 /* VariableStatement */; - var isDeclarationOfForStatement = variableDeclaration.parent.kind === 165 /* ForStatement */ && ts.contains(variableDeclaration.parent.declarations, variableDeclaration); + var isParentVariableStatement = variableDeclaration.parent.kind === 162 /* VariableStatement */; + var isDeclarationOfForStatement = variableDeclaration.parent.kind === 168 /* ForStatement */ && ts.contains(variableDeclaration.parent.declarations, variableDeclaration); var declarations = isParentVariableStatement ? variableDeclaration.parent.declarations : isDeclarationOfForStatement ? variableDeclaration.parent.declarations : undefined; if (variableDeclaration.initializer || (variableDeclaration.flags & 1 /* Export */)) { if (declarations && declarations[0] === variableDeclaration) { @@ -35299,7 +23277,7 @@ var ts; } } function canFunctionHaveSpanInWholeDeclaration(functionDeclaration) { - return !!(functionDeclaration.flags & 1 /* Export */) || (functionDeclaration.parent.kind === 184 /* ClassDeclaration */ && functionDeclaration.kind !== 126 /* Constructor */); + return !!(functionDeclaration.flags & 1 /* Export */) || (functionDeclaration.parent.kind === 187 /* ClassDeclaration */ && functionDeclaration.kind !== 126 /* Constructor */); } function spanInFunctionDeclaration(functionDeclaration) { if (!functionDeclaration.body) { @@ -35319,15 +23297,15 @@ var ts; } function spanInBlock(block) { switch (block.parent.kind) { - case 188 /* ModuleDeclaration */: + case 191 /* ModuleDeclaration */: if (ts.getModuleInstanceState(block.parent) !== 1 /* Instantiated */) { return undefined; } - case 164 /* WhileStatement */: - case 162 /* IfStatement */: - case 166 /* ForInStatement */: + case 167 /* WhileStatement */: + case 165 /* IfStatement */: + case 169 /* ForInStatement */: return spanInNodeIfStartsOnSameLine(block.parent, block.statements[0]); - case 165 /* ForStatement */: + case 168 /* ForStatement */: return spanInNodeIfStartsOnSameLine(ts.findPrecedingToken(block.pos, sourceFile, block.parent), block.statements[0]); } return spanInNode(block.statements[0]); @@ -35348,34 +23326,34 @@ var ts; } function spanInOpenBraceToken(node) { switch (node.parent.kind) { - case 187 /* EnumDeclaration */: + case 190 /* EnumDeclaration */: var enumDeclaration = node.parent; return spanInNodeIfStartsOnSameLine(ts.findPrecedingToken(node.pos, sourceFile, node.parent), enumDeclaration.members.length ? enumDeclaration.members[0] : enumDeclaration.getLastToken(sourceFile)); - case 184 /* ClassDeclaration */: + case 187 /* ClassDeclaration */: var classDeclaration = node.parent; return spanInNodeIfStartsOnSameLine(ts.findPrecedingToken(node.pos, sourceFile, node.parent), classDeclaration.members.length ? classDeclaration.members[0] : classDeclaration.getLastToken(sourceFile)); - case 171 /* SwitchStatement */: + case 174 /* SwitchStatement */: return spanInNodeIfStartsOnSameLine(node.parent, node.parent.clauses[0]); } return spanInNode(node.parent); } function spanInCloseBraceToken(node) { switch (node.parent.kind) { - case 189 /* ModuleBlock */: + case 192 /* ModuleBlock */: if (ts.getModuleInstanceState(node.parent.parent) !== 1 /* Instantiated */) { return undefined; } - case 183 /* FunctionBlock */: - case 187 /* EnumDeclaration */: - case 184 /* ClassDeclaration */: + case 186 /* FunctionBlock */: + case 190 /* EnumDeclaration */: + case 187 /* ClassDeclaration */: return textSpan(node); - case 158 /* Block */: - case 177 /* TryBlock */: - case 178 /* CatchBlock */: - case 179 /* FinallyBlock */: + case 161 /* Block */: + case 180 /* TryBlock */: + case 181 /* CatchBlock */: + case 182 /* FinallyBlock */: return spanInNode(node.parent.statements[node.parent.statements.length - 1]); ; - case 171 /* SwitchStatement */: + case 174 /* SwitchStatement */: var switchStatement = node.parent; var lastClause = switchStatement.clauses[switchStatement.clauses.length - 1]; if (lastClause) { @@ -35387,23 +23365,23 @@ var ts; } } function spanInOpenParenToken(node) { - if (node.parent.kind === 163 /* DoStatement */) { + if (node.parent.kind === 166 /* DoStatement */) { return spanInPreviousNode(node); } return spanInNode(node.parent); } function spanInCloseParenToken(node) { switch (node.parent.kind) { - case 149 /* FunctionExpression */: - case 182 /* FunctionDeclaration */: - case 150 /* ArrowFunction */: + case 152 /* FunctionExpression */: + case 185 /* FunctionDeclaration */: + case 153 /* ArrowFunction */: case 125 /* Method */: case 127 /* GetAccessor */: case 128 /* SetAccessor */: case 126 /* Constructor */: - case 164 /* WhileStatement */: - case 163 /* DoStatement */: - case 165 /* ForStatement */: + case 167 /* WhileStatement */: + case 166 /* DoStatement */: + case 168 /* ForStatement */: return spanInPreviousNode(node); default: return spanInNode(node.parent); @@ -35411,19 +23389,19 @@ var ts; return spanInNode(node.parent); } function spanInColonToken(node) { - if (ts.isAnyFunction(node.parent) || node.parent.kind === 141 /* PropertyAssignment */) { + if (ts.isAnyFunction(node.parent) || node.parent.kind === 143 /* PropertyAssignment */) { return spanInPreviousNode(node); } return spanInNode(node.parent); } function spanInGreaterThanOrLessThanToken(node) { - if (node.parent.kind === 147 /* TypeAssertion */) { + if (node.parent.kind === 150 /* TypeAssertion */) { return spanInNode(node.parent.operand); } return spanInNode(node.parent); } function spanInWhileKeyword(node) { - if (node.parent.kind === 163 /* DoStatement */) { + if (node.parent.kind === 166 /* DoStatement */) { return textSpan(node, ts.findNextToken(node.parent.expression, node.parent)); } return spanInNode(node.parent); @@ -35433,128 +23411,6 @@ var ts; BreakpointResolver.spanInSourceFileAtLocation = spanInSourceFileAtLocation; })(BreakpointResolver = ts.BreakpointResolver || (ts.BreakpointResolver = {})); })(ts || (ts = {})); -var TypeScript; -(function (TypeScript) { - function isNoDefaultLibMatch(comment) { - var isNoDefaultLibRegex = /^(\/\/\/\s*/gim; - return isNoDefaultLibRegex.exec(comment); - } - TypeScript.tripleSlashReferenceRegExp = /^(\/\/\/\s*/; - function getFileReferenceFromReferencePath(fileName, text, position, comment, diagnostics) { - var lineMap = text.lineMap(); - var simpleReferenceRegEx = /^\/\/\/\s*= 7 && fullReference[6] === "true"; - return { - line: 0, - character: 0, - position: 0, - length: 0, - path: TypeScript.switchToForwardSlashes(adjustedPath), - isResident: isResident - }; - } - } - } - return null; - } - var reportDiagnostic = function () { - }; - function processImports(text, scanner, token, importedFiles) { - var lineChar = { line: -1, character: -1 }; - var lineMap = text.lineMap(); - var start = new Date().getTime(); - while (token.kind() !== 8 /* EndOfFileToken */) { - if (token.kind() === 51 /* ImportKeyword */) { - var importToken = token; - token = scanner.scan(false); - if (TypeScript.SyntaxFacts.isIdentifierNameOrAnyKeyword(token)) { - token = scanner.scan(false); - if (token.kind() === 109 /* EqualsToken */) { - token = scanner.scan(false); - if (token.kind() === 67 /* ModuleKeyword */ || token.kind() === 68 /* RequireKeyword */) { - token = scanner.scan(false); - if (token.kind() === 74 /* OpenParenToken */) { - token = scanner.scan(false); - lineMap.fillLineAndCharacterFromPosition(TypeScript.start(importToken, text), lineChar); - if (token.kind() === 12 /* StringLiteral */) { - var ref = { - line: lineChar.line, - character: lineChar.character, - position: TypeScript.start(token, text), - length: TypeScript.width(token), - path: TypeScript.stripStartAndEndQuotes(TypeScript.switchToForwardSlashes(token.text())), - isResident: false - }; - importedFiles.push(ref); - } - } - } - } - } - } - token = scanner.scan(false); - } - var totalTime = new Date().getTime() - start; - } - function processTripleSlashDirectives(fileName, text, firstToken) { - var leadingTrivia = firstToken.leadingTrivia(text); - var position = 0; - var lineChar = { line: -1, character: -1 }; - var noDefaultLib = false; - var diagnostics = []; - var referencedFiles = []; - var lineMap = text.lineMap(); - for (var i = 0, n = leadingTrivia.count(); i < n; i++) { - var trivia = leadingTrivia.syntaxTriviaAt(i); - if (trivia.kind() === 5 /* SingleLineCommentTrivia */) { - var triviaText = trivia.fullText(); - var referencedCode = getFileReferenceFromReferencePath(fileName, text, position, triviaText, diagnostics); - if (referencedCode) { - lineMap.fillLineAndCharacterFromPosition(position, lineChar); - referencedCode.position = position; - referencedCode.length = trivia.fullWidth(); - referencedCode.line = lineChar.line; - referencedCode.character = lineChar.character; - referencedFiles.push(referencedCode); - } - var isNoDefaultLib = isNoDefaultLibMatch(triviaText); - if (isNoDefaultLib) { - noDefaultLib = isNoDefaultLib[3] === "true"; - } - } - position += trivia.fullWidth(); - } - return { noDefaultLib: noDefaultLib, diagnostics: diagnostics, referencedFiles: referencedFiles }; - } - function preProcessFile(fileName, sourceText, readImportFiles) { - if (readImportFiles === void 0) { readImportFiles = true; } - var text = TypeScript.SimpleText.fromScriptSnapshot(sourceText); - var scanner = TypeScript.Scanner.createScanner(2 /* Latest */, text, reportDiagnostic); - var firstToken = scanner.scan(false); - var importedFiles = []; - if (readImportFiles) { - processImports(text, scanner, firstToken, importedFiles); - } - var properties = processTripleSlashDirectives(fileName, text, firstToken); - return { referencedFiles: properties.referencedFiles, importedFiles: importedFiles, isLibFile: properties.noDefaultLib, diagnostics: properties.diagnostics }; - } - TypeScript.preProcessFile = preProcessFile; - function getReferencedFiles(fileName, sourceText) { - return preProcessFile(fileName, sourceText, false).referencedFiles; - } - TypeScript.getReferencedFiles = getReferencedFiles; -})(TypeScript || (TypeScript = {})); var debugObjectHost = this; var ts; (function (ts) { @@ -35661,7 +23517,7 @@ var ts; return null; } var decoded = JSON.parse(encoded); - return new TypeScript.TextChangeRange(new TypeScript.TextSpan(decoded.span.start, decoded.span.length), decoded.newLength); + return new ts.TextChangeRange(new ts.TextSpan(decoded.span.start, decoded.span.length), decoded.newLength); }; return ScriptSnapshotShimAdapter; })(); @@ -35801,26 +23657,17 @@ var ts; code: diagnostic.code }; }; - LanguageServiceShimObject.prototype.realizeDiagnosticWithFileName = function (diagnostic) { - return { - fileName: diagnostic.file.filename, - message: diagnostic.messageText, - start: diagnostic.start, - length: diagnostic.length, - category: ts.DiagnosticCategory[diagnostic.category].toLowerCase() - }; - }; LanguageServiceShimObject.prototype.getSyntacticClassifications = function (fileName, start, length) { var _this = this; return this.forwardJSONCall("getSyntacticClassifications('" + fileName + "', " + start + ", " + length + ")", function () { - var classifications = _this.languageService.getSyntacticClassifications(fileName, new TypeScript.TextSpan(start, length)); + var classifications = _this.languageService.getSyntacticClassifications(fileName, new ts.TextSpan(start, length)); return classifications; }); }; LanguageServiceShimObject.prototype.getSemanticClassifications = function (fileName, start, length) { var _this = this; return this.forwardJSONCall("getSemanticClassifications('" + fileName + "', " + start + ", " + length + ")", function () { - var classifications = _this.languageService.getSemanticClassifications(fileName, new TypeScript.TextSpan(start, length)); + var classifications = _this.languageService.getSemanticClassifications(fileName, new ts.TextSpan(start, length)); return classifications; }); }; @@ -35842,7 +23689,7 @@ var ts; var _this = this; return this.forwardJSONCall("getCompilerOptionsDiagnostics()", function () { var errors = _this.languageService.getCompilerOptionsDiagnostics(); - return errors.map(function (d) { return _this.realizeDiagnosticWithFileName(d); }); + return errors.map(LanguageServiceShimObject.realizeDiagnostic); }); }; LanguageServiceShimObject.prototype.getQuickInfoAtPosition = function (fileName, position) { @@ -35923,12 +23770,6 @@ var ts; return _this.languageService.getOccurrencesAtPosition(fileName, position); }); }; - LanguageServiceShimObject.prototype.getImplementorsAtPosition = function (fileName, position) { - var _this = this; - return this.forwardJSONCall("getImplementorsAtPosition('" + fileName + "', " + position + ")", function () { - return _this.languageService.getImplementorsAtPosition(fileName, position); - }); - }; LanguageServiceShimObject.prototype.getCompletionsAtPosition = function (fileName, position, isMemberCompletion) { var _this = this; return this.forwardJSONCall("getCompletionsAtPosition('" + fileName + "', " + position + ", " + isMemberCompletion + ")", function () { @@ -36033,10 +23874,29 @@ var ts; CoreServicesShimObject.prototype.forwardJSONCall = function (actionDescription, action) { return forwardJSONCall(this.logger, actionDescription, action); }; - CoreServicesShimObject.prototype.getPreProcessedFileInfo = function (fileName, sourceText) { + CoreServicesShimObject.prototype.getPreProcessedFileInfo = function (fileName, sourceTextSnapshot) { return this.forwardJSONCall("getPreProcessedFileInfo('" + fileName + "')", function () { - var result = TypeScript.preProcessFile(fileName, sourceText); - return result; + var result = ts.preProcessFile(sourceTextSnapshot.getText(0, sourceTextSnapshot.getLength())); + var convertResult = { + referencedFiles: [], + importedFiles: [], + isLibFile: result.isLibFile + }; + ts.forEach(result.referencedFiles, function (refFile) { + convertResult.referencedFiles.push({ + path: ts.normalizePath(refFile.filename), + position: refFile.pos, + length: refFile.end - refFile.pos + }); + }); + ts.forEach(result.importedFiles, function (importedFile) { + convertResult.importedFiles.push({ + path: ts.normalizeSlashes(importedFile.filename), + position: importedFile.pos, + length: importedFile.end - importedFile.pos + }); + }); + return convertResult; }); }; CoreServicesShimObject.prototype.getDefaultCompilationSettings = function () { @@ -36094,7 +23954,7 @@ var ts; return; } } - throw TypeScript.Errors.invalidOperation(); + throw new Error("Invalid operation"); }; return TypeScriptServicesFactory; })(); diff --git a/src/compiler/binder.ts b/src/compiler/binder.ts index fe3009da3aa..3622f4cda2f 100644 --- a/src/compiler/binder.ts +++ b/src/compiler/binder.ts @@ -93,10 +93,16 @@ module ts { return (node.name).text; } switch (node.kind) { - case SyntaxKind.Constructor: return "__constructor"; - case SyntaxKind.CallSignature: return "__call"; - case SyntaxKind.ConstructSignature: return "__new"; - case SyntaxKind.IndexSignature: return "__index"; + case SyntaxKind.ConstructorType: + case SyntaxKind.Constructor: + return "__constructor"; + case SyntaxKind.FunctionType: + case SyntaxKind.CallSignature: + return "__call"; + case SyntaxKind.ConstructSignature: + return "__new"; + case SyntaxKind.IndexSignature: + return "__index"; } } @@ -114,8 +120,11 @@ module ts { } // Report errors every position with duplicate declaration // Report errors on previous encountered declarations - var message = symbol.flags & SymbolFlags.BlockScopedVariable ? Diagnostics.Cannot_redeclare_block_scoped_variable_0 : Diagnostics.Duplicate_identifier_0; - forEach(symbol.declarations, (declaration) => { + var message = symbol.flags & SymbolFlags.BlockScopedVariable + ? Diagnostics.Cannot_redeclare_block_scoped_variable_0 + : Diagnostics.Duplicate_identifier_0; + + forEach(symbol.declarations, declaration => { file.semanticErrors.push(createDiagnosticForNode(declaration.name, message, getDisplayName(declaration))); }); file.semanticErrors.push(createDiagnosticForNode(node.name, message, getDisplayName(node))); @@ -233,6 +242,8 @@ module ts { declareModuleMember(node, symbolKind, symbolExcludes); break; } + case SyntaxKind.FunctionType: + case SyntaxKind.ConstructorType: case SyntaxKind.CallSignature: case SyntaxKind.ConstructSignature: case SyntaxKind.IndexSignature: @@ -294,6 +305,25 @@ module ts { } } + function bindFunctionOrConstructorType(node: SignatureDeclaration) { + // For a given function symbol "<...>(...) => T" we want to generate a symbol identical + // to the one we would get for: { <...>(...): T } + // + // We do that by making an anonymous type literal symbol, and then setting the function + // symbol as its sole member. To the rest of the system, this symbol will be indistinguishable + // from an actual type literal symbol you would have gotten had you used the long form. + + var symbolKind = node.kind === SyntaxKind.FunctionType ? SymbolFlags.CallSignature : SymbolFlags.ConstructSignature; + var symbol = createSymbol(symbolKind, getDeclarationName(node)); + addDeclarationToSymbol(symbol, node, symbolKind); + bindChildren(node, symbolKind, /*isBlockScopeContainer:*/ false); + + var typeLiteralSymbol = createSymbol(SymbolFlags.TypeLiteral, "__type"); + addDeclarationToSymbol(typeLiteralSymbol, node, SymbolFlags.TypeLiteral); + typeLiteralSymbol.members = {}; + typeLiteralSymbol.members[node.kind === SyntaxKind.FunctionType ? "__call" : "__new"] = symbol + } + function bindAnonymousDeclaration(node: Node, symbolKind: SymbolFlags, name: string, isBlockScopeContainer: boolean) { var symbol = createSymbol(symbolKind, name); addDeclarationToSymbol(symbol, node, symbolKind); @@ -350,6 +380,7 @@ module ts { break; case SyntaxKind.Property: case SyntaxKind.PropertyAssignment: + case SyntaxKind.ShorthandPropertyAssignment: bindDeclaration(node, SymbolFlags.Property, SymbolFlags.PropertyExcludes, /*isBlockScopeContainer*/ false); break; case SyntaxKind.EnumMember: @@ -358,12 +389,12 @@ module ts { case SyntaxKind.CallSignature: bindDeclaration(node, SymbolFlags.CallSignature, 0, /*isBlockScopeContainer*/ false); break; - case SyntaxKind.Method: - bindDeclaration(node, SymbolFlags.Method, SymbolFlags.MethodExcludes, /*isBlockScopeContainer*/ true); - break; case SyntaxKind.ConstructSignature: bindDeclaration(node, SymbolFlags.ConstructSignature, 0, /*isBlockScopeContainer*/ true); break; + case SyntaxKind.Method: + bindDeclaration(node, SymbolFlags.Method, SymbolFlags.MethodExcludes, /*isBlockScopeContainer*/ true); + break; case SyntaxKind.IndexSignature: bindDeclaration(node, SymbolFlags.IndexSignature, 0, /*isBlockScopeContainer*/ false); break; @@ -379,6 +410,12 @@ module ts { case SyntaxKind.SetAccessor: bindDeclaration(node, SymbolFlags.SetAccessor, SymbolFlags.SetAccessorExcludes, /*isBlockScopeContainer*/ true); break; + + case SyntaxKind.FunctionType: + case SyntaxKind.ConstructorType: + bindFunctionOrConstructorType(node); + break; + case SyntaxKind.TypeLiteral: bindAnonymousDeclaration(node, SymbolFlags.TypeLiteral, "__type", /*isBlockScopeContainer*/ false); break; diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 825570c2eb9..8cf39b31295 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -75,41 +75,43 @@ module ts { var checker: TypeChecker = { getProgram: () => program, - getDiagnostics: getDiagnostics, - getGlobalDiagnostics: getGlobalDiagnostics, getNodeCount: () => sum(program.getSourceFiles(), "nodeCount"), getIdentifierCount: () => sum(program.getSourceFiles(), "identifierCount"), getSymbolCount: () => sum(program.getSourceFiles(), "symbolCount"), getTypeCount: () => typeCount, - checkProgram: checkProgram, - emitFiles: invokeEmitter, - getParentOfSymbol: getParentOfSymbol, - getNarrowedTypeOfSymbol: getNarrowedTypeOfSymbol, - getDeclaredTypeOfSymbol: getDeclaredTypeOfSymbol, - getPropertiesOfType: getPropertiesOfType, - getPropertyOfType: getPropertyOfType, - getSignaturesOfType: getSignaturesOfType, - getIndexTypeOfType: getIndexTypeOfType, - getReturnTypeOfSignature: getReturnTypeOfSignature, - getSymbolsInScope: getSymbolsInScope, - getSymbolInfo: getSymbolInfo, - getTypeOfNode: getTypeOfNode, - typeToString: typeToString, - getSymbolDisplayBuilder: getSymbolDisplayBuilder, - symbolToString: symbolToString, - getAugmentedPropertiesOfType: getAugmentedPropertiesOfType, - getRootSymbols: getRootSymbols, - getContextualType: getContextualType, - getFullyQualifiedName: getFullyQualifiedName, - getResolvedSignature: getResolvedSignature, - getEnumMemberValue: getEnumMemberValue, - isValidPropertyAccess: isValidPropertyAccess, - getSignatureFromDeclaration: getSignatureFromDeclaration, - isImplementationOfOverload: isImplementationOfOverload, - getAliasedSymbol: resolveImport, isUndefinedSymbol: symbol => symbol === undefinedSymbol, isArgumentsSymbol: symbol => symbol === argumentsSymbol, - hasEarlyErrors: hasEarlyErrors + getDiagnostics, + getGlobalDiagnostics, + checkProgram, + invokeEmitter, + getParentOfSymbol, + getNarrowedTypeOfSymbol, + getDeclaredTypeOfSymbol, + getPropertiesOfType, + getPropertyOfType, + getSignaturesOfType, + getIndexTypeOfType, + getReturnTypeOfSignature, + getSymbolsInScope, + getSymbolInfo, + getShorthandAssignmentValueSymbol, + getTypeOfNode, + typeToString, + getSymbolDisplayBuilder, + symbolToString, + getAugmentedPropertiesOfType, + getRootSymbols, + getContextualType, + getFullyQualifiedName, + getResolvedSignature, + getEnumMemberValue, + isValidPropertyAccess, + getSignatureFromDeclaration, + isImplementationOfOverload, + getAliasedSymbol: resolveImport, + hasEarlyErrors, + isEmitBlocked, }; var undefinedSymbol = createSymbol(SymbolFlags.Property | SymbolFlags.Transient, "undefined"); @@ -951,7 +953,7 @@ module ts { if (forEach(symbol.declarations, declaration => !getIsDeclarationVisible(declaration))) { return undefined; } - return { aliasesToMakeVisible: aliasesToMakeVisible }; + return { aliasesToMakeVisible }; function getIsDeclarationVisible(declaration: Declaration) { if (!isDeclarationVisible(declaration)) { @@ -1665,6 +1667,13 @@ module ts { } return type; } + + // If it is a short-hand property assignment; Use the type of the identifier + if (declaration.kind === SyntaxKind.ShorthandPropertyAssignment) { + var type = checkIdentifier(declaration.name); + return type + } + // Rest parameters default to type any[], other parameters default to type any var type = declaration.flags & NodeFlags.Rest ? createArrayType(anyType) : anyType; checkImplicitAny(type); @@ -2399,7 +2408,7 @@ module ts { } // Return the symbol for the property with the given name in the given type. Creates synthetic union properties when - // necessary, maps primtive types and type parameters are to their apparent types, and augments with properties from + // necessary, maps primitive types and type parameters are to their apparent types, and augments with properties from // Object and Function as appropriate. function getPropertyOfType(type: Type, name: string): Symbol { if (type.flags & TypeFlags.Union) { @@ -2434,7 +2443,7 @@ module ts { } // Return the signatures of the given kind in the given type. Creates synthetic union signatures when necessary and - // maps primtive types and type parameters are to their apparent types. + // maps primitive types and type parameters are to their apparent types. function getSignaturesOfType(type: Type, kind: SignatureKind): Signature[] { return getSignaturesOfObjectOrUnionType(getApparentType(type), kind); } @@ -2447,7 +2456,7 @@ module ts { } // Return the index type of the given kind in the given type. Creates synthetic union index types when necessary and - // maps primtive types and type parameters are to their apparent types. + // maps primitive types and type parameters are to their apparent types. function getIndexTypeOfType(type: Type, kind: IndexKind): Type { return getIndexTypeOfObjectOrUnionType(getApparentType(type), kind); } @@ -2523,6 +2532,8 @@ module ts { for (var i = 0, len = symbol.declarations.length; i < len; i++) { var node = symbol.declarations[i]; switch (node.kind) { + case SyntaxKind.FunctionType: + case SyntaxKind.ConstructorType: case SyntaxKind.FunctionDeclaration: case SyntaxKind.Method: case SyntaxKind.Constructor: @@ -2960,8 +2971,8 @@ module ts { } return links.resolvedType; } - - function getTypeFromTypeLiteralNode(node: TypeLiteralNode): Type { + + function getTypeFromTypeLiteralOrFunctionOrConstructorTypeNode(node: Node): Type { var links = getNodeLinks(node); if (!links.resolvedType) { // Deferred resolution of members is handled by resolveObjectTypeMembers @@ -3011,8 +3022,10 @@ module ts { return getTypeFromUnionTypeNode(node); case SyntaxKind.ParenType: return getTypeFromTypeNode((node).type); + case SyntaxKind.FunctionType: + case SyntaxKind.ConstructorType: case SyntaxKind.TypeLiteral: - return getTypeFromTypeLiteralNode(node); + return getTypeFromTypeLiteralOrFunctionOrConstructorTypeNode(node); // This function assumes that an identifier or qualified name is a type expression // Callers should first ensure this by calling isTypeNode case SyntaxKind.Identifier: @@ -3221,9 +3234,9 @@ module ts { // TYPE CHECKING - var subtypeRelation: Map = {}; - var assignableRelation: Map = {}; - var identityRelation: Map = {}; + var subtypeRelation: Map = {}; + var assignableRelation: Map = {}; + var identityRelation: Map = {}; function isTypeIdenticalTo(source: Type, target: Type): boolean { return checkTypeRelatedTo(source, target, identityRelation, /*errorNode*/ undefined); @@ -3258,7 +3271,7 @@ module ts { function checkTypeRelatedTo( source: Type, target: Type, - relation: Map, + relation: Map, errorNode: Node, headMessage?: DiagnosticMessage, containingMessageChain?: DiagnosticMessageChain): boolean { @@ -3266,6 +3279,7 @@ module ts { var errorInfo: DiagnosticMessageChain; var sourceStack: ObjectType[]; var targetStack: ObjectType[]; + var maybeStack: Map[]; var expandingFlags: number; var depth = 0; var overflow = false; @@ -3424,12 +3438,12 @@ module ts { var id = source.id + "," + target.id; var related = relation[id]; if (related !== undefined) { - return related; + return related ? Ternary.True : Ternary.False; } if (depth > 0) { for (var i = 0; i < depth; i++) { // If source and target are already being compared, consider them related with assumptions - if (source === sourceStack[i] && target === targetStack[i]) { + if (maybeStack[i][id]) { return Ternary.Maybe; } } @@ -3441,16 +3455,19 @@ module ts { else { sourceStack = []; targetStack = []; + maybeStack = []; expandingFlags = 0; } sourceStack[depth] = source; targetStack[depth] = target; + maybeStack[depth] = {}; + maybeStack[depth][id] = true; depth++; var saveExpandingFlags = expandingFlags; if (!(expandingFlags & 1) && isDeeplyNestedGeneric(source, sourceStack)) expandingFlags |= 1; if (!(expandingFlags & 2) && isDeeplyNestedGeneric(target, targetStack)) expandingFlags |= 2; if (expandingFlags === 3) { - var result = Ternary.True; + var result = Ternary.Maybe; } else { var result = propertiesRelatedTo(source, target, reportErrors); @@ -3469,9 +3486,18 @@ module ts { } expandingFlags = saveExpandingFlags; depth--; - // Only cache results that are free of assumptions - if (result !== Ternary.Maybe) { - relation[id] = result; + if (result) { + var maybeCache = maybeStack[depth]; + // If result is definitely true, copy assumptions to global cache, else copy to next level up + var destinationCache = result === Ternary.True || depth === 0 ? relation : maybeStack[depth - 1]; + for (var p in maybeCache) { + destinationCache[p] = maybeCache[p]; + } + } + else { + // A false result goes straight into global cache (when something is false under assumptions it + // will also be false without assumptions) + relation[id] = false; } return result; } @@ -4319,13 +4345,9 @@ module ts { var type = getTypeOfSymbol(symbol); // Only narrow when symbol is variable of a structured type if (node && (symbol.flags & SymbolFlags.Variable && type.flags & TypeFlags.Structured)) { - while (true) { + loop: while (true) { var child = node; node = node.parent; - // Stop at containing function or module block - if (!node || node.kind === SyntaxKind.FunctionBlock || node.kind === SyntaxKind.ModuleBlock) { - break; - } var narrowedType = type; switch (node.kind) { case SyntaxKind.IfStatement: @@ -4351,9 +4373,18 @@ module ts { } } break; + case SyntaxKind.SourceFile: + case SyntaxKind.ModuleDeclaration: + case SyntaxKind.FunctionDeclaration: + case SyntaxKind.Method: + case SyntaxKind.GetAccessor: + case SyntaxKind.SetAccessor: + case SyntaxKind.Constructor: + // Stop at the first containing function or module declaration + break loop; } - // Only use narrowed type if construct contains no assignments to variable - if (narrowedType !== type) { + // Use narrowed type if it is a subtype and construct contains no assignments to variable + if (narrowedType !== type && isTypeSubtypeOf(narrowedType, type)) { if (isVariableAssignedWithin(symbol, node)) { break; } @@ -4474,7 +4505,7 @@ module ts { if (symbol.flags & SymbolFlags.Import) { // Mark the import as referenced so that we emit it in the final .js file. // exception: identifiers that appear in type queries, const enums, modules that contain only const enums - getSymbolLinks(symbol).referenced = !isInTypeQuery(node) && !isConstEnumOrConstEnumOnlyModule(resolveImport(symbol)); + getSymbolLinks(symbol).referenced = getSymbolLinks(symbol).referenced || (!isInTypeQuery(node) && !isConstEnumOrConstEnumOnlyModule(resolveImport(symbol))); } checkCollisionWithCapturedSuperVariable(node, node); @@ -4991,7 +5022,15 @@ module ts { if (hasProperty(members, id)) { var member = members[id]; if (member.flags & SymbolFlags.Property) { - var type = checkExpression((member.declarations[0]).initializer, contextualMapper); + var memberDecl = member.declarations[0]; + var type: Type; + if (memberDecl.kind === SyntaxKind.PropertyAssignment) { + type = checkExpression(memberDecl.initializer, contextualMapper); + } + else { + Debug.assert(memberDecl.kind === SyntaxKind.ShorthandPropertyAssignment); + type = checkExpression(memberDecl.name, contextualMapper); + } var prop = createSymbol(SymbolFlags.Property | SymbolFlags.Transient | member.flags, member.name); prop.declarations = member.declarations; prop.parent = member.parent; @@ -5394,7 +5433,7 @@ module ts { return typeArgumentsAreAssignable; } - function checkApplicableSignature(node: CallLikeExpression, args: Node[], signature: Signature, relation: Map, excludeArgument: boolean[], reportErrors: boolean) { + function checkApplicableSignature(node: CallLikeExpression, args: Node[], signature: Signature, relation: Map, excludeArgument: boolean[], reportErrors: boolean) { for (var i = 0; i < args.length; i++) { var arg = args[i]; var argType: Type; @@ -5588,7 +5627,7 @@ module ts { return resolveErrorCall(node); - function chooseOverload(candidates: Signature[], relation: Map) { + function chooseOverload(candidates: Signature[], relation: Map) { for (var i = 0; i < candidates.length; i++) { if (!hasCorrectArity(node, args, candidates[i])) { continue; @@ -5853,7 +5892,11 @@ module ts { } if (node.kind === SyntaxKind.NewExpression) { var declaration = signature.declaration; - if (declaration && (declaration.kind !== SyntaxKind.Constructor && declaration.kind !== SyntaxKind.ConstructSignature)) { + if (declaration && + declaration.kind !== SyntaxKind.Constructor && + declaration.kind !== SyntaxKind.ConstructSignature && + declaration.kind !== SyntaxKind.ConstructorType) { + // When resolved signature is a call signature (and not a construct signature) the result type is any if (compilerOptions.noImplicitAny) { error(node, Diagnostics.new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type); @@ -6796,7 +6839,7 @@ module ts { function checkTypeLiteral(node: TypeLiteralNode) { forEach(node.members, checkSourceElement); if (fullTypeCheck) { - var type = getTypeFromTypeLiteralNode(node); + var type = getTypeFromTypeLiteralOrFunctionOrConstructorTypeNode(node); checkIndexConstraints(type); checkTypeForDuplicateIndexSignatures(node); } @@ -8270,6 +8313,8 @@ module ts { return checkParameter(node); case SyntaxKind.Property: return checkPropertyDeclaration(node); + case SyntaxKind.FunctionType: + case SyntaxKind.ConstructorType: case SyntaxKind.CallSignature: case SyntaxKind.ConstructSignature: case SyntaxKind.IndexSignature: @@ -8801,6 +8846,16 @@ module ts { return undefined; } + function getShorthandAssignmentValueSymbol(location: Node): Symbol { + // The function returns a value symbol of an identifier in the short-hand property assignment. + // This is necessary as an identifier in short-hand property assignment can contains two meaning: + // property name and property value. + if (location && location.kind === SyntaxKind.ShorthandPropertyAssignment) { + return resolveEntityName(location, (location).name, SymbolFlags.Value); + } + return undefined; + } + function getTypeOfNode(node: Node): Type { if (isInsideWithStatementBody(node)) { // We cannot answer semantic questions within a with block, do not proceed any further @@ -8969,6 +9024,12 @@ module ts { return getDiagnostics().length > 0 || getGlobalDiagnostics().length > 0; } + function isEmitBlocked(sourceFile?: SourceFile): boolean { + return program.getDiagnostics(sourceFile).length !== 0 || + hasEarlyErrors(sourceFile) || + (compilerOptions.noEmitOnError && getDiagnostics(sourceFile).length !== 0); + } + function hasEarlyErrors(sourceFile?: SourceFile): boolean { return forEach(getDiagnostics(sourceFile), d => d.isEarly); } @@ -9042,7 +9103,9 @@ module ts { function writeTypeAtLocation(location: Node, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter) { // Get type of the symbol if this is the valid symbol otherwise get type at location var symbol = getSymbolOfNode(location); - var type = symbol && !(symbol.flags & SymbolFlags.TypeLiteral) ? getTypeOfSymbol(symbol) : getTypeFromTypeNode(location); + var type = symbol && !(symbol.flags & (SymbolFlags.TypeLiteral | SymbolFlags.CallSignature | SymbolFlags.ConstructSignature)) + ? getTypeOfSymbol(symbol) + : getTypeFromTypeNode(location); getSymbolDisplayBuilder().buildTypeDisplay(type, writer, enclosingDeclaration, flags); } @@ -9055,22 +9118,22 @@ module ts { function invokeEmitter(targetSourceFile?: SourceFile) { var resolver: EmitResolver = { getProgram: () => program, - getLocalNameOfContainer: getLocalNameOfContainer, - getExpressionNamePrefix: getExpressionNamePrefix, - getExportAssignmentName: getExportAssignmentName, - isReferencedImportDeclaration: isReferencedImportDeclaration, - getNodeCheckFlags: getNodeCheckFlags, - getEnumMemberValue: getEnumMemberValue, - isTopLevelValueImportWithEntityName: isTopLevelValueImportWithEntityName, - hasSemanticErrors: hasSemanticErrors, - hasEarlyErrors: hasEarlyErrors, - isDeclarationVisible: isDeclarationVisible, - isImplementationOfOverload: isImplementationOfOverload, - writeTypeAtLocation: writeTypeAtLocation, - writeReturnTypeOfSignatureDeclaration: writeReturnTypeOfSignatureDeclaration, - isSymbolAccessible: isSymbolAccessible, - isImportDeclarationEntityNameReferenceDeclarationVisibile: isImportDeclarationEntityNameReferenceDeclarationVisibile, - getConstantValue: getConstantValue, + getLocalNameOfContainer, + getExpressionNamePrefix, + getExportAssignmentName, + isReferencedImportDeclaration, + getNodeCheckFlags, + getEnumMemberValue, + isTopLevelValueImportWithEntityName, + hasSemanticErrors, + isEmitBlocked, + isDeclarationVisible, + isImplementationOfOverload, + writeTypeAtLocation, + writeReturnTypeOfSignatureDeclaration, + isSymbolAccessible, + isImportDeclarationEntityNameReferenceDeclarationVisibile, + getConstantValue, }; checkProgram(); return emitFiles(resolver, targetSourceFile); @@ -9102,7 +9165,12 @@ module ts { globalNumberType = getGlobalType("Number"); globalBooleanType = getGlobalType("Boolean"); globalRegExpType = getGlobalType("RegExp"); - globalTemplateStringsArrayType = getGlobalType("TemplateStringsArray"); + + // If we're in ES6 mode, load the TemplateStringsArray. + // Otherwise, default to 'unknown' for the purposes of type checking in LS scenarios. + globalTemplateStringsArrayType = compilerOptions.target >= ScriptTarget.ES6 + ? getGlobalType("TemplateStringsArray") + : unknownType; } initializeTypeChecker(); diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index fed7c991b2e..3fabf6c8588 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -54,6 +54,11 @@ module ts { paramType: Diagnostics.KIND, error: Diagnostics.Argument_for_module_option_must_be_commonjs_or_amd }, + { + name: "noEmitOnError", + type: "boolean", + description: Diagnostics.Do_not_emit_outputs_if_any_type_checking_errors_were_reported, + }, { name: "noImplicitAny", type: "boolean", @@ -148,9 +153,9 @@ module ts { parseStrings(commandLine); return { - options: options, - filenames: filenames, - errors: errors + options, + filenames, + errors }; function parseStrings(args: string[]) { diff --git a/src/compiler/core.ts b/src/compiler/core.ts index 4b412d051dd..6bbf9a13d03 100644 --- a/src/compiler/core.ts +++ b/src/compiler/core.ts @@ -258,9 +258,9 @@ module ts { } return { - file: file, - start: start, - length: length, + file, + start, + length, messageText: text, category: message.category, @@ -335,12 +335,12 @@ module ts { } return { - file: file, - start: start, - length: length, - code: code, - category: category, - messageText: messageText + file, + start, + length, + code, + category, + messageText }; } diff --git a/src/compiler/diagnosticInformationMap.generated.ts b/src/compiler/diagnosticInformationMap.generated.ts index 349601a6db8..213661fdd60 100644 --- a/src/compiler/diagnosticInformationMap.generated.ts +++ b/src/compiler/diagnosticInformationMap.generated.ts @@ -122,6 +122,9 @@ module ts { let_declarations_can_only_be_declared_inside_a_block: { code: 1157, category: DiagnosticCategory.Error, key: "'let' declarations can only be declared inside a block." }, Invalid_template_literal_expected: { code: 1158, category: DiagnosticCategory.Error, key: "Invalid template literal; expected '}'" }, Tagged_templates_are_only_available_when_targeting_ECMAScript_6_and_higher: { code: 1159, category: DiagnosticCategory.Error, key: "Tagged templates are only available when targeting ECMAScript 6 and higher." }, + Unterminated_template_literal: { code: 1160, category: DiagnosticCategory.Error, key: "Unterminated template literal." }, + Unterminated_regular_expression_literal: { code: 1161, category: DiagnosticCategory.Error, key: "Unterminated regular expression literal." }, + A_object_member_cannot_be_declared_optional: { code: 1160, category: DiagnosticCategory.Error, key: "A object member cannot be declared optional." }, Duplicate_identifier_0: { code: 2300, category: DiagnosticCategory.Error, key: "Duplicate identifier '{0}'." }, Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor: { code: 2301, category: DiagnosticCategory.Error, key: "Initializer of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor." }, Static_members_cannot_reference_class_type_parameters: { code: 2302, category: DiagnosticCategory.Error, key: "Static members cannot reference class type parameters." }, @@ -270,6 +273,7 @@ module ts { Type_argument_candidate_1_is_not_a_valid_type_argument_because_it_is_not_a_supertype_of_candidate_0: { code: 2455, category: DiagnosticCategory.Error, key: "Type argument candidate '{1}' is not a valid type argument because it is not a supertype of candidate '{0}'." }, Type_alias_0_circularly_references_itself: { code: 2456, category: DiagnosticCategory.Error, key: "Type alias '{0}' circularly references itself." }, Type_alias_name_cannot_be_0: { code: 2457, category: DiagnosticCategory.Error, key: "Type alias name cannot be '{0}'" }, + An_AMD_module_cannot_have_multiple_name_assignments: { code: 2458, category: DiagnosticCategory.Error, key: "An AMD module cannot have multiple name assignments." }, Import_declaration_0_is_using_private_name_1: { code: 4000, category: DiagnosticCategory.Error, key: "Import declaration '{0}' is using private name '{1}'." }, Type_parameter_0_of_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 4001, category: DiagnosticCategory.Error, key: "Type parameter '{0}' of exported class has or is using name '{1}' from private module '{2}'." }, Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: { code: 4002, category: DiagnosticCategory.Error, key: "Type parameter '{0}' of exported class has or is using private name '{1}'." }, @@ -373,6 +377,7 @@ module ts { Watch_input_files: { code: 6005, category: DiagnosticCategory.Message, key: "Watch input files." }, Redirect_output_structure_to_the_directory: { code: 6006, category: DiagnosticCategory.Message, key: "Redirect output structure to the directory." }, Do_not_erase_const_enum_declarations_in_generated_code: { code: 6007, category: DiagnosticCategory.Message, key: "Do not erase const enum declarations in generated code." }, + Do_not_emit_outputs_if_any_type_checking_errors_were_reported: { code: 6008, category: DiagnosticCategory.Message, key: "Do not emit outputs if any type checking errors were reported." }, Do_not_emit_comments_to_output: { code: 6009, category: DiagnosticCategory.Message, key: "Do not emit comments to output." }, Specify_ECMAScript_target_version_Colon_ES3_default_ES5_or_ES6_experimental: { code: 6015, category: DiagnosticCategory.Message, key: "Specify ECMAScript target version: 'ES3' (default), 'ES5', or 'ES6' (experimental)" }, Specify_module_code_generation_Colon_commonjs_or_amd: { code: 6016, category: DiagnosticCategory.Message, key: "Specify module code generation: 'commonjs' or 'amd'" }, diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 7359abefb60..cd2e209e3eb 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -479,6 +479,19 @@ "category": "Error", "code": 1159 }, + "Unterminated template literal.": { + "category": "Error", + "code": 1160 + }, + "Unterminated regular expression literal.": { + "category": "Error", + "code": 1161 + }, + + "A object member cannot be declared optional.": { + "category": "Error", + "code": 1160 + }, "Duplicate identifier '{0}'.": { "category": "Error", @@ -1076,6 +1089,10 @@ "category": "Error", "code": 2457 }, + "An AMD module cannot have multiple name assignments.": { + "category": "Error", + "code": 2458 + }, "Import declaration '{0}' is using private name '{1}'.": { "category": "Error", @@ -1490,6 +1507,10 @@ "category": "Message", "code": 6007 }, + "Do not emit outputs if any type checking errors were reported.": { + "category": "Message", + "code": 6008 + }, "Do not emit comments to output.": { "category": "Message", "code": 6009 diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index eb423e214a9..b9ea76c415b 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -104,9 +104,9 @@ module ts { } }); return { - firstAccessor: firstAccessor, - getAccessor: getAccessor, - setAccessor: setAccessor + firstAccessor, + getAccessor, + setAccessor }; } @@ -139,7 +139,7 @@ module ts { function writeLiteral(s: string) { if (s && s.length) { write(s); - var lineStartsOfS = getLineStarts(s); + var lineStartsOfS = computeLineStarts(s); if (lineStartsOfS.length > 1) { lineCount = lineCount + lineStartsOfS.length - 1; linePos = output.length - s.length + lineStartsOfS[lineStartsOfS.length - 1]; @@ -927,13 +927,14 @@ module ts { } } - function isNonExpressionIdentifier(node: Identifier) { + function isNotExpressionIdentifier(node: Identifier) { var parent = node.parent; switch (parent.kind) { case SyntaxKind.Parameter: case SyntaxKind.VariableDeclaration: case SyntaxKind.Property: case SyntaxKind.PropertyAssignment: + case SyntaxKind.ShorthandPropertyAssignment: case SyntaxKind.EnumMember: case SyntaxKind.Method: case SyntaxKind.FunctionDeclaration: @@ -957,17 +958,24 @@ module ts { } } - function emitIdentifier(node: Identifier) { - if (!isNonExpressionIdentifier(node)) { - var prefix = resolver.getExpressionNamePrefix(node); - if (prefix) { - write(prefix); - write("."); - } + function emitExpressionIdentifier(node: Identifier) { + var prefix = resolver.getExpressionNamePrefix(node); + if (prefix) { + write(prefix); + write("."); } write(getSourceTextOfLocalNode(node)); } + function emitIdentifier(node: Identifier) { + if (!isNotExpressionIdentifier(node)) { + emitExpressionIdentifier(node); + } + else { + write(getSourceTextOfLocalNode(node)); + } + } + function emitThis(node: Node) { if (resolver.getNodeCheckFlags(node) & NodeCheckFlags.LexicalThis) { write("_this"); @@ -1033,6 +1041,36 @@ module ts { emitTrailingComments(node); } + function emitShortHandPropertyAssignment(node: ShortHandPropertyDeclaration) { + function emitAsNormalPropertyAssignment() { + emitLeadingComments(node); + // Emit identifier as an identifier + emit(node.name); + write(": "); + // Even though this is stored as identified because it is in short-hand property assignment, + // treated it as expression + emitExpressionIdentifier(node.name); + emitTrailingComments(node); + } + + if (compilerOptions.target < ScriptTarget.ES6) { + emitAsNormalPropertyAssignment(); + } + else if (compilerOptions.target >= ScriptTarget.ES6) { + // If short-hand property has a prefix, then regardless of the target version, we will emit it as normal property assignment + var prefix = resolver.getExpressionNamePrefix(node.name); + if (prefix) { + emitAsNormalPropertyAssignment(); + } + // If short-hand property has no prefix, emit it as short-hand. + else { + emitLeadingComments(node); + emit(node.name); + emitTrailingComments(node); + } + } + } + function tryEmitConstantValue(node: PropertyAccess | IndexedAccess): boolean { var constantValue = resolver.getConstantValue(node); if (constantValue !== undefined) { @@ -2096,7 +2134,11 @@ module ts { function emitAMDModule(node: SourceFile, startIndex: number) { var imports = getExternalImportDeclarations(node); writeLine(); - write("define([\"require\", \"exports\""); + write("define("); + if(node.amdModuleName) { + write("\"" + node.amdModuleName + "\", "); + } + write("[\"require\", \"exports\""); forEach(imports, imp => { write(", "); emitLiteral(imp.externalModuleName); @@ -2250,6 +2292,8 @@ module ts { return emitObjectLiteral(node); case SyntaxKind.PropertyAssignment: return emitPropertyAssignment(node); + case SyntaxKind.ShorthandPropertyAssignment: + return emitShortHandPropertyAssignment(node); case SyntaxKind.PropertyAccess: return emitPropertyAccess(node); case SyntaxKind.IndexedAccess: @@ -2743,7 +2787,7 @@ module ts { Diagnostics.Exported_type_alias_0_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Exported_type_alias_0_has_or_is_using_private_name_1; return { - diagnosticMessage: diagnosticMessage, + diagnosticMessage, errorNode: node, typeName: node.name }; @@ -2840,7 +2884,7 @@ module ts { } return { - diagnosticMessage: diagnosticMessage, + diagnosticMessage, errorNode: node, typeName: node.name }; @@ -2905,7 +2949,7 @@ module ts { } return { - diagnosticMessage: diagnosticMessage, + diagnosticMessage, errorNode: node, typeName: (node.parent).name }; @@ -3087,7 +3131,7 @@ module ts { Diagnostics.Parameter_0_of_public_property_setter_from_exported_class_has_or_is_using_private_name_1; } return { - diagnosticMessage: diagnosticMessage, + diagnosticMessage, errorNode: node.parameters[0], // TODO(jfreeman): Investigate why we are passing node.name instead of node.parameters[0].name typeName: node.name @@ -3109,7 +3153,7 @@ module ts { Diagnostics.Return_type_of_public_property_getter_from_exported_class_has_or_is_using_private_name_0; } return { - diagnosticMessage: diagnosticMessage, + diagnosticMessage, errorNode: node.name, typeName: undefined }; @@ -3239,7 +3283,7 @@ module ts { } return { - diagnosticMessage: diagnosticMessage, + diagnosticMessage, errorNode: node.name || node, }; } @@ -3324,7 +3368,7 @@ module ts { } return { - diagnosticMessage: diagnosticMessage, + diagnosticMessage, errorNode: node, typeName: node.name }; @@ -3458,10 +3502,10 @@ module ts { } var hasSemanticErrors = resolver.hasSemanticErrors(); - var hasEarlyErrors = resolver.hasEarlyErrors(targetSourceFile); + var isEmitBlocked = resolver.isEmitBlocked(targetSourceFile); function emitFile(jsFilePath: string, sourceFile?: SourceFile) { - if (!hasEarlyErrors) { + if (!isEmitBlocked) { emitJavaScript(jsFilePath, sourceFile); if (!hasSemanticErrors && compilerOptions.declaration) { emitDeclarations(jsFilePath, sourceFile); @@ -3504,22 +3548,22 @@ module ts { var hasEmitterError = forEach(diagnostics, diagnostic => diagnostic.category === DiagnosticCategory.Error); // Check and update returnCode for syntactic and semantic - var returnCode: EmitReturnStatus; - if (hasEarlyErrors) { - returnCode = EmitReturnStatus.AllOutputGenerationSkipped; + var emitResultStatus: EmitReturnStatus; + if (isEmitBlocked) { + emitResultStatus = EmitReturnStatus.AllOutputGenerationSkipped; } else if (hasEmitterError) { - returnCode = EmitReturnStatus.EmitErrorsEncountered; + emitResultStatus = EmitReturnStatus.EmitErrorsEncountered; } else if (hasSemanticErrors && compilerOptions.declaration) { - returnCode = EmitReturnStatus.DeclarationGenerationSkipped; + emitResultStatus = EmitReturnStatus.DeclarationGenerationSkipped; } else if (hasSemanticErrors && !compilerOptions.declaration) { - returnCode = EmitReturnStatus.JSGeneratedWithSemanticErrors; + emitResultStatus = EmitReturnStatus.JSGeneratedWithSemanticErrors; } else { - returnCode = EmitReturnStatus.Succeeded; + emitResultStatus = EmitReturnStatus.Succeeded; } return { - emitResultStatus: returnCode, - errors: diagnostics, + emitResultStatus, + diagnostics, sourceMaps: sourceMapDataList }; } diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 6d6c2d4db62..3939270a96a 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -20,6 +20,7 @@ module ts { interface ReferenceComments { referencedFiles: FileReference[]; amdDependencies: string[]; + amdModuleName: string; } export function getSourceFileOfNode(node: Node): SourceFile { @@ -34,12 +35,16 @@ module ts { return file.filename + "(" + loc.line + "," + loc.character + ")"; } - export function getStartPosOfNode(node: Node): number { return node.pos; } export function getTokenPosOfNode(node: Node, sourceFile?: SourceFile): number { + // With nodes that have no width (i.e. 'Missing' nodes), we actually *don't* + // want to skip trivia because this will launch us forward to the next token. + if (node.pos === node.end) { + return node.pos; + } return skipTrivia((sourceFile || getSourceFileOfNode(node)).text, node.pos); } @@ -198,9 +203,12 @@ module ts { child((node).initializer); case SyntaxKind.Property: case SyntaxKind.PropertyAssignment: + case SyntaxKind.ShorthandPropertyAssignment: return child((node).name) || child((node).type) || child((node).initializer); + case SyntaxKind.FunctionType: + case SyntaxKind.ConstructorType: case SyntaxKind.CallSignature: case SyntaxKind.ConstructSignature: case SyntaxKind.IndexSignature: @@ -574,6 +582,7 @@ module ts { case SyntaxKind.VariableDeclaration: case SyntaxKind.Property: case SyntaxKind.PropertyAssignment: + case SyntaxKind.ShorthandPropertyAssignment: case SyntaxKind.EnumMember: case SyntaxKind.Method: case SyntaxKind.FunctionDeclaration: @@ -774,13 +783,12 @@ module ts { if (matchResult) { var start = commentRange.pos; var end = commentRange.end; - var fileRef = { - pos: start, - end: end, - filename: matchResult[3] - }; return { - fileReference: fileRef, + fileReference: { + pos: start, + end: end, + filename: matchResult[3] + }, isNoDefaultLib: false }; } @@ -944,26 +952,24 @@ module ts { } return { - addLabel: addLabel, - pushCurrentLabelSet: pushCurrentLabelSet, - pushFunctionBoundary: pushFunctionBoundary, - pop: pop, - nodeIsNestedInLabel: nodeIsNestedInLabel, + addLabel, + pushCurrentLabelSet, + pushFunctionBoundary, + pop, + nodeIsNestedInLabel, }; })(); - function getLineAndCharacterlFromSourcePosition(position: number) { - if (!lineStarts) { - lineStarts = getLineStarts(sourceText); - } - return getLineAndCharacterOfPosition(lineStarts, position); + function getLineStarts(): number[] { + return lineStarts || (lineStarts = computeLineStarts(sourceText)); + } + + function getLineAndCharacterFromSourcePosition(position: number) { + return getLineAndCharacterOfPosition(getLineStarts(), position); } function getPositionFromSourceLineAndCharacter(line: number, character: number): number { - if (!lineStarts) { - lineStarts = getLineStarts(sourceText); - } - return getPositionFromLineAndCharacter(lineStarts, line, character); + return getPositionFromLineAndCharacter(getLineStarts(), line, character); } function error(message: DiagnosticMessage, arg0?: any, arg1?: any, arg2?: any): void { @@ -1006,7 +1012,9 @@ module ts { ? file.syntacticErrors[file.syntacticErrors.length - 1].start : -1; if (start !== lastErrorPos) { - file.syntacticErrors.push(createFileDiagnostic(file, start, length, message, arg0, arg1, arg2)); + var diagnostic = createFileDiagnostic(file, start, length, message, arg0, arg1, arg2); + diagnostic.isParseError = true; + file.syntacticErrors.push(diagnostic); } if (lookAheadMode === LookAheadMode.NoErrorYet) { @@ -1674,8 +1682,8 @@ module ts { } return { - typeParameters: typeParameters, - parameters: parameters, + typeParameters, + parameters, type: type }; } @@ -1886,16 +1894,16 @@ module ts { return finishNode(node); } - function parseFunctionType(signatureKind: SyntaxKind): TypeLiteralNode { - var node = createNode(SyntaxKind.TypeLiteral); - var member = createNode(signatureKind); - var sig = parseSignature(signatureKind, SyntaxKind.EqualsGreaterThanToken, /* returnTokenRequired */ true); + function parseFunctionType(typeKind: SyntaxKind): SignatureDeclaration { + var member = createNode(typeKind); + var sig = parseSignature(typeKind === SyntaxKind.FunctionType ? SyntaxKind.CallSignature : SyntaxKind.ConstructSignature, + SyntaxKind.EqualsGreaterThanToken, /* returnTokenRequired */ true); + member.typeParameters = sig.typeParameters; member.parameters = sig.parameters; member.type = sig.type; finishNode(member); - node.members = createNodeArray(member); - return finishNode(node); + return member; } function parseKeywordAndNoDot(): Node { @@ -2015,10 +2023,10 @@ module ts { function parseType(): TypeNode { if (isStartOfFunctionType()) { - return parseFunctionType(SyntaxKind.CallSignature); + return parseFunctionType(SyntaxKind.FunctionType); } if (token === SyntaxKind.NewKeyword) { - return parseFunctionType(SyntaxKind.ConstructSignature); + return parseFunctionType(SyntaxKind.ConstructorType); } return parseUnionType(); } @@ -2731,10 +2739,14 @@ module ts { return finishNode(node); } - function parsePropertyAssignment(): PropertyDeclaration { - var node = createNode(SyntaxKind.PropertyAssignment); - node.name = parsePropertyName(); + function parsePropertyAssignment(): Declaration { + var nodePos = scanner.getStartPos(); + var nameToken = token; + var propertyName = parsePropertyName(); + var node: Declaration; if (token === SyntaxKind.OpenParenToken || token === SyntaxKind.LessThanToken) { + node = createNode(SyntaxKind.PropertyAssignment, nodePos); + node.name = propertyName; var sig = parseSignature(SyntaxKind.CallSignature, SyntaxKind.ColonToken, /* returnTokenRequired */ false); var body = parseBody(/* ignoreMissingOpenBrace */ false); // do not propagate property name as name for function expression @@ -2742,11 +2754,26 @@ module ts { // var x = 1; // var y = { x() { } } // otherwise this will bring y.x into the scope of x which is incorrect - node.initializer = makeFunctionExpression(SyntaxKind.FunctionExpression, node.pos, undefined, sig, body); + (node).initializer = makeFunctionExpression(SyntaxKind.FunctionExpression, node.pos, undefined, sig, body); + return finishNode(node); + } + // Disallow optional property assignment + if (token === SyntaxKind.QuestionToken) { + var questionStart = scanner.getTokenPos(); + grammarErrorAtPos(questionStart, scanner.getStartPos() - questionStart, Diagnostics.A_object_member_cannot_be_declared_optional); + nextToken(); + } + + // Parse to check if it is short-hand property assignment or normal property assignment + if (token !== SyntaxKind.ColonToken && nameToken === SyntaxKind.Identifier) { + node = createNode(SyntaxKind.ShorthandPropertyAssignment, nodePos); + node.name = propertyName; } else { + node = createNode(SyntaxKind.PropertyAssignment, nodePos); + node.name = propertyName; parseExpected(SyntaxKind.ColonToken); - node.initializer = parseAssignmentExpression(false); + (node).initializer = parseAssignmentExpression(false); } return finishNode(node); } @@ -2796,6 +2823,9 @@ module ts { if (p.kind === SyntaxKind.PropertyAssignment) { currentKind = Property; } + else if (p.kind === SyntaxKind.ShorthandPropertyAssignment) { + currentKind = Property; + } else if (p.kind === SyntaxKind.GetAccessor) { currentKind = GetAccessor; } @@ -4226,6 +4256,7 @@ module ts { function processReferenceComments(): ReferenceComments { var referencedFiles: FileReference[] = []; var amdDependencies: string[] = []; + var amdModuleName: string; commentRanges = []; token = scanner.scan(); @@ -4245,6 +4276,15 @@ module ts { } } else { + var amdModuleNameRegEx = /^\/\/\/\s*createRootNode(SyntaxKind.SourceFile, 0, sourceText.length, rootNodeFlags); file.filename = normalizePath(filename); file.text = sourceText; - file.getLineAndCharacterFromPosition = getLineAndCharacterlFromSourcePosition; + file.getLineAndCharacterFromPosition = getLineAndCharacterFromSourcePosition; file.getPositionFromLineAndCharacter = getPositionFromSourceLineAndCharacter; + file.getLineStarts = getLineStarts; file.syntacticErrors = []; file.semanticErrors = []; var referenceComments = processReferenceComments(); file.referencedFiles = referenceComments.referencedFiles; file.amdDependencies = referenceComments.amdDependencies; + file.amdModuleName = referenceComments.amdModuleName; file.statements = parseList(ParsingContext.SourceElements, /*checkForStrictMode*/ true, parseSourceElement); file.externalModuleIndicator = getExternalModuleIndicator(); file.nodeCount = nodeCount; diff --git a/src/compiler/scanner.ts b/src/compiler/scanner.ts index 29593ddf92e..e08f481ba9c 100644 --- a/src/compiler/scanner.ts +++ b/src/compiler/scanner.ts @@ -246,7 +246,7 @@ module ts { return tokenStrings[t]; } - export function getLineStarts(text: string): number[] { + export function computeLineStarts(text: string): number[] { var result: number[] = new Array(); var pos = 0; var lineStart = 0; @@ -294,7 +294,7 @@ module ts { } export function positionToLineAndCharacter(text: string, pos: number) { - var lineStarts = getLineStarts(text); + var lineStarts = computeLineStarts(text); return getLineAndCharacterOfPosition(lineStarts, pos); } @@ -553,7 +553,7 @@ module ts { while (true) { if (pos >= len) { result += text.substring(start, pos); - error(Diagnostics.Unexpected_end_of_text); + error(Diagnostics.Unterminated_string_literal); break; } var ch = text.charCodeAt(pos); @@ -593,7 +593,7 @@ module ts { while (true) { if (pos >= len) { contents += text.substring(start, pos); - error(Diagnostics.Unexpected_end_of_text); + error(Diagnostics.Unterminated_template_literal); resultingToken = startedWithBacktick ? SyntaxKind.NoSubstitutionTemplateLiteral : SyntaxKind.TemplateTail; break; } @@ -1066,19 +1066,19 @@ module ts { var inEscape = false; var inCharacterClass = false; while (true) { - // If we've hit EOF without closing off the regex, - // simply return the token we originally parsed. + // If we reach the end of a file, or hit a newline, then this is an unterminated + // regex. Report error and return what we have so far. if (p >= len) { - return token; + error(Diagnostics.Unterminated_regular_expression_literal) + break; } var ch = text.charCodeAt(p); - - // Line breaks are not permissible in the middle of a RegExp. if (isLineBreak(ch)) { - return token; + error(Diagnostics.Unterminated_regular_expression_literal) + break; } - + if (inEscape) { // Parsing an escape character; // reset the flag and just advance to the next char. @@ -1087,6 +1087,7 @@ module ts { else if (ch === CharacterCodes.slash && !inCharacterClass) { // A slash within a character class is permissible, // but in general it signals the end of the regexp literal. + p++; break; } else if (ch === CharacterCodes.openBracket) { @@ -1100,8 +1101,8 @@ module ts { } p++; } - p++; - while (isIdentifierPart(text.charCodeAt(p))) { + + while (p < len && isIdentifierPart(text.charCodeAt(p))) { p++; } pos = p; @@ -1166,13 +1167,13 @@ module ts { hasPrecedingLineBreak: () => precedingLineBreak, isIdentifier: () => token === SyntaxKind.Identifier || token > SyntaxKind.LastReservedWord, isReservedWord: () => token >= SyntaxKind.FirstReservedWord && token <= SyntaxKind.LastReservedWord, - reScanGreaterToken: reScanGreaterToken, - reScanSlashToken: reScanSlashToken, - reScanTemplateToken: reScanTemplateToken, - scan: scan, - setText: setText, - setTextPos: setTextPos, - tryScan: tryScan, + reScanGreaterToken, + reScanSlashToken, + reScanTemplateToken, + scan, + setText, + setTextPos, + tryScan, }; } } diff --git a/src/compiler/sys.ts b/src/compiler/sys.ts index d685a30d959..e58d08589ba 100644 --- a/src/compiler/sys.ts +++ b/src/compiler/sys.ts @@ -99,14 +99,14 @@ var sys: System = (function () { } return { - args: args, + args, newLine: "\r\n", useCaseSensitiveFileNames: false, write(s: string): void { WScript.StdOut.Write(s); }, - readFile: readFile, - writeFile: writeFile, + readFile, + writeFile, resolvePath(path: string): string { return fso.GetAbsolutePathName(path); }, @@ -191,8 +191,8 @@ var sys: System = (function () { // 1 is a standard descriptor for stdout _fs.writeSync(1, s); }, - readFile: readFile, - writeFile: writeFile, + readFile, + writeFile, watchFile: (fileName, callback) => { // watchFile polls a file every 250ms, picking up file notifications. _fs.watchFile(fileName, { persistent: true, interval: 250 }, fileChanged); diff --git a/src/compiler/tsc.ts b/src/compiler/tsc.ts index 15f231bc74e..79972c7a891 100644 --- a/src/compiler/tsc.ts +++ b/src/compiler/tsc.ts @@ -192,12 +192,12 @@ module ts { } return { - getSourceFile: getSourceFile, + getSourceFile, getDefaultLibFilename: () => combinePaths(getDirectoryPath(normalizePath(sys.getExecutingFilePath())), "lib.d.ts"), - writeFile: writeFile, + writeFile, getCurrentDirectory: () => currentDirectory || (currentDirectory = sys.getCurrentDirectory()), useCaseSensitiveFileNames: () => sys.useCaseSensitiveFileNames, - getCanonicalFileName: getCanonicalFileName, + getCanonicalFileName, getNewLine: () => sys.newLine }; } @@ -362,17 +362,17 @@ module ts { var checker = program.getTypeChecker(/*fullTypeCheckMode*/ true); var checkStart = new Date().getTime(); errors = checker.getDiagnostics(); - if (!checker.hasEarlyErrors()) { + if (checker.isEmitBlocked()) { + exitStatus = EmitReturnStatus.AllOutputGenerationSkipped; + } + else { var emitStart = new Date().getTime(); - var emitOutput = checker.emitFiles(); - var emitErrors = emitOutput.errors; + var emitOutput = checker.invokeEmitter(); + var emitErrors = emitOutput.diagnostics; exitStatus = emitOutput.emitResultStatus; var reportStart = new Date().getTime(); errors = concatenate(errors, emitErrors); } - else { - exitStatus = EmitReturnStatus.AllOutputGenerationSkipped; - } } reportDiagnostics(errors); @@ -394,7 +394,7 @@ module ts { reportTimeStatistic("Total time", reportStart - parseStart); } - return { program: program, exitStatus: exitStatus } + return { program, exitStatus }; } function printVersion() { diff --git a/src/compiler/types.ts b/src/compiler/types.ts index d7d4ba48b08..2f195332cc2 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -155,6 +155,8 @@ module ts { IndexSignature, // Type TypeReference, + FunctionType, + ConstructorType, TypeQuery, TypeLiteral, ArrayType, @@ -165,6 +167,7 @@ module ts { ArrayLiteral, ObjectLiteral, PropertyAssignment, + ShorthandPropertyAssignment, PropertyAccess, IndexedAccess, CallExpression, @@ -245,7 +248,11 @@ module ts { FirstLiteralToken = NumericLiteral, LastLiteralToken = NoSubstitutionTemplateLiteral, FirstTemplateToken = NoSubstitutionTemplateLiteral, - LastTemplateToken = TemplateTail + LastTemplateToken = TemplateTail, + FirstOperator = SemicolonToken, + LastOperator = CaretEqualsToken, + FirstBinaryOperator = LessThanToken, + LastBinaryOperator = CaretEqualsToken } export const enum NodeFlags { @@ -329,6 +336,10 @@ module ts { initializer?: Expression; } + export interface ShortHandPropertyDeclaration extends Declaration { + name: Identifier; + } + export interface ParameterDeclaration extends VariableDeclaration { } /** @@ -627,9 +638,11 @@ module ts { export interface SourceFile extends Block { filename: string; text: string; - getLineAndCharacterFromPosition(position: number): { line: number; character: number }; + getLineAndCharacterFromPosition(position: number): LineAndCharacter; getPositionFromLineAndCharacter(line: number, character: number): number; + getLineStarts(): number[]; amdDependencies: string[]; + amdModuleName: string; referencedFiles: FileReference[]; syntacticErrors: Diagnostic[]; semanticErrors: Diagnostic[]; @@ -688,7 +701,7 @@ module ts { export interface EmitResult { emitResultStatus: EmitReturnStatus; - errors: Diagnostic[]; + diagnostics: Diagnostic[]; sourceMaps: SourceMapData[]; // Array of sourceMapData if compiler emitted sourcemaps } @@ -701,7 +714,7 @@ module ts { getSymbolCount(): number; getTypeCount(): number; checkProgram(): void; - emitFiles(targetSourceFile?: SourceFile): EmitResult; + invokeEmitter(targetSourceFile?: SourceFile): EmitResult; getParentOfSymbol(symbol: Symbol): Symbol; getNarrowedTypeOfSymbol(symbol: Symbol, node: Node): Type; getDeclaredTypeOfSymbol(symbol: Symbol): Type; @@ -712,6 +725,7 @@ module ts { getReturnTypeOfSignature(signature: Signature): Type; getSymbolsInScope(location: Node, meaning: SymbolFlags): Symbol[]; getSymbolInfo(node: Node): Symbol; + getShorthandAssignmentValueSymbol(location: Node): Symbol; getTypeOfNode(node: Node): Type; typeToString(type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags): string; symbolToString(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): string; @@ -724,8 +738,8 @@ module ts { getSignatureFromDeclaration(declaration: SignatureDeclaration): Signature; isImplementationOfOverload(node: FunctionLikeDeclaration): boolean; isUndefinedSymbol(symbol: Symbol): boolean; - isArgumentsSymbol(symbol: Symbol): boolean; - hasEarlyErrors(sourceFile?: SourceFile): boolean; + isArgumentsSymbol(symbol: Symbol): boolean; + isEmitBlocked(sourceFile?: SourceFile): boolean; // Returns the constant value of this enum member, or 'undefined' if the enum member has a computed value. getEnumMemberValue(node: EnumMember): number; isValidPropertyAccess(node: PropertyAccess, propertyName: string): boolean; @@ -816,7 +830,7 @@ module ts { isImportDeclarationEntityNameReferenceDeclarationVisibile(entityName: EntityName): SymbolAccessiblityResult; // Returns the constant value this property access resolves to, or 'undefined' for a non-constant getConstantValue(node: PropertyAccess | IndexedAccess): number; - hasEarlyErrors(sourceFile?: SourceFile): boolean; + isEmitBlocked(sourceFile?: SourceFile): boolean; } export const enum SymbolFlags { @@ -1121,7 +1135,16 @@ module ts { messageText: string; category: DiagnosticCategory; code: number; + /** + * Early error - any error (can be produced at parsing\binding\typechecking step) that blocks emit + */ isEarly?: boolean; + /** + * Parse error - error produced by parser when it scanner returns a token + * that parser does not understand in its current state + * (as opposed to grammar error when parser can interpret the token but interpretation is not legal from the grammar perespective) + */ + isParseError?: boolean; } export enum DiagnosticCategory { @@ -1140,6 +1163,7 @@ module ts { locale?: string; mapRoot?: string; module?: ModuleKind; + noEmitOnError?: boolean; noErrorTruncation?: boolean; noImplicitAny?: boolean; noLib?: boolean; diff --git a/src/harness/compilerRunner.ts b/src/harness/compilerRunner.ts index 7045a1196d0..cc04d4813a1 100644 --- a/src/harness/compilerRunner.ts +++ b/src/harness/compilerRunner.ts @@ -175,7 +175,12 @@ class CompilerBaselineRunner extends RunnerBase { it('Correct sourcemap content for ' + fileName, () => { if (options.sourceMap) { Harness.Baseline.runBaseline('Correct sourcemap content for ' + fileName, justName.replace(/\.ts$/, '.sourcemap.txt'), () => { - return result.getSourceMapRecord(); + var record = result.getSourceMapRecord(); + if (options.noEmitOnError && result.errors.length !== 0 && record === undefined) { + // Because of the noEmitOnError option no files are created. We need to return null because baselining isn't required. + return null; + } + return record; }); } }); @@ -246,6 +251,12 @@ class CompilerBaselineRunner extends RunnerBase { } Harness.Baseline.runBaseline('Correct Sourcemap output for ' + fileName, justName.replace(/\.ts/, '.js.map'), () => { + if (options.noEmitOnError && result.errors.length !== 0 && result.sourceMaps.length === 0) { + // We need to return null here or the runBaseLine will actually create a empty file. + // Baselining isn't required here because there is no output. + return null; + } + var sourceMapCode = ''; for (var i = 0; i < result.sourceMaps.length; i++) { sourceMapCode += '//// [' + Harness.Path.getFileName(result.sourceMaps[i].fileName) + ']\r\n'; diff --git a/src/harness/fourslash.ts b/src/harness/fourslash.ts index eb338f87027..88fb3639d1e 100644 --- a/src/harness/fourslash.ts +++ b/src/harness/fourslash.ts @@ -215,7 +215,7 @@ module FourSlash { } public setCancelled(numberOfCalls: number = 0): void { - TypeScript.Debug.assert(numberOfCalls >= 0); + ts.Debug.assert(numberOfCalls >= 0); this.numberOfCallsBeforeCancellation = numberOfCalls; } @@ -239,7 +239,7 @@ module FourSlash { // This function creates IScriptSnapshot object for testing getPreProcessedFileInfo // Return object may lack some functionalities for other purposes. - function createScriptSnapShot(sourceText: string): TypeScript.IScriptSnapshot { + function createScriptSnapShot(sourceText: string): ts.IScriptSnapshot { return { getText: (start: number, end: number) => { return sourceText.substr(start, end - start); @@ -250,8 +250,8 @@ module FourSlash { getLineStartPositions: () => { return []; }, - getChangeRange: (oldSnapshot: TypeScript.IScriptSnapshot) => { - return undefined; + getChangeRange: (oldSnapshot: ts.IScriptSnapshot) => { + return undefined; } }; } @@ -262,7 +262,7 @@ module FourSlash { private languageService: ts.LanguageService; // A reference to the language service's compiler state's compiler instance - private compiler: () => { getSyntaxTree(fileName: string): TypeScript.SyntaxTree; getSourceUnit(fileName: string): TypeScript.SourceUnitSyntax; }; + private compiler: () => { getSyntaxTree(fileName: string): ts.SourceFile }; // The current caret position in the active file public currentCaretPosition = 0; @@ -403,8 +403,9 @@ module FourSlash { public goToPosition(pos: number) { this.currentCaretPosition = pos; - var lineCharPos = TypeScript.LineMap1.fromString(this.getCurrentFileContent()).getLineAndCharacterFromPosition(pos); - this.scenarioActions.push(''); + var lineStarts = ts.computeLineStarts(this.getCurrentFileContent()); + var lineCharPos = ts.getLineAndCharacterOfPosition(lineStarts, pos); + this.scenarioActions.push(''); } public moveCaretRight(count = 1) { @@ -748,29 +749,6 @@ module FourSlash { } } - public verifyImplementorsCountIs(count: number, localFilesOnly: boolean = true) { - var implementors = this.getImplementorsAtCaret(); - var implementorsCount = 0; - - if (localFilesOnly) { - var localFiles = this.testData.files.map(file => file.fileName); - // Count only the references in local files. Filter the ones in lib and other files. - implementors.forEach((entry) => { - if (localFiles.some((filename) => filename === entry.fileName)) { - ++implementorsCount; - } - }); - } - else { - implementorsCount = implementors.length; - } - - if (implementorsCount !== count) { - var condition = localFilesOnly ? "excluding libs" : "including libs"; - this.raiseError("Expected implementors count (" + condition + ") to be " + count + ", but is actually " + implementors.length); - } - } - private getMemberListAtCaret() { return this.languageService.getCompletionsAtPosition(this.activeFile.fileName, this.currentCaretPosition, true); } @@ -787,10 +765,6 @@ module FourSlash { return this.languageService.getReferencesAtPosition(this.activeFile.fileName, this.currentCaretPosition); } - private getImplementorsAtCaret() { - return this.languageService.getImplementorsAtPosition(this.activeFile.fileName, this.currentCaretPosition); - } - private assertionMessage(name: string, actualValue: any, expectedValue: any) { return "\nActual " + name + ":\n\t" + actualValue + "\nExpected value:\n\t" + expectedValue; } @@ -1017,11 +991,11 @@ module FourSlash { private alignmentForExtraInfo = 50; - private spanInfoToString(pos: number, spanInfo: TypeScript.TextSpan, prefixString: string) { + private spanInfoToString(pos: number, spanInfo: ts.TextSpan, prefixString: string) { var resultString = "SpanInfo: " + JSON.stringify(spanInfo); if (spanInfo) { var spanString = this.activeFile.content.substr(spanInfo.start(), spanInfo.length()); - var spanLineMap = ts.getLineStarts(spanString); + var spanLineMap = ts.computeLineStarts(spanString); for (var i = 0; i < spanLineMap.length; i++) { if (!i) { resultString += "\n"; @@ -1034,8 +1008,8 @@ module FourSlash { return resultString; } - private baselineCurrentFileLocations(getSpanAtPos: (pos: number) => TypeScript.TextSpan): string { - var fileLineMap = ts.getLineStarts(this.activeFile.content); + private baselineCurrentFileLocations(getSpanAtPos: (pos: number) => ts.TextSpan): string { + var fileLineMap = ts.computeLineStarts(this.activeFile.content); var nextLine = 0; var resultString = ""; var currentLine: string; @@ -1748,14 +1722,14 @@ module FourSlash { public verifySemanticClassifications(expected: { classificationType: string; text: string }[]) { var actual = this.languageService.getSemanticClassifications(this.activeFile.fileName, - new TypeScript.TextSpan(0, this.activeFile.content.length)); + new ts.TextSpan(0, this.activeFile.content.length)); this.verifyClassifications(expected, actual); } public verifySyntacticClassifications(expected: { classificationType: string; text: string }[]) { var actual = this.languageService.getSyntacticClassifications(this.activeFile.fileName, - new TypeScript.TextSpan(0, this.activeFile.content.length)); + new ts.TextSpan(0, this.activeFile.content.length)); this.verifyClassifications(expected, actual); } @@ -1789,7 +1763,7 @@ module FourSlash { for (var i = 0; i < spans.length; i++) { var expectedSpan = spans[i]; var actualComment = actual[i]; - var actualCommentSpan = new TypeScript.TextSpan(actualComment.position, actualComment.message.length); + var actualCommentSpan = new ts.TextSpan(actualComment.position, actualComment.message.length); if (expectedSpan.start !== actualCommentSpan.start() || expectedSpan.end !== actualCommentSpan.end()) { this.raiseError('verifyOutliningSpans failed - span ' + (i + 1) + ' expected: (' + expectedSpan.start + ',' + expectedSpan.end + '), actual: (' + actualCommentSpan.start() + ',' + actualCommentSpan.end() + ')'); @@ -2240,15 +2214,16 @@ module FourSlash { (fn, contents) => result = contents, ts.ScriptTarget.Latest, sys.useCaseSensitiveFileNames); - var program = ts.createProgram([Harness.Compiler.fourslashFilename, fileName], { out: "fourslashTestOutput.js" }, host); + // TODO (drosen): We need to enforce checking on these tests. + var program = ts.createProgram([Harness.Compiler.fourslashFilename, fileName], { out: "fourslashTestOutput.js", noResolve: true }, host); var checker = ts.createTypeChecker(program, /*fullTypeCheckMode*/ true); checker.checkProgram(); - var errs = checker.getDiagnostics(program.getSourceFile(fileName)); + var errs = program.getDiagnostics().concat(checker.getDiagnostics()); if (errs.length > 0) { throw new Error('Error compiling ' + fileName + ': ' + errs.map(e => e.messageText).join('\r\n')); } - checker.emitFiles(); + checker.invokeEmitter(); result = result || ''; // Might have an empty fourslash file // Compile and execute the test @@ -2282,7 +2257,7 @@ module FourSlash { // List of all the subfiles we've parsed out var files: FourSlashFile[] = []; // Global options - var opts: { [s: string]: string; } = {}; + var globalOptions: { [s: string]: string; } = {}; // Marker positions // Split up the input file by line @@ -2290,7 +2265,7 @@ module FourSlash { // we have to string-based splitting instead and try to figure out the delimiting chars var lines = contents.split('\n'); - var markerMap: MarkerMap = {}; + var markerPositions: MarkerMap = {}; var markers: Marker[] = []; var ranges: Range[] = []; @@ -2331,7 +2306,7 @@ module FourSlash { } else if (fileMetadataNamesIndex === fileMetadataNames.indexOf(testOptMetadataNames.filename)) { // Found an @Filename directive, if this is not the first then create a new subfile if (currentFileContent) { - var file = parseFileContent(currentFileContent, currentFileName, markerMap, markers, ranges); + var file = parseFileContent(currentFileContent, currentFileName, markerPositions, markers, ranges); file.fileOptions = currentFileOptions; // Store result file @@ -2351,10 +2326,10 @@ module FourSlash { } } else { // Check if the match is already existed in the global options - if (opts[match[1]] !== undefined) { + if (globalOptions[match[1]] !== undefined) { throw new Error("Global Option : '" + match[1] + "' is already existed"); } - opts[match[1]] = match[2]; + globalOptions[match[1]] = match[2]; } } } else if (line == '' || lineLength === 0) { @@ -2363,7 +2338,7 @@ module FourSlash { } else { // Empty line or code line, terminate current subfile if there is one if (currentFileContent) { - var file = parseFileContent(currentFileContent, currentFileName, markerMap, markers, ranges); + var file = parseFileContent(currentFileContent, currentFileName, markerPositions, markers, ranges); file.fileOptions = currentFileOptions; // Store result file @@ -2378,11 +2353,11 @@ module FourSlash { } return { - markerPositions: markerMap, - markers: markers, - globalOptions: opts, - files: files, - ranges: ranges + markerPositions, + markers, + globalOptions, + files, + ranges }; } diff --git a/src/harness/harness.ts b/src/harness/harness.ts index bbfc2f5678f..0ce9ee1643e 100644 --- a/src/harness/harness.ts +++ b/src/harness/harness.ts @@ -15,6 +15,7 @@ /// /// +/// /// /// /// @@ -584,12 +585,12 @@ module Harness { return defaultLibSourceFile; } // Don't throw here -- the compiler might be looking for a test that actually doesn't exist as part of the TC - return null; + return undefined; } }, getDefaultLibFilename: () => defaultLibFileName, - writeFile: writeFile, - getCanonicalFileName: getCanonicalFileName, + writeFile, + getCanonicalFileName, useCaseSensitiveFileNames: () => useCaseSensitiveFileNames, getNewLine: ()=> sys.newLine }; @@ -699,6 +700,10 @@ module Harness { } break; + case 'noemitonerror': + options.noEmitOnError = !!setting.value; + break; + case 'noresolve': options.noResolve = !!setting.value; break; @@ -793,21 +798,19 @@ module Harness { options.target, useCaseSensitiveFileNames)); - var hadParseErrors = program.getDiagnostics().length > 0; - var checker = program.getTypeChecker(/*fullTypeCheckMode*/ true); checker.checkProgram(); - var hasEarlyErrors = checker.hasEarlyErrors(); + var isEmitBlocked = checker.isEmitBlocked(); // only emit if there weren't parse errors var emitResult: ts.EmitResult; - if (!hadParseErrors && !hasEarlyErrors) { - emitResult = checker.emitFiles(); + if (!isEmitBlocked) { + emitResult = checker.invokeEmitter(); } var errors: HarnessDiagnostic[] = []; - program.getDiagnostics().concat(checker.getDiagnostics()).concat(emitResult ? emitResult.errors : []).forEach(err => { + program.getDiagnostics().concat(checker.getDiagnostics()).concat(emitResult ? emitResult.diagnostics : []).forEach(err => { // TODO: new compiler formats errors after this point to add . and newlines so we'll just do it manually for now errors.push(getMinimalDiagnostic(err)); }); @@ -842,7 +845,7 @@ module Harness { declResult = compileResult; }, settingsCallback, options); - return { declInputFiles: declInputFiles, declOtherFiles: declOtherFiles, declResult: declResult }; + return { declInputFiles, declOtherFiles, declResult }; } function addDtsFile(file: { unitName: string; content: string }, dtsFiles: { unitName: string; content: string }[]) { @@ -957,7 +960,7 @@ module Harness { // Note: IE JS engine incorrectly handles consecutive delimiters here when using RegExp split, so // we have to string-based splitting instead and try to figure out the delimiting chars - var lineStarts = ts.getLineStarts(inputFile.content); + var lineStarts = ts.computeLineStarts(inputFile.content); var lines = inputFile.content.split('\n'); lines.forEach((line, lineIndex) => { if (line.length > 0 && line.charAt(line.length - 1) === '\r') { @@ -1002,8 +1005,12 @@ module Harness { assert.equal(markedErrorCount, fileErrors.length, 'count of errors in ' + inputFile.unitName); }); + var numLibraryDiagnostics = ts.countWhere(diagnostics, diagnostic => { + return diagnostic.filename && isLibraryFile(diagnostic.filename); + }); + // Verify we didn't miss any errors in total - assert.equal(totalErrorsReported, diagnostics.length, 'total number of errors'); + assert.equal(totalErrorsReported + numLibraryDiagnostics, diagnostics.length, 'total number of errors'); return minimalDiagnosticsToString(diagnostics) + sys.newLine + sys.newLine + outputLines.join('\r\n'); @@ -1143,7 +1150,7 @@ module Harness { var optionRegex = /^[\/]{2}\s*@(\w+)\s*:\s*(\S*)/gm; // multiple matches on multiple lines // List of allowed metadata names - var fileMetadataNames = ["filename", "comments", "declaration", "module", "nolib", "sourcemap", "target", "out", "outdir", "noimplicitany", "noresolve", "newline", "newlines", "emitbom", "errortruncation", "usecasesensitivefilenames", "preserveconstenums"]; + var fileMetadataNames = ["filename", "comments", "declaration", "module", "nolib", "sourcemap", "target", "out", "outdir", "noemitonerror","noimplicitany", "noresolve", "newline", "newlines", "emitbom", "errortruncation", "usecasesensitivefilenames", "preserveconstenums"]; function extractCompilerSettings(content: string): CompilerSetting[] { @@ -1162,7 +1169,7 @@ module Harness { var settings = extractCompilerSettings(code); // List of all the subfiles we've parsed out - var files: TestUnitData[] = []; + var testUnitData: TestUnitData[] = []; var lines = Utils.splitContentByNewlines(code); @@ -1198,7 +1205,7 @@ module Harness { originalFilePath: fileName, references: refs }; - files.push(newTestFile); + testUnitData.push(newTestFile); // Reset local data currentFileContent = null; @@ -1223,7 +1230,7 @@ module Harness { } // normalize the fileName for the single file case - currentFileName = files.length > 0 ? currentFileName : Path.getFileName(fileName); + currentFileName = testUnitData.length > 0 ? currentFileName : Path.getFileName(fileName); // EOF, push whatever remains var newTestFile2 = { @@ -1233,9 +1240,9 @@ module Harness { originalFilePath: fileName, references: refs }; - files.push(newTestFile2); + testUnitData.push(newTestFile2); - return { settings: settings, testUnitData: files }; + return { settings, testUnitData }; } } @@ -1331,7 +1338,7 @@ module Harness { actual = actual.replace(/\r\n?/g, '\n'); } - return { expected: expected, actual: actual }; + return { expected, actual }; } function writeComparison(expected: string, actual: string, relativeFilename: string, actualFilename: string, descriptionForDescribe: string) { diff --git a/src/harness/harnessLanguageService.ts b/src/harness/harnessLanguageService.ts index 6163dfd0e79..d3082a17ba2 100644 --- a/src/harness/harnessLanguageService.ts +++ b/src/harness/harnessLanguageService.ts @@ -4,8 +4,8 @@ module Harness.LanguageService { export class ScriptInfo { public version: number = 1; - public editRanges: { length: number; textChangeRange: TypeScript.TextChangeRange; }[] = []; - public lineMap: TypeScript.LineMap = null; + public editRanges: { length: number; textChangeRange: ts.TextChangeRange; }[] = []; + public lineMap: number[] = null; constructor(public fileName: string, public content: string, public isOpen = true) { this.setContent(content); @@ -13,7 +13,7 @@ module Harness.LanguageService { private setContent(content: string): void { this.content = content; - this.lineMap = TypeScript.LineMap1.fromString(content); + this.lineMap = ts.computeLineStarts(content); } public updateContent(content: string): void { @@ -32,30 +32,30 @@ module Harness.LanguageService { // Store edit range + new length of script this.editRanges.push({ length: this.content.length, - textChangeRange: new TypeScript.TextChangeRange( - TypeScript.TextSpan.fromBounds(minChar, limChar), newText.length) + textChangeRange: new ts.TextChangeRange( + ts.TextSpan.fromBounds(minChar, limChar), newText.length) }); // Update version # this.version++; } - public getTextChangeRangeBetweenVersions(startVersion: number, endVersion: number): TypeScript.TextChangeRange { + public getTextChangeRangeBetweenVersions(startVersion: number, endVersion: number): ts.TextChangeRange { if (startVersion === endVersion) { // No edits! - return TypeScript.TextChangeRange.unchanged; + return ts.TextChangeRange.unchanged; } var initialEditRangeIndex = this.editRanges.length - (this.version - startVersion); var lastEditRangeIndex = this.editRanges.length - (this.version - endVersion); var entries = this.editRanges.slice(initialEditRangeIndex, lastEditRangeIndex); - return TypeScript.TextChangeRange.collapseChangesAcrossMultipleVersions(entries.map(e => e.textChangeRange)); + return ts.TextChangeRange.collapseChangesAcrossMultipleVersions(entries.map(e => e.textChangeRange)); } } class ScriptSnapshotShim implements ts.ScriptSnapshotShim { - private lineMap: TypeScript.LineMap = null; + private lineMap: number[] = null; private textSnapshot: string; private version: number; @@ -74,10 +74,10 @@ module Harness.LanguageService { public getLineStartPositions(): string { if (this.lineMap === null) { - this.lineMap = TypeScript.LineMap1.fromString(this.textSnapshot); + this.lineMap = ts.computeLineStarts(this.textSnapshot); } - return JSON.stringify(this.lineMap.lineStarts()); + return JSON.stringify(this.lineMap); } public getChangeRange(oldScript: ts.ScriptSnapshotShim): string { @@ -108,7 +108,7 @@ module Harness.LanguageService { public acquireDocument( fileName: string, compilationSettings: ts.CompilerOptions, - scriptSnapshot: TypeScript.IScriptSnapshot, + scriptSnapshot: ts.IScriptSnapshot, version: string, isOpen: boolean): ts.SourceFile { return ts.createSourceFile(fileName, scriptSnapshot.getText(0, scriptSnapshot.getLength()), compilationSettings.target, version, isOpen); @@ -118,10 +118,10 @@ module Harness.LanguageService { document: ts.SourceFile, fileName: string, compilationSettings: ts.CompilerOptions, - scriptSnapshot: TypeScript.IScriptSnapshot, + scriptSnapshot: ts.IScriptSnapshot, version: string, isOpen: boolean, - textChangeRange: TypeScript.TextChangeRange + textChangeRange: ts.TextChangeRange ): ts.SourceFile { return document.update(scriptSnapshot, version, isOpen, textChangeRange); } @@ -263,13 +263,13 @@ module Harness.LanguageService { } /** Parse file given its source text */ - public parseSourceText(fileName: string, sourceText: TypeScript.IScriptSnapshot): TypeScript.SourceUnitSyntax { - return TypeScript.Parser.parse(fileName, TypeScript.SimpleText.fromScriptSnapshot(sourceText), ts.ScriptTarget.Latest, TypeScript.isDTSFile(fileName)).sourceUnit(); + public parseSourceText(fileName: string, sourceText: ts.IScriptSnapshot): ts.SourceFile { + return ts.createSourceFile(fileName, sourceText.getText(0, sourceText.getLength()), ts.ScriptTarget.Latest, "1", true); } /** Parse a file on disk given its fileName */ public parseFile(fileName: string) { - var sourceText = TypeScript.ScriptSnapshot.fromString(Harness.IO.readFile(fileName)); + var sourceText = ts.ScriptSnapshot.fromString(Harness.IO.readFile(fileName)); return this.parseSourceText(fileName, sourceText); } @@ -283,22 +283,22 @@ module Harness.LanguageService { assert.isTrue(line >= 1); assert.isTrue(col >= 1); - return script.lineMap.getPosition(line - 1, col - 1); + return ts.getPositionFromLineAndCharacter(script.lineMap, line, col); } /** * @param line 0 based index * @param col 0 based index */ - public positionToZeroBasedLineCol(fileName: string, position: number): TypeScript.ILineAndCharacter { + public positionToZeroBasedLineCol(fileName: string, position: number): ts.LineAndCharacter { var script: ScriptInfo = this.fileNameToScript[fileName]; assert.isNotNull(script); - var result = script.lineMap.getLineAndCharacterFromPosition(position); + var result = ts.getLineAndCharacterOfPosition(script.lineMap, position); - assert.isTrue(result.line() >= 0); - assert.isTrue(result.character() >= 0); - return { line: result.line(), character: result.character() }; + assert.isTrue(result.line >= 1); + assert.isTrue(result.character >= 1); + return { line: result.line - 1, character: result.character - 1 }; } /** Verify that applying edits to sourceFileName result in the content of the file baselineFileName */ diff --git a/src/harness/projectsRunner.ts b/src/harness/projectsRunner.ts index 292e945107d..44cd3a6d955 100644 --- a/src/harness/projectsRunner.ts +++ b/src/harness/projectsRunner.ts @@ -132,8 +132,8 @@ class ProjectRunner extends RunnerBase { if (!errors.length) { var checker = program.getTypeChecker(/*fullTypeCheck*/ true); errors = checker.getDiagnostics(); - var emitResult = checker.emitFiles(); - errors = ts.concatenate(errors, emitResult.errors); + var emitResult = checker.invokeEmitter(); + errors = ts.concatenate(errors, emitResult.diagnostics); sourceMapData = emitResult.sourceMaps; // Clean up source map data that will be used in baselining @@ -149,10 +149,10 @@ class ProjectRunner extends RunnerBase { } return { - moduleKind: moduleKind, - program: program, - errors: errors, - sourceMapData: sourceMapData + moduleKind, + program, + errors, + sourceMapData }; function createCompilerOptions(): ts.CompilerOptions { @@ -185,10 +185,10 @@ class ProjectRunner extends RunnerBase { function createCompilerHost(): ts.CompilerHost { return { - getSourceFile: getSourceFile, + getSourceFile, getDefaultLibFilename: () => "lib.d.ts", - writeFile: writeFile, - getCurrentDirectory: getCurrentDirectory, + writeFile, + getCurrentDirectory, getCanonicalFileName: Harness.Compiler.getCanonicalFileName, useCaseSensitiveFileNames: () => sys.useCaseSensitiveFileNames, getNewLine: () => sys.newLine @@ -203,12 +203,12 @@ class ProjectRunner extends RunnerBase { var projectCompilerResult = compileProjectFiles(moduleKind, () => testCase.inputFiles, getSourceFileText, writeFile); return { - moduleKind: moduleKind, + moduleKind, program: projectCompilerResult.program, sourceMapData: projectCompilerResult.sourceMapData, - outputFiles: outputFiles, + outputFiles, errors: projectCompilerResult.errors, - nonSubfolderDiskFiles: nonSubfolderDiskFiles, + nonSubfolderDiskFiles, }; function getSourceFileText(filename: string): string { diff --git a/src/harness/rwcRunner.ts b/src/harness/rwcRunner.ts index bfb139fa719..606672e406f 100644 --- a/src/harness/rwcRunner.ts +++ b/src/harness/rwcRunner.ts @@ -117,14 +117,14 @@ module RWC { }); function getHarnessCompilerInputUnit(fileName: string) { - var resolvedPath = ts.normalizeSlashes(sys.resolvePath(fileName)); + var unitName = ts.normalizeSlashes(sys.resolvePath(fileName)); try { - var content = sys.readFile(resolvedPath); + var content = sys.readFile(unitName); } catch (e) { // Leave content undefined. } - return { unitName: resolvedPath, content: content }; + return { unitName, content }; } }); diff --git a/src/harness/sourceMapRecorder.ts b/src/harness/sourceMapRecorder.ts index f7a6bdbf3e5..f7d6bcfeaa1 100644 --- a/src/harness/sourceMapRecorder.ts +++ b/src/harness/sourceMapRecorder.ts @@ -223,7 +223,7 @@ module Harness.SourceMapRecoder { sourceMapNames = sourceMapData.sourceMapNames; jsFile = currentJsFile; - jsLineMap = ts.getLineStarts(jsFile.code); + jsLineMap = ts.computeLineStarts(jsFile.code); spansOnSingleLine = []; prevWrittenSourcePos = 0; @@ -294,7 +294,7 @@ module Harness.SourceMapRecoder { sourceMapRecoder.WriteLine("sourceFile:" + sourceMapSources[spansOnSingleLine[0].sourceMapSpan.sourceIndex]); sourceMapRecoder.WriteLine("-------------------------------------------------------------------"); - tsLineMap = ts.getLineStarts(newSourceFileCode); + tsLineMap = ts.computeLineStarts(newSourceFileCode); tsCode = newSourceFileCode; prevWrittenSourcePos = 0; } @@ -390,7 +390,7 @@ module Harness.SourceMapRecoder { } } - var tsCodeLineMap = ts.getLineStarts(sourceText); + var tsCodeLineMap = ts.computeLineStarts(sourceText); for (var i = 0; i < tsCodeLineMap.length; i++) { writeSourceMapIndent(prevEmittedCol, i == 0 ? markerIds[index] : " >"); sourceMapRecoder.Write(getTextOfLine(i, tsCodeLineMap, sourceText)); diff --git a/src/services/breakpoints.ts b/src/services/breakpoints.ts index f8688b3c479..7867751a96f 100644 --- a/src/services/breakpoints.ts +++ b/src/services/breakpoints.ts @@ -38,25 +38,25 @@ module ts.BreakpointResolver { return spanInNode(tokenAtLocation); function textSpan(startNode: Node, endNode?: Node) { - return TypeScript.TextSpan.fromBounds(startNode.getStart(), (endNode || startNode).getEnd()); + return TextSpan.fromBounds(startNode.getStart(), (endNode || startNode).getEnd()); } - function spanInNodeIfStartsOnSameLine(node: Node, otherwiseOnNode?: Node): TypeScript.TextSpan { + function spanInNodeIfStartsOnSameLine(node: Node, otherwiseOnNode?: Node): TextSpan { if (node && lineOfPosition === sourceFile.getLineAndCharacterFromPosition(node.getStart()).line) { return spanInNode(node); } return spanInNode(otherwiseOnNode); } - function spanInPreviousNode(node: Node): TypeScript.TextSpan { + function spanInPreviousNode(node: Node): TextSpan { return spanInNode(findPrecedingToken(node.pos, sourceFile)); } - function spanInNextNode(node: Node): TypeScript.TextSpan { + function spanInNextNode(node: Node): TextSpan { return spanInNode(findNextToken(node, node.parent)); } - function spanInNode(node: Node): TypeScript.TextSpan { + function spanInNode(node: Node): TextSpan { if (node) { if (isExpression(node)) { if (node.parent.kind === SyntaxKind.DoStatement) { @@ -256,7 +256,7 @@ module ts.BreakpointResolver { } } - function spanInVariableDeclaration(variableDeclaration: VariableDeclaration): TypeScript.TextSpan { + function spanInVariableDeclaration(variableDeclaration: VariableDeclaration): TextSpan { // If declaration of for in statement, just set the span in parent if (variableDeclaration.parent.kind === SyntaxKind.ForInStatement) { return spanInNode(variableDeclaration.parent); @@ -301,7 +301,7 @@ module ts.BreakpointResolver { !!(parameter.flags & NodeFlags.Public) || !!(parameter.flags & NodeFlags.Private); } - function spanInParameterDeclaration(parameter: ParameterDeclaration): TypeScript.TextSpan { + function spanInParameterDeclaration(parameter: ParameterDeclaration): TextSpan { if (canHaveSpanInParameterDeclaration(parameter)) { return textSpan(parameter); } @@ -324,7 +324,7 @@ module ts.BreakpointResolver { (functionDeclaration.parent.kind === SyntaxKind.ClassDeclaration && functionDeclaration.kind !== SyntaxKind.Constructor); } - function spanInFunctionDeclaration(functionDeclaration: FunctionLikeDeclaration): TypeScript.TextSpan { + function spanInFunctionDeclaration(functionDeclaration: FunctionLikeDeclaration): TextSpan { // No breakpoints in the function signature if (!functionDeclaration.body) { return undefined; @@ -339,7 +339,7 @@ module ts.BreakpointResolver { return spanInNode(functionDeclaration.body); } - function spanInFunctionBlock(block: Block): TypeScript.TextSpan { + function spanInFunctionBlock(block: Block): TextSpan { var nodeForSpanInBlock = block.statements.length ? block.statements[0] : block.getLastToken(); if (canFunctionHaveSpanInWholeDeclaration(block.parent)) { return spanInNodeIfStartsOnSameLine(block.parent, nodeForSpanInBlock); @@ -348,7 +348,7 @@ module ts.BreakpointResolver { return spanInNode(nodeForSpanInBlock); } - function spanInBlock(block: Block): TypeScript.TextSpan { + function spanInBlock(block: Block): TextSpan { switch (block.parent.kind) { case SyntaxKind.ModuleDeclaration: if (getModuleInstanceState(block.parent) !== ModuleInstanceState.Instantiated) { @@ -370,7 +370,7 @@ module ts.BreakpointResolver { return spanInNode(block.statements[0]); } - function spanInForStatement(forStatement: ForStatement): TypeScript.TextSpan { + function spanInForStatement(forStatement: ForStatement): TextSpan { if (forStatement.declarations) { return spanInNode(forStatement.declarations[0]); } @@ -386,7 +386,7 @@ module ts.BreakpointResolver { } // Tokens: - function spanInOpenBraceToken(node: Node): TypeScript.TextSpan { + function spanInOpenBraceToken(node: Node): TextSpan { switch (node.parent.kind) { case SyntaxKind.EnumDeclaration: var enumDeclaration = node.parent; @@ -404,7 +404,7 @@ module ts.BreakpointResolver { return spanInNode(node.parent); } - function spanInCloseBraceToken(node: Node): TypeScript.TextSpan { + function spanInCloseBraceToken(node: Node): TextSpan { switch (node.parent.kind) { case SyntaxKind.ModuleBlock: // If this is not instantiated module block no bp span @@ -439,7 +439,7 @@ module ts.BreakpointResolver { } } - function spanInOpenParenToken(node: Node): TypeScript.TextSpan { + function spanInOpenParenToken(node: Node): TextSpan { if (node.parent.kind === SyntaxKind.DoStatement) { // Go to while keyword and do action instead return spanInPreviousNode(node); @@ -449,7 +449,7 @@ module ts.BreakpointResolver { return spanInNode(node.parent); } - function spanInCloseParenToken(node: Node): TypeScript.TextSpan { + function spanInCloseParenToken(node: Node): TextSpan { // Is this close paren token of parameter list, set span in previous token switch (node.parent.kind) { case SyntaxKind.FunctionExpression: @@ -473,7 +473,7 @@ module ts.BreakpointResolver { return spanInNode(node.parent); } - function spanInColonToken(node: Node): TypeScript.TextSpan { + function spanInColonToken(node: Node): TextSpan { // Is this : specifying return annotation of the function declaration if (isAnyFunction(node.parent) || node.parent.kind === SyntaxKind.PropertyAssignment) { return spanInPreviousNode(node); @@ -482,7 +482,7 @@ module ts.BreakpointResolver { return spanInNode(node.parent); } - function spanInGreaterThanOrLessThanToken(node: Node): TypeScript.TextSpan { + function spanInGreaterThanOrLessThanToken(node: Node): TextSpan { if (node.parent.kind === SyntaxKind.TypeAssertion) { return spanInNode((node.parent).operand); } @@ -490,7 +490,7 @@ module ts.BreakpointResolver { return spanInNode(node.parent); } - function spanInWhileKeyword(node: Node): TypeScript.TextSpan { + function spanInWhileKeyword(node: Node): TextSpan { if (node.parent.kind === SyntaxKind.DoStatement) { // Set span on while expression return textSpan(node, findNextToken((node.parent).expression, node.parent)); diff --git a/src/services/formatting.ts b/src/services/formatting.ts new file mode 100644 index 00000000000..dde140181c4 --- /dev/null +++ b/src/services/formatting.ts @@ -0,0 +1,953 @@ +/// +/// +/// +/// + +module ts.formatting { + + export interface TextRangeWithKind extends TextRange { + kind: SyntaxKind; + } + + export interface TokenInfo { + leadingTrivia: TextRangeWithKind[]; + token: TextRangeWithKind; + trailingTrivia: TextRangeWithKind[]; + } + + const enum Constants { + Unknown = -1 + } + + /* + * Indentation for the scope that can be dynamically recomputed. + * i.e + * while(true) + * { var x; + * } + * Normally indentation is applied only to the first token in line so at glance 'var' should not be touched. + * However if some format rule adds new line between '}' and 'var' 'var' will become + * the first token in line so it should be indented + */ + interface DynamicIndentation { + getIndentationForToken(tokenLine: number, tokenKind: SyntaxKind): number; + getIndentationForComment(owningToken: SyntaxKind): number; + /** + * Indentation for open and close tokens of the node if it is block or another node that needs special indentation + * ... { + * ......... + * ....} + * ____ - indentation + * ____ - delta + **/ + getIndentation(): number; + /** + * Prefered relative indentation for child nodes. + * Delta is used to carry the indentation info + * foo(bar({ + * $ + * })) + * Both 'foo', 'bar' introduce new indentation with delta = 4, but total indentation in $ is not 8. + * foo: { indentation: 0, delta: 4 } + * bar: { indentation: foo.indentation + foo.delta = 4, delta: 4} however 'foo' and 'bar' are on the same line + * so bar inherits indentation from foo and bar.delta will be 4 + * + */ + getDelta(): number; + /** + * Formatter calls this function when rule adds or deletes new lines from the text + * so indentation scope can adjust values of indentation and delta. + */ + recomputeIndentation(lineAddedByFormatting: boolean): void; + } + + interface Indentation { + indentation: number; + delta: number + } + + export function formatOnEnter(position: number, sourceFile: SourceFile, rulesProvider: RulesProvider, options: FormatCodeOptions): TextChange[] { + var line = sourceFile.getLineAndCharacterFromPosition(position).line; + Debug.assert(line >= 2); + // get the span for the previous\current line + var span = { + // get start position for the previous line + pos: getStartPositionOfLine(line - 1, sourceFile), + // get end position for the current line (end value is exclusive so add 1 to the result) + end: getEndLinePosition(line, sourceFile) + 1 + } + return formatSpan(span, sourceFile, options, rulesProvider, FormattingRequestKind.FormatOnEnter); + } + + export function formatOnSemicolon(position: number, sourceFile: SourceFile, rulesProvider: RulesProvider, options: FormatCodeOptions): TextChange[] { + return formatOutermostParent(position, SyntaxKind.SemicolonToken, sourceFile, options, rulesProvider, FormattingRequestKind.FormatOnSemicolon); + } + + export function formatOnClosingCurly(position: number, sourceFile: SourceFile, rulesProvider: RulesProvider, options: FormatCodeOptions): TextChange[] { + return formatOutermostParent(position, SyntaxKind.CloseBraceToken, sourceFile, options, rulesProvider, FormattingRequestKind.FormatOnClosingCurlyBrace); + } + + export function formatDocument(sourceFile: SourceFile, rulesProvider: RulesProvider, options: FormatCodeOptions): TextChange[] { + var span = { + pos: 0, + end: sourceFile.text.length + }; + return formatSpan(span, sourceFile, options, rulesProvider, FormattingRequestKind.FormatDocument); + } + + export function formatSelection(start: number, end: number, sourceFile: SourceFile, rulesProvider: RulesProvider, options: FormatCodeOptions): TextChange[] { + // format from the beginning of the line + var span = { + pos: getStartLinePositionForPosition(start, sourceFile), + end: end + }; + return formatSpan(span, sourceFile, options, rulesProvider, FormattingRequestKind.FormatSelection); + } + + function formatOutermostParent(position: number, expectedLastToken: SyntaxKind, sourceFile: SourceFile, options: FormatCodeOptions, rulesProvider: RulesProvider, requestKind: FormattingRequestKind): TextChange[] { + var parent = findOutermostParent(position, expectedLastToken, sourceFile); + if (!parent) { + return []; + } + var span = { + pos: getStartLinePositionForPosition(parent.getStart(sourceFile), sourceFile), + end: parent.end + }; + return formatSpan(span, sourceFile, options, rulesProvider, requestKind); + } + + function findOutermostParent(position: number, expectedTokenKind: SyntaxKind, sourceFile: SourceFile): Node { + var precedingToken = findPrecedingToken(position, sourceFile); + if (!precedingToken || precedingToken.kind !== expectedTokenKind) { + return undefined; + } + + // walk up and search for the parent node that ends at the same position with precedingToken. + // for cases like this + // + // var x = 1; + // while (true) { + // } + // after typing close curly in while statement we want to reformat just the while statement. + // However if we just walk upwards searching for the parent that has the same end value - + // we'll end up with the whole source file. isListElement allows to stop on the list element level + var current = precedingToken; + while (current && + current.parent && + current.parent.end === precedingToken.end && + !isListElement(current.parent, current)) { + current = current.parent; + } + + return current; + } + + // Returns true if node is a element in some list in parent + // i.e. parent is class declaration with the list of members and node is one of members. + function isListElement(parent: Node, node: Node): boolean { + switch (parent.kind) { + case SyntaxKind.ClassDeclaration: + case SyntaxKind.InterfaceDeclaration: + return rangeContainsRange((parent).members, node); + case SyntaxKind.ModuleDeclaration: + var body = (parent).body; + return body && body.kind === SyntaxKind.Block && rangeContainsRange((body).statements, node); + case SyntaxKind.SourceFile: + case SyntaxKind.Block: + case SyntaxKind.TryBlock: + case SyntaxKind.CatchBlock: + case SyntaxKind.FinallyBlock: + case SyntaxKind.ModuleBlock: + return rangeContainsRange((parent).statements, node) + } + + return false; + } + + /** find node that fully contains given text range */ + function findEnclosingNode(range: TextRange, sourceFile: SourceFile): Node { + return find(sourceFile); + + function find(n: Node): Node { + var candidate = forEachChild(n, c => startEndContainsRange(c.getStart(sourceFile), c.end, range) && c); + if (candidate) { + var result = find(candidate); + if (result) { + return result; + } + } + + return n; + } + } + + /** formatting is not applied to ranges that contain parse errors. + * This function will return a predicate that for a given text range will tell + * if there are any parse errors that overlap with the range. + */ + function prepareRangeContainsErrorFunction(errors: Diagnostic[], originalRange: TextRange): (r: TextRange) => boolean { + if (!errors.length) { + return rangeHasNoErrors; + } + + // pick only errors that fall in range + var sorted = errors + .filter(d => d.isParseError && rangeOverlapsWithStartEnd(originalRange, d.start, d.start + d.length)) + .sort((e1, e2) => e1.start - e2.start); + + if (!sorted.length) { + return rangeHasNoErrors; + } + + var index = 0; + + return r => { + // in current implementation sequence of arguments [r1, r2...] is monotonically increasing. + // 'index' tracks the index of the most recent error that was checked. + while (true) { + if (index >= sorted.length) { + // all errors in the range were already checked -> no error in specified range + return false; + } + + var error = sorted[index]; + if (r.end <= error.start) { + // specified range ends before the error refered by 'index' - no error in range + return false; + } + + if (startEndOverlapsWithStartEnd(r.pos, r.end, error.start, error.start + error.length)) { + // specified range overlaps with error range + return true; + } + + index++; + } + }; + + function rangeHasNoErrors(r: TextRange): boolean { + return false; + } + } + + /** + * Start of the original range might fall inside the comment - scanner will not yield appropriate results + * This function will look for token that is located before the start of target range + * and return its end as start position for the scanner. + */ + function getScanStartPosition(enclosingNode: Node, originalRange: TextRange, sourceFile: SourceFile): number { + var start = enclosingNode.getStart(sourceFile); + if (start === originalRange.pos && enclosingNode.end === originalRange.end) { + return start; + } + + var precedingToken = findPrecedingToken(originalRange.pos, sourceFile); + // no preceding token found - start from the beginning of enclosing node + return precedingToken ? precedingToken.end : enclosingNode.pos; + } + + function formatSpan(originalRange: TextRange, + sourceFile: SourceFile, + options: FormatCodeOptions, + rulesProvider: RulesProvider, + requestKind: FormattingRequestKind): TextChange[] { + + var rangeContainsError = prepareRangeContainsErrorFunction(sourceFile.syntacticErrors, originalRange); + + // formatting context is used by rules provider + var formattingContext = new FormattingContext(sourceFile, requestKind); + + // find the smallest node that fully wraps the range and compute the initial indentation for the node + var enclosingNode = findEnclosingNode(originalRange, sourceFile); + + var formattingScanner = getFormattingScanner(sourceFile, getScanStartPosition(enclosingNode, originalRange, sourceFile), originalRange.end); + + var initialIndentation = SmartIndenter.getIndentationForNode(enclosingNode, originalRange, sourceFile, options); + + var previousRangeHasError: boolean; + var previousRange: TextRangeWithKind; + var previousParent: Node; + var previousRangeStartLine: number; + + var edits: TextChange[] = []; + + formattingScanner.advance(); + + if (formattingScanner.isOnToken()) { + var startLine = sourceFile.getLineAndCharacterFromPosition(enclosingNode.getStart(sourceFile)).line; + var delta = SmartIndenter.shouldIndentChildNode(enclosingNode.kind, SyntaxKind.Unknown) ? options.IndentSize : 0; + processNode(enclosingNode, enclosingNode, startLine, initialIndentation, delta); + } + + formattingScanner.close(); + + return edits; + + // local functions + + /** Tries to compute the indentation for a list element. + * If list element is not in range then + * function will pick its actual indentation + * so it can be pushed downstream as inherited indentation. + * If list element is in the range - its indentation will be equal + * to inherited indentation from its predecessors. + */ + function tryComputeIndentationForListItem(startPos: number, + endPos: number, + parentStartLine: number, + range: TextRange, + inheritedIndentation: number): number { + + if (rangeOverlapsWithStartEnd(range, startPos, endPos)) { + if (inheritedIndentation !== Constants.Unknown) { + return inheritedIndentation; + } + } + else { + var startLine = sourceFile.getLineAndCharacterFromPosition(startPos).line; + var startLinePosition = getStartLinePositionForPosition(startPos, sourceFile); + var column = SmartIndenter.findFirstNonWhitespaceColumn(startLinePosition, startPos, sourceFile, options); + if (startLine !== parentStartLine || startPos === column) { + return column + } + } + + return Constants.Unknown; + } + + function computeIndentation( + node: TextRangeWithKind, + startLine: number, + inheritedIndentation: number, + parent: Node, + parentDynamicIndentation: DynamicIndentation, + effectiveParentStartLine: number): Indentation { + + var indentation = inheritedIndentation; + if (indentation === Constants.Unknown) { + if (isSomeBlock(node.kind)) { + // blocks should be indented in + // - other blocks + // - source file + // - switch\default clauses + if (isSomeBlock(parent.kind) || + parent.kind === SyntaxKind.SourceFile || + parent.kind === SyntaxKind.CaseClause || + parent.kind === SyntaxKind.DefaultClause) { + + indentation = parentDynamicIndentation.getIndentation() + parentDynamicIndentation.getDelta(); + } + else { + indentation = parentDynamicIndentation.getIndentation(); + } + } + else { + if (SmartIndenter.childStartsOnTheSameLineWithElseInIfStatement(parent, node, startLine, sourceFile)) { + indentation = parentDynamicIndentation.getIndentation(); + } + else { + indentation = parentDynamicIndentation.getIndentation() + parentDynamicIndentation.getDelta(); + } + } + } + + var delta = SmartIndenter.shouldIndentChildNode(node.kind, SyntaxKind.Unknown) ? options.IndentSize : 0; + + if (effectiveParentStartLine === startLine) { + // if node is located on the same line with the parent + // - inherit indentation from the parent + // - push children if either parent of node itself has non-zero delta + indentation = parentDynamicIndentation.getIndentation(); + delta = Math.min(options.IndentSize, parentDynamicIndentation.getDelta() + delta); + } + return { + indentation, + delta + } + } + + function getDynamicIndentation(node: Node, nodeStartLine: number, indentation: number, delta: number): DynamicIndentation { + return { + getIndentationForComment: kind => { + switch (kind) { + // preceding comment to the token that closes the indentation scope inherits the indentation from the scope + // .. { + // // comment + // } + case SyntaxKind.CloseBraceToken: + case SyntaxKind.CloseBracketToken: + return indentation + delta; + } + return indentation; + }, + getIndentationForToken: (line, kind) => { + switch (kind) { + // open and close brace, 'else' and 'while' (in do statement) tokens has indentation of the parent + case SyntaxKind.OpenBraceToken: + case SyntaxKind.CloseBraceToken: + case SyntaxKind.OpenBracketToken: + case SyntaxKind.CloseBracketToken: + case SyntaxKind.ElseKeyword: + case SyntaxKind.WhileKeyword: + return indentation; + default: + // if token line equals to the line of containing node (this is a first token in the node) - use node indentation + return nodeStartLine !== line ? indentation + delta : indentation; + } + }, + getIndentation: () => indentation, + getDelta: () => delta, + recomputeIndentation: lineAdded => { + if (node.parent && SmartIndenter.shouldIndentChildNode(node.parent.kind, node.kind)) { + if (lineAdded) { + indentation += options.IndentSize; + } + else { + indentation -= options.IndentSize; + } + + if (SmartIndenter.shouldIndentChildNode(node.kind, SyntaxKind.Unknown)) { + delta = options.IndentSize; + } + else { + delta = 0; + } + } + }, + } + } + + function processNode(node: Node, contextNode: Node, nodeStartLine: number, indentation: number, delta: number) { + if (!rangeOverlapsWithStartEnd(originalRange, node.getStart(sourceFile), node.getEnd())) { + return; + } + + var nodeDynamicIndentation = getDynamicIndentation(node, nodeStartLine, indentation, delta); + + // a useful observations when tracking context node + // / + // [a] + // / | \ + // [b] [c] [d] + // node 'a' is a context node for nodes 'b', 'c', 'd' + // except for the leftmost leaf token in [b] - in this case context node ('e') is located somewhere above 'a' + // this rule can be applied recursively to child nodes of 'a'. + // + // context node is set to parent node value after processing every child node + // context node is set to parent of the token after processing every token + + var childContextNode = contextNode; + + // if there are any tokens that logically belong to node and interleave child nodes + // such tokens will be consumed in processChildNode for for the child that follows them + forEachChild( + node, + child => { + processChildNode(child, /*inheritedIndentation*/ Constants.Unknown, node, nodeDynamicIndentation, nodeStartLine, /*isListElement*/ false) + }, + (nodes: NodeArray) => { + processChildNodes(nodes, node, nodeStartLine, nodeDynamicIndentation); + }); + + // proceed any tokens in the node that are located after child nodes + while (formattingScanner.isOnToken()) { + var tokenInfo = formattingScanner.readTokenInfo(node); + if (tokenInfo.token.end > node.end) { + break; + } + consumeTokenAndAdvanceScanner(tokenInfo, node, nodeDynamicIndentation); + } + + function processChildNode( + child: Node, + inheritedIndentation: number, + parent: Node, + parentDynamicIndentation: DynamicIndentation, + parentStartLine: number, + isListItem: boolean): number { + + var childStartPos = child.getStart(sourceFile); + + var childStart = sourceFile.getLineAndCharacterFromPosition(childStartPos); + + // if child is a list item - try to get its indentation + var childIndentationAmount = Constants.Unknown; + if (isListItem) { + childIndentationAmount = tryComputeIndentationForListItem(childStartPos, child.end, parentStartLine, originalRange, inheritedIndentation); + if (childIndentationAmount !== Constants.Unknown) { + inheritedIndentation = childIndentationAmount; + } + } + + // child node is outside the target range - do not dive inside + if (!rangeOverlapsWithStartEnd(originalRange, child.pos, child.end)) { + return inheritedIndentation; + } + + if (child.kind === SyntaxKind.Missing) { + return inheritedIndentation; + } + + while (formattingScanner.isOnToken()) { + // proceed any parent tokens that are located prior to child.getStart() + var tokenInfo = formattingScanner.readTokenInfo(node); + if (tokenInfo.token.end > childStartPos) { + // stop when formatting scanner advances past the beginning of the child + break; + } + + consumeTokenAndAdvanceScanner(tokenInfo, node, parentDynamicIndentation); + } + + if (!formattingScanner.isOnToken()) { + return inheritedIndentation; + } + + if (isToken(child)) { + // if child node is a token, it does not impact indentation, proceed it using parent indentation scope rules + var tokenInfo = formattingScanner.readTokenInfo(node); + Debug.assert(tokenInfo.token.end === child.end); + consumeTokenAndAdvanceScanner(tokenInfo, node, parentDynamicIndentation); + return inheritedIndentation; + } + + var childIndentation = computeIndentation(child, childStart.line, childIndentationAmount, node, parentDynamicIndentation, parentStartLine); + + processNode(child, childContextNode, childStart.line, childIndentation.indentation, childIndentation.delta); + + childContextNode = node; + + return inheritedIndentation; + } + + function processChildNodes(nodes: NodeArray, + parent: Node, + parentStartLine: number, + parentDynamicIndentation: DynamicIndentation): void { + + var listStartToken = getOpenTokenForList(parent, nodes); + var listEndToken = getCloseTokenForOpenToken(listStartToken); + + var listDynamicIndentation = parentDynamicIndentation; + var startLine = parentStartLine; + + if (listStartToken !== SyntaxKind.Unknown) { + // introduce a new indentation scope for lists (including list start and end tokens) + while (formattingScanner.isOnToken()) { + var tokenInfo = formattingScanner.readTokenInfo(parent); + if (tokenInfo.token.end > nodes.pos) { + // stop when formatting scanner moves past the beginning of node list + break; + } + else if (tokenInfo.token.kind === listStartToken) { + // consume list start token + startLine = sourceFile.getLineAndCharacterFromPosition(tokenInfo.token.pos).line; + var indentation = + computeIndentation(tokenInfo.token, startLine, Constants.Unknown, parent, parentDynamicIndentation, startLine); + + listDynamicIndentation = getDynamicIndentation(parent, parentStartLine, indentation.indentation, indentation.delta); + consumeTokenAndAdvanceScanner(tokenInfo, parent, listDynamicIndentation); + } + else { + // consume any tokens that precede the list as child elements of 'node' using its indentation scope + consumeTokenAndAdvanceScanner(tokenInfo, parent, parentDynamicIndentation); + } + } + } + + var inheritedIndentation = Constants.Unknown; + for (var i = 0, len = nodes.length; i < len; ++i) { + inheritedIndentation = processChildNode(nodes[i], inheritedIndentation, node, listDynamicIndentation, startLine, /*isListElement*/ true) + } + + if (listEndToken !== SyntaxKind.Unknown) { + if (formattingScanner.isOnToken()) { + var tokenInfo = formattingScanner.readTokenInfo(parent); + if (tokenInfo.token.kind === listEndToken) { + // consume list end token + consumeTokenAndAdvanceScanner(tokenInfo, parent, listDynamicIndentation); + } + } + } + } + + function consumeTokenAndAdvanceScanner(currentTokenInfo: TokenInfo, parent: Node, dynamicIndentation: DynamicIndentation): void { + Debug.assert(rangeContainsRange(parent, currentTokenInfo.token)); + + var lastTriviaWasNewLine = formattingScanner.lastTrailingTriviaWasNewLine(); + var indentToken = false; + + if (currentTokenInfo.leadingTrivia) { + processTrivia(currentTokenInfo.leadingTrivia, parent, childContextNode, dynamicIndentation); + } + + var lineAdded: boolean; + var isTokenInRange = rangeContainsRange(originalRange, currentTokenInfo.token); + + var tokenStart = sourceFile.getLineAndCharacterFromPosition(currentTokenInfo.token.pos); + if (isTokenInRange) { + // save prevStartLine since processRange will overwrite this value with current ones + var prevStartLine = previousRangeStartLine; + lineAdded = processRange(currentTokenInfo.token, tokenStart, parent, childContextNode, dynamicIndentation); + if (lineAdded !== undefined) { + indentToken = lineAdded; + } + else { + indentToken = lastTriviaWasNewLine && tokenStart.line !== prevStartLine; + } + } + + if (currentTokenInfo.trailingTrivia) { + processTrivia(currentTokenInfo.trailingTrivia, parent, childContextNode, dynamicIndentation); + } + + if (indentToken) { + var indentNextTokenOrTrivia = true; + if (currentTokenInfo.leadingTrivia) { + for (var i = 0, len = currentTokenInfo.leadingTrivia.length; i < len; ++i) { + var triviaItem = currentTokenInfo.leadingTrivia[i]; + if (!rangeContainsRange(originalRange, triviaItem)) { + continue; + } + + var triviaStartLine = sourceFile.getLineAndCharacterFromPosition(triviaItem.pos).line; + switch (triviaItem.kind) { + case SyntaxKind.MultiLineCommentTrivia: + var commentIndentation = dynamicIndentation.getIndentationForComment(currentTokenInfo.token.kind); + indentMultilineComment(triviaItem, commentIndentation, /*firstLineIsIndented*/ !indentNextTokenOrTrivia); + indentNextTokenOrTrivia = false; + break; + case SyntaxKind.SingleLineCommentTrivia: + if (indentNextTokenOrTrivia) { + var commentIndentation = dynamicIndentation.getIndentationForComment(currentTokenInfo.token.kind); + insertIndentation(triviaItem.pos, commentIndentation, /*lineAdded*/ false); + indentNextTokenOrTrivia = false; + } + break; + case SyntaxKind.NewLineTrivia: + indentNextTokenOrTrivia = true; + break; + } + } + } + + // indent token only if is it is in target range and does not overlap with any error ranges + if (isTokenInRange && !rangeContainsError(currentTokenInfo.token)) { + var tokenIndentation = dynamicIndentation.getIndentationForToken(tokenStart.line, currentTokenInfo.token.kind); + insertIndentation(currentTokenInfo.token.pos, tokenIndentation, lineAdded); + } + } + + formattingScanner.advance(); + + childContextNode = parent; + } + } + + function processTrivia(trivia: TextRangeWithKind[], parent: Node, contextNode: Node, dynamicIndentation: DynamicIndentation): void { + for (var i = 0, len = trivia.length; i < len; ++i) { + var triviaItem = trivia[i]; + if (isComment(triviaItem.kind) && rangeContainsRange(originalRange, triviaItem)) { + var triviaItemStart = sourceFile.getLineAndCharacterFromPosition(triviaItem.pos); + processRange(triviaItem, triviaItemStart, parent, contextNode, dynamicIndentation); + } + } + } + + function processRange(range: TextRangeWithKind, + rangeStart: LineAndCharacter, + parent: Node, + contextNode: Node, + dynamicIndentation: DynamicIndentation): boolean { + + var rangeHasError = rangeContainsError(range); + var lineAdded: boolean; + if (!rangeHasError && !previousRangeHasError) { + if (!previousRange) { + // trim whitespaces starting from the beginning of the span up to the current line + var originalStart = sourceFile.getLineAndCharacterFromPosition(originalRange.pos); + trimTrailingWhitespacesForLines(originalStart.line, rangeStart.line); + } + else { + lineAdded = + processPair(range, rangeStart.line, parent, previousRange, previousRangeStartLine, previousParent, contextNode, dynamicIndentation) + } + } + + previousRange = range; + previousParent = parent; + previousRangeStartLine = rangeStart.line; + previousRangeHasError = rangeHasError; + + return lineAdded; + } + + function processPair(currentItem: TextRangeWithKind, + currentStartLine: number, + currentParent: Node, + previousItem: TextRangeWithKind, + previousStartLine: number, + previousParent: Node, + contextNode: Node, + dynamicIndentation: DynamicIndentation): boolean { + + formattingContext.updateContext(previousItem, previousParent, currentItem, currentParent, contextNode); + + var rule = rulesProvider.getRulesMap().GetRule(formattingContext); + + var trimTrailingWhitespaces: boolean; + var lineAdded: boolean; + if (rule) { + applyRuleEdits(rule, previousItem, previousStartLine, currentItem, currentStartLine); + + if (rule.Operation.Action & (RuleAction.Space | RuleAction.Delete) && currentStartLine !== previousStartLine) { + // Handle the case where the next line is moved to be the end of this line. + // In this case we don't indent the next line in the next pass. + if (currentParent.getStart(sourceFile) === currentItem.pos) { + lineAdded = false; + } + } + else if (rule.Operation.Action & RuleAction.NewLine && currentStartLine === previousStartLine) { + // Handle the case where token2 is moved to the new line. + // In this case we indent token2 in the next pass but we set + // sameLineIndent flag to notify the indenter that the indentation is within the line. + if (currentParent.getStart(sourceFile) === currentItem.pos) { + lineAdded = true; + } + } + + if (lineAdded !== undefined) { + dynamicIndentation.recomputeIndentation(lineAdded); + } + + // We need to trim trailing whitespace between the tokens if they were on different lines, and no rule was applied to put them on the same line + trimTrailingWhitespaces = + (rule.Operation.Action & (RuleAction.NewLine | RuleAction.Space)) && + rule.Flag !== RuleFlags.CanDeleteNewLines; + } + else { + trimTrailingWhitespaces = true; + } + + if (currentStartLine !== previousStartLine && trimTrailingWhitespaces) { + // We need to trim trailing whitespace between the tokens if they were on different lines, and no rule was applied to put them on the same line + trimTrailingWhitespacesForLines(previousStartLine, currentStartLine, previousItem); + } + + return lineAdded; + } + + function insertIndentation(pos: number, indentation: number, lineAdded: boolean): void { + var indentationString = getIndentationString(indentation, options); + if (lineAdded) { + // new line is added before the token by the formatting rules + // insert indentation string at the very beginning of the token + recordReplace(pos, 0, indentationString); + } + else { + var tokenStart = sourceFile.getLineAndCharacterFromPosition(pos); + if (indentation !== tokenStart.character - 1) { + var startLinePosition = getStartPositionOfLine(tokenStart.line, sourceFile); + recordReplace(startLinePosition, tokenStart.character - 1, indentationString); + } + } + } + + function indentMultilineComment(commentRange: TextRange, indentation: number, firstLineIsIndented: boolean) { + // split comment in lines + var startLine = sourceFile.getLineAndCharacterFromPosition(commentRange.pos).line; + var endLine = sourceFile.getLineAndCharacterFromPosition(commentRange.end).line; + + if (startLine === endLine) { + if (!firstLineIsIndented) { + // treat as single line comment + insertIndentation(commentRange.pos, indentation, /*lineAdded*/ false); + } + return; + } + else { + var parts: TextRange[] = []; + var startPos = commentRange.pos; + for (var line = startLine; line < endLine; ++line) { + var endOfLine = getEndLinePosition(line, sourceFile); + parts.push({ pos: startPos, end: endOfLine }); + startPos = getStartPositionOfLine(line + 1, sourceFile); + } + + parts.push({ pos: startPos, end: commentRange.end }); + } + + var startLinePos = getStartPositionOfLine(startLine, sourceFile); + + var nonWhitespaceColumnInFirstPart = + SmartIndenter.findFirstNonWhitespaceColumn(startLinePos, parts[0].pos, sourceFile, options); + + if (indentation === nonWhitespaceColumnInFirstPart) { + return; + } + + var startIndex = 0; + if (firstLineIsIndented) { + startIndex = 1; + startLine++; + } + + // shift all parts on the delta size + var delta = indentation - nonWhitespaceColumnInFirstPart; + for (var i = startIndex, len = parts.length; i < len; ++i, ++startLine) { + var startLinePos = getStartPositionOfLine(startLine, sourceFile); + var nonWhitespaceColumn = + i === 0 + ? nonWhitespaceColumnInFirstPart + : SmartIndenter.findFirstNonWhitespaceColumn(parts[i].pos, parts[i].end, sourceFile, options); + + var newIndentation = nonWhitespaceColumn + delta; + if (newIndentation > 0) { + var indentationString = getIndentationString(newIndentation, options); + recordReplace(startLinePos, nonWhitespaceColumn, indentationString); + } + else { + recordDelete(startLinePos, nonWhitespaceColumn); + } + } + } + + function trimTrailingWhitespacesForLines(line1: number, line2: number, range?: TextRangeWithKind) { + for (var line = line1; line < line2; ++line) { + var lineStartPosition = getStartPositionOfLine(line, sourceFile); + var lineEndPosition = getEndLinePosition(line, sourceFile); + + // do not trim whitespaces in comments + if (range && isComment(range.kind) && range.pos <= lineEndPosition && range.end > lineEndPosition) { + continue; + } + + var pos = lineEndPosition; + while (pos >= lineStartPosition && isWhiteSpace(sourceFile.text.charCodeAt(pos))) { + pos--; + } + if (pos !== lineEndPosition) { + Debug.assert(pos === lineStartPosition || !isWhiteSpace(sourceFile.text.charCodeAt(pos))); + recordDelete(pos + 1, lineEndPosition - pos); + } + } + } + + function newTextChange(start: number, len: number, newText: string): TextChange { + return { span: new TextSpan(start, len), newText } + } + + function recordDelete(start: number, len: number) { + if (len) { + edits.push(newTextChange(start, len, "")); + } + } + + function recordReplace(start: number, len: number, newText: string) { + if (len || newText) { + edits.push(newTextChange(start, len, newText)); + } + } + + function applyRuleEdits(rule: Rule, + previousRange: TextRangeWithKind, + previousStartLine: number, + currentRange: TextRangeWithKind, + currentStartLine: number): void { + + var between: TextRange; + switch (rule.Operation.Action) { + case RuleAction.Ignore: + // no action required + return; + case RuleAction.Delete: + if (previousRange.end !== currentRange.pos) { + // delete characters starting from t1.end up to t2.pos exclusive + recordDelete(previousRange.end, currentRange.pos - previousRange.end); + } + break; + case RuleAction.NewLine: + // exit early if we on different lines and rule cannot change number of newlines + // if line1 and line2 are on subsequent lines then no edits are required - ok to exit + // if line1 and line2 are separated with more than one newline - ok to exit since we cannot delete extra new lines + if (rule.Flag !== RuleFlags.CanDeleteNewLines && previousStartLine !== currentStartLine) { + return; + } + + // edit should not be applied only if we have one line feed between elements + var lineDelta = currentStartLine - previousStartLine; + if (lineDelta !== 1) { + recordReplace(previousRange.end, currentRange.pos - previousRange.end, options.NewLineCharacter); + } + break; + case RuleAction.Space: + // exit early if we on different lines and rule cannot change number of newlines + if (rule.Flag !== RuleFlags.CanDeleteNewLines && previousStartLine !== currentStartLine) { + return; + } + + var posDelta = currentRange.pos - previousRange.end; + if (posDelta !== 1 || sourceFile.text.charCodeAt(previousRange.end) !== CharacterCodes.space) { + recordReplace(previousRange.end, currentRange.pos - previousRange.end, " "); + } + break; + } + } + } + + function isSomeBlock(kind: SyntaxKind): boolean { + switch (kind) { + case SyntaxKind.Block: + case SyntaxKind.FunctionBlock: + case SyntaxKind.TryBlock: + case SyntaxKind.CatchBlock: + case SyntaxKind.FinallyBlock: + case SyntaxKind.ModuleBlock: + return true; + } + return false; + } + + function getOpenTokenForList(node: Node, list: Node[]) { + switch (node.kind) { + case SyntaxKind.Constructor: + case SyntaxKind.FunctionDeclaration: + case SyntaxKind.FunctionExpression: + case SyntaxKind.Method: + case SyntaxKind.ArrowFunction: + if ((node).typeParameters === list) { + return SyntaxKind.LessThanToken; + } + else if ((node).parameters === list) { + return SyntaxKind.OpenParenToken; + } + break; + case SyntaxKind.CallExpression: + case SyntaxKind.NewExpression: + if ((node).typeArguments === list) { + return SyntaxKind.LessThanToken; + } + else if ((node).arguments === list) { + return SyntaxKind.OpenParenToken; + } + break; + case SyntaxKind.TypeReference: + if ((node).typeArguments === list) { + return SyntaxKind.LessThanToken; + } + } + + return SyntaxKind.Unknown; + } + + function getCloseTokenForOpenToken(kind: SyntaxKind) { + switch (kind) { + case SyntaxKind.OpenParenToken: + return SyntaxKind.CloseParenToken; + case SyntaxKind.LessThanToken: + return SyntaxKind.GreaterThanToken; + } + + return SyntaxKind.Unknown; + } +} \ No newline at end of file diff --git a/src/services/formatting/formatter.ts b/src/services/formatting/formatter.ts deleted file mode 100644 index 35e93f84cb8..00000000000 --- a/src/services/formatting/formatter.ts +++ /dev/null @@ -1,315 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -/// - -module TypeScript.Services.Formatting { - export class Formatter extends MultipleTokenIndenter { - private previousTokenSpan: TokenSpan = null; - private previousTokenParent: IndentationNodeContext = null; - - // TODO: implement it with skipped tokens in Fidelity - private scriptHasErrors: boolean = false; - - private rulesProvider: RulesProvider; - private formattingRequestKind: FormattingRequestKind; - private formattingContext: FormattingContext; - - constructor(textSpan: TextSpan, - sourceUnit: SourceUnitSyntax, - indentFirstToken: boolean, - options: FormattingOptions, - snapshot: ITextSnapshot, - rulesProvider: RulesProvider, - formattingRequestKind: FormattingRequestKind) { - - super(textSpan, sourceUnit, snapshot, indentFirstToken, options); - - this.previousTokenParent = this.parent().clone(this.indentationNodeContextPool()); - - this.rulesProvider = rulesProvider; - this.formattingRequestKind = formattingRequestKind; - this.formattingContext = new FormattingContext(this.snapshot(), this.formattingRequestKind); - } - - public static getEdits(textSpan: TextSpan, - sourceUnit: SourceUnitSyntax, - options: FormattingOptions, - indentFirstToken: boolean, - snapshot: ITextSnapshot, - rulesProvider: RulesProvider, - formattingRequestKind: FormattingRequestKind): TextEditInfo[] { - var walker = new Formatter(textSpan, sourceUnit, indentFirstToken, options, snapshot, rulesProvider, formattingRequestKind); - walker.walk(sourceUnit); - return walker.edits(); - } - - public visitTokenInSpan(token: ISyntaxToken): void { - if (token.fullWidth() !== 0) { - var tokenSpan = new TextSpan(this.position() + token.leadingTriviaWidth(), width(token)); - if (this.textSpan().containsTextSpan(tokenSpan)) { - this.processToken(token); - } - } - - // Call the base class to process the token and indent it if needed - super.visitTokenInSpan(token); - } - - private processToken(token: ISyntaxToken): void { - var position = this.position(); - - // Extract any leading comments - if (token.leadingTriviaWidth() !== 0) { - this.processTrivia(token.leadingTrivia(), position); - position += token.leadingTriviaWidth(); - } - - // Push the token - var currentTokenSpan = new TokenSpan(token.kind, position, width(token)); - if (!this.parent().hasSkippedOrMissingTokenChild()) { - if (this.previousTokenSpan) { - // Note that formatPair calls TrimWhitespaceInLineRange in between the 2 tokens - this.formatPair(this.previousTokenSpan, this.previousTokenParent, currentTokenSpan, this.parent()); - } - else { - // We still want to trim whitespace even if it is the first trivia of the first token. Trim from the beginning of the span to the trivia - this.trimWhitespaceInLineRange(this.getLineNumber(this.textSpan()), this.getLineNumber(currentTokenSpan)); - } - } - this.previousTokenSpan = currentTokenSpan; - if (this.previousTokenParent) { - // Make sure to clear the previous parent before assigning a new value to it - this.indentationNodeContextPool().releaseNode(this.previousTokenParent, /* recursive */true); - } - this.previousTokenParent = this.parent().clone(this.indentationNodeContextPool()); - position += width(token); - } - - private processTrivia(triviaList: ISyntaxTriviaList, fullStart: number) { - var position = fullStart; - - for (var i = 0, n = triviaList.count(); i < n ; i++) { - var trivia = triviaList.syntaxTriviaAt(i); - // For a comment, format it like it is a token. For skipped text, eat it up as a token, but skip the formatting - if (trivia.isComment() || trivia.isSkippedToken()) { - var currentTokenSpan = new TokenSpan(trivia.kind, position, trivia.fullWidth()); - if (this.textSpan().containsTextSpan(currentTokenSpan)) { - if (trivia.isComment() && this.previousTokenSpan) { - // Note that formatPair calls TrimWhitespaceInLineRange in between the 2 tokens - this.formatPair(this.previousTokenSpan, this.previousTokenParent, currentTokenSpan, this.parent()); - } - else { - // We still want to trim whitespace even if it is the first trivia of the first token. Trim from the beginning of the span to the trivia - var startLine = this.getLineNumber(this.previousTokenSpan || this.textSpan()); - this.trimWhitespaceInLineRange(startLine, this.getLineNumber(currentTokenSpan)); - } - this.previousTokenSpan = currentTokenSpan; - if (this.previousTokenParent) { - // Make sure to clear the previous parent before assigning a new value to it - this.indentationNodeContextPool().releaseNode(this.previousTokenParent, /* recursive */true); - } - this.previousTokenParent = this.parent().clone(this.indentationNodeContextPool()); - } - } - - position += trivia.fullWidth(); - } - } - - private findCommonParents(parent1: IndentationNodeContext, parent2: IndentationNodeContext): IndentationNodeContext { - // TODO: disable debug assert message - - var shallowParent: IndentationNodeContext; - var shallowParentDepth: number; - var deepParent: IndentationNodeContext; - var deepParentDepth: number; - - if (parent1.depth() < parent2.depth()) { - shallowParent = parent1; - shallowParentDepth = parent1.depth(); - deepParent = parent2; - deepParentDepth = parent2.depth(); - } - else { - shallowParent = parent2; - shallowParentDepth = parent2.depth(); - deepParent = parent1; - deepParentDepth = parent1.depth(); - } - - Debug.assert(shallowParentDepth >= 0, "Expected shallowParentDepth >= 0"); - Debug.assert(deepParentDepth >= 0, "Expected deepParentDepth >= 0"); - Debug.assert(deepParentDepth >= shallowParentDepth, "Expected deepParentDepth >= shallowParentDepth"); - - while (deepParentDepth > shallowParentDepth) { - deepParent = deepParent.parent(); - deepParentDepth--; - } - - Debug.assert(deepParentDepth === shallowParentDepth, "Expected deepParentDepth === shallowParentDepth"); - - while (deepParent.node() && shallowParent.node()) { - if (deepParent.node() === shallowParent.node()) { - return deepParent; - } - deepParent = deepParent.parent(); - shallowParent = shallowParent.parent(); - } - - // The root should be the first element in the parent chain, we can not be here unless something wrong - // happened along the way - throw Errors.invalidOperation(); - } - - private formatPair(t1: TokenSpan, t1Parent: IndentationNodeContext, t2: TokenSpan, t2Parent: IndentationNodeContext): void { - var token1Line = this.getLineNumber(t1); - var token2Line = this.getLineNumber(t2); - - // Find common parent - var commonParent= this.findCommonParents(t1Parent, t2Parent); - - // Update the context - this.formattingContext.updateContext(t1, t1Parent, t2, t2Parent, commonParent); - - // Find rules matching the current context - var rule = this.rulesProvider.getRulesMap().GetRule(this.formattingContext); - - if (rule != null) { - // Record edits from the rule - this.RecordRuleEdits(rule, t1, t2); - - // Handle the case where the next line is moved to be the end of this line. - // In this case we don't indent the next line in the next pass. - if ((rule.Operation.Action == RuleAction.Space || rule.Operation.Action == RuleAction.Delete) && - token1Line != token2Line) { - this.forceSkipIndentingNextToken(t2.start()); - } - - // Handle the case where token2 is moved to the new line. - // In this case we indent token2 in the next pass but we set - // sameLineIndent flag to notify the indenter that the indentation is within the line. - if (rule.Operation.Action == RuleAction.NewLine && token1Line == token2Line) { - this.forceIndentNextToken(t2.start()); - } - } - - // We need to trim trailing whitespace between the tokens if they were on different lines, and no rule was applied to put them on the same line - if (token1Line != token2Line && (!rule || (rule.Operation.Action != RuleAction.Delete && rule.Flag != RuleFlags.CanDeleteNewLines))) { - this.trimWhitespaceInLineRange(token1Line, token2Line, t1); - } - } - - private getLineNumber(span: TextSpan): number { - return this.snapshot().getLineNumberFromPosition(span.start()); - } - - private trimWhitespaceInLineRange(startLine: number, endLine: number, token?: TokenSpan): void { - for (var lineNumber = startLine; lineNumber < endLine; ++lineNumber) { - var line = this.snapshot().getLineFromLineNumber(lineNumber); - - this.trimWhitespace(line, token); - } - } - - private trimWhitespace(line: ITextSnapshotLine, token?: TokenSpan): void { - // Don't remove the trailing spaces inside comments (this includes line comments and block comments) - if (token && (token.kind == SyntaxKind.MultiLineCommentTrivia || token.kind == SyntaxKind.SingleLineCommentTrivia) && token.start() <= line.endPosition() && token.end() >= line.endPosition()) - return; - - var text = line.getText(); - var index = 0; - - for (index = text.length - 1; index >= 0; --index) { - if (!CharacterInfo.isWhitespace(text.charCodeAt(index))) { - break; - } - } - - ++index; - - if (index < text.length) { - this.recordEdit(line.startPosition() + index, line.length() - index, ""); - } - } - - private RecordRuleEdits(rule: Rule, t1: TokenSpan, t2: TokenSpan): void { - if (rule.Operation.Action == RuleAction.Ignore) { - return; - } - - var betweenSpan: TextSpan; - - switch (rule.Operation.Action) { - case RuleAction.Delete: - { - betweenSpan = new TextSpan(t1.end(), t2.start() - t1.end()); - - if (betweenSpan.length() > 0) { - this.recordEdit(betweenSpan.start(), betweenSpan.length(), ""); - return; - } - } - break; - - case RuleAction.NewLine: - { - if (!(rule.Flag == RuleFlags.CanDeleteNewLines || this.getLineNumber(t1) == this.getLineNumber(t2))) { - return; - } - - betweenSpan = new TextSpan(t1.end(), t2.start() - t1.end()); - - var doEdit = false; - var betweenText = this.snapshot().getText(betweenSpan); - - var lineFeedLoc = betweenText.indexOf(this.options.newLineCharacter); - if (lineFeedLoc < 0) { - // no linefeeds, do the edit - doEdit = true; - } - else { - // We only require one line feed. If there is another one, do the edit - lineFeedLoc = betweenText.indexOf(this.options.newLineCharacter, lineFeedLoc + 1); - if (lineFeedLoc >= 0) { - doEdit = true; - } - } - - if (doEdit) { - this.recordEdit(betweenSpan.start(), betweenSpan.length(), this.options.newLineCharacter); - return; - } - } - break; - - case RuleAction.Space: - { - if (!(rule.Flag == RuleFlags.CanDeleteNewLines || this.getLineNumber(t1) == this.getLineNumber(t2))) { - return; - } - - betweenSpan = new TextSpan(t1.end(), t2.start() - t1.end()); - - if (betweenSpan.length() > 1 || this.snapshot().getText(betweenSpan) != " ") { - this.recordEdit(betweenSpan.start(), betweenSpan.length(), " "); - return; - } - } - break; - } - } - } -} \ No newline at end of file diff --git a/src/services/formatting/formattingContext.ts b/src/services/formatting/formattingContext.ts index 4f46341ef05..2bfb155921e 100644 --- a/src/services/formatting/formattingContext.ts +++ b/src/services/formatting/formattingContext.ts @@ -13,48 +13,48 @@ // limitations under the License. // -/// +/// -module TypeScript.Services.Formatting { +module ts.formatting { export class FormattingContext { - public currentTokenSpan: TokenSpan = null; - public nextTokenSpan: TokenSpan = null; - public contextNode: IndentationNodeContext = null; - public currentTokenParent: IndentationNodeContext = null; - public nextTokenParent: IndentationNodeContext = null; + public currentTokenSpan: TextRangeWithKind; + public nextTokenSpan: TextRangeWithKind; + public contextNode: Node; + public currentTokenParent: Node; + public nextTokenParent: Node; - private contextNodeAllOnSameLine: boolean = null; - private nextNodeAllOnSameLine: boolean = null; - private tokensAreOnSameLine: boolean = null; - private contextNodeBlockIsOnOneLine: boolean = null; - private nextNodeBlockIsOnOneLine: boolean = null; + private contextNodeAllOnSameLine: boolean; + private nextNodeAllOnSameLine: boolean; + private tokensAreOnSameLine: boolean; + private contextNodeBlockIsOnOneLine: boolean; + private nextNodeBlockIsOnOneLine: boolean; - constructor(private snapshot: ITextSnapshot, public formattingRequestKind: FormattingRequestKind) { - Debug.assert(this.snapshot != null, "snapshot is null"); + constructor(private sourceFile: SourceFile, public formattingRequestKind: FormattingRequestKind) { } - public updateContext(currentTokenSpan: TokenSpan, currentTokenParent: IndentationNodeContext, nextTokenSpan: TokenSpan, nextTokenParent: IndentationNodeContext, commonParent: IndentationNodeContext) { - Debug.assert(currentTokenSpan != null, "currentTokenSpan is null"); - Debug.assert(currentTokenParent != null, "currentTokenParent is null"); - Debug.assert(nextTokenSpan != null, "nextTokenSpan is null"); - Debug.assert(nextTokenParent != null, "nextTokenParent is null"); - Debug.assert(commonParent != null, "commonParent is null"); + public updateContext(currentRange: TextRangeWithKind, currentTokenParent: Node, nextRange: TextRangeWithKind, nextTokenParent: Node, commonParent: Node) { + Debug.assert(currentRange !== undefined, "currentTokenSpan is null"); + Debug.assert(currentTokenParent !== undefined, "currentTokenParent is null"); + Debug.assert(nextRange !== undefined, "nextTokenSpan is null"); + Debug.assert(nextTokenParent !== undefined, "nextTokenParent is null"); + Debug.assert(commonParent !== undefined, "commonParent is null"); - this.currentTokenSpan = currentTokenSpan; + this.currentTokenSpan = currentRange; this.currentTokenParent = currentTokenParent; - this.nextTokenSpan = nextTokenSpan; + this.nextTokenSpan = nextRange; this.nextTokenParent = nextTokenParent; this.contextNode = commonParent; - this.contextNodeAllOnSameLine = null; - this.nextNodeAllOnSameLine = null; - this.tokensAreOnSameLine = null; - this.contextNodeBlockIsOnOneLine = null; - this.nextNodeBlockIsOnOneLine = null; + // drop cached results + this.contextNodeAllOnSameLine = undefined; + this.nextNodeAllOnSameLine = undefined; + this.tokensAreOnSameLine = undefined; + this.contextNodeBlockIsOnOneLine = undefined; + this.nextNodeBlockIsOnOneLine = undefined; } public ContextNodeAllOnSameLine(): boolean { - if (this.contextNodeAllOnSameLine === null) { + if (this.contextNodeAllOnSameLine === undefined) { this.contextNodeAllOnSameLine = this.NodeIsOnOneLine(this.contextNode); } @@ -62,7 +62,7 @@ module TypeScript.Services.Formatting { } public NextNodeAllOnSameLine(): boolean { - if (this.nextNodeAllOnSameLine === null) { + if (this.nextNodeAllOnSameLine === undefined) { this.nextNodeAllOnSameLine = this.NodeIsOnOneLine(this.nextTokenParent); } @@ -70,10 +70,9 @@ module TypeScript.Services.Formatting { } public TokensAreOnSameLine(): boolean { - if (this.tokensAreOnSameLine === null) { - var startLine = this.snapshot.getLineNumberFromPosition(this.currentTokenSpan.start()); - var endLine = this.snapshot.getLineNumberFromPosition(this.nextTokenSpan.start()); - + if (this.tokensAreOnSameLine === undefined) { + var startLine = this.sourceFile.getLineAndCharacterFromPosition(this.currentTokenSpan.pos).line; + var endLine = this.sourceFile.getLineAndCharacterFromPosition(this.nextTokenSpan.pos).line; this.tokensAreOnSameLine = (startLine == endLine); } @@ -81,7 +80,7 @@ module TypeScript.Services.Formatting { } public ContextNodeBlockIsOnOneLine() { - if (this.contextNodeBlockIsOnOneLine === null) { + if (this.contextNodeBlockIsOnOneLine === undefined) { this.contextNodeBlockIsOnOneLine = this.BlockIsOnOneLine(this.contextNode); } @@ -89,28 +88,28 @@ module TypeScript.Services.Formatting { } public NextNodeBlockIsOnOneLine() { - if (this.nextNodeBlockIsOnOneLine === null) { + if (this.nextNodeBlockIsOnOneLine === undefined) { this.nextNodeBlockIsOnOneLine = this.BlockIsOnOneLine(this.nextTokenParent); } return this.nextNodeBlockIsOnOneLine; } - public NodeIsOnOneLine(node: IndentationNodeContext): boolean { - var startLine = this.snapshot.getLineNumberFromPosition(node.start()); - var endLine = this.snapshot.getLineNumberFromPosition(node.end()); - + private NodeIsOnOneLine(node: Node): boolean { + var startLine = this.sourceFile.getLineAndCharacterFromPosition(node.getStart(this.sourceFile)).line; + var endLine = this.sourceFile.getLineAndCharacterFromPosition(node.getEnd()).line; return startLine == endLine; } - // Now we know we have a block (or a fake block represented by some other kind of node with an open and close brace as children). - // IMPORTANT!!! This relies on the invariant that IsBlockContext must return true ONLY for nodes with open and close braces as immediate children - public BlockIsOnOneLine(node: IndentationNodeContext): boolean { - var block = node.node(); - - // Now check if they are on the same line - return this.snapshot.getLineNumberFromPosition(fullEnd(block.openBraceToken)) === - this.snapshot.getLineNumberFromPosition(start(block.closeBraceToken)); + private BlockIsOnOneLine(node: Node): boolean { + var openBrace = findChildOfKind(node, SyntaxKind.OpenBraceToken, this.sourceFile); + var closeBrace = findChildOfKind(node, SyntaxKind.CloseBraceToken, this.sourceFile); + if (openBrace && closeBrace) { + var startLine = this.sourceFile.getLineAndCharacterFromPosition(openBrace.getEnd()).line; + var endLine = this.sourceFile.getLineAndCharacterFromPosition(closeBrace.getStart(this.sourceFile)).line; + return startLine === endLine; + } + return false; } } } \ No newline at end of file diff --git a/src/services/formatting/formattingManager.ts b/src/services/formatting/formattingManager.ts deleted file mode 100644 index 40bc3fdeb6d..00000000000 --- a/src/services/formatting/formattingManager.ts +++ /dev/null @@ -1,125 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -/// - -module TypeScript.Services.Formatting { - export class FormattingManager { - private options: FormattingOptions; - - constructor(private syntaxTree: SyntaxTree, - private snapshot: ITextSnapshot, - private rulesProvider: RulesProvider, - editorOptions: ts.EditorOptions) { - // - // TODO: convert to use FormattingOptions instead of EditorOptions - this.options = new FormattingOptions(!editorOptions.ConvertTabsToSpaces, editorOptions.TabSize, editorOptions.IndentSize, editorOptions.NewLineCharacter) - } - - public formatSelection(minChar: number, limChar: number): ts.TextChange[] { - var span = TextSpan.fromBounds(minChar, limChar); - return this.formatSpan(span, FormattingRequestKind.FormatSelection); - } - - public formatDocument(): ts.TextChange[] { - var span = TextSpan.fromBounds(0, this.snapshot.getLength()); - return this.formatSpan(span, FormattingRequestKind.FormatDocument); - } - - public formatOnSemicolon(caretPosition: number): ts.TextChange[] { - var sourceUnit = this.syntaxTree.sourceUnit(); - var semicolonPositionedToken = findToken(sourceUnit, caretPosition - 1); - - if (semicolonPositionedToken.kind === SyntaxKind.SemicolonToken) { - // Find the outer most parent that this semicolon terminates - var current: ISyntaxElement = semicolonPositionedToken; - while (current.parent !== null && - fullEnd(current.parent) === fullEnd(semicolonPositionedToken) && - current.parent.kind !== SyntaxKind.List) { - current = current.parent; - } - - // Compute the span - var span = new TextSpan(fullStart(current), fullWidth(current)); - - // Format the span - return this.formatSpan(span, FormattingRequestKind.FormatOnSemicolon); - } - - return []; - } - - public formatOnClosingCurlyBrace(caretPosition: number): ts.TextChange[] { - var sourceUnit = this.syntaxTree.sourceUnit(); - var closeBracePositionedToken = findToken(sourceUnit, caretPosition - 1); - - if (closeBracePositionedToken.kind === SyntaxKind.CloseBraceToken) { - // Find the outer most parent that this closing brace terminates - var current: ISyntaxElement = closeBracePositionedToken; - while (current.parent !== null && - fullEnd(current.parent) === fullEnd(closeBracePositionedToken) && - current.parent.kind !== SyntaxKind.List) { - current = current.parent; - } - - // Compute the span - var span = new TextSpan(fullStart(current), fullWidth(current)); - - // Format the span - return this.formatSpan(span, FormattingRequestKind.FormatOnClosingCurlyBrace); - } - - return []; - } - - public formatOnEnter(caretPosition: number): ts.TextChange[] { - var lineNumber = this.snapshot.getLineNumberFromPosition(caretPosition); - - if (lineNumber > 0) { - // Format both lines - var prevLine = this.snapshot.getLineFromLineNumber(lineNumber - 1); - var currentLine = this.snapshot.getLineFromLineNumber(lineNumber); - var span = TextSpan.fromBounds(prevLine.startPosition(), currentLine.endPosition()); - - // Format the span - return this.formatSpan(span, FormattingRequestKind.FormatOnEnter); - - } - - return []; - } - - private formatSpan(span: TextSpan, formattingRequestKind: FormattingRequestKind): ts.TextChange[] { - // Always format from the beginning of the line - var startLine = this.snapshot.getLineFromPosition(span.start()); - span = TextSpan.fromBounds(startLine.startPosition(), span.end()); - - var result: ts.TextChange[] = []; - - var formattingEdits = Formatter.getEdits(span, this.syntaxTree.sourceUnit(), this.options, true, this.snapshot, this.rulesProvider, formattingRequestKind); - - // - // TODO: Change the ILanguageService interface to return TextEditInfo (with start, and length) instead of TextEdit (with minChar and limChar) - formattingEdits.forEach(item => { - result.push({ - span: new TextSpan(item.position, item.length), - newText: item.replaceWith - }); - }); - - return result; - } - } -} \ No newline at end of file diff --git a/src/services/formatting/formattingRequestKind.ts b/src/services/formatting/formattingRequestKind.ts index b766058e1ca..a66169c1e7c 100644 --- a/src/services/formatting/formattingRequestKind.ts +++ b/src/services/formatting/formattingRequestKind.ts @@ -13,15 +13,14 @@ // limitations under the License. // -/// +/// -module TypeScript.Services.Formatting { - export enum FormattingRequestKind { +module ts.formatting { + export const enum FormattingRequestKind { FormatDocument, FormatSelection, FormatOnEnter, FormatOnSemicolon, - FormatOnClosingCurlyBrace, - FormatOnPaste + FormatOnClosingCurlyBrace } } \ No newline at end of file diff --git a/src/services/formatting/formattingScanner.ts b/src/services/formatting/formattingScanner.ts new file mode 100644 index 00000000000..9cf2a05a5d9 --- /dev/null +++ b/src/services/formatting/formattingScanner.ts @@ -0,0 +1,222 @@ +/// +/// + +module ts.formatting { + var scanner = createScanner(ScriptTarget.Latest, /*skipTrivia*/ false); + + export interface FormattingScanner { + advance(): void; + isOnToken(): boolean; + readTokenInfo(n: Node): TokenInfo; + lastTrailingTriviaWasNewLine(): boolean; + close(): void; + } + + const enum ScanAction{ + Scan, + RescanGreaterThanToken, + RescanSlashToken, + RescanTemplateToken + } + + export function getFormattingScanner(sourceFile: SourceFile, startPos: number, endPos: number): FormattingScanner { + + scanner.setText(sourceFile.text); + scanner.setTextPos(startPos); + + var wasNewLine: boolean = true; + var leadingTrivia: TextRangeWithKind[]; + var trailingTrivia: TextRangeWithKind[]; + + var savedPos: number; + var lastScanAction: ScanAction; + var lastTokenInfo: TokenInfo; + + return { + advance: advance, + readTokenInfo: readTokenInfo, + isOnToken: isOnToken, + lastTrailingTriviaWasNewLine: () => wasNewLine, + close: () => { + lastTokenInfo = undefined; + scanner.setText(undefined); + } + } + + function advance(): void { + lastTokenInfo = undefined; + var isStarted = scanner.getStartPos() !== startPos; + + if (isStarted) { + if (trailingTrivia) { + Debug.assert(trailingTrivia.length !== 0); + wasNewLine = trailingTrivia[trailingTrivia.length - 1].kind === SyntaxKind.NewLineTrivia; + } + else { + wasNewLine = false; + } + } + + leadingTrivia = undefined; + trailingTrivia = undefined; + + if (!isStarted) { + scanner.scan(); + } + + var t: SyntaxKind; + var pos = scanner.getStartPos(); + + // Read leading trivia and token + while (pos < endPos) { + var t = scanner.getToken(); + if (!isTrivia(t)) { + break; + } + + // consume leading trivia + scanner.scan(); + var item = { + pos: pos, + end: scanner.getStartPos(), + kind: t + } + + pos = scanner.getStartPos(); + + if (!leadingTrivia) { + leadingTrivia = []; + } + leadingTrivia.push(item); + } + + savedPos = scanner.getStartPos(); + } + + function shouldRescanGreaterThanToken(container: Node): boolean { + if (container.kind !== SyntaxKind.BinaryExpression) { + return false; + } + switch ((container).operator) { + case SyntaxKind.GreaterThanEqualsToken: + case SyntaxKind.GreaterThanGreaterThanEqualsToken: + case SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken: + case SyntaxKind.GreaterThanGreaterThanGreaterThanToken: + case SyntaxKind.GreaterThanGreaterThanToken: + return true; + } + + return false; + } + + function shouldRescanSlashToken(container: Node): boolean { + return container.kind === SyntaxKind.RegularExpressionLiteral; + } + + function shouldRescanTemplateToken(container: Node): boolean { + return container.kind === SyntaxKind.TemplateSpan; + } + + function startsWithSlashToken(t: SyntaxKind): boolean { + return t === SyntaxKind.SlashToken || t === SyntaxKind.SlashEqualsToken; + } + + function readTokenInfo(n: Node): TokenInfo { + if (!isOnToken()) { + // scanner is not on the token (either advance was not called yet or scanner is already past the end position) + return { + leadingTrivia: leadingTrivia, + trailingTrivia: undefined, + token: undefined + }; + } + + // normally scanner returns the smallest available token + // check the kind of context node to determine if scanner should have more greedy behavior and consume more text. + var expectedScanAction = + shouldRescanGreaterThanToken(n) + ? ScanAction.RescanGreaterThanToken + : shouldRescanSlashToken(n) + ? ScanAction.RescanSlashToken + : shouldRescanTemplateToken(n) + ? ScanAction.RescanTemplateToken + : ScanAction.Scan + + if (lastTokenInfo && expectedScanAction === lastScanAction) { + // readTokenInfo was called before with the same expected scan action. + // No need to re-scan text, return existing 'lastTokenInfo' + return lastTokenInfo; + } + + if (scanner.getStartPos() !== savedPos) { + Debug.assert(lastTokenInfo !== undefined); + // readTokenInfo was called before but scan action differs - rescan text + scanner.setTextPos(savedPos); + scanner.scan(); + } + + var currentToken = scanner.getToken(); + + if (expectedScanAction === ScanAction.RescanGreaterThanToken && currentToken === SyntaxKind.GreaterThanToken) { + currentToken = scanner.reScanGreaterToken(); + Debug.assert((n).operator === currentToken); + lastScanAction = ScanAction.RescanGreaterThanToken; + } + else if (expectedScanAction === ScanAction.RescanSlashToken && startsWithSlashToken(currentToken)) { + currentToken = scanner.reScanSlashToken(); + Debug.assert(n.kind === currentToken); + lastScanAction = ScanAction.RescanSlashToken; + } + else if (expectedScanAction === ScanAction.RescanTemplateToken && currentToken === SyntaxKind.CloseBraceToken) { + currentToken = scanner.reScanTemplateToken(); + lastScanAction = ScanAction.RescanTemplateToken; + } + else { + lastScanAction = ScanAction.Scan; + } + + var token: TextRangeWithKind = { + pos: scanner.getStartPos(), + end: scanner.getTextPos(), + kind: currentToken + } + + // consume trailing trivia + while(scanner.getStartPos() < endPos) { + currentToken = scanner.scan(); + if (!isTrivia(currentToken)) { + break; + } + var trivia = { + pos: scanner.getStartPos(), + end: scanner.getTextPos(), + kind: currentToken + }; + + if (!trailingTrivia) { + trailingTrivia = []; + } + + trailingTrivia.push(trivia); + + if (currentToken === SyntaxKind.NewLineTrivia) { + // move past new line + scanner.scan(); + break; + } + } + + return lastTokenInfo = { + leadingTrivia: leadingTrivia, + trailingTrivia: trailingTrivia, + token: token + } + } + + function isOnToken(): boolean { + var current = (lastTokenInfo && lastTokenInfo.token.kind) || scanner.getToken(); + var startPos = (lastTokenInfo && lastTokenInfo.token.pos) || scanner.getStartPos(); + return startPos < endPos && current !== SyntaxKind.EndOfFileToken && !isTrivia(current); + } + } +} \ No newline at end of file diff --git a/src/services/formatting/indentation.ts b/src/services/formatting/indentation.ts new file mode 100644 index 00000000000..f6f8fc0319f --- /dev/null +++ b/src/services/formatting/indentation.ts @@ -0,0 +1,54 @@ +module ts.formatting { + + var internedTabsIndentation: string[]; + var internedSpacesIndentation: string[]; + + export function getIndentationString(indentation: number, options: FormatCodeOptions): string { + if (!options.ConvertTabsToSpaces) { + var tabs = Math.floor(indentation / options.TabSize); + var spaces = indentation - tabs * options.TabSize; + + var tabString: string; + if (!internedTabsIndentation) { + internedTabsIndentation = []; + } + + if (internedTabsIndentation[tabs] === undefined) { + internedTabsIndentation[tabs] = tabString = repeat('\t', tabs); + } + else { + tabString = internedTabsIndentation[tabs]; + } + + return spaces ? tabString + repeat(" ", spaces) : tabString; + } + else { + var spacesString: string; + var quotient = Math.floor(indentation / options.IndentSize); + var remainder = indentation % options.IndentSize; + if (!internedSpacesIndentation) { + internedSpacesIndentation = []; + } + + if (internedSpacesIndentation[quotient] === undefined) { + spacesString = repeat(" ", options.IndentSize * quotient); + internedSpacesIndentation[quotient] = spacesString; + } + else { + spacesString = internedSpacesIndentation[quotient]; + } + + + return remainder ? spacesString + repeat(" ", remainder) : spacesString; + } + + function repeat(value: string, count: number): string { + var s = ""; + for (var i = 0; i < count; ++i) { + s += value; + } + + return s; + } + } +} \ No newline at end of file diff --git a/src/services/formatting/indentationNodeContext.ts b/src/services/formatting/indentationNodeContext.ts deleted file mode 100644 index 7aa10d2f9b9..00000000000 --- a/src/services/formatting/indentationNodeContext.ts +++ /dev/null @@ -1,103 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -/// - -module TypeScript.Services.Formatting { - export class IndentationNodeContext { - private _node: ISyntaxNode; - private _parent: IndentationNodeContext; - private _fullStart: number; - private _indentationAmount: number; - private _childIndentationAmountDelta: number; - private _depth: number; - private _hasSkippedOrMissingTokenChild: boolean; - - constructor(parent: IndentationNodeContext, node: ISyntaxNode, fullStart: number, indentationAmount: number, childIndentationAmountDelta: number) { - this.update(parent, node, fullStart, indentationAmount, childIndentationAmountDelta); - } - - public parent(): IndentationNodeContext { - return this._parent; - } - - public node(): ISyntaxNode { - return this._node; - } - - public fullStart(): number { - return this._fullStart; - } - - public fullWidth(): number { - return fullWidth(this._node); - } - - public start(): number { - return this._fullStart + leadingTriviaWidth(this._node); - } - - public end(): number { - return this._fullStart + leadingTriviaWidth(this._node) + width(this._node); - } - - public indentationAmount(): number { - return this._indentationAmount; - } - - public childIndentationAmountDelta(): number { - return this._childIndentationAmountDelta; - } - - public depth(): number { - return this._depth; - } - - public kind(): SyntaxKind { - return this._node.kind; - } - - public hasSkippedOrMissingTokenChild(): boolean { - if (this._hasSkippedOrMissingTokenChild === null) { - this._hasSkippedOrMissingTokenChild = Syntax.nodeHasSkippedOrMissingTokens(this._node); - } - return this._hasSkippedOrMissingTokenChild; - } - - public clone(pool: IndentationNodeContextPool): IndentationNodeContext { - var parent: IndentationNodeContext = null; - if (this._parent) { - parent = this._parent.clone(pool); - } - return pool.getNode(parent, this._node, this._fullStart, this._indentationAmount, this._childIndentationAmountDelta); - } - - public update(parent: IndentationNodeContext, node: ISyntaxNode, fullStart: number, indentationAmount: number, childIndentationAmountDelta: number) { - this._parent = parent; - this._node = node; - this._fullStart = fullStart; - this._indentationAmount = indentationAmount; - this._childIndentationAmountDelta = childIndentationAmountDelta; - this._hasSkippedOrMissingTokenChild = null; - - if (parent) { - this._depth = parent.depth() + 1; - } - else { - this._depth = 0; - } - } - } -} \ No newline at end of file diff --git a/src/services/formatting/indentationNodeContextPool.ts b/src/services/formatting/indentationNodeContextPool.ts deleted file mode 100644 index ea5b26277b5..00000000000 --- a/src/services/formatting/indentationNodeContextPool.ts +++ /dev/null @@ -1,43 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -/// - -module TypeScript.Services.Formatting { - export class IndentationNodeContextPool { - private nodes: IndentationNodeContext[] = []; - - public getNode(parent: IndentationNodeContext, node: ISyntaxNode, fullStart: number, indentationLevel: number, childIndentationLevelDelta: number): IndentationNodeContext { - if (this.nodes.length > 0) { - var cachedNode = this.nodes.pop(); - cachedNode.update(parent, node, fullStart, indentationLevel, childIndentationLevelDelta); - return cachedNode; - } - - return new IndentationNodeContext(parent, node, fullStart, indentationLevel, childIndentationLevelDelta); - } - - public releaseNode(node: IndentationNodeContext, recursive: boolean = false): void { - this.nodes.push(node); - - if (recursive) { - var parent = node.parent(); - if (parent) { - this.releaseNode(parent, recursive); - } - } - } - } -} \ No newline at end of file diff --git a/src/services/formatting/indentationTrackingWalker.ts b/src/services/formatting/indentationTrackingWalker.ts deleted file mode 100644 index 8e86c67f40f..00000000000 --- a/src/services/formatting/indentationTrackingWalker.ts +++ /dev/null @@ -1,371 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -/// - -module TypeScript.Services.Formatting { - export class IndentationTrackingWalker { - private _position: number = 0; - private _parent: IndentationNodeContext = null; - private _textSpan: TextSpan; - private _snapshot: ITextSnapshot; - private _lastTriviaWasNewLine: boolean; - private _indentationNodeContextPool: IndentationNodeContextPool; - private _text: ISimpleText; - - constructor(textSpan: TextSpan, sourceUnit: SourceUnitSyntax, snapshot: ITextSnapshot, indentFirstToken: boolean, public options: FormattingOptions) { - // Create a pool object to manage context nodes while walking the tree - this._indentationNodeContextPool = new IndentationNodeContextPool(); - - this._textSpan = textSpan; - this._text = sourceUnit.syntaxTree.text; - this._snapshot = snapshot; - this._parent = this._indentationNodeContextPool.getNode(null, sourceUnit, 0, 0, 0); - - // Is the first token in the span at the start of a new line. - this._lastTriviaWasNewLine = indentFirstToken; - } - - public position(): number { - return this._position; - } - - public parent(): IndentationNodeContext { - return this._parent; - } - - public textSpan(): TextSpan { - return this._textSpan; - } - - public snapshot(): ITextSnapshot { - return this._snapshot; - } - - public indentationNodeContextPool(): IndentationNodeContextPool { - return this._indentationNodeContextPool; - } - - public forceIndentNextToken(tokenStart: number): void { - this._lastTriviaWasNewLine = true; - this.forceRecomputeIndentationOfParent(tokenStart, true); - } - - public forceSkipIndentingNextToken(tokenStart: number): void { - this._lastTriviaWasNewLine = false; - this.forceRecomputeIndentationOfParent(tokenStart, false); - } - - public indentToken(token: ISyntaxToken, indentationAmount: number, commentIndentationAmount: number): void { - throw Errors.abstract(); - } - - public visitTokenInSpan(token: ISyntaxToken): void { - if (this._lastTriviaWasNewLine) { - // Compute the indentation level at the current token - var indentationAmount = this.getTokenIndentationAmount(token); - var commentIndentationAmount = this.getCommentIndentationAmount(token); - - // Process the token - this.indentToken(token, indentationAmount, commentIndentationAmount); - } - } - - public visitToken(token: ISyntaxToken): void { - var tokenSpan = new TextSpan(this._position, token.fullWidth()); - - if (tokenSpan.intersectsWithTextSpan(this._textSpan)) { - this.visitTokenInSpan(token); - - // Only track new lines on tokens within the range. Make sure to check that the last trivia is a newline, and not just one of the trivia - var _nextToken = nextToken(token); - if (_nextToken && _nextToken.hasLeadingTrivia()) { - var trivia = _nextToken.leadingTrivia(); - this._lastTriviaWasNewLine = trivia.hasNewLine(); - } - else { - this._lastTriviaWasNewLine = false; - } - } - - // Update the position - this._position += token.fullWidth(); - } - - public walk(element: ISyntaxElement) { - if (element) { - if (isToken(element)) { - this.visitToken(element); - } - else if (element.kind === SyntaxKind.List) { - for (var i = 0, n = childCount(element); i < n; i++) { - this.walk(childAt(element, i)); - } - } - else { - this.visitNode(element); - } - } - } - - private visitNode(node: ISyntaxNode): void { - var nodeSpan = new TextSpan(this._position, fullWidth(node)); - - if (nodeSpan.intersectsWithTextSpan(this._textSpan)) { - // Update indentation level - var indentation = this.getNodeIndentation(node); - - // Update the parent - var currentParent = this._parent; - this._parent = this._indentationNodeContextPool.getNode(currentParent, node, this._position, indentation.indentationAmount, indentation.indentationAmountDelta); - - // Visit node - for (var i = 0, n = childCount(node); i < n; i++) { - this.walk(childAt(node, i)); - } - - // Reset state - this._indentationNodeContextPool.releaseNode(this._parent); - this._parent = currentParent; - } - else { - // We're skipping the node, so update our position accordingly. - this._position += fullWidth(node); - } - } - - private getTokenIndentationAmount(token: ISyntaxToken): number { - // If this is the first token of a node, it should follow the node indentation and not the child indentation; - // (e.g.class in a class declaration or module in module declariotion). - // Open and close braces should follow the indentation of thier parent as well(e.g. - // class { - // } - // Also in a do-while statement, the while should be indented like the parent. - if (firstToken(this._parent.node()) === token || - token.kind === SyntaxKind.OpenBraceToken || token.kind === SyntaxKind.CloseBraceToken || - token.kind === SyntaxKind.OpenBracketToken || token.kind === SyntaxKind.CloseBracketToken || - (token.kind === SyntaxKind.WhileKeyword && this._parent.node().kind == SyntaxKind.DoStatement)) { - return this._parent.indentationAmount(); - } - - return (this._parent.indentationAmount() + this._parent.childIndentationAmountDelta()); - } - - private getCommentIndentationAmount(token: ISyntaxToken): number { - // If this is token terminating an indentation scope, leading comments should be indented to follow the children - // indentation level and not the node - - if (token.kind === SyntaxKind.CloseBraceToken || token.kind === SyntaxKind.CloseBracketToken) { - return (this._parent.indentationAmount() + this._parent.childIndentationAmountDelta()); - } - return this._parent.indentationAmount(); - } - - private getNodeIndentation(node: ISyntaxNode, newLineInsertedByFormatting?: boolean): { indentationAmount: number; indentationAmountDelta: number; } { - var parent = this._parent; - - // We need to get the parent's indentation, which could be one of 2 things. If first token of the parent is in the span, use the parent's computed indentation. - // If the parent was outside the span, use the actual indentation of the parent. - var parentIndentationAmount: number; - if (this._textSpan.containsPosition(parent.start())) { - parentIndentationAmount = parent.indentationAmount(); - } - else { - if (parent.kind() === SyntaxKind.Block && !this.shouldIndentBlockInParent(this._parent.parent())) { - // Blocks preserve the indentation of their containing node (unless they're a - // standalone block in a list). i.e. if you have: - // - // function foo( - // a: number) { - // - // Then we expect the indentation of the block to be tied to the function, not to - // the line that the block is defined on. If we were to do the latter, then the - // indentation would be here: - // - // function foo( - // a: number) { - // | - // - // Instead of: - // - // function foo( - // a: number) { - // | - parent = this._parent.parent(); - } - - var line = this._snapshot.getLineFromPosition(parent.start()).getText(); - var firstNonWhiteSpacePosition = Indentation.firstNonWhitespacePosition(line); - parentIndentationAmount = Indentation.columnForPositionInString(line, firstNonWhiteSpacePosition, this.options); - } - var parentIndentationAmountDelta = parent.childIndentationAmountDelta(); - - // The indentation level of the node - var indentationAmount: number; - - // The delta it adds to its children. - var indentationAmountDelta: number; - var parentNode = parent.node(); - - switch (node.kind) { - default: - // General case - // This node should follow the child indentation set by its parent - // This node does not introduce any new indentation scope, indent any decendants of this node (tokens or child nodes) - // using the same indentation level - indentationAmount = (parentIndentationAmount + parentIndentationAmountDelta); - indentationAmountDelta = 0; - break; - - // Statements introducing {} - case SyntaxKind.ClassDeclaration: - case SyntaxKind.ModuleDeclaration: - case SyntaxKind.ObjectType: - case SyntaxKind.EnumDeclaration: - case SyntaxKind.SwitchStatement: - case SyntaxKind.ObjectLiteralExpression: - case SyntaxKind.ConstructorDeclaration: - case SyntaxKind.FunctionDeclaration: - case SyntaxKind.FunctionExpression: - case SyntaxKind.MemberFunctionDeclaration: - case SyntaxKind.GetAccessor: - case SyntaxKind.SetAccessor: - case SyntaxKind.IndexMemberDeclaration: - case SyntaxKind.CatchClause: - // Statements introducing [] - case SyntaxKind.ArrayLiteralExpression: - case SyntaxKind.ArrayType: - case SyntaxKind.ElementAccessExpression: - case SyntaxKind.IndexSignature: - // Other statements - case SyntaxKind.ForStatement: - case SyntaxKind.ForInStatement: - case SyntaxKind.WhileStatement: - case SyntaxKind.DoStatement: - case SyntaxKind.WithStatement: - case SyntaxKind.CaseSwitchClause: - case SyntaxKind.DefaultSwitchClause: - case SyntaxKind.ReturnStatement: - case SyntaxKind.ThrowStatement: - case SyntaxKind.SimpleArrowFunctionExpression: - case SyntaxKind.ParenthesizedArrowFunctionExpression: - case SyntaxKind.VariableDeclaration: - case SyntaxKind.ExportAssignment: - - // Expressions which have argument lists or parameter lists - case SyntaxKind.InvocationExpression: - case SyntaxKind.ObjectCreationExpression: - case SyntaxKind.CallSignature: - case SyntaxKind.ConstructSignature: - - // These nodes should follow the child indentation set by its parent; - // they introduce a new indenation scope; children should be indented at one level deeper - indentationAmount = (parentIndentationAmount + parentIndentationAmountDelta); - indentationAmountDelta = this.options.indentSpaces; - break; - - case SyntaxKind.IfStatement: - if (parent.kind() === SyntaxKind.ElseClause && - !SyntaxUtilities.isLastTokenOnLine((parentNode).elseKeyword, this._text)) { - // This is an else if statement with the if on the same line as the else, do not indent the if statmement. - // Note: Children indentation has already been set by the parent if statement, so no need to increment - indentationAmount = parentIndentationAmount; - } - else { - // Otherwise introduce a new indenation scope; children should be indented at one level deeper - indentationAmount = (parentIndentationAmount + parentIndentationAmountDelta); - } - indentationAmountDelta = this.options.indentSpaces; - break; - - case SyntaxKind.ElseClause: - // Else should always follow its parent if statement indentation. - // Note: Children indentation has already been set by the parent if statement, so no need to increment - indentationAmount = parentIndentationAmount; - indentationAmountDelta = this.options.indentSpaces; - break; - - - case SyntaxKind.Block: - // Check if the block is a member in a list of statements (if the parent is a source unit, module, or block, or switch clause) - if (this.shouldIndentBlockInParent(parent)) { - indentationAmount = parentIndentationAmount + parentIndentationAmountDelta; - } - else { - indentationAmount = parentIndentationAmount; - } - - indentationAmountDelta = this.options.indentSpaces; - break; - } - - // If the parent happens to start on the same line as this node, then override the current node indenation with that - // of the parent. This avoid having to add an extra level of indentation for the children. e.g.: - // return { - // a:1 - // }; - // instead of: - // return { - // a:1 - // }; - // We also need to pass the delta (if it is nonzero) to the children, so that subsequent lines get indented. Essentially, if any node starting on the given line - // has a nonzero delta , the resulting delta should be inherited from this node. This is to indent cases like the following: - // return a - // || b; - // Lastly, it is possible the node indentation needs to be recomputed because the formatter inserted a newline before its first token. - // If this is the case, we know the node no longer starts on the same line as its parent (or at least we shouldn't treat it as such). - if (parentNode) { - if (!newLineInsertedByFormatting /*This could be false or undefined here*/) { - var parentStartLine = this._snapshot.getLineNumberFromPosition(parent.start()); - var currentNodeStartLine = this._snapshot.getLineNumberFromPosition(this._position + leadingTriviaWidth(node)); - if (parentStartLine === currentNodeStartLine || newLineInsertedByFormatting === false /*meaning a new line was removed and we are force recomputing*/) { - indentationAmount = parentIndentationAmount; - indentationAmountDelta = Math.min(this.options.indentSpaces, parentIndentationAmountDelta + indentationAmountDelta); - } - } - } - - return { - indentationAmount: indentationAmount, - indentationAmountDelta: indentationAmountDelta - }; - } - - private shouldIndentBlockInParent(parent: IndentationNodeContext): boolean { - switch (parent.kind()) { - case SyntaxKind.SourceUnit: - case SyntaxKind.ModuleDeclaration: - case SyntaxKind.Block: - case SyntaxKind.CaseSwitchClause: - case SyntaxKind.DefaultSwitchClause: - return true; - - default: - return false; - } - } - - private forceRecomputeIndentationOfParent(tokenStart: number, newLineAdded: boolean /*as opposed to removed*/): void { - var parent = this._parent; - if (start(parent.node()) === tokenStart) { - // Temporarily pop the parent before recomputing - this._parent = parent.parent(); - var indentation = this.getNodeIndentation(parent.node(), /* newLineInsertedByFormatting */ newLineAdded); - parent.update(parent.parent(), parent.node(), parent.fullStart(), indentation.indentationAmount, indentation.indentationAmountDelta); - this._parent = parent; - } - } - } -} \ No newline at end of file diff --git a/src/services/formatting/multipleTokenIndenter.ts b/src/services/formatting/multipleTokenIndenter.ts deleted file mode 100644 index ad74952ad3d..00000000000 --- a/src/services/formatting/multipleTokenIndenter.ts +++ /dev/null @@ -1,221 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -/// - -module TypeScript.Services.Formatting { - export class MultipleTokenIndenter extends IndentationTrackingWalker { - private _edits: TextEditInfo[] = []; - - constructor(textSpan: TextSpan, sourceUnit: SourceUnitSyntax, snapshot: ITextSnapshot, indentFirstToken: boolean, options: FormattingOptions) { - super(textSpan, sourceUnit, snapshot, indentFirstToken, options); - } - - public indentToken(token: ISyntaxToken, indentationAmount: number, commentIndentationAmount: number): void { - // Ignore generated tokens - if (token.fullWidth() === 0) { - return; - } - - // If we have any skipped tokens as children, do not process this node for indentation or formatting - if (this.parent().hasSkippedOrMissingTokenChild()) { - return; - } - - // Be strict, and only consider nodes that fall inside the span. This avoids indenting a multiline string - // on enter at the end of, as the whole token was not included in the span - var tokenSpan = new TextSpan(this.position() + token.leadingTriviaWidth(), width(token)); - if (!this.textSpan().containsTextSpan(tokenSpan)) { - return; - } - - // Compute an indentation string for this token - var indentationString = Indentation.indentationString(indentationAmount, this.options); - - var commentIndentationString = Indentation.indentationString(commentIndentationAmount, this.options); - - // Record any needed indentation edits - this.recordIndentationEditsForToken(token, indentationString, commentIndentationString); - } - - public edits(): TextEditInfo[]{ - return this._edits; - } - - public recordEdit(position: number, length: number, replaceWith: string): void { - this._edits.push(new TextEditInfo(position, length, replaceWith)); - } - - private recordIndentationEditsForToken(token: ISyntaxToken, indentationString: string, commentIndentationString: string) { - var position = this.position(); - var indentNextTokenOrTrivia = true; - var leadingWhiteSpace = ""; // We need to track the whitespace before a multiline comment - - // Process any leading trivia if any - var triviaList = token.leadingTrivia(); - if (triviaList) { - var seenNewLine = position === 0; - - for (var i = 0, length = triviaList.count(); i < length; i++, position += trivia.fullWidth()) { - var trivia = triviaList.syntaxTriviaAt(i); - - // Skip all trivia up to the first newline we see. We consider this trivia to - // 'belong' to the previous token. - if (!seenNewLine) { - if (trivia.kind !== SyntaxKind.NewLineTrivia) { - continue; - } - else { - seenNewLine = true; - continue; - } - } - - // Skip this trivia if it is not in the span - if (!this.textSpan().containsTextSpan(new TextSpan(position, trivia.fullWidth()))) { - continue; - } - - switch (trivia.kind) { - case SyntaxKind.MultiLineCommentTrivia: - // We will only indent the first line of the multiline comment if we were planning to indent the next trivia. However, - // subsequent lines will always be indented - this.recordIndentationEditsForMultiLineComment(trivia, position, commentIndentationString, leadingWhiteSpace, !indentNextTokenOrTrivia /* already indented first line */); - indentNextTokenOrTrivia = false; - leadingWhiteSpace = ""; - break; - - case SyntaxKind.SingleLineCommentTrivia: - case SyntaxKind.SkippedTokenTrivia: - if (indentNextTokenOrTrivia) { - this.recordIndentationEditsForSingleLineOrSkippedText(trivia, position, commentIndentationString); - indentNextTokenOrTrivia = false; - } - break; - - case SyntaxKind.WhitespaceTrivia: - // If the next trivia is a comment, use the comment indentation level instead of the regular indentation level - // If the next trivia is a newline, this whole line is just whitespace, so don't do anything (trimming will take care of it) - var nextTrivia = length > i + 1 && triviaList.syntaxTriviaAt(i + 1); - var whiteSpaceIndentationString = nextTrivia && nextTrivia.isComment() ? commentIndentationString : indentationString; - if (indentNextTokenOrTrivia) { - if (!(nextTrivia && nextTrivia.isNewLine())) { - this.recordIndentationEditsForWhitespace(trivia, position, whiteSpaceIndentationString); - } - indentNextTokenOrTrivia = false; - } - leadingWhiteSpace += trivia.fullText(); - break; - - case SyntaxKind.NewLineTrivia: - // We hit a newline processing the trivia. We need to add the indentation to the - // next line as well. Note: don't bother indenting the newline itself. This will - // just insert ugly whitespace that most users probably will not want. - indentNextTokenOrTrivia = true; - leadingWhiteSpace = ""; - break; - - default: - throw Errors.invalidOperation(); - } - } - - } - - if (token.kind !== SyntaxKind.EndOfFileToken && indentNextTokenOrTrivia) { - // If the last trivia item was a new line, or no trivia items were encounterd record the - // indentation edit at the token position - if (indentationString.length > 0) { - this.recordEdit(position, 0, indentationString); - } - } - } - - private recordIndentationEditsForSingleLineOrSkippedText(trivia: ISyntaxTrivia, fullStart: number, indentationString: string): void { - // Record the edit - if (indentationString.length > 0) { - this.recordEdit(fullStart, 0, indentationString); - } - } - - private recordIndentationEditsForWhitespace(trivia: ISyntaxTrivia, fullStart: number, indentationString: string): void { - var text = trivia.fullText(); - - // Check if the current indentation matches the desired indentation or not - if (indentationString === text) { - return; - } - - // Record the edit - this.recordEdit(fullStart, text.length, indentationString); - } - - private recordIndentationEditsForMultiLineComment(trivia: ISyntaxTrivia, fullStart: number, indentationString: string, leadingWhiteSpace: string, firstLineAlreadyIndented: boolean): void { - // If the multiline comment spans multiple lines, we need to add the right indent amount to - // each successive line segment as well. - var position = fullStart; - var segments = Syntax.splitMultiLineCommentTriviaIntoMultipleLines(trivia); - - if (segments.length <= 1) { - if (!firstLineAlreadyIndented) { - // Process the one-line multiline comment just like a single line comment - this.recordIndentationEditsForSingleLineOrSkippedText(trivia, fullStart, indentationString); - } - return; - } - - // Find number of columns in first segment - var whiteSpaceColumnsInFirstSegment = Indentation.columnForPositionInString(leadingWhiteSpace, leadingWhiteSpace.length, this.options); - - var indentationColumns = Indentation.columnForPositionInString(indentationString, indentationString.length, this.options); - var startIndex = 0; - if (firstLineAlreadyIndented) { - startIndex = 1; - position += segments[0].length; - } - for (var i = startIndex; i < segments.length; i++) { - var segment = segments[i]; - this.recordIndentationEditsForSegment(segment, position, indentationColumns, whiteSpaceColumnsInFirstSegment); - position += segment.length; - } - } - - private recordIndentationEditsForSegment(segment: string, fullStart: number, indentationColumns: number, whiteSpaceColumnsInFirstSegment: number): void { - // Indent subsequent lines using a column delta of the actual indentation relative to the first line - var firstNonWhitespacePosition = Indentation.firstNonWhitespacePosition(segment); - var leadingWhiteSpaceColumns = Indentation.columnForPositionInString(segment, firstNonWhitespacePosition, this.options); - var deltaFromFirstSegment = leadingWhiteSpaceColumns - whiteSpaceColumnsInFirstSegment; - var finalColumns = indentationColumns + deltaFromFirstSegment; - if (finalColumns < 0) { - finalColumns = 0; - } - var indentationString = Indentation.indentationString(finalColumns, this.options); - - if (firstNonWhitespacePosition < segment.length && - CharacterInfo.isLineTerminator(segment.charCodeAt(firstNonWhitespacePosition))) { - // If this segment was just a newline, then don't bother indenting it. That will just - // leave the user with an ugly indent in their output that they probably do not want. - return; - } - - if (indentationString === segment.substring(0, firstNonWhitespacePosition)) { - return; - } - - // Record the edit - this.recordEdit(fullStart, firstNonWhitespacePosition, indentationString); - } - } -} \ No newline at end of file diff --git a/src/services/formatting/formatting.ts b/src/services/formatting/references.ts similarity index 65% rename from src/services/formatting/formatting.ts rename to src/services/formatting/references.ts index 7570ef936c7..9f4b7e37436 100644 --- a/src/services/formatting/formatting.ts +++ b/src/services/formatting/references.ts @@ -13,12 +13,9 @@ // limitations under the License. // +/// /// -/// -/// -/// /// -/// /// /// /// @@ -28,12 +25,5 @@ /// /// /// -/// -/// /// -/// -/// -/// -/// -/// -/// \ No newline at end of file +/// \ No newline at end of file diff --git a/src/services/formatting/rule.ts b/src/services/formatting/rule.ts index 273f0590ce7..356720d2330 100644 --- a/src/services/formatting/rule.ts +++ b/src/services/formatting/rule.ts @@ -13,9 +13,9 @@ // limitations under the License. // -/// +/// -module TypeScript.Services.Formatting { +module ts.formatting { export class Rule { constructor( public Descriptor: RuleDescriptor, diff --git a/src/services/formatting/ruleAction.ts b/src/services/formatting/ruleAction.ts index 32c67c950ca..d2890d8e080 100644 --- a/src/services/formatting/ruleAction.ts +++ b/src/services/formatting/ruleAction.ts @@ -13,13 +13,13 @@ // limitations under the License. // -/// +/// -module TypeScript.Services.Formatting { - export enum RuleAction { - Ignore, - Space, - NewLine, - Delete +module ts.formatting { + export const enum RuleAction { + Ignore = 0x00000001, + Space = 0x00000002, + NewLine = 0x00000004, + Delete = 0x00000008 } } \ No newline at end of file diff --git a/src/services/formatting/ruleDescriptor.ts b/src/services/formatting/ruleDescriptor.ts index 1e7d822d57b..e5b7d6f3186 100644 --- a/src/services/formatting/ruleDescriptor.ts +++ b/src/services/formatting/ruleDescriptor.ts @@ -13,9 +13,9 @@ // limitations under the License. // -/// +/// -module TypeScript.Services.Formatting { +module ts.formatting { export class RuleDescriptor { constructor(public LeftTokenRange: Shared.TokenRange, public RightTokenRange: Shared.TokenRange) { } @@ -34,7 +34,6 @@ module TypeScript.Services.Formatting { } static create3(left: SyntaxKind, right: Shared.TokenRange): RuleDescriptor - //: this(TokenRange.FromToken(left), right) { return RuleDescriptor.create4(Shared.TokenRange.FromToken(left), right); } diff --git a/src/services/formatting/ruleFlag.ts b/src/services/formatting/ruleFlag.ts index d815537dfd9..aaf70639e01 100644 --- a/src/services/formatting/ruleFlag.ts +++ b/src/services/formatting/ruleFlag.ts @@ -13,10 +13,10 @@ // limitations under the License. // -/// +/// -module TypeScript.Services.Formatting { - export enum RuleFlags { +module ts.formatting { + export const enum RuleFlags { None, CanDeleteNewLines } diff --git a/src/services/formatting/ruleOperation.ts b/src/services/formatting/ruleOperation.ts index 1f74aea0784..c73e3b6bcf7 100644 --- a/src/services/formatting/ruleOperation.ts +++ b/src/services/formatting/ruleOperation.ts @@ -13,9 +13,9 @@ // limitations under the License. // -/// +/// -module TypeScript.Services.Formatting { +module ts.formatting { export class RuleOperation { public Context: RuleOperationContext; public Action: RuleAction; diff --git a/src/services/formatting/ruleOperationContext.ts b/src/services/formatting/ruleOperationContext.ts index a1e349210e4..d037f8e70d7 100644 --- a/src/services/formatting/ruleOperationContext.ts +++ b/src/services/formatting/ruleOperationContext.ts @@ -13,9 +13,9 @@ // limitations under the License. // -/// +/// -module TypeScript.Services.Formatting { +module ts.formatting { export class RuleOperationContext { private customContextChecks: { (context: FormattingContext): boolean; }[]; diff --git a/src/services/formatting/rules.ts b/src/services/formatting/rules.ts index 2bb8be11e7a..2485945df0b 100644 --- a/src/services/formatting/rules.ts +++ b/src/services/formatting/rules.ts @@ -13,9 +13,9 @@ // limitations under the License. // -/// +/// -module TypeScript.Services.Formatting { +module ts.formatting { export class Rules { public getRuleName(rule: Rule) { var o: ts.Map = this; @@ -24,7 +24,7 @@ module TypeScript.Services.Formatting { return name; } } - throw new Error(TypeScript.getDiagnosticMessage(TypeScript.DiagnosticCode.Unknown_rule, null)); + throw new Error("Unknown rule"); } [name: string]: any; @@ -241,7 +241,7 @@ module TypeScript.Services.Formatting { this.SpaceBeforeOpenBraceInFunction = new Rule(RuleDescriptor.create2(this.FunctionOpenBraceLeftTokenRange, SyntaxKind.OpenBraceToken), RuleOperation.create2(new RuleOperationContext(Rules.IsFunctionDeclContext, Rules.IsNotFormatOnEnter, Rules.IsSameLineTokenOrBeforeMultilineBlockContext), RuleAction.Space), RuleFlags.CanDeleteNewLines); // Place a space before open brace in a TypeScript declaration that has braces as children (class, module, enum, etc) - this.TypeScriptOpenBraceLeftTokenRange = Shared.TokenRange.FromTokens([SyntaxKind.IdentifierName, SyntaxKind.MultiLineCommentTrivia]); + this.TypeScriptOpenBraceLeftTokenRange = Shared.TokenRange.FromTokens([SyntaxKind.Identifier, SyntaxKind.MultiLineCommentTrivia]); this.SpaceBeforeOpenBraceInTypeScriptDeclWithBlock = new Rule(RuleDescriptor.create2(this.TypeScriptOpenBraceLeftTokenRange, SyntaxKind.OpenBraceToken), RuleOperation.create2(new RuleOperationContext(Rules.IsTypeScriptDeclWithBlockContext, Rules.IsNotFormatOnEnter, Rules.IsSameLineTokenOrBeforeMultilineBlockContext), RuleAction.Space), RuleFlags.CanDeleteNewLines); // Place a space before open brace in a control flow construct @@ -299,7 +299,7 @@ module TypeScript.Services.Formatting { // get x() {} // set x(val) {} - this.SpaceAfterGetSetInMember = new Rule(RuleDescriptor.create2(Shared.TokenRange.FromTokens([SyntaxKind.GetKeyword, SyntaxKind.SetKeyword]), SyntaxKind.IdentifierName), RuleOperation.create2(new RuleOperationContext(Rules.IsFunctionDeclContext), RuleAction.Space)); + this.SpaceAfterGetSetInMember = new Rule(RuleDescriptor.create2(Shared.TokenRange.FromTokens([SyntaxKind.GetKeyword, SyntaxKind.SetKeyword]), SyntaxKind.Identifier), RuleOperation.create2(new RuleOperationContext(Rules.IsFunctionDeclContext), RuleAction.Space)); // Special case for binary operators (that are keywords). For these we have to add a space and shouldn't follow any user options. this.SpaceBeforeBinaryKeywordOperator = new Rule(RuleDescriptor.create4(Shared.TokenRange.Any, Shared.TokenRange.BinaryKeywordOperators), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), RuleAction.Space)); @@ -324,7 +324,7 @@ module TypeScript.Services.Formatting { this.SpaceAfterArrow = new Rule(RuleDescriptor.create3(SyntaxKind.EqualsGreaterThanToken, Shared.TokenRange.Any), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Space)); // Optional parameters and var args - this.NoSpaceAfterEllipsis = new Rule(RuleDescriptor.create1(SyntaxKind.DotDotDotToken, SyntaxKind.IdentifierName), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Delete)); + this.NoSpaceAfterEllipsis = new Rule(RuleDescriptor.create1(SyntaxKind.DotDotDotToken, SyntaxKind.Identifier), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Delete)); this.NoSpaceAfterOptionalParameters = new Rule(RuleDescriptor.create3(SyntaxKind.QuestionToken, Shared.TokenRange.FromTokens([SyntaxKind.CloseParenToken, SyntaxKind.CommaToken])), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsNotBinaryOpContext), RuleAction.Delete)); // generics @@ -437,7 +437,7 @@ module TypeScript.Services.Formatting { /// static IsForContext(context: FormattingContext): boolean { - return context.contextNode.kind() === SyntaxKind.ForStatement; + return context.contextNode.kind === SyntaxKind.ForStatement; } static IsNotForContext(context: FormattingContext): boolean { @@ -446,8 +446,7 @@ module TypeScript.Services.Formatting { static IsBinaryOpContext(context: FormattingContext): boolean { - switch (context.contextNode.kind()) { - // binary expressions + switch (context.contextNode.kind) { case SyntaxKind.BinaryExpression: case SyntaxKind.ConditionalExpression: return true; @@ -455,8 +454,11 @@ module TypeScript.Services.Formatting { // equal in import a = module('a'); case SyntaxKind.ImportDeclaration: // equal in var a = 0; - case SyntaxKind.VariableDeclarator: - case SyntaxKind.EqualsValueClause: + case SyntaxKind.VariableDeclaration: + // equal in p = 0; + case SyntaxKind.Parameter: + case SyntaxKind.EnumMember: + case SyntaxKind.Property: return context.currentTokenSpan.kind === SyntaxKind.EqualsToken || context.nextTokenSpan.kind === SyntaxKind.EqualsToken; // "in" keyword in for (var x in []) { } case SyntaxKind.ForInStatement: @@ -512,16 +514,21 @@ module TypeScript.Services.Formatting { } // IMPORTANT!!! This method must return true ONLY for nodes with open and close braces as immediate children - static NodeIsBlockContext(node: IndentationNodeContext): boolean { + static NodeIsBlockContext(node: Node): boolean { if (Rules.NodeIsTypeScriptDeclWithBlockContext(node)) { // This means we are in a context that looks like a block to the user, but in the grammar is actually not a node (it's a class, module, enum, object type literal, etc). return true; } - switch (node.kind()) { + switch (node.kind) { case SyntaxKind.Block: case SyntaxKind.SwitchStatement: - case SyntaxKind.ObjectLiteralExpression: + case SyntaxKind.ObjectLiteral: + case SyntaxKind.TryBlock: + case SyntaxKind.CatchBlock: + case SyntaxKind.FinallyBlock: + case SyntaxKind.FunctionBlock: + case SyntaxKind.ModuleBlock: return true; } @@ -529,17 +536,20 @@ module TypeScript.Services.Formatting { } static IsFunctionDeclContext(context: FormattingContext): boolean { - switch (context.contextNode.kind()) { + switch (context.contextNode.kind) { case SyntaxKind.FunctionDeclaration: - case SyntaxKind.MemberFunctionDeclaration: + case SyntaxKind.Method: + //case SyntaxKind.MemberFunctionDeclaration: case SyntaxKind.GetAccessor: case SyntaxKind.SetAccessor: - case SyntaxKind.MethodSignature: + ///case SyntaxKind.MethodSignature: case SyntaxKind.CallSignature: case SyntaxKind.FunctionExpression: - case SyntaxKind.ConstructorDeclaration: - case SyntaxKind.SimpleArrowFunctionExpression: - case SyntaxKind.ParenthesizedArrowFunctionExpression: + case SyntaxKind.Constructor: + case SyntaxKind.ArrowFunction: + //case SyntaxKind.ConstructorDeclaration: + //case SyntaxKind.SimpleArrowFunctionExpression: + //case SyntaxKind.ParenthesizedArrowFunctionExpression: case SyntaxKind.InterfaceDeclaration: // This one is not truly a function, but for formatting purposes, it acts just like one return true; } @@ -551,11 +561,12 @@ module TypeScript.Services.Formatting { return Rules.NodeIsTypeScriptDeclWithBlockContext(context.contextNode); } - static NodeIsTypeScriptDeclWithBlockContext(node: IndentationNodeContext): boolean { - switch (node.kind()) { + static NodeIsTypeScriptDeclWithBlockContext(node: Node): boolean { + switch (node.kind) { case SyntaxKind.ClassDeclaration: + case SyntaxKind.InterfaceDeclaration: case SyntaxKind.EnumDeclaration: - case SyntaxKind.ObjectType: + case SyntaxKind.TypeLiteral: case SyntaxKind.ModuleDeclaration: return true; } @@ -564,11 +575,16 @@ module TypeScript.Services.Formatting { } static IsAfterCodeBlockContext(context: FormattingContext): boolean { - switch (context.currentTokenParent.kind()) { + switch (context.currentTokenParent.kind) { case SyntaxKind.ClassDeclaration: case SyntaxKind.ModuleDeclaration: case SyntaxKind.EnumDeclaration: case SyntaxKind.Block: + case SyntaxKind.TryBlock: + case SyntaxKind.CatchBlock: + case SyntaxKind.FinallyBlock: + case SyntaxKind.FunctionBlock: + case SyntaxKind.ModuleBlock: case SyntaxKind.SwitchStatement: return true; } @@ -576,7 +592,7 @@ module TypeScript.Services.Formatting { } static IsControlDeclContext(context: FormattingContext): boolean { - switch (context.contextNode.kind()) { + switch (context.contextNode.kind) { case SyntaxKind.IfStatement: case SyntaxKind.SwitchStatement: case SyntaxKind.ForStatement: @@ -585,9 +601,10 @@ module TypeScript.Services.Formatting { case SyntaxKind.TryStatement: case SyntaxKind.DoStatement: case SyntaxKind.WithStatement: - case SyntaxKind.ElseClause: - case SyntaxKind.CatchClause: - case SyntaxKind.FinallyClause: + // TODO + // case SyntaxKind.ElseClause: + case SyntaxKind.CatchBlock: + case SyntaxKind.FinallyBlock: return true; default: @@ -596,15 +613,15 @@ module TypeScript.Services.Formatting { } static IsObjectContext(context: FormattingContext): boolean { - return context.contextNode.kind() === SyntaxKind.ObjectLiteralExpression; + return context.contextNode.kind === SyntaxKind.ObjectLiteral; } static IsFunctionCallContext(context: FormattingContext): boolean { - return context.contextNode.kind() === SyntaxKind.InvocationExpression; + return context.contextNode.kind === SyntaxKind.CallExpression; } static IsNewContext(context: FormattingContext): boolean { - return context.contextNode.kind() === SyntaxKind.ObjectCreationExpression; + return context.contextNode.kind === SyntaxKind.NewExpression; } static IsFunctionCallOrNewContext(context: FormattingContext): boolean { @@ -620,25 +637,43 @@ module TypeScript.Services.Formatting { } static IsModuleDeclContext(context: FormattingContext): boolean { - return context.contextNode.kind() === SyntaxKind.ModuleDeclaration; + return context.contextNode.kind === SyntaxKind.ModuleDeclaration; } static IsObjectTypeContext(context: FormattingContext): boolean { - return context.contextNode.kind() === SyntaxKind.ObjectType && context.contextNode.parent().kind() !== SyntaxKind.InterfaceDeclaration; + return context.contextNode.kind === SyntaxKind.TypeLiteral;// && context.contextNode.parent.kind !== SyntaxKind.InterfaceDeclaration; } - static IsTypeArgumentOrParameter(tokenKind: SyntaxKind, parentKind: SyntaxKind): boolean { - return ((tokenKind === SyntaxKind.LessThanToken || tokenKind === SyntaxKind.GreaterThanToken) && - (parentKind === SyntaxKind.TypeParameterList || parentKind === SyntaxKind.TypeArgumentList)); + static IsTypeArgumentOrParameter(token: TextRangeWithKind, parent: Node): boolean { + if (token.kind !== SyntaxKind.LessThanToken && token.kind !== SyntaxKind.GreaterThanToken) { + return false; + } + switch (parent.kind) { + case SyntaxKind.TypeReference: + case SyntaxKind.ClassDeclaration: + case SyntaxKind.InterfaceDeclaration: + case SyntaxKind.FunctionDeclaration: + case SyntaxKind.FunctionExpression: + case SyntaxKind.ArrowFunction: + case SyntaxKind.Method: + case SyntaxKind.CallSignature: + case SyntaxKind.ConstructSignature: + case SyntaxKind.CallExpression: + case SyntaxKind.NewExpression: + return true; + default: + return false; + + } } static IsTypeArgumentOrParameterContext(context: FormattingContext): boolean { - return Rules.IsTypeArgumentOrParameter(context.currentTokenSpan.kind, context.currentTokenParent.kind()) || - Rules.IsTypeArgumentOrParameter(context.nextTokenSpan.kind, context.nextTokenParent.kind()); + return Rules.IsTypeArgumentOrParameter(context.currentTokenSpan, context.currentTokenParent) || + Rules.IsTypeArgumentOrParameter(context.nextTokenSpan, context.nextTokenParent); } static IsVoidOpContext(context: FormattingContext): boolean { - return context.currentTokenSpan.kind === SyntaxKind.VoidKeyword && context.currentTokenParent.kind() === SyntaxKind.VoidExpression; + return context.currentTokenSpan.kind === SyntaxKind.VoidKeyword && context.currentTokenParent.kind === SyntaxKind.PrefixOperator; } } } \ No newline at end of file diff --git a/src/services/formatting/rulesMap.ts b/src/services/formatting/rulesMap.ts index 0fbe81d16c9..d25320f16a8 100644 --- a/src/services/formatting/rulesMap.ts +++ b/src/services/formatting/rulesMap.ts @@ -13,9 +13,9 @@ // limitations under the License. // -/// +/// -module TypeScript.Services.Formatting { +module ts.formatting { export class RulesMap { public map: RulesBucket[]; public mapRowLength: number; diff --git a/src/services/formatting/rulesProvider.ts b/src/services/formatting/rulesProvider.ts index 90b11f01a9b..7ad1b65400c 100644 --- a/src/services/formatting/rulesProvider.ts +++ b/src/services/formatting/rulesProvider.ts @@ -13,16 +13,16 @@ // limitations under the License. // -/// +/// -module TypeScript.Services.Formatting { +module ts.formatting { export class RulesProvider { private globalRules: Rules; private options: ts.FormatCodeOptions; private activeRules: Rule[]; private rulesMap: RulesMap; - constructor(private logger: TypeScript.Logger) { + constructor(private logger: Logger) { this.globalRules = new Rules(); } diff --git a/src/services/formatting/snapshotPoint.ts b/src/services/formatting/snapshotPoint.ts deleted file mode 100644 index 762748dbc70..00000000000 --- a/src/services/formatting/snapshotPoint.ts +++ /dev/null @@ -1,30 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -/// - -module TypeScript.Services.Formatting { - - export class SnapshotPoint { - constructor(public snapshot: ITextSnapshot, public position: number) { - } - public getContainingLine(): ITextSnapshotLine { - return this.snapshot.getLineFromPosition(this.position); - } - public add(offset: number): SnapshotPoint { - return new SnapshotPoint(this.snapshot, this.position + offset); - } - } -} \ No newline at end of file diff --git a/src/services/formatting/textEditInfo.ts b/src/services/formatting/textEditInfo.ts deleted file mode 100644 index bdcbdd0ddc8..00000000000 --- a/src/services/formatting/textEditInfo.ts +++ /dev/null @@ -1,28 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -/// - -module TypeScript.Services.Formatting { - export class TextEditInfo { - - constructor(public position: number, public length: number, public replaceWith: string) { - } - - public toString() { - return "[ position: " + this.position + ", length: " + this.length + ", replaceWith: '" + this.replaceWith + "' ]"; - } - } -} \ No newline at end of file diff --git a/src/services/formatting/textSnapshot.ts b/src/services/formatting/textSnapshot.ts deleted file mode 100644 index 4f2904dd76f..00000000000 --- a/src/services/formatting/textSnapshot.ts +++ /dev/null @@ -1,89 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -/// - -module TypeScript.Services.Formatting { - export interface ITextSnapshot { - getLength(): number; - getText(span: TextSpan): string; - getLineNumberFromPosition(position: number): number; - getLineFromPosition(position: number): ITextSnapshotLine; - getLineFromLineNumber(lineNumber: number): ITextSnapshotLine; - } - - export class TextSnapshot implements ITextSnapshot { - private lines: TextSnapshotLine[]; - - constructor(private snapshot: ISimpleText) { - this.lines = []; - } - - public getLength(): number { - return this.snapshot.length(); - } - - public getText(span: TextSpan): string { - return this.snapshot.substr(span.start(), span.length()); - } - - public getLineNumberFromPosition(position: number): number { - return this.snapshot.lineMap().getLineNumberFromPosition(position); - } - - public getLineFromPosition(position: number): ITextSnapshotLine { - var lineNumber = this.getLineNumberFromPosition(position); - return this.getLineFromLineNumber(lineNumber); - } - - public getLineFromLineNumber(lineNumber: number): ITextSnapshotLine { - var line = this.lines[lineNumber]; - if (line === undefined) { - line = this.getLineFromLineNumberWorker(lineNumber); - this.lines[lineNumber] = line; - } - return line; - } - - private getLineFromLineNumberWorker(lineNumber: number): ITextSnapshotLine { - var lineMap = this.snapshot.lineMap().lineStarts(); - var lineMapIndex = lineNumber; //Note: lineMap is 0-based - if (lineMapIndex < 0 || lineMapIndex >= lineMap.length) - throw new Error(TypeScript.getDiagnosticMessage(TypeScript.DiagnosticCode.Invalid_line_number_0, [lineMapIndex])); - var start = lineMap[lineMapIndex]; - - var end: number; - var endIncludingLineBreak: number; - var lineBreak = ""; - if (lineMapIndex == lineMap.length) { - end = endIncludingLineBreak = this.snapshot.length(); - } - else { - endIncludingLineBreak = (lineMapIndex >= lineMap.length - 1 ? this.snapshot.length() : lineMap[lineMapIndex + 1]); - for (var p = endIncludingLineBreak - 1; p >= start; p--) { - var c = this.snapshot.substr(p, 1); - //TODO: Other ones? - if (c != "\r" && c != "\n") { - break; - } - } - end = p + 1; - lineBreak = this.snapshot.substr(end, endIncludingLineBreak - end); - } - var result = new TextSnapshotLine(this, lineNumber, start, end, lineBreak); - return result; - } - } -} \ No newline at end of file diff --git a/src/services/formatting/textSnapshotLine.ts b/src/services/formatting/textSnapshotLine.ts deleted file mode 100644 index df2d9eff237..00000000000 --- a/src/services/formatting/textSnapshotLine.ts +++ /dev/null @@ -1,80 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -/// - -module TypeScript.Services.Formatting { - export interface ITextSnapshotLine { - snapshot(): ITextSnapshot; - - start(): SnapshotPoint; - startPosition(): number; - - end(): SnapshotPoint; - endPosition(): number; - - endIncludingLineBreak(): SnapshotPoint; - endIncludingLineBreakPosition(): number; - - length(): number; - lineNumber(): number; - getText(): string; - } - - export class TextSnapshotLine implements ITextSnapshotLine { - constructor(private _snapshot: ITextSnapshot, private _lineNumber: number, private _start: number, private _end: number, private _lineBreak: string) { - } - - public snapshot() { - return this._snapshot; - } - - public start() { - return new SnapshotPoint(this._snapshot, this._start); - } - - public startPosition() { - return this._start; - } - - public end() { - return new SnapshotPoint(this._snapshot, this._end); - } - - public endPosition() { - return this._end; - } - - public endIncludingLineBreak() { - return new SnapshotPoint(this._snapshot, this._end + this._lineBreak.length); - } - - public endIncludingLineBreakPosition() { - return this._end + this._lineBreak.length; - } - - public length() { - return this._end - this._start; - } - - public lineNumber() { - return this._lineNumber; - } - - public getText(): string { - return this._snapshot.getText(TextSpan.fromBounds(this._start, this._end)); - } - } -} \ No newline at end of file diff --git a/src/services/formatting/tokenRange.ts b/src/services/formatting/tokenRange.ts index 0c06f797025..8d421140e67 100644 --- a/src/services/formatting/tokenRange.ts +++ b/src/services/formatting/tokenRange.ts @@ -13,9 +13,9 @@ // limitations under the License. // -/// +/// -module TypeScript.Services.Formatting { +module ts.formatting { export module Shared { export interface ITokenAccess { GetTokens(): SyntaxKind[]; @@ -41,12 +41,6 @@ module TypeScript.Services.Formatting { public Contains(token: SyntaxKind): boolean { return this.tokens.indexOf(token) >= 0; } - - - public toString(): string { - return "[tokenRangeStart=" + SyntaxKind[this.tokens[0]] + "," + - "tokenRangeEnd=" + SyntaxKind[this.tokens[this.tokens.length - 1]] + "]"; - } } export class TokenValuesAccess implements ITokenAccess { @@ -76,10 +70,6 @@ module TypeScript.Services.Formatting { public Contains(tokenValue: SyntaxKind): boolean { return tokenValue == this.token; } - - public toString(): string { - return "[singleTokenKind=" + SyntaxKind[this.token] + "]"; - } } export class TokenAllAccess implements ITokenAccess { @@ -135,18 +125,18 @@ module TypeScript.Services.Formatting { static Any: TokenRange = TokenRange.AllTokens(); static AnyIncludingMultilineComments = TokenRange.FromTokens(TokenRange.Any.GetTokens().concat([SyntaxKind.MultiLineCommentTrivia])); static Keywords = TokenRange.FromRange(SyntaxKind.FirstKeyword, SyntaxKind.LastKeyword); - static Operators = TokenRange.FromRange(SyntaxKind.SemicolonToken, SyntaxKind.SlashEqualsToken); - static BinaryOperators = TokenRange.FromRange(SyntaxKind.LessThanToken, SyntaxKind.SlashEqualsToken); + static Operators = TokenRange.FromRange(SyntaxKind.FirstOperator, SyntaxKind.LastOperator); + static BinaryOperators = TokenRange.FromRange(SyntaxKind.FirstBinaryOperator, SyntaxKind.LastBinaryOperator); static BinaryKeywordOperators = TokenRange.FromTokens([SyntaxKind.InKeyword, SyntaxKind.InstanceOfKeyword]); - static ReservedKeywords = TokenRange.FromRange(SyntaxKind.FirstFutureReservedStrictKeyword, SyntaxKind.LastFutureReservedStrictKeyword); + static ReservedKeywords = TokenRange.FromRange(SyntaxKind.FirstFutureReservedWord, SyntaxKind.LastFutureReservedWord); static UnaryPrefixOperators = TokenRange.FromTokens([SyntaxKind.PlusPlusToken, SyntaxKind.MinusMinusToken, SyntaxKind.TildeToken, SyntaxKind.ExclamationToken]); - static UnaryPrefixExpressions = TokenRange.FromTokens([SyntaxKind.NumericLiteral, SyntaxKind.IdentifierName, SyntaxKind.OpenParenToken, SyntaxKind.OpenBracketToken, SyntaxKind.OpenBraceToken, SyntaxKind.ThisKeyword, SyntaxKind.NewKeyword]); - static UnaryPreincrementExpressions = TokenRange.FromTokens([SyntaxKind.IdentifierName, SyntaxKind.OpenParenToken, SyntaxKind.ThisKeyword, SyntaxKind.NewKeyword]); - static UnaryPostincrementExpressions = TokenRange.FromTokens([SyntaxKind.IdentifierName, SyntaxKind.CloseParenToken, SyntaxKind.CloseBracketToken, SyntaxKind.NewKeyword]); - static UnaryPredecrementExpressions = TokenRange.FromTokens([SyntaxKind.IdentifierName, SyntaxKind.OpenParenToken, SyntaxKind.ThisKeyword, SyntaxKind.NewKeyword]); - static UnaryPostdecrementExpressions = TokenRange.FromTokens([SyntaxKind.IdentifierName, SyntaxKind.CloseParenToken, SyntaxKind.CloseBracketToken, SyntaxKind.NewKeyword]); + static UnaryPrefixExpressions = TokenRange.FromTokens([SyntaxKind.NumericLiteral, SyntaxKind.Identifier, SyntaxKind.OpenParenToken, SyntaxKind.OpenBracketToken, SyntaxKind.OpenBraceToken, SyntaxKind.ThisKeyword, SyntaxKind.NewKeyword]); + static UnaryPreincrementExpressions = TokenRange.FromTokens([SyntaxKind.Identifier, SyntaxKind.OpenParenToken, SyntaxKind.ThisKeyword, SyntaxKind.NewKeyword]); + static UnaryPostincrementExpressions = TokenRange.FromTokens([SyntaxKind.Identifier, SyntaxKind.CloseParenToken, SyntaxKind.CloseBracketToken, SyntaxKind.NewKeyword]); + static UnaryPredecrementExpressions = TokenRange.FromTokens([SyntaxKind.Identifier, SyntaxKind.OpenParenToken, SyntaxKind.ThisKeyword, SyntaxKind.NewKeyword]); + static UnaryPostdecrementExpressions = TokenRange.FromTokens([SyntaxKind.Identifier, SyntaxKind.CloseParenToken, SyntaxKind.CloseBracketToken, SyntaxKind.NewKeyword]); static Comments = TokenRange.FromTokens([SyntaxKind.SingleLineCommentTrivia, SyntaxKind.MultiLineCommentTrivia]); - static TypeNames = TokenRange.FromTokens([SyntaxKind.IdentifierName, SyntaxKind.NumberKeyword, SyntaxKind.StringKeyword, SyntaxKind.BooleanKeyword, SyntaxKind.VoidKeyword, SyntaxKind.AnyKeyword]); + static TypeNames = TokenRange.FromTokens([SyntaxKind.Identifier, SyntaxKind.NumberKeyword, SyntaxKind.StringKeyword, SyntaxKind.BooleanKeyword, SyntaxKind.VoidKeyword, SyntaxKind.AnyKeyword]); } } } \ No newline at end of file diff --git a/src/services/formatting/tokenSpan.ts b/src/services/formatting/tokenSpan.ts index aba9c372f35..1d8173a8227 100644 --- a/src/services/formatting/tokenSpan.ts +++ b/src/services/formatting/tokenSpan.ts @@ -13,10 +13,9 @@ // limitations under the License. // -/// +/// - -module TypeScript.Services.Formatting { +module ts.formatting { export class TokenSpan extends TextSpan { constructor(public kind: SyntaxKind, start: number, length: number) { super(start, length); diff --git a/src/services/indentation.ts b/src/services/indentation.ts deleted file mode 100644 index b35a4540fba..00000000000 --- a/src/services/indentation.ts +++ /dev/null @@ -1,49 +0,0 @@ - -module TypeScript.Indentation { - // Returns the column that this input string ends at (assuming it starts at column 0). - export function columnForPositionInString(input: string, position: number, options: FormattingOptions): number { - return columnForPositionInStringWorker(input, position, 0, options); - } - - function columnForPositionInStringWorker(input: string, position: number, startColumn: number, options: FormattingOptions): number { - var column = startColumn; - var spacesPerTab = options.spacesPerTab; - - for (var j = 0; j < position; j++) { - var ch = input.charCodeAt(j); - - if (ch === CharacterCodes.tab) { - column += spacesPerTab - column % spacesPerTab; - } - else { - column++; - } - } - - return column; - } - - export function indentationString(column: number, options: FormattingOptions): string { - var numberOfTabs = 0; - var numberOfSpaces = Math.max(0, column); - - if (options.useTabs) { - numberOfTabs = Math.floor(column / options.spacesPerTab); - numberOfSpaces -= numberOfTabs * options.spacesPerTab; - } - - return StringUtilities.repeat('\t', numberOfTabs) + - StringUtilities.repeat(' ', numberOfSpaces); - } - - export function firstNonWhitespacePosition(value: string): number { - for (var i = 0; i < value.length; i++) { - var ch = value.charCodeAt(i); - if (!CharacterInfo.isWhitespace(ch)) { - return i; - } - } - - return value.length; - } -} \ No newline at end of file diff --git a/src/services/navigationBar.ts b/src/services/navigationBar.ts index ca06d40fa88..fd4ae0d2f96 100644 --- a/src/services/navigationBar.ts +++ b/src/services/navigationBar.ts @@ -1,5 +1,4 @@ /// -/// module ts.NavigationBar { export function getNavigationBarItems(sourceFile: SourceFile): ts.NavigationBarItem[] { @@ -257,18 +256,18 @@ module ts.NavigationBar { return !text || text.trim() === ""; } - function getNavigationBarItem(text: string, kind: string, kindModifiers: string, spans: TypeScript.TextSpan[], childItems: ts.NavigationBarItem[] = [], indent: number = 0): ts.NavigationBarItem { + function getNavigationBarItem(text: string, kind: string, kindModifiers: string, spans: TextSpan[], childItems: NavigationBarItem[] = [], indent: number = 0): NavigationBarItem { if (isEmpty(text)) { return undefined; } return { - text: text, - kind: kind, - kindModifiers: kindModifiers, - spans: spans, - childItems: childItems, - indent: indent, + text, + kind, + kindModifiers, + spans, + childItems, + indent, bolded: false, grayed: false }; @@ -424,8 +423,8 @@ module ts.NavigationBar { function getNodeSpan(node: Node) { return node.kind === SyntaxKind.SourceFile - ? TypeScript.TextSpan.fromBounds(node.getFullStart(), node.getEnd()) - : TypeScript.TextSpan.fromBounds(node.getStart(), node.getEnd()); + ? TextSpan.fromBounds(node.getFullStart(), node.getEnd()) + : TextSpan.fromBounds(node.getStart(), node.getEnd()); } function getTextOfNode(node: Node): string { diff --git a/src/services/outliningElementsCollector.ts b/src/services/outliningElementsCollector.ts index aaaedb735ea..27f75b8d20e 100644 --- a/src/services/outliningElementsCollector.ts +++ b/src/services/outliningElementsCollector.ts @@ -24,8 +24,8 @@ module ts { * @param autoCollapse Whether or not this region should be automatically collapsed when * the 'Collapse to Definitions' command is invoked. */ - textSpan: TypeScript.TextSpan; - hintSpan: TypeScript.TextSpan; + textSpan: TextSpan; + hintSpan: TextSpan; bannerText: string; autoCollapse: boolean; } @@ -38,8 +38,8 @@ module ts { function addOutliningSpan(hintSpanNode: Node, startElement: Node, endElement: Node, autoCollapse: boolean) { if (hintSpanNode && startElement && endElement) { var span: OutliningSpan = { - textSpan: TypeScript.TextSpan.fromBounds(startElement.pos, endElement.end), - hintSpan: TypeScript.TextSpan.fromBounds(hintSpanNode.getStart(), hintSpanNode.end), + textSpan: TextSpan.fromBounds(startElement.pos, endElement.end), + hintSpan: TextSpan.fromBounds(hintSpanNode.getStart(), hintSpanNode.end), bannerText: collapseText, autoCollapse: autoCollapse }; @@ -86,7 +86,7 @@ module ts { else { // Block was a standalone block. In this case we want to only collapse // the span of the block, independent of any parent span. - var span = TypeScript.TextSpan.fromBounds(n.getStart(), n.end); + var span = TextSpan.fromBounds(n.getStart(), n.end); elements.push({ textSpan: span, hintSpan: span, diff --git a/src/services/resources/diagnosticCode.generated.ts b/src/services/resources/diagnosticCode.generated.ts index 04359272698..e5878978fcc 100644 --- a/src/services/resources/diagnosticCode.generated.ts +++ b/src/services/resources/diagnosticCode.generated.ts @@ -5,7 +5,7 @@ module TypeScript { warning_TS_0_1: "warning TS{0}: {1}", Unrecognized_escape_sequence: "Unrecognized escape sequence.", Unexpected_character_0: "Unexpected character {0}.", - Missing_close_quote_character: "Missing close quote character.", + Unterminated_string_literal: "Unterminated string literal.", Identifier_expected: "Identifier expected.", _0_keyword_expected: "'{0}' keyword expected.", _0_expected: "'{0}' expected.", @@ -96,6 +96,9 @@ module TypeScript { Type_expected: "Type expected.", Template_literal_cannot_be_used_as_an_element_name: "Template literal cannot be used as an element name.", Computed_property_names_cannot_be_used_here: "Computed property names cannot be used here.", + yield_expression_must_be_contained_within_a_generator_declaration: "'yield' expression must be contained within a generator declaration.", + Unterminated_regular_expression_literal: "Unterminated regular expression literal.", + Unterminated_template_literal: "Unterminated template literal.", Duplicate_identifier_0: "Duplicate identifier '{0}'.", The_name_0_does_not_exist_in_the_current_scope: "The name '{0}' does not exist in the current scope.", The_name_0_does_not_refer_to_a_value: "The name '{0}' does not refer to a value.", diff --git a/src/services/resources/diagnosticInformationMap.generated.ts b/src/services/resources/diagnosticInformationMap.generated.ts index d772d2ced82..d6597a008df 100644 --- a/src/services/resources/diagnosticInformationMap.generated.ts +++ b/src/services/resources/diagnosticInformationMap.generated.ts @@ -6,7 +6,7 @@ module TypeScript { "warning TS{0}: {1}": { "code": 1, "category": DiagnosticCategory.NoPrefix }, "Unrecognized escape sequence.": { "code": 1000, "category": DiagnosticCategory.Error }, "Unexpected character {0}.": { "code": 1001, "category": DiagnosticCategory.Error }, - "Missing close quote character.": { "code": 1002, "category": DiagnosticCategory.Error }, + "Unterminated string literal.": { "code": 1002, "category": DiagnosticCategory.Error }, "Identifier expected.": { "code": 1003, "category": DiagnosticCategory.Error }, "'{0}' keyword expected.": { "code": 1004, "category": DiagnosticCategory.Error }, "'{0}' expected.": { "code": 1005, "category": DiagnosticCategory.Error }, @@ -98,6 +98,9 @@ module TypeScript { "Type expected.": { "code": 1110, "category": DiagnosticCategory.Error }, "Template literal cannot be used as an element name.": { "code": 1111, "category": DiagnosticCategory.Error }, "Computed property names cannot be used here.": { "code": 1112, "category": DiagnosticCategory.Error }, + "'yield' expression must be contained within a generator declaration.": { "code": 1113, "category": DiagnosticCategory.Error }, + "Unterminated regular expression literal.": { "code": 1114, "category": DiagnosticCategory.Error }, + "Unterminated template literal.": { "code": 1115, "category": DiagnosticCategory.Error }, "Duplicate identifier '{0}'.": { "code": 2000, "category": DiagnosticCategory.Error }, "The name '{0}' does not exist in the current scope.": { "code": 2001, "category": DiagnosticCategory.Error }, "The name '{0}' does not refer to a value.": { "code": 2002, "category": DiagnosticCategory.Error }, diff --git a/src/services/resources/diagnosticMessages.json b/src/services/resources/diagnosticMessages.json index 06be87b172a..724edbd8f3b 100644 --- a/src/services/resources/diagnosticMessages.json +++ b/src/services/resources/diagnosticMessages.json @@ -15,7 +15,7 @@ "category": "Error", "code": 1001 }, - "Missing close quote character.": { + "Unterminated string literal.": { "category": "Error", "code": 1002 }, @@ -379,6 +379,18 @@ "category": "Error", "code": 1112 }, + "'yield' expression must be contained within a generator declaration.": { + "category": "Error", + "code": 1113 + }, + "Unterminated regular expression literal.": { + "category": "Error", + "code": 1114 + }, + "Unterminated template literal.": { + "category": "Error", + "code": 1115 + }, "Duplicate identifier '{0}'.": { "category": "Error", "code": 2000 diff --git a/src/services/services.ts b/src/services/services.ts index 0c1ffff3e7a..4a7ff76c91c 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -4,26 +4,14 @@ /// /// -/// +/// /// /// /// -/// /// /// -/// -/// - -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// +/// +/// module ts { export interface Node { @@ -71,11 +59,72 @@ module ts { } export interface SourceFile { - getScriptSnapshot(): TypeScript.IScriptSnapshot; + getScriptSnapshot(): IScriptSnapshot; getNamedDeclarations(): Declaration[]; - update(scriptSnapshot: TypeScript.IScriptSnapshot, version: string, isOpen: boolean, textChangeRange: TypeScript.TextChangeRange): SourceFile; + update(scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean, textChangeRange: TextChangeRange): SourceFile; } + /** + * Represents an immutable snapshot of a script at a specified time.Once acquired, the + * snapshot is observably immutable. i.e. the same calls with the same parameters will return + * the same values. + */ + export interface IScriptSnapshot { + /** Gets a portion of the script snapshot specified by [start, end). */ + getText(start: number, end: number): string; + + /** Gets the length of this script snapshot. */ + getLength(): number; + + /** + * This call returns the array containing the start position of every line. + * i.e."[0, 10, 55]". TODO: consider making this optional. The language service could + * always determine this (albeit in a more expensive manner). + */ + getLineStartPositions(): number[]; + + /** + * Gets the TextChangeRange that describe how the text changed between this text and + * an older version. This information is used by the incremental parser to determine + * what sections of the script need to be re-parsed. 'undefined' can be returned if the + * change range cannot be determined. However, in that case, incremental parsing will + * not happen and the entire document will be re - parsed. + */ + getChangeRange(oldSnapshot: IScriptSnapshot): TextChangeRange; + } + + export module ScriptSnapshot { + class StringScriptSnapshot implements IScriptSnapshot { + private _lineStartPositions: number[] = undefined; + + constructor(private text: string) { + } + + public getText(start: number, end: number): string { + return this.text.substring(start, end); + } + + public getLength(): number { + return this.text.length; + } + + public getLineStartPositions(): number[] { + if (!this._lineStartPositions) { + this._lineStartPositions = computeLineStarts(this.text); + } + + return this._lineStartPositions; + } + + public getChangeRange(oldSnapshot: IScriptSnapshot): TextChangeRange { + throw new Error("not yet implemented"); + } + } + + export function fromString(text: string): IScriptSnapshot { + return new StringScriptSnapshot(text); + } + } export interface PreProcessedFileInfo { referencedFiles: FileReference[]; importedFiles: FileReference[]; @@ -667,7 +716,9 @@ module ts { public text: string; public getLineAndCharacterFromPosition(position: number): { line: number; character: number } { return null; } public getPositionFromLineAndCharacter(line: number, character: number): number { return -1; } + public getLineStarts(): number[] { return undefined; } public amdDependencies: string[]; + public amdModuleName: string; public referencedFiles: FileReference[]; public syntacticErrors: Diagnostic[]; public semanticErrors: Diagnostic[]; @@ -682,10 +733,10 @@ module ts { public languageVersion: ScriptTarget; public identifiers: Map; - private scriptSnapshot: TypeScript.IScriptSnapshot; + private scriptSnapshot: IScriptSnapshot; private namedDeclarations: Declaration[]; - public getScriptSnapshot(): TypeScript.IScriptSnapshot { + public getScriptSnapshot(): IScriptSnapshot { return this.scriptSnapshot; } @@ -761,28 +812,28 @@ module ts { return this.namedDeclarations; } - public update(scriptSnapshot: TypeScript.IScriptSnapshot, version: string, isOpen: boolean, textChangeRange: TypeScript.TextChangeRange): SourceFile { + public update(scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean, textChangeRange: TextChangeRange): SourceFile { if (textChangeRange && Debug.shouldAssert(AssertionLevel.Normal)) { var oldText = this.scriptSnapshot; var newText = scriptSnapshot; - TypeScript.Debug.assert((oldText.getLength() - textChangeRange.span().length() + textChangeRange.newLength()) === newText.getLength()); + Debug.assert((oldText.getLength() - textChangeRange.span().length() + textChangeRange.newLength()) === newText.getLength()); if (Debug.shouldAssert(AssertionLevel.VeryAggressive)) { var oldTextPrefix = oldText.getText(0, textChangeRange.span().start()); var newTextPrefix = newText.getText(0, textChangeRange.span().start()); - TypeScript.Debug.assert(oldTextPrefix === newTextPrefix); + Debug.assert(oldTextPrefix === newTextPrefix); var oldTextSuffix = oldText.getText(textChangeRange.span().end(), oldText.getLength()); var newTextSuffix = newText.getText(textChangeRange.newSpan().end(), newText.getLength()); - TypeScript.Debug.assert(oldTextSuffix === newTextSuffix); + Debug.assert(oldTextSuffix === newTextSuffix); } } return SourceFileObject.createSourceFileObject(this.filename, scriptSnapshot, this.languageVersion, version, isOpen); } - public static createSourceFileObject(filename: string, scriptSnapshot: TypeScript.IScriptSnapshot, languageVersion: ScriptTarget, version: string, isOpen: boolean) { + public static createSourceFileObject(filename: string, scriptSnapshot: IScriptSnapshot, languageVersion: ScriptTarget, version: string, isOpen: boolean) { var newSourceFile = createSourceFile(filename, scriptSnapshot.getText(0, scriptSnapshot.getLength()), languageVersion, version, isOpen); newSourceFile.scriptSnapshot = scriptSnapshot; return newSourceFile; @@ -801,7 +852,7 @@ module ts { getScriptFileNames(): string[]; getScriptVersion(fileName: string): string; getScriptIsOpen(fileName: string): boolean; - getScriptSnapshot(fileName: string): TypeScript.IScriptSnapshot; + getScriptSnapshot(fileName: string): IScriptSnapshot; getLocalizedDiagnosticMessages(): any; getCancellationToken(): CancellationToken; getCurrentDirectory(): string; @@ -819,17 +870,17 @@ module ts { getSemanticDiagnostics(fileName: string): Diagnostic[]; getCompilerOptionsDiagnostics(): Diagnostic[]; - getSyntacticClassifications(fileName: string, span: TypeScript.TextSpan): ClassifiedSpan[]; - getSemanticClassifications(fileName: string, span: TypeScript.TextSpan): ClassifiedSpan[]; + getSyntacticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; + getSemanticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; getCompletionsAtPosition(fileName: string, position: number, isMemberCompletion: boolean): CompletionInfo; getCompletionEntryDetails(fileName: string, position: number, entryName: string): CompletionEntryDetails; getQuickInfoAtPosition(fileName: string, position: number): QuickInfo; - getNameOrDottedNameSpan(fileName: string, startPos: number, endPos: number): TypeScript.TextSpan; + getNameOrDottedNameSpan(fileName: string, startPos: number, endPos: number): TextSpan; - getBreakpointStatementAtPosition(fileName: string, position: number): TypeScript.TextSpan; + getBreakpointStatementAtPosition(fileName: string, position: number): TextSpan; getSignatureHelpItems(fileName: string, position: number): SignatureHelpItems; @@ -842,14 +893,13 @@ module ts { getDefinitionAtPosition(fileName: string, position: number): DefinitionInfo[]; getReferencesAtPosition(fileName: string, position: number): ReferenceEntry[]; getOccurrencesAtPosition(fileName: string, position: number): ReferenceEntry[]; - getImplementorsAtPosition(fileName: string, position: number): ReferenceEntry[]; getNavigateToItems(searchValue: string): NavigateToItem[]; getNavigationBarItems(fileName: string): NavigationBarItem[]; getOutliningSpans(fileName: string): OutliningSpan[]; getTodoComments(fileName: string, descriptors: TodoCommentDescriptor[]): TodoComment[]; - getBraceMatchingAtPosition(fileName: string, position: number): TypeScript.TextSpan[]; + getBraceMatchingAtPosition(fileName: string, position: number): TextSpan[]; getIndentationAtPosition(fileName: string, position: number, options: EditorOptions): number; getFormattingEditsForRange(fileName: string, start: number, end: number, options: FormatCodeOptions): TextChange[]; @@ -858,8 +908,6 @@ module ts { getEmitOutput(fileName: string): EmitOutput; - //getSyntaxTree(fileName: string): TypeScript.SyntaxTree; - dispose(): void; } @@ -899,7 +947,7 @@ module ts { } export interface ClassifiedSpan { - textSpan: TypeScript.TextSpan; + textSpan: TextSpan; classificationType: string; // ClassificationTypeNames } @@ -907,7 +955,7 @@ module ts { text: string; kind: string; kindModifiers: string; - spans: TypeScript.TextSpan[]; + spans: TextSpan[]; childItems: NavigationBarItem[]; indent: number; bolded: boolean; @@ -926,17 +974,17 @@ module ts { } export class TextChange { - span: TypeScript.TextSpan; + span: TextSpan; newText: string; } export interface RenameLocation { - textSpan: TypeScript.TextSpan; + textSpan: TextSpan; fileName: string; } export interface ReferenceEntry { - textSpan: TypeScript.TextSpan; + textSpan: TextSpan; fileName: string; isWriteAccess: boolean; } @@ -947,7 +995,7 @@ module ts { kindModifiers: string; matchKind: string; fileName: string; - textSpan: TypeScript.TextSpan; + textSpan: TextSpan; containerName: string; containerKind: string; } @@ -972,7 +1020,7 @@ module ts { export interface DefinitionInfo { fileName: string; - textSpan: TypeScript.TextSpan; + textSpan: TextSpan; kind: string; name: string; containerKind: string; @@ -1012,7 +1060,7 @@ module ts { export interface QuickInfo { kind: string; kindModifiers: string; - textSpan: TypeScript.TextSpan; + textSpan: TextSpan; displayParts: SymbolDisplayPart[]; documentation: SymbolDisplayPart[]; } @@ -1024,7 +1072,7 @@ module ts { fullDisplayName: string; kind: string; kindModifiers: string; - triggerSpan: TypeScript.TextSpan; + triggerSpan: TextSpan; } export interface SignatureHelpParameter { @@ -1055,7 +1103,7 @@ module ts { */ export interface SignatureHelpItems { items: SignatureHelpItem[]; - applicableSpan: TypeScript.TextSpan; + applicableSpan: TextSpan; selectedItemIndex: number; argumentIndex: number; argumentCount: number; @@ -1134,7 +1182,7 @@ module ts { acquireDocument( filename: string, compilationSettings: CompilerOptions, - scriptSnapshot: TypeScript.IScriptSnapshot, + scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean): SourceFile; @@ -1142,10 +1190,10 @@ module ts { sourceFile: SourceFile, filename: string, compilationSettings: CompilerOptions, - scriptSnapshot: TypeScript.IScriptSnapshot, + scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean, - textChangeRange: TypeScript.TextChangeRange + textChangeRange: TextChangeRange ): SourceFile; releaseDocument(filename: string, compilationSettings: CompilerOptions): void @@ -1263,10 +1311,6 @@ module ts { prefix = 3 } - interface IncrementalParse { - (oldSyntaxTree: TypeScript.SyntaxTree, textChangeRange: TypeScript.TextChangeRange, newText: TypeScript.ISimpleText): TypeScript.SyntaxTree - } - /// Language Service interface CompletionSession { @@ -1289,7 +1333,7 @@ module ts { filename: string; version: string; isOpen: boolean; - sourceText?: TypeScript.IScriptSnapshot; + sourceText?: IScriptSnapshot; } interface DocumentRegistryEntry { @@ -1325,8 +1369,8 @@ module ts { writeSpace: text => writeKind(text, SymbolDisplayPartKind.space), writeStringLiteral: text => writeKind(text, SymbolDisplayPartKind.stringLiteral), writeParameter: text => writeKind(text, SymbolDisplayPartKind.parameterName), - writeSymbol: writeSymbol, - writeLine: writeLine, + writeSymbol, + writeLine, increaseIndent: () => { indent++; }, decreaseIndent: () => { indent--; }, clear: resetWriter, @@ -1579,7 +1623,7 @@ module ts { return this.getEntry(filename).isOpen; } - public getScriptSnapshot(filename: string): TypeScript.IScriptSnapshot { + public getScriptSnapshot(filename: string): IScriptSnapshot { var file = this.getEntry(filename); if (!file.sourceText) { file.sourceText = this.host.getScriptSnapshot(file.filename); @@ -1587,10 +1631,10 @@ module ts { return file.sourceText; } - public getChangeRange(filename: string, lastKnownVersion: string, oldScriptSnapshot: TypeScript.IScriptSnapshot): TypeScript.TextChangeRange { + public getChangeRange(filename: string, lastKnownVersion: string, oldScriptSnapshot: IScriptSnapshot): TextChangeRange { var currentVersion = this.getVersion(filename); if (lastKnownVersion === currentVersion) { - return TypeScript.TextChangeRange.unchanged; // "No changes" + return TextChangeRange.unchanged; // "No changes" } var scriptSnapshot = this.getScriptSnapshot(filename); @@ -1606,7 +1650,6 @@ module ts { private currentFilename: string = ""; private currentFileVersion: string = null; private currentSourceFile: SourceFile = null; - private currentFileSyntaxTree: TypeScript.SyntaxTree = null; constructor(private host: LanguageServiceHost) { this.hostCache = new HostCache(host); @@ -1614,20 +1657,15 @@ module ts { private initialize(filename: string) { // ensure that both source file and syntax tree are either initialized or not initialized - Debug.assert(!!this.currentFileSyntaxTree === !!this.currentSourceFile); var start = new Date().getTime(); this.hostCache = new HostCache(this.host); this.host.log("SyntaxTreeCache.Initialize: new HostCache: " + (new Date().getTime() - start)); var version = this.hostCache.getVersion(filename); - var syntaxTree: TypeScript.SyntaxTree = null; var sourceFile: SourceFile; - if (this.currentFileSyntaxTree === null || this.currentFilename !== filename) { + if (this.currentFilename !== filename) { var scriptSnapshot = this.hostCache.getScriptSnapshot(filename); - var start = new Date().getTime(); - syntaxTree = this.createSyntaxTree(filename, scriptSnapshot); - this.host.log("SyntaxTreeCache.Initialize: createSyntaxTree: " + (new Date().getTime() - start)); var start = new Date().getTime(); sourceFile = createSourceFileFromScriptSnapshot(filename, scriptSnapshot, getDefaultCompilerOptions(), version, /*isOpen*/ true); @@ -1640,11 +1678,6 @@ module ts { else if (this.currentFileVersion !== version) { var scriptSnapshot = this.hostCache.getScriptSnapshot(filename); - var start = new Date().getTime(); - syntaxTree = this.updateSyntaxTree(filename, scriptSnapshot, - this.currentSourceFile.getScriptSnapshot(), this.currentFileSyntaxTree, this.currentFileVersion); - this.host.log("SyntaxTreeCache.Initialize: updateSyntaxTree: " + (new Date().getTime() - start)); - var editRange = this.hostCache.getChangeRange(filename, this.currentFileVersion, this.currentSourceFile.getScriptSnapshot()); var start = new Date().getTime(); @@ -1658,12 +1691,10 @@ module ts { this.host.log("SyntaxTreeCache.Initialize: fixupParentRefs : " + (new Date().getTime() - start)); } - if (syntaxTree !== null) { - Debug.assert(sourceFile !== undefined); + if (sourceFile) { // All done, ensure state is up to date this.currentFileVersion = version; this.currentFilename = filename; - this.currentFileSyntaxTree = syntaxTree; this.currentSourceFile = sourceFile; } @@ -1684,115 +1715,17 @@ module ts { } } - public getCurrentFileSyntaxTree(filename: string): TypeScript.SyntaxTree { - this.initialize(filename); - return this.currentFileSyntaxTree; - } - public getCurrentSourceFile(filename: string): SourceFile { this.initialize(filename); return this.currentSourceFile; } - public getCurrentScriptSnapshot(filename: string): TypeScript.IScriptSnapshot { - // update currentFileScriptSnapshot as a part of 'getCurrentFileSyntaxTree' call - this.getCurrentFileSyntaxTree(filename); + public getCurrentScriptSnapshot(filename: string): IScriptSnapshot { return this.getCurrentSourceFile(filename).getScriptSnapshot(); } - - private createSyntaxTree(filename: string, scriptSnapshot: TypeScript.IScriptSnapshot): TypeScript.SyntaxTree { - var text = TypeScript.SimpleText.fromScriptSnapshot(scriptSnapshot); - - // For the purposes of features that use this syntax tree, we can just use the default - // compilation settings. The features only use the syntax (and not the diagnostics), - // and the syntax isn't affected by the compilation settings. - var syntaxTree = TypeScript.Parser.parse(filename, text, getDefaultCompilerOptions().target, TypeScript.isDTSFile(filename)); - - return syntaxTree; - } - - private updateSyntaxTree(filename: string, scriptSnapshot: TypeScript.IScriptSnapshot, previousScriptSnapshot: TypeScript.IScriptSnapshot, previousSyntaxTree: TypeScript.SyntaxTree, previousFileVersion: string): TypeScript.SyntaxTree { - var editRange = this.hostCache.getChangeRange(filename, previousFileVersion, previousScriptSnapshot); - - // Debug.assert(newLength >= 0); - - // The host considers the entire buffer changed. So parse a completely new tree. - if (editRange === null) { - return this.createSyntaxTree(filename, scriptSnapshot); - } - - var nextSyntaxTree = TypeScript.IncrementalParser.parse( - previousSyntaxTree, editRange, TypeScript.SimpleText.fromScriptSnapshot(scriptSnapshot)); - - this.ensureInvariants(filename, editRange, nextSyntaxTree, previousScriptSnapshot, scriptSnapshot); - - return nextSyntaxTree; - } - - private ensureInvariants(filename: string, editRange: TypeScript.TextChangeRange, incrementalTree: TypeScript.SyntaxTree, oldScriptSnapshot: TypeScript.IScriptSnapshot, newScriptSnapshot: TypeScript.IScriptSnapshot) { - // First, verify that the edit range and the script snapshots make sense. - - // If this fires, then the edit range is completely bogus. Somehow the lengths of the - // old snapshot, the change range and the new snapshot aren't in sync. This is very - // bad. - var expectedNewLength = oldScriptSnapshot.getLength() - editRange.span().length() + editRange.newLength(); - var actualNewLength = newScriptSnapshot.getLength(); - - function provideMoreDebugInfo() { - - var debugInformation = ["expected length:", expectedNewLength, "and actual length:", actualNewLength, "are not equal\r\n"]; - - var oldSpan = editRange.span(); - - function prettyPrintString(s: string): string { - return '"' + s.replace(/\r/g, '\\r').replace(/\n/g, '\\n') + '"'; - } - - debugInformation.push('Edit range (old text) (start: ' + oldSpan.start() + ', end: ' + oldSpan.end() + ') \r\n'); - debugInformation.push('Old text edit range contents: ' + prettyPrintString(oldScriptSnapshot.getText(oldSpan.start(), oldSpan.end()))); - - var newSpan = editRange.newSpan(); - - debugInformation.push('Edit range (new text) (start: ' + newSpan.start() + ', end: ' + newSpan.end() + ') \r\n'); - debugInformation.push('New text edit range contents: ' + prettyPrintString(newScriptSnapshot.getText(newSpan.start(), newSpan.end()))); - - return debugInformation.join(' '); - } - - Debug.assert( - expectedNewLength === actualNewLength, - "Expected length is different from actual!", - provideMoreDebugInfo); - - if (Debug.shouldAssert(AssertionLevel.VeryAggressive)) { - // If this fires, the text change range is bogus. It says the change starts at point - // 'X', but we can see a text difference *before* that point. - var oldPrefixText = oldScriptSnapshot.getText(0, editRange.span().start()); - var newPrefixText = newScriptSnapshot.getText(0, editRange.span().start()); - Debug.assert(oldPrefixText === newPrefixText, 'Expected equal prefix texts!'); - - // If this fires, the text change range is bogus. It says the change goes only up to - // point 'X', but we can see a text difference *after* that point. - var oldSuffixText = oldScriptSnapshot.getText(editRange.span().end(), oldScriptSnapshot.getLength()); - var newSuffixText = newScriptSnapshot.getText(editRange.newSpan().end(), newScriptSnapshot.getLength()); - Debug.assert(oldSuffixText === newSuffixText, 'Expected equal suffix texts!'); - - // Ok, text change range and script snapshots look ok. Let's verify that our - // incremental parsing worked properly. - //var normalTree = this.createSyntaxTree(filename, newScriptSnapshot); - //Debug.assert(normalTree.structuralEquals(incrementalTree), 'Expected equal incremental and normal trees'); - - // Ok, the trees looked good. So at least our incremental parser agrees with the - // normal parser. Now, verify that the incremental tree matches the contents of the - // script snapshot. - var incrementalTreeText = TypeScript.fullText(incrementalTree.sourceUnit()); - var actualSnapshotText = newScriptSnapshot.getText(0, newScriptSnapshot.getLength()); - Debug.assert(incrementalTreeText === actualSnapshotText, 'Expected full texts to be equal'); - } - } } - function createSourceFileFromScriptSnapshot(filename: string, scriptSnapshot: TypeScript.IScriptSnapshot, settings: CompilerOptions, version: string, isOpen: boolean) { + function createSourceFileFromScriptSnapshot(filename: string, scriptSnapshot: IScriptSnapshot, settings: CompilerOptions, version: string, isOpen: boolean) { return SourceFileObject.createSourceFileObject(filename, scriptSnapshot, settings.target, version, isOpen); } @@ -1827,7 +1760,7 @@ module ts { sourceFiles.sort((x, y) => y.refCount - x.refCount); return { bucket: name, - sourceFiles: sourceFiles + sourceFiles }; }); return JSON.stringify(bucketInfoArray, null, 2); @@ -1836,7 +1769,7 @@ module ts { function acquireDocument( filename: string, compilationSettings: CompilerOptions, - scriptSnapshot: TypeScript.IScriptSnapshot, + scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean): SourceFile { @@ -1860,10 +1793,10 @@ module ts { sourceFile: SourceFile, filename: string, compilationSettings: CompilerOptions, - scriptSnapshot: TypeScript.IScriptSnapshot, + scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean, - textChangeRange: TypeScript.TextChangeRange + textChangeRange: TextChangeRange ): SourceFile { var bucket = getBucketForCompilationSettings(compilationSettings, /*createIfMissing*/ false); @@ -1893,10 +1826,10 @@ module ts { } return { - acquireDocument: acquireDocument, - updateDocument: updateDocument, - releaseDocument: releaseDocument, - reportStats: reportStats + acquireDocument, + updateDocument, + releaseDocument, + reportStats }; } @@ -1959,7 +1892,7 @@ module ts { processImport(); } processTripleSlashDirectives(); - return { referencedFiles: referencedFiles, importedFiles: importedFiles, isLibFile: isNoDefaultLib }; + return { referencedFiles, importedFiles, isLibFile: isNoDefaultLib }; } /// Helpers @@ -2051,7 +1984,7 @@ module ts { /** Returns true if node is a name of an object literal property, e.g. "a" in x = { "a": 1 } */ function isNameOfPropertyAssignment(node: Node): boolean { return (node.kind === SyntaxKind.Identifier || node.kind === SyntaxKind.StringLiteral || node.kind === SyntaxKind.NumericLiteral) && - node.parent.kind === SyntaxKind.PropertyAssignment && (node.parent).name === node; + (node.parent.kind === SyntaxKind.PropertyAssignment || node.parent.kind === SyntaxKind.ShorthandPropertyAssignment) && (node.parent).name === node; } function isLiteralNameOfPropertyDeclarationOrIndexAccess(node: Node): boolean { @@ -2137,7 +2070,7 @@ module ts { export function createLanguageService(host: LanguageServiceHost, documentRegistry: DocumentRegistry): LanguageService { var syntaxTreeCache: SyntaxTreeCache = new SyntaxTreeCache(host); - var formattingRulesProvider: TypeScript.Services.Formatting.RulesProvider; + var ruleProvider: formatting.RulesProvider; var hostCache: HostCache; // A cache of all the information about the files on the host side. var program: Program; @@ -2168,6 +2101,16 @@ module ts { return fullTypeCheckChecker_doNotAccessDirectly || (fullTypeCheckChecker_doNotAccessDirectly = program.getTypeChecker(/*fullTypeCheck*/ true)); } + function getRuleProvider(options: FormatCodeOptions) { + // Ensure rules are initialized and up to date wrt to formatting options + if (!ruleProvider) { + ruleProvider = new formatting.RulesProvider(host); + } + + ruleProvider.ensureUpToDate(options); + return ruleProvider; + } + function createCompilerHost(): CompilerHost { return { getSourceFile: (filename, languageVersion) => { @@ -2278,7 +2221,7 @@ module ts { // file was closed, then we always want to re-parse. This is so our tree doesn't keep // the old buffer alive that represented the file on disk (as the host has moved to a // new text buffer). - var textChangeRange: TypeScript.TextChangeRange = null; + var textChangeRange: TextChangeRange = null; if (sourceFile.isOpen && isOpen) { textChangeRange = hostCache.getChangeRange(filename, sourceFile.version, sourceFile.getScriptSnapshot()); } @@ -2348,7 +2291,7 @@ module ts { // Get emitter-diagnostics requires calling TypeChecker.emitFiles so we have to define CompilerHost.writer which does nothing because emitFiles function has side effects defined by CompilerHost.writer var savedWriter = writer; writer = (filename: string, data: string, writeByteOrderMark: boolean) => { }; - allDiagnostics = allDiagnostics.concat(checker.emitFiles(targetSourceFile).errors); + allDiagnostics = allDiagnostics.concat(checker.invokeEmitter(targetSourceFile).diagnostics); writer = savedWriter; } return allDiagnostics @@ -2553,7 +2496,7 @@ module ts { host.log("getCompletionsAtPosition: Semantic work: " + (new Date().getTime() - semanticStart)); return { - isMemberCompletion: isMemberCompletion, + isMemberCompletion, entries: activeCompletionSession.entries }; @@ -2735,7 +2678,7 @@ module ts { var existingMemberNames: Map = {}; forEach(existingMembers, m => { - if (m.kind !== SyntaxKind.PropertyAssignment) { + if (m.kind !== SyntaxKind.PropertyAssignment && m.kind !== SyntaxKind.ShorthandPropertyAssignment) { // Ignore omitted expressions for missing members in the object literal return; } @@ -3213,7 +3156,7 @@ module ts { documentation = symbol.getDocumentationComment(); } - return { displayParts: displayParts, documentation: documentation, symbolKind: symbolKind }; + return { displayParts, documentation, symbolKind }; function addNewLineIfDisplayPartsExist() { if (displayParts.length) { @@ -3285,7 +3228,7 @@ module ts { return { kind: ScriptElementKind.unknown, kindModifiers: ScriptElementKindModifier.none, - textSpan: new TypeScript.TextSpan(node.getStart(), node.getWidth()), + textSpan: new TextSpan(node.getStart(), node.getWidth()), displayParts: typeToDisplayParts(typeInfoResolver, type, getContainerNode(node)), documentation: type.symbol ? type.symbol.getDocumentationComment() : undefined }; @@ -3299,7 +3242,7 @@ module ts { return { kind: displayPartsDocumentationsAndKind.symbolKind, kindModifiers: getSymbolModifiers(symbol), - textSpan: new TypeScript.TextSpan(node.getStart(), node.getWidth()), + textSpan: new TextSpan(node.getStart(), node.getWidth()), displayParts: displayPartsDocumentationsAndKind.displayParts, documentation: displayPartsDocumentationsAndKind.documentation }; @@ -3310,11 +3253,11 @@ module ts { function getDefinitionInfo(node: Node, symbolKind: string, symbolName: string, containerName: string): DefinitionInfo { return { fileName: node.getSourceFile().filename, - textSpan: TypeScript.TextSpan.fromBounds(node.getStart(), node.getEnd()), + textSpan: TextSpan.fromBounds(node.getStart(), node.getEnd()), kind: symbolKind, name: symbolName, containerKind: undefined, - containerName: containerName + containerName }; } @@ -3387,7 +3330,7 @@ module ts { if (referenceFile) { return [{ fileName: referenceFile.filename, - textSpan: TypeScript.TextSpan.fromBounds(0, 0), + textSpan: TextSpan.fromBounds(0, 0), kind: ScriptElementKind.scriptElement, name: comment.filename, containerName: undefined, @@ -3407,6 +3350,23 @@ module ts { var result: DefinitionInfo[] = []; + // Because name in short-hand property assignment has two different meanings: property name and property value, + // using go-to-definition at such position should go to the variable declaration of the property value rather than + // go to the declaration of the property name (in this case stay at the same position). However, if go-to-definition + // is performed at the location of property access, we would like to go to definition of the property in the short-hand + // assignment. This case and others are handled by the following code. + if (node.parent.kind === SyntaxKind.ShorthandPropertyAssignment) { + var shorthandSymbol = typeInfoResolver.getShorthandAssignmentValueSymbol(symbol.valueDeclaration); + var shorthandDeclarations = shorthandSymbol.getDeclarations(); + var shorthandSymbolKind = getSymbolKind(shorthandSymbol, typeInfoResolver); + var shorthandSymbolName = typeInfoResolver.symbolToString(shorthandSymbol); + var shorthandContainerName = typeInfoResolver.symbolToString(symbol.parent, node); + forEach(shorthandDeclarations, declaration => { + result.push(getDefinitionInfo(declaration, shorthandSymbolKind, shorthandSymbolName, shorthandContainerName)); + }); + return result + } + var declarations = symbol.getDeclarations(); var symbolName = typeInfoResolver.symbolToString(symbol); // Do not get scoped name, just the name of the symbol var symbolKind = getSymbolKind(symbol, typeInfoResolver); @@ -3556,7 +3516,7 @@ module ts { if (shouldHighlightNextKeyword) { result.push({ fileName: filename, - textSpan: TypeScript.TextSpan.fromBounds(elseKeyword.getStart(), ifKeyword.end), + textSpan: TextSpan.fromBounds(elseKeyword.getStart(), ifKeyword.end), isWriteAccess: false }); i++; // skip the next keyword @@ -4142,7 +4102,7 @@ module ts { (findInComments && isInComment(position))) { result.push({ fileName: sourceFile.filename, - textSpan: new TypeScript.TextSpan(position, searchText.length), + textSpan: new TextSpan(position, searchText.length), isWriteAccess: false }); } @@ -4154,8 +4114,21 @@ module ts { } var referenceSymbol = typeInfoResolver.getSymbolInfo(referenceLocation); - if (referenceSymbol && isRelatableToSearchSet(searchSymbols, referenceSymbol, referenceLocation)) { - result.push(getReferenceEntryFromNode(referenceLocation)); + if (referenceSymbol) { + var referenceSymbolDeclaration = referenceSymbol.valueDeclaration; + var shorthandValueSymbol = typeInfoResolver.getShorthandAssignmentValueSymbol(referenceSymbolDeclaration); + if (isRelatableToSearchSet(searchSymbols, referenceSymbol, referenceLocation)) { + result.push(getReferenceEntryFromNode(referenceLocation)); + } + /* Because in short-hand property assignment, an identifier which stored as name of the short-hand property assignment + * has two meaning : property name and property value. Therefore when we do findAllReference at the position where + * an identifier is declared, the language service should return the position of the variable declaration as well as + * the position in short-hand property assignment excluding property accessing. However, if we do findAllReference at the + * position of property accessing, the referenceEntry of such position will be handled in the first case. + */ + else if (!(referenceSymbol.flags & SymbolFlags.Transient) && searchSymbols.indexOf(shorthandValueSymbol) >= 0) { + result.push(getReferenceEntryFromNode(referenceSymbolDeclaration.name)); + } } }); } @@ -4323,6 +4296,22 @@ module ts { forEach(getPropertySymbolsFromContextualType(location), contextualSymbol => { result.push.apply(result, typeInfoResolver.getRootSymbols(contextualSymbol)); }); + + /* Because in short-hand property assignment, location has two meaning : property name and as value of the property + * When we do findAllReference at the position of the short-hand property assignment, we would want to have references to position of + * property name and variable declaration of the identifier. + * Like in below example, when querying for all references for an identifier 'name', of the property assignment, the language service + * should show both 'name' in 'obj' and 'name' in variable declaration + * var name = "Foo"; + * var obj = { name }; + * In order to do that, we will populate the search set with the value symbol of the identifier as a value of the property assignment + * so that when matching with potential reference symbol, both symbols from property declaration and variable declaration + * will be included correctly. + */ + var shorthandValueSymbol = typeInfoResolver.getShorthandAssignmentValueSymbol(location.parent); + if (shorthandValueSymbol) { + result.push(shorthandValueSymbol); + } } // If this is a union property, add all the symbols from all its source symbols in all unioned types. @@ -4482,7 +4471,7 @@ module ts { return { fileName: node.getSourceFile().filename, - textSpan: TypeScript.TextSpan.fromBounds(start, end), + textSpan: TextSpan.fromBounds(start, end), isWriteAccess: isWriteAccess(node) }; } @@ -4538,7 +4527,7 @@ module ts { kindModifiers: getNodeModifiers(declaration), matchKind: MatchKind[matchKind], fileName: filename, - textSpan: TypeScript.TextSpan.fromBounds(declaration.getStart(), declaration.getEnd()), + textSpan: TextSpan.fromBounds(declaration.getStart(), declaration.getEnd()), // TODO(jfreeman): What should be the containerName when the container has a computed name? containerName: container.name ? (container.name).text : "", containerKind: container.name ? getNodeKind(container) : "" @@ -4649,7 +4638,7 @@ module ts { // Perform semantic and force a type check before emit to ensure that all symbols are updated // EmitFiles will report if there is an error from TypeChecker and Emitter // Depend whether we will have to emit into a single file or not either emit only selected file in the project, emit all files into a single file - var emitFilesResult = getFullTypeCheckChecker().emitFiles(targetSourceFile); + var emitFilesResult = getFullTypeCheckChecker().invokeEmitter(targetSourceFile); emitOutput.emitOutputStatus = emitFilesResult.emitResultStatus; // Reset writer back to undefined to make sure that we produce an error message if CompilerHost.writeFile method is called when we are not in getEmitOutput @@ -4663,6 +4652,7 @@ module ts { case SyntaxKind.VariableDeclaration: case SyntaxKind.Property: case SyntaxKind.PropertyAssignment: + case SyntaxKind.ShorthandPropertyAssignment: case SyntaxKind.EnumMember: case SyntaxKind.Method: case SyntaxKind.Constructor: @@ -4842,18 +4832,13 @@ module ts { } /// Syntactic features - function getSyntaxTree(filename: string): TypeScript.SyntaxTree { - filename = normalizeSlashes(filename); - return syntaxTreeCache.getCurrentFileSyntaxTree(filename); - } - function getCurrentSourceFile(filename: string): SourceFile { filename = normalizeSlashes(filename); var currentSourceFile = syntaxTreeCache.getCurrentSourceFile(filename); return currentSourceFile; } - function getNameOrDottedNameSpan(filename: string, startPos: number, endPos: number): TypeScript.TextSpan { + function getNameOrDottedNameSpan(filename: string, startPos: number, endPos: number): TextSpan { filename = ts.normalizeSlashes(filename); // Get node at the location var node = getTouchingPropertyName(getCurrentSourceFile(filename), startPos); @@ -4905,7 +4890,7 @@ module ts { } } - return TypeScript.TextSpan.fromBounds(nodeForStartPos.getStart(), node.getEnd()); + return TextSpan.fromBounds(nodeForStartPos.getStart(), node.getEnd()); } function getBreakpointStatementAtPosition(filename: string, position: number) { @@ -4920,7 +4905,7 @@ module ts { return NavigationBar.getNavigationBarItems(getCurrentSourceFile(filename)); } - function getSemanticClassifications(fileName: string, span: TypeScript.TextSpan): ClassifiedSpan[] { + function getSemanticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[] { synchronizeHostData(); fileName = normalizeSlashes(fileName); @@ -4979,7 +4964,7 @@ module ts { var type = classifySymbol(symbol, getMeaningFromLocation(node)); if (type) { result.push({ - textSpan: new TypeScript.TextSpan(node.getStart(), node.getWidth()), + textSpan: new TextSpan(node.getStart(), node.getWidth()), classificationType: type }); } @@ -4991,7 +4976,7 @@ module ts { } } - function getSyntacticClassifications(fileName: string, span: TypeScript.TextSpan): ClassifiedSpan[] { + function getSyntacticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[] { // doesn't use compiler - no need to synchronize with host fileName = normalizeSlashes(fileName); var sourceFile = getCurrentSourceFile(fileName); @@ -5005,7 +4990,7 @@ module ts { var width = comment.end - comment.pos; if (span.intersectsWith(comment.pos, width)) { result.push({ - textSpan: new TypeScript.TextSpan(comment.pos, width), + textSpan: new TextSpan(comment.pos, width), classificationType: ClassificationTypeNames.comment }); } @@ -5018,7 +5003,7 @@ module ts { var type = classifyTokenType(token); if (type) { result.push({ - textSpan: new TypeScript.TextSpan(token.getStart(), token.getWidth()), + textSpan: new TextSpan(token.getStart(), token.getWidth()), classificationType: type }); } @@ -5043,7 +5028,7 @@ module ts { } } - if (isPunctuation(token)) { + if (isPunctuation(token.kind)) { // the '=' in a variable declaration is special cased here. if (token.parent.kind === SyntaxKind.BinaryExpression || token.parent.kind === SyntaxKind.VariableDeclaration || @@ -5130,7 +5115,7 @@ module ts { function getBraceMatchingAtPosition(filename: string, position: number) { var sourceFile = getCurrentSourceFile(filename); - var result: TypeScript.TextSpan[] = []; + var result: TextSpan[] = []; var token = getTouchingToken(sourceFile, position); @@ -5142,12 +5127,12 @@ module ts { var parentElement = token.parent; var childNodes = parentElement.getChildren(sourceFile); - for (var i = 0, n = childNodes.length; i < n; i++) { + for (var i = 0, n = childNodes.length; i < n; i++) {33 var current = childNodes[i]; if (current.kind === matchKind) { - var range1 = new TypeScript.TextSpan(token.getStart(sourceFile), token.getWidth(sourceFile)); - var range2 = new TypeScript.TextSpan(current.getStart(sourceFile), current.getWidth(sourceFile)); + var range1 = new TextSpan(token.getStart(sourceFile), token.getWidth(sourceFile)); + var range2 = new TextSpan(current.getStart(sourceFile), current.getWidth(sourceFile)); // We want to order the braces when we return the result. if (range1.start() < range2.start()) { @@ -5189,62 +5174,39 @@ module ts { host.log("getIndentationAtPosition: getCurrentSourceFile: " + (new Date().getTime() - start)); var start = new Date().getTime(); - var options = new TypeScript.FormattingOptions(!editorOptions.ConvertTabsToSpaces, editorOptions.TabSize, editorOptions.IndentSize, editorOptions.NewLineCharacter) - var result = formatting.SmartIndenter.getIndentation(position, sourceFile, options); + var result = formatting.SmartIndenter.getIndentation(position, sourceFile, editorOptions); host.log("getIndentationAtPosition: computeIndentation : " + (new Date().getTime() - start)); return result; } - function getFormattingManager(filename: string, options: FormatCodeOptions) { - // Ensure rules are initialized and up to date wrt to formatting options - if (formattingRulesProvider == null) { - formattingRulesProvider = new TypeScript.Services.Formatting.RulesProvider(host); - } - - formattingRulesProvider.ensureUpToDate(options); - - // Get the Syntax Tree - var syntaxTree = getSyntaxTree(filename); - - // Convert IScriptSnapshot to ITextSnapshot - var scriptSnapshot = syntaxTreeCache.getCurrentScriptSnapshot(filename); - var scriptText = TypeScript.SimpleText.fromScriptSnapshot(scriptSnapshot); - var textSnapshot = new TypeScript.Services.Formatting.TextSnapshot(scriptText); - - var manager = new TypeScript.Services.Formatting.FormattingManager(syntaxTree, textSnapshot, formattingRulesProvider, options); - - return manager; - } - function getFormattingEditsForRange(fileName: string, start: number, end: number, options: FormatCodeOptions): TextChange[] { fileName = normalizeSlashes(fileName); - - var manager = getFormattingManager(fileName, options); - return manager.formatSelection(start, end); + var sourceFile = getCurrentSourceFile(fileName); + return formatting.formatSelection(start, end, sourceFile, getRuleProvider(options), options); } function getFormattingEditsForDocument(fileName: string, options: FormatCodeOptions): TextChange[] { fileName = normalizeSlashes(fileName); - var manager = getFormattingManager(fileName, options); - return manager.formatDocument(); + var sourceFile = getCurrentSourceFile(fileName); + return formatting.formatDocument(sourceFile, getRuleProvider(options), options); } function getFormattingEditsAfterKeystroke(fileName: string, position: number, key: string, options: FormatCodeOptions): TextChange[] { fileName = normalizeSlashes(fileName); - var manager = getFormattingManager(fileName, options); + var sourceFile = getCurrentSourceFile(fileName); if (key === "}") { - return manager.formatOnClosingCurlyBrace(position); + return formatting.formatOnClosingCurly(position, sourceFile, getRuleProvider(options), options); } else if (key === ";") { - return manager.formatOnSemicolon(position); + return formatting.formatOnSemicolon(position, sourceFile, getRuleProvider(options), options); } else if (key === "\n") { - return manager.formatOnEnter(position); + return formatting.formatOnEnter(position, sourceFile, getRuleProvider(options), options); } return []; @@ -5409,9 +5371,9 @@ module ts { } function isLetterOrDigit(char: number): boolean { - return (char >= TypeScript.CharacterCodes.a && char <= TypeScript.CharacterCodes.z) || - (char >= TypeScript.CharacterCodes.A && char <= TypeScript.CharacterCodes.Z) || - (char >= TypeScript.CharacterCodes._0 && char <= TypeScript.CharacterCodes._9); + return (char >= CharacterCodes.a && char <= CharacterCodes.z) || + (char >= CharacterCodes.A && char <= CharacterCodes.Z) || + (char >= CharacterCodes._0 && char <= CharacterCodes._9); } } @@ -5434,7 +5396,7 @@ module ts { if (kind) { return getRenameInfo(symbol.name, typeInfoResolver.getFullyQualifiedName(symbol), kind, getSymbolModifiers(symbol), - new TypeScript.TextSpan(node.getStart(), node.getWidth())); + new TextSpan(node.getStart(), node.getWidth())); } } } @@ -5453,50 +5415,49 @@ module ts { }; } - function getRenameInfo(displayName: string, fullDisplayName: string, kind: string, kindModifiers: string, triggerSpan: TypeScript.TextSpan): RenameInfo { + function getRenameInfo(displayName: string, fullDisplayName: string, kind: string, kindModifiers: string, triggerSpan: TextSpan): RenameInfo { return { canRename: true, localizedErrorMessage: undefined, - displayName: displayName, - fullDisplayName: fullDisplayName, - kind: kind, - kindModifiers: kindModifiers, - triggerSpan: triggerSpan + displayName, + fullDisplayName, + kind, + kindModifiers, + triggerSpan }; } } return { - dispose: dispose, - cleanupSemanticCache: cleanupSemanticCache, - getSyntacticDiagnostics: getSyntacticDiagnostics, - getSemanticDiagnostics: getSemanticDiagnostics, - getCompilerOptionsDiagnostics: getCompilerOptionsDiagnostics, - getSyntacticClassifications: getSyntacticClassifications, - getSemanticClassifications: getSemanticClassifications, - getCompletionsAtPosition: getCompletionsAtPosition, - getCompletionEntryDetails: getCompletionEntryDetails, - getSignatureHelpItems: getSignatureHelpItems, - getQuickInfoAtPosition: getQuickInfoAtPosition, - getDefinitionAtPosition: getDefinitionAtPosition, - getReferencesAtPosition: getReferencesAtPosition, - getOccurrencesAtPosition: getOccurrencesAtPosition, - getImplementorsAtPosition: (filename, position) => [], - getNameOrDottedNameSpan: getNameOrDottedNameSpan, - getBreakpointStatementAtPosition: getBreakpointStatementAtPosition, - getNavigateToItems: getNavigateToItems, - getRenameInfo: getRenameInfo, - findRenameLocations: findRenameLocations, - getNavigationBarItems: getNavigationBarItems, - getOutliningSpans: getOutliningSpans, - getTodoComments: getTodoComments, - getBraceMatchingAtPosition: getBraceMatchingAtPosition, - getIndentationAtPosition: getIndentationAtPosition, - getFormattingEditsForRange: getFormattingEditsForRange, - getFormattingEditsForDocument: getFormattingEditsForDocument, - getFormattingEditsAfterKeystroke: getFormattingEditsAfterKeystroke, - getEmitOutput: getEmitOutput, - getSignatureAtPosition: getSignatureAtPosition, + dispose, + cleanupSemanticCache, + getSyntacticDiagnostics, + getSemanticDiagnostics, + getCompilerOptionsDiagnostics, + getSyntacticClassifications, + getSemanticClassifications, + getCompletionsAtPosition, + getCompletionEntryDetails, + getSignatureHelpItems, + getQuickInfoAtPosition, + getDefinitionAtPosition, + getReferencesAtPosition, + getOccurrencesAtPosition, + getNameOrDottedNameSpan, + getBreakpointStatementAtPosition, + getNavigateToItems, + getRenameInfo, + findRenameLocations, + getNavigationBarItems, + getOutliningSpans, + getTodoComments, + getBraceMatchingAtPosition, + getIndentationAtPosition, + getFormattingEditsForRange, + getFormattingEditsForDocument, + getFormattingEditsAfterKeystroke, + getEmitOutput, + getSignatureAtPosition, }; } @@ -5794,9 +5755,7 @@ module ts { } } - return { - getClassificationsForLine: getClassificationsForLine - }; + return { getClassificationsForLine }; } function initializeServices() { diff --git a/src/services/shims.ts b/src/services/shims.ts index 00acff3798a..a355ddafab2 100644 --- a/src/services/shims.ts +++ b/src/services/shims.ts @@ -15,8 +15,6 @@ /// -/// - var debugObjectHost = (this); module ts { @@ -135,12 +133,6 @@ module ts { */ getOccurrencesAtPosition(fileName: string, position: number): string; - /** - * Returns a JSON-encoded value of the type: - * { fileName: string; textSpan: { start: number; length: number}; isWriteAccess: boolean }[] - */ - getImplementorsAtPosition(fileName: string, position: number): string; - /** * Returns a JSON-encoded value of the type: * { name: string; kind: string; kindModifiers: string; containerName: string; containerKind: string; matchKind: string; fileName: string; textSpan: { start: number; length: number}; } [] = []; @@ -176,7 +168,7 @@ module ts { } export interface CoreServicesShim extends Shim { - getPreProcessedFileInfo(fileName: string, sourceText: TypeScript.IScriptSnapshot): string; + getPreProcessedFileInfo(fileName: string, sourceText: IScriptSnapshot): string; getDefaultCompilationSettings(): string; } @@ -309,7 +301,7 @@ module ts { logger.log("*INTERNAL ERROR* - Exception in typescript services: " + err.message); } - class ScriptSnapshotShimAdapter implements TypeScript.IScriptSnapshot { + class ScriptSnapshotShimAdapter implements IScriptSnapshot { private lineStartPositions: number[] = null; constructor(private scriptSnapshotShim: ScriptSnapshotShim) { @@ -331,7 +323,7 @@ module ts { return this.lineStartPositions; } - public getChangeRange(oldSnapshot: TypeScript.IScriptSnapshot): TypeScript.TextChangeRange { + public getChangeRange(oldSnapshot: IScriptSnapshot): TextChangeRange { var oldSnapshotShim = oldSnapshot; var encoded = this.scriptSnapshotShim.getChangeRange(oldSnapshotShim.scriptSnapshotShim); if (encoded == null) { @@ -339,8 +331,8 @@ module ts { } var decoded: { span: { start: number; length: number; }; newLength: number; } = JSON.parse(encoded); - return new TypeScript.TextChangeRange( - new TypeScript.TextSpan(decoded.span.start, decoded.span.length), decoded.newLength); + return new TextChangeRange( + new TextSpan(decoded.span.start, decoded.span.length), decoded.newLength); } } @@ -368,7 +360,7 @@ module ts { return JSON.parse(encoded); } - public getScriptSnapshot(fileName: string): TypeScript.IScriptSnapshot { + public getScriptSnapshot(fileName: string): IScriptSnapshot { return new ScriptSnapshotShimAdapter(this.shimHost.getScriptSnapshot(fileName)); } @@ -521,7 +513,7 @@ module ts { return this.forwardJSONCall( "getSyntacticClassifications('" + fileName + "', " + start + ", " + length + ")", () => { - var classifications = this.languageService.getSyntacticClassifications(fileName, new TypeScript.TextSpan(start, length)); + var classifications = this.languageService.getSyntacticClassifications(fileName, new TextSpan(start, length)); return classifications; }); } @@ -530,7 +522,7 @@ module ts { return this.forwardJSONCall( "getSemanticClassifications('" + fileName + "', " + start + ", " + length + ")", () => { - var classifications = this.languageService.getSemanticClassifications(fileName, new TypeScript.TextSpan(start, length)); + var classifications = this.languageService.getSemanticClassifications(fileName, new TextSpan(start, length)); return classifications; }); } @@ -698,16 +690,6 @@ module ts { }); } - /// GET IMPLEMENTORS - public getImplementorsAtPosition(fileName: string, position: number): string { - return this.forwardJSONCall( - "getImplementorsAtPosition('" + fileName + "', " + position + ")", - () => { - return this.languageService.getImplementorsAtPosition(fileName, position); - }); - } - - /// COMPLETION LISTS /** @@ -845,7 +827,7 @@ module ts { return forwardJSONCall(this.logger, actionDescription, action); } - public getPreProcessedFileInfo(fileName: string, sourceTextSnapshot: TypeScript.IScriptSnapshot): string { + public getPreProcessedFileInfo(fileName: string, sourceTextSnapshot: IScriptSnapshot): string { return this.forwardJSONCall( "getPreProcessedFileInfo('" + fileName + "')", () => { @@ -938,7 +920,7 @@ module ts { } } - throw TypeScript.Errors.invalidOperation(); + throw new Error("Invalid operation"); } } } diff --git a/src/services/signatureHelp.ts b/src/services/signatureHelp.ts index 41f64c1b8db..7d063ae069d 100644 --- a/src/services/signatureHelp.ts +++ b/src/services/signatureHelp.ts @@ -221,7 +221,7 @@ module ts.SignatureHelp { var list = getChildListThatStartsWithOpenerToken(parent, node, sourceFile); Debug.assert(list !== undefined); return { - list: list, + list, listItemIndex: 0 }; } @@ -303,40 +303,40 @@ module ts.SignatureHelp { var callTargetDisplayParts = callTargetSymbol && symbolToDisplayParts(typeInfoResolver, callTargetSymbol, /*enclosingDeclaration*/ undefined, /*meaning*/ undefined); var items: SignatureHelpItem[] = map(candidates, candidateSignature => { var signatureHelpParameters: SignatureHelpParameter[]; - var prefixParts: SymbolDisplayPart[] = []; - var suffixParts: SymbolDisplayPart[] = []; + var prefixDisplayParts: SymbolDisplayPart[] = []; + var suffixDisplayParts: SymbolDisplayPart[] = []; if (callTargetDisplayParts) { - prefixParts.push.apply(prefixParts, callTargetDisplayParts); + prefixDisplayParts.push.apply(prefixDisplayParts, callTargetDisplayParts); } if (isTypeParameterHelp) { - prefixParts.push(punctuationPart(SyntaxKind.LessThanToken)); + prefixDisplayParts.push(punctuationPart(SyntaxKind.LessThanToken)); var typeParameters = candidateSignature.typeParameters; signatureHelpParameters = typeParameters && typeParameters.length > 0 ? map(typeParameters, createSignatureHelpParameterForTypeParameter) : emptyArray; - suffixParts.push(punctuationPart(SyntaxKind.GreaterThanToken)); + suffixDisplayParts.push(punctuationPart(SyntaxKind.GreaterThanToken)); var parameterParts = mapToDisplayParts(writer => typeInfoResolver.getSymbolDisplayBuilder().buildDisplayForParametersAndDelimiters(candidateSignature.parameters, writer, argumentListOrTypeArgumentList)); - suffixParts.push.apply(suffixParts, parameterParts); + suffixDisplayParts.push.apply(suffixDisplayParts, parameterParts); } else { var typeParameterParts = mapToDisplayParts(writer => typeInfoResolver.getSymbolDisplayBuilder().buildDisplayForTypeParametersAndDelimiters(candidateSignature.typeParameters, writer, argumentListOrTypeArgumentList)); - prefixParts.push.apply(prefixParts, typeParameterParts); - prefixParts.push(punctuationPart(SyntaxKind.OpenParenToken)); + prefixDisplayParts.push.apply(prefixDisplayParts, typeParameterParts); + prefixDisplayParts.push(punctuationPart(SyntaxKind.OpenParenToken)); var parameters = candidateSignature.parameters; signatureHelpParameters = parameters.length > 0 ? map(parameters, createSignatureHelpParameterForParameter) : emptyArray; - suffixParts.push(punctuationPart(SyntaxKind.CloseParenToken)); + suffixDisplayParts.push(punctuationPart(SyntaxKind.CloseParenToken)); } var returnTypeParts = mapToDisplayParts(writer => typeInfoResolver.getSymbolDisplayBuilder().buildReturnTypeDisplay(candidateSignature, writer, argumentListOrTypeArgumentList)); - suffixParts.push.apply(suffixParts, returnTypeParts); + suffixDisplayParts.push.apply(suffixDisplayParts, returnTypeParts); return { isVariadic: candidateSignature.hasRestParameter, - prefixDisplayParts: prefixParts, - suffixDisplayParts: suffixParts, + prefixDisplayParts, + suffixDisplayParts, separatorDisplayParts: [punctuationPart(SyntaxKind.CommaToken), spacePart()], parameters: signatureHelpParameters, documentation: candidateSignature.getDocumentationComment() @@ -353,7 +353,7 @@ module ts.SignatureHelp { // but not including parentheses) var applicableSpanStart = argumentListOrTypeArgumentList.getFullStart(); var applicableSpanEnd = skipTrivia(sourceFile.text, argumentListOrTypeArgumentList.end, /*stopAfterLineBreak*/ false); - var applicableSpan = new TypeScript.TextSpan(applicableSpanStart, applicableSpanEnd - applicableSpanStart); + var applicableSpan = new TextSpan(applicableSpanStart, applicableSpanEnd - applicableSpanStart); // The listItemIndex we got back includes commas. Our goal is to return the index of the proper // item (not including commas). Here are some examples: @@ -378,11 +378,11 @@ module ts.SignatureHelp { } return { - items: items, - applicableSpan: applicableSpan, - selectedItemIndex: selectedItemIndex, - argumentIndex: argumentIndex, - argumentCount: argumentCount + items, + applicableSpan, + selectedItemIndex, + argumentIndex, + argumentCount }; function createSignatureHelpParameterForParameter(parameter: Symbol): SignatureHelpParameter { @@ -394,8 +394,8 @@ module ts.SignatureHelp { return { name: parameter.name, documentation: parameter.getDocumentationComment(), - displayParts: displayParts, - isOptional: isOptional + displayParts, + isOptional }; } @@ -406,7 +406,7 @@ module ts.SignatureHelp { return { name: typeParameter.symbol.name, documentation: emptyArray, - displayParts: displayParts, + displayParts, isOptional: false }; } diff --git a/src/services/formatting/smartIndenter.ts b/src/services/smartIndenter.ts similarity index 67% rename from src/services/formatting/smartIndenter.ts rename to src/services/smartIndenter.ts index 029df425045..e593c6cfd66 100644 --- a/src/services/formatting/smartIndenter.ts +++ b/src/services/smartIndenter.ts @@ -1,8 +1,8 @@ -/// +/// module ts.formatting { export module SmartIndenter { - export function getIndentation(position: number, sourceFile: SourceFile, options: TypeScript.FormattingOptions): number { + export function getIndentation(position: number, sourceFile: SourceFile, options: EditorOptions): number { if (position > sourceFile.text.length) { return 0; // past EOF } @@ -13,8 +13,8 @@ module ts.formatting { } // no indentation in string \regex literals - if ((precedingToken.kind === SyntaxKind.StringLiteral || precedingToken.kind === SyntaxKind.RegularExpressionLiteral) && - precedingToken.getStart(sourceFile) <= position && + if ((precedingToken.kind === SyntaxKind.StringLiteral || precedingToken.kind === SyntaxKind.RegularExpressionLiteral) && + precedingToken.getStart(sourceFile) <= position && precedingToken.end > position) { return 0; } @@ -37,14 +37,14 @@ module ts.formatting { var indentationDelta: number; while (current) { - if (positionBelongsToNode(current, position, sourceFile) && nodeContentIsIndented(current, previous)) { + if (positionBelongsToNode(current, position, sourceFile) && shouldIndentChildNode(current.kind, previous ? previous.kind : SyntaxKind.Unknown)) { currentStart = getStartLineAndCharacterForNode(current, sourceFile); if (nextTokenIsCurlyBraceOnSameLineAsCursor(precedingToken, current, lineAtPosition, sourceFile)) { indentationDelta = 0; } else { - indentationDelta = lineAtPosition !== currentStart.line ? options.indentSpaces : 0; + indentationDelta = lineAtPosition !== currentStart.line ? options.IndentSize : 0; } break; @@ -59,12 +59,27 @@ module ts.formatting { previous = current; current = current.parent; } - + if (!current) { // no parent was found - return 0 to be indented on the level of SourceFile return 0; } + return getIndentationForNodeWorker(current, currentStart, /*ignoreActualIndentationRange*/ undefined, indentationDelta, sourceFile, options); + } + + export function getIndentationForNode(n: Node, ignoreActualIndentationRange: TextRange, sourceFile: SourceFile, options: FormatCodeOptions): number { + var start = sourceFile.getLineAndCharacterFromPosition(n.getStart(sourceFile)); + return getIndentationForNodeWorker(n, start, ignoreActualIndentationRange, /*indentationDelta*/ 0, sourceFile, options); + } + + function getIndentationForNodeWorker( + current: Node, + currentStart: LineAndCharacter, + ignoreActualIndentationRange: TextRange, + indentationDelta: number, + sourceFile: SourceFile, + options: EditorOptions): number { var parent: Node = current.parent; var parentStart: LineAndCharacter; @@ -72,26 +87,35 @@ module ts.formatting { // walk upwards and collect indentations for pairs of parent-child nodes // indentation is not added if parent and child nodes start on the same line or if parent is IfStatement and child starts on the same line with 'else clause' while (parent) { - // check if current node is a list item - if yes, take indentation from it - var actualIndentation = getActualIndentationForListItem(current, sourceFile, options); - if (actualIndentation !== -1) { - return actualIndentation + indentationDelta; + var useActualIndentation = true; + if (ignoreActualIndentationRange) { + var start = current.getStart(sourceFile); + useActualIndentation = start < ignoreActualIndentationRange.pos || start > ignoreActualIndentationRange.end; } - parentStart = sourceFile.getLineAndCharacterFromPosition(parent.getStart(sourceFile)); - var parentAndChildShareLine = - parentStart.line === currentStart.line || + if (useActualIndentation) { + // check if current node is a list item - if yes, take indentation from it + var actualIndentation = getActualIndentationForListItem(current, sourceFile, options); + if (actualIndentation !== -1) { + return actualIndentation + indentationDelta; + } + } + parentStart = getParentStart(parent, current, sourceFile); + var parentAndChildShareLine = + parentStart.line === currentStart.line || childStartsOnTheSameLineWithElseInIfStatement(parent, current, currentStart.line, sourceFile); - // try to fetch actual indentation for current node from source text - var actualIndentation = getActualIndentationForNode(current, parent, currentStart, parentAndChildShareLine, sourceFile, options); - if (actualIndentation !== -1) { - return actualIndentation + indentationDelta; + if (useActualIndentation) { + // try to fetch actual indentation for current node from source text + var actualIndentation = getActualIndentationForNode(current, parent, currentStart, parentAndChildShareLine, sourceFile, options); + if (actualIndentation !== -1) { + return actualIndentation + indentationDelta; + } } // increase indentation if parent node wants its content to be indented and parent and child nodes don't start on the same line - if (nodeContentIsIndented(parent, current) && !parentAndChildShareLine) { - indentationDelta += options.indentSpaces; + if (shouldIndentChildNode(parent.kind, current.kind) && !parentAndChildShareLine) { + indentationDelta += options.IndentSize; } current = parent; @@ -102,10 +126,20 @@ module ts.formatting { return indentationDelta; } + + function getParentStart(parent: Node, child: Node, sourceFile: SourceFile): LineAndCharacter { + var containingList = getContainingList(child, sourceFile); + if (containingList) { + return sourceFile.getLineAndCharacterFromPosition(containingList.pos); + } + + return sourceFile.getLineAndCharacterFromPosition(parent.getStart(sourceFile)); + } + /* * Function returns -1 if indentation cannot be determined - */ - function getActualIndentationForListItemBeforeComma(commaToken: Node, sourceFile: SourceFile, options: TypeScript.FormattingOptions): number { + */ + function getActualIndentationForListItemBeforeComma(commaToken: Node, sourceFile: SourceFile, options: EditorOptions): number { // previous token is comma that separates items in list - find the previous item and try to derive indentation from it var commaItemInfo = findListItemInfo(commaToken); Debug.assert(commaItemInfo && commaItemInfo.listItemIndex > 0); @@ -116,20 +150,20 @@ module ts.formatting { /* * Function returns -1 if actual indentation for node should not be used (i.e because node is nested expression) */ - function getActualIndentationForNode(current: Node, - parent: Node, - currentLineAndChar: LineAndCharacter, - parentAndChildShareLine: boolean, - sourceFile: SourceFile, - options: TypeScript.FormattingOptions): number { + function getActualIndentationForNode(current: Node, + parent: Node, + currentLineAndChar: LineAndCharacter, + parentAndChildShareLine: boolean, + sourceFile: SourceFile, + options: EditorOptions): number { // actual indentation is used for statements\declarations if one of cases below is true: // - parent is SourceFile - by default immediate children of SourceFile are not indented except when user indents them manually // - parent and child are not on the same line - var useActualIndentation = + var useActualIndentation = (isDeclaration(current) || isStatement(current)) && (parent.kind === SyntaxKind.SourceFile || !parentAndChildShareLine); - + if (!useActualIndentation) { return -1; } @@ -142,7 +176,7 @@ module ts.formatting { if (!nextToken) { return false; } - + if (nextToken.kind === SyntaxKind.OpenBraceToken) { // open braces are always indented at the parent level return true; @@ -172,52 +206,65 @@ module ts.formatting { return candidate.end > position || !isCompletedNode(candidate, sourceFile); } - function childStartsOnTheSameLineWithElseInIfStatement(parent: Node, child: Node, childStartLine: number, sourceFile: SourceFile): boolean { + export function childStartsOnTheSameLineWithElseInIfStatement(parent: Node, child: TextRangeWithKind, childStartLine: number, sourceFile: SourceFile): boolean { if (parent.kind === SyntaxKind.IfStatement && (parent).elseStatement === child) { var elseKeyword = findChildOfKind(parent, SyntaxKind.ElseKeyword, sourceFile); Debug.assert(elseKeyword !== undefined); - var elseKeywordStartLine = getStartLineAndCharacterForNode(elseKeyword, sourceFile).line; + var elseKeywordStartLine = getStartLineAndCharacterForNode(elseKeyword, sourceFile).line; return elseKeywordStartLine === childStartLine; } + + return false; } - function getActualIndentationForListItem(node: Node, sourceFile: SourceFile, options: TypeScript.FormattingOptions): number { + function getContainingList(node: Node, sourceFile: SourceFile): NodeArray { if (node.parent) { switch (node.parent.kind) { case SyntaxKind.TypeReference: - if ((node.parent).typeArguments) { - return getActualIndentationFromList((node.parent).typeArguments); + if ((node.parent).typeArguments && + rangeContainsStartEnd((node.parent).typeArguments, node.getStart(sourceFile), node.getEnd())) { + return (node.parent).typeArguments; } break; case SyntaxKind.ObjectLiteral: - return getActualIndentationFromList((node.parent).properties); - case SyntaxKind.TypeLiteral: - return getActualIndentationFromList((node.parent).members); + return (node.parent).properties; case SyntaxKind.ArrayLiteral: - return getActualIndentationFromList((node.parent).elements); + return (node.parent).elements; case SyntaxKind.FunctionDeclaration: case SyntaxKind.FunctionExpression: case SyntaxKind.ArrowFunction: case SyntaxKind.Method: case SyntaxKind.CallSignature: case SyntaxKind.ConstructSignature: - if ((node.parent).typeParameters && node.end < (node.parent).typeParameters.end) { - return getActualIndentationFromList((node.parent).typeParameters); + var start = node.getStart(sourceFile); + if ((node.parent).typeParameters && + rangeContainsStartEnd((node.parent).typeParameters, start, node.getEnd())) { + return (node.parent).typeParameters; } - - return getActualIndentationFromList((node.parent).parameters); + if (rangeContainsStartEnd((node.parent).parameters, start, node.getEnd())) { + return (node.parent).parameters; + } + break; case SyntaxKind.NewExpression: case SyntaxKind.CallExpression: - if ((node.parent).typeArguments && node.end < (node.parent).typeArguments.end) { - return getActualIndentationFromList((node.parent).typeArguments); + var start = node.getStart(sourceFile); + if ((node.parent).typeArguments && + rangeContainsStartEnd((node.parent).typeArguments, start, node.getEnd())) { + return (node.parent).typeArguments; } - - return getActualIndentationFromList((node.parent).arguments); + if (rangeContainsStartEnd((node.parent).arguments, start, node.getEnd())) { + return (node.parent).arguments; + } + break; } } + return undefined; + } - return -1; + function getActualIndentationForListItem(node: Node, sourceFile: SourceFile, options: EditorOptions): number { + var containingList = getContainingList(node, sourceFile); + return containingList ? getActualIndentationFromList(containingList) : -1; function getActualIndentationFromList(list: Node[]): number { var index = indexOf(list, node); @@ -226,13 +273,13 @@ module ts.formatting { } - function deriveActualIndentationFromList(list: Node[], index: number, sourceFile: SourceFile, options: TypeScript.FormattingOptions): number { + function deriveActualIndentationFromList(list: Node[], index: number, sourceFile: SourceFile, options: EditorOptions): number { Debug.assert(index >= 0 && index < list.length); var node = list[index]; // walk toward the start of the list starting from current node and check if the line is the same for all items. // if end line for item [i - 1] differs from the start line for item [i] - find column of the first non-whitespace character on the line of item [i] - var lineAndCharacter = getStartLineAndCharacterForNode(node, sourceFile); + var lineAndCharacter = getStartLineAndCharacterForNode(node, sourceFile); for (var i = index - 1; i >= 0; --i) { if (list[i].kind === SyntaxKind.CommaToken) { continue; @@ -248,53 +295,34 @@ module ts.formatting { return -1; } - function findColumnForFirstNonWhitespaceCharacterInLine(lineAndCharacter: LineAndCharacter, sourceFile: SourceFile, options: TypeScript.FormattingOptions): number { + function findColumnForFirstNonWhitespaceCharacterInLine(lineAndCharacter: LineAndCharacter, sourceFile: SourceFile, options: EditorOptions): number { var lineStart = sourceFile.getPositionFromLineAndCharacter(lineAndCharacter.line, 1); + return findFirstNonWhitespaceColumn(lineStart, lineStart + lineAndCharacter.character, sourceFile, options); + } + + export function findFirstNonWhitespaceColumn(startPos: number, endPos: number, sourceFile: SourceFile, options: EditorOptions): number { var column = 0; - for (var i = 0; i < lineAndCharacter.character; ++i) { - var charCode = sourceFile.text.charCodeAt(lineStart + i); - if (!isWhiteSpace(charCode)) { + for (var pos = startPos; pos < endPos; ++pos) { + var ch = sourceFile.text.charCodeAt(pos); + if (!isWhiteSpace(ch)) { return column; } - if (charCode === CharacterCodes.tab) { - column += options.spacesPerTab; + if (ch === CharacterCodes.tab) { + column += options.TabSize + (column % options.TabSize); } else { column++; } } - return column; } - function nodeContentIsIndented(parent: Node, child: Node): boolean { - switch (parent.kind) { + function nodeContentIsAlwaysIndented(kind: SyntaxKind): boolean { + switch (kind) { case SyntaxKind.ClassDeclaration: case SyntaxKind.InterfaceDeclaration: case SyntaxKind.EnumDeclaration: - return true; - case SyntaxKind.ModuleDeclaration: - // ModuleBlock should take care of indentation - return false; - case SyntaxKind.FunctionDeclaration: - case SyntaxKind.Method: - case SyntaxKind.FunctionExpression: - case SyntaxKind.GetAccessor: - case SyntaxKind.SetAccessor: - case SyntaxKind.Constructor: - // FunctionBlock should take care of indentation - return false; - case SyntaxKind.DoStatement: - case SyntaxKind.WhileStatement: - case SyntaxKind.ForInStatement: - case SyntaxKind.ForStatement: - return child && child.kind !== SyntaxKind.Block; - case SyntaxKind.IfStatement: - return child && child.kind !== SyntaxKind.Block; - case SyntaxKind.TryStatement: - // TryBlock\CatchBlock\FinallyBlock should take care of indentation - return false; case SyntaxKind.ArrayLiteral: case SyntaxKind.Block: case SyntaxKind.FunctionBlock: @@ -312,7 +340,32 @@ module ts.formatting { case SyntaxKind.NewExpression: case SyntaxKind.VariableStatement: case SyntaxKind.VariableDeclaration: + case SyntaxKind.ExportAssignment: + case SyntaxKind.ReturnStatement: return true; + } + return false; + } + + export function shouldIndentChildNode(parent: SyntaxKind, child: SyntaxKind): boolean { + if (nodeContentIsAlwaysIndented(parent)) { + return true; + } + switch (parent) { + case SyntaxKind.DoStatement: + case SyntaxKind.WhileStatement: + case SyntaxKind.ForInStatement: + case SyntaxKind.ForStatement: + case SyntaxKind.IfStatement: + return child !== SyntaxKind.Block; + case SyntaxKind.FunctionDeclaration: + case SyntaxKind.FunctionExpression: + case SyntaxKind.Method: + case SyntaxKind.ArrowFunction: + case SyntaxKind.Constructor: + case SyntaxKind.GetAccessor: + case SyntaxKind.SetAccessor: + return child !== SyntaxKind.FunctionBlock; default: return false; } @@ -368,7 +421,7 @@ module ts.formatting { if ((n).elseStatement) { return isCompletedNode((n).elseStatement, sourceFile); } - return isCompletedNode((n).thenStatement, sourceFile); + return isCompletedNode((n).thenStatement, sourceFile); case SyntaxKind.ExpressionStatement: return isCompletedNode((n).expression, sourceFile); case SyntaxKind.ArrayLiteral: @@ -384,10 +437,10 @@ module ts.formatting { case SyntaxKind.DoStatement: // rough approximation: if DoStatement has While keyword - then if node is completed is checking the presence of ')'; var hasWhileKeyword = findChildOfKind(n, SyntaxKind.WhileKeyword, sourceFile); - if(hasWhileKeyword) { + if (hasWhileKeyword) { return nodeEndsWith(n, SyntaxKind.CloseParenToken, sourceFile); } - return isCompletedNode((n).statement, sourceFile); + return isCompletedNode((n).statement, sourceFile); default: return true; } diff --git a/src/services/syntax/SyntaxGenerator.js b/src/services/syntax/SyntaxGenerator.js index 93d47e209b5..0937947c80f 100644 --- a/src/services/syntax/SyntaxGenerator.js +++ b/src/services/syntax/SyntaxGenerator.js @@ -599,30 +599,31 @@ var TypeScript; SyntaxKind[SyntaxKind["OmittedExpression"] = 187] = "OmittedExpression"; SyntaxKind[SyntaxKind["TemplateExpression"] = 188] = "TemplateExpression"; SyntaxKind[SyntaxKind["TemplateAccessExpression"] = 189] = "TemplateAccessExpression"; - SyntaxKind[SyntaxKind["VariableDeclaration"] = 190] = "VariableDeclaration"; - SyntaxKind[SyntaxKind["VariableDeclarator"] = 191] = "VariableDeclarator"; - SyntaxKind[SyntaxKind["ArgumentList"] = 192] = "ArgumentList"; - SyntaxKind[SyntaxKind["ParameterList"] = 193] = "ParameterList"; - SyntaxKind[SyntaxKind["TypeArgumentList"] = 194] = "TypeArgumentList"; - SyntaxKind[SyntaxKind["TypeParameterList"] = 195] = "TypeParameterList"; - SyntaxKind[SyntaxKind["HeritageClause"] = 196] = "HeritageClause"; - SyntaxKind[SyntaxKind["EqualsValueClause"] = 197] = "EqualsValueClause"; - SyntaxKind[SyntaxKind["CaseSwitchClause"] = 198] = "CaseSwitchClause"; - SyntaxKind[SyntaxKind["DefaultSwitchClause"] = 199] = "DefaultSwitchClause"; - SyntaxKind[SyntaxKind["ElseClause"] = 200] = "ElseClause"; - SyntaxKind[SyntaxKind["CatchClause"] = 201] = "CatchClause"; - SyntaxKind[SyntaxKind["FinallyClause"] = 202] = "FinallyClause"; - SyntaxKind[SyntaxKind["TemplateClause"] = 203] = "TemplateClause"; - SyntaxKind[SyntaxKind["TypeParameter"] = 204] = "TypeParameter"; - SyntaxKind[SyntaxKind["Constraint"] = 205] = "Constraint"; - SyntaxKind[SyntaxKind["SimplePropertyAssignment"] = 206] = "SimplePropertyAssignment"; - SyntaxKind[SyntaxKind["FunctionPropertyAssignment"] = 207] = "FunctionPropertyAssignment"; - SyntaxKind[SyntaxKind["Parameter"] = 208] = "Parameter"; - SyntaxKind[SyntaxKind["EnumElement"] = 209] = "EnumElement"; - SyntaxKind[SyntaxKind["TypeAnnotation"] = 210] = "TypeAnnotation"; - SyntaxKind[SyntaxKind["ComputedPropertyName"] = 211] = "ComputedPropertyName"; - SyntaxKind[SyntaxKind["ExternalModuleReference"] = 212] = "ExternalModuleReference"; - SyntaxKind[SyntaxKind["ModuleNameModuleReference"] = 213] = "ModuleNameModuleReference"; + SyntaxKind[SyntaxKind["YieldExpression"] = 190] = "YieldExpression"; + SyntaxKind[SyntaxKind["VariableDeclaration"] = 191] = "VariableDeclaration"; + SyntaxKind[SyntaxKind["VariableDeclarator"] = 192] = "VariableDeclarator"; + SyntaxKind[SyntaxKind["ArgumentList"] = 193] = "ArgumentList"; + SyntaxKind[SyntaxKind["ParameterList"] = 194] = "ParameterList"; + SyntaxKind[SyntaxKind["TypeArgumentList"] = 195] = "TypeArgumentList"; + SyntaxKind[SyntaxKind["TypeParameterList"] = 196] = "TypeParameterList"; + SyntaxKind[SyntaxKind["HeritageClause"] = 197] = "HeritageClause"; + SyntaxKind[SyntaxKind["EqualsValueClause"] = 198] = "EqualsValueClause"; + SyntaxKind[SyntaxKind["CaseSwitchClause"] = 199] = "CaseSwitchClause"; + SyntaxKind[SyntaxKind["DefaultSwitchClause"] = 200] = "DefaultSwitchClause"; + SyntaxKind[SyntaxKind["ElseClause"] = 201] = "ElseClause"; + SyntaxKind[SyntaxKind["CatchClause"] = 202] = "CatchClause"; + SyntaxKind[SyntaxKind["FinallyClause"] = 203] = "FinallyClause"; + SyntaxKind[SyntaxKind["TemplateClause"] = 204] = "TemplateClause"; + SyntaxKind[SyntaxKind["TypeParameter"] = 205] = "TypeParameter"; + SyntaxKind[SyntaxKind["Constraint"] = 206] = "Constraint"; + SyntaxKind[SyntaxKind["SimplePropertyAssignment"] = 207] = "SimplePropertyAssignment"; + SyntaxKind[SyntaxKind["FunctionPropertyAssignment"] = 208] = "FunctionPropertyAssignment"; + SyntaxKind[SyntaxKind["Parameter"] = 209] = "Parameter"; + SyntaxKind[SyntaxKind["EnumElement"] = 210] = "EnumElement"; + SyntaxKind[SyntaxKind["TypeAnnotation"] = 211] = "TypeAnnotation"; + SyntaxKind[SyntaxKind["ComputedPropertyName"] = 212] = "ComputedPropertyName"; + SyntaxKind[SyntaxKind["ExternalModuleReference"] = 213] = "ExternalModuleReference"; + SyntaxKind[SyntaxKind["ModuleNameModuleReference"] = 214] = "ModuleNameModuleReference"; SyntaxKind[SyntaxKind["FirstStandardKeyword"] = SyntaxKind.BreakKeyword] = "FirstStandardKeyword"; SyntaxKind[SyntaxKind["LastStandardKeyword"] = SyntaxKind.WithKeyword] = "LastStandardKeyword"; SyntaxKind[SyntaxKind["FirstFutureReservedKeyword"] = SyntaxKind.ClassKeyword] = "FirstFutureReservedKeyword"; @@ -910,9 +911,9 @@ var definitions = [ baseType: 'ISyntaxNode', interfaces: ['IModuleReferenceSyntax'], children: [ - { name: 'requireKeyword', isToken: true, tokenKinds: ['RequireKeyword'], excludeFromAST: true }, + { name: 'requireKeyword', isToken: true, excludeFromAST: true }, { name: 'openParenToken', isToken: true, excludeFromAST: true }, - { name: 'stringLiteral', isToken: true, tokenKinds: ['StringLiteral'] }, + { name: 'stringLiteral', isToken: true }, { name: 'closeParenToken', isToken: true, excludeFromAST: true } ], isTypeScriptSpecific: true @@ -933,7 +934,7 @@ var definitions = [ children: [ { name: 'modifiers', isList: true, elementType: 'ISyntaxToken' }, { name: 'importKeyword', isToken: true, excludeFromAST: true }, - { name: 'identifier', isToken: true, tokenKinds: ['IdentifierName'] }, + { name: 'identifier', isToken: true }, { name: 'equalsToken', isToken: true, excludeFromAST: true }, { name: 'moduleReference', type: 'IModuleReferenceSyntax' }, { name: 'semicolonToken', isToken: true, isOptional: true, excludeFromAST: true } @@ -947,7 +948,7 @@ var definitions = [ children: [ { name: 'exportKeyword', isToken: true, excludeFromAST: true }, { name: 'equalsToken', isToken: true, excludeFromAST: true }, - { name: 'identifier', isToken: true, tokenKinds: ['IdentifierName'] }, + { name: 'identifier', isToken: true }, { name: 'semicolonToken', isToken: true, isOptional: true, excludeFromAST: true } ], isTypeScriptSpecific: true @@ -959,7 +960,7 @@ var definitions = [ children: [ { name: 'modifiers', isList: true, elementType: 'ISyntaxToken' }, { name: 'classKeyword', isToken: true, excludeFromAST: true }, - { name: 'identifier', isToken: true, tokenKinds: ['IdentifierName'] }, + { name: 'identifier', isToken: true }, { name: 'typeParameterList', type: 'TypeParameterListSyntax', isOptional: true }, { name: 'heritageClauses', isList: true, elementType: 'HeritageClauseSyntax' }, { name: 'openBraceToken', isToken: true, excludeFromAST: true }, @@ -975,7 +976,7 @@ var definitions = [ children: [ { name: 'modifiers', isList: true, elementType: 'ISyntaxToken' }, { name: 'interfaceKeyword', isToken: true, excludeFromAST: true }, - { name: 'identifier', isToken: true, tokenKinds: ['IdentifierName'] }, + { name: 'identifier', isToken: true }, { name: 'typeParameterList', type: 'TypeParameterListSyntax', isOptional: true }, { name: 'heritageClauses', isList: true, elementType: 'HeritageClauseSyntax' }, { name: 'body', type: 'ObjectTypeSyntax' } @@ -1012,7 +1013,8 @@ var definitions = [ children: [ { name: 'modifiers', isList: true, elementType: 'ISyntaxToken', isTypeScriptSpecific: true }, { name: 'functionKeyword', isToken: true, excludeFromAST: true }, - { name: 'identifier', isToken: true, tokenKinds: ['IdentifierName'] }, + { name: 'asterixToken', isToken: true, isOptional: true }, + { name: 'identifier', isToken: true }, { name: 'callSignature', type: 'CallSignatureSyntax' }, { name: 'body', type: 'BlockSyntax | ISyntaxToken', isOptional: true } ] @@ -1116,7 +1118,7 @@ var definitions = [ children: [ { name: 'left', type: 'INameSyntax' }, { name: 'dotToken', isToken: true, excludeFromAST: true }, - { name: 'right', isToken: true, tokenKinds: ['IdentifierName'] } + { name: 'right', isToken: true } ], isTypeScriptSpecific: true }, @@ -1255,7 +1257,7 @@ var definitions = [ children: [ { name: 'dotDotDotToken', isToken: true, isOptional: true, isTypeScriptSpecific: true }, { name: 'modifiers', isList: true, elementType: 'ISyntaxToken' }, - { name: 'identifier', isToken: true, tokenKinds: ['IdentifierName'] }, + { name: 'identifier', isToken: true }, { name: 'questionToken', isToken: true, isOptional: true, isTypeScriptSpecific: true }, { name: 'typeAnnotation', type: 'TypeAnnotationSyntax', isOptional: true, isTypeScriptSpecific: true }, { name: 'equalsValueClause', type: 'EqualsValueClauseSyntax', isOptional: true, isTypeScriptSpecific: true } @@ -1268,7 +1270,7 @@ var definitions = [ children: [ { name: 'expression', type: 'ILeftHandSideExpressionSyntax' }, { name: 'dotToken', isToken: true, excludeFromAST: true }, - { name: 'name', isToken: true, tokenKinds: ['IdentifierName'] } + { name: 'name', isToken: true } ] }, { @@ -1434,7 +1436,7 @@ var definitions = [ name: 'TypeParameterSyntax', baseType: 'ISyntaxNode', children: [ - { name: 'identifier', isToken: true, tokenKinds: ['IdentifierName'] }, + { name: 'identifier', isToken: true }, { name: 'constraint', type: 'ConstraintSyntax', isOptional: true } ], isTypeScriptSpecific: true @@ -1496,6 +1498,7 @@ var definitions = [ interfaces: ['IMemberDeclarationSyntax'], children: [ { name: 'modifiers', isList: true, elementType: 'ISyntaxToken' }, + { name: 'asterixToken', isToken: true, isOptional: true }, { name: 'propertyName', type: 'IPropertyNameSyntax' }, { name: 'callSignature', type: 'CallSignatureSyntax' }, { name: 'body', type: 'BlockSyntax | ISyntaxToken', isOptional: true } @@ -1620,7 +1623,7 @@ var definitions = [ interfaces: ['IStatementSyntax'], children: [ { name: 'breakKeyword', isToken: true }, - { name: 'identifier', isToken: true, isOptional: true, tokenKinds: ['IdentifierName'] }, + { name: 'identifier', isToken: true, isOptional: true }, { name: 'semicolonToken', isToken: true, isOptional: true, excludeFromAST: true } ] }, @@ -1630,7 +1633,7 @@ var definitions = [ interfaces: ['IStatementSyntax'], children: [ { name: 'continueKeyword', isToken: true }, - { name: 'identifier', isToken: true, isOptional: true, tokenKinds: ['IdentifierName'] }, + { name: 'identifier', isToken: true, isOptional: true }, { name: 'semicolonToken', isToken: true, isOptional: true, excludeFromAST: true } ] }, @@ -1642,9 +1645,9 @@ var definitions = [ { name: 'forKeyword', isToken: true, excludeFromAST: true }, { name: 'openParenToken', isToken: true, excludeFromAST: true }, { name: 'initializer', type: 'VariableDeclarationSyntax | IExpressionSyntax', isOptional: true }, - { name: 'firstSemicolonToken', isToken: true, tokenKinds: ['SemicolonToken'], excludeFromAST: true }, + { name: 'firstSemicolonToken', isToken: true, excludeFromAST: true }, { name: 'condition', type: 'IExpressionSyntax', isOptional: true }, - { name: 'secondSemicolonToken', isToken: true, tokenKinds: ['SemicolonToken'], excludeFromAST: true }, + { name: 'secondSemicolonToken', isToken: true, excludeFromAST: true }, { name: 'incrementor', type: 'IExpressionSyntax', isOptional: true }, { name: 'closeParenToken', isToken: true, excludeFromAST: true }, { name: 'statement', type: 'IStatementSyntax' } @@ -1695,7 +1698,7 @@ var definitions = [ children: [ { name: 'modifiers', isList: true, elementType: 'ISyntaxToken' }, { name: 'enumKeyword', isToken: true, excludeFromAST: true }, - { name: 'identifier', isToken: true, tokenKinds: ['IdentifierName'] }, + { name: 'identifier', isToken: true }, { name: 'openBraceToken', isToken: true, excludeFromAST: true }, { name: 'enumElements', isSeparatedList: true, elementType: 'EnumElementSyntax' }, { name: 'closeBraceToken', isToken: true, excludeFromAST: true } @@ -1757,6 +1760,7 @@ var definitions = [ baseType: 'ISyntaxNode', interfaces: ['IPropertyAssignmentSyntax'], children: [ + { name: 'asterixToken', isToken: true, isOptional: true }, { name: 'propertyName', type: 'IPropertyNameSyntax' }, { name: 'callSignature', type: 'CallSignatureSyntax' }, { name: 'block', type: 'BlockSyntax' } @@ -1768,7 +1772,8 @@ var definitions = [ interfaces: ['IPrimaryExpressionSyntax'], children: [ { name: 'functionKeyword', isToken: true, excludeFromAST: true }, - { name: 'identifier', isToken: true, isOptional: true, tokenKinds: ['IdentifierName'] }, + { name: 'asterixToken', isToken: true, isOptional: true }, + { name: 'identifier', isToken: true, isOptional: true }, { name: 'callSignature', type: 'CallSignatureSyntax' }, { name: 'block', type: 'BlockSyntax' } ] @@ -1798,7 +1803,7 @@ var definitions = [ children: [ { name: 'catchKeyword', isToken: true, excludeFromAST: true }, { name: 'openParenToken', isToken: true, excludeFromAST: true }, - { name: 'identifier', isToken: true, tokenKinds: ['IdentifierName'] }, + { name: 'identifier', isToken: true }, { name: 'typeAnnotation', type: 'TypeAnnotationSyntax', isOptional: true, isTypeScriptSpecified: true }, { name: 'closeParenToken', isToken: true, excludeFromAST: true }, { name: 'block', type: 'BlockSyntax' } @@ -1817,7 +1822,7 @@ var definitions = [ baseType: 'ISyntaxNode', interfaces: ['IStatementSyntax'], children: [ - { name: 'identifier', isToken: true, tokenKinds: ['IdentifierName'] }, + { name: 'identifier', isToken: true }, { name: 'colonToken', isToken: true, excludeFromAST: true }, { name: 'statement', type: 'IStatementSyntax' } ] @@ -1863,6 +1868,16 @@ var definitions = [ { name: 'expression', type: 'IUnaryExpressionSyntax' } ] }, + { + name: 'YieldExpressionSyntax', + baseType: 'ISyntaxNode', + interfaces: ['IExpressionSyntax'], + children: [ + { name: 'yieldKeyword', isToken: true }, + { name: 'asterixToken', isToken: true, isOptional: true }, + { name: 'expression', type: 'IExpressionSyntax', isOptional: true } + ] + }, { name: 'DebuggerStatementSyntax', baseType: 'ISyntaxNode', diff --git a/src/services/syntax/SyntaxGenerator.js.map b/src/services/syntax/SyntaxGenerator.js.map index 25ccc01b526..bd5d7bd6cb3 100644 --- a/src/services/syntax/SyntaxGenerator.js.map +++ b/src/services/syntax/SyntaxGenerator.js.map @@ -3,6 +3,9 @@ <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +<<<<<<< HEAD +<<<<<<< HEAD <<<<<<< Updated upstream {"version":3,"file":"SyntaxGenerator.js","sourceRoot":"","sources":["file:///C:/VSPro_1/src/typescript/public_cyrusn/src/compiler/sys.ts","file:///C:/VSPro_1/src/typescript/public_cyrusn/src/services/core/errors.ts","file:///C:/VSPro_1/src/typescript/public_cyrusn/src/services/core/arrayUtilities.ts","file:///C:/VSPro_1/src/typescript/public_cyrusn/src/services/core/stringUtilities.ts","file:///C:/VSPro_1/src/typescript/public_cyrusn/src/services/syntax/syntaxKind.ts","file:///C:/VSPro_1/src/typescript/public_cyrusn/src/services/syntax/syntaxFacts.ts","file:///C:/VSPro_1/src/typescript/public_cyrusn/src/services/syntax/SyntaxGenerator.ts"],"names":["getWScriptSystem","getWScriptSystem.readFile","getWScriptSystem.writeFile","getNodeSystem","getNodeSystem.readFile","getNodeSystem.writeFile","getNodeSystem.fileChanged","TypeScript","TypeScript.Errors","TypeScript.Errors.constructor","TypeScript.Errors.argument","TypeScript.Errors.argumentOutOfRange","TypeScript.Errors.argumentNull","TypeScript.Errors.abstract","TypeScript.Errors.notYetImplemented","TypeScript.Errors.invalidOperation","TypeScript.ArrayUtilities","TypeScript.ArrayUtilities.constructor","TypeScript.ArrayUtilities.sequenceEquals","TypeScript.ArrayUtilities.contains","TypeScript.ArrayUtilities.distinct","TypeScript.ArrayUtilities.last","TypeScript.ArrayUtilities.lastOrDefault","TypeScript.ArrayUtilities.firstOrDefault","TypeScript.ArrayUtilities.first","TypeScript.ArrayUtilities.sum","TypeScript.ArrayUtilities.select","TypeScript.ArrayUtilities.where","TypeScript.ArrayUtilities.any","TypeScript.ArrayUtilities.all","TypeScript.ArrayUtilities.binarySearch","TypeScript.ArrayUtilities.createArray","TypeScript.ArrayUtilities.grow","TypeScript.ArrayUtilities.copy","TypeScript.ArrayUtilities.indexOf","TypeScript.StringUtilities","TypeScript.StringUtilities.constructor","TypeScript.StringUtilities.isString","TypeScript.StringUtilities.endsWith","TypeScript.StringUtilities.startsWith","TypeScript.StringUtilities.repeat","TypeScript.SyntaxKind","TypeScript.SyntaxFacts","TypeScript.SyntaxFacts.getTokenKind","TypeScript.SyntaxFacts.getText","TypeScript.SyntaxFacts.isAnyKeyword","TypeScript.SyntaxFacts.isAnyPunctuation","TypeScript.SyntaxFacts.isPrefixUnaryExpressionOperatorToken","TypeScript.SyntaxFacts.isBinaryExpressionOperatorToken","TypeScript.SyntaxFacts.isAssignmentOperatorToken","TypeScript.SyntaxFacts.isType","firstKind","getStringWithoutSuffix","getNameWithoutSuffix","getType","camelCase","getSafeName","generateConstructorFunction","generateSyntaxInterfaces","generateSyntaxInterface","generateNodes","isInterface","generateWalker","firstEnumName","groupBy","generateKeywordCondition","min","max","generateUtilities","generateScannerUtilities","syntaxKindName","generateVisitor"],"mappings":"AA4BA,IAAI,GAAG,GAAW,CAAC;IAEf,SAAS,gBAAgB;QAErBA,IAAIA,GAAGA,GAAGA,IAAIA,aAAaA,CAACA,4BAA4BA,CAACA,CAACA;QAE1DA,IAAIA,UAAUA,GAAGA,IAAIA,aAAaA,CAACA,cAAcA,CAACA,CAACA;QACnDA,UAAUA,CAACA,IAAIA,GAAGA,CAACA,CAAUA;QAE7BA,IAAIA,YAAYA,GAAGA,IAAIA,aAAaA,CAACA,cAAcA,CAACA,CAACA;QACrDA,YAAYA,CAACA,IAAIA,GAAGA,CAACA,CAAYA;QAEjCA,IAAIA,IAAIA,GAAaA,EAAEA,CAACA;QACxBA,GAAGA,CAACA,CAACA,GAAGA,CAACA,CAACA,GAAGA,CAACA,EAAEA,CAACA,GAAGA,OAAOA,CAACA,SAASA,CAACA,MAAMA,EAAEA,CAACA,EAAEA,EAAEA,CAACA;YAChDA,IAAIA,CAACA,CAACA,CAACA,GAAGA,OAAOA,CAACA,SAASA,CAACA,IAAIA,CAACA,CAACA,CAACA,CAACA;QACxCA,CAACA;QAEDA,SAASA,QAAQA,CAACA,QAAgBA,EAAEA,QAAiBA;YACjDC,EAAEA,CAACA,CAACA,CAACA,GAAGA,CAACA,UAAUA,CAACA,QAAQA,CAACA,CAACA,CAACA,CAACA;gBAC5BA,MAA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AmB,EAAE,KAAK,CAAC,CAAC;AACpI,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,mBAAmB,EAAE,GAAG,wDAAwD,EAAE,gBAAgB,EAAE,KAAK,CAAC,CAAC;AAC7H,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,mBAAmB,EAAE,GAAG,oDAAoD,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;AAC/G,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,mBAAmB,EAAE,GAAG,wDAAwD,EAAE,gBAAgB,EAAE,KAAK,CAAC,CAAC;AAC7H,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,mBAAmB,EAAE,GAAG,qDAAqD,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;AACjH,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,mBAAmB,EAAE,GAAG,iDAAiD,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC"} ======= @@ -23,3 +26,12 @@ ======= {"version":3,"file":"SyntaxGenerator.js","sourceRoot":"","sources":["file:///C:/VSPro_1/src/typescript/public_cyrusn/src/compiler/sys.ts","file:///C:/VSPro_1/src/typescript/public_cyrusn/src/services/core/errors.ts","file:///C:/VSPro_1/src/typescript/public_cyrusn/src/services/core/arrayUtilities.ts","file:///C:/VSPro_1/src/typescript/public_cyrusn/src/services/core/stringUtilities.ts","file:///C:/VSPro_1/src/typescript/public_cyrusn/src/services/syntax/syntaxKind.ts","file:///C:/VSPro_1/src/typescript/public_cyrusn/src/services/syntax/syntaxFacts.ts","file:///C:/VSPro_1/src/typescript/public_cyrusn/src/services/syntax/SyntaxGenerator.ts"],"names":["getWScriptSystem","getWScriptSystem.readFile","getWScriptSystem.writeFile","getNodeSystem","getNodeSystem.readFile","getNodeSystem.writeFile","getNodeSystem.fileChanged","TypeScript","TypeScript.Errors","TypeScript.Errors.constructor","TypeScript.Errors.argument","TypeScript.Errors.argumentOutOfRange","TypeScript.Errors.argumentNull","TypeScript.Errors.abstract","TypeScript.Errors.notYetImplemented","TypeScript.Errors.invalidOperation","TypeScript.ArrayUtilities","TypeScript.ArrayUtilities.constructor","TypeScript.ArrayUtilities.sequenceEquals","TypeScript.ArrayUtilities.contains","TypeScript.ArrayUtilities.distinct","TypeScript.ArrayUtilities.last","TypeScript.ArrayUtilities.lastOrDefault","TypeScript.ArrayUtilities.firstOrDefault","TypeScript.ArrayUtilities.first","TypeScript.ArrayUtilities.sum","TypeScript.ArrayUtilities.select","TypeScript.ArrayUtilities.where","TypeScript.ArrayUtilities.any","TypeScript.ArrayUtilities.all","TypeScript.ArrayUtilities.binarySearch","TypeScript.ArrayUtilities.createArray","TypeScript.ArrayUtilities.grow","TypeScript.ArrayUtilities.copy","TypeScript.ArrayUtilities.indexOf","TypeScript.StringUtilities","TypeScript.StringUtilities.constructor","TypeScript.StringUtilities.isString","TypeScript.StringUtilities.endsWith","TypeScript.StringUtilities.startsWith","TypeScript.StringUtilities.repeat","TypeScript.SyntaxKind","TypeScript.SyntaxFacts","TypeScript.SyntaxFacts.getTokenKind","TypeScript.SyntaxFacts.getText","TypeScript.SyntaxFacts.isAnyKeyword","TypeScript.SyntaxFacts.isAnyPunctuation","TypeScript.SyntaxFacts.isPrefixUnaryExpressionOperatorToken","TypeScript.SyntaxFacts.isBinaryExpressionOperatorToken","TypeScript.SyntaxFacts.isAssignmentOperatorToken","TypeScript.SyntaxFacts.isType","firstKind","getStringWithoutSuffix","getNameWithoutSuffix","getType","camelCase","getSafeName","generateConstructorFunction","generateSyntaxInterfaces","generateSyntaxInterface","generateNodes","isInterface","generateWalker","firstEnumName","groupBy","generateKeywordCondition","min","max","generateUtilities","generateScannerUtilities","syntaxKindName","generateVisitor"],"mappings":"AA4BA,IAAI,GAAG,GAAW,CAAC;IAEf,SAAS,gBAAgB;QAErBA,IAAIA,GAAGA,GAAGA,IAAIA,aAAaA,CAACA,4BAA4BA,CAACA,CAACA;QAE1DA,IAAIA,UAAUA,GAAGA,IAAIA,aAAaA,CAACA,cAAcA,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,GAAGA,CAACA,CAACA,GAAGA,CAACA,EAAEA,CAACA,GAAGA,MAAMA,CAACA,MAAMA,EAAEA,CAACA,EAAEA,EAAEA,CAACA;oBACrCA,EAAEA,CAACA,CAACA,QAAQA,CAACA,MAAMA,CAACA,CAACA,CAACA,EAAEA,OAAOA,CAACA,CAACA,CAACA,CAACA;wBAC/BA,KAAKA,CAACA;oBACVA,CAACA;gBACLA,CAACA;gBAEDA,EAAEA,CAACA,CAACA,CAACA,KAAKA,MAAMA,CAACA,MAAMA,CAACA,CAACA,CAACA;oBACtBA,MAAMA,CAACA,IAAIA,CAACA,OAAOA,CAACA,CAACA;gBACzBA,CAACA;YACLA,CAACA;YAEDA,MAAMA,CAACA,MAAMA,CAACA;QAClBA,CAACA;QAEaJ,mBAAIA,GAAlBA,UAAsBA,KAAUA;YAC5BK,EAAEA,CAACA,CAACA,KAAKA,CAACA,MAAMA,KAAKA,CAACA,CAACA,CAACA,CAACA;gBACrBA,MAAMA,iBAAMA,CAACA,kBAAkBA,CAACA,OAAOA,CAACA,CAACA;YAC7CA,CAACA;YAEDA,MAAMA,CAACA,KAAKA,CAACA,KAAKA,CAACA,MAAMA,GAAGA,CAACA,CAACA,CAACA;QACnCA,CAACA;QAEaL,4BAAaA,GAA3BA,UAA+BA,KAAUA,EAAEA,SAA2CA;YAClFM,GAAGA,CAACA,CAACA,GAAGA,CAACA,CAACA,GAAGA,KAAKA,CAACA,MAAMA,GAAGA,CAACA,EAAEA,CAACA,IAAIA,CAACA,EAAEA,CAACA,EAAEA,EAAEA,CAACA;gBACzCA,IAAIA,CAACA,GAAGA,KAAKA,CAACA,CAACA,CAACA,CAACA;gBACjBA,EAAEA,CAACA,CAACA,SAASA,CAACA,CAACA,EAAEA,CAACA,CAACA,CAACA,CAACA,CAACA;oBAClBA,MAAMA,CAACA,CAACA,CAACA;gBACbA,CAACA;YACLA,CAACA;YAEDA,MAAMA,CAACA,SAASA,CAACA;QACrBA,CAACA;QAEaN,6BAAcA,GAA5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AAG,CAAC,SAAS,CAAC,GAAG,CAAC,mBAAmB,EAAE,GAAG,4DAA4D,EAAE,mBAAmB,EAAE,KAAK,CAAC,CAAC;AACpI,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,mBAAmB,EAAE,GAAG,wDAAwD,EAAE,gBAAgB,EAAE,KAAK,CAAC,CAAC;AAC7H,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,mBAAmB,EAAE,GAAG,oDAAoD,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;AAC/G,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,mBAAmB,EAAE,GAAG,wDAAwD,EAAE,gBAAgB,EAAE,KAAK,CAAC,CAAC;AAC7H,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,mBAAmB,EAAE,GAAG,qDAAqD,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;AACjH,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,mBAAmB,EAAE,GAAG,iDAAiD,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC"} >>>>>>> 6d94dc3... Body is optional. +======= +{"version":3,"file":"SyntaxGenerator.js","sourceRoot":"","sources":["file:///C:/VSPro_1/src/typescript/public_cyrusn/src/compiler/sys.ts","file:///C:/VSPro_1/src/typescript/public_cyrusn/src/services/core/errors.ts","file:///C:/VSPro_1/src/typescript/public_cyrusn/src/services/core/arrayUtilities.ts","file:///C:/VSPro_1/src/typescript/public_cyrusn/src/services/core/stringUtilities.ts","file:///C:/VSPro_1/src/typescript/public_cyrusn/src/services/syntax/syntaxKind.ts","file:///C:/VSPro_1/src/typescript/public_cyrusn/src/services/syntax/syntaxFacts.ts","file:///C:/VSPro_1/src/typescript/public_cyrusn/src/services/syntax/SyntaxGenerator.ts"],"names":["getWScriptSystem","getWScriptSystem.readFile","getWScriptSystem.writeFile","getNodeSystem","getNodeSystem.readFile","getNodeSystem.writeFile","getNodeSystem.fileChanged","TypeScript","TypeScript.Errors","TypeScript.Errors.constructor","TypeScript.Errors.argument","TypeScript.Errors.argumentOutOfRange","TypeScript.Errors.argumentNull","TypeScript.Errors.abstract","TypeScript.Errors.notYetImplemented","TypeScript.Errors.invalidOperation","TypeScript.ArrayUtilities","TypeScript.ArrayUtilities.constructor","TypeScript.ArrayUtilities.sequenceEquals","TypeScript.ArrayUtilities.contains","TypeScript.ArrayUtilities.distinct","TypeScript.ArrayUtilities.last","TypeScript.ArrayUtilities.lastOrDefault","TypeScript.ArrayUtilities.firstOrDefault","TypeScript.ArrayUtilities.first","TypeScript.ArrayUtilities.sum","TypeScript.ArrayUtilities.select","TypeScript.ArrayUtilities.where","TypeScript.ArrayUtilities.any","TypeScript.ArrayUtilities.all","TypeScript.ArrayUtilities.binarySearch","TypeScript.ArrayUtilities.createArray","TypeScript.ArrayUtilities.grow","TypeScript.ArrayUtilities.copy","TypeScript.ArrayUtilities.indexOf","TypeScript.StringUtilities","TypeScript.StringUtilities.constructor","TypeScript.StringUtilities.isString","TypeScript.StringUtilities.endsWith","TypeScript.StringUtilities.startsWith","TypeScript.StringUtilities.repeat","TypeScript.SyntaxKind","TypeScript.SyntaxFacts","TypeScript.SyntaxFacts.getTokenKind","TypeScript.SyntaxFacts.getText","TypeScript.SyntaxFacts.isAnyKeyword","TypeScript.SyntaxFacts.isAnyPunctuation","TypeScript.SyntaxFacts.isPrefixUnaryExpressionOperatorToken","TypeScript.SyntaxFacts.isBinaryExpressionOperatorToken","TypeScript.SyntaxFacts.isAssignmentOperatorToken","TypeScript.SyntaxFacts.isType","firstKind","getStringWithoutSuffix","getNameWithoutSuffix","getType","camelCase","getSafeName","generateConstructorFunction","generateSyntaxInterfaces","generateSyntaxInterface","generateNodes","isInterface","generateWalker","firstEnumName","groupBy","generateKeywordCondition","min","max","generateUtilities","generateScannerUtilities","syntaxKindName","generateVisitor"],"mappings":"AA4BA,IAAI,GAAG,GAAW,CAAC;IAEf,SAAS,gBAAgB;QAErBA,IAAIA,GAAGA,GAAGA,IAAIA,aAAaA,CAACA,4B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AIA,OAAOA,GAAGA,KAAKA,CAACA,CAACA,CAACA,CAACA;gBACvBA,GAAGA,CAACA,CAACA,GAAGA,CAACA,CAACA,GAAGA,CAACA,EAAEA,CAACA,GAAGA,MAAMA,CAACA,MAAMA,EAAEA,CAACA,EAAEA,EAAEA,CAACA;oBACrCA,EAAEA,CAACA,CAACA,QAAQA,CAACA,MAAMA,CAACA,CAACA,CAACA,EAAEA,OAAOA,CAACA,CAACA,CAACA,CAACA;wBAC/BA,KAAKA,CAACA;oBACVA,CAACA;gBACLA,CAACA;gBAEDA,EAAEA,CAACA,CAACA,CAACA,KAAKA,MAAMA,CAACA,MAAMA,CAACA,CAACA,CAACA;oBACtBA,MAAMA,CAACA,IAAIA,CAACA,OAAOA,CAACA,CAACA;gBACzBA,CAACA;YACLA,CAACA;YAEDA,MAAMA,CAACA,MAAMA,CAACA;QAClBA,CAACA;QAEaJ,mBAAIA,GAAlBA,UAAsBA,KAAUA;YAC5BK,EAAEA,CAACA,CAACA,KAAKA,CAACA,MAAMA,KAAKA,CAACA,CAACA,CAACA,CAACA;gBACrBA,MAAMA,iBAAMA,CAACA,kBAAkBA,CAACA,OAAOA,CAACA,CAACA;YAC7CA,CAACA;YAEDA,MAAMA,CAACA,KAAKA,CAACA,KAAKA,CAACA,MAAMA,GAAGA,CAACA,CAACA,CAACA;QACnCA,CAACA;QAEaL,4BAAaA,GAA3BA,UAA+BA,KAAUA,EAAEA,SAA2CA;YAClFM,GAAGA,CAACA,CAACA,GAAGA,CAACA,CAACA,GAAGA,KAAKA,CAACA,MAAMA,GAAGA,CAACA,EAAEA,CAACA,IAAIA,CAACA,EAAEA,CAACA,EAAEA,EAAEA,CAACA;gBACzCA,IAAIA,CAACA,GAAGA,KAAKA,CAACA,CAACA,CAACA,CAACA;gBACjBA,EAAEA,CAACA,CAACA,SAASA,CAACA,CAACA,EAAEA,CAACA,CAACA,CAACA,CAACA,CAACA;oBAClBA,MAAMA,CAACA,CAACA,CAACA;gBACbA,CAACA;Y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BAAgB,EAAE,KAAK,CAAC,CAAC;AAC7H,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,mBAAmB,EAAE,GAAG,qDAAqD,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;AACjH,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,mBAAmB,EAAE,GAAG,iDAAiD,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC"} +>>>>>>> f4fb252... Add support for parsing generator declarations. +======= +{"version":3,"file":"SyntaxGenerator.js","sourceRoot":"","sources":["file:///C:/VSPro_1/src/typescript/public_cyrusn/src/compiler/sys.ts","file:///C:/VSPro_1/src/typescript/public_cyrusn/src/services/core/errors.ts","file:///C:/VSPro_1/src/typescript/public_cyrusn/src/services/core/arrayUtilities.ts","file:///C:/VSPro_1/src/typescript/public_cyrusn/src/services/core/stringUtilities.ts","file:///C:/VSPro_1/src/typescript/public_cyrusn/src/services/syntax/syntaxKind.ts","file:///C:/VSPro_1/src/typescript/public_cyrusn/src/services/syntax/syntaxFacts.ts","file:///C:/VSPro_1/src/typescript/public_cyrusn/src/services/syntax/SyntaxGenerator.ts"],"names":["getWScriptSystem","getWScriptSystem.readFile","getWScriptSystem.writeFile","getNodeSystem","getNodeSystem.readFile","getNodeSystem.writeFile","getNodeSystem.fileChanged","TypeScript","TypeScript.Errors","TypeScript.Errors.constructor","TypeScript.Errors.argument","TypeScript.Errors.argumentOutOfRange","TypeScript.Errors.argumentNull","TypeScript.Errors.abstract","TypeScript.Errors.notYetImplemented","TypeScript.Errors.invalidOperation","TypeScript.ArrayUtilities","TypeScript.ArrayUtilities.constructor","TypeScript.ArrayUtilities.sequenceEquals","TypeScript.ArrayUtilities.contains","TypeScript.ArrayUtilities.distinct","TypeScript.ArrayUtilities.last","TypeScript.ArrayUtilities.lastOrDefault","TypeScript.ArrayUtilities.firstOrDefault","TypeScript.ArrayUtilities.first","TypeScript.ArrayUtilities.sum","TypeScript.ArrayUtilities.select","TypeScript.ArrayUtilities.where","TypeScript.ArrayUtilities.any","TypeScript.ArrayUtilities.all","TypeScript.ArrayUtilities.binarySearch","TypeScript.ArrayUtilities.createArray","TypeScript.ArrayUtilities.grow","TypeScript.ArrayUtilities.copy","TypeScript.ArrayUtilities.indexOf","TypeScript.StringUtilities","TypeScript.StringUtilities.constructor","TypeScript.StringUtilities.isString","TypeScript.StringUtilities.endsWith","TypeScript.StringUtilities.startsWith","TypeScript.StringUtilities.repeat","TypeScript.SyntaxKind","TypeScript.SyntaxFacts","TypeScript.SyntaxFacts.getTokenKind","TypeScript.SyntaxFacts.getText","TypeScript.SyntaxFacts.isAnyKeyword","TypeScript.SyntaxFacts.isAnyPunctuation","TypeScript.SyntaxFacts.isPrefixUnaryExpressionOperatorToken","TypeScript.SyntaxFacts.isBinaryExpressionOperatorToken","TypeScript.SyntaxFacts.isAssignmentOperatorToken","TypeScript.SyntaxFacts.isType","firstKind","getStringWithoutSuffix","getNameWithoutSuffix","getType","camelCase","getSafeName","generateConstructorFunction","generateSyntaxInterfaces","generateSyntaxInterface","generateNodes","isInterface","generateWalker","firstEnumName","groupBy","generateKeywordCondition","min","max","generateUtilities","generateScannerUtilities","syntaxKindName","generateVisitor"],"mappings":"AA4BA,IAAI,GAAG,GAAW,CAAC;IAEf,SAAS,gBAAgB;QAErBA,IAAIA,GAAGA,GAAGA,IAAIA,aAAaA,CAACA,4BAA4BA,CAACA,CAACA;QAE1DA,IAAIA,UAAUA,GAAGA,IAAIA,aAAaA,CAACA,cAAcA,CAACA,CAACA;QACnDA,UAAUA,CAACA,IAAIA,GAAGA,CAACA,CAAUA;QAE7BA,IAAIA,YAAYA,GAAGA,IAAIA,aAAaA,CAACA,cAAcA,CAACA,CAACA;QACrDA,YAAYA,CAACA,IAAIA,GAAGA,CAACA,CAAYA;QAEjCA,IAAIA,IAAIA,GAAaA,EAAEA,CAACA;QACxBA,GAAGA,CAACA,CAACA,GAAGA,CAACA,CAACA,GAAGA,CAACA,EAAEA,CAACA,GAAGA,OAAOA,CAACA,S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js","sourceRoot":"","sources":["file:///C:/VSPro_1/src/typescript/public_cyrusn/src/compiler/sys.ts","file:///C:/VSPro_1/src/typescript/public_cyrusn/src/services/core/errors.ts","file:///C:/VSPro_1/src/typescript/public_cyrusn/src/services/core/arrayUtilities.ts","file:///C:/VSPro_1/src/typescript/public_cyrusn/src/services/core/stringUtilities.ts","file:///C:/VSPro_1/src/typescript/public_cyrusn/src/services/syntax/syntaxKind.ts","file:///C:/VSPro_1/src/typescript/public_cyrusn/src/services/syntax/syntaxFacts.ts","file:///C:/VSPro_1/src/typescript/public_cyrusn/src/services/syntax/SyntaxGenerator.ts"],"names":["getWScriptSystem","getWScriptSystem.readFile","getWScriptSystem.writeFile","getNodeSystem","getNodeSystem.readFile","getNodeSystem.writeFile","getNodeSystem.fileChanged","TypeScript","TypeScript.Errors","TypeScript.Errors.constructor","TypeScript.Errors.argument","TypeScript.Errors.argumentOutOfRange","TypeScript.Errors.argumentNull","TypeScript.Errors.abstract","TypeScript.Errors.notYetImplemented","TypeScript.Errors.invalidOperation","TypeScript.ArrayUtilities","TypeScript.ArrayUtilities.constructor","TypeScript.ArrayUtilities.sequenceEquals","TypeScript.ArrayUtilities.contains","TypeScript.ArrayUtilities.distinct","TypeScript.ArrayUtilities.last","TypeScript.ArrayUtilities.lastOrDefault","TypeScript.ArrayUtilities.firstOrDefault","TypeScript.ArrayUtilities.first","TypeScript.ArrayUtilities.sum","TypeScript.ArrayUtilities.select","TypeScript.ArrayUtilities.where","TypeScript.ArrayUtilities.any","TypeScript.ArrayUtilities.all","TypeScript.ArrayUtilities.binarySearch","TypeScript.ArrayUtilities.createArray","TypeScript.ArrayUtilities.grow","TypeScript.ArrayUtilities.copy","TypeScript.ArrayUtilities.indexOf","TypeScript.StringUtilities","TypeScript.StringUtilities.constructor","TypeScript.StringUtilities.isString","TypeScript.StringUtilities.endsWith","TypeScript.StringUtilities.startsWith","TypeScript.StringUtilities.repeat","TypeScript.SyntaxKind","TypeScript.SyntaxFacts","TypeScript.SyntaxFacts.getTokenKind","TypeScript.SyntaxFacts.getText","TypeScript.SyntaxFacts.isAnyKeyword","TypeScript.SyntaxFacts.isAnyPunctuation","TypeScript.SyntaxFacts.isPrefixUnaryExpressionOperatorToken","TypeScript.SyntaxFacts.isBinaryExpressionOperatorToken","TypeScript.SyntaxFacts.isAssignmentOperatorToken","TypeScript.SyntaxFacts.isType","firstKind","getStringWithoutSuffix","getNameWithoutSuffix","getType","camelCase","getSafeName","generateConstructorFunction","generateSyntaxInterfaces","generateSyntaxInterface","generateNodes","isInterface","generateWalker","firstEnumName","groupBy","generateKeywordCondition","min","max","generateUtilities","generateScannerUtilities","syntaxKindName","generateVisitor"],"mappings":"AA4BA,IAAI,GAAG,GAAW,CAAC;IAEf,SAAS,gBAAgB;QAErBA,IAAIA,GAAGA,GAAGA,IAAIA,aAAaA,CAACA,4BAA4BA,CAACA,CAACA;QAE1DA,IAAIA,UAAUA,GAAGA,IAAIA,aAAaA,CAACA,cAAcA,CAACA,CAACA;QACnDA,UAAUA,CAACA,IAAIA,GAAGA,CAACA,CAAUA;QAE7BA,IAAIA,YAAYA,GAAGA,IAAIA,aAAaA,CAACA,cAAcA,CAACA,CAACA;QACrDA,YAAYA,CAACA,IAAIA,GAAGA,CAACA,CAAYA;QAEjCA,IAAIA,IAAIA,GAAaA,EAAEA,CAACA;QACxBA,GAAGA,CAACA,CAACA,GAAGA,CAACA,CAACA,GAAGA,CAACA,EAAEA,CAACA,GAAGA,OAAOA,CAACA,SAASA,CAACA,MAAMA,EAAEA,CAACA,EAAEA,EAAEA,CAACA;YAChDA,IAAIA,CAACA,CAACA,CAACA,GAAGA,OAAOA,CAACA,SAASA,CAACA,IAAIA,CAACA,CAACA,CAACA,CAACA;QACxCA,CAACA;QAEDA,SAASA,QAAQA,CAACA,QAAgBA,EAAEA,QAAiBA;YACjDC,EAAEA,CAACA,CAACA,CAACA,GAAGA,CAACA,UAAUA,CAACA,QAAQA,CAACA,CAACA,CAACA,CAACA;gBAC5B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} +>>>>>>> 99981aa... Add support for parsing yield expressions. diff --git a/src/services/syntax/constants.ts b/src/services/syntax/constants.ts index 31b4e952824..8845af18af6 100644 --- a/src/services/syntax/constants.ts +++ b/src/services/syntax/constants.ts @@ -1,7 +1,7 @@ /// module TypeScript { - export enum SyntaxConstants { + export enum SyntaxNodeConstants { None = 0, // Masks that we use to place information about a node into a single int. The first bit tells @@ -15,13 +15,15 @@ module TypeScript { // only be used by the incremental parser if it is parsed in the same strict context as before. // last masks off the part of the int // - // The width of the node is stored in the remainder of the int. This allows us up to 256MB - // for a node by using all 28 bits. However, in the common case, we'll use less than 28 bits + // The width of the node is stored in the remainder of the int. This allows us up to 128MB + // for a node by using all 27 bits. However, in the common case, we'll use less than 27 bits // for the width. Thus, the info will be stored in a single int in chakra. - NodeDataComputed = 0x00000001, // 0000 0000 0000 0000 0000 0000 0000 0001 - NodeIncrementallyUnusableMask = 0x00000002, // 0000 0000 0000 0000 0000 0000 0000 0010 - NodeParsedInStrictModeMask = 0x00000004, // 0000 0000 0000 0000 0000 0000 0000 0100 - NodeParsedInDisallowInMask = 0x00000008, // 0000 0000 0000 0000 0000 0000 0000 1000 - NodeFullWidthShift = 4, // 1111 1111 1111 1111 1111 1111 1111 0000 + DataComputed = 0x00000001, // 0000 0000 0000 0000 0000 0000 0000 0001 + IncrementallyUnusableMask = 0x00000002, // 0000 0000 0000 0000 0000 0000 0000 0010 + ParsedInStrictModeContext = 0x00000004, // 0000 0000 0000 0000 0000 0000 0000 0100 + ParsedInDisallowInContext = 0x00000008, // 0000 0000 0000 0000 0000 0000 0000 1000 + ParsedInYieldContext = 0x00000010, // 0000 0000 0000 0000 0000 0000 0001 0000 + ParsedInGeneratorParameterContext = 0x00000020, // 0000 0000 0000 0000 0000 0000 0010 0000 + FullWidthShift = 1 << 6, // 1111 1111 1111 1111 1111 1111 1100 0000 } } \ No newline at end of file diff --git a/src/services/syntax/parser.ts b/src/services/syntax/parser.ts index 4fe8a92c5d5..80c813ca162 100644 --- a/src/services/syntax/parser.ts +++ b/src/services/syntax/parser.ts @@ -154,8 +154,49 @@ module TypeScript.Parser { // TODO: do we need to store/restore this when speculative parsing? I don't think so. The // parsing logic already handles storing/restoring this and should work properly even if we're // speculative parsing. - var strictMode: boolean = false; - var disallowIn: boolean = false; + // + // When adding more parser context flags, consider which is the more common case that the + // flag will be in. This should be hte 'false' state for that flag. The reason for this is + // that we don't store data in our nodes unless the value is in the *non-default* state. So, + // for example, more often than code 'allows-in' (or doesn't 'disallow-in'). We opt for + // 'disallow-in' set to 'false'. Otherwise, if we had 'allowsIn' set to 'true', then almost + // all nodes would need extra state on them to store this info. + // + // Note: 'allowIn' and 'allowYield' track 1:1 with the [in] and [yield] concepts in the ES6 + // grammar specification. + // + // An important thing about these context concepts. By default they are effectively inherited + // while parsing through every grammar production. i.e. if you don't change them, then when + // you parse a sub-production, it will have the same context values as hte parent production. + // This is great most of the time. After all, consider all the 'expression' grammar productions + // and how nearly all of them pass along the 'in' and 'yield' context values: + // + // EqualityExpression[In, Yield] : + // RelationalExpression[?In, ?Yield] + // EqualityExpression[?In, ?Yield] == RelationalExpression[?In, ?Yield] + // EqualityExpression[?In, ?Yield] != RelationalExpression[?In, ?Yield] + // EqualityExpression[?In, ?Yield] === RelationalExpression[?In, ?Yield] + // EqualityExpression[?In, ?Yield] !== RelationalExpression[?In, ?Yield] + // + // Where you have to be careful is then understanding what the points are in the grammar + // where the values are *not* passed along. For example: + // + // SingleNameBinding[Yield,GeneratorParameter] + // [+GeneratorParameter]BindingIdentifier[Yield] Initializer[In]opt + // [~GeneratorParameter]BindingIdentifier[?Yield]Initializer[In, ?Yield]opt + // + // Here this is saying that if the GeneratorParameter context flag is set, that we should + // explicitly set the 'yield' context flag to false before calling into the BindingIdentifier + // and we should explicitly unset the 'yield' context flag before calling into the Initializer. + // production. Conversely, if the GeneratorParameter context flag is not set, then we + // should leave the 'yield' context flag alone. + // + // Getting this all correct is tricky and requires careful reading of the grammar to + // understand when these values should be changed versus when they should be inherited. + var strictModeContext: boolean = false; + var disallowInContext: boolean = false; + var yieldContext: boolean = false; + var generatorParameterContext: boolean = false; // Current state of the parser. If we need to rewind we will store and reset these values as // appropriate. @@ -181,7 +222,7 @@ module TypeScript.Parser { // Now, clear out our state so that our singleton parser doesn't keep things alive. diagnostics = []; - parseNodeData = SyntaxConstants.None; + parseNodeData = SyntaxNodeConstants.None; fileName = undefined; source.release(); source = undefined; @@ -229,26 +270,29 @@ module TypeScript.Parser { // TODO(cyrusn): This may be too conservative. Perhaps we could reuse hte node and // attach the skipped tokens in front? For now though, being conservative is nice and // safe, and likely won't ever affect perf. - if (_skippedTokens) { - return null; + if (!_skippedTokens) { + var node = source.currentNode(); + + // We can only reuse a node if it was parsed under the same strict mode that we're + // currently in. i.e. if we originally parsed a node in non-strict mode, but then + // the user added 'using strict' at the top of the file, then we can't use that node + // again as the presense of strict mode may cause us to parse the tokens in the file + // differetly. + // + // Note: we *can* reuse tokens when the strict mode changes. That's because tokens + // are unaffected by strict mode. It's just the parser will decide what to do with it + // differently depending on what mode it is in. + if (node && + parsedInStrictModeContext(node) === strictModeContext && + parsedInDisallowInContext(node) === disallowInContext && + parsedInYieldContext(node) === yieldContext && + parsedInGeneratorParameterContext(node) === generatorParameterContext) { + + return node; + } } - var node = source.currentNode(); - - // We can only reuse a node if it was parsed under the same strict mode that we're - // currently in. i.e. if we originally parsed a node in non-strict mode, but then - // the user added 'using strict' at the top of the file, then we can't use that node - // again as the presense of strict mode may cause us to parse the tokens in the file - // differetly. - // - // Note: we *can* reuse tokens when the strict mode changes. That's because tokens - // are unaffected by strict mode. It's just the parser will decide what to do with it - // differently depending on what mode it is in. - if (!node || parsedInStrictMode(node) !== strictMode || parsedInDisallowInMode(node) !== disallowIn) { - return undefined; - } - - return node; + return undefined; } function currentToken(): ISyntaxToken { @@ -374,13 +418,19 @@ module TypeScript.Parser { return true; } + // If we have a 'yield' keyword, and we're in the [yield] context, then 'yield' is + // considered a keyword and is not an identifier. + if (tokenKind === SyntaxKind.YieldKeyword && yieldContext) { + return false; + } + // Keywords are only identifiers if they're FutureReservedStrictWords and we're in // strict mode. *Or* if it's a typescript 'keyword'. if (tokenKind >= SyntaxKind.FirstFutureReservedStrictKeyword) { if (tokenKind <= SyntaxKind.LastFutureReservedStrictKeyword) { // Could be a keyword or identifier. It's an identifier if we're not in strict // mode. - return !strictMode; + return !strictModeContext; } // If it's typescript keyword, then it's actually a javascript identifier. @@ -566,17 +616,29 @@ module TypeScript.Parser { function updateParseNodeData() { parseNodeData = - (strictMode ? SyntaxConstants.NodeParsedInStrictModeMask : 0) | - (disallowIn ? SyntaxConstants.NodeParsedInDisallowInMask : 0); + (strictModeContext ? SyntaxNodeConstants.ParsedInStrictModeContext : 0) | + (disallowInContext ? SyntaxNodeConstants.ParsedInDisallowInContext : 0) | + (yieldContext ? SyntaxNodeConstants.ParsedInYieldContext : 0) | + (generatorParameterContext ? SyntaxNodeConstants.ParsedInGeneratorParameterContext : 0); } - function setStrictMode(val: boolean) { - strictMode = val; + function setStrictModeContext(val: boolean) { + strictModeContext = val; updateParseNodeData(); } - function setDisallowIn(val: boolean) { - disallowIn = val; + function setDisallowInContext(val: boolean) { + disallowInContext = val; + updateParseNodeData(); + } + + function setYieldContext(val: boolean) { + yieldContext = val; + updateParseNodeData(); + } + + function setGeneratorParameterContext(val: boolean) { + generatorParameterContext = val; updateParseNodeData(); } @@ -584,13 +646,13 @@ module TypeScript.Parser { // Note: saving and restoring the 'isInStrictMode' state is not really necessary here // (as it will never be read afterwards). However, for symmetry with the rest of the // parsing code, we do the same here. - var savedIsInStrictMode = strictMode + var savedIsInStrictMode = strictModeContext // Note: any skipped tokens produced after the end of all the module elements will be // added as skipped trivia to the start of the EOF token. var moduleElements = parseSyntaxList(ListParsingState.SourceUnit_ModuleElements, updateStrictModeState); - setStrictMode(savedIsInStrictMode); + setStrictModeContext(savedIsInStrictMode); var sourceUnit = new SourceUnitSyntax(parseNodeData, moduleElements, consumeToken(currentToken())); @@ -611,7 +673,7 @@ module TypeScript.Parser { } function updateStrictModeState(items: any[]): void { - if (!strictMode) { + if (!strictModeContext) { // Check if all the items are directive prologue elements. for (var i = 0, n = items.length; i < n; i++) { if (!isDirectivePrologueElement(items[i])) { @@ -619,7 +681,7 @@ module TypeScript.Parser { } } - setStrictMode(SyntaxFacts.isUseStrictDirective(items[items.length - 1])); + setStrictModeContext(SyntaxFacts.isUseStrictDirective(items[items.length - 1])); } } @@ -891,10 +953,10 @@ module TypeScript.Parser { } function allowInAnd(func: () => T): T { - if (disallowIn) { - setDisallowIn(false); + if (disallowInContext) { + setDisallowInContext(false); var result = func(); - setDisallowIn(true); + setDisallowInContext(true); return result; } @@ -903,16 +965,64 @@ module TypeScript.Parser { } function disallowInAnd(func: () => T): T { - if (disallowIn) { + if (disallowInContext) { // no need to do anything special if 'in' is already disallowed. return func(); } - setDisallowIn(true); + setDisallowInContext(true); var result = func(); - setDisallowIn(false); + setDisallowInContext(false); return result; } + + function enterYieldContextAnd(func: () => T): T { + if (yieldContext) { + // no need to do anything special if we're already in the [Yield] context. + return func(); + } + + setYieldContext(true); + var result = func(); + setYieldContext(false); + return result; + } + + function exitYieldContextAnd(func: () => T): T { + if (yieldContext) { + setYieldContext(false); + var result = func(); + setYieldContext(true); + return result; + } + + // no need to do anything special if we're not in the [Yield] context. + return func(); + } + + function enterGeneratorParameterContextAnd(func: () => T): T { + if (generatorParameterContext) { + // no need to do anything special if we're already in the [GeneratorParameter] context + return func(); + } + + setGeneratorParameterContext(true); + var result = func(); + setGeneratorParameterContext(false); + return result; + } + + function exitGeneratorParameterContextAnd(func: () => T): T { + if (generatorParameterContext) { + setGeneratorParameterContext(false); + var result = func(); + setGeneratorParameterContext(true); + return result; + } + + // no need to do anything special if we're not in the [GeneratorParameter] context + return func(); + } function tryParseEnumElementEqualsValueClause(): EqualsValueClauseSyntax { return isEqualsValueClause(/*inParameter*/ false) ? allowInAnd(parseEqualsValueClause) : undefined; @@ -950,8 +1060,9 @@ module TypeScript.Parser { if (isModifierKind(token.kind)) { // These are modifiers only if we see an actual keyword, identifier, string literal // or number following. - // Note: we also allow [ for error conditions. - // [ is for: static [a: number] + // + // [ is for: static [a: number] ... + // [ is for: static [computedProp()] ... var nextToken = peekToken(index + 1); var nextTokenKind = nextToken.kind; @@ -960,6 +1071,8 @@ module TypeScript.Parser { case SyntaxKind.OpenBracketToken: case SyntaxKind.NumericLiteral: case SyntaxKind.StringLiteral: + case SyntaxKind.NoSubstitutionTemplateToken: + case SyntaxKind.AsteriskToken: return true; default: return SyntaxFacts.isAnyKeyword(nextTokenKind); @@ -994,10 +1107,22 @@ module TypeScript.Parser { return Syntax.list(tokens); } - function parseHeritageClauses(): HeritageClauseSyntax[] { - return isHeritageClause() - ? parseSyntaxList(ListParsingState.ClassOrInterfaceDeclaration_HeritageClauses) - : []; + function parseHeritageClauses(isClassHeritageClause: boolean): HeritageClauseSyntax[] { + // ClassTail[Yield,GeneratorParameter] : See 14.5 + // [~GeneratorParameter]ClassHeritage[?Yield]opt { ClassBody[?Yield]opt } + // [+GeneratorParameter] ClassHeritageopt { ClassBodyopt } + + if (isHeritageClause()) { + return isClassHeritageClause && generatorParameterContext + ? exitYieldContextAnd(parseHeritageClausesWorker) + : parseHeritageClausesWorker(); + } + + return []; + } + + function parseHeritageClausesWorker() { + return parseSyntaxList(ListParsingState.ClassOrInterfaceDeclaration_HeritageClauses) } function tryParseHeritageClauseTypeName(): ITypeSyntax { @@ -1011,12 +1136,30 @@ module TypeScript.Parser { eatToken(SyntaxKind.ClassKeyword), eatIdentifierToken(), tryParseTypeParameterList(/*requireCompleteTypeParameterList:*/ false), - parseHeritageClauses(), + parseHeritageClauses(/*isClassHeritageClauses:*/ true), openBraceToken = eatToken(SyntaxKind.OpenBraceToken), openBraceToken.fullWidth() > 0 ? parseSyntaxList(ListParsingState.ClassDeclaration_ClassElements) : [], eatToken(SyntaxKind.CloseBraceToken)); } + function parseClassElement(openBraceToken: ISyntaxToken): IClassElementSyntax[] { + // ClassTail[Yield,GeneratorParameter] : See 14.5 + // [~GeneratorParameter]ClassHeritage[?Yield]opt { ClassBody[?Yield]opt } + // [+GeneratorParameter] ClassHeritageopt { ClassBodyopt } + + if (openBraceToken.fullWidth() > 0) { + return generatorParameterContext + ? exitYieldContextAnd(parseClassElements) + : parseClassElements(); + } + + return []; + } + + function parseClassElements() { + return parseSyntaxList(ListParsingState.ClassDeclaration_ClassElements) + } + function isAccessor(modifierCount: number, inErrorRecovery: boolean): boolean { var tokenKind = peekToken(modifierCount).kind; if (tokenKind !== SyntaxKind.GetKeyword && @@ -1027,34 +1170,34 @@ module TypeScript.Parser { return isPropertyName(/*peekIndex:*/ modifierCount + 1, inErrorRecovery); } - function parseAccessor(checkForStrictMode: boolean): IAccessorSyntax { + function parseAccessor(): IAccessorSyntax { var modifiers = parseModifiers(); - var _currenToken = currentToken(); - var tokenKind = _currenToken.kind; + var _currentToken = currentToken(); + var tokenKind = _currentToken.kind; if (tokenKind === SyntaxKind.GetKeyword) { - return parseGetMemberAccessorDeclaration(modifiers, _currenToken, checkForStrictMode); + return parseGetAccessor(modifiers, _currentToken); } else if (tokenKind === SyntaxKind.SetKeyword) { - return parseSetMemberAccessorDeclaration(modifiers, _currenToken, checkForStrictMode); + return parseSetAccessor(modifiers, _currentToken); } else { throw Errors.invalidOperation(); } } - function parseGetMemberAccessorDeclaration(modifiers: ISyntaxToken[], getKeyword: ISyntaxToken, checkForStrictMode: boolean): GetAccessorSyntax { + function parseGetAccessor(modifiers: ISyntaxToken[], getKeyword: ISyntaxToken): GetAccessorSyntax { return new GetAccessorSyntax(parseNodeData, modifiers, consumeToken(getKeyword), parsePropertyName(), - parseCallSignature(/*requireCompleteTypeParameterList:*/ false), - parseBlock(/*parseStatementsEvenWithNoOpenBrace:*/ false, checkForStrictMode)); + parseCallSignature(/*requireCompleteTypeParameterList:*/ false, /*yieldContext:*/ false, /*generatorParameter:*/ false), + parseFunctionBlock(/*allowYield:*/ false)); } - function parseSetMemberAccessorDeclaration(modifiers: ISyntaxToken[], setKeyword: ISyntaxToken, checkForStrictMode: boolean): SetAccessorSyntax { + function parseSetAccessor(modifiers: ISyntaxToken[], setKeyword: ISyntaxToken): SetAccessorSyntax { return new SetAccessorSyntax(parseNodeData, modifiers, consumeToken(setKeyword), parsePropertyName(), - parseCallSignature(/*requireCompleteTypeParameterList:*/ false), - parseBlock(/*parseStatementsEvenWithNoOpenBrace:*/ false, checkForStrictMode)); + parseCallSignature(/*requireCompleteTypeParameterList:*/ false, /*yieldContext:*/ false, /*generatorParameterContext:*/ false), + parseFunctionBlock(/*allowYield:*/ false)); } function isClassElement(inErrorRecovery: boolean): boolean { @@ -1072,12 +1215,29 @@ module TypeScript.Parser { } function isMemberVariableOrFunctionDeclaration(peekIndex: number, inErrorRecovery: boolean) { + var tokenN = peekToken(peekIndex); + var tokenNKind = tokenN.kind; + + // If we have a '*', then this is a generator function. + if (tokenNKind === SyntaxKind.AsteriskToken) { + if (inErrorRecovery) { + // If we're in error recovery, we might see a random * that is part of some + // expression. Really, in order to view this as a generator function, we want + // to see at least '*id<' or '*id('. Otherwise, we won't think of this as the + // start of a member variable/function. + return peekToken(peekIndex + 1).kind === SyntaxKind.IdentifierName && + (peekToken(peekIndex + 2).kind === SyntaxKind.LessThanToken || peekToken(peekIndex + 2).kind === SyntaxKind.OpenParenToken); + } + + return true; + } + // Check if its the start of a property or method. Both must start with a property name. if (!isPropertyName(peekIndex, inErrorRecovery)) { return false; } - if (!SyntaxFacts.isAnyKeyword(peekToken(peekIndex).kind)) { + if (!SyntaxFacts.isAnyKeyword(tokenNKind)) { // It wasn't a keyword. So this is definitely a member variable or function. return true; } @@ -1127,14 +1287,19 @@ module TypeScript.Parser { return parseIndexMemberDeclaration(); } else if (isAccessor(_modifierCount, inErrorRecovery)) { - return parseAccessor(/*checkForStrictMode:*/ false); + return parseAccessor(); } else if (isMemberVariableOrFunctionDeclaration(/*peekIndex:*/ _modifierCount, inErrorRecovery)) { var modifiers = parseModifiers(); + var asterixToken = tryEatToken(SyntaxKind.AsteriskToken); var propertyName = parsePropertyName(); - if (isCallSignature(/*peekIndex:*/ 0)) { - return parseMemberFunctionDeclaration(modifiers, propertyName); + // If we got a '*', then this is definitely a method. If we didn't get a '*', then + // we must have gotten a property name. And if that's all we have, we have to check + // if we have a call signature. If so, then this is a member function, otherwise + // it's a member variable. + if (asterixToken || isCallSignature(/*peekIndex:*/ 0)) { + return parseMemberFunctionDeclaration(modifiers, asterixToken, propertyName); } else { return parseMemberVariableDeclaration(modifiers, propertyName); @@ -1154,26 +1319,29 @@ module TypeScript.Parser { } function parseConstructorDeclaration(): ConstructorDeclarationSyntax { + // Note: if we see an arrow after the close paren, then try to parse out a function + // block anyways. It's likely the user just though '=> expr' was legal anywhere a + // block was legal. return new ConstructorDeclarationSyntax(parseNodeData, parseModifiers(), eatToken(SyntaxKind.ConstructorKeyword), - parseCallSignature(/*requireCompleteTypeParameterList:*/ false), - isBlock() - ? parseBlock(/*parseStatementsEvenWithNoOpenBrace:*/ false, /*checkForStrictMode:*/ true) - : eatExplicitOrAutomaticSemicolon(/*allowWithoutNewline:*/ false)); + parseCallSignature(/*requireCompleteTypeParameterList:*/ false, /*yieldContext:*/ false, /*generatorParameterContext:*/ false), + isBlockOrArrow() ? parseFunctionBlock(/*allowYield:*/ false) : eatExplicitOrAutomaticSemicolon(/*allowWithoutNewline:*/ false)); } - function parseMemberFunctionDeclaration(modifiers: ISyntaxToken[], propertyName: IPropertyNameSyntax): MemberFunctionDeclarationSyntax { - var callSignature = parseCallSignature(/*requireCompleteTypeParameterList:*/ false); - - // If we got an errant => then we want to parse what's coming up without requiring an - // open brace. - var parseBlockEvenWithNoOpenBrace = tryAddUnexpectedEqualsGreaterThanToken(callSignature); - var blockOrSemicolonToken = parseBlockEvenWithNoOpenBrace || isBlock() - ? parseBlock(parseBlockEvenWithNoOpenBrace, /*checkForStrictMode:*/ true) - : eatExplicitOrAutomaticSemicolon(/*allowWithoutNewline:*/ false); - - return new MemberFunctionDeclarationSyntax(parseNodeData, modifiers, propertyName, callSignature, blockOrSemicolonToken); + function parseMemberFunctionDeclaration(modifiers: ISyntaxToken[], asteriskToken: ISyntaxToken, propertyName: IPropertyNameSyntax): MemberFunctionDeclarationSyntax { + // Note: if we see an arrow after the close paren, then try to parse out a function + // block anyways. It's likely the user just though '=> expr' was legal anywhere a + // block was legal. + var isGeneratorFunction = asteriskToken !== undefined; + return new MemberFunctionDeclarationSyntax(parseNodeData, + modifiers, + asteriskToken, + propertyName, + parseCallSignature(/*requireCompleteTypeParameterList:*/ false, /*yieldContext:*/ isGeneratorFunction, /*generatorParameterContext:*/ isGeneratorFunction), + isBlockOrArrow() + ? parseFunctionBlock(/*yieldContext:*/ isGeneratorFunction) + : eatExplicitOrAutomaticSemicolon(/*allowWithoutNewline:*/ false)); } function parseMemberVariableDeclaration(modifiers: ISyntaxToken[], propertyName: IPropertyNameSyntax): MemberVariableDeclarationSyntax { @@ -1194,53 +1362,29 @@ module TypeScript.Parser { parseModifiers(), parseIndexSignature(), eatExplicitOrAutomaticSemicolon(/*allowWithoutNewLine:*/ false)); } - function tryAddUnexpectedEqualsGreaterThanToken(callSignature: CallSignatureSyntax): boolean { - var token0 = currentToken(); - - var hasEqualsGreaterThanToken = token0.kind === SyntaxKind.EqualsGreaterThanToken; - if (hasEqualsGreaterThanToken) { - // We can only do this if the call signature actually contains a final token that we - // could add the => to. - var _lastToken = lastToken(callSignature); - if (_lastToken && _lastToken.fullWidth() > 0) { - // Previously the language allowed "function f() => expr;" as a shorthand for - // "function f() { return expr; }. - // - // Detect if the user is typing this and attempt recovery. - var diagnostic = new Diagnostic(fileName, source.text.lineMap(), - start(token0, source.text), width(token0), DiagnosticCode.Unexpected_token_0_expected, [SyntaxFacts.getText(SyntaxKind.OpenBraceToken)]); - addDiagnostic(diagnostic); - - // Skip over the => It will get attached to whatever comes next. - skipToken(token0); - return true; - } - } - - - return false; - } - function isFunctionDeclaration(modifierCount: number): boolean { return peekToken(modifierCount).kind === SyntaxKind.FunctionKeyword; } function parseFunctionDeclaration(): FunctionDeclarationSyntax { - var modifiers = parseModifiers(); - var functionKeyword = eatToken(SyntaxKind.FunctionKeyword); - var identifier = eatIdentifierToken(); - var callSignature = parseCallSignature(/*requireCompleteTypeParameterList:*/ false); + return parseFunctionDeclarationWorker( + parseModifiers(), eatToken(SyntaxKind.FunctionKeyword), tryEatToken(SyntaxKind.AsteriskToken)); + } - // If we got an errant => then we want to parse what's coming up without requiring an - // open brace. - var parseBlockEvenWithNoOpenBrace = tryAddUnexpectedEqualsGreaterThanToken(callSignature); + function parseFunctionDeclarationWorker(modifiers: ISyntaxToken[], functionKeyword: ISyntaxToken, asteriskToken: ISyntaxToken): FunctionDeclarationSyntax { + // GeneratorDeclaration[Yield, Default] : + // function * BindingIdentifier[?Yield](FormalParameters[Yield, GeneratorParameter]) { GeneratorBody[Yield] } - // Parse a block if we're on a bock, or if we saw a '=>' - var blockOrSemicolonToken = parseBlockEvenWithNoOpenBrace || isBlock() - ? parseBlock(parseBlockEvenWithNoOpenBrace, /*checkForStrictMode:*/ true) - : eatExplicitOrAutomaticSemicolon(/*allowWithoutNewline:*/ false); - - return new FunctionDeclarationSyntax(parseNodeData, modifiers, functionKeyword, identifier, callSignature, blockOrSemicolonToken); + var isGenerator = asteriskToken !== undefined; + return new FunctionDeclarationSyntax(parseNodeData, + modifiers, + functionKeyword, + asteriskToken, + eatIdentifierToken(), + parseCallSignature(/*requireCompleteTypeParameterList:*/ false, /*yieldContext:*/ isGenerator, /*generatorParameterContext:*/ isGenerator), + isBlockOrArrow() + ? parseFunctionBlock(/*yieldContext:*/ isGenerator) + : eatExplicitOrAutomaticSemicolon(/*allowWithoutNewline:*/ false)); } function parseModuleName(): INameSyntax { @@ -1262,8 +1406,12 @@ module TypeScript.Parser { function parseInterfaceDeclaration(): InterfaceDeclarationSyntax { return new InterfaceDeclarationSyntax(parseNodeData, - parseModifiers(),eatToken(SyntaxKind.InterfaceKeyword), eatIdentifierToken(), - tryParseTypeParameterList(/*requireCompleteTypeParameterList:*/ false), parseHeritageClauses(), parseObjectType()); + parseModifiers(), + eatToken(SyntaxKind.InterfaceKeyword), + eatIdentifierToken(), + tryParseTypeParameterList(/*requireCompleteTypeParameterList:*/ false), + parseHeritageClauses(/*isClassHeritageClauses:*/ false), + parseObjectType()); } function parseObjectType(): ObjectTypeSyntax { @@ -1330,7 +1478,10 @@ module TypeScript.Parser { } if (isCallSignature(/*tokenIndex:*/ 0)) { - return parseCallSignature(/*requireCompleteTypeParameterList:*/ false); + // A call signature for a type member can both use 'yield' as a parameter name, and + // does not have parameter initializers. So we can pass 'false' for both [Yield] + // and [GeneratorParameter]. + return parseCallSignature(/*requireCompleteTypeParameterList:*/ false, /*yieldContext:*/ false, /*generatorParameterContext:*/ false); } else if (isConstructSignature()) { return parseConstructSignature(); @@ -1355,7 +1506,10 @@ module TypeScript.Parser { } function parseConstructSignature(): ConstructSignatureSyntax { - return new ConstructSignatureSyntax(parseNodeData, eatToken(SyntaxKind.NewKeyword), parseCallSignature(/*requireCompleteTypeParameterList:*/ false)); + // Construct signatures have no [Yield] or [GeneratorParameter] restrictions. + return new ConstructSignatureSyntax(parseNodeData, + eatToken(SyntaxKind.NewKeyword), + parseCallSignature(/*requireCompleteTypeParameterList:*/ false, /*yieldContext:*/ false, /*generatorParameterContext:*/ false)); } function parseIndexSignature(): IndexSignatureSyntax { @@ -1366,8 +1520,12 @@ module TypeScript.Parser { } function parseMethodSignature(propertyName: IPropertyNameSyntax, questionToken: ISyntaxToken): MethodSignatureSyntax { + // Method signatues don't exist in expression contexts. So they have neither + // [Yield] nor [GeneratorParameter] return new MethodSignatureSyntax(parseNodeData, - propertyName, questionToken, parseCallSignature(/*requireCompleteTypeParameterList:*/ false)); + propertyName, + questionToken, + parseCallSignature(/*requireCompleteTypeParameterList:*/ false, /*yieldContext:*/ false, /*generatorParameterContext:*/ false)); } function parsePropertySignature(propertyName: IPropertyNameSyntax, questionToken: ISyntaxToken): PropertySignatureSyntax { @@ -1591,7 +1749,7 @@ module TypeScript.Parser { } case SyntaxKind.IfKeyword: return parseIfStatement(_currentToken); - case SyntaxKind.OpenBraceToken: return parseBlock(/*parseStatementsEvenWithNoOpenBrace:*/ false, /*checkForStrictMode:*/ false); + case SyntaxKind.OpenBraceToken: return parseStatementBlock(); case SyntaxKind.ReturnKeyword: return parseReturnStatement(_currentToken); case SyntaxKind.SwitchKeyword: return parseSwitchStatement(_currentToken); case SyntaxKind.ThrowKeyword: return parseThrowStatement(_currentToken); @@ -1663,7 +1821,7 @@ module TypeScript.Parser { var savedListParsingState = listParsingState; listParsingState |= (1 << ListParsingState.TryBlock_Statements); - var block = parseBlock(/*parseStatementsEvenWithNoOpenBrace:*/ false, /*checkForStrictMode:*/ false); + var block = parseStatementBlock(); listParsingState = savedListParsingState; var catchClause: CatchClauseSyntax = undefined; @@ -1684,7 +1842,7 @@ module TypeScript.Parser { function parseCatchClauseBlock(): BlockSyntax { var savedListParsingState = listParsingState; listParsingState |= (1 << ListParsingState.CatchBlock_Statements); - var block = parseBlock(/*parseStatementsEvenWithNoOpenBrace:*/ false, /*checkForStrictMode:*/ false); + var block = parseStatementBlock(); listParsingState = savedListParsingState; return block; @@ -1698,7 +1856,8 @@ module TypeScript.Parser { function parseFinallyClause(): FinallyClauseSyntax { return new FinallyClauseSyntax(parseNodeData, - eatToken(SyntaxKind.FinallyKeyword), parseBlock(/*parseStatementsEvenWithNoOpenBrace:*/ false, /*checkForStrictMode:*/ false)); + eatToken(SyntaxKind.FinallyKeyword), + parseStatementBlock()); } function parseWithStatement(withKeyword: ISyntaxToken): WithStatementSyntax { @@ -1967,7 +2126,7 @@ module TypeScript.Parser { return new OmittedExpressionSyntax(parseNodeData); } - return allowInAnd(tryParseAssignmentExpressionOrHigher_NoForce); + return allowInAnd(tryParseAssignmentExpressionOrHigher); } function isExpression(currentToken: ISyntaxToken): boolean { @@ -2009,14 +2168,9 @@ module TypeScript.Parser { case SyntaxKind.SlashToken: case SyntaxKind.SlashEqualsToken: - // Note: if we see a / or /= token then we always consider this an expression. Why? - // Well, either that / or /= is actually a regular expression, in which case we're - // definitely an expression. Or, it's actually a divide. In which case, we *still* - // want to think of ourself as an expression. "But wait", you say. '/' doesn't - // start an expression. That's true. BUt like the above check for =>, for error - // tolerance, we will consider ourselves in an expression. We'll then parse out an - // missing identifier and then will consume the / token naturally as a binary - // expression. + // Note: if we see a / or /= token then we always consider this an expression. + // The / or /= will actually be the start of a regex that we will contextually + // rescan. // Simple epxressions. case SyntaxKind.SuperKeyword: @@ -2036,6 +2190,12 @@ module TypeScript.Parser { // For function expressions. case SyntaxKind.FunctionKeyword: return true; + + case SyntaxKind.YieldKeyword: + // Yield always starts an expression. Either it is an identifier (in which case + // it is definitely an expression). Or it's a keyword (either because we're in + // a generator, or in strict mode (or both)) and it started a yield expression. + return true; } return isIdentifier(currentToken); @@ -2191,7 +2351,8 @@ module TypeScript.Parser { // = AssignmentExpression[?In, ?Yield] return new EqualsValueClauseSyntax(parseNodeData, - eatToken(SyntaxKind.EqualsToken), tryParseAssignmentExpressionOrHigher(/*force:*/ true)); + eatToken(SyntaxKind.EqualsToken), + parseAssignmentExpressionOrHigher()); } function parseExpression(): IExpressionSyntax { @@ -2199,50 +2360,43 @@ module TypeScript.Parser { // AssignmentExpression[in] // Expression[in] , AssignmentExpression[in] - var leftOperand = tryParseAssignmentExpressionOrHigher(/*force:*/ true); + var leftOperand = parseAssignmentExpressionOrHigher(); while (true) { var _currentToken = currentToken(); if (_currentToken.kind !== SyntaxKind.CommaToken) { break; } - leftOperand = new BinaryExpressionSyntax(parseNodeData, leftOperand, consumeToken(_currentToken), - tryParseAssignmentExpressionOrHigher(/*force:*/ true)); + leftOperand = new BinaryExpressionSyntax(parseNodeData, + leftOperand, + consumeToken(_currentToken), + parseAssignmentExpressionOrHigher()); } return leftOperand; } - function tryParseAssignmentExpressionOrHigher_NoForce(): IExpressionSyntax { - return tryParseAssignmentExpressionOrHigher(/*force:*/ false); + function tryParseAssignmentExpressionOrHigher(): IExpressionSyntax { + return tryParseAssignmentExpressionOrHigherWorker(/*force:*/ false); } - function tryParseAssignmentExpressionOrHigher_Force(): IExpressionSyntax { - return tryParseAssignmentExpressionOrHigher(/*force:*/ true); + function parseAssignmentExpressionOrHigher(): IExpressionSyntax { + return tryParseAssignmentExpressionOrHigherWorker(/*force:*/ true); } // Called when you need to parse an expression, but you do not want to allow 'CommaExpressions'. // i.e. if you have "var a = 1, b = 2" then when we parse '1' we want to parse with higher // precedence than 'comma'. Otherwise we'll get: "var a = (1, (b = 2))", instead of // "var a = (1), b = (2)"); - function tryParseAssignmentExpressionOrHigher(force: boolean): IExpressionSyntax { + function tryParseAssignmentExpressionOrHigherWorker(force: boolean): IExpressionSyntax { // Augmented by TypeScript: // - // AssignmentExpression[in]: - // 1) ConditionalExpression[in] - // 2) LeftHandSideExpression = AssignmentExpression[in] - // 3) LeftHandSideExpression AssignmentOperator AssignmentExpression[in] - // 4) ArrowFunctionExpression <-- added by TypeScript - // - // Open spec question. Right now, there is no 'ArrowFunctionExpression[in]' variant. - // Thus, if the user has: - // - // for (var a = () => b in c) {} - // - // Then we will fail to parse (because the 'in' will be consumed as part of the body of - // the lambda, and not as part of the 'for' statement). This is likely not an issue - // whatsoever as there seems to be no good reason why anyone would ever write code like - // the above. + // AssignmentExpression[in,yield]: + // 1) ConditionalExpression[?in,?yield] + // 2) LeftHandSideExpression = AssignmentExpression[?in,?yield] + // 3) LeftHandSideExpression AssignmentOperator AssignmentExpression[?in,?yield] + // 4) ArrowFunctionExpression[?in,?yield] + // 5) [+Yield] YieldExpression[?In] // // Note: for ease of implementation we treat productions '2' and '3' as the same thing. // (i.e. they're both BinaryExpressions with an assignment operator in it). @@ -2252,6 +2406,10 @@ module TypeScript.Parser { // LeftHandSideExpression, nor does it start a ConditionalExpression. So we are done // with AssignmentExpression if we see one. var _currentToken = currentToken(); + if (isYieldExpression(_currentToken)) { + return parseYieldExpression(_currentToken); + } + var arrowFunction = tryParseAnyArrowFunctionExpression(_currentToken); if (arrowFunction) { return arrowFunction; @@ -2278,8 +2436,10 @@ module TypeScript.Parser { // Check for recursive assignment expressions. if (SyntaxFacts.isAssignmentOperatorToken(operatorToken.kind)) { - return new BinaryExpressionSyntax(parseNodeData, leftOperand, consumeToken(operatorToken), - tryParseAssignmentExpressionOrHigher(/*force:*/ true)); + return new BinaryExpressionSyntax(parseNodeData, + leftOperand, + consumeToken(operatorToken), + parseAssignmentExpressionOrHigher()); } } @@ -2287,6 +2447,64 @@ module TypeScript.Parser { return parseConditionalExpressionRest(leftOperand); } + function isYieldExpression(_currentToken: ISyntaxToken): boolean { + if (_currentToken.kind === SyntaxKind.YieldKeyword) { + // If we have a 'yield' keyword, and htis is a context where yield expressions are + // allowed, then definitely parse out a yield expression. + if (yieldContext) { + return true; + } + + if (strictModeContext) { + // If we're in strict mode, then 'yield' is a keyword, could only ever start + // a yield expression. + return true; + } + + // We're in a context where 'yield expr' is not allowed. However, if we can + // definitely tell that the user was trying to parse a 'yield expr' and not + // just a normal expr that start with a 'yield' identifier, then parse out + // a 'yield expr'. We can then report an error later that they are only + // allowed in generator expressions. + // + // for example, if we see 'yield(foo)', then we'll have to treat that as an + // invocation expression of something called 'yield'. However, if we have + // 'yield foo' then that is not legal as a normal expression, so we can + // definitely recognize this as a yield expression. + // + // for now we just check if the next token is an identifier. More heuristics + // can be added here later as necessary. We just need to make sure that we + // don't accidently consume something legal. + var token1 = peekToken(1); + if (!isOnDifferentLineThanPreviousToken(token1) && isIdentifier(token1)) { + return true; + } + } + + return false; + } + + function parseYieldExpression(yieldKeyword: ISyntaxToken): YieldExpressionSyntax { + // YieldExpression[In] : + // yield + // yield [no LineTerminator here] [Lexical goal InputElementRegExp]AssignmentExpression[?In, Yield] + // yield [no LineTerminator here] * [Lexical goal InputElementRegExp]AssignmentExpression[?In, Yield] + + yieldKeyword = consumeToken(yieldKeyword); + var _currentToken = currentToken(); + + if (!isOnDifferentLineThanPreviousToken(_currentToken) && + (_currentToken.kind === SyntaxKind.AsteriskToken || isExpression(_currentToken))) { + + return new YieldExpressionSyntax(parseNodeData, yieldKeyword, tryEatToken(SyntaxKind.AsteriskToken), parseAssignmentExpressionOrHigher()); + } + else { + // if the next token is not on the same line as yield. or we don't have an '*' or + // the start of an expressin, then this is just a simple "yield" expression. + return new YieldExpressionSyntax(parseNodeData, yieldKeyword, /*asterixToken:*/ undefined, /*expression;*/ undefined); + } + } + function tryParseAnyArrowFunctionExpression(_currentToken: ISyntaxToken): IExpressionSyntax { return isSimpleArrowFunctionExpression(_currentToken) ? parseSimpleArrowFunctionExpression() @@ -2340,12 +2558,15 @@ module TypeScript.Parser { return leftOperand; } - // Note: we explicitly do *not* pass 'allowIn' to the whenTrue part. An 'in' expression is always - // allowed in the 'true' part of a conditional expression. + // Note: we explicitly 'allowIn' in the whenTrue part of the condition expression, and + // we do not that for the 'whenFalse' part. return new ConditionalExpressionSyntax(parseNodeData, - leftOperand, consumeToken(_currentToken), allowInAnd(tryParseAssignmentExpressionOrHigher_Force), - eatToken(SyntaxKind.ColonToken), tryParseAssignmentExpressionOrHigher(/*force:*/ true)); + leftOperand, + consumeToken(_currentToken), + allowInAnd(parseAssignmentExpressionOrHigher), + eatToken(SyntaxKind.ColonToken), + parseAssignmentExpressionOrHigher()); } function parseBinaryExpressionRest(precedence: BinaryExpressionPrecedence, leftOperand: IExpressionSyntax): IExpressionSyntax { @@ -2367,7 +2588,7 @@ module TypeScript.Parser { } // also, if it's the 'in' operator, only allow if our caller allows it. - if (tokenKind === SyntaxKind.InKeyword && disallowIn) { + if (tokenKind === SyntaxKind.InKeyword && disallowInContext) { break; } @@ -2695,7 +2916,7 @@ module TypeScript.Parser { // cause a missing identiifer to be created), so that we will then consume the // comma and the following list items). var force = currentToken().kind === SyntaxKind.CommaToken; - return allowInAnd(force ? tryParseAssignmentExpressionOrHigher_Force : tryParseAssignmentExpressionOrHigher_NoForce); + return allowInAnd(force ? parseAssignmentExpressionOrHigher : tryParseAssignmentExpressionOrHigher); } function parseElementAccessArgumentExpression(openBracketToken: ISyntaxToken, inObjectCreation: boolean) { @@ -2751,15 +2972,9 @@ module TypeScript.Parser { case SyntaxKind.SlashToken: case SyntaxKind.SlashEqualsToken: - // If we see a standalone / or /= and we're expecting a term, then try to reparse + // If we see a standalone / or /= and we're expecting an expression, then reparse // it as a regular expression. - var result = tryReparseDivideAsRegularExpression(); - - // If we get a result, then use it. Otherwise, create a missing identifier so - // that parsing can continue. Note: we do this even if 'force' is false. That's - // because we *do* want to consider a standalone / as an expression that should be - // returned from tryParseExpression even when 'force' is set to false. - return result || eatIdentifierToken(DiagnosticCode.Expression_expected); + return reparseDivideAsRegularExpression(); } if (!force) { @@ -2770,7 +2985,7 @@ module TypeScript.Parser { return eatIdentifierToken(DiagnosticCode.Expression_expected); } - function tryReparseDivideAsRegularExpression(): IPrimaryExpressionSyntax { + function reparseDivideAsRegularExpression(): IPrimaryExpressionSyntax { // If we see a / or /= token, then that may actually be the start of a regex in certain // contexts. @@ -2787,18 +3002,9 @@ module TypeScript.Parser { // Debug.assert(SyntaxFacts.isAnyDivideOrRegularExpressionToken(currentToken.kind)); var tokenKind = currentToken.kind; - if (tokenKind === SyntaxKind.SlashToken || tokenKind === SyntaxKind.SlashEqualsToken) { - // Still came back as a / or /=. This is not a regular expression literal. - return undefined; - } - else if (tokenKind === SyntaxKind.RegularExpressionLiteral) { - return consumeToken(currentToken); - } - else { - // Something *very* wrong happened. This is an internal parser fault that we need - // to figure out and fix. - throw Errors.invalidOperation(); - } + Debug.assert(tokenKind === SyntaxKind.RegularExpressionLiteral); + + return consumeToken(currentToken); } function parseTypeOfExpression(typeOfKeyword: ISyntaxToken): TypeOfExpressionSyntax { @@ -2814,10 +3020,20 @@ module TypeScript.Parser { } function parseFunctionExpression(functionKeyword: ISyntaxToken): FunctionExpressionSyntax { + return parseFunctionExpressionWorker(consumeToken(functionKeyword), tryEatToken(SyntaxKind.AsteriskToken)); + } + + function parseFunctionExpressionWorker(functionKeyword: ISyntaxToken, asteriskToken: ISyntaxToken) { + // GeneratorExpression : + // function * BindingIdentifier[Yield]opt (FormalParameters[Yield, GeneratorParameter]) { GeneratorBody[Yield] } + + var isGenerator = asteriskToken !== undefined; return new FunctionExpressionSyntax(parseNodeData, - consumeToken(functionKeyword), eatOptionalIdentifierToken(), - parseCallSignature(/*requireCompleteTypeParameterList:*/ false), - parseBlock(/*parseStatementsEvenWithNoOpenBrace:*/ false, /*checkForStrictMode:*/ true)); + functionKeyword, + asteriskToken, + enterYieldContextAnd(eatOptionalIdentifierToken), + parseCallSignature(/*requireCompleteTypeParameterList:*/ false, /*yield:*/ isGenerator, /*generatorParameter:*/ isGenerator), + parseFunctionBlock(/*yield:*/ isGenerator)); } function parseObjectCreationExpression(newKeyword: ISyntaxToken): ObjectCreationExpressionSyntax { @@ -2933,7 +3149,17 @@ module TypeScript.Parser { var _currentToken = currentToken(); // Debug.assert(currentToken.kind === SyntaxKind.OpenParenToken || currentToken.kind === SyntaxKind.LessThanToken); - var callSignature = parseCallSignature(/*requireCompleteTypeParameterList:*/ true); + // Note: ES6 specifies the formal parametes of an arrow function like this: + // + // ArrowFormalParameters[Yield, GeneratorParameter] : + // (StrictFormalParameters[?Yield, ?GeneratorParameter]) + // + // However, the 'GeneratorParameter' portion appears to be a spec bug. There does not + // appear to be any way for that value to be passed in through any grammar constructs. + // + // [Yield], on the other hand, is available, and is passed through. + + var callSignature = parseCallSignature(/*requireCompleteTypeParameterList:*/ true, /*yield:*/ yieldContext, /*generatorParameter:*/ false); if (requireArrow && currentToken().kind !== SyntaxKind.EqualsGreaterThanToken) { return undefined; @@ -2951,7 +3177,7 @@ module TypeScript.Parser { // { FunctionBody } if (isBlock()) { - return parseBlock(/*parseStatementsEvenWithNoOpenBrace:*/ false, /*checkForStrictMode:*/ false); + return parseFunctionBlock(/*allowYield:*/ false); } // We didn't have a block. However, we may be in an error situation. For example, @@ -2966,14 +3192,17 @@ module TypeScript.Parser { // up preemptively closing the containing construct. var _modifierCount = modifierCount(); if (isStatement(_modifierCount, /*inErrorRecovery:*/ false) && - !isExpressionStatement(currentToken()) && - !isFunctionDeclaration(_modifierCount)) { - // We've seen a statement (and it isn't an expressionStatement like 'foo()'), - // so treat this like a block with a missing open brace. - return parseBlock(/*parseStatementsEvenWithNoOpenBrace:*/ true, /*checkForStrictMode:*/ false); + !isExpression(currentToken())) { + // We've seen a statement (and it isn't an expressionStatement like 'foo()'), so + // treat this like a block with a missing open brace. + + return new BlockSyntax(parseNodeData, + eatToken(SyntaxKind.OpenBraceToken), + parseFunctionBlockStatements(), + eatToken(SyntaxKind.CloseBraceToken)); } - return tryParseAssignmentExpressionOrHigher(/*force:*/ true); + return parseAssignmentExpressionOrHigher(); } function isSimpleArrowFunctionExpression(_currentToken: ISyntaxToken): boolean { @@ -3000,6 +3229,11 @@ module TypeScript.Parser { return currentToken().kind === SyntaxKind.OpenBraceToken; } + function isBlockOrArrow(): boolean { + var _currentToken = currentToken(); + return _currentToken.kind === SyntaxKind.OpenBraceToken || _currentToken.kind === SyntaxKind.EqualsGreaterThanToken; + } + function isDefinitelyArrowFunctionExpression(): boolean { var token0 = currentToken(); if (token0.kind !== SyntaxKind.OpenParenToken) { @@ -3171,7 +3405,7 @@ module TypeScript.Parser { // Debug.assert(isPropertyAssignment(/*inErrorRecovery:*/ false)); if (isAccessor(modifierCount(), inErrorRecovery)) { - return parseAccessor(/*checkForStrictMode:*/ true); + return parseAccessor(); } // Note: we don't want to call parsePropertyName here yet as it will convert a keyword @@ -3197,16 +3431,20 @@ module TypeScript.Parser { } } - // All the rest of the property assignments start with property names. They are: + // All the rest of the property assignments start with property names or an asterix. + // They are: // id: e // [e1]: e2 // id() { } // [e]() { } - if (isPropertyName(/*peekIndex:*/ 0, inErrorRecovery)) { + // *id() { } + // *[e]() { } + if (_currentToken.kind === SyntaxKind.AsteriskToken || isPropertyName(/*peekIndex:*/ 0, inErrorRecovery)) { + var asterixToken = tryEatToken(SyntaxKind.AsteriskToken); var propertyName = parsePropertyName(); - if (isCallSignature(/*peekIndex:*/ 0)) { - return parseFunctionPropertyAssignment(propertyName); + if (asterixToken !== undefined || isCallSignature(/*peekIndex:*/ 0)) { + return parseFunctionPropertyAssignment(asterixToken, propertyName); } else { // PropertyName[?Yield] : AssignmentExpression[In, ?Yield] @@ -3218,7 +3456,9 @@ module TypeScript.Parser { // Also, if we have an identifier and it is followed by a colon then this is // definitely a simple property assignment. return new SimplePropertyAssignmentSyntax(parseNodeData, - propertyName, eatToken(SyntaxKind.ColonToken), allowInAnd(tryParseAssignmentExpressionOrHigher_Force)); + propertyName, + eatToken(SyntaxKind.ColonToken), + allowInAnd(parseAssignmentExpressionOrHigher)); } } @@ -3227,6 +3467,7 @@ module TypeScript.Parser { function isPropertyAssignment(inErrorRecovery: boolean): boolean { return isAccessor(modifierCount(), inErrorRecovery) || + currentToken().kind === SyntaxKind.AsteriskToken || isPropertyName(/*peekIndex:*/ 0, inErrorRecovery); } @@ -3271,34 +3512,47 @@ module TypeScript.Parser { } function parsePropertyName(): IPropertyNameSyntax { + // PropertyName[Yield,GeneratorParameter] : See 12.2.5 + // LiteralPropertyName + // [+GeneratorParameter]ComputedPropertyName + // [~GeneratorParameter]ComputedPropertyName[?Yield] + var _currentToken = currentToken(); if (_currentToken.kind === SyntaxKind.OpenBracketToken) { - return parseComputedPropertyName(_currentToken); + return generatorParameterContext + ? exitYieldContextAnd(parseComputedPropertyName) + : parseComputedPropertyName(); } else if (SyntaxFacts.isIdentifierNameOrAnyKeyword(_currentToken)) { // If it was a keyword, convert it to an identifier name. return eatIdentifierNameToken(); } - else { + else if (isLiteralPropertyName(_currentToken)) { // Must have been a literal. return consumeToken(_currentToken); } + else { + return eatIdentifierToken(); + } } - function parseComputedPropertyName(openBracketToken: ISyntaxToken): ComputedPropertyNameSyntax { + function parseComputedPropertyName(): ComputedPropertyNameSyntax { // ComputedPropertyName[Yield] : // [AssignmentExpression[In, ?Yield]] return new ComputedPropertyNameSyntax(parseNodeData, - consumeToken(openBracketToken), - allowInAnd(tryParseAssignmentExpressionOrHigher_Force), + eatToken(SyntaxKind.OpenBracketToken), + allowInAnd(parseAssignmentExpressionOrHigher), eatToken(SyntaxKind.CloseBracketToken)); } - function parseFunctionPropertyAssignment(propertyName: IPropertyNameSyntax): FunctionPropertyAssignmentSyntax { + function parseFunctionPropertyAssignment(asteriskToken: ISyntaxToken, propertyName: IPropertyNameSyntax): FunctionPropertyAssignmentSyntax { + var isGenerator = asteriskToken !== undefined; return new FunctionPropertyAssignmentSyntax(parseNodeData, - propertyName, parseCallSignature(/*requireCompleteTypeParameterList:*/ false), - parseBlock(/*parseBlockEvenWithNoOpenBrace:*/ false, /*checkForStrictMode:*/ true)); + asteriskToken, + propertyName, + parseCallSignature(/*requireCompleteTypeParameterList:*/ false, /*yield:*/ isGenerator, /*generatorParameter:*/ isGenerator), + parseFunctionBlock(/*yield:*/ isGenerator)); } function parseArrayLiteralExpression(openBracketToken: ISyntaxToken): ArrayLiteralExpressionSyntax { @@ -3309,25 +3563,54 @@ module TypeScript.Parser { eatToken(SyntaxKind.CloseBracketToken)); } - function parseBlock(parseBlockEvenWithNoOpenBrace: boolean, checkForStrictMode: boolean): BlockSyntax { + function parseStatementBlock(): BlockSyntax { + // Different from function blocks in that we don't check for strict mode, nor do accept + // a block without an open curly. + var openBraceToken: ISyntaxToken; + return new BlockSyntax(parseNodeData, + openBraceToken = eatToken(SyntaxKind.OpenBraceToken), + openBraceToken.fullWidth() > 0 ? parseSyntaxList(ListParsingState.Block_Statements) : [], + eatToken(SyntaxKind.CloseBraceToken)); + } + + function parseFunctionBlock(_allowYield: boolean): BlockSyntax { + // If we got an errant => then we want to parse what's coming up without requiring an + // open brace. ItWe do this because it's not uncommon for people to get confused as to + // where/when they can use an => and we want to have good error recovery here. + var token0 = currentToken(); + + var hasEqualsGreaterThanToken = token0.kind === SyntaxKind.EqualsGreaterThanToken; + if (hasEqualsGreaterThanToken) { + addDiagnostic(new Diagnostic(fileName, source.text.lineMap(), + start(token0, source.text), width(token0), DiagnosticCode.Unexpected_token_0_expected, [SyntaxFacts.getText(SyntaxKind.OpenBraceToken)])); + + // Skip over the => It will get attached to whatever comes next. + skipToken(token0); + } + var openBraceToken = eatToken(SyntaxKind.OpenBraceToken); var statements: IStatementSyntax[]; - if (parseBlockEvenWithNoOpenBrace || openBraceToken.fullWidth() > 0) { - var savedIsInStrictMode = strictMode; - - var processItems = checkForStrictMode ? updateStrictModeState : undefined; - var statements = parseSyntaxList(ListParsingState.Block_Statements, processItems); - - setStrictMode(savedIsInStrictMode); + if (hasEqualsGreaterThanToken || openBraceToken.fullWidth() > 0) { + statements = _allowYield ? enterYieldContextAnd(parseFunctionBlockStatements) : exitYieldContextAnd(parseFunctionBlockStatements); } return new BlockSyntax(parseNodeData, openBraceToken, statements || [], eatToken(SyntaxKind.CloseBraceToken)); } - function parseCallSignature(requireCompleteTypeParameterList: boolean): CallSignatureSyntax { + function parseFunctionBlockStatements() { + var savedIsInStrictMode = strictModeContext; + var statements = parseSyntaxList(ListParsingState.Block_Statements, updateStrictModeState); + setStrictModeContext(savedIsInStrictMode); + + return statements; + } + + function parseCallSignature(requireCompleteTypeParameterList: boolean, _yieldContext: boolean, _generatorParameterContext: boolean): CallSignatureSyntax { return new CallSignatureSyntax(parseNodeData, - tryParseTypeParameterList(requireCompleteTypeParameterList), parseParameterList(), parseOptionalTypeAnnotation(/*allowStringLiteral:*/ false)); + tryParseTypeParameterList(requireCompleteTypeParameterList), + parseParameterList(_yieldContext, _generatorParameterContext), + parseOptionalTypeAnnotation(/*allowStringLiteral:*/ false)); } function tryParseTypeParameterList(requireCompleteTypeParameterList: boolean): TypeParameterListSyntax { @@ -3376,25 +3659,38 @@ module TypeScript.Parser { return new ConstraintSyntax(parseNodeData, eatToken(SyntaxKind.ExtendsKeyword), parseTypeOrExpression()); } - function tryParseParameterList(): ParameterListSyntax { - if (currentToken().kind === SyntaxKind.OpenParenToken) { - var token1 = peekToken(1); + function parseParameterList(_yieldContext: boolean, _generatorParameterContext: boolean): ParameterListSyntax { + // FormalParameters[Yield,GeneratorParameter] : + // ... + // + // FormalParameter[Yield,GeneratorParameter] : + // BindingElement[?Yield, ?GeneratorParameter] + // + // BindingElement[Yield, GeneratorParameter ] : See 13.2.3 + // SingleNameBinding[?Yield, ?GeneratorParameter] + // [+GeneratorParameter]BindingPattern[?Yield, GeneratorParameter]Initializer[In]opt + // [~GeneratorParameter]BindingPattern[?Yield]Initializer[In, ?Yield]opt + // + // SingleNameBinding[Yield, GeneratorParameter] : See 13.2.3 + // [+GeneratorParameter]BindingIdentifier[Yield]Initializer[In]opt + // [~GeneratorParameter]BindingIdentifier[?Yield]Initializer[In, ?Yield]opt - if (token1.kind === SyntaxKind.CloseParenToken || isParameterHelper(token1)) { - return parseParameterList(); - } - } + var savedYieldContext = yieldContext; + var savedGeneratorParameterContext = generatorParameterContext; - return undefined; - } + setYieldContext(_yieldContext); + setGeneratorParameterContext(_generatorParameterContext); - function parseParameterList(): ParameterListSyntax { var openParenToken: ISyntaxToken; - - return new ParameterListSyntax(parseNodeData, + var result = new ParameterListSyntax(parseNodeData, openParenToken = eatToken(SyntaxKind.OpenParenToken), openParenToken.fullWidth() > 0 ? parseSeparatedSyntaxList(ListParsingState.ParameterList_Parameters) : [], eatToken(SyntaxKind.CloseParenToken)); + + setYieldContext(savedYieldContext); + setGeneratorParameterContext(savedGeneratorParameterContext); + + return result; } function parseOptionalTypeAnnotation(allowStringLiteral: boolean): TypeAnnotationSyntax { @@ -3463,6 +3759,23 @@ module TypeScript.Parser { } function tryParseType(): ITypeSyntax { + // The rules about 'yield' only apply to actual code/expression contexts. They don't + // apply to 'type' contexts. So we disable these parameters here before moving on. + var savedYieldContext = yieldContext; + var savedGeneratorParameterContext = generatorParameterContext; + + setYieldContext(false); + setGeneratorParameterContext(false); + + var result = tryParseTypeWorker(); + + setYieldContext(savedYieldContext); + setGeneratorParameterContext(savedGeneratorParameterContext); + + return result; + } + + function tryParseTypeWorker(): ITypeSyntax { if (isFunctionType()) { return parseFunctionType(); } @@ -3629,17 +3942,21 @@ module TypeScript.Parser { } function parseFunctionType(): FunctionTypeSyntax { + // Function types only exist in the type space and not the expression space. So they + // aren't in the [Yield] or [GeneratorParameter] context. return new FunctionTypeSyntax(parseNodeData, tryParseTypeParameterList(/*requireCompleteTypeParameterList:*/ false), - parseParameterList(), + parseParameterList(/*yield:*/ false, /*generatorParameter:*/ false), eatToken(SyntaxKind.EqualsGreaterThanToken), parseType()); } function parseConstructorType(): ConstructorTypeSyntax { + // Constructor types only exist in the type space and not the expression space. So they + // aren't in the [Yield] or [GeneratorParameter] context. return new ConstructorTypeSyntax(parseNodeData, eatToken(SyntaxKind.NewKeyword), tryParseTypeParameterList(/*requireCompleteTypeParameterList:*/ false), - parseParameterList(), + parseParameterList(/*yield:*/ false, /*generatorParameter:*/ false), eatToken(SyntaxKind.EqualsGreaterThanToken), parseType()); } @@ -3690,13 +4007,22 @@ module TypeScript.Parser { } } - var identifier = eatIdentifierToken(); + // SingleNameBinding[Yield,GeneratorParameter] : See 13.2.3 + // [+GeneratorParameter]BindingIdentifier[Yield]Initializer[In]opt + // [~GeneratorParameter]BindingIdentifier[?Yield]Initializer[In, ?Yield]opt + + var identifier = generatorParameterContext + ? enterYieldContextAnd(eatIdentifierToken) + : eatIdentifierToken(); + var questionToken = tryEatToken(SyntaxKind.QuestionToken); var typeAnnotation = parseOptionalTypeAnnotation(/*allowStringLiteral:*/ true); var equalsValueClause: EqualsValueClauseSyntax = undefined; if (isEqualsValueClause(/*inParameter*/ true)) { - equalsValueClause = parseEqualsValueClause(); + equalsValueClause = generatorParameterContext + ? exitYieldContextAnd(parseEqualsValueClause) + : parseEqualsValueClause(); } return new ParameterSyntax(parseNodeData, dotDotDotToken, modifiers, identifier, questionToken, typeAnnotation, equalsValueClause); @@ -4076,7 +4402,7 @@ module TypeScript.Parser { } function isExpectedVariableDeclaration_VariableDeclaratorsTerminator(): boolean { - if (disallowIn) { + if (disallowInContext) { // This is the case when we're parsing variable declarations in a for/for-in statement. var tokenKind = currentToken().kind; diff --git a/src/services/syntax/prettyPrinter.ts b/src/services/syntax/prettyPrinter.ts index eeb2a8861d0..4bd57ffb62f 100644 --- a/src/services/syntax/prettyPrinter.ts +++ b/src/services/syntax/prettyPrinter.ts @@ -1018,6 +1018,12 @@ module TypeScript.PrettyPrinter { visitNodeOrToken(this, node.expression); } + public visitYieldExpression(node: YieldExpressionSyntax): void { + this.appendToken(node.yieldKeyword); + this.ensureSpace(); + visitNodeOrToken(this, node.expression); + } + public visitDebuggerStatement(node: DebuggerStatementSyntax): void { this.appendToken(node.debuggerKeyword); this.appendToken(node.semicolonToken); diff --git a/src/services/syntax/scanner.ts b/src/services/syntax/scanner.ts index 54f05890e3e..17b127eb6a9 100644 --- a/src/services/syntax/scanner.ts +++ b/src/services/syntax/scanner.ts @@ -281,7 +281,7 @@ module TypeScript.Scanner { LargeScannerToken.prototype.childCount = 0; export interface DiagnosticCallback { - (position: number, width: number, key: string, arguments: any[]): void; + (position: number, width: number, key: string, arguments?: any[]): void; } interface TokenInfo { @@ -1008,7 +1008,7 @@ module TypeScript.Scanner { while (true) { if (index === end) { // Hit the end of the file. - reportDiagnostic(end, 0, DiagnosticCode._0_expected, ["`"]); + reportDiagnostic(end, 0, DiagnosticCode.Unterminated_template_literal); break; } @@ -1144,10 +1144,7 @@ module TypeScript.Scanner { // term, and it sees one of these then it may restart us asking specifically if we could // scan out a regex. if (allowContextualToken) { - var result = tryScanRegularExpressionToken(); - if (result !== SyntaxKind.None) { - return result; - } + return scanRegularExpressionToken(); } if (str.charCodeAt(index) === CharacterCodes.equals) { @@ -1159,7 +1156,7 @@ module TypeScript.Scanner { } } - function tryScanRegularExpressionToken(): SyntaxKind { + function scanRegularExpressionToken(): SyntaxKind { var startIndex = index; var inEscape = false; @@ -1168,8 +1165,9 @@ module TypeScript.Scanner { var ch = str.charCodeAt(index); if (isNaN(ch) || isNewLineCharacter(ch)) { - index = startIndex; - return SyntaxKind.None; + // Hit the end of line, or end of the file. This is not a legal regex. + reportDiagnostic(index, 0, DiagnosticCode.Unterminated_regular_expression_literal); + break; } index++; @@ -1193,7 +1191,7 @@ module TypeScript.Scanner { continue; case CharacterCodes.closeBracket: - // If we ever hit a cloe bracket then we're now no longer in a character + // If we ever hit a close bracket then we're now no longer in a character // class. If we weren't in a character class to begin with, then this has // no effect. inCharacterClass = false; @@ -1219,7 +1217,7 @@ module TypeScript.Scanner { // TODO: The grammar says any identifier part is allowed here. Do we need to support // \u identifiers here? The existing typescript parser does not. - while (isIdentifierPartCharacter[str.charCodeAt(index)]) { + while (index < end && isIdentifierPartCharacter[str.charCodeAt(index)]) { index++; } @@ -1322,7 +1320,7 @@ module TypeScript.Scanner { break; } else if (isNaN(ch) || isNewLineCharacter(ch)) { - reportDiagnostic(Math.min(index, end), 1, DiagnosticCode.Missing_close_quote_character, undefined); + reportDiagnostic(index, 0, DiagnosticCode.Unterminated_string_literal); break; } else { diff --git a/src/services/syntax/syntaxElement.ts b/src/services/syntax/syntaxElement.ts index 6e05cb89587..fe582db6b57 100644 --- a/src/services/syntax/syntaxElement.ts +++ b/src/services/syntax/syntaxElement.ts @@ -17,22 +17,40 @@ module TypeScript { return undefined; } - export function parsedInStrictMode(node: ISyntaxNode): boolean { + export function parsedInStrictModeContext(node: ISyntaxNode): boolean { var info = node.__data; if (info === undefined) { return false; } - return (info & SyntaxConstants.NodeParsedInStrictModeMask) !== 0; + return (info & SyntaxNodeConstants.ParsedInStrictModeContext) !== 0; } - export function parsedInDisallowInMode(node: ISyntaxNode): boolean { + export function parsedInDisallowInContext(node: ISyntaxNode): boolean { var info = node.__data; if (info === undefined) { return false; } - return (info & SyntaxConstants.NodeParsedInDisallowInMask) !== 0; + return (info & SyntaxNodeConstants.ParsedInDisallowInContext) !== 0; + } + + export function parsedInYieldContext(node: ISyntaxNode): boolean { + var info = node.__data; + if (info === undefined) { + return false; + } + + return (info & SyntaxNodeConstants.ParsedInYieldContext) !== 0; + } + + export function parsedInGeneratorParameterContext(node: ISyntaxNode): boolean { + var info = node.__data; + if (info === undefined) { + return false; + } + + return (info & SyntaxNodeConstants.ParsedInGeneratorParameterContext) !== 0; } export function previousToken(token: ISyntaxToken): ISyntaxToken { @@ -266,7 +284,7 @@ module TypeScript { } var info = data(element); - return info >>> SyntaxConstants.NodeFullWidthShift; + return (info / SyntaxNodeConstants.FullWidthShift) | 0; } export function isIncrementallyUnusable(element: ISyntaxElement): boolean { @@ -274,7 +292,7 @@ module TypeScript { return (element).isIncrementallyUnusable(); } - return (data(element) & SyntaxConstants.NodeIncrementallyUnusableMask) !== 0; + return (data(element) & SyntaxNodeConstants.IncrementallyUnusableMask) !== 0; } function data(element: ISyntaxElement): number { @@ -288,7 +306,7 @@ module TypeScript { info = 0; } - if ((info & SyntaxConstants.NodeDataComputed) === 0) { + if ((info & SyntaxNodeConstants.DataComputed) === 0) { info |= computeData(element); dataElement.__data = info; } @@ -297,9 +315,9 @@ module TypeScript { } function combineData(fullWidth: number, isIncrementallyUnusable: boolean) { - return (fullWidth << SyntaxConstants.NodeFullWidthShift) - | (isIncrementallyUnusable ? SyntaxConstants.NodeIncrementallyUnusableMask : 0) - | SyntaxConstants.NodeDataComputed; + return (fullWidth * SyntaxNodeConstants.FullWidthShift) + + (isIncrementallyUnusable ? SyntaxNodeConstants.IncrementallyUnusableMask : 0) + + SyntaxNodeConstants.DataComputed; } function listComputeData(list: ISyntaxNodeOrToken[]): number { diff --git a/src/services/syntax/syntaxGenerator.ts b/src/services/syntax/syntaxGenerator.ts index ef758782a07..99218a04920 100644 --- a/src/services/syntax/syntaxGenerator.ts +++ b/src/services/syntax/syntaxGenerator.ts @@ -23,7 +23,6 @@ interface IMemberDefinition { isSeparatedList?: boolean; requiresAtLeastOneItem?: boolean; isOptional?: boolean; - tokenKinds?: string[]; isTypeScriptSpecific: boolean; elementType?: string; } @@ -56,9 +55,9 @@ var definitions:ITypeDefinition[] = [ baseType: 'ISyntaxNode', interfaces: ['IModuleReferenceSyntax'], children: [ - { name: 'requireKeyword', isToken: true, tokenKinds: ['RequireKeyword'], excludeFromAST: true }, + { name: 'requireKeyword', isToken: true, excludeFromAST: true }, { name: 'openParenToken', isToken: true, excludeFromAST: true }, - { name: 'stringLiteral', isToken: true, tokenKinds: ['StringLiteral'] }, + { name: 'stringLiteral', isToken: true }, { name: 'closeParenToken', isToken: true, excludeFromAST: true } ], isTypeScriptSpecific: true @@ -79,7 +78,7 @@ var definitions:ITypeDefinition[] = [ children: [ { name: 'modifiers', isList: true, elementType: 'ISyntaxToken' }, { name: 'importKeyword', isToken: true, excludeFromAST: true }, - { name: 'identifier', isToken: true, tokenKinds: ['IdentifierName'] }, + { name: 'identifier', isToken: true }, { name: 'equalsToken', isToken: true, excludeFromAST: true }, { name: 'moduleReference', type: 'IModuleReferenceSyntax' }, { name: 'semicolonToken', isToken: true, isOptional: true, excludeFromAST: true } @@ -93,7 +92,7 @@ var definitions:ITypeDefinition[] = [ children: [ { name: 'exportKeyword', isToken: true, excludeFromAST: true }, { name: 'equalsToken', isToken: true, excludeFromAST: true }, - { name: 'identifier', isToken: true, tokenKinds: ['IdentifierName'] }, + { name: 'identifier', isToken: true }, { name: 'semicolonToken', isToken: true, isOptional: true, excludeFromAST: true } ], isTypeScriptSpecific: true @@ -105,7 +104,7 @@ var definitions:ITypeDefinition[] = [ children: [ { name: 'modifiers', isList: true, elementType: 'ISyntaxToken' }, { name: 'classKeyword', isToken: true, excludeFromAST: true }, - { name: 'identifier', isToken: true, tokenKinds: ['IdentifierName'] }, + { name: 'identifier', isToken: true }, { name: 'typeParameterList', type: 'TypeParameterListSyntax', isOptional: true }, { name: 'heritageClauses', isList: true, elementType: 'HeritageClauseSyntax' }, { name: 'openBraceToken', isToken: true, excludeFromAST: true }, @@ -121,7 +120,7 @@ var definitions:ITypeDefinition[] = [ children: [ { name: 'modifiers', isList: true, elementType: 'ISyntaxToken' }, { name: 'interfaceKeyword', isToken: true, excludeFromAST: true }, - { name: 'identifier', isToken: true, tokenKinds: ['IdentifierName'] }, + { name: 'identifier', isToken: true }, { name: 'typeParameterList', type: 'TypeParameterListSyntax', isOptional: true }, { name: 'heritageClauses', isList: true, elementType: 'HeritageClauseSyntax' }, { name: 'body', type: 'ObjectTypeSyntax' } @@ -158,7 +157,8 @@ var definitions:ITypeDefinition[] = [ children: [ { name: 'modifiers', isList: true, elementType: 'ISyntaxToken', isTypeScriptSpecific: true }, { name: 'functionKeyword', isToken: true, excludeFromAST: true }, - { name: 'identifier', isToken: true, tokenKinds: ['IdentifierName'] }, + { name: 'asterixToken', isToken: true, isOptional: true }, + { name: 'identifier', isToken: true }, { name: 'callSignature', type: 'CallSignatureSyntax' }, { name: 'body', type: 'BlockSyntax | ISyntaxToken', isOptional: true } ] @@ -262,7 +262,7 @@ var definitions:ITypeDefinition[] = [ children: [ { name: 'left', type: 'INameSyntax' }, { name: 'dotToken', isToken: true, excludeFromAST: true }, - { name: 'right', isToken: true, tokenKinds:['IdentifierName'] } + { name: 'right', isToken: true } ], // Qualified names only show up in Types, which are TypeScript specific. Note that a dotted // expression (like A.B.Foo()) is a MemberAccessExpression, not a QualifiedName. @@ -403,7 +403,7 @@ var definitions:ITypeDefinition[] = [ children: [ { name: 'dotDotDotToken', isToken: true, isOptional: true, isTypeScriptSpecific: true }, { name: 'modifiers', isList: true, elementType: 'ISyntaxToken' }, - { name: 'identifier', isToken: true, tokenKinds: ['IdentifierName'] }, + { name: 'identifier', isToken: true }, { name: 'questionToken', isToken: true, isOptional: true, isTypeScriptSpecific: true }, { name: 'typeAnnotation', type: 'TypeAnnotationSyntax', isOptional: true, isTypeScriptSpecific: true }, { name: 'equalsValueClause', type: 'EqualsValueClauseSyntax', isOptional: true, isTypeScriptSpecific: true } @@ -416,7 +416,7 @@ var definitions:ITypeDefinition[] = [ children: [ { name: 'expression', type: 'ILeftHandSideExpressionSyntax' }, { name: 'dotToken', isToken: true, excludeFromAST: true }, - { name: 'name', isToken: true, tokenKinds: ['IdentifierName'] } + { name: 'name', isToken: true } ] }, { @@ -582,7 +582,7 @@ var definitions:ITypeDefinition[] = [ name: 'TypeParameterSyntax', baseType: 'ISyntaxNode', children: [ - { name: 'identifier', isToken: true, tokenKinds: ['IdentifierName'] }, + { name: 'identifier', isToken: true }, { name: 'constraint', type: 'ConstraintSyntax', isOptional: true } ], isTypeScriptSpecific: true @@ -645,6 +645,7 @@ var definitions:ITypeDefinition[] = [ interfaces: ['IMemberDeclarationSyntax'], children: [ { name: 'modifiers', isList: true, elementType: 'ISyntaxToken' }, + { name: 'asterixToken', isToken: true, isOptional: true }, { name: 'propertyName', type: 'IPropertyNameSyntax' }, { name: 'callSignature', type: 'CallSignatureSyntax' }, { name: 'body', type: 'BlockSyntax | ISyntaxToken', isOptional: true } @@ -769,7 +770,7 @@ var definitions:ITypeDefinition[] = [ interfaces: ['IStatementSyntax'], children: [ { name: 'breakKeyword', isToken: true }, - { name: 'identifier', isToken: true, isOptional: true, tokenKinds: ['IdentifierName'] }, + { name: 'identifier', isToken: true, isOptional: true }, { name: 'semicolonToken', isToken: true, isOptional: true, excludeFromAST: true } ] }, @@ -779,7 +780,7 @@ var definitions:ITypeDefinition[] = [ interfaces: ['IStatementSyntax'], children: [ { name: 'continueKeyword', isToken: true }, - { name: 'identifier', isToken: true, isOptional: true, tokenKinds: ['IdentifierName'] }, + { name: 'identifier', isToken: true, isOptional: true }, { name: 'semicolonToken', isToken: true, isOptional: true, excludeFromAST: true } ] }, @@ -791,9 +792,9 @@ var definitions:ITypeDefinition[] = [ { name: 'forKeyword', isToken: true, excludeFromAST: true }, { name: 'openParenToken', isToken: true, excludeFromAST: true }, { name: 'initializer', type: 'VariableDeclarationSyntax | IExpressionSyntax', isOptional: true }, - { name: 'firstSemicolonToken', isToken: true, tokenKinds: ['SemicolonToken'], excludeFromAST: true }, + { name: 'firstSemicolonToken', isToken: true, excludeFromAST: true }, { name: 'condition', type: 'IExpressionSyntax', isOptional: true }, - { name: 'secondSemicolonToken', isToken: true, tokenKinds: ['SemicolonToken'], excludeFromAST: true }, + { name: 'secondSemicolonToken', isToken: true, excludeFromAST: true }, { name: 'incrementor', type: 'IExpressionSyntax', isOptional: true }, { name: 'closeParenToken', isToken: true, excludeFromAST: true }, { name: 'statement', type: 'IStatementSyntax' } @@ -844,7 +845,7 @@ var definitions:ITypeDefinition[] = [ children: [ { name: 'modifiers', isList: true, elementType: 'ISyntaxToken' }, { name: 'enumKeyword', isToken: true, excludeFromAST: true }, - { name: 'identifier', isToken: true, tokenKinds: ['IdentifierName'] }, + { name: 'identifier', isToken: true }, { name: 'openBraceToken', isToken: true, excludeFromAST: true }, { name: 'enumElements', isSeparatedList: true, elementType: 'EnumElementSyntax' }, { name: 'closeBraceToken', isToken: true, excludeFromAST: true } @@ -906,6 +907,7 @@ var definitions:ITypeDefinition[] = [ baseType: 'ISyntaxNode', interfaces: ['IPropertyAssignmentSyntax'], children: [ + { name: 'asterixToken', isToken: true, isOptional: true }, { name: 'propertyName', type: 'IPropertyNameSyntax' }, { name: 'callSignature', type: 'CallSignatureSyntax' }, { name: 'block', type: 'BlockSyntax' } @@ -917,7 +919,8 @@ var definitions:ITypeDefinition[] = [ interfaces: ['IPrimaryExpressionSyntax'], children: [ { name: 'functionKeyword', isToken: true, excludeFromAST: true }, - { name: 'identifier', isToken: true, isOptional: true, tokenKinds: ['IdentifierName'] }, + { name: 'asterixToken', isToken: true, isOptional: true }, + { name: 'identifier', isToken: true, isOptional: true }, { name: 'callSignature', type: 'CallSignatureSyntax' }, { name: 'block', type: 'BlockSyntax' }] }, @@ -944,7 +947,7 @@ var definitions:ITypeDefinition[] = [ children: [ { name: 'catchKeyword', isToken: true, excludeFromAST: true }, { name: 'openParenToken', isToken: true, excludeFromAST: true }, - { name: 'identifier', isToken: true, tokenKinds: ['IdentifierName'] }, + { name: 'identifier', isToken: true }, { name: 'typeAnnotation', type: 'TypeAnnotationSyntax', isOptional: true, isTypeScriptSpecified: true }, { name: 'closeParenToken', isToken: true, excludeFromAST: true }, { name: 'block', type: 'BlockSyntax' }] @@ -961,7 +964,7 @@ var definitions:ITypeDefinition[] = [ baseType: 'ISyntaxNode', interfaces: ['IStatementSyntax'], children: [ - { name: 'identifier', isToken: true, tokenKinds: ['IdentifierName'] }, + { name: 'identifier', isToken: true }, { name: 'colonToken', isToken: true, excludeFromAST: true }, { name: 'statement', type: 'IStatementSyntax' }] }, @@ -1002,6 +1005,15 @@ var definitions:ITypeDefinition[] = [ { name: 'voidKeyword', isToken: true, excludeFromAST: true }, { name: 'expression', type: 'IUnaryExpressionSyntax' }] }, + { + name: 'YieldExpressionSyntax', + baseType: 'ISyntaxNode', + interfaces: ['IExpressionSyntax'], + children: [ + { name: 'yieldKeyword', isToken: true }, + { name: 'asterixToken', isToken: true, isOptional: true }, + { name: 'expression', type: 'IExpressionSyntax', isOptional: true }] + }, { name: 'DebuggerStatementSyntax', baseType: 'ISyntaxNode', diff --git a/src/services/syntax/syntaxInterfaces.generated.ts b/src/services/syntax/syntaxInterfaces.generated.ts index 256a5aeb1de..acb2f283902 100644 --- a/src/services/syntax/syntaxInterfaces.generated.ts +++ b/src/services/syntax/syntaxInterfaces.generated.ts @@ -92,11 +92,12 @@ module TypeScript { export interface FunctionDeclarationSyntax extends ISyntaxNode, IStatementSyntax { modifiers: ISyntaxToken[]; functionKeyword: ISyntaxToken; + asterixToken: ISyntaxToken; identifier: ISyntaxToken; callSignature: CallSignatureSyntax; body: BlockSyntax | ISyntaxToken; } - export interface FunctionDeclarationConstructor { new (data: number, modifiers: ISyntaxToken[], functionKeyword: ISyntaxToken, identifier: ISyntaxToken, callSignature: CallSignatureSyntax, body: BlockSyntax | ISyntaxToken): FunctionDeclarationSyntax } + export interface FunctionDeclarationConstructor { new (data: number, modifiers: ISyntaxToken[], functionKeyword: ISyntaxToken, asterixToken: ISyntaxToken, identifier: ISyntaxToken, callSignature: CallSignatureSyntax, body: BlockSyntax | ISyntaxToken): FunctionDeclarationSyntax } export interface ModuleDeclarationSyntax extends ISyntaxNode, IModuleElementSyntax { modifiers: ISyntaxToken[]; @@ -150,11 +151,12 @@ module TypeScript { export interface MemberFunctionDeclarationSyntax extends ISyntaxNode, IMemberDeclarationSyntax { modifiers: ISyntaxToken[]; + asterixToken: ISyntaxToken; propertyName: IPropertyNameSyntax; callSignature: CallSignatureSyntax; body: BlockSyntax | ISyntaxToken; } - export interface MemberFunctionDeclarationConstructor { new (data: number, modifiers: ISyntaxToken[], propertyName: IPropertyNameSyntax, callSignature: CallSignatureSyntax, body: BlockSyntax | ISyntaxToken): MemberFunctionDeclarationSyntax } + export interface MemberFunctionDeclarationConstructor { new (data: number, modifiers: ISyntaxToken[], asterixToken: ISyntaxToken, propertyName: IPropertyNameSyntax, callSignature: CallSignatureSyntax, body: BlockSyntax | ISyntaxToken): MemberFunctionDeclarationSyntax } export interface MemberVariableDeclarationSyntax extends ISyntaxNode, IMemberDeclarationSyntax { modifiers: ISyntaxToken[]; @@ -498,11 +500,12 @@ module TypeScript { export interface FunctionExpressionSyntax extends ISyntaxNode, IPrimaryExpressionSyntax { functionKeyword: ISyntaxToken; + asterixToken: ISyntaxToken; identifier: ISyntaxToken; callSignature: CallSignatureSyntax; block: BlockSyntax; } - export interface FunctionExpressionConstructor { new (data: number, functionKeyword: ISyntaxToken, identifier: ISyntaxToken, callSignature: CallSignatureSyntax, block: BlockSyntax): FunctionExpressionSyntax } + export interface FunctionExpressionConstructor { new (data: number, functionKeyword: ISyntaxToken, asterixToken: ISyntaxToken, identifier: ISyntaxToken, callSignature: CallSignatureSyntax, block: BlockSyntax): FunctionExpressionSyntax } export interface OmittedExpressionSyntax extends ISyntaxNode, IExpressionSyntax { } @@ -520,6 +523,13 @@ module TypeScript { } export interface TemplateAccessExpressionConstructor { new (data: number, expression: ILeftHandSideExpressionSyntax, templateExpression: IPrimaryExpressionSyntax): TemplateAccessExpressionSyntax } + export interface YieldExpressionSyntax extends ISyntaxNode, IExpressionSyntax { + yieldKeyword: ISyntaxToken; + asterixToken: ISyntaxToken; + expression: IExpressionSyntax; + } + export interface YieldExpressionConstructor { new (data: number, yieldKeyword: ISyntaxToken, asterixToken: ISyntaxToken, expression: IExpressionSyntax): YieldExpressionSyntax } + export interface VariableDeclarationSyntax extends ISyntaxNode { varKeyword: ISyntaxToken; variableDeclarators: ISeparatedSyntaxList; @@ -637,11 +647,12 @@ module TypeScript { export interface SimplePropertyAssignmentConstructor { new (data: number, propertyName: IPropertyNameSyntax, colonToken: ISyntaxToken, expression: IExpressionSyntax): SimplePropertyAssignmentSyntax } export interface FunctionPropertyAssignmentSyntax extends ISyntaxNode, IPropertyAssignmentSyntax { + asterixToken: ISyntaxToken; propertyName: IPropertyNameSyntax; callSignature: CallSignatureSyntax; block: BlockSyntax; } - export interface FunctionPropertyAssignmentConstructor { new (data: number, propertyName: IPropertyNameSyntax, callSignature: CallSignatureSyntax, block: BlockSyntax): FunctionPropertyAssignmentSyntax } + export interface FunctionPropertyAssignmentConstructor { new (data: number, asterixToken: ISyntaxToken, propertyName: IPropertyNameSyntax, callSignature: CallSignatureSyntax, block: BlockSyntax): FunctionPropertyAssignmentSyntax } export interface ParameterSyntax extends ISyntaxNode { dotDotDotToken: ISyntaxToken; diff --git a/src/services/syntax/syntaxKind.ts b/src/services/syntax/syntaxKind.ts index a2100aabff9..947f23b137f 100644 --- a/src/services/syntax/syntaxKind.ts +++ b/src/services/syntax/syntaxKind.ts @@ -234,6 +234,7 @@ module TypeScript { OmittedExpression, TemplateExpression, TemplateAccessExpression, + YieldExpression, // Variable declarations VariableDeclaration, diff --git a/src/services/syntax/syntaxNodes.concrete.generated.ts b/src/services/syntax/syntaxNodes.concrete.generated.ts index b167277a5ec..e87e7e1e2b7 100644 --- a/src/services/syntax/syntaxNodes.concrete.generated.ts +++ b/src/services/syntax/syntaxNodes.concrete.generated.ts @@ -238,28 +238,31 @@ module TypeScript { } } - export var FunctionDeclarationSyntax: FunctionDeclarationConstructor = function(data: number, modifiers: ISyntaxToken[], functionKeyword: ISyntaxToken, identifier: ISyntaxToken, callSignature: CallSignatureSyntax, body: BlockSyntax | ISyntaxToken) { + export var FunctionDeclarationSyntax: FunctionDeclarationConstructor = function(data: number, modifiers: ISyntaxToken[], functionKeyword: ISyntaxToken, asterixToken: ISyntaxToken, identifier: ISyntaxToken, callSignature: CallSignatureSyntax, body: BlockSyntax | ISyntaxToken) { if (data) { this.__data = data; } this.modifiers = modifiers, this.functionKeyword = functionKeyword, + this.asterixToken = asterixToken, this.identifier = identifier, this.callSignature = callSignature, this.body = body, modifiers.parent = this, functionKeyword.parent = this, + asterixToken && (asterixToken.parent = this), identifier.parent = this, callSignature.parent = this, body && (body.parent = this); }; FunctionDeclarationSyntax.prototype.kind = SyntaxKind.FunctionDeclaration; - FunctionDeclarationSyntax.prototype.childCount = 5; + FunctionDeclarationSyntax.prototype.childCount = 6; FunctionDeclarationSyntax.prototype.childAt = function(index: number): ISyntaxElement { switch (index) { case 0: return this.modifiers; case 1: return this.functionKeyword; - case 2: return this.identifier; - case 3: return this.callSignature; - case 4: return this.body; + case 2: return this.asterixToken; + case 3: return this.identifier; + case 4: return this.callSignature; + case 5: return this.body; } } @@ -403,25 +406,28 @@ module TypeScript { } } - export var MemberFunctionDeclarationSyntax: MemberFunctionDeclarationConstructor = function(data: number, modifiers: ISyntaxToken[], propertyName: IPropertyNameSyntax, callSignature: CallSignatureSyntax, body: BlockSyntax | ISyntaxToken) { + export var MemberFunctionDeclarationSyntax: MemberFunctionDeclarationConstructor = function(data: number, modifiers: ISyntaxToken[], asterixToken: ISyntaxToken, propertyName: IPropertyNameSyntax, callSignature: CallSignatureSyntax, body: BlockSyntax | ISyntaxToken) { if (data) { this.__data = data; } this.modifiers = modifiers, + this.asterixToken = asterixToken, this.propertyName = propertyName, this.callSignature = callSignature, this.body = body, modifiers.parent = this, + asterixToken && (asterixToken.parent = this), propertyName.parent = this, callSignature.parent = this, body && (body.parent = this); }; MemberFunctionDeclarationSyntax.prototype.kind = SyntaxKind.MemberFunctionDeclaration; - MemberFunctionDeclarationSyntax.prototype.childCount = 4; + MemberFunctionDeclarationSyntax.prototype.childCount = 5; MemberFunctionDeclarationSyntax.prototype.childAt = function(index: number): ISyntaxElement { switch (index) { case 0: return this.modifiers; - case 1: return this.propertyName; - case 2: return this.callSignature; - case 3: return this.body; + case 1: return this.asterixToken; + case 2: return this.propertyName; + case 3: return this.callSignature; + case 4: return this.body; } } @@ -1355,25 +1361,28 @@ module TypeScript { } } - export var FunctionExpressionSyntax: FunctionExpressionConstructor = function(data: number, functionKeyword: ISyntaxToken, identifier: ISyntaxToken, callSignature: CallSignatureSyntax, block: BlockSyntax) { + export var FunctionExpressionSyntax: FunctionExpressionConstructor = function(data: number, functionKeyword: ISyntaxToken, asterixToken: ISyntaxToken, identifier: ISyntaxToken, callSignature: CallSignatureSyntax, block: BlockSyntax) { if (data) { this.__data = data; } this.functionKeyword = functionKeyword, + this.asterixToken = asterixToken, this.identifier = identifier, this.callSignature = callSignature, this.block = block, functionKeyword.parent = this, + asterixToken && (asterixToken.parent = this), identifier && (identifier.parent = this), callSignature.parent = this, block.parent = this; }; FunctionExpressionSyntax.prototype.kind = SyntaxKind.FunctionExpression; - FunctionExpressionSyntax.prototype.childCount = 4; + FunctionExpressionSyntax.prototype.childCount = 5; FunctionExpressionSyntax.prototype.childAt = function(index: number): ISyntaxElement { switch (index) { case 0: return this.functionKeyword; - case 1: return this.identifier; - case 2: return this.callSignature; - case 3: return this.block; + case 1: return this.asterixToken; + case 2: return this.identifier; + case 3: return this.callSignature; + case 4: return this.block; } } @@ -1418,6 +1427,25 @@ module TypeScript { } } + export var YieldExpressionSyntax: YieldExpressionConstructor = function(data: number, yieldKeyword: ISyntaxToken, asterixToken: ISyntaxToken, expression: IExpressionSyntax) { + if (data) { this.__data = data; } + this.yieldKeyword = yieldKeyword, + this.asterixToken = asterixToken, + this.expression = expression, + yieldKeyword.parent = this, + asterixToken && (asterixToken.parent = this), + expression && (expression.parent = this); + }; + YieldExpressionSyntax.prototype.kind = SyntaxKind.YieldExpression; + YieldExpressionSyntax.prototype.childCount = 3; + YieldExpressionSyntax.prototype.childAt = function(index: number): ISyntaxElement { + switch (index) { + case 0: return this.yieldKeyword; + case 1: return this.asterixToken; + case 2: return this.expression; + } + } + export var VariableDeclarationSyntax: VariableDeclarationConstructor = function(data: number, varKeyword: ISyntaxToken, variableDeclarators: ISeparatedSyntaxList) { if (data) { this.__data = data; } this.varKeyword = varKeyword, @@ -1732,22 +1760,25 @@ module TypeScript { } } - export var FunctionPropertyAssignmentSyntax: FunctionPropertyAssignmentConstructor = function(data: number, propertyName: IPropertyNameSyntax, callSignature: CallSignatureSyntax, block: BlockSyntax) { + export var FunctionPropertyAssignmentSyntax: FunctionPropertyAssignmentConstructor = function(data: number, asterixToken: ISyntaxToken, propertyName: IPropertyNameSyntax, callSignature: CallSignatureSyntax, block: BlockSyntax) { if (data) { this.__data = data; } + this.asterixToken = asterixToken, this.propertyName = propertyName, this.callSignature = callSignature, this.block = block, + asterixToken && (asterixToken.parent = this), propertyName.parent = this, callSignature.parent = this, block.parent = this; }; FunctionPropertyAssignmentSyntax.prototype.kind = SyntaxKind.FunctionPropertyAssignment; - FunctionPropertyAssignmentSyntax.prototype.childCount = 3; + FunctionPropertyAssignmentSyntax.prototype.childCount = 4; FunctionPropertyAssignmentSyntax.prototype.childAt = function(index: number): ISyntaxElement { switch (index) { - case 0: return this.propertyName; - case 1: return this.callSignature; - case 2: return this.block; + case 0: return this.asterixToken; + case 1: return this.propertyName; + case 2: return this.callSignature; + case 3: return this.block; } } diff --git a/src/services/syntax/syntaxTree.ts b/src/services/syntax/syntaxTree.ts index b222da20538..c21b741025d 100644 --- a/src/services/syntax/syntaxTree.ts +++ b/src/services/syntax/syntaxTree.ts @@ -1297,7 +1297,7 @@ module TypeScript { } private checkForWithInStrictMode(node: WithStatementSyntax): boolean { - if (parsedInStrictMode(node)) { + if (parsedInStrictModeContext(node)) { this.pushDiagnostic(firstToken(node), DiagnosticCode.with_statements_are_not_allowed_in_strict_mode); return true; } @@ -1509,7 +1509,7 @@ module TypeScript { } public visitPrefixUnaryExpression(node: PrefixUnaryExpressionSyntax): void { - if (parsedInStrictMode(node) && this.isPreIncrementOrDecrementExpression(node) && this.isEvalOrArguments(node.operand)) { + if (parsedInStrictModeContext(node) && this.isPreIncrementOrDecrementExpression(node) && this.isEvalOrArguments(node.operand)) { this.pushDiagnostic(node.operatorToken, DiagnosticCode.Invalid_use_of_0_in_strict_mode, [this.getEvalOrArguments(node.operand)]); } @@ -1517,7 +1517,7 @@ module TypeScript { } public visitPostfixUnaryExpression(node: PostfixUnaryExpressionSyntax): void { - if (parsedInStrictMode(node) && this.isEvalOrArguments(node.operand)) { + if (parsedInStrictModeContext(node) && this.isEvalOrArguments(node.operand)) { this.pushDiagnostic(node.operatorToken, DiagnosticCode.Invalid_use_of_0_in_strict_mode, [this.getEvalOrArguments(node.operand)]); } @@ -1534,7 +1534,7 @@ module TypeScript { private checkForDisallowedEvalOrArguments(node: ISyntaxNode, token: ISyntaxToken): boolean { if (token) { - if (parsedInStrictMode(node) && this.isEvalOrArguments(token)) { + if (parsedInStrictModeContext(node) && this.isEvalOrArguments(token)) { this.pushDiagnostic(token, DiagnosticCode.Invalid_use_of_0_in_strict_mode, [this.getEvalOrArguments(token)]); return true; } @@ -1554,16 +1554,25 @@ module TypeScript { } public visitDeleteExpression(node: DeleteExpressionSyntax): void { - if (parsedInStrictMode(node) && node.expression.kind === SyntaxKind.IdentifierName) { - this.pushDiagnostic(firstToken(node), DiagnosticCode.delete_cannot_be_called_on_an_identifier_in_strict_mode); + if (parsedInStrictModeContext(node) && node.expression.kind === SyntaxKind.IdentifierName) { + this.pushDiagnostic(node.deleteKeyword, DiagnosticCode.delete_cannot_be_called_on_an_identifier_in_strict_mode); return; } super.visitDeleteExpression(node); } + public visitYieldExpression(node: YieldExpressionSyntax): void { + if (!parsedInYieldContext(node)) { + this.pushDiagnostic(node.yieldKeyword, DiagnosticCode.yield_expression_must_be_contained_within_a_generator_declaration); + return; + } + + super.visitYieldExpression(node); + } + private checkIllegalAssignment(node: BinaryExpressionSyntax): boolean { - if (parsedInStrictMode(node) && SyntaxFacts.isAssignmentOperatorToken(node.operatorToken.kind) && this.isEvalOrArguments(node.left)) { + if (parsedInStrictModeContext(node) && SyntaxFacts.isAssignmentOperatorToken(node.operatorToken.kind) && this.isEvalOrArguments(node.left)) { this.pushDiagnostic(node.operatorToken, DiagnosticCode.Invalid_use_of_0_in_strict_mode, [this.getEvalOrArguments(node.left)]); return true; } diff --git a/src/services/syntax/syntaxVisitor.generated.ts b/src/services/syntax/syntaxVisitor.generated.ts index 7900aaad1dc..57cea0cbe95 100644 --- a/src/services/syntax/syntaxVisitor.generated.ts +++ b/src/services/syntax/syntaxVisitor.generated.ts @@ -72,6 +72,7 @@ module TypeScript { case SyntaxKind.OmittedExpression: return visitor.visitOmittedExpression(element); case SyntaxKind.TemplateExpression: return visitor.visitTemplateExpression(element); case SyntaxKind.TemplateAccessExpression: return visitor.visitTemplateAccessExpression(element); + case SyntaxKind.YieldExpression: return visitor.visitYieldExpression(element); case SyntaxKind.VariableDeclaration: return visitor.visitVariableDeclaration(element); case SyntaxKind.VariableDeclarator: return visitor.visitVariableDeclarator(element); case SyntaxKind.ArgumentList: return visitor.visitArgumentList(element); @@ -170,6 +171,7 @@ module TypeScript { visitOmittedExpression(node: OmittedExpressionSyntax): any; visitTemplateExpression(node: TemplateExpressionSyntax): any; visitTemplateAccessExpression(node: TemplateAccessExpressionSyntax): any; + visitYieldExpression(node: YieldExpressionSyntax): any; visitVariableDeclaration(node: VariableDeclarationSyntax): any; visitVariableDeclarator(node: VariableDeclaratorSyntax): any; visitArgumentList(node: ArgumentListSyntax): any; diff --git a/src/services/syntax/syntaxWalker.generated.ts b/src/services/syntax/syntaxWalker.generated.ts index ae28243793a..7a095aec157 100644 --- a/src/services/syntax/syntaxWalker.generated.ts +++ b/src/services/syntax/syntaxWalker.generated.ts @@ -97,6 +97,7 @@ module TypeScript { public visitFunctionDeclaration(node: FunctionDeclarationSyntax): void { this.visitList(node.modifiers); this.visitToken(node.functionKeyword); + this.visitOptionalToken(node.asterixToken); this.visitToken(node.identifier); visitNodeOrToken(this, node.callSignature); visitNodeOrToken(this, node.body); @@ -149,6 +150,7 @@ module TypeScript { public visitMemberFunctionDeclaration(node: MemberFunctionDeclarationSyntax): void { this.visitList(node.modifiers); + this.visitOptionalToken(node.asterixToken); visitNodeOrToken(this, node.propertyName); visitNodeOrToken(this, node.callSignature); visitNodeOrToken(this, node.body); @@ -451,6 +453,7 @@ module TypeScript { public visitFunctionExpression(node: FunctionExpressionSyntax): void { this.visitToken(node.functionKeyword); + this.visitOptionalToken(node.asterixToken); this.visitOptionalToken(node.identifier); visitNodeOrToken(this, node.callSignature); visitNodeOrToken(this, node.block); @@ -469,6 +472,12 @@ module TypeScript { visitNodeOrToken(this, node.templateExpression); } + public visitYieldExpression(node: YieldExpressionSyntax): void { + this.visitToken(node.yieldKeyword); + this.visitOptionalToken(node.asterixToken); + visitNodeOrToken(this, node.expression); + } + public visitVariableDeclaration(node: VariableDeclarationSyntax): void { this.visitToken(node.varKeyword); this.visitList(node.variableDeclarators); @@ -569,6 +578,7 @@ module TypeScript { } public visitFunctionPropertyAssignment(node: FunctionPropertyAssignmentSyntax): void { + this.visitOptionalToken(node.asterixToken); visitNodeOrToken(this, node.propertyName); visitNodeOrToken(this, node.callSignature); visitNodeOrToken(this, node.block); diff --git a/src/services/text.ts b/src/services/text.ts new file mode 100644 index 00000000000..fd768785dea --- /dev/null +++ b/src/services/text.ts @@ -0,0 +1,296 @@ +module ts { + export class TextSpan { + private _start: number; + private _length: number; + + /** + * Creates a TextSpan instance beginning with the position Start and having the Length + * specified with length. + */ + constructor(start: number, length: number) { + Debug.assert(start >= 0, "start"); + Debug.assert(length >= 0, "length"); + + this._start = start; + this._length = length; + } + + public toJSON(key: any): any { + return { start: this._start, length: this._length }; + } + + public start(): number { + return this._start; + } + + public length(): number { + return this._length; + } + + public end(): number { + return this._start + this._length; + } + + public isEmpty(): boolean { + return this._length === 0; + } + + /** + * Determines whether the position lies within the span. Returns true if the position is greater than or equal to Start and strictly less + * than End, otherwise false. + * @param position The position to check. + */ + public containsPosition(position: number): boolean { + return position >= this._start && position < this.end(); + } + + /** + * Determines whether span falls completely within this span. Returns true if the specified span falls completely within this span, otherwise false. + * @param span The span to check. + */ + public containsTextSpan(span: TextSpan): boolean { + return span._start >= this._start && span.end() <= this.end(); + } + + /** + * Determines whether the given span overlaps this span. Two spans are considered to overlap + * if they have positions in common and neither is empty. Empty spans do not overlap with any + * other span. Returns true if the spans overlap, false otherwise. + * @param span The span to check. + */ + public overlapsWith(span: TextSpan): boolean { + var overlapStart = Math.max(this._start, span._start); + var overlapEnd = Math.min(this.end(), span.end()); + + return overlapStart < overlapEnd; + } + + /** + * Returns the overlap with the given span, or undefined if there is no overlap. + * @param span The span to check. + */ + public overlap(span: TextSpan): TextSpan { + var overlapStart = Math.max(this._start, span._start); + var overlapEnd = Math.min(this.end(), span.end()); + + if (overlapStart < overlapEnd) { + return TextSpan.fromBounds(overlapStart, overlapEnd); + } + + return undefined; + } + + /** + * Determines whether span intersects this span. Two spans are considered to + * intersect if they have positions in common or the end of one span + * coincides with the start of the other span. Returns true if the spans intersect, false otherwise. + * @param The span to check. + */ + public intersectsWithTextSpan(span: TextSpan): boolean { + return span._start <= this.end() && span.end() >= this._start; + } + + public intersectsWith(start: number, length: number): boolean { + var end = start + length; + return start <= this.end() && end >= this._start; + } + + /** + * Determines whether the given position intersects this span. + * A position is considered to intersect if it is between the start and + * end positions (inclusive) of this span. Returns true if the position intersects, false otherwise. + * @param position The position to check. + */ + public intersectsWithPosition(position: number): boolean { + return position <= this.end() && position >= this._start; + } + + /** + * Returns the intersection with the given span, or undefined if there is no intersection. + * @param span The span to check. + */ + public intersection(span: TextSpan): TextSpan { + var intersectStart = Math.max(this._start, span._start); + var intersectEnd = Math.min(this.end(), span.end()); + + if (intersectStart <= intersectEnd) { + return TextSpan.fromBounds(intersectStart, intersectEnd); + } + + return undefined; + } + + /** + * Creates a new TextSpan from the given start and end positions + * as opposed to a position and length. + */ + public static fromBounds(start: number, end: number): TextSpan { + Debug.assert(start >= 0); + Debug.assert(end - start >= 0); + return new TextSpan(start, end - start); + } + } + + export class TextChangeRange { + public static unchanged = new TextChangeRange(new TextSpan(0, 0), 0); + + private _span: TextSpan; + private _newLength: number; + + /** + * Initializes a new instance of TextChangeRange. + */ + constructor(span: TextSpan, newLength: number) { + Debug.assert(newLength >= 0, "newLength"); + + this._span = span; + this._newLength = newLength; + } + + /** + * The span of text before the edit which is being changed + */ + public span(): TextSpan { + return this._span; + } + + /** + * Width of the span after the edit. A 0 here would represent a delete + */ + public newLength(): number { + return this._newLength; + } + + public newSpan(): TextSpan { + return new TextSpan(this.span().start(), this.newLength()); + } + + public isUnchanged(): boolean { + return this.span().isEmpty() && this.newLength() === 0; + } + + /** + * Called to merge all the changes that occurred across several versions of a script snapshot + * into a single change. i.e. if a user keeps making successive edits to a script we will + * have a text change from V1 to V2, V2 to V3, ..., Vn. + * + * This function will then merge those changes into a single change range valid between V1 and + * Vn. + */ + public static collapseChangesAcrossMultipleVersions(changes: TextChangeRange[]): TextChangeRange { + if (changes.length === 0) { + return TextChangeRange.unchanged; + } + + if (changes.length === 1) { + return changes[0]; + } + + // We change from talking about { { oldStart, oldLength }, newLength } to { oldStart, oldEnd, newEnd } + // as it makes things much easier to reason about. + var change0 = changes[0]; + + var oldStartN = change0.span().start(); + var oldEndN = change0.span().end(); + var newEndN = oldStartN + change0.newLength(); + + for (var i = 1; i < changes.length; i++) { + var nextChange = changes[i]; + + // Consider the following case: + // i.e. two edits. The first represents the text change range { { 10, 50 }, 30 }. i.e. The span starting + // at 10, with length 50 is reduced to length 30. The second represents the text change range { { 30, 30 }, 40 }. + // i.e. the span starting at 30 with length 30 is increased to length 40. + // + // 0 10 20 30 40 50 60 70 80 90 100 + // ------------------------------------------------------------------------------------------------------- + // | / + // | /---- + // T1 | /---- + // | /---- + // | /---- + // ------------------------------------------------------------------------------------------------------- + // | \ + // | \ + // T2 | \ + // | \ + // | \ + // ------------------------------------------------------------------------------------------------------- + // + // Merging these turns out to not be too difficult. First, determining the new start of the change is trivial + // it's just the min of the old and new starts. i.e.: + // + // 0 10 20 30 40 50 60 70 80 90 100 + // ------------------------------------------------------------*------------------------------------------ + // | / + // | /---- + // T1 | /---- + // | /---- + // | /---- + // ----------------------------------------$-------------------$------------------------------------------ + // . | \ + // . | \ + // T2 . | \ + // . | \ + // . | \ + // ----------------------------------------------------------------------*-------------------------------- + // + // (Note the dots represent the newly inferrred start. + // Determining the new and old end is also pretty simple. Basically it boils down to paying attention to the + // absolute positions at the asterixes, and the relative change between the dollar signs. Basically, we see + // which if the two $'s precedes the other, and we move that one forward until they line up. in this case that + // means: + // + // 0 10 20 30 40 50 60 70 80 90 100 + // --------------------------------------------------------------------------------*---------------------- + // | / + // | /---- + // T1 | /---- + // | /---- + // | /---- + // ------------------------------------------------------------$------------------------------------------ + // . | \ + // . | \ + // T2 . | \ + // . | \ + // . | \ + // ----------------------------------------------------------------------*-------------------------------- + // + // In other words (in this case), we're recognizing that the second edit happened after where the first edit + // ended with a delta of 20 characters (60 - 40). Thus, if we go back in time to where the first edit started + // that's the same as if we started at char 80 instead of 60. + // + // As it so happens, the same logic applies if the second edit precedes the first edit. In that case rahter + // than pusing the first edit forward to match the second, we'll push the second edit forward to match the + // first. + // + // In this case that means we have { oldStart: 10, oldEnd: 80, newEnd: 70 } or, in TextChangeRange + // semantics: { { start: 10, length: 70 }, newLength: 60 } + // + // The math then works out as follows. + // If we have { oldStart1, oldEnd1, newEnd1 } and { oldStart2, oldEnd2, newEnd2 } then we can compute the + // final result like so: + // + // { + // oldStart3: Min(oldStart1, oldStart2), + // oldEnd3 : Max(oldEnd1, oldEnd1 + (oldEnd2 - newEnd1)), + // newEnd3 : Max(newEnd2, newEnd2 + (newEnd1 - oldEnd2)) + // } + + var oldStart1 = oldStartN; + var oldEnd1 = oldEndN; + var newEnd1 = newEndN; + + var oldStart2 = nextChange.span().start(); + var oldEnd2 = nextChange.span().end(); + var newEnd2 = oldStart2 + nextChange.newLength(); + + oldStartN = Math.min(oldStart1, oldStart2); + oldEndN = Math.max(oldEnd1, oldEnd1 + (oldEnd2 - newEnd1)); + newEndN = Math.max(newEnd2, newEnd2 + (newEnd1 - oldEnd2)); + } + + return new TextChangeRange(TextSpan.fromBounds(oldStartN, oldEndN), /*newLength: */newEndN - oldStartN); + } + } +} \ No newline at end of file diff --git a/src/services/utilities.ts b/src/services/utilities.ts index 88e3601b610..b0a216c7dcd 100644 --- a/src/services/utilities.ts +++ b/src/services/utilities.ts @@ -5,23 +5,83 @@ module ts { list: Node; } + export function getEndLinePosition(line: number, sourceFile: SourceFile): number { + Debug.assert(line >= 1); + var lineStarts = sourceFile.getLineStarts(); + + // lines returned by SourceFile.getLineAndCharacterForPosition are 1-based + var lineIndex = line - 1; + if (lineIndex === lineStarts.length - 1) { + // last line - return EOF + return sourceFile.text.length - 1; + } + else { + // current line start + var start = lineStarts[lineIndex]; + // take the start position of the next line -1 = it should be some line break + var pos = lineStarts[lineIndex + 1] - 1; + Debug.assert(isLineBreak(sourceFile.text.charCodeAt(pos))); + // walk backwards skipping line breaks, stop the the beginning of current line. + // i.e: + // + // $ <- end of line for this position should match the start position + while (start <= pos && isLineBreak(sourceFile.text.charCodeAt(pos))) { + pos--; + } + return pos; + } + } + + export function getStartPositionOfLine(line: number, sourceFile: SourceFile): number { + Debug.assert(line >= 1); + return sourceFile.getLineStarts()[line - 1]; + } + + export function getStartLinePositionForPosition(position: number, sourceFile: SourceFile): number { + var lineStarts = sourceFile.getLineStarts(); + var line = sourceFile.getLineAndCharacterFromPosition(position).line; + return lineStarts[line - 1]; + } + + export function rangeContainsRange(r1: TextRange, r2: TextRange): boolean { + return startEndContainsRange(r1.pos, r1.end, r2); + } + + export function startEndContainsRange(start: number, end: number, range: TextRange): boolean { + return start <= range.pos && end >= range.end; + } + + export function rangeContainsStartEnd(range: TextRange, start: number, end: number): boolean { + return range.pos <= start && range.end >= end; + } + + export function rangeOverlapsWithStartEnd(r1: TextRange, start: number, end: number) { + return startEndOverlapsWithStartEnd(r1.pos, r1.end, start, end); + } + + export function startEndOverlapsWithStartEnd(start1: number, end1: number, start2: number, end2: number) { + var start = Math.max(start1, start2); + var end = Math.min(end1, end2); + return start < end; + } + export function findListItemInfo(node: Node): ListItemInfo { - var syntaxList = findContainingList(node); + var list = findContainingList(node); // It is possible at this point for syntaxList to be undefined, either if // node.parent had no list child, or if none of its list children contained // the span of node. If this happens, return undefined. The caller should // handle this case. - if (!syntaxList) { + if (!list) { return undefined; } - var children = syntaxList.getChildren(); - var index = indexOf(children, node); + var children = list.getChildren(); + var listItemIndex = indexOf(children, node); return { - listItemIndex: index, - list: syntaxList + listItemIndex, + list }; } @@ -63,14 +123,14 @@ module ts { * position >= start and (position < end or (position === end && token is keyword or identifier)) */ export function getTouchingWord(sourceFile: SourceFile, position: number): Node { - return getTouchingToken(sourceFile, position, isWord); + return getTouchingToken(sourceFile, position, n => isWord(n.kind)); } /* Gets the token whose text has range [start, end) and position >= start * and (position < end or (position === end && token is keyword or identifier or numeric\string litera)) */ export function getTouchingPropertyName(sourceFile: SourceFile, position: number): Node { - return getTouchingToken(sourceFile, position, isPropertyName); + return getTouchingToken(sourceFile, position, n => isPropertyName(n.kind)); } /** Returns the token if position is in [start, end) or if position === end and includeItemAtEndPosition(token) === true */ @@ -220,22 +280,16 @@ module ts { } function nodeHasTokens(n: Node): boolean { - if (n.kind === SyntaxKind.ExpressionStatement) { - return nodeHasTokens((n).expression); - } - - if (n.kind === SyntaxKind.EndOfFileToken || - n.kind === SyntaxKind.OmittedExpression || - n.kind === SyntaxKind.Missing || - n.kind === SyntaxKind.Unknown) { + if (n.kind === SyntaxKind.Unknown) { return false; } - // SyntaxList is already realized so getChildCount should be fast and non-expensive - return n.kind !== SyntaxKind.SyntaxList || n.getChildCount() !== 0; + // If we have a token or node that has a non-zero width, it must have tokens. + // Note, that getWidth() does not take trivia into account. + return n.getWidth() !== 0; } - export function getTypeArgumentOrTypeParameterList(node: Node): NodeArray { + export function getTypeArgumentOrTypeParameterList(node: Node): NodeArray { if (node.kind === SyntaxKind.TypeReference || node.kind === SyntaxKind.CallExpression) { return (node).typeArguments; } @@ -251,19 +305,19 @@ module ts { return n.kind >= SyntaxKind.FirstToken && n.kind <= SyntaxKind.LastToken; } - function isWord(n: Node): boolean { - return n.kind === SyntaxKind.Identifier || isKeyword(n.kind); + function isWord(kind: SyntaxKind): boolean { + return kind === SyntaxKind.Identifier || isKeyword(kind); } - function isPropertyName(n: Node): boolean { - return n.kind === SyntaxKind.StringLiteral || n.kind === SyntaxKind.NumericLiteral || isWord(n); + function isPropertyName(kind: SyntaxKind): boolean { + return kind === SyntaxKind.StringLiteral || kind === SyntaxKind.NumericLiteral || isWord(kind); } - export function isComment(n: Node): boolean { - return n.kind === SyntaxKind.SingleLineCommentTrivia || n.kind === SyntaxKind.MultiLineCommentTrivia; + export function isComment(kind: SyntaxKind): boolean { + return kind === SyntaxKind.SingleLineCommentTrivia || kind === SyntaxKind.MultiLineCommentTrivia; } - export function isPunctuation(n: Node): boolean { - return SyntaxKind.FirstPunctuation <= n.kind && n.kind <= SyntaxKind.LastPunctuation; + export function isPunctuation(kind: SyntaxKind): boolean { + return SyntaxKind.FirstPunctuation <= kind && kind <= SyntaxKind.LastPunctuation; } } \ No newline at end of file diff --git a/tests/baselines/reference/aliasUsageInIndexerOfClass.js b/tests/baselines/reference/aliasUsageInIndexerOfClass.js index dfbb1982ca9..7b2907681e0 100644 --- a/tests/baselines/reference/aliasUsageInIndexerOfClass.js +++ b/tests/baselines/reference/aliasUsageInIndexerOfClass.js @@ -50,6 +50,7 @@ var VisualizationModel = (function (_super) { })(Backbone.Model); exports.VisualizationModel = VisualizationModel; //// [aliasUsageInIndexerOfClass_main.js] +var moduleA = require("aliasUsageInIndexerOfClass_moduleA"); var N = (function () { function N() { this.x = moduleA; diff --git a/tests/baselines/reference/amdModuleName1.js b/tests/baselines/reference/amdModuleName1.js new file mode 100644 index 00000000000..e3505a007e3 --- /dev/null +++ b/tests/baselines/reference/amdModuleName1.js @@ -0,0 +1,22 @@ +//// [amdModuleName1.ts] +/// +class Foo { + x: number; + constructor() { + this.x = 5; + } +} +export = Foo; + + +//// [amdModuleName1.js] +define("NamedModule", ["require", "exports"], function (require, exports) { + /// + var Foo = (function () { + function Foo() { + this.x = 5; + } + return Foo; + })(); + return Foo; +}); diff --git a/tests/baselines/reference/amdModuleName1.types b/tests/baselines/reference/amdModuleName1.types new file mode 100644 index 00000000000..02ad9472354 --- /dev/null +++ b/tests/baselines/reference/amdModuleName1.types @@ -0,0 +1,19 @@ +=== tests/cases/compiler/amdModuleName1.ts === +/// +class Foo { +>Foo : Foo + + x: number; +>x : number + + constructor() { + this.x = 5; +>this.x = 5 : number +>this.x : number +>this : Foo +>x : number + } +} +export = Foo; +>Foo : Foo + diff --git a/tests/baselines/reference/amdModuleName2.errors.txt b/tests/baselines/reference/amdModuleName2.errors.txt new file mode 100644 index 00000000000..911f31a1f4b --- /dev/null +++ b/tests/baselines/reference/amdModuleName2.errors.txt @@ -0,0 +1,16 @@ +tests/cases/compiler/amdModuleName2.ts(2,1): error TS2458: An AMD module cannot have multiple name assignments. + + +==== tests/cases/compiler/amdModuleName2.ts (1 errors) ==== + /// + /// + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2458: An AMD module cannot have multiple name assignments. + class Foo { + x: number; + constructor() { + this.x = 5; + } + } + export = Foo; + \ No newline at end of file diff --git a/tests/baselines/reference/elidingImportNames.js b/tests/baselines/reference/elidingImportNames.js new file mode 100644 index 00000000000..3c61789a1a7 --- /dev/null +++ b/tests/baselines/reference/elidingImportNames.js @@ -0,0 +1,27 @@ +//// [tests/cases/compiler/elidingImportNames.ts] //// + +//// [elidingImportNames_test.ts] + +import a = require('elidingImportNames_main'); // alias used in typeof +var b = a; +var x: typeof a; +import a2 = require('elidingImportNames_main1'); // alias not used in typeof +var b2 = a2; + + +//// [elidingImportNames_main.ts] +export var main = 10; + +//// [elidingImportNames_main1.ts] +export var main = 10; + +//// [elidingImportNames_main.js] +exports.main = 10; +//// [elidingImportNames_main1.js] +exports.main = 10; +//// [elidingImportNames_test.js] +var a = require('elidingImportNames_main'); // alias used in typeof +var b = a; +var x; +var a2 = require('elidingImportNames_main1'); // alias not used in typeof +var b2 = a2; diff --git a/tests/baselines/reference/elidingImportNames.types b/tests/baselines/reference/elidingImportNames.types new file mode 100644 index 00000000000..ad93c72860b --- /dev/null +++ b/tests/baselines/reference/elidingImportNames.types @@ -0,0 +1,29 @@ +=== tests/cases/compiler/elidingImportNames_test.ts === + +import a = require('elidingImportNames_main'); // alias used in typeof +>a : typeof a + +var b = a; +>b : typeof a +>a : typeof a + +var x: typeof a; +>x : typeof a +>a : typeof a + +import a2 = require('elidingImportNames_main1'); // alias not used in typeof +>a2 : typeof a2 + +var b2 = a2; +>b2 : typeof a2 +>a2 : typeof a2 + + +=== tests/cases/compiler/elidingImportNames_main.ts === +export var main = 10; +>main : number + +=== tests/cases/compiler/elidingImportNames_main1.ts === +export var main = 10; +>main : number + diff --git a/tests/baselines/reference/incompleteObjectLiteral1.errors.txt b/tests/baselines/reference/incompleteObjectLiteral1.errors.txt index 2e363de591e..c37f308960a 100644 --- a/tests/baselines/reference/incompleteObjectLiteral1.errors.txt +++ b/tests/baselines/reference/incompleteObjectLiteral1.errors.txt @@ -1,11 +1,14 @@ -tests/cases/compiler/incompleteObjectLiteral1.ts(1,14): error TS1005: ':' expected. +tests/cases/compiler/incompleteObjectLiteral1.ts(1,14): error TS1005: ',' expected. tests/cases/compiler/incompleteObjectLiteral1.ts(1,16): error TS1128: Declaration or statement expected. +tests/cases/compiler/incompleteObjectLiteral1.ts(1,12): error TS2304: Cannot find name 'aa'. -==== tests/cases/compiler/incompleteObjectLiteral1.ts (2 errors) ==== +==== tests/cases/compiler/incompleteObjectLiteral1.ts (3 errors) ==== var tt = { aa; } ~ -!!! error TS1005: ':' expected. +!!! error TS1005: ',' expected. ~ !!! error TS1128: Declaration or statement expected. + ~~ +!!! error TS2304: Cannot find name 'aa'. var x = tt; \ No newline at end of file diff --git a/tests/baselines/reference/noDefaultLib.errors.txt b/tests/baselines/reference/noDefaultLib.errors.txt index f2c23d56d25..02098950055 100644 --- a/tests/baselines/reference/noDefaultLib.errors.txt +++ b/tests/baselines/reference/noDefaultLib.errors.txt @@ -1,12 +1,10 @@ error TS2318: Cannot find global type 'Boolean'. error TS2318: Cannot find global type 'IArguments'. -error TS2318: Cannot find global type 'TemplateStringsArray'. tests/cases/compiler/noDefaultLib.ts(4,11): error TS2317: Global type 'Array' must have 1 type parameter(s). !!! error TS2318: Cannot find global type 'Boolean'. !!! error TS2318: Cannot find global type 'IArguments'. -!!! error TS2318: Cannot find global type 'TemplateStringsArray'. ==== tests/cases/compiler/noDefaultLib.ts (1 errors) ==== /// var x; diff --git a/tests/baselines/reference/noEmitOnError.errors.txt b/tests/baselines/reference/noEmitOnError.errors.txt new file mode 100644 index 00000000000..e03e5948092 --- /dev/null +++ b/tests/baselines/reference/noEmitOnError.errors.txt @@ -0,0 +1,9 @@ +tests/cases/compiler/noEmitOnError.ts(2,5): error TS2322: Type 'string' is not assignable to type 'number'. + + +==== tests/cases/compiler/noEmitOnError.ts (1 errors) ==== + + var x: number = ""; + ~ +!!! error TS2322: Type 'string' is not assignable to type 'number'. + \ No newline at end of file diff --git a/tests/baselines/reference/objectLiteralShorthandProperties.js b/tests/baselines/reference/objectLiteralShorthandProperties.js new file mode 100644 index 00000000000..776b2bbe454 --- /dev/null +++ b/tests/baselines/reference/objectLiteralShorthandProperties.js @@ -0,0 +1,39 @@ +//// [objectLiteralShorthandProperties.ts] +var a, b, c; + +var x1 = { + a +}; + +var x2 = { + a, +} + +var x3 = { + a: 0, + b, + c, + d() { }, + x3, + parent: x3 +}; + + + +//// [objectLiteralShorthandProperties.js] +var a, b, c; +var x1 = { + a: a +}; +var x2 = { + a: a, +}; +var x3 = { + a: 0, + b: b, + c: c, + d: function () { + }, + x3: x3, + parent: x3 +}; diff --git a/tests/baselines/reference/objectLiteralShorthandProperties.types b/tests/baselines/reference/objectLiteralShorthandProperties.types new file mode 100644 index 00000000000..f28f25e815c --- /dev/null +++ b/tests/baselines/reference/objectLiteralShorthandProperties.types @@ -0,0 +1,50 @@ +=== tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandProperties.ts === +var a, b, c; +>a : any +>b : any +>c : any + +var x1 = { +>x1 : { a: any; } +>{ a} : { a: any; } + + a +>a : any + +}; + +var x2 = { +>x2 : { a: any; } +>{ a,} : { a: any; } + + a, +>a : any +} + +var x3 = { +>x3 : any +>{ a: 0, b, c, d() { }, x3, parent: x3} : { a: number; b: any; c: any; d: () => void; x3: any; parent: any; } + + a: 0, +>a : number + + b, +>b : any + + c, +>c : any + + d() { }, +>d : () => void +>d() { } : () => void + + x3, +>x3 : any + + parent: x3 +>parent : any +>x3 : any + +}; + + diff --git a/tests/baselines/reference/objectLiteralShorthandPropertiesAssignment.js b/tests/baselines/reference/objectLiteralShorthandPropertiesAssignment.js new file mode 100644 index 00000000000..2ef29a37084 --- /dev/null +++ b/tests/baselines/reference/objectLiteralShorthandPropertiesAssignment.js @@ -0,0 +1,36 @@ +//// [objectLiteralShorthandPropertiesAssignment.ts] +var id: number = 10000; +var name: string = "my name"; + +var person: { name: string; id: number } = { name, id }; +function foo( obj:{ name: string }): void { }; +function bar(name: string, id: number) { return { name, id }; } +function bar1(name: string, id: number) { return { name }; } +function baz(name: string, id: number): { name: string; id: number } { return { name, id }; } + +foo(person); +var person1 = bar("Hello", 5); +var person2: { name: string } = bar("Hello", 5); +var person3: { name: string; id:number } = bar("Hello", 5); + + +//// [objectLiteralShorthandPropertiesAssignment.js] +var id = 10000; +var name = "my name"; +var person = { name: name, id: id }; +function foo(obj) { +} +; +function bar(name, id) { + return { name: name, id: id }; +} +function bar1(name, id) { + return { name: name }; +} +function baz(name, id) { + return { name: name, id: id }; +} +foo(person); +var person1 = bar("Hello", 5); +var person2 = bar("Hello", 5); +var person3 = bar("Hello", 5); diff --git a/tests/baselines/reference/objectLiteralShorthandPropertiesAssignment.types b/tests/baselines/reference/objectLiteralShorthandPropertiesAssignment.types new file mode 100644 index 00000000000..91d9e528d63 --- /dev/null +++ b/tests/baselines/reference/objectLiteralShorthandPropertiesAssignment.types @@ -0,0 +1,68 @@ +=== tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesAssignment.ts === +var id: number = 10000; +>id : number + +var name: string = "my name"; +>name : string + +var person: { name: string; id: number } = { name, id }; +>person : { name: string; id: number; } +>name : string +>id : number +>{ name, id } : { name: string; id: number; } +>name : string +>id : number + +function foo( obj:{ name: string }): void { }; +>foo : (obj: { name: string; }) => void +>obj : { name: string; } +>name : string + +function bar(name: string, id: number) { return { name, id }; } +>bar : (name: string, id: number) => { name: string; id: number; } +>name : string +>id : number +>{ name, id } : { name: string; id: number; } +>name : string +>id : number + +function bar1(name: string, id: number) { return { name }; } +>bar1 : (name: string, id: number) => { name: string; } +>name : string +>id : number +>{ name } : { name: string; } +>name : string + +function baz(name: string, id: number): { name: string; id: number } { return { name, id }; } +>baz : (name: string, id: number) => { name: string; id: number; } +>name : string +>id : number +>name : string +>id : number +>{ name, id } : { name: string; id: number; } +>name : string +>id : number + +foo(person); +>foo(person) : void +>foo : (obj: { name: string; }) => void +>person : { name: string; id: number; } + +var person1 = bar("Hello", 5); +>person1 : { name: string; id: number; } +>bar("Hello", 5) : { name: string; id: number; } +>bar : (name: string, id: number) => { name: string; id: number; } + +var person2: { name: string } = bar("Hello", 5); +>person2 : { name: string; } +>name : string +>bar("Hello", 5) : { name: string; id: number; } +>bar : (name: string, id: number) => { name: string; id: number; } + +var person3: { name: string; id:number } = bar("Hello", 5); +>person3 : { name: string; id: number; } +>name : string +>id : number +>bar("Hello", 5) : { name: string; id: number; } +>bar : (name: string, id: number) => { name: string; id: number; } + diff --git a/tests/baselines/reference/objectLiteralShorthandPropertiesAssignmentES6.js b/tests/baselines/reference/objectLiteralShorthandPropertiesAssignmentES6.js new file mode 100644 index 00000000000..b2f9004b076 --- /dev/null +++ b/tests/baselines/reference/objectLiteralShorthandPropertiesAssignmentES6.js @@ -0,0 +1,36 @@ +//// [objectLiteralShorthandPropertiesAssignmentES6.ts] +var id: number = 10000; +var name: string = "my name"; + +var person: { name: string; id: number } = { name, id }; +function foo(obj: { name: string }): void { }; +function bar(name: string, id: number) { return { name, id }; } +function bar1(name: string, id: number) { return { name }; } +function baz(name: string, id: number): { name: string; id: number } { return { name, id }; } + +foo(person); +var person1 = bar("Hello", 5); +var person2: { name: string } = bar("Hello", 5); +var person3: { name: string; id: number } = bar("Hello", 5); + + +//// [objectLiteralShorthandPropertiesAssignmentES6.js] +var id = 10000; +var name = "my name"; +var person = { name, id }; +function foo(obj) { +} +; +function bar(name, id) { + return { name, id }; +} +function bar1(name, id) { + return { name }; +} +function baz(name, id) { + return { name, id }; +} +foo(person); +var person1 = bar("Hello", 5); +var person2 = bar("Hello", 5); +var person3 = bar("Hello", 5); diff --git a/tests/baselines/reference/objectLiteralShorthandPropertiesAssignmentES6.types b/tests/baselines/reference/objectLiteralShorthandPropertiesAssignmentES6.types new file mode 100644 index 00000000000..38791fc1beb --- /dev/null +++ b/tests/baselines/reference/objectLiteralShorthandPropertiesAssignmentES6.types @@ -0,0 +1,68 @@ +=== tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesAssignmentES6.ts === +var id: number = 10000; +>id : number + +var name: string = "my name"; +>name : string + +var person: { name: string; id: number } = { name, id }; +>person : { name: string; id: number; } +>name : string +>id : number +>{ name, id } : { name: string; id: number; } +>name : string +>id : number + +function foo(obj: { name: string }): void { }; +>foo : (obj: { name: string; }) => void +>obj : { name: string; } +>name : string + +function bar(name: string, id: number) { return { name, id }; } +>bar : (name: string, id: number) => { name: string; id: number; } +>name : string +>id : number +>{ name, id } : { name: string; id: number; } +>name : string +>id : number + +function bar1(name: string, id: number) { return { name }; } +>bar1 : (name: string, id: number) => { name: string; } +>name : string +>id : number +>{ name } : { name: string; } +>name : string + +function baz(name: string, id: number): { name: string; id: number } { return { name, id }; } +>baz : (name: string, id: number) => { name: string; id: number; } +>name : string +>id : number +>name : string +>id : number +>{ name, id } : { name: string; id: number; } +>name : string +>id : number + +foo(person); +>foo(person) : void +>foo : (obj: { name: string; }) => void +>person : { name: string; id: number; } + +var person1 = bar("Hello", 5); +>person1 : { name: string; id: number; } +>bar("Hello", 5) : { name: string; id: number; } +>bar : (name: string, id: number) => { name: string; id: number; } + +var person2: { name: string } = bar("Hello", 5); +>person2 : { name: string; } +>name : string +>bar("Hello", 5) : { name: string; id: number; } +>bar : (name: string, id: number) => { name: string; id: number; } + +var person3: { name: string; id: number } = bar("Hello", 5); +>person3 : { name: string; id: number; } +>name : string +>id : number +>bar("Hello", 5) : { name: string; id: number; } +>bar : (name: string, id: number) => { name: string; id: number; } + diff --git a/tests/baselines/reference/objectLiteralShorthandPropertiesAssignmentError.errors.txt b/tests/baselines/reference/objectLiteralShorthandPropertiesAssignmentError.errors.txt new file mode 100644 index 00000000000..2db47d0f7ae --- /dev/null +++ b/tests/baselines/reference/objectLiteralShorthandPropertiesAssignmentError.errors.txt @@ -0,0 +1,44 @@ +tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesAssignmentError.ts(5,16): error TS1131: Property or signature expected. +tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesAssignmentError.ts(5,25): error TS1128: Declaration or statement expected. +tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesAssignmentError.ts(6,53): error TS1005: ';' expected. +tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesAssignmentError.ts(4,5): error TS2322: Type '{ name: string; id: number; }' is not assignable to type '{ b: string; id: number; }'. + Property 'b' is missing in type '{ name: string; id: number; }'. +tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesAssignmentError.ts(5,22): error TS2403: Subsequent variable declarations must have the same type. Variable 'id' must be of type 'number', but here has type 'any'. +tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesAssignmentError.ts(6,79): error TS2322: Type '{ name: string; id: number; }' is not assignable to type '{ id: string; name: number; }'. + Types of property 'id' are incompatible. + Type 'number' is not assignable to type 'string'. +tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesAssignmentError.ts(8,5): error TS2345: Argument of type '{ name: string; id: number; }' is not assignable to parameter of type '{ name: string; id: boolean; }'. + Types of property 'id' are incompatible. + Type 'number' is not assignable to type 'boolean'. + + +==== tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesAssignmentError.ts (7 errors) ==== + var id: number = 10000; + var name: string = "my name"; + + var person: { b: string; id: number } = { name, id }; // error + ~~~~~~ +!!! error TS2322: Type '{ name: string; id: number; }' is not assignable to type '{ b: string; id: number; }'. +!!! error TS2322: Property 'b' is missing in type '{ name: string; id: number; }'. + var person1: { name, id }; // error: can't use short-hand property assignment in type position + ~~~~ +!!! error TS1131: Property or signature expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~~ +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'id' must be of type 'number', but here has type 'any'. + function foo(name: string, id: number): { id: string, name: number } { return { name, id }; } // error + ~ +!!! error TS1005: ';' expected. + ~~~~~~~~~~~~ +!!! error TS2322: Type '{ name: string; id: number; }' is not assignable to type '{ id: string; name: number; }'. +!!! error TS2322: Types of property 'id' are incompatible. +!!! error TS2322: Type 'number' is not assignable to type 'string'. + function bar(obj: { name: string; id: boolean }) { } + bar({ name, id }); // error + ~~~~~~~~~~~~ +!!! error TS2345: Argument of type '{ name: string; id: number; }' is not assignable to parameter of type '{ name: string; id: boolean; }'. +!!! error TS2345: Types of property 'id' are incompatible. +!!! error TS2345: Type 'number' is not assignable to type 'boolean'. + + \ No newline at end of file diff --git a/tests/baselines/reference/objectLiteralShorthandPropertiesAssignmentErrorFromMissingIdentifier.errors.txt b/tests/baselines/reference/objectLiteralShorthandPropertiesAssignmentErrorFromMissingIdentifier.errors.txt new file mode 100644 index 00000000000..708bbb0935f --- /dev/null +++ b/tests/baselines/reference/objectLiteralShorthandPropertiesAssignmentErrorFromMissingIdentifier.errors.txt @@ -0,0 +1,48 @@ +tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesAssignmentErrorFromMissingIdentifier.ts(5,55): error TS1005: ';' expected. +tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesAssignmentErrorFromMissingIdentifier.ts(6,55): error TS1005: ';' expected. +tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesAssignmentErrorFromMissingIdentifier.ts(7,16): error TS1131: Property or signature expected. +tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesAssignmentErrorFromMissingIdentifier.ts(7,25): error TS1128: Declaration or statement expected. +tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesAssignmentErrorFromMissingIdentifier.ts(8,28): error TS1005: ';' expected. +tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesAssignmentErrorFromMissingIdentifier.ts(4,5): error TS2322: Type '{ name: string; id: number; }' is not assignable to type '{ b: string; id: number; }'. + Property 'b' is missing in type '{ name: string; id: number; }'. +tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesAssignmentErrorFromMissingIdentifier.ts(5,79): error TS2322: Type '{ name: string; id: number; }' is not assignable to type '{ name: number; id: string; }'. + Types of property 'name' are incompatible. + Type 'string' is not assignable to type 'number'. +tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesAssignmentErrorFromMissingIdentifier.ts(7,22): error TS2403: Subsequent variable declarations must have the same type. Variable 'id' must be of type 'number', but here has type 'any'. +tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesAssignmentErrorFromMissingIdentifier.ts(8,5): error TS2322: Type '{ name: number; id: string; }' is not assignable to type '{ name: string; id: number; }'. + Types of property 'name' are incompatible. + Type 'number' is not assignable to type 'string'. + + +==== tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesAssignmentErrorFromMissingIdentifier.ts (9 errors) ==== + var id: number = 10000; + var name: string = "my name"; + + var person: { b: string; id: number } = { name, id }; // error + ~~~~~~ +!!! error TS2322: Type '{ name: string; id: number; }' is not assignable to type '{ b: string; id: number; }'. +!!! error TS2322: Property 'b' is missing in type '{ name: string; id: number; }'. + function bar(name: string, id: number): { name: number, id: string } { return { name, id }; } // error + ~ +!!! error TS1005: ';' expected. + ~~~~~~~~~~~~ +!!! error TS2322: Type '{ name: string; id: number; }' is not assignable to type '{ name: number; id: string; }'. +!!! error TS2322: Types of property 'name' are incompatible. +!!! error TS2322: Type 'string' is not assignable to type 'number'. + function foo(name: string, id: number): { name: string, id: number } { return { name, id }; } // error + ~ +!!! error TS1005: ';' expected. + var person1: { name, id }; // error : Can't use shorthand in the type position + ~~~~ +!!! error TS1131: Property or signature expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~~ +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'id' must be of type 'number', but here has type 'any'. + var person2: { name: string, id: number } = bar("hello", 5); + ~ +!!! error TS1005: ';' expected. + ~~~~~~~ +!!! error TS2322: Type '{ name: number; id: string; }' is not assignable to type '{ name: string; id: number; }'. +!!! error TS2322: Types of property 'name' are incompatible. +!!! error TS2322: Type 'number' is not assignable to type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/objectLiteralShorthandPropertiesES6.js b/tests/baselines/reference/objectLiteralShorthandPropertiesES6.js new file mode 100644 index 00000000000..b398a231351 --- /dev/null +++ b/tests/baselines/reference/objectLiteralShorthandPropertiesES6.js @@ -0,0 +1,39 @@ +//// [objectLiteralShorthandPropertiesES6.ts] +var a, b, c; + +var x1 = { + a +}; + +var x2 = { + a, +} + +var x3 = { + a: 0, + b, + c, + d() { }, + x3, + parent: x3 +}; + + + +//// [objectLiteralShorthandPropertiesES6.js] +var a, b, c; +var x1 = { + a +}; +var x2 = { + a, +}; +var x3 = { + a: 0, + b, + c, + d: function () { + }, + x3, + parent: x3 +}; diff --git a/tests/baselines/reference/objectLiteralShorthandPropertiesES6.types b/tests/baselines/reference/objectLiteralShorthandPropertiesES6.types new file mode 100644 index 00000000000..0383a3f5d2e --- /dev/null +++ b/tests/baselines/reference/objectLiteralShorthandPropertiesES6.types @@ -0,0 +1,50 @@ +=== tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesES6.ts === +var a, b, c; +>a : any +>b : any +>c : any + +var x1 = { +>x1 : { a: any; } +>{ a} : { a: any; } + + a +>a : any + +}; + +var x2 = { +>x2 : { a: any; } +>{ a,} : { a: any; } + + a, +>a : any +} + +var x3 = { +>x3 : any +>{ a: 0, b, c, d() { }, x3, parent: x3} : { a: number; b: any; c: any; d: () => void; x3: any; parent: any; } + + a: 0, +>a : number + + b, +>b : any + + c, +>c : any + + d() { }, +>d : () => void +>d() { } : () => void + + x3, +>x3 : any + + parent: x3 +>parent : any +>x3 : any + +}; + + diff --git a/tests/baselines/reference/objectLiteralShorthandPropertiesErrorFromNoneExistingIdentifier.errors.txt b/tests/baselines/reference/objectLiteralShorthandPropertiesErrorFromNoneExistingIdentifier.errors.txt new file mode 100644 index 00000000000..fcd04b27754 --- /dev/null +++ b/tests/baselines/reference/objectLiteralShorthandPropertiesErrorFromNoneExistingIdentifier.errors.txt @@ -0,0 +1,11 @@ +tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesErrorFromNoneExistingIdentifier.ts(3,5): error TS2304: Cannot find name 'undefinedVariable'. + + +==== tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesErrorFromNoneExistingIdentifier.ts (1 errors) ==== + var x = { + x, // OK + undefinedVariable // Error + ~~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'undefinedVariable'. + } + \ No newline at end of file diff --git a/tests/baselines/reference/objectLiteralShorthandPropertiesErrorFromNoneExistingIdentifier.js b/tests/baselines/reference/objectLiteralShorthandPropertiesErrorFromNoneExistingIdentifier.js new file mode 100644 index 00000000000..6050e5b756f --- /dev/null +++ b/tests/baselines/reference/objectLiteralShorthandPropertiesErrorFromNoneExistingIdentifier.js @@ -0,0 +1,12 @@ +//// [objectLiteralShorthandPropertiesErrorFromNoneExistingIdentifier.ts] +var x = { + x, // OK + undefinedVariable // Error +} + + +//// [objectLiteralShorthandPropertiesErrorFromNoneExistingIdentifier.js] +var x = { + x: x, + undefinedVariable: undefinedVariable // Error +}; diff --git a/tests/baselines/reference/objectLiteralShorthandPropertiesErrorFromNotUsingIdentifier.errors.txt b/tests/baselines/reference/objectLiteralShorthandPropertiesErrorFromNotUsingIdentifier.errors.txt new file mode 100644 index 00000000000..3c5f4e97d80 --- /dev/null +++ b/tests/baselines/reference/objectLiteralShorthandPropertiesErrorFromNotUsingIdentifier.errors.txt @@ -0,0 +1,77 @@ +tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesErrorFromNotUsingIdentifier.ts(3,20): error TS1005: ':' expected. +tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesErrorFromNotUsingIdentifier.ts(4,7): error TS1005: ':' expected. +tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesErrorFromNotUsingIdentifier.ts(5,10): error TS1005: '(' expected. +tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesErrorFromNotUsingIdentifier.ts(6,10): error TS1005: '(' expected. +tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesErrorFromNotUsingIdentifier.ts(7,9): error TS1005: ':' expected. +tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesErrorFromNotUsingIdentifier.ts(8,10): error TS1005: ':' expected. +tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesErrorFromNotUsingIdentifier.ts(9,8): error TS1005: ':' expected. +tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesErrorFromNotUsingIdentifier.ts(10,10): error TS1005: ':' expected. +tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesErrorFromNotUsingIdentifier.ts(12,1): error TS1005: ':' expected. +tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesErrorFromNotUsingIdentifier.ts(15,6): error TS1005: ',' expected. +tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesErrorFromNotUsingIdentifier.ts(16,6): error TS1005: ',' expected. +tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesErrorFromNotUsingIdentifier.ts(17,6): error TS1005: '=' expected. +tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesErrorFromNotUsingIdentifier.ts(18,1): error TS1128: Declaration or statement expected. +tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesErrorFromNotUsingIdentifier.ts(20,17): error TS1005: ':' expected. +tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesErrorFromNotUsingIdentifier.ts(5,9): error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. +tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesErrorFromNotUsingIdentifier.ts(15,5): error TS2300: Duplicate identifier 'a'. +tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesErrorFromNotUsingIdentifier.ts(15,7): error TS2304: Cannot find name 'b'. +tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesErrorFromNotUsingIdentifier.ts(16,5): error TS2300: Duplicate identifier 'a'. + + +==== tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesErrorFromNotUsingIdentifier.ts (18 errors) ==== + // errors + var y = { + "stringLiteral", + ~ +!!! error TS1005: ':' expected. + 42, + ~ +!!! error TS1005: ':' expected. + get e, + ~ +!!! error TS1005: '(' expected. + ~ +!!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. + set f, + ~ +!!! error TS1005: '(' expected. + this, + ~ +!!! error TS1005: ':' expected. + super, + ~ +!!! error TS1005: ':' expected. + var, + ~ +!!! error TS1005: ':' expected. + class, + ~ +!!! error TS1005: ':' expected. + typeof + }; + ~ +!!! error TS1005: ':' expected. + + var x = { + a.b, + ~ +!!! error TS1005: ',' expected. + ~ +!!! error TS2300: Duplicate identifier 'a'. + ~ +!!! error TS2304: Cannot find name 'b'. + a["ss"], + ~ +!!! error TS1005: ',' expected. + ~ +!!! error TS2300: Duplicate identifier 'a'. + a[1], + ~ +!!! error TS1005: '=' expected. + }; + ~ +!!! error TS1128: Declaration or statement expected. + + var v = { class }; // error + ~ +!!! error TS1005: ':' expected. \ No newline at end of file diff --git a/tests/baselines/reference/objectLiteralShorthandPropertiesErrorWithModule.errors.txt b/tests/baselines/reference/objectLiteralShorthandPropertiesErrorWithModule.errors.txt new file mode 100644 index 00000000000..f5fd8ed53f2 --- /dev/null +++ b/tests/baselines/reference/objectLiteralShorthandPropertiesErrorWithModule.errors.txt @@ -0,0 +1,24 @@ +tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesErrorWithModule.ts(10,10): error TS1005: ',' expected. +tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesErrorWithModule.ts(14,3): error TS2339: Property 'y' does not exist on type 'typeof m'. + + +==== tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesErrorWithModule.ts (2 errors) ==== + // module export + var x = "Foo"; + module m { + export var x; + } + + module n { + var z = 10000; + export var y = { + m.x // error + ~ +!!! error TS1005: ',' expected. + }; + } + + m.y.x; + ~ +!!! error TS2339: Property 'y' does not exist on type 'typeof m'. + \ No newline at end of file diff --git a/tests/baselines/reference/objectLiteralShorthandPropertiesFunctionArgument.js b/tests/baselines/reference/objectLiteralShorthandPropertiesFunctionArgument.js new file mode 100644 index 00000000000..f6e20b605b6 --- /dev/null +++ b/tests/baselines/reference/objectLiteralShorthandPropertiesFunctionArgument.js @@ -0,0 +1,20 @@ +//// [objectLiteralShorthandPropertiesFunctionArgument.ts] +var id: number = 10000; +var name: string = "my name"; + +var person = { name, id }; + +function foo(p: { name: string; id: number }) { } +foo(person); + + +var obj = { name: name, id: id }; + +//// [objectLiteralShorthandPropertiesFunctionArgument.js] +var id = 10000; +var name = "my name"; +var person = { name: name, id: id }; +function foo(p) { +} +foo(person); +var obj = { name: name, id: id }; diff --git a/tests/baselines/reference/objectLiteralShorthandPropertiesFunctionArgument.types b/tests/baselines/reference/objectLiteralShorthandPropertiesFunctionArgument.types new file mode 100644 index 00000000000..9b4261a74be --- /dev/null +++ b/tests/baselines/reference/objectLiteralShorthandPropertiesFunctionArgument.types @@ -0,0 +1,33 @@ +=== tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesFunctionArgument.ts === +var id: number = 10000; +>id : number + +var name: string = "my name"; +>name : string + +var person = { name, id }; +>person : { name: string; id: number; } +>{ name, id } : { name: string; id: number; } +>name : string +>id : number + +function foo(p: { name: string; id: number }) { } +>foo : (p: { name: string; id: number; }) => void +>p : { name: string; id: number; } +>name : string +>id : number + +foo(person); +>foo(person) : void +>foo : (p: { name: string; id: number; }) => void +>person : { name: string; id: number; } + + +var obj = { name: name, id: id }; +>obj : { name: string; id: number; } +>{ name: name, id: id } : { name: string; id: number; } +>name : string +>name : string +>id : number +>id : number + diff --git a/tests/baselines/reference/objectLiteralShorthandPropertiesFunctionArgument2.errors.txt b/tests/baselines/reference/objectLiteralShorthandPropertiesFunctionArgument2.errors.txt new file mode 100644 index 00000000000..44426a8afb0 --- /dev/null +++ b/tests/baselines/reference/objectLiteralShorthandPropertiesFunctionArgument2.errors.txt @@ -0,0 +1,14 @@ +tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesFunctionArgument2.ts(7,5): error TS2345: Argument of type '{ name: string; id: number; }' is not assignable to parameter of type '{ a: string; id: number; }'. + + +==== tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesFunctionArgument2.ts (1 errors) ==== + var id: number = 10000; + var name: string = "my name"; + + var person = { name, id }; + + function foo(p: { a: string; id: number }) { } + foo(person); // error + ~~~~~~ +!!! error TS2345: Argument of type '{ name: string; id: number; }' is not assignable to parameter of type '{ a: string; id: number; }'. + \ No newline at end of file diff --git a/tests/baselines/reference/objectLiteralShorthandPropertiesFunctionArgument2.js b/tests/baselines/reference/objectLiteralShorthandPropertiesFunctionArgument2.js new file mode 100644 index 00000000000..2f3535ef78a --- /dev/null +++ b/tests/baselines/reference/objectLiteralShorthandPropertiesFunctionArgument2.js @@ -0,0 +1,17 @@ +//// [objectLiteralShorthandPropertiesFunctionArgument2.ts] +var id: number = 10000; +var name: string = "my name"; + +var person = { name, id }; + +function foo(p: { a: string; id: number }) { } +foo(person); // error + + +//// [objectLiteralShorthandPropertiesFunctionArgument2.js] +var id = 10000; +var name = "my name"; +var person = { name: name, id: id }; +function foo(p) { +} +foo(person); // error diff --git a/tests/baselines/reference/objectLiteralShorthandPropertiesWithModule.js b/tests/baselines/reference/objectLiteralShorthandPropertiesWithModule.js new file mode 100644 index 00000000000..e2eb1fc128c --- /dev/null +++ b/tests/baselines/reference/objectLiteralShorthandPropertiesWithModule.js @@ -0,0 +1,30 @@ +//// [objectLiteralShorthandPropertiesWithModule.ts] +// module export + +module m { + export var x; +} + +module m { + var z = x; + var y = { + a: x, + x + }; +} + + +//// [objectLiteralShorthandPropertiesWithModule.js] +// module export +var m; +(function (m) { + m.x; +})(m || (m = {})); +var m; +(function (m) { + var z = m.x; + var y = { + a: m.x, + x: m.x + }; +})(m || (m = {})); diff --git a/tests/baselines/reference/objectLiteralShorthandPropertiesWithModule.types b/tests/baselines/reference/objectLiteralShorthandPropertiesWithModule.types new file mode 100644 index 00000000000..77e139a3426 --- /dev/null +++ b/tests/baselines/reference/objectLiteralShorthandPropertiesWithModule.types @@ -0,0 +1,31 @@ +=== tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesWithModule.ts === +// module export + +module m { +>m : typeof m + + export var x; +>x : any +} + +module m { +>m : typeof m + + var z = x; +>z : any +>x : any + + var y = { +>y : { a: any; x: any; } +>{ a: x, x } : { a: any; x: any; } + + a: x, +>a : any +>x : any + + x +>x : any + + }; +} + diff --git a/tests/baselines/reference/objectLiteralShorthandPropertiesWithModuleES6.js b/tests/baselines/reference/objectLiteralShorthandPropertiesWithModuleES6.js new file mode 100644 index 00000000000..edb4e6c2953 --- /dev/null +++ b/tests/baselines/reference/objectLiteralShorthandPropertiesWithModuleES6.js @@ -0,0 +1,28 @@ +//// [objectLiteralShorthandPropertiesWithModuleES6.ts] + +module m { + export var x; +} + +module m { + var z = x; + var y = { + a: x, + x + }; +} + + +//// [objectLiteralShorthandPropertiesWithModuleES6.js] +var m; +(function (m) { + m.x; +})(m || (m = {})); +var m; +(function (m) { + var z = m.x; + var y = { + a: m.x, + x: m.x + }; +})(m || (m = {})); diff --git a/tests/baselines/reference/objectLiteralShorthandPropertiesWithModuleES6.types b/tests/baselines/reference/objectLiteralShorthandPropertiesWithModuleES6.types new file mode 100644 index 00000000000..1030010d6c6 --- /dev/null +++ b/tests/baselines/reference/objectLiteralShorthandPropertiesWithModuleES6.types @@ -0,0 +1,30 @@ +=== tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesWithModuleES6.ts === + +module m { +>m : typeof m + + export var x; +>x : any +} + +module m { +>m : typeof m + + var z = x; +>z : any +>x : any + + var y = { +>y : { a: any; x: any; } +>{ a: x, x } : { a: any; x: any; } + + a: x, +>a : any +>x : any + + x +>x : any + + }; +} + diff --git a/tests/baselines/reference/objectTypesWithOptionalProperties.errors.txt b/tests/baselines/reference/objectTypesWithOptionalProperties.errors.txt index 0622b7badb0..e73e8adc930 100644 --- a/tests/baselines/reference/objectTypesWithOptionalProperties.errors.txt +++ b/tests/baselines/reference/objectTypesWithOptionalProperties.errors.txt @@ -1,10 +1,9 @@ tests/cases/conformance/types/objectTypeLiteral/methodSignatures/objectTypesWithOptionalProperties.ts(12,6): error TS1112: A class member cannot be declared optional. tests/cases/conformance/types/objectTypeLiteral/methodSignatures/objectTypesWithOptionalProperties.ts(20,6): error TS1112: A class member cannot be declared optional. -tests/cases/conformance/types/objectTypeLiteral/methodSignatures/objectTypesWithOptionalProperties.ts(24,6): error TS1005: ':' expected. -tests/cases/conformance/types/objectTypeLiteral/methodSignatures/objectTypesWithOptionalProperties.ts(24,7): error TS1109: Expression expected. +tests/cases/conformance/types/objectTypeLiteral/methodSignatures/objectTypesWithOptionalProperties.ts(24,6): error TS1160: A object member cannot be declared optional. -==== tests/cases/conformance/types/objectTypeLiteral/methodSignatures/objectTypesWithOptionalProperties.ts (4 errors) ==== +==== tests/cases/conformance/types/objectTypeLiteral/methodSignatures/objectTypesWithOptionalProperties.ts (3 errors) ==== // Basic uses of optional properties var a: { @@ -33,8 +32,6 @@ tests/cases/conformance/types/objectTypeLiteral/methodSignatures/objectTypesWith var b = { x?: 1 // error - ~ -!!! error TS1005: ':' expected. - ~ -!!! error TS1109: Expression expected. + +!!! error TS1160: A object member cannot be declared optional. } \ No newline at end of file diff --git a/tests/baselines/reference/parser509698.errors.txt b/tests/baselines/reference/parser509698.errors.txt index 2a8cc607e1e..2aaaec18dc2 100644 --- a/tests/baselines/reference/parser509698.errors.txt +++ b/tests/baselines/reference/parser509698.errors.txt @@ -6,7 +6,6 @@ error TS2318: Cannot find global type 'Number'. error TS2318: Cannot find global type 'Object'. error TS2318: Cannot find global type 'RegExp'. error TS2318: Cannot find global type 'String'. -error TS2318: Cannot find global type 'TemplateStringsArray'. !!! error TS2318: Cannot find global type 'Array'. @@ -17,7 +16,6 @@ error TS2318: Cannot find global type 'TemplateStringsArray'. !!! error TS2318: Cannot find global type 'Object'. !!! error TS2318: Cannot find global type 'RegExp'. !!! error TS2318: Cannot find global type 'String'. -!!! error TS2318: Cannot find global type 'TemplateStringsArray'. ==== tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509698.ts (0 errors) ==== ///