UNPKG

@baizey/dependency-injection

Version:
17 lines (16 loc) 733 B
import { Key, LifetimeCollection, Selector } from '../ServiceCollection'; import { ILifetime } from '../Lifetime'; import { ScopeContext } from './ScopeContext'; import { Provider } from './Provider'; export declare class DebugServiceProvider<E = any> implements Provider<E> { readonly instances: Partial<{ [key in keyof E]: any; }>; readonly proxy: E; readonly lifetimes: LifetimeCollection<E>; constructor(lifetimes: LifetimeCollection<E>); createProxy(context?: ScopeContext<E>): E; provide<T>(selector: Selector<T, E>, context?: ScopeContext<E>): T; enterLifetime<T>(key: Key<E>, currentContext?: ScopeContext<E>, lifetime?: ILifetime<T, E>): ScopeContext<E>; private createContext; }