UNPKG

@fjell/registry

Version:

Dependency injection and service location system for the Fjell ecosystem

32 lines 1.17 kB
/** * Base class for all registry-related errors */ export declare abstract class RegistryError extends Error { readonly registryType?: string; readonly context?: Record<string, any>; constructor(message: string, registryType?: string, context?: Record<string, any>); getDetails(): string; } /** * Thrown when attempting to create a registry with invalid parameters */ export declare class RegistryCreationError extends RegistryError { constructor(type: string, reason: string, context?: Record<string, any>); } /** * Thrown when a factory function returns an invalid instance */ export declare class InvalidFactoryResultError extends RegistryError { readonly keyPath: string[]; readonly factoryResult: any; constructor(keyPath: string[], factoryResult: any, registryType?: string); } /** * Thrown when attempting to register a non-instance object */ export declare class InvalidInstanceRegistrationError extends RegistryError { readonly keyPath: string[]; readonly attemptedRegistration: any; constructor(keyPath: string[], attemptedRegistration: any, registryType?: string); } //# sourceMappingURL=RegistryError.d.ts.map