@fjell/registry
Version:
Dependency injection and service location system for the Fjell ecosystem
40 lines • 1.54 kB
TypeScript
import { RegistryError } from './RegistryError';
/**
* Base class for registry hub-related errors
*/
export declare abstract class RegistryHubError extends RegistryError {
readonly hubType?: string;
constructor(message: string, hubType?: string, context?: Record<string, any>);
}
/**
* Thrown when attempting to register a registry with a type that already exists
*/
export declare class DuplicateRegistryTypeError extends RegistryHubError {
readonly duplicateType: string;
constructor(type: string, context?: Record<string, any>);
}
/**
* Thrown when attempting to access a registry type that doesn't exist
*/
export declare class RegistryTypeNotFoundError extends RegistryHubError {
readonly requestedType: string;
readonly availableTypes: string[];
constructor(requestedType: string, availableTypes?: string[], context?: Record<string, any>);
}
/**
* Thrown when a registry factory function fails to create a valid registry
*/
export declare class RegistryFactoryError extends RegistryHubError {
readonly factoryError: Error;
readonly attemptedType: string;
constructor(type: string, factoryError: Error, context?: Record<string, any>);
}
/**
* Thrown when a factory returns an invalid registry object
*/
export declare class InvalidRegistryFactoryResultError extends RegistryHubError {
readonly factoryResult: any;
readonly attemptedType: string;
constructor(type: string, factoryResult: any, context?: Record<string, any>);
}
//# sourceMappingURL=RegistryHubError.d.ts.map