UNPKG

@baizey/dependency-injection

Version:
14 lines (13 loc) 541 B
import { Provider } from './Provider'; import { LifetimeCollection, Selector } from '../ServiceCollection'; import { ScopeContext } from './ScopeContext'; export declare class ServiceProvider<E = any> implements Provider<E> { readonly instances: Partial<{ [key in keyof E]: any; }>; readonly lifetimes: LifetimeCollection<E>; readonly proxy: E; constructor(lifetimes: LifetimeCollection<E>); createProxy(context?: ScopeContext<E>): E; provide<T>(selector: Selector<T, E>, context?: ScopeContext<E>): T; }