type genericValidation = { length: { min: number; max: number }; regex: RegExp; }; type validationResult = { valid: boolean; error?: string; username?: string; name?: string; }; interface UrlValidationOptions { failOnTrailingSlash?: boolean; removeTrailingSlash?: boolean; allowedProtocols?: string[]; requireProtocol?: boolean; allowLocalhost?: boolean; allowIP?: boolean; maxLength?: number; } interface UrlValidationResult extends validationResult { url?: string; normalizedUrl?: string; } export type { genericValidation, validationResult, UrlValidationOptions, UrlValidationResult, };