feedbacker-react
Version:
A drop-in React feedback system for component-level feedback capture during development and design review
52 lines • 1.65 kB
TypeScript
/**
* Validation utilities for feedback data
* Ensures data integrity and type safety
*/
import { Feedback, Draft, ComponentInfo, BrowserInfo } from '../types';
/**
* Validation result interface
*/
export interface ValidationResult {
valid: boolean;
errors: string[];
}
/**
* Validate a complete feedback object
*/
export declare function validateFeedback(feedback: Partial<Feedback>): ValidationResult;
/**
* Validate a draft object
*/
export declare function validateDraft(draft: Partial<Draft>): ValidationResult;
/**
* Validate component info object
*/
export declare function validateComponentInfo(componentInfo: Partial<ComponentInfo>): ValidationResult;
/**
* Validate browser info object
*/
export declare function validateBrowserInfo(browserInfo: Partial<BrowserInfo>): ValidationResult;
/**
* Validate feedback store structure
*/
export declare function validateStorageData(data: any): boolean;
/**
* Validate comment content
*/
export declare function validateComment(comment: string): ValidationResult;
/**
* Validate screenshot data URL
*/
export declare function validateScreenshot(screenshot: string): ValidationResult;
/**
* Validate feedback ID format
*/
export declare function validateFeedbackId(id: string): ValidationResult;
/**
* Quick validation - returns boolean only
*/
export declare function isValidFeedback(feedback: Partial<Feedback>): boolean;
export declare function isValidDraft(draft: Partial<Draft>): boolean;
export declare function isValidComment(comment: string): boolean;
export declare function isValidScreenshot(screenshot: string): boolean;
//# sourceMappingURL=validation.d.ts.map