/** * @name useSValidation * @author Fajar Rizky Hidayat */ type EventValidation = { ctr?: AbortController; data?: Partial; parser?: (value: any) => void; }; type UseSValidationProps = { service?: (event?: EventValidation) => any; data: T; message?: Record string>; param?: { type: string; path: string; }; }; interface UseSValidation { processing: boolean; error: (key?: keyof T) => boolean; message: (key: keyof T) => string; clear: () => void; cancel: () => void; validate: (option?: { service?: (event?: EventValidation) => any; }) => Promise; } export default function useSValidation( props: UseSValidationProps ): UseSValidation;