mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-06-19 12:45:58 -05:00
Enable strictFunctionTypes (#49929)
This commit is contained in:
@@ -2880,7 +2880,7 @@ export function convertToOptionsWithAbsolutePaths(options: CompilerOptions, toAb
|
||||
function convertToOptionValueWithAbsolutePaths(option: CommandLineOption | undefined, value: CompilerOptionsValue, toAbsolutePath: (path: string) => string) {
|
||||
if (option && !isNullOrUndefined(value)) {
|
||||
if (option.type === "list") {
|
||||
const values = value as readonly (string | number)[];
|
||||
const values = value as readonly string[];
|
||||
if (option.element.isFilePath && values.length) {
|
||||
return values.map(toAbsolutePath);
|
||||
}
|
||||
@@ -3846,7 +3846,8 @@ function validateSpecs(specs: readonly string[], errors: Push<Diagnostic>, disal
|
||||
}
|
||||
}
|
||||
|
||||
function specToDiagnostic(spec: string, disallowTrailingRecursion?: boolean): [DiagnosticMessage, string] | undefined {
|
||||
function specToDiagnostic(spec: CompilerOptionsValue, disallowTrailingRecursion?: boolean): [DiagnosticMessage, string] | undefined {
|
||||
Debug.assert(typeof spec === "string");
|
||||
if (disallowTrailingRecursion && invalidTrailingRecursionPattern.test(spec)) {
|
||||
return [Diagnostics.File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0, spec];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user