import Model from "../../model.js"; type primaryKey = number | string; export interface ErrorMetadata { id?: null | primaryKey; modelName: string; attribute: string; message: string; } export default class ModelError extends Error { id?: primaryKey | null; modelName: string; attribute: string; message: string; static has(model: Model, attribute: string): boolean; static remove(model: Model, attribute: string): ModelError[]; static errorsFor(model: Model, attribute?: string): ModelError[]; static add(model: Model, attribute: string, messages: string[]): ModelError[]; constructor(model: Model, errorMetadata: ErrorMetadata); } export {};