mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-06-18 05:43:11 -05:00
Clean up helpers which are always present in ES2020 (#55515)
This commit is contained in:
@@ -110,7 +110,6 @@ import {
|
||||
toFileNameLowerCase,
|
||||
toPath,
|
||||
tracing,
|
||||
trimString,
|
||||
TsConfigOnlyOption,
|
||||
TsConfigSourceFile,
|
||||
TypeAcquisition,
|
||||
@@ -1699,13 +1698,13 @@ function createDiagnosticForInvalidCustomType(opt: CommandLineOptionOfCustomType
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export function parseCustomTypeOption(opt: CommandLineOptionOfCustomType, value: string, errors: Diagnostic[]) {
|
||||
return convertJsonOptionOfCustomType(opt, trimString(value || ""), errors);
|
||||
export function parseCustomTypeOption(opt: CommandLineOptionOfCustomType, value: string | undefined, errors: Diagnostic[]) {
|
||||
return convertJsonOptionOfCustomType(opt, (value ?? "").trim(), errors);
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export function parseListTypeOption(opt: CommandLineOptionOfListType, value = "", errors: Diagnostic[]): string | (string | number)[] | undefined {
|
||||
value = trimString(value);
|
||||
value = value.trim();
|
||||
if (startsWith(value, "-")) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user