import { FluoCodeError } from '@fluojs/core'; /** * Structured context attached to DI errors so logs and tests can inspect the failing contract. */ export interface DiErrorContext { readonly token?: unknown; readonly scope?: string; readonly module?: string; readonly dependencyChain?: readonly unknown[]; readonly hint?: string; } /** * Raised when a provider declaration or inject token cannot be normalized into a valid DI registration. * * @remarks * This usually points to malformed provider objects, missing `@Inject(...)` tokens, or `null`/ * `undefined` references that were evaluated before a `ForwardRef.create()` indirection could be applied. */ export declare class InvalidProviderError extends FluoCodeError { constructor(message: string, context?: DiErrorContext); } /** * Raised when the container cannot complete a lifecycle operation such as registration, resolution, or disposal. * * @remarks * Use the attached context to inspect the token, module, scope, or dependency chain involved in the failed operation. */ export declare class ContainerResolutionError extends FluoCodeError { constructor(message: string, context?: DiErrorContext); } /** * Raised when a request-scoped provider is resolved outside a request container. * * @remarks * This protects the documented lifecycle guarantee that request-scoped providers are isolated per child scope. */ export declare class RequestScopeResolutionError extends FluoCodeError { constructor(message: string, context?: DiErrorContext); } /** * Raised when a provider scope is registered or consumed from an incompatible container scope. */ export declare class ScopeMismatchError extends FluoCodeError { constructor(message: string, context?: DiErrorContext); } /** * Raised when the container detects a circular dependency chain while resolving providers. * * @remarks * The formatted message includes the full dependency path plus a first-party hint that points callers toward * extracting shared logic, introducing a mediator, or moving the interaction to a later boundary. * `ForwardRef.create()` only defers declaration-time token lookup and cannot resolve a true constructor cycle. */ export declare class CircularDependencyError extends FluoCodeError { constructor(chain: readonly unknown[], detail?: string); } /** * Raised when the same token is registered twice without going through `container.override(...)`. */ export declare class DuplicateProviderError extends FluoCodeError { constructor(token: unknown); } //# sourceMappingURL=errors.d.ts.map