mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-06-29 19:42:39 -05:00
Fix grammar issue (#12096)
* Fix grammar issue * Improve the error message * cr feedback
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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
|
||||
},
|
||||
|
||||
@@ -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.`
|
||||
}]);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user