import type { Constructor, Resolve, Scope } from './types.js'; export declare class Container { /** @internal */ static activeContainer: Container | null; private registry; private requestInstances; private resolving; register(token: Constructor | string, factory: ((resolve: Resolve) => T) | (() => T), scope?: Scope): void; registerClass(cls: Constructor, scope?: Scope): void; resolve(token: Constructor | string): T; resolveOptional(token: Constructor | string): T | null; has(token: Constructor | string): boolean; clearRequestScope(): void; initAll(): Promise; /** * Phase 3 of init: invoke onReady() on all singletons that define it. * Called by Miia.doInit() after initAll() and compilePipelines(). * * Guarantees: * - By the time any onReady() runs, all onInit() hooks have completed. * * Caveats: * - Order of onReady() calls is registration order (same as initAll()). * Avoid inter-onReady dependencies - if provider A's onReady() relies on * provider B's onReady() having run first, the result is order-fragile. * - Lazy-registered providers (e.g. global guards added via app.useGuard() * after initAll() - see compilePipelines() in app.ts) will receive * onReady() but may not have received onInit(). This mirrors the existing * pre-existing quirk with onDestroy() and is not introduced by this change. */ bootstrapAll(): Promise; /** * Returns all singleton instances currently registered in the container. * Filters out string-token registrations (only class-keyed entries) and * entries that have not yet been instantiated. * * Used by DiscoveryService for ambient method-decorator discovery. */ getSingletonInstances(): Array<{ ctor: Constructor; instance: object; }>; destroyAll(): Promise; private instantiate; private callFactory; } export declare function inject(token: Constructor): T; export declare function inject(token: string): T; export declare function injectOptional(token: Constructor): T | null; export declare function injectOptional(token: string): T | null; export declare function runInContainerContext(container: Container, fn: () => T): T; //# sourceMappingURL=di-container.d.ts.map