import { InjectFactory } from './inject-factory'; import { DeclaredInjectToken, InjectableClass, InjectToken } from './inject-token'; import { Logger } from './logger'; /** * Minimalistic TypeInjector. * * If you don't want to use the builder pattern or subscopes you could use the BasicTypeInjector * to further reduce runtime bundle size. * * @see {@link TypeInjector.construct} - using the builder pattern to configure your injector. */ export declare class BasicTypeInjector { /** * Get something from the cdi. * * Might create a new instance or return an existing one. * * @typeParam T - Type defined by the token. Will match the type of the returned value. * @param token - {@link InjectToken} identifying the value to inject * @returns a value that implements the type defined by the token. */ get(token: InjectToken): T; /** * Create a simple new top level injector. * * @see {@link TypeInjector.construct} - to create a preconfigured injector */ constructor({ instances, factories }?: InjectorConfig); protected _factories: Map, InjectFactory>; protected _instances: Map, any>; private _instancesInCreation; private _initialLogger; protected get logger(): Logger; /** * @internal */ getOptFactory(token: InjectToken): InjectFactory | undefined; private _getFactory; protected _markAsInCreation(token: InjectToken, factory: InjectFactory, scopeIdent?: symbol & { description: string; }): void; protected _finishedCreation(token: InjectToken): void; protected _abortedCreation(token: InjectToken): void; protected _create(token: InjectToken): T; protected _nameOf: (token: InjectToken) => string; protected _createDependencyEntryLog(token: InjectToken, factory: InjectFactory): string; private _createCyclicErrorMessage; } /** * @internal */ export declare function hasInjectConfig(token: unknown): token is InjectableClass; export interface InjectorConfig { instances?: Map, any> | { [key: DeclaredInjectToken]: any; }; factories?: Map, InjectFactory> | { [key: DeclaredInjectToken]: InjectFactory; }; } //# sourceMappingURL=basic-type-injector.d.ts.map