From ffe82c637f088cfd04b3e0ce2be913abe012e3f6 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Tue, 19 Nov 2019 15:08:49 -0800 Subject: [PATCH] Fix error message --- src/compiler/diagnosticMessages.json | 2 +- src/compiler/program.ts | 2 +- .../pathMappingBasedModuleResolution2_classic.errors.txt | 4 ++-- .../pathMappingBasedModuleResolution2_node.errors.txt | 4 ++-- tests/baselines/reference/pathsValidation4.errors.txt | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 02e852869cd..fedf796769b 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -3241,7 +3241,7 @@ "category": "Error", "code": 5061 }, - "Substitution '{0}' in pattern '{1}' in can have at most one '*' character.": { + "Substitution '{0}' in pattern '{1}' can have at most one '*' character.": { "category": "Error", "code": 5062 }, diff --git a/src/compiler/program.ts b/src/compiler/program.ts index 429b7389f5b..cba0cd748b2 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -2980,7 +2980,7 @@ namespace ts { const typeOfSubst = typeof subst; if (typeOfSubst === "string") { if (!hasZeroOrOneAsteriskCharacter(subst)) { - createDiagnosticForOptionPathKeyValue(key, i, Diagnostics.Substitution_0_in_pattern_1_in_can_have_at_most_one_Asterisk_character, subst, key); + createDiagnosticForOptionPathKeyValue(key, i, Diagnostics.Substitution_0_in_pattern_1_can_have_at_most_one_Asterisk_character, subst, key); } } else { diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution2_classic.errors.txt b/tests/baselines/reference/pathMappingBasedModuleResolution2_classic.errors.txt index 3b0261dd395..61282d7353e 100644 --- a/tests/baselines/reference/pathMappingBasedModuleResolution2_classic.errors.txt +++ b/tests/baselines/reference/pathMappingBasedModuleResolution2_classic.errors.txt @@ -1,5 +1,5 @@ tests/cases/compiler/root/tsconfig.json(8,13): error TS5061: Pattern '*1*' can have at most one '*' character. -tests/cases/compiler/root/tsconfig.json(8,22): error TS5062: Substitution '*2*' in pattern '*1*' in can have at most one '*' character. +tests/cases/compiler/root/tsconfig.json(8,22): error TS5062: Substitution '*2*' in pattern '*1*' can have at most one '*' character. ==== tests/cases/compiler/root/tsconfig.json (2 errors) ==== @@ -14,7 +14,7 @@ tests/cases/compiler/root/tsconfig.json(8,22): error TS5062: Substitution '*2*' ~~~~~ !!! error TS5061: Pattern '*1*' can have at most one '*' character. ~~~~~ -!!! error TS5062: Substitution '*2*' in pattern '*1*' in can have at most one '*' character. +!!! error TS5062: Substitution '*2*' in pattern '*1*' can have at most one '*' character. } } } diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution2_node.errors.txt b/tests/baselines/reference/pathMappingBasedModuleResolution2_node.errors.txt index 3b0261dd395..61282d7353e 100644 --- a/tests/baselines/reference/pathMappingBasedModuleResolution2_node.errors.txt +++ b/tests/baselines/reference/pathMappingBasedModuleResolution2_node.errors.txt @@ -1,5 +1,5 @@ tests/cases/compiler/root/tsconfig.json(8,13): error TS5061: Pattern '*1*' can have at most one '*' character. -tests/cases/compiler/root/tsconfig.json(8,22): error TS5062: Substitution '*2*' in pattern '*1*' in can have at most one '*' character. +tests/cases/compiler/root/tsconfig.json(8,22): error TS5062: Substitution '*2*' in pattern '*1*' can have at most one '*' character. ==== tests/cases/compiler/root/tsconfig.json (2 errors) ==== @@ -14,7 +14,7 @@ tests/cases/compiler/root/tsconfig.json(8,22): error TS5062: Substitution '*2*' ~~~~~ !!! error TS5061: Pattern '*1*' can have at most one '*' character. ~~~~~ -!!! error TS5062: Substitution '*2*' in pattern '*1*' in can have at most one '*' character. +!!! error TS5062: Substitution '*2*' in pattern '*1*' can have at most one '*' character. } } } diff --git a/tests/baselines/reference/pathsValidation4.errors.txt b/tests/baselines/reference/pathsValidation4.errors.txt index a20ab3aff3f..8056cc7baa2 100644 --- a/tests/baselines/reference/pathsValidation4.errors.txt +++ b/tests/baselines/reference/pathsValidation4.errors.txt @@ -1,6 +1,6 @@ tests/cases/compiler/tsconfig.json(6,11): error TS5061: Pattern '@interface/**/*' can have at most one '*' character. tests/cases/compiler/tsconfig.json(7,11): error TS5061: Pattern '@service/**/*' can have at most one '*' character. -tests/cases/compiler/tsconfig.json(7,29): error TS5062: Substitution './src/service/**/*' in pattern '@service/**/*' in can have at most one '*' character. +tests/cases/compiler/tsconfig.json(7,29): error TS5062: Substitution './src/service/**/*' in pattern '@service/**/*' can have at most one '*' character. ==== tests/cases/compiler/tsconfig.json (3 errors) ==== @@ -16,7 +16,7 @@ tests/cases/compiler/tsconfig.json(7,29): error TS5062: Substitution './src/serv ~~~~~~~~~~~~~~~ !!! error TS5061: Pattern '@service/**/*' can have at most one '*' character. ~~~~~~~~~~~~~~~~~~~~ -!!! error TS5062: Substitution './src/service/**/*' in pattern '@service/**/*' in can have at most one '*' character. +!!! error TS5062: Substitution './src/service/**/*' in pattern '@service/**/*' can have at most one '*' character. "@controller/*": ["controller/*"], } }