Comparing version 3.3.2 to 3.4.0
@@ -1,6 +0,6 @@ | ||
import { Constructor, Container, RegistrationType, AbstractConstructor, ImplementationType, ImplementationTypeWithInjection } from './types'; | ||
declare class ContainerImpl<RegisterTypeExtension = {}, RegisterInstanceExtension = {}> implements Container<RegisterTypeExtension, RegisterInstanceExtension> { | ||
protected singletons: Map<ImplementationTypeWithInjection<any>, Object>; | ||
protected instances: Map<RegistrationType<any>, any>; | ||
protected dependencies: Map<RegistrationType<any>, ImplementationTypeWithInjection<any> | Object>; | ||
import { Constructor, Container, RegistrationType, AbstractConstructor, ImplementationType, ImplementationTypeWithInjection, IHaveSingletons, IHaveInstances, IHaveDependencies } from './types'; | ||
declare class ContainerImpl<RegisterTypeExtension = {}, RegisterInstanceExtension = {}> implements Container<RegisterTypeExtension, RegisterInstanceExtension>, IHaveSingletons, IHaveInstances, IHaveDependencies { | ||
singletons: Map<ImplementationTypeWithInjection<any>, Object>; | ||
instances: Map<RegistrationType<any>, any>; | ||
dependencies: Map<RegistrationType<any>, ImplementationTypeWithInjection<any> | Object>; | ||
constructor(); | ||
@@ -22,3 +22,3 @@ /** register class */ | ||
} & RegisterTypeExtension; | ||
/** register any object as it constructor */ | ||
/** register any object as its constructor */ | ||
registerInstance<TInstance extends Object>(instance: TInstance): { | ||
@@ -25,0 +25,0 @@ /** or register the object as any class */ |
@@ -50,3 +50,3 @@ "use strict"; | ||
} | ||
/** register any object as it constructor */ | ||
/** register any object as its constructor */ | ||
registerInstance(instance) { | ||
@@ -53,0 +53,0 @@ const constructor = instance.constructor; |
@@ -41,2 +41,11 @@ import { singletonSymbol, dependenciesSymbol, injectionSymbol, inheritancePreserveSymbol } from './symbols'; | ||
} | ||
export type { AbstractConstructor, Constructor, Container, Dependency, DependencyRegistrator, DependencyResolver, ImplementationType, ImplementationTypeWithInjection, RegistrationType, WithInjectionParams, }; | ||
interface IHaveSingletons { | ||
singletons: Map<ImplementationTypeWithInjection<any>, Object>; | ||
} | ||
interface IHaveInstances { | ||
instances: Map<RegistrationType<any>, any>; | ||
} | ||
interface IHaveDependencies { | ||
dependencies: Map<RegistrationType<any>, ImplementationTypeWithInjection<any> | Object>; | ||
} | ||
export type { AbstractConstructor, Constructor, Container, Dependency, DependencyRegistrator, DependencyResolver, ImplementationType, ImplementationTypeWithInjection, RegistrationType, WithInjectionParams, IHaveSingletons, IHaveInstances, IHaveDependencies, }; |
{ | ||
"name": "cheap-di", | ||
"version": "3.3.2", | ||
"version": "3.4.0", | ||
"description": "JavaScript dependency injection like Autofac in .Net", | ||
@@ -5,0 +5,0 @@ "scripts": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
70750
556