@spinajs/di
Advanced tools
Comparing version 2.0.75 to 2.0.76
import { BindException } from './exceptions.js'; | ||
import { ResolveType } from './enums.js'; | ||
import { isFactory, isConstructor } from './helpers.js'; | ||
import { isFactory, isConstructor, getTypeName } from './helpers.js'; | ||
import { DI } from './index.js'; | ||
@@ -14,2 +14,6 @@ export class Binder { | ||
this.container.Registry.register(type, this.implementation); | ||
const iType = getTypeName(this.implementation); | ||
const tType = getTypeName(type); | ||
this.container.emit(`di.registered.${iType}`, this.implementation); | ||
this.container.emit(`di.registered.${tType}`, this.implementation); | ||
return this; | ||
@@ -31,2 +35,4 @@ } | ||
this.container.Cache.add(type, this.implementation); | ||
const tType = getTypeName(type); | ||
this.container.emit(`di.registered.${tType}`, this.implementation); | ||
return this; | ||
@@ -53,2 +59,6 @@ } | ||
map.set(key, this.implementation); | ||
const iType = getTypeName(this.implementation); | ||
const tType = getTypeName(type); | ||
this.container.emit(`di.registered.${iType}`, this.implementation); | ||
this.container.emit(`di.registered.${tType}`, this.implementation); | ||
return this; | ||
@@ -67,2 +77,4 @@ } | ||
this.container.Registry.register(this.implementation, this.implementation); | ||
const iType = getTypeName(this.implementation); | ||
this.container.emit(`di.registered.${iType}`, this.implementation); | ||
return this; | ||
@@ -69,0 +81,0 @@ } |
{ | ||
"name": "@spinajs/di", | ||
"version": "2.0.75", | ||
"version": "2.0.76", | ||
"description": "lightweight di container ", | ||
@@ -46,3 +46,3 @@ "exports": "./lib/index.js", | ||
"dependencies": { | ||
"@spinajs/exceptions": "^2.0.75", | ||
"@spinajs/exceptions": "^2.0.76", | ||
"lodash": "^4.17.21", | ||
@@ -49,0 +49,0 @@ "reflect-metadata": "^0.1.13" |
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
130834
1972
Updated@spinajs/exceptions@^2.0.76