Deprecate ES3 in commandline parser (#56304)

Co-authored-by: Jake Bailey <5341706+jakebailey@users.noreply.github.com>
This commit is contained in:
Ryan Cavanaugh
2023-11-03 12:29:32 -07:00
committed by GitHub
parent 09fc67bd48
commit 1565f96e44
9 changed files with 11 additions and 8 deletions

View File

@@ -395,7 +395,9 @@ function generateOptionOutput(sys: System, option: CommandLineOption, rightAlign
// Group synonyms: es6/es2015
const inverted: { [value: string]: string[]; } = {};
option.type.forEach((value, name) => {
(inverted[value] ||= []).push(name);
if (!option.deprecatedKeys?.has(name)) {
(inverted[value] ||= []).push(name);
}
});
return Object.entries(inverted)
.map(([, synonyms]) => synonyms.join("/"))