import { IContainer } from "../../interfaces/container.interface.mjs"; import { InjectableScope } from "../../enums/injectable-scope.enum.mjs"; import { Injectors } from "../../utils/get-injectors.mjs"; //#region src/internal/context/service-initialization-context.d.mts /** * Context provided to injectors during service initialization. * * Extends FactoryContext with additional tracking information about * the service being initialized, its dependencies, and scope. * Used for scope upgrade tracking and dependency management. */ interface ServiceInitializationContext { inject: Injectors['asyncInject']; /** * The container instance for dependency resolution. * This may be either a Container or ScopedContainer. */ container: IContainer; addDestroyListener: (listener: () => void) => void; getDestroyListeners: () => (() => void)[]; /** * The name of the service being initialized. */ serviceName: string; /** * Set of dependency names that this service depends on. * Automatically populated as dependencies are resolved. */ dependencies: Set; /** * The scope of the service being initialized. */ scope: InjectableScope; /** * Track a dependency that was resolved. * Used for scope upgrade tracking - if a Singleton service * resolves a Request dependency, the scope can be upgraded. * * @param name The name of the dependency * @param scope The scope of the dependency */ trackDependency(name: string, scope: InjectableScope): void; } //#endregion export { ServiceInitializationContext }; //# sourceMappingURL=service-initialization-context.d.mts.map