UNPKG

@mcabreradev/filter

Version:

A powerful, SQL-like array filtering library for TypeScript and JavaScript with advanced pattern matching, MongoDB-style operators, deep object comparison, and zero dependencies

40 lines (39 loc) 1.75 kB
export declare class FilterError extends Error { readonly code: string; readonly context?: Record<string, unknown> | undefined; constructor(message: string, code: string, context?: Record<string, unknown> | undefined); toJSON(): Record<string, unknown>; toString(): string; } export declare class InvalidExpressionError extends FilterError { readonly validationErrors?: string[] | undefined; constructor(expression: unknown, details: string, validationErrors?: string[] | undefined); } export declare class OperatorError extends FilterError { readonly operator: string; constructor(operator: string, value: unknown, details: string); } export declare class ValidationError extends FilterError { readonly field?: string | undefined; readonly errors?: string[] | undefined; constructor(details: string, field?: string | undefined, errors?: string[] | undefined); } export declare class ConfigurationError extends FilterError { readonly option?: string | undefined; constructor(details: string, option?: string | undefined); } export declare class TypeMismatchError extends FilterError { readonly expected: string; readonly received: string; readonly field?: string | undefined; constructor(expected: string, received: string, field?: string | undefined); } export declare class GeospatialError extends FilterError { readonly coordinates?: unknown | undefined; constructor(details: string, coordinates?: unknown | undefined); } export declare class PerformanceLimitError extends FilterError { readonly limit?: number | undefined; readonly actual?: number | undefined; constructor(details: string, limit?: number | undefined, actual?: number | undefined); }