import { ServiceIdentifier } from '../abstraction'; import 'reflect-metadata'; export declare const defaultContainerMap: Map; /** * A dependency injection container. Manages the registration and resolution of dependencies. * Each module or package should create its own instance of `Container`. */ export declare class Container { private _container; /** * Creates a new instance of the `Container`. */ constructor(); /** * Registers a service or factory in the container. * @param id - The service identifier (class or string). * @param instanceOrFactory - The service instance or a factory function. * @param transient - Set to `true` for transient services (new instance each time). Default is `false` (singleton). * @returns A function to unregister the service. * @throws {Error} If a service with the same ID is already registered. */ register(id: ServiceIdentifier | string | (new (...args: any[]) => T), instanceOrFactory: T | (() => T), transient?: boolean): () => void; get(id: ServiceIdentifier | string | (new (...args: any[]) => T)): T | undefined; /** * Resolves dependencies for a class and creates an instance. * @param ctor - The constructor of the class to instantiate. * @returns An instance of the class with dependencies resolved. * @throws {Error} If a dependency cannot be resolved. */ getInstance(ctor: new (...args: any[]) => T): T; /** * Resets the container (primarily for testing). Removes all registered services. */ reset(): void; /** * Gets an array of all registered service identifiers. Useful for debugging or introspection. * @returns An array of registered service identifiers (class constructors or strings). */ getRegisteredServiceIdentifiers(): (ServiceIdentifier | string)[]; }