import { Descriptor, PartialServiceMap, ContainerServiceMap, ContainerKeys, TypeOfService, ServiceContainer } from "./interfaces"; import { RegistrationMap } from "./Configuration"; import { ICancellation } from "../interfaces"; import { LifetimeManager } from "./LifetimeManager"; import { ContainerConfiguration, FluentRegistrations } from "./fluent/interfaces"; export declare class Container implements ServiceContainer { readonly _services: ContainerServiceMap; readonly _lifetimeManager: LifetimeManager; readonly _cleanup: (() => void)[]; readonly _root: Container; readonly _parent?: Container; _disposed: boolean; constructor(parent?: Container); getRootContainer(): Container; getParent(): Container | undefined; getLifetimeManager(): LifetimeManager; resolve>(name: K, def?: TypeOfService): TypeOfService; resolve>(name: K, def: undefined): TypeOfService | undefined; /** * @deprecated use resolve() method */ getService>(name: K, def?: TypeOfService): TypeOfService; register(name: K, service: Descriptor): this; register(services: PartialServiceMap): this; /** @deprecated use getLifetimeManager() */ onDispose(callback: () => void): void; destroy(): void; dispose(): void; /** * @param{String|Object} config * The configuration of the container. Can be either a string or an object, * if the configuration is an object it's treated as a collection of * services which will be registered in the container. * * @param{Function} opts.contextRequire * The function which will be used to load a configuration or types for services. * */ configure(config: string | RegistrationMap, opts?: { contextRequire: any; baseModule?: string; }, ct?: ICancellation): Promise; applyConfig(config: Promise<{ default: ContainerConfiguration; }>, ct?: ICancellation): Promise>; applyConfig(config: Promise<{ [p in P]: ContainerConfiguration; }>, prop: P, ct?: ICancellation): Promise>; _applyLegacyConfig(config: RegistrationMap, opts: { contextRequire: any; baseModule?: string; }, ct?: ICancellation): Promise; fluent(config: FluentRegistrations, ct?: ICancellation): Promise; createChildContainer(): Container; }