From 6469375149b37a77d67f437eeedb6bf0c5f5d77a Mon Sep 17 00:00:00 2001 From: Ivo Gabe de Wolff Date: Sun, 4 Jan 2015 14:42:05 +0100 Subject: [PATCH] Remove tagged templates error when targeting ES3 or 5 --- src/compiler/checker.ts | 5 ----- src/compiler/diagnosticInformationMap.generated.ts | 1 - src/compiler/diagnosticMessages.json | 5 ----- 3 files changed, 11 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index f8c4caa9630..ef17f35dad0 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -6319,11 +6319,6 @@ module ts { } function checkTaggedTemplateExpression(node: TaggedTemplateExpression): Type { - // Grammar checking - if (compilerOptions.target < ScriptTarget.ES6) { - grammarErrorOnFirstToken(node.template, Diagnostics.Tagged_templates_are_only_available_when_targeting_ECMAScript_6_and_higher); - } - return getReturnTypeOfSignature(getResolvedSignature(node)); } diff --git a/src/compiler/diagnosticInformationMap.generated.ts b/src/compiler/diagnosticInformationMap.generated.ts index 99d8d0b72fb..c9c4edbe3ac 100644 --- a/src/compiler/diagnosticInformationMap.generated.ts +++ b/src/compiler/diagnosticInformationMap.generated.ts @@ -117,7 +117,6 @@ module ts { const_declarations_must_be_initialized: { code: 1155, category: DiagnosticCategory.Error, key: "'const' declarations must be initialized", isEarly: true }, const_declarations_can_only_be_declared_inside_a_block: { code: 1156, category: DiagnosticCategory.Error, key: "'const' declarations can only be declared inside a block.", isEarly: true }, let_declarations_can_only_be_declared_inside_a_block: { code: 1157, category: DiagnosticCategory.Error, key: "'let' declarations can only be declared inside a block.", isEarly: true }, - Tagged_templates_are_only_available_when_targeting_ECMAScript_6_and_higher: { code: 1159, category: DiagnosticCategory.Error, key: "Tagged templates are only available when targeting ECMAScript 6 and higher.", isEarly: true }, Unterminated_template_literal: { code: 1160, category: DiagnosticCategory.Error, key: "Unterminated template literal." }, Unterminated_regular_expression_literal: { code: 1161, category: DiagnosticCategory.Error, key: "Unterminated regular expression literal." }, An_object_member_cannot_be_declared_optional: { code: 1162, category: DiagnosticCategory.Error, key: "An object member cannot be declared optional.", isEarly: true }, diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 5bec5301721..b6a4b83f430 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -539,11 +539,6 @@ "code": 1157, "isEarly": true }, - "Tagged templates are only available when targeting ECMAScript 6 and higher.": { - "category": "Error", - "code": 1159, - "isEarly": true - }, "Unterminated template literal.": { "category": "Error", "code": 1160