/** * Importing the necessary types for handling errors. * @import {ErrorFuncType, ErrorExpectedType, ErrorMessageType, ErrorMethodType, findErrorType} from '../types/error'; */ import { ErrorFuncType, ErrorExpectedType, ErrorMessageType, ErrorMethodType } from '../types/error'; /** * Err class is an Error handling class to check your method or variable or anything you want and returned expected message and error * @param T type of callback * @param U type of expected returned type * @param M type of message */ export declare class Err { #private; /** * @property method is an method or property you want to validate */ method: ErrorMethodType; /** * * @param method is an method or property you want to validate * @param expected is an something you want to validate quality to return element in method property * @param ErrorFunc is an method when method returned false this specific class constructor run * @param message is an property you want to returned as message to user */ constructor(method: ErrorMethodType, expected: ErrorExpectedType, ErrorFunc?: ErrorFuncType, message?: ErrorMessageType); /** * this method get all error if you have any error * @return object if have any error * @return true if anything will be fine */ getError: () => unknown; }