From 44a5343c1ecb295835b21247e572d4c9c760fc4e Mon Sep 17 00:00:00 2001 From: Mohamed Hegazy Date: Sun, 15 Mar 2015 14:37:12 -0700 Subject: [PATCH] Upate error message --- src/compiler/checker.ts | 4 ++-- src/compiler/diagnosticInformationMap.generated.ts | 2 +- src/compiler/diagnosticMessages.json | 2 +- .../baselines/reference/exportDefaultTypeAnnoation.errors.txt | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index c79ca2f1fd..66f3179002 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -2073,7 +2073,7 @@ module ts { } // Handle export default expressions if (declaration.kind === SyntaxKind.ExportAssignment) { - var exportAssignment = (declaration); + var exportAssignment = declaration; if (exportAssignment.expression) { return links.type = checkExpression(exportAssignment.expression); } @@ -10095,7 +10095,7 @@ module ts { if (node.type) { checkSourceElement(node.type); if (!isInAmbientContext(node)) { - grammarErrorOnFirstToken(node.type, Diagnostics.Type_annotation_on_export_statements_are_only_allowed_in_ambient_module_declarations); + grammarErrorOnFirstToken(node.type, Diagnostics.A_type_annotation_on_an_export_statement_is_only_allowed_in_an_ambient_external_module_declaration); } } diff --git a/src/compiler/diagnosticInformationMap.generated.ts b/src/compiler/diagnosticInformationMap.generated.ts index 5d3bafc45a..e3bb7aa8f4 100644 --- a/src/compiler/diagnosticInformationMap.generated.ts +++ b/src/compiler/diagnosticInformationMap.generated.ts @@ -157,7 +157,7 @@ module ts { Catch_clause_variable_cannot_have_an_initializer: { code: 1197, category: DiagnosticCategory.Error, key: "Catch clause variable cannot have an initializer." }, An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive: { code: 1198, category: DiagnosticCategory.Error, key: "An extended Unicode escape value must be between 0x0 and 0x10FFFF inclusive." }, Unterminated_Unicode_escape_sequence: { code: 1199, category: DiagnosticCategory.Error, key: "Unterminated Unicode escape sequence." }, - Type_annotation_on_export_statements_are_only_allowed_in_ambient_module_declarations: { code: 1200, category: DiagnosticCategory.Error, key: "Type annotation on export statements are only allowed in ambient module declarations." }, + A_type_annotation_on_an_export_statement_is_only_allowed_in_an_ambient_external_module_declaration: { code: 1200, category: DiagnosticCategory.Error, key: "A type annotation on an export statement is only allowed in an ambient external module declaration." }, 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." }, diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 779e389176..3c8ecadee0 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -619,7 +619,7 @@ "category": "Error", "code": 1199 }, - "Type annotation on export statements are only allowed in ambient module declarations.": { + "A type annotation on an export statement is only allowed in an ambient external module declaration.": { "category": "Error", "code": 1200 }, diff --git a/tests/baselines/reference/exportDefaultTypeAnnoation.errors.txt b/tests/baselines/reference/exportDefaultTypeAnnoation.errors.txt index fa7806a17d..472dc0c74c 100644 --- a/tests/baselines/reference/exportDefaultTypeAnnoation.errors.txt +++ b/tests/baselines/reference/exportDefaultTypeAnnoation.errors.txt @@ -1,8 +1,8 @@ -tests/cases/compiler/exportDefaultTypeAnnoation.ts(2,18): error TS1200: Type annotation on export statements are only allowed in ambient module declarations. +tests/cases/compiler/exportDefaultTypeAnnoation.ts(2,18): error TS1200: A type annotation on an export statement is only allowed in an ambient external module declaration. ==== tests/cases/compiler/exportDefaultTypeAnnoation.ts (1 errors) ==== export default : number; ~~~~~~ -!!! error TS1200: Type annotation on export statements are only allowed in ambient module declarations. \ No newline at end of file +!!! error TS1200: A type annotation on an export statement is only allowed in an ambient external module declaration. \ No newline at end of file