import { TypedArray } from './array.js'; import { IContainer, IInjectDescriptor } from './interfaces.js'; import { Class } from './types.js'; export declare class ContainerCache { private container; private cache; private resolutionPromises; private creatingKeys; constructor(container: IContainer); [Symbol.iterator](): Generator<{ key: string; value: any; }, void, unknown>; remove(key: string | Class | TypedArray, parent?: boolean): void; add(key: string | Class | object, instance: any): void; /** * Add instance to cache only if it doesn't already exist (atomic operation for singletons) */ addIfNotExists(key: string | Class | object, instance: any): boolean; has(key: string | Class | object | TypedArray, parent?: boolean): boolean; get(key: string | Class | TypedArray, parent?: boolean): any; /** * Atomic get-or-create operation for singleton services * Prevents concurrent creation of the same singleton instance */ getOrCreate(sourceType: string | Class | TypedArray | object, targetType: string | Class | TypedArray, factory: () => Promise | T, isSingleton: boolean | undefined, descriptor: IInjectDescriptor, options?: unknown[]): Promise | T; /** * Get resolution statistics for monitoring */ getResolutionStats(): { cacheSize: number; activeResolutions: number; resolutionKeys: string[]; }; clear(): void; } //# sourceMappingURL=container-cache.d.ts.map