ajsfw
Version:
Ajs Framework
11 lines (10 loc) • 743 B
TypeScript
import { CtorTyped } from "ajsfw/types";
export declare const IIContainer: IContainer;
export interface IContainer {
addTransient<S>(serviceInterfaceIdentifier: S, serviceConstructor: CtorTyped<S>, ...serviceConfiguration: any[]): IContainer;
addScoped<S>(serviceInterfaceIdentifier: S, serviceConstructor: CtorTyped<S>, ...serviceConfiguration: any[]): IContainer;
addSingleton<S>(serviceInterfaceIdentifier: S, classToConstruct: CtorTyped<S>, ...serviceConfiguration: any[]): IContainer;
resolve<S>(serviceInterfaceIdentifier: S, throwUnresolvedException?: boolean): Promise<S>;
releaseSingletonInstanceReference(serviceInstance: any): void;
releaseScopedInstanceReference(serviceInstance: any): boolean;
}