/** * @fileoverview Custom PurlError class for Package URL parsing and validation errors. * Provides consistent error message formatting for PURL-related exceptions. */ /** * Format error message for PURL exceptions. */ declare function formatPurlErrorMessage(message?: string): string; /** * Custom error class for Package URL parsing and validation failures. */ declare class PurlError extends Error { constructor(message?: string | undefined, options?: ErrorOptions | undefined); } /** * Specialized error for injection character detection. * Developers can catch this specifically to distinguish injection rejections * from other PURL validation errors and handle them at an elevated level * (e.g., logging, alerting, blocking). * * Properties: * - `component` — which PURL component was rejected ("name", "namespace") * - `charCode` — the character code of the injection character found * - `purlType` — the package type (e.g., "npm", "maven") */ declare class PurlInjectionError extends PurlError { readonly charCode: number; readonly component: string; readonly purlType: string; constructor(purlType: string, component: string, charCode: number, charLabel: string); } export { formatPurlErrorMessage, PurlError, PurlInjectionError };