From 769d4c55148a63be3d0dbe87eee9683ec82892b9 Mon Sep 17 00:00:00 2001 From: Travis-CI Date: Wed, 31 Aug 2016 00:06:34 +0000 Subject: [PATCH] 2016-08-31 [ci skip] Version: 1.201608310006.1+0b9573118454ab2420abc168405be1a78b482b57 --- TypeScript | 2 +- bin/ntypescript.d.ts | 18 ++++++++++++------ bin/ntypescript.js | 11 +++++++++-- bin/typescript.d.ts | 18 ++++++++++++------ bin/typescript.js | 11 +++++++++-- kicktravis | 2 +- package.json | 2 +- src/compiler/checker.ts | 8 +++++++- .../diagnosticInformationMap.generated.ts | 3 ++- src/compiler/diagnosticMessages.generated.json | 3 ++- src/compiler/diagnosticMessages.json | 14 +++++++++----- 11 files changed, 65 insertions(+), 27 deletions(-) diff --git a/TypeScript b/TypeScript index 0485bb6..0b95731 160000 --- a/TypeScript +++ b/TypeScript @@ -1 +1 @@ -Subproject commit 0485bb6b56b38749b83a23626243627a42472d50 +Subproject commit 0b9573118454ab2420abc168405be1a78b482b57 diff --git a/bin/ntypescript.d.ts b/bin/ntypescript.d.ts index 624b0cc..a9f3df9 100644 --- a/bin/ntypescript.d.ts +++ b/bin/ntypescript.d.ts @@ -7211,12 +7211,6 @@ declare namespace ts { key: string; message: string; }; - Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_type_annotation: { - code: number; - category: DiagnosticCategory; - key: string; - message: string; - }; Index_signature_of_object_type_implicitly_has_an_any_type: { code: number; category: DiagnosticCategory; @@ -7301,6 +7295,18 @@ declare namespace ts { key: string; message: string; }; + Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation: { + code: number; + category: DiagnosticCategory; + key: string; + message: string; + }; + Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation: { + code: number; + category: DiagnosticCategory; + key: string; + message: string; + }; You_cannot_rename_this_element: { code: number; category: DiagnosticCategory; diff --git a/bin/ntypescript.js b/bin/ntypescript.js index 93b0814..e4799e6 100644 --- a/bin/ntypescript.js +++ b/bin/ntypescript.js @@ -6494,7 +6494,6 @@ var ts; Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type: { code: 7011, category: ts.DiagnosticCategory.Error, key: "Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type_7011", message: "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: ts.DiagnosticCategory.Error, key: "Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7013", message: "Construct signature, which lacks return-type annotation, implicitly has an 'any' return type." }, Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number: { code: 7015, category: ts.DiagnosticCategory.Error, key: "Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number_7015", message: "Element implicitly has an 'any' type because index expression is not of type 'number'." }, - Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_type_annotation: { code: 7016, category: ts.DiagnosticCategory.Error, key: "Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_type_annotation_7016", message: "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: ts.DiagnosticCategory.Error, key: "Index_signature_of_object_type_implicitly_has_an_any_type_7017", message: "Index signature of object type implicitly has an 'any' type." }, Object_literal_s_property_0_implicitly_has_an_1_type: { code: 7018, category: ts.DiagnosticCategory.Error, key: "Object_literal_s_property_0_implicitly_has_an_1_type_7018", message: "Object literal's property '{0}' implicitly has an '{1}' type." }, Rest_parameter_0_implicitly_has_an_any_type: { code: 7019, category: ts.DiagnosticCategory.Error, key: "Rest_parameter_0_implicitly_has_an_any_type_7019", message: "Rest parameter '{0}' implicitly has an 'any[]' type." }, @@ -6509,6 +6508,8 @@ var ts; Fallthrough_case_in_switch: { code: 7029, category: ts.DiagnosticCategory.Error, key: "Fallthrough_case_in_switch_7029", message: "Fallthrough case in switch." }, Not_all_code_paths_return_a_value: { code: 7030, category: ts.DiagnosticCategory.Error, key: "Not_all_code_paths_return_a_value_7030", message: "Not all code paths return a value." }, Binding_element_0_implicitly_has_an_1_type: { code: 7031, category: ts.DiagnosticCategory.Error, key: "Binding_element_0_implicitly_has_an_1_type_7031", message: "Binding element '{0}' implicitly has an '{1}' type." }, + Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation: { code: 7032, category: ts.DiagnosticCategory.Error, key: "Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation_7032", message: "Property '{0}' implicitly has type 'any', because its set accessor lacks a parameter type annotation." }, + Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation: { code: 7033, category: ts.DiagnosticCategory.Error, key: "Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation_7033", message: "Property '{0}' implicitly has type 'any', because its get accessor lacks a return type annotation." }, You_cannot_rename_this_element: { code: 8000, category: ts.DiagnosticCategory.Error, key: "You_cannot_rename_this_element_8000", message: "You cannot rename this element." }, You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library: { code: 8001, category: ts.DiagnosticCategory.Error, key: "You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library_8001", message: "You cannot rename elements that are defined in the standard TypeScript library." }, import_can_only_be_used_in_a_ts_file: { code: 8002, category: ts.DiagnosticCategory.Error, key: "import_can_only_be_used_in_a_ts_file_8002", message: "'import ... =' can only be used in a .ts file." }, @@ -19512,7 +19513,13 @@ var ts; } else { if (compilerOptions.noImplicitAny) { - error(setter, ts.Diagnostics.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_type_annotation, symbolToString(symbol)); + if (setter) { + error(setter, ts.Diagnostics.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation, symbolToString(symbol)); + } + else { + ts.Debug.assert(!!getter, "there must existed getter as we are current checking either setter or getter in this function"); + error(getter, ts.Diagnostics.Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation, symbolToString(symbol)); + } } type = anyType; } diff --git a/bin/typescript.d.ts b/bin/typescript.d.ts index faaf808..71bc1a9 100644 --- a/bin/typescript.d.ts +++ b/bin/typescript.d.ts @@ -7211,12 +7211,6 @@ declare namespace ts { key: string; message: string; }; - Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_type_annotation: { - code: number; - category: DiagnosticCategory; - key: string; - message: string; - }; Index_signature_of_object_type_implicitly_has_an_any_type: { code: number; category: DiagnosticCategory; @@ -7301,6 +7295,18 @@ declare namespace ts { key: string; message: string; }; + Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation: { + code: number; + category: DiagnosticCategory; + key: string; + message: string; + }; + Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation: { + code: number; + category: DiagnosticCategory; + key: string; + message: string; + }; You_cannot_rename_this_element: { code: number; category: DiagnosticCategory; diff --git a/bin/typescript.js b/bin/typescript.js index eee9353..27aaa3a 100644 --- a/bin/typescript.js +++ b/bin/typescript.js @@ -6494,7 +6494,6 @@ var ts; Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type: { code: 7011, category: ts.DiagnosticCategory.Error, key: "Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type_7011", message: "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: ts.DiagnosticCategory.Error, key: "Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7013", message: "Construct signature, which lacks return-type annotation, implicitly has an 'any' return type." }, Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number: { code: 7015, category: ts.DiagnosticCategory.Error, key: "Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number_7015", message: "Element implicitly has an 'any' type because index expression is not of type 'number'." }, - Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_type_annotation: { code: 7016, category: ts.DiagnosticCategory.Error, key: "Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_type_annotation_7016", message: "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: ts.DiagnosticCategory.Error, key: "Index_signature_of_object_type_implicitly_has_an_any_type_7017", message: "Index signature of object type implicitly has an 'any' type." }, Object_literal_s_property_0_implicitly_has_an_1_type: { code: 7018, category: ts.DiagnosticCategory.Error, key: "Object_literal_s_property_0_implicitly_has_an_1_type_7018", message: "Object literal's property '{0}' implicitly has an '{1}' type." }, Rest_parameter_0_implicitly_has_an_any_type: { code: 7019, category: ts.DiagnosticCategory.Error, key: "Rest_parameter_0_implicitly_has_an_any_type_7019", message: "Rest parameter '{0}' implicitly has an 'any[]' type." }, @@ -6509,6 +6508,8 @@ var ts; Fallthrough_case_in_switch: { code: 7029, category: ts.DiagnosticCategory.Error, key: "Fallthrough_case_in_switch_7029", message: "Fallthrough case in switch." }, Not_all_code_paths_return_a_value: { code: 7030, category: ts.DiagnosticCategory.Error, key: "Not_all_code_paths_return_a_value_7030", message: "Not all code paths return a value." }, Binding_element_0_implicitly_has_an_1_type: { code: 7031, category: ts.DiagnosticCategory.Error, key: "Binding_element_0_implicitly_has_an_1_type_7031", message: "Binding element '{0}' implicitly has an '{1}' type." }, + Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation: { code: 7032, category: ts.DiagnosticCategory.Error, key: "Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation_7032", message: "Property '{0}' implicitly has type 'any', because its set accessor lacks a parameter type annotation." }, + Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation: { code: 7033, category: ts.DiagnosticCategory.Error, key: "Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation_7033", message: "Property '{0}' implicitly has type 'any', because its get accessor lacks a return type annotation." }, You_cannot_rename_this_element: { code: 8000, category: ts.DiagnosticCategory.Error, key: "You_cannot_rename_this_element_8000", message: "You cannot rename this element." }, You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library: { code: 8001, category: ts.DiagnosticCategory.Error, key: "You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library_8001", message: "You cannot rename elements that are defined in the standard TypeScript library." }, import_can_only_be_used_in_a_ts_file: { code: 8002, category: ts.DiagnosticCategory.Error, key: "import_can_only_be_used_in_a_ts_file_8002", message: "'import ... =' can only be used in a .ts file." }, @@ -19512,7 +19513,13 @@ var ts; } else { if (compilerOptions.noImplicitAny) { - error(setter, ts.Diagnostics.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_type_annotation, symbolToString(symbol)); + if (setter) { + error(setter, ts.Diagnostics.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation, symbolToString(symbol)); + } + else { + ts.Debug.assert(!!getter, "there must existed getter as we are current checking either setter or getter in this function"); + error(getter, ts.Diagnostics.Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation, symbolToString(symbol)); + } } type = anyType; } diff --git a/kicktravis b/kicktravis index dca13e0..d988de7 100644 --- a/kicktravis +++ b/kicktravis @@ -1 +1 @@ -2016-08-30 [ci skip] Version: 1.201608300008.1+0485bb6b56b38749b83a23626243627a42472d50 +2016-08-31 [ci skip] Version: 1.201608310006.1+0b9573118454ab2420abc168405be1a78b482b57 diff --git a/package.json b/package.json index 301f728..dc45b4c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ntypescript", - "version": "1.201608300008.1+0485bb6b56b38749b83a23626243627a42472d50", + "version": "1.201608310006.1+0b9573118454ab2420abc168405be1a78b482b57", "description": "A nicer version of microsoft/typescript packaged and released for API developers", "main": "./bin/ntypescript.js", "bin": { diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index a98c72c..863c9e7 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -3346,7 +3346,13 @@ namespace ts { // Otherwise, fall back to 'any'. else { if (compilerOptions.noImplicitAny) { - error(setter, Diagnostics.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_type_annotation, symbolToString(symbol)); + if (setter) { + error(setter, Diagnostics.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation, symbolToString(symbol)); + } + else { + Debug.assert(!!getter, "there must existed getter as we are current checking either setter or getter in this function"); + error(getter, Diagnostics.Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation, symbolToString(symbol)); + } } type = anyType; } diff --git a/src/compiler/diagnosticInformationMap.generated.ts b/src/compiler/diagnosticInformationMap.generated.ts index 77613f9..cf39138 100644 --- a/src/compiler/diagnosticInformationMap.generated.ts +++ b/src/compiler/diagnosticInformationMap.generated.ts @@ -721,7 +721,6 @@ namespace ts { 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_7011", message: "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_7013", message: "Construct signature, which lacks return-type annotation, implicitly has an 'any' return type." }, Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number: { code: 7015, category: DiagnosticCategory.Error, key: "Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number_7015", message: "Element implicitly has an 'any' type because index expression is not of type 'number'." }, - 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_7016", message: "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_7017", message: "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_7018", message: "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_7019", message: "Rest parameter '{0}' implicitly has an 'any[]' type." }, @@ -736,6 +735,8 @@ namespace ts { Fallthrough_case_in_switch: { code: 7029, category: DiagnosticCategory.Error, key: "Fallthrough_case_in_switch_7029", message: "Fallthrough case in switch." }, Not_all_code_paths_return_a_value: { code: 7030, category: DiagnosticCategory.Error, key: "Not_all_code_paths_return_a_value_7030", message: "Not all code paths return a value." }, Binding_element_0_implicitly_has_an_1_type: { code: 7031, category: DiagnosticCategory.Error, key: "Binding_element_0_implicitly_has_an_1_type_7031", message: "Binding element '{0}' implicitly has an '{1}' type." }, + Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation: { code: 7032, category: DiagnosticCategory.Error, key: "Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation_7032", message: "Property '{0}' implicitly has type 'any', because its set accessor lacks a parameter type annotation." }, + Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation: { code: 7033, category: DiagnosticCategory.Error, key: "Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation_7033", message: "Property '{0}' implicitly has type 'any', because its get accessor lacks a return type annotation." }, You_cannot_rename_this_element: { code: 8000, category: DiagnosticCategory.Error, key: "You_cannot_rename_this_element_8000", message: "You cannot rename this element." }, You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library: { code: 8001, category: DiagnosticCategory.Error, key: "You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library_8001", message: "You cannot rename elements that are defined in the standard TypeScript library." }, import_can_only_be_used_in_a_ts_file: { code: 8002, category: DiagnosticCategory.Error, key: "import_can_only_be_used_in_a_ts_file_8002", message: "'import ... =' can only be used in a .ts file." }, diff --git a/src/compiler/diagnosticMessages.generated.json b/src/compiler/diagnosticMessages.generated.json index c7cc9e6..81b5d48 100644 --- a/src/compiler/diagnosticMessages.generated.json +++ b/src/compiler/diagnosticMessages.generated.json @@ -717,7 +717,6 @@ "Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type_7011" : "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_7013" : "Construct signature, which lacks return-type annotation, implicitly has an 'any' return type.", "Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number_7015" : "Element implicitly has an 'any' type because index expression is not of type 'number'.", - "Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_type_annotation_7016" : "Property '{0}' implicitly has type 'any', because its 'set' accessor lacks a type annotation.", "Index_signature_of_object_type_implicitly_has_an_any_type_7017" : "Index signature of object type implicitly has an 'any' type.", "Object_literal_s_property_0_implicitly_has_an_1_type_7018" : "Object literal's property '{0}' implicitly has an '{1}' type.", "Rest_parameter_0_implicitly_has_an_any_type_7019" : "Rest parameter '{0}' implicitly has an 'any[]' type.", @@ -732,6 +731,8 @@ "Fallthrough_case_in_switch_7029" : "Fallthrough case in switch.", "Not_all_code_paths_return_a_value_7030" : "Not all code paths return a value.", "Binding_element_0_implicitly_has_an_1_type_7031" : "Binding element '{0}' implicitly has an '{1}' type.", + "Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation_7032" : "Property '{0}' implicitly has type 'any', because its set accessor lacks a parameter type annotation.", + "Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation_7033" : "Property '{0}' implicitly has type 'any', because its get accessor lacks a return type annotation.", "You_cannot_rename_this_element_8000" : "You cannot rename this element.", "You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library_8001" : "You cannot rename elements that are defined in the standard TypeScript library.", "import_can_only_be_used_in_a_ts_file_8002" : "'import ... =' can only be used in a .ts file.", diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index b8978b3..e6bf1d5 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -2871,11 +2871,7 @@ "Element implicitly has an 'any' type because index expression is not of type 'number'.": { "category": "Error", "code": 7015 - }, - "Property '{0}' implicitly has type 'any', because its 'set' accessor lacks a type annotation.": { - "category": "Error", - "code": 7016 - }, + }, "Index signature of object type implicitly has an 'any' type.": { "category": "Error", "code": 7017 @@ -2932,6 +2928,14 @@ "category": "Error", "code": 7031 }, + "Property '{0}' implicitly has type 'any', because its set accessor lacks a parameter type annotation.": { + "category": "Error", + "code": 7032 + }, + "Property '{0}' implicitly has type 'any', because its get accessor lacks a return type annotation.": { + "category": "Error", + "code": 7033 + }, "You cannot rename this element.": { "category": "Error", "code": 8000