Please, help me fix this error:
type IValidator = (value?: string) => string | undefined;
type IComposeValidators = (validators: ((value?: string) => string | undefined)[]) => IValidator;
export const composeValidators: IComposeValidators = (...validators) => (value) => {
return validators.reduce((error, validator) => error || validator(value), undefined); // This expression is not callable. Type '((value?: string | undefined) => string | undefined)[]' has no call signatures.(2349)
};