Comparing version 0.4.2 to 0.4.3
@@ -42,3 +42,3 @@ import { ParamHandler, PropertyHandler } from "./Handlers"; | ||
static set(type: Function, value: any): void; | ||
static set(name: string, type: Function, value: any): void; | ||
static set(name: string, value: any): void; | ||
/** | ||
@@ -49,3 +49,3 @@ * Provides a set of values to be saved in the container. | ||
name?: string; | ||
type: Function; | ||
type?: Function; | ||
value: any; | ||
@@ -52,0 +52,0 @@ }[]): void; |
@@ -69,8 +69,8 @@ "use strict"; | ||
}; | ||
Container.set = function (nameOrType, typeOrValue, value) { | ||
if (arguments.length === 3) { | ||
Container.set = function (nameOrType, typeOrValue) { | ||
if (typeof nameOrType === "string") { | ||
this.instances.push({ | ||
name: nameOrType, | ||
type: typeOrValue, | ||
instance: value | ||
type: undefined, | ||
instance: typeOrValue | ||
}); | ||
@@ -93,3 +93,3 @@ } | ||
if (v.name) { | ||
_this.set(v.name, v.type, v.value); | ||
_this.set(v.name, v.value); | ||
} | ||
@@ -96,0 +96,0 @@ else { |
{ | ||
"name": "typedi", | ||
"version": "0.4.2", | ||
"description": "Dependency injection for Typescript", | ||
"license": "Apache-2.0", | ||
"version": "0.4.3", | ||
"description": "Dependency injection for TypeScript", | ||
"license": "MIT", | ||
"readmeFilename": "README.md", | ||
@@ -7,0 +7,0 @@ "private": false, |
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
40040