From 47b8deb382085379c16450b5e9a9fc3d73ea5162 Mon Sep 17 00:00:00 2001 From: Lorant Pinter Date: Sun, 11 Jan 2015 11:14:06 +0100 Subject: [PATCH] Show --noImplicitAny as an option to throw errors, not warnings Fixes #1632 --- src/compiler/commandLineParser.ts | 2 +- src/compiler/diagnosticInformationMap.generated.ts | 2 +- src/compiler/diagnosticMessages.json | 2 +- src/services/compiler/tsc.ts | 2 +- src/services/resources/diagnosticCode.generated.ts | 2 +- src/services/resources/diagnosticMessages.json | 2 +- src/services/syntax/SyntaxGenerator.d.ts | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index 9fe59b1ba27..fa31f25f7c3 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -67,7 +67,7 @@ module ts { { name: "noImplicitAny", type: "boolean", - description: Diagnostics.Warn_on_expressions_and_declarations_with_an_implied_any_type, + description: Diagnostics.Raise_error_on_expressions_and_declarations_with_an_implied_any_type, }, { name: "noLib", diff --git a/src/compiler/diagnosticInformationMap.generated.ts b/src/compiler/diagnosticInformationMap.generated.ts index 99d8d0b72fb..f9d5dd518a9 100644 --- a/src/compiler/diagnosticInformationMap.generated.ts +++ b/src/compiler/diagnosticInformationMap.generated.ts @@ -419,7 +419,7 @@ module ts { 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." }, + Raise_error_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'." }, Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures: { code: 6055, category: DiagnosticCategory.Message, key: "Suppress noImplicitAny errors for indexing objects lacking index signatures." }, diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 5bec5301721..371d5facdaf 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -1772,7 +1772,7 @@ "category": "Error", "code": 6051 }, - "Warn on expressions and declarations with an implied 'any' type.": { + "Raise error on expressions and declarations with an implied 'any' type.": { "category": "Message", "code": 6052 }, diff --git a/src/services/compiler/tsc.ts b/src/services/compiler/tsc.ts index e77ea9467ca..acd4fb40e6a 100644 --- a/src/services/compiler/tsc.ts +++ b/src/services/compiler/tsc.ts @@ -413,7 +413,7 @@ module TypeScript { opts.flag('noImplicitAny', { usage: { - locCode: DiagnosticCode.Warn_on_expressions_and_declarations_with_an_implied_any_type, + locCode: DiagnosticCode.Raise_error_on_expressions_and_declarations_with_an_implied_any_type, args: null }, set: () => { diff --git a/src/services/resources/diagnosticCode.generated.ts b/src/services/resources/diagnosticCode.generated.ts index 03c4efea480..86509fdd63b 100644 --- a/src/services/resources/diagnosticCode.generated.ts +++ b/src/services/resources/diagnosticCode.generated.ts @@ -436,7 +436,7 @@ module TypeScript { This_version_of_the_Javascript_runtime_does_not_support_the_0_function: "This version of the Javascript runtime does not support the '{0}' function.", Unknown_rule: "Unknown rule.", Invalid_line_number_0: "Invalid line number ({0})", - Warn_on_expressions_and_declarations_with_an_implied_any_type: "Warn on expressions and declarations with an implied 'any' type.", + Raise_error_on_expressions_and_declarations_with_an_implied_any_type: "Raise error on expressions and declarations with an implied 'any' type.", Variable_0_implicitly_has_an_any_type: "Variable '{0}' implicitly has an 'any' type.", Parameter_0_of_1_implicitly_has_an_any_type: "Parameter '{0}' of '{1}' implicitly has an 'any' type.", Parameter_0_of_function_type_implicitly_has_an_any_type: "Parameter '{0}' of function type implicitly has an 'any' type.", diff --git a/src/services/resources/diagnosticMessages.json b/src/services/resources/diagnosticMessages.json index 54ecbb75370..60a0bb48df9 100644 --- a/src/services/resources/diagnosticMessages.json +++ b/src/services/resources/diagnosticMessages.json @@ -1743,7 +1743,7 @@ "category": "Error", "code": 7003 }, - "Warn on expressions and declarations with an implied 'any' type.": { + "Raise error on expressions and declarations with an implied 'any' type.": { "category": "Message", "code": 7004 }, diff --git a/src/services/syntax/SyntaxGenerator.d.ts b/src/services/syntax/SyntaxGenerator.d.ts index 4a833f07587..d01d227b786 100644 --- a/src/services/syntax/SyntaxGenerator.d.ts +++ b/src/services/syntax/SyntaxGenerator.d.ts @@ -417,7 +417,7 @@ declare module TypeScript { This_version_of_the_Javascript_runtime_does_not_support_the_0_function: string; Unknown_rule: string; Invalid_line_number_0: string; - Warn_on_expressions_and_declarations_with_an_implied_any_type: string; + Raise_error_on_expressions_and_declarations_with_an_implied_any_type: string; Variable_0_implicitly_has_an_any_type: string; Parameter_0_of_1_implicitly_has_an_any_type: string; Parameter_0_of_function_type_implicitly_has_an_any_type: string;