import { DuplicateEntryException } from '@aequum/exceptions/data';
/**
 * Check if the error is a TypeORMError and if it is a duplicate error
*/
export declare function isDuplicateError(err: any): false | RegExpMatchArray | null;
/**
 * Check if the error is a duplicate entry error, if it is,
 * returns a `new DuplicateEntryException` with passed
 * arguments, otherwise returns the orignal error.
 */
export declare function duplicateEntryExceptionOrError<T extends Error>(err: T, message?: any, data?: any, duplicatedProperties?: string[]): T | DuplicateEntryException;
