Fix grammar issue (#12096)

* Fix grammar issue

* Improve the error message

* cr feedback
This commit is contained in:
Zhengbo Li
2016-11-16 14:13:29 -08:00
committed by GitHub
parent 6e6bea6913
commit 6f409b580e
3 changed files with 3 additions and 3 deletions

View File

@@ -884,7 +884,7 @@ namespace ts {
function tryExtendsName(extendedConfig: string): [string[], string[], string[], CompilerOptions] {
// If the path isn't a rooted or relative path, don't try to resolve it (we reserve the right to special case module-id like paths in the future)
if (!(isRootedDiskPath(extendedConfig) || startsWith(normalizeSlashes(extendedConfig), "./") || startsWith(normalizeSlashes(extendedConfig), "../"))) {
errors.push(createCompilerDiagnostic(Diagnostics.The_path_in_an_extends_options_must_be_relative_or_rooted));
errors.push(createCompilerDiagnostic(Diagnostics.A_path_in_an_extends_option_must_be_relative_or_rooted_but_0_is_not, extendedConfig));
return;
}
let extendedConfigPath = toPath(extendedConfig, basePath, getCanonicalFileName);

View File

@@ -3142,7 +3142,7 @@
"category": "Error",
"code": 18000
},
"The path in an 'extends' options must be relative or rooted.": {
"A path in an 'extends' option must be relative or rooted, but '{0}' is not.": {
"category": "Error",
"code": 18001
},

View File

@@ -179,7 +179,7 @@ namespace ts {
testFailure("can error when 'extends' is neither relative nor rooted.", "extends2.json", [{
code: 18001,
category: DiagnosticCategory.Error,
messageText: `The path in an 'extends' options must be relative or rooted.`
messageText: `A path in an 'extends' option must be relative or rooted, but 'configs/base' is not.`
}]);
});
});