import { type Cursor } from './cursor.ts'; import { PropertyType } from './decorators/index.ts'; import { type Context, type DecoratorMetadataObject } from './types.ts'; export declare class EOFError extends Error { value?: any | undefined; constructor(value?: any | undefined); } export declare class NoConditionMatched extends Error { constructor(); } export declare class ReferringToEmptyClassError extends Error { constructor(classname: string); } export declare class RelationNotDefinedError extends Error { constructor(propertyKey: string | symbol); } export declare class RelationAlreadyDefinedError extends Error { constructor(propertyType: PropertyType, propertyKey: string); } export declare class UnknownPropertyType extends Error { constructor(field: any); } export declare class ValidationTestFailed extends Error { constructor(name: string, propertyName: string, propertyValue: unknown, message: string, cursor?: Cursor); } export declare class WrongArgumentReturnType extends Error { constructor(classname: string, property: string); } export declare class WrongBitfieldClassImplementation extends Error { constructor(property: string); } /** * Error is thrown when an error is catched during the reading process. * * @param {value} Temporary unfinished object that was being read. * @param {err} The error catch during the reading phase. */ export declare class PartialReadingError extends Error { value: any; err: Error; constructor(value: any, err: Error); } /** * `relationExistsOrThrow` Verifiy the existance of a primitive in the metadata * or throw an error. * * @typeParam This The type of the class the decorator is applied to. * @typeParam Target The type of the relation * @typeParam Value The type of the decorated property. * * @param {metadata} metadata The Class metadata object. * @param {context} context The decorator context object. * @returns {void} * * @throws {@link RelationNotDefinedError} if no relation metadata is found. * * @category Advanced Use */ export declare function relationExistsOrThrow(metadata: DecoratorMetadataObject, context: Context): void;