Merge branch 'master' into typeWriter

Conflicts:
	src/compiler/types.ts
This commit is contained in:
Jason Freeman committed 2014-08-18 19:57:35 -07:00
commit f949c5014a
222 files changed
+4733 -7747

No files matched your search

+13 -14
View File
@@ -956,11 +956,24 @@ declare var JSON: JSON;
/////////////////////////////
interface Array<T> {
/**
* Gets or sets the length of the array. This is a number one higher than the highest element defined in an array.
*/
length: number;
/**
* Returns a string representation of an array.
*/
toString(): string;
toLocaleString(): string;
/**
* Appends new elements to an array, and returns the new length of the array.
* @param items New elements of the Array.
*/
push(...items: T[]): number;
/**
* Removes the last element from an array and returns it.
*/
pop(): T;
/**
* Combines two or more arrays.
* @param items Additional items to add to the end of array1.
@@ -976,15 +989,6 @@ interface Array<T> {
* @param separator A string used to separate one element of an array from the next in the resulting String. If omitted, the array elements are separated with a comma.
*/
join(separator?: string): string;
/**
* Removes the last element from an array and returns it.
*/
pop(): T;
/**
* Appends new elements to an array, and returns the new length of the array.
* @param items New elements of the Array.
*/
push(...items: T[]): number;
/**
* Reverses the elements in an Array.
*/
@@ -1101,11 +1105,6 @@ interface Array<T> {
*/
reduceRight<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U;
/**
* Gets or sets the length of the array. This is a number one higher than the highest element defined in an array.
*/
length: number;
[n: number]: T;
}
declare var Array: {
+13 -14
View File
@@ -956,11 +956,24 @@ declare var JSON: JSON;
/////////////////////////////
interface Array<T> {
/**
* Gets or sets the length of the array. This is a number one higher than the highest element defined in an array.
*/
length: number;
/**
* Returns a string representation of an array.
*/
toString(): string;
toLocaleString(): string;
/**
* Appends new elements to an array, and returns the new length of the array.
* @param items New elements of the Array.
*/
push(...items: T[]): number;
/**
* Removes the last element from an array and returns it.
*/
pop(): T;
/**
* Combines two or more arrays.
* @param items Additional items to add to the end of array1.
@@ -976,15 +989,6 @@ interface Array<T> {
* @param separator A string used to separate one element of an array from the next in the resulting String. If omitted, the array elements are separated with a comma.
*/
join(separator?: string): string;
/**
* Removes the last element from an array and returns it.
*/
pop(): T;
/**
* Appends new elements to an array, and returns the new length of the array.
* @param items New elements of the Array.
*/
push(...items: T[]): number;
/**
* Reverses the elements in an Array.
*/
@@ -1101,11 +1105,6 @@ interface Array<T> {
*/
reduceRight<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U;
/**
* Gets or sets the length of the array. This is a number one higher than the highest element defined in an array.
*/
length: number;
[n: number]: T;
}
declare var Array: {
+839 -520
View File
File diff suppressed because it is too large. Load diff
+1100 -695
View File
File diff suppressed because it is too large. Load diff
+270 -306
View File
@@ -2,20 +2,11 @@
/// <reference path="types.ts" />
module ts {
export var Diagnostics = {
Unknown_compiler_option_0: { code: 6001, category: DiagnosticCategory.Error, key: "Unknown compiler option '{0}'." },
File_0_not_found: { code: 6002, category: DiagnosticCategory.Error, key: "File '{0}' not found." },
File_0_must_have_extension_ts_or_d_ts: { code: 6003, category: DiagnosticCategory.Error, key: "File '{0}' must have extension '.ts' or '.d.ts'." },
Unrecognized_escape_sequence: { code: 1000, category: DiagnosticCategory.Error, key: "Unrecognized escape sequence." },
Unexpected_character_0: { code: 1001, category: DiagnosticCategory.Error, key: "Unexpected character {0}." },
Missing_close_quote_character: { code: 1002, category: DiagnosticCategory.Error, key: "Missing close quote character." },
Identifier_expected: { code: -9999999, category: DiagnosticCategory.Error, key: "Identifier expected." },
_0_keyword_expected: { code: 1004, category: DiagnosticCategory.Error, key: "'{0}' keyword expected." },
_0_expected: { code: -9999999, category: DiagnosticCategory.Error, key: "'{0}' expected." },
Identifier_expected_0_is_a_keyword: { code: 1006, category: DiagnosticCategory.Error, key: "Identifier expected; '{0}' is a keyword." },
Automatic_semicolon_insertion_not_allowed: { code: 1007, category: DiagnosticCategory.Error, key: "Automatic semicolon insertion not allowed." },
Unterminated_string_literal: { code: 1002, category: DiagnosticCategory.Error, key: "Unterminated string literal." },
Identifier_expected: { code: 1003, category: DiagnosticCategory.Error, key: "Identifier expected." },
_0_expected: { code: 1005, category: DiagnosticCategory.Error, key: "'{0}' expected." },
Trailing_comma_not_allowed: { code: 1009, category: DiagnosticCategory.Error, key: "Trailing comma not allowed." },
Asterisk_Slash_expected: { code: 1010, category: DiagnosticCategory.Error, key: "'*/' expected." },
public_or_private_modifier_must_precede_static: { code: 1011, category: DiagnosticCategory.Error, key: "'public' or 'private' modifier must precede 'static'." },
Unexpected_token: { code: 1012, category: DiagnosticCategory.Error, key: "Unexpected token." },
Catch_clause_parameter_cannot_have_a_type_annotation: { code: 1013, category: DiagnosticCategory.Error, key: "Catch clause parameter cannot have a type annotation." },
A_rest_parameter_must_be_last_in_a_parameter_list: { code: 1014, category: DiagnosticCategory.Error, key: "A rest parameter must be last in a parameter list." },
@@ -28,16 +19,16 @@ module ts {
An_index_signature_must_have_a_type_annotation: { code: 1021, category: DiagnosticCategory.Error, key: "An index signature must have a type annotation." },
An_index_signature_parameter_must_have_a_type_annotation: { code: 1022, category: DiagnosticCategory.Error, key: "An index signature parameter must have a type annotation." },
An_index_signature_parameter_type_must_be_string_or_number: { code: 1023, category: DiagnosticCategory.Error, key: "An index signature parameter type must be 'string' or 'number'." },
extends_clause_already_seen: { code: 1024, category: DiagnosticCategory.Error, key: "'extends' clause already seen." },
extends_clause_must_precede_implements_clause: { code: 1025, category: DiagnosticCategory.Error, key: "'extends' clause must precede 'implements' clause." },
Classes_can_only_extend_a_single_class: { code: 1026, category: DiagnosticCategory.Error, key: "Classes can only extend a single class." },
implements_clause_already_seen: { code: 1027, category: DiagnosticCategory.Error, key: "'implements' clause already seen." },
A_class_or_interface_declaration_can_only_have_one_extends_clause: { code: 1024, category: DiagnosticCategory.Error, key: "A class or interface declaration can only have one 'extends' clause." },
An_extends_clause_must_precede_an_implements_clause: { code: 1025, category: DiagnosticCategory.Error, key: "An 'extends' clause must precede an 'implements' clause." },
A_class_can_only_extend_a_single_class: { code: 1026, category: DiagnosticCategory.Error, key: "A class can only extend a single class." },
A_class_declaration_can_only_have_one_implements_clause: { code: 1027, category: DiagnosticCategory.Error, key: "A class declaration can only have one 'implements' clause." },
Accessibility_modifier_already_seen: { code: 1028, category: DiagnosticCategory.Error, key: "Accessibility modifier already seen." },
_0_modifier_must_precede_1_modifier: { code: 1029, category: DiagnosticCategory.Error, key: "'{0}' modifier must precede '{1}' modifier." },
_0_modifier_already_seen: { code: 1030, category: DiagnosticCategory.Error, key: "'{0}' modifier already seen." },
_0_modifier_cannot_appear_on_a_class_element: { code: 1031, category: DiagnosticCategory.Error, key: "'{0}' modifier cannot appear on a class element." },
Interface_declaration_cannot_have_implements_clause: { code: 1032, category: DiagnosticCategory.Error, key: "Interface declaration cannot have 'implements' clause." },
super_invocation_cannot_have_type_arguments: { code: 1034, category: DiagnosticCategory.Error, key: "'super' invocation cannot have type arguments." },
An_interface_declaration_cannot_have_an_implements_clause: { code: 1032, category: DiagnosticCategory.Error, key: "An interface declaration cannot have an 'implements' clause." },
super_must_be_followed_by_an_argument_list_or_member_access: { code: 1034, category: DiagnosticCategory.Error, key: "'super' must be followed by an argument list or member access." },
Only_ambient_modules_can_use_quoted_names: { code: 1035, category: DiagnosticCategory.Error, key: "Only ambient modules can use quoted names." },
Statements_are_not_allowed_in_ambient_contexts: { code: 1036, category: DiagnosticCategory.Error, key: "Statements are not allowed in ambient contexts." },
A_function_implementation_cannot_be_declared_in_an_ambient_context: { code: 1037, category: DiagnosticCategory.Error, key: "A function implementation cannot be declared in an ambient context." },
@@ -53,23 +44,11 @@ module ts {
A_set_accessor_parameter_cannot_have_an_initializer: { code: 1052, category: DiagnosticCategory.Error, key: "A 'set' accessor parameter cannot have an initializer." },
A_set_accessor_cannot_have_rest_parameter: { code: 1053, category: DiagnosticCategory.Error, key: "A 'set' accessor cannot have rest parameter." },
A_get_accessor_cannot_have_parameters: { code: 1054, category: DiagnosticCategory.Error, key: "A 'get' accessor cannot have parameters." },
Modifiers_cannot_appear_here: { code: 1055, category: DiagnosticCategory.Error, key: "Modifiers cannot appear here." },
Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher: { code: 1056, category: DiagnosticCategory.Error, key: "Accessors are only available when targeting ECMAScript 5 and higher." },
Enum_member_must_have_initializer: { code: -9999999, category: DiagnosticCategory.Error, key: "Enum member must have initializer." },
Enum_member_must_have_initializer: { code: 1061, category: DiagnosticCategory.Error, key: "Enum member must have initializer." },
An_export_assignment_cannot_be_used_in_an_internal_module: { code: 1063, category: DiagnosticCategory.Error, key: "An export assignment cannot be used in an internal module." },
Ambient_enum_elements_can_only_have_integer_literal_initializers: { code: 1066, category: DiagnosticCategory.Error, key: "Ambient enum elements can only have integer literal initializers." },
module_class_interface_enum_import_or_statement: { code: 1067, category: DiagnosticCategory.NoPrefix, key: "module, class, interface, enum, import or statement" },
Unexpected_token_A_constructor_method_accessor_or_property_was_expected: { code: 1068, category: DiagnosticCategory.Error, key: "Unexpected token. A constructor, method, accessor, or property was expected." },
statement: { code: 1069, category: DiagnosticCategory.NoPrefix, key: "statement" },
case_or_default_clause: { code: 1070, category: DiagnosticCategory.NoPrefix, key: "case or default clause" },
identifier: { code: 1071, category: DiagnosticCategory.NoPrefix, key: "identifier" },
call_construct_index_property_or_function_signature: { code: 1072, category: DiagnosticCategory.NoPrefix, key: "call, construct, index, property or function signature" },
expression: { code: 1073, category: DiagnosticCategory.NoPrefix, key: "expression" },
type_name: { code: 1074, category: DiagnosticCategory.NoPrefix, key: "type name" },
property_or_accessor: { code: 1075, category: DiagnosticCategory.NoPrefix, key: "property or accessor" },
parameter: { code: 1076, category: DiagnosticCategory.NoPrefix, key: "parameter" },
type: { code: 1077, category: DiagnosticCategory.NoPrefix, key: "type" },
type_parameter: { code: 1078, category: DiagnosticCategory.NoPrefix, key: "type parameter" },
A_declare_modifier_cannot_be_used_with_an_import_declaration: { code: 1079, category: DiagnosticCategory.Error, key: "A 'declare' modifier cannot be used with an import declaration." },
Invalid_reference_directive_syntax: { code: 1084, category: DiagnosticCategory.Error, key: "Invalid 'reference' directive syntax." },
Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher: { code: 1085, category: DiagnosticCategory.Error, key: "Octal literals are not available when targeting ECMAScript 5 and higher." },
@@ -88,13 +67,12 @@ module ts {
Invalid_use_of_0_in_strict_mode: { code: 1100, category: DiagnosticCategory.Error, key: "Invalid use of '{0}' in strict mode." },
with_statements_are_not_allowed_in_strict_mode: { code: 1101, category: DiagnosticCategory.Error, key: "'with' statements are not allowed in strict mode." },
delete_cannot_be_called_on_an_identifier_in_strict_mode: { code: 1102, category: DiagnosticCategory.Error, key: "'delete' cannot be called on an identifier in strict mode." },
Invalid_left_hand_side_in_for_in_statement: { code: 1103, category: DiagnosticCategory.Error, key: "Invalid left-hand side in 'for...in' statement." },
A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement: { code: 1104, category: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.Error, key: "Jump target cannot cross function boundary." },
A_return_statement_can_only_be_used_within_a_function_body: { code: 1108, category: DiagnosticCategory.Error, key: "A 'return' statement can only be used within a function body." },
Expression_expected: { code: -9999999, category: DiagnosticCategory.Error, key: "Expression expected." },
Type_expected: { code: -9999999, category: DiagnosticCategory.Error, key: "Type expected." },
Expression_expected: { code: 1109, category: DiagnosticCategory.Error, key: "Expression expected." },
Type_expected: { code: 1110, category: DiagnosticCategory.Error, key: "Type expected." },
A_constructor_implementation_cannot_be_declared_in_an_ambient_context: { code: 1111, category: DiagnosticCategory.Error, key: "A constructor implementation cannot be declared in an ambient context." },
A_class_member_cannot_be_declared_optional: { code: 1112, category: DiagnosticCategory.Error, key: "A class member cannot be declared optional." },
A_default_clause_cannot_appear_more_than_once_in_a_switch_statement: { code: 1113, category: DiagnosticCategory.Error, key: "A 'default' clause cannot appear more than once in a 'switch' statement." },
@@ -106,193 +84,259 @@ module ts {
An_object_literal_cannot_have_property_and_accessor_with_the_same_name: { code: 1119, category: DiagnosticCategory.Error, key: "An object literal cannot have property and accessor with the same name." },
An_export_assignment_cannot_have_modifiers: { code: 1120, category: DiagnosticCategory.Error, key: "An export assignment cannot have modifiers." },
Octal_literals_are_not_allowed_in_strict_mode: { code: 1121, category: DiagnosticCategory.Error, key: "Octal literals are not allowed in strict mode." },
Duplicate_identifier_0: { code: 2000, category: DiagnosticCategory.Error, key: "Duplicate identifier '{0}'." },
Extends_clause_of_exported_class_0_has_or_is_using_private_name_1: { code: 2018, category: DiagnosticCategory.Error, key: "Extends clause of exported class '{0}' has or is using private name '{1}'." },
Implements_clause_of_exported_class_0_has_or_is_using_private_name_1: { code: 2019, category: DiagnosticCategory.Error, key: "Implements clause of exported class '{0}' has or is using private name '{1}'." },
Extends_clause_of_exported_interface_0_has_or_is_using_private_name_1: { code: 2020, category: DiagnosticCategory.Error, key: "Extends clause of exported interface '{0}' has or is using private name '{1}'." },
Extends_clause_of_exported_class_0_has_or_is_using_name_1_from_private_module_2: { code: 2021, category: DiagnosticCategory.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_name_1_from_private_module_2: { code: 2022, category: DiagnosticCategory.Error, key: "Implements clause of exported class '{0}' has or is using name '{1}' from private module '{2}'." },
Extends_clause_of_exported_interface_0_has_or_is_using_name_1_from_private_module_2: { code: 2023, category: DiagnosticCategory.Error, key: "Extends clause of exported interface '{0}' 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: 2024, category: DiagnosticCategory.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_private_name_1: { code: 2025, category: DiagnosticCategory.Error, key: "Public property '{0}' of exported class has or is using private name '{1}'." },
Property_0_of_exported_interface_has_or_is_using_private_name_1: { code: 2026, category: DiagnosticCategory.Error, key: "Property '{0}' of exported interface has or is using private name '{1}'." },
Exported_variable_0_has_or_is_using_private_name_1: { code: 2027, category: DiagnosticCategory.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_private_module_2: { code: 2028, category: DiagnosticCategory.Error, key: "Public static 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_name_1_from_private_module_2: { code: 2029, category: DiagnosticCategory.Error, key: "Public property '{0}' of exported class has or is using name '{1}' from private module '{2}'." },
Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2: { code: 2030, category: DiagnosticCategory.Error, key: "Property '{0}' of exported interface has or is using name '{1}' from private module '{2}'." },
Exported_variable_0_has_or_is_using_name_1_from_private_module_2: { code: 2031, category: DiagnosticCategory.Error, key: "Exported variable '{0}' 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: 2032, category: DiagnosticCategory.Error, key: "Parameter '{0}' of constructor from exported class has or is using private name '{1}'." },
Parameter_0_of_public_static_property_setter_from_exported_class_has_or_is_using_private_name_1: { code: 2033, category: DiagnosticCategory.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_private_name_1: { code: 2034, category: DiagnosticCategory.Error, key: "Parameter '{0}' of public property setter from exported class has or is using private name '{1}'." },
Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1: { code: 2035, category: DiagnosticCategory.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_private_name_1: { code: 2036, category: DiagnosticCategory.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_private_name_1: { code: 2037, category: DiagnosticCategory.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_private_name_1: { code: 2038, category: DiagnosticCategory.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_private_name_1: { code: 2039, category: DiagnosticCategory.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_private_name_1: { code: 2040, category: DiagnosticCategory.Error, key: "Parameter '{0}' of exported function has or is using private name '{1}'." },
Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 2041, category: DiagnosticCategory.Error, key: "Parameter '{0}' of constructor 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_name_1_from_private_module_2: { code: 2042, category: DiagnosticCategory.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_property_setter_from_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 2043, category: DiagnosticCategory.Error, key: "Parameter '{0}' of public property setter from exported class has or is using name '{1}' from private module '{2}'." },
Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2: { code: 2044, category: DiagnosticCategory.Error, key: "Parameter '{0}' of constructor 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_name_1_from_private_module_2: { code: 2045, category: DiagnosticCategory.Error, key: "Parameter '{0}' of call signature from exported interface has or is using name '{1}' from private module '{2}'." },
Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 2046, category: DiagnosticCategory.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_method_from_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 2047, category: DiagnosticCategory.Error, key: "Parameter '{0}' of public method from exported class has or is using name '{1}' from private module '{2}'." },
Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2: { code: 2048, category: DiagnosticCategory.Error, key: "Parameter '{0}' of method from exported interface has or is using name '{1}' from private module '{2}'." },
Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2: { code: 2049, category: DiagnosticCategory.Error, key: "Parameter '{0}' of exported function has or is using name '{1}' from private module '{2}'." },
Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_private_name_0: { code: 2050, category: DiagnosticCategory.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_private_name_0: { code: 2051, category: DiagnosticCategory.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_private_name_0: { code: 2052, category: DiagnosticCategory.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_private_name_0: { code: 2053, category: DiagnosticCategory.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_private_name_0: { code: 2054, category: DiagnosticCategory.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_private_name_0: { code: 2055, category: DiagnosticCategory.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_private_name_0: { code: 2056, category: DiagnosticCategory.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_private_name_0: { code: 2057, category: DiagnosticCategory.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_private_name_0: { code: 2058, category: DiagnosticCategory.Error, key: "Return type of exported function has or is using private name '{0}'." },
Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_name_0_from_private_module_1: { code: 2059, category: DiagnosticCategory.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_property_getter_from_exported_class_has_or_is_using_name_0_from_private_module_1: { code: 2060, category: DiagnosticCategory.Error, key: "Return type of public property getter from exported class has or is using name '{0}' from private module '{1}'." },
Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1: { code: 2061, category: DiagnosticCategory.Error, key: "Return type of constructor 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_name_0_from_private_module_1: { code: 2062, category: DiagnosticCategory.Error, key: "Return type of call 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_name_0_from_private_module_1: { code: 2063, category: DiagnosticCategory.Error, key: "Return type of index signature from exported interface has or is using name '{0}' from private module '{1}'." },
Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1: { code: 2064, category: DiagnosticCategory.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_method_from_exported_class_has_or_is_using_name_0_from_private_module_1: { code: 2065, category: DiagnosticCategory.Error, key: "Return type of public method from exported class has or is using name '{0}' from private module '{1}'." },
Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1: { code: 2066, category: DiagnosticCategory.Error, key: "Return type of method from exported interface has or is using name '{0}' from private module '{1}'." },
Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1: { code: 2067, category: DiagnosticCategory.Error, key: "Return type of exported function has or is using name '{0}' from private module '{1}'." },
Import_declaration_0_is_using_private_name_1: { code: 2181, category: DiagnosticCategory.Error, key: "Import declaration '{0}' is using private name '{1}'." },
Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1: { code: 2208, category: DiagnosticCategory.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_private_name_1: { code: 2209, category: DiagnosticCategory.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_private_name_1: { code: 2210, category: DiagnosticCategory.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_private_name_1: { code: 2211, category: DiagnosticCategory.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_private_name_1: { code: 2212, category: DiagnosticCategory.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_private_name_1: { code: 2213, category: DiagnosticCategory.Error, key: "Type parameter '{0}' of exported function 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: 2214, category: DiagnosticCategory.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_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2: { code: 2215, category: DiagnosticCategory.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_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 2216, category: DiagnosticCategory.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_method_from_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 2217, category: DiagnosticCategory.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_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2: { code: 2218, category: DiagnosticCategory.Error, key: "Type parameter '{0}' of method from exported interface has or is using name '{1}' from private module '{2}'." },
Type_parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2: { code: 2219, category: DiagnosticCategory.Error, key: "Type parameter '{0}' of exported function has or is using name '{1}' from private module '{2}'." },
Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: { code: 2220, category: DiagnosticCategory.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_private_name_1: { code: 2221, category: DiagnosticCategory.Error, key: "Type parameter '{0}' of exported interface has or is using private name '{1}'." },
Type_parameter_0_of_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 2222, 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_interface_has_or_is_using_name_1_from_private_module_2: { code: 2223, category: DiagnosticCategory.Error, key: "Type parameter '{0}' of exported interface has or is using name '{1}' from private module '{2}'." },
Variable_declaration_list_cannot_be_empty: { code: 1123, category: DiagnosticCategory.Error, key: "Variable declaration list cannot be empty." },
Digit_expected: { code: 1124, category: DiagnosticCategory.Error, key: "Digit expected." },
Hexadecimal_digit_expected: { code: 1125, category: DiagnosticCategory.Error, key: "Hexadecimal digit expected." },
Unexpected_end_of_text: { code: 1126, category: DiagnosticCategory.Error, key: "Unexpected end of text." },
Invalid_character: { code: 1127, category: DiagnosticCategory.Error, key: "Invalid character." },
Declaration_or_statement_expected: { code: 1128, category: DiagnosticCategory.Error, key: "Declaration or statement expected." },
Statement_expected: { code: 1129, category: DiagnosticCategory.Error, key: "Statement expected." },
case_or_default_expected: { code: 1130, category: DiagnosticCategory.Error, key: "'case' or 'default' expected." },
Property_or_signature_expected: { code: 1131, category: DiagnosticCategory.Error, key: "Property or signature expected." },
Enum_member_expected: { code: 1132, category: DiagnosticCategory.Error, key: "Enum member expected." },
Type_reference_expected: { code: 1133, category: DiagnosticCategory.Error, key: "Type reference expected." },
Variable_declaration_expected: { code: 1134, category: DiagnosticCategory.Error, key: "Variable declaration expected." },
Argument_expression_expected: { code: 1135, category: DiagnosticCategory.Error, key: "Argument expression expected." },
Property_assignment_expected: { code: 1136, category: DiagnosticCategory.Error, key: "Property assignment expected." },
Expression_or_comma_expected: { code: 1137, category: DiagnosticCategory.Error, key: "Expression or comma expected." },
Parameter_declaration_expected: { code: 1138, category: DiagnosticCategory.Error, key: "Parameter declaration expected." },
Type_parameter_declaration_expected: { code: 1139, category: DiagnosticCategory.Error, key: "Type parameter declaration expected." },
Type_argument_expected: { code: 1140, category: DiagnosticCategory.Error, key: "Type argument expected." },
String_literal_expected: { code: 1141, category: DiagnosticCategory.Error, key: "String literal expected." },
Line_break_not_permitted_here: { code: 1142, category: DiagnosticCategory.Error, key: "Line break not permitted here." },
catch_or_finally_expected: { code: 1143, category: DiagnosticCategory.Error, key: "'catch' or 'finally' expected." },
Block_or_expected: { code: 1144, category: DiagnosticCategory.Error, key: "Block or ';' expected." },
Modifiers_not_permitted_on_index_signature_members: { code: 1145, category: DiagnosticCategory.Error, key: "Modifiers not permitted on index signature members." },
Declaration_expected: { code: 1146, category: DiagnosticCategory.Error, key: "Declaration expected." },
Import_declarations_in_an_internal_module_cannot_reference_an_external_module: { code: 1147, category: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: 2068, category: DiagnosticCategory.Error, key: "'new T[]' cannot be used to create an array. Use 'new Array<T>()' instead." },
Multiple_constructor_implementations_are_not_allowed: { code: 2070, category: DiagnosticCategory.Error, key: "Multiple constructor implementations are not allowed." },
A_class_may_only_implement_another_class_or_interface: { code: 2074, category: DiagnosticCategory.Error, key: "A class may only implement another class or interface." },
get_and_set_accessor_must_have_the_same_type: { code: 2096, category: DiagnosticCategory.Error, key: "'get' and 'set' accessor must have the same type." },
Static_members_cannot_reference_class_type_parameters: { code: 2099, category: DiagnosticCategory.Error, key: "Static members cannot reference class type parameters." },
super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_derived_class: { code: 2102, category: DiagnosticCategory.Error, key: "'super' property access is permitted only in a constructor, member function, or member accessor of a derived class" },
The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type: { code: 2112, category: DiagnosticCategory.Error, key: "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: { code: 2113, category: DiagnosticCategory.Error, key: "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: { code: 2114, category: DiagnosticCategory.Error, key: "An arithmetic operand must be of type 'any', 'number' or an enum type." },
The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation: { code: 2115, category: DiagnosticCategory.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: 2116, category: DiagnosticCategory.Error, key: "The left-hand side of a 'for...in' statement must be of type 'string' or 'any'." },
The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter: { code: 2117, category: DiagnosticCategory.Error, key: "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: { code: 2118, category: DiagnosticCategory.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: 2119, category: DiagnosticCategory.Error, key: "The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter" },
A_get_accessor_must_return_a_value_or_consist_of_a_single_throw_statement: { code: 2126, category: DiagnosticCategory.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: 2127, category: DiagnosticCategory.Error, key: "Getter and setter accessors do not agree in visibility." },
A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value_or_consist_of_a_single_throw_statement: { code: 2131, category: DiagnosticCategory.Error, key: "A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement." },
Untyped_function_calls_may_not_accept_type_arguments: { code: 2158, category: DiagnosticCategory.Error, key: "Untyped function calls may not accept type arguments." },
The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter: { code: 2120, category: DiagnosticCategory.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: 2121, category: DiagnosticCategory.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." },
Setters_cannot_return_a_value: { code: 2122, category: DiagnosticCategory.Error, key: "Setters cannot return a value." },
Invalid_left_hand_side_of_assignment_expression: { code: 2130, category: DiagnosticCategory.Error, key: "Invalid left-hand side of assignment expression." },
Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2: { code: 2134, category: DiagnosticCategory.Error, key: "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: { code: 2135, category: DiagnosticCategory.Error, key: "All symbols within a 'with' block will be resolved to 'any'." },
The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_property_or_indexer: { code: 2139, category: DiagnosticCategory.Error, key: "The operand of an increment or decrement operator must be a variable, property or indexer." },
Overload_signatures_must_all_be_public_or_private: { code: 2150, category: DiagnosticCategory.Error, key: "Overload signatures must all be public or private." },
Overload_signatures_must_all_be_exported_or_not_exported: { code: 2151, category: DiagnosticCategory.Error, key: "Overload signatures must all be exported or not exported." },
Overload_signatures_must_all_be_ambient_or_non_ambient: { code: 2152, category: DiagnosticCategory.Error, key: "Overload signatures must all be ambient or non-ambient." },
Overload_signatures_must_all_be_optional_or_required: { code: 2153, category: DiagnosticCategory.Error, key: "Overload signatures must all be optional or required." },
this_cannot_be_referenced_in_constructor_arguments: { code: 2155, category: DiagnosticCategory.Error, key: "'this' cannot be referenced in constructor arguments." },
Value_of_type_0_is_not_callable_Did_you_mean_to_include_new: { code: 2161, category: DiagnosticCategory.Error, key: "Value of type '{0}' is not callable. Did you mean to include 'new'?" },
A_signature_with_an_implementation_cannot_use_a_string_literal_type: { code: 2163, category: DiagnosticCategory.Error, key: "A signature with an implementation cannot use a string literal type." },
Interface_0_cannot_simultaneously_extend_types_1_and_2_Colon: { code: 2189, category: DiagnosticCategory.Error, key: "Interface '{0}' cannot simultaneously extend types '{1}' and '{2}':" },
Initializer_of_parameter_0_cannot_reference_identifier_1_declared_after_it: { code: 2190, category: DiagnosticCategory.Error, key: "Initializer of parameter '{0}' cannot reference identifier '{1}' declared after it." },
Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local: { code: 2192, category: DiagnosticCategory.Error, key: "Individual declarations in merged declaration {0} must be all exported or all local." },
super_cannot_be_referenced_in_constructor_arguments: { code: 2193, category: DiagnosticCategory.Error, key: "'super' cannot be referenced in constructor arguments." },
Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class: { code: 2194, category: DiagnosticCategory.Error, key: "Return type of constructor signature must be assignable to the instance type of the class" },
Ambient_external_module_declaration_cannot_specify_relative_module_name: { code: 2196, category: DiagnosticCategory.Error, key: "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: { code: 2197, category: DiagnosticCategory.Error, key: "Import declaration in an ambient external module declaration cannot reference external module through relative external module name." },
Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference: { code: 2200, category: DiagnosticCategory.Error, key: "Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference." },
Duplicate_identifier_super_Compiler_uses_super_to_capture_base_class_reference: { code: 2205, category: DiagnosticCategory.Error, key: "Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference." },
Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference: { code: 2206, category: DiagnosticCategory.Error, key: "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: { code: 2207, category: DiagnosticCategory.Error, key: "Expression resolves to '_super' that compiler uses to capture base class reference." },
Duplicate_identifier_i_Compiler_uses_i_to_initialize_rest_parameter: { code: 2224, category: DiagnosticCategory.Error, key: "Duplicate identifier '_i'. Compiler uses '_i' to initialize rest parameter." },
Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters: { code: 2225, category: DiagnosticCategory.Error, key: "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters." },
Constraint_of_a_type_parameter_cannot_reference_any_type_parameter_from_the_same_type_parameter_list: { code: 2229, category: DiagnosticCategory.Error, key: "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: { code: 2230, category: DiagnosticCategory.Error, key: "Initializer of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor." },
Parameter_0_cannot_be_referenced_in_its_initializer: { code: 2231, category: DiagnosticCategory.Error, key: "Parameter '{0}' cannot be referenced in its initializer." },
Duplicate_string_index_signature: { code: 2232, category: DiagnosticCategory.Error, key: "Duplicate string index signature." },
Duplicate_number_index_signature: { code: 2233, category: DiagnosticCategory.Error, key: "Duplicate number index signature." },
All_declarations_of_an_interface_must_have_identical_type_parameters: { code: 2234, category: DiagnosticCategory.Error, key: "All declarations of an interface must have identical type parameters." },
Expression_resolves_to_variable_declaration_i_that_compiler_uses_to_initialize_rest_parameter: { code: 2235, category: DiagnosticCategory.Error, key: "Expression resolves to variable declaration '_i' that compiler uses to initialize rest parameter." },
Function_implementation_name_must_be_0: { code: 2239, category: DiagnosticCategory.Error, key: "Function implementation name must be '{0}'." },
Constructor_implementation_is_missing: { code: 2240, category: DiagnosticCategory.Error, key: "Constructor implementation is missing." },
An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements: { code: 2245, category: DiagnosticCategory.Error, key: "An export assignment cannot be used in a module with other exported elements." },
A_parameter_property_is_only_allowed_in_a_constructor_implementation: { code: 2246, category: DiagnosticCategory.Error, key: "A parameter property is only allowed in a constructor implementation." },
Function_overload_must_be_static: { code: 2247, category: DiagnosticCategory.Error, key: "Function overload must be static." },
Function_overload_must_not_be_static: { code: 2248, category: DiagnosticCategory.Error, key: "Function overload must not be static." },
Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: { code: 2249, category: DiagnosticCategory.Error, key: "Public static 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_external_module_2_but_cannot_be_named: { code: 2250, category: DiagnosticCategory.Error, key: "Public property '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named." },
Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: { code: 2251, category: DiagnosticCategory.Error, key: "Exported variable '{0}' 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_external_module_2_but_cannot_be_named: { code: 2252, category: DiagnosticCategory.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_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: { code: 2253, category: DiagnosticCategory.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_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: { code: 2254, category: DiagnosticCategory.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_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: { code: 2255, category: DiagnosticCategory.Error, key: "Parameter '{0}' of exported function has or is using name '{1}' from external module {2} but cannot be named." },
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: 2256, category: DiagnosticCategory.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_property_getter_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: { code: 2257, category: DiagnosticCategory.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_static_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: { code: 2258, category: DiagnosticCategory.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_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: { code: 2259, category: DiagnosticCategory.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_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: { code: 2260, category: DiagnosticCategory.Error, key: "Return type of exported function has or is using name '{0}' from external module {1} but cannot be named." },
Circular_definition_of_import_alias_0: { code: 3000, category: DiagnosticCategory.Error, key: "Circular definition of import alias '{0}'." },
Cannot_find_name_0: { code: 3001, category: DiagnosticCategory.Error, key: "Cannot find name '{0}'." },
Module_0_has_no_exported_member_1: { code: 3002, category: DiagnosticCategory.Error, key: "Module '{0}' has no exported member '{1}'." },
Cannot_find_external_module_0: { code: 3003, category: DiagnosticCategory.Error, key: "Cannot find external module '{0}'." },
A_module_cannot_have_more_than_one_export_assignment: { code: 3004, category: DiagnosticCategory.Error, key: "A module cannot have more than one export assignment." },
Type_0_recursively_references_itself_as_a_base_type: { code: 3005, category: DiagnosticCategory.Error, key: "Type '{0}' recursively references itself as a base type." },
A_class_may_only_extend_another_class: { code: 3006, category: DiagnosticCategory.Error, key: "A class may only extend another class." },
An_interface_may_only_extend_a_class_or_another_interface: { code: 3007, category: DiagnosticCategory.Error, key: "An interface may only extend a class or another interface." },
Generic_type_0_requires_1_type_argument_s: { code: 3008, category: DiagnosticCategory.Error, key: "Generic type '{0}' requires {1} type argument(s)." },
Type_0_is_not_generic: { code: 3009, category: DiagnosticCategory.Error, key: "Type '{0}' is not generic." },
Cannot_find_global_type_0: { code: 3010, category: DiagnosticCategory.Error, key: "Cannot find global type '{0}'." },
Global_type_0_must_be_a_class_or_interface_type: { code: 3011, category: DiagnosticCategory.Error, key: "Global type '{0}' must be a class or interface type." },
Global_type_0_must_have_1_type_parameter_s: { code: 3012, category: DiagnosticCategory.Error, key: "Global type '{0}' must have {1} type parameter(s)." },
this_cannot_be_referenced_in_a_module_body: { code: 3013, category: DiagnosticCategory.Error, key: "'this' cannot be referenced in a module body." },
this_cannot_be_referenced_in_a_static_property_initializer: { code: 3014, category: DiagnosticCategory.Error, key: "'this' cannot be referenced in a static property initializer." },
this_cannot_be_referenced_in_current_location: { code: -9999999, category: DiagnosticCategory.Error, key: "'this' cannot be referenced in current location." },
super_can_only_be_referenced_in_a_derived_class: { code: 3015, category: DiagnosticCategory.Error, key: "'super' can only be referenced in a derived class." },
Property_0_does_not_exist_on_type_1: { code: 3017, category: DiagnosticCategory.Error, key: "Property '{0}' does not exist on type '{1}'." },
An_index_expression_argument_must_be_of_type_string_number_or_any: { code: 3018, category: DiagnosticCategory.Error, key: "An index expression argument must be of type 'string', 'number', or 'any'." },
Type_0_does_not_satisfy_the_constraint_1_Colon: { code: 3019, category: DiagnosticCategory.Error, key: "Type '{0}' does not satisfy the constraint '{1}':" },
Type_0_does_not_satisfy_the_constraint_1: { code: 3019, category: DiagnosticCategory.Error, key: "Type '{0}' does not satisfy the constraint '{1}'." },
Supplied_parameters_do_not_match_any_signature_of_call_target: { code: 3020, category: DiagnosticCategory.Error, key: "Supplied parameters do not match any signature of call target." },
Cannot_invoke_an_expression_whose_type_lacks_a_call_signature: { code: 3021, category: DiagnosticCategory.Error, key: "Cannot invoke an expression whose type lacks a call signature." },
Only_a_void_function_can_be_called_with_the_new_keyword: { code: 3022, category: DiagnosticCategory.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: 3023, category: DiagnosticCategory.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_Colon: { code: 3024, category: DiagnosticCategory.Error, key: "Neither type '{0}' nor type '{1}' is assignable to the other:" },
Neither_type_0_nor_type_1_is_assignable_to_the_other: { code: 3024, category: DiagnosticCategory.Error, key: "Neither type '{0}' nor type '{1}' is assignable to the other." },
No_best_common_type_exists_among_return_expressions: { code: 3027, category: DiagnosticCategory.Error, key: "No best common type exists among return expressions." },
Operator_0_cannot_be_applied_to_types_1_and_2: { code: 3028, category: DiagnosticCategory.Error, key: "Operator '{0}' cannot be applied to types '{1}' and '{2}'." },
No_best_common_type_exists_between_0_and_1: { code: 3029, category: DiagnosticCategory.Error, key: "No best common type exists between '{0}' and '{1}'." },
No_best_common_type_exists_between_0_1_and_2: { code: 3030, category: DiagnosticCategory.Error, key: "No best common type exists between '{0}', '{1}', and '{2}'." },
A_rest_parameter_must_be_of_an_array_type: { code: 3031, category: DiagnosticCategory.Error, key: "A rest parameter must be of an array type." },
A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation: { code: 3032, category: DiagnosticCategory.Error, key: "A parameter initializer is only allowed in a function or constructor implementation." },
Specialized_overload_signature_is_not_assignable_to_any_non_specialized_signature: { code: 3033, category: DiagnosticCategory.Error, key: "Specialized overload signature is not assignable to any non-specialized signature." },
Duplicate_function_implementation: { code: 3034, category: DiagnosticCategory.Error, key: "Duplicate function implementation." },
Overload_signature_is_not_compatible_with_function_implementation: { code: 3035, category: DiagnosticCategory.Error, key: "Overload signature is not compatible with function implementation." },
Argument_of_type_0_is_not_assignable_to_parameter_of_type_1: { code: 3036, category: DiagnosticCategory.Error, key: "Argument of type '{0}' is not assignable to parameter of type '{1}'." },
Index_signature_is_missing_in_type_0: { code: 4003, category: DiagnosticCategory.Error, key: "Index signature is missing in type '{0}'." },
Index_signatures_are_incompatible_Colon: { code: 4004, category: DiagnosticCategory.Error, key: "Index signatures are incompatible:" },
Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_function: { code: 4016, category: DiagnosticCategory.NoPrefix, key: "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: { code: 4017, category: DiagnosticCategory.NoPrefix, key: "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: { code: 4018, category: DiagnosticCategory.NoPrefix, 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: 4019, category: DiagnosticCategory.NoPrefix, key: "Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member property." },
In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enum_element: { code: 4024, category: DiagnosticCategory.Error, key: "In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element." },
Named_properties_0_of_types_1_and_2_are_not_identical: { code: 4032, category: DiagnosticCategory.NoPrefix, key: "Named properties '{0}' of types '{1}' and '{2}' are not identical." },
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." },
Circular_definition_of_import_alias_0: { code: 2303, category: DiagnosticCategory.Error, key: "Circular definition of import alias '{0}'." },
Cannot_find_name_0: { code: 2304, category: DiagnosticCategory.Error, key: "Cannot find name '{0}'." },
Module_0_has_no_exported_member_1: { code: 2305, category: DiagnosticCategory.Error, key: "Module '{0}' has no exported member '{1}'." },
File_0_is_not_an_external_module: { code: 2306, category: DiagnosticCategory.Error, key: "File '{0}' is not an external module." },
Cannot_find_external_module_0: { code: 2307, category: DiagnosticCategory.Error, key: "Cannot find external module '{0}'." },
A_module_cannot_have_more_than_one_export_assignment: { code: 2308, category: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.Error, key: "Type '{0}' recursively references itself as a base type." },
A_class_may_only_extend_another_class: { code: 2311, category: DiagnosticCategory.Error, key: "A class may only extend another class." },
An_interface_may_only_extend_a_class_or_another_interface: { code: 2312, category: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.Error, key: "Generic type '{0}' requires {1} type argument(s)." },
Type_0_is_not_generic: { code: 2315, category: DiagnosticCategory.Error, key: "Type '{0}' is not generic." },
Global_type_0_must_be_a_class_or_interface_type: { code: 2316, category: DiagnosticCategory.Error, key: "Global type '{0}' must be a class or interface type." },
Global_type_0_must_have_1_type_parameter_s: { code: 2317, category: DiagnosticCategory.Error, key: "Global type '{0}' must have {1} type parameter(s)." },
Cannot_find_global_type_0: { code: 2318, category: DiagnosticCategory.Error, key: "Cannot find global type '{0}'." },
Named_properties_0_of_types_1_and_2_are_not_identical: { code: 2319, category: DiagnosticCategory.Error, key: "Named properties '{0}' of types '{1}' and '{2}' are not identical." },
Interface_0_cannot_simultaneously_extend_types_1_and_2_Colon: { code: 2320, category: DiagnosticCategory.Error, key: "Interface '{0}' cannot simultaneously extend types '{1}' and '{2}':" },
Excessive_stack_depth_comparing_types_0_and_1: { code: 2321, category: DiagnosticCategory.Error, key: "Excessive stack depth comparing types '{0}' and '{1}'." },
Type_0_is_not_assignable_to_type_1_Colon: { code: 2322, category: DiagnosticCategory.Error, key: "Type '{0}' is not assignable to type '{1}':" },
Type_0_is_not_assignable_to_type_1: { code: 2323, category: DiagnosticCategory.Error, key: "Type '{0}' is not assignable to type '{1}'." },
Property_0_is_missing_in_type_1: { code: 2324, category: DiagnosticCategory.Error, key: "Property '{0}' is missing in type '{1}'." },
Private_property_0_cannot_be_reimplemented: { code: 2325, category: DiagnosticCategory.Error, key: "Private property '{0}' cannot be reimplemented." },
Types_of_property_0_are_incompatible_Colon: { code: 2326, category: DiagnosticCategory.Error, key: "Types of property '{0}' are incompatible:" },
Required_property_0_cannot_be_reimplemented_with_optional_property_in_1: { code: 2327, category: DiagnosticCategory.Error, key: "Required property '{0}' cannot be reimplemented with optional property in '{1}'." },
Types_of_parameters_0_and_1_are_incompatible_Colon: { code: 2328, category: DiagnosticCategory.Error, key: "Types of parameters '{0}' and '{1}' are incompatible:" },
Index_signature_is_missing_in_type_0: { code: 2329, category: DiagnosticCategory.Error, key: "Index signature is missing in type '{0}'." },
Index_signatures_are_incompatible_Colon: { code: 2330, category: DiagnosticCategory.Error, key: "Index signatures are incompatible:" },
this_cannot_be_referenced_in_a_module_body: { code: 2331, category: DiagnosticCategory.Error, key: "'this' cannot be referenced in a module body." },
this_cannot_be_referenced_in_current_location: { code: 2332, category: DiagnosticCategory.Error, key: "'this' cannot be referenced in current location." },
this_cannot_be_referenced_in_constructor_arguments: { code: 2333, category: DiagnosticCategory.Error, key: "'this' cannot be referenced in constructor arguments." },
this_cannot_be_referenced_in_a_static_property_initializer: { code: 2334, category: DiagnosticCategory.Error, key: "'this' cannot be referenced in a static property initializer." },
super_can_only_be_referenced_in_a_derived_class: { code: 2335, category: DiagnosticCategory.Error, key: "'super' can only be referenced in a derived class." },
super_cannot_be_referenced_in_constructor_arguments: { code: 2336, category: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.Error, key: "Property '{0}' does not exist on type '{1}'." },
Only_public_methods_of_the_base_class_are_accessible_via_the_super_keyword: { code: 2340, category: DiagnosticCategory.Error, key: "Only public methods of the base class are accessible via the 'super' keyword" },
Property_0_is_inaccessible: { code: 2341, category: DiagnosticCategory.Error, key: "Property '{0}' is inaccessible." },
An_index_expression_argument_must_be_of_type_string_number_or_any: { code: 2342, category: DiagnosticCategory.Error, key: "An index expression argument must be of type 'string', 'number', or 'any'." },
Type_0_does_not_satisfy_the_constraint_1_Colon: { code: 2343, category: DiagnosticCategory.Error, key: "Type '{0}' does not satisfy the constraint '{1}':" },
Type_0_does_not_satisfy_the_constraint_1: { code: 2344, category: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.Error, key: "Supplied parameters do not match any signature of call target." },
Untyped_function_calls_may_not_accept_type_arguments: { code: 2347, category: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.Error, key: "Neither type '{0}' nor type '{1}' is assignable to the other." },
Neither_type_0_nor_type_1_is_assignable_to_the_other_Colon: { code: 2353, category: DiagnosticCategory.Error, key: "Neither type '{0}' nor type '{1}' is assignable to the other:" },
No_best_common_type_exists_among_return_expressions: { code: 2354, category: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.Error, key: "Invalid left-hand side of assignment expression." },
Operator_0_cannot_be_applied_to_types_1_and_2: { code: 2365, category: DiagnosticCategory.Error, key: "Operator '{0}' cannot be applied to types '{1}' and '{2}'." },
No_best_common_type_exists_between_0_1_and_2: { code: 2366, category: DiagnosticCategory.Error, key: "No best common type exists between '{0}', '{1}', and '{2}'." },
No_best_common_type_exists_between_0_and_1: { code: 2367, category: DiagnosticCategory.Error, key: "No best common type exists between '{0}' and '{1}'." },
Type_parameter_name_cannot_be_0: { code: 2368, category: DiagnosticCategory.Error, key: "Type parameter name cannot be '{0}'" },
A_parameter_property_is_only_allowed_in_a_constructor_implementation: { code: 2369, category: DiagnosticCategory.Error, key: "A parameter property is only allowed in a constructor implementation." },
A_rest_parameter_must_be_of_an_array_type: { code: 2370, category: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.Error, key: "Parameter '{0}' cannot be referenced in its initializer." },
Initializer_of_parameter_0_cannot_reference_identifier_1_declared_after_it: { code: 2373, category: DiagnosticCategory.Error, key: "Initializer of parameter '{0}' cannot reference identifier '{1}' declared after it." },
Duplicate_string_index_signature: { code: 2374, category: DiagnosticCategory.Error, key: "Duplicate string index signature." },
Duplicate_number_index_signature: { code: 2375, category: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.Error, key: "Getter and setter accessors do not agree in visibility." },
get_and_set_accessor_must_have_the_same_type: { code: 2380, category: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.Error, key: "Overload signatures must all be exported or not exported." },
Overload_signatures_must_all_be_ambient_or_non_ambient: { code: 2384, category: DiagnosticCategory.Error, key: "Overload signatures must all be ambient or non-ambient." },
Overload_signatures_must_all_be_public_or_private: { code: 2385, category: DiagnosticCategory.Error, key: "Overload signatures must all be public or private." },
Overload_signatures_must_all_be_optional_or_required: { code: 2386, category: DiagnosticCategory.Error, key: "Overload signatures must all be optional or required." },
Function_overload_must_be_static: { code: 2387, category: DiagnosticCategory.Error, key: "Function overload must be static." },
Function_overload_must_not_be_static: { code: 2388, category: DiagnosticCategory.Error, key: "Function overload must not be static." },
Function_implementation_name_must_be_0: { code: 2389, category: DiagnosticCategory.Error, key: "Function implementation name must be '{0}'." },
Constructor_implementation_is_missing: { code: 2390, category: DiagnosticCategory.Error, key: "Constructor implementation is missing." },
Function_implementation_is_missing_or_not_immediately_following_the_declaration: { code: 2391, category: DiagnosticCategory.Error, key: "Function implementation is missing or not immediately following the declaration." },
Multiple_constructor_implementations_are_not_allowed: { code: 2392, category: DiagnosticCategory.Error, key: "Multiple constructor implementations are not allowed." },
Duplicate_function_implementation: { code: 2393, category: DiagnosticCategory.Error, key: "Duplicate function implementation." },
Overload_signature_is_not_compatible_with_function_implementation: { code: 2394, category: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.Error, key: "Numeric index type '{0}' is not assignable to string index type '{1}'." },
Class_name_cannot_be_0: { code: 2414, category: DiagnosticCategory.Error, key: "Class name cannot be '{0}'" },
Class_0_incorrectly_extends_base_class_1: { code: 2415, category: DiagnosticCategory.Error, key: "Class '{0}' incorrectly extends base class '{1}'." },
Class_0_incorrectly_extends_base_class_1_Colon: { code: 2416, category: DiagnosticCategory.Error, key: "Class '{0}' incorrectly extends base class '{1}':" },
Class_static_side_0_incorrectly_extends_base_class_static_side_1: { code: 2417, category: DiagnosticCategory.Error, key: "Class static side '{0}' incorrectly extends base class static side '{1}'." },
Class_static_side_0_incorrectly_extends_base_class_static_side_1_Colon: { code: 2418, category: DiagnosticCategory.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: DiagnosticCategory.Error, key: "Type name '{0}' in extends clause does not reference constructor function for '{0}'." },
Class_0_incorrectly_implements_interface_1: { code: 2420, category: DiagnosticCategory.Error, key: "Class '{0}' incorrectly implements interface '{1}'." },
Class_0_incorrectly_implements_interface_1_Colon: { code: 2421, category: DiagnosticCategory.Error, key: "Class '{0}' incorrectly implements interface '{1}':" },
A_class_may_only_implement_another_class_or_interface: { code: 2422, category: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.Error, key: "Interface name cannot be '{0}'" },
All_declarations_of_an_interface_must_have_identical_type_parameters: { code: 2428, category: DiagnosticCategory.Error, key: "All declarations of an interface must have identical type parameters." },
Interface_0_incorrectly_extends_interface_1_Colon: { code: 2429, category: DiagnosticCategory.Error, key: "Interface '{0}' incorrectly extends interface '{1}':" },
Interface_0_incorrectly_extends_interface_1: { code: 2430, category: DiagnosticCategory.Error, key: "Interface '{0}' incorrectly extends interface '{1}'." },
Enum_name_cannot_be_0: { code: 2431, category: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.Error, key: "Ambient external modules cannot be nested in other modules." },
Ambient_external_module_declaration_cannot_specify_relative_module_name: { code: 2436, category: DiagnosticCategory.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: DiagnosticCategory.Error, key: "Module '{0}' is hidden by a local declaration with the same name" },
Import_name_cannot_be_0: { code: 2438, category: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.Error, key: "Import declaration conflicts with local declaration of '{0}'" },
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}'." },
Type_parameter_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2: { code: 4003, category: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.Error, key: "Parameter '{0}' of exported function has or is using private name '{1}'." },
The_current_host_does_not_support_the_0_option: { code: 5001, category: DiagnosticCategory.Error, key: "The current host does not support the '{0}' option." },
Cannot_find_the_common_subdirectory_path_for_the_input_files: { code: 5009, category: DiagnosticCategory.Error, key: "Cannot find the common subdirectory path for the input files." },
Cannot_read_file_0_Colon_1: { code: 5012, category: DiagnosticCategory.Error, key: "Cannot read file '{0}': {1}" },
Unsupported_file_encoding: { code: 5013, category: DiagnosticCategory.NoPrefix, key: "Unsupported file encoding." },
Unsupported_file_encoding: { code: 5013, category: DiagnosticCategory.Error, key: "Unsupported file encoding." },
Unknown_compiler_option_0: { code: 5023, category: DiagnosticCategory.Error, key: "Unknown compiler option '{0}'." },
Could_not_write_file_0_Colon_1: { code: 5033, category: DiagnosticCategory.Error, key: "Could not write file '{0}': {1}" },
Option_mapRoot_cannot_be_specified_without_specifying_sourcemap_option: { code: 5038, category: DiagnosticCategory.Error, key: "Option mapRoot cannot be specified without specifying sourcemap option." },
Option_sourceRoot_cannot_be_specified_without_specifying_sourcemap_option: { code: 5039, category: DiagnosticCategory.Error, key: "Option sourceRoot cannot be specified without specifying sourcemap option." },
@@ -303,13 +347,10 @@ 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_emit_comments_to_output: { code: 6009, category: DiagnosticCategory.Message, key: "Do not emit comments to output." },
Skip_resolution_and_preprocessing: { code: 6010, category: DiagnosticCategory.Message, key: "Skip resolution and preprocessing." },
Specify_ECMAScript_target_version_Colon_ES3_default_or_ES5: { code: 6015, category: DiagnosticCategory.Message, key: "Specify ECMAScript target version: 'ES3' (default), or 'ES5'" },
Specify_module_code_generation_Colon_commonjs_or_amd: { code: 6016, category: DiagnosticCategory.Message, key: "Specify module code generation: 'commonjs' or 'amd'" },
Print_this_message: { code: 6017, category: DiagnosticCategory.Message, key: "Print this message." },
Print_the_compiler_s_version: { code: 6019, category: DiagnosticCategory.Message, key: "Print the compiler's version." },
Allow_use_of_deprecated_0_keyword_when_referencing_an_external_module: { code: 6021, category: DiagnosticCategory.Message, key: "Allow use of deprecated '{0}' keyword when referencing an external module." },
Specify_locale_for_errors_and_messages_For_example_0_or_1: { code: 6022, category: DiagnosticCategory.Message, key: "Specify locale for errors and messages. For example '{0}' or '{1}'" },
Syntax_Colon_0: { code: 6023, category: DiagnosticCategory.Message, key: "Syntax: {0}" },
options: { code: 6024, category: DiagnosticCategory.Message, key: "options" },
file: { code: 6025, category: DiagnosticCategory.Message, key: "file" },
@@ -317,29 +358,25 @@ module ts {
Options_Colon: { code: 6027, category: DiagnosticCategory.Message, key: "Options:" },
Version_0: { code: 6029, category: DiagnosticCategory.Message, key: "Version {0}" },
Insert_command_line_options_and_files_from_a_file: { code: 6030, category: DiagnosticCategory.Message, key: "Insert command line options and files from a file." },
Use_the_0_flag_to_see_options: { code: 6031, category: DiagnosticCategory.Message, key: "Use the '{0}' flag to see options." },
File_change_detected_Compiling: { code: 6032, category: DiagnosticCategory.Message, key: "File change detected. Compiling..." },
STRING: { code: 6033, category: DiagnosticCategory.Message, key: "STRING" },
KIND: { code: 6034, category: DiagnosticCategory.Message, key: "KIND" },
FILE: { code: 6035, category: DiagnosticCategory.Message, key: "FILE" },
VERSION: { code: 6036, category: DiagnosticCategory.Message, key: "VERSION" },
LOCATION: { code: 6037, category: DiagnosticCategory.Message, key: "LOCATION" },
DIRECTORY: { code: 6038, category: DiagnosticCategory.Message, key: "DIRECTORY" },
NUMBER: { code: 6039, category: DiagnosticCategory.Message, key: "NUMBER" },
Specify_the_codepage_to_use_when_opening_source_files: { code: 6040, category: DiagnosticCategory.Message, key: "Specify the codepage to use when opening source files." },
Additional_locations_Colon: { code: 6041, category: DiagnosticCategory.Message, key: "Additional locations:" },
Compilation_complete_Watching_for_file_changes: { code: 6042, category: DiagnosticCategory.Message, key: "Compilation complete. Watching for file changes." },
Generates_corresponding_map_file: { code: 6043, category: DiagnosticCategory.Message, key: "Generates corresponding '.map' file." },
Compiler_option_0_expects_an_argument: { code: 6044, category: DiagnosticCategory.Error, key: "Compiler option '{0}' expects an argument." },
Unterminated_quoted_string_in_response_file_0: { code: 6045, category: DiagnosticCategory.Error, key: "Unterminated quoted string in response file '{0}'." },
Argument_for_module_option_must_be_commonjs_or_amd: { code: 6045, category: DiagnosticCategory.Error, key: "Argument for '--module' option must be 'commonjs' or 'amd'." },
Argument_for_target_option_must_be_es3_or_es5: { code: 6046, category: DiagnosticCategory.Error, key: "Argument for '--target' option must be 'es3' or 'es5'." },
Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1: { code: 6047, category: DiagnosticCategory.Error, key: "Locale must be of the form <language> or <language>-<territory>. For example '{0}' or '{1}'." },
Unsupported_locale_0: { code: 6048, category: DiagnosticCategory.Error, key: "Unsupported locale '{0}'." },
Unable_to_open_file_0: { code: 6049, category: DiagnosticCategory.Error, key: "Unable to open file '{0}'." },
Corrupted_locale_file_0: { code: 6050, category: DiagnosticCategory.Error, key: "Corrupted locale file {0}." },
No_input_files_specified: { code: 6051, category: DiagnosticCategory.Error, key: "No input files specified." },
Warn_on_expressions_and_declarations_with_an_implied_any_type: { code: 7004, category: DiagnosticCategory.Message, key: "Warn on expressions and declarations with an implied 'any' type." },
Argument_for_module_option_must_be_commonjs_or_amd: { code: 6046, category: DiagnosticCategory.Error, key: "Argument for '--module' option must be 'commonjs' or 'amd'." },
Argument_for_target_option_must_be_es3_or_es5: { code: 6047, category: DiagnosticCategory.Error, key: "Argument for '--target' option must be 'es3' or 'es5'." },
Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1: { code: 6048, category: DiagnosticCategory.Error, key: "Locale must be of the form <language> or <language>-<territory>. For example '{0}' or '{1}'." },
Unsupported_locale_0: { code: 6049, category: DiagnosticCategory.Error, key: "Unsupported locale '{0}'." },
Unable_to_open_file_0: { code: 6050, category: DiagnosticCategory.Error, key: "Unable to open file '{0}'." },
Corrupted_locale_file_0: { code: 6051, category: DiagnosticCategory.Error, key: "Corrupted locale file {0}." },
Warn_on_expressions_and_declarations_with_an_implied_any_type: { code: 6052, category: DiagnosticCategory.Message, key: "Warn on expressions and declarations with an implied 'any' type." },
File_0_not_found: { code: 6053, category: DiagnosticCategory.Error, key: "File '{0}' not found." },
File_0_must_have_extension_ts_or_d_ts: { code: 6054, category: DiagnosticCategory.Error, key: "File '{0}' must have extension '.ts' or '.d.ts'." },
Variable_0_implicitly_has_an_1_type: { code: 7005, category: DiagnosticCategory.Error, key: "Variable '{0}' implicitly has an '{1}' type." },
Parameter_0_implicitly_has_an_1_type: { code: 7006, category: DiagnosticCategory.Error, key: "Parameter '{0}' implicitly has an '{1}' type." },
Member_0_implicitly_has_an_1_type: { code: 7008, category: DiagnosticCategory.Error, key: "Member '{0}' implicitly has an '{1}' type." },
@@ -347,83 +384,10 @@ module ts {
_0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type: { code: 7010, category: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.Error, key: "Construct signature, which lacks return-type annotation, implicitly has an 'any' return type." },
Lambda_function_which_lacks_return_type_annotation_implicitly_has_an_0_return_type: { code: 7014, category: DiagnosticCategory.Error, key: "Lambda function, which lacks return-type annotation, implicitly has an '{0}' return type." },
Array_literal_implicitly_has_an_0_type: { code: 7015, category: DiagnosticCategory.Error, key: "Array literal implicitly has an '{0}' type." },
Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_type_annotation: { code: 7016, category: DiagnosticCategory.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: DiagnosticCategory.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: DiagnosticCategory.Error, key: "Object literal's property '{0}' implicitly has an '{1}' type." },
Rest_parameter_0_implicitly_has_an_any_type: { code: 7019, category: DiagnosticCategory.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: DiagnosticCategory.Error, key: "Call signature, which lacks return-type annotation, implicitly has an 'any' return type." },
Variable_declaration_list_cannot_be_empty: { code: -9999999, category: DiagnosticCategory.Error, key: "Variable declaration list cannot be empty." },
Digit_expected: { code: -9999999, category: DiagnosticCategory.Error, key: "Digit expected." },
Hexadecimal_digit_expected: { code: -9999999, category: DiagnosticCategory.Error, key: "Hexadecimal digit expected." },
Unexpected_end_of_text: { code: -9999999, category: DiagnosticCategory.Error, key: "Unexpected end of text." },
Unterminated_string_constant: { code: -9999999, category: DiagnosticCategory.Error, key: "Unterminated string constant." },
Invalid_character: { code: -9999999, category: DiagnosticCategory.Error, key: "Invalid character." },
Declaration_or_statement_expected: { code: -9999999, category: DiagnosticCategory.Error, key: "Declaration or statement expected." },
Statement_expected: { code: -9999999, category: DiagnosticCategory.Error, key: "Statement expected." },
case_or_default_expected: { code: -9999999, category: DiagnosticCategory.Error, key: "'case' or 'default' expected." },
Property_or_signature_expected: { code: -9999999, category: DiagnosticCategory.Error, key: "Property or signature expected." },
Enum_member_expected: { code: -9999999, category: DiagnosticCategory.Error, key: "Enum member expected." },
Type_reference_expected: { code: -9999999, category: DiagnosticCategory.Error, key: "Type reference expected." },
Variable_declaration_expected: { code: -9999999, category: DiagnosticCategory.Error, key: "Variable declaration expected." },
Argument_expression_expected: { code: -9999999, category: DiagnosticCategory.Error, key: "Argument expression expected." },
Property_assignment_expected: { code: -9999999, category: DiagnosticCategory.Error, key: "Property assignment expected." },
Expression_or_comma_expected: { code: -9999999, category: DiagnosticCategory.Error, key: "Expression or comma expected." },
Parameter_declaration_expected: { code: -9999999, category: DiagnosticCategory.Error, key: "Parameter declaration expected." },
Type_parameter_declaration_expected: { code: -9999999, category: DiagnosticCategory.Error, key: "Type parameter declaration expected." },
Type_argument_expected: { code: -9999999, category: DiagnosticCategory.Error, key: "Type argument expected." },
String_literal_expected: { code: -9999999, category: DiagnosticCategory.Error, key: "String literal expected." },
not_preceded_by_parameter_list: { code: -9999999, category: DiagnosticCategory.Error, key: "'=>' not preceded by parameter list." },
Invalid_assignment_target: { code: -9999999, category: DiagnosticCategory.Error, key: "Invalid assignment target." },
super_must_be_followed_by_argument_list_or_member_access: { code: -9999999, category: DiagnosticCategory.Error, key: "'super' must be followed by argument list or member access." },
Line_break_not_permitted_here: { code: -9999999, category: DiagnosticCategory.Error, key: "Line break not permitted here." },
catch_or_finally_expected: { code: -9999999, category: DiagnosticCategory.Error, key: "'catch' or 'finally' expected." },
Block_or_expected: { code: -9999999, category: DiagnosticCategory.Error, key: "Block or ';' expected." },
Modifiers_not_permitted_on_index_signature_members: { code: -9999999, category: DiagnosticCategory.Error, key: "Modifiers not permitted on index signature members." },
Class_member_declaration_expected: { code: -9999999, category: DiagnosticCategory.Error, key: "Class member declaration expected." },
Declaration_expected: { code: -9999999, category: DiagnosticCategory.Error, key: "Declaration expected." },
Invalid_reference_comment: { code: -9999999, category: DiagnosticCategory.Error, key: "Invalid reference comment." },
File_0_is_not_an_external_module: { code: -9999999, category: DiagnosticCategory.Error, key: "File '{0}' is not an external module." },
Excessive_stack_depth_comparing_types_0_and_1: { code: -9999999, category: DiagnosticCategory.Error, key: "Excessive stack depth comparing types '{0}' and '{1}'." },
Type_0_is_not_assignable_to_type_1_Colon: { code: -9999999, category: DiagnosticCategory.Error, key: "Type '{0}' is not assignable to type '{1}':" },
Type_0_is_not_assignable_to_type_1: { code: -9999999, category: DiagnosticCategory.Error, key: "Type '{0}' is not assignable to type '{1}'." },
Property_0_is_missing_in_type_1: { code: -9999999, category: DiagnosticCategory.Error, key: "Property '{0}' is missing in type '{1}'." },
Private_property_0_cannot_be_reimplemented: { code: -9999999, category: DiagnosticCategory.Error, key: "Private property '{0}' cannot be reimplemented." },
Required_property_0_cannot_be_reimplemented_with_optional_property_in_1: { code: 2012, category: DiagnosticCategory.Error, key: "Required property '{0}' cannot be reimplemented with optional property in '{1}'." },
Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors: { code: -9999999, category: DiagnosticCategory.Error, key: "Super calls are not permitted outside constructors or in nested functions inside constructors" },
Only_public_methods_of_the_base_class_are_accessible_via_the_super_keyword: { code: -9999999, category: DiagnosticCategory.Error, key: "Only public methods of the base class are accessible via the 'super' keyword" },
A_super_call_must_be_the_first_statement_in_the_constructor_when_a_class_contains_initialized_properties_or_has_parameter_properties: { code: -9999999, category: DiagnosticCategory.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: -9999999, category: DiagnosticCategory.Error, key: "Constructors for derived classes must contain a 'super' call." },
Import_name_cannot_be_0: { code: -9999999, category: DiagnosticCategory.Error, key: "Import name cannot be '{0}'" },
Type_parameter_name_cannot_be_0: { code: -9999999, category: DiagnosticCategory.Error, key: "Type parameter name cannot be '{0}'" },
Class_name_cannot_be_0: { code: -9999999, category: DiagnosticCategory.Error, key: "Class name cannot be '{0}'" },
Interface_name_cannot_be_0: { code: -9999999, category: DiagnosticCategory.Error, key: "Interface name cannot be '{0}'" },
Enum_name_cannot_be_0: { code: -9999999, category: DiagnosticCategory.Error, key: "Enum name cannot be '{0}'" },
Types_of_property_0_are_incompatible_Colon: { code: -9999999, category: DiagnosticCategory.Error, key: "Types of property '{0}' are incompatible:" },
Types_of_parameters_0_and_1_are_incompatible_Colon: { code: -9999999, category: DiagnosticCategory.Error, key: "Types of parameters '{0}' and '{1}' are incompatible:" },
Unknown_identifier_0: { code: -9999999, category: DiagnosticCategory.Error, key: "Unknown identifier '{0}'." },
Property_0_is_inaccessible: { code: -9999999, category: DiagnosticCategory.Error, key: "Property '{0}' is inaccessible." },
Function_implementation_is_missing_or_not_immediately_following_the_declaration: { code: -9999999, category: DiagnosticCategory.Error, key: "Function implementation is missing or not immediately following the declaration." },
Property_0_of_type_1_is_not_assignable_to_string_index_type_2: { code: -9999999, category: DiagnosticCategory.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: -9999999, category: DiagnosticCategory.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: -9999999, category: DiagnosticCategory.Error, key: "Numeric index type '{0}' is not assignable to string index type '{1}'." },
Class_0_incorrectly_extends_base_class_1_Colon: { code: -9999999, category: DiagnosticCategory.Error, key: "Class '{0}' incorrectly extends base class '{1}':" },
Class_0_incorrectly_extends_base_class_1: { code: -9999999, category: DiagnosticCategory.Error, key: "Class '{0}' incorrectly extends base class '{1}'." },
Class_static_side_0_incorrectly_extends_base_class_static_side_1_Colon: { code: -9999999, category: DiagnosticCategory.Error, key: "Class static side '{0}' incorrectly extends base class static side '{1}':" },
Class_static_side_0_incorrectly_extends_base_class_static_side_1: { code: -9999999, category: DiagnosticCategory.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: -9999999, category: DiagnosticCategory.Error, key: "Type name '{0}' in extends clause does not reference constructor function for '{0}'." },
Class_0_incorrectly_implements_interface_1_Colon: { code: -9999999, category: DiagnosticCategory.Error, key: "Class '{0}' incorrectly implements interface '{1}':" },
Class_0_incorrectly_implements_interface_1: { code: -9999999, category: DiagnosticCategory.Error, key: "Class '{0}' incorrectly implements interface '{1}'." },
Interface_0_incorrectly_extends_interface_1_Colon: { code: -9999999, category: DiagnosticCategory.Error, key: "Interface '{0}' incorrectly extends interface '{1}':" },
Interface_0_incorrectly_extends_interface_1: { code: -9999999, category: DiagnosticCategory.Error, key: "Interface '{0}' incorrectly extends interface '{1}'." },
Ambient_external_modules_cannot_be_nested_in_other_modules: { code: -9999999, category: DiagnosticCategory.Error, key: "Ambient external modules cannot be nested in other modules." },
Import_declarations_in_an_internal_module_cannot_reference_an_external_module: { code: -9999999, category: DiagnosticCategory.Error, key: "Import declarations in an internal module cannot reference an external module." },
A_module_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merged: { code: -9999999, category: DiagnosticCategory.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: -9999999, category: DiagnosticCategory.Error, key: "A module declaration cannot be located prior to a class or function with which it is merged" },
Cannot_compile_external_modules_unless_the_module_flag_is_provided: { code: -9999999, category: DiagnosticCategory.Error, key: "Cannot compile external modules unless the '--module' flag is provided." },
Import_declaration_conflicts_with_local_declaration_of_0: { code: -9999999, category: DiagnosticCategory.Error, key: "Import declaration conflicts with local declaration of '{0}'" },
Module_0_is_hidden_by_a_local_declaration_with_the_same_name: { code: -9999999, category: DiagnosticCategory.Error, key: "Module '{0}' is hidden by a local declaration with the same name" },
Filename_0_differs_from_already_included_filename_1_only_in_casing: { code: -9999999, category: DiagnosticCategory.Error, key: "Filename '{0}' differs from already included filename '{1}' only in casing" },
};
}
File diff suppressed because it is too large. Load diff
+4 -5
View File
@@ -1924,7 +1924,7 @@ module ts {
primaryExpression.kind === SyntaxKind.SuperKeyword && token !== SyntaxKind.OpenParenToken && token !== SyntaxKind.DotToken;
if (illegalUsageOfSuperKeyword) {
error(Diagnostics.super_must_be_followed_by_argument_list_or_member_access);
error(Diagnostics.super_must_be_followed_by_an_argument_list_or_member_access);
}
var expr = parseCallAndAccess(primaryExpression, /* inNewExpression */ false);
@@ -1977,13 +1977,12 @@ module ts {
var indexedAccess = <IndexedAccess>createNode(SyntaxKind.IndexedAccess, expr.pos);
indexedAccess.object = expr;
// It's not uncommon for a user to write: "new Type[]". Check for that common pattern
// and report a better error message.
// It's not uncommon for a user to write: "new Type[]".
// Check for that common pattern and report a better error message.
if (inNewExpression && parseOptional(SyntaxKind.CloseBracketToken)) {
indexedAccess.index = createMissingNode();
grammarErrorAtPos(bracketStart, scanner.getStartPos() - bracketStart, Diagnostics.new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead);
}
// Otherwise parse the indexed access normally.
else {
indexedAccess.index = parseExpression();
parseExpected(SyntaxKind.CloseBracketToken);
@@ -3481,7 +3480,7 @@ module ts {
if (!matchResult) {
var start = range.pos;
var length = range.end - start;
errorAtPos(start, length, Diagnostics.Invalid_reference_comment);
errorAtPos(start, length, Diagnostics.Invalid_reference_directive_syntax);
}
else {
referencedFiles.push({
+2 -4
View File
@@ -589,7 +589,7 @@ module ts {
}
if (isLineBreak(ch)) {
result += text.substring(start, pos);
error(Diagnostics.Unterminated_string_constant);
error(Diagnostics.Unterminated_string_literal);
break;
}
pos++;
@@ -750,9 +750,8 @@ module ts {
if (text.charCodeAt(pos + 1) === CharacterCodes.asterisk) {
pos += 2;
var safeLength = len - 1; // For lookahead.
var commentClosed = false;
while (pos < safeLength) {
while (pos < len) {
var ch = text.charCodeAt(pos);
if (ch === CharacterCodes.asterisk && text.charCodeAt(pos + 1) === CharacterCodes.slash) {
@@ -768,7 +767,6 @@ module ts {
}
if (!commentClosed) {
pos++;
error(Diagnostics.Asterisk_Slash_expected);
}
+3 -2
View File
@@ -219,7 +219,9 @@ module ts {
FirstFutureReservedWord = ImplementsKeyword,
LastFutureReservedWord = YieldKeyword,
FirstTypeNode = TypeReference,
LastTypeNode = ArrayType
LastTypeNode = ArrayType,
FirstPunctuation= OpenBraceToken,
LastPunctuation = CaretEqualsToken
}
export enum NodeFlags {
@@ -935,7 +937,6 @@ module ts {
Warning,
Error,
Message,
NoPrefix
}
export interface CompilerOptions {
+6 -6
View File
@@ -167,7 +167,6 @@ module Harness.LanguageService {
}
export class TypeScriptLS implements ts.LanguageServiceShimHost {
private ls: ts.LanguageServiceShim = null;
public newLS: ts.LanguageService;
private fileNameToScript: ts.Map<ScriptInfo> = {};
@@ -268,12 +267,13 @@ module Harness.LanguageService {
* To access the non-shim (i.e. actual) language service, use the "ls.languageService" property.
*/
public getLanguageService(): ts.LanguageServiceShim {
var ls = new TypeScript.Services.TypeScriptServicesFactory().createLanguageServiceShim(this);
this.ls = ls;
var hostAdapter = new LanguageServiceShimHostAdapter(this);
this.ls = new TypeScript.Services.TypeScriptServicesFactory().createLanguageServiceShim(this);
return this.ls;
}
this.newLS = ts.createLanguageService(hostAdapter, NonCachingDocumentRegistry.Instance);
return ls;
/** Return a new instance of the classifier service shim */
public getClassifier(): ts.ClassifierShim {
return new TypeScript.Services.TypeScriptServicesFactory().createClassifierShim(this);
}
/** Parse file given its source text */
+5 -8
View File
@@ -68,17 +68,11 @@ if (testConfigFile !== '') {
runners.push(new GeneratedFourslashRunner());
break;
case 'unittests':
runners.push(new UnitTestRunner(UnittestTestType.Compiler));
runners.push(new UnitTestRunner());
break;
case 'rwc':
runners.push(new RWCRunner());
break;
case 'ls':
runners.push(new UnitTestRunner(UnittestTestType.LanguageService));
break;
case 'services':
runners.push(new UnitTestRunner(UnittestTestType.Services));
break;
case 'reverse':
reverse = true;
break;
@@ -96,9 +90,12 @@ if (runners.length === 0) {
runners.push(new ProjectRunner());
}
//// language services
// language services
runners.push(new FourslashRunner());
//runners.push(new GeneratedFourslashRunner());
// unittests
runners.push(new UnitTestRunner());
}
sys.newLine = '\r\n';
+6 -22
View File
@@ -1,31 +1,13 @@
///<reference path="harness.ts" />
///<reference path="runnerbase.ts" />
enum UnittestTestType {
Compiler,
LanguageService,
Services,
}
class UnitTestRunner extends RunnerBase {
constructor(public testType?: UnittestTestType) {
constructor() {
super();
}
public initializeTests() {
switch (this.testType) {
case UnittestTestType.Compiler:
this.tests = this.enumerateFiles('tests/cases/unittests/compiler');
break;
case UnittestTestType.LanguageService:
this.tests = this.enumerateFiles('tests/cases/unittests/ls');
break;
default:
if (this.tests.length === 0) {
throw new Error('Unsupported test cases: ' + this.testType);
}
break;
}
this.tests = this.enumerateFiles('tests/cases/unittests/services');
var outfile = new Harness.Compiler.WriterAggregator()
var outerr = new Harness.Compiler.WriterAggregator();
@@ -38,7 +20,7 @@ class UnitTestRunner extends RunnerBase {
});
harnessCompiler.addInputFiles(toBeAdded);
harnessCompiler.setCompilerOptions({ noResolve: true });
var stdout = new Harness.Compiler.EmitterIOHost();
var emitDiagnostics = harnessCompiler.emitAll(stdout);
var results = stdout.toArray();
@@ -59,7 +41,9 @@ class UnitTestRunner extends RunnerBase {
before: before,
after: after,
Harness: Harness,
IO: Harness.IO
IO: Harness.IO,
ts: ts,
TypeScript: TypeScript
// FourSlash: FourSlash
};
}
+178 -107
View File
@@ -659,6 +659,7 @@ module ts {
InMultiLineCommentTrivia,
InSingleQuoteStringLiteral,
InDoubleQuoteStringLiteral,
EndingWithDotToken,
}
export enum TokenClass {
@@ -693,8 +694,7 @@ module ts {
compilationSettings: CompilerOptions,
scriptSnapshot: TypeScript.IScriptSnapshot,
version: number,
isOpen: boolean,
referencedFiles: string[]): SourceFile;
isOpen: boolean): SourceFile;
updateDocument(
sourceFile: SourceFile,
@@ -1402,7 +1402,7 @@ module ts {
sourceFile = documentRegistry.updateDocument(sourceFile, filename, compilationSettings, scriptSnapshot, version, isOpen, textChangeRange);
}
else {
sourceFile = documentRegistry.acquireDocument(filename, compilationSettings, scriptSnapshot, version, isOpen, []);
sourceFile = documentRegistry.acquireDocument(filename, compilationSettings, scriptSnapshot, version, isOpen);
}
// Remeber the new sourceFile
@@ -2267,50 +2267,41 @@ module ts {
}
/// Classifier
export function createClassifier(host: Logger): Classifier {
var scanner: TypeScript.Scanner.IScanner;
var lastDiagnosticKey: string = null;
var noRegexTable: boolean[];
var reportDiagnostic = (position: number, fullWidth: number, key: string, args: any[]) => {
lastDiagnosticKey = key;
};
if (!noRegexTable) {
noRegexTable = [];
noRegexTable[TypeScript.SyntaxKind.IdentifierName] = true;
noRegexTable[TypeScript.SyntaxKind.StringLiteral] = true;
noRegexTable[TypeScript.SyntaxKind.NumericLiteral] = true;
noRegexTable[TypeScript.SyntaxKind.RegularExpressionLiteral] = true;
noRegexTable[TypeScript.SyntaxKind.ThisKeyword] = true;
noRegexTable[TypeScript.SyntaxKind.PlusPlusToken] = true;
noRegexTable[TypeScript.SyntaxKind.MinusMinusToken] = true;
noRegexTable[TypeScript.SyntaxKind.CloseParenToken] = true;
noRegexTable[TypeScript.SyntaxKind.CloseBracketToken] = true;
noRegexTable[TypeScript.SyntaxKind.CloseBraceToken] = true;
noRegexTable[TypeScript.SyntaxKind.TrueKeyword] = true;
noRegexTable[TypeScript.SyntaxKind.FalseKeyword] = true;
}
var scanner: Scanner;
var noRegexTable: boolean[];
/// We do not have a full parser support to know when we should parse a regex or not
/// If we consider every slash token to be a regex, we could be missing cases like "1/2/3", where
/// we have a series of divide operator. this list allows us to be more accurate by ruling out
/// locations where a regexp cannot exist.
if (!noRegexTable) { noRegexTable = []; noRegexTable[SyntaxKind.Identifier] = true; noRegexTable[SyntaxKind.StringLiteral] = true; noRegexTable[SyntaxKind.NumericLiteral] = true; noRegexTable[SyntaxKind.RegularExpressionLiteral] = true; noRegexTable[SyntaxKind.ThisKeyword] = true; noRegexTable[SyntaxKind.PlusPlusToken] = true; noRegexTable[SyntaxKind.MinusMinusToken] = true; noRegexTable[SyntaxKind.CloseParenToken] = true; noRegexTable[SyntaxKind.CloseBracketToken] = true; noRegexTable[SyntaxKind.CloseBraceToken] = true; noRegexTable[SyntaxKind.TrueKeyword] = true; noRegexTable[SyntaxKind.FalseKeyword] = true; }
function getClassificationsForLine(text: string, lexState: EndOfLineState): ClassificationResult {
var offset = 0;
if (lexState !== EndOfLineState.Start) {
// If we're in a string literal, then prepend: "\
// (and a newline). That way when we lex we'll think we're still in a string literal.
//
// If we're in a multiline comment, then prepend: /*
// (and a newline). That way when we lex we'll think we're still in a multiline comment.
if (lexState === EndOfLineState.InDoubleQuoteStringLiteral) {
text = '"\\\n' + text;
}
else if (lexState === EndOfLineState.InSingleQuoteStringLiteral) {
text = "'\\\n" + text;
}
else if (lexState === EndOfLineState.InMultiLineCommentTrivia) {
text = "/*\n" + text;
}
var lastTokenOrCommentEnd = 0;
var lastToken = SyntaxKind.Unknown;
var inUnterminatedMultiLineComment = false;
offset = 3;
// If we're in a string literal, then prepend: "\
// (and a newline). That way when we lex we'll think we're still in a string literal.
//
// If we're in a multiline comment, then prepend: /*
// (and a newline). That way when we lex we'll think we're still in a multiline comment.
switch (lexState) {
case EndOfLineState.InDoubleQuoteStringLiteral:
text = '"\\\n' + text;
offset = 3;
break;
case EndOfLineState.InSingleQuoteStringLiteral:
text = "'\\\n" + text;
offset = 3;
break;
case EndOfLineState.InMultiLineCommentTrivia:
text = "/*\n" + text;
offset = 3;
break;
case EndOfLineState.EndingWithDotToken:
lastToken = SyntaxKind.DotToken;
break;
}
var result: ClassificationResult = {
@@ -2318,94 +2309,174 @@ module ts {
entries: []
};
var simpleText = TypeScript.SimpleText.fromString(text);
scanner = TypeScript.Scanner.createScanner(ScriptTarget.ES5, simpleText, reportDiagnostic);
scanner = createScanner(ScriptTarget.ES5, text, onError, processComment);
var lastTokenKind = TypeScript.SyntaxKind.None;
var token: TypeScript.ISyntaxToken = null;
var token = SyntaxKind.Unknown;
do {
lastDiagnosticKey = null;
token = scanner.scan();
token = scanner.scan(!noRegexTable[lastTokenKind]);
lastTokenKind = token.kind();
processToken(text, simpleText, offset, token, result);
}
while (token.kind() !== TypeScript.SyntaxKind.EndOfFileToken);
lastDiagnosticKey = null;
return result;
}
function processToken(text: string, simpleText: TypeScript.ISimpleText, offset: number, token: TypeScript.ISyntaxToken, result: ClassificationResult): void {
processTriviaList(text, offset, token.leadingTrivia(simpleText), result);
addResult(text, offset, result, TypeScript.width(token), token.kind());
processTriviaList(text, offset, token.trailingTrivia(simpleText), result);
if (TypeScript.fullEnd(token) >= text.length) {
// We're at the end.
if (lastDiagnosticKey === TypeScript.DiagnosticCode.AsteriskSlash_expected) {
result.finalLexState = EndOfLineState.InMultiLineCommentTrivia;
return;
if ((token === SyntaxKind.SlashToken || token === SyntaxKind.SlashEqualsToken) && !noRegexTable[lastToken]) {
if (scanner.reScanSlashToken() === SyntaxKind.RegularExpressionLiteral) {
token = SyntaxKind.RegularExpressionLiteral;
}
}
else if (lastToken === SyntaxKind.DotToken) {
token = SyntaxKind.Identifier;
}
if (token.kind() === TypeScript.SyntaxKind.StringLiteral) {
var tokenText = token.text();
if (tokenText.length > 0 && tokenText.charCodeAt(tokenText.length - 1) === TypeScript.CharacterCodes.backslash) {
var quoteChar = tokenText.charCodeAt(0);
result.finalLexState = quoteChar === TypeScript.CharacterCodes.doubleQuote
? EndOfLineState.InDoubleQuoteStringLiteral
: EndOfLineState.InSingleQuoteStringLiteral;
return;
lastToken = token;
processToken();
}
while (token !== SyntaxKind.EndOfFileToken);
return result;
function onError(message: DiagnosticMessage): void {
inUnterminatedMultiLineComment = message.key === Diagnostics.Asterisk_Slash_expected.key;
}
function processComment(start: number, end: number) {
// add Leading white spaces
addLeadingWhiteSpace(start, end);
// add the comment
addResult(end - start, TokenClass.Comment);
}
function processToken(): void {
var start = scanner.getTokenPos();
var end = scanner.getTextPos();
// add Leading white spaces
addLeadingWhiteSpace(start, end);
// add the token
addResult(end - start, classFromKind(token));
if (end >= text.length) {
// We're at the end.
if (inUnterminatedMultiLineComment) {
result.finalLexState = EndOfLineState.InMultiLineCommentTrivia;
}
else if (token === SyntaxKind.StringLiteral) {
var tokenText = scanner.getTokenText();
if (tokenText.length > 0 && tokenText.charCodeAt(tokenText.length - 1) === CharacterCodes.backslash) {
var quoteChar = tokenText.charCodeAt(0);
result.finalLexState = quoteChar === CharacterCodes.doubleQuote
? EndOfLineState.InDoubleQuoteStringLiteral
: EndOfLineState.InSingleQuoteStringLiteral;
}
}
else if (token === SyntaxKind.DotToken) {
result.finalLexState = EndOfLineState.EndingWithDotToken;
}
}
}
}
function processTriviaList(text: string, offset: number, triviaList: TypeScript.ISyntaxTriviaList, result: ClassificationResult): void {
for (var i = 0, n = triviaList.count(); i < n; i++) {
var trivia = triviaList.syntaxTriviaAt(i);
addResult(text, offset, result, trivia.fullWidth(), trivia.kind());
}
}
function addResult(text: string, offset: number, result: ClassificationResult, length: number, kind: TypeScript.SyntaxKind): void {
if (length > 0) {
// If this is the first classification we're adding to the list, then remove any
// offset we have if we were continuing a construct from the previous line.
if (result.entries.length === 0) {
length -= offset;
function addLeadingWhiteSpace(start: number, end: number): void {
if (start > lastTokenOrCommentEnd) {
addResult(start - lastTokenOrCommentEnd, TokenClass.Whitespace);
}
result.entries.push({ length: length, classification: classFromKind(kind) });
// Remeber the end of the last token
lastTokenOrCommentEnd = end;
}
function addResult(length: number, classification: TokenClass): void {
if (length > 0) {
// If this is the first classification we're adding to the list, then remove any
// offset we have if we were continuing a construct from the previous line.
if (result.entries.length === 0) {
length -= offset;
}
result.entries.push({ length: length, classification: classification });
}
}
}
function classFromKind(kind: TypeScript.SyntaxKind) {
if (TypeScript.SyntaxFacts.isAnyKeyword(kind)) {
function isBinaryExpressionOperatorToken(token: SyntaxKind): boolean {
switch (token) {
case SyntaxKind.AsteriskToken:
case SyntaxKind.SlashToken:
case SyntaxKind.PercentToken:
case SyntaxKind.PlusToken:
case SyntaxKind.MinusToken:
case SyntaxKind.LessThanLessThanToken:
case SyntaxKind.GreaterThanGreaterThanToken:
case SyntaxKind.GreaterThanGreaterThanGreaterThanToken:
case SyntaxKind.LessThanToken:
case SyntaxKind.GreaterThanToken:
case SyntaxKind.LessThanEqualsToken:
case SyntaxKind.GreaterThanEqualsToken:
case SyntaxKind.InstanceOfKeyword:
case SyntaxKind.InKeyword:
case SyntaxKind.EqualsEqualsToken:
case SyntaxKind.ExclamationEqualsToken:
case SyntaxKind.EqualsEqualsEqualsToken:
case SyntaxKind.ExclamationEqualsEqualsToken:
case SyntaxKind.AmpersandToken:
case SyntaxKind.CaretToken:
case SyntaxKind.BarToken:
case SyntaxKind.AmpersandAmpersandToken:
case SyntaxKind.BarBarToken:
case SyntaxKind.BarEqualsToken:
case SyntaxKind.AmpersandEqualsToken:
case SyntaxKind.CaretEqualsToken:
case SyntaxKind.LessThanLessThanEqualsToken:
case SyntaxKind.GreaterThanGreaterThanEqualsToken:
case SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken:
case SyntaxKind.PlusEqualsToken:
case SyntaxKind.MinusEqualsToken:
case SyntaxKind.AsteriskEqualsToken:
case SyntaxKind.SlashEqualsToken:
case SyntaxKind.PercentEqualsToken:
case SyntaxKind.EqualsToken:
case SyntaxKind.CommaToken:
return true;
default: return false;
}
}
function isPrefixUnaryExpressionOperatorToken(token: SyntaxKind): boolean {
switch (token) {
case SyntaxKind.PlusToken:
case SyntaxKind.MinusToken:
case SyntaxKind.TildeToken:
case SyntaxKind.ExclamationToken:
case SyntaxKind.PlusPlusToken:
case SyntaxKind.MinusMinusToken:
return true;
default:
return false;
}
}
function isKeyword(token: SyntaxKind): boolean {
return token >= SyntaxKind.FirstKeyword && token <= SyntaxKind.LastKeyword;
}
function classFromKind(token: SyntaxKind) {
if (isKeyword(token)) {
return TokenClass.Keyword;
}
else if (TypeScript.SyntaxFacts.isBinaryExpressionOperatorToken(kind) ||
TypeScript.SyntaxFacts.isPrefixUnaryExpressionOperatorToken(kind)) {
else if (isBinaryExpressionOperatorToken(token) || isPrefixUnaryExpressionOperatorToken(token)) {
return TokenClass.Operator;
}
else if (TypeScript.SyntaxFacts.isAnyPunctuation(kind)) {
else if (token >= SyntaxKind.FirstPunctuation && token <= SyntaxKind.LastPunctuation) {
return TokenClass.Punctuation;
}
switch (kind) {
case TypeScript.SyntaxKind.WhitespaceTrivia:
return TokenClass.Whitespace;
case TypeScript.SyntaxKind.MultiLineCommentTrivia:
case TypeScript.SyntaxKind.SingleLineCommentTrivia:
return TokenClass.Comment;
case TypeScript.SyntaxKind.NumericLiteral:
switch (token) {
case SyntaxKind.NumericLiteral:
return TokenClass.NumberLiteral;
case TypeScript.SyntaxKind.StringLiteral:
case SyntaxKind.StringLiteral:
return TokenClass.StringLiteral;
case TypeScript.SyntaxKind.RegularExpressionLiteral:
case SyntaxKind.RegularExpressionLiteral:
return TokenClass.RegExpLiteral;
case TypeScript.SyntaxKind.IdentifierName:
case SyntaxKind.Identifier:
default:
return TokenClass.Identifier;
}
+2 -2
View File
@@ -840,8 +840,8 @@ module ts {
public createLanguageServiceShim(host: LanguageServiceShimHost): LanguageServiceShim {
try {
var hostAdapter = new LanguageServiceShimHostAdapter(host);
var pullLanguageService = createLanguageService(hostAdapter, this.documentRegistry);
return new LanguageServiceShimObject(this, host, pullLanguageService);
var languageService = createLanguageService(hostAdapter, this.documentRegistry);
return new LanguageServiceShimObject(this, host, languageService);
}
catch (err) {
logInternalError(host, err);
@@ -6,6 +6,6 @@
export = B;
~~~~~~~~~~~
!!! An export assignment cannot be used in a module with other exported elements.
!!! Cannot find name 'B'.
~~~~~~~~~~~
!!! Cannot find name 'B'.
!!! An export assignment cannot be used in a module with other exported elements.
@@ -3,9 +3,9 @@
~~~~~~~~~~~
!!! Cannot compile external modules unless the '--module' flag is provided.
~~~~~~~~~~~
!!! An export assignment cannot be used in a module with other exported elements.
~~~~~~~~~~~
!!! Cannot find name 'B'.
~~~~~~~~~~~
!!! An export assignment cannot be used in a module with other exported elements.
export class C {
}
@@ -3,9 +3,9 @@
// Arrow function used in with statement
with (window) {
~~~~~~
!!! All symbols within a 'with' block will be resolved to 'any'.
~~~~~~
!!! Cannot find name 'window'.
~~~~~~
!!! All symbols within a 'with' block will be resolved to 'any'.
var p = () => this;
}
@@ -54,9 +54,9 @@
// Arrow function used in with statement
with (window) {
~~~~~~
!!! All symbols within a 'with' block will be resolved to 'any'.
~~~~~~
!!! Cannot find name 'window'.
~~~~~~
!!! All symbols within a 'with' block will be resolved to 'any'.
var p = () => this;
}
@@ -76,19 +76,19 @@
class Derived extends C {
constructor() { super(); super = value; }
~
!!! 'super' must be followed by argument list or member access.
!!! 'super' must be followed by an argument list or member access.
~~~~~
!!! Invalid left-hand side of assignment expression.
foo() { super = value }
~
!!! 'super' must be followed by argument list or member access.
!!! 'super' must be followed by an argument list or member access.
~~~~~
!!! Invalid left-hand side of assignment expression.
static sfoo() { super = value; }
~
!!! 'super' must be followed by argument list or member access.
!!! 'super' must be followed by an argument list or member access.
~~~~~
!!! Invalid left-hand side of assignment expression.
}
@@ -9,9 +9,9 @@
function Foo(); // error
~~~
!!! Function implementation is missing or not immediately following the declaration.
~~~
!!! Duplicate identifier 'Foo'.
~~~
!!! Function implementation is missing or not immediately following the declaration.
function F1(s:string);
function F1(a:any) { return a;}
@@ -137,12 +137,12 @@
super();
super *= value;
~~
!!! 'super' must be followed by argument list or member access.
!!! 'super' must be followed by an argument list or member access.
~~~~~
!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
super += value;
~~
!!! 'super' must be followed by argument list or member access.
!!! 'super' must be followed by an argument list or member access.
~~~~~
!!! Invalid left-hand side of assignment expression.
}
@@ -150,12 +150,12 @@
foo() {
super *= value;
~~
!!! 'super' must be followed by argument list or member access.
!!! 'super' must be followed by an argument list or member access.
~~~~~
!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
super += value;
~~
!!! 'super' must be followed by argument list or member access.
!!! 'super' must be followed by an argument list or member access.
~~~~~
!!! Invalid left-hand side of assignment expression.
}
@@ -163,12 +163,12 @@
static sfoo() {
super *= value;
~~
!!! 'super' must be followed by argument list or member access.
!!! 'super' must be followed by an argument list or member access.
~~~~~
!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
super += value;
~~
!!! 'super' must be followed by argument list or member access.
!!! 'super' must be followed by an argument list or member access.
~~~~~
!!! Invalid left-hand side of assignment expression.
}
@@ -7,17 +7,17 @@
interface Derived extends Base {
1: { y: number } // error
~~~~~~~~~~~~~~~~
!!! Property '1' of type '{ y: number; }' is not assignable to numeric index type '{ x: number; y: number; }'.
~~~~~~~~~~~~~~~~
!!! Property '1' of type '{ y: number; }' is not assignable to string index type '{ x: number; }'.
~~~~~~~~~~~~~~~~
!!! Property '1' of type '{ y: number; }' is not assignable to numeric index type '{ x: number; y: number; }'.
}
interface Derived2 extends Base {
'1': { y: number } // error
~~~~~~~~~~~~~~~~~~
!!! Property ''1'' of type '{ y: number; }' is not assignable to numeric index type '{ x: number; y: number; }'.
~~~~~~~~~~~~~~~~~~
!!! Property ''1'' of type '{ y: number; }' is not assignable to string index type '{ x: number; }'.
~~~~~~~~~~~~~~~~~~
!!! Property ''1'' of type '{ y: number; }' is not assignable to numeric index type '{ x: number; y: number; }'.
}
interface Derived3 extends Base {
@@ -69,9 +69,9 @@
module M {
module F {
~
!!! A module declaration cannot be located prior to a class or function with which it is merged
~
!!! Individual declarations in merged declaration F must be all exported or all local.
~
!!! A module declaration cannot be located prior to a class or function with which it is merged
var t;
}
export function F() { } // Only one error for duplicate identifier (don't consider visibility)
@@ -72,7 +72,7 @@
constructor() {
super<string>();
~
!!! 'super' must be followed by argument list or member access.
!!! 'super' must be followed by an argument list or member access.
super();
}
}
@@ -3,9 +3,9 @@
export class MemberName <A,B,C>{
static create<A,B,C>(arg1: any, arg2?: any, arg3?: any): MemberName {
~~~~~~~~~~
!!! A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement.
~~~~~~~~~~
!!! Generic type 'MemberName<A, B, C>' requires 3 type argument(s).
~~~~~~~~~~
!!! A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement.
}
}
}
@@ -25,16 +25,16 @@
interface F extends A, B, E { } // error because 0 is not a subtype of {a; b;}
~
!!! Property '0' of type '{}' is not assignable to numeric index type '{ a: any; b: any; }'.
~
!!! Property '0' of type '{}' is not assignable to string index type '{ a: any; }'.
~
!!! Property '0' of type '{}' is not assignable to numeric index type '{ a: any; b: any; }'.
interface G extends A, B, C, E { } // should only report one error
~
!!! Property '0' of type '{}' is not assignable to numeric index type '{ a: any; b: any; }'.
~
!!! Property '0' of type '{}' is not assignable to string index type '{ a: any; }'.
~
!!! Property 'm' of type '{}' is not assignable to string index type '{ a: any; }'.
~
!!! Property '0' of type '{}' is not assignable to numeric index type '{ a: any; b: any; }'.
interface H extends A, F { } // Should report no error at all because error is internal to F
@@ -18,9 +18,9 @@
!!! Property 'a' of type '{ toString: () => {}; }' is not assignable to string index type 'Object'.
return 1;
~~~~~~
!!! Property or signature expected.
~~~~~~
!!! A 'return' statement can only be used within a function body.
~~~~~~
!!! Property or signature expected.
};
~
!!! Declaration or statement expected.
@@ -1,7 +1,7 @@
==== tests/cases/compiler/invalidReferenceSyntax1.ts (1 errors) ====
/// <reference path="missingquote.ts />
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! Invalid reference comment.
!!! Invalid 'reference' directive syntax.
class C {
}
@@ -3,34 +3,34 @@
foo();
static foo(); // error
~~~
!!! Function implementation is missing or not immediately following the declaration.
~~~
!!! Function overload must not be static.
~~~
!!! Function implementation is missing or not immediately following the declaration.
}
class D {
static foo();
foo(); // error
~~~
!!! Function implementation is missing or not immediately following the declaration.
~~~
!!! Function overload must be static.
~~~
!!! Function implementation is missing or not immediately following the declaration.
}
class E<T> {
foo(x: T);
static foo(x: number); // error
~~~
!!! Function implementation is missing or not immediately following the declaration.
~~~
!!! Function overload must not be static.
~~~
!!! Function implementation is missing or not immediately following the declaration.
}
class F<T> {
static foo(x: number);
foo(x: T); // error
~~~
!!! Function implementation is missing or not immediately following the declaration.
~~~
!!! Function overload must be static.
~~~
!!! Function implementation is missing or not immediately following the declaration.
}
@@ -6,6 +6,6 @@
export = B;
~~~~~~~~~~~
!!! An export assignment cannot be used in a module with other exported elements.
!!! Cannot find name 'B'.
~~~~~~~~~~~
!!! Cannot find name 'B'.
!!! An export assignment cannot be used in a module with other exported elements.
@@ -3,9 +3,9 @@
~~~~~~~~~~~
!!! Cannot compile external modules unless the '--module' flag is provided.
~~~~~~~~~~~
!!! An export assignment cannot be used in a module with other exported elements.
~~~~~~~~~~~
!!! Cannot find name 'B'.
~~~~~~~~~~~
!!! An export assignment cannot be used in a module with other exported elements.
export class C {
}
@@ -1,9 +1,9 @@
==== tests/cases/conformance/parser/ecmascript5/Statements/parserForStatement3.ts (7 errors) ====
for(d in _.jh[a]=_.jh[a]||[],b);
~
!!! The left-hand side of a 'for...in' statement must be of type 'string' or 'any'.
~
!!! Cannot find name 'd'.
~
!!! The left-hand side of a 'for...in' statement must be of type 'string' or 'any'.
~
!!! Cannot find name '_'.
~
@@ -30,9 +30,9 @@
function f2(): F<T> {
~~~~
!!! A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement.
~~~~
!!! Cannot find name 'F'.
~~~~
!!! A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement.
}
@@ -30,9 +30,9 @@
function f2(): F<X<T>, Y<Z<T>>> {
~~~~~~~~~~~~~~~~
!!! A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement.
~~~~~~~~~~~~~~~~
!!! Cannot find name 'F'.
~~~~~~~~~~~~~~~~
!!! A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement.
}
@@ -4,7 +4,7 @@
~~~~
!!! 'with' statements are not allowed in strict mode.
~
!!! All symbols within a 'with' block will be resolved to 'any'.
~
!!! Cannot find name 'a'.
~
!!! All symbols within a 'with' block will be resolved to 'any'.
}
@@ -3,7 +3,7 @@
M() {
super<T>(0);
~
!!! 'super' must be followed by argument list or member access.
!!! 'super' must be followed by an argument list or member access.
~~~~~
!!! 'super' can only be referenced in a derived class.
}
@@ -3,7 +3,7 @@
~~~~
!!! Statements are not allowed in ambient contexts.
~~~
!!! All symbols within a 'with' block will be resolved to 'any'.
~~~
!!! Cannot find name 'foo'.
~~~
!!! All symbols within a 'with' block will be resolved to 'any'.
}
@@ -51,18 +51,18 @@
interface D extends B, C {
~
!!! Numeric index type 'string' is not assignable to string index type 'number'.
~
!!! Property '4' of type 'boolean' is not assignable to string index type 'number'.
~
!!! Property '5' of type 'string' is not assignable to string index type 'number'.
~
!!! Property '6' of type '() => string' is not assignable to string index type 'number'.
~
!!! Numeric index type 'string' is not assignable to string index type 'number'.
2: Z;
~~~~~
!!! Property '2' of type 'Z' is not assignable to numeric index type 'string'.
~~~~~
!!! Property '2' of type 'Z' is not assignable to string index type 'number'.
~~~~~
!!! Property '2' of type 'Z' is not assignable to numeric index type 'string'.
Infinity: number;
~~~~~~~~~~~~~~~~~
!!! Property 'Infinity' of type 'number' is not assignable to numeric index type 'string'.
@@ -10,7 +10,7 @@
"
"Should error because of newline.
!!! Unterminated string constant.
!!! Unterminated string literal.
"Should error because of end of file.
!!! Unexpected end of text.
@@ -2,46 +2,46 @@
// Srtings missing line terminator
var es1 = "line 1
!!! Unterminated string constant.
!!! Unterminated string literal.
";
!!! Unterminated string constant.
!!! Unterminated string literal.
var es2 = 'line 1
!!! Unterminated string constant.
!!! Unterminated string literal.
';
!!! Unterminated string constant.
!!! Unterminated string literal.
// Space after backslash
var es3 = 'line 1\
!!! Unterminated string constant.
!!! Unterminated string literal.
';
!!! Unterminated string constant.
!!! Unterminated string literal.
var es4 = 'line 1\
!!! Unterminated string constant.
!!! Unterminated string literal.
';
!!! Unterminated string constant.
!!! Unterminated string literal.
// Unterminated strings
var es5 = "unterminated
!!! Unterminated string constant.
!!! Unterminated string literal.
var es6 = 'unterminated
!!! Unterminated string constant.
!!! Unterminated string literal.
// wrong terminator
var es7 = "unterminated '
!!! Unterminated string constant.
!!! Unterminated string literal.
var es8 = 'unterminated "
!!! Unterminated string constant.
!!! Unterminated string literal.
// wrong unicode sequences
var es9 = "\u00";
@@ -7,21 +7,21 @@
class Q extends P {
xx = super;
~
!!! 'super' must be followed by argument list or member access.
!!! 'super' must be followed by an argument list or member access.
static yy = super; // error for static initializer accessing super
~
!!! 'super' must be followed by argument list or member access.
!!! 'super' must be followed by an argument list or member access.
~~~~~
!!! 'super' property access is permitted only in a constructor, member function, or member accessor of a derived class
// Super is not allowed in constructor args
constructor(public z = super, zz = super, zzz = () => super) {
~
!!! 'super' must be followed by argument list or member access.
!!! 'super' must be followed by an argument list or member access.
~
!!! 'super' must be followed by argument list or member access.
!!! 'super' must be followed by an argument list or member access.
~
!!! 'super' must be followed by argument list or member access.
!!! 'super' must be followed by an argument list or member access.
~~~~~
!!! 'super' cannot be referenced in constructor arguments.
~~~~~
@@ -33,7 +33,7 @@
foo(zz = super) {
~
!!! 'super' must be followed by argument list or member access.
!!! 'super' must be followed by an argument list or member access.
super.x();
super.y(); // error
~
@@ -42,7 +42,7 @@
static bar(zz = super) {
~
!!! 'super' must be followed by argument list or member access.
!!! 'super' must be followed by an argument list or member access.
super.x(); // error
~
!!! Property 'x' does not exist on type 'typeof P'.
@@ -3,17 +3,17 @@
// super in a non class context
var x = super;
~
!!! 'super' must be followed by argument list or member access.
!!! 'super' must be followed by an argument list or member access.
~~~~~
!!! 'super' can only be referenced in a derived class.
var y = () => super;
~
!!! 'super' must be followed by argument list or member access.
!!! 'super' must be followed by an argument list or member access.
~~~~~
!!! 'super' can only be referenced in a derived class.
var z = () => () => () => super;
~
!!! 'super' must be followed by argument list or member access.
!!! 'super' must be followed by an argument list or member access.
~~~~~
!!! 'super' can only be referenced in a derived class.
}
@@ -47,7 +47,7 @@
// super call in a lambda in a function expression in a constructor
(function() { return () => super; })();
~
!!! 'super' must be followed by argument list or member access.
!!! 'super' must be followed by an argument list or member access.
~~~~~
!!! 'super' property access is permitted only in a constructor, member function, or member accessor of a derived class
}
@@ -65,7 +65,7 @@
// super call in a lambda in a function expression in a constructor
(function() { return () => super; })();
~
!!! 'super' must be followed by argument list or member access.
!!! 'super' must be followed by an argument list or member access.
~~~~~
!!! 'super' property access is permitted only in a constructor, member function, or member accessor of a derived class
}
@@ -73,12 +73,12 @@
// super in static functions
var s = super;
~
!!! 'super' must be followed by argument list or member access.
!!! 'super' must be followed by an argument list or member access.
var x = () => super;
~
!!! 'super' must be followed by argument list or member access.
!!! 'super' must be followed by an argument list or member access.
var y = () => () => () => super;
~
!!! 'super' must be followed by argument list or member access.
!!! 'super' must be followed by an argument list or member access.
}
}
@@ -65,12 +65,12 @@
// super in a nested lambda in a constructor
var x = () => () => super;
~
!!! 'super' must be followed by argument list or member access.
!!! 'super' must be followed by an argument list or member access.
}
sayHello(): void {
// super in a nested lambda in a method
var x = () => () => super;
~
!!! 'super' must be followed by argument list or member access.
!!! 'super' must be followed by an argument list or member access.
}
}
@@ -7,7 +7,7 @@
constructor() {
super<T>();
~
!!! 'super' must be followed by argument list or member access.
!!! 'super' must be followed by an argument list or member access.
~~~~~~~~~~
!!! Supplied parameters do not match any signature of call target.
}
@@ -7,7 +7,7 @@
constructor(x) {
super<T>(x);
~
!!! 'super' must be followed by argument list or member access.
!!! 'super' must be followed by an argument list or member access.
~~~~~~~~~~~
!!! Supplied parameters do not match any signature of call target.
}
@@ -8,7 +8,7 @@
constructor() {
super<T>();
~
!!! 'super' must be followed by argument list or member access.
!!! 'super' must be followed by an argument list or member access.
}
bar() {
super.bar<T>(null);
@@ -35,14 +35,14 @@
~~~~~~~~~~~
!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
~
!!! A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement.
~
!!! Cannot find name 'V'.
~
!!! A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement.
function bar<V extends T, W extends U>(): X { // error
~
!!! A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement.
~
!!! Cannot find name 'X'.
~
!!! A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement.
function baz<X extends W, Y extends V>(a: X, b: Y): T {
x = y;
~
@@ -58,14 +58,14 @@
~~~~~~~~~~~
!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
~
!!! A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement.
~
!!! Cannot find name 'W'.
~
!!! A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement.
function bar<V extends T, W extends U>(): Y { // error
~
!!! A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement.
~
!!! Cannot find name 'Y'.
~
!!! A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement.
function baz<X extends W, Y extends V>(a: X, b: Y): T {
x = y;
~
@@ -10,9 +10,9 @@
~~~~
!!! Cannot find name 'asdf'.
~~~~
!!! A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement.
~~~~
!!! Cannot find name 'asdf'.
~~~~
!!! A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement.
function foo2() {
return asdf;
~~~~
@@ -1,27 +0,0 @@
///<reference path='..\..\..\..\src\compiler\typescript.ts' />
///<reference path='..\..\..\..\src\harness\harness.ts' />
describe('Compiling unittests\\compiler\\callSignatureTests.ts', function () {
it("If a signature omits a return type annotation, any type is assumed", function () {
var code = 'var foo: {();};';
code += 'var test = foo();'
code += 'test.bar = 2;'
Harness.Compiler.compileString(code, 'call signatures', function (result) {
assert.equal(result.errors.length, 0);
});
});
it("A call signature can have the void return type", function () {
var code = 'var foo: {():void;};';
code += 'var test = foo();'
Harness.Compiler.compileString(code, 'call signatures', function (result) {
assert.equal(result.errors.length, 0);
});
});
it("A call signature can't have the same overload", function () {
var code = 'var foo: { (): string; (): string; };';
Harness.Compiler.compileString(code, 'call signatures', function (result) {
assert.equal(result.errors.length, 0);
});
});
});
@@ -1,128 +0,0 @@
/// <reference path='..\..\..\..\src\compiler\typescript.ts' />
/// <reference path='..\..\..\..\src\harness\harness.ts' />
describe('Compiling unittests\\compiler\\classOverloads.ts', function () {
it("Everytype is a subtype of itself", function () {
var code = 'class foo { public bar: number; }';
code += 'class bar extends foo { public bar: number; }';
Harness.Compiler.compileString(code, 'subtypes', function (result) {
assert.equal(result.errors.length, 0);
});
});
it("All types except the Void type are subtypes of the Any type", function () {
var code = 'class foo { public bar: any; }';
code += 'class bar extends foo { public bar: number; }';
Harness.Compiler.compileString(code, 'subtypes', function (result) {
assert.equal(result.errors.length, 0);
});
});
it("All types are subtypes of the Any type - 2", function () {
var code = 'class baz { public bar(): any { return 1; } }';
code += 'class foo extends baz { public bar(): void {} }';
Harness.Compiler.compileString(code, 'subtypes', function (result) {
assert.equal(result.errors.length, 0);
});
});
it("The Undefined type is a subtype of all types except the Void type", function () {
var code = 'class baz { public bar(): any { return 1 } }';
code += 'class foo extends baz { public bar(){ return undefined} }';
Harness.Compiler.compileString(code, 'subtypes', function (result) {
assert.equal(result.errors.length, 0);
});
});
it("The Undefined type is a subtype of all types except the Void type - 2", function () {
var code = 'class baz { public bar(): void { } }';
code += 'class foo extends baz { public bar(){ return undefined} }';
Harness.Compiler.compileString(code, 'subtypes', function (result) {
assert.equal(result.errors.length, 0);
});
});
it("The Null type is a subtype of all types, except the Undefined and Void types", function () {
var code = 'class baz { public bar:any; }';
code += 'class foo extends baz { public bar = null; }';
Harness.Compiler.compileString(code, 'subtypes', function (result) {
assert.equal(result.errors.length, 0);
});
});
it("The Null type is a subtype of all types, except the Undefined and Void types - 3", function () {
var code = 'class baz { public bar():void { } }';
code += 'class foo extends baz { public bar() { return null; } }';
Harness.Compiler.compileString(code, 'subtypes', function (result) {
assert.equal(result.errors.length, 0);
});
});
describe('An object type S is a subtype of an object type T', function () {
it("A property in T is matched by a property in S", function () {
var code = 'class baz { public bar: { a: string; }; }';
code += 'class foo extends baz { public bar: { a: number; }; }';
Harness.Compiler.compileString(code, 'subtypes', function (result) {
assert.equal(result.errors.length, 1);
});
});
it("A property in T is matched by a property in S - 2", function () {
var code = 'class baz { public bar: { a: string; }; }';
code += 'class foo extends baz { public bar: { a: string; }; }';
Harness.Compiler.compileString(code, 'subtypes', function (result) {
assert.equal(result.errors.length, 0);
});
});
it("A property in T is matched by a property in S - 3", function () {
var code = 'class baz { public bar: { a: string; }; }';
code += 'class foo extends baz { public bar: { b: string; }; }';
Harness.Compiler.compileString(code, 'subtypes', function (result) {
assert.equal(result.errors.length, 1);
});
});
it("A call, construct or index signature in T is matched by a call, construct or index signature", function () {
var code = 'class baz { public bar: { (); }; }';
code += 'class foo extends baz { public bar: { (); } ;}';
Harness.Compiler.compileString(code, 'subtypes', function (result) {
assert.equal(result.errors.length, 0);
});
});
it("A call, construct or index signature in T is matched by a call, construct or index signature - 2", function () {
var code = 'class baz { public bar: { [idx:number]: any; }; }';
code += 'class foo extends baz { public bar: { (); }; }';
Harness.Compiler.compileString(code, 'subtypes', function (result) {
assert.equal(result.errors.length, 1);
});
});
it("A call, construct or index signature in T is matched by a call, construct or index signature - 3", function () {
var code = 'class baz { public bar: { (a: string); }; }';
code += 'class foo extends baz { public bar: { (); }; }';
Harness.Compiler.compileString(code, 'subtypes', function (result) {
assert.equal(result.errors.length, 0);
});
});
it("A call, construct or index signature in T is matched by a call, construct or index signature - 4", function () {
var code = 'class baz { public bar: { (a:string); }; }';
code += 'class foo extends baz { public bar: { (a:string,b:string); }; }';
Harness.Compiler.compileString(code, 'subtypes', function (result) {
assert.equal(result.errors.length, 1);
});
});
it("A call, construct or index signature in T is matched by a call, construct or index signature - 5", function () {
var code = 'class baz { public bar: { ():void; }; }';
code += 'class foo extends baz { public bar: { ():void; }; }';
Harness.Compiler.compileString(code, 'subtypes', function (result) {
assert.equal(result.errors.length, 0);
});
});
it("A call, construct or index signature in T is matched by a call, construct or index signature - 6", function () {
var code = 'class baz { public bar: { (); }; }';
code += 'class foo extends baz { public bar: { ():void; }; }';
Harness.Compiler.compileString(code, 'subtypes', function (result) {
assert.equal(result.errors.length, 0);
});
});
});
});
@@ -1,26 +0,0 @@
///<reference path='..\..\..\..\src\compiler\typescript.ts' />
///<reference path='..\..\..\..\src\harness\harness.ts' />
describe('Compiling tests\\compiler\\constructSignatureTests.ts', function () {
it("If a signature omits a return type annotation, any type is assumed", function () {
var code = 'var foo: {new ();};';
code += 'var test = new foo();'
code += 'test.bar = 2;'
Harness.Compiler.compileString(code, 'construct signatures', function (result) {
assert.equal(result.errors.length, 0);
});
});
it("A call signature can have the void return type", function () {
var code = 'var foo: {new ():void;};';
Harness.Compiler.compileString(code, 'call signatures', function (result) {
assert.equal(result.errors.length, 1);
});
});
it("A construct signature can't have the same overload", function () {
var code = 'var foo: { new (): string; new (): string; };';
Harness.Compiler.compileString(code, 'call signatures', function (result) {
assert.equal(result.errors.length, 0);
});
});
});
@@ -1,52 +0,0 @@
///<reference path='..\..\..\..\src\compiler\typescript.ts' />
///<reference path='..\..\..\..\src\harness\harness.ts' />
//@tags 1.1 Declarations
describe('Compiling unittests\\compiler\\declarationTests.ts', function() {
it("Each internal module’s export declaration spaces are shared with other internal modules that have the same root module and the " +
"same qualified name starting from that root module", function() {
var code = 'module baz{export var foo;}';
code += 'module baz{export var bar;}'
code += 'baz.foo = baz.bar;'
Harness.Compiler.compileString(code, 'declarations', function(result) {
assert.equal(result.errors.length, 0);
});
});
it("Each object type literal has a declaration space for its members", function() {
var code = 'var foo:{a:number;};';
code += 'foo.a = 2;'
Harness.Compiler.compileString(code, 'declarations', function(result) {
assert.equal(result.errors.length, 0);
});
});
it("Each class declaration has a declaration space for members and a declaration space for statics", function() {
var code = 'class foo {';
code += ' static bar;'
code += ' public bar;'
code += '}'
Harness.Compiler.compileString(code, 'declarations', function(result) {
assert.equal(result.errors.length, 0);
});
});
it("Each function declaration (including member function declarations and static function declarations) has a declaration space for " +
"statics and a declaration space for locals (parameters, variables, and functions).", function() {
var code = 'function foo() {';
code += ' static bar;'
code += ' var bar;'
code += '}'
Harness.Compiler.compileString(code, 'declarations', function(result) {
assert.equal(result.errors.length, 1);
});
});
it("Modules contain separate declaration spaces for variables and types.", function() {
var code = 'module M {';
code += ' class bar {};'
code += ' var bar;'
code += '}'
Harness.Compiler.compileString(code, 'declarations', function(result) {
assert.equal(result.errors.length, 1);
});
});
});
@@ -1,25 +0,0 @@
///<reference path='..\..\..\..\src\compiler\typescript.ts' />
///<reference path='..\..\..\..\src\harness\harness.ts' />
describe('Compiling unittests\\compiler\\functionSignatureTests.ts', function() {
it('Check overload with different return types.', function(){
var code = 'var foo: { bar(): string; bar(): number; };\n';
code += 'var bar: { bar: { (): string; (): number; }; };';
code += 'foo = bar;';
Harness.Compiler.compileString(code, 'function signatures', function(result) {
assert.equal(result.errors.length, 0);
});
})
describe('Function Type Literals', function() {
it('Basic sanity check', function() {
var code = 'var foo: { (): string; };';
code += 'var bar: () => string;';
code += 'foo = bar;';
Harness.Compiler.compileString(code, 'function type literal', function(result) {
assert.equal(result.errors.length, 0);
});
});
});
});
@@ -1,13 +0,0 @@
///<reference path='..\..\..\..\src\compiler\typescript.ts' />
///<reference path='..\..\..\..\src\harness\harness.ts' />
describe('Compiling tests\\compiler\\identifiers.ts', function() {
it("Everytype is a subtype of itself", function() {
var code = 'class foo { public bar: number; }';
code += 'class bar extends foo { public bar: number; }';
Harness.Compiler.compileString(code, 'subtypes', function(result) {
assert.equal(result.errors.length, 0);
});
});
});
@@ -1,14 +0,0 @@
///<reference path='..\..\..\..\src\compiler\typescript.ts' />
///<reference path='..\..\..\..\src\harness\harness.ts' />
describe('Compiling unittests\\compiler\\moduleAlias.ts', function() {
describe('Internal module alias test', function() {
it("basic test", function() {
var code = "module A.B.C { import XYZ = X.Y.Z; export function ping(x: number) { if (x > 0) XYZ.pong(x-1);}};";
code += "module X.Y.Z { import ABC = A.B.C; export function pong(x: number) { if (x > 0) ABC.ping(x-1);}};";
Harness.Compiler.compileString(code, 'module alias', function(result) {
assert.equal(result.errors.length, 0);
});
});
});
});
-50
View File
@@ -1,50 +0,0 @@
///<reference path='..\..\..\..\src\compiler\typescript.ts' />
///<reference path='..\..\..\..\src\harness\harness.ts' />
describe('Verifying pathing functions', function () {
it("Normalizes Mac paths", function () {
var result = TypeScript.normalizePath("/Users/Me/somefile.ts");
var expected = "/Users/Me/somefile.ts";
assert.equal(result, expected);
});
it("Normalizes relative Mac paths", function () {
var result = TypeScript.normalizePath("/Users/./Me/../somefile.ts");
var expected = "/Users/somefile.ts";
assert.equal(result, expected);
});
it("Normalizes Windows paths", function () {
var result = TypeScript.normalizePath("C:\\Users\\Me\\somefile.ts");
var expected = "C:/Users/Me/somefile.ts";
assert.equal(result, expected);
});
it("Normalizes relative Windows paths", function () {
var result = TypeScript.normalizePath("C:\\Users\\.\\Me\\..\\somefile.ts");
var expected = "C:/Users/somefile.ts";
assert.equal(result, expected);
});
it("Normalizes . and ..", function () {
var result = TypeScript.normalizePath("..\\Users\\.\\Me\\..\\somefile.ts");
var expected = "../Users/somefile.ts";
assert.equal(result, expected);
});
it("Normalizes UNC paths", function () {
var result = TypeScript.normalizePath("\\\\server\\share\\someFile.ts");
var expected = "file://server/share/someFile.ts";
assert.equal(result, expected);
});
it("Normalizes relative UNC paths with IP addresses", function () {
var result = TypeScript.normalizePath("\\\\127.0.0.1\\share\\..\\elsewhere\\someFile.ts");
var expected = "file://127.0.0.1/elsewhere/someFile.ts";
assert.equal(result, expected);
});
it("Normalizes HTTP paths", function () {
var result = TypeScript.normalizePath("http://www.server.com/share/someFile.ts");
var expected = "http://www.server.com/share/someFile.ts";
assert.equal(result, expected);
});
it("Normalizes relative HTTP paths", function () {
var result = TypeScript.normalizePath("http://www.server.com/share/../someFile.ts");
var expected = "http://www.server.com/someFile.ts";
assert.equal(result, expected);
});
});
@@ -1,19 +0,0 @@
///<reference path='..\..\..\..\src\compiler\typescript.ts' />
///<reference path='..\..\..\..\src\harness\harness.ts' />
describe('Compiling unittests\\compiler\\propertySignatureTests.ts', function() {
it('The Identifier of a property signature must be unique within its containing type. ', function(){
var code = 'var foo: { a:string; a: string; };';
Harness.Compiler.compileString(code, 'property signatures', function(result) {
assert.equal(result.errors.length, 1);
//assert.compilerWarning(result, 1, 9, 'Duplicate identifier a');
});
});
it('If a property signature omits a TypeAnnotation, the Any type is assumed.', function(){
var code = 'var foo: { a; }; foo.a = 2; foo.a = "0";';
Harness.Compiler.compileString(code, 'property signatures', function(result) {
assert.equal(result.errors.length, 0);
});
})
});
@@ -1,172 +0,0 @@
///<reference path='..\..\..\..\src\compiler\typescript.ts' />
///<reference path='..\..\..\..\src\harness\harness.ts' />
///<reference path='..\..\..\..\src\services\typescriptServices.ts' />
class TestSourceFile {
constructor(
public fileName: string,
public version: number,
public scriptSnapshot: TypeScript.IScriptSnapshot,
public isOpen: boolean,
public byteOrderMark: TypeScript.ByteOrderMark = TypeScript.ByteOrderMark.Utf8) {
}
}
class TestHostSettings {
constructor(
public files: TypeScript.StringHashTable<TestSourceFile>,
public compilationSettings: TypeScript.CompilationSettings = TypeScript.ImmutableCompilationSettings.defaultSettings().toCompilationSettings()) {
}
}
describe("testDocumentRetrievalAndUpdate", () => {
function getHost(settings: TestHostSettings): TypeScript.Services.ILanguageServiceHost {
return {
getCompilationSettings(): TypeScript.CompilationSettings {
return settings.compilationSettings;
},
getScriptFileNames(): string[]{
return settings.files.getAllKeys();
},
getScriptVersion(fileName: string): number {
return settings.files.lookup(fileName).version;
},
getScriptIsOpen(fileName: string): boolean {
return settings.files.lookup(fileName).isOpen;
},
getScriptByteOrderMark(fileName: string): TypeScript.ByteOrderMark {
return settings.files.lookup(fileName).byteOrderMark;
},
getScriptSnapshot(fileName: string): TypeScript.IScriptSnapshot {
return settings.files.lookup(fileName).scriptSnapshot;
},
getDiagnosticsObject(): TypeScript.Services.ILanguageServicesDiagnostics {
throw TypeScript.Errors.notYetImplemented();
},
getLocalizedDiagnosticMessages(): any {
return null;
},
information(): boolean {
return false;
},
debug(): boolean {
return false;
},
warning(): boolean {
return false;
},
error(): boolean {
return false;
},
fatal(): boolean {
return false;
},
log(s: string): void {
},
resolveRelativePath(path: string, directory: string): string {
throw TypeScript.Errors.notYetImplemented();
},
fileExists(path: string): boolean {
throw TypeScript.Errors.notYetImplemented();
},
directoryExists(path: string): boolean {
throw TypeScript.Errors.notYetImplemented();
},
getParentDirectory(path: string): string {
throw TypeScript.Errors.notYetImplemented();
},
getCancellationToken(): TypeScript.ICancellationToken {
return TypeScript.CancellationToken.None;
}
}
}
function getLanguageServiceCompiler(ls: TypeScript.Services.ILanguageService): TypeScript.Services.LanguageServiceCompiler {
return <TypeScript.Services.LanguageServiceCompiler>(<any>ls).compiler
}
it("documents are shared between projects", () => {
function ensureDocumentIsShared(prefix: string, ls1: TypeScript.Services.ILanguageService, ls2: TypeScript.Services.ILanguageService, fileName: string): void {
var c1 = getLanguageServiceCompiler(ls1);
var c2 = getLanguageServiceCompiler(ls2);
// getDocument synchronized its internal state with host
var doc1 = c1.getDocument(fileName);
var doc2 = c2.getDocument(fileName);
if (doc1 !== doc2) {
throw new Error(prefix + ":document should be shared between language services");
}
}
var files = new TypeScript.StringHashTable<TestSourceFile>();
var f1 = new TestSourceFile("file1.ts", 1, TypeScript.ScriptSnapshot.fromString("var x = 1;"), false);
files.add(f1.fileName, f1);
var factory = new TypeScript.Services.TypeScriptServicesFactory();
var hostSettings = new TestHostSettings(files);
var ls1 = factory.createPullLanguageService(getHost(hostSettings));
var ls2 = factory.createPullLanguageService(getHost(hostSettings));
ensureDocumentIsShared("==1==", ls1, ls2, f1.fileName);
f1.version = 2;
f1.scriptSnapshot = TypeScript.ScriptSnapshot.fromString("var x = 2;");
ensureDocumentIsShared("==2==", ls1, ls2, f1.fileName);
});
it("documents are refreshed when settings in compilation settings affect syntax", () => {
var files = new TypeScript.StringHashTable<TestSourceFile>();
var f1 = new TestSourceFile("file1.ts", 1, TypeScript.ScriptSnapshot.fromString("var x = 1;"), false);
files.add(f1.fileName, f1);
var factory = new TypeScript.Services.TypeScriptServicesFactory();
var hostSettings = new TestHostSettings(files);
var factory = new TypeScript.Services.TypeScriptServicesFactory();
var ls = factory.createPullLanguageService(getHost(hostSettings));
var compiler = getLanguageServiceCompiler(ls);
var d1 = compiler.getDocument(f1.fileName);
// change compilation setting that doesn't affect parsing - should have the same document
hostSettings.compilationSettings.generateDeclarationFiles = !hostSettings.compilationSettings.generateDeclarationFiles;
var d2 = compiler.getDocument(f1.fileName);
if (d1 !== d2) {
throw new Error("Expected to have the same document instance");
}
// change value of compilation setting that is used during production of AST - new document is required
hostSettings.compilationSettings.codeGenTarget = TypeScript.LanguageVersion.EcmaScript5;
var d3 = compiler.getDocument(f1.fileName);
if (d2 === d3) {
throw new Error("Changed codeGenTarget: Expected to have different instances of document");
}
hostSettings.compilationSettings.propagateEnumConstants = !hostSettings.compilationSettings.propagateEnumConstants;
var d4 = compiler.getDocument(f1.fileName);
if (d3 === d4) {
throw new Error("Changed propagateEnumConstants: Expected to have different instances of document");
}
hostSettings.compilationSettings.allowAutomaticSemicolonInsertion = !hostSettings.compilationSettings.allowAutomaticSemicolonInsertion;
var d5 = compiler.getDocument(f1.fileName);
if (d4 === d5) {
throw new Error("Changed allowAutomaticSemicolonInsertion: Expected to have different instances of document");
}
});
});
@@ -1,4 +0,0 @@
///<reference path='..\..\..\..\src\harness\harness.ts'/>
///<reference path='..\..\..\..\src\compiler\tsc.ts' />
///<reference path='..\..\..\..\src\compiler\typescript.ts' />
///<reference path='..\..\..\..\src\services\typescriptServices.ts' />
@@ -1,20 +0,0 @@
///<reference path='..\..\..\src\harness\harness.ts'/>
///<reference path='..\..\..\src\harness\baselining.ts'/>
declare var JSON: any;
describe('Accepting local files as new reference...', function() {
var localPath = 'tests/services/baselines/local';
var outputPath = 'tests/services/baselines/reference';
// Get a list of all the files in the baseline/inputs folder
var files = IO.dir(localPath);
// Copy them to the output folder
for (var i = 0; i < files.length; i++) {
var filename = files[i].substr(files[i].lastIndexOf('\\'));
if(filename.indexOf('.html') === -1) {
var referenceData = IO.readFile(files[i]);
IO.writeFile(outputPath + '/' + filename, referenceData);
}
}
});
@@ -1,66 +0,0 @@
/// <reference path='..\..\..\src\harness\harness.ts'/>
/// <reference path='..\..\..\src\harness\baselining.ts'/>
/// <reference path='..\..\..\src\harness\external\json2.ts'/>
describe('Baseline files match (intellisense data)', function() {
var inputPath = 'tests/services/baselines/inputs';
var outputPath = 'tests/services/baselines/local';
var referencePath = 'tests/services/baselines/reference';
var i;
// Might need to create this
IO.createDirectory(outputPath);
// Delete any old reports from the local path
var localFiles = IO.dir(outputPath);
for (i = 0; i < localFiles.length; i++) {
var localFilename = localFiles[i];
if(localFilename.indexOf('.html') > 0) {
IO.deleteFile(localFilename);
}
}
// Get a list of all the files in the baseline/inputs folder
var files = IO.dir(inputPath);
var template = IO.readFile('tests/services/baselines/diff-template.html');
// For each file, get data:
// a) Completion
// b) Type signature
// c) etc...
for (i = 0; i < files.length; i++) {
var filename = files[i].substr(files[i].lastIndexOf('\\'));
var scriptText = IO.readFile(files[i]).trim();
var outputAndCheck = function(nameSuffix: string, process: any) {
describe(nameSuffix + ' data for ' + filename + ' matches the baseline', function() {
var data = process(scriptText);
var stringified = JSON.stringify(data).trim();
var baseFilename = filename + '-' + nameSuffix + '.json';
IO.writeFile(outputPath + '/' + baseFilename, stringified);
var referenceFilename = referencePath + '/' + baseFilename;
var reference = IO.fileExists(referenceFilename) ? IO.readFile(referenceFilename) : '[{file: "(no file)"}]';
reference = reference.trim();
if (reference != stringified) {
// Emit a report file in 'local'
var errorReportFile = outputPath + filename + '-' + nameSuffix + '-diff.html';
IO.writeFile(errorReportFile,
template.replace('/**REFERENCE**/', reference).replace('/**ACTUAL**/', stringified));
throw new Error('Data does not match reference. Refer to diff report ' + errorReportFile);
}
});
};
// Write that data out to a JSON file in the 'local' folder
outputAndCheck('signatures', getIntellisenseSignatureRegions);
outputAndCheck('completions', getIntellisenseCompletionListRegions);
outputAndCheck('definitions', getIntellisenseDefinitionRegions);
outputAndCheck('types', getIntellisenseTypeRegions);
outputAndCheck('members', getIntellisenseMemberListRegions);
}
});
@@ -1,23 +0,0 @@
module Foo { var testing = ""; test }
class C1 {
public pubMeth() {this.} // test on 'this.'
private privMeth() {}
public pubProp;
private privProp;
}
var f = new C1();
f. // test on F.
module M {
export class C { public pub; private priv; }
export var V = 0;
}
var c = new M.C();
c. // test on c.
//Test for comment
//c.
@@ -1,215 +0,0 @@
interface IOptions {
name: string;
flag: boolean;
short: string;
usage: string;
set: (s: string) => void;
type: string;
}
class OptionsParser {
private DEFAULT_SHORT_FLAG = "-";
private DEFAULT_LONG_FLAG = "--";
constructor (private host: IIO) { }
// Find the option record for the given string. Returns null if not found.
private findOption(arg: string) {
for (var i = 0; i < this.options.length; i++) {
if (arg === this.options[i].short || arg === this.options[i].name) {
return this.options[i];
}
}
return null;
}
public unnamed: string[] = [];
public options: IOptions[] = [];
public printUsage() {
IO.printLine("Syntax: tsc [options] [file ..]");
IO.printLine("");
IO.printLine("Examples: tsc hello.ts");
IO.printLine(" tsc --out foo.js foo.ts");
IO.printLine(" tsc @args.txt");
IO.printLine("");
IO.printLine("Options:");
var output = [];
var maxLength = 0;
this.options = this.options.sort(function(a, b) {
var aName = a.name.toLowerCase();
var bName = b.name.toLowerCase();
if (aName > bName) {
return 1;
} else if (aName < bName) {
return -1;
} else {
return 0;
}
});
// Build up output array
for (var i = 0; i < this.options.length; i++) {
var option = this.options[i];
if (!option.usage)
break;
var usageString = " ";
var type = option.type ? " " + option.type.toUpperCase() : "";
if (option.short) {
usageString += this.DEFAULT_SHORT_FLAG + option.short + type + ", ";
}
usageString += this.DEFAULT_LONG_FLAG + option.name + type;
output.push([usageString, option.usage]);
if (usageString.length > maxLength) {
maxLength = usageString.length;
}
}
output.push([" @<file>", "Insert command line options and files from a file."]);
// Print padded output
for (var i = 0; i < output.length; i++) {
IO.printLine(output[i][0] + (new Array(maxLength - output[i][0].length + 3)).join(" ") + output[i][1]);
}
}
public option(name: string, config: IOptions);
public option(name: string, config: IOptions, short: string) {
if (!config) {
config = <any>short;
short = null;
}
config.name = name;
config.short = short;
config.flag = false;
this.options.push(config);
}
public flag(name: string, config: IOptions);
public flag(name: string, config: IOptions, short: string) {
if (!config) {
config = <any>short;
short = null;
}
config.name = name;
config.short = short;
config.flag = true
this.options.push(config);
}
// Parse an arguments string
public parseString(argString: string) {
var position = 0;
var tokens = argString.match(/\s+|"|[^\s"]+/g);
function peek() {
return tokens[position];
}
function consume() {
return tokens[position++];
}
function consumeQuotedString() {
var value = '';
consume(); // skip opening quote.
var token = peek();
while (token && token !== '"') {
consume();
value += token;
token = peek();
}
consume(); // skip ending quote;
return value;
}
var args: string[] = [];
var currentArg = '';
while (position < tokens.length) {
var token = peek();
if (token === '"') {
currentArg += consumeQuotedString();
} else if (token.match(/\s/)) {
if (currentArg.length > 0) {
args.push(currentArg);
currentArg = '';
}
consume();
} else {
consume();
currentArg += token;
}
}
if (currentArg.length > 0) {
args.push(currentArg);
}
this.parse(args);
}
// Parse arguments as they come from the platform: split into arguments.
public parse(args: string[]) {
var position = 0;
function consume() {
return args[position++];
}
while (position < args.length) {
var current = consume();
var match = current.match(/^(--?|\/|@)(.*)/);
var value = null;
if (match) {
if (match[1] === '@') {
this.parseString(IO.readFile(match[2]));
} else {
var arg = match[2];
var option = this.findOption(arg);
if (option === null) {
IO.printLine("Unknown option " + arg);
IO.printLine("");
this.printUsage();
} else {
if (!option.flag)
value = consume();
option.set(value);
}
}
} else {
this.unnamed.push(current);
}
}
}
}
@@ -1,2 +0,0 @@
[{"start":7,"end":11,"data":"(empty)"},{"start":11,"end":21,"data":"C1\tnew() => C1\nFoo\tFoo\nM\tM\nc\tM.C\nf\tC1\ntesting\tstring\n(present standard item) any\tany\n(present standard item) bool\tbool\n(present standard item) null\tnull\n(present standard item) number\tnumber\n(present standard item) string\tstring\n(present standard item) undefined\tundefined\n(present standard item) void\tvoid"},{"start":21,"end":29,"data":"(empty)"},{"start":29,"end":31,"data":"C1\tnew() => C1\nFoo\tFoo\nM\tM\nc\tM.C\nf\tC1\ntesting\tstring\n(present standard item) any\tany\n(present standard item) bool\tbool\n(present standard item) null\tnull\n(present standard item) number\tnumber\n(present standard item) string\tstring\n(present standard item) undefined\tundefined\n(present standard item) void\tvoid"},{"start":31,"end":34,"data":"(empty)"},{"start":34,"end":46,"data":"C1\tnew() => C1\nFoo\tFoo\nM\tM\nc\tM.C\nf\tC1\ntesting\tstring\n(present standard item) any\tany\n(present standard item) bool\tbool\n(present standard item) null\tnull\n(present standard item) number\tnumber\n(present standard item) string\tstring\n(present standard item) undefined\tundefined\n(present standard item) void\tvoid"},{"start":46,"end":49,"data":"C1\tnew() => C1\nFoo\tFoo\nM\tM\nc\tM.C\nf\tC1\n(present standard item) any\tany\n(present standard item) bool\tbool\n(present standard item) null\tnull\n(present standard item) number\tnumber\n(present standard item) string\tstring\n(present standard item) undefined\tundefined\n(present standard item) void\tvoid"},{"start":49,"end":55,"data":"C1\tnew() => C1\nFoo\tFoo\nM\tM\narguments\tany\nc\tM.C\nf\tC1\nprivMeth\t() => void\nprivProp\tnumber\nprototype\tC1\npubMeth\t() => void\npubProp\tnumber\n(present standard item) any\tany\n(present standard item) bool\tbool\n(present standard item) null\tnull\n(present standard item) number\tnumber\n(present standard item) string\tstring\n(present standard item) undefined\tundefined\n(present standard item) void\tvoid"},{"start":55,"end":58,"data":"(empty)"},{"start":58,"end":71,"data":"C1\tnew() => C1\nFoo\tFoo\nM\tM\narguments\tany\nc\tM.C\nf\tC1\nprivMeth\t() => void\nprivProp\tnumber\nprototype\tC1\npubMeth\t() => void\npubProp\tnumber\n(present standard item) any\tany\n(present standard item) bool\tbool\n(present standard item) null\tnull\n(present standard item) number\tnumber\n(present standard item) string\tstring\n(present standard item) undefined\tundefined\n(present standard item) void\tvoid"},{"start":71,"end":79,"data":"(empty)"},{"start":79,"end":118,"data":"C1\tnew() => C1\nFoo\tFoo\nM\tM\narguments\tany\nc\tM.C\nf\tC1\nprivMeth\t() => void\nprivProp\tnumber\nprototype\tC1\npubMeth\t() => void\npubProp\tnumber\n(present standard item) any\tany\n(present standard item) bool\tbool\n(present standard item) null\tnull\n(present standard item) number\tnumber\n(present standard item) string\tstring\n(present standard item) undefined\tundefined\n(present standard item) void\tvoid"},{"start":118,"end":127,"data":"(empty)"},{"start":127,"end":141,"data":"C1\tnew() => C1\nFoo\tFoo\nM\tM\narguments\tany\nc\tM.C\nf\tC1\nprivMeth\t() => void\nprivProp\tnumber\nprototype\tC1\npubMeth\t() => void\npubProp\tnumber\n(present standard item) any\tany\n(present standard item) bool\tbool\n(present standard item) null\tnull\n(present standard item) number\tnumber\n(present standard item) string\tstring\n(present standard item) undefined\tundefined\n(present standard item) void\tvoid"},{"start":141,"end":149,"data":"(empty)"},{"start":149,"end":164,"data":"C1\tnew() => C1\nFoo\tFoo\nM\tM\narguments\tany\nc\tM.C\nf\tC1\nprivMeth\t() => void\nprivProp\tnumber\nprototype\tC1\npubMeth\t() => void\npubProp\tnumber\n(present standard item) any\tany\n(present standard item) bool\tbool\n(present standard item) null\tnull\n(present standard item) number\tnumber\n(present standard item) string\tstring\n(present standard item) undefined\tundefined\n(present standard item) void\tvoid"},{"start":164,"end":173,"data":"(empty)"},{"start":173,"end":181,"data":"C1\tnew() => C1\nFoo\tFoo\nM\tM\narguments\tany\nc\tM.C\nf\tC1\nprivMeth\t() => void\nprivProp\tnumber\nprototype\tC1\npubMeth\t() => void\npubProp\tnumber\n(present standard item) any\tany\n(present standard item) bool\tbool\n(present standard item) null\tnull\n(present standard item) number\tnumber\n(present standard item) string\tstring\n(present standard item) undefined\tundefined\n(present standard item) void\tvoid"},{"start":181,"end":188,"data":"C1\tnew() => C1\nFoo\tFoo\nM\tM\nc\tM.C\nf\tC1\n(present standard item) any\tany\n(present standard item) bool\tbool\n(present standard item) null\tnull\n(present standard item) number\tnumber\n(present standard item) string\tstring\n(present standard item) undefined\tundefined\n(present standard item) void\tvoid"},{"start":188,"end":190,"data":"(empty)"},{"start":190,"end":207,"data":"C1\tnew() => C1\nFoo\tFoo\nM\tM\nc\tM.C\nf\tC1\n(present standard item) any\tany\n(presenLine truncated
@@ -1,2 +0,0 @@
[{"start":17,"end":31,"data":"0\t17\t34\t\ttesting\t\tFoo"},{"start":33,"end":34,"data":"0\t17\t34\t\ttesting\t\tFoo"},{"start":49,"end":60,"data":"0\t55\t180\t\tC1\t\t__GLO"},{"start":71,"end":79,"data":"0\t64\t88\t\tpubMeth\t\tC1"},{"start":82,"end":87,"data":"0\t55\t180\t\tC1\t\t__GLO"},{"start":118,"end":127,"data":"0\t110\t131\t\tprivMeth\t\tC1"},{"start":134,"end":151,"data":"0\t134\t153\t\tpubProp\t\tC1"},{"start":152,"end":153,"data":"0\t134\t153\t\tpubProp\t\tC1"},{"start":156,"end":175,"data":"0\t156\t177\t\tprivProp\t\tC1"},{"start":176,"end":177,"data":"0\t156\t177\t\tprivProp\t\tC1"},{"start":184,"end":192,"data":"0\t184\t201\t\tf\t\t__GLO"},{"start":192,"end":200,"data":"0\t55\t180\t\tC1\t\t__GLO"},{"start":200,"end":201,"data":"0\t184\t201\t\tf\t\t__GLO"},{"start":203,"end":206,"data":"0\t184\t201\t\tf\t\t__GLO"},{"start":221,"end":230,"data":"0\t221\t315\t\tM\t\t__GLO"},{"start":237,"end":252,"data":"0\t250\t289\t\tC\t\tM"},{"start":254,"end":267,"data":"0\t254\t269\t\tpub\t\tM.C"},{"start":268,"end":269,"data":"0\t254\t269\t\tpub\t\tM.C"},{"start":270,"end":285,"data":"0\t270\t287\t\tpriv\t\tM.C"},{"start":286,"end":287,"data":"0\t270\t287\t\tpriv\t\tM.C"},{"start":295,"end":310,"data":"0\t295\t312\t\tV\t\tM"},{"start":311,"end":312,"data":"0\t295\t312\t\tV\t\tM"},{"start":321,"end":329,"data":"0\t321\t339\t\tc\t\t__GLO"},{"start":329,"end":333,"data":"0\t250\t289\t\tC\t\tM"},{"start":333,"end":335,"data":"0\t221\t315\t\tM\t\t__GLO"},{"start":335,"end":338,"data":"0\t250\t289\t\tC\t\tM"},{"start":338,"end":339,"data":"0\t321\t339\t\tc\t\t__GLO"},{"start":343,"end":346,"data":"0\t321\t339\t\tc\t\t__GLO"}]
@@ -1,2 +0,0 @@
[{"start":87,"end":88,"data":"pubMeth\t() => void\npubProp\tnumber\nprivMeth\t() => void\nprivProp\tnumber\n"},{"start":205,"end":206,"data":"pubMeth\t() => void\npubProp\tnumber\n"},{"start":335,"end":336,"data":"C\tnew() => M.C\nV\tnumber\n"},{"start":345,"end":346,"data":"pub\tnumber\n"}]
@@ -1,2 +0,0 @@
[{"start":192,"end":200,"data":"C1(): C1\n"},{"start":329,"end":338,"data":"C(): C\n"}]
@@ -1,2 +0,0 @@
[{"start":17,"end":34,"data":"string"},{"start":34,"end":39,"data":"Foo"},{"start":39,"end":43,"data":"any"},{"start":43,"end":45,"data":"Foo"},{"start":49,"end":64,"data":"new() => C1"},{"start":64,"end":82,"data":"() => void"},{"start":82,"end":87,"data":"C1"},{"start":87,"end":88,"data":"() => void"},{"start":88,"end":89,"data":"new() => C1"},{"start":108,"end":110,"data":"new() => C1"},{"start":110,"end":131,"data":"() => void"},{"start":131,"end":134,"data":"new() => C1"},{"start":134,"end":153,"data":"number"},{"start":153,"end":156,"data":"new() => C1"},{"start":156,"end":177,"data":"number"},{"start":177,"end":180,"data":"new() => C1"},{"start":184,"end":196,"data":"C1"},{"start":196,"end":198,"data":"new() => C1"},{"start":198,"end":201,"data":"C1"},{"start":203,"end":205,"data":"C1"},{"start":221,"end":237,"data":"M"},{"start":237,"end":254,"data":"new() => C"},{"start":254,"end":269,"data":"number"},{"start":269,"end":270,"data":"new() => C"},{"start":270,"end":287,"data":"number"},{"start":287,"end":289,"data":"new() => C"},{"start":289,"end":295,"data":"M"},{"start":295,"end":312,"data":"number"},{"start":312,"end":315,"data":"M"},{"start":321,"end":333,"data":"M.C"},{"start":333,"end":334,"data":"M"},{"start":334,"end":336,"data":"new() => M.C"},{"start":336,"end":339,"data":"M.C"},{"start":343,"end":345,"data":"M.C"}]
@@ -1 +0,0 @@
[{"start":10,"end":19,"data":"(empty)"},{"start":19,"end":26,"data":"IOptions IOptions\nOptionsParser new(host: any) => OptionsParser\nflag bool\nname string\nset (s: string) => void\nshort string\ntype string\nusage string\n(standard items)"},{"start":26,"end":31,"data":"(empty)"},{"start":31,"end":45,"data":"IOptions IOptions\nOptionsParser new(host: any) => OptionsParser\nflag bool\nname string\nset (s: string) => void\nshort string\ntype string\nusage string\n(standard items)"},{"start":45,"end":50,"data":"(empty)"},{"start":50,"end":62,"data":"IOptions IOptions\nOptionsParser new(host: any) => OptionsParser\nflag bool\nname string\nset (s: string) => void\nshort string\ntype string\nusage string\n(standard items)"},{"start":62,"end":68,"data":"(empty)"},{"start":68,"end":82,"data":"IOptions IOptions\nOptionsParser new(host: any) => OptionsParser\nflag bool\nname string\nset (s: string) => void\nshort string\ntype string\nusage string\n(standard items)"},{"start":82,"end":88,"data":"(empty)"},{"start":88,"end":102,"data":"IOptions IOptions\nOptionsParser new(host: any) => OptionsParser\nflag bool\nname string\nset (s: string) => void\nshort string\ntype string\nusage string\n(standard items)"},{"start":102,"end":106,"data":"(empty)"},{"start":106,"end":108,"data":"IOptions IOptions\nOptionsParser new(host: any) => OptionsParser\nflag bool\nname string\nset (s: string) => void\nshort string\ntype string\nusage string\n(standard items)"},{"start":108,"end":110,"data":"(empty)"},{"start":110,"end":133,"data":"IOptions IOptions\nOptionsParser new(host: any) => OptionsParser\nflag bool\nname string\nset (s: string) => void\nshort string\ntype string\nusage string\n(standard items)"},{"start":133,"end":138,"data":"(empty)"},{"start":138,"end":150,"data":"IOptions IOptions\nOptionsParser new(host: any) => OptionsParser\nflag bool\nname string\nset (s: string) => void\nshort string\ntype string\nusage string\n(standard items)"},{"start":150,"end":159,"data":"IOptions IOptions\nOptionsParser new(host: any) => OptionsParser\n(standard items)"},{"start":159,"end":173,"data":"(empty)"},{"start":173,"end":180,"data":"IOptions IOptions\nOptionsParser new(host: any) => OptionsParser\n(standard items)"},{"start":180,"end":186,"data":"(empty)"},{"start":186,"end":188,"data":"IOptions IOptions\nOptionsParser new(host: any) => OptionsParser\n(standard items)"},{"start":188,"end":207,"data":"(empty)"},{"start":207,"end":209,"data":"IOptions IOptions\nOptionsParser new(host: any) => OptionsParser\n(standard items)"},{"start":209,"end":213,"data":"(empty)"},{"start":213,"end":219,"data":"IOptions IOptions\nOptionsParser new(host: any) => OptionsParser\n(standard items)"},{"start":219,"end":225,"data":"(empty)"},{"start":225,"end":227,"data":"IOptions IOptions\nOptionsParser new(host: any) => OptionsParser\n(standard items)"},{"start":227,"end":245,"data":"(empty)"},{"start":245,"end":247,"data":"IOptions IOptions\nOptionsParser new(host: any) => OptionsParser\n(standard items)"},{"start":247,"end":252,"data":"(empty)"},{"start":252,"end":260,"data":"IOptions IOptions\nOptionsParser new(host: any) => OptionsParser\n(standard items)"},{"start":260,"end":296,"data":"IOptions IOptions\nOptionsParser new(host: any) => OptionsParser\narguments any\nhost any\n(standard items)"},{"start":296,"end":304,"data":"IOptions IOptions\nOptionsParser new(host: any) => OptionsParser\n(standard items)"},{"start":304,"end":378,"data":"(empty)"},{"start":378,"end":383,"data":"IOptions IOptions\nOptionsParser new(host: any) => OptionsParser\n(standard items)"},{"start":383,"end":391,"data":"IOptions IOptions\nOptionsParser new(host: any) => OptionsParser\narg string\narguments any\ni number\n(standard items)"},{"start":391,"end":406,"data":"(empty)"},{"start":406,"end":437,"data":"IOptions IOptions\nOptionsParser new(host: any) => OptionsParser\narg string\narguments any\ni number\n(standard items)"},{"start":437,"end":439,"data":"(empty)"},{"start":439,"end":658,"data":"IOptions IOptions\nOptionsParser new(host: any) => OptionsParser\narg string\narguments any\ni number\n(standard items)"},{"start":658,"end":665,"data":"IOptions IOptions\nOptionsParser new(host: any) => OptionsParser\n(standard items)"},{"start":665,"end":6Line truncated
@@ -1 +0,0 @@
[{"start":26,"end":32,"data":"0\t26\t39\t\tname\t\tIOptions"},{"start":45,"end":51,"data":"0\t45\t56\t\tflag\t\tIOptions"},{"start":62,"end":69,"data":"0\t62\t76\t\tshort\t\tIOptions"},{"start":82,"end":89,"data":"0\t82\t96\t\tusage\t\tIOptions"},{"start":102,"end":107,"data":"0\t102\t127\t\tset\t\tIOptions"},{"start":108,"end":111,"data":"0\t108\t117\t\ts\t\t<global>"},{"start":133,"end":139,"data":"0\t133\t146\t\ttype\t\tIOptions"},{"start":153,"end":173,"data":"0\t260\t295\t\tOptionsParser\t\t__GLO"},{"start":180,"end":209,"data":"0\t180\t212\t\tDEFAULT_SHORT_FLAG\t\tOptionsParser"},{"start":219,"end":247,"data":"0\t219\t251\t\tDEFAULT_LONG_FLAG\t\tOptionsParser"},{"start":260,"end":272,"data":"0\t260\t295\t\tOptionsParser\t\t__GLO"},{"start":273,"end":287,"data":"0\t273\t290\t\thost\t\tOptionsParser"},{"start":291,"end":292,"data":"0\t260\t295\t\tOptionsParser\t\t__GLO"},{"start":383,"end":391,"data":"0\t0\t149\t\tIOptions\t\t__GLO"},{"start":391,"end":402,"data":"0\t383\t657\t\tfindOption\t\tOptionsParser"},{"start":402,"end":407,"data":"0\t402\t413\t\targ\t\tOptionsParser.findOption"},{"start":414,"end":415,"data":"0\t0\t149\t\tIOptions\t\t__GLO"},{"start":433,"end":441,"data":"0\t433\t442\t\ti\t\tOptionsParser.findOption"},{"start":444,"end":446,"data":"0\t433\t442\t\ti\t\tOptionsParser.findOption"},{"start":448,"end":452,"data":"0\t260\t295\t\tOptionsParser\t\t__GLO"},{"start":452,"end":461,"data":"0\t703\t734\t\toptions\t\tOptionsParser"},{"start":469,"end":471,"data":"0\t433\t442\t\ti\t\tOptionsParser.findOption"},{"start":495,"end":499,"data":"0\t402\t413\t\targ\t\tOptionsParser.findOption"},{"start":503,"end":507,"data":"0\t260\t295\t\tOptionsParser\t\t__GLO"},{"start":507,"end":516,"data":"0\t703\t734\t\toptions\t\tOptionsParser"},{"start":516,"end":518,"data":"0\t433\t442\t\ti\t\tOptionsParser.findOption"},{"start":518,"end":525,"data":"0\t62\t76\t\tshort\t\tIOptions"},{"start":528,"end":532,"data":"0\t402\t413\t\targ\t\tOptionsParser.findOption"},{"start":536,"end":540,"data":"0\t260\t295\t\tOptionsParser\t\t__GLO"},{"start":540,"end":549,"data":"0\t703\t734\t\toptions\t\tOptionsParser"},{"start":549,"end":551,"data":"0\t433\t442\t\ti\t\tOptionsParser.findOption"},{"start":551,"end":557,"data":"0\t26\t39\t\tname\t\tIOptions"},{"start":577,"end":584,"data":"0\t0\t149\t\tIOptions\t\t__GLO"},{"start":584,"end":588,"data":"0\t260\t295\t\tOptionsParser\t\t__GLO"},{"start":588,"end":597,"data":"0\t703\t734\t\toptions\t\tOptionsParser"},{"start":597,"end":599,"data":"0\t433\t442\t\ti\t\tOptionsParser.findOption"},{"start":599,"end":600,"data":"0\t0\t149\t\tIOptions\t\t__GLO"},{"start":665,"end":681,"data":"0\t665\t694\t\tunnamed\t\tOptionsParser"},{"start":689,"end":692,"data":"0\t665\t694\t\tunnamed\t\tOptionsParser"},{"start":703,"end":719,"data":"0\t703\t734\t\toptions\t\tOptionsParser"},{"start":719,"end":729,"data":"0\t0\t149\t\tIOptions\t\t__GLO"},{"start":729,"end":732,"data":"0\t703\t734\t\toptions\t\tOptionsParser"},{"start":732,"end":734,"data":"0\t0\t149\t\tIOptions\t\t__GLO"},{"start":750,"end":761,"data":"0\t743\t2528\t\tprintUsage\t\tOptionsParser"},{"start":1102,"end":1115,"data":"0\t1102\t1118\t\toutput\t\tOptionsParser.printUsage"},{"start":1117,"end":1118,"data":"0\t1102\t1118\t\toutput\t\tOptionsParser.printUsage"},{"start":1128,"end":1144,"data":"0\t1128\t1146\t\tmaxLength\t\tOptionsParser.printUsage"},{"start":1145,"end":1146,"data":"0\t1128\t1146\t\tmaxLength\t\tOptionsParser.printUsage"},{"start":1158,"end":1162,"data":"0\t260\t295\t\tOptionsParser\t\t__GLO"},{"start":1162,"end":1171,"data":"0\t703\t734\t\toptions\t\tOptionsParser"},{"start":1173,"end":1177,"data":"0\t260\t295\t\tOptionsParser\t\t__GLO"},{"start":1177,"end":1186,"data":"0\t703\t734\t\toptions\t\tOptionsParser"},{"start":1200,"end":1202,"data":"0\t1200\t1201\t\ta\t\tOptionsParser.printUsage._anonymous"},{"start":1203,"end":1205,"data":"0\t1203\t1204\t\tb\t\tOptionsParser.printUsage._anonymous"},{"start":1221,"end":1233,"data":"0\t1221\t1254\t\taName\t\tOptionsParser.printUsage._anonymous"},{"start":1233,"end":1235,"data":"0\t1200\t1201\t\ta\t\tOptionsParser.printUsage._anonymous"},{"start":1253,"end":1254,"data":"0\t1221\t1254\t\taName\t\tOptionsParser.printUsage._anonymous"},{"start":1268,"end":1280,"data":"0\t1268\t1301\t\tbName\t\tOptionsParser.printUsage._anonymous"},{"start":1280,"end":1282,"data":"0\t1203\t1204\t\tb\t\tOptionsParser.printUsage._anonymous"},{"start":1300,"end":1301,"data":"0\t1268\t1301\t\tbName\t\tOptionsParser.printUsage._anonymous"},{"start":1321,"end":1327,"data":"0\t1221\t1254\t\taName\t\tOptionsParser.printUsage._anonymous"},{"start":1329,"end":1335,"data":"0\t1268\t1301\t\tbName\t\tOptionsParser.printUsage._anonymous"},{"start":1389,"end":1395,"data":"0\t1221\t1254\t\taName\t\tOptionsParser.printUsage._anonymous"},{"start":1397,"end":1403,"data":"0\t1268\t1301\t\tbName\t\tOptionsParser.printUsage._anonymous"},{"start":1561,"end":1569,"data":"0\t1561\t1570\t\ti\t\tOptionsParser.prinLine truncated
@@ -1 +0,0 @@
[{"start":453,"end":454,"data":"unnamed\tstring[]\noptions\tIOptions[]\nprintUsage\t() => void\noption\t(name: string,config: IOptions): any; \nflag\t(name: string,config: IOptions): any; \nparseString\t(argString: string) => void\nparse\t(args: string[]) => void\nDEFAULT_SHORT_FLAG\tstring\nDEFAULT_LONG_FLAG\tstring\nhost\tany\nfindOption\t(arg: string) => IOptions\n"},{"start":508,"end":509,"data":"unnamed\tstring[]\noptions\tIOptions[]\nprintUsage\t() => void\noption\t(name: string,config: IOptions): any; \nflag\t(name: string,config: IOptions): any; \nparseString\t(argString: string) => void\nparse\t(args: string[]) => void\nDEFAULT_SHORT_FLAG\tstring\nDEFAULT_LONG_FLAG\tstring\nhost\tany\nfindOption\t(arg: string) => IOptions\n"},{"start":519,"end":520,"data":"name\tstring\nflag\tbool\nshort\tstring\nusage\tstring\nset\t(s: string) => void\ntype\tstring\n"},{"start":541,"end":542,"data":"unnamed\tstring[]\noptions\tIOptions[]\nprintUsage\t() => void\noption\t(name: string,config: IOptions): any; \nflag\t(name: string,config: IOptions): any; \nparseString\t(argString: string) => void\nparse\t(args: string[]) => void\nDEFAULT_SHORT_FLAG\tstring\nDEFAULT_LONG_FLAG\tstring\nhost\tany\nfindOption\t(arg: string) => IOptions\n"},{"start":552,"end":553,"data":"name\tstring\nflag\tbool\nshort\tstring\nusage\tstring\nset\t(s: string) => void\ntype\tstring\n"},{"start":589,"end":590,"data":"unnamed\tstring[]\noptions\tIOptions[]\nprintUsage\t() => void\noption\t(name: string,config: IOptions): any; \nflag\t(name: string,config: IOptions): any; \nparseString\t(argString: string) => void\nparse\t(args: string[]) => void\nDEFAULT_SHORT_FLAG\tstring\nDEFAULT_LONG_FLAG\tstring\nhost\tany\nfindOption\t(arg: string) => IOptions\n"},{"start":1163,"end":1164,"data":"unnamed\tstring[]\noptions\tIOptions[]\nprintUsage\t() => void\noption\t(name: string,config: IOptions): any; \nflag\t(name: string,config: IOptions): any; \nparseString\t(argString: string) => void\nparse\t(args: string[]) => void\nDEFAULT_SHORT_FLAG\tstring\nDEFAULT_LONG_FLAG\tstring\nhost\tany\nfindOption\t(arg: string) => IOptions\n"},{"start":1178,"end":1179,"data":"unnamed\tstring[]\noptions\tIOptions[]\nprintUsage\t() => void\noption\t(name: string,config: IOptions): any; \nflag\t(name: string,config: IOptions): any; \nparseString\t(argString: string) => void\nparse\t(args: string[]) => void\nDEFAULT_SHORT_FLAG\tstring\nDEFAULT_LONG_FLAG\tstring\nhost\tany\nfindOption\t(arg: string) => IOptions\n"},{"start":1581,"end":1582,"data":"unnamed\tstring[]\noptions\tIOptions[]\nprintUsage\t() => void\noption\t(name: string,config: IOptions): any; \nflag\t(name: string,config: IOptions): any; \nparseString\t(argString: string) => void\nparse\t(args: string[]) => void\nDEFAULT_SHORT_FLAG\tstring\nDEFAULT_LONG_FLAG\tstring\nhost\tany\nfindOption\t(arg: string) => IOptions\n"},{"start":1635,"end":1636,"data":"unnamed\tstring[]\noptions\tIOptions[]\nprintUsage\t() => void\noption\t(name: string,config: IOptions): any; \nflag\t(name: string,config: IOptions): any; \nparseString\t(argString: string) => void\nparse\t(args: string[]) => void\nDEFAULT_SHORT_FLAG\tstring\nDEFAULT_LONG_FLAG\tstring\nhost\tany\nfindOption\t(arg: string) => IOptions\n"},{"start":1674,"end":1675,"data":"name\tstring\nflag\tbool\nshort\tstring\nusage\tstring\nset\t(s: string) => void\ntype\tstring\n"},{"start":1775,"end":1776,"data":"name\tstring\nflag\tbool\nshort\tstring\nusage\tstring\nset\t(s: string) => void\ntype\tstring\n"},{"start":1795,"end":1796,"data":"name\tstring\nflag\tbool\nshort\tstring\nusage\tstring\nset\t(s: string) => void\ntype\tstring\n"},{"start":1846,"end":1847,"data":"name\tstring\nflag\tbool\nshort\tstring\nusage\tstring\nset\t(s: string) => void\ntype\tstring\n"},{"start":1892,"end":1893,"data":"unnamed\tstring[]\noptions\tIOptions[]\nprintUsage\t() => void\noption\t(name: string,config: IOptions): any; \nflag\t(name: string,config: IOptions): any; \nparseString\t(argString: string) => void\nparse\t(args: string[]) => void\nDEFAULT_SHORT_FLAG\tstring\nDEFAULT_LONG_FLAG\tstring\nhost\tany\nfindOption\t(arg: string) => IOptions\n"},{"start":1920,"end":1921,"data":"name\tstring\nflag\tbool\nshort\tstring\nusage\tstring\nset\t(s: string) => void\ntype\tstring\n"},{"start":1991,"end":1992,"data":"unnamed\tstring[]\noptions\tIOptions[]\nprintUsage\t() => void\noption\t(name: string,config: IOptions): any; \nflag\t(name: string,config: IOptions): any; \nparseString\t(argString: string) => void\nparse\t(args: string[]) => void\nDEFAULT_SHORT_FLAG\tstring\nDEFAULT_LONG_FLAG\tstring\nhost\tany\nfindOption\t(arg: string) => IOptions\n"},{"start":2018,"end":2019,"data":"name\tstring\nflag\tbool\nshort\tstring\nusage\tstring\nset\t(s: string) => void\ntype\tstring\n"},{"start":2079,"end":2080,"data":"name\tstring\nflag\tbool\nshort\tstring\nusage\tstring\nset\t(s: string) => void\ntype\tstring\n"},{"start":2765,"end":2766,"data":"name\tstring\nflag\tbool\nshort\tstring\nusage\tsLine truncated
@@ -1,2 +0,0 @@
[{"start":3649,"end":3659,"data":"consume(): any\n"},{"start":3710,"end":3716,"data":"peek(): any\n"},{"start":3783,"end":3793,"data":"consume(): any\n"},{"start":3856,"end":3862,"data":"peek(): any\n"},{"start":3894,"end":3904,"data":"consume(): any\n"},{"start":4104,"end":4110,"data":"peek(): any\n"},{"start":4179,"end":4200,"data":"consumeQuotedString(): string\n"},{"start":4413,"end":4423,"data":"consume(): any\n"},{"start":4463,"end":4473,"data":"consume(): any\n"},{"start":4636,"end":4653,"data":"parse(args: string[]): void\n"},{"start":4956,"end":4965,"data":"consume(): string\n"},{"start":5147,"end":5164,"data":"parseString(argString: string): void\n"},{"start":5185,"end":5187,"data":"parseString(argString: string): void\n"},{"start":5289,"end":5309,"data":"findOption(arg: string): IOptions\n"},{"start":5489,"end":5507,"data":"printUsage(): void\n"},{"start":5618,"end":5627,"data":"consume(): string\n"},{"start":5656,"end":5674,"data":"set(s: string): void\n"}]
@@ -1 +0,0 @@
[{"start":26,"end":39,"data":"string"},{"start":39,"end":45,"data":"IOptions"},{"start":45,"end":56,"data":"bool"},{"start":56,"end":62,"data":"IOptions"},{"start":62,"end":76,"data":"string"},{"start":76,"end":82,"data":"IOptions"},{"start":82,"end":96,"data":"string"},{"start":96,"end":102,"data":"IOptions"},{"start":102,"end":108,"data":"(s: string) => void"},{"start":108,"end":117,"data":"string"},{"start":117,"end":122,"data":"(s: string) => void"},{"start":122,"end":126,"data":"void"},{"start":126,"end":127,"data":"(s: string) => void"},{"start":127,"end":133,"data":"IOptions"},{"start":133,"end":146,"data":"string"},{"start":146,"end":149,"data":"IOptions"},{"start":153,"end":180,"data":"new(host: any) => OptionsParser"},{"start":180,"end":212,"data":"string"},{"start":212,"end":219,"data":"new(host: any) => OptionsParser"},{"start":219,"end":251,"data":"string"},{"start":251,"end":273,"data":"new(host: any) => OptionsParser"},{"start":273,"end":290,"data":"any"},{"start":290,"end":303,"data":"new(host: any) => OptionsParser"},{"start":378,"end":383,"data":"new(host: any) => OptionsParser"},{"start":383,"end":402,"data":"(arg: string) => IOptions"},{"start":402,"end":413,"data":"string"},{"start":413,"end":428,"data":"(arg: string) => IOptions"},{"start":428,"end":433,"data":"void"},{"start":433,"end":442,"data":"number"},{"start":442,"end":444,"data":"void"},{"start":444,"end":445,"data":"number"},{"start":445,"end":448,"data":"bool"},{"start":448,"end":452,"data":"OptionsParser"},{"start":452,"end":460,"data":"IOptions[]"},{"start":460,"end":467,"data":"any"},{"start":467,"end":469,"data":"void"},{"start":469,"end":472,"data":"number"},{"start":472,"end":495,"data":"void"},{"start":495,"end":498,"data":"string"},{"start":498,"end":503,"data":"bool"},{"start":503,"end":507,"data":"OptionsParser"},{"start":507,"end":515,"data":"IOptions[]"},{"start":515,"end":516,"data":"IOptions"},{"start":516,"end":517,"data":"number"},{"start":517,"end":518,"data":"IOptions"},{"start":518,"end":524,"data":"string"},{"start":524,"end":528,"data":"bool"},{"start":528,"end":531,"data":"string"},{"start":531,"end":536,"data":"bool"},{"start":536,"end":540,"data":"OptionsParser"},{"start":540,"end":548,"data":"IOptions[]"},{"start":548,"end":549,"data":"IOptions"},{"start":549,"end":550,"data":"number"},{"start":550,"end":551,"data":"IOptions"},{"start":551,"end":556,"data":"string"},{"start":556,"end":577,"data":"void"},{"start":577,"end":584,"data":"IOptions"},{"start":584,"end":588,"data":"OptionsParser"},{"start":588,"end":596,"data":"IOptions[]"},{"start":596,"end":597,"data":"IOptions"},{"start":597,"end":598,"data":"number"},{"start":598,"end":600,"data":"IOptions"},{"start":600,"end":626,"data":"void"},{"start":626,"end":638,"data":"(arg: string) => IOptions"},{"start":638,"end":650,"data":"any"},{"start":650,"end":657,"data":"(arg: string) => IOptions"},{"start":657,"end":665,"data":"new(host: any) => OptionsParser"},{"start":665,"end":681,"data":"string[]"},{"start":681,"end":687,"data":"string"},{"start":687,"end":694,"data":"string[]"},{"start":694,"end":703,"data":"new(host: any) => OptionsParser"},{"start":703,"end":719,"data":"IOptions[]"},{"start":719,"end":727,"data":"IOptions"},{"start":727,"end":734,"data":"IOptions[]"},{"start":734,"end":743,"data":"new(host: any) => OptionsParser"},{"start":743,"end":774,"data":"() => void"},{"start":774,"end":787,"data":"any"},{"start":787,"end":826,"data":"string"},{"start":826,"end":828,"data":"any"},{"start":828,"end":838,"data":"() => void"},{"start":838,"end":851,"data":"any"},{"start":851,"end":853,"data":"string"},{"start":853,"end":855,"data":"any"},{"start":855,"end":865,"data":"() => void"},{"start":865,"end":878,"data":"any"},{"start":878,"end":907,"data":"string"},{"start":907,"end":909,"data":"any"},{"start":909,"end":919,"data":"() => void"},{"start":919,"end":932,"data":"any"},{"start":932,"end":972,"data":"string"},{"start":972,"end":974,"data":"any"},{"start":974,"end":984,"data":"() => void"},{"start":984,"end":997,"data":"any"},{"start":997,"end":1026,"data":"string"},{"start":1026,"end":1028,"data":"any"},{"start":1028,"end":1038,"data":"() => void"},{"start":1038,"end":1051,"data":"any"},{"start":1051,"end":1053,"data":"string"},{"start":1053,"end":1055,"data":"any"},{"start":1055,"end":1065,"data":"() => void"},{"start":1065,"end":1078,"data":"any"},{"start":1078,"end":1088,"data":"string"},{"start":1088,"end":1090,"data":"any"},{"start":1090,"end":1102,"data":"() => void"},{"start":1102,"end":1118,"data":"any[]"},{"start":1118,"end":1128,"data":"() => void"},{"start":1128,"end":1146,"data":"number"},{"start":1146,"end":1158,"data":"() => void"},{"start":1158,"end":1162,"data":"OptionsParser"},{"start":1162,"end":1170,"data":"IOptions[]"},{"start":1170,"end":1173,"data":"any"},{"start":1173,"end":1177,"data":"OptionsParser"},{"start":1177,"end":1185,"data":"IOptions[]"},{"start":1185,"end":1190,"data":"any"},{"start":1190,"end":1191,"data":"Line truncated
+132 -152
View File
@@ -1,198 +1,178 @@
///<reference path='_project.ts'/>
interface Classification {
interface Classification {
position: number;
length: number;
class2: TypeScript.TokenClass;
class: ts.TokenClass;
}
interface ClassiferResult {
tuples: Classification[];
finalLexState: TypeScript.LexState;
finalEndOfLineState: ts.EndOfLineState;
}
var TokenClassNames = {};
TokenClassNames[TypeScript.TokenClass.Punctuation] = "Punctuation";
TokenClassNames[TypeScript.TokenClass.Keyword] = "Keyword";
TokenClassNames[TypeScript.TokenClass.Operator] = "Operator";
TokenClassNames[TypeScript.TokenClass.Comment] = "Comment";
TokenClassNames[TypeScript.TokenClass.Whitespace] = "Whitespace";
TokenClassNames[TypeScript.TokenClass.Identifier] = "Identifier";
TokenClassNames[TypeScript.TokenClass.NumberLiteral] = "NumberLiteral";
TokenClassNames[TypeScript.TokenClass.StringLiteral] = "StringLiteral";
TokenClassNames[TypeScript.TokenClass.RegExpLiteral] = "RegExpLiteral";
interface ClassificationEntry {
value: any;
class: ts.TokenClass;
}
describe('Colorization', function () {
var mytypescriptLS = new Harness.LanguageService.TypeScriptLS();
var myclassifier = mytypescriptLS.getClassifier();
describe('Colorization', function() {
var mytypescriptLS = new Harness.TypeScriptLS();
var myls = mytypescriptLS.getLanguageService();
var myclassifier = new Services.ClassifierShim(myls.host);
function getClassifications(code: string, initialLexState?: TypeScript.LexState = TypeScript.LexState.Start): ClassiferResult {
var classResult = myclassifier.getClassificationsForLine(code, initialLexState).split('\n');
function getClassifications(code: string, initialEndOfLineState: ts.EndOfLineState = ts.EndOfLineState.Start): ClassiferResult {
var classResult = myclassifier.getClassificationsForLine(code, initialEndOfLineState).split('\n');
var tuples: Classification[] = [];
var i = 0;
var position = 0;
for (; i < classResult.length - 1; i += 2) {
tuples[i / 2] = {
var t = tuples[i / 2] = {
position: position,
length: parseInt(classResult[i]),
class2: parseInt(classResult[i + 1])
class: parseInt(classResult[i + 1])
};
assert.isTrue(t.length > 0, "Result length should be greater than 0, got :" + t.length);
position += t.length;
}
var finalLexState = classResult[classResult.length - 1];
var finalEndOfLineState = classResult[classResult.length - 1];
assert.equal(position, code.length, "Expected accumilative length of all entries to match the length of the source. expected: " + code.length + ", but got: " + position);
return {
tuples: tuples,
finalLexState: parseInt(finalLexState)
finalEndOfLineState: parseInt(finalEndOfLineState)
};
}
function verifyClassification(classification: Classification, expectedLength: number, expectedClass: number) {
assert.notNull(classification);
assert.is(classification.length === expectedLength, "Classification length does not match expected. Expected: " + expectedLength + ", Actual: " + classification.length);
assert.is(classification.class2 === expectedClass, "Classification class does not match expected. Expected: " + TokenClassNames[expectedClass] + ", Actual: " + TokenClassNames[classification.class2]);
assert.isNotNull(classification);
assert.equal(classification.length, expectedLength, "Classification length does not match expected. Expected: " + expectedLength + ", Actual: " + classification.length);
assert.equal(classification.class, expectedClass, "Classification class does not match expected. Expected: " + ts.TokenClass[expectedClass] + ", Actual: " + ts.TokenClass[classification.class]);
}
describe("test cases for colorization", function() {
var results = getClassifications('var x:string = "foo"; //Hello');
it("checks for a keyword", function() {
verifyClassification(results.tuples[0], 3, TypeScript.TokenClass.Keyword);
function getEntryAtPosistion(result: ClassiferResult, position: number) {
for (var i = 0, n = result.tuples.length; i < n; i++) {
if (result.tuples[i].position === position) return result.tuples[i];
}
return undefined;
}
function punctuation(text: string) { return { value: text, class: ts.TokenClass.Punctuation }; }
function keyword(text: string) { return { value: text, class: ts.TokenClass.Keyword }; }
function operator(text: string) { return { value: text, class: ts.TokenClass.Operator }; }
function comment(text: string) { return { value: text, class: ts.TokenClass.Comment }; }
function whitespace(text: string) { return { value: text, class: ts.TokenClass.Whitespace }; }
function identifier(text: string) { return { value: text, class: ts.TokenClass.Identifier }; }
function numberLiteral(text: string) { return { value: text, class: ts.TokenClass.NumberLiteral }; }
function stringLiteral(text: string) { return { value: text, class: ts.TokenClass.StringLiteral }; }
function regExpLiteral(text: string) { return { value: text, class: ts.TokenClass.RegExpLiteral }; }
function finalEndOfLineState(value: number) { return { value: value, class: undefined }; }
function test(text: string, initialEndOfLineState: ts.EndOfLineState, ...expectedEntries: ClassificationEntry[]): void {
var result = getClassifications(text, initialEndOfLineState);
for (var i = 0, n = expectedEntries.length; i < n; i++) {
var expectedEntry = expectedEntries[i];
if (expectedEntry.class === undefined) {
assert.equal(result.finalEndOfLineState, expectedEntry.value, "final endOfLineState does not match expected.");
}
else {
var actualEntryPosition = text.indexOf(expectedEntry.value);
assert(actualEntryPosition >= 0, "token: '" + expectedEntry.value + "' does not exit in text: '" + text + "'.");
var actualEntry = getEntryAtPosistion(result, actualEntryPosition);
assert(actualEntry, "Could not find classification entry for '" + expectedEntry.value + "' at position: " + actualEntryPosition);
assert.equal(actualEntry.length, expectedEntry.value.length, "Classification class does not match expected.");
assert.equal(actualEntry.class, expectedEntry.class, "Classification class does not match expected.");
}
}
}
describe("test getClassifications", function () {
it("Returns correct token classes", function () {
test("var x: string = \"foo\"; //Hello",
ts.EndOfLineState.Start,
keyword("var"),
whitespace(" "),
identifier("x"),
punctuation(":"),
keyword("string"),
operator("="),
stringLiteral("\"foo\""),
comment("//Hello"),
punctuation(";"));
});
it("checks for a whitespace", function() {
verifyClassification(results.tuples[1], 4, TypeScript.TokenClass.Whitespace);
it("classifies correctelly a comment after a divide operator", function () {
test("1 / 2 // comment",
ts.EndOfLineState.Start,
numberLiteral("1"),
whitespace(" "),
operator("/"),
numberLiteral("2"),
comment("// comment"));
});
it("checks for a identifier", function() {
verifyClassification(results.tuples[2], 5, TypeScript.TokenClass.Identifier);
it("classifies correctelly a literal after a divide operator", function () {
test("1 / 2, 3 / 4",
ts.EndOfLineState.Start,
numberLiteral("1"),
whitespace(" "),
operator("/"),
numberLiteral("2"),
numberLiteral("3"),
numberLiteral("4"),
operator(","));
});
it("checks for an punctuation", function() {
verifyClassification(results.tuples[3], 6, TypeScript.TokenClass.Punctuation);
});
it("checks for a operator", function() {
verifyClassification(results.tuples[6], 14, TypeScript.TokenClass.Operator);
it("classifies correctelly an unterminated multi-line string", function () {
test("'line1\\",
ts.EndOfLineState.Start,
stringLiteral("'line1\\"),
finalEndOfLineState(ts.EndOfLineState.InSingleQuoteStringLiteral));
});
it("checks for a string literal", function() {
verifyClassification(results.tuples[8], 20, TypeScript.TokenClass.StringLiteral);
it("classifies correctelly the second line of an unterminated multi-line string", function () {
test("\\",
ts.EndOfLineState.InDoubleQuoteStringLiteral,
stringLiteral("\\"),
finalEndOfLineState(ts.EndOfLineState.InDoubleQuoteStringLiteral));
});
it("checks for a comment", function() {
verifyClassification(results.tuples[11], 29, TypeScript.TokenClass.Comment);
});
});
describe("test comment colorization after a divide operator", function() {
var results = getClassifications('1 / 1 // comment');
it("checks for a number literal", function() {
verifyClassification(results.tuples[0], 1, TypeScript.TokenClass.NumberLiteral);
it("classifies correctelly the last line of a multi-line string", function () {
test("'",
ts.EndOfLineState.InSingleQuoteStringLiteral,
stringLiteral("'"),
finalEndOfLineState(ts.EndOfLineState.Start));
});
it("checks for a whitespace", function() {
verifyClassification(results.tuples[1], 2, TypeScript.TokenClass.Whitespace);
it("classifies correctelly an unterminated multiline comment", function () {
test("/*",
ts.EndOfLineState.Start,
comment("/*"),
finalEndOfLineState(ts.EndOfLineState.InMultiLineCommentTrivia));
});
it("checks for a operator", function() {
verifyClassification(results.tuples[2], 3, TypeScript.TokenClass.Operator);
it("classifies correctelly an unterminated multiline comment with trailing space", function () {
test("/* ",
ts.EndOfLineState.Start,
comment("/* "),
finalEndOfLineState(ts.EndOfLineState.InMultiLineCommentTrivia));
});
it("checks for a whitespace", function() {
verifyClassification(results.tuples[3], 4, TypeScript.TokenClass.Whitespace);
it("classifies correctelly a keyword after a dot", function () {
test("a.var",
ts.EndOfLineState.Start,
identifier("var"));
});
it("checks for a number literal", function() {
verifyClassification(results.tuples[4], 5, TypeScript.TokenClass.NumberLiteral);
});
it("checks for a whitespace", function() {
verifyClassification(results.tuples[5], 6, TypeScript.TokenClass.Whitespace);
});
it("checks for a comment", function() {
verifyClassification(results.tuples[6], 16, TypeScript.TokenClass.Comment);
});
});
describe("test literal colorization after a divide operator", function() {
var results = getClassifications('1 / 2, 1 / 2');
it("checks for a number literal", function() {
verifyClassification(results.tuples[0], 1, TypeScript.TokenClass.NumberLiteral);
});
it("checks for a whitespace", function() {
verifyClassification(results.tuples[1], 2, TypeScript.TokenClass.Whitespace);
});
it("checks for a operator", function() {
verifyClassification(results.tuples[2], 3, TypeScript.TokenClass.Operator);
});
it("checks for a whitespace", function() {
verifyClassification(results.tuples[3], 4, TypeScript.TokenClass.Whitespace);
});
it("checks for a number literal", function() {
verifyClassification(results.tuples[4], 5, TypeScript.TokenClass.NumberLiteral);
});
it("checks for a operator", function() {
verifyClassification(results.tuples[5], 6, TypeScript.TokenClass.Operator);
});
it("checks for a whitespace", function() {
verifyClassification(results.tuples[6], 7, TypeScript.TokenClass.Whitespace);
});
it("checks for a number literal", function() {
verifyClassification(results.tuples[7], 8, TypeScript.TokenClass.NumberLiteral);
});
it("checks for a whitespace", function() {
verifyClassification(results.tuples[8], 9, TypeScript.TokenClass.Whitespace);
});
it("checks for a operator", function() {
verifyClassification(results.tuples[9], 10, TypeScript.TokenClass.Operator);
});
it("checks for a whitespace", function() {
verifyClassification(results.tuples[10], 11, TypeScript.TokenClass.Whitespace);
});
it("checks for a number literal", function() {
verifyClassification(results.tuples[11], 12, TypeScript.TokenClass.NumberLiteral);
});
});
describe("test cases for colorizing multi-line string", function() {
it("classifies first line correctelly", function() {
var results = getClassifications("'line1\\\n", TypeScript.LexState.Start);
assert.equal(results.tuples.length, 1);
verifyClassification(results.tuples[0], 8, TypeScript.TokenClass.StringLiteral);
assert.equal(results.finalLexState, TypeScript.LexState.InMultilineSingleQuoteString);
});
it("classifies second line correctelly", function() {
var results = getClassifications("\\\n", TypeScript.LexState.InMultilineSingleQuoteString);
assert.equal(results.tuples.length, 1);
verifyClassification(results.tuples[0], 2, TypeScript.TokenClass.StringLiteral);
assert.equal(results.finalLexState, TypeScript.LexState.InMultilineSingleQuoteString);
});
it("classifies third line correctelly", function() {
var results = getClassifications("'", TypeScript.LexState.InMultilineSingleQuoteString);
assert.equal(results.tuples.length, 1);
verifyClassification(results.tuples[0], 1, TypeScript.TokenClass.StringLiteral);
assert.equal(results.finalLexState, TypeScript.LexState.Start);
it("classifies keyword after a dot on previous line", function () {
test("var",
ts.EndOfLineState.EndingWithDotToken,
identifier("var"),
finalEndOfLineState(ts.EndOfLineState.Start));
});
});
});
@@ -0,0 +1,38 @@
///<reference path='..\..\..\..\src\harness\harness.ts' />
describe("DocumentRegistry", () => {
it("documents are shared between projects", () => {
var documentRegistry = ts.createDocumentRegistry();
var defaultCompilerOptions = ts.getDefaultCompilerOptions();
var f1 = documentRegistry.acquireDocument("file1.ts", defaultCompilerOptions, TypeScript.ScriptSnapshot.fromString("var x = 1;"), 1, false);
var f2 = documentRegistry.acquireDocument("file1.ts", defaultCompilerOptions, TypeScript.ScriptSnapshot.fromString("var x = 1;"), 1, false);
assert(f1 === f2, "DocumentRegistry should return the same document for the same name");
});
it("documents are refreshed when settings in compilation settings affect syntax", () => {
var documentRegistry = ts.createDocumentRegistry();
var compilerOptions: ts.CompilerOptions = { target: ts.ScriptTarget.ES5, module: ts.ModuleKind.AMD };
// change compilation setting that doesn't affect parsing - should have the same document
compilerOptions.declaration = true;
var f1 = documentRegistry.acquireDocument("file1.ts", compilerOptions, TypeScript.ScriptSnapshot.fromString("var x = 1;"), 1, false);
compilerOptions.declaration = false;
var f2 = documentRegistry.acquireDocument("file1.ts", compilerOptions, TypeScript.ScriptSnapshot.fromString("var x = 1;"), 1, false);
assert(f1 === f2, "Expected to have the same document instance");
// change value of compilation setting that is used during production of AST - new document is required
compilerOptions.target = ts.ScriptTarget.ES3;
var f3 = documentRegistry.acquireDocument("file1.ts", compilerOptions, TypeScript.ScriptSnapshot.fromString("var x = 1;"), 1, false);
assert(f1 !== f3, "Changed target: Expected to have different instances of document");
compilerOptions.module = ts.ModuleKind.CommonJS;
var f4 = documentRegistry.acquireDocument("file1.ts", compilerOptions, TypeScript.ScriptSnapshot.fromString("var x = 1;"), 1, false);
assert(f1 !== f4, "Changed module: Expected to have different instances of document");
});
});
@@ -1,3 +0,0 @@
///<reference path='_project.ts'/>
DumpAST.compareDumpFilesWithBaseline();
@@ -1,9 +0,0 @@
///<reference path='..\..\..\harness\dumpAST-baselining.ts'/>
describe('dumpAST-create-baselines', function() {
describe("create test baseline files for AST source locations", function() {
it("create baseline files", function() {
DumpAST.generateBaselineFiles();
});
});
});
Loaded 100 of 222 files, more files were not shown because too many files have changed in this diff. Show more