/*! * Copyright (c) Microsoft Corporation and contributors. All rights reserved. * Licensed under the MIT License. */ import { IFluidDependencySynthesizer } from "./IFluidDependencySynthesizer.js"; import type { AsyncFluidObjectProvider, FluidObjectProvider, FluidObjectSymbolProvider } from "./types.js"; /** * DependencyContainer is similar to a IoC Container. It takes providers and will * synthesize an object based on them when requested. * @legacy * @beta */ export declare class DependencyContainer implements IFluidDependencySynthesizer { private readonly providers; private readonly parents; get IFluidDependencySynthesizer(): this; constructor(...parents: (IFluidDependencySynthesizer | undefined)[]); /** * Add a new provider * @param type - Name of the Type T being provided * @param provider - A provider that will resolve the T correctly when asked * @throws If passing a type that's already registered */ register(type: T, provider: FluidObjectProvider>): void; /** * Remove a provider * @param type - Name of the provider to remove */ unregister(type: keyof TMap): void; /** * {@inheritDoc (IFluidDependencySynthesizer:interface).synthesize} */ synthesize>(optionalTypes: FluidObjectSymbolProvider, requiredTypes: Required>): AsyncFluidObjectProvider; /** * {@inheritDoc (IFluidDependencySynthesizer:interface).has} * @param excludeParents - If true, exclude checking parent registries */ has(type: string, excludeParents?: boolean): boolean; /** * Get a provider for the given type. * @param provider - The name of the provider to get * @deprecated Needed for backwards compatability. */ private getProvider; private generateRequired; private generateOptional; private resolveProvider; } //# sourceMappingURL=dependencyContainer.d.ts.map