UNPKG

@fjell/registry

Version:

Dependency injection and service location system for the Fjell ecosystem

43 lines 1.75 kB
import { RegistryError } from './RegistryError'; /** * Base class for instance-related errors */ export declare abstract class InstanceError extends RegistryError { readonly keyPath: string[]; constructor(message: string, keyPath: string[], registryType?: string, context?: Record<string, any>); } /** * Thrown when an instance cannot be found for a given key path */ export declare class InstanceNotFoundError extends InstanceError { readonly missingKey?: string; constructor(keyPath: string[], missingKey?: string, registryType?: string, context?: Record<string, any>); } /** * Thrown when no instances are registered for a key path that exists in the tree */ export declare class NoInstancesRegisteredError extends InstanceError { constructor(keyPath: string[], registryType?: string, context?: Record<string, any>); } /** * Thrown when no instances are available (empty instances array) */ export declare class NoInstancesAvailableError extends InstanceError { constructor(keyPath: string[], registryType?: string, context?: Record<string, any>); } /** * Thrown when no instance matches the requested scopes */ export declare class ScopeNotFoundError extends InstanceError { readonly requestedScopes: string[]; readonly availableScopes: string[][]; constructor(keyPath: string[], requestedScopes: string[], availableScopes?: string[][], registryType?: string); } /** * Thrown when a key path has no children but children are expected */ export declare class NoChildrenAvailableError extends InstanceError { readonly parentKey: string; constructor(keyPath: string[], parentKey: string, registryType?: string, context?: Record<string, any>); } //# sourceMappingURL=InstanceError.d.ts.map