fix: postfix option name with --

This commit is contained in:
uhyo 2024-10-17 19:26:08 +09:00
Родитель 7a7e5222c8
Коммит b319fb239d
2 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -1821,7 +1821,7 @@ function createDiagnosticForInvalidCustomType(opt: CommandLineOptionOfCustomType
// does not support that ECMAScript version.
const esVersion = extractECMAScriptVersion(value);
if (esVersion !== undefined && esVersion >= 2015) {
return createDiagnostic(Diagnostics.Argument_0_for_1_option_is_a_year_not_yet_supported_by_this_version_of_TypeScript, value, opt.name);
return createDiagnostic(Diagnostics.Argument_0_for_1_option_is_a_year_not_yet_supported_by_this_version_of_TypeScript, value, `--${opt.name}`);
}
}

Просмотреть файл

@ -8,5 +8,5 @@ WatchOptions::
FileNames::
0.ts
Errors::
error TS6284: Argument 'es2099' for 'lib' option is a year not yet supported by this version of TypeScript.
error TS6284: Argument 'es2098' for 'target' option is a year not yet supported by this version of TypeScript.
error TS6284: Argument 'es2099' for '--lib' option is a year not yet supported by this version of TypeScript.
error TS6284: Argument 'es2098' for '--target' option is a year not yet supported by this version of TypeScript.