import { Constructor, Disposable } from '@dandi/common'; import { DependencyInjectionScope, InjectionScope, InjectionToken, Provider, ProviderOptions, RegistrationSource } from '@dandi/core/types'; export interface RegisterOptions extends ProviderOptions { provide?: InjectionToken; } export declare type RepositoryEntry = Provider | Set>; export declare const GLOBAL_SCOPE: DependencyInjectionScope; export declare type RepositoryInstanceKey = InjectionToken | Provider; /** * Contains mappings of injection tokens to providers, and stores instances of injectables. */ export declare class Repository implements Disposable { private scope; private readonly _allowInstances; static for(scope: InjectionScope): Repository; static exists(scope: InjectionScope): boolean; get allowInstances(): boolean; private readonly registry; private readonly instances; private readonly children; private constructor(); register(source: RegistrationSource, target: Constructor | Provider, options?: RegisterOptions): this; get(token: InjectionToken): RepositoryEntry; get providers(): IterableIterator>; addInstance(key: RepositoryInstanceKey, value: TInstance): TInstance; getInstance(provider: Provider): TInstance; getChild(scope: InjectionScope): Repository; dispose(reason: string): Promise; private registerProvider; } //# sourceMappingURL=repository.d.ts.map